/* JSPL Logistics Master — kiosk UI over full-bleed Three.js canvas */
@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/space-grotesk-var-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-var-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --navy: #0f2440;
  --navy-2: #16345c;
  --line: #2a4d7e;
  --line-soft: rgba(122, 162, 214, .16);
  --red: #e31e24;
  --red-2: #c0151b;
  --amber: #f5b301;
  --green: #35c46a;
  --text: #eaf0f8;
  --text-2: #8fa6c4;
  --radius: 16px;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --panel-grad: linear-gradient(180deg, rgba(22, 42, 70, .94), rgba(12, 26, 46, .96));
  --panel-shadow: 0 24px 48px -12px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .07);
}
.icon { vertical-align: -3px; flex: 0 0 auto; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
:root {
  --sky-top: rgb(125, 178, 224);
  --sky-mid: rgb(176, 212, 238);
  --sky-bot: rgb(214, 233, 244);
}
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 46%, var(--sky-bot) 100%);
  color: var(--text);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#labels { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
.map-label {
  position: absolute; top: 0; left: 0;
  background: rgba(15, 36, 64, .85); border: 1px solid var(--line);
  color: var(--text); font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  transition: opacity .2s;
}
.map-label.accent { border-color: var(--red); }

.glass {
  background: var(--panel-grad);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  box-shadow: var(--panel-shadow);
}
.hidden { display: none !important; }

h1, h2, h3, .brand, .card-kicker, .stars, .overall b, .hud-chip b, .board, #cd-num, .do-name, .title-banner, #initials-slots span {
  font-family: var(--display);
}

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-family: var(--display); color: var(--text); cursor: pointer;
  border: 1px solid var(--line-soft); background: rgba(34, 58, 92, .85);
  border-radius: 13px; padding: 12px 22px; font-size: 16px; font-weight: 600;
  min-height: 48px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: transform .1s, box-shadow .15s, filter .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
}
.btn:active { transform: scale(.965); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.btn-primary {
  background: linear-gradient(180deg, #f0353b, var(--red) 55%, var(--red-2));
  border-color: rgba(255, 120, 124, .45);
  box-shadow: 0 6px 18px -4px rgba(227, 30, 36, .6), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:disabled { opacity: .35; cursor: default; filter: saturate(.4); }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-big { font-size: 20px; padding: 16px 34px; border-radius: 15px; }

/* ---------- HUD ---------- */
#hud { position: fixed; top: 14px; left: 14px; right: 14px; z-index: 5; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.hud-strip { display: flex; gap: 22px; padding: 10px 20px 12px; }
.hud-chip { min-width: 108px; }
.hud-top { display: flex; align-items: baseline; gap: 7px; font-size: 14px; }
.hud-top .hud-ic { color: var(--text-2); align-self: center; display: flex; }
.hud-chip b { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.hud-chip i { font-style: normal; color: var(--text-2); font-size: 11px; }
.hud-chip b.over { color: var(--red); }
.hud-bar { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .1); margin-top: 6px; overflow: hidden; }
.hud-bar i { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--green); transition: width .4s, background .3s; }
.hud-bar i.over { background: var(--red); }
#triangle-wrap { padding: 10px; width: 172px; }
#triangle { width: 100%; display: block; }
.tri-guide { fill: none; stroke: rgba(143, 166, 196, .28); stroke-width: 1; }
#tri-budget { fill: none; stroke: var(--text-2); stroke-dasharray: 4 4; stroke-width: 1.4; }
#tri-value { fill: rgba(53, 196, 106, .30); stroke: var(--green); stroke-width: 2.4; stroke-linejoin: round; transition: all .35s; }
#tri-value.over { fill: rgba(227, 30, 36, .30); stroke: var(--red); }
.tri-dot { fill: var(--text-2); }
.tri-label { fill: var(--text-2); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; font-family: var(--display); }

/* ---------- boot screen ---------- */
#boot {
  position: fixed; inset: 0; z-index: 60; background: var(--navy);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  transition: opacity .6s; font-family: var(--display);
}
#boot.gone { opacity: 0; pointer-events: none; }
#boot .b-mark { font-size: 44px; font-weight: 700; letter-spacing: .02em; color: #fff; }
#boot .b-mark em { font-style: normal; color: var(--red); }
#boot .b-rule { width: 220px; height: 1px; background: var(--line); }
#boot .b-sub { font-size: 14px; font-weight: 500; letter-spacing: .42em; color: var(--text-2); text-indent: .42em; }
#boot .b-load { width: 160px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 14px; }
#boot .b-load i { display: block; height: 100%; width: 40%; border-radius: 2px; background: var(--red);
  animation: boot-slide 1.1s ease-in-out infinite; }
