/* eBay Baltic Export Summit kiosk game. Design tokens from the export hub
   design system: Market Sans, neutral ground, black CTAs, eBay four color accents. */

@font-face { font-family: "Market Sans"; src: url("../fonts/MarketSans-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Market Sans"; src: url("../fonts/MarketSans-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }

:root {
  --red: #F02D2D; --blue: #0968f6; --yellow: #F7B100; --green: #3CC14E;
  --ink: #191919; --deep: #0A1C6B;
  --n0: #ffffff; --n1: #f7f7f7; --n2: #efefef; --n3: #dcdcdc; --n5: #8a8a8a; --n7: #3f3f3f;
  --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
html, body { height: 100%; }
body {
  font-family: "Market Sans", "Helvetica Neue", Arial, sans-serif;
  background: #101216;
  color: var(--ink);
  overflow: hidden;
}

/* ---------- Kiosk stage: 1080x1920 scaled to fit ---------- */
#viewport { position: fixed; inset: 0; overflow: hidden; }
#stage {
  width: 1080px; height: 1920px; position: absolute; top: 0; left: 0; overflow: hidden;
  background: var(--n0); transform-origin: 0 0;
  box-shadow: 0 40px 120px rgba(0,0,0,.55);
  border-radius: 18px;
}
#framecap {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 12px; color: #6b7280; font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; white-space: nowrap;
}

/* ---------- Screens ---------- */
.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  padding: 64px 72px 72px; opacity: 0; pointer-events: none;
  transform: translateY(24px); transition: opacity .45s ease, transform .45s ease;
  background: var(--n0);
}
.screen.on { opacity: 1; pointer-events: auto; transform: translateY(0); z-index: 2; }

/* ---------- Top bar ---------- */
#topbar {
  position: absolute; top: 0; left: 0; right: 0; height: 148px; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 72px; opacity: 0; pointer-events: none; transition: opacity .4s;
}
#topbar.on { opacity: 1; pointer-events: auto; }
.wordmark { font-weight: 600; font-size: 64px; letter-spacing: -0.045em; }
.wordmark span:nth-child(1) { color: var(--red); }
.wordmark span:nth-child(2) { color: var(--blue); }
.wordmark span:nth-child(3) { color: var(--yellow); }
.wordmark span:nth-child(4) { color: var(--green); }
#progress { display: flex; gap: 14px; align-items: center; }
#progress .pip { width: 52px; height: 10px; border-radius: 5px; background: var(--n2); transition: background .3s; }
#progress .pip.done { background: var(--ink); }
#progress .pip.now { background: var(--blue); }
.screen .body { margin-top: 120px; display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* ---------- Type scale ---------- */
.kicker { font-size: 30px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--n5); margin-bottom: 18px; }
h1 { font-size: 88px; font-weight: 600; line-height: 1.04; letter-spacing: -0.02em; }
h2 { font-size: 64px; font-weight: 600; line-height: 1.08; letter-spacing: -0.015em; }
.lede { font-size: 34px; line-height: 1.45; color: var(--n7); margin-top: 22px; }

/* ---------- Buttons ---------- */
.btn {
  border: none; border-radius: var(--radius); cursor: pointer;
  font-family: inherit; font-weight: 600; text-align: center;
  transition: transform .12s ease, background .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: #fff; font-size: 40px; padding: 34px 64px; }
.btn-primary:disabled { background: var(--n3); color: #fff; cursor: default; }
.btn-ghost { background: transparent; color: var(--ink); border: 3px solid var(--ink); font-size: 32px; padding: 22px 44px; }
.footer-cta { margin-top: auto; display: flex; gap: 28px; align-items: center; justify-content: flex-end; padding-top: 36px; }
.footer-cta .hint { margin-right: auto; font-size: 28px; color: var(--n5); }

/* ---------- Attract ---------- */
#s-attract { justify-content: space-between; background: var(--n0); padding: 0; overflow: hidden; }
#attract-top { padding: 96px 88px 0; position: relative; z-index: 3; }
.lockup { font-weight: 600; letter-spacing: -0.03em; line-height: .96; font-size: 150px; }
.lockup .row { display: block; }
.lockup .accent { color: var(--blue); }
#attract-tag {
  display: inline-block; margin-top: 34px; padding: 14px 26px; border: 4px solid var(--ink);
  border-radius: var(--radius); font-size: 30px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  transform: rotate(-2deg);
}
#attract-stats { padding: 0 88px; display: flex; gap: 64px; position: relative; z-index: 3; }
#attract-stats .stat b { display: block; font-size: 66px; font-weight: 600; }
#attract-stats .stat span { font-size: 27px; color: var(--n5); }
#attract-cta { position: relative; z-index: 3; padding: 0 88px 110px; display: flex; flex-direction: column; gap: 40px; }
#touch-pulse {
  align-self: flex-start; background: var(--ink); color: #fff; border-radius: var(--radius);
  font-size: 46px; font-weight: 600; padding: 42px 78px; cursor: pointer;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.045); } }
