/* Tap Out page. Colors and fonts only through the site's variables (tokens.css, fonts.css).
   Lobby on a paper band; a match on its own iron band, full screen on phones, in the "Fuse" look (see tapout.js). */

.to-main { padding: clamp(32px, 6vw, 64px) 0 clamp(48px, 8vw, 88px); }
.to-main .wrap { max-width: 34rem; }
/* .btn sets its own display, which would beat the hidden attribute (the host-only Start button) */
.to-main [hidden] { display: none; }

.to-view { display: none; gap: .9rem; }
body[data-view="start"] [data-for="start"],
body[data-view="join"] [data-for="join"],
body[data-view="lobby"] [data-for="lobby"],
body[data-view="error"] [data-for="error"] { display: grid; }
.to-view .btn { justify-self: start; }

.to-h { font-size: clamp(1.8rem, 6vw, 2.5rem); color: var(--title); }
.to-code { font-family: var(--font-accent); letter-spacing: .12em; color: var(--accent-ink); }
.to-note { color: var(--soft); }
.to-note:empty { display: none; }

.to-label { font: 400 .78rem/1 var(--font-accent); text-transform: uppercase; letter-spacing: .1em; color: var(--soft); padding: 0; }
.to-input {
  width: 100%; min-height: 54px; padding: .6em .8em;
  font: 700 1.25rem/1.2 var(--font-body); color: var(--title);
  background: var(--card); border: 2px solid var(--rule); border-radius: 3px;
}
.to-input:focus { outline: none; border-color: var(--accent-ink); }

.to-faces { border: 0; margin: .4rem 0 0; padding: 0; display: grid; gap: .8rem; }
.to-face-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
.to-face {
  aspect-ratio: 1; font-size: 1.6rem; line-height: 1; cursor: pointer;
  background: var(--card); border: 2px solid var(--rule); border-radius: 3px;
}
.to-face[aria-pressed="true"] { border-color: var(--accent-ink); background: var(--ember); }
.to-face:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.to-error { color: var(--danger); font-weight: 700; }

/* theme box: a labelled text field with a Go button on top, then one-tap chips */
.to-pick { display: flex; gap: 8px; margin-top: -8px; }
.to-pick-label { color: var(--title); font-size: .85rem; }
.to-pick-label + .to-chips { margin-top: -8px; }
.to-pick .to-input { flex: 1; min-width: 0; }
.to-pick .btn { flex: none; }
.to-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.to-chip {
  min-height: 40px; padding: .4rem .8rem; cursor: pointer;
  font: 700 .95rem/1.1 var(--font-body); color: var(--ink);
  background: var(--card); border: 2px solid var(--rule); border-radius: 999px;
}
.to-chip:hover { border-color: var(--accent-ink); color: var(--accent-ink); }
.to-chip:disabled { opacity: .5; cursor: default; }
.to-chip--big { min-height: 52px; padding: .6rem 1.1rem; font-size: 1.1rem; }

/* speed: a three-way switch (host only) */
.to-speed { display: grid; gap: .5rem; margin-top: .4rem; }
.to-seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 2px solid var(--ink); border-radius: 3px; overflow: hidden; }
.to-seg__btn {
  min-height: 48px; font: 700 1rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .04em; cursor: pointer;
  color: var(--ink); background: transparent; border: 0;
}
.to-seg__btn + .to-seg__btn { border-left: 2px solid var(--ink); }
.to-seg--4 { grid-template-columns: repeat(4, 1fr); }
.to-seg--4 .to-seg__btn { font-size: .82rem; letter-spacing: 0; padding: 0 .2rem; }
.to-seg__btn[aria-pressed="true"] { background: var(--ember); color: var(--on-ember); }
.to-seg__btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -5px; }

.to-lobby-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; }