@keyframes boot-slide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

/* ---------- screens ---------- */
#screens { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
.screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.screen > * { pointer-events: auto; }

.card { padding: 28px 32px; max-width: 620px; width: calc(100% - 32px); max-height: calc(100% - 40px); overflow-y: auto; }
.card-kicker { color: var(--red); font-size: 12.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; }
.card h2 { margin: 0 0 10px; font-size: 24px; line-height: 1.25; }
.card p { color: var(--text-2); font-size: 15px; line-height: 1.5; margin: 0 0 14px; }

/* start */
#s-start { flex-direction: column; }
.start-inner { text-align: center; max-width: 720px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: -4vh; }
.brand { font-size: 15px; font-weight: 800; letter-spacing: .3em; color: #fff; background: rgba(15,36,64,.8); border: 1px solid var(--line); padding: 8px 20px; border-radius: 999px; }
.brand span { color: var(--red); }
.start-inner h1 { font-size: clamp(24px, 4.2vw, 40px); margin: 0; text-shadow: 0 2px 18px rgba(0,0,0,.55); }
.start-inner h1 em { font-style: normal; color: var(--amber); }
.conditions { padding: 10px 20px; font-size: 14px; color: var(--text-2); display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.conditions b { color: var(--text); font-weight: 600; }
.start-buttons { display: flex; gap: 14px; align-items: center; }

/* contract selection */
.contract-card-wrap { max-width: 780px; }
#contract-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.contract {
  background: var(--navy); border: 2px solid var(--line); border-radius: 14px;
  padding: 12px 14px; cursor: pointer; text-align: left;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.contract.selected { border-color: var(--red); box-shadow: 0 0 0 3px rgba(227, 30, 36, .25); transform: translateY(-2px); }
.ct-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.ct-name { font-family: var(--display); font-weight: 700; font-size: 16px; }
.ct-mult { font-family: var(--display); font-weight: 700; font-size: 12px; color: var(--amber); background: rgba(245, 179, 1, .12); border: 1px solid rgba(245, 179, 1, .35); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.ct-diff { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); margin: 2px 0 6px; }
.ct-blurb { color: var(--text-2); font-size: 11.8px; line-height: 1.4; min-height: 48px; }
.ct-links { margin: 8px 0 6px; display: flex; flex-direction: column; gap: 4px; }
.ct-link { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-2); }
.ct-link .icon { flex: 0 0 auto; }
.ct-link .dots { display: flex; gap: 3px; margin-left: auto; }
.ct-link .dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.ct-link .dots i.on { background: var(--cc, var(--green)); }
.ct-link.none { opacity: .55; }
.ct-link.none .no { margin-left: auto; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: #ff8f93; }
.ct-budgets { display: flex; gap: 6px; font-size: 10.8px; color: var(--text-2); border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 7px; }
.ct-budgets b { color: var(--text); font-family: var(--display); }
#btn-brief-go { margin-top: 14px; }
.cond-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.cond-item { font-size: 14px; color: var(--text-2); }
.cond-item b { color: var(--text); }
#btn-brief-go { margin-top: 16px; width: 100%; }

/* plan */
#s-plan { align-items: flex-end; justify-content: center; }
#plan-panel { margin: 0 12px 12px; padding: 16px 18px 14px; width: min(880px, calc(100% - 24px)); }
.plan-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.plan-hint { color: var(--text-2); font-size: 13px; }
#corridor-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.corridor-card {
  background: var(--navy); border: 2px solid var(--line); border-radius: 12px;
  padding: 10px 12px; position: relative; transition: border-color .15s, box-shadow .15s;
  min-height: 118px;
}
.corridor-card.active { border-color: var(--cc, var(--amber)); }
.corridor-card.droptarget { border-color: var(--green); box-shadow: 0 0 0 3px rgba(53,196,106,.3); }
.cc-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.cc-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cc); }
.cc-blurb { color: var(--text-2); font-size: 11.8px; line-height: 1.35; margin: 5px 0 8px; }
.cc-stats { font-size: 12px; color: var(--text-2); }
.cc-stats b { color: var(--text); }
.cc-bundles { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; min-height: 26px; }
.tray-wrap { margin-top: 12px; }
.tray-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--text-2); margin-bottom: 6px; }
#bundle-tray { display: flex; gap: 8px; min-height: 44px; flex-wrap: wrap; }
.bundle {
  background: linear-gradient(180deg, #c3cedd, #8b99ad); color: #16233b;
  border: 1.5px solid #e2e8f0; border-radius: 9px; font-weight: 700; font-size: 13px;
  font-family: var(--display);
  padding: 9px 13px; cursor: grab; touch-action: none; min-width: 74px; text-align: center;
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.bundle.small { padding: 3px 8px; font-size: 11px; min-width: 0; border-width: 1.5px; }
.bundle.selected { outline: 3px solid var(--amber); }
#drag-ghost { position: fixed; z-index: 50; pointer-events: none; opacity: .9; }
#plan-warnings { margin-top: 8px; }
.warning { color: var(--amber); font-size: 13px; margin: 3px 0; }
#btn-depart { margin-top: 12px; width: 100%; }

/* journey ops panel */
#s-journey { align-items: flex-end; }
#journey-bar { margin: 0 auto 16px; padding: 14px 20px 12px; width: min(600px, calc(100% - 24px)); }
.jb-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.jprog { height: 8px; background: var(--navy); border: 1px solid var(--line-soft); border-radius: 999px; overflow: hidden; margin: 8px 0 10px; }
#jprog-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--amber)); transition: width .2s linear; }
#journey-status { color: var(--text-2); font-size: 13px; }
#ops-rows { display: flex; flex-direction: column; gap: 7px; }
.ops-row { display: grid; grid-template-columns: 22px 108px 1fr 70px 86px; align-items: center; gap: 10px; font-size: 12.5px; }
.ops-row .icon { color: var(--text-2); }
.ops-row .o-name { font-weight: 600; font-family: var(--display); }
.ops-row .o-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,.09); overflow: hidden; }
.ops-row .o-fill { display: block; height: 100%; border-radius: 2px; background: var(--oc, var(--amber)); transition: width .3s; }
.ops-row .o-eta { color: var(--text); font-variant-numeric: tabular-nums; text-align: right; font-family: var(--display); font-weight: 600; }
.ops-row .o-status { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-align: right; color: var(--green); }
.ops-row .o-status.held { color: var(--amber); }