#lang-row { display: flex; gap: 20px; }
.lang { font-size: 28px; font-weight: 600; padding: 16px 30px; border-radius: var(--radius); border: 3px solid var(--n3); background: #fff; cursor: pointer; }
.lang.on { border-color: var(--ink); background: var(--ink); color: #fff; }
#attract-ticker {
  position: absolute; bottom: 0; left: 0; right: 0; background: var(--deep); color: #fff;
  font-size: 26px; padding: 18px 0; white-space: nowrap; overflow: hidden; z-index: 4;
}
#ticker-inner { display: inline-block; padding-left: 100%; animation: tick 26s linear infinite; }
@keyframes tick { to { transform: translateX(-100%); } }
#attract-art { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.float-card {
  position: absolute; width: 220px; border-radius: 16px; overflow: hidden; background: #fff;
  border: 3px solid var(--n2); animation: drift 7s ease-in-out infinite alternate;
  box-shadow: 0 22px 54px rgba(0,0,0,.14);
}
.float-card img { width: 100%; height: 140px; object-fit: cover; display: block; }
.float-card span {
  display: block; color: #fff; font-size: 23px; font-weight: 600; padding: 10px 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@keyframes drift { from { transform: translateY(-14px) rotate(-2deg); } to { transform: translateY(14px) rotate(2deg); } }

/* ---------- Card grids ---------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 48px; }
.card {
  border: 3px solid var(--n3); border-radius: 16px; background: #fff; cursor: pointer;
  padding: 44px 40px; display: flex; flex-direction: column; gap: 12px; text-align: left;
  transition: border-color .15s, transform .12s, box-shadow .2s; position: relative; overflow: hidden;
}
.card:active { transform: scale(.98); }
.card.sel { border-color: var(--ink); box-shadow: 0 14px 44px rgba(0,0,0,.10); }
.cat-card { padding: 0; overflow: hidden; }
.cat-card .cat-photo { height: 250px; overflow: hidden; }
.cat-card .cat-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.cat-card:active .cat-photo img { transform: scale(1.04); }
.cat-card .cat-meta { padding: 26px 32px 30px; display: flex; flex-direction: column; gap: 8px; }
.cat-card .cat-stripe { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; display: block; }
.card b { font-size: 40px; font-weight: 600; }
.card span { font-size: 27px; color: var(--n5); }
.cards.one-col { grid-template-columns: 1fr; }
.cards.one-col .card { flex-direction: row; align-items: center; gap: 28px; padding: 40px 44px; }
.cards.one-col .card b { font-size: 42px; }
.cards.one-col .card span { margin-left: auto; text-align: right; }

/* ---------- Photo step ---------- */
#photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; margin-top: 44px; }
.ph {
  position: relative; border-radius: 16px; overflow: hidden; cursor: pointer; height: 330px;
  border: 4px solid var(--n3); background: var(--n1); transition: border-color .15s, transform .1s;
}
.ph:active { transform: scale(.98); }
.ph .ph-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph .pick {
  position: absolute; top: 14px; right: 14px; width: 58px; height: 58px; border-radius: 50%;
  background: #fff; border: 4px solid var(--n3); display: grid; place-items: center;
  font-size: 30px; font-weight: 600; color: #fff; transition: all .15s;
}
.ph.sel { border-color: var(--blue); }
.ph.sel .pick { background: var(--blue); border-color: var(--blue); }
.ph .verdict {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 18px; font-size: 24px; font-weight: 600;
  color: #fff; opacity: 0; transition: opacity .3s;
}
.ph.reveal .verdict { opacity: 1; }
.ph .verdict.good { background: rgba(60,193,78,.94); }
.ph .verdict.bad { background: rgba(240,45,45,.92); }
#photo-count { font-size: 30px; font-weight: 600; }

/* ---------- Item strip ---------- */
.item-strip {
  display: flex; gap: 28px; align-items: flex-start; margin-top: 30px;
  border: 3px solid var(--n2); border-radius: 18px; padding: 22px 26px; background: var(--n1);
}
.item-strip img { width: 130px; height: 130px; border-radius: 12px; object-fit: cover; flex: none; }
.item-strip b { font-size: 36px; }
.item-strip .lede { margin-top: 6px; font-size: 27px; line-height: 1.4; }

/* ---------- Title step ---------- */
#title-preview {
  margin-top: 44px; min-height: 150px; border: 3px dashed var(--n3); border-radius: 16px;
  padding: 28px 32px; font-size: 42px; font-weight: 600; line-height: 1.25;
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
}
#title-preview .placeholder { color: var(--n3); font-weight: 400; font-size: 34px; }
#title-preview .chosen { background: var(--n1); border-radius: 10px; padding: 8px 18px; }
#char-meter { font-size: 26px; color: var(--n5); margin-top: 14px; }
#tile-grid { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 40px; }
.tile {
  font-size: 34px; font-weight: 600; padding: 26px 34px; border-radius: 12px; cursor: pointer;
  border: 3px solid var(--n3); background: #fff; transition: all .15s;
}
.tile.sel { background: var(--ink); border-color: var(--ink); color: #fff; }
.tile.reveal-good { background: var(--green); border-color: var(--green); color: #fff; }
.tile.reveal-bad { background: var(--red); border-color: var(--red); color: #fff; text-decoration: line-through; }

/* ---------- Price step ---------- */
#price-canvas-wrap { margin-top: 46px; position: relative; }
#price-canvas { width: 100%; height: 430px; border-radius: 16px; background: var(--n1); }
#price-readout { display: flex; align-items: baseline; gap: 26px; margin-top: 40px; }
#price-value { font-size: 110px; font-weight: 600; letter-spacing: -0.02em; }
#price-verdict { font-size: 34px; font-weight: 600; padding: 12px 24px; border-radius: 10px; }
#price-verdict.low { background: #fdeeee; color: var(--red); }
#price-verdict.sweet { background: #ecf9ee; color: #1d8b2d; }
#price-verdict.high { background: #fff6e3; color: #9a6f00; }
#price-slider { width: 100%; margin-top: 34px; -webkit-appearance: none; appearance: none; height: 22px; border-radius: 11px; background: var(--n2); outline: none; }
#price-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 84px; height: 84px; border-radius: 50%;
  background: var(--ink); border: 8px solid #fff; box-shadow: 0 8px 24px rgba(0,0,0,.28); cursor: pointer;
}
#price-context { font-size: 28px; color: var(--n5); margin-top: 26px; }

/* ---------- Launch ---------- */
#s-launch { padding: 0; background: var(--deep); }
#launch-intro {
  position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 52px; background: var(--n0);
  transition: opacity .5s; text-align: center; padding: 0 90px;
}
#launch-intro.gone { opacity: 0; pointer-events: none; }
#listing-summary {
  border: 3px solid var(--n2); border-radius: 20px; padding: 36px 42px; width: 100%;
  text-align: left; display: flex; gap: 34px; align-items: center;
}
#listing-summary img { width: 170px; height: 170px; border-radius: 14px; object-fit: cover; flex: none; }
#listing-summary .sum-rows { display: flex; flex-direction: column; gap: 16px; flex: 1; }
#listing-summary .t { font-size: 40px; font-weight: 600; }
#listing-summary .row { font-size: 30px; color: var(--n7); display: flex; justify-content: space-between; }
#btn-listit {
  background: var(--ink); color: #fff; font-size: 64px; font-weight: 600;
  padding: 52px 110px; border-radius: 16px; border: none; cursor: pointer;
  animation: pulse 1.6s ease-in-out infinite; font-family: inherit;
}
#map-wrap { position: absolute; inset: 0; }
#mapcv { width: 100%; height: 100%; }
#orders-feed {
  position: absolute; left: 60px; right: 60px; bottom: 210px; display: flex;
  flex-direction: column-reverse; gap: 18px; pointer-events: none;
}
.order-toast {
  background: rgba(255,255,255,.97); border-radius: 14px; padding: 22px 30px;
  font-size: 32px; font-weight: 600; display: flex; align-items: center; gap: 18px;
  box-shadow: 0 12px 34px rgba(0,0,0,.35);
  animation: toast-in .45s cubic-bezier(.2,.9,.3,1.2);
}
.order-toast .amt { margin-left: auto; color: #1d8b2d; }
@keyframes toast-in { from { transform: translateY(46px) scale(.9); opacity: 0; } }
#rev-hud {
  position: absolute; top: 70px; left: 60px; right: 60px; display: flex;
  justify-content: space-between; align-items: flex-start; color: #fff;
}
#rev-hud .lab { font-size: 26px; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
#rev-total { font-size: 96px; font-weight: 600; letter-spacing: -0.02em; }
#rev-orders { font-size: 96px; font-weight: 600; text-align: right; }
#launch-msg {
  position: absolute; left: 0; right: 0; bottom: 84px; text-align: center; color: #fff;
  font-size: 34px; opacity: .9;
}

