/* ==========================================================================
   Menus, lobbies, results. Everything lives on a 1600x900 stage scaled to fit.
   ========================================================================== */
.stage { position: absolute; left: 50%; top: 50%; width: 1600px; height: 900px; transform: translate(-50%, -50%) scale(var(--k, 1)); transform-origin: 50% 50%; }
.stage h1 { font-size: 72px; line-height: .95; color: var(--cream); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 0 2px 0 color-mix(in oklab, currentColor 70%, #12082a), 0 4px 0 color-mix(in oklab, currentColor 55%, #12082a), 0 6px 0 var(--ink), 0 16px 22px rgba(8,4,16,.55); }
.stage h3 { font-family: var(--font-display); font-size: 26px; margin: 0 0 12px; }
code { font-family: var(--font-mono); font-size: .9em; background: rgba(0,0,0,.18); padding: .05em .35em; border-radius: 5px; }
input.name-input, input.chat-input {
  border: 3px solid var(--ink); border-radius: 12px; background: #fff; color: var(--ink); padding: 10px 14px; font-weight: 600; font-size: 18px; outline: none; box-shadow: inset 0 3px 0 rgba(0,0,0,.08); user-select: text; }
input:focus { border-color: var(--hot); box-shadow: 0 0 0 4px rgba(255,61,127,.3); }
input.name-input.big { font-family: var(--font-display); font-size: 30px; width: 100%; }
.modal input.name-input { width: 100%; font-family: var(--font-display); font-size: 28px; margin-top: 10px; }

/* ---------- boot & intro ---------- */
.boot { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px; }
.boot-presents { font-family: var(--font-display); font-size: 26px; letter-spacing: .3em; text-transform: uppercase; color: var(--paper); opacity: .8; }
.boot-logo { animation: boot-bob 3s ease-in-out infinite; }
@keyframes boot-bob { 50% { transform: translateY(-10px) rotate(-1deg); } }
.boot-start { animation: boot-pulse 1.1s ease-in-out infinite; }
@keyframes boot-pulse { 50% { filter: brightness(1.2); transform: scale(1.05); } }
.boot-warn { position: absolute; bottom: 40px; font-size: 18px; color: var(--paper); opacity: .85; }
.boot-invite { font-size: 26px; font-weight: 700; color: var(--paper); }
.boot-invite b { font-family: var(--font-mono); font-weight: 800; letter-spacing: .16em; color: var(--volt); }
.boot-touch { margin-top: 8px; color: var(--tang); font-weight: 700; text-align: center; }
.boot-warn { text-align: center; }
.boot-warn b { color: var(--volt); font-family: var(--font-display); font-weight: 400; letter-spacing: .04em; }

.intro { position: absolute; inset: 0; display: grid; place-items: center; }
.intro-skip { position: absolute; bottom: 30px; right: 40px; opacity: .6; }
.tf-logo.slam .cap { transform: translateY(-900px) rotate(var(--r)); transition: none; }
.tf-logo.slam .cap.in { transform: rotate(var(--r)) translateY(var(--y, 0)); transition: transform .32s cubic-bezier(.3, 1.5, .5, 1); }
.tf-logo.slam .marquee { transform: scale(4) rotate(-12deg); opacity: 0; }
.tf-logo.slam .marquee.in { transform: rotate(-2.5deg); opacity: 1; transition: transform .28s cubic-bezier(.3, 1.4, .5, 1), opacity .1s; }

/* ---------- main menu ---------- */
.menu { position: absolute; inset: 0; }
.menu-left { position: absolute; left: 90px; top: 50px; width: 760px; }
.menu-logo { transform-origin: left top; margin-bottom: 40px; display: inline-block; }
.menu-items { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 26px; width: 700px; }
.menu-items .key { font-size: 38px; min-height: 98px; justify-content: flex-start; padding-left: 34px; }
.menu-items .key .ico { font-size: 36px; margin-right: 6px; }
.menu-items .key.wide { grid-column: 1 / -1; }
.menu-blurb { margin: 30px 0 0 6px; font-size: 22px; font-weight: 600; color: var(--paper); min-height: 30px; }
.menu-small { display: flex; gap: 18px; margin-top: 26px; }
.menu-right { position: absolute; right: 60px; bottom: 70px; width: 600px; height: 640px; }
.kev-wrap { position: absolute; right: 20px; bottom: 0; width: 400px; cursor: pointer; animation: kev-idle 2.6s ease-in-out infinite; }
.kev { width: 100%; height: auto; overflow: visible; }
@keyframes kev-idle { 50% { transform: translateY(-12px) rotate(1.5deg); } }
.kev .m-open { display: none; }
.kev.open .m-open { display: inline; }
.kev.open .m-closed { display: none; }
.kev-arm { transform-origin: 176px 128px; animation: kev-arm 1.3s ease-in-out infinite; }
@keyframes kev-arm { 50% { transform: rotate(-8deg); } }
.kev-bubble { position: absolute; right: 300px; top: 30px; width: 330px; min-height: 90px; padding: 18px 22px 20px; color: var(--ink); border: var(--outline);
  background: radial-gradient(120% 90% at 20% 0%, #fffdf6, #fff3dc 60%, #f3e2c2 100%);
  border-radius: 22px; box-shadow: inset 0 2px 0 #fff, inset 0 -3px 0 rgba(170,130,80,.2), var(--shadow); font-family: var(--font-display); font-size: 25px; line-height: 1.15; transform: rotate(-2deg); }
.kev-bubble::after { content: ""; position: absolute; right: -24px; bottom: 26px; width: 34px; height: 30px; background: #f8ead0; border: var(--outline); border-left: 0; border-bottom: 0;
  transform: skew(-30deg) rotate(30deg); }
.menu-me { position: absolute; right: 40px; top: 30px; display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 10px; border: 2px solid #0a0612; border-radius: 999px;
  background: linear-gradient(180deg, #45306e 0%, #2c1d4a 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -2px 0 rgba(0,0,0,.3), var(--el-2); cursor: pointer; text-align: left; }
.menu-me b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 24px; }
.menu-me small { opacity: .75; }
.menu-foot { position: absolute; left: 90px; right: 40px; bottom: 22px; display: flex; justify-content: space-between; font-size: 15px; color: var(--paper); opacity: .7; }
.menu-foot .oh b { color: var(--tang); }

/* ---------- builder ---------- */
.setup, .multi, .profile, .settings, .room, .results, .final, .credits { position: absolute; inset: 0; padding: 40px 70px; }
.setup-head p, .multi-head p { font-size: 22px; margin: 10px 0 0; color: var(--paper); }
.builder { margin-top: 28px; }
.builder-head { display: flex; align-items: baseline; gap: 16px; }
.builder-head small { opacity: .7; }
.game-cards { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; }
.game-card { position: relative; padding: 14px 14px 16px; border: var(--outline); border-radius: 18px; background: var(--gc); color: var(--gi); text-align: left; cursor: pointer;
  box-shadow: 0 8px 0 var(--ink); transition: transform .12s var(--ease-out), filter .2s, box-shadow .12s; }
.game-card:hover { transform: translateY(-4px) rotate(-1deg); }
.game-card.off { filter: grayscale(.85) brightness(.55); transform: translateY(4px); box-shadow: 0 3px 0 var(--ink); }
.game-card .legend { position: absolute; left: 12px; top: 8px; font-family: var(--font-mono); font-weight: 800; font-size: 15px; opacity: .6; }
.gc-art { height: 92px; display: grid; place-items: center; margin: 6px 0 8px; }
.gc-art svg { height: 92px; width: auto; filter: drop-shadow(2px 8px 8px rgba(18,10,42,.35)); }
.gc-title { font-family: var(--font-display); font-size: 22px; line-height: 1; color: var(--cream); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 2px 3px 0 var(--ink); }
.gc-short { font-weight: 800; text-transform: uppercase; font-size: 13px; letter-spacing: .1em; margin: 4px 0 8px; }
.gc-tag { font-size: 13.5px; font-weight: 600; line-height: 1.25; min-height: 68px; }
.gc-check { position: absolute; right: 10px; top: 8px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); border: 3px solid var(--ink); font-size: 20px; color: var(--ink); }
.off .gc-check { background: transparent; }
.builder.compact .game-cards { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.builder.compact .game-card { padding: 8px 8px 10px; border-radius: 14px; }
.builder.compact .gc-art { height: 46px; margin: 18px 0 4px; } .builder.compact .gc-art svg { height: 46px; max-width: 100%; }
.builder.compact .game-card .legend { left: 6px; top: 3px; font-size: 11px; }
.builder.compact .gc-short { display: none; }
.builder.compact .gc-title { font-size: 11.5px; line-height: 1.05; -webkit-text-stroke-width: 1.5px; }
.builder.compact .gc-short { font-size: 10px; margin: 2px 0 0; }
.builder.compact .gc-check { width: 20px; height: 20px; font-size: 11px; right: 4px; top: 4px; border-width: 2px; }
.builder.ro .game-card { cursor: default; }
.opt-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 40px; margin-top: 28px; }
.builder.compact .opt-rows { grid-template-columns: 1fr; gap: 7px; margin-top: 14px; }
.builder.compact .opt-row { padding: 4px 10px; }
.builder.compact .opt-label { font-size: 17px; } .builder.compact .opt-val { font-size: 19px; }
.builder.compact .opt-est { font-size: 15px; }
.opt-row { display: grid; grid-template-columns: 1fr 44px 190px 44px 40px; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(23,18,31,.55); border: 3px solid rgba(255,243,220,.12); border-radius: 14px; }
.panel .opt-row { background: rgba(23,18,31,.07); border-color: rgba(23,18,31,.12); }
.panel.dark .opt-row { background: rgba(0,0,0,.2); border-color: rgba(255,255,255,.08); }
.opt-row.sel { border-color: var(--volt); background: rgba(215,255,60,.12); }
.opt-label { font-weight: 700; font-size: 19px; }
.opt-val { text-align: center; font-family: var(--font-display); font-size: 22px; display: flex; justify-content: center; align-items: center; gap: 8px; }
.opt-arrow { width: 40px; height: 36px; border: 3px solid var(--ink); border-radius: 10px; background: var(--paper); color: var(--ink); cursor: pointer; font-size: 14px; box-shadow: 0 3px 0 var(--ink); }
.opt-arrow:active { transform: translateY(3px); box-shadow: none; }
.builder.ro .opt-arrow { visibility: hidden; }
.opt-est { grid-column: 1 / -1; font-size: 17px; opacity: .8; margin-top: 4px; }
.setup-foot, .multi-foot, .room-foot, .res-foot, .final-foot { position: absolute; left: 70px; right: 70px; bottom: 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.presets { display: flex; gap: 14px; align-items: center; }
.presets::before { content: "Presets"; font-weight: 700; opacity: .7; margin-right: 4px; }
.swatch { display: inline-block; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--ink); }

/* ---------- play with friends ---------- */
.warn { color: var(--red); font-weight: 700; }
.party-body { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin-top: 34px; height: 590px; }
.party-body .panel { display: flex; flex-direction: column; padding: 34px 42px 36px; }
.party-step { font-family: var(--font-display); font-size: 17px; letter-spacing: .32em; opacity: .55; }
.party-body h3 { font-size: 50px; line-height: 1; margin: 6px 0 26px; }
.party-list { list-style: none; padding: 0; margin: 0 0 auto; display: flex; flex-direction: column; gap: 18px; font-size: 22px; font-weight: 600; line-height: 1.3; }
.party-list li { position: relative; padding-left: 38px; }
/* little sculpted keycap bullets, lit from the top left like everything else */
.party-list li::before { content: ""; position: absolute; left: 2px; top: .18em; width: 22px; height: 22px; border: 2.5px solid var(--ink); border-radius: 6px;
  background: linear-gradient(160deg, #ff7aa5 0%, var(--hot) 45%, #c8195a 100%); box-shadow: inset 0 1.5px 0 rgba(255,255,255,.5), inset 0 -3px 0 rgba(0,0,0,.18), 0 2px 0 var(--ink); }
.party-body .key { align-self: flex-start; }
.party-hint { font-size: 22px; opacity: .8; margin: -10px 0 26px; }
.party-small { margin: auto 0 0; font-size: 16px; line-height: 1.4; opacity: .65; }
.party-join .key.ready { animation: boot-pulse 1.1s ease-in-out infinite; }

/* the code: five blank keycaps that fill in as you type */
.code-slots { position: relative; display: flex; gap: 16px; margin-bottom: 34px; cursor: text; }
.code-slots.shake { animation: code-shake .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes code-shake { 15%, 55% { translate: -12px 0; } 35%, 75% { translate: 12px 0; } }
.code-slot { position: relative; isolation: isolate; width: 98px; height: 112px; display: grid; place-items: center; border: var(--outline); border-radius: 16px;
  background: linear-gradient(180deg, #e9dcc0 0%, #d4c3a2 100%);
  box-shadow: 0 7px 0 var(--ink), 0 10px 0 rgba(18,10,42,.25), 0 22px 26px rgba(18,10,42,.45); transition: transform .08s, box-shadow .08s; }
.code-slot::before { content: ""; position: absolute; inset: 5px 9px 17px; z-index: -1; border-radius: 11px;
  background: radial-gradient(130% 100% at 30% 10%, #fffef9 0%, #f8eedb 55%, #eadcbf 100%); box-shadow: inset 0 1.5px 0 #fff, 0 2px 3px rgba(120,90,50,.25); }
.code-slot b { font-family: var(--font-display); font-weight: 400; font-size: 66px; line-height: 1; color: var(--ink); margin-top: -12px; }
.code-slot.filled { transform: translateY(3px); box-shadow: 0 4px 0 var(--ink), 0 6px 0 rgba(18,10,42,.25), 0 14px 18px rgba(18,10,42,.45); }
.code-slot.filled::before { background: radial-gradient(130% 100% at 30% 10%, #f4ffc2 0%, var(--volt) 55%, #b4d92a 100%); }
.code-slot.pop b { animation: slot-pop .24s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes slot-pop { from { scale: .4; } }
.code-slot.next::after { content: ""; position: absolute; left: 50%; bottom: 30px; width: 40px; height: 6px; translate: -50% 0; border-radius: 3px; background: var(--hot);
  animation: slot-caret 1s steps(2, jump-none) infinite; }
@keyframes slot-caret { 50% { opacity: 0; } }
/* the real input sits invisibly on top: paste, mobile keyboards and screen readers all just work */
input.code-capture { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; font-size: 16px; caret-color: transparent; cursor: text; }

/* ---------- room ---------- */
.room-head { display: flex; justify-content: space-between; align-items: flex-start; }
.room-head h1 { font-size: 58px; }
.room-head small { font-weight: 800; letter-spacing: .2em; opacity: .7; }
.room-code-box { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; margin-top: -10px; }
.room-code-label { display: flex; align-items: baseline; gap: 12px; }
.room-code-how { font-size: 15px; color: var(--paper); opacity: .7; }
.room-code { display: inline-block; font-family: var(--font-mono); font-weight: 800; font-size: 50px; letter-spacing: .2em; margin: 4px 0 8px; padding: 2px 18px 4px 28px; }
.room-invite { display: flex; align-items: center; gap: 12px; }
.room-link { font-family: var(--font-mono); font-size: 15px; color: var(--paper); opacity: .8; user-select: all; }
.room-body { display: grid; grid-template-columns: 420px 1fr 400px; gap: 24px; margin-top: 14px; height: 566px; }
.room-body .panel { min-height: 0; display: flex; flex-direction: column; padding: 18px; }
.pl-list { display: flex; flex-direction: column; gap: 8px; flex: 1; overflow-y: auto; }
.pl-row { display: grid; grid-template-columns: 50px 1fr auto 30px; align-items: center; gap: 10px; padding: 6px 10px; border: 3px solid var(--ink); border-radius: 14px; background: var(--paper); }
.pl-row.me { background: #ffe0ec; }
.pl-row.ready .pl-ready { color: var(--volt-dk); }
.pl-row.empty { border-style: dashed; border-color: rgba(23,18,31,.25); background: transparent; color: rgba(23,18,31,.4); grid-template-columns: 1fr; min-height: 58px; padding-left: 20px; }
.pl-name { font-weight: 800; font-size: 18px; } .pl-name small { font-weight: 600; opacity: .6; }
.pl-ready { font-family: var(--font-display); font-size: 15px; opacity: .8; }
.pl-x { border: 2px solid var(--ink); border-radius: 8px; background: var(--cream); cursor: pointer; font-weight: 800; }
.crown { color: var(--tang-dk); }
.room-players .key { margin-top: 12px; align-self: flex-start; }
.room-mid { overflow: hidden; }
.room-mid .builder { margin-top: 0; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; font-size: 16px; padding-right: 4px; margin-bottom: 10px; user-select: text; }
.chat-line b { color: var(--volt); }
.chat-line.sys { color: var(--sky); font-style: italic; opacity: .85; }
.chat-input { width: 100%; }
.room-foot { justify-content: flex-start; }
.room-foot .key:last-child { margin-left: auto; }

/* ---------- profile, settings, credits ---------- */
.prof-body { display: grid; grid-template-columns: 1fr 520px; gap: 30px; margin-top: 30px; }
.prof-left { display: grid; grid-template-columns: 250px 1fr; gap: 10px 30px; align-items: start; }
.prof-preview { grid-row: span 3; display: grid; place-items: center; padding-top: 10px; animation: boot-bob 3s ease-in-out infinite; }
.prof-name small { display: block; font-weight: 800; letter-spacing: .1em; opacity: .6; margin-bottom: 4px; }
.prof-left .opt-rows { grid-template-columns: 1fr; margin-top: 0; }
.prof-left .opt-row { grid-template-columns: 110px 44px 1fr 44px 34px; }
.prof-left .key { justify-self: start; }
.best-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 2px dashed rgba(255,255,255,.12); font-size: 19px; }
.best-row .dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); }
.best-row b { font-family: var(--font-display); font-weight: 400; font-size: 24px; color: var(--volt); }
.settings-panel { margin-top: 30px; max-width: 980px; }
.settings-rows { grid-template-columns: 1fr; margin-top: 0; gap: 9px; }
.settings-rows .opt-row { padding: 5px 12px; }
.settings-panel { padding: 18px 22px; }
.settings-rows .opt-row { grid-template-columns: 1fr 44px 360px 44px; }
.vol { display: flex; align-items: center; gap: 12px; }
.vol-bar { width: 220px; height: 18px; border: 3px solid var(--ink); border-radius: 9px; background: rgba(0,0,0,.12); overflow: hidden; }
.vol-bar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--hot) 0 18px, var(--hot-dk) 18px 22px); }
.vol b { width: 60px; font-weight: 400; }
.credits { display: grid; grid-template-columns: 520px 1fr; gap: 40px; align-items: center; }
.credits-logo { display: grid; place-items: center; }
.credits-panel h2 { font-size: 40px; margin-bottom: 10px; }
.credits-panel p { font-size: 18px; }
.cred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 26px; margin: 16px 0; }
.cred-grid h4 { margin: 10px 0 2px; font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--hot-dk); }
.cred-grid p { margin: 0; font-size: 16px; }
.credits-panel .small { font-size: 14px; opacity: .7; }

/* ---------- results ---------- */
.res-head { display: flex; align-items: center; gap: 24px; }
.res-art svg { height: 100px; width: auto; }
.res-head small { font-weight: 800; letter-spacing: .2em; opacity: .7; }
.res-head h1 { color: var(--gc); }
.res-best { margin-left: auto; font-size: 30px; animation: punch .5s var(--ease-pop) 2.2s both; }
.res-body { display: grid; grid-template-columns: 1fr 520px; gap: 28px; margin-top: 22px; height: 590px; }
.res-board { display: flex; flex-direction: column; }
.res-rows { display: flex; flex-direction: column; gap: 10px; }
.res-row { display: grid; grid-template-columns: 52px 50px 210px 1fr 80px 130px; align-items: center; gap: 12px; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 14px;
  background: linear-gradient(180deg, #fffaf0 0%, #f8ebd2 100%); box-shadow: inset 0 1.5px 0 #fff, inset 0 -2px 0 rgba(170,130,80,.18), 0 2px 0 rgba(23,18,31,.85), 0 8px 14px rgba(18,10,42,.18);
  opacity: 0; transform: translateX(-60px); transition: transform .4s var(--ease-pop), opacity .2s; }
.res-row.in { opacity: 1; transform: none; }
.res-row.me { background: linear-gradient(180deg, #fff0f5 0%, #ffd9e7 100%); }
.res-row.win { background: linear-gradient(180deg, #fff9d8 0%, #ffeaa0 100%); box-shadow: inset 0 1.5px 0 #fff, 0 0 0 3px #f2b705, 0 0 26px rgba(255,210,63,.45), 0 8px 14px rgba(18,10,42,.2); }
.res-rank { font-size: 30px; text-align: center; font-family: var(--font-display); }
.medal { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); font-family: var(--font-display); font-size: 21px; color: rgba(60,40,0,.75);
  text-shadow: 0 1px 0 rgba(255,255,255,.6); box-shadow: inset 0 0 0 3px rgba(255,255,255,.25), inset 0 -3px 4px rgba(0,0,0,.25), 0 2px 0 var(--ink), 0 4px 8px rgba(18,10,42,.35); }
.medal.m1 { background: radial-gradient(circle at 35% 30%, #fff6c4 0 12%, #ffd23f 40%, #d99a00 80%, #a86d00 100%); }
.medal.m2 { background: radial-gradient(circle at 35% 30%, #ffffff 0 12%, #d9dfee 40%, #9aa3bb 80%, #6f7890 100%); color: rgba(30,35,55,.7); }
.medal.m3 { background: radial-gradient(circle at 35% 30%, #ffe1c2 0 12%, #e6a36b 40%, #b8683a 80%, #8a4a24 100%); color: rgba(60,25,5,.7); }
.res-name { font-weight: 800; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-name small { opacity: .55; font-weight: 600; } .res-name .dnf { color: var(--red); opacity: 1; }
.res-bar { height: 18px; border: 2px solid var(--ink); border-radius: 10px; background: linear-gradient(180deg, #d9c6a2, #eadbbd); box-shadow: inset 0 2px 3px rgba(80,50,20,.35); overflow: hidden; }
.res-bar i { display: block; height: 100%; border-radius: 8px; transition: width .9s var(--ease-out);
  background: linear-gradient(180deg, color-mix(in oklab, var(--gc) 60%, white) 0%, var(--gc) 45%, color-mix(in oklab, var(--gc) 78%, #12082a) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.res-stat { font-size: 15px; font-weight: 700; opacity: .7; text-align: right; }
.res-score { text-align: right; line-height: 1; }
.res-score b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 30px; }
.res-fest { display: block; font-size: 12px; font-weight: 800; opacity: .55; margin-top: 2px; }
.res-note { font-family: var(--font-ui); font-size: 13px; opacity: .55; font-weight: 600; }
.res-side { display: flex; flex-direction: column; gap: 20px; min-height: 0; }
.res-mine { padding: 18px 22px; }
.mine-score b { font-family: var(--font-display); font-weight: 400; font-size: 64px; color: var(--volt); line-height: 1; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 3px 4px 0 var(--ink); }
.mine-score small { margin-left: 10px; font-weight: 700; opacity: .7; }
.mine-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.stat { background: rgba(0,0,0,.2); border-radius: 10px; padding: 6px 10px; }
.stat small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .1em; opacity: .7; }
.stat b { font-family: var(--font-display); font-weight: 400; font-size: 26px; }
.prof-right .mine-stats { grid-template-columns: repeat(3, 1fr); }
.mine-awards { display: flex; flex-direction: column; gap: 4px; }
.award { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; padding: 4px 0; border-bottom: 2px dashed rgba(255,255,255,.12); }
.award b { color: var(--volt); text-align: right; }
.mine-hl p { margin: 8px 0 0; font-size: 16px; font-style: italic; color: var(--paper); }
.res-totals { flex: 1; min-height: 0; overflow: hidden; padding: 16px 20px; }
.tot-row { display: grid; grid-template-columns: 40px 34px 1fr 40px auto; gap: 8px; align-items: center; padding: 3px 0; font-size: 17px; }
.tot-row.me { font-weight: 800; color: var(--hot-dk); }
.panel.dark .tot-row.me { color: var(--volt); }
.tot-rank { font-family: var(--font-display); opacity: .7; }
.tot-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.tot-move { font-size: 13px; font-weight: 800; } .tot-move.up { color: var(--volt-dk); } .tot-move.down { color: var(--red); }
.tot-row b { font-family: var(--font-display); font-weight: 400; font-size: 21px; }
.res-auto { opacity: .7; font-weight: 600; margin-left: auto; }

/* ---------- final ---------- */
.final-head { text-align: center; }
.final-head small { font-weight: 800; letter-spacing: .3em; opacity: .75; }
.final-head h1 { font-size: 92px; color: var(--volt); }
.final-head p { font-size: 24px; margin: 8px 0 0; font-weight: 600; }
.podium { position: absolute; isolation: isolate; left: 150px; bottom: 130px; width: 820px; display: flex; align-items: flex-end; justify-content: center; gap: 16px; }
.pod { display: flex; flex-direction: column; align-items: center; width: 250px; }
.pod-who { display: flex; flex-direction: column; align-items: center; text-align: center; opacity: 0; transform: translateY(-80px) scale(.5); transition: transform .5s var(--ease-pop), opacity .3s; }
.podium.in .pod-who { opacity: 1; transform: none; }
.podium.in .p1 .pod-who { transition-delay: .5s; animation: boot-bob 1.4s ease-in-out 1.2s infinite; }
.podium.in .p2 .pod-who { transition-delay: .25s; }
.pod-who b { font-family: var(--font-display); font-weight: 400; font-size: 28px; margin-top: 6px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-who span { font-weight: 700; opacity: .8; }
/* podium blocks: a lit top face, a shaded front, a sheen, an engraved number */
.pod-block { position: relative; width: 100%; border: 3px solid var(--ink); border-bottom: 0; border-radius: 4px 4px 0 0; display: grid; place-items: start center; padding-top: 18px; margin-top: 34px;
  background: linear-gradient(90deg, rgba(255,255,255,0) 8%, rgba(255,255,255,.38) 16%, rgba(255,255,255,0) 30%), linear-gradient(180deg, var(--p-hi) 0%, var(--p) 28%, var(--p-lo) 100%);
  box-shadow: inset -14px 0 18px rgba(18,10,42,.22), inset 0 -40px 50px rgba(18,10,42,.3); }
.pod-block::before { content: ""; position: absolute; left: -3px; right: -3px; top: -27px; height: 26px; border: 3px solid var(--ink); border-bottom: 0;
  clip-path: polygon(5% 0, 95% 0, 100% 100%, 0 100%); background: linear-gradient(180deg, var(--p-top) 0%, var(--p-hi) 100%); }
.pod-block::after { content: ""; position: absolute; left: 14px; right: 14px; top: -24px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.65); }
.pod-block span { font-family: var(--font-display); font-size: 74px; line-height: 1; color: var(--p-lo); -webkit-text-stroke: 0; text-shadow: 0 2px 0 rgba(255,255,255,.55), 0 -2px 0 rgba(0,0,0,.35); }
.p1 .pod-block { height: 230px; --p: #f6c21c; --p-hi: #ffe27a; --p-top: #fff4c0; --p-lo: #b07800; }
.p2 .pod-block { height: 160px; --p: #c3cadb; --p-hi: #e6eaf4; --p-top: #ffffff; --p-lo: #7f889f; }
.p3 .pod-block { height: 110px; --p: #db955c; --p-hi: #f2bb8d; --p-top: #ffdcbe; --p-lo: #9c5a2c; }
/* a spotlight on the champion and a polished stage floor */
.podium::before { content: ""; position: absolute; left: 50%; bottom: 120px; width: 420px; height: 760px; margin-left: -210px; pointer-events: none; z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255,240,190,.22) 50%, transparent); clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%); mask-image: linear-gradient(to bottom, transparent, #000 40%); }
.podium::after { content: ""; position: absolute; left: -60px; right: -60px; bottom: -40px; height: 80px; pointer-events: none; z-index: -1;
  background: radial-gradient(50% 50% at 50% 30%, rgba(255,220,140,.18), transparent 70%), radial-gradient(60% 40% at 50% 10%, rgba(8,4,16,.6), transparent 80%); }
.pod-who .av { filter: drop-shadow(0 10px 8px rgba(8,4,16,.5)); }
.pod.me .pod-who b { color: var(--volt); }
.final-side { position: absolute; right: 70px; top: 220px; width: 520px; bottom: 130px; overflow: hidden; padding: 18px 22px; }
.final-side h3 { margin-top: 10px; }
.hist-row { display: grid; grid-template-columns: 18px 1fr auto 80px; gap: 10px; align-items: center; font-size: 16px; padding: 3px 0; }
.hist-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); }
.hist-row small { opacity: .6; text-align: right; }
.final-foot { justify-content: flex-end; }