/* cinematic caption overlay */
#cine { position: fixed; inset: 0; z-index: 12; pointer-events: none; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12vh; }
#cine-caption {
  font-family: var(--display); font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  font-size: clamp(26px, 4.4vw, 52px); color: #fff; text-align: center;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .65), 0 1px 3px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(18px); transition: opacity .5s, transform .5s;
  max-width: 86vw;
}
#cine-caption.show { opacity: 1; transform: none; }
#cine-caption em { font-style: normal; color: var(--amber); }
#cine-skip {
  position: fixed; right: 26px; bottom: 26px; color: var(--text-2); font-size: 14px;
  font-family: var(--display); font-weight: 600; letter-spacing: .08em;
  animation: skip-pulse 1.6s ease-in-out infinite;
}
@keyframes skip-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* delivery */
#delivery-options { display: flex; flex-direction: column; gap: 10px; }
.dopt { text-align: left; display: block; width: 100%; padding: 14px 16px; border-radius: 12px; }
.dopt .do-name { font-size: 17px; font-weight: 800; }
.dopt .do-desc { color: var(--text-2); font-size: 13px; margin: 3px 0 7px; }
.deltas { display: flex; gap: 8px; flex-wrap: wrap; }
.delta { font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--navy); border: 1px solid var(--line); }
.delta.bad { color: #ff8f93; }
.delta.good { color: var(--green); }
.delta.zero { color: var(--text-2); font-weight: 500; }

/* event modal */
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(5, 12, 22, .6); display: flex; align-items: center; justify-content: center; }
.event-card { border-color: var(--amber); }
#event-kicker { color: var(--amber); }
#event-options { display: flex; flex-direction: column; gap: 10px; }
.howto { color: var(--text-2); font-size: 15px; line-height: 1.55; padding-left: 20px; margin: 6px 0 18px; }
.howto b { color: var(--text); }
.modal-close { width: 100%; }