.to-players { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.to-player {
  display: flex; align-items: center; gap: .8rem; min-height: 56px; padding: .4rem .9rem;
  background: var(--card); border: 2px solid var(--rule); border-radius: 3px;
}
.to-player__face { font-size: 1.7rem; line-height: 1; }
.to-player__name { flex: 1; min-width: 0; font-weight: 700; color: var(--title); overflow-wrap: anywhere; }
.to-player__tag { font: 400 .72rem/1 var(--font-accent); text-transform: uppercase; letter-spacing: .08em; color: var(--soft); }
.to-player--me { border-color: var(--accent-ink); }
.to-player--off { opacity: .5; }
.to-player--empty { border-style: dashed; color: var(--soft); justify-content: center; font-size: .95rem; }

.to-conn {
  position: fixed; left: 50%; bottom: 16px; z-index: 60; translate: -50% 0; margin: 0; padding: .5rem 1rem;
  font: 400 .85rem/1.2 var(--font-accent); color: var(--head-ink); background: var(--head-bg);
  border: 2px solid var(--ember); border-radius: 3px;
}
.to-conn[hidden] { display: none; }

/* ---------- the match ---------- */
.to-play { display: none; }
.to[data-view="game"] .to-play { display: block; }
.to[data-view="game"] .hero,
.to[data-view="game"] .to-main { display: none; }
.to-play__inner { max-width: 34rem; margin: 0 auto; padding: 14px var(--gutter) 28px; display: grid; gap: 14px; min-height: 70vh; align-content: start; }
/* Phones: the match fills the screen, no site header or footer */
@media (max-width: 899px) {
  .to[data-view="game"] { padding-top: 0; }
  .to[data-view="game"] .site-header,
  .to[data-view="game"] .site-footer { display: none; }
  .to[data-view="game"] .to-play { min-height: 100dvh; }
  .to-play__inner { min-height: 100dvh; padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}

.to-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  font: 400 .74rem/1.3 var(--font-accent); text-transform: uppercase; letter-spacing: .08em; color: var(--soft);
}
.to-top__me { font: 700 1rem/1 var(--font-body); color: var(--title); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.to-top__me.is-down { color: var(--danger); }
.to-stage { display: grid; gap: 14px; align-content: start; }
.to-stage .btn { justify-self: start; }
.to-big { font-size: clamp(2.2rem, 9vw, 3.2rem); color: var(--title); }
.to-theme { font: 700 1.3rem/1.2 var(--font-body); color: var(--accent-ink); }
.to-soft { color: var(--soft); font-family: var(--font-accent); font-size: .85rem; }
.to-count { font: 700 clamp(4rem, 24vw, 7rem)/1 var(--font-heading); color: var(--title); text-align: center; min-height: 1em; }
.to-question { font: 700 clamp(1.4rem, 6vw, 1.8rem)/1.25 var(--font-body); color: var(--title); }
.to-question--small { font-size: 1.1rem; color: var(--soft); }

/* the fuse: burns from right to left; the spark rides its end; the number beside it is the score on the line */
.to-fuse-row { display: flex; align-items: center; gap: 10px; }
.to-fuse { position: relative; flex: 1; height: 16px; background: var(--char-950); border: 1px solid var(--rule); border-radius: 8px; }
.to-fuse span { position: absolute; inset: 0 auto 0 0; width: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--danger), var(--ember) 70%, var(--accent-300)); }
.to-fuse span::after {
  content: ""; position: absolute; right: -9px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%;
  background: var(--accent-300); box-shadow: 0 0 10px 4px var(--ember), 0 0 24px 8px var(--danger);
  animation: to-spark .12s infinite alternate;
}
.to-fuse.is-out span::after { display: none; }
@keyframes to-spark { to { transform: scale(.7); opacity: .7; } }
.to-fuse-num { min-width: 3.2ch; text-align: right; font: 900 2.4rem/1 var(--font-body); font-variant-numeric: tabular-nums; color: var(--title); }
.to-fuse-num.is-low { color: var(--danger); }

/* the four answers: big tiles; a tap locks in by color alone */
.to-tiles { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(min(26vh, 170px), 1fr); gap: 8px; }
.to-tiles.is-results { grid-auto-rows: minmax(64px, auto); }
.to-tile {
  display: flex; align-items: center; justify-content: center; padding: .7rem; text-align: center;
  font: 700 1.3rem/1.2 var(--font-body); color: var(--title); overflow-wrap: anywhere;
  background: var(--card); border: 3px solid var(--rule); border-radius: 3px;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: opacity .2s, transform .08s, background-color .12s;
}
.to-tiles.is-results .to-tile { font-size: 1rem; border-width: 2px; }
button.to-tile { cursor: pointer; }
button.to-tile:active { transform: scale(.97); }
button.to-tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.to-tiles.is-locked .to-tile:not(.is-picked) { opacity: .35; }
.to-tile:disabled { cursor: default; }
.to-tile.is-picked { opacity: 1; background: var(--ember); border-color: var(--ember); color: var(--on-ember); }
.to-tile.is-right { background: var(--ember); border-color: var(--ember); color: var(--on-ember); }
.to-tile.is-wrong { background: transparent; border-color: var(--danger); color: var(--danger); text-decoration: line-through; }

