/* Huddle - dark, gold, cinematic. Phone-first controller + TV-scaled display. */
:root {
  --bg: #07070b;
  --bg-2: #0d0d14;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f3efe6;
  --muted: #9b968b;
  --dim: #6a665e;
  --gold: #c9a96e;
  --gold-2: #e6cf9f;
  --gold-3: #8a7041;
  --good: #7fd36b;
  --bad: #f27e63;
  --ga: #5ad1c5; /* active game accent */
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; touch-action: manipulation; } /* manipulation: no double-tap zoom (iOS ignores user-scalable=no), pinch still works; rules that set their own touch-action win */
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { font-family: var(--sans); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button, input { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.icon { display: inline-flex; width: 1.15em; height: 1.15em; flex: none; }
.icon svg { width: 100%; height: 100%; }
.muted { color: var(--muted); }
.kicker { font-size: .72em; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 700; }

/* ---------- backdrop ---------- */
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; }
.glow-a { width: 70vmax; height: 70vmax; left: -25vmax; top: -30vmax; background: radial-gradient(circle, rgba(201,169,110,.35), transparent 65%); animation: drift 28s ease-in-out infinite alternate; }
.glow-b { width: 60vmax; height: 60vmax; right: -25vmax; bottom: -30vmax; background: radial-gradient(circle, color-mix(in srgb, var(--ga) 30%, transparent), transparent 65%); animation: drift 34s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.1); } }
.waves { position: absolute; left: -5%; width: 110%; top: 55%; height: 40vh; opacity: .16; }
.waves path { fill: none; stroke: var(--gold); stroke-width: 1.2; stroke-dasharray: 6 10; animation: flow 40s linear infinite; }
.waves path:nth-child(2) { stroke: var(--ga); opacity: .7; animation-duration: 55s; animation-direction: reverse; }
.waves path:nth-child(3) { opacity: .5; animation-duration: 70s; }
@keyframes flow { to { stroke-dashoffset: -1000; } }
.grain { position: absolute; inset: -50%; opacity: .05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@media (prefers-reduced-motion: reduce) { .glow, .waves path { animation: none; } }

#app { position: relative; z-index: 1; min-height: 100svh; }
.screen { min-height: 100svh; }
body.offline::after { content: 'Reconnecting...'; position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); left: 50%; transform: translateX(-50%); z-index: 99; background: #2a1712; color: var(--bad); border: 1px solid rgba(242,126,99,.4); padding: 6px 14px; border-radius: 99px; font-size: 13px; font-weight: 700; }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: .55em; color: var(--text); }
.brand-mark { width: 2em; height: 2em; color: var(--gold); }
.brand-name { font-family: var(--serif); font-size: 1.5em; font-weight: 600; letter-spacing: -.01em; }
.brand-name em { font-style: italic; font-weight: 400; color: var(--gold-2); margin-left: .15em; }
.brand.small { font-size: .8em; }

/* ---------- buttons & fields ---------- */
.btn { --b: var(--panel-2); display: inline-flex; align-items: center; justify-content: center; gap: .55em; padding: .9em 1.3em; border-radius: 14px; border: 1px solid var(--line-2); background: var(--b); font-weight: 700; cursor: pointer; transition: transform .15s var(--ease), background .2s, border-color .2s, opacity .2s; user-select: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, #a98a52); color: #1a140a; border-color: rgba(255,240,200,.35); box-shadow: 0 10px 30px -10px rgba(201,169,110,.6), inset 0 1px 0 rgba(255,255,255,.5); }
.btn.primary:not(:disabled):hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--panel); border-color: var(--gold-3); }
.btn.block { width: 100%; }
.btn.xl { font-size: 1.25em; padding: .95em 2em; border-radius: 18px; }
.icon-btn { width: 2.6em; height: 2.6em; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; color: var(--muted); transition: color .2s, border-color .2s, background .2s; }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn.armed { color: var(--bad); border-color: var(--bad); background: rgba(242,126,99,.1); }
.text-field { width: 100%; padding: .95em 1.1em; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(0,0,0,.35); font-size: 1.1em; font-weight: 600; outline: none; transition: border-color .2s, box-shadow .2s; }
.text-field:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201,169,110,.15); }
.text-field.mono { letter-spacing: .3em; text-transform: uppercase; text-align: center; font-weight: 800; }
.field-label { display: block; font-size: .72em; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 0 0 .6em .2em; }
.row { display: flex; gap: .6em; }
.row > * { flex: 1; }
.badge { display: inline-flex; align-items: center; gap: .35em; padding: .3em .75em; border-radius: 99px; font-size: .78em; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.badge.gold { background: rgba(201,169,110,.14); color: var(--gold-2); border: 1px solid rgba(201,169,110,.35); }

.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); transform: translateX(-50%); z-index: 100; background: #16151c; border: 1px solid var(--line-2); padding: 12px 18px; border-radius: 14px; font-weight: 700; box-shadow: 0 20px 50px rgba(0,0,0,.5); max-width: calc(100vw - 32px); animation: toastIn .35s var(--ease); }
.toast.bad { border-color: rgba(242,126,99,.5); color: #ffc2b3; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px); } }

/* ---------- avatars & chips ---------- */
.avatar { --pc: var(--gold); --s: 2.4em; width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; flex: none; background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--pc) 75%, white), var(--pc) 55%, color-mix(in srgb, var(--pc) 55%, black)); color: #121016; font-weight: 800; box-shadow: 0 0 0 2px rgba(0,0,0,.4), 0 0 0 3.5px color-mix(in srgb, var(--pc) 45%, transparent), 0 8px 20px -8px var(--pc); }
.avatar span { font-size: calc(var(--s) * .38); letter-spacing: .02em; line-height: 1; }
.avatar.sm { --s: 1.9em; }
.avatar.lg { --s: 4.2em; }
.avatar.xl { --s: 6em; }
.avatar.xxl { --s: 9em; }
.avatar.ghost { background: transparent; border: 2px dashed var(--line-2); box-shadow: none; color: var(--dim); }
.avatar.ghost .icon { width: 40%; height: 40%; }
.chips { display: flex; flex-wrap: wrap; gap: .5em; }
.chip { display: inline-flex; align-items: center; gap: .45em; padding: .4em .8em .4em .5em; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 700; font-size: .9em; }
.chip i { width: .7em; height: .7em; border-radius: 50%; background: var(--pc); box-shadow: 0 0 10px var(--pc); }
.chip.away { opacity: .45; }
.room-chip { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.05; padding: .35em .8em; border-radius: 12px; border: 1px solid rgba(201,169,110,.35); background: rgba(201,169,110,.08); }
.room-chip small { font-size: .6em; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.room-chip b { font-size: 1.1em; letter-spacing: .18em; color: var(--gold-2); font-weight: 800; }
.dots { display: inline-flex; gap: .25em; align-items: center; }
.dots i { width: .4em; height: .4em; border-radius: 50%; background: currentColor; animation: dot 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* ---------- landing ---------- */
.landing { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: calc(env(safe-area-inset-top, 0px) + 20px) 18px calc(env(safe-area-inset-bottom, 0px) + 24px); }
.landing-inner { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 22px; }
.landing-head { display: flex; justify-content: center; padding-top: 8px; }
.hero { text-align: center; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.3rem, 10vw, 3.3rem); line-height: 1.02; margin: 6px 0 12px; letter-spacing: -.02em; }
.hero h1 em { color: var(--gold-2); font-style: italic; }
.lede { color: var(--muted); margin: 0 auto; max-width: 34ch; }
.join-card { padding: 22px; border-radius: 24px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border: 1px solid var(--line); box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.05); backdrop-filter: blur(10px); }
.code-wrap { position: relative; margin-bottom: 18px; }
.code-field { position: absolute; inset: 0; opacity: 0; width: 100%; font-size: 16px; caret-color: transparent; }
.code-input { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.code-input span { aspect-ratio: 1 / 1.08; display: grid; place-items: center; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(0,0,0,.4); font-family: var(--serif); font-size: 2.1rem; font-weight: 600; color: var(--gold-2); transition: border-color .2s, transform .2s var(--ease), background .2s; position: relative; }
.code-input span.filled { border-color: rgba(201,169,110,.55); background: rgba(201,169,110,.08); transform: translateY(-2px); }
.code-input span.caret::after { content: ''; width: 2px; height: 40%; background: var(--gold); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.code-input.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.join-card .text-field { margin-bottom: 18px; }
.display-btn { justify-content: flex-start; padding: 14px 18px; border-radius: 18px; text-align: left; background: var(--panel); }
.display-btn > .icon:first-child { width: 2.2em; height: 2.2em; padding: .45em; border-radius: 12px; background: rgba(201,169,110,.12); color: var(--gold); }
.display-btn > span:not(.icon) { display: flex; flex-direction: column; flex: 1; line-height: 1.2; }
.display-btn small { color: var(--muted); font-weight: 600; }
.display-btn > .icon:last-child { color: var(--muted); }
.landing-foot { text-align: center; color: var(--dim); font-size: .85em; }
.device-settings { display: flex; flex-direction: column; gap: 8px; }
.ds-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line-2); }
.ds-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ds-txt small { color: var(--muted); font-size: .8em; line-height: 1.35; }
.ds-row .rm-seg { flex: none; }
.sheet { overscroll-behavior: contain; position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); display: grid; align-items: end; justify-items: center; }
.sheet-card { max-height: calc(100svh - env(safe-area-inset-top, 0px) - 16px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; width: 100%; max-width: 480px; background: #111018; border: 1px solid var(--line-2); border-radius: 26px 26px 0 0; padding: 22px 20px calc(env(safe-area-inset-bottom, 0px) + 24px); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 600px) { .sheet { align-items: center; } .sheet-card { border-radius: 26px; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.4em; }
.sheet-card p { margin: 0; }
.or { text-align: center; color: var(--dim); font-size: .85em; position: relative; }
.or::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.or span { position: relative; background: #111018; padding: 0 10px; }
.sheet .row .text-field { flex: 1.6; }

/* ---------- display base (scales with the screen) ---------- */
.display { font-size: clamp(12px, .92vw, 30px); padding: 2.2em 2.6em 2em; min-height: 100svh; display: flex; flex-direction: column; }
.d-top, .g-top { display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.d-top-tools, .g-tools { display: flex; gap: .6em; align-items: center; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 1.6em 0 .8em; }
.section-head h2, .section-head h3 { margin: 0; font-size: .78em; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.section-head .count { color: var(--dim); font-weight: 700; font-size: .85em; }

/* lobby grid */
.d-lobby { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); grid-template-rows: auto 1fr; column-gap: 3.5em; }
.d-lobby .d-top { grid-column: 1 / -1; }
.join-panel { align-self: center; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1.2em; padding-top: 1em; }
.join-kicker { display: inline-flex; align-items: center; gap: .6em; color: var(--muted); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .85em; }
.join-kicker .icon { color: var(--gold); }
.join-url { font-family: var(--serif); font-size: 2.3em; line-height: 1; letter-spacing: -.01em; }
.code-tiles { display: flex; gap: .3em; }
.code-tiles span { display: grid; place-items: center; width: 1.25em; height: 1.4em; border-radius: .18em; background: linear-gradient(180deg, rgba(201,169,110,.18), rgba(201,169,110,.05)); border: 1px solid rgba(201,169,110,.45); font-family: var(--serif); font-weight: 600; color: var(--gold-2); text-shadow: 0 0 30px rgba(201,169,110,.6); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 20px 40px -20px rgba(201,169,110,.5); }
.code-tiles.xl { font-size: 4.6em; }
.qr-wrap { display: flex; align-items: center; gap: 1.2em; color: var(--muted); font-size: .95em; }
.qr-wrap p { margin: 0; max-width: 10em; }
.qr-card { width: 8.5em; height: 8.5em; padding: .8em; border-radius: 1em; background: var(--text); box-shadow: 0 20px 50px -20px rgba(201,169,110,.5); }
.qr { width: 100%; height: 100%; }
.lobby-main { display: flex; flex-direction: column; min-width: 0; padding-bottom: 1em; }
.lobby-players { display: flex; flex-wrap: wrap; gap: 1.2em 1.4em; min-height: 6.5em; }
.lobby-player { display: flex; flex-direction: column; align-items: center; gap: .45em; width: 5em; position: relative; }
.lobby-player .pname { font-weight: 700; font-size: .95em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby-player .vip { display: none; position: absolute; top: -.6em; left: 50%; transform: translateX(-50%); align-items: center; gap: .2em; font-size: .6em; font-weight: 800; letter-spacing: .1em; color: #1a140a; background: var(--gold); padding: .2em .6em; border-radius: 99px; }
.lobby-player.is-vip .vip { display: inline-flex; }
.lobby-player.away { opacity: .4; }
.lobby-player .kick { position: absolute; top: 0; right: .1em; width: 1.6em; height: 1.6em; border-radius: 50%; border: 1px solid var(--line-2); background: #18161e; color: var(--muted); display: grid; place-items: center; opacity: 0; cursor: pointer; transition: opacity .2s; padding: .3em; }
.lobby-player:hover .kick { opacity: 1; }
.empty-slot .pname { color: var(--dim); font-weight: 600; }
.lobby-players .avatar.lg { --s: 3.8em; }
.empty-slot .avatar { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; } }
.game-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5em, 1fr)); gap: .9em; overflow: visible; }
.game-shelf .cover { aspect-ratio: 16 / 8; }
.game-tile { text-align: left; padding: 0; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--panel); cursor: pointer; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; display: flex; flex-direction: column; }
.game-tile:hover { transform: translateY(-3px); }
.game-tile.on { border-color: color-mix(in srgb, var(--ga) 70%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ga) 50%, transparent), 0 24px 60px -24px var(--ga); }
.game-tile.soon { cursor: default; opacity: .5; border-style: dashed; }
.game-tile.soon:hover { transform: none; }
.game-tile-text { padding: .8em 1em 1em; display: flex; flex-direction: column; }
.game-tile-text b { font-family: var(--serif); font-size: 1.25em; font-weight: 600; }
.game-tile-text span { color: var(--muted); font-size: .9em; }
.cover { aspect-ratio: 16 / 7; display: grid; place-items: center; background: radial-gradient(120% 120% at 20% 0%, color-mix(in srgb, var(--ga) 28%, transparent), transparent 60%), #0c0c12; color: var(--ga); font-family: var(--serif); font-size: 3em; position: relative; overflow: hidden; }
.cover svg { width: 100%; height: 100%; }
.cover-soon { color: var(--dim); }
.cover-soon .icon { width: 2rem; height: 2rem; }
.cover-rewind rect { fill: rgba(255,255,255,.05); stroke: currentColor; stroke-width: 1.4; }
.cover-rewind line { stroke: currentColor; stroke-width: 1.4; opacity: .7; }
.cover-rewind circle { fill: currentColor; }
.cover-rewind text { fill: var(--text); font-family: var(--serif); font-size: 13px; text-anchor: middle; font-weight: 600; }
.cover-rewind text.q { fill: currentColor; font-size: 26px; }
.cover-rewind .hot rect { fill: color-mix(in srgb, var(--ga) 18%, transparent); stroke-width: 2; }
.cover-rewind .rw-card { animation: bob 3.2s var(--d) ease-in-out infinite; }
.cover-rewind .hot { animation: hover 2.4s ease-in-out infinite; }
.cover-bluff rect { fill: rgba(255,255,255,.05); stroke: currentColor; stroke-width: 1.4; }
.cover-bluff .ln { stroke: var(--text); stroke-width: 5; stroke-linecap: round; opacity: .35; }
.cover-bluff .blank { stroke: currentColor; stroke-width: 3; stroke-dasharray: 6 5; animation: flow 4s linear infinite; }
.cover-bluff .bl-tile { animation: bob 3.2s var(--d) ease-in-out infinite; }
.cover-bluff .truth rect { fill: color-mix(in srgb, var(--gold) 22%, transparent); stroke: var(--gold); stroke-width: 2; animation: truthGlow 3s ease-in-out infinite; }
@keyframes truthGlow { 0%, 100% { filter: none; } 50% { filter: drop-shadow(0 0 8px rgba(201,169,110,.8)); } }
.cover-pinit .pi-globe { fill: rgba(255,255,255,.03); stroke: currentColor; stroke-width: 1.4; opacity: .7; }
.cover-pinit .pi-lat, .cover-pinit .pi-lon { fill: none; stroke: currentColor; stroke-width: 1; opacity: .3; }
.cover-pinit .pi-target circle { fill: var(--gold); }
.cover-pinit .pi-target .ring { fill: none; stroke: var(--gold); stroke-width: 2; transform-origin: 196px 88px; animation: coverPulse 2s ease-out infinite; }
@keyframes coverPulse { from { transform: scale(1); opacity: .9; } to { transform: scale(3.4); opacity: 0; } }
.cover-pinit .pi-dpin path { stroke: var(--text); stroke-width: 2; opacity: .7; }
.cover-pinit .pi-dpin circle { fill: var(--text); opacity: .85; }
.cover-pinit .pi-dpin.hot circle { fill: currentColor; opacity: 1; }
.cover-pinit .pi-dpin { animation: bob 3s var(--d) ease-in-out infinite; }
.cover-sketch .sk-sheet { fill: rgba(251,250,246,.9); }
.cover-sketch .sk-doodle { fill: none; stroke: #2a2833; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 260; stroke-dashoffset: 260; animation: doodle 4s ease-in-out infinite; }
@keyframes doodle { 0% { stroke-dashoffset: 260; } 55%, 100% { stroke-dashoffset: 0; } }
.cover-sketch .sk-pencil path { fill: currentColor; }
.cover-sketch .sk-pencil .tip { fill: var(--gold-2); }
.cover-sketch .sk-pencil { animation: bob 2s ease-in-out infinite; }
.cover-sketch .sk-q text { fill: currentColor; font-family: var(--serif); font-size: 34px; opacity: .7; }
.cover-rewind .rw-arrow { stroke: currentColor; stroke-width: 1.6; stroke-dasharray: 3 4; animation: flow 6s linear infinite; }
@keyframes bob { 50% { transform: translateY(-2px); } }
@keyframes hover { 50% { transform: translateY(-6px); } }
.game-detail { margin-top: 1.2em; padding: 1.3em 1.5em; border-radius: var(--r); background: linear-gradient(135deg, color-mix(in srgb, var(--ga) 9%, transparent), transparent 60%), var(--panel); border: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 2em; }
.detail-text h3 { font-family: var(--serif); font-weight: 500; font-size: 2.2em; margin: 0 0 .25em; }
.detail-text p { color: var(--muted); margin: 0 0 1em; }
.how summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: .5em; font-weight: 700; color: var(--gold-2); font-size: .95em; }
.how summary::-webkit-details-marker { display: none; }
.rules { margin: .8em 0 0; padding-left: 1.3em; color: var(--muted); display: grid; gap: .4em; font-size: .95em; }
.rules li::marker { color: var(--gold); font-weight: 800; }
.settings { display: grid; gap: .75em; }
.setting { display: grid; grid-template-columns: 8.5em 1fr; gap: 1em; align-items: center; }
.setting.multi { align-items: start; }
.setting-label { font-weight: 700; font-size: .9em; display: flex; flex-direction: column; }
.setting-label small { color: var(--dim); font-weight: 600; font-size: .85em; }
.segs { display: flex; flex-wrap: wrap; gap: .4em; }
.seg { display: inline-flex; align-items: center; gap: .4em; padding: .5em .9em; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; font-weight: 700; font-size: .85em; cursor: pointer; color: var(--muted); transition: all .2s var(--ease); }
.seg .icon { width: 1em; height: 1em; }
.seg.on { color: #12100c; background: var(--ga); border-color: var(--ga); box-shadow: 0 6px 18px -8px var(--ga); }
.seg:disabled { cursor: default; }
.last-results { margin-top: 1em; display: inline-flex; align-items: center; gap: .6em; color: var(--muted); }
.last-results .icon { color: var(--gold); }
.last-results b { color: var(--text); }
.detail-text { display: flex; flex-direction: column; }
.detail-text .start-btn { margin-top: auto; align-self: flex-start; }
.detail-text .how { margin-bottom: 1.4em; }

/* portrait display (iPad / phone used as the board) */
@media (max-aspect-ratio: 1/1) {
  .display { font-size: clamp(13px, 2.2vw, 26px); padding: calc(env(safe-area-inset-top, 0px) + 1.2em) 1.2em 1.4em; }
  .d-lobby { grid-template-columns: 1fr; }
  .join-panel { align-items: center; text-align: center; }
  .code-tiles.xl { font-size: 4.5em; }
  .game-detail { grid-template-columns: 1fr; }
  .detail-text .start-btn { align-self: stretch; }
}

/* ---------- phone base ---------- */
.phone { max-width: 560px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px calc(env(safe-area-inset-bottom, 0px) + 110px); }
.p-head, .p-top { display: flex; align-items: center; gap: 10px; }
.p-head .brand { flex: 1; }
.p-hero { text-align: center; padding: 26px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.p-hero h2 { font-family: var(--serif); font-weight: 500; font-size: 2.2em; margin: 6px 0 0; }
.p-hero p { margin: 0; max-width: 30ch; }
.hero-avatar { position: relative; }
.hero-avatar .pulse { position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--pc); opacity: 0; animation: ring 2.4s ease-out infinite; }
@keyframes ring { 0% { transform: scale(.9); opacity: .7; } 100% { transform: scale(1.4); opacity: 0; } }
.p-games { display: grid; gap: 10px; }
.p-game { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 14px; padding: 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); text-align: left; cursor: pointer; }
.p-game.on { border-color: color-mix(in srgb, var(--ga) 60%, transparent); background: color-mix(in srgb, var(--ga) 7%, transparent); }
.p-game .cover { border-radius: 10px; font-size: 1.6em; }
.p-game b { display: block; font-family: var(--serif); font-size: 1.3em; font-weight: 600; }
.p-game span { color: var(--muted); font-size: .9em; }
.phone .how { margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.phone .how[open] summary { margin-bottom: 4px; }
.phone .settings { margin-top: 12px; }
.phone .setting { grid-template-columns: 1fr; gap: 6px; }
.waiting { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); margin-top: 22px; font-weight: 600; }
.sticky-cta, .p-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 14px 16px calc(env(safe-area-inset-bottom, 0px) + 14px); background: linear-gradient(180deg, transparent, rgba(7,7,11,.92) 35%); }
.sticky-cta > *, .p-foot > * { max-width: 528px; margin: 0 auto; }
.p-foot:empty { display: none; }
.sticky-cta .btn, .p-foot .btn { padding: 1.1em; font-size: 1.05em; }
.sticky-cta .btn.primary, .p-foot .btn.primary { background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, #a98a52); }

/* =================== REWIND =================== */
.rewind { --ga: #5ad1c5; }
.g-top { margin-bottom: 1.4em; }
.g-title { display: flex; align-items: baseline; gap: 1em; flex-wrap: wrap; }
.g-name { font-family: var(--serif); font-style: italic; font-size: 2em; color: var(--ga); }
.g-meta { display: inline-flex; align-items: center; gap: .7em; color: var(--muted); font-weight: 700; font-size: .9em; letter-spacing: .06em; text-transform: uppercase; }
.g-meta i { width: .3em; height: .3em; border-radius: 50%; background: var(--dim); }
.stage { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.dock { position: fixed; right: 2.2em; bottom: 1.8em; display: flex; gap: .6em; z-index: 10; }
.dock .btn { font-size: .95em; backdrop-filter: blur(10px); background: rgba(20,19,26,.7); }
.dock .btn.primary { background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, #a98a52); }

/* event card */
.ev-card { position: relative; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #17161f, #0f0e15); border: 1px solid var(--line-2); box-shadow: 0 40px 90px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.02), inset 0 1px 0 rgba(255,255,255,.06); }
.ev-img { position: relative; aspect-ratio: 16 / 9; background: #0b0b10; display: grid; place-items: center; overflow: hidden; color: var(--ga); }
.ev-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.ev-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, #15141c); }
.ev-img > .icon { width: 30%; height: 50%; opacity: .5; }
.ev-body { padding: 1em 1.3em 1.3em; display: flex; flex-direction: column; gap: .35em; }
.ev-kicker { display: inline-flex; align-items: center; gap: .45em; color: var(--ga); font-weight: 800; font-size: .72em; letter-spacing: .18em; text-transform: uppercase; }
.ev-title { font-family: var(--serif); font-weight: 600; font-size: 1.5em; line-height: 1.08; margin: 0; letter-spacing: -.01em; }
.ev-desc { margin: 0; color: var(--muted); }
.ev-blurb { margin: .3em 0 0; color: #c9c3b6; font-size: .92em; line-height: 1.5; }
.ev-year { position: absolute; top: .8em; right: .8em; font-family: var(--serif); font-weight: 700; font-size: 1.3em; padding: .15em .6em; border-radius: 99px; background: rgba(10,10,14,.75); border: 1px solid rgba(201,169,110,.5); color: var(--gold-2); backdrop-filter: blur(6px); }
.ev-year.hidden-year { color: var(--ga); border-color: color-mix(in srgb, var(--ga) 50%, transparent); }
.ev-card.sm { font-size: .7em; border-radius: 16px; }
.ev-card.sm .ev-desc { display: none; }
.ev-card.xl { font-size: 1.35em; }
.ev-card.xl .ev-title { font-size: 2.1em; }
.ev-card.xl .ev-year { display: none; }
.ev-card.lg .ev-year { display: none; }

/* intro */
.intro { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.2em; text-align: center; }
.intro-title h1 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 7em; margin: .05em 0 0; line-height: 1; color: var(--ga); text-shadow: 0 0 80px color-mix(in srgb, var(--ga) 40%, transparent); }
.intro-title p { color: var(--muted); font-size: 1.3em; margin: .4em 0 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2em; max-width: 60em; width: 100%; }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: .7em; padding: 1.4em; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); font-weight: 600; }
.step > .icon { width: 2.2em; height: 2.2em; color: var(--ga); }
.step b { position: absolute; top: .6em; left: .9em; font-family: var(--serif); color: var(--dim); }
.starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2em; }
.starter { width: 12em; display: flex; flex-direction: column; gap: .5em; }
.starter-who { display: flex; align-items: center; gap: .5em; font-weight: 700; }
.starter-who .avatar { --s: 1.8em; }
.pbar { width: min(40em, 100%); height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--ga); transform-origin: left; }

/* placing */
.placing { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 3em; align-items: start; position: relative; }
.stage-card { position: relative; max-width: 40em; width: 100%; justify-self: center; }
.ask { font-family: var(--serif); font-style: italic; font-size: 1.8em; color: var(--muted); margin-bottom: .5em; display: flex; align-items: center; gap: .6em; }
.steal-tag { display: inline-flex; align-items: center; gap: .35em; font-family: var(--sans); font-style: normal; font-size: .55em; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #1a0c08; background: var(--bad); padding: .35em .8em; border-radius: 99px; }
.timer-ring { position: absolute; top: 1.6em; right: -1.6em; width: 6.5em; height: 6.5em; border-radius: 50%; background: #0c0c12; box-shadow: 0 20px 40px -10px rgba(0,0,0,.8); display: grid; place-items: center; z-index: 2; }
.timer-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.timer-ring circle { fill: none; stroke-width: 6; }
.timer-ring .bg { stroke: var(--line); }
.timer-ring .fg { stroke: var(--ga); stroke-linecap: round; transition: stroke .3s; }
.timer-ring.urgent .fg { stroke: var(--bad); }
.timer-ring.urgent { animation: thump 1s infinite; }
@keyframes thump { 10% { transform: scale(1.08); } 30% { transform: scale(1); } }
.timer-num { font-family: var(--serif); font-size: 2.3em; font-weight: 600; }
.board { display: flex; flex-direction: column; gap: .8em; min-width: 0; }
.board-head { display: flex; justify-content: space-between; align-items: baseline; }
.board-head h2 { margin: 0; font-size: .78em; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.locked-count { color: var(--ga); font-weight: 800; }
.board-rows, .results { display: flex; flex-direction: column; gap: .6em; }
.board-row, .result-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1em; padding: .75em 1em; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); transition: border-color .3s, background .3s; }
.board-row.locked { border-color: color-mix(in srgb, var(--pc) 55%, transparent); background: color-mix(in srgb, var(--pc) 7%, transparent); }
.board-row.away { opacity: .45; }
.br-main { min-width: 0; display: flex; flex-direction: column; gap: .35em; }
.br-name { display: flex; align-items: baseline; gap: .6em; }
.br-name b { font-size: 1.05em; }
.br-count { color: var(--dim); font-weight: 700; font-size: .85em; }
.lock-state { display: inline-flex; align-items: center; gap: .4em; font-weight: 800; color: var(--muted); font-size: .9em; min-width: 5.5em; justify-content: flex-end; }
.board-row.locked .lock-state { color: var(--pc); }
.mini-tl { display: flex; align-items: center; gap: .3em; flex-wrap: wrap; }
.mt-chip { font-size: .8em; font-weight: 700; padding: .15em .55em; border-radius: 99px; background: rgba(255,255,255,.06); color: #cfc9bd; border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.mt-chip.new { background: var(--good); color: #0e1a0a; border-color: var(--good); box-shadow: 0 0 18px -4px var(--good); }
.mt-mark { display: inline-flex; align-items: center; gap: .2em; font-size: .8em; font-weight: 800; padding: .15em .5em; border-radius: 99px; }
.mt-mark .icon { width: .95em; height: .95em; }
.mt-mark.bad { background: rgba(242,126,99,.15); color: var(--bad); border: 1px dashed var(--bad); }
.mt-mark.good { color: var(--good); border: 1px dashed var(--good); }
.mini-tl.dense .mt-chip { font-size: .7em; padding: .1em .4em; }

/* classic spotlight */
.spot { display: flex; flex-direction: column; gap: 1.2em; min-width: 0; }
.spot-who { display: flex; align-items: center; gap: 1.2em; }
.spot-who h2 { font-family: var(--serif); font-size: 3em; font-weight: 500; margin: 0; line-height: 1; }
.track-label { margin: 0; font-size: .75em; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.track { display: flex; flex-wrap: wrap; align-items: stretch; gap: .4em; }
.track-card { display: flex; flex-direction: column; gap: .15em; padding: .7em .9em; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); max-width: 11em; }
.track-card b { font-family: var(--serif); font-size: 1.3em; color: var(--gold-2); }
.track-card span { font-size: .8em; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.track-gap { width: .5em; border-radius: 4px; display: grid; place-items: center; }
.track-gap.miss { width: 2.2em; background: rgba(242,126,99,.15); border: 1px dashed var(--bad); color: var(--bad); }
.queue { display: flex; align-items: center; gap: .5em; color: var(--muted); margin: 0; }
.queue .icon { color: var(--bad); }
.standings-strip { display: flex; flex-wrap: wrap; gap: .8em; margin-top: .4em; }
.ss { display: inline-flex; align-items: center; gap: .45em; padding: .3em .8em .3em .3em; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); }
.ss b { font-family: var(--serif); font-size: 1.15em; }
.ss small { color: var(--muted); font-weight: 600; }
.banner { position: absolute; left: 50%; bottom: 1em; transform: translateX(-50%); display: inline-flex; align-items: center; gap: .7em; padding: .9em 1.6em; border-radius: 99px; font-size: 1.4em; font-weight: 600; background: #22130f; border: 1px solid var(--bad); color: #ffd7cc; box-shadow: 0 20px 60px -20px var(--bad); white-space: nowrap; z-index: 3; }
.banner .icon { color: var(--bad); }

/* reveal */
.reveal { flex: 1; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 3em; align-items: start; }
.reveal-card { display: flex; flex-direction: column; align-items: flex-start; gap: .4em; }
.reveal-card .ev-card { width: 100%; margin-top: .8em; }
.year-reveal { font-family: var(--serif); font-weight: 600; font-size: 7em; line-height: .95; color: var(--gold-2); letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-shadow: 0 0 60px rgba(201,169,110,.45); transform-origin: left center; }
.reveal-side { display: flex; flex-direction: column; gap: 1em; min-width: 0; }
.outcome { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 2.3em; margin: 0; }
.result-row.good { border-color: rgba(127,211,107,.4); background: rgba(127,211,107,.06); }
.result-row.bad { border-color: rgba(242,126,99,.25); }
.rtag { display: inline-flex; align-items: center; gap: .35em; font-weight: 800; padding: .35em .8em; border-radius: 99px; font-size: .9em; white-space: nowrap; }
.rtag.good { background: var(--good); color: #0e1a0a; }
.rtag.bad { background: rgba(242,126,99,.14); color: var(--bad); }
.rtag.idle { color: var(--muted); }

/* final */
.final { flex: 1; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 3em; align-items: center; }
.winner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4em; }
.winner .crown { color: var(--gold); width: 4em; height: 4em; filter: drop-shadow(0 0 30px rgba(201,169,110,.7)); margin-bottom: -.4em; }
.winner .crown .icon { width: 100%; height: 100%; }
.winner h1 { font-family: var(--serif); font-size: 5.5em; font-weight: 500; margin: 0; line-height: 1; }
.winner p { color: var(--muted); margin: 0; font-size: 1.1em; }
.winner .avatar { margin-bottom: .6em; }
.final-side { display: flex; flex-direction: column; gap: 1em; min-width: 0; }
.win-track { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5em, 1fr)); gap: .6em; }
.wt-card { border-radius: 12px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); display: flex; flex-direction: column; }
.wt-card .icon.fallback { aspect-ratio: 4 / 3; width: 100%; height: auto; padding: 22%; color: var(--ga); background: #0c0c12; }
.wt-card img, .wt-noimg { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.wt-noimg { display: grid; place-items: center; color: var(--ga); background: #0c0c12; }
.wt-card b { font-family: var(--serif); color: var(--gold-2); padding: .4em .6em 0; font-size: 1.1em; }
.wt-card span { padding: 0 .6em .6em; font-size: .75em; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ranking { display: flex; flex-direction: column; gap: .5em; margin-top: .6em; }
.rank-row { display: grid; grid-template-columns: 1.6em auto 1fr repeat(3, auto); align-items: center; gap: 1em; padding: .6em 1em; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.rank-row.first { border-color: rgba(201,169,110,.5); background: rgba(201,169,110,.07); }
.rank-n { font-family: var(--serif); color: var(--dim); font-size: 1.3em; }
.rank-stat { display: flex; flex-direction: column; align-items: flex-end; font-size: .7em; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.rank-stat b { font-size: 1.6em; color: var(--text); letter-spacing: 0; text-transform: none; }
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.center-msg { flex: 1; display: grid; place-items: center; color: var(--muted); }

@media (max-aspect-ratio: 1/1) {
  .placing, .reveal, .final { grid-template-columns: 1fr; gap: 1.6em; }
  .timer-ring { right: .6em; }
  .intro-title h1 { font-size: 4.5em; }
  .steps { grid-template-columns: 1fr; }
  .year-reveal { font-size: 5em; }
  .dock { left: 1.2em; right: 1.2em; justify-content: flex-end; }
  .display.rewind { padding-bottom: 6em; }
}

/* ---------- Rewind phone ---------- */
.p-top { position: sticky; top: 0; z-index: 15; margin: calc(-1 * env(safe-area-inset-top, 0px) - 12px) -16px 12px; padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px; background: rgba(7,7,11,.85); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.p-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.p-who b { display: block; line-height: 1.1; }
.p-who small { color: var(--muted); font-weight: 700; font-size: .78em; }
.p-progress { flex: 1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.p-progress i { display: block; height: 100%; border-radius: 4px; transition: width .6s var(--ease); }
.room-chip.sm { padding: .25em .6em; }
.room-chip.sm b { font-size: .9em; }
.p-stage { display: flex; flex-direction: column; gap: 14px; }
.p-timer { position: relative; height: 30px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; justify-content: flex-end; padding: 0 12px; }
.p-timer i { position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--ga) 35%, transparent), color-mix(in srgb, var(--ga) 15%, transparent)); transform-origin: left; }
.p-timer span { position: relative; font-weight: 800; font-variant-numeric: tabular-nums; font-size: .9em; }
.p-timer.urgent i { background: linear-gradient(90deg, rgba(242,126,99,.5), rgba(242,126,99,.2)); }
.p-card { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 10px; border-radius: 18px; background: linear-gradient(180deg, #17161f, #0f0e15); border: 1px solid color-mix(in srgb, var(--ga) 35%, var(--line)); box-shadow: 0 20px 50px -25px color-mix(in srgb, var(--ga) 60%, transparent); }
.p-card-img { border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: #0b0b10; display: grid; place-items: center; color: var(--ga); }
.p-card-img img { width: 100%; height: 100%; object-fit: cover; }
.p-card-img.noimg .icon { width: 45%; height: 45%; }
.p-card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; justify-content: center; }
.p-card-body h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.25em; line-height: 1.1; }
.p-card-body p { margin: 0; color: var(--muted); font-size: .88em; line-height: 1.3; }
.p-prompt { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.p-prompt b { font-family: var(--serif); font-size: 1.3em; font-weight: 500; }
.p-prompt small { color: var(--muted); font-weight: 600; }
.p-prompt .steal-tag { font-size: .7em; }

/* the placer: cards with tappable gaps */
.placer { display: flex; flex-direction: column; position: relative; }
.placer::before { content: ''; position: absolute; left: 31px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(180deg, transparent, var(--line-2) 8%, var(--line-2) 92%, transparent); }
.tl-card { position: relative; display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; padding: 10px 12px 10px 0; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); margin: 3px 0; }
.tl-year { justify-self: center; font-family: var(--serif); font-weight: 700; color: var(--gold-2); font-size: 1.05em; background: #121119; padding: 2px 6px; border-radius: 8px; position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.tl-text { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; font-size: .95em; line-height: 1.25; }
.tl-text > span:last-child { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tl-cat { color: var(--muted); display: inline-flex; flex: none; }
.tl-card.new { border-color: var(--good); background: rgba(127,211,107,.1); box-shadow: 0 0 30px -10px var(--good); animation: popin .6s var(--ease); }
@keyframes popin { from { transform: scale(.9); opacity: 0; } }
.slot { position: relative; display: flex; flex-direction: column; align-items: stretch; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; min-height: 14px; }
.slot-line { display: none; }
.slot-label { display: none; }
.placer.live .slot { min-height: 50px; justify-content: center; }
.placer.live .slot-label { display: flex; align-items: center; gap: 8px; margin-left: 20px; padding: 9px 14px; border-radius: 12px; border: 1.5px dashed color-mix(in srgb, var(--ga) 35%, transparent); color: color-mix(in srgb, var(--ga) 85%, white); font-weight: 700; font-size: .85em; transition: all .2s var(--ease); background: rgba(0,0,0,.25); }
.placer.live .slot-label .icon { width: 1.3em; height: 1.3em; padding: 3px; border-radius: 50%; background: color-mix(in srgb, var(--ga) 20%, transparent); }
.placer.live .slot:active .slot-label { transform: scale(.98); }
.slot-ghost { display: none; }
.slot.sel .slot-label { display: none; }
.slot.sel .slot-ghost { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; padding: 12px 12px 12px 0; margin: 4px 0; border-radius: 14px; border: 2px solid var(--ga); background: color-mix(in srgb, var(--ga) 14%, #0f0e15); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ga) 12%, transparent), 0 16px 40px -16px var(--ga); transform-origin: center; }
.slot-ghost b { justify-self: center; font-family: var(--serif); font-size: 1.4em; color: var(--ga); position: relative; z-index: 1; background: #10131a; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--ga); }
.slot-ghost span { font-weight: 700; line-height: 1.25; }
.slot.missed .slot-ghost { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; padding: 10px 12px 10px 0; border-radius: 14px; border: 2px dashed var(--bad); background: rgba(242,126,99,.08); }
.slot.missed .slot-ghost b { color: var(--bad); border-color: var(--bad); }
.p-locked { text-align: center; padding: 6px 0 2px; }
.p-locked h2 { font-family: var(--serif); font-weight: 500; margin: 6px 0 2px; font-size: 1.8em; }
.p-locked p { margin: 0; }
.lock-badge { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; color: #10131a; background: var(--ga); box-shadow: 0 0 0 8px color-mix(in srgb, var(--ga) 15%, transparent), 0 20px 40px -10px var(--ga); }
.lock-badge .icon { width: 30px; height: 30px; }
.p-watch { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--pc) 8%, transparent); border: 1px solid color-mix(in srgb, var(--pc) 40%, transparent); }
.p-watch small { display: block; color: var(--muted); font-weight: 700; font-size: .75em; letter-spacing: .14em; text-transform: uppercase; }
.p-watch b { font-size: 1.1em; }
.p-center { min-height: 55svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; }
.p-center h2 { font-family: var(--serif); font-weight: 500; font-size: 2.2em; margin: 8px 0 0; }
.p-center p { margin: 0; max-width: 28ch; }
.big-icon { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; }
.big-icon .icon { width: 42px; height: 42px; }
.big-icon.good { background: var(--good); color: #0e1a0a; box-shadow: 0 0 0 10px rgba(127,211,107,.15), 0 20px 50px -10px var(--good); }
.big-icon.bad { background: rgba(242,126,99,.15); color: var(--bad); border: 2px solid var(--bad); }
.big-icon.idle { background: var(--panel-2); color: var(--muted); }
.p-result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 18px 0 4px; }
.p-result h2 { font-family: var(--serif); font-weight: 500; font-size: 2.4em; margin: 6px 0 0; line-height: 1; }
.p-result p { margin: 0; color: var(--muted); }
.p-result p b { color: var(--gold-2); font-family: var(--serif); font-size: 1.3em; }
.p-blurb { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: #c9c3b6; font-size: .9em; }
.p-intro { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding-top: 10px; }
.p-intro .ev-card { width: 100%; max-width: 360px; }
.p-intro .ev-card .ev-year { font-size: 1.6em; }
.p-final { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 16px 0 6px; position: relative; }
.p-final .crown { width: 56px; height: 56px; color: var(--muted); }
.p-final.won .crown { color: var(--gold); filter: drop-shadow(0 0 20px rgba(201,169,110,.8)); }
.p-final .crown .icon { width: 100%; height: 100%; }
.p-final h2 { font-family: var(--serif); font-weight: 500; font-size: 2.6em; margin: 0; }
.p-final p { margin: 0; }
.p-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin-top: 12px; }
.p-stats div { padding: 12px 6px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; }
.p-stats b { font-family: var(--serif); font-size: 1.7em; }
.p-stats small { color: var(--muted); font-weight: 700; font-size: .72em; text-transform: uppercase; letter-spacing: .1em; }
.placer.readonly .tl-card { margin: 4px 0; }
.tl-card.belongs { border: 1.5px dashed var(--good); background: rgba(127,211,107,.06); }
.tl-card.belongs .tl-year { color: var(--good); }
.tl-card.belongs .tl-text { flex-direction: column; align-items: flex-start; gap: 0; }
.tl-card.belongs small { color: var(--good); font-weight: 700; font-size: .75em; letter-spacing: .08em; text-transform: uppercase; }
.p-foot .row .btn { flex: 1; }

/* ---------- music ---------- */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; width: 14px; height: 14px; flex: none; }
.eq i { flex: 1; height: 30%; border-radius: 1px; background: currentColor; transition: height .3s; }
.playing .eq i, .station.on .eq i { animation: eq 1s ease-in-out infinite; }
.playing .eq i:nth-child(2), .station.on .eq i:nth-child(2) { animation-delay: -.35s; }
.playing .eq i:nth-child(3), .station.on .eq i:nth-child(3) { animation-delay: -.7s; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

.music-dock { position: fixed; left: 2.2em; bottom: 1.8em; z-index: 30; font-size: clamp(12px, .92vw, 30px); display: flex; flex-direction: column; align-items: flex-start; gap: .8em; }
.music-chip { display: flex; align-items: center; gap: .8em; max-width: 26em; padding: .6em 1.1em .6em .9em; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(20,19,26,.72); backdrop-filter: blur(10px); cursor: pointer; text-align: left; opacity: .75; transition: opacity .2s; }
.music-chip:hover, .music-chip.playing { opacity: 1; }
.music-chip .eq { color: var(--gold); }
.music-chip-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.music-chip-text b, .music-chip-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-chip-text small { color: var(--muted); font-size: .8em; }
.music-pop { width: 30em; max-width: calc(100vw - 3em); background: #111018; border: 1px solid var(--line-2); border-radius: 22px; padding: 1.2em; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.music-pop-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6em; }
.music-pop-head h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.4em; }

.music-ctl { display: flex; flex-direction: column; gap: .9em; }
.stations { display: grid; gap: .45em; }
.station { display: grid; grid-template-columns: auto 1fr; column-gap: .8em; align-items: center; text-align: left; padding: .7em .9em; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.station .eq { grid-row: span 2; color: var(--dim); }
.station small { color: var(--muted); font-size: .82em; }
.station.on { border-color: rgba(201,169,110,.55); background: rgba(201,169,110,.1); }
.station.on .eq, .station.on b { color: var(--gold-2); }
.music-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5em; }
.btn.sm { padding: .55em .9em; font-size: .9em; border-radius: 12px; }
.vol-wrap { display: flex; align-items: center; gap: .5em; flex: 1; min-width: 9em; color: var(--muted); }
.vol-wrap .icon { width: 1.2em; height: 1.2em; }
.vol { flex: 1; accent-color: var(--gold); }
.music-credit { margin: 0; color: var(--dim); font-size: .72em; line-height: 1.4; }
.music-open { margin-top: 14px; }
.p-host-tools { display: flex; gap: 6px; }
@media (max-aspect-ratio: 1/1) { body[data-role="display"] .music-dock { left: 1.2em; bottom: 5.6em; } }

/* ---------- how-to-play tutorial (TV) ---------- */
.tut { flex: 1; display: grid; grid-template-columns: 26em 1fr; grid-template-rows: 1fr auto auto; gap: 1.2em 3em; align-items: center; padding-top: 1em; }
.tut-side h1 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 4.6em; margin: .05em 0 .35em; line-height: 1; color: var(--ga); }
.tut-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .45em; }
.tut-step { display: flex; gap: .9em; align-items: flex-start; padding: .75em .9em; border-radius: 14px; border: 1px solid transparent; opacity: .38; transition: opacity .4s, background .4s, border-color .4s; }
.tut-step > b { flex: none; width: 1.9em; height: 1.9em; border-radius: 50%; display: grid; place-items: center; font-size: .9em; background: var(--panel-2); border: 1px solid var(--line-2); }
.tut-step strong { display: block; font-size: 1.1em; }
.tut-step span { display: block; color: var(--muted); font-size: .9em; line-height: 1.35; }
.tut-step.done { opacity: .6; }
.tut-step.done > b { background: rgba(127,211,107,.15); border-color: rgba(127,211,107,.5); color: var(--good); }
.tut-step.on { opacity: 1; background: color-mix(in srgb, var(--ga) 9%, transparent); border-color: color-mix(in srgb, var(--ga) 40%, transparent); }
.tut-step.on > b { background: var(--ga); border-color: var(--ga); color: #07070b; }
.tut-stage { position: relative; height: 40em; }
.tut-card { position: absolute; width: 14.5em; }
.tut-card .ev-card { width: 100%; }
.tut-line { position: absolute; left: 4%; right: 4%; top: calc(62% + 8em); height: 2px; background: linear-gradient(90deg, transparent, var(--line-2) 10%, var(--line-2) 90%, transparent); transform-origin: 50% 50%; }
.tut-badge { position: absolute; width: 3.2em; height: 3.2em; border-radius: 50%; display: grid; place-items: center; z-index: 3; }
.tut-badge .icon { width: 1.7em; height: 1.7em; }
.tut-badge.good { background: var(--good); color: #07070b; box-shadow: 0 0 40px rgba(127,211,107,.6); }
.tut-badge.bad { background: var(--bad); color: #07070b; box-shadow: 0 0 40px rgba(242,126,99,.6); }
.tut-note { position: absolute; left: 50%; top: 52%; white-space: nowrap; padding: .45em 1em; border-radius: 99px; background: rgba(242,126,99,.14); border: 1px solid rgba(242,126,99,.5); color: var(--bad); font-weight: 700; z-index: 3; }
.tut-pips { position: absolute; left: 50%; top: 8%; display: flex; gap: .7em; align-items: center; }
.tut-pips i { width: 1.6em; height: 2.2em; border-radius: 6px; border: 2px solid var(--line-2); background: var(--panel); }
.tut-crown { color: var(--gold); margin-left: .4em; }
.tut-crown .icon { width: 2.4em; height: 2.4em; }
.tut-phone { position: absolute; right: 0; top: 0; width: 17em; height: 34em; border-radius: 2.4em; border: .5em solid #23222b; background: #0b0b10; box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 0 0 1px var(--line-2); padding: 1.4em .9em; z-index: 4; }
.tp-screen { display: flex; flex-direction: column; gap: .55em; height: 100%; font-size: .85em; }
.tp-card { padding: .8em; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-2); display: flex; gap: .6em; align-items: center; margin-bottom: .6em; }
.tp-card b { width: 2em; height: 2em; border-radius: 8px; display: grid; place-items: center; background: rgba(201,169,110,.15); color: var(--gold); flex: none; }
.tp-slot { display: flex; align-items: center; gap: .5em; padding: .8em; border-radius: 12px; border: 1.5px dashed color-mix(in srgb, var(--ga) 55%, transparent); color: var(--ga); font-weight: 700; }
.tp-row { display: flex; gap: .7em; align-items: center; padding: .8em; border-radius: 12px; background: var(--panel-2); }
.tp-row b { font-family: var(--serif); color: var(--gold-2); font-size: 1.2em; }
.tp-foot { margin-top: auto; position: relative; height: 3.2em; }
.tp-lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .5em; border-radius: 12px; font-weight: 800; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1408; }
.tp-lock.done { background: rgba(127,211,107,.18); color: var(--good); border: 1px solid rgba(127,211,107,.5); }
.tut-finger { position: absolute; width: 2.4em; height: 2.4em; margin: -1.2em 0 0 -1.2em; border-radius: 50%; background: rgba(255,255,255,.85); box-shadow: 0 0 0 .5em rgba(255,255,255,.18), 0 6px 20px rgba(0,0,0,.5); z-index: 5; pointer-events: none; }
.tut-progress { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.tut-progress i { display: block; height: 100%; background: var(--ga); transform-origin: left; transform: scaleX(0); }
.tut .ready-strip { grid-column: 1 / -1; }
.ready-strip { display: flex; align-items: center; justify-content: center; gap: 1.4em; flex-wrap: wrap; }
.ready-hint { color: var(--muted); }
.ready-hint b { color: var(--text); }
.ready-people { display: flex; gap: .7em; }
.ready-p { position: relative; opacity: .45; transition: opacity .3s; }
.ready-p.on { opacity: 1; }
.ready-tick { position: absolute; right: -.35em; bottom: -.35em; width: 1.3em; height: 1.3em; border-radius: 50%; display: grid; place-items: center; background: var(--good); color: #07070b; visibility: hidden; }
.ready-tick .icon { width: .8em; height: .8em; }
.ready-p.on .ready-tick { visibility: visible; }
.p-watch { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--ga) 10%, transparent); border: 1px solid color-mix(in srgb, var(--ga) 35%, transparent); color: var(--ga); font-weight: 700; font-size: .92em; }
.p-ready { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-radius: 14px; background: rgba(127,211,107,.12); border: 1px solid rgba(127,211,107,.45); color: var(--good); font-weight: 800; }
.p-skip { margin-top: 8px; }
@media (max-aspect-ratio: 1/1) {
  .tut { grid-template-columns: 1fr; }
  .tut-side h1 { font-size: 3em; margin-bottom: .2em; }
  .tut-step:not(.on) { display: none; }
  .tut-phone { font-size: .68em; }
  .tut-stage { height: 36em; }
  .ready-hint { display: none; }
}

/* =================== BLUFF =================== */
.bluff { --ga: #f27e63; }
.bluff .timer-ring { position: relative; top: auto; right: auto; flex: none; }
.bl-prompt { font-family: var(--serif); font-weight: 400; line-height: 1.25; margin: 0; text-wrap: balance; }
.bl-blank { display: inline-block; min-width: 4.5em; border-bottom: .09em solid var(--ga); margin: 0 .12em; padding: 0 .15em; color: var(--ga); text-align: center; line-height: 1.1; }
.bl-blank.filled { color: var(--gold-2); border-bottom-color: var(--gold); font-style: italic; }
.bl-q { display: flex; flex-direction: column; gap: .8em; max-width: 66em; }
.bl-q .bl-prompt { font-size: 3.4em; }
.bl-q.small .bl-prompt { font-size: 2.1em; }
.bl-cat { align-self: flex-start; font-size: .8em; letter-spacing: .2em; text-transform: uppercase; font-weight: 800; color: var(--ga); padding: .35em .9em; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--ga) 45%, transparent); background: color-mix(in srgb, var(--ga) 10%, transparent); }
.bl-writing { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2.6em; padding-left: 2em; }
.bl-under { display: flex; align-items: center; gap: 1.6em; }
.bl-instr { display: flex; flex-direction: column; }
.bl-instr b { font-size: 1.5em; }
.bl-instr span { color: var(--muted); font-size: 1.1em; }
.bl-status { display: flex; align-items: center; gap: 1.2em; }
.bl-status-label { color: var(--muted); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .8em; }
.bl-status-people { display: flex; gap: .7em; flex-wrap: wrap; }
.bl-choosing { flex: 1; display: flex; flex-direction: column; gap: 2em; justify-content: center; padding: 0 2em; }
.bl-choosing-head { display: flex; justify-content: space-between; align-items: center; gap: 2em; }
.bl-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(17em, 1fr)); gap: 1em; }
.bl-option { display: grid; place-items: center; min-height: 3.6em; padding: .8em 1.2em; border-radius: 18px; background: linear-gradient(180deg, #19181f, #121118); border: 1px solid var(--line-2); font-size: 1.55em; font-weight: 700; text-align: center; box-shadow: 0 20px 40px -24px rgba(0,0,0,.9); }
.bl-reveal { flex: 1; display: flex; flex-direction: column; gap: 2em; justify-content: center; padding: 0 2em; }
.bl-reveal-main { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 3em; align-items: center; }
.bl-focus { position: relative; padding: 2.2em 2em 2.6em; border-radius: 26px; text-align: center; background: linear-gradient(180deg, #1b1a22, #121118); border: 2px solid var(--line-2); display: flex; flex-direction: column; align-items: center; gap: .9em; box-shadow: 0 40px 90px -40px rgba(0,0,0,.9); }
.bl-focus-text { font-family: var(--serif); font-size: 3.2em; line-height: 1.1; }
.bl-focus.truth { border-color: var(--gold); background: radial-gradient(120% 120% at 50% 0%, rgba(201,169,110,.22), transparent 60%), #15131a; box-shadow: 0 0 80px rgba(201,169,110,.25); }
.bl-focus.lie { border-color: color-mix(in srgb, var(--bad) 60%, transparent); }
.bl-stamp { font-size: 1.15em; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; padding: .4em 1em; border-radius: 10px; border: 3px solid currentColor; transform: rotate(-4deg); }
.bl-stamp.truth { color: var(--gold-2); }
.bl-stamp.lie { color: var(--pc, var(--bad)); transform: rotate(4deg); }
.bl-stamp.house { color: var(--muted); transform: rotate(3deg); }
.bl-pts { font-weight: 800; color: var(--good); font-size: 1.2em; }
.bl-likes { position: absolute; top: 1em; right: 1.2em; display: flex; align-items: center; gap: .3em; color: var(--gold); font-weight: 800; }
.bl-picked-by { display: flex; flex-direction: column; gap: 1em; }
.bl-pickers { display: flex; flex-wrap: wrap; gap: 1.2em; }
.bl-picker { display: flex; flex-direction: column; align-items: center; gap: .4em; font-weight: 700; }
.bl-nobody { color: var(--muted); font-size: 1.3em; }
.bl-done { display: flex; flex-wrap: wrap; gap: .6em; min-height: 2.6em; }
.bl-done-chip { padding: .45em 1em; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-weight: 700; }
.bl-done-chip s { text-decoration-color: color-mix(in srgb, var(--bad) 70%, transparent); text-decoration-thickness: 2px; }
.bl-round { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .4em; }
.bl-round h1 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 8em; margin: 0; line-height: 1; color: var(--ga); text-shadow: 0 0 80px color-mix(in srgb, var(--ga) 40%, transparent); }
.bl-round p { color: var(--muted); font-size: 1.5em; margin: 0; }
.bl-scores .pbar { width: 100%; }
.bl-scores { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1.6em; max-width: 62em; width: 100%; margin: 0 auto; }
.bl-scores-head h2 { font-family: var(--serif); font-weight: 500; font-size: 3.4em; margin: .1em 0; }
.bl-truth-line { color: var(--muted); font-size: 1.2em; margin: 0; }
.bl-truth-line b { color: var(--gold-2); }
.bl-rows { display: flex; flex-direction: column; gap: .6em; }
.bl-row { display: grid; grid-template-columns: 1.6em auto 9em 1fr 6em 6em; align-items: center; gap: 1em; padding: .7em 1.1em; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.bl-rank { font-family: var(--serif); color: var(--dim); font-size: 1.4em; }
.bl-name { font-weight: 800; font-size: 1.2em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-bar { height: .8em; border-radius: 99px; background: var(--line); overflow: hidden; }
.bl-bar i { display: block; height: 100%; border-radius: 99px; background: var(--pc); }
.bl-delta { color: var(--good); font-weight: 800; text-align: right; }
.bl-delta.zero { color: var(--dim); }
.bl-score { font-family: var(--serif); font-size: 1.5em; text-align: right; font-variant-numeric: tabular-nums; }
.bl-final { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.bl-final .ranking { grid-column: 2; }
.bl-final .winner { grid-row: span 2; }
.bl-awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(12em, 1fr)); gap: .8em; }
.bl-award { display: flex; flex-direction: column; gap: .4em; padding: 1em 1.1em; border-radius: 16px; background: rgba(201,169,110,.06); border: 1px solid rgba(201,169,110,.3); }
.bl-award > .icon { color: var(--gold); width: 1.6em; height: 1.6em; }
.bl-award-who { display: flex; flex-wrap: wrap; gap: .6em; font-weight: 800; font-size: 1.1em; }
.bl-award-who > span { display: inline-flex; align-items: center; gap: .4em; }
.bl-award small { color: var(--muted); }
.win-avatars { display: flex; gap: .8em; }
.rk-name { font-weight: 700; }
.rk-stats { color: var(--muted); font-size: .85em; }
.rk-cards { font-family: var(--serif); font-size: 1.3em; }
/* tutorial scene */
.tb-stage { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2.4em; text-align: center; }
.tb-fact { max-width: 34em; }
.tb-fact .bl-prompt { font-size: 2.6em; }
.tb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8em 1.4em; width: 34em; }
.tb-tile { position: relative; padding: 1em 1.2em; border-radius: 16px; background: #17161e; border: 2px solid var(--line-2); font-size: 1.35em; font-weight: 700; text-align: center; }
.tb-stamp { position: absolute; top: -1.3em; left: 50%; width: max-content; white-space: nowrap; padding-inline: .9em !important; font-size: .6em; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; padding: .35em 0; border-radius: 8px; border: 2px solid currentColor; background: #111018; }
.tb-stamp.truth { color: var(--gold-2); }
.tb-stamp.lie { color: var(--bad); }
.tb-points { position: absolute; bottom: -1.5em; right: .4em; font-size: .7em; color: var(--good); font-weight: 900; }
.tb-tile > .avatar { position: absolute; top: 50%; right: -1em; margin-top: -1em; }
.tb-fooled { position: absolute; top: 50%; left: -1.2em; margin-top: -1em; display: flex; flex-direction: column; gap: .2em; }
.tb-phone { top: 6%; height: 24em; }
.tb-phone .tp-label { color: var(--muted); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .75em; }
.tp-input { display: flex; align-items: center; min-height: 3em; padding: 0 .9em; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(0,0,0,.4); font-weight: 700; font-size: 1.1em; }
.tp-caret { width: 2px; height: 1.2em; background: var(--ga); margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tb-mults { position: absolute; inset: auto 0 6% 0; display: flex; justify-content: center; gap: 1.4em; }
.tb-mult { display: flex; flex-direction: column; align-items: center; gap: .3em; padding: 1em 1.6em; border-radius: 18px; background: #15141c; border: 1px solid var(--line-2); }
.tb-mult b { font-family: var(--serif); font-size: 3em; color: var(--gold-2); line-height: 1; }
.tb-mult:last-child b { color: var(--ga); }
.tb-mult span { color: var(--muted); font-weight: 700; }
/* phone */
.p-spacer { flex: 1; }
.p-big-icon { width: 3em; height: 3em; color: var(--ga); opacity: .8; }
.bl-pq { padding: 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.bl-pq .bl-prompt { font-size: 1.35em; }
.bl-pq.small .bl-prompt { font-size: 1.05em; }
.bl-pq .bl-blank { min-width: 3.5em; }
.bl-input { font-size: 1.25em; }
.bl-err { display: flex; gap: 8px; align-items: center; margin: 0; color: var(--bad); font-weight: 700; }
.bl-lfm { align-self: flex-start; }
.bl-suggest { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bl-suggest small { width: 100%; color: var(--muted); font-weight: 700; }
.chip-btn { padding: 10px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--panel-2); font-weight: 700; cursor: pointer; }
.bl-mylie { font-family: var(--serif); font-size: 1.8em; color: var(--ga); margin: 6px 0; }
.bl-picks { display: flex; flex-direction: column; gap: 10px; padding-bottom: 20px; }
.bl-pick-row { display: flex; gap: 8px; }
.bl-pick { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; padding: 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-2); font-weight: 800; font-size: 1.05em; cursor: pointer; transition: transform .15s, opacity .2s; }
.bl-pick:active { transform: scale(.98); }
.bl-pick.own { opacity: .45; border-style: dashed; }
.bl-pick.own small { color: var(--muted); font-weight: 700; }
.bl-pick.on { border-color: var(--ga); background: color-mix(in srgb, var(--ga) 16%, transparent); color: var(--text); opacity: 1; }
.bl-pick.dim { opacity: .45; }
.bl-like { width: 52px; flex: none; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); color: var(--dim); display: grid; place-items: center; cursor: pointer; }
.bl-like.on { color: var(--gold); border-color: rgba(201,169,110,.5); background: rgba(201,169,110,.1); }
.bl-like-gap { width: 52px; flex: none; }
.bl-mydelta { font-family: var(--serif); font-size: 4em; color: var(--good); line-height: 1; }
.bl-mydelta.zero { color: var(--dim); }
.bl-myawards { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
@media (max-aspect-ratio: 1/1) {
  .bl-q .bl-prompt { font-size: 2.4em; }
  .bl-reveal-main, .bl-final { grid-template-columns: 1fr; }
  .bl-final .ranking { grid-column: auto; }
  .bl-row { grid-template-columns: 1.6em auto 1fr 5em 5em; }
  .bl-row .bl-bar { display: none; }
  .display.bluff { padding-bottom: 6em; }
}

/* =================== PIN IT =================== */
.pinit { --ga: #7fd36b; }
.pinit .timer-ring { position: relative; top: auto; right: auto; }
.pm { position: relative; width: 100%; height: 100%; overflow: hidden; background: radial-gradient(120% 100% at 50% 40%, #0f1a22, #090b10); border-radius: inherit; }
.pm.interactive { touch-action: none; cursor: crosshair; }
.pm-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pm-land path { fill: #1d2430; stroke: rgba(127,211,107,.35); stroke-width: .8; vector-effect: non-scaling-stroke; }
.pm-grid line { stroke: rgba(255,255,255,.05); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pm-lines line { stroke-width: 2.5; stroke-dasharray: 4 6; vector-effect: non-scaling-stroke; }
.pm-markers { position: absolute; inset: 0; pointer-events: none; }
.pm-mark { position: absolute; width: 0; height: 0; }
.pm-pin { position: absolute; left: 0; bottom: 0; transform: translate(-50%, 0); display: flex; flex-direction: column; align-items: center; }
.pm-pin::after { content: ''; width: 3px; height: .9em; background: var(--pc); border-radius: 2px; box-shadow: 0 0 6px rgba(0,0,0,.6); }
.pm-pin .avatar { box-shadow: 0 0 0 2px #0b0b10, 0 4px 14px rgba(0,0,0,.6); }
.pm-pin-lbl { position: absolute; left: 0; bottom: 0; }
.pm-pin-lbl > .pm-pin { position: relative; transform: translate(-50%, 0); }
.pm-pin-lbl > span { position: absolute; left: 1.4em; bottom: 1.4em; white-space: nowrap; padding: .2em .6em; border-radius: 8px; background: rgba(11,11,16,.85); border: 1px solid var(--line-2); font-weight: 800; font-size: .85em; }
.pm-truth { position: absolute; left: 0; top: 0; width: 1.8em; height: 1.8em; transform: translate(-50%, -50%); display: grid; place-items: center; color: #1a1408; }
.pm-truth .icon { position: relative; width: 1.3em; height: 1.3em; z-index: 2; }
.pm-truth i { position: absolute; inset: 0; border-radius: 50%; background: var(--gold); box-shadow: 0 0 24px rgba(201,169,110,.9); }
.pm-truth i:first-child { animation: truthPulse 1.8s ease-out infinite; opacity: .6; }
@keyframes truthPulse { from { transform: scale(1); opacity: .7; } to { transform: scale(3.2); opacity: 0; } }
.pi-card { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: linear-gradient(180deg, #17161f, #0f0e15); border: 1px solid var(--line-2); box-shadow: 0 40px 90px -40px rgba(0,0,0,.9); }
.pi-img { aspect-ratio: 16 / 10; background: #0b0b10; display: grid; place-items: center; overflow: hidden; color: var(--ga); }
.pi-img img { width: 100%; height: 100%; object-fit: cover; }
.pi-img > .icon { width: 30%; height: 40%; opacity: .5; }
.pi-body { padding: 1em 1.3em 1.2em; display: flex; flex-direction: column; gap: .35em; }
.pi-title { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.7em; line-height: 1.1; }
.pi-blurb { margin: .2em 0 0; color: var(--muted); font-size: .92em; line-height: 1.4; }
.pi-card.big .pi-img { aspect-ratio: 16 / 9; }
.pi-guess { flex: 1; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 3em; align-items: center; padding: 0 1em; }
.pi-guess .pi-card.big .pi-body { display: none; }
.pi-guess-side { display: flex; flex-direction: column; gap: .8em; align-items: flex-start; }
.pi-guess-side h2 { font-family: var(--serif); font-weight: 500; font-size: 3.6em; line-height: 1.05; margin: 0; }
.pi-guess-side .timer-ring { margin: .6em 0; }
.pi-locked { display: flex; flex-direction: column; gap: .6em; }
.pi-reveal { flex: 1; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.6em; min-height: 0; padding-bottom: 4.5em; }
.pi-map-wrap { border-radius: 24px; overflow: hidden; border: 1px solid var(--line-2); min-height: 30em; }
.pi-reveal-side { display: flex; flex-direction: column; gap: 1em; min-width: 0; }
.pi-reveal-side .pi-card .pi-img { aspect-ratio: 16 / 8; }
.pi-rows { display: flex; flex-direction: column; gap: .45em; }
.pi-row { display: grid; grid-template-columns: 1.4em auto 1fr auto 4.5em 5em; align-items: center; gap: .7em; padding: .5em .8em; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.pi-km { color: var(--muted); font-weight: 700; font-size: .9em; }
.pi-row .bl-score { font-size: 1.2em; }
/* tutorial */
.pi-tstage { display: grid; place-items: center; }
.pi-tstage > * { grid-area: 1 / 1; }
.pi-tstage .pi-card { width: 24em; }
.pi-tphone { position: absolute; right: 4%; top: 2%; width: 18em; height: 34em; padding: .7em; }
.pi-tscreen { width: 100%; height: 100%; border-radius: 1.6em; overflow: hidden; }
.pi-tmap { width: 100%; height: 100%; border-radius: 24px; overflow: hidden; border: 1px solid var(--line-2); }
/* phone */
.pinit.pi-mapmode .p-stage { height: calc(100svh - 170px - env(safe-area-inset-bottom, 0px)); }
.pi-mini { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.pi-mini > img, .pi-mini > .icon { width: 74px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
.pi-mini small { display: block; color: var(--ga); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .7em; }
.pi-mini b { font-family: var(--serif); font-weight: 500; font-size: 1.25em; line-height: 1.15; }
.pi-phone-map { position: relative; flex: 1; min-height: 260px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); }
.pi-phone-map.locked { opacity: .8; }
.pi-phone-map.small { flex: none; height: 46svh; width: 100%; }
.pi-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.pi-zoom .icon-btn { background: rgba(11,11,16,.85); backdrop-filter: blur(6px); }
.pi-minus span { font-size: 1.6em; line-height: 1; font-weight: 600; margin-top: -3px; }
.pi-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); white-space: nowrap; padding: 8px 14px; border-radius: 99px; background: rgba(11,11,16,.85); border: 1px solid var(--line-2); font-weight: 700; font-size: .9em; pointer-events: none; z-index: 3; }
.pi-result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding-top: 8px; }
.pi-result .bl-mydelta { font-size: 3.4em; }
@media (max-aspect-ratio: 1/1) {
  .pi-guess, .pi-reveal { grid-template-columns: 1fr; }
  .pi-map-wrap { min-height: 24em; }
  .display.pinit { padding-bottom: 6em; }
}

/* =================== QUICK DRAW =================== */
.sketch { --ga: #9b8cf2; }
.sketch .timer-ring { position: absolute; top: -1.6em; right: -1.6em; }
.sk-paper { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: #fbfaf6; box-shadow: 0 30px 70px -30px rgba(0,0,0,.9), inset 0 0 0 1px rgba(0,0,0,.08); }
.sk-paper.interactive { touch-action: none; cursor: crosshair; }
.sk-canvas { display: block; width: 100%; height: 100%; }
.sk-hint { display: flex; justify-content: center; gap: .35em; flex-wrap: wrap; }
.sk-hint span { width: 1.4em; height: 1.7em; border-bottom: .14em solid var(--line-2); display: grid; place-items: center; font-family: var(--serif); font-size: 2.2em; text-transform: uppercase; color: var(--gold-2); }
.sk-hint span.on { border-bottom-color: var(--gold); }
.sk-hint i.gap { width: 1.2em; }
.sk-hint.sm span { font-size: 1.3em; }
.sk-drawing .sk-hint { margin-top: .4em; }
.sk-drawing, .sk-reveal { flex: 1; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 2.4em; align-items: center; padding: 0 1em 3em; }
.sk-board { display: flex; flex-direction: column; gap: 1em; min-width: 0; }
.sk-canvas-wrap { position: relative; max-width: calc((100svh - 24em) * 4 / 3); width: 100%; margin: 0 auto; }
.sk-artist { display: flex; align-items: center; gap: .6em; font-weight: 800; font-size: 1.2em; padding-right: 5em; }
.sk-letters { margin-left: auto; color: var(--muted); font-weight: 700; font-size: .85em; }
.sk-side { display: flex; flex-direction: column; gap: .8em; min-width: 0; align-self: stretch; justify-content: center; }
.sk-feed { display: flex; flex-direction: column; gap: .45em; max-height: 22em; overflow: hidden; justify-content: flex-end; }
.sk-msg { display: flex; align-items: center; gap: .6em; padding: .45em .8em; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-weight: 700; font-size: 1.1em; }
.sk-msg.close { color: var(--gold-2); border-color: rgba(201,169,110,.4); background: rgba(201,169,110,.08); }
.sk-msg.correct { color: var(--good); border-color: rgba(127,211,107,.45); background: rgba(127,211,107,.1); }
.sk-scores, .sk-gains { display: flex; flex-direction: column; gap: .4em; margin-top: .6em; }
.sk-score { display: flex; align-items: center; gap: .6em; padding: .4em .8em; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-weight: 700; }
.sk-score b { margin-left: auto; font-family: var(--serif); font-size: 1.15em; }
.sk-score b.plus { color: var(--good); font-family: var(--sans); }
.sk-score.got { border-color: rgba(127,211,107,.5); background: rgba(127,211,107,.08); }
.sk-score.drawer { border-color: color-mix(in srgb, var(--ga) 50%, transparent); }
.sk-word { font-family: var(--serif); font-size: 4.2em; line-height: 1; color: var(--gold-2); text-transform: capitalize; }
.sk-choosing { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5em; text-align: center; }
.sk-choosing h1 { font-family: var(--serif); font-weight: 500; font-size: 5em; margin: 0; }
.sk-choosing .pbar { width: 30em; margin-top: 1em; }
.sk-final { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; padding-bottom: 4em; }
.sk-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(13em, 1fr)); gap: 1em; max-height: calc(100svh - 12em); overflow: hidden; }
.sk-tile { display: flex; flex-direction: column; gap: .4em; }
.sk-tile .sk-paper { border-radius: 12px; }
.sk-tile-cap { display: flex; justify-content: space-between; align-items: baseline; gap: .5em; }
.sk-tile-cap b { text-transform: capitalize; }
.sk-tile-cap small { color: var(--muted); }
/* tutorial */
.sk-tstage { display: grid; grid-template-columns: 1fr 15em; grid-template-rows: 1fr; gap: 2em; align-items: center; }
.sk-tphone { position: absolute; left: 30%; top: 4%; width: 17em; height: 30em; }
.sk-tword { padding: 1em; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-2); display: flex; justify-content: space-between; align-items: center; }
.sk-tword small { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: .7em; font-weight: 800; }
.sk-tboard { display: flex; flex-direction: column; gap: 1em; }
.sk-tcanvas { width: 100%; max-width: 38em; }
.sk-thints { position: relative; height: 4em; }
.sk-thints .sk-hint { position: absolute; inset: 0; }
.tut-feed { align-self: center; }
/* phone */
.sketch .p-stage { gap: 10px; }
.sk-mine { display: flex; align-items: baseline; gap: 10px; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--ga) 14%, transparent); border: 1px solid color-mix(in srgb, var(--ga) 45%, transparent); }
.sk-mine small { color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .7em; }
.sk-mine b { font-family: var(--serif); font-size: 1.6em; text-transform: capitalize; }
.sk-tools { display: flex; flex-direction: column; gap: 10px; }
.sk-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.sk-swatch { aspect-ratio: 1; border-radius: 12px; background: var(--sw); border: 2px solid rgba(255,255,255,.15); cursor: pointer; }
.sk-swatch.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,169,110,.35); }
.sk-row { display: flex; gap: 8px; align-items: center; }
.sk-sizes { display: flex; gap: 8px; flex: 1; }
.sk-size { flex: 1; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); display: grid; place-items: center; cursor: pointer; }
.sk-size i { border-radius: 50%; background: var(--text); }
.sk-size.on { border-color: var(--gold); }
.icon-btn.armed { border-color: var(--bad); color: var(--bad); }
.sk-guessbar { display: flex; gap: 8px; position: sticky; bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); }
.sk-guessbar .btn { flex: none; width: 56px; padding: 0; }
.sk-input { font-size: 1.15em; }
.sk-close { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(201,169,110,.12); border: 1px solid rgba(201,169,110,.45); color: var(--gold-2); font-weight: 800; }
.sk-pick { display: flex; flex-direction: column; gap: 12px; }
.sk-pick h2 { font-family: var(--serif); font-weight: 500; font-size: 2.2em; margin: 0; }
.sk-choice { display: flex; justify-content: space-between; align-items: center; padding: 20px 18px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; }
.sk-choice b { font-family: var(--serif); font-size: 1.6em; font-weight: 500; text-transform: capitalize; }
.sk-choice small { font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .7em; padding: 4px 8px; border-radius: 99px; }
.sk-choice[data-tier="easy"] small { color: var(--good); background: rgba(127,211,107,.12); }
.sk-choice[data-tier="medium"] small { color: var(--gold-2); background: rgba(201,169,110,.14); }
.sk-choice[data-tier="hard"] small { color: var(--bad); background: rgba(242,126,99,.14); }
.sk-preveal .sk-word { font-size: 2.6em; margin-bottom: 8px; }
.sk-preveal .sk-paper { width: 100%; margin: 6px 0; }
@media (max-aspect-ratio: 1/1) {
  .sk-drawing, .sk-reveal, .sk-final { grid-template-columns: 1fr; }
  .sk-tstage { grid-template-columns: 1fr; }
  .display.sketch { padding-bottom: 6em; }
}

/* =================== REMOTE TABLES (landing) =================== */
.remote { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(229,56,59,.06), transparent 60%), var(--panel); }
.rm-head h2 { font-family: var(--serif); font-weight: 500; font-size: 1.6em; margin: 2px 0 4px; }
.rm-head p { margin: 0; font-size: .92em; }
.rm-mine { display: flex; flex-direction: column; gap: 8px; }
.rm-mine:empty { display: none; }
.rm-mine .section-head h3 { margin: 0; }
button.rm-saved { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; text-align: left; }
.rm-badge { font-family: ui-monospace, monospace; font-size: .85em; letter-spacing: .1em; color: var(--muted); margin-left: .6em; opacity: .7; }
.rm-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.rm-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-txt small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.rm-saved > .icon { flex-shrink: 0; color: var(--muted); }
button.rm-saved.turn { border-color: rgba(201,169,110,.45); box-shadow: inset 3px 0 0 var(--gold); }
button.rm-saved.turn > .icon { color: var(--gold-2); }
.rm-turn { flex-shrink: 0; white-space: nowrap; font-size: .72em; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-2); padding: .3em .7em; border-radius: 99px; background: rgba(201,169,110,.14); border: 1px solid rgba(201,169,110,.35); }
.rm-games { display: flex; flex-direction: column; gap: 10px; }
.rm-game { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--ga) 35%, transparent); background: color-mix(in srgb, var(--ga) 6%, transparent); }
.rm-game-txt { flex: 1; min-width: 10em; display: flex; flex-direction: column; }
.rm-game-txt b { font-family: var(--serif); font-size: 1.35em; font-weight: 600; }
.rm-game-txt span { color: var(--muted); font-size: .9em; }
.rm-game-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.rm-game-btns .btn { white-space: nowrap; }
.rm-seg { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rm-seg small { color: var(--muted); font-weight: 700; margin-right: 4px; }
.mono { font-family: ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; }

/* =================== RUMMY TABLE =================== */
.rummy-screen { --ga: #e5383b; max-width: 760px; margin: 0 auto; min-height: 100svh; display: flex; flex-direction: column; gap: 12px; padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px calc(env(safe-area-inset-bottom, 0px) + 14px); }
.rm-top { display: flex; align-items: center; gap: 10px; }
.rm-title { font-family: var(--serif); font-size: 1.4em; font-weight: 600; }
.rm-hand { color: var(--muted); font-weight: 700; font-size: .85em; }
.rm-opp, .rm-mine-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.rm-who { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 8em; position: relative; }
.rm-opp .rm-who { padding-left: 16px; }
.rm-who small { color: var(--muted); font-weight: 600; font-size: .8em; }
.rm-dot { position: absolute; left: 0; top: .45em; width: 9px; height: 9px; border-radius: 50%; background: var(--dim); }
.rm-dot.on { background: var(--good); box-shadow: 0 0 10px var(--good); }
.rm-backs { display: flex; align-items: center; }
.rm-backs small { margin-left: 8px; color: var(--muted); font-weight: 800; }
.rm-score { position: relative; width: 120px; height: 22px; border-radius: 99px; background: var(--line); overflow: hidden; display: grid; place-items: center; }
.rm-score i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--ga) 55%, transparent), var(--ga)); border-radius: 99px; }
.rm-score span { position: relative; font-size: .75em; font-weight: 800; }
.rm-table { display: flex; flex-wrap: wrap; gap: 10px; min-height: 84px; padding: 12px; border-radius: 18px; background: radial-gradient(120% 140% at 50% 0%, #17321f, #0d1b12); border: 1px solid rgba(127,211,107,.18); align-content: flex-start; }
.rm-empty { margin: auto; color: rgba(255,255,255,.35); font-weight: 600; }
.rm-meld { position: relative; display: flex; padding: 4px 6px; border-radius: 12px; border: 1px solid transparent; background: rgba(0,0,0,.18); cursor: default; }
.rm-meld .pc + .pc { margin-left: -22px; }
.rm-meld.theirs { background: rgba(0,0,0,.32); }
.rm-meld.target { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,169,110,.35), 0 0 24px rgba(201,169,110,.35); cursor: pointer; animation: rmPulse 1.4s ease-in-out infinite; }
@keyframes rmPulse { 50% { box-shadow: 0 0 0 4px rgba(201,169,110,.2), 0 0 30px rgba(201,169,110,.5); } }
.rm-plus { position: absolute; top: -10px; right: -10px; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: #1a1408; display: grid; place-items: center; }
.rm-plus .icon { width: 14px; height: 14px; }
.rm-piles { display: flex; justify-content: center; gap: 28px; }
.rm-pile { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; padding: 4px; cursor: default; border-radius: 14px; }
.rm-pile small { color: var(--muted); font-weight: 700; font-size: .8em; }
.rm-pile.go { cursor: pointer; }
.rm-pile.go .pc, .rm-pile.go .pc-back { box-shadow: 0 0 0 3px var(--gold), 0 0 26px rgba(201,169,110,.55); animation: rmPulse 1.4s ease-in-out infinite; }
.rm-status { text-align: center; min-height: 2.6em; display: flex; justify-content: center; }
.rm-status > div { display: flex; flex-direction: column; gap: 2px; }
.rm-status small { color: var(--muted); }
.rm-mine { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.rm-who > b { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.rm-who small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-hintflag { display: inline-block; white-space: nowrap; margin-left: 0; font-family: var(--sans); font-size: .62em; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; vertical-align: 2px; color: var(--muted); border: 1px solid var(--line-2); }
.rm-hintflag.on { color: var(--gold-2); border-color: rgba(201,169,110,.45); background: rgba(201,169,110,.1); }
.rm-toggles { display: flex; gap: 6px; }
.rm-toggles .btn.off { color: var(--muted); }
.rm-suggest { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rm-suggest small { color: var(--muted); font-weight: 700; margin-right: 4px; }
.rm-suggest .chip-btn { display: inline-flex; gap: 6px; padding: 6px 10px; }
.rm-handcards { display: flex; justify-content: center; padding: 34px 4px 4px; overflow-x: auto; }
.rm-handcards .pc + .pc { margin-left: -14px; }
.rm-handcards.tight .pc + .pc { margin-left: -26px; }
.rm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rm-actions .btn:disabled { opacity: .55; }
.rm-actions .btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-actions .btn.nudge { animation: rmPulse 1.4s ease-in-out infinite; }
.rummy-screen.waiting .rm-opp, .rummy-screen.waiting .rm-table, .rummy-screen.waiting .rm-piles, .rummy-screen.waiting .rm-mine { display: none; }
.rm-recovery { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; background: rgba(201,169,110,.06); border: 1px solid rgba(201,169,110,.3); }
.rm-recovery p { margin: 0; font-size: .88em; }
.rm-recovery b.mono { color: var(--gold-2); font-size: 1.15em; }
.rm-move { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: center; }
.rm-move-qr { width: 150px; height: 150px; border-radius: 12px; background: #fff; padding: 6px; }
.rm-move-codes { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 12em; }
.rm-movelink { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--muted); font-weight: 700; cursor: pointer; padding: 4px 0; }
.rm-movelink:hover { color: var(--gold-2); }
.rm-wait { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; margin-top: 10vh; }
.rm-wait h2 { font-family: var(--serif); font-weight: 500; font-size: 2em; margin: 0; }
.rm-invite { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 420px; padding: 14px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line-2); }
.rm-invite-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rm-invite-row small { color: var(--muted); font-weight: 700; }
.rm-invite-row b { font-size: 1.3em; color: var(--gold-2); }
.rm-invite-btns { display: flex; gap: 8px; justify-content: center; }
.rm-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(5,5,8,.72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.rm-result { position: relative; width: 100%; max-width: 440px; padding: 22px; border-radius: 24px; background: #111018; border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 10px; text-align: center; overflow: hidden; }
.rm-result h2 { font-family: var(--serif); font-weight: 500; font-size: 2em; margin: 0; }
.rm-result p { margin: 0; }
.rm-result .bl-mydelta small { font-family: var(--sans); font-size: .25em; color: var(--muted); }
.rm-left { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.rm-left small { color: var(--muted); font-weight: 700; }
.rm-left-cards { display: flex; flex-wrap: wrap; justify-content: center; }
.rm-left-cards .pc + .pc { margin-left: -16px; }
.rm-scores { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.rm-srow { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rm-srow .rm-score { width: 60%; }
.ctext { display: inline-flex; align-items: center; gap: 1px; font-weight: 800; margin: 0 2px; color: var(--text); }
.ctext.red { color: #ff6b6b; }
.ctext .suit { width: .95em; height: .95em; display: inline-flex; }
/* playing cards */
.pc { position: relative; flex: none; width: 58px; height: 84px; border-radius: 8px; background: #fbfaf6; color: #17161c; border: 1px solid rgba(0,0,0,.25); box-shadow: 0 6px 14px rgba(0,0,0,.45); padding: 0; cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s; }
.pc.red { color: #c8202a; }
.pc.small { width: 40px; height: 58px; border-radius: 6px; cursor: inherit; }
.pc .suit { display: inline-flex; }
.pc .suit svg { width: 100%; height: 100%; }
.pc-corner { position: absolute; top: 4px; left: 5px; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.pc-corner b { font-size: 15px; font-weight: 800; letter-spacing: -.04em; }
.pc-corner .suit { width: 12px; height: 12px; margin-top: 2px; }
.pc-corner.flip { top: auto; left: auto; bottom: 4px; right: 5px; transform: rotate(180deg); }
.pc .pc-big { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; transform: translate(-50%, -40%); opacity: .9; }
.pc.small .pc-corner b { font-size: 12px; }
.pc.small .pc-corner .suit { width: 9px; height: 9px; }
.pc.small .pc-corner.flip { display: none; }
.pc.small .pc-big { width: 18px; height: 18px; }
.pc.sel { transform: translateY(-30px); box-shadow: 0 0 0 3px var(--gold), 0 14px 26px rgba(0,0,0,.5); }
/* Rummy: selected cards bob and wiggle with a pulsing gold glow (same feel as Rummikub tiles). Transform only,
   so the hand never re-lays out. */
.rummy-play .pc.sel:not(.small) { z-index: 2; animation: pcBob .9s ease-in-out infinite, pcGlow 1.4s ease-in-out infinite; }
.rummy-play .pc.sel:not(.small):nth-child(even) { animation-delay: -.45s, -.7s; }
.rummy-play .pc.sel:not(.small):nth-child(3n) { animation-duration: 1.05s, 1.4s; }
@keyframes pcBob {
  0%, 100% { transform: translateY(-28px) rotate(0deg); }
  25% { transform: translateY(-38px) rotate(-4deg); }
  50% { transform: translateY(-30px) rotate(0deg); }
  75% { transform: translateY(-38px) rotate(4deg); }
}
@keyframes pcGlow {
  0%, 100% { box-shadow: 0 0 0 3px #f3c74f, 0 0 18px 3px rgba(243,199,79,.6), 0 14px 26px rgba(0,0,0,.5); }
  50% { box-shadow: 0 0 0 3px #ffe08a, 0 0 28px 7px rgba(243,199,79,.9), 0 14px 26px rgba(0,0,0,.5); }
}
@media (prefers-reduced-motion: reduce) { .rummy-play .pc.sel { animation: none; } }
.pc.fresh::after { content: 'new'; position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #1a1408; background: var(--gold); padding: 2px 5px; border-radius: 99px; }
.pc-back { width: 58px; height: 84px; border-radius: 8px; border: 1px solid rgba(201,169,110,.5); background: repeating-linear-gradient(45deg, #2a1416 0 6px, #3a1c1f 6px 12px); box-shadow: inset 0 0 0 4px #1a0d0e, inset 0 0 0 5px rgba(201,169,110,.5), 0 6px 14px rgba(0,0,0,.45); }
.pc-back.mini { width: 16px; height: 24px; border-radius: 3px; box-shadow: inset 0 0 0 2px #1a0d0e; }
.pc-back.mini + .pc-back.mini { margin-left: -8px; }
.pc-empty { width: 58px; height: 84px; border-radius: 8px; border: 2px dashed var(--line-2); }
@media (min-width: 700px) {
  .pc { width: 70px; height: 100px; }
  .pc-back, .pc-empty { width: 70px; height: 100px; }
  .pc .pc-big { width: 32px; height: 32px; }
  .pc-corner b { font-size: 17px; }
  .rm-handcards .pc + .pc { margin-left: -12px; }
  .rm-handcards.tight .pc + .pc { margin-left: -18px; }
}

/* =================== TABLE CHAT =================== */
.tc-tab { position: fixed; right: 0; top: 46%; z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 14px 0 0 14px; border: 1px solid var(--line-2); border-right: 0; background: rgba(17,16,24,.92); backdrop-filter: blur(10px); color: var(--gold-2); cursor: pointer; font-weight: 800; font-size: .72em; letter-spacing: .08em; text-transform: uppercase; box-shadow: -10px 10px 30px rgba(0,0,0,.4); }
.tc-tab .icon { width: 1.6em; height: 1.6em; }
.tc-badge { position: absolute; top: -8px; left: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11px; display: grid; place-items: center; letter-spacing: 0; }
.tc.open .tc-tab { display: none; }
.tc-panel { overscroll-behavior: contain; position: fixed; top: 0; right: 0; bottom: 0; z-index: 45; width: min(380px, 92vw); display: none; flex-direction: column; background: rgba(13,12,19,.96); backdrop-filter: blur(16px); border-left: 1px solid var(--line-2); box-shadow: -30px 0 60px rgba(0,0,0,.5); padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px calc(env(safe-area-inset-bottom, 0px) + 12px); }
.tc.open .tc-panel { display: flex; animation: tcIn .3s var(--ease); }
@keyframes tcIn { from { transform: translateX(40px); opacity: 0; } }
.tc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.tc-head h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.3em; }
.tc-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; display: flex; flex-direction: column; gap: 8px; padding: 12px 2px; }
.tc-empty { margin: auto; text-align: center; color: var(--muted); max-width: 26ch; font-size: .9em; }
.tc-msg { align-self: flex-start; max-width: 82%; display: flex; flex-direction: column; gap: 2px; }
.tc-msg.mine { align-self: flex-end; align-items: flex-end; }
.tc-text, .tc-voice { padding: 9px 12px; border-radius: 16px 16px 16px 4px; background: var(--panel-2); border: 1px solid var(--line); line-height: 1.35; overflow-wrap: anywhere; }
.tc-msg.mine .tc-text, .tc-msg.mine .tc-voice { border-radius: 16px 16px 4px 16px; background: rgba(201,169,110,.16); border-color: rgba(201,169,110,.35); }
.tc-voice { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.tc-voice small { color: var(--muted); font-weight: 600; }
.tc-voice > .icon { color: var(--gold); }
.tc-msg time { font-size: .7em; color: var(--dim); padding: 0 4px; }
.tc-play { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--gold); color: #1a1408; display: grid; place-items: center; cursor: pointer; flex: none; }
.tc-play.playing { animation: rmPulse 1s ease-in-out infinite; }
.tc-rechint { text-align: center; color: var(--bad); font-weight: 800; padding: 6px; }
.tc-form { display: flex; gap: 8px; align-items: center; }
.tc-input { flex: 1; font-size: 1em; padding: .8em 1em; }
.tc-send { width: 48px; height: 48px; padding: 0; flex: none; }
.tc-mic { position: relative; width: 48px; height: 48px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); display: grid; place-items: center; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tc-mic .icon { width: 22px; height: 22px; position: relative; }
.tc-mic.recording { background: var(--bad); border-color: var(--bad); color: #fff; transform: scale(1.12); }
.tc-rec-ring { --p: 0; position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(var(--bad) calc(var(--p) * 360deg), transparent 0); -webkit-mask: radial-gradient(circle, transparent 60%, #000 61%); mask: radial-gradient(circle, transparent 60%, #000 61%); }

/* quick reactions */
.tc-react { position: fixed; right: 0; top: calc(46% + 92px); z-index: 30; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px 0 0 14px; border: 1px solid var(--line-2); border-right: 0; background: rgba(17,16,24,.92); backdrop-filter: blur(10px); color: var(--gold-2); cursor: pointer; box-shadow: -10px 10px 30px rgba(0,0,0,.4); }
.tc-react .icon { width: 24px; height: 24px; }
.tc-react.on { background: var(--gold); color: #1a1408; }
.tc.open .tc-react, .tc.open .tc-wheel { display: none; }
.tc-wheel { position: fixed; right: 54px; top: calc(46% + 115px); z-index: 31; width: 0; height: 0; }
.tc-emo { --r: 118px; --a: calc(98deg + var(--i) * 20.5deg); position: absolute; left: 0; top: 0; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(17,16,24,.96); font-size: 28px; line-height: 1; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.5); transform: translate(calc(cos(var(--a)) * var(--r)), calc(sin(var(--a)) * var(--r) * -1)); }
.tc-emo:active { transform: translate(calc(cos(var(--a)) * var(--r)), calc(sin(var(--a)) * var(--r) * -1)) scale(.9); }
.tc-emoji { font-size: 2.4em; line-height: 1.1; padding: 2px 4px; }
.tc-burst { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.tc-burst span { position: absolute; left: 50%; bottom: 18%; font-size: calc(54px * var(--s)); transform: translateX(var(--x)); animation: tcBurst 1.9s var(--d) cubic-bezier(.2,.8,.3,1) both; }
@keyframes tcBurst { 0% { opacity: 0; transform: translate(var(--x), 40px) scale(.4); } 18% { opacity: 1; transform: translate(var(--x), -10vh) scale(1.15); } 100% { opacity: 0; transform: translate(var(--x), -55vh) scale(1); } }

.tc-emo.edit { width: 40px; height: 40px; margin: -20px 0 0 -20px; color: var(--gold-2); }
.tc-emo.edit .icon { width: 18px; height: 18px; }
.tc-pick-sheet .sheet-card { max-height: 88svh; overflow-y: auto; }
.tc-pick-count { color: var(--gold-2); font-weight: 800; }
.tc-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
.tc-pick { position: relative; aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: 26px; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.tc-pick.on { border-color: var(--gold); background: rgba(201,169,110,.16); box-shadow: 0 0 0 2px rgba(201,169,110,.35); }
.tc-pick b { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 99px; background: var(--gold); color: #1a1408; font: 800 11px/18px var(--sans); text-align: center; }
.tc-pick-btns { display: flex; gap: 8px; justify-content: center; }

.tc-pick-section { display: flex; flex-direction: column; gap: 6px; }
.tc-pick-section > small { color: var(--muted); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .7em; }
.tc-add-row { display: flex; gap: 8px; }
.tc-add { flex: 1; font-size: 1.2em; padding: .6em .9em; }
.tc-pick-grid.own:empty { display: none; }
.tc-pick-grid.own small { grid-column: 1 / -1; }
.tc-pick-wrap { position: relative; }
.tc-pick-wrap .tc-pick { width: 100%; }
.tc-pick-del { position: absolute; top: -6px; left: -6px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-2); background: #1b1a22; color: var(--muted); display: grid; place-items: center; padding: 0; cursor: pointer; }
.tc-pick-del .icon { width: 11px; height: 11px; }

/* Opponent tile: fixed slots so nothing moves when the status text or card count changes. */
.rm-opp { display: grid; grid-template-columns: minmax(0, 1fr) 132px; grid-template-rows: 26px 22px; gap: 6px 14px; align-items: center; flex-wrap: nowrap; }
.rm-opp-name { display: flex; align-items: center; gap: 8px; min-width: 0; height: 26px; }
.rm-opp-name .rm-dot { position: static; flex: none; }
.rm-opp-name b { font-size: 1.05em; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-opp-name .rm-hintflag { flex: none; }
.rm-opp-status { grid-column: 1; grid-row: 2; padding-left: 17px; color: var(--muted); font-weight: 600; font-size: .82em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-opp-status.away { color: var(--dim); }
.rm-opp-cards { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: 1fr 22px; align-items: center; gap: 6px; height: 26px; }
.rm-opp-cards .rm-backs { --n: 10; display: flex; justify-content: flex-end; overflow: hidden; height: 24px; }
/* Mini backs squeeze together as the hand grows, so the fan never changes width. */
.rm-opp-cards .pc-back.mini + .pc-back.mini { margin-left: calc(-16px + min(8px, 88px / max(var(--n), 1))); }
.rm-opp-count { text-align: right; color: var(--muted); font-weight: 800; font-variant-numeric: tabular-nums; }
.rm-opp .rm-score { grid-column: 2; grid-row: 2; width: 100%; }

.rm-hist { display: flex; flex-direction: column; gap: 4px; max-height: 180px; overflow-y: auto; }
.rm-hist-row { display: grid; grid-template-columns: 4.5em 1fr auto; gap: 8px; font-size: .88em; padding: 4px 0; border-bottom: 1px solid var(--line); }
.rm-hist-row span:first-child { color: var(--muted); }
.rm-hist-tot { font-variant-numeric: tabular-nums; color: var(--gold-2); font-weight: 700; }

/* Rummy 500 */
.rm-pile-fan { max-width: 62%; }
.rm-fan { display: flex; align-items: flex-end; overflow-x: auto; max-width: 100%; padding: 6px 4px 4px; scrollbar-width: none; }
.rm-fan::-webkit-scrollbar { display: none; }
.rm-fan .pc { flex: none; }
.rm-fan .pc.small + .pc, .rm-fan .pc + .pc { margin-left: -18px; }
.rm-fan.go .pc { box-shadow: 0 0 0 2px rgba(201,169,110,.55), 0 6px 14px rgba(0,0,0,.45); }
.rm-fan.go .pc:last-child { box-shadow: 0 0 0 3px var(--gold), 0 0 26px rgba(201,169,110,.55); }
.rm-dig-cards { display: flex; justify-content: center; flex-wrap: wrap; padding: 14px 0 4px; }
.rm-dig-cards .pc + .pc { margin-left: -14px; }
.rm-dig-cards .pc.sel { transform: translateY(-10px); }
.rm-switch { color: var(--gold-2); font-weight: 700; }
.rm-rules-hint { color: var(--muted); margin-top: -6px; }
.rm-r500 { display: flex; flex-direction: column; gap: 6px; margin: 4px 0; }
.rm-r500-row { display: grid; grid-template-columns: 1fr 4.5em 4.5em 5em; gap: 8px; align-items: center; text-align: right; font-variant-numeric: tabular-nums; }
.rm-r500-row b { text-align: left; }
.rm-r500-row.head span { color: var(--muted); font-size: .72em; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.rm-r500-row .minus { color: var(--bad); }
.rm-r500-row .net { font-weight: 800; color: var(--good); font-size: 1.1em; }
.rm-r500-row .net.neg { color: var(--bad); }

.rm-top .rm-title, .rm-top .rm-hand { white-space: nowrap; }
.rm-top .rm-title { font-size: 1.25em; }
.rm-status { padding: 0 56px; }

/* =================== CRIBBAGE =================== */
.crib-screen { --ga: #c9a96e; }
.cb-board { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 6px; border-radius: 16px; background: linear-gradient(180deg, #2a1d10, #1b130b); border: 1px solid rgba(201,169,110,.35); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.cb-lane { display: grid; grid-template-columns: 4.6em 1fr 2.6em; align-items: center; gap: 10px; }
.cb-lane-name { font-weight: 800; font-size: .82em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-lane.me .cb-lane-name { color: var(--gold-2); }
.cb-lane-score { text-align: right; font-family: var(--serif); font-size: 1.15em; font-variant-numeric: tabular-nums; }
.cb-track { position: relative; height: 14px; border-radius: 99px; background: repeating-linear-gradient(90deg, rgba(0,0,0,.45) 0 2px, transparent 2px 100%), rgba(0,0,0,.35); background-size: calc(100% / 24) 100%; box-shadow: inset 0 1px 3px rgba(0,0,0,.6); }
.cb-skunk { position: absolute; top: -3px; bottom: -3px; width: 2px; background: rgba(242,126,99,.6); }
.cb-peg { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; transition: left .6s var(--ease); }
.cb-peg.front { background: #e5383b; box-shadow: 0 0 0 2px #1b130b, 0 0 10px rgba(229,56,59,.6); z-index: 2; }
.cb-peg.back { background: #7a2a2c; box-shadow: 0 0 0 2px #1b130b; }
.cb-lane.me .cb-peg.front { background: var(--gold); box-shadow: 0 0 0 2px #1b130b, 0 0 10px rgba(201,169,110,.7); }
.cb-lane.me .cb-peg.back { background: #7c6640; }
.cb-board-foot { display: flex; justify-content: space-between; padding: 0 2.6em 0 5.3em; color: var(--dim); font-size: .7em; }
.cb-play { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 18px; background: radial-gradient(120% 140% at 50% 0%, #17321f, #0d1b12); border: 1px solid rgba(127,211,107,.18); }
.cb-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.cb-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cb-slot small { color: rgba(255,255,255,.55); font-weight: 700; font-size: .78em; white-space: nowrap; }
.cb-crib { display: flex; height: 84px; align-items: center; }
.cb-crib .pc-back.mini2 { width: 40px; height: 58px; border-radius: 6px; }
.cb-crib .pc-back.mini2 + .pc-back.mini2 { margin-left: -28px; }
.cb-count { display: flex; flex-direction: column; align-items: center; min-width: 5.5em; }
.cb-count b { font-family: var(--serif); font-size: 3em; line-height: 1; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.cb-count small { color: rgba(255,255,255,.55); font-weight: 700; font-size: .75em; }
.cb-count.idle b { font-size: 2em; color: var(--text); }
.cb-seq { display: flex; justify-content: center; min-height: 62px; align-items: center; }
.cb-seq .pc + .pc { margin-left: -14px; }
.cb-seq.empty small { color: rgba(255,255,255,.45); }
.cb-events { display: flex; flex-direction: column; gap: 2px; text-align: center; font-size: .85em; color: rgba(255,255,255,.75); min-height: 3.6em; }
.cb-pts { color: var(--gold-2); }
.crib-screen .pc.dim { opacity: .38; }
.cb-result { max-height: calc(100svh - 32px); overflow-y: auto; overscroll-behavior: contain; text-align: left; }
.cb-result h2, .cb-result .kicker { text-align: center; }
.cb-part { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.cb-part-head { display: flex; justify-content: space-between; align-items: baseline; }
.cb-part-total { color: var(--good); font-size: 1.2em; }
.cb-part-cards { display: flex; align-items: center; flex-wrap: wrap; }
.cb-part-cards .pc + .pc { margin-left: -12px; }
.cb-plus { margin: 0 8px; color: var(--muted); font-weight: 800; }
.cb-items { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.cb-item { display: inline-flex; align-items: center; gap: 2px; padding: 3px 8px; border-radius: 99px; background: var(--panel-2); font-size: .8em; font-weight: 700; }
.cb-item b { color: var(--gold-2); margin-left: 4px; }
.cb-item.none { color: var(--muted); }

/* ---- Mind Meld (remote co-op word game) */
.mm-screen { --mm: #8e7cc3; gap: 14px; }
.mm-screen.waiting .mm-status { display: block; }
.mm-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 14px 18px; border-radius: 20px; background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--mm) 22%, transparent), transparent 70%), var(--panel); border: 1px solid color-mix(in srgb, var(--mm) 35%, transparent); text-align: center; }
.mm-stage:empty { display: none; }
.mm-start h2 { font-family: var(--serif); font-size: 2em; margin: .2em 0; }
.mm-start p { max-width: 28em; margin: 0 auto; }
.mm-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; width: 100%; }
.mm-word { display: flex; flex-direction: column; gap: 4px; padding: 14px 8px; border-radius: 16px; background: rgba(0,0,0,.35); border: 1px solid var(--line-2); min-width: 0; }
.mm-word small { color: var(--muted); font-size: .72em; letter-spacing: .14em; text-transform: uppercase; }
.mm-word b { font-family: var(--serif); font-size: clamp(1.3em, 6vw, 1.9em); color: var(--gold-2); overflow-wrap: anywhere; line-height: 1.15; }
.mm-plus { font-family: var(--serif); font-size: 1.6em; color: var(--mm); }
.mm-prompt { margin: 0; color: var(--muted); }
.mm-prompt:empty { display: none; }
.mm-status { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); min-height: 1.6em; }
.mm-status .mm-in { color: var(--gold-2); }
.mm-status .icon { width: 1em; height: 1em; color: var(--gold); }
.mm-entry { display: flex; flex-direction: column; gap: 10px; }
.mm-form { display: flex; gap: 8px; }
.mm-form .mm-input { flex: 1; min-width: 0; font-size: 1.15em; }
.mm-form .btn { flex: none; }
.mm-locked { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(201,169,110,.08); border: 1px solid rgba(201,169,110,.35); }
.mm-locked div { display: flex; flex-direction: column; min-width: 0; }
.mm-locked small { color: var(--muted); font-size: .75em; }
.mm-locked b { font-size: 1.25em; color: var(--gold-2); overflow-wrap: anywhere; }
.mm-wait { text-align: center; margin: 0; }
.mm-link { background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font: inherit; font-size: .9em; padding: 4px; cursor: pointer; align-self: center; }
.mm-asked { text-align: center; }
.mm-claim { padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--mm) 14%, transparent); border: 1px solid color-mix(in srgb, var(--mm) 45%, transparent); }
.mm-claim p { margin: 0 0 10px; }
.mm-claim b { color: var(--gold-2); }
.mm-chain { display: flex; flex-direction: column; gap: 4px; }
.mm-chain-head { color: var(--muted); letter-spacing: .14em; text-transform: uppercase; font-size: .7em; margin-bottom: 2px; }
.mm-link-row { display: grid; grid-template-columns: 1.8em 1fr auto 1fr; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 10px; background: var(--panel); font-size: .92em; }
.mm-link-row span { overflow-wrap: anywhere; }
.mm-link-row span:last-child { text-align: right; }
.mm-link-row i { color: var(--mm); font-style: normal; }
.mm-rn { color: var(--muted); font-size: .8em; }
.mm-result h2 { overflow-wrap: anywhere; }
.mm-path { display: flex; flex-direction: column; gap: 4px; max-height: 32vh; overflow-y: auto; margin: 6px 0; text-align: left; }
.mm-statrow { display: flex; gap: 8px; justify-content: center; }
.mm-stat { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px; border-radius: 12px; background: rgba(0,0,0,.3); }
.mm-stat b { font-family: var(--serif); font-size: 1.4em; color: var(--gold-2); }
.mm-stat small { color: var(--muted); font-size: .72em; }
.mm-claim .btn { white-space: nowrap; }
.mm-status .rm-dot { position: static; flex: none; }

/* ---- Wordstorm (Boggle-style word hunt) */
.cover-wordstorm .ws-ct rect { fill: rgba(255,255,255,.06); stroke: currentColor; stroke-opacity: .5; stroke-width: 1.4; }
.cover-wordstorm .ws-ct text { fill: var(--text); font: 700 20px var(--serif, serif); text-anchor: middle; opacity: .85; }
.cover-wordstorm .ws-ct { animation: wsDrop 4s ease-in-out infinite; animation-delay: var(--d); }
.cover-wordstorm .ws-ctrail { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; opacity: .8; stroke-dasharray: 200; stroke-dashoffset: 200; animation: doodle 4s ease-in-out infinite; }
@keyframes wsDrop { 0%, 100% { transform: translateY(0); } 8% { transform: translateY(-3px); } 16% { transform: translateY(0); } }

.ws-grid { --n: 4; position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); width: 100%; user-select: none; -webkit-user-select: none; }
.ws-tile { position: relative; display: grid; place-items: center; aspect-ratio: 1; margin: 5%; border-radius: 18%; background: linear-gradient(180deg, #f6f1e4, #ddd3bc); box-shadow: 0 .25em 0 #a99a78, 0 .5em 1em rgba(0,0,0,.45); color: #1b1712; transition: background .12s, box-shadow .12s; z-index: 1; }
.ws-tile span { font-family: var(--serif); font-weight: 700; font-size: calc(var(--fs, 1em) * 1); line-height: 1; }
.ws-tile.on { background: linear-gradient(180deg, var(--gold-2), var(--gold)); transform: translateY(2px); box-shadow: 0 .12em 0 #8a7041, 0 .3em .6em rgba(0,0,0,.4); }
.ws-tile.good { background: linear-gradient(180deg, #b9f0a8, #7fd36b); }
.ws-tile.dup { background: linear-gradient(180deg, #d9d4c8, #a9a395); }
.ws-tile.bad { background: linear-gradient(180deg, #f6b3a3, #f27e63); animation: wsShake .3s; }
.ws-tile.blank { background: linear-gradient(180deg, #3a3542, #25212c); box-shadow: 0 .25em 0 #15131a, 0 .5em 1em rgba(0,0,0,.45); }
.ws-trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; overflow: visible; }
.ws-trail polyline { fill: none; stroke: rgba(201,169,110,.75); stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; }
.ws-trail[data-state="good"] polyline { stroke: rgba(127,211,107,.8); }
.ws-trail[data-state="dup"] polyline { stroke: rgba(200,195,185,.6); }
.ws-trail[data-state="bad"] polyline { stroke: rgba(242,126,99,.8); }
.ws-grid.shaking .ws-tile { animation: wsRattle .5s infinite; }
.ws-grid.shaking .ws-tile:nth-child(odd) { animation-delay: -.25s; }
@keyframes wsRattle { 0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-4%, 3%) rotate(-8deg); } 50% { transform: translate(3%, -3%) rotate(6deg); } 75% { transform: translate(-2%, -4%) rotate(-4deg); } }
@keyframes wsShake { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(-6%); } 70% { transform: translateX(6%); } }

/* TV */
.wordstorm.display .ws-grid.big { width: min(44em, 62vh); }
.wordstorm.display .ws-grid.big .ws-tile span { font-size: calc(min(44em, 62vh) / var(--n) * .5); }
.ws-shake, .ws-play { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5em; }
.ws-shake-side, .ws-play-side { display: flex; flex-direction: column; gap: .8em; min-width: 18em; }
.ws-shake-side h2 { font-family: var(--serif); font-size: 2.6em; margin: 0; }
.ws-count { font-family: var(--serif); font-size: 7em; color: var(--ga); line-height: 1; }
.ws-clock { display: flex; flex-direction: column; gap: .5em; margin-bottom: 1.2em; }
.ws-clock b { font-family: var(--serif); font-size: 5.5em; line-height: 1; font-variant-numeric: tabular-nums; }
.ws-clock-bar { height: .5em; border-radius: 1em; background: var(--line); overflow: hidden; }
.ws-clock-bar i { display: block; height: 100%; background: var(--ga); transform-origin: left; }
.ws-clock.urgent b { color: var(--bad); animation: thump 1s infinite; }
.ws-clock.urgent .ws-clock-bar i { background: var(--bad); }
.ws-counts { display: flex; flex-direction: column; gap: .5em; }
.ws-countrow { display: flex; align-items: center; gap: .7em; padding: .5em .8em; border-radius: .8em; background: var(--panel); border: 1px solid var(--line); font-size: 1.2em; }
.ws-countrow span { flex: 1; }
.ws-countrow b { font-family: var(--serif); font-size: 1.4em; color: var(--pc); font-variant-numeric: tabular-nums; }
.ws-reveal { flex: 1; display: grid; grid-template-columns: 22em 1fr; gap: 3em; min-height: 0; }
.ws-right { display: flex; flex-direction: column; gap: 1em; min-height: 0; }
.ws-reveal-side { display: flex; flex-direction: column; gap: 1.2em; }
.ws-grid.small { width: 100%; }
.ws-grid.small .ws-tile span { font-size: 2.2em; }
.ws-reveal-side .ws-grid.small .ws-tile span { font-size: calc(22em / var(--n) * .42); }
.ws-longest b { display: block; font-family: var(--serif); font-size: 2.4em; color: var(--gold-2); letter-spacing: .05em; }
.ws-longest small { color: var(--muted); }
.ws-pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(22em, 1fr)); gap: 1em; align-content: start; overflow-y: auto; min-height: 0; }
.ws-pcard { padding: 1em 1.2em; border-radius: 1em; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--pc); }
.ws-pcard-head { display: flex; align-items: center; gap: .6em; margin-bottom: .7em; }
.ws-pcard-head b { flex: 1; font-size: 1.15em; }
.ws-pcard-pts { font-family: var(--serif); font-size: 1.8em; color: var(--good); }
.ws-pcard-head small { color: var(--muted); }
.ws-chips { display: flex; flex-wrap: wrap; gap: .4em; }
.ws-chip { display: inline-flex; align-items: baseline; gap: .35em; padding: .25em .6em; border-radius: .5em; background: rgba(201,169,110,.12); border: 1px solid rgba(201,169,110,.3); color: var(--gold-2); font-weight: 600; }
.ws-chip small { font-size: .75em; color: var(--muted); font-weight: 700; }
.ws-chip.big { background: rgba(127,211,107,.14); border-color: rgba(127,211,107,.4); color: #c6f0b8; }
.ws-chip.shared { background: transparent; border-color: var(--line); color: var(--dim); text-decoration: line-through; }
.ws-chip.missed { background: rgba(90,169,242,.1); border-color: rgba(90,169,242,.35); color: #b9daf9; }
.ws-missed .kicker, .ws-longest .kicker { display: block; margin-bottom: .5em; }
/* tutorial */
.ws-tstage { display: flex; align-items: center; justify-content: center; }
.ws-tgrid { position: relative; width: 26em; }
.ws-tgrid .ws-tile span { font-size: 3.2em; }
.ws-bubble { position: absolute; left: 50%; top: -3.4em; transform: translateX(-50%); display: flex; align-items: baseline; gap: .5em; padding: .5em 1em; border-radius: 1em; background: #0c0c12; border: 1px solid var(--good); white-space: nowrap; z-index: 6; }
.ws-bubble b { font-family: var(--serif); font-size: 1.6em; letter-spacing: .06em; }
.ws-bubble small { color: var(--good); font-weight: 800; font-size: 1.2em; }
.ws-tcards { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 1em; width: 20em; }
.ws-tcard { padding: 1em; border-radius: 1em; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--pc); }
.ws-tcard-head { display: flex; align-items: center; gap: .6em; margin-bottom: .6em; }
.ws-tcard .ws-chip { font-size: 1.3em; }
.ws-ttable { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: grid; grid-template-columns: repeat(2, 9em); gap: .7em; }
.ws-ttable div { display: flex; flex-direction: column; align-items: center; padding: .8em; border-radius: .9em; background: var(--panel); border: 1px solid var(--line); }
.ws-ttable b { font-family: var(--serif); font-size: 2.2em; color: var(--gold-2); }
.ws-ttable small { color: var(--muted); }

/* Phone */
.wordstorm.phone.ws-playmode { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); overscroll-behavior: none; }
.ws-playmode .p-stage { gap: 10px; }
.ws-grid.touch { touch-action: none; max-width: min(100%, 52svh); margin: 0 auto; }
.ws-grid.touch .ws-tile span { font-size: min(9.5vw, 2.6rem); }
.ws-grid.touch.ws-n5 .ws-tile span { font-size: min(7.5vw, 2rem); }
.ws-grid.touch.ws-n6 .ws-tile span { font-size: min(6.4vw, 1.7rem); }
.ws-grid.touch.ws-n6 .ws-tile { margin: 4%; }
.ws-word { height: 2.6em; display: flex; align-items: center; justify-content: center; gap: .5em; }
.ws-word b { font-family: var(--serif); font-size: 1.9em; letter-spacing: .08em; color: var(--gold-2); }
.ws-word small { font-weight: 800; color: var(--muted); }
.ws-word.good b, .ws-word.good small { color: var(--good); }
.ws-word.dup b { color: var(--dim); }
.ws-word.bad b, .ws-word.bad small { color: var(--bad); }
.ws-stat { display: flex; align-items: baseline; justify-content: center; gap: .4em; color: var(--muted); }
.ws-stat b { font-family: var(--serif); font-size: 1.4em; color: var(--text); }
.ws-stat i { width: 1px; height: 1em; background: var(--line-2); margin: 0 .5em; align-self: center; }
.ws-found { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-height: 22svh; overflow-y: auto; }
.ws-found .ws-chip { font-size: .9em; }
.phone-shake { width: min(70vw, 300px); margin: 18px 0; }
.ws-presult { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding-top: 10px; }
.ws-presult .ws-chips { justify-content: center; }
.ws-presult .ws-missed { margin-top: 10px; }

/* TV lobby on a landscape screen: everything fits one screen, no scrolling. Sizes follow whichever of width or
   height is tighter, so a 16:9 TV, a laptop or a 4:3 projector all fit. */
@media (min-aspect-ratio: 1/1) {
  .d-lobby { font-size: clamp(11px, min(.92vw, 1.64vh), 30px); height: 100svh; overflow: hidden; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.6fr); grid-template-rows: auto minmax(0, 1fr); column-gap: 3em; padding-bottom: 1.6em; }
  .d-lobby .lobby-main { min-height: 0; padding-bottom: 0; }
  /* Left column: players on top, then how to join. */
  .d-lobby { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr); }
  .d-lobby .join-panel { align-self: stretch; justify-content: flex-start; gap: 1em; padding-top: 0; min-height: 0; padding-bottom: 5.4em; }
  .d-lobby .lobby-roster { width: 100%; margin-bottom: .6em; }
  .d-lobby .join-panel .join-kicker { margin-top: auto; }
  .d-lobby .join-panel .qr-wrap { margin-bottom: auto; }
  .d-lobby .qr-card { width: 10em; height: 10em; }
  .d-lobby .qr-wrap { font-size: 1.05em; }
  .d-lobby .code-tiles.xl { font-size: 5em; }
  .d-lobby .join-url { font-size: 2.4em; }
  .d-lobby .section-head { margin: 1em 0 .6em; }
  .d-lobby .lobby-players { gap: .8em 1em; min-height: 0; }
  .d-lobby .lobby-player { width: 4.9em; }
  .d-lobby .lobby-players .avatar.lg { --s: 3.9em; }
  .d-lobby .game-shelf { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .d-lobby .game-shelf .cover { aspect-ratio: 16 / 8.5; }
  .d-lobby .game-tile-text { padding: .65em .9em .8em; }
  .d-lobby .game-tile-text b { font-size: 1.25em; }
  .d-lobby .game-tile-text span { font-size: .88em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
  .d-lobby .game-detail { flex: 1; min-height: 0; overflow: hidden; margin-top: 1em; padding: 1.1em 1.4em; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); gap: 1.6em; }
  .d-lobby .detail-text h3 { font-size: 2.6em; }
  .d-lobby .detail-text p { font-size: 1.12em; }
  .d-lobby .settings { gap: 1em; align-content: start; font-size: 1.12em; }
  /* A game with a lot of settings (Earworm) scrolls them inside the panel. */
  .d-lobby .game-detail { grid-template-rows: minmax(0, 1fr); }
  .d-lobby .settings { min-height: 0; overflow-y: auto; scrollbar-width: thin; padding-right: .4em; }
  .d-lobby .setting { grid-template-columns: 7.5em 1fr; }
  .d-lobby .setting-label { font-size: 1em; }
  .d-lobby .seg { padding: .5em .95em; font-size: .9em; }
  /* Opening "How to play" swaps out the description instead of pushing the page down. */
  .d-lobby .detail-text:has(.how[open]) > p { display: none; }
  .d-lobby .detail-text .how { margin-bottom: 1em; }
  .d-lobby .rules { font-size: 1em; gap: .35em; }
  .d-lobby .last-results { margin-top: .6em; }
}

/* ---- One Clue (Just One-style co-op word game) */
.avatar.xs { --s: 1.4em; font-size: .7em; }
.cover-oneclue .oc-hidden rect { fill: rgba(242,161,78,.14); stroke: var(--ga); stroke-width: 2; }
.cover-oneclue .oc-hidden text { fill: var(--ga); font: 700 30px var(--serif, serif); text-anchor: middle; }
.cover-oneclue .oc-cc rect { fill: rgba(255,255,255,.06); stroke: currentColor; stroke-opacity: .5; stroke-width: 1.4; }
.cover-oneclue .oc-cc line { stroke: currentColor; stroke-width: 3; stroke-linecap: round; opacity: .55; }
.cover-oneclue .oc-cc .x { stroke: #f27e63; stroke-width: 3; stroke-linecap: round; fill: none; }
.cover-oneclue .oc-cc { animation: wsDrop 4s ease-in-out infinite; animation-delay: var(--d); }
.cover-oneclue .oc-cc.out { opacity: .6; }

.oc-score { display: flex; align-items: baseline; gap: .35em; padding: .35em .9em; border-radius: 99px; background: rgba(242,161,78,.12); border: 1px solid rgba(242,161,78,.35); }
.oc-score small { color: var(--muted); font-size: .75em; }
.oc-score b { font-family: var(--serif); font-size: 1.5em; color: var(--ga); }
.oc-cards { display: flex; flex-wrap: wrap; gap: .9em; justify-content: center; perspective: 800px; }
.oc-card { position: relative; min-width: 9em; padding: 1em 1.3em; border-radius: .9em; background: linear-gradient(180deg, #fbf7ee, #e9dfca); color: #1b1712; box-shadow: 0 .3em 0 #b3a27e, 0 1em 2em rgba(0,0,0,.4); display: flex; flex-direction: column; align-items: center; gap: .35em; border-top: .35em solid var(--pc, var(--ga)); }
.oc-card b { font-family: var(--serif); font-size: 1.7em; letter-spacing: .02em; text-transform: uppercase; overflow-wrap: anywhere; text-align: center; }
.oc-card .oc-by { display: inline-flex; align-items: center; gap: .35em; font-size: .8em; color: #5b5244; font-weight: 700; }
.oc-card .oc-why { font-size: .75em; font-weight: 800; color: #b5462f; text-transform: uppercase; letter-spacing: .08em; }
.oc-card.out { background: linear-gradient(180deg, #4a4452, #37323e); color: var(--dim); box-shadow: 0 .3em 0 #1d1a22; }
.oc-card.out b { text-decoration: line-through; }
.oc-card.out .oc-by { color: var(--dim); }
.oc-card.out .oc-why { color: #f27e63; }
.oc-card.down { min-width: 7em; min-height: 5.2em; justify-content: center; background: repeating-linear-gradient(45deg, #2b2733, #2b2733 .6em, #322d3b .6em, #322d3b 1.2em); box-shadow: 0 .3em 0 #15131a; color: var(--dim); border-top-color: transparent; }
.oc-card.down .icon { width: 1.6em; height: 1.6em; }
.oc-cards.big .oc-card { min-width: 12em; padding: 1.5em 1.8em; }
.oc-cards.big .oc-card b { font-size: 2.6em; }
.oc-cards.big .oc-card.down { min-width: 10em; min-height: 7.5em; }
.oc-wait { flex: 1; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 4em; }
.oc-guesser { display: flex; align-items: center; gap: 1.6em; }
.oc-guesser .avatar.xl { --s: 8em; box-shadow: 0 0 0 .3em color-mix(in srgb, var(--pc) 40%, transparent), 0 0 4em color-mix(in srgb, var(--pc) 50%, transparent); }
.oc-guesser h2 { font-family: var(--serif); font-size: 3em; margin: .1em 0; }
.oc-wait-side { display: flex; flex-direction: column; align-items: flex-start; gap: 1.2em; position: relative; }
.oc-wait-side .timer-ring { position: relative; top: auto; right: auto; }
.oc-wait-side .oc-cards { justify-content: flex-start; }
.oc-wait-side .pbar { width: 100%; }
.oc-guess { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 3em; }
.oc-guess-head { display: flex; align-items: center; gap: 1.4em; justify-content: center; }
.oc-guess-head h2 { font-family: var(--serif); font-size: 2.8em; margin: .1em 0 0; }
.oc-guess-head .timer-ring { position: relative; top: auto; right: auto; margin-left: 2em; }
.oc-result { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2.2em; text-align: center; }
.oc-result .pbar { width: min(40em, 80%); }
.oc-word { font-family: var(--serif); font-size: 5.5em; margin: .05em 0 .1em; color: var(--gold-2); text-transform: uppercase; letter-spacing: .03em; }
.oc-verdict { display: inline-flex; align-items: center; gap: .5em; font-size: 1.8em; }
.oc-verdict .icon { width: 1.2em; height: 1.2em; }
.oc-result.right .oc-verdict, .oc-verdict.right { color: var(--good); }
.oc-result.miss .oc-verdict, .oc-verdict.miss { color: var(--bad); }
.oc-close { color: var(--gold-2); font-weight: 700; }
.oc-final .oc-big { font-size: 7em; color: var(--ga); }
.oc-final .oc-big small { font-size: .4em; color: var(--muted); }
.oc-history { display: grid; grid-template-columns: repeat(auto-fill, minmax(11em, 1fr)); gap: .5em; align-content: start; }
.oc-hrow { display: flex; align-items: center; gap: .5em; padding: .5em .8em; border-radius: .7em; background: var(--panel); border: 1px solid var(--line); }
.oc-hrow b { flex: 1; text-transform: uppercase; letter-spacing: .03em; }
.oc-hrow small { color: var(--muted); }
.oc-hrow.right .icon { color: var(--good); } .oc-hrow.wrong .icon { color: var(--bad); } .oc-hrow.pass .icon { color: var(--dim); }
/* tutorial */
.oc-tstage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6em; }
.oc-tguesser { display: flex; align-items: center; gap: .8em; }
.oc-tguesser b { font-size: 1.4em; } .oc-tguesser small { color: var(--muted); }
.oc-secret { display: flex; flex-direction: column; align-items: center; padding: .8em 2em; border-radius: 1em; border: 1px dashed var(--ga); }
.oc-secret small { color: var(--muted); } .oc-secret b { font-family: var(--serif); font-size: 2.6em; color: var(--ga); letter-spacing: .05em; }
.oc-tguess { display: flex; align-items: center; gap: .8em; padding: .8em 1.6em; border-radius: 1em; background: rgba(127,211,107,.12); border: 1px solid rgba(127,211,107,.4); }
.oc-tguess b { font-family: var(--serif); font-size: 2em; } .oc-tguess small { color: var(--muted); }
.oc-ok { display: grid; place-items: center; width: 2em; height: 2em; border-radius: 50%; background: var(--good); color: #10200c; }
.oc-tscore { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 1.4em; }
.oc-tscore div { display: flex; flex-direction: column; align-items: center; padding: 1.2em 2em; border-radius: 1em; background: var(--panel); border: 1px solid var(--line); }
.oc-tscore b { font-family: var(--serif); font-size: 3em; color: var(--gold-2); } .oc-tscore small { color: var(--muted); }
/* phone */
.oc-center { text-align: center; margin: 0; }
.oc-pword { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px; border-radius: 16px; background: linear-gradient(180deg, rgba(242,161,78,.16), rgba(242,161,78,.05)); border: 1px solid rgba(242,161,78,.4); }
.oc-pword small { color: var(--muted); font-size: .75em; letter-spacing: .14em; text-transform: uppercase; }
.oc-pword b { font-family: var(--serif); font-size: 2.3em; color: #f6c48e; text-transform: uppercase; letter-spacing: .03em; overflow-wrap: anywhere; text-align: center; }
.oc-input { font-size: 1.25em; text-align: center; }
.oc-mine { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.oc-mine small { color: var(--muted); }
.oc-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.oc-chip { padding: 8px 14px; border-radius: 10px; background: #f3ecdc; color: #1b1712; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.oc-chips.big .oc-chip { font-size: 1.3em; padding: 12px 18px; }
.oc-review { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.oc-rclue { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: 12px; background: #f3ecdc; color: #1b1712; border: 2px solid transparent; font: inherit; cursor: pointer; }
.oc-rclue b { text-transform: uppercase; letter-spacing: .04em; overflow-wrap: anywhere; }
.oc-rclue small { color: #6b6252; font-size: .75em; font-weight: 700; }
.oc-rclue.mine { border-color: var(--ga); }
.oc-rclue.out { background: #2c2832; color: var(--dim); }
.oc-rclue.out b { text-decoration: line-through; }
.oc-rclue.out small { color: #f27e63; }
.oc-you h2 { margin-top: 0; }
.wordstorm { --ga: #5aa9f2; }
.oneclue { --ga: #f2a14e; }
.oc-leaders { display: flex; gap: .4em; }
.oc-lead { display: inline-flex; align-items: center; gap: .35em; padding: .3em .7em .3em .35em; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); }
.oc-lead b { font-family: var(--serif); color: var(--ga); }

/* ---- Fast Fingers (list-it-fast party game) */
.fastfingers { --ga: #e85d9c; }
.cover-fastfingers .ff-bar { fill: rgba(232,93,156,.16); stroke: var(--ga); stroke-width: 2; }
.cover-fastfingers .ff-ln { stroke: var(--ga); stroke-width: 4; stroke-linecap: round; opacity: .8; }
.cover-fastfingers .ff-c rect { fill: rgba(201,169,110,.14); stroke: var(--gold); stroke-opacity: .55; stroke-width: 1.4; }
.cover-fastfingers .ff-c line { stroke: var(--gold-2); stroke-width: 3; stroke-linecap: round; opacity: .7; }
.cover-fastfingers .ff-c { opacity: 0; animation: ffPop 4s ease-out infinite; animation-delay: var(--d); }
@keyframes ffPop { 0% { opacity: 0; transform: translateY(6px); } 10%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }

.ff-cat { display: flex; flex-direction: column; align-items: center; gap: .3em; text-align: center; }
.ff-cat h1 { font-family: var(--serif); font-weight: 500; margin: 0; font-size: 2.2em; line-height: 1.1; }
.ff-cat.big h1 { font-size: 4.6em; max-width: 18em; }
.ff-letter { display: grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: .25em; font-family: var(--serif); font-size: 3em; color: #1b1712; background: linear-gradient(180deg, #f6f1e4, #ddd3bc); box-shadow: 0 .1em 0 #a99a78; }
.ff-cat.big .ff-letter { font-size: 5em; }
.ff-play { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3em; }
.ff-play-row { display: flex; align-items: center; gap: 3em; flex-wrap: wrap; justify-content: center; }
.ff-clock b { font-family: var(--serif); font-size: 6em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ga); }
.ff-clock.urgent b { color: var(--bad); animation: thump 1s infinite; }
.ff-counts { display: flex; gap: 1em; flex-wrap: wrap; max-width: 50em; }
.ff-countp { display: flex; align-items: center; gap: .5em; padding: .4em .8em .4em .4em; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); }
.ff-countp b { font-family: var(--serif); font-size: 1.5em; color: var(--pc); min-width: 1.2em; text-align: center; }
.ff-getready { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1em; text-align: center; }
.ff-getready h2 { font-family: var(--serif); font-size: 3.4em; margin: 0; }
.ff-getready .pbar { width: min(40em, 80%); }
.ff-count { font-family: var(--serif); font-size: 8em; color: var(--ga); line-height: 1; }
.ff-reveal { flex: 1; display: grid; grid-template-columns: 22em 1fr; gap: 3em; min-height: 0; }
.ff-reveal-side { display: flex; flex-direction: column; gap: 1.6em; }
.ff-reveal-side .ff-cat { align-items: flex-start; text-align: left; }
.ff-shared { display: flex; flex-direction: column; gap: .4em; }
.ff-srow { display: flex; align-items: center; justify-content: space-between; gap: .6em; padding: .4em .7em; border-radius: .6em; background: var(--panel); }
.ff-sby { display: inline-flex; gap: .15em; }
.ws-chip.ff-out { background: transparent; border-color: rgba(242,126,99,.45); color: #f27e63; text-decoration: line-through; }
.ff-tstage { display: flex; align-items: center; justify-content: center; }
.ff-tphone { width: 20em; padding: 1em; border-radius: 1.6em; border: .4em solid #23222b; background: #0b0b10; display: flex; flex-direction: column; gap: .8em; }
.ff-tinput { display: flex; align-items: center; height: 2.6em; padding: 0 .9em; border-radius: .7em; border: 1px solid var(--gold); font-weight: 700; }
.ff-tinput i { width: 2px; height: 1.2em; background: var(--gold); animation: blink 1s steps(2) infinite; margin-left: 2px; }
.ff-tlist { display: flex; flex-wrap: wrap; gap: .4em; min-height: 6em; align-content: flex-start; }
.ff-tcards { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 1em; }
.ff-tcards .ws-chip { font-size: 1.25em; }
/* phone */
.fastfingers.phone.ff-typing { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); }
.ff-typing .p-stage { gap: 10px; }
.ff-typing .ff-cat h1 { font-size: 1.7em; }
.ff-typing .ff-letter { font-size: 2em; }
.ff-form { display: flex; gap: 8px; }
.ff-form .ff-input { flex: 1; min-width: 0; font-size: 1.15em; }
.ff-mycount { display: flex; align-items: baseline; justify-content: center; gap: .35em; color: var(--muted); }
.ff-mycount b { font-family: var(--serif); font-size: 1.5em; color: var(--text); }
.ff-mine { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ff-mychip { cursor: pointer; font: inherit; font-weight: 600; }
.ff-mychip .icon { width: .8em; height: .8em; opacity: .6; }
.ff-check { padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--pc); }
.ff-check-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.ff-flag { cursor: pointer; font: inherit; font-weight: 600; }
.ff-flag.on { border-color: #f27e63; box-shadow: 0 0 0 1px #f27e63; }
.ff-flag small { color: #f27e63; }
.ff-warn { color: #f6b3a3; text-align: center; margin: 0; }

/* ---- The Herd (Herd Mentality-style) */
.herd { --ga: #f28cc0; }
.cover-herd .hd-pen { fill: rgba(242,140,192,.06); stroke: var(--ga); stroke-width: 2; stroke-dasharray: 6 6; }
.cover-herd .hd-cd circle:first-child { fill: #efe6d6; }
.cover-herd .hd-cd circle:not(:first-child) { fill: #1b1712; }
.cover-herd .hd-cd ellipse { fill: #f6d5c6; }
.cover-herd .hd-cd { animation: wsDrop 4s ease-in-out infinite; animation-delay: var(--d); }
.cover-herd .hd-cd.pink circle:first-child { fill: #f28cc0; }

.hd-cow { display: inline-grid; width: 2.4em; height: 2.4em; color: #efe6d6; flex: none; }
.hd-cow svg { width: 100%; height: 100%; }
.hd-cow.pink { color: #f28cc0; filter: drop-shadow(0 0 .5em rgba(242,140,192,.6)); }
.hd-cow.mini { width: 1.3em; height: 1.3em; }
.hd-cow.big { width: 5em; height: 5em; }
.hd-cow.tut { position: absolute; right: 8%; bottom: 14%; width: 6em; height: 6em; }
.hd-q { display: flex; flex-direction: column; gap: .3em; }
.hd-q h1 { font-family: var(--serif); font-weight: 500; margin: 0; font-size: 3em; line-height: 1.1; }
.hd-q h2 { font-family: var(--serif); font-weight: 500; margin: 0; font-size: 2.2em; }
.hd-q.big h1 { font-size: 4.4em; }
.hd-answer, .hd-result { flex: 1; display: grid; grid-template-columns: 1fr 20em; gap: 3em; align-items: center; min-height: 0; }
.hd-answer-main, .hd-result-main { display: flex; flex-direction: column; gap: 2.4em; min-width: 0; }
.hd-answer-foot { display: flex; align-items: center; gap: 2em; }
.hd-answer-foot .timer-ring { position: relative; top: auto; right: auto; }
.hd-tally { display: flex; flex-direction: column; gap: .45em; align-self: center; }
.hd-trow { display: flex; align-items: center; gap: .6em; padding: .45em .8em .45em .45em; border-radius: .8em; background: var(--panel); border: 1px solid var(--line); }
.hd-trow span { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-trow b { font-family: var(--serif); font-size: 1.4em; color: var(--pc); }
.hd-trow.haspink { border-color: rgba(242,140,192,.5); }
.hd-pens { display: flex; flex-wrap: wrap; gap: 1em; align-content: flex-start; }
.hd-pen { position: relative; min-width: 12em; padding: .9em 1.1em; border-radius: 1em; background: var(--panel); border: 2px dashed var(--line-2); display: flex; flex-direction: column; gap: .5em; transition: border-color .3s, background .3s; }
.hd-pen-head { display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.hd-pen-head b { font-size: 1.5em; font-family: var(--serif); }
.hd-pen-n { display: grid; place-items: center; min-width: 1.8em; height: 1.8em; border-radius: 99px; background: rgba(255,255,255,.08); font-weight: 800; }
.hd-pen-also { color: var(--muted); }
.hd-pen-who { display: flex; flex-wrap: wrap; gap: .3em; }
.hd-pen.lead { border-color: var(--ga); border-style: solid; }
.hd-pen.herd { border-color: var(--good); border-style: solid; background: rgba(127,211,107,.08); }
.hd-pen.odd { border-color: #f28cc0; border-style: solid; }
.hd-plus { display: inline-flex; align-items: center; gap: .3em; align-self: flex-start; padding: .2em .7em; border-radius: 99px; background: var(--good); color: #10200c; font-weight: 800; }
.hd-group { flex: 1; display: flex; flex-direction: column; gap: 1.6em; min-height: 0; }
.hd-group-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2em; }
.hd-group-head p { max-width: 26em; margin: 0; text-align: right; }
.hd-group .hd-pens { flex: 1; min-height: 0; overflow: hidden; }
.hd-group-foot { display: flex; align-items: center; gap: 1.4em; flex-wrap: wrap; padding-left: 17em; padding-right: 13em; }
.hd-group-foot .pbar { flex: 1; min-width: 10em; }
.hd-pinknote { display: flex; align-items: center; gap: 1.2em; padding: 1em 1.4em; border-radius: 1em; background: rgba(242,140,192,.1); border: 1px solid rgba(242,140,192,.4); align-self: flex-start; }
.hd-pinknote b { display: block; font-size: 1.4em; } .hd-pinknote small { color: var(--muted); }
.hd-tstage { display: flex; flex-direction: column; justify-content: center; gap: 2em; }
/* phone */
.hd-pq { font-family: var(--serif); font-size: 1.8em; text-align: center; line-height: 1.15; }
.hd-pq.small { font-size: 1.3em; }
.hd-input { font-size: 1.2em; text-align: center; }
.hd-locked { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px; border-radius: 14px; background: rgba(242,140,192,.1); border: 1px solid rgba(242,140,192,.4); }
.hd-locked small { color: var(--muted); } .hd-locked b { font-size: 1.5em; }
.hd-mgroups { display: flex; flex-direction: column; gap: 8px; }
.hd-mg { display: flex; gap: 6px; }
.hd-mg-main { flex: 1; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 2px solid var(--line); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.hd-mg-main b { font-size: 1.1em; }
.hd-mg-main small { grid-column: 1; color: var(--muted); }
.hd-mg-n { grid-row: 1 / span 2; grid-column: 2; font-family: var(--serif); font-size: 1.4em; color: var(--ga); }
.hd-mg.mine .hd-mg-main { border-color: rgba(242,140,192,.45); }
.hd-mg.picked .hd-mg-main { border-color: var(--gold); background: rgba(201,169,110,.14); }
.hd-split { padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.hd-mycows { white-space: nowrap; }
/* Eight or more games: two rows of tiles in the lobby. */
@media (min-aspect-ratio: 1/1) {
  .d-lobby .game-shelf.two-rows { grid-auto-flow: row; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
  .d-lobby .game-shelf.two-rows .cover { aspect-ratio: 16 / 5; }
  .d-lobby:has(.game-shelf.two-rows) .settings { gap: .75em; }
  .d-lobby:has(.game-shelf.two-rows) .game-detail { margin-top: .8em; }
  .d-lobby .game-shelf.two-rows .game-tile-text { padding: .5em .8em .6em; }
  .d-lobby .game-shelf.two-rows .game-tile-text span { min-height: 0; -webkit-line-clamp: 1; }
}

/* ---- Zoom In (remote photo guessing): one tile that flips between steps ---- */
.zi-screen { --zi: #4fc3a1; gap: 10px; height: 100svh; height: 100dvh; min-height: 0; overflow: hidden; }
.zi-screen.waiting { height: auto; min-height: 100svh; overflow: visible; }
.zi-score { display: flex; gap: 8px; flex: none; }
.zi-score:empty { display: none; }
.zi-sc { flex: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line-2); min-width: 0; }
.zi-sc small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zi-sc b { font-family: var(--serif); font-size: 1.4em; color: var(--gold-2); }
.zi-tabs { display: flex; flex-direction: column; gap: 8px; flex: none; }
.zi-tabs:empty { display: none; }
.zi-steps { display: flex; align-items: center; gap: 6px; font-size: .82em; color: var(--muted); }
.zi-rnd { font-family: var(--serif); color: var(--text); font-size: 1.15em; margin-right: 4px; }
.zi-steps > i { flex: 1; height: 1px; background: var(--line-2); min-width: 8px; }
.zi-step { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.zi-step b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .85em; border: 1px solid var(--line-2); }
.zi-step b .icon { width: 12px; height: 12px; }
.zi-step.on { color: var(--text); font-weight: 600; }
.zi-step.on b { background: var(--zi); border-color: var(--zi); color: #06110d; }
.zi-step.done b { border-color: color-mix(in srgb, var(--zi) 60%, transparent); color: var(--zi); }
.zi-tabrow { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: rgba(0,0,0,.3); border: 1px solid var(--line); }
.zi-tabbtn { position: relative; flex: 1; padding: 8px 10px; border-radius: 10px; border: 0; background: none; color: var(--muted); font: inherit; font-size: .92em; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zi-tabbtn.on { background: color-mix(in srgb, var(--zi) 20%, transparent); color: var(--text); font-weight: 600; }
.zi-due { position: absolute; top: 6px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--zi); box-shadow: 0 0 8px var(--zi); }
.zi-tile { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 22px; background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--zi) 14%, transparent), transparent 70%), var(--panel); border: 1px solid color-mix(in srgb, var(--zi) 35%, transparent); overflow-y: auto; overscroll-behavior: contain; position: relative; backface-visibility: hidden; }
.zi-tile > * { flex: none; }
.zi-tile.zi-summary, .zi-tile.zi-final { text-align: center; }
.zi-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.zi-head .kicker { margin-right: auto; }
.zi-worth { color: var(--zi); font-size: .85em; }
.zi-diff { padding: 2px 9px; border-radius: 999px; font-size: .78em; font-weight: 600; border: 1px solid var(--line-2); color: var(--muted); }
.zi-diff small { font-size: .9em; }
.zi-diff.d1 { color: var(--gold-2); border-color: rgba(201,169,110,.5); }
.zi-diff.d2 { color: #f27e63; border-color: rgba(242,126,99,.55); background: rgba(242,126,99,.08); }
.zi-stagebox { flex: 1 1 auto !important; min-height: 150px; container-type: size; display: grid; place-items: center; }
.zi-view { position: relative; width: 100%; max-width: 560px; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: #000; touch-action: manipulation; }
.zi-view img:not([src]), .zi-gallery img:not([src]) { visibility: hidden; }
.zi-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.zi-view.full img { object-fit: contain; }
.zi-pips { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.zi-pips i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.35); box-shadow: 0 0 4px rgba(0,0,0,.6); }
.zi-pips i.used { background: rgba(255,255,255,.75); }
.zi-pips i.on { background: var(--zi); width: 20px; border-radius: 4px; }
.zi-form { display: flex; gap: 8px; }
.zi-form .zi-input { flex: 1; min-width: 0; font-size: 1.1em; }
.zi-form .btn { flex: none; }
.zi-actions { display: flex; justify-content: center; }
.zi-guesses { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.zi-summary .zi-guesses, .zi-rbody .zi-guesses { flex-wrap: wrap; }
.zi-guess { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.3); border: 1px solid var(--line-2); font-size: .9em; }
.zi-guess:has(.zi-count) { padding-right: 5px; }
.zi-guess small { color: var(--muted); font-size: .75em; }
.zi-guess b { font-weight: 500; text-decoration: line-through; text-decoration-color: rgba(242,126,99,.7); }
.zi-guess.right { border-color: color-mix(in srgb, var(--zi) 60%, transparent); }
.zi-guess.right b { text-decoration: none; color: var(--zi); }
.zi-count { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; border: 1px solid rgba(201,169,110,.5); background: rgba(201,169,110,.12); color: var(--gold-2); font: inherit; font-size: .82em; cursor: pointer; }
.zi-count .icon { width: .95em; height: .95em; }
.zi-answer { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.zi-answer b { font-family: var(--serif); font-size: 1.35em; color: var(--gold-2); overflow-wrap: anywhere; }
.zi-tile .good { color: var(--zi); font-weight: 600; }
.zi-tile .bad { color: #f27e63; }
.zi-empty { margin: auto 0; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 10px 4px; }
.zi-empty > .icon { width: 48px; height: 48px; color: var(--zi); }
.zi-empty h3 { font-family: var(--serif); font-size: 1.6em; margin: 0; }
.zi-empty p { margin: 0; max-width: 28em; }
.zi-ready { display: inline-flex; align-items: center; gap: 4px; color: var(--zi); }
.zi-ready .icon { width: 1em; height: 1em; }
.zi-waitline { display: flex; align-items: flex-start; gap: 6px; margin: 0; }
.zi-tile .rm-dot { position: static; flex: none; margin-top: .45em; }
.zi-waitline .rm-dot { position: static; flex: none; margin-top: .45em; }
.zi-snapbtns { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; max-width: 420px; }
.zi-snapbtns .btn { flex: 1 1 10em; }
.zi-result { display: flex; flex-direction: column; gap: 10px; }
.zi-result h2 { font-family: var(--serif); margin: 0; font-size: 1.9em; }
.zi-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
.zi-sum-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.zi-sum-tile small { color: var(--muted); font-size: .72em; letter-spacing: .1em; text-transform: uppercase; }
.zi-sum-tile b { color: var(--gold-2); overflow-wrap: anywhere; }
.zi-sum-tile .muted { font-size: .82em; }
.zi-sum-pts { font-family: var(--serif); font-size: 1.5em; }
.zi-sum-pts.good { color: var(--zi); }
.zi-sum-pts.bad { color: #f27e63; }
.zi-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 4px 0; }
.zi-gallery figure { margin: 0; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.zi-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #000; }
.zi-gallery figcaption { font-size: .75em; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zi-target { margin-top: 4px; }
/* Past rounds sheet */
.zi-rounds { display: flex; flex-direction: column; gap: 10px; }
.zi-round { border-radius: 14px; background: var(--panel); border: 1px solid var(--line-2); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.zi-round-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.zi-rpts { font-size: .85em; color: var(--gold-2); }
.zi-rpts i { color: var(--muted); font-style: normal; }
.zi-rbody { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.zi-rbody > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.zi-rbody small { color: var(--muted); font-size: .75em; }
.zi-rbody b { color: var(--gold-2); overflow-wrap: anywhere; }
@media (max-width: 480px) { .zi-rbody { grid-template-columns: 1fr; } }
/* Taking a photo */
.zi-sheet .sheet-card.zi-edit { max-height: calc(100svh - 24px); overflow-y: auto; gap: 10px; }
.zi-tip { margin: 0; font-size: .9em; }
.zi-stage { position: relative; flex: none; width: 100%; margin: 0 auto; border-radius: 12px; overflow: hidden; touch-action: none; cursor: crosshair; background: #000; }
.zi-stage img { width: 100%; height: 100%; display: block; object-fit: contain; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; pointer-events: none; }
.zi-frame { position: absolute; border: 2px solid var(--zi); border-radius: 6px; box-shadow: 0 0 0 9999px rgba(0,0,0,.5); pointer-events: none; }
.zi-pickrow { display: flex; gap: 12px; align-items: center; }
.zi-loupe { position: fixed; z-index: 60; width: 120px; height: 120px; border-radius: 16px; border: 3px solid var(--zi); background: #000; box-shadow: 0 12px 30px rgba(0,0,0,.6); pointer-events: none; }
.zi-preview { width: 92px; height: 92px; border-radius: 12px; flex: none; background: #000; border: 1px solid color-mix(in srgb, var(--zi) 50%, transparent); }
.zi-pickrow > div { display: flex; flex-direction: column; gap: 6px; }
.zi-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.zi-chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(0,0,0,.3); color: var(--text); font: inherit; font-size: .9em; cursor: pointer; }
.zi-chip small { color: var(--gold-2); }
.zi-chip.on { border-color: var(--zi); background: color-mix(in srgb, var(--zi) 22%, transparent); color: #fff; }
.zi-editbtns { display: flex; gap: 8px; }
.zi-editbtns .btn { flex: 1; }

/* ---- Wordsworth (remote crossword tile game) ---- */
.ww-screen { --ww: #e3a857; gap: 8px; height: 100svh; height: 100dvh; min-height: 0; overflow: hidden; }
.ww-screen.waiting { height: auto; min-height: 100svh; overflow: visible; }
.ww-scores { display: flex; gap: 8px; flex: none; align-items: stretch; }
.ww-scores:empty, .ww-last:empty, .ww-rack:empty, .ww-bar:empty { display: none; }
.ww-sc { flex: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line-2); min-width: 0; transition: border-color .25s, box-shadow .25s; }
.ww-sc small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.ww-sc .rm-dot { position: static; flex: none; }
.ww-sc b { font-family: var(--serif); font-size: 1.4em; color: var(--gold-2); }
.ww-sc.turn { border-color: var(--ww); box-shadow: 0 0 0 1px var(--ww), 0 0 18px -6px var(--ww); }
.ww-sc.turn small { color: var(--text); font-weight: 600; }
.ww-bag { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.3); color: var(--muted); cursor: pointer; font: inherit; line-height: 1.1; }
.ww-bag b { color: var(--text); font-size: 1.05em; }
.ww-bag small { font-size: .68em; }
.ww-last { flex: none; text-align: center; font-size: .88em; color: var(--muted); min-height: 1.3em; }
.ww-last b { color: var(--text); letter-spacing: .04em; }
.ww-last em { color: var(--ww); font-style: normal; font-weight: 700; }
.ww-stage { position: relative; flex: 1; min-height: 0; display: flex; }
.ww-stage[hidden] { display: none; }
.ww-wrap { flex: 1; min-height: 0; container-type: size; overflow: hidden; display: grid; place-items: start center; border-radius: 14px; }
.ww-board { --side: min(100cqw, 100cqh); width: var(--side); height: var(--side); display: grid; grid-template-columns: repeat(15, 1fr); grid-template-rows: repeat(15, 1fr); gap: 2px; padding: 3px; box-sizing: border-box; border-radius: 12px; background: #15141c; border: 1px solid var(--line-2); container-type: inline-size; user-select: none; -webkit-user-select: none; }
.ww-stage.zoomed .ww-wrap { overflow: auto; place-items: start; overscroll-behavior: contain; }
.ww-stage.zoomed .ww-board { --side: calc(min(100cqw, 100cqh) * 1.85); flex: none; }
.ww-cell { position: relative; display: grid; place-items: center; border-radius: 3px; background: #1f1e28; color: rgba(255,255,255,.55); overflow: hidden; min-width: 0; min-height: 0; cursor: pointer; }
.ww-cell small { font-size: 1.55cqw; line-height: 1.05; text-align: center; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; opacity: .9; }
.ww-cell.tw { background: #7a2e2b; color: #ffd2c8; }
.ww-cell.dw { background: #6b3b52; color: #ffd6e8; }
.ww-cell.tl { background: #20506e; color: #cdeaff; }
.ww-cell.dl { background: #2d4f5c; color: #cfeef5; }
.ww-cell.star { background: #6b3b52; color: #ffd6e8; }
.ww-cell.star .icon { width: 70%; height: 70%; }
.ww-cell.hover { outline: 2px solid var(--ww); outline-offset: -2px; }
.ww-tile { position: relative; display: grid; place-items: center; width: 100%; height: 100%; aspect-ratio: 1; box-sizing: border-box; border-radius: 4px; background: linear-gradient(180deg, #f6e7c4, #e7cf9b); color: #2a1d0b; box-shadow: inset 0 -2px 0 rgba(120,80,20,.35), 0 1px 2px rgba(0,0,0,.4); touch-action: none; cursor: grab; }
.ww-tile b { font-family: var(--serif); font-weight: 800; font-size: 4.4cqw; line-height: 1; }
.ww-tile i { position: absolute; right: 8%; bottom: 4%; font-style: normal; font-weight: 700; font-size: 1.7cqw; line-height: 1; opacity: .75; }
.ww-tile.blank b { color: #8a5a12; }
.ww-tile.new { background: linear-gradient(180deg, #fff3d6, #f2d9a0); box-shadow: 0 0 0 2px var(--ww), 0 2px 6px rgba(0,0,0,.5); }
.ww-tile.last { background: linear-gradient(180deg, #fbe9b9, #eccd86); box-shadow: inset 0 0 0 2px rgba(227,168,87,.9); }
.ww-tile.sel { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--ww), 0 8px 16px rgba(0,0,0,.5); }
.ww-tile.lifted { opacity: .3; }
.ww-ghost { position: fixed; left: 0; top: 0; z-index: 90; width: 54px; height: 54px; pointer-events: none; container-type: normal; box-shadow: 0 12px 26px rgba(0,0,0,.55); }
.ww-ghost b { font-size: 28px; }
.ww-ghost i { font-size: 11px; }
.ww-zoom { position: absolute; right: 6px; bottom: 6px; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(13,13,20,.82); backdrop-filter: blur(6px); color: var(--muted); cursor: pointer; }
.ww-zoom .icon { width: 18px; height: 18px; }
.ww-rack { flex: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; container-type: inline-size; padding: 8px; border-radius: 14px; background: linear-gradient(180deg, #2a2016, #1b150f); border: 1px solid rgba(227,168,87,.25); }
.ww-rack .ww-tile b { font-size: 7.2cqw; }
.ww-rack .ww-tile i { font-size: 2.8cqw; }
.ww-slot { aspect-ratio: 1; border-radius: 6px; border: 1px dashed rgba(227,168,87,.25); }
.ww-slot.empty { border-style: solid; border-color: transparent; }
.ww-rack .ww-tile.sel { transform: translateY(-6px); }
.ww-bar { flex: none; display: flex; gap: 8px; align-items: center; }
.ww-bar .btn { flex: 1; padding: .8em 1em; min-width: 0; }
.ww-bar .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ww-bar .icon-btn { flex: none; width: 2.9em; height: 2.9em; }
.ww-bar .icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.ww-pts { margin-left: auto; padding: 2px 9px; border-radius: 99px; background: rgba(26,20,10,.85); color: var(--gold-2); font-size: .95em; }
.ww-letters { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; container-type: inline-size; margin-top: 10px; }
.ww-letters .ww-tile { border: 0; cursor: pointer; }
.ww-letters .ww-tile b { font-size: 7cqw; color: #2a1d0b; }
.ww-swaprack { margin: 10px 0; }
.ww-swaprack .ww-tile { cursor: pointer; }
.ww-or { margin: 12px 0 6px; }
.ww-tracker { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 5px; margin-top: 8px; }
.ww-tracker span { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; padding: 4px 8px; border-radius: 8px; background: rgba(0,0,0,.3); border: 1px solid var(--line); }
.ww-tracker b { font-size: .9em; }
.ww-tracker i { font-style: normal; color: var(--gold-2); font-weight: 700; }
.ww-tracker .gone { opacity: .3; }
.ww-final { display: flex; gap: 8px; margin: 12px 0 4px; }
/* Table games: chat + reactions live in the top bar (.tc-dock, in place of the table code); the wheel fans downward. */
.tc-dock { display: flex; gap: 8px; flex: none; }
.tc-dock:empty { display: none; }
.tc-dock .tc-tab, .tc-dock .tc-react { position: relative; top: auto; right: auto; width: 2.6em; height: 2.6em; padding: 0; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); box-shadow: none; font-size: 1em; color: var(--gold-2); backdrop-filter: none; }
.tc-dock .tc-tab > span:not(.icon):not(.tc-badge) { display: none; }
.tc-dock .tc-tab .icon, .tc-dock .tc-react .icon { width: 1.3em; height: 1.3em; }
.tc-dock .tc-badge { top: -6px; left: auto; right: -6px; }
.tc-dock .tc-react.on { background: var(--gold); color: #1a1408; }
body[data-role="table"] .tc-wheel { left: 50%; right: auto; top: calc(env(safe-area-inset-top, 0px) + 70px); }
body[data-role="table"] .tc-emo { --r: 112px; --a: calc(198deg + var(--i) * 18deg); }
body[data-role="table"] .tc-emo.edit { --r: 40px; --a: 270deg; }
/* Narrow phones: the hand/round label gives way first so the top bar never overflows. */
.rm-top > .rm-hand { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .rm-top { gap: 6px; } .rm-top .tc-dock { gap: 6px; } .rm-top .rm-title { font-size: 1.12em; } }

/* ---- Name Your Price ---- */
.rm-age { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(242,126,99,.4); background: rgba(242,126,99,.08); font-weight: 700; cursor: pointer; }
.rm-age[hidden] { display: none; }
.rm-age input { width: 20px; height: 20px; accent-color: var(--gold); }
.nyp-screen { --np: #7ed957; gap: 10px; height: 100svh; height: 100dvh; min-height: 0; overflow: hidden; }
.nyp-screen.waiting { height: auto; min-height: 100svh; overflow: visible; }
.nyp-tile { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 22px; background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--np) 12%, transparent), transparent 70%), var(--panel); border: 1px solid color-mix(in srgb, var(--np) 30%, var(--line-2)); }
.nyp-tile > * { flex: none; }
.nyp-card { padding: 16px 16px 18px; border-radius: 18px; background: rgba(0,0,0,.28); border: 1px solid var(--line); }
.nyp-card.adult { border-color: rgba(242,126,99,.45); background: linear-gradient(180deg, rgba(242,126,99,.09), rgba(0,0,0,.28)); }
.nyp-cardtop { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nyp-18 { display: inline-grid; place-items: center; padding: 2px 7px; margin-left: 6px; border-radius: 6px; background: #c2412d; color: #fff; font-size: .72em; font-weight: 800; letter-spacing: .04em; vertical-align: middle; }
.nyp-18.big { font-size: 1.1em; padding: 6px 12px; margin: 0 auto 6px; }
.nyp-lead { margin: 10px 0 2px; color: var(--muted); font-size: .95em; }
.nyp-text { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(1.35em, 6.2vw, 1.9em); line-height: 1.15; }
.nyp-step { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.nyp-step > b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--np); color: #0c1606; font-size: .85em; }
.nyp-back { margin-left: auto; border: 1px solid var(--line-2); background: none; color: var(--muted); border-radius: 99px; padding: 4px 10px; font: inherit; font-size: .82em; cursor: pointer; }
.nyp-picker { display: flex; flex-direction: column; gap: 10px; }
.nyp-amount { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px; border: 0; background: none; color: var(--text); cursor: text; font: inherit; }
.nyp-amount b { font-family: var(--serif); font-size: 3em; line-height: 1; color: var(--np); border-bottom: 2px dashed color-mix(in srgb, var(--np) 40%, transparent); padding: 0 6px 4px; }
.nyp-amount.never b { color: var(--bad); border-color: rgba(242,126,99,.4); }
.nyp-amount.free b { color: var(--gold-2); }
.nyp-amount small { color: var(--muted); }
.nyp-type { text-align: center; font-size: 1.6em; }
.nyp-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; background: none; margin: 0; touch-action: pan-y; }
.nyp-slider::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--np) var(--p, 0%), rgba(255,255,255,.12) var(--p, 0%)); }
.nyp-slider::-moz-range-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--np) var(--p, 0%), rgba(255,255,255,.12) var(--p, 0%)); }
.nyp-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%; background: #f3efe6; border: 3px solid var(--np); box-shadow: 0 4px 12px rgba(0,0,0,.5); }
.nyp-slider::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #f3efe6; border: 3px solid var(--np); }
.nyp-scale { position: relative; height: 1.2em; margin: -8px 15px 0; color: var(--dim); font-size: .78em; }
.nyp-scale small { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.nyp-quick { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.nyp-wait { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0 6px; text-align: center; }
.nyp-mine, .nyp-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nyp-mine > div, .nyp-side { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid var(--line); text-align: center; }
.nyp-mine small, .nyp-side > small { color: var(--muted); font-size: .8em; }
.nyp-mine b { font-family: var(--serif); font-size: 1.5em; color: var(--np); }
.nyp-price { font-family: var(--serif); font-size: 2.1em; line-height: 1.1; color: var(--np); }
.nyp-price.never { color: var(--bad); }
.nyp-guess { display: flex; flex-direction: column; gap: 4px; font-size: .82em; color: var(--muted); }
.nyp-pts { font-style: normal; font-weight: 800; color: var(--text); }
.nyp-pts.p10, .nyp-pts.p7 { color: var(--np); }
.nyp-pts.p0 { color: var(--dim); }
.nyp-verdict { margin: 0; text-align: center; font-family: var(--serif); font-size: 1.35em; }
.nyp-final { margin: 0; font-family: var(--serif); text-align: center; }
.nyp-tile > .kicker { text-align: center; }
.nyp-list { display: flex; flex-direction: column; gap: 6px; }
.nyp-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.22); font-size: .9em; }
.nyp-row-p { display: flex; flex-direction: column; align-items: flex-end; min-width: 52px; }
.nyp-row-p small { color: var(--dim); font-size: .72em; }
.nyp-row-p b { color: var(--np); }
.nyp-banner { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(242,126,99,.45); background: rgba(242,126,99,.1); font-size: .9em; }
.nyp-banner-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Hidden Army: WebGL battlefield (scene3d.js) + portrait cards ---- */
.ha-screen { --ha: #d0563f; gap: 8px; height: 100svh; height: 100dvh; min-height: 0; overflow: hidden; }
.ha-screen.waiting { height: auto; min-height: 100svh; overflow: visible; }
.ha-bar { flex: none; display: flex; align-items: center; gap: 8px; }
.ha-status { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line-2); }
.ha-status b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ha-status .rm-dot { position: static; flex: none; }
.ha-status.go { border-color: #e6cf9f; box-shadow: 0 0 0 1px rgba(230,207,159,.5), 0 0 22px -6px rgba(230,207,159,.8); animation: haGo 2.4s ease-in-out infinite; }
@keyframes haGo { 50% { box-shadow: 0 0 0 1px rgba(230,207,159,.25), 0 0 10px -6px rgba(230,207,159,.5); } }
.ha-tally { flex: none; display: flex; gap: 12px; padding: 6px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.3); color: var(--text); font: inherit; cursor: pointer; }
.ha-tally span { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.ha-tally small { font-size: .66em; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.ha-tally b { font-family: var(--serif); font-size: 1.15em; }
.ha-stage { position: relative; flex: 1; min-height: 0; border-radius: 20px; overflow: hidden; background: #0b0a08; border: 1px solid var(--line); }
.ha-stage[hidden] { display: none; }
.ha-3d { position: absolute; inset: 0; }
.ha-3d canvas { width: 100%; height: 100%; display: block; touch-action: manipulation; }
.ha-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); text-align: center; padding: 20px; transition: opacity .5s; }
.ha-stage.ready .ha-loading { opacity: 0; pointer-events: none; }
.ha-info { position: absolute; left: 10px; top: 10px; z-index: 3; max-width: min(72%, 320px); pointer-events: none; }
.ha-info-card { display: flex; flex-direction: column; gap: 2px; padding: 9px 13px; border-radius: 14px 14px 14px 4px; background: rgba(14,11,7,.82); border: 1px solid rgba(230,207,159,.28); box-shadow: 0 10px 28px rgba(0,0,0,.5); backdrop-filter: blur(8px); font-size: .88em; line-height: 1.3; animation: haIn .25s ease-out; }
.ha-info-card b { color: var(--gold-2); }
.ha-info-card span { color: var(--muted); }
@keyframes haIn { from { opacity: 0; transform: translateY(6px); } }
.ha-foot { flex: none; display: flex; align-items: center; gap: 8px; }
.ha-foot .btn { padding: .8em 1.1em; }
.ha-foot .ha-go { flex: 1; }
.ha-hint { flex: 1; text-align: center; color: var(--muted); font-size: .9em; }
/* Portrait card: the painting in a gold frame, rank disc top left, name ribbon at the bottom. */
.ha-card { --edge: #1c3a86; position: relative; width: 100%; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: #120d08;
  border: 5px solid transparent; background-clip: padding-box; box-shadow: 0 0 0 2px #d6aa5a, 0 0 0 5px var(--edge), 0 18px 34px rgba(0,0,0,.55); }
.ha-card.foe { --edge: #8e1d16; }
.ha-card img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; display: block; }
.ha-card::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px rgba(255,236,180,.55), inset 0 0 40px rgba(0,0,0,.55); pointer-events: none; }
.ha-card-rank { position: absolute; left: 6%; top: 5%; width: 26%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-family: Georgia, "Times New Roman", serif; font-weight: 800; font-size: clamp(.8em, 5vw, 1.6em); color: #1d1206;
  background: linear-gradient(135deg, #fff0bf, #d8b064 40%, #8d6526 70%, #e9cc85); box-shadow: 0 2px 6px rgba(0,0,0,.6), inset 0 0 0 2px rgba(40,20,0,.6); }
.ha-card-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 6px 8px; text-align: center; font-family: Georgia, "Times New Roman", serif; letter-spacing: .16em; text-transform: uppercase; font-size: .82em; color: #f0d898;
  background: linear-gradient(transparent, rgba(20,12,4,.92) 55%); }
.ha-card.small { border-width: 2px; border-radius: 7px; box-shadow: 0 0 0 1.5px #d6aa5a, 0 0 0 3px var(--edge); }
.ha-card.small .ha-card-rank { width: 34%; font-size: .62em; }
.ha-overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 50% 45%, rgba(40,20,14,.84), rgba(4,3,2,.95)); backdrop-filter: blur(3px); }
.ha-overlay[hidden] { display: none; }
.ha-clash { position: relative; width: min(94vw, 460px); height: min(74vh, 480px); }
.ha-clash .ha-card { position: absolute; top: 6%; width: 47%; }
.ha-clash .ha-card.l { left: 1%; } .ha-clash .ha-card.r { right: 1%; }
.ha-flash { position: absolute; left: 50%; top: 34%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%; opacity: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(circle, #fff 0 8%, rgba(255,220,150,.9) 18%, rgba(255,120,60,.5) 38%, transparent 68%); mix-blend-mode: screen; }
.ha-cl-text { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; opacity: 0; display: flex; flex-direction: column; gap: 4px; }
.ha-cl-text small { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: .72em; }
.ha-cl-text b { font-family: var(--serif); font-size: 1.5em; line-height: 1.2; }
.ha-end { width: min(92vw, 380px); text-align: center; display: flex; flex-direction: column; gap: 10px; padding: 24px 20px 20px; border-radius: 24px; background: linear-gradient(180deg, #1d1912, #0f0d09); border: 1px solid rgba(230,207,159,.3); box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: haIn .45s ease-out; }
.ha-end .ha-card { width: 46%; margin: 0 auto 6px; }
.ha-end.lose { border-color: rgba(208,86,63,.4); }
.ha-end h2 { margin: 0; font-family: var(--serif); font-size: 2.4em; letter-spacing: .04em; }
.ha-end.win h2 { color: #f3dfa9; text-shadow: 0 0 24px rgba(243,223,169,.45); }
.ha-end.lose h2 { color: #ff8d74; }
.ha-end p { margin: 0; }
.ha-report { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; margin: 6px 0 12px; }
.ha-rep { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ha-rep .ha-card { width: 44px; }
.ha-rep.gone { opacity: .3; filter: grayscale(1); }
.ha-rep small { font-size: .62em; color: var(--muted); }
.ha-rep b { font-size: .95em; }
/* Checkers - reuses the Hidden Army stage, bar and end card. */
.ck-tally { align-items: center; }
.ck-count { flex-direction: row !important; gap: 6px; }
.ck-count b { font-size: 1.1em; }
.ck-count small { font-size: .7em !important; color: var(--gold-2) !important; letter-spacing: 0 !important; }
.ck-chip { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #c8352c, #6e120d 70%); box-shadow: inset 0 0 0 2px rgba(0,0,0,.25), 0 1px 3px rgba(0,0,0,.6); }
.ck-chip.mine { background: radial-gradient(circle at 35% 30%, #fff6e2, #cbb68c 75%); }
.ck-end-piece { position: relative; width: 96px; height: 70px; margin: 0 auto 4px; }
.ck-end-piece i { position: absolute; left: 0; right: 0; height: 40px; border-radius: 50%; background: radial-gradient(ellipse at 40% 30%, #c8352c, #6e120d 70%); box-shadow: inset 0 -6px 0 rgba(0,0,0,.35), inset 0 0 0 3px rgba(0,0,0,.2), 0 6px 14px rgba(0,0,0,.6); }
.ck-end-piece i:first-child { bottom: 0; } .ck-end-piece i:last-child { bottom: 18px; }
.ck-end-piece.mine i { background: radial-gradient(ellipse at 40% 30%, #fff6e2, #cbb68c 75%); }
.ck-end-piece i:last-child::after { content: ''; position: absolute; left: 50%; top: 50%; width: 30px; height: 18px; margin: -11px 0 0 -15px; background: linear-gradient(180deg, #fff0bf, #d8b064 50%, #8d6526);
  clip-path: polygon(0 100%, 0 20%, 20% 60%, 35% 0, 50% 55%, 65% 0, 80% 60%, 100% 20%, 100% 100%); }
/* Mastermind Duel - reuses the Hidden Army stage/bar/end card. */
.mm-marble { --mc: #888; display: inline-block; width: 1em; height: 1em; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.85) 0, rgba(255,255,255,0) 26%), radial-gradient(circle at 50% 60%, var(--mc) 45%, color-mix(in srgb, var(--mc) 55%, #000) 100%);
  box-shadow: 0 2px 5px rgba(0,0,0,.55), inset 0 -2px 4px rgba(0,0,0,.25); }
.mm-tabs { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mm-tabs[hidden] { display: none; }
.mm-tab { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 8px; padding: 7px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.3); color: var(--muted); font: inherit; text-align: left; cursor: pointer; }
.mm-tab small { font-size: .72em; text-transform: uppercase; letter-spacing: .08em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-tab b { grid-row: span 2; font-family: var(--serif); font-size: 1.35em; color: var(--text); }
.mm-tab b span { font-size: .6em; color: var(--muted); }
.mm-tab em { font-style: normal; font-size: .78em; }
.mm-tab.on { border-color: rgba(230,207,159,.6); background: rgba(230,207,159,.08); color: var(--gold-2); }
.mm-tab.new::after { content: ''; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 8px var(--gold-2); }
.mm-tray { flex: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 8px; border-radius: 16px; background: linear-gradient(180deg, #2a1810, #1a0f09); border: 1px solid rgba(230,207,159,.18); box-shadow: inset 0 2px 8px rgba(0,0,0,.6); }
.mm-tray[hidden] { display: none; }
.mm-pick { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0,0,0,.35); box-shadow: inset 0 2px 6px rgba(0,0,0,.8); cursor: pointer; padding: 0; }
.mm-pick .mm-marble { font-size: 32px; transition: transform .12s; }
.mm-pick:active .mm-marble { transform: scale(.88); }
.mm-end-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(0,0,0,.3); }
.mm-end-row small { color: var(--muted); }
.mm-end-row span { display: flex; gap: 6px; font-size: 24px; }
.mm-modes { display: flex; gap: 6px; margin-top: 6px; }
.mm-poss { margin-left: auto; flex: none; color: var(--muted); font-size: .78em; text-align: right; }
@media (max-width: 380px) { .mm-pick { width: 38px; height: 38px; } .mm-pick .mm-marble { font-size: 27px; } }

/* Rummikub - full-height screen: players, ticker, the table (scrolls), hint, rack, buttons. */
.rk-screen { --rk: #e08a3c; gap: 7px; height: 100svh; height: 100dvh; min-height: 0; overflow: hidden; }
.rk-screen.waiting { height: auto; min-height: 100svh; overflow: visible; }
.rk-screen [hidden] { display: none !important; }
.rk-players { flex: none; display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 6px; }
.rk-pl { min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 6px 9px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-2); transition: border-color .25s, box-shadow .25s; }
.rk-pl.turn { border-color: #e6cf9f; box-shadow: 0 0 0 1px rgba(230,207,159,.45), 0 0 18px -6px rgba(230,207,159,.8); }
.rk-pl > b { font-size: .86em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-pl.me > b { color: var(--gold-2); }
.rk-pl > span { display: flex; align-items: center; gap: 4px; min-width: 0; }
.rk-pl em { font-style: normal; font-weight: 800; font-size: .9em; }
.rk-pl small { margin-left: auto; font-size: .64em; color: var(--muted); text-transform: capitalize; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-mini { flex: none; width: 9px; height: 12px; border-radius: 2px; background: linear-gradient(180deg, #fbf4e4, #d9cdb2); box-shadow: 0 1px 2px rgba(0,0,0,.5); }
.rk-ticker { flex: none; display: flex; gap: 10px; overflow-x: auto; white-space: nowrap; font-size: .8em; color: var(--muted); min-height: 1.3em; scrollbar-width: none; }
.rk-tk b { color: var(--text); font-weight: 700; }
.rk-tk.play b { color: #f0c48f; }
.rk-table { --tw: 30px; --cols: 2; position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 18px;
  background: radial-gradient(ellipse at 50% 0%, rgba(60,110,70,.35), transparent 70%), linear-gradient(180deg, #16301f, #0f2016); border: 1px solid rgba(120,170,120,.18); box-shadow: inset 0 2px 18px rgba(0,0,0,.6); }
.rk-empty { grid-column: 1 / -1; margin: 30px auto; color: rgba(255,255,255,.45); text-align: center; font-size: .9em; max-width: 26ch; }
.rk-row { flex: none; display: flex; align-items: stretch; gap: 8px; }
.rk-row > * { flex: 0 0 calc((100% - (var(--cols) - 1) * 8px) / var(--cols)); }
.rk-set { position: relative; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 3px 2px; min-width: 0; min-height: calc(var(--tw) * 1.38 + 8px); padding: 4px; border-radius: 7px; background: rgba(0,0,0,.22); border: 1px solid transparent; transition: border-color .15s, background .15s; }
.rk-set.bad { border-color: #ff6a52; border-style: dashed; background: rgba(255,90,60,.12); }
.rk-set.mine:not(.bad) { border-color: rgba(230,207,159,.45); }
.rk-set.over, .rk-newset.over { background: rgba(230,207,159,.18); border-color: #e6cf9f; border-style: solid; }
.rk-add { position: absolute; z-index: 3; top: -9px; right: -7px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #e6cf9f; background: #2a3d2c; box-shadow: 0 2px 8px rgba(0,0,0,.6); color: #f3dfa9; cursor: pointer; padding: 0; animation: haIn .2s ease-out; }
.rk-add .icon { width: 60%; height: 60%; }
.rk-newset { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: calc(var(--tw) * 1.38 + 8px); padding: 0 12px; border-radius: 7px; border: 1px dashed rgba(230,207,159,.35); background: transparent; color: rgba(230,207,159,.6); font: inherit; font-size: .8em; cursor: pointer; }
.rk-newset .icon { width: 14px; height: 14px; }
.rk-newset.on { border-style: solid; border-color: #e6cf9f; color: #f3dfa9; background: rgba(230,207,159,.12); }
.rk-tile { --w: var(--tw); position: relative; flex: none; width: var(--w); height: calc(var(--w) * 1.38); border-radius: calc(var(--w) * .16); display: flex; flex-direction: column; align-items: center; justify-content: center; font-style: normal; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  background: linear-gradient(180deg, #fffaf0 0%, #f2e9d6 70%, #ddd0b4 100%); box-shadow: 0 1px 0 #fff inset, 0 -2px 0 rgba(0,0,0,.12) inset, 0 2px 4px rgba(0,0,0,.45); transition: transform .12s, box-shadow .12s; }
.rk-tile b { font-family: Georgia, "Times New Roman", serif; font-weight: 800; font-size: calc(var(--w) * .58); line-height: 1; letter-spacing: -.03em; }
.rk-tile u { width: calc(var(--w) * .2); height: calc(var(--w) * .2); margin-top: calc(var(--w) * .08); border-radius: 50%; background: currentColor; opacity: .55; text-decoration: none; }
.rk-tile.red { color: #c0142b; } .rk-tile.blue { color: #2459c8; } .rk-tile.black { color: #1b1b1b; }
/* Orange sits well apart from red: a golden amber, with a thin dark edge so it still reads on the ivory tile. */
.rk-tile.orange { color: #eaa007; } .rk-tile.orange b { -webkit-text-stroke: .6px rgba(90,50,0,.55); }
.rk-tile.joker { color: #b88a2a; } .rk-tile.joker svg { width: 70%; height: 70%; filter: drop-shadow(0 1px 0 rgba(255,255,255,.6)); }
.rk-tile.sel { z-index: 2; transform: translateY(calc(var(--w) * -.22)) scale(1.04); background: linear-gradient(180deg, #fff6d6 0%, #f6dc9a 65%, #e2bb63 100%);
  box-shadow: 0 0 0 3px #f3c74f, 0 0 0 5px rgba(20,14,4,.85), 0 0 22px 4px rgba(243,199,79,.75), 0 8px 14px rgba(0,0,0,.55); animation: rkBob .9s ease-in-out infinite, rkSel 1.4s ease-in-out infinite; }
.rk-tile.sel:nth-child(even) { animation-delay: -.45s, -.7s; }
.rk-tile.sel:nth-child(3n) { animation-duration: 1.05s, 1.4s; }
.rk-tile.sel::before { content: ''; position: absolute; top: max(calc(var(--w) * -.38), -16px); left: 50%; transform: translateX(-50%) translateY(-25%); width: calc(var(--w) * .46); height: calc(var(--w) * .46); min-width: 11px; min-height: 11px; border-radius: 50%;
  background: #f3c74f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23140e04' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 72% no-repeat; box-shadow: 0 0 0 2px rgba(20,14,4,.85); }
/* Selected tiles bob up and down with a little wiggle (transform only - never changes the layout). */
@keyframes rkBob {
  0%, 100% { transform: translateY(calc(var(--w) * -.2)) scale(1.04) rotate(0deg); }
  25% { transform: translateY(calc(var(--w) * -.32)) scale(1.05) rotate(-4deg); }
  50% { transform: translateY(calc(var(--w) * -.22)) scale(1.04) rotate(0deg); }
  75% { transform: translateY(calc(var(--w) * -.32)) scale(1.05) rotate(4deg); }
}
@media (prefers-reduced-motion: reduce) { .rk-tile.sel { animation: none; } }
@keyframes rkSel { 0%, 100% { box-shadow: 0 0 0 3px #f3c74f, 0 0 0 5px rgba(20,14,4,.85), 0 0 22px 4px rgba(243,199,79,.75), 0 8px 14px rgba(0,0,0,.55); } 50% { box-shadow: 0 0 0 3px #ffe08a, 0 0 0 5px rgba(20,14,4,.85), 0 0 30px 8px rgba(243,199,79,.95), 0 8px 14px rgba(0,0,0,.55); } }
.rk-tile.lit { box-shadow: 0 0 0 2px rgba(240,196,143,.95), 0 2px 4px rgba(0,0,0,.45); }
.rk-tile.played::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #e6cf9f; }
.rk-tile.fresh { box-shadow: 0 0 0 2px #7fd18b, 0 0 12px rgba(127,209,139,.6), 0 2px 4px rgba(0,0,0,.45); }
.rk-hint { flex: none; display: flex; align-items: center; justify-content: center; gap: 10px; height: 1.9em; font-size: .82em; color: var(--muted); white-space: nowrap; overflow: hidden; }
.rk-hint > span { overflow: hidden; text-overflow: ellipsis; }
.rk-hint.warn .rk-warn { color: #ff9c86; font-weight: 700; }
.rk-rack { --rw: 36px; flex: none; display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: 5px 4px; padding: 18px 8px 12px; min-height: calc(var(--rw) * 1.38 + 30px); border-radius: 16px; touch-action: none;
  background: linear-gradient(180deg, #5a3a20, #3b2414); border: 1px solid rgba(230,207,159,.22); box-shadow: inset 0 2px 0 rgba(255,255,255,.08), inset 0 -10px 18px rgba(0,0,0,.35), 0 6px 18px rgba(0,0,0,.4); }
.rk-rack .rk-tile { --w: var(--rw); }
.rk-rack.over { border-color: #e6cf9f; }
.rk-back { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 1.9em; padding: 0 10px; border-radius: 99px; border: 1px dashed rgba(230,207,159,.5); background: rgba(0,0,0,.25); color: #f3dfa9; font: inherit; font-size: .78em; cursor: pointer; }
.rk-back .icon { width: 14px; height: 14px; }
.rk-ghost { position: fixed; left: 0; top: 0; z-index: 60; display: flex; gap: 2px; pointer-events: none; --tw: 38px; filter: drop-shadow(0 10px 16px rgba(0,0,0,.6)); }
.rk-foot { gap: 6px; }
.rk-sort { width: 44px; font-weight: 800; font-size: .72em; letter-spacing: -.02em; color: var(--gold-2); }
.rk-wait .rk-seats { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; text-align: left; }
.rk-seat { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--muted); }
.rk-seat.in { border-style: solid; color: var(--text); }
.rk-seat small { color: var(--muted); }
.rk-scores { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 6px 0; }
.rk-end { width: min(94vw, 440px); }
.rk-res { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.rk-res-row { display: grid; grid-template-columns: minmax(0, 6ch) 1fr auto; grid-template-rows: auto auto; gap: 2px 8px; align-items: center; padding: 7px 10px; border-radius: 12px; background: rgba(0,0,0,.3); }
.rk-res-row.win { box-shadow: inset 0 0 0 1px rgba(230,207,159,.45); }
.rk-res-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-res-tiles { display: flex; flex-wrap: wrap; gap: 2px; --tw: 17px; grid-row: span 2; }
.rk-res-tiles small { color: var(--gold-2); }
.rk-res-row > b { font-family: var(--serif); font-size: 1.1em; text-align: right; }
.rk-res-row > small { grid-column: 3; color: var(--muted); font-size: .72em; text-align: right; }
.rm-bot-rows { display: flex; flex-direction: column; gap: 8px; }

/* ---- Tangle: themed word hunt ---- */
.tg-screen { --tg: #7fc8a9; --tgm: #e6cf9f; --tgt: #7fc8a9; gap: 8px; }
.tg-bar { display: flex; gap: 8px; align-items: stretch; }
.tg-score { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 56px; padding: 4px 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line-2); line-height: 1.1; }
.tg-score small { font-size: .7em; color: var(--muted); max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-score b { font-size: 1.25em; font-variant-numeric: tabular-nums; }
.tg-score.mine b { color: var(--tgm); }
.tg-score.theirs b { color: var(--tgt); }
.tg-clue { text-align: center; line-height: 1.15; }
.tg-clue small { display: block; font-size: .7em; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.tg-clue b { font-family: var(--serif); font-size: 1.45em; color: var(--gold-2); }
.tg-word { min-height: 1.9em; display: grid; place-items: center; text-align: center; }
.tg-word b { font-size: 1.35em; letter-spacing: .14em; color: #f3efe6; }
.tg-word small { color: var(--muted); }
.tg-word small.good { color: var(--tg); }
.tg-word.bad b { color: var(--bad); animation: tgShake .35s; }
@keyframes tgShake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.tg-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.tg-board { position: relative; flex: none; width: min(100%, calc((100dvh - 380px) * var(--cols) / var(--rows)), 460px); aspect-ratio: var(--cols) / var(--rows); touch-action: none; user-select: none; -webkit-user-select: none; }
.tg-cells { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--cols), 1fr); grid-template-rows: repeat(var(--rows), 1fr); }
.tg-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tg-lines path { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: .2; }
.tg-lines path.trail { stroke: rgba(243,239,230,.55); }
.tg-lines path.mine { stroke: rgba(230,207,159,.55); }
.tg-lines path.theirs { stroke: rgba(127,200,169,.55); }
.tg-cell { display: grid; place-items: center; position: relative; z-index: 1; }
.tg-cell span { width: 78%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: clamp(16px, 5.2vw, 24px); color: #e9e3d6; transition: background .15s, color .15s, transform .15s; }
.tg-cell.on span { background: #f3efe6; color: #17130d; transform: scale(1.08); }
.tg-cell.mine span { background: var(--tgm); color: #1d170c; }
.tg-cell.theirs span { background: var(--tgt); color: #0d1a14; }
.tg-cell.hint span { box-shadow: 0 0 0 2px var(--gold-2), 0 0 16px -2px var(--gold); animation: tgHint 1.6s ease-in-out infinite; animation-delay: calc(var(--hk) * .12s); }
@keyframes tgHint { 50% { box-shadow: 0 0 0 2px var(--gold-2), 0 0 24px 2px var(--gold); } }
.tg-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tg-slot { padding: 4px 10px; border-radius: 99px; font-size: .78em; font-weight: 800; letter-spacing: .08em; border: 1px solid var(--line-2); }
.tg-slot.mine { background: rgba(230,207,159,.16); color: var(--tgm); border-color: rgba(230,207,159,.45); }
.tg-slot.theirs { background: rgba(127,200,169,.14); color: var(--tgt); border-color: rgba(127,200,169,.45); }
.tg-slot.blank { color: var(--muted); border-style: dashed; min-width: 44px; text-align: center; }
.tg-slot.blank i { font-style: normal; font-weight: 600; }
.tg-slot.missed { color: var(--bad); border-style: dashed; }
.tg-extra { width: 100%; text-align: center; color: var(--muted); font-size: .75em; }
.tg-foot .ha-hint { font-size: .85em; }

/* ---------- Chip In ---------- */
.chipin { --ga: #e0565b; }
.ci-board { container-type: inline-size; display: grid; grid-template-columns: repeat(10, 1fr); gap: .6cqi; padding: 1.4cqi; width: 100%; aspect-ratio: 1; border-radius: 2.2cqi;
  background: radial-gradient(120% 120% at 30% 20%, #3a1a1d, #1c0d0f 70%); border: 1px solid rgba(201,169,110,.45); box-shadow: inset 0 0 0 .5cqi #140809, inset 0 0 0 .7cqi rgba(201,169,110,.35), 0 20px 50px rgba(0,0,0,.55); }
.ci-cell { position: relative; padding: 0; border: 0; border-radius: .9cqi; background: linear-gradient(180deg, #fbf8f0, #e9e2d2); color: #17161c; display: grid; place-items: center; cursor: default; transition: opacity .2s, transform .15s var(--ease), box-shadow .2s; }
.ci-cell.corner { background: radial-gradient(circle, #3b2c18, #1f170c); color: var(--gold); box-shadow: inset 0 0 0 .3cqi rgba(201,169,110,.6); }
.ci-face { display: flex; flex-direction: column; align-items: center; line-height: 1; gap: .3cqi; }
.ci-face b { font-size: 3cqi; font-weight: 800; letter-spacing: -.05em; }
.ci-face .suit { width: 2.8cqi; height: 2.8cqi; }
.ci-face .suit svg { width: 100%; height: 100%; fill: currentColor; }
.ci-face.red { color: #c8202a; }
.ci-free { width: 55%; height: 55%; display: flex; }
.ci-free svg { width: 100%; height: 100%; }
.ci-chip { position: absolute; inset: 7%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--tc) 40%, transparent), color-mix(in srgb, var(--tc) 50%, transparent) 60%, color-mix(in srgb, var(--tc) 62%, transparent));
  border: .7cqi solid var(--tc); box-shadow: 0 .3cqi .7cqi rgba(0,0,0,.45), inset 0 0 0 .25cqi rgba(255,255,255,.35); }
.ci-chip.locked { border-width: .9cqi; box-shadow: 0 .3cqi .7cqi rgba(0,0,0,.45), inset 0 0 0 .25cqi rgba(255,255,255,.35), 0 0 0 .4cqi #fff8e6; }
.ci-chip.locked::after { content: ''; position: absolute; right: -6%; top: -6%; width: 30%; height: 30%; border-radius: 50%; background: #fff8e6; box-shadow: 0 0 0 .3cqi var(--tc); }
.ci-cell .ci-face { position: relative; z-index: 1; text-shadow: 0 0 .6cqi rgba(255,255,255,.9); }
.ci-cell.last { box-shadow: 0 0 0 .5cqi var(--gold-2), 0 0 2cqi rgba(230,207,159,.7); z-index: 1; }
.ci-cell.newline .ci-chip { animation: ciPulse 1.2s ease-in-out 3; }
@keyframes ciPulse { 50% { transform: scale(1.18); filter: brightness(1.35); } }
.ci-board:has(.hot) .ci-cell:not(.hot), .ci-board:has(.peek) .ci-cell:not(.peek) { opacity: .35; }
.ci-cell.hot { cursor: pointer; z-index: 2; animation: ciHot 1.1s ease-in-out infinite; box-shadow: 0 0 0 .55cqi var(--gold), 0 0 2.4cqi rgba(201,169,110,.9); }
.ci-cell.hot.rm { box-shadow: 0 0 0 .55cqi var(--bad), 0 0 2.4cqi rgba(242,126,99,.9); }
.ci-cell.peek { box-shadow: 0 0 0 .4cqi rgba(201,169,110,.8); }
@keyframes ciHot { 50% { transform: scale(1.08); } }
.ci-cell:disabled { opacity: 1; }
.ci-board:has(.hot) .ci-cell:disabled:not(.hot) { opacity: .35; }

.ci-team { display: inline-flex; align-items: center; gap: .45em; font-weight: 800; color: var(--tc); }
.ci-team i { width: .85em; height: .85em; border-radius: 50%; background: var(--tc); box-shadow: inset 0 0 0 2px rgba(255,255,255,.3); }
.ci-team.sm { font-size: 12px; }

/* TV */
.ci-main { position: relative; flex: 1; display: grid; grid-template-columns: auto minmax(18em, 1fr); gap: 2.2em; align-items: start; min-height: 0; }
.ci-boardwrap { height: calc(100svh - 9em); aspect-ratio: 1; max-width: 62vw; }
.ci-boardwrap .ci-board { height: 100%; width: auto; max-width: 100%; }
.ci-side { display: flex; flex-direction: column; gap: 1em; }
.ci-tcard { padding: 1em 1.1em; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); transition: border-color .3s, background .3s; }
.ci-tcard.turn { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 9%, transparent); }
.ci-tcard.won { border-color: var(--tc); box-shadow: 0 0 40px color-mix(in srgb, var(--tc) 35%, transparent); }
.ci-thead { display: flex; align-items: center; justify-content: space-between; font-size: 1.25em; margin-bottom: .5em; }
.ci-lines { display: flex; gap: .35em; }
.ci-lines i { width: 1.6em; height: .5em; border-radius: 99px; background: var(--line-2); }
.ci-lines i.on { background: var(--tc); box-shadow: 0 0 10px var(--tc); }
.ci-members { display: flex; flex-direction: column; gap: .4em; }
.ci-m { display: flex; align-items: center; gap: .6em; }
.ci-m span { flex: 1; font-weight: 700; }
.ci-m small { color: var(--muted); }
.ci-m.now span { color: var(--tc); }
.ci-m.now small { color: var(--tc); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.ci-m.off { opacity: .45; }
.ci-m.ready .icon { color: var(--good); }
.ci-now { padding: 1em 1.1em; border-radius: var(--r); background: var(--panel-2); display: flex; flex-direction: column; gap: .3em; }
.ci-now b { font-size: 1.8em; font-family: var(--serif); }
.ci-lastmove { display: flex; flex-direction: column; gap: .3em; font-size: 1.05em; }
.ci-made { color: var(--gold-2); font-style: normal; font-weight: 800; }
.ci-deck { display: flex; align-items: center; gap: .7em; color: var(--muted); }
.ci-win { position: absolute; left: 0; top: 0; height: calc(100svh - 9em); aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6em; text-align: center; border-radius: 2em; background: rgba(7,7,11,.78); backdrop-filter: blur(4px); z-index: 5; }
.ci-win h1 { font-family: var(--serif); font-size: 4em; margin: 0; color: var(--tc); }
.ci-win p { font-size: 1.4em; margin: 0; }
.ci-intro { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1.6em; text-align: center; }
.ci-intro .intro-title h1 { font-family: var(--serif); font-size: 4.5em; margin: .1em 0 0; }
.ci-introteams { display: flex; gap: 1.2em; justify-content: center; flex-wrap: wrap; }
.ci-introteams .ci-tcard { min-width: 15em; text-align: left; font-size: 1.1em; }
.ci-introteams .ci-team { font-size: 1.3em; margin-bottom: .5em; }
.ci-how { text-align: left; max-width: 52em; font-size: 1.25em; display: grid; gap: .5em; margin: 0; }
.ci-hint { margin: 0; }
.ci-intro .pbar { width: 30em; }

/* Phone */
.ci-phone { display: flex; flex-direction: column; gap: 10px; }
.ci-status { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; min-height: 28px; }
.ci-status > span:first-child, .ci-status > b:first-child { flex: 1; }
.ci-yours { color: var(--gold-2); font-size: 1.1em; }
.ci-score { display: flex; gap: 10px; font-weight: 800; font-size: 14px; }
.ci-score span { display: inline-flex; align-items: center; gap: 4px; color: var(--tc); }
.ci-score i { width: 10px; height: 10px; border-radius: 50%; background: var(--tc); }
.ci-status .pbar { flex-basis: 100%; }
.ci-note { min-height: 22px; text-align: center; color: var(--text); font-size: 14px; }
.ci-hand { display: flex; justify-content: center; gap: 6px; padding-top: 30px; }
.ci-hand .pc { width: calc((100% - 36px) / 7); max-width: 62px; height: auto; aspect-ratio: 58 / 84; }
.ci-hand .pc .pc-big { width: 40%; height: auto; aspect-ratio: 1; }
.ci-hand .pc.dead { filter: grayscale(.8) brightness(.7); }
.ci-hand .pc.dead::after { content: 'dead'; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: var(--bad); padding: 2px 5px; border-radius: 99px; }
.ci-teamname { font-family: var(--serif); font-size: 2.4em; margin: .1em 0; }
.ci-final { padding: 10px 0; }
.ci-final h2 { margin: .2em 0 0; }
.cover-chipin .ci-cv-cell { fill: #f3efe6; opacity: .14; }
.cover-chipin .ci-cv-chip { fill: var(--ga); animation: wsDrop 4s ease-in-out infinite; animation-delay: var(--d); }
.cover-chipin .ci-cv-chip.b { fill: #5ad1c5; }
.cover-chipin .ci-cv-line { stroke: var(--gold-2); stroke-width: 3; stroke-linecap: round; opacity: .7; }
.ci-warn { display: flex; flex-direction: column; gap: .2em; padding: .8em 1em; border-radius: 14px; background: rgba(242,126,99,.1); border: 1px solid rgba(242,126,99,.45); color: var(--text); }
.ci-warn b { color: var(--bad); text-transform: uppercase; letter-spacing: .14em; font-size: .8em; }
.ci-status .ci-warn { flex-basis: 100%; font-size: 13px; padding: 8px 12px; }
.ci-lastbar { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; padding: 8px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.ci-lastbar.open { border-color: rgba(201,169,110,.5); }
.ci-lb-row { display: flex; align-items: center; gap: 8px; }
.ci-lb-row > span:not(.kicker):not(.icon) { flex: 1; min-width: 0; }
.ci-lb-row .kicker { font-size: 10px; flex: none; }
.ci-lb-row .icon { color: var(--muted); }
.ci-recent { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.ci-auto { color: var(--muted); font-weight: 600; }
.ci-cell.last { animation: ciLast 1s ease-in-out 3; }
@keyframes ciLast { 50% { box-shadow: 0 0 0 .9cqi var(--gold-2), 0 0 4cqi rgba(230,207,159,.95); } }
.ci-cell.recent { box-shadow: 0 0 0 .4cqi rgba(230,207,159,.75); z-index: 1; }
.ci-timer { flex-basis: 100%; height: 34px; justify-content: center; }
.ci-timer.mine span { color: var(--gold-2); }
.ci-timer.urgent span { color: var(--bad); }
.ci-recent.tv { font-size: .9em; margin-top: .3em; }
.phone.chipin::before, .phone.chipin::after { content: ''; position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: 0; }
.phone.chipin.ci-myturn::before { opacity: 1; box-shadow: inset 0 0 0 4px var(--mc), inset 0 0 60px color-mix(in srgb, var(--mc) 55%, transparent); animation: ciTurnPulse 1.4s ease-in-out infinite; }
.phone.chipin.ci-flash::after { background: radial-gradient(circle, color-mix(in srgb, var(--mc) 45%, transparent), transparent 75%); animation: ciTurnFlash .9s ease-out 1; }
@keyframes ciTurnPulse { 0%, 100% { box-shadow: inset 0 0 0 3px var(--mc), inset 0 0 30px color-mix(in srgb, var(--mc) 35%, transparent); } 50% { box-shadow: inset 0 0 0 7px var(--mc), inset 0 0 110px color-mix(in srgb, var(--mc) 70%, transparent); } }
@keyframes ciTurnFlash { 0% { opacity: 1; } 100% { opacity: 0; } }
.phone.chipin.ci-myturn .ci-yours { animation: ciYours 1.4s ease-in-out infinite; color: var(--mc); }
@keyframes ciYours { 50% { transform: scale(1.12); text-shadow: 0 0 14px var(--mc); } }
.ci-yours { display: inline-block; transform-origin: left center; }
@media (prefers-reduced-motion: reduce) { .phone.chipin.ci-myturn::before, .phone.chipin.ci-myturn .ci-yours { animation: none; } }

/* ---------- Tuned In ---------- */
.tunedin { --ga: #a78bfa; }
.tu-dial { width: 100%; height: auto; display: block; overflow: visible; touch-action: none; user-select: none; -webkit-user-select: none; }
.tu-dial.live { cursor: grab; }
.tu-face { fill: url(#tu-face); stroke: rgba(201,169,110,.55); stroke-width: 4; }
.tu-ticks line { stroke: rgba(243,239,230,.25); stroke-width: 3; stroke-linecap: round; }
.tu-band { stroke: rgba(7,7,11,.5); stroke-width: 2; opacity: .92; }
.tu-bandnum { fill: #1a1408; font: 800 34px var(--sans); text-anchor: middle; dominant-baseline: middle; }
.tu-needle { transform-origin: 500px 500px; transform-box: view-box; transition: transform .14s linear; }
.tu-needle line { stroke: #f3efe6; stroke-width: 10; stroke-linecap: round; filter: drop-shadow(0 0 8px rgba(0,0,0,.6)); }
.tu-hub { fill: var(--gold); stroke: #1a1408; stroke-width: 4; }
.tu-tip { fill: #f3efe6; stroke: var(--ga); stroke-width: 6; }
.tu-dialwrap { position: relative; width: min(100%, calc((100svh - 29em) * 1000 / 560)); margin: 0 auto 1.4em; }
.tu-end { position: absolute; bottom: -1.2em; max-width: 30%; font-family: var(--serif); font-size: 1.9em; font-weight: 600; line-height: 1.1; }
.tu-end.left { left: 0; transform: translateX(-30%); text-align: right; }
.tu-end.right { right: 0; transform: translateX(30%); text-align: left; }
.tu-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 21em; gap: 2.4em; min-height: 0; }
.tu-center { display: flex; flex-direction: column; align-items: center; gap: 1em; padding: 0 5em; min-width: 0; }
.tu-clue { text-align: center; min-height: 4.8em; }
.tu-clue h1 { font-family: var(--serif); font-size: 3.4em; margin: .1em 0 0; line-height: 1.1; }
.tu-status { display: flex; align-items: center; gap: .6em; font-size: 1.3em; min-height: 1.6em; }
.tu-status small { color: var(--muted); margin-left: .6em; }
.tu-result { text-align: center; }
.tu-result h2 { font-family: var(--serif); font-size: 3em; margin: 0; }
.tu-result p { font-size: 1.3em; margin: .2em 0 .6em; }
.tu-result .pbar { width: 26em; margin: 0 auto; }
.tu-side { display: flex; flex-direction: column; gap: 1.2em; }
.tu-scores { display: grid; gap: .8em; }
.tu-sc { padding: .9em 1.1em; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .3em 1em; }
.tu-sc.active { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 10%, transparent); }
.tu-sc-name { font-weight: 800; color: var(--tc); font-size: 1.2em; }
.tu-sc b { font-size: 2.2em; font-family: var(--serif); line-height: 1; }
.tu-sc-bar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.tu-sc-bar i { display: block; height: 100%; background: var(--tc); transition: width .8s var(--ease); }
.tu-coopscore { padding: 1em; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); display: flex; align-items: baseline; gap: .5em; flex-wrap: wrap; }
.tu-coopscore b { font-size: 3em; font-family: var(--serif); color: var(--ga); }
.tu-coopscore small { flex-basis: 100%; color: var(--muted); }
.tu-teams { display: grid; gap: .8em; }
.tu-tcard { padding: .9em 1.1em; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.tu-tcard > b { color: var(--tc); font-size: 1.2em; display: block; margin-bottom: .4em; }
.tu-tcard.sm { font-size: .92em; }
.tu-members { display: flex; flex-direction: column; gap: .35em; }
.tu-m { display: flex; align-items: center; gap: .6em; }
.tu-m span { flex: 1; font-weight: 700; }
.tu-m small { color: var(--ga); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .75em; }
.tu-m.tuner span { color: var(--ga); }
.tu-m.ready .icon { color: var(--good); }
.tu-hist { display: grid; gap: .35em; font-size: .95em; }
.tu-hrow { display: grid; grid-template-columns: 1fr auto; gap: 0 .8em; }
.tu-hrow small { grid-column: 1; color: var(--muted); }
.tu-hrow b { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 1.2em; }
.tu-intro { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1.5em; text-align: center; }
.tu-intro .intro-title h1 { font-family: var(--serif); font-size: 4.5em; margin: .1em 0 0; }
.tu-introteams { display: flex; gap: 1.2em; flex-wrap: wrap; justify-content: center; }
.tu-introteams .tu-tcard { min-width: 15em; text-align: left; font-size: 1.1em; }
.tu-how { text-align: left; max-width: 52em; font-size: 1.25em; display: grid; gap: .5em; margin: 0; }
.tu-intro .pbar { width: 30em; }
.tu-final .winner h1 { font-family: var(--serif); font-size: 5em; }
/* phone */
.tu-phone { display: flex; flex-direction: column; gap: 12px; }
.tu-role { text-align: center; color: var(--ga); }
.tu-pcard { display: flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--serif); font-size: 1.25em; font-weight: 600; text-align: center; }
.tu-pcard .icon { color: var(--gold); flex: none; }
.tu-pdial { position: relative; padding-bottom: 26px; }
.tu-pends { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 12px; font-weight: 800; font-size: 14px; }
.tu-pends span:last-child { text-align: right; }
.tu-tip { text-align: center; font-size: 14px; margin: 0; }
.tu-say { text-align: center; font-weight: 800; color: var(--gold-2); margin: 0; }
.tu-input { text-align: center; font-size: 1.15em; }
.tu-pclue { text-align: center; }
.tu-pclue small { display: block; color: var(--muted); }
.tu-pclue b { font-family: var(--serif); font-size: 1.6em; color: var(--text); }
.tu-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tu-sidebtn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px; border-radius: 16px; background: var(--panel); border: 2px solid var(--line-2); cursor: pointer; }
.tu-sidebtn .icon { width: 1.6em; height: 1.6em; color: var(--gold); }
.tu-sidebtn b { font-size: 1.2em; }
.tu-sidebtn small { color: var(--muted); }
.tu-sidebtn.on { border-color: var(--ga); background: color-mix(in srgb, var(--ga) 14%, transparent); }
.tu-presult { text-align: center; }
.tu-presult h2 { font-family: var(--serif); font-size: 2.2em; margin: 0; }
.tu-teamname { font-family: var(--serif); font-size: 2.4em; margin: .1em 0; }
.cover-tunedin .tu-cv-face { fill: rgba(167,139,250,.1); stroke: var(--ga); stroke-width: 2; }
.cover-tunedin .tu-cv-band { opacity: .85; }
.cover-tunedin .tu-cv-needle { stroke: #f3efe6; stroke-width: 4; stroke-linecap: round; transform-origin: 160px 150px; animation: tuSwing 4s ease-in-out infinite; }
@keyframes tuSwing { 0%, 100% { transform: rotate(-38deg); } 50% { transform: rotate(14deg); } }

/* ---------- Boom Room ---------- */
.boomroom { --ga: #ff7a3d; }
.br-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 17em; gap: 2em; min-height: 0; }
.br-arena { position: relative; height: calc(100svh - 9em); display: grid; place-items: center; min-width: 0; }
.br-canvas { display: block; border-radius: 10px; box-shadow: 0 0 0 2px rgba(201,169,110,.4), 0 30px 60px rgba(0,0,0,.6); }
.br-overlay { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.br-count { text-align: center; }
.br-count b { display: block; font-family: var(--serif); font-size: 9em; line-height: 1; color: var(--ga); text-shadow: 0 0 40px rgba(255,122,61,.6), 0 6px 0 rgba(0,0,0,.5); }
.br-banner { display: flex; flex-direction: column; align-items: center; gap: .5em; padding: 1.6em 3em; border-radius: 24px; background: rgba(7,7,11,.85); border: 2px solid var(--pc); box-shadow: 0 0 60px color-mix(in srgb, var(--pc) 40%, transparent); backdrop-filter: blur(6px); text-align: center; }
.br-banner h1 { font-family: var(--serif); font-size: 3em; margin: 0; color: var(--pc); }
.br-banner p { margin: 0; font-size: 1.2em; }
.br-side { display: flex; flex-direction: column; gap: .7em; }
.br-pl { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .3em .7em; padding: .7em .9em; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--pc); transition: opacity .3s; }
.br-pl.out { opacity: .4; }
.br-pl-main b { display: block; color: var(--pc); }
.br-pl .br-wins { grid-column: 1 / -1; }
.br-powers { display: inline-flex; gap: .7em; font-size: .85em; font-weight: 800; color: var(--muted); }
.br-powers i { font-style: normal; display: inline-flex; align-items: center; gap: .25em; }
.br-powers i::before { content: ''; width: .75em; height: .75em; border-radius: 3px; }
.br-powers i.b::before { background: #c9a96e; } .br-powers i.f::before { background: #ff7a3d; } .br-powers i.s::before { background: #7fd36b; }
.br-powers.sm { font-size: 12px; }
.br-wins { display: inline-flex; gap: 4px; }
.br-wins i { width: 1.4em; height: .45em; border-radius: 99px; background: var(--line-2); }
.br-wins i.on { background: var(--ga); box-shadow: 0 0 8px var(--ga); }
.p-top .br-wins i { width: 14px; height: 6px; }
.br-clock { font-weight: 800; font-variant-numeric: tabular-nums; padding: .35em .8em; border-radius: 10px; border: 1px solid var(--line-2); }
.br-clock.hot { color: var(--bad); border-color: rgba(242,126,99,.6); animation: brHot 1s ease-in-out infinite; }
@keyframes brHot { 50% { background: rgba(242,126,99,.15); } }
.br-intro { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1.5em; text-align: center; }
.br-intro .intro-title h1 { font-family: var(--serif); font-size: 4.5em; margin: .1em 0 0; }
.br-introplayers { display: flex; gap: 1.4em; flex-wrap: wrap; justify-content: center; }
.br-ip { display: flex; flex-direction: column; align-items: center; gap: .4em; color: var(--pc); }
.br-ip.ready .icon { color: var(--good); }
.br-how { text-align: left; max-width: 52em; font-size: 1.25em; display: grid; gap: .5em; margin: 0; }
.br-how .pw-b { color: #c9a96e; } .br-how .pw-f { color: #ff7a3d; } .br-how .pw-s { color: #7fd36b; }
.br-intro .pbar { width: 30em; }
/* phone controller */
.phone.br-controller { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.br-ctl { min-height: calc(100svh - 110px); display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.br-msg { text-align: center; font-family: var(--serif); font-size: 1.5em; min-height: 1.6em; color: var(--gold-2); padding-top: 10px; }
.br-ctl.dead .br-msg { color: var(--bad); }
.br-ctl.dead .br-ctl-row { opacity: .3; }
.br-ctl-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 8px; }
.br-pad { position: relative; flex: none; width: min(54vw, 230px); aspect-ratio: 1; border-radius: 50%; touch-action: none; background: radial-gradient(circle, #241d33, #15111f 70%); border: 2px solid rgba(201,169,110,.35); box-shadow: inset 0 0 30px rgba(0,0,0,.6), 0 10px 30px rgba(0,0,0,.5); }
.br-knob { position: absolute; left: 50%; top: 50%; width: 34%; height: 34%; margin: -17% 0 0 -17%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f3e2bb, var(--gold) 60%, #8a7041); box-shadow: 0 6px 14px rgba(0,0,0,.5); transition: transform .08s; pointer-events: none; }
.br-arrow { position: absolute; width: 22%; height: 22%; color: rgba(243,239,230,.35); pointer-events: none; transition: color .1s; }
.br-arrow svg { width: 100%; height: 100%; }
.br-arrow.up { left: 39%; top: 4%; } .br-arrow.down { left: 39%; bottom: 4%; transform: rotate(180deg); }
.br-arrow.left { left: 4%; top: 39%; transform: rotate(-90deg); } .br-arrow.right { right: 4%; top: 39%; transform: rotate(90deg); }
.br-arrow.on { color: var(--ga); filter: drop-shadow(0 0 6px var(--ga)); }
.br-bomb { flex: none; width: min(33vw, 150px); aspect-ratio: 1; border-radius: 50%; border: 0; touch-action: none; cursor: pointer; font-weight: 900; letter-spacing: .12em; font-size: 1.15em; color: #fff;
  background: radial-gradient(circle at 35% 30%, #ffb07a, #ff6a2b 45%, #b8401a); box-shadow: 0 8px 0 #7a2a10, 0 14px 30px rgba(0,0,0,.5); transition: transform .06s, box-shadow .06s; }
.br-bomb.hit { transform: translateY(6px); box-shadow: 0 2px 0 #7a2a10, 0 6px 14px rgba(0,0,0,.5); }
.cover-boomroom .br-cv-wall { fill: #3b334c; }
.cover-boomroom .br-cv-crate { fill: #9a6634; }
.cover-boomroom .br-cv-flame { fill: var(--ga); opacity: .9; animation: brFlame 2.4s ease-in-out infinite; }
.cover-boomroom .br-cv-bomb { fill: #0d0b14; stroke: var(--gold); stroke-width: 2; }
@keyframes brFlame { 0%, 60%, 100% { opacity: 0; } 70%, 90% { opacity: .95; } }

/* ---------- Landing tabs (Huddle) ---------- */
.landing { place-items: start center; }
.landing-head { position: relative; align-items: center; }
.l-gear { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.l-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 4px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.l-tab { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 11px 4px; white-space: nowrap; min-width: 0; font-size: .95em; border: 0; background: none; border-radius: 12px; font-weight: 800; color: var(--muted); cursor: pointer; transition: color .25s; }
.l-tab.on { color: #1a1408; }
.l-tabpill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); transform: translateX(calc(var(--tab, 0) * 100%)); border-radius: 12px; background: linear-gradient(180deg, var(--gold-2), var(--gold) 60%, #a98a52); box-shadow: 0 6px 18px -6px rgba(201,169,110,.6); transition: transform .35s var(--ease); }
.l-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; font-size: 12px; background: var(--bad); color: #fff; }
.l-pane { display: flex; flex-direction: column; gap: 18px; }
.l-pane .hero h1 { font-size: clamp(2.6rem, 12vw, 3.6rem); margin: 4px 0 10px; }
.l-turnstrip { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 14px; text-align: left; cursor: pointer; background: rgba(201,169,110,.1); border: 1px solid rgba(201,169,110,.45); color: var(--text); }
.l-turnstrip > span:nth-child(2) { flex: 1; }
.l-turnstrip .icon { color: var(--gold); }
.l-turndot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 0 0 rgba(230,207,159,.7); animation: lTurn 1.6s ease-out infinite; }
@keyframes lTurn { 70% { box-shadow: 0 0 0 10px rgba(230,207,159,0); } 100% { box-shadow: 0 0 0 0 rgba(230,207,159,0); } }
.remote { gap: 14px; padding: 0; border: 0; background: none; }
.rm-intro { margin: 0; font-size: .92em; text-align: center; }
.remote .section-head h3 { margin: 4px 0 0; }
.rm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rm-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 92px; padding: 14px 14px 12px; border-radius: 16px; text-align: left; cursor: pointer; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ga) 35%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--ga) 16%, transparent), color-mix(in srgb, var(--ga) 3%, transparent) 70%); transition: transform .15s var(--ease), border-color .2s; }
.rm-tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ga); }
.rm-tile:active { transform: scale(.97); }
.rm-tile b { font-family: var(--serif); font-size: 1.15em; font-weight: 600; line-height: 1.15; }
.rm-tile span { color: var(--muted); font-size: .8em; line-height: 1.3; }
.ga-sheet .btn + .btn { margin-top: -4px; }
.ga-sheet p { margin: -6px 0 4px; }

/* ---------- Feedback ---------- */
.fb-tab { position: fixed; right: 0; top: 50%; z-index: 40; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 2px 9px 3px; border: 1px solid rgba(201,169,110,.35); border-right: 0; border-radius: 9px 0 0 9px;
  background: rgba(17,16,24,.85); backdrop-filter: blur(8px); color: var(--gold-2); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  writing-mode: vertical-rl; transform: translateY(-50%); opacity: .65; cursor: pointer; transition: opacity .2s, padding .2s; }
.fb-tab:hover, .fb-tab:focus-visible, .fb-tab:active { opacity: 1; padding-right: 6px; }
.fb-tab .icon { transform: rotate(-90deg); width: 14px; height: 14px; }
/* In games it is icon-only and slim, so it barely touches the screen edge; the label shows on the home screen. */
.fb-tab span:not(.icon) { display: none; }
body[data-role=none] .fb-tab span:not(.icon) { display: inline; }
body[data-role=none] .fb-tab { top: 58%; padding: 10px 5px; opacity: .6; }
body[data-role=display] .fb-tab { padding: 12px 5px; opacity: .35; }
.fb-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fb-kind { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 8px; padding: 10px 12px; border-radius: 14px; text-align: left; cursor: pointer; background: var(--panel); border: 1px solid var(--line-2); }
.fb-kind .icon { grid-row: span 2; color: var(--gold); }
.fb-kind b { font-size: .9em; line-height: 1.2; }
.fb-kind small { color: var(--muted); font-size: .72em; line-height: 1.25; }
.fb-kind.on { border-color: var(--gold); background: rgba(201,169,110,.12); }
.fb-text { min-height: 110px; resize: vertical; font: inherit; line-height: 1.4; }
.fb-ctx { color: var(--dim); font-size: .75em; }
/* owner inbox */
.admin .ib-wrap { max-width: 760px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 20px) 16px 60px; display: flex; flex-direction: column; gap: 14px; }
.ib-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ib-head h1 { font-family: var(--serif); font-weight: 500; margin: 2px 0 0; font-size: 2em; }
.ib-notify { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.ib-ntxt { flex: 1; min-width: 14em; display: flex; flex-direction: column; gap: 2px; }
.ib-ntxt small { color: var(--muted); }
.ib-nbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.ib-filters { display: flex; flex-direction: column; gap: 8px; }
.ib-filters .segs { display: flex; flex-wrap: wrap; gap: 6px; }
.ib-list { display: flex; flex-direction: column; gap: 10px; }
.ib-card { padding: 14px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--kc); display: flex; flex-direction: column; gap: 6px; }
.ib-card.done { opacity: .55; }
.ib-top { display: flex; align-items: center; gap: 10px; }
.ib-top small { margin-left: auto; color: var(--muted); }
.ib-kind { font-size: .7em; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--kc); padding: .25em .6em; border-radius: 99px; border: 1px solid var(--kc); }
.ib-text { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 1.02em; }
.ib-ctx { color: var(--gold-2); opacity: .8; }
.ib-ua { color: var(--dim); font-size: .7em; word-break: break-all; }
.ib-btns { display: flex; gap: 8px; margin-top: 4px; }
.ib-empty { text-align: center; padding: 30px 0; }

/* ---------- Two-player duel frame + Drop Four ---------- */
.du-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; }
.du-stage[hidden] { display: none; }
.du-credits { display: block; text-align: center; font-size: .75em; margin-top: 6px; }
.du-end h2 { font-family: var(--serif); }
.d4-wrap { width: min(100%, calc((100svh - 230px) * 7 / 6.4)); }
.d4-board { container-type: inline-size; display: grid; grid-template-columns: repeat(7, 1fr); gap: 1.4cqw; padding: 2.6cqw; border-radius: 18px; background: linear-gradient(180deg, #2b2450, #1b1638); border: 1px solid rgba(201,169,110,.4); box-shadow: inset 0 2px 0 rgba(255,255,255,.08), 0 20px 50px rgba(0,0,0,.55); }
.d4-col { display: flex; flex-direction: column; gap: 1.4cqw; padding: 1cqw 0; border: 0; border-radius: 12px; background: none; cursor: default; transition: background .2s; }
.d4-board .d4-col:not(:disabled) { cursor: pointer; }
.d4-wrap.mine .d4-col:not(:disabled):hover, .d4-wrap.mine .d4-col:not(:disabled):active { background: rgba(232,177,58,.12); }
.d4-cell { position: relative; display: block; flex: none; width: 100%; aspect-ratio: 1; border-radius: 50%; background: #0c0a18; box-shadow: inset 0 3px 6px rgba(0,0,0,.8); }
.d4-cell i { position: absolute; inset: 7%; border-radius: 50%; opacity: 0; }
.d4-cell.me i, .d4-cell.them i { opacity: 1; }
.d4-cell.me i { background: radial-gradient(circle at 35% 30%, #fff3c4, #e8b13a 45%, #9a6f1a); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.d4-cell.them i { background: radial-gradient(circle at 35% 30%, #ffc2bd, #d64045 45%, #7d1d22); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.d4-cell.drop i { animation: d4Drop calc(.12s + var(--fall) * .06s) cubic-bezier(.5, 0, 1, 1), d4Bounce .25s ease-out calc(.12s + var(--fall) * .06s); }
@keyframes d4Drop { from { transform: translateY(calc(var(--fall) * -116%)); } }
@keyframes d4Bounce { 40% { transform: translateY(-9%); } }
.d4-cell.last:not(.win)::after { content: ''; position: absolute; inset: 38%; border-radius: 50%; background: rgba(255,255,255,.55); }
.d4-cell.win i { animation: d4Win 1s ease-in-out infinite; box-shadow: 0 0 0 3px #fff8e6, 0 0 18px #fff3c4; }
@keyframes d4Win { 50% { transform: scale(.88); } }

/* ---------- Chess ---------- */
.ch-wrap { width: min(100%, calc(100svh - 250px)); display: flex; flex-direction: column; gap: 6px; }
.ch-caps { min-height: 22px; display: flex; align-items: center; gap: 0; }
.ch-caps .ch-pc { width: 20px; height: 20px; margin-right: -6px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.ch-caps b { margin-left: 12px; font-size: .85em; color: var(--muted); }
.ch-boardbox { position: relative; }
.ch-board { display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 3px solid #3a2a18; box-shadow: 0 0 0 1px rgba(201,169,110,.45), 0 20px 50px rgba(0,0,0,.6); }
.ch-sq { position: relative; border: 0; padding: 0; margin: 0; aspect-ratio: 1; cursor: pointer; container-type: inline-size; }
.ch-sq.light { background: #e9dcc0; } .ch-sq.dark { background: #a37b52; }
.ch-sq .ch-pc { position: absolute; inset: 4%; width: 92%; height: 92%; pointer-events: none; z-index: 2; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.ch-rank, .ch-file { position: absolute; font-size: 21cqi; font-weight: 800; line-height: 1; z-index: 1; opacity: .75; }
.ch-rank { left: 5%; top: 5%; } .ch-file { right: 6%; bottom: 4%; }
.ch-sq.light .ch-rank, .ch-sq.light .ch-file { color: #a37b52; } .ch-sq.dark .ch-rank, .ch-sq.dark .ch-file { color: #e9dcc0; }
.ch-sq.last::before { content: ''; position: absolute; inset: 0; background: rgba(230,190,70,.42); }
.ch-sq.sel::before { content: ''; position: absolute; inset: 0; background: rgba(240,200,80,.62); }
.ch-sq.move::after { content: ''; position: absolute; left: 50%; top: 50%; width: 30%; height: 30%; margin: -15% 0 0 -15%; border-radius: 50%; background: rgba(40,28,10,.38); z-index: 3; }
.ch-sq.cap::after { content: ''; position: absolute; inset: 4%; border-radius: 50%; border: 6cqi solid rgba(40,28,10,.42); z-index: 3; }
.ch-sq.check::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255,40,30,.95), rgba(255,40,30,.4) 55%, transparent 75%); }
.ch-sq.nope { animation: chNope .35s; }
@keyframes chNope { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.ch-promo { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(5,4,3,.6); backdrop-filter: blur(2px); border-radius: 10px; }
.ch-promo[hidden] { display: none; }
.ch-promo-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; border-radius: 18px; background: #15120d; border: 1px solid rgba(201,169,110,.5); }
.ch-promo-row { display: flex; gap: 8px; }
.ch-promo-btn { width: 64px; height: 64px; border-radius: 14px; border: 1px solid var(--line-2); background: #e9dcc0; cursor: pointer; padding: 6px; }
.ch-promo-btn img { width: 100%; height: 100%; }
.ch-moves p { margin: 4px 0 0; font-size: .85em; line-height: 1.6; color: var(--text); word-spacing: 2px; }

/* ---------- Backgammon ---------- */
.bg-wrap { width: 100%; max-width: 560px; }
.bg-board { container-type: inline-size; display: flex; flex-direction: column; padding: 2cqw; border-radius: 14px; background: linear-gradient(180deg, #3a2414, #2a190d); border: 2px solid #5a3a1f; box-shadow: inset 0 0 0 1px rgba(201,169,110,.35), 0 20px 50px rgba(0,0,0,.6); }
.bg-half { display: grid; grid-template-columns: 6fr 1.1fr 6fr 1.3fr; gap: 1cqw; height: 46cqw; }
.bg-q { display: grid; grid-template-columns: repeat(6, 1fr); background: #1a3326; border-radius: 6px; overflow: hidden; }
.bg-pt { position: relative; border: 0; padding: 0; background: none; cursor: default; display: flex; flex-direction: column; align-items: center; }
.bg-pt.bot { flex-direction: column-reverse; }
.bg-tri { position: absolute; left: 4%; right: 4%; top: 0; height: 88%; background: #c9a36b; clip-path: polygon(0 0, 100% 0, 50% 100%); opacity: .9; }
.bg-pt.alt .bg-tri { background: #8e3b2a; }
.bg-pt.bot .bg-tri { top: auto; bottom: 0; clip-path: polygon(50% 0, 0 100%, 100% 100%); }
.bg-stack { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; width: 100%; padding: 2px 0; }
.bg-pt.bot .bg-stack { flex-direction: column-reverse; }
.bg-ck { display: grid; place-items: center; width: 6.9cqw; height: 6.9cqw; margin: -.15cqw 0; border-radius: 50%; font-style: normal; font-weight: 900; font-size: 3cqw; box-shadow: 0 1px 2px rgba(0,0,0,.6), inset 0 -2px 0 rgba(0,0,0,.25); }
.bg-ck.me { background: radial-gradient(circle at 35% 30%, #fffaf0, #e9dcc0 55%, #b9a581); color: #3a2a18; }
.bg-ck.them { background: radial-gradient(circle at 35% 30%, #6b5a52, #2a1f1b 60%, #120c0a); color: #e9dcc0; border: 1px solid #5a4a42; }
.bg-pt.src .bg-tri { filter: brightness(1.25); }
.bg-pt.src .bg-stack .bg-ck.me:last-child, .bg-pt.bot.src .bg-stack .bg-ck.me:last-child { box-shadow: 0 0 0 2px var(--gold-2), 0 0 10px var(--gold); }
.bg-pt.sel .bg-tri { background: var(--gold-2) !important; opacity: 1; }
.bg-pt.dest { cursor: pointer; }
.bg-pt.dest .bg-tri { background: #7fd36b !important; opacity: 1; animation: bgDest 1s ease-in-out infinite; }
@keyframes bgDest { 50% { opacity: .55; } }
.bg-pt.src { cursor: pointer; }
.bg-pt.last .bg-tri { box-shadow: none; filter: brightness(1.15) saturate(1.3); }
.bg-pt.last::after { content: ''; position: absolute; left: 50%; width: 1.4cqw; height: 1.4cqw; margin-left: -.7cqw; border-radius: 50%; background: var(--gold-2); bottom: 1cqw; z-index: 2; }
.bg-pt.top.last::after { bottom: auto; top: auto; bottom: -2.4cqw; }
.bg-bar { border: 0; padding: 2px 0; border-radius: 6px; background: #241509; display: flex; flex-direction: column; align-items: center; gap: 0; cursor: default; }
.bg-bar.bot { justify-content: flex-end; }
.bg-bar.src { cursor: pointer; box-shadow: inset 0 0 0 2px var(--gold-2); }
.bg-bar.sel { background: #3a2410; }
.bg-off { border: 0; padding: 4px 0; border-radius: 6px; background: #1c1108; display: flex; flex-direction: column; align-items: center; gap: 1px; overflow: hidden; }
.bg-off.bot { flex-direction: column-reverse; }
.bg-off.dest { cursor: pointer; box-shadow: inset 0 0 0 2px #7fd36b; animation: bgDest 1s ease-in-out infinite; }
.bg-sl { width: 80%; height: 1.4cqw; border-radius: 2px; flex: none; }
.bg-sl.me { background: #e9dcc0; } .bg-sl.them { background: #4a3a32; }
.bg-offn { font-size: 2.6cqw; font-weight: 800; color: var(--muted); }
.bg-mid { display: grid; grid-template-columns: 6fr 1.1fr 6fr 1.3fr; gap: 1cqw; align-items: center; height: 11cqw; }
.bg-cube { justify-self: center; display: grid; place-items: center; width: 6.5cqw; height: 6.5cqw; border-radius: 1.2cqw; background: #f3efe6; color: #1a1408; font-weight: 900; font-size: 2.8cqw; box-shadow: 0 2px 4px rgba(0,0,0,.6); }
.bg-cube.me { transform: translateY(3cqw); } .bg-cube.them { transform: translateY(-3cqw); }
.bg-cube.off { visibility: hidden; }
.bg-dice { display: flex; justify-content: center; align-items: center; gap: 1.6cqw; }
.bg-dice small { font-size: 2.4cqw; color: var(--muted); }
.bg-die { display: grid; grid-template-columns: repeat(3, 1fr); width: 8cqw; height: 8cqw; padding: .9cqw; border-radius: 1.6cqw; background: #f6f1e4; box-shadow: 0 2px 4px rgba(0,0,0,.6); }
.bg-dice.them .bg-die { background: #2a1f1b; border: 1px solid #5a4a42; }
.bg-die i { border-radius: 50%; margin: 18%; }
.bg-die i.on { background: #1a1408; }
.bg-dice.them .bg-die i.on { background: #e9dcc0; }
.bg-die.used { opacity: .3; }

/* ---------- Gin Rummy ---------- */
.gn-wrap { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 12px; align-self: stretch; justify-content: space-between; padding: 4px 0; }
.du-stage:has(.gn-wrap) { place-items: stretch center; overflow-y: auto; }
.gn-opp { display: flex; align-items: center; gap: 10px; }
.gn-oppname { font-weight: 800; }
.gn-opp small { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: .7em; }
.gn-backs { display: flex; }
.gn-table { display: flex; justify-content: center; gap: 22px; padding: 18px; border-radius: 22px; background: radial-gradient(ellipse at center, #1f4a32, #12301f 75%); border: 1px solid rgba(201,169,110,.35); box-shadow: inset 0 0 40px rgba(0,0,0,.5); }
.gn-stock, .gn-pile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; padding: 6px; border-radius: 14px; cursor: default; }
.gn-stock small { color: rgba(255,255,255,.65); font-size: .75em; font-weight: 700; }
.gn-stock.go, .gn-pile.go { cursor: pointer; box-shadow: 0 0 0 2px var(--gold-2), 0 0 18px rgba(230,207,159,.5); animation: haGo 2.4s ease-in-out infinite; }
.gn-pile .pc { cursor: inherit; }
.gn-last { min-height: 22px; text-align: center; font-size: .9em; color: var(--muted); }
.gn-last b { color: var(--text); }
.gn-dw { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.gn-dw b { font-family: var(--serif); font-size: 1.4em; color: var(--gold-2); }
.gn-dw small { color: var(--good); font-weight: 800; }
.gn-hand { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; padding-top: 26px; }
.gn-group { display: flex; padding: 3px 3px 5px; border-radius: 10px; }
.gn-group .pc { width: 44px; height: 64px; margin-right: -14px; }
.gn-group .pc:last-child { margin-right: 0; }
.gn-group .pc .pc-big { width: 18px; height: 18px; }
.gn-group .pc-corner b { font-size: 13px; }
.gn-group.meld { background: rgba(201,169,110,.14); box-shadow: inset 0 -3px 0 var(--gold); }
.gn-group.dead { background: rgba(255,255,255,.03); }
.gn-group.laid { background: rgba(127,211,107,.14); box-shadow: inset 0 -3px 0 var(--good); }
.gn-group .pc.sel { transform: translateY(-22px); }
.gn-result { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.gn-result h3 { margin: 0; font-family: var(--serif); font-size: 1.4em; }
.gn-rside small { color: var(--muted); font-weight: 700; }
.gn-rcards { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.gn-rcards .gn-group .pc.small { width: 34px; height: 50px; margin-right: -10px; }
.gn-rcards .gn-group .pc.small:last-child { margin-right: 0; }
/* Live "N online" pill, top-left of the landing header */
.l-online { position: absolute; left: 0; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); font-size: 12px; color: var(--muted, #9a958c); white-space: nowrap; }
.l-online[hidden] { display: none; }
.l-online i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); animation: l-online-ping 2.4s ease-out infinite; }
@keyframes l-online-ping { 0% { box-shadow: 0 0 0 0 rgba(95,191,127,.55); } 70%, 100% { box-shadow: 0 0 0 6px rgba(95,191,127,0); } }
@media (prefers-reduced-motion: reduce) { .l-online i { animation: none; } }
/* Cancel button on the waiting-for-opponent card */
.rm-cancel { margin-top: 4px; color: var(--muted); }
.rm-cancel.armed, .btn.armed { color: var(--bad); border-color: var(--bad); background: rgba(242,126,99,.08); }

/* Animated art on the two-player game tiles (public/js/tileart.js) */
.rm-tile .ta { display: block; width: 100%; height: 62px; margin: -4px 0 6px; color: var(--ga); }
.rm-tile .ta svg { width: 100%; height: 100%; overflow: visible; }
.ta svg * { transform-box: fill-box; transform-origin: center; }
/* These pivot on a fixed point of the drawing, which the rule above would override */
.ta svg .ta-needle { transform-box: view-box; transform-origin: 60px 50px; }
.ta svg .ta-pin { transform-box: view-box; transform-origin: 78px 38px; }
.ta svg .ta-pin.b { transform-origin: 40px 36px; }
.ta .ta-rank { font: 700 8px var(--sans); }
.ta .ta-letter { font: 700 13px var(--serif); text-anchor: middle; }
.ta .ta-score { font: 700 5px var(--sans); text-anchor: end; }
.ta .ta-num { font: 800 11px var(--sans); text-anchor: middle; }
.ta .ta-q { font: 700 12px var(--sans); text-anchor: middle; }
.ta .ta-dollar { font: 800 17px var(--serif); text-anchor: middle; }

.ta svg .ta-fan { transform-origin: 50% 100%; }
.ta-fan { animation: ta-fan 3.6s var(--ease, ease) infinite; }
@keyframes ta-fan { 0%, 100% { transform: rotate(calc(var(--r) * .45)); } 40%, 70% { transform: rotate(var(--r)); } }

.ta svg .ta-gin { transform-origin: 50% 100%; }
.ta-gin { animation: ta-gin 4s ease-in-out infinite; }
@keyframes ta-gin { 0%, 12%, 100% { transform: translateX(var(--x)) rotate(var(--r)); } 35%, 85% { transform: none; } }
.ta-meld { opacity: 0; animation: ta-meld 4s ease-in-out infinite; }
@keyframes ta-meld { 0%, 35% { opacity: 0; } 45%, 80% { opacity: .9; } 90%, 100% { opacity: 0; } }

.ta-peg { animation: ta-peg 3.4s ease-in-out infinite; }
.ta-peg.b { animation-delay: 1.7s; }
@keyframes ta-peg {
  0%, 12% { transform: translate(0, 0); opacity: 1; } 20% { transform: translate(8px, -7px); } 28%, 42% { transform: translate(16px, 0); }
  50% { transform: translate(24px, -7px); } 58%, 80% { transform: translate(32px, 0); opacity: 1; } 90% { transform: translate(32px, 0); opacity: 0; } 100% { transform: translate(0, 0); opacity: 0; } }

.ta-meet.l { animation: ta-meetl 3.2s ease-in-out infinite; }
.ta-meet.r { animation: ta-meetr 3.2s ease-in-out infinite; }
@keyframes ta-meetl { 0%, 100% { transform: translateX(-2px); } 45%, 62% { transform: translateX(12px); } }
@keyframes ta-meetr { 0%, 100% { transform: translateX(2px); } 45%, 62% { transform: translateX(-12px); } }
.ta-spark { opacity: 0; animation: ta-spark 3.2s ease-in-out infinite; }
@keyframes ta-spark { 0%, 42% { opacity: 0; transform: scale(.3) rotate(0); } 52% { opacity: 1; transform: scale(1.2) rotate(45deg); } 62% { opacity: 0; transform: scale(.6) rotate(90deg); } 100% { opacity: 0; } }

.ta-lens { animation: ta-lens 5s ease-in-out infinite; }
@keyframes ta-lens { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(34px, -4px); } 50% { transform: translate(52px, 5px); } 75% { transform: translate(18px, 6px); } }

.ta-pop { animation: ta-pop 4s ease-out infinite; }
@keyframes ta-pop { 0%, 8% { transform: translateY(-14px) scale(.5); opacity: 0; } 18% { transform: translateY(2px) scale(1.06); opacity: 1; } 24%, 86% { transform: none; opacity: 1; } 96%, 100% { transform: none; opacity: 0; } }
.ta svg .ta-under { transform-origin: 0 50%; }
.ta-under { animation: ta-under 4s ease-in-out infinite; }
@keyframes ta-under { 0%, 28% { transform: scaleX(0); } 45%, 86% { transform: scaleX(1); } 96%, 100% { transform: scaleX(1); opacity: 0; } }

.ta svg .ta-swing { transform-origin: 50% 0; }
.ta-swing { animation: ta-swing 2.8s ease-in-out infinite; }
@keyframes ta-swing { 0%, 100% { transform: rotate(-11deg); } 50% { transform: rotate(11deg); } }
.ta-coin { animation: ta-coin 2.8s ease-out infinite; }
.ta-coin.b { animation-delay: 1.4s; }
@keyframes ta-coin { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-34px); opacity: 0; } }

.ta-flip.back { animation: ta-back 4s ease-in-out infinite; }
.ta-flip.front { transform: scaleX(0); animation: ta-front 4s ease-in-out infinite; }
@keyframes ta-back { 0%, 25% { transform: scaleX(1); } 31%, 82% { transform: scaleX(0); } 88%, 100% { transform: scaleX(1); } }
@keyframes ta-front { 0%, 31% { transform: scaleX(0); } 37%, 76% { transform: scaleX(1); } 82%, 100% { transform: scaleX(0); } }

.ta-jump { animation: ta-jump 3.6s ease-in-out infinite; }
@keyframes ta-jump { 0%, 25% { transform: translate(0, 0); opacity: 1; } 40% { transform: translate(12px, -30px) scale(1.2); } 52%, 82% { transform: translate(24px, -24px); opacity: 1; } 92% { transform: translate(24px, -24px); opacity: 0; } 100% { transform: translate(0, 0); opacity: 0; } }
.ta-taken { animation: ta-taken 3.6s ease-in-out infinite; }
@keyframes ta-taken { 0%, 44% { opacity: 1; transform: scale(1); } 54%, 88% { opacity: 0; transform: scale(.3); } 100% { opacity: 1; transform: scale(1); } }

.ta-code { fill: #e5383b; animation: ta-code 2.2s steps(1) infinite; }
@keyframes ta-code { 0% { fill: #e5383b; } 20% { fill: #5fb8d9; } 40% { fill: #e8b13a; } 60% { fill: #7ed957; } 80% { fill: #8e7cc3; } }
.ta-key { animation: ta-key 2.2s ease-in-out infinite; }
@keyframes ta-key { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }

.ta-slide { animation: ta-slide 3.4s cubic-bezier(.3, 1.4, .5, 1) infinite; }
@keyframes ta-slide { 0%, 10% { transform: translate(22px, -18px) rotate(18deg); opacity: 0; } 20% { opacity: 1; } 40%, 85% { transform: none; opacity: 1; } 95%, 100% { transform: none; opacity: 0; } }

.ta-trail { stroke-dasharray: 101; stroke-dashoffset: 0; animation: ta-trail 3.6s ease-in-out infinite; }
@keyframes ta-trail { 0%, 8% { stroke-dashoffset: 101; opacity: 1; } 55%, 82% { stroke-dashoffset: 0; opacity: 1; } 95%, 100% { stroke-dashoffset: 0; opacity: 0; } }

.ta-drop { animation: ta-drop 3s ease-in infinite; }
@keyframes ta-drop { 0% { transform: translateY(-46px); opacity: 0; } 8% { opacity: 1; } 32% { transform: translateY(0); animation-timing-function: ease-out; } 40% { transform: translateY(-6px); animation-timing-function: ease-in; } 47%, 84% { transform: translateY(0); opacity: 1; } 94%, 100% { transform: translateY(0); opacity: 0; } }

.ta-knight { animation: ta-knight 4s ease-in-out infinite; }
@keyframes ta-knight { 0%, 22% { transform: translate(0, 0); } 34% { transform: translate(5px, -20px) scale(1.25); } 44%, 72% { transform: translate(12px, -24px); } 84% { transform: translate(7px, -8px) scale(1.2); } 94%, 100% { transform: translate(0, 0); } }
.ta-target { opacity: 0; animation: ta-target 4s ease-in-out infinite; }
@keyframes ta-target { 0%, 12% { opacity: 0; } 22%, 40% { opacity: 1; } 50%, 100% { opacity: 0; } }

.ta-die { animation: ta-die 3.2s ease-out infinite; }
@keyframes ta-die { 0% { transform: translate(-34px, -14px) rotate(-260deg); opacity: 0; } 10% { opacity: 1; } 38% { transform: translate(0, 0) rotate(0); } 44% { transform: translateY(-3px); } 50%, 86% { transform: none; opacity: 1; } 96%, 100% { transform: none; opacity: 0; } }

@media (prefers-reduced-motion: reduce) { .ta svg * { animation: none !important; } }
/* Mastermind Duel: the opponent is lining up marbles right now */
.mm-livetag { display: inline-block; margin-right: 6px; padding: 0 5px; border-radius: 4px; background: #e5383b; color: #fff; font: 700 9px/14px var(--sans); font-style: normal; letter-spacing: .06em; text-transform: uppercase; vertical-align: 1px; animation: mm-live 1.4s ease-in-out infinite; }
.mm-tab.live:not(.on) { border-color: rgba(229,56,59,.55); }
@keyframes mm-live { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .mm-livetag { animation: none; } }
/* "Bouncing cards: Off" in the table menu - selected cards and tiles hold still (lifted, steady gold outline) */
.still-cards .rummy-play .pc.sel:not(.small) { animation: none; transform: translateY(-30px); box-shadow: 0 0 0 3px #f3c74f, 0 0 18px 3px rgba(243,199,79,.6), 0 14px 26px rgba(0,0,0,.5); }
.still-cards .rk-tile.sel { animation: none; }

/* Pin It for two (public/games/pinitduel) */
.du-stage:has(.pd-wrap) { place-items: stretch; }
.pd-wrap { display: flex; flex-direction: column; gap: 8px; width: 100%; height: 100%; min-height: 0; }
.pd-wrap .pi-phone-map { min-height: 200px; }
.pd-rhead { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.pd-rhead small { color: var(--ga); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .7em; }
.pd-rhead b { font-family: var(--serif); font-weight: 500; font-size: 1.25em; line-height: 1.15; }
.pd-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pd-side { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--pc); }
.pd-side small { color: var(--muted); font-size: .78em; }
.pd-side b { font-size: 1.35em; font-variant-numeric: tabular-nums; }
.pd-side span { color: var(--muted); font-size: .8em; }
.pd-side.win { border-color: color-mix(in srgb, var(--pc) 60%, transparent); background: color-mix(in srgb, var(--pc) 10%, var(--panel)); }
.pd-final { display: flex; flex-direction: column; gap: 10px; width: 100%; max-height: 100%; overflow-y: auto; }
.pd-total { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pd-total > div { padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--pc); text-align: center; }
.pd-total small { display: block; color: var(--muted); font-size: .8em; }
.pd-total b { font-family: var(--serif); font-size: 1.8em; font-weight: 600; }
.pd-rounds { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; counter-reset: pd; }
.pd-rounds li { display: grid; grid-template-columns: 1fr 64px 64px; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.03); font-size: .88em; counter-increment: pd; }
.pd-rounds li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-rounds li span::before { content: counter(pd) '. '; color: var(--muted); }
.pd-rounds li b { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.pd-rounds li b.win { color: var(--text, #f3efe6); font-weight: 800; }
/* tile art: pins dropping onto the map */
.ta-pin { animation: ta-pin 3.2s ease-in infinite; }
.ta-pin.b { animation-delay: 1.1s; }
@keyframes ta-pin { 0% { transform: translateY(-26px); opacity: 0; } 10% { opacity: 1; } 30% { transform: translateY(0) scaleY(1); animation-timing-function: ease-out; } 35% { transform: scaleY(.85); } 42% { transform: translateY(-4px); } 50%, 84% { transform: none; opacity: 1; } 95%, 100% { transform: none; opacity: 0; } }
.ta-ring { opacity: 0; animation: ta-ring 3.2s ease-out infinite; }
@keyframes ta-ring { 0%, 28% { opacity: 0; transform: scale(.4); } 32% { opacity: .9; } 60%, 100% { opacity: 0; transform: scale(1.8); } }
.pd-rounds-head { display: grid; grid-template-columns: 1fr 64px 64px; gap: 8px; padding: 0 10px; color: var(--muted); font-size: .72em; letter-spacing: .08em; text-transform: uppercase; }
.pd-rounds-head span:not(:first-child) { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tuned In for two (public/games/tunedinduel) */
.du-stage:has(.td-wrap) { place-items: stretch; overflow-y: auto; }
.td-wrap { width: 100%; max-width: 520px; margin: 0 auto; }
.td-wrap .tu-phone { padding-top: 4px; }
.td-newcard { align-self: center; }
.td-wait { text-align: center; padding-top: 12vh; }
.td-wait h2 { font-family: var(--serif); margin: 12px 0 0; }
.td-watch { display: flex; align-items: center; justify-content: center; gap: 4px; }
.td-final { display: flex; flex-direction: column; gap: 10px; }
.td-total { display: flex; flex-direction: column; align-items: center; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--ga); }
.td-total small { color: var(--muted); }
.td-total b { font-family: var(--serif); font-size: 2.6em; line-height: 1.1; color: var(--ga); }
.td-total span { font-weight: 700; }
.td-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.td-list li { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 10px; background: rgba(255,255,255,.03); }
.td-list li span { flex: 1; min-width: 0; font-weight: 600; }
.td-list li small { display: block; color: var(--muted); font-weight: 400; font-size: .78em; }
.td-list li b { font-variant-numeric: tabular-nums; }
.ta-needle { animation: ta-needle 4s ease-in-out infinite; }
@keyframes ta-needle { 0%, 100% { transform: rotate(-55deg); } 30% { transform: rotate(20deg); } 45% { transform: rotate(-10deg); } 65%, 85% { transform: rotate(39deg); } }

/* Head to head: the Two-player tab list and the card in the table menu */
.rm-rivals { display: flex; flex-direction: column; gap: 8px; }
.rm-rivals:empty { display: none; }
button.rm-rival { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; text-align: left; color: inherit; font: inherit; }
.rm-rival-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rm-rival-who b { font-size: 1.05em; }
.rm-rival-who small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-rival-rec { display: flex; flex-direction: column; align-items: flex-end; flex: none; font-variant-numeric: tabular-nums; }
.rm-rival-rec b { font-family: var(--serif); font-size: 1.4em; font-weight: 600; line-height: 1.1; }
.rm-rival-rec small { font: 600 .72em var(--sans); color: var(--muted); white-space: nowrap; }
.rm-rival-rec.up small, .rm-rival-rec.down small { color: var(--muted); }
.rm-rival-rec.up, .h2h-row b.up { color: var(--good); }
.rm-rival-rec.down, .h2h-row b.down { color: var(--bad); }
.rm-rival > .icon { color: var(--muted); flex: none; }
.h2h-wrap:empty { display: none; }
.h2h-wrap { display: flex; flex-direction: column; gap: 10px; }
.h2h-score { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 4px 0; }
.h2h-score > div { display: flex; flex-direction: column; align-items: center; min-width: 70px; }
.h2h-score b { font-family: var(--serif); font-size: 2.4em; line-height: 1; font-variant-numeric: tabular-nums; }
.h2h-score small { color: var(--muted); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2h-score > span { color: var(--muted); font-size: 1.6em; }
.h2h-extra { text-align: center; }
.h2h-games { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.h2h-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 2px; border-top: 1px solid var(--line); font-size: .92em; }
.h2h-row b { font-variant-numeric: tabular-nums; }
/* Tuned In for two: extras */
.td-double .tu-pdial { width: min(100%, 330px); margin: 0 auto; }
.td-dlabel { position: absolute; top: 0; right: 0; font-weight: 800; color: var(--ga); }
.td-twist { display: flex; align-items: baseline; gap: 8px; justify-content: center; padding: 7px 12px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--ga) 60%, transparent); background: color-mix(in srgb, var(--ga) 8%, transparent); }
.td-twist small { color: var(--ga); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .7em; }
.td-twist b { font-weight: 700; }
.td-wager { display: flex; flex-direction: column; gap: 6px; }
.td-wager > small { color: var(--muted); text-align: center; }
.td-wbtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.td-wbtn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); color: inherit; font: inherit; cursor: pointer; }
.td-wbtn b { font-size: .95em; }
.td-wbtn small { color: var(--muted); font-size: .7em; text-align: center; line-height: 1.2; }
.td-wbtn.on { border-color: var(--ga); background: color-mix(in srgb, var(--ga) 16%, var(--panel)); box-shadow: 0 0 0 1px var(--ga); }
.td-wbtn[data-w=allin].on { border-color: #e0565b; background: rgba(224,86,91,.14); box-shadow: 0 0 0 1px #e0565b; }
.td-wwatch { text-align: center; color: var(--muted); }
.td-wwatch b { color: var(--text, #f3efe6); }
.td-wwatch.allin b { color: #e0565b; }
.td-thing { text-align: center; }
.td-thing small { display: block; color: var(--muted); }
.td-thing b { font-family: var(--serif); font-size: 1.7em; }

/* Invites: cards at the top of the home screen, and the game picker */
.inv-list { display: flex; flex-direction: column; gap: 8px; }
.inv-list:empty { display: none; }
.inv-card { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); background: linear-gradient(160deg, rgba(201,169,110,.16), rgba(201,169,110,.04)); animation: lTurn 2.4s ease-out infinite; }
.inv-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.inv-text small { color: var(--gold-2); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .68em; }
.inv-card .btn { flex: none; }
.gp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 60svh; overflow-y: auto; }
.gp-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 10px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--ga) 35%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--ga) 16%, transparent), color-mix(in srgb, var(--ga) 3%, transparent) 70%); color: inherit; font: inherit; cursor: pointer; }
.gp-tile .ta { display: block; width: 100%; height: 44px; color: var(--ga); }
.gp-tile .ta svg { width: 100%; height: 100%; overflow: visible; }
.gp-tile b { font-size: .82em; text-align: center; line-height: 1.15; }
/* Second dial needle: the partner's, in Sync round reveals */
.tu-needle.two line { stroke: #5fb8d9; stroke-width: 9; }
.tu-needle.two .tu-tip { fill: #5fb8d9; stroke: #0b1a22; }
.td-legend { display: flex; justify-content: center; gap: 18px; font-weight: 700; font-size: .9em; }
.td-legend span { display: inline-flex; align-items: center; gap: 6px; }
.td-legend i { width: 18px; height: 4px; border-radius: 2px; }
.td-legend i.me { background: #f3efe6; }
.td-legend i.them { background: #5fb8d9; }
/* A plain checkbox row (same layout as the 18+ check, without its warning colours) */
.rm-age.rm-check { border-color: var(--line-2); background: var(--panel); color: inherit; }
.home-rpw { margin-top: 4px; }
/* Linked devices (home ⋯ sheet) */
.home-link { margin-top: 4px; }
.home-link .link-enter { display: flex; gap: 8px; }
.home-link .link-enter .text-field { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .08em; }
.home-link .link-show { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border-radius: 12px; background: rgba(0,0,0,.25); text-align: center; }
.home-link .link-code { font: 800 30px var(--sans); letter-spacing: .14em; color: var(--gold-2, #c9a96e); }

/* ---------- Earworm ---------- */
.earworm { --ga: #f472b6; }
.ew-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 19em; gap: 2.4em; min-height: 0; }
.ew-center { display: flex; flex-direction: column; align-items: center; gap: 1.3em; padding: 0 3em; min-width: 0; }
.ew-side { display: flex; flex-direction: column; gap: 1em; min-width: 0; }
.ew-hero { display: flex; align-items: center; gap: 1.4em; }
.ew-hero h2 { font-family: var(--serif); font-size: 3em; margin: .05em 0 0; }
.ew-disc { --s: 7em; width: var(--s); height: var(--s); border-radius: 50%; flex: none; position: relative; background: repeating-radial-gradient(circle, #15131c 0 3px, #1d1a26 3px 5px); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ga) 50%, transparent), 0 14px 40px rgba(0,0,0,.6); margin: 0 auto; }
.ew-disc i { position: absolute; inset: 33%; border-radius: 50%; background: radial-gradient(circle, #0c0c12 0 12%, var(--ga) 13%); }
.ew-disc b { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 20deg, transparent 0 40deg, rgba(255,255,255,.12) 55deg, transparent 75deg 220deg, rgba(255,255,255,.08) 235deg, transparent 255deg); }
.ew-disc.spin { animation: ew-spin 2.2s linear infinite; }
@keyframes ew-spin { to { transform: rotate(360deg); } }
.phone .ew-disc { --s: 6em; margin-bottom: 10px; }
.ew-stretch, .ew-race { width: min(100%, 46em); display: grid; gap: .5em; }
.ew-steps { position: relative; display: flex; gap: 4px; height: 1.6em; }
.ew-step { position: relative; border-radius: 6px; background: rgba(243,239,230,.07); border: 1px solid var(--line); }
.ew-step.done { background: color-mix(in srgb, var(--ga) 30%, transparent); }
.ew-step.now { background: color-mix(in srgb, var(--ga) 55%, transparent); border-color: var(--ga); box-shadow: 0 0 18px color-mix(in srgb, var(--ga) 45%, transparent); }
.ew-step small { position: absolute; right: 4px; bottom: -1.6em; font-size: .75em; color: var(--muted); }
.ew-head { position: absolute; top: -6px; bottom: -6px; left: 0; width: 3px; border-radius: 2px; background: #f3efe6; z-index: 2; opacity: 0; transition: opacity .2s; box-shadow: 0 0 10px #fff; }
.ew-head.on { opacity: 1; }
.ew-steplbl { display: flex; justify-content: space-between; align-items: baseline; margin-top: .9em; font-size: 1.15em; }
.ew-steplbl b { color: var(--ga); font-size: 1.3em; font-family: var(--serif); }
.ew-race .pbar i { background: var(--ga); }
.ew-choices { width: min(100%, 52em); display: grid; grid-template-columns: 1fr 1fr; gap: .8em; }
.ew-choice { display: flex; align-items: center; gap: .9em; padding: .8em 1em; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.ew-choice em, .ew-pchoice em { font-style: normal; font-weight: 800; color: var(--ga); width: 1.8em; height: 1.8em; display: grid; place-items: center; border-radius: 50%; border: 2px solid currentColor; flex: none; }
.ew-choice b, .ew-pchoice b { display: block; font-size: 1.15em; line-height: 1.2; }
.ew-choice small, .ew-pchoice small { color: var(--muted); }
.ew-typehint { font-size: 1.3em; color: var(--muted); margin: 0; }
.ew-who { display: flex; flex-wrap: wrap; justify-content: center; gap: .5em; }
.ew-pl { display: flex; align-items: center; gap: .45em; padding: .35em .8em .35em .35em; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); font-weight: 700; }
.ew-pl .icon { width: 1em; height: 1em; }
.ew-pl.done { border-color: var(--gold); }
.ew-pl.done .icon { color: var(--gold); }
.ew-pl.got { border-color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
.ew-pl.got .icon { color: var(--good); }
.ew-pl.more small { color: var(--ga); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .72em; }
.ew-board { display: grid; gap: .45em; }
.ew-prow { display: grid; grid-template-columns: 1.4em auto 1fr auto; align-items: center; gap: .6em; padding: .45em .7em; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.ew-prow small { color: var(--muted); font-weight: 800; }
.ew-prow span { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ew-prow b { font-family: var(--serif); font-size: 1.2em; }
.ew-team { padding: .8em 1em; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--tc); }
.ew-trow { display: flex; justify-content: space-between; align-items: baseline; }
.ew-trow b { color: var(--tc); font-size: 1.15em; }
.ew-trow span { font-family: var(--serif); font-size: 1.8em; }
.ew-tmembers { display: grid; gap: .3em; margin-top: .4em; }
.ew-tmembers span { display: flex; align-items: center; gap: .5em; font-weight: 700; }
.ew-tmembers small { margin-left: auto; color: var(--muted); }
.ew-q { font-family: var(--serif); font-size: 2.6em; margin: 0; text-align: center; }
.ew-pop { display: flex; align-items: center; gap: 1.6em; }
.ew-vs { font-family: var(--serif); font-size: 2em; color: var(--muted); }
.ew-popcard, .ew-popres { width: 17em; display: flex; flex-direction: column; gap: .5em; padding: 1em; border-radius: calc(var(--r) + 4px); background: var(--panel); border: 2px solid var(--line); transition: border-color .3s, box-shadow .3s, transform .3s; }
.ew-popcard.playing { border-color: var(--ga); box-shadow: 0 0 40px color-mix(in srgb, var(--ga) 40%, transparent); transform: translateY(-6px); }
.ew-poptxt small { color: var(--ga); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .75em; }
.ew-poptxt b, .ew-popres b { display: block; font-size: 1.3em; line-height: 1.2; }
.ew-poptxt span, .ew-popres span { color: var(--muted); }
.ew-popres.win { border-color: var(--good); box-shadow: 0 0 40px color-mix(in srgb, var(--good) 30%, transparent); }
.ew-rankbar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.ew-rankbar i { display: block; height: 100%; background: var(--ga); }
.ew-popres.win .ew-rankbar i { background: var(--good); }
.ew-popres small { color: var(--muted); }
.ew-art { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; background: #15131c; }
.ew-noart { display: grid; place-items: center; color: var(--ga); }
.ew-noart .icon { width: 40%; height: 40%; }
.ew-reveal { display: flex; align-items: center; gap: 2em; }
.ew-art.big { width: min(22em, 34vh); box-shadow: 0 24px 60px rgba(0,0,0,.6); border-radius: 16px; }
.ew-rtxt h1 { font-family: var(--serif); font-size: 3.6em; line-height: 1.05; margin: .1em 0; max-width: 11em; }
.ew-rtxt h3 { font-size: 1.8em; margin: 0 0 .3em; color: var(--ga); }
.ew-rlist { width: min(100%, 40em); display: grid; grid-template-columns: 1fr 1fr; gap: .4em .8em; }
.ew-rrow { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: .6em; padding: .4em .7em; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.ew-rrow .avatar { grid-row: 1 / span 2; }
.ew-rrow span { font-weight: 700; }
.ew-rrow small { grid-column: 2; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ew-rrow b { grid-column: 3; grid-row: 1 / span 2; font-family: var(--serif); font-size: 1.3em; color: var(--muted); }
.ew-rrow.ok { border-color: color-mix(in srgb, var(--good) 60%, transparent); }
.ew-rrow.ok b { color: var(--good); }
.ew-rbar { position: absolute; left: 0; right: 0; bottom: 0; }
.ew-intro { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1.4em; text-align: center; }
.ew-intro .intro-title h1 { font-family: var(--serif); font-size: 4.5em; margin: .1em 0 0; }
.ew-intro .pbar { width: 30em; }
.ew-chips { display: flex; gap: .5em; flex-wrap: wrap; justify-content: center; }
.ew-chips span { padding: .35em .9em; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--ga) 60%, transparent); color: var(--ga); font-weight: 700; }
.ew-loading h2 { font-family: var(--serif); }
.ew-final { display: flex; flex-direction: column; align-items: center; gap: 1.4em; }
.ew-final .winner h1 { font-family: var(--serif); font-size: 4.5em; }
.ew-final .ew-board { width: min(100%, 30em); }
.ew-hist { display: flex; gap: .8em; flex-wrap: wrap; justify-content: center; }
.ew-hitem { width: 6.5em; text-align: center; }
.ew-hitem small { display: block; margin-top: .3em; color: var(--muted); font-size: .8em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ew-tapon { position: fixed; left: 50%; bottom: 6em; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: .6em; padding: .9em 1.4em; border-radius: 99px; border: 0; background: var(--ga); color: #1a0d14; font: 800 1.2em var(--sans); cursor: pointer; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
/* phone */
.ew-phone { display: flex; flex-direction: column; gap: 12px; }
.ew-phead { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.ew-phead small { color: var(--muted); font-weight: 700; }
.ew-phead b { color: var(--ga); }
.ew-pchoices { display: grid; gap: 10px; }
.ew-pchoice { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--panel); border: 2px solid var(--line-2); text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.ew-pchoice:active { border-color: var(--ga); transform: scale(.98); }
.ew-type { display: grid; gap: 8px; }
.ew-input { font-size: 1.15em; }
.ew-sugs { display: grid; gap: 6px; }
.ew-sug { display: flex; flex-direction: column; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ew-sug small { color: var(--muted); }
.ew-wrong { text-align: center; padding: 12px; border-radius: 14px; background: rgba(224,86,91,.12); border: 1px solid rgba(224,86,91,.4); display: grid; gap: 2px; }
.ew-wrong small { color: var(--muted); }
.ew-wrong.soft { padding: 6px; background: none; border: 0; }
.ew-pq { font-family: var(--serif); text-align: center; margin: 0; }
.ew-popbtn { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: var(--panel); border: 2px solid var(--line-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ew-popbtn .ew-art { width: 4.5em; flex: none; }
.ew-popbtn small { color: var(--ga); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: .72em; }
.ew-popbtn b { display: block; }
.ew-popbtn span { color: var(--muted); font-size: .92em; }
.ew-popbtn.on { border-color: var(--ga); background: color-mix(in srgb, var(--ga) 14%, transparent); }
.ew-popbtn:disabled:not(.on) { opacity: .55; }
.ew-tip { text-align: center; font-size: 14px; margin: 0; }
.ew-pres { text-align: center; }
.ew-pres h2 { font-family: var(--serif); font-size: 2.4em; margin: 0; color: var(--muted); }
.ew-pres.ok h2 { color: var(--good); }
.ew-pres p { margin: 0; color: var(--ga); font-weight: 800; }
.ew-pcard { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.ew-pcard .ew-art { width: 5.5em; flex: none; }
.ew-pcard small { color: var(--muted); display: block; }
.ew-pcard b { display: block; font-size: 1.15em; }
.ew-pcard span { color: var(--ga); }
.cover-earworm .ew-cv-disc circle { fill: #15131c; stroke: color-mix(in srgb, var(--ga) 60%, transparent); stroke-width: 2; }
.cover-earworm .ew-cv-disc .groove { fill: none; stroke: rgba(243,239,230,.12); stroke-width: 1.5; }
.cover-earworm .ew-cv-disc .label { fill: var(--ga); stroke: none; }
.cover-earworm .ew-cv-disc .shine { fill: none; stroke: rgba(255,255,255,.25); stroke-width: 3; stroke-linecap: round; }
.cover-earworm .ew-cv-disc { transform-origin: 110px 90px; animation: ew-spin 3.2s linear infinite; }
.cover-earworm .ew-cv-bar { fill: var(--ga); transform-origin: center 90px; transform-box: view-box; animation: ew-bar 1.1s ease-in-out infinite; animation-delay: var(--d); }
@keyframes ew-bar { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
.ew-pchoice:disabled { opacity: .5; }
.ew-rbar { display: flex; justify-content: center; bottom: 1.6em; }
.ew-rbar .pbar { width: 30em; }
.ew-race .pbar { width: 100%; }

/* ---------- How to play walkthroughs (howto.js) ---------- */
.ga-howto { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--ga) 55%, transparent); background: color-mix(in srgb, var(--ga) 10%, transparent); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ga-howto > .icon:first-child { width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: var(--ga); color: #1a1008; flex: none; }
.ga-howto span { flex: 1; display: flex; flex-direction: column; }
.ga-howto small { color: var(--muted); }
.ga-howto > .icon:last-child { color: var(--ga); }
.ht-sheet { max-width: 460px; }
.ht-wrap { position: relative; }
.ht-stage { position: relative; height: 230px; border-radius: 16px; overflow: hidden; --tw: 34px; }
.ht-stage.felt { background: radial-gradient(120% 90% at 50% 30%, #2f5a3a, #1b3524 70%, #142a1c); box-shadow: inset 0 0 0 1px rgba(230,207,159,.25), inset 0 10px 30px rgba(0,0,0,.35); }
.ht-stage .ht-tile { position: absolute; left: 0; top: 0; cursor: default; transition: none; }
.ht-tile.ht-back { background: linear-gradient(180deg, #e9a65a, #c27a2c); }
.ht-tile.ht-back > * { visibility: hidden; }
.ht-rack { position: absolute; left: 8%; right: 8%; height: 12px; border-radius: 4px; background: linear-gradient(180deg, #8a5a2b, #5e3a18); box-shadow: 0 3px 8px rgba(0,0,0,.5); transform: translateY(calc(var(--tw) * 1.38 + 4px)); }
.ht-label { position: absolute; left: 0; top: 0; padding: 3px 10px; border-radius: 99px; background: rgba(12,12,18,.75); color: #f3dfa9; font-weight: 800; font-size: 13px; white-space: nowrap; }
.ht-label.soft { color: #e8e2d4; font-weight: 600; background: rgba(12,12,18,.55); }
.ht-cross { position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: #e0565b; color: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.5); z-index: 3; }
.ht-cross .icon { width: 60%; height: 60%; }
.ht-count { position: absolute; left: 0; top: 0; display: flex; align-items: baseline; gap: 6px; padding: 4px 12px; border-radius: 99px; background: rgba(12,12,18,.75); }
.ht-count b { font: 800 22px var(--serif); color: #f3dfa9; display: inline-block; }
.ht-count small { color: var(--muted); }
.ht-count.ok { box-shadow: 0 0 0 2px var(--good); }
.ht-count.ok small { color: var(--good); font-weight: 800; }
.ht-pool { position: absolute; width: 88px; height: 62px; }
.ht-pool i { position: absolute; width: 30px; height: 41px; border-radius: 5px; background: linear-gradient(180deg, #e9a65a, #c27a2c); box-shadow: 0 2px 4px rgba(0,0,0,.45); }
.ht-pool i:nth-child(1) { left: 14px; top: 8px; transform: rotate(-10deg); } .ht-pool i:nth-child(2) { left: 30px; top: 4px; transform: rotate(4deg); } .ht-pool i:nth-child(3) { left: 44px; top: 10px; transform: rotate(14deg); }
.ht-pool span { position: absolute; left: 0; right: 0; bottom: -18px; text-align: center; font-size: 12px; font-weight: 800; color: #f3dfa9; }
.ht-gap { position: absolute; width: 34px; height: calc(34px * 1.38); border-radius: 6px; border: 2px dashed #f3dfa9; }
.ht-replay { position: absolute; right: 8px; top: 8px; background: rgba(12,12,18,.55); }
.ht-title { margin: 14px 0 2px; font: 700 1.25em var(--serif); color: var(--ga); }
.ht-text { margin: 0 0 12px; min-height: 3em; }
.ht-nav { display: flex; align-items: center; gap: 10px; }
.ht-dots { flex: 1; display: flex; justify-content: center; gap: 6px; }
.ht-dots button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: var(--line-2); cursor: pointer; }
.ht-dots button.on { background: var(--ga); width: 20px; border-radius: 99px; }
.ht-nav .btn { white-space: nowrap; flex: none; }

/* ---------- Earworm for two + solo ---------- */
.ta svg .ta-disc { transform-box: view-box; transform-origin: 34px 28px; animation: ew-spin 3s linear infinite; }
.ta svg .ta-eq { transform-box: view-box; transform-origin: center 28px; animation: ew-bar 1.1s ease-in-out infinite; }
.ed-screen { --ga: #f472b6; }
.ed-wrap { display: flex; flex-direction: column; gap: 12px; width: min(100%, 520px); margin: 0 auto; padding: 4px 2px 10px; }
.ed-player { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.ed-play { position: relative; flex: none; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.ed-play .ew-disc { --s: 84px; margin: 0; }
.ed-play.on .ew-disc { animation: ew-spin 2s linear infinite; }
.ed-playicon { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.ed-playicon .icon { width: 26px; height: 26px; padding: 8px; box-sizing: content-box; border-radius: 50%; background: rgba(12,12,18,.7); color: #fff; transition: opacity .2s; }
.ed-play.on .ed-playicon .icon { opacity: 0; }
.ed-bar { flex: 1; min-width: 0; display: grid; gap: 22px; }
.ed-bar .ew-steps { height: 1.3em; }
.ed-done { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 18px; }
.ed-done .ew-disc { --s: 90px; }
.ed-done h2 { font-family: var(--serif); margin: 8px 0 0; }
.ed-reveal { display: flex; align-items: center; gap: 14px; }
.ed-reveal .ew-art.big { width: 42%; max-width: 200px; border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.ed-reveal h2 { font-family: var(--serif); font-size: 1.6em; margin: .1em 0; line-height: 1.1; }
.ed-reveal h3 { margin: 0; color: var(--ga); font-size: 1.05em; }
.ed-wrap > .btn.sm { align-self: center; }
.ed-side { display: flex; flex-direction: column; }
.ed-songs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.ed-song { display: grid; grid-template-columns: 40px minmax(0, 1fr) 3.6em 3.6em; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.ed-song.solo { grid-template-columns: 40px minmax(0, 1fr) auto; }
.ed-song .ew-art { width: 40px; border-radius: 6px; }
.ed-song b { display: block; font-size: .95em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-song small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-song span { text-align: right; font-weight: 800; white-space: nowrap; color: var(--muted); }
.ed-song span.win { color: var(--good); }
.ed-solobody { flex: 1; overflow-y: auto; padding: 8px 16px 12px; }
.ed-setup { display: flex; flex-direction: column; gap: 14px; align-items: stretch; text-align: center; }
.ed-setup .ew-disc { --s: 96px; }
.ed-setup .setting { display: grid; gap: 6px; text-align: left; }
.ed-setup .setting-label { font-weight: 800; }
.ed-best { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--gold-2); font-weight: 800; margin: 0; }
.ed-best .icon { width: 1em; height: 1em; }
.ed-score { text-align: center; display: grid; gap: 2px; margin-bottom: 10px; }
.ed-score small { color: var(--ga); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.ed-score b { font: 700 3em var(--serif); }
.ed-solo { display: flex; flex-direction: column; height: 100svh; }
.ed-setup .setting { grid-template-columns: 1fr; }
/* "Your tables" rows: the game's little animated tile art, in its colour, at the front of the row. */
button.rm-saved .ta { flex: none; display: grid; place-items: center; width: 58px; height: 38px; border-radius: 10px; background: color-mix(in srgb, var(--ga, var(--gold)) 10%, transparent); color: var(--ga, var(--gold)); overflow: hidden; }
button.rm-saved .ta svg { width: 52px; height: 26px; overflow: visible; }
/* Two-player games grouped under small headings (REMOTE_GROUPS in app.js) */
.rm-groups { display: flex; flex-direction: column; gap: 18px; }
.rm-group-head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font: 800 .74em var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); }
.rm-group-head::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(201,169,110,.35), transparent); }
/* Feedback sheet: owner key check */
.fb-owner { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.fb-owner-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; color: var(--muted); font: inherit; font-size: .85em; cursor: pointer; }
.fb-owner-link .icon { width: 14px; height: 14px; }
.fb-owner-row { display: flex; gap: 8px; }
.fb-owner-row .text-field { flex: 1; min-width: 0; }
.fb-owner-note { color: var(--muted); min-height: 1.2em; }
.fb-owner-note.bad { color: var(--bad); }
.fb-owner-ok { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(127,211,107,.1); border: 1px solid rgba(127,211,107,.45); }
.fb-owner-ok > .icon { color: var(--good); flex: none; }
.fb-owner-ok span { display: flex; flex-direction: column; }
.fb-owner-ok small { color: var(--muted); }

/* ---------- Bead Rush (solo marble shooter) ---------- */
.bd-screen { display: flex; flex-direction: column; height: 100svh; }
.bd-hud { display: flex; align-items: center; gap: 10px; }
.bd-level { color: var(--muted); font-weight: 700; }
.bd-score { font: 700 1.2em var(--serif); color: var(--gold-2); min-width: 3ch; text-align: right; }
.bd-lives { display: flex; gap: 4px; }
.bd-lives i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.bd-lives i.on { background: #5ad1c5; box-shadow: 0 0 8px rgba(90,209,197,.7); }
.bd-stage { position: relative; flex: 1; min-height: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
.bd-canvas { display: block; position: absolute; inset: 0; cursor: crosshair; }
.bd-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(7,7,11,.55); backdrop-filter: blur(3px); }
.bd-overlay[hidden] { display: none; }
.bd-card { width: min(100%, 340px); display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line-2); text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.bd-card h2 { font-family: var(--serif); font-size: 2em; margin: 0; color: #5ad1c5; }
.bd-card p { margin: 0; font-size: .92em; }
.bd-card .btn { margin-top: 8px; }
.ta svg .ta-beads circle { animation: ta-bead 2.4s ease-in-out infinite; }
@keyframes ta-bead { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
.ta svg .ta-shot { transform-box: view-box; transform-origin: 60px 32px; animation: ta-shot 2.4s ease-in infinite; }
@keyframes ta-shot { 0%, 40% { transform: translate(0, 0); opacity: 1; } 75% { transform: translate(0, -20px); opacity: 1; } 76%, 100% { transform: translate(0, -20px); opacity: 0; } }
.ta svg .ta-wb-sq { transform-box: fill-box; transform-origin: 50% 100%; animation: ta-wb-sq 1.6s ease-in-out infinite; }
@keyframes ta-wb-sq { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.12, .86); } }
.ta svg .ta-wb-drop { transform-box: fill-box; transform-origin: 50% 100%; animation: ta-wb-drop 2.4s ease-in infinite; }
@keyframes ta-wb-drop { 0%, 30% { transform: translateY(-6px); opacity: 0; } 40% { opacity: 1; } 60% { transform: translateY(8px) scale(1.15, .85); } 70%, 90% { transform: translateY(6px); opacity: 1; } 100% { transform: translateY(6px); opacity: 0; } }
.ta svg .ta-bfdrop { animation: ta-bfdrop 2.6s cubic-bezier(.3, 1.4, .5, 1) infinite; }
@keyframes ta-bfdrop { 0%, 10% { transform: translateY(-24px); opacity: 0; } 35%, 85% { transform: none; opacity: 1; } 100% { transform: none; opacity: 0; } }
.ta svg .ta-solace { animation: ta-solace 2.8s ease-in-out infinite; }
@keyframes ta-solace { 0%, 15% { transform: translate(-45px, 8px); opacity: 0; } 25% { opacity: 1; } 50%, 90% { transform: none; opacity: 1; } 100% { transform: none; opacity: 0; } }
.ta svg .ta-dwflip { transform-box: fill-box; transform-origin: 50% 50%; animation: ta-dwflip 3s ease-in-out infinite; }
@keyframes ta-dwflip { 0%, 20% { transform: scaleY(0); } 30%, 90% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.ta svg .ta-gl-car { animation: ta-gl-car 2.2s ease-in-out infinite; }
@keyframes ta-gl-car { 0%, 30%, 100% { transform: none; } 45% { transform: translateX(7px); } 55% { transform: translateX(5px); } }
.ta svg .ta-gl-exit { animation: ta-gl-exit 1.4s ease-in-out infinite; }
@keyframes ta-gl-exit { 0%, 100% { opacity: .35; transform: none; } 50% { opacity: 1; transform: translateX(2px); } }
.ta svg .ta-fc-a { animation: ta-fc-a 3s cubic-bezier(.5, 0, .3, 1) infinite; }
@keyframes ta-fc-a { 0%, 30%, 100% { transform: translateX(0); } 45%, 80% { transform: translateX(22px); } }
.ta svg .ta-fc-b { animation: ta-fc-b 3s cubic-bezier(.5, 0, .3, 1) infinite; }
@keyframes ta-fc-b { 0%, 30%, 100% { transform: translateX(0); } 45%, 80% { transform: translateX(-22px); } }
.ta svg .ta-fc-spark { transform-box: fill-box; transform-origin: center; animation: ta-fc-spark 3s ease-out infinite; }
@keyframes ta-fc-spark { 0%, 45% { transform: scale(0); opacity: 0; } 55% { transform: scale(1.2) rotate(20deg); opacity: 1; } 75%, 100% { transform: scale(0) rotate(45deg); opacity: 0; } }
.l-tab .l-badge { position: absolute; top: -5px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; box-shadow: 0 0 0 2px var(--panel); } /* in the corner, so the label keeps its width */
/* Earworm Stretch countdown: ring round the record, the next clip charging up, phone bar */
.ew-dial { position: relative; width: 8.6em; height: 8.6em; flex: none; display: grid; place-items: center; }
.ew-dial svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ew-dial .trk { fill: none; stroke: rgba(243,239,230,.08); stroke-width: 4; }
.ew-dial .arc { fill: none; stroke: var(--ga); stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--ga) 70%, transparent)); }
.ew-dial[data-phase="playing"] .arc { opacity: .9; animation: ew-glow 1s ease-in-out infinite; }
.ew-dial[data-phase="ready"] .arc { opacity: .35; }
@keyframes ew-glow { 50% { opacity: .45; } }
.ew-dial .ew-disc { --s: 7em; }
.ew-count { position: absolute; inset: 0; display: grid; place-items: center; font: 800 2.4em var(--serif); color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.8); pointer-events: none; }
.ew-dial[data-phase="wait"] .ew-count { animation: ew-tick 1s ease-out infinite; }
@keyframes ew-tick { 0% { transform: scale(1.25); } 30%, 100% { transform: scale(1); } }
.ew-step.next { background: linear-gradient(90deg, color-mix(in srgb, var(--ga) 55%, transparent) calc(var(--charge, 0) * 100%), rgba(243,239,230,.07) 0); }
.ew-next.counting { color: var(--ga); font-weight: 800; }
.ew-pclock { display: grid; gap: 4px; width: 100%; margin-top: 6px; }
.ew-pclock-bar { height: 5px; border-radius: 99px; background: rgba(243,239,230,.08); overflow: hidden; }
.ew-pclock-bar i { display: block; height: 100%; background: var(--ga); transform-origin: left; transform: scaleX(0); }
.ew-pclock-txt { color: var(--muted); font-weight: 700; }
.ew-pclock[data-phase="wait"] .ew-pclock-txt { color: var(--ga); }
/* Phones: big album art while playing (reveals and Pop-off), not thumbnails */
.ew-pcard { flex-direction: column; align-items: stretch; text-align: center; padding: 12px; }
.ew-pcard .ew-art { width: min(100%, 320px); margin: 0 auto; border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.55); }
.ew-pcard b { font-size: 1.3em; }
.ew-popbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ew-popbtns .ew-popbtn { flex-direction: column; align-items: stretch; text-align: center; padding: 8px; gap: 8px; }
.ew-popbtns .ew-popbtn .ew-art { width: 100%; border-radius: 12px; }
.ed-reveal { flex-direction: column; align-items: center; text-align: center; }
.ed-reveal .ew-art.big { width: min(100%, 320px); max-width: none; }
.ed-reveal h2 { font-size: 1.8em; }
/* Phones: the big screen dropped */
.screen-lost { position: fixed; z-index: 60; left: 10px; right: 10px; top: calc(env(safe-area-inset-top, 0px) + 10px); display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: #1d1612; border: 1px solid rgba(242,193,78,.55); box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.screen-lost > .icon { flex: none; width: 26px; height: 26px; color: var(--gold-2); }
.sl-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sl-txt small { color: var(--muted); line-height: 1.35; }
.sl-txt small b { color: var(--text); }
.sl-btns { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }

/* ---------- Out of Pocket ---------- */
.outofpocket { --ga: #e8475f; }
.seg.armed { border-color: var(--bad); color: var(--bad); }
.op-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 17em; gap: 2em; min-height: 0; }
.op-center { display: flex; flex-direction: column; align-items: center; gap: 1.1em; min-width: 0; text-align: center; }
.op-center .intro-title h1 { font-family: var(--serif); font-size: 4.4em; margin: .1em 0 0; }
.op-lede { font-size: 1.25em; color: var(--muted); margin: 0; }
.op-side { min-width: 0; }
.op-black { position: relative; width: min(100%, 38em); min-height: 15em; padding: 1.4em 1.5em 2.4em; border-radius: 18px; background: #0b0b0e; border: 2px solid #2a2a33; box-shadow: 0 24px 60px rgba(0,0,0,.6); text-align: left; }
.op-black p { margin: 0; font: 700 2.7em/1.22 var(--sans); color: #f6f3ec; }
.op-black.small { min-height: 0; padding: .9em 1.1em 1.8em; width: min(100%, 40em); }
.op-black.small p { font-size: 1.45em; }
.op-brand { position: absolute; left: 1.4em; bottom: .8em; font-weight: 800; font-size: .72em; letter-spacing: .12em; text-transform: uppercase; color: var(--ga); }
.op-blank { display: inline-block; min-width: 4.5em; border-bottom: .12em solid #f6f3ec; margin: 0 .1em; }
.op-fill { color: var(--ga); }
.op-pick { margin: 0; font-weight: 800; color: var(--ga); text-transform: uppercase; letter-spacing: .1em; }
.op-judge { display: flex; align-items: center; gap: .6em; font-size: 1.25em; }
.op-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .5em; }
.op-chip { display: flex; align-items: center; gap: .45em; padding: .35em .8em .35em .35em; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); font-weight: 700; }
.op-chip small { color: var(--muted); }
.op-chip .icon { width: 1em; height: 1em; color: var(--good); }
.op-chip.done { border-color: color-mix(in srgb, var(--good) 60%, transparent); }
.op-answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(13em, 1fr)); gap: .9em; width: 100%; perspective: 900px; }
.op-answers.many { grid-template-columns: repeat(auto-fit, minmax(11em, 1fr)); font-size: .9em; }
.op-white { position: relative; min-height: 9em; padding: 1em 1.1em 2em; border-radius: 14px; background: #f6f3ec; color: #141418; text-align: left; box-shadow: 0 14px 34px rgba(0,0,0,.5); transition: transform .3s, opacity .3s; }
.op-white p { margin: 0 0 .5em; font: 700 1.25em/1.25 var(--sans); }
.op-white.back { background: #1b1b21; border: 2px solid #2a2a33; }
.op-white.back .op-brand { color: #555; }
.op-white.win { transform: scale(1.06); box-shadow: 0 0 0 4px var(--ga), 0 20px 50px rgba(0,0,0,.6); }
.op-white.lose { opacity: .45; }
.op-who { position: absolute; left: 1em; bottom: .7em; display: flex; align-items: center; gap: .4em; font-weight: 800; }
.op-winline h2 { font: 700 2.6em/1.2 var(--sans); margin: .2em 0 .4em; max-width: 20em; }
.op-scores { display: grid; gap: .4em; }
.op-srow { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .6em; padding: .45em .7em; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.op-srow span { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-srow small { color: var(--ga); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: .7em; }
.op-srow b { font: 700 1.3em var(--serif); }
.op-srow.judge { border-color: color-mix(in srgb, var(--ga) 55%, transparent); }
.op-unhinged { color: var(--ga); }
.op-final { display: flex; flex-direction: column; align-items: center; gap: 1.2em; }
.op-final .winner h1 { font-family: var(--serif); font-size: 4.4em; }
.op-final .op-scores { width: min(100%, 26em); }
.op-best { display: grid; gap: .6em; width: min(100%, 44em); }
.op-hit { padding: .8em 1em; border-radius: 14px; background: #0b0b0e; border: 1px solid #2a2a33; text-align: left; }
.op-hit p { margin: 0; font: 700 1.2em/1.3 var(--sans); }
.op-hit small { color: var(--muted); }
/* phone */
.op-phone { display: flex; flex-direction: column; gap: 10px; }
.op-pprompt { padding: 14px 16px; border-radius: 14px; background: #0b0b0e; border: 1px solid #2a2a33; font: 700 1.1em/1.3 var(--sans); color: #f6f3ec; }
.op-pprompt .op-blank { min-width: 3em; }
.op-pprompt.win { border-color: var(--ga); }
.op-hand { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.op-hcard { position: relative; min-height: 96px; padding: 10px 10px 18px; border-radius: 12px; border: 2px solid transparent; background: #f6f3ec; color: #141418; font: 700 .95em/1.25 var(--sans); text-align: left; cursor: pointer; display: flex; align-items: flex-start; }
.op-hcard.on { border-color: var(--ga); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(232,71,95,.35); }
.op-hcard.custom small { position: absolute; left: 10px; bottom: 5px; font-size: .68em; color: var(--ga); text-transform: uppercase; letter-spacing: .08em; }
.op-hcard.blank { background: transparent; color: var(--text); border: 2px dashed rgba(246,243,236,.35); align-items: center; justify-content: center; }
.op-hcard.blank.on { border-style: solid; border-color: var(--ga); background: rgba(232,71,95,.08); }
.op-blankin { width: 100%; font-size: .95em; }
.op-num { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ga); color: #fff; font-size: .8em; }
.op-white.mini { min-height: 0; padding: 10px 12px; }
.op-white.mini p { font-size: 1em; margin: 0; }
.op-picks { display: grid; gap: 8px; }
.op-pickcard { padding: 14px; border-radius: 14px; border: 2px solid var(--line-2); background: var(--panel); color: var(--text); font: 700 1em/1.3 var(--sans); text-align: left; cursor: pointer; }
.op-pickcard.on { border-color: var(--ga); background: rgba(232,71,95,.1); }
.op-pickcard:disabled { opacity: .6; }
.op-addrow { display: flex; gap: 8px; }
.op-addrow .text-field { flex: 1; min-width: 0; }
.op-plus { font-family: var(--serif); font-size: 3em; color: var(--good); margin: 0; text-align: center; }
.cover-triad .tri-cv-card rect:first-child { fill: #f8f3e8; stroke: rgba(0,0,0,.25); }
.cover-triad .tri-cv-card { animation: tri-cv-deal 4.5s cubic-bezier(.3, 1.3, .5, 1) infinite; animation-delay: calc(var(--i) * .25s); }
@keyframes tri-cv-deal { 0% { transform: translateY(-30px); opacity: 0; } 12%, 88% { transform: none; opacity: 1; } 100% { transform: none; opacity: 0; } }
.cover-triad .tri-cv-ring { fill: none; stroke: var(--ga); stroke-width: 3; opacity: 0; animation: tri-cv-ring 4.5s ease-out infinite; }
@keyframes tri-cv-ring { 0%, 30% { opacity: 0; } 40%, 80% { opacity: 1; } 95%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cover-triad .tri-cv-card, .cover-triad .tri-cv-ring { animation: none; opacity: 1; } }
.cover-outofpocket .op-cv-black rect { fill: #0b0b0e; stroke: #2a2a33; stroke-width: 2; }
.cover-outofpocket .op-cv-black line { stroke: #f6f3ec; stroke-width: 5; stroke-linecap: round; opacity: .8; }
.cover-outofpocket .op-cv-black .blank { stroke: var(--ga); stroke-dasharray: 6 6; opacity: 1; }
.cover-outofpocket .op-cv-white { animation: op-slide 3.2s ease-in-out infinite; }
.cover-outofpocket .op-cv-white rect { fill: #f6f3ec; }
.cover-outofpocket .op-cv-white line { stroke: #141418; stroke-width: 5; stroke-linecap: round; opacity: .7; }
@keyframes op-slide { 0%, 100% { transform: translate(40px, 10px) rotate(8deg); } 45%, 75% { transform: translate(0, 0) rotate(3deg); } }
/* Real-time remote tables (Triad, Boom Room): the card shown while the game is paused for someone who left. */
.du-pause { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 320px; padding: 18px 20px; border-radius: 18px; text-align: center; background: rgba(12,11,17,.92); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -20px rgba(0,0,0,.9); }
.du-pause > b { font-family: var(--serif); font-size: 1.6em; color: var(--gold-2); }
.du-pause p { margin: 0; color: var(--muted); }
.du-pause .dots { color: var(--gold); font-size: 1.3em; }
.du-pause-btn { min-height: 2.6em; display: grid; place-items: center; }
.ta svg .ta-br-flame { opacity: 0; animation: ta-br-flame 2.4s ease-out infinite; }
@keyframes ta-br-flame { 0%, 55% { opacity: 0; } 62% { opacity: 1; } 85% { opacity: .8; } 100% { opacity: 0; } }
.ta svg .ta-br-bomb { transform-box: fill-box; transform-origin: center; animation: ta-br-bomb 2.4s ease-in infinite; }
@keyframes ta-br-bomb { 0%, 50% { transform: scale(1); opacity: 1; } 40% { transform: scale(1.12); } 58%, 100% { transform: scale(.4); opacity: 0; } }