/* result */
.result-card { max-width: 560px; text-align: center; }
.stars { font-size: 40px; color: var(--amber); letter-spacing: 6px; margin: 4px 0; }
.overall { color: var(--text-2); margin-bottom: 16px; }
.overall b { color: #fff; font-size: 22px; }
#result-bars { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.rbar { font-size: 13.5px; }
.rbar .rb-top { display: flex; justify-content: space-between; margin-bottom: 4px; }
.rbar .rb-top b { color: #fff; }
.rbar .rb-track { height: 8px; border-radius: 4px; background: var(--navy); border: 1px solid var(--line); overflow: hidden; }
.rbar .rb-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--red), var(--amber), var(--green)); }
#result-bonuses { margin: 14px 0 4px; text-align: left; }
.bonus { font-size: 13.5px; color: var(--text-2); margin: 3px 0; display: flex; align-items: center; gap: 7px; }
.bonus b { color: var(--text); font-weight: 600; }
.bonus.b-plus .icon { color: var(--green); }
.bonus.b-minus .icon { color: #ff8f93; }
.compare { font-size: 14px; color: var(--text-2); margin: 10px 0 4px; }
.compare b { color: var(--amber); }
.result-bottom { display: flex; gap: 20px; align-items: center; justify-content: center; margin-top: 14px; }
#result-qr svg { display: block; border-radius: 8px; width: 132px; height: 132px; }
.result-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.qr-hint { color: var(--text-2); font-size: 13px; }

/* ---------- v2 juice ---------- */

/* screen transitions — panels slide in, their children cascade */
.screen-enter > * { animation: screen-in .45s cubic-bezier(.2,.9,.3,1) both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }
.screen-enter .card > *, .screen-enter #plan-panel > * {
  animation: child-in .5s cubic-bezier(.2,.9,.3,1) both;
}
.screen-enter .card > *:nth-child(2), .screen-enter #plan-panel > *:nth-child(2) { animation-delay: .06s; }
.screen-enter .card > *:nth-child(3), .screen-enter #plan-panel > *:nth-child(3) { animation-delay: .12s; }
.screen-enter .card > *:nth-child(4), .screen-enter #plan-panel > *:nth-child(4) { animation-delay: .18s; }
.screen-enter .card > *:nth-child(n+5), .screen-enter #plan-panel > *:nth-child(n+5) { animation-delay: .24s; }
@keyframes child-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* vignette flash on events */
#vignette { position: fixed; inset: 0; z-index: 15; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(227,30,36,.55) 100%); }
#vignette.flash { animation: vflash 1s ease-out; }
@keyframes vflash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }

/* screen shake */
#stage.shake { animation: shake .5s; }
@keyframes shake {
  0%, 100% { transform: none; }
  20% { transform: translate(-8px, 4px); } 40% { transform: translate(7px, -4px); }
  60% { transform: translate(-5px, 3px); } 80% { transform: translate(4px, -2px); }
}

/* mute button */
#btn-mute { position: fixed; right: 14px; bottom: 14px; z-index: 18; width: 52px; height: 52px;
  font-size: 22px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; color: var(--text); }