.to-locks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 1.8rem; }
.to-locks span { font-size: 1.4rem; line-height: 1; opacity: .3; transition: opacity .15s, transform .15s; }
.to-locks span.is-in { opacity: 1; transform: scale(1.15); }
.to-locks .to-locks__label { font: 400 .8rem/1 var(--font-accent); color: var(--soft); opacity: 1; }

/* results: your swing rises in a banner and slams in */
.to-banner { padding: 1rem; text-align: center; background: var(--card); border-top: 3px solid var(--ember); border-radius: 3px; animation: to-rise .3s ease-out both; }
.to-banner.is-down { border-top-color: var(--danger); }
@keyframes to-rise { from { transform: translateY(30px); opacity: 0; } }
.to-swing { font: 900 clamp(3.2rem, 18vw, 5rem)/1 var(--font-body); font-variant-numeric: tabular-nums; color: var(--soft); animation: to-slam .35s .15s cubic-bezier(.2, 1.6, .4, 1) both; }
.to-swing.is-up { color: var(--accent-ink, var(--iron-accent)); }
.to-swing.is-down { color: var(--danger); }
@keyframes to-slam { from { transform: scale(2.2); opacity: 0; } }

.to-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: rank; }
.to-row {
  counter-increment: rank; display: flex; align-items: center; gap: .7rem; min-height: 48px; padding: .3rem .8rem;
  background: var(--card); border: 2px solid var(--rule); border-radius: 3px;
}
.to-row::before { content: counter(rank); width: 1.2em; font-family: var(--font-accent); color: var(--soft); }
.to-board--swings .to-row { min-height: 40px; }
.to-board--swings .to-row::before { content: none; }
.to-row__face { font-size: 1.4rem; line-height: 1; }
.to-row__name { flex: 1; min-width: 0; font-weight: 700; color: var(--title); overflow-wrap: anywhere; }
.to-row__score { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--title); }
.to-row__score.is-up { color: var(--accent-ink, var(--iron-accent)); }
.to-row__score.is-down { color: var(--danger); }
.to-row--me { border-color: var(--accent-ink); }
.to-row--off { opacity: .5; }

/* the end: the winner's face, then confetti */
.to-winner { font-size: 4rem; line-height: 1; animation: to-slam .5s cubic-bezier(.2, 1.6, .4, 1) both; }
.to-confetti { position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden; }
.to-confetti i {
  position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px;
  animation: to-fall linear both;
}
.to-confetti .c0 { background: var(--ember); }
.to-confetti .c1 { background: var(--accent-300); }
.to-confetti .c2 { background: var(--color-bg); }
.to-confetti .c3 { background: var(--danger-300); }
@keyframes to-fall { to { transform: translate(var(--drift), 105vh) rotate(var(--spin)); } }

/* between rounds: the pick countdown and the recap lines */
.to-count--small { font-size: clamp(2.4rem, 12vw, 3.4rem); text-align: left; }
/* Notes on the round intro that are sometimes empty: no gap for them */
.to-gnote:empty, .to-wait:empty { display: none; }
.to-writing { animation: to-blink 1.2s ease-in-out infinite; }
@keyframes to-blink { 50% { opacity: .45; } }