/* ---------- Score ---------- */
#score-hero { display: flex; align-items: center; gap: 60px; margin-top: 30px; }
#score-ring { width: 360px; height: 360px; position: relative; flex: none; }
#score-ring svg { transform: rotate(-90deg); }
#score-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 120px; font-weight: 600; letter-spacing: -0.02em;
}
#score-num small { font-size: 30px; color: var(--n5); display: block; text-align: center; }
#archetype { flex: 1; }
#archetype .aname { font-size: 66px; font-weight: 600; line-height: 1.05; }
#archetype .aline { font-size: 30px; color: var(--n7); margin-top: 18px; line-height: 1.4; }
#dim-bars { margin-top: 46px; display: flex; flex-direction: column; gap: 22px; }
.dim { display: grid; grid-template-columns: 260px 1fr 90px; align-items: center; gap: 24px; font-size: 30px; }
.dim .bar { height: 26px; border-radius: 13px; background: var(--n2); overflow: hidden; }
.dim .bar i { display: block; height: 100%; border-radius: 13px; width: 0; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.dim b { text-align: right; font-weight: 600; }
#chapter-strip { margin-top: 54px; }
#chapter-strip .kicker { margin-bottom: 20px; }
#chapter-cards { display: flex; gap: 20px; }
.chap {
  flex: 1; border: 3px solid var(--n3); border-radius: 14px; padding: 24px 20px; font-size: 25px;
  display: flex; flex-direction: column; gap: 8px; min-height: 150px;
}
.chap b { font-size: 27px; }
.chap.done { border-color: var(--green); background: #f3fbf4; }
.chap.locked { color: var(--n5); }
.chap .lock { font-size: 30px; }

/* ---------- Initials ---------- */
#init-slots { display: flex; gap: 30px; margin-top: 52px; justify-content: center; }
.init-slot {
  width: 150px; height: 190px; border: 4px solid var(--n3); border-radius: 16px;
  display: grid; place-items: center; font-size: 100px; font-weight: 600; background: var(--n1);
}
.init-slot.cur { border-color: var(--blue); background: #f5f9ff; }
#kb { display: flex; flex-direction: column; gap: 18px; margin-top: 60px; align-items: center; }
.kb-row { display: flex; gap: 16px; }
.key {
  width: 92px; height: 100px; border-radius: 12px; border: 3px solid var(--n3); background: #fff;
  font-size: 42px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.key.wide { width: 200px; font-size: 30px; }
.key:active { background: var(--ink); color: #fff; }

/* ---------- Leaderboard ---------- */
#board { margin-top: 44px; display: flex; flex-direction: column; gap: 16px; }
.brow {
  display: grid; grid-template-columns: 90px 130px 1fr 130px; align-items: center; gap: 20px;
  border-radius: 14px; padding: 22px 30px; font-size: 36px; background: var(--n1);
}
.brow.me { background: var(--ink); color: #fff; transform: scale(1.02); box-shadow: 0 14px 40px rgba(0,0,0,.18); }
.brow .rank { font-weight: 600; color: var(--n5); }
.brow.me .rank { color: var(--yellow); }
.brow .ini { font-weight: 600; letter-spacing: .1em; }
.brow .city { color: var(--n5); font-size: 28px; }
.brow.me .city { color: #cfcfcf; }
.brow .sc { text-align: right; font-weight: 600; }

/* ---------- Reward ---------- */
#s-reward .body { align-items: center; text-align: center; }
#reward-card {
  margin-top: 40px; border: 3px solid var(--n2); border-radius: 24px; padding: 52px 60px;
  display: flex; gap: 56px; align-items: center; text-align: left; width: 100%;
}
#reward-qr { width: 330px; height: 330px; flex: none; border-radius: 14px; border: 3px solid var(--n2); }
#reward-list { display: flex; flex-direction: column; gap: 20px; }
#reward-list .rl { display: flex; gap: 18px; font-size: 31px; align-items: flex-start; line-height: 1.3; }
#reward-list .rl .tick { color: var(--green); font-weight: 600; font-size: 34px; }
#reward-timer { margin-top: 44px; font-size: 27px; color: var(--n5); }

/* ---------- Coach modal ---------- */
#coach-scrim {
  position: absolute; inset: 0; z-index: 60; background: rgba(16,18,22,.45);
  display: grid; place-items: center; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
#coach-scrim.on { opacity: 1; }
#coach {
  width: 860px; max-width: 88%; background: #fff; border-radius: 24px; overflow: hidden;
  box-shadow: 0 40px 110px rgba(0,0,0,.4); transform: scale(.88) translateY(26px);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.2);
}
#coach-scrim.on #coach { transform: scale(1) translateY(0); }
#coach-head { padding: 26px 0; display: grid; place-items: center; }
#coach-head span {
  width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
  font-size: 52px; font-weight: 600; color: #fff;
}
#coach.tone-good #coach-head span { background: var(--green); }
#coach.tone-bad #coach-head span { background: var(--red); }
#coach-body { padding: 6px 56px 40px; font-size: 36px; line-height: 1.5; text-align: center; color: var(--ink); }
#coach-body b { display: block; font-size: 44px; margin-bottom: 12px; }
#coach.tone-good #coach-body b { color: #1d8b2d; }
#coach.tone-bad #coach-body b { color: var(--red); }
#coach-bar { height: 12px; background: var(--n2); }
#coach-bar-fill { height: 100%; width: 100%; background: var(--ink); }

/* ---------- Confetti + misc ---------- */
#confetti { position: absolute; inset: 0; pointer-events: none; z-index: 80; }
#mute {
  position: absolute; right: 26px; bottom: 26px; z-index: 90; width: 84px; height: 84px;
  border-radius: 50%; border: 3px solid var(--n3); background: #fff; font-size: 36px; cursor: pointer;
}
#demo-menu {
  position: absolute; left: 26px; bottom: 26px; z-index: 90; font-size: 24px; color: var(--n5);
  background: #fff; border: 2px solid var(--n3); border-radius: 10px; padding: 12px 20px; cursor: pointer;
}
#demo-panel {
  position: absolute; left: 26px; bottom: 96px; z-index: 95; background: #fff; border: 2px solid var(--n3);
  border-radius: 12px; padding: 14px; display: none; flex-direction: column; gap: 6px;
}
#demo-panel.on { display: flex; }
#demo-panel button { font-family: inherit; font-size: 22px; padding: 10px 16px; border: none; background: var(--n1); border-radius: 8px; cursor: pointer; text-align: left; }
.toast-mini {
  position: absolute; left: 50%; bottom: 140px; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 28px; padding: 18px 32px; border-radius: 12px;
  z-index: 99; animation: toast-in .3s;
}