/* event countdown ring */
.event-head { display: flex; justify-content: space-between; align-items: flex-start; }
#event-countdown { position: relative; width: 52px; height: 52px; flex: 0 0 auto; }
#event-countdown svg { width: 52px; height: 52px; transform: rotate(-90deg); }
.cd-bg { fill: none; stroke: var(--navy); stroke-width: 5; }
#cd-ring { fill: none; stroke: var(--amber); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 119.4; stroke-dashoffset: 0; transition: stroke-dashoffset .25s linear, stroke .3s; }
#cd-ring.urgent { stroke: var(--red); }
#cd-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; }

/* gamble option + outcome */
.dopt .do-odds { font-size: 12px; color: var(--amber); font-weight: 700; margin-top: 3px; }
#event-outcome { text-align: center; padding: 18px 6px 6px; font-size: 18px; font-weight: 800; }
#event-outcome .dice { font-size: 44px; display: block; animation: dice-spin .8s ease-out; }
@keyframes dice-spin { from { transform: rotate(0) scale(.4); } to { transform: rotate(720deg) scale(1); } }
#event-outcome.won { color: var(--green); }
#event-outcome.lost { color: #ff8f93; }

/* journey toasts */
#toasts { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 8;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: rgba(13,30,53,.92); border: 1px solid var(--line); border-radius: 999px;
  color: var(--text); font-size: 14px; font-weight: 600; padding: 9px 20px;
  animation: toast-in .4s cubic-bezier(.2,.9,.3,1) both; }
.toast.out { animation: toast-out .4s ease-in both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-16px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px); } }

/* result choreography */
.title-banner { display: inline-block; background: var(--navy); border: 1.5px solid var(--amber); color: var(--amber);
  font-weight: 800; font-size: 16px; letter-spacing: .06em; padding: 7px 22px; border-radius: 999px; margin-bottom: 8px;
  animation: title-in .5s .2s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes title-in { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: none; } }
.stars span { display: inline-block; opacity: 0; }
.stars span.pop { animation: star-pop .45s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes star-pop { from { opacity: 0; transform: scale(.2) rotate(-30deg); } to { opacity: 1; transform: none; } }
.rbar .rb-fill { width: 0; transition: width .9s cubic-bezier(.2,.8,.3,1); }

/* confetti */
#confetti { position: fixed; inset: 0; z-index: 25; pointer-events: none; overflow: hidden; }
.cf { position: absolute; top: -14px; width: 9px; height: 14px; border-radius: 2px;
  animation: cf-fall linear both; }
@keyframes cf-fall {
  0% { transform: translateY(-20px) rotate(0); opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(105vh) rotate(660deg); opacity: 0; }
}

/* leaderboard */
.board { padding: 12px 18px; margin-top: 12px; text-align: left; }
.board h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: .14em; color: var(--amber); }
.board .brow { display: flex; align-items: baseline; gap: 10px; font-size: 14.5px; padding: 3px 0; }
.board .brow .rank { color: var(--text-2); width: 20px; font-weight: 700; }
.board .brow .who { font-weight: 800; letter-spacing: .12em; }
.board .brow .btitle { color: var(--text-2); font-size: 12px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .brow .pts { font-weight: 800; color: var(--amber); }
.board .brow.me { background: rgba(227,30,36,.18); border-radius: 8px; padding: 3px 8px; margin: 0 -8px; }
#start-board { pointer-events: auto; min-width: 320px; }

/* initials keypad */
.initials-card { max-width: 470px; text-align: center; }
#initials-slots { display: flex; justify-content: center; gap: 14px; margin: 14px 0 18px; }
#initials-slots span { width: 58px; height: 66px; border: 2px solid var(--line); border-radius: 12px;
  background: var(--navy); font-size: 36px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
#initials-slots span.filled { border-color: var(--amber); color: var(--amber); }
#initials-keys { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
#initials-keys .btn { padding: 0; min-height: 56px; font-size: 19px; font-weight: 800; }
.initials-actions { display: flex; gap: 10px; margin-top: 16px; }
.initials-actions .btn { flex: 1; }

@media (max-width: 700px) {
  #corridor-cards { grid-template-columns: 1fr; }
  .corridor-card { min-height: 0; }
  #triangle-wrap { width: 120px; }
  .result-bottom { flex-direction: column; }
}