/* ---------- power-ups ---------- */
/* the drop banner while reading and answering */
.to-drop {
  justify-self: start; padding: .35rem .7rem; font: 700 .8rem/1.2 var(--font-accent); text-transform: uppercase;
  letter-spacing: .08em; color: var(--on-ember); background: var(--ember); border-radius: 3px;
  animation: to-blink 1.2s ease-in-out infinite;
}
/* under the tiles: what's been played and how it went */
.to-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.to-feed[hidden] { display: none; }
.to-feed li { font: 400 .95rem/1.35 var(--font-accent); color: var(--title); animation: to-rise .25s ease-out both; }
.to-feed li::before { content: "» "; color: var(--accent-ink); }
/* your card: name, what it does, Play */
.to-mycard { display: grid; gap: .6rem; }
.to-mycard[hidden] { display: none; }
.to-card {
  display: grid; gap: .35rem; padding: .8rem .9rem; border: 2px solid var(--ember); border-radius: 6px;
  background: color-mix(in oklab, var(--ember) 10%, transparent);
}
.to-card .btn { justify-self: start; margin-top: .3rem; }
.to-card__name { font: 700 1.2rem/1.1 var(--font-body); color: var(--accent-ink); }
.to-card__blurb { color: var(--title); font-size: .95rem; }
.to-mycard__won { font: 700 1.4rem/1.1 var(--font-body); color: var(--accent-ink); animation: to-slam .4s cubic-bezier(.2, 1.6, .4, 1) both; }
.to-mycard__btns { display: flex; flex-wrap: wrap; gap: 8px; }
/* 50/50: the two hidden tiles */
.to-tile.is-gone { visibility: hidden; }
/* a face-down card on the leaderboard, and the card never played (end) */
.to-cardmark {
  flex: none; width: 16px; height: 22px; border-radius: 3px; border: 2px solid var(--ember);
  background: repeating-linear-gradient(45deg, var(--ember) 0 3px, transparent 3px 6px);
}
.to-row__held { display: block; font: 400 .75rem/1.3 var(--font-accent); color: var(--soft); }

/* ---------- before Round 1 (Oct 22, picked from mockups) ---------- */
/* spin: a spotlight hops between everyone's cards and lands on who picks the theme */
.to-spot { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.to-spot__card {
  display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 64px; padding: .6rem .8rem;
  font: 700 1.15rem/1.1 var(--font-body); color: var(--title); background: var(--card); border: 3px solid var(--rule); border-radius: 3px;
  opacity: .55; transition: opacity .08s, transform .08s;
}
.to-spot__face { font-size: 1.8rem; }
.to-spot__name { min-width: 0; overflow-wrap: anywhere; }
.to-spot__card.is-lit { opacity: 1; border-color: var(--ember); transform: scale(1.04); }
.to-spot__card.is-won { opacity: 1; background: var(--ember); border-color: var(--ember); color: var(--on-ember); animation: to-slam .35s cubic-bezier(.2, 1.6, .4, 1) both; }
.to-who { min-height: 1.3em; font: 700 clamp(1.6rem, 7vw, 2.2rem)/1.2 var(--font-body); color: var(--accent-ink); text-align: center; }
.to-who.is-in { animation: to-slam .35s cubic-bezier(.2, 1.6, .4, 1) both; }
/* typed lists: How to play and the round facts type in a line at a time and stay (the round facts used to take
   turns, fading, until Oct 22); How to play's Win! slams in big */
.to-typed { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font: 400 clamp(1.1rem, 4.6vw, 1.35rem)/1.35 var(--font-accent); color: var(--title); }
.to-typed li { animation: to-type .5s steps(14) both; }
.to-typed li::before { content: "// "; color: var(--accent-ink); }
.to-typed li.is-win { margin-top: .4rem; font: 900 clamp(2.4rem, 12vw, 3.4rem)/1 var(--font-body); color: var(--accent-ink, var(--iron-accent)); animation: to-slam .4s cubic-bezier(.2, 1.6, .4, 1) both; }
.to-typed li.is-win::before { content: none; }
@keyframes to-type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@media (prefers-reduced-motion: reduce) { .to-typed li, .to-spot__card.is-won, .to-who.is-in { animation: none; } }

/* ---------- sabotage (step 6b) ---------- */
/* On who? one button per opponent on your card */
.to-card__who { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .3rem; }
.to-card .to-card__on { margin-top: 0; }
/* aimed at me: who did it, big (about the size of "Round 1"), above the question (mockup "Big line", Oct 22) */
.to-hitme {
  padding: .7rem .8rem; font: 900 clamp(1.9rem, 8.5vw, 2.6rem)/1.05 var(--font-body); text-align: center; color: var(--on-ember);
  background: var(--danger); border-radius: 3px; animation: to-slam .4s cubic-bezier(.2, 1.6, .4, 1) both;
}
/* Upside Down: the question and the tiles */
.to-stage.is-upside .to-question,
.to-stage.is-upside .to-tiles { transform: rotate(180deg); transition: transform .4s ease-out; }
/* Fog: three soft patches keep drifting across the question, so words come and go (mockup "Drift", Oct 22; a full
   blur was unreadable). The tiles stay clear. */
.to-question:has(.to-fogp) { position: relative; overflow: hidden; }
.to-fogp {
  position: absolute; top: -10%; bottom: -10%; left: -50%; width: 45%; border-radius: 50%; pointer-events: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); background: color-mix(in oklab, var(--char-500) 35%, transparent);
  -webkit-mask-image: radial-gradient(closest-side, black 55%, transparent); mask-image: radial-gradient(closest-side, black 55%, transparent);
  animation: to-drift 3.2s linear infinite;
}
.to-fogp:nth-of-type(2) { animation-duration: 4.1s; animation-delay: -1.6s; top: -30%; }
.to-fogp:nth-of-type(3) { animation-duration: 2.7s; animation-delay: -2.2s; top: 10%; }
@keyframes to-drift { from { left: -50%; } to { left: 105%; } }
/* Freeze: the tiles are iced over (and can't be tapped) for the first second */
.to-tiles.is-frozen .to-tile { color: transparent; background: var(--char-950); border-color: var(--accent-300); pointer-events: none; }
/* Glitch: each tile blinks out on its own rhythm (a hidden tile can't be tapped). About 2 blinks a second at most. */
.to-stage.is-glitch .to-tile { animation: to-glitch 1.1s steps(1) infinite; }
.to-stage.is-glitch .to-tile:nth-child(2) { animation-duration: .9s; animation-delay: -.4s; }
.to-stage.is-glitch .to-tile:nth-child(3) { animation-duration: 1.3s; animation-delay: -.7s; }
.to-stage.is-glitch .to-tile:nth-child(4) { animation-duration: 1s; animation-delay: -.2s; }
.to-stage.is-glitch .to-tiles.is-locked .to-tile,
.to-stage.is-glitch .to-tile.is-gone { animation: none; }
@keyframes to-glitch { 0% { visibility: visible; } 40% { visibility: hidden; } 60% { visibility: visible; } 85% { visibility: hidden; } 92% { visibility: visible; } }
/* Blind: a quick shake as the tiles swap places */
.to-tiles.is-swapped { animation: to-shake .3s; }
@keyframes to-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---------- Spy and Second Chance (step 6c) ---------- */
/* Spy: the others' faces in the corner of the tile they locked in (only the spy sees them) */
.to-tile:has(.to-spyfaces) { position: relative; }
.to-spyfaces {
  position: absolute; top: 6px; right: 6px; padding: 2px 6px; font-size: 1.3rem; line-height: 1.2; letter-spacing: 2px;
  background: var(--char-950); border: 1px solid var(--ember); border-radius: 999px; animation: to-slam .3s cubic-bezier(.2, 1.6, .4, 1) both;
}
/* Second Chance: told at once that the first tap was wrong */
.to-retry { font: 900 1.2rem/1.2 var(--font-body); color: var(--danger); text-align: center; animation: to-slam .3s cubic-bezier(.2, 1.6, .4, 1) both; }

