/* Game-specific touches on top of Skynet UI (theme: dusk). */
[hidden] { display: none !important; }

html { background: var(--sk-bg); }
body { background: transparent; } /* lets the glow layer behind the page show */
/* soft neon glows behind everything */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40rem 30rem at 10% -10%, rgba(168,85,247,.22), transparent 60%),
    radial-gradient(35rem 28rem at 110% 20%, rgba(236,72,153,.16), transparent 60%),
    radial-gradient(40rem 30rem at 50% 120%, rgba(34,211,238,.12), transparent 60%),
    radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px) 0 0 / 22px 22px; }
body {
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}
#app { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }

.ico { display: inline-flex; vertical-align: -0.15em; }
.ico svg { width: 1.1em; height: 1.1em; }
.sk-btn .ico + *, .sk-btn .ico { margin-right: .35em; }
.sk-btn > .ico:last-child { margin-right: 0; margin-left: .35em; }

.logo { font-size: 3.5rem; line-height: 1; }
.input-lg { font-size: 1.1rem; padding: .8rem 1rem; min-height: 48px; }
.code-input { text-transform: uppercase; letter-spacing: .4em; font-weight: 800; text-align: center; font-size: 1.5rem; }
.code-input::placeholder { letter-spacing: .4em; opacity: .35; }

/* top bar */
.topbar { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--sk-bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: .5rem 0; }
.room-code { display: inline-flex; align-items: center; gap: .5rem; background: var(--sk-surface); border: 1px solid var(--sk-border-2);
  color: var(--sk-text); border-radius: 999px; padding: .35rem .9rem; font: inherit; cursor: pointer; }
.room-code .code { font-weight: 800; letter-spacing: .25em; font-size: 1.15rem; }
.room-code:active { transform: scale(.97); }

.player-row { display: flex; align-items: center; gap: .6rem; }
.who { display: inline-flex; align-items: center; gap: .4rem; min-width: 0; max-width: 100%; }
.who .sk-avatar-sm { flex: none; }
.sk-avatar { font-weight: 800; }

.game-emoji { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 14px;
  font-size: 1.7rem; line-height: 1;
  background: linear-gradient(135deg, hsl(var(--hue, 270) 85% 62% / .35), hsl(calc(var(--hue, 270) + 40) 85% 55% / .15));
  box-shadow: inset 0 0 0 1px hsl(var(--hue, 270) 90% 75% / .35), 0 6px 18px hsl(var(--hue, 270) 90% 50% / .2); }
.game-card { position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.game-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, hsl(var(--hue, 270) 90% 65%), hsl(calc(var(--hue, 270) + 60) 90% 65%)); }
.game-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px hsl(var(--hue, 270) 80% 40% / .25); }
.game-tile { display: flex; align-items: center; gap: .7rem; text-align: left; width: 100%; padding: .7rem; border-radius: var(--sk-radius);
  background: var(--sk-surface); border: 1px solid var(--sk-border); color: var(--sk-text); font: inherit; cursor: pointer; transition: transform .12s, border-color .12s; }
.game-tile:hover { border-color: hsl(var(--hue, 270) 80% 65% / .6); transform: translateY(-1px); }
.game-tile:active { transform: scale(.98); }
.game-tile .game-emoji { width: 2.6rem; height: 2.6rem; font-size: 1.45rem; border-radius: 12px; }

/* how to play */
.how-to summary { cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--sk-primary); list-style: none; }
.how-to summary::-webkit-details-marker { display: none; }
.how-to summary::before { content: '▸ '; }
.how-to[open] summary::before { content: '▾ '; }
.rules-list { margin: .5rem 0 0; padding: 0; list-style: none; counter-reset: r; display: grid; gap: .45rem; font-size: .9rem; }
.rules-list li { counter-increment: r; display: grid; grid-template-columns: 1.6rem 1fr; gap: .5rem; align-items: start; line-height: 1.4; }
.rules-list li::before { content: counter(r); display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--sk-primary-soft); color: var(--sk-text); font-weight: 800; font-size: .75rem; }
.chip-btn { border: 0; cursor: pointer; font: inherit; display: inline-flex; align-items: center; gap: .3rem; }
.help-dot { display: inline-flex; align-items: center; justify-content: center; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: rgba(255,255,255,.18); font-size: .7rem; font-weight: 900; margin-left: .2rem; }

/* bottom sheet (invite, rules) */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(5,3,12,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center; animation: sheet-fade .18s ease-out; }
.sheet { width: 100%; max-width: 32rem; max-height: 88dvh; overflow: auto; background: var(--sk-surface); border: 1px solid var(--sk-border-2);
  border-radius: 22px 22px 0 0; padding: 1.1rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom)); box-shadow: 0 -20px 50px rgba(0,0,0,.5);
  animation: sheet-up .22s cubic-bezier(.2,.9,.3,1.1); }
@media (min-width: 640px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 22px; } }
.sheet-wrap.closing { animation: sheet-fade .18s reverse forwards; }
@keyframes sheet-fade { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } }

/* invite / QR */
.invite-big { display: flex; flex-direction: column; align-items: center; }
.qr-img { width: min(240px, 70vw); height: auto; aspect-ratio: 1; border-radius: 16px; background: #fff; padding: 6px;
  box-shadow: 0 0 0 6px rgba(168,85,247,.25), 0 16px 40px rgba(0,0,0,.45); }
