/* Deep Dish Tournament: the arena page. Loads after style.css (fonts, buttons, Locker, toast). */
body.tour { background: #1a2430; }
.tour__arena { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; image-rendering: pixelated; z-index: 0; touch-action: manipulation; cursor: pointer; }
.tour__labels { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; z-index: 2; pointer-events: none; }
.tour .crt { z-index: 1; }
.tour__top, .tour__center, .tour__left, .tour__foot, .tour__bottom, .tdialog { will-change: transform; }

/* ---------- top bar ---------- */
.tour__top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; pointer-events: none; }
.tour__top > * { pointer-events: auto; }
.tour__home { width: 44px; height: 44px; font-size: 18px; text-decoration: none; color: var(--ink); background: #0b1219e6; border: 2px solid #000; box-shadow: 0 3px 0 #0006; }
.tour__status { align-self: center; padding: 4px 10px; background: var(--paprika); color: #fff5ec; font: 700 12px var(--pixel); letter-spacing: 1px; text-transform: uppercase; }
.tcount { margin-left: auto; display: flex; gap: 8px; }
.tcount__box { display: grid; justify-items: center; min-width: 108px; padding: 4px 12px 6px; background: var(--paper); color: var(--paper-ink); border: 2px solid #000; box-shadow: 0 3px 0 #0006, inset 0 -3px 0 var(--paper-line); }
.tcount__box b { font: 700 24px/28px var(--pixel); }
.tcount__box small { font: 700 12px/14px var(--pixel); letter-spacing: 2px; text-transform: uppercase; white-space: nowrap; }
.tcount__box--dim { background: #0b1219e6; color: var(--ink); box-shadow: 0 3px 0 #0006; }

/* ---------- centre column: lobby card, banner, prompt, table, podium ---------- */
.tour__center { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 15; width: min(560px, calc(100vw - 32px)); pointer-events: none; display: grid; justify-items: stretch; }
.tour__center > * { pointer-events: auto; animation: rise-in 0.3s ease-out both; }
.tour__center--verdict, .tour__center--recap { width: min(680px, calc(100vw - 32px)); }
.tour__center.is-still > *, .tour__center.is-still .tv__row, .tour__center.is-still .tv__cut { animation: none; }
.tour__center--lobby .tfree, .tour__center--finished { width: min(760px, calc(100vw - 32px)); }
.tcard { background: #0b1219f0; border: 2px solid #000; box-shadow: 0 4px 0 #0007; text-align: center; }
.tcard__head { padding: 6px 10px 5px; background: var(--paper); color: var(--paper-ink); font: 700 12px/16px var(--pixel); letter-spacing: 3px; text-transform: uppercase; box-shadow: inset 0 -3px 0 var(--paper-line); }
.tcard__clock { margin: 8px 0 2px; font: 700 48px/56px var(--pixel); letter-spacing: 2px; color: var(--gold); text-shadow: 0 3px 0 #6a4a10; }
.tcycle { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 6px; margin: 0; padding: 4px 14px 10px; list-style: none; font: 700 12px/16px var(--pixel); letter-spacing: 1px; text-transform: uppercase; color: var(--ink-soft); }
.tcycle__step span { margin-right: 4px; color: var(--ink-dim); }
.tcycle__step.is-now { color: var(--gold); } .tcycle__step.is-now span { color: var(--gold); }
.tcycle--final { color: var(--ink); } .tcycle--final span { color: var(--gold); }
.tcycle__sep { color: var(--ink-dim); }
.tcard__note { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); font: 11px/16px var(--mono); color: var(--ink); text-align: left; }
.tcard__glass { color: var(--gold); font-size: 16px; }
.tcard__sub { margin: 0; padding: 0 14px 10px; font: 11px/16px var(--mono); color: var(--ink-dim); }
.tcard__soon { margin: 0; padding: 14px 18px 8px; font: 700 12px/18px var(--pixel); letter-spacing: 1px; color: var(--paper); text-wrap: balance; }
.tcard__back { margin: 0; padding: 4px 14px 14px; } .tcard__back .btn { display: inline-block; text-decoration: none; }
body.is-soon .tour__foot, body.is-soon .tour__left, body.is-soon .tcount { display: none; }

/* the round banner */
.tbanner { display: grid; justify-items: center; gap: 6px; padding: 14px 16px 0; background: #0b1219f0; border: 2px solid #000; border-top: 6px solid var(--gc, var(--mustard)); box-shadow: 0 4px 0 #0007; text-align: center; overflow: hidden; }
.tbanner small { font: 700 12px var(--pixel); letter-spacing: 3px; text-transform: uppercase; color: var(--ink-soft); }
.tbanner b { font: 700 36px/40px var(--pixel); letter-spacing: 2px; text-transform: uppercase; color: var(--gc-ink, var(--gold)); }
.tbanner__goal { font: 11px/16px var(--mono); color: var(--ink-soft); }
.tbanner__rule { margin-bottom: 12px; padding: 4px 12px; background: var(--paper); color: var(--paper-ink); font: 700 12px/16px var(--pixel); letter-spacing: 1px; text-transform: uppercase; }
.tbanner__bar { display: block; align-self: stretch; justify-self: stretch; height: 4px; margin: 0 -16px; background: #ffffff14; }
.tbanner__bar i { display: block; height: 100%; background: var(--gc, var(--gold)); }
.tbanner--final { --gc: var(--gold); }
.tbanner--crowd, .tq--crowd, .tv--crowd { --gc: var(--mustard); --gc-ink: #f3e2b8; }
.tbanner--secret, .tq--secret, .tv--secret { --gc: #4a74a0; --gc-ink: #b8d4f0; }
.tbanner--course, .tq--course, .tv--course { --gc: var(--paprika); --gc-ink: #f6b8a4; }
.tbanner--fast, .tq--fast, .tv--fast { --gc: #3a9a86; --gc-ink: #a8e8d4; }

/* the prompt and answer */
.tq, .tv { background: #0b1219f0; border: 2px solid #000; border-top: 6px solid var(--gc); box-shadow: 0 4px 0 #0007; }
.tq__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 12px 0; }
.tq__game { display: inline-flex; gap: 6px; padding: 3px 8px; background: var(--gc); color: var(--ink-dark); font: 700 12px/16px var(--pixel); letter-spacing: 1px; text-transform: uppercase; }
.tq--secret .tq__game, .tq--course .tq__game, .tq--fast .tq__game, .tv--secret .tq__game, .tv--course .tq__game, .tv--fast .tq__game { color: #fff5ec; }
.tq__final { padding: 3px 8px; background: var(--gold); color: var(--ink-dark); font: 700 12px/16px var(--pixel); letter-spacing: 2px; text-transform: uppercase; }
.tq__rule { font: 700 12px/16px var(--pixel); letter-spacing: 1px; color: var(--gc-ink); text-transform: uppercase; }
.tq__timer { position: relative; display: flex; align-items: center; gap: 10px; margin: 10px 12px 0; }
.tq__timer i { display: block; flex: 1; height: 6px; background: var(--gc); box-shadow: 0 0 0 1px #000; transition: width 0.1s linear; }
.tq__timer b { min-width: 28px; text-align: right; font: 700 24px/24px var(--pixel); color: var(--ink); }
.tq__timer b.is-low { color: var(--red); }
.tq__prompt, .tv__prompt { margin: 12px 14px 10px; font: 700 24px/30px var(--pixel); letter-spacing: 0; color: var(--paper); text-wrap: balance; }
.tv__prompt { margin: 8px 14px 6px; font-size: 12px; line-height: 16px; letter-spacing: 1px; color: var(--ink-soft); }
.tq__form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 0 12px; }
.tq__form input { min-width: 0; height: 46px; padding: 0 14px; background: #fffaf0; border: 2px solid var(--paper-ink); color: var(--paper-ink); font: 22px var(--mono); }
.tq__form input:focus { outline: none; box-shadow: 0 0 0 3px #f2c14e; }
.tq__form input:disabled { opacity: 0.6; }
.tq__state { min-height: 16px; margin: 8px 14px 0; font: 11px/16px var(--mono); color: var(--ink-soft); }
.tq__state.is-ok { color: var(--green); } .tq__state.is-bad { color: #f08a74; } .tq__state.is-wait { color: var(--ink-dim); }
.tq__count { margin: 4px 14px 12px; font: 11px/16px var(--mono); color: var(--ink-dim); }
.tq__count b { font: 700 12px var(--pixel); color: var(--ink); }
.tq__counting { margin: 0 14px 14px; font: 700 12px/16px var(--pixel); letter-spacing: 2px; text-transform: uppercase; color: var(--gold); animation: pulse 1s steps(2) infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }

/* Survey says */
.tv__title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 14px 6px; }
.tv__title b { font: 700 24px/28px var(--pixel); letter-spacing: 2px; text-transform: uppercase; color: var(--gold); text-shadow: 0 2px 0 #6a4a10; }
.tv__title small { font: 11px var(--mono); color: var(--ink-dim); }
.tv__rows { margin: 0; padding: 0 8px 8px; list-style: none; max-height: min(46vh, 420px); overflow-y: auto; scrollbar-width: thin; }
.tv__row { display: grid; grid-template-columns: 40px minmax(0, 1.2fr) 64px minmax(0, 1.4fr) 62px; align-items: center; gap: 8px; min-height: 30px; padding: 3px 6px; margin-top: 2px; background: #f3ead6; color: var(--paper-ink); font: 11px/16px var(--mono); }
.tv__row.is-bad { background: #3a2626; color: #f0c8bc; }
.tv__row.is-empty { background: #f3ead699; }
.tv__row.is-bad.is-empty { background: #3a262699; }
.tv__row.is-mine { box-shadow: inset 0 0 0 2px var(--gold); }
.tv__rows.is-reveal .tv__row, .tv__rows.is-reveal .tv__cut { animation: row-in 0.25s var(--d, 0s) both steps(3); }
/* The recap: once the rows have been read, the table folds away to a strip (the title, your own row, the recap
   counts) so the arena shows: hearts breaking over heads, the knocked-out chefs leaving in smoke. */
.tour__center--recap .tv__row:not(.is-mine), .tour__center--recap .tv__cut, .tour__center--recap .tv__prompt { display: none; }
.tour__center--recap .tv__rows { max-height: none; overflow: visible; padding-bottom: 4px; }
.tour__center--recap .tv__title { padding-bottom: 2px; }

@keyframes row-in { from { opacity: 0; transform: translateX(-12px); } }
.tv__rank { font: 700 12px var(--pixel); opacity: 0.7; }
.tv__a { display: flex; align-items: center; gap: 6px; min-width: 0; font: 700 12px/16px var(--pixel); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv__tier { padding: 0 4px; background: var(--tc); color: var(--ink-dark); font: 700 12px/14px var(--pixel); letter-spacing: 0; }
.tv__tier.shine { display: inline-block; vertical-align: top; } /* Chef's Kiss / Delicious: style.css "Tier shine" */
.tv__val { text-align: right; font: 700 12px var(--pixel); }
.tv__names { display: flex; flex-wrap: wrap; gap: 3px; min-width: 0; overflow: hidden; max-height: 34px; }
.tv__who { max-width: 100%; padding: 0 4px; background: #22303a1a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv__row.is-bad .tv__who { background: #ffffff14; }
.tv__who.is-me { background: var(--gold); color: var(--ink-dark); }
.tv__more { color: inherit; opacity: 0.7; }
.tv__tag { text-align: right; font: 700 12px var(--pixel); color: #f08a74; white-space: nowrap; }
.tv__cut { position: relative; height: 18px; margin: 4px 0; list-style: none; }
.tv__cut::before { content: ''; position: absolute; left: 0; right: 0; top: 8px; border-top: 2px dashed var(--gold); }
.tv__cut span { position: relative; float: right; margin-right: 8px; padding: 0 6px; background: #0b1219; color: var(--gold); font: 700 12px/18px var(--pixel); letter-spacing: 1px; text-transform: uppercase; }
.tv--mini .tv__rows { max-height: none; padding: 4px 0; }

/* the round recap */
.trecap { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; padding: 10px 12px 12px; border-top: 1px solid var(--line); animation: rise-in 0.3s; }
.trecap__n { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; background: #ffffff10; font: 700 12px var(--pixel); letter-spacing: 1px; text-transform: uppercase; }
.trecap__n b { font-size: 24px; line-height: 24px; }
.trecap__n--out b { color: #f08a74; } .trecap__n--lost b { color: #f6a0b0; } .trecap__n--alive b { color: var(--green); }
.trecap__names { flex-basis: 100%; margin: 0; text-align: center; font: 11px/16px var(--mono); color: var(--ink-soft); }
.trecap__tie { font: 700 12px var(--pixel); letter-spacing: 2px; text-transform: uppercase; color: var(--gold); }
.trecap__you { flex-basis: 100%; margin: 4px 0 0; text-align: center; font: 700 12px var(--pixel); letter-spacing: 1px; text-transform: uppercase; }
.trecap__you.is-out { color: #f08a74; } .trecap__you.is-lost { color: #f6a0b0; }

/* free entry used: the lobby offer */
.tfree { display: grid; gap: 10px; }
.tfree__check { display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: var(--paper); color: var(--paper-ink); border: 2px solid #000; box-shadow: 0 4px 0 #0007; }
.tfree__check b { display: block; font: 700 12px/16px var(--pixel); letter-spacing: 1px; } .tfree__check small { font: 11px/18px var(--mono); }
.tfree__check small { display: block; line-height: 28px; } .tfree__check small span { font: 700 24px/24px var(--pixel); vertical-align: -4px; }
.tfree__tick { display: grid; place-items: center; width: 34px; height: 34px; flex: none; background: var(--basil); color: #fff; font: 700 24px var(--pixel); box-shadow: inset 0 0 0 2px #0004; }
.tfree__next { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #0b1219f0; border: 2px solid var(--gold); box-shadow: 0 4px 0 #0007; }
.tfree__next > span { color: var(--gold); font-size: 20px; }
.tfree__next b { display: block; font: 700 12px/18px var(--pixel); letter-spacing: 1px; color: var(--gold); } .tfree__next b span { font-size: 24px; }
.tfree__next small { font: 11px/16px var(--mono); color: var(--ink); }
.tpass { display: grid; grid-template-columns: 1fr 1.2fr; border: 2px solid #000; box-shadow: 0 4px 0 #0007; }
.tpass__card { display: grid; align-content: center; gap: 6px; padding: 18px; background: repeating-linear-gradient(120deg, #f6c445 0 26px, #f8cf5e 26px 52px); color: #2a1f1d; }
.tpass__card b { font: 700 24px/28px var(--pixel); letter-spacing: 2px; text-transform: uppercase; }
.tpass__card span { font: 700 12px var(--pixel); letter-spacing: 1px; }
.tpass__perks { padding: 14px 16px; background: #fdf6e4; color: var(--paper-ink); border-left: 2px dashed #2a1f1d; }
.tpass__perks ul { margin: 0 0 10px; padding: 0; list-style: none; display: grid; gap: 6px; font: 11px/16px var(--mono); }
.tpass__perks li::before { content: '✔'; display: inline-block; width: 18px; color: var(--basil); font-weight: 700; }
.tpass__price { margin: 0 0 10px; padding-top: 8px; border-top: 2px dotted var(--paper-line); font: 11px var(--mono); }
.tpass__price b { font: 700 24px var(--pixel); }
.tpass .btn--cream { display: block; text-align: center; text-decoration: none; background: #2a1f1d; color: var(--gold); outline-color: #2a1f1d; }
.tfree__watch { min-height: 44px; }

.tour__bottom { position: fixed; left: 50%; bottom: 112px; transform: translateX(-50%); z-index: 14; width: min(520px, calc(100vw - 32px)); display: grid; gap: 8px; pointer-events: none; }
.tour__bottom > * { pointer-events: auto; animation: rise-in 0.3s both; }
.twatch { padding: 10px 14px; background: #0b1219d9; border: 1px solid #ffffff1f; text-align: center; }
.twatch p { margin: 0; font: 11px/16px var(--mono); color: var(--ink); }
.twatch small { font: 11px/16px var(--mono); color: var(--ink-dim); }
.twatch--out { display: grid; justify-items: center; gap: 6px; border-color: #f08a7455; }
.twatch--out p { font: 700 12px var(--pixel); letter-spacing: 1px; color: #f6b8a4; text-transform: uppercase; }
.tpassbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 14px; background: var(--gold); color: #2a1f1d; border: 2px solid #000; box-shadow: 0 3px 0 #0007; font: 700 12px/16px var(--pixel); }
.tpassbar .btn { background: #2a1f1d; color: var(--gold); border: 0; text-decoration: none; white-space: nowrap; }

/* ---------- the podium ---------- */
.tpod { display: grid; justify-items: center; gap: 8px; padding: 0 0 14px; background: #0b1219f0; border: 2px solid #000; box-shadow: 0 4px 0 #0007; }
.tpod__tag { margin-top: -2px; padding: 6px 16px; background: #000; color: var(--ink); font: 700 12px var(--pixel); letter-spacing: 3px; text-transform: uppercase; }
.tpod__win { display: grid; justify-items: center; gap: 4px; font: 700 24px/28px var(--pixel); color: var(--paper); text-align: center; padding: 0 12px; }
.tpod__crown { display: block; width: 26px; height: 18px; background: var(--gold); clip-path: polygon(0 30%, 22% 60%, 50% 0, 78% 60%, 100% 30%, 100% 100%, 0 100%); }
.tpod__stand { display: grid; grid-template-columns: repeat(3, minmax(0, 170px)); align-items: end; gap: 10px; margin-top: 4px; }
.tpod__slot { position: relative; display: grid; justify-items: center; }
.tpod__slot canvas { width: 140px; height: 148px; image-rendering: pixelated; margin-bottom: 2px; }
.tpod__slot .tpod__crown { position: absolute; top: 34px; }
.tpod__name { max-width: 100%; margin-bottom: 4px; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 12px var(--pixel); color: var(--paper); }
.tpod__slot--1 .tpod__name { color: var(--gold); }
.tpod__block { display: grid; place-items: center; width: 100%; background: var(--paper); color: var(--paper-ink); font: 700 48px/48px var(--pixel); box-shadow: inset 0 -5px 0 var(--paper-line); }
.tpod__slot--1 .tpod__block { height: 74px; background: var(--gold); box-shadow: inset 0 -5px 0 #b8862a; }
.tpod__slot--2 .tpod__block { height: 54px; } .tpod__slot--3 .tpod__block { height: 42px; }
.tpod__you { display: grid; justify-items: center; width: calc(100% - 28px); padding: 8px; background: var(--paper); color: var(--paper-ink); }
.tpod__you b { font: 700 24px/28px var(--pixel); } .tpod__you small { font: 11px var(--mono); }
.tpod__next { font: 700 12px var(--pixel); letter-spacing: 1px; color: var(--gold); } .tpod__next b { font-size: 24px; }
.tpod__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tpod__btns a { text-decoration: none; }

/* ---------- left: who's left ---------- */
.tour__left { position: fixed; left: 16px; top: 76px; z-index: 12; width: 220px; max-height: calc(100vh - 290px); display: flex; flex-direction: column; background: #0b1219e6; border: 2px solid #000; box-shadow: 0 4px 0 #0006; }
.tleft__head { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; font: 700 12px var(--pixel); letter-spacing: 2px; text-transform: uppercase; color: var(--ink-soft); cursor: default; }
.tleft__head b { font-size: 24px; color: var(--ink); letter-spacing: 0; }
.tleft__list { margin: 0; padding: 4px 0; list-style: none; overflow-y: auto; scrollbar-width: thin; }
.tleft__p { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 12px; font: 11px/16px var(--mono); }
.tleft__p > span:first-child, .tleft__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tleft__name { padding: 0; background: none; border: 0; color: inherit; font: inherit; text-align: left; text-decoration: underline dotted #ffffff55; }
.tleft__p.is-me { color: var(--gold); background: #f6c4451a; }
.tleft__p.is-hit { animation: hit 1.6s steps(2) 3; }
@keyframes hit { 50% { background: #e2556a55; } }
.tleft__p.is-out { color: var(--ink-dim); }
.tleft__p small { color: var(--ink-dim); }
.tleft__sep { padding: 8px 12px 2px; font: 700 12px var(--pixel); letter-spacing: 2px; text-transform: uppercase; color: var(--ink-dim); }
.tleft__more { padding: 2px 12px; color: var(--ink-dim); }
.tleft__hp { display: inline-flex; gap: 2px; flex: none; }
.hp { display: inline-block; width: 11px; height: 10px; background: #e2556a; clip-path: polygon(9% 0, 45% 0, 45% 10%, 55% 10%, 55% 0, 91% 0, 91% 10%, 100% 10%, 100% 50%, 91% 50%, 91% 60%, 82% 60%, 82% 70%, 73% 70%, 73% 80%, 64% 80%, 64% 90%, 55% 90%, 55% 100%, 45% 100%, 45% 90%, 36% 90%, 36% 80%, 27% 80%, 27% 70%, 18% 70%, 18% 60%, 9% 60%, 9% 50%, 0 50%, 0 10%, 9% 10%); }
.hp--gone { background: #4a4f58; }

/* ---------- bottom: me + emote hotbar (the hotbar itself: /hotbar.css) ---------- */
.tour__foot { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 13; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 12px; pointer-events: none; }
.tour__foot > * { pointer-events: auto; }
.tme { justify-self: start; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 4px 10px; max-width: 360px; padding: 8px 10px; background: #0b1219e6; border: 2px solid #000; box-shadow: 0 4px 0 #0006; }
.tme__pic { display: block; width: 48px; height: 48px; background: var(--paper); box-shadow: inset 0 -3px 0 var(--paper-line); } .tme__pic canvas { display: block; width: 48px; height: 48px; image-rendering: pixelated; }
.tme__who { display: grid; min-width: 0; }
.tme__who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 24px/28px var(--pixel); }
.tme__tag { display: inline-flex; gap: 2px; font: 700 12px var(--pixel); letter-spacing: 1px; text-transform: uppercase; color: var(--ink-soft); }
.tme__btns { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.tpick__pic { display: grid; place-items: center; width: 60px; height: 60px; overflow: hidden; }
.tpick__pic canvas { width: 60px; height: 60px; image-rendering: pixelated; }

/* toasts sit above the hotbar here, clear of the centre card */
.tour .toast { top: auto; bottom: calc(var(--hotbar-h, 80px) + 24px); }

/* ---------- dialogs ---------- */
.tdialog { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: #060c12b3; animation: fade 0.2s; }
.tdialog__panel { width: min(460px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: #0f1a22; border: 2px solid #000; box-shadow: 0 6px 0 #0008; }
.tdialog__panel--wide { width: min(720px, 100%); }
.tdialog__head { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #0a131a; border-bottom: 2px solid #000; }
.tdialog__head h2 { flex: 1; margin: 0; font: 700 24px/28px var(--pixel); letter-spacing: 3px; text-transform: uppercase; color: var(--gold); text-shadow: 0 2px 0 #6a4a10; }
.tdialog__body { padding: 14px; overflow-y: auto; }
.tdialog .note { margin: 8px 0; font: 11px/16px var(--mono); color: var(--ink-soft); }
.tdialog .err { min-height: 16px; margin: 6px 0 0; color: #f08a74; font: 11px var(--mono); }
.tnick { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.tnick input, .tsign__q { height: 42px; padding: 0 12px; background: #fffaf0; border: 2px solid var(--paper-ink); color: var(--paper-ink); font: 18px var(--mono); }
.tsign__q { width: 100%; }
.tsign__list { margin: 10px 0; padding: 0; list-style: none; max-height: 46vh; overflow-y: auto; }
.tsign__list button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; font: 700 12px var(--pixel); }
.tsign__list button:hover { background: #ffffff10; color: var(--gold); }
.tpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.tpick__e { position: relative; display: grid; justify-items: center; gap: 4px; padding: 8px 4px; background: var(--paper); color: var(--paper-ink); border: 2px solid #000; font: 700 12px/14px var(--pixel); }
.tpick__e.is-on { box-shadow: inset 0 0 0 3px var(--gold); }
.tpick__e.is-locked { opacity: 0.45; filter: grayscale(0.7); }
.tpick__e b { position: absolute; right: 4px; top: 2px; color: #b8862a; }
.tpick__lock { position: absolute; right: 5px; top: 5px; width: 9px; height: 10px; background: #2a1f1d; clip-path: polygon(20% 40%, 20% 15%, 35% 0, 65% 0, 80% 15%, 80% 40%, 100% 40%, 100% 100%, 0 100%, 0 40%, 32% 40%, 32% 20%, 68% 20%, 68% 40%); }
.tshare { width: 100%; height: 140px; background: #0b1016; color: var(--ink); border: 1px solid #ffffff2a; font: 11px/16px var(--mono); padding: 8px; }

/* results */
.tres__card { display: grid; justify-items: center; gap: 4px; padding: 12px; margin-bottom: 12px; background: var(--paper); color: var(--paper-ink); text-align: center; }
.tres__card b { font: 700 36px/40px var(--pixel); } .tres__card span { font: 700 12px var(--pixel); letter-spacing: 1px; text-transform: uppercase; } .tres__card small { font: 11px var(--mono); }
.tres { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.tres__r { padding: 10px 12px; background: #ffffff0a; border-left: 4px solid var(--green); }
.tres__r.is-bad { border-left-color: #f08a74; }
.tres__h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font: 700 12px var(--pixel); letter-spacing: 1px; text-transform: uppercase; }
.tres__h em { margin-left: auto; font-style: normal; color: var(--ink-soft); }
.tres__q { margin: 6px 0 2px; font: 11px/16px var(--mono); color: var(--paper); }
.tres__me, .tres__bar { margin: 2px 0; font: 11px/16px var(--mono); color: var(--ink-soft); }
.tres details { margin-top: 6px; } .tres summary { cursor: pointer; font: 700 12px var(--pixel); color: var(--gold); letter-spacing: 1px; text-transform: uppercase; }
.tres .tv { border-top: 0; background: none; box-shadow: none; border: 0; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .tour__top { padding: 10px 12px; }
  .tour__home { width: 38px; height: 38px; }
  .tcount__box { min-width: 0; padding: 2px 8px 4px; } .tcount__box b { font-size: 12px; line-height: 16px; } .tcount__box small { font-size: 12px; letter-spacing: 0; }
  .tour__center { top: 58px; width: calc(100vw - 24px); }
  .tour__center--verdict, .tour__center--recap, .tour__center--finished, .tour__center--lobby .tfree { width: calc(100vw - 24px); }
  .tcard__clock { font-size: 36px; line-height: 44px; }
  .tbanner b { font-size: 24px; line-height: 28px; }
  .tq__prompt { font-size: 12px; line-height: 18px; letter-spacing: 1px; margin: 10px 12px 8px; }
  .tq__form input { height: 42px; font-size: 18px; }
  .tv__rows { max-height: 38vh; }
  .tv__row { grid-template-columns: 30px minmax(0, 1fr) 78px 52px; gap: 6px; } .tv__val { white-space: nowrap; }
  .tv__names { display: none; }
  .tpass { grid-template-columns: 1fr; } .tpass__perks { border-left: 0; border-top: 2px dashed #2a1f1d; }
  .tpass__card { padding: 12px 14px; }
  .tfree__check small span { font-size: 12px; }
  .tpod__stand { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0 8px; }
  .tpod__slot canvas { width: 70px; height: 74px; margin-bottom: -4px; }
  .tpod__block { font-size: 24px; line-height: 24px; } .tpod__slot--1 .tpod__block { height: 48px; } .tpod__slot--2 .tpod__block { height: 36px; } .tpod__slot--3 .tpod__block { height: 28px; }
  .tpod__win { font-size: 12px; line-height: 16px; letter-spacing: 1px; }
  .tour__left { top: auto; bottom: 176px; left: 12px; width: 180px; max-height: 40vh; }
  .tleft__list { display: none; } .tleft__list.is-open { display: block; }
  .tleft__head { cursor: pointer; border-bottom: 0; }
  .tour__foot { left: 8px; right: 8px; bottom: 8px; grid-template-columns: 1fr; gap: 6px; }
  .tme { grid-template-columns: 32px minmax(0, 1fr); max-width: none; width: 100%; padding: 4px 8px; }
  .tme__pic, .tme__pic canvas { width: 32px; height: 32px; } .tme__who b { font-size: 12px; line-height: 16px; }
  .tme__btns { grid-column: 1 / -1; flex-wrap: nowrap; }
  .tme__btns .btn { padding: 4px 6px; font-size: 12px; letter-spacing: 0; }
  .tour__bottom { bottom: 150px; width: calc(100vw - 24px); }
  .tour__left { bottom: 160px; }
  body[data-phase="verdict"] .tour__left, body[data-phase="recap"] .tour__left, body[data-phase="question"] .tour__left { display: none; }
  .tme__who { grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { .tour__center > *, .tv__rows.is-reveal .tv__row, .tv__rows.is-reveal .tv__cut { animation: none; } }
.tv--mini .tv__title b { display: none; }

/* ---------- phones held sideways (QA2: at 844 x 390 the question card ran under the counts, the timer was cut
   off and the card sat on the "me" panel): everything compact, the card between the left list and the counts ---------- */
@media (max-height: 520px) and (min-width: 761px) {
  .tour__top { padding: 8px 12px; }
  .tour__home { width: 36px; height: 36px; font-size: 16px; }
  .tcount__box { min-width: 0; padding: 2px 8px 4px; } .tcount__box b { font-size: 12px; line-height: 16px; } .tcount__box small { font-size: 12px; letter-spacing: 0; }
  .tour__center, .tour__center--verdict, .tour__center--recap, .tour__center--finished, .tour__center--lobby .tfree { top: 8px; width: min(560px, calc(100vw - 2 * 236px)); }
  .tcard__clock { font-size: 24px; line-height: 30px; margin-top: 4px; }
  .tcycle { padding-bottom: 6px; } .tcard__note { padding: 6px 12px; }
  .tbanner { gap: 4px; padding-top: 8px; } .tbanner b { font-size: 24px; line-height: 28px; } .tbanner__rule { margin-bottom: 8px; }
  .tq__head { padding-top: 6px; } .tq__timer { margin-top: 6px; } .tq__timer b { font-size: 12px; line-height: 16px; }
  .tq__prompt { font-size: 12px; line-height: 18px; letter-spacing: 1px; margin: 6px 12px; }
  .tq__form input { height: 36px; font-size: 16px; } .tq__form .btn { padding-top: 6px; padding-bottom: 6px; }
  .tq__state { margin-top: 4px; } .tq__count { margin-bottom: 6px; }
  .tv__title b { font-size: 12px; line-height: 16px; } .tv__prompt { display: none; }
  /* the card ends above the hotbar, whose top strip flashes the hearts in the recap */
  .tv__rows { max-height: calc(100vh - var(--hotbar-h, 80px) - 200px); max-height: calc(100dvh - var(--hotbar-h, 80px) - 200px); }
  .trecap { gap: 4px 6px; padding: 4px 8px 6px; } .trecap__n { padding: 2px 6px; letter-spacing: 0; } .trecap__n b { font-size: 16px; line-height: 16px; }
  .trecap__names { display: none; } .trecap__you { margin: 0; }
  .tv__row { min-height: 24px; padding: 1px 6px; grid-template-columns: 30px minmax(0, 1fr) 70px 52px; gap: 6px; } .tv__names { display: none; }
  .tpod { gap: 4px; padding-bottom: 8px; } .tpod__win { font-size: 12px; line-height: 16px; }
  .tpod__slot canvas { width: 56px; height: 60px; } .tpod__slot .tpod__crown { top: 6px; }
  .tpod__block { font-size: 16px; line-height: 16px; } .tpod__slot--1 .tpod__block { height: 28px; } .tpod__slot--2 .tpod__block { height: 22px; } .tpod__slot--3 .tpod__block { height: 18px; }
  .tpod__you { padding: 4px 8px; } .tpod__you b { font-size: 16px; line-height: 20px; }
  .tour__left { top: 52px; width: 176px; max-height: calc(100vh - 200px); max-height: calc(100dvh - 200px); }
  body[data-phase="verdict"] .tour__left, body[data-phase="recap"] .tour__left { display: none; }
  body[data-phase="finished"] .tour__foot { display: none; } /* the podium card has Share, My results and Menu */
  .tour__foot { left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); gap: 8px; }
  .tme { grid-template-columns: 32px minmax(0, 1fr); padding: 4px 8px; max-width: 220px; }
  .tme__pic, .tme__pic canvas { width: 32px; height: 32px; } .tme__who b { font-size: 12px; line-height: 16px; }
  .tme__who { grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 8px; }
  .tme__btns .btn { padding: 4px 6px; font-size: 12px; letter-spacing: 0; }
  .tour .tour__bottom { bottom: calc(var(--hotbar-h, 80px) + 16px); width: min(480px, calc(100vw - 2 * 236px)); }
}