/* Leave game: a quiet link under the lobby */
.to-leave { justify-self: start; font: 400 .85rem/1.2 var(--font-accent); color: var(--soft); min-height: 44px; }
/* the match's ⋮ menu: a dim icon by your score, opening a sheet from the bottom. The sheet takes the iron band's
   colors for the theme (Oct 23: it was always charcoal, so in light mode its dark text was invisible). */
.to-top__right { display: inline-flex; align-items: center; gap: 4px; }
.to-menu-btn {
  width: 44px; height: 44px; margin: -12px -12px -12px 0; font: 700 1.3rem/1 var(--font-body); color: var(--soft);
  background: none; border: 0; border-radius: 50%; cursor: pointer; opacity: .7;
}
.to-menu-btn:hover, .to-menu-btn[aria-expanded="true"] { opacity: 1; color: var(--title); }
.to-menu-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; }
.to-sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: color-mix(in oklab, var(--char-950) 60%, transparent); }
.to-sheet[hidden], .to-sheet [hidden] { display: none; }   /* .btn sets its own display, which would beat hidden (Leave in the lobby) */
.to-sheet__panel {
  --ink: var(--iron-ink); --soft: var(--iron-soft); --rule: var(--iron-rule); --title: var(--iron-title);
  --card: var(--iron-card); --accent-ink: var(--iron-accent); color: var(--ink);
  max-height: 92dvh; overflow-y: auto;
  width: min(100%, 34rem); display: grid; gap: 10px; padding: 18px var(--gutter, 16px) max(18px, env(safe-area-inset-bottom));
  background: var(--iron-bg); border-top: 3px solid var(--ember); border-radius: 10px 10px 0 0; animation: to-rise .2s ease-out both;
}
.to-sheet__panel .btn { width: 100%; justify-content: center; }
.to-sheet__leave { background: var(--danger); border-color: var(--danger); }