.big-code { font-size: 2.4rem; font-weight: 900; letter-spacing: .3em; padding-left: .3em; line-height: 1;
  background: linear-gradient(90deg, #f0abfc, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.short-link { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; color: var(--sk-text); text-align: center; word-break: break-all; }
.join-panel { display: flex; align-items: center; gap: .9rem; padding: .75rem; border-radius: var(--sk-radius); background: var(--sk-surface-2); border: 1px dashed var(--sk-border-2); }
.qr-thumb { flex: none; padding: 4px; border: 0; border-radius: 10px; background: #fff; cursor: zoom-in; line-height: 0; }
.qr-thumb img { width: 84px; height: 84px; }
.game-card .sk-card-body { display: flex; flex-direction: column; height: 100%; }
.game-card .sk-card-body > button { margin-top: auto; }

/* timers */
.timer { display: inline-flex; align-items: center; gap: .35rem; font-weight: 800; font-size: 1.15rem; min-width: 4.5rem; justify-content: flex-end; position: relative; }
.timer-bar { position: absolute; left: 0; right: 0; bottom: -6px; height: 3px; }
.timer.low { color: var(--sk-danger-text); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .timer.low { animation: none; } }

.big-card .sk-card-body { padding: 1.25rem; }
.room .big-card { position: relative; overflow: hidden; border-color: hsl(var(--hue, 270) 70% 60% / .35);
  background: linear-gradient(160deg, hsl(var(--hue, 270) 70% 50% / .14), transparent 55%), var(--sk-surface);
  box-shadow: 0 14px 40px hsl(var(--hue, 270) 80% 30% / .22); }
.room .big-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, hsl(var(--hue, 270) 90% 65%), hsl(calc(var(--hue, 270) + 60) 90% 65%)); }
.room .chip-btn { background: linear-gradient(90deg, hsl(var(--hue, 270) 75% 45% / .55), hsl(calc(var(--hue, 270) + 50) 75% 45% / .35)); color: #fff; }
.view-enter { animation: view-in .28s cubic-bezier(.2,.9,.3,1.1); }
@keyframes view-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { .view-enter { animation: none; } }
.question { font-size: 1.35rem; font-weight: 700; line-height: 1.35; margin: 0; }
.blank { color: var(--sk-primary-text, var(--sk-primary)); letter-spacing: .05em; }

/* Word Mole card */
.secret { text-align: center; padding: .5rem 0; }
.secret-label { text-transform: uppercase; letter-spacing: .15em; font-size: .75rem; color: var(--sk-muted); }
.secret-word { font-size: 2.2rem; font-weight: 900; margin: .25rem 0 .5rem; word-break: break-word; color: var(--sk-text); }
.secret.mole .secret-word { color: var(--sk-danger-text); }
.peek summary { list-style: none; cursor: pointer; }
.peek summary::-webkit-details-marker { display: none; }
.order-list { margin: 0; padding-left: 1.5rem; display: grid; gap: .55rem; }
.order-list li::marker { color: var(--sk-muted); font-weight: 700; }

/* voting */
.vote-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.vote-btn { display: flex; align-items: center; gap: .55rem; padding: .7rem .8rem; min-height: 56px; border-radius: var(--sk-radius);
  background: var(--sk-surface); border: 2px solid var(--sk-border-2); color: var(--sk-text); font: inherit; font-weight: 600;
  cursor: pointer; text-align: left; min-width: 0; }
.vote-btn:active { transform: scale(.98); }
.vote-btn.picked { border-color: var(--sk-primary); background: var(--sk-primary-soft); box-shadow: 0 0 0 3px hsl(var(--hue, 290) 90% 65% / .25); }
.vote-btn:disabled { opacity: .45; cursor: not-allowed; }

.choice-list { display: grid; gap: .6rem; }
.choice { white-space: normal; text-align: center; min-height: 52px; }

.done-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.tally-row, .score-row, .bar-row { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; min-width: 0; }
.score-row.offline { opacity: .5; }
.score-row .rank { width: 1.25rem; text-align: right; }
.bar-row .sk-progress { min-width: 40px; }
.bar-row .who { width: 40%; flex: none; }

.answer-card.truth { border-color: var(--sk-success); box-shadow: 0 0 0 1px var(--sk-success) inset; }

.scoreboard summary { list-style: none; }
.scoreboard summary::-webkit-details-marker { display: none; }

.host-bar-unused { position: sticky; bottom: 0; display: flex; gap: .5rem; padding: .75rem 0 calc(.75rem + env(safe-area-inset-bottom));
  background: var(--sk-bg); border-top: 1px solid var(--sk-border); margin-top: .75rem; z-index: 10; }

/* Doodle Dash */
.board-wrap { width: 100%; max-width: 520px; margin: 0 auto; }
.board { display: block; width: 100%; aspect-ratio: 1 / 1; background: #fff; border-radius: var(--sk-radius); touch-action: none;
  box-shadow: var(--sk-shadow); }
.board.drawing { cursor: crosshair; outline: 3px solid var(--sk-primary); }
.draw-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; flex-wrap: wrap; min-height: 2.2rem; }
.hint { font-family: var(--sk-font-mono); font-size: 1.4rem; letter-spacing: .3em; font-weight: 700; margin-left: auto; white-space: pre; }
.tools { max-width: 520px; margin: .75rem auto 0; }
.swatches { display: grid; grid-template-columns: repeat(10, 1fr); gap: .35rem; }
.swatch { aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--sk-border-2); cursor: pointer; min-width: 0; padding: 0; }
.swatch.on { outline: 3px solid var(--sk-primary); outline-offset: 2px; }
.size-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--sk-radius-sm);
  border: 2px solid var(--sk-border-2); background: var(--sk-surface); cursor: pointer; }
.size-btn span { border-radius: 50%; display: block; border: 1px solid var(--sk-border-2); }
.size-btn.on { border-color: var(--sk-primary); }
.feed { max-width: 520px; margin: .75rem auto 0; display: grid; gap: .25rem; font-size: .95rem; }
.feed-row { padding: .3rem .6rem; border-radius: var(--sk-radius-sm); background: var(--sk-surface); word-break: break-word; }
.feed-row.ok { color: var(--sk-success-text); background: var(--sk-success-soft); font-weight: 600; }

.net-banner { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 100; box-shadow: var(--sk-shadow-lg); }
.net-banner[hidden] { display: none; }

@media (max-width: 360px) {
  .vote-grid { grid-template-columns: 1fr; }
  .secret-word { font-size: 1.8rem; }
}

/* open rooms on the network */
.open-room { display: flex; align-items: center; gap: .75rem; width: 100%; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.room-code-sm { font-weight: 800; letter-spacing: .15em; background: var(--sk-primary-soft); color: var(--sk-text); border-radius: var(--sk-radius-sm); padding: .35rem .5rem; }
.sk-toggle { display: flex; }

/* bottom dock: host controls during a game */
.dock { position: sticky; bottom: 0; z-index: 15; margin-top: 1rem; padding: .5rem 0 calc(.5rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--sk-bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--sk-border); }
.dock .sk-btn { min-height: 44px; }
/* reactions drop down under the top bar */
.topbar { flex-wrap: wrap; }
.react-toggle { font-size: 1.15rem; line-height: 1; padding-inline: .45rem; }
.react-toggle.on { background: var(--sk-primary-soft); }
.react-bar { flex: 0 0 100%; display: grid; grid-template-columns: repeat(8, 1fr); gap: .25rem; animation: dropIn .16s ease-out; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } }
.react-btn { font-size: 1.35rem; line-height: 1; padding: .4rem 0; border-radius: var(--sk-radius-sm); border: 0; background: var(--sk-surface);
  cursor: pointer; min-height: 42px; }
.react-btn:active { background: var(--sk-surface-2); }
.react-btn.bump { animation: bump .3s ease; }
@keyframes bump { 40% { transform: scale(1.35); } }

/* effects layer */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }
.float-emoji { position: absolute; bottom: 90px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  animation: floatUp 2.6s ease-out forwards; }
.float-emoji-e { font-size: 2.6rem; filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); }
.float-emoji-n { font-size: .7rem; font-weight: 800; color: #140f24; background: #fff; border-radius: 999px; padding: 1px 6px; max-width: 90px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes floatUp {
  0% { transform: translate(0, 0) scale(.5); opacity: 0; }
  12% { transform: translate(0, -40px) scale(1.15); opacity: 1; }
  100% { transform: translate(var(--sway), -55vh) scale(1); opacity: 0; }
}
.confetti { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: confettiFall 2.5s cubic-bezier(.2,.6,.4,1) forwards; }
@keyframes confettiFall { to { transform: translate(var(--dx), 105vh) rotate(var(--rot)); } }
.score-pop { position: absolute; left: 50%; top: 40%; transform: translate(-50%, 0); font-size: 3.5rem; font-weight: 900;
  animation: scorePop 1.5s ease-out forwards; text-shadow: 0 6px 20px rgba(0,0,0,.5); }
.score-pop.good { color: #4ade80; }
.score-pop.bad { color: #f87171; }
@keyframes scorePop { 0% { transform: translate(-50%, 20px) scale(.4); opacity: 0; } 20% { transform: translate(-50%, 0) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -120px) scale(1); opacity: 0; } }
.screen-flash { position: absolute; inset: 0; opacity: .5; animation: fade .5s ease-out forwards; }
@keyframes fade { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .float-emoji { animation-duration: 1.2s; }
  .score-pop { animation: fade 1.5s forwards; }
}

/* podium */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: .75rem; margin-top: .75rem; }
.podium-col { display: flex; flex-direction: column; align-items: center; width: 30%; max-width: 120px; min-width: 0; }
.podium-medal { font-size: 1.6rem; }
.podium-step { width: 100%; text-align: center; font-weight: 900; font-size: 1.25rem; margin-top: .4rem; border-radius: var(--sk-radius-sm) var(--sk-radius-sm) 0 0;
  background: var(--sk-primary-soft); padding-top: .5rem; }
.rank-1 .podium-step { height: 84px; background: linear-gradient(var(--sk-warning-soft), transparent); }
.rank-2 .podium-step { height: 60px; }
.rank-3 .podium-step { height: 44px; }
.rank-1 .sk-avatar { box-shadow: 0 0 0 3px #facc15; }

/* big tap targets used by fast games */
.mega-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; width: 100%; min-height: 46vh;
  border-radius: var(--sk-radius-lg); border: 0; font: inherit; font-size: 1.6rem; font-weight: 900; color: #140f24; cursor: pointer;
  user-select: none; -webkit-user-select: none; touch-action: manipulation; transition: background .1s; }