.ship-icon { font-size: 44px; }
.cards.one-col .card .ship-icon { flex: none; }
#attract-stats { position: relative; z-index: 3; }

/* ---------- Spot the Mistake ---------- */
#spot-listing { margin-top: 40px; display: flex; flex-direction: column; gap: 18px; }
.spot-row {
  display: grid; grid-template-columns: 240px 1fr 64px; align-items: center; gap: 24px;
  border: 3px solid var(--n3); border-radius: 14px; padding: 24px 28px; cursor: pointer;
  background: #fff; font-size: 30px; transition: border-color .15s, background .15s; text-align: left;
}
.spot-row .sp-label { font-weight: 600; color: var(--n5); font-size: 26px; text-transform: uppercase; letter-spacing: .08em; }
.spot-row .sp-value { font-weight: 600; }
.spot-row .sp-mark { width: 52px; height: 52px; border-radius: 50%; border: 4px solid var(--n3); display: grid; place-items: center; font-size: 28px; color: #fff; }
.spot-row.sel { border-color: var(--red); background: #fdf3f3; }
.spot-row.sel .sp-mark { background: var(--red); border-color: var(--red); }
.spot-row.photo-row { grid-template-columns: 240px 1fr 64px; }
.spot-row .sp-photo { width: 170px; height: 120px; border-radius: 10px; object-fit: cover; }
.spot-row.rv-hit { border-color: var(--green); background: #f0faf1; }
.spot-row.rv-miss { border-color: var(--red); background: #fdf3f3; }
.spot-row.rv-wrong { border-color: var(--yellow); background: #fff9ea; }
.spot-row .sp-why { grid-column: 1 / -1; font-size: 25px; color: var(--n7); line-height: 1.35; display: none; }
.spot-row.reveal .sp-why { display: block; }
.chap.playable { border-color: var(--ink); cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.10); }
.chap.playable .play-chip {
  display: inline-block; background: var(--ink); color: #fff; border-radius: 8px;
  padding: 6px 14px; font-size: 22px; font-weight: 600; margin-top: 4px;
}