/* ---------- solo play (Oct 22) ---------- */
.to-startbtns { display: flex; flex-wrap: wrap; gap: 10px; }
.to-hs { display: grid; gap: .6rem; margin-top: 1.2rem; }
.to-seg--small .to-seg__btn { min-height: 40px; font-size: .85rem; }
/* solo lobby: no players list or invite */
body[data-solo="1"] #share, body[data-solo="1"] #share-note, body[data-solo="1"] #players { display: none; }
/* the arcade board (mockup "Arcade"): black table, typewriter font, #1 in gold, your new row blinking */
.to-arcade {
  list-style: none; margin: 0; padding: 12px 8px; display: grid; gap: 2px; background: var(--char-950); border: 3px solid var(--char-700);
  border-radius: 3px; font: 400 clamp(1.05rem, 4.6vw, 1.3rem)/1.5 var(--font-accent); color: var(--color-bg);
}
.to-arcade li { display: grid; grid-template-columns: 3.4ch 1fr auto; gap: 1ch; padding: 0 6px; }
.to-arcade li span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.to-arcade li:first-child { color: var(--accent-300); }
.to-arcade li.is-me { color: var(--on-ember); background: var(--ember); animation: to-blink 1s steps(1) 4; }
.to-arcade li.to-arcade__empty { display: block; color: var(--color-border); font-size: .95rem; }
.to-newhs { font: 400 .9rem/1 var(--font-accent); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-ink); text-align: center; animation: to-blink 1s steps(1) infinite; }
.to-hsscore { font: 900 clamp(3rem, 16vw, 4.4rem)/1 var(--font-body); color: var(--accent-ink, var(--iron-accent)); text-align: center; font-variant-numeric: tabular-nums; }
/* initials (mockup "Letters"): three slots, an A-Z grid, Save in ember so it stands out */
.to-ini { display: grid; gap: 12px; }
.to-ini__slots { display: flex; justify-content: center; gap: 10px; }
.to-ini__slot { width: 64px; height: 76px; display: grid; place-items: center; font: 700 2.8rem/1 var(--font-accent); color: var(--title); border-bottom: 4px solid var(--rule); }
.to-ini__slot.is-on { border-color: var(--ember); animation: to-blink 1s steps(1) infinite; }
.to-ini__keys { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.to-ini__key { min-height: 46px; font: 700 1.15rem/1 var(--font-accent); color: var(--title); background: var(--card); border: 2px solid var(--rule); border-radius: 3px; cursor: pointer; }
.to-ini__key--wide { grid-column: span 2; font-size: .9rem; }
.to-ini__save { color: var(--on-ember); background: var(--ember); border-color: var(--ember); font-weight: 700; }
.to-ini__key:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* How to play and the power-ups, in the ⋮ sheet (and from the lobby's How to play link): rows that open in place */
.to-fold { background: var(--card); border: 2px solid var(--rule); border-radius: 4px; }
.to-fold summary {
  list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 54px; padding: 0 1rem;
  font: 700 1.1rem/1 var(--font-body); color: var(--title); cursor: pointer;
}
.to-fold summary::-webkit-details-marker { display: none; }
.to-fold summary::after { content: "+"; font-size: 1.5rem; color: var(--soft); }
.to-fold[open] summary::after { content: "−"; }
.to-fold summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.to-fold .to-help { padding: 0 1rem 1rem; max-height: 44dvh; }
.to-help { display: grid; gap: .55rem; max-height: 52dvh; overflow-y: auto; padding: 2px 2px 6px; font-size: .98rem; line-height: 1.4; }
.to-help b { color: var(--title); }
.to-help__group { margin-top: .4rem; font: 400 .75rem/1 var(--font-accent); text-transform: uppercase; letter-spacing: .1em; color: var(--accent-ink); }
.to-lobbylinks { display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* Power-up tips while you wait (mockup "Card", Oct 23): one power-up at a time, a new one every 5 s */
.to-tip { display: grid; gap: .35rem; animation: to-tipin .4s ease-out both; }
.to-tip__kind { font: 400 .7rem/1 var(--font-accent); text-transform: uppercase; letter-spacing: .1em; color: var(--soft); }
@keyframes to-tipin { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .to-tip { animation: none; } }