.mega-btn .big { font-size: 3.2rem; line-height: 1; }
.mega-btn.wait { background: #ef4444; color: #fff; }
.mega-btn.fake { background: #facc15; }
.mega-btn.go { background: #22c55e; }
.mega-btn.idle { background: var(--sk-surface-2); color: var(--sk-text); }
.mega-btn.out { background: var(--sk-surface); color: var(--sk-muted); }

/* Bomb Pass */
.bomb { font-size: 3rem; line-height: 1; display: inline-block; }
.big-bomb { font-size: 5rem; }
.shake { animation: shake .25s infinite; }
.shake-slow { animation: shake .6s infinite; }
@keyframes shake { 25% { transform: rotate(-8deg) scale(1.05); } 75% { transform: rotate(8deg) scale(.97); } }
.exploded { animation: boom .5s ease-out; }
@keyframes boom { 0% { transform: scale(.2); } 60% { transform: scale(1.5); } 100% { transform: scale(1); } }
.holding { border-color: var(--sk-danger); box-shadow: 0 0 0 2px var(--sk-danger), 0 0 40px rgba(239,68,68,.35); }
@media (prefers-reduced-motion: reduce) { .shake, .shake-slow, .exploded { animation: none; } }

/* Face Off */
.faceoff { display: grid; gap: .5rem; }
.faceoff .vs { text-align: center; font-weight: 900; color: var(--sk-muted); letter-spacing: .2em; }
.faceoff-card { display: flex; flex-direction: column; gap: .6rem; width: 100%; text-align: left; padding: 1rem; min-height: 84px;
  border-radius: var(--sk-radius-lg); border: 2px solid var(--sk-border-2); background: var(--sk-surface); color: var(--sk-text); font: inherit; cursor: pointer;
  transition: transform .15s, opacity .3s; }
.faceoff-card:not(:disabled):active { transform: scale(.98); }
.faceoff-card.picked { border-color: var(--sk-primary); background: var(--sk-primary-soft); }
.faceoff-card.won { border-color: var(--sk-success); box-shadow: 0 0 24px rgba(34,197,94,.25); animation: bump .4s ease; }
.faceoff-card.lost { opacity: .6; }
.faceoff-card:disabled { cursor: default; }
.faceoff-text { font-size: 1.2rem; font-weight: 700; word-break: break-word; }
.faceoff-foot { display: flex; align-items: center; gap: .5rem; font-size: .9rem; }

/* Split the Room */
.split { display: grid; gap: .5rem; }
.split .vs { text-align: center; font-weight: 900; color: var(--sk-muted); letter-spacing: .2em; }
.split-btn { min-height: 96px; padding: 1rem; border-radius: var(--sk-radius-lg); border: 3px solid transparent; font: inherit; font-size: 1.2rem; font-weight: 800;
  cursor: pointer; color: #fff; transition: transform .15s; }
.split-btn.side-0 { background: linear-gradient(135deg, #7c3aed, #db2777); }
.split-btn.side-1 { background: linear-gradient(135deg, #0ea5e9, #10b981); }
.split-btn.picked { border-color: #fff; transform: scale(1.02); box-shadow: 0 0 30px rgba(255,255,255,.2); }
.split-btn:active { transform: scale(.98); }
.split-result { display: flex; justify-content: space-between; gap: 1rem; }
.split-col { flex: 1; min-width: 0; }
.split-pct { font-size: 2rem; font-weight: 900; }
.split-bar { height: 14px; border-radius: 999px; background: linear-gradient(90deg, #0ea5e9, #10b981); overflow: hidden; }
.split-bar-a { height: 100%; background: linear-gradient(90deg, #7c3aed, #db2777); transition: width .8s ease; }

/* Hot Takes */
.rate-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; }
.rate-btn { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .7rem 0; border-radius: var(--sk-radius); min-height: 72px;
  border: 2px solid var(--sk-border-2); background: var(--sk-surface); color: var(--sk-text); font: inherit; cursor: pointer; }
.rate-btn.picked { border-color: var(--sk-primary); background: var(--sk-primary-soft); transform: scale(1.06); }
.rate-face { font-size: 1.6rem; }
.heat-scale { position: relative; height: 40px; margin: 1.6rem .6rem .2rem; border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #a855f7, #ef4444); }
.heat-dot { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; transform: translate(-50%, -50%); }
.heat-marker { position: absolute; top: -26px; transform: translateX(-50%); font-weight: 900; background: #fff; color: #140f24; border-radius: 6px; padding: 0 6px; }

/* Hive Mind / Ballpark */
.hive-group.match { border-color: var(--sk-success); }
.big-number { font-size: 2.6rem; font-weight: 900; }
.unit { display: inline-flex; align-items: center; padding: 0 .75rem; background: var(--sk-surface-2); border: 1px solid var(--sk-border-2); color: var(--sk-muted); }

/* Two Truths */
.tt-item { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; width: 100%; text-align: left; padding: .9rem 1rem; min-height: 60px;
  border-radius: var(--sk-radius); border: 2px solid var(--sk-border-2); background: var(--sk-surface); color: var(--sk-text); font: inherit; cursor: pointer; }
.tt-item.picked { border-color: var(--sk-primary); background: var(--sk-primary-soft); }
.tt-item.lie { border-color: var(--sk-danger); background: var(--sk-danger-soft); }
.tt-item.truth { opacity: .7; }
.tt-text { font-weight: 700; font-size: 1.05rem; word-break: break-word; }
.tt-tag { font-size: .8rem; font-weight: 800; }

/* Stop the Clock */
.clock-face { font-size: 3.6rem; font-weight: 900; font-family: var(--sk-font-mono); }
.clock-face.hidden-time { opacity: .5; }

/* Memory Flash */
.pads { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; max-width: 380px; margin: 0 auto; }
.pad { aspect-ratio: 1; border-radius: var(--sk-radius-lg); border: 0; opacity: .45; cursor: pointer; transition: opacity .1s, transform .1s; touch-action: manipulation; }
.pad.lit { opacity: 1; transform: scale(1.05); box-shadow: 0 0 40px rgba(255,255,255,.35); }
.pad:disabled { cursor: default; }
.seq-dots { display: flex; flex-wrap: wrap; gap: .35rem; }
.seq-dot { width: 26px; height: 26px; border-radius: 6px; }

/* Math Rush */
.numpad-screen { font-size: 2.4rem; font-weight: 900; text-align: center; padding: .5rem; border-radius: var(--sk-radius); background: var(--sk-surface); min-height: 64px; }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.numkey { font-size: 1.6rem; font-weight: 800; min-height: 58px; border-radius: var(--sk-radius); border: 1px solid var(--sk-border-2);
  background: var(--sk-surface-2); color: var(--sk-text); cursor: pointer; touch-action: manipulation; }
.numkey:active { background: var(--sk-primary-soft); }

/* Emoji Decode / Letter Blitz */
.emoji-riddle { font-size: 4rem; line-height: 1.2; letter-spacing: .1em; }
.big-letter { font-size: 3.6rem; font-weight: 900; width: 84px; height: 84px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--sk-radius-lg); background: var(--sk-primary); color: #fff; flex: none; }
.sk-chip.shared { text-decoration: line-through; opacity: .6; }

/* Caption Clash */
.scene { display: flex; align-items: center; justify-content: center; gap: .5rem; font-size: 3.4rem; flex-wrap: wrap; }
.scene-plus { font-size: 1.4rem; color: var(--sk-muted); font-weight: 900; }
.tt-item.winner { border-color: #facc15; box-shadow: 0 0 24px rgba(250,204,21,.25); }

/* Rank It */
.rank-btn { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .8rem 1rem; min-height: 58px; border-radius: var(--sk-radius);
  border: 2px solid var(--sk-border-2); background: var(--sk-surface); color: var(--sk-text); font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer; text-align: left; }
.rank-btn.on { border-color: var(--sk-primary); background: var(--sk-primary-soft); }
.rank-num { width: 32px; height: 32px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--sk-surface-2); font-weight: 900; }
.rank-btn.on .rank-num { background: var(--sk-primary); color: #fff; }
.rank-list { margin: 0; padding: 1rem 1rem 1rem 2.5rem; background: var(--sk-success-soft); border-radius: var(--sk-radius); font-weight: 700; display: grid; gap: .35rem; }

/* Joysticks and action games */
.joy { position: relative; width: 116px; height: 116px; border-radius: 50%; background: var(--sk-surface-2); border: 2px solid var(--sk-border-2);
  touch-action: none; user-select: none; -webkit-user-select: none; flex: none; }
.joy.active { border-color: var(--sk-primary); }
.joy-knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  background: var(--sk-primary); box-shadow: 0 4px 14px rgba(0,0,0,.4); pointer-events: none; transition: transform .05s; }
.joy-label { position: absolute; bottom: -1.4rem; left: 0; right: 0; text-align: center; font-size: .75rem; color: var(--sk-muted); }
.controls { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: .6rem; padding-bottom: 1.3rem; }
.arena { display: block; width: min(100%, max(240px, calc(100dvh - 380px))); margin: 0 auto; aspect-ratio: 1 / 1; border-radius: var(--sk-radius); background: #0d0a18; touch-action: none; }
.hud-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; }
.hp-bar { flex: 1; height: 12px; border-radius: 999px; background: var(--sk-surface-2); overflow: hidden; }
.hp-fill { height: 100%; background: linear-gradient(90deg, #22c55e, #84cc16); transition: width .15s; }
.hp-fill.low { background: linear-gradient(90deg, #ef4444, #f97316); }
.killfeed { position: relative; min-height: 1.5rem; font-size: .85rem; }
.kill-row { padding: .15rem .5rem; border-radius: 6px; background: var(--sk-surface); margin-bottom: .2rem; }
.tanks-canvas { aspect-ratio: 5 / 3; width: 100%; }
.tank-range { width: 100%; accent-color: var(--sk-primary); height: 36px; }

/* Dungeon (roguelikes) */
.dg-board { display: grid; gap: 1px; background: #0b0816; border-radius: var(--sk-radius); padding: 3px; width: min(100%, 520px, max(260px, calc(100dvh - 330px))); margin: 0 auto; }
.dg-cell { aspect-ratio: 1; position: relative; display: flex; align-items: center; justify-content: center; font-size: clamp(.8rem, 4.6vw, 1.5rem); line-height: 1; }
.dg-cell.wall { background: #2a2140; }
.dg-cell.floor { background: #171226; }
.dg-cell > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.dg-hero { border-radius: 50%; inset: 8% !important; font-size: .55em; font-weight: 900; color: #140f24; }
.dg-hero.me { box-shadow: 0 0 0 2px #fff; }
.dg-mon .dg-hp { position: absolute; left: 10%; bottom: 4%; height: 3px; background: #ef4444; border-radius: 2px; max-width: 80%; }
.dg-mon.boss { font-size: 1.25em; }
.dg-stairs.locked { opacity: .7; }
.dg-log { font-size: .8rem; color: var(--sk-muted); margin-top: .4rem; min-height: 3.8em; }
.dpad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: .5rem; max-width: 520px; margin-inline: auto; }
.dpad-btn { height: 52px; }
.dpad-btn { border-radius: 12px; border: 1px solid var(--sk-border-2); background: var(--sk-surface-2); color: var(--sk-text); font-size: 1.3rem; cursor: pointer; touch-action: manipulation; }
.dpad-btn.c { font-size: 1rem; }
.dpad-btn:active, .dpad-btn.on { background: var(--sk-primary); color: #fff; }

.dg-canvas { display: block; padding: 0; aspect-ratio: 1 / 1; touch-action: none; box-shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.06); }

/* admin message banner */
.admin-notice { position: fixed; left: 50%; top: calc(10px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 70;
  width: min(30rem, calc(100vw - 24px)); display: flex; gap: .7rem; align-items: center; padding: .8rem 1rem; border-radius: 16px;
  background: linear-gradient(120deg, #7c3aed, #db2777); color: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.45);
  animation: notice-in .35s cubic-bezier(.2,.9,.3,1.2); cursor: pointer; }
@keyframes notice-in { from { transform: translate(-50%, -30px); opacity: 0; } }

/* ---- Big screen: Discord Activity / TV view ---------------------------------------- */
body.tv-mode #app { max-width: none; padding-top: 0; padding-bottom: 0; }
body.tv-mode { font-size: clamp(15px, 1.25vw, 22px); overflow-x: hidden; }
.tv { min-height: 100dvh; display: flex; flex-direction: column; gap: 1rem; padding: 1rem 0 1.25rem; }
.tv-top { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.tv-brand { font-weight: 900; font-size: 1.3rem; letter-spacing: .01em; }
.tv-game { font-weight: 900; font-size: 1.5rem; padding: .3rem .9rem; border-radius: 999px; color: #fff;
  background: linear-gradient(90deg, hsl(var(--hue, 270) 75% 45% / .7), hsl(calc(var(--hue, 270) + 50) 75% 45% / .45)); }
.tv-timer { font-size: 1.6rem; }
.tv-wait { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1rem; }
.tv-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; margin-top: .5rem;
  background: linear-gradient(90deg, #f0abfc, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }

.tv-lobby { flex: 1; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr); gap: 1.25rem; align-items: start; }
.tv-lobby-main { display: grid; gap: 1.25rem; align-content: start; }
.tv-join { display: flex; align-items: center; gap: 1.25rem; padding: 1rem; border-radius: 22px; background: var(--sk-surface);
  border: 1px solid var(--sk-border-2); box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.tv-join.big { padding: 1.5rem; background: linear-gradient(135deg, rgba(168,85,247,.22), rgba(34,211,238,.10)), var(--sk-surface); }
.tv-qr { flex: none; width: 7rem; height: 7rem; border-radius: 14px; background: #fff; padding: 5px; }
.tv-join.big .tv-qr { width: clamp(9rem, 22vw, 15rem); height: auto; aspect-ratio: 1; box-shadow: 0 0 0 6px rgba(168,85,247,.3); }
.tv-join-label { font-size: .85rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sk-muted); }
.tv-join.big .tv-join-label { font-size: 1.1rem; color: var(--sk-text); }
.tv-url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; font-size: 1rem; word-break: break-all; }
.tv-join.big .tv-url { font-size: clamp(1.1rem, 2vw, 1.7rem); margin-top: .3rem; }
.tv-code { font-weight: 900; letter-spacing: .25em; line-height: 1; font-size: 2.2rem; margin-top: .25rem;
  background: linear-gradient(90deg, #f0abfc, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tv-join.big .tv-code { font-size: clamp(3rem, 8vw, 6.5rem); margin-top: .4rem; }
.tv-join-hint { color: var(--sk-muted); margin-top: .5rem; }
.tv-status { font-size: 1.3rem; text-align: center; color: var(--sk-text-secondary, var(--sk-muted)); }

.tv-board { padding: 1rem; border-radius: 22px; background: var(--sk-surface); border: 1px solid var(--sk-border); display: grid; gap: .45rem; align-content: start; }
.tv-board-h { font-weight: 800; font-size: 1.15rem; margin-bottom: .25rem; }
.tv-row { display: flex; align-items: center; gap: .65rem; padding: .35rem .5rem; border-radius: 12px; background: var(--sk-surface-2); animation: view-in .3s ease-out; }
.tv-row.off { opacity: .45; }
.tv-row .sk-avatar { flex: none; }
.tv-rank { width: 1.4rem; text-align: center; font-weight: 800; color: var(--sk-muted); }
.tv-name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-score { margin-left: auto; font-weight: 900; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.tv-strip { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; opacity: .8; }
.tv-chip { font-size: .85rem; padding: .25rem .7rem; border-radius: 999px; background: hsl(var(--hue, 270) 70% 50% / .16); border: 1px solid hsl(var(--hue, 270) 70% 65% / .3); }

.tv-play { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 22rem); gap: 1.25rem; align-items: start; }
.tv-side { display: grid; gap: 1rem; align-content: start; }
/* The game view is read-only on the big screen: hide inputs, keep the content. */
.tv-view { pointer-events: none; }
.tv-view input, .tv-view textarea, .tv-view .controls, .tv-view .dpad, .tv-view form .sk-btn,
.tv-view .tank-slider, .tv-view button.sk-btn-danger.sk-btn-block { display: none !important; }
.tv-view .big-card .sk-card-body { padding: 1.6rem 1.8rem; }
.tv-view h2, .tv-view .text-xl { font-size: 1.6em; }
.tv-view { font-size: 1.3em; }
.tv-view .hud-row { display: none; }
.tv-view .arena, .tv-view .dg-board { width: min(100%, calc(100dvh - 150px)) !important; }
.tv-view .tanks-canvas { width: 100% !important; }

@media (max-width: 820px) {
  .tv-lobby, .tv-play { grid-template-columns: minmax(0, 1fr); }
  .tv-join.big { flex-direction: column; text-align: center; }
  .tv-side .tv-join { display: none; }
}
/* Text games: scale the whole view up so it reads across the room. */
.tv-view:not(:has(canvas)) { zoom: 1.45; }
@media (max-width: 820px) { .tv-view:not(:has(canvas)) { zoom: 1.1; } }
/* Big-screen batch: action buttons and quiz tiles */
.dash-btn { width: 116px; height: 116px; border-radius: 50%; font-size: 1.05rem; font-weight: 900; touch-action: manipulation; box-shadow: 0 8px 24px rgba(168,85,247,.35); }
.dash-btn:disabled { opacity: .45; box-shadow: none; }
.paint-bars { display: grid; gap: 4px; margin-top: .5rem; font-size: .82rem; }
.paint-bar { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) 2.6rem; gap: .5rem; align-items: center; }
.paint-bar.me .paint-name { font-weight: 800; }
.paint-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paint-track { height: 10px; border-radius: 999px; background: var(--sk-surface-2); overflow: hidden; }
.paint-fill { height: 100%; border-radius: 999px; transition: width .25s; }
.paint-pct { text-align: right; font-variant-numeric: tabular-nums; }
.paint-final .arena { width: min(100%, 340px); }
.tv-view .paint-wrap { display: grid; grid-template-columns: minmax(0, calc(100dvh - 150px)) minmax(160px, 1fr); gap: 1rem; align-items: start; }
.tv-view .paint-wrap .arena { width: 100% !important; }
.tv-view .paint-bars { margin-top: 0; font-size: 1rem; gap: 8px; }
.tv-view .paint-final .arena { width: min(100%, calc(100dvh - 340px)) !important; }
.controls.trail-pad { display: grid; grid-template-areas: ". u ." "l b r" ". d ."; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 330px; margin-inline: auto; }
.trail-btn { height: 56px; font-size: 1.6rem; touch-action: manipulation; }
.trail-boost { height: 56px; font-weight: 900; touch-action: manipulation; }
.quiz-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.quiz-cat { font-size: 1.3rem; }
.quiz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.quiz-opt { position: relative; display: flex; align-items: center; gap: .6rem; min-height: 84px; padding: .7rem .8rem; border-radius: 16px; border: 0; text-align: left;
  color: #fff; font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; touch-action: manipulation;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 92%, white), color-mix(in srgb, var(--c) 70%, black)); box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 50%, black); transition: transform .12s, opacity .2s, filter .2s; }
.quiz-opt:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 50%, black); }
.quiz-opt:disabled { cursor: default; }
.quiz-opt.dim, .quiz-opt.wrong { opacity: .35; filter: saturate(.5); }
.quiz-opt.picked { outline: 3px solid #fff; outline-offset: 2px; }
.quiz-opt.right { animation: quiz-pop .5s ease-out; box-shadow: 0 0 0 4px #fff, 0 0 30px var(--c); }
@keyframes quiz-pop { 40% { transform: scale(1.06); } }
.quiz-shape { font-size: 1.4rem; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.quiz-text { flex: 1; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.quiz-pickers { display: flex; flex-wrap: wrap; gap: 2px; max-width: 45%; justify-content: flex-end; }
.quiz-pickers .sk-avatar { width: 1.5rem; height: 1.5rem; font-size: .6rem; }
.quiz-answered { display: flex; align-items: center; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; }
.quiz-avs { display: flex; gap: 3px; flex-wrap: wrap; }
.quiz-avs .sk-avatar { width: 1.6rem; height: 1.6rem; font-size: .6rem; animation: quiz-pop .3s; }
.quiz-big .quiz-opt { min-height: 96px; }
.trail-canvas { width: min(100%, max(220px, calc(100dvh - 470px))); }

/* ---- Big screen: backdrop, intro card, phase sweep, score bumps ---- */
.tv-backdrop { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }
body.tv-mode::before { display: none; }
html:has(body.tv-mode) { background: #0c0818; }
body.tv-mode { background: transparent; }
body.tv-mode .tv-board, body.tv-mode .tv-join, body.tv-mode .tv-view .sk-card {
  background: color-mix(in srgb, var(--sk-surface) 72%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
body.tv-mode .tv-join.big { background: linear-gradient(135deg, rgba(168,85,247,.25), rgba(34,211,238,.12)), color-mix(in srgb, var(--sk-surface) 70%, transparent); }
.tv-game { box-shadow: 0 0 30px hsl(var(--hue, 270) 80% 55% / .35); }
.tv-code { filter: drop-shadow(0 0 18px rgba(168,85,247,.45)); }
.tv-join.big .tv-qr { animation: qr-glow 3s ease-in-out infinite; }
@keyframes qr-glow { 50% { box-shadow: 0 0 0 6px rgba(34,211,238,.35), 0 0 40px rgba(168,85,247,.5); } }

.tv-intro { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none;
  background: radial-gradient(60rem 40rem at 50% 45%, hsl(var(--hue) 70% 30% / .92), rgba(8,5,18,.96)); animation: intro-in .45s ease-out; }
.tv-intro.out { animation: intro-out .6s ease-in forwards; }
.tv-intro-inner { text-align: center; max-width: 60rem; padding: 2rem; }
.tv-intro-emoji { font-size: clamp(5rem, 14vw, 10rem); line-height: 1; animation: intro-bounce 1s cubic-bezier(.3,1.6,.5,1) both; filter: drop-shadow(0 12px 30px hsl(var(--hue) 80% 50% / .6)); }
.tv-intro-title { font-size: clamp(2.6rem, 7vw, 5.5rem); font-weight: 900; letter-spacing: -.02em; margin-top: .5rem; animation: intro-up .6s .15s ease-out both;
  background: linear-gradient(90deg, #fff, hsl(var(--hue) 90% 80%), #fff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tv-intro-tag { font-size: clamp(1.1rem, 2.4vw, 1.8rem); color: hsl(var(--hue) 60% 85%); animation: intro-up .6s .3s ease-out both; }
.tv-intro-rules { list-style: none; padding: 0; margin: 1.5rem auto 0; display: grid; gap: .6rem; max-width: 46rem; text-align: left; }
.tv-intro-rules li { display: flex; gap: .8rem; align-items: baseline; font-size: clamp(1rem, 1.8vw, 1.4rem); padding: .6rem 1rem; border-radius: 14px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); animation: intro-up .45s calc(.45s + var(--i) * .25s) ease-out both; counter-increment: rule; }
.tv-intro-rules li::before { content: counter(rule); flex: none; width: 1.7em; height: 1.7em; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: .85em;
  background: hsl(var(--hue) 75% 60%); color: #140f24; }
.tv-intro-rules { counter-reset: rule; }
.tv-intro-go { margin-top: 1.6rem; font-size: clamp(1.2rem, 2.4vw, 1.9rem); font-weight: 900; animation: intro-up .45s 1.3s ease-out both, intro-pulse 1s 1.8s ease-in-out infinite; }
@keyframes intro-in { from { opacity: 0; } }
@keyframes intro-out { to { opacity: 0; transform: scale(1.04); } }
@keyframes intro-bounce { from { transform: scale(.2) rotate(-20deg); opacity: 0; } }
@keyframes intro-up { from { transform: translateY(24px); opacity: 0; } }
@keyframes intro-pulse { 50% { transform: scale(1.06); } }

.tv-wipe { position: fixed; inset: 0; z-index: 55; pointer-events: none; display: grid; place-items: center;
  background: linear-gradient(100deg, transparent 0%, hsl(var(--hue) 80% 55% / .55) 30%, hsl(calc(var(--hue) + 50) 80% 60% / .55) 70%, transparent 100%);
  background-size: 300% 100%; animation: wipe .75s ease-in-out forwards; }
.tv-wipe span { font-size: clamp(2.5rem, 7vw, 5rem); font-weight: 900; color: #fff; text-shadow: 0 6px 30px rgba(0,0,0,.5); animation: wipe-label 1.3s ease-out forwards; }
.tv-wipe:has(span) { animation-duration: 1.3s; }
@keyframes wipe { from { background-position: 100% 0; } to { background-position: 0% 0; } }
@keyframes wipe-label { 0% { transform: scale(.6); opacity: 0; } 25%, 70% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.1); opacity: 0; } }

.tv-row { position: relative; transition: background .3s; }
.tv-row.bump { animation: row-bump .9s ease-out; }
@keyframes row-bump { 0% { background: hsl(var(--hue, 270) 80% 55% / .55); transform: scale(1.04); } 100% { background: var(--sk-surface-2); transform: none; } }
.tv-plus { position: absolute; right: .4rem; top: -.2rem; font-weight: 900; color: #4ade80; text-shadow: 0 0 10px rgba(74,222,128,.7); animation: plus-up 1.4s ease-out forwards; pointer-events: none; }
@keyframes plus-up { 0% { transform: translateY(6px) scale(.7); opacity: 0; } 20% { opacity: 1; transform: translateY(-6px) scale(1.15); } 100% { transform: translateY(-26px); opacity: 0; } }
.tv-rank.top1, .tv-rank.top2, .tv-rank.top3 { font-size: 1.15rem; }
@media (prefers-reduced-motion: reduce) { .tv-intro *, .tv-wipe, .tv-row.bump, .tv-plus { animation: none !important; } }
.odd-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .6rem; }
.odd-usual { font-size: 1.4em; vertical-align: -0.15em; }
.odd-found { margin-left: auto; display: flex; gap: .35rem; }
.odd-chip { display: inline-flex; align-items: center; gap: .15rem; animation: quiz-pop .4s; }
.odd-grid { display: grid; gap: 4px; width: min(100%, 520px, calc(100dvh - 300px)); margin: 0 auto; padding: 8px; border-radius: 18px;
  background: radial-gradient(circle at 30% 20%, rgba(168,85,247,.18), transparent 60%), var(--sk-surface); border: 1px solid var(--sk-border-2); }
.odd-cell span { display: inline-block; }
.odd-cell { aspect-ratio: 1; border: 0; border-radius: 10px; background: rgba(255,255,255,.04); cursor: pointer; padding: 0; line-height: 1;
  font-size: calc(min(100vw, 520px, 100dvh - 300px) / var(--n) * .58); touch-action: manipulation; transition: opacity .3s, filter .3s; }
.odd-cell:active:not(:disabled) { background: rgba(255,255,255,.15); }
.odd-cell:disabled { cursor: default; }
.odd-cell.fade { opacity: .18; filter: grayscale(1); }
.odd-cell.hit { position: relative; z-index: 1; background: rgba(74,222,128,.25); box-shadow: 0 0 0 3px #4ade80, 0 0 30px #4ade80; animation: odd-hit .8s cubic-bezier(.3,1.6,.5,1); transform: scale(1.25) !important; }
@keyframes odd-hit { from { transform: scale(.6); } }
.tv-view .odd-grid { width: min(100%, calc(100dvh - 190px)); }
.tv-view .odd-cell { font-size: calc(min(60vw, 100dvh - 190px) / var(--n) * .55); }
.tv-view:has(.odd-grid) { zoom: 1 !important; }
.clash-stage { --clash-size: clamp(3.2rem, 17vw, 6rem); text-align: center; padding: 1.2rem 1rem 1rem; border-radius: 22px; background: #f8f5ff; color: #140f24;
  box-shadow: 0 20px 50px rgba(0,0,0,.4), inset 0 0 0 4px rgba(0,0,0,.05); }
.clash-stage .text-muted { color: #6b6385; }
.clash-stage.flip { background: #140f24; outline: 4px dashed #f0abfc; outline-offset: -10px; }
.clash-stage.flip .text-muted { color: #a59fbe; }
.clash-rule { font-weight: 900; letter-spacing: .12em; font-size: .9rem; color: #6b6385; }
.clash-stage.flip .clash-rule { color: #f0abfc; animation: intro-pulse .6s ease-in-out infinite; }
.clash-word { font-weight: 900; letter-spacing: .02em; line-height: 1.05; margin: .3rem 0; animation: clash-in .35s cubic-bezier(.3,1.6,.5,1); text-shadow: 0 4px 0 rgba(0,0,0,.12); }
@keyframes clash-in { from { transform: scale(.4) rotate(-6deg); opacity: 0; } }
.clash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.clash-btn { position: relative; display: flex; align-items: center; gap: .6rem; min-height: 70px; padding: .6rem .8rem; border-radius: 16px; border: 2px solid var(--sk-border-2);
  background: var(--sk-surface-2); color: var(--sk-text); font: inherit; font-weight: 900; letter-spacing: .06em; cursor: pointer; touch-action: manipulation; transition: opacity .2s, transform .1s; }
.clash-btn:active:not(:disabled) { transform: scale(.97); }
.clash-btn:disabled { cursor: default; }
.clash-swatch { width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--c); box-shadow: 0 0 14px var(--c); flex: none; }
.clash-btn.picked { border-color: #fff; }
.clash-btn.right { border-color: #4ade80; box-shadow: 0 0 0 3px #4ade80, 0 0 24px rgba(74,222,128,.5); animation: quiz-pop .5s; }
.clash-btn.wrong { opacity: .35; }
.clash-who { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.clash-who .sk-avatar { width: 1.4rem; height: 1.4rem; font-size: .55rem; }
.clash-foot { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; min-height: 2rem; }
.tv-view .clash-stage { --clash-size: clamp(4rem, 9vw, 8rem); }
/* The big screen never taps, so its disabled buttons shouldn't look greyed out. */
.tv-view button:disabled:not(.fade):not(.wrong):not(.dim) { opacity: 1; filter: none; }
/* Party Mix */
.mix-card { background: linear-gradient(135deg, rgba(236,72,153,.22), rgba(168,85,247,.18) 50%, rgba(34,211,238,.14)), var(--sk-surface); border-color: rgba(240,171,252,.35); }
.mix-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tv-mix { font-weight: 800; padding: .25rem .7rem; border-radius: 999px; background: rgba(236,72,153,.18); border: 1px solid rgba(240,171,252,.35); }
.tv-mix-board .tv-row { padding: .25rem .5rem; }
.eject-btn { width: 100%; height: 96px; font-size: 1.7rem; font-weight: 900; border-radius: 22px; touch-action: manipulation; letter-spacing: .04em;
  background: linear-gradient(180deg, #fb923c, #dc2626); border: 0; box-shadow: 0 8px 0 #7f1d1d, 0 14px 30px rgba(220,38,38,.4); }
.eject-btn:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 3px 0 #7f1d1d; }
.eject-btn:disabled { background: var(--sk-surface-2); box-shadow: none; color: var(--sk-text); opacity: 1; }
.tug-canvas { display: block; width: 100%; aspect-ratio: 2 / 1; border-radius: var(--sk-radius); touch-action: none; }
.tv-view .tug-canvas { width: min(100%, calc((100dvh - 160px) * 2)); margin: 0 auto; }
.tug-team { text-align: center; font-weight: 900; color: var(--c); margin-bottom: .5rem; font-size: 1.1rem; }
.tug-btn { width: 100%; height: min(42dvh, 260px); border: 0; border-radius: 28px; color: #fff; font: inherit; font-size: 2.6rem; font-weight: 900; letter-spacing: .06em;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--c) 70%, white), var(--c) 60%, var(--d)); box-shadow: 0 10px 0 var(--d), 0 20px 40px rgba(0,0,0,.4);
  touch-action: manipulation; user-select: none; -webkit-user-select: none; cursor: pointer; }
.tug-btn.hit { animation: tug-hit .12s ease-out; }
@keyframes tug-hit { 50% { transform: translateY(6px) scale(.98); box-shadow: 0 4px 0 var(--d); } }
.tug-dot { width: .8rem; height: .8rem; border-radius: 50%; flex: none; }
.pop-banner { text-align: center; font-weight: 800; margin-bottom: .6rem; animation: intro-pulse 1s ease-in-out infinite; }
.pop-grid { display: grid; gap: 8px; width: min(100%, 460px, calc(100dvh - 300px)); margin: 0 auto; padding: 10px; border-radius: 22px; position: relative;
  background: radial-gradient(circle at 50% 0%, rgba(236,72,153,.2), transparent 70%), var(--sk-surface); border: 1px solid var(--sk-border-2); transition: filter .2s; }
.pop-grid.frozen { filter: saturate(.2) brightness(1.2) hue-rotate(160deg); }
.pop-grid.frozen::after { content: '🧊 FROZEN'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; font-weight: 900; color: #e0f2fe; text-shadow: 0 0 20px #0ea5e9; }
.pop-cell { position: relative; aspect-ratio: 1; border-radius: 18px; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; user-select: none;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); overflow: visible; }
.pop-cell.on { background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.18), rgba(255,255,255,.04)); }
.pop-cell.on[data-k="gold"] { background: radial-gradient(circle, rgba(250,204,21,.45), rgba(250,204,21,.05)); box-shadow: 0 0 24px rgba(250,204,21,.6); }
.pop-cell.on[data-k="bomb"] { background: radial-gradient(circle, rgba(239,68,68,.35), rgba(239,68,68,.05)); }
.pop-cell.on[data-k="ice"] { background: radial-gradient(circle, rgba(125,211,252,.45), rgba(125,211,252,.05)); }
.pop-emoji { font-size: calc(min(100vw, 460px, 100dvh - 300px) / 4 * .5); line-height: 1; display: inline-block; }
.pop-cell.spawn .pop-emoji { animation: pop-in .25s cubic-bezier(.3,1.8,.5,1); }
.pop-cell.pressed { transform: scale(.94); }
@keyframes pop-in { from { transform: scale(0); } }
.pop-ring { position: absolute; inset: 6%; border-radius: 50%; pointer-events: none;
  background: conic-gradient(rgba(255,255,255,.55) calc(var(--life, 0) * 360deg), transparent 0); -webkit-mask: radial-gradient(circle, transparent 62%, #000 64%); mask: radial-gradient(circle, transparent 62%, #000 64%); }
.pop-tag { position: absolute; left: 50%; top: 10%; transform: translateX(-50%); white-space: nowrap; font-weight: 900; font-size: .8rem; color: var(--who, #fff); text-shadow: 0 2px 6px #000; opacity: 0; pointer-events: none; }
.pop-cell.burst .pop-tag, .pop-cell.boom .pop-tag { animation: plus-up 1s ease-out; }
.pop-cell.burst { animation: cell-burst .35s ease-out; }
.pop-cell.boom { animation: cell-boom .45s ease-out; }
@keyframes cell-burst { 0% { box-shadow: 0 0 0 0 var(--who); } 100% { box-shadow: 0 0 0 14px transparent; } }
@keyframes cell-boom { 0%, 100% { transform: none; } 25% { transform: translate(-4px, 2px); background: rgba(239,68,68,.6); } 50% { transform: translate(4px, -2px); } }
.tv-view .pop-grid { width: min(100%, calc(100dvh - 170px)); }
.tv-view .pop-emoji { font-size: calc((100dvh - 170px) / 4 * .5); }
.tv-view .pop-tag { font-size: 1.1rem; }
.tv-view:has(.pop-grid) { zoom: 1 !important; }
.swarm-canvas { width: min(100%, max(220px, calc(100dvh - 470px))); }
.swarm-pad { margin-top: .6rem; }
.swarm-display { display: flex; align-items: center; gap: .6rem; justify-content: center; margin-bottom: .5rem; }
.swarm-display b { font-size: 1.8rem; min-width: 3ch; text-align: center; font-variant-numeric: tabular-nums; }
.swarm-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 320px; margin: 0 auto; }
.swarm-key { height: 48px; font-size: 1.25rem; font-weight: 800; }
.swarm-foot { text-align: center; margin-top: .4rem; }

/* ---- phone layout ---------------------------------------------------------------- */
/* Lobby game list: one compact row per game, details in a sheet */
.filter-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 .75rem; padding-bottom: 2px; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { flex: none; font: inherit; font-size: .85rem; font-weight: 600; padding: .45rem .85rem; min-height: 36px; border-radius: 999px; cursor: pointer;
  background: var(--sk-surface); color: var(--sk-text-secondary, var(--sk-text)); border: 1px solid var(--sk-border); }
.filter-chip.on { background: var(--sk-primary); border-color: var(--sk-primary); color: var(--sk-on-primary, #140f24); }
.game-list { display: grid; gap: 8px; }
@media (min-width: 720px) { .game-list { grid-template-columns: 1fr 1fr; } }
.game-row { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 8px; border-radius: var(--sk-radius);
  background: var(--sk-surface); border: 1px solid var(--sk-border); overflow: hidden; }
.game-row::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(180deg, hsl(var(--hue, 270) 90% 65%), hsl(calc(var(--hue, 270) + 60) 90% 65%)); }
.game-row-main { display: flex; align-items: center; gap: .7rem; flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.game-row .game-emoji { width: 2.6rem; height: 2.6rem; font-size: 1.4rem; border-radius: 12px; }
.game-row-title { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-row-sub { display: block; font-size: .75rem; color: var(--sk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-row-play { flex: none; min-width: 74px; min-height: 40px; }
.mix-btns .sk-btn { min-height: 44px; padding-inline: .4rem; }
.mix-btns b { font-size: 1.1rem; }

/* Action games: size the arena so controls fit on screen without scrolling.
   --chrome is everything that isn't the arena (top bar, header, bars, controls). */
.room { --chrome: 340px; }
.room.has-dock { --chrome: 400px; }
.arena { width: min(100%, max(200px, calc(100dvh - var(--chrome)))); }
.trail-canvas { width: min(100%, max(190px, calc(100dvh - var(--chrome) - 90px))); }
.joy { width: clamp(92px, 17dvh, 116px); height: clamp(92px, 17dvh, 116px); }
.joy-knob { width: 46%; height: 46%; margin: 0; left: 27%; top: 27%; }
.dash-btn { width: clamp(92px, 17dvh, 116px); height: clamp(92px, 17dvh, 116px); }
.controls { padding-bottom: 1.1rem; }

@media (max-width: 420px) {
  .topbar { gap: .3rem; }
  .room-code { padding: .3rem .7rem; gap: .35rem; }
  .room-code > .text-xs { display: none; }
  .room-code .code { letter-spacing: .18em; }
  .paint-bars { font-size: .8rem; }
}
@media (max-width: 360px) {
  .dock-label { display: none; }
  .game-row-sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
/* per-game fits on phones (these come after the generic .arena rule above) */
.paint-wrap:has(.paint-bars) .arena { width: min(100%, max(190px, calc(100dvh - var(--chrome) - 40px))); }
.tv-view .paint-wrap .arena { width: 100% !important; }
.swarm-canvas { width: min(100%, max(220px, calc(100dvh - var(--chrome) + 120px))); }
.game-view:has(.swarm-pad) .swarm-canvas { width: min(100%, max(150px, calc(100dvh - var(--chrome) - 110px))); }
.pop-grid { width: min(100%, 460px, max(250px, calc(100dvh - var(--chrome) + 30px))); }
.game-view:has(.eject-btn) .arena { width: min(100%, max(200px, calc(100dvh - var(--chrome) + 10px))); }
.join-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.join-actions .sk-btn { justify-content: center; padding-inline: .3rem; white-space: nowrap; }
.has-dock .tug-btn { height: min(34dvh, 240px); }

/* ---- logo --------------------------------------------------------------------------- */
.sa-mark { display: inline-block; width: 1em; height: 1em; line-height: 0; flex: none; }
.sa-mark svg { width: 100%; height: 100%; overflow: visible; }
.sa-wordmark { display: block; height: 1em; width: auto; user-select: none; -webkit-user-drag: none; }
.sa-lockup { display: inline-flex; align-items: center; gap: .28em; }
.sa-lockup.stacked { flex-direction: column; gap: .14em; }
.sa-lockup.stacked .sa-mark { width: 1.45em; height: 1.45em; filter: drop-shadow(0 .12em .3em rgba(168,85,247,.45)); }
.sa-lockup.stacked .sa-wordmark { height: .92em; }
.sa-home-logo { font-size: 5.2rem; line-height: 1; margin: 0; display: flex; justify-content: center; }
.sa-wait-logo { font-size: min(13vh, 9rem); line-height: 1; margin: 0 0 1rem; display: flex; justify-content: center; }
.tv-brand { display: inline-flex; align-items: center; gap: .45rem; font-size: 1.9rem; }
.tv-brand .sa-wordmark { height: .8em; }

/* living logo: the waves send out a signal, the sparkle twinkles */
.sa-live .sa-wave { transform-box: fill-box; transform-origin: 50% 100%; animation: saWave 2.4s ease-in-out infinite; }
.sa-live .sa-wave2 { animation-delay: .2s; }
.sa-live .sa-wave3 { animation-delay: .4s; }
.sa-live .sa-spark { transform-box: fill-box; transform-origin: center; animation: saSpark 3.2s ease-in-out infinite; }
.sa-live .sa-btn1, .sa-live .sa-btn2 { animation: saBlink 2.4s steps(1) infinite; }
.sa-live .sa-btn2 { animation-delay: 1.2s; }
@keyframes saWave { 0%, 100% { opacity: .35; transform: scale(.92); } 30% { opacity: 1; transform: scale(1); } 60% { opacity: .6; } }
@keyframes saSpark { 0%, 100% { transform: scale(.7) rotate(0); opacity: .7; } 50% { transform: scale(1.15) rotate(45deg); opacity: 1; } }
@keyframes saBlink { 0%, 85% { filter: none; } 90% { filter: brightness(1.6); } }

/* intro card when a lobby opens */
.sa-intro { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; overflow: hidden; cursor: pointer;
  background: radial-gradient(60% 50% at 50% 45%, rgba(168,85,247,.35), transparent 70%), rgba(20,15,36,.97);
  animation: saFadeIn .25s ease-out; }
.sa-intro.out { animation: saOut .45s ease-in forwards; }
.sa-intro-stack { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 4.2rem; padding: 0 16px; }
.sa-intro.big .sa-intro-stack { font-size: min(15vh, 10rem); }
.sa-intro-icon { width: 1.9em; height: 1.9em; animation: saPop .7s cubic-bezier(.2, 1.5, .4, 1) both; filter: drop-shadow(0 .15em .5em rgba(168,85,247,.6)); }
.sa-intro-icon .sa-pad { transform-box: fill-box; transform-origin: center; animation: saPad .6s .15s cubic-bezier(.3, 1.6, .5, 1) both; }
.sa-intro-icon .sa-wave { animation: saWaveIn .5s ease-out both, saWave 2.4s 1.2s ease-in-out infinite; }
.sa-intro-icon .sa-wave1 { animation-delay: .45s, 1.2s; }
.sa-intro-icon .sa-wave2 { animation-delay: .6s, 1.4s; }
.sa-intro-icon .sa-wave3 { animation-delay: .75s, 1.6s; }
.sa-intro-word { position: relative; margin-top: .3em; animation: saWipe .7s .55s cubic-bezier(.6, 0, .2, 1) both; }
.sa-intro-word .sa-wordmark { height: 1.15em; }
.sa-intro-word .sa-wordmark { animation: saGlow 1.1s 1.2s ease-in-out both; }
.sa-intro-tag { margin-top: .9em; font-size: .26em; font-weight: 700; color: var(--sk-text-secondary, #cbd5e1); letter-spacing: .02em; animation: saRise .5s 1.1s ease-out both; }
.sa-intro-rings { position: absolute; left: 50%; top: 45%; width: 0; height: 0; }
.sa-intro-rings i { position: absolute; left: -40vmax; top: -40vmax; width: 80vmax; height: 80vmax; border-radius: 50%;
  border: 2px solid rgba(34,211,238,.35); transform: scale(0); opacity: 0; animation: saRing 2.4s ease-out infinite; }
.sa-intro-rings i:nth-child(2) { animation-delay: .8s; border-color: rgba(236,72,153,.3); }
.sa-intro-rings i:nth-child(3) { animation-delay: 1.6s; border-color: rgba(168,85,247,.35); }
@keyframes saFadeIn { from { opacity: 0; } }
@keyframes saOut { to { opacity: 0; transform: scale(1.08); filter: blur(6px); } }
@keyframes saPop { from { transform: scale(.2) rotate(-25deg); opacity: 0; } }
@keyframes saPad { from { transform: scale(.4); } }
@keyframes saWaveIn { from { opacity: 0; transform: scale(.5); } }
@keyframes saWipe { from { clip-path: inset(-50% 100% -50% -10%); } to { clip-path: inset(-50% -10% -50% -10%); } }
@keyframes saGlow { 50% { filter: brightness(1.5) drop-shadow(0 0 .25em rgba(236,72,153,.8)); } }
@keyframes saRise { from { opacity: 0; transform: translateY(.6em); } }
@keyframes saRing { 0% { transform: scale(.05); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }

/* lobby pieces slide in after the intro */
.sa-enter > * , .tv-lobby.sa-enter > * { animation: saRise .55s ease-out both; }
.sa-enter > *:nth-child(2) { animation-delay: .08s; } .sa-enter > *:nth-child(3) { animation-delay: .16s; }
.sa-enter > *:nth-child(4) { animation-delay: .24s; } .sa-enter > *:nth-child(5) { animation-delay: .32s; }
.tv-strip.sa-enter .tv-chip { animation: saRise .4s ease-out both; }
.tv-strip.sa-enter .tv-chip:nth-child(3n+1) { animation-delay: .1s; } .tv-strip.sa-enter .tv-chip:nth-child(3n+2) { animation-delay: .2s; }
.tv-strip.sa-enter .tv-chip:nth-child(3n) { animation-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  .sa-live *, .sa-intro, .sa-intro *, .sa-enter > *, .tv-strip.sa-enter .tv-chip { animation: none !important; }
}
