/* Dark theme ("Palm Oil Night": warm charcoal). Applies when the phone is in dark mode (theme "Auto"), or when the player picks "Dark".
   Only colour tokens change here, so every screen follows automatically. */
:root[data-theme="dark"] {
  --bg: #16130F; --card: #221E18; --soft-bg: #2A251D; --line: #3A3327; --line-dk: #0E0C09;
  --text: #F6EFE2; --muted: #B3A893;
  --brand: #FFC21A; --brand-dk: #A87600; --brand-ink: #2B1C00; --brand-tint: #3A2F17; --brand-deep: #FFD66B;
  --good: #2FC27F; --good-dk: #17784B; --bad: #FF7A5C; --bad-dk: #B5432C;
  --navy: #3F57C9; --navy-dk: #263A93;
  --pulse: #3A1C14; --placeholder: #7A6F5E; --chip: #2E281F; --word-sh: #7a5a00; --bad-sh: #5a2418; --overlay: rgba(22,19,15,.96); --glow: #3a2f12;
  --frost: rgba(34,30,24,.86); --frost-warm: rgba(44,38,29,.9);
  --m1: #33270B; --m2: #331A12; --m3: #19251F; --m4: #2E1F0E; --m5: #1E1A14;
  --face: #EDE5D6; --face-line: #B9AD98; --sq-l: #7A6650; --sq-d: #43372A; --wood: #2A2119; --wood-dk: #120E0A; --bubbles: .22; --scrim: rgba(8, 6, 4, .74); --pc-b: #141110; --pc-b-rim: #B3A893;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16130F; --card: #221E18; --soft-bg: #2A251D; --line: #3A3327; --line-dk: #0E0C09;
  --text: #F6EFE2; --muted: #B3A893;
  --brand: #FFC21A; --brand-dk: #A87600; --brand-ink: #2B1C00; --brand-tint: #3A2F17; --brand-deep: #FFD66B;
  --good: #2FC27F; --good-dk: #17784B; --bad: #FF7A5C; --bad-dk: #B5432C;
  --navy: #3F57C9; --navy-dk: #263A93;
  --pulse: #3A1C14; --placeholder: #7A6F5E; --chip: #2E281F; --word-sh: #7a5a00; --bad-sh: #5a2418; --overlay: rgba(22,19,15,.96); --glow: #3a2f12;
  --frost: rgba(34,30,24,.86); --frost-warm: rgba(44,38,29,.9);
  --m1: #33270B; --m2: #331A12; --m3: #19251F; --m4: #2E1F0E; --m5: #1E1A14;
  --face: #EDE5D6; --face-line: #B9AD98; --sq-l: #7A6650; --sq-d: #43372A; --wood: #2A2119; --wood-dk: #120E0A; --bubbles: .22; --scrim: rgba(8, 6, 4, .74); --pc-b: #141110; --pc-b-rim: #B3A893;
  color-scheme: dark;
  }
}

/* theme switcher */
.theme-switch { display: flex; justify-content: center; gap: 6px; margin: 4px 0 6px; }
.theme-switch button { font: inherit; font-weight: 900; font-size: 13px; padding: 7px 12px; border-radius: 12px; cursor: pointer;
  background: var(--card); color: var(--muted); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); }
.theme-switch button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); box-shadow: 0 3px 0 var(--brand-dk); }

/* meaning mode */
.meaning { font-family: Nunito, sans-serif; font-weight: 900; color: var(--text); line-height: 1.25; max-width: 30ch;
  font-size: clamp(22px, min(4.6vw, 8vh), 46px); text-wrap: balance; animation: pop .35s cubic-bezier(.3,1.6,.5,1); }
@media (orientation: portrait) { .meaning { font-size: clamp(22px, 6.8vw, 34px); } }
.starts { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.starts b { font-family: 'Fredoka', sans-serif; font-weight: 400; font-size: 30px; letter-spacing: 0; color: var(--brand-ink); background: var(--brand);
  width: 46px; height: 46px; border-radius: 14px; display: inline-grid; place-items: center; box-shadow: 0 3px 0 var(--brand-dk); }

/* account */
.account-chip { display: flex; align-items: center; gap: 10px; width: 100%; margin: 6px 0 2px; padding: 10px 14px; border-radius: 16px; cursor: pointer; font: inherit; font-weight: 800; font-size: 14px;
  background: var(--card); color: var(--text); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); text-align: left; }
.account-chip .ac-icon { font-size: 20px; }
.account-chip span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-chip b { color: var(--brand-deep); font-weight: 900; white-space: nowrap; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--soft-bg); padding: 5px; border-radius: 14px; margin-bottom: 6px; }
.tabs button { font: inherit; font-weight: 900; font-size: 14px; padding: 9px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--card); color: var(--text); box-shadow: 0 2px 0 var(--line); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 16px 0 4px; }
.or::before, .or::after { content: ''; flex: 1; height: 2px; background: var(--line); }
.google .g { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #4285f4; font-family: Arial, sans-serif; font-weight: 900; font-size: 15px; border: 1px solid #ddd; }
.auth-err { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); border-radius: 12px; padding: 10px 12px; font-weight: 800; margin: 8px 0; }
p.small, .small { font-size: 13px; }

/* clearly labelled leave / home button */
.leave-btn { font: inherit; font-weight: 900; font-size: 13px; padding: 7px 12px; border-radius: 12px; cursor: pointer;
  background: var(--card); color: var(--bad); border: 2px solid color-mix(in srgb, var(--bad) 35%, var(--line)); box-shadow: 0 3px 0 var(--line); white-space: nowrap; }
.leave-btn[data-act="app:home"] { color: var(--text); border-color: var(--line); }
.leave-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.topbar { gap: 8px; }
.topbar b { text-align: center; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* a tapped button shows it's working while the database confirms */
.btn.working, .game-card.working { opacity: .7; transform: translateY(3px); }

/* ---------- mini games ---------- */
.mg-top { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 8px 0; }
.mg-chip { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 14px; background: var(--card); border: 2px solid var(--line); font-weight: 900; font-size: 14px; box-shadow: 0 3px 0 var(--line); }
.mg-chip small { margin-left: 4px; font-size: 11px; }
.mg-chip b { font-family: 'Fredoka', sans-serif; font-weight: 400; font-size: 18px; color: var(--brand-deep); }
.mg-chip .dot { width: 12px; height: 12px; border-radius: 50%; }
.mg-chip.p0 .dot { background: #e0392b; } .mg-chip.p1 .dot { background: var(--brand); } .mg-chip.p2 .dot { background: #3fa9f5; } .mg-chip.p3 .dot { background: #22b573; }
.mg-chip.on { border-color: var(--brand); box-shadow: 0 3px 0 var(--brand-dk); transform: translateY(-2px); }
.mg-status { text-align: center; font-family: 'Fredoka', sans-serif; font-size: 22px; margin: 6px 0; color: var(--muted); }
.mg-status.mine { color: var(--text); animation: blink .8s infinite alternate; }
.mg-status.done { color: var(--text); font-size: 28px; }
.mg-card { padding: 12px; }
/* tic-tac-toe */
.ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 330px; margin: 0 auto; }
.ttt .cell { aspect-ratio: 1; border-radius: 16px; border: 2px solid var(--line); background: var(--soft-bg); font-size: 54px; font-family: 'Fredoka', sans-serif; cursor: pointer; box-shadow: 0 4px 0 var(--line); color: var(--text); }
.ttt .cell[disabled] { cursor: default; }
.ttt .x { color: #e0392b; } .ttt .o { color: var(--brand-dk); }
.ttt .cell.win { background: var(--brand); }
/* connect 4 */
.c4 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; background: #2f55d4; padding: 8px; border-radius: 18px; max-width: 420px; margin: 0 auto; box-shadow: 0 6px 0 #1d3796; }
.c4 .col { display: grid; gap: 5px; background: none; border: 0; padding: 2px; border-radius: 10px; cursor: pointer; }
.c4 .col:not([disabled]):hover { background: rgba(255,255,255,.12); }
.c4 .col[disabled] { cursor: default; }
.c4 .hole { aspect-ratio: 1; border-radius: 50%; background: var(--bg); box-shadow: inset 0 3px 0 rgba(0,0,0,.25); display: block; }
.c4 .hole.dR { background: #e0392b; box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); }
.c4 .hole.dY { background: #ffc21a; box-shadow: inset 0 -4px 0 rgba(0,0,0,.2); }
.c4 .hole.last { animation: drop .35s ease-in; }
.c4 .hole.win { outline: 3px solid #fff; outline-offset: -3px; }
@keyframes drop { from { transform: translateY(-160px); } }
/* draughts */
.draughts { display: grid; grid-template-columns: repeat(8, 1fr); max-width: 420px; margin: 0 auto; border-radius: 12px; overflow: hidden; border: 6px solid var(--wood); box-shadow: 0 6px 0 var(--wood-dk); }
.draughts .sq { aspect-ratio: 1; border: 0; padding: 0; display: grid; place-items: center; cursor: pointer; }
.draughts .sq[disabled] { cursor: default; }
.draughts .light { background: var(--sq-l); } .draughts .dark { background: var(--sq-d); }
.draughts .sq.last { box-shadow: inset 0 0 0 3px rgba(255,194,26,.7); }
.draughts .sq.target { background: #5fbf7f; box-shadow: inset 0 0 0 3px #fff; }
.draughts .pc { width: 78%; height: 78%; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 4px 0 rgba(0,0,0,.35), inset 0 -3px 0 rgba(0,0,0,.2); }
.draughts .pc.w { background: #fffaf0; } .draughts .pc.b { background: var(--pc-b); outline: 2px solid var(--pc-b-rim); outline-offset: -2px; }
.draughts .pc.king::after { content: '♛'; font-size: 20px; color: #e0a400; }
.draughts .pc.sel { outline: 4px solid var(--brand); outline-offset: 1px; }
.draughts .pc.can { outline: 2px dashed var(--brand); outline-offset: 2px; }
/* ayo */
.ayo { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: center; background: #8a5a2b; padding: 10px; border-radius: 20px; box-shadow: 0 6px 0 #5a3816; }
.ayo .rows { display: grid; gap: 8px; }
.ayo .row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ayo .pit { aspect-ratio: 1; border-radius: 50%; border: 0; background: #5a3816; color: #fff; box-shadow: inset 0 4px 0 rgba(0,0,0,.35); display: grid; place-content: center; cursor: pointer; padding: 0; }
.ayo .pit[disabled] { cursor: default; opacity: .85; }
.ayo .row.mine .pit:not([disabled]) { background: #6e4720; outline: 3px solid var(--brand); }
.ayo .pit b { font-family: 'Fredoka', sans-serif; font-weight: 400; font-size: 24px; line-height: 1; }
.ayo .pit .seeds { font-size: 8px; line-height: 1; letter-spacing: -1px; max-width: 34px; color: #f3dfb6; overflow: hidden; }
.ayo .pit.last { box-shadow: inset 0 0 0 3px rgba(255,255,255,.6); } .ayo .pit.taken { background: #e0392b; }
.ayo .store { color: #f3dfb6; text-align: center; font-size: 12px; font-weight: 900; display: flex; justify-content: center; align-items: center; gap: 8px; background: #6e4720; border-radius: 14px; padding: 4px 10px; }
.ayo .store b { font-family: 'Fredoka', sans-serif; font-weight: 400; font-size: 24px; color: #fff; }
.ayo .store::after { content: 'captured'; font-size: 11px; opacity: .8; }
.ayo { max-width: 460px; margin: 0 auto; }
/* darts & archery */
.mg-throw { display: grid; gap: 8px; justify-items: center; }
.mg-round { font-weight: 900; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.wind { font-family: 'Fredoka', sans-serif; font-size: 18px; color: #3fa9f5; }
.mg-board { position: relative; width: min(92vw, 360px, 62vh); aspect-ratio: 1; }
.mg-svg { width: 100%; height: 100%; display: block; }
.mg-svg .mk { fill: #fff; stroke: #2a2440; stroke-width: 0.012; }
.mg-svg .mk.old { fill: rgba(255,255,255,.45); stroke: rgba(0,0,0,.3); }
.aim { position: absolute; left: 50%; top: 50%; pointer-events: none; }
.aim.cross { width: 0; height: 0; }
.aim.cross::before, .aim.cross::after { content: ''; position: absolute; background: #ffc21a; box-shadow: 0 0 0 1px #2a2440; }
.aim.cross::before { width: 3px; height: 400px; left: -1.5px; top: -200px; }
.aim.cross::after { width: 26px; height: 3px; left: -13px; top: -1.5px; opacity: 0; }
.aim.cross.vlock::after { opacity: 1; width: 400px; left: -200px; }
.aim.cross.vlock::before { height: 26px; top: -13px; }
.aim.ret { width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 3px solid #2a2440; box-shadow: 0 0 0 2px #fff; }
.aim.ret::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: #e0392b; }
.mg-board { overflow: hidden; border-radius: 50%; }
.aim-tap { position: absolute; inset: 0; background: transparent; border: 0; cursor: crosshair; border-radius: 50%; }
.throws { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.throws .th { background: var(--soft-bg); border: 2px solid var(--line); border-radius: 10px; padding: 4px 10px; font-weight: 900; font-size: 14px; }
.throws .th b { color: var(--good); }

/* quick-fire */
.qf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.qf-p { display: flex; gap: 4px; }
.qf-got { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 12px 12px; border-radius: 14px; border: 2px solid var(--brand); background: var(--brand-tint);
  color: var(--text); font: inherit; font-weight: 900; font-size: 15px; cursor: pointer; box-shadow: 0 4px 0 var(--brand-dk); min-width: 0; }
.qf-got span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qf-got b { font-family: 'Fredoka', sans-serif; font-weight: 400; font-size: 20px; color: var(--brand-deep); }
.qf-got:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--brand-dk); }
.qf-got[disabled] { opacity: .5; cursor: default; }
.qf-out { width: 36px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--bad); font-weight: 900; cursor: pointer; box-shadow: 0 3px 0 var(--line); }
.qf-outs { display: flex; flex-wrap: wrap; gap: 6px; }
.qf-back { font: inherit; font-size: 13px; font-weight: 800; padding: 6px 10px; border-radius: 10px; border: 2px dashed var(--line); background: transparent; color: var(--muted); cursor: pointer; text-decoration: line-through; }
.qf-last { text-align: center; font-weight: 800; margin: 8px 0; color: var(--good); }
.split.quick .stage { min-height: 220px; }
@media (orientation: landscape) { body.ls-on .split.quick { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } body.ls-on .split.quick .stage { min-height: calc(100dvh - 190px); } }

/* ---------- loading screen ---------- */
#splash { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  background: radial-gradient(80vmax 60vmax at 50% 0%, var(--glow) 0%, var(--bg) 62%); transition: opacity .5s, transform .5s; }
#splash.out { opacity: 0; transform: scale(1.04); pointer-events: none; }
#splash .alogo { --tw: min(56px, calc((100vw - 56px) / 9.4)); }
#splash .tile { animation: tileDrop .7s cubic-bezier(.3,1.6,.5,1) both, tileWave 1.6s ease-in-out 1.3s infinite; animation-delay: calc(var(--i) * 90ms), calc(1.3s + var(--i) * 90ms); }
#splash .games { animation: fadeUp .6s ease .95s both; }
#splash .sp-tag { margin: 0; color: var(--muted); font-weight: 800; animation: fadeUp .6s ease 1.15s both; }
#splash .sp-dots { display: flex; gap: 8px; animation: fadeUp .4s ease 1.2s both; }
#splash .sp-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); animation: dotBounce .9s ease-in-out infinite; }
#splash .sp-dots i:nth-child(2) { animation-delay: .15s; background: #FF6B4A; } #splash .sp-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tileWave { 0%, 60%, 100% { transform: translateY(var(--y)) rotate(var(--r)); } 30% { transform: translateY(calc(var(--y) - 10px)) rotate(calc(var(--r) * -1)); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes dotBounce { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-8px); opacity: 1; } }
body.splashed .hero .alogo .tile { animation: none; }
@media (prefers-reduced-motion: reduce) { #splash .tile, #splash .games, #splash .sp-tag, #splash .sp-dots, #splash .sp-dots i { animation: none; } }

/* ---------- someone left ---------- */
.gone-sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--scrim); animation: fadeUp .25s ease both; }
.gone-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 10px; margin: 0 0 8px; }
.gone-card { background: var(--card) !important; backdrop-filter: none; box-shadow: 0 10px 40px rgba(20,16,42,.35); }
.gone-card h3 { margin: 4px 0 0; font: 400 26px 'Fredoka', sans-serif; text-transform: none; letter-spacing: 0; color: var(--text); }
.gone-card p { margin: 0 0 6px; }
.gone-inline { border: 2px solid var(--bad); text-align: center; }
.gone-inline p { margin: 4px 0 10px; }
.tag.off { background: var(--bad-sh); color: var(--bad-dk); }

/* ---------- Whot ---------- */
.mg-chip.p4 .dot { background: #9b59b6; } .mg-chip.p5 .dot { background: #ff8a3d; }
.whot { display: flex; flex-direction: column; gap: 12px; }
.wtable { display: flex; justify-content: center; align-items: flex-start; gap: 22px; padding: 6px 0; }
.wcard { position: relative; display: flex; align-items: center; justify-content: center; width: 64px; height: 92px; border-radius: 10px;
  background: var(--face); border: 2px solid var(--face-line); box-shadow: 0 3px 0 var(--face-line); color: #8b1e2d; flex: none; }
.wcard .wsh { width: 58%; height: auto; fill: #8b1e2d; }
.wcard .wn { position: absolute; top: 3px; left: 6px; font: 900 15px Nunito, sans-serif; font-style: normal; }
.wcard .wn.br { top: auto; left: auto; bottom: 3px; right: 6px; transform: rotate(180deg); }
.wcard.whot b { font: 400 17px 'Fredoka', sans-serif; letter-spacing: 1px; transform: rotate(-20deg); }
.wcard.back { background: repeating-linear-gradient(45deg, #8b1e2d 0 8px, #9e2a39 8px 16px); border-color: #fffdf8; box-shadow: 0 3px 0 #5b111c, 0 0 0 2px #8b1e2d; color: #fffdf8; }
.wcard.back b { font: 400 16px 'Fredoka', sans-serif; transform: rotate(-20deg); }
.wcard.big { width: 92px; height: 132px; border-radius: 14px; }
.wcard.big .wn { font-size: 20px; }
.wcard.big.whot b { font-size: 24px; }
.wmarket { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.wmarket:not([disabled]) .wcard { animation: marketGlow 1.2s ease-in-out infinite alternate; }
.wmarket small { font-weight: 900; font-size: 12px; }
.wmarket .wcard { width: 76px; height: 108px; margin-top: 12px; }
@keyframes marketGlow { to { box-shadow: 0 3px 0 #5b111c, 0 0 0 4px var(--brand); } }
.wpile { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wneed { display: flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; background: var(--brand-tint); color: var(--brand-ink); font-weight: 900; font-size: 13px; }
.wneed .wsh { width: 16px; height: 16px; fill: #8b1e2d; }
.wmsg { margin: 0; text-align: center; font-weight: 800; }
.walerts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.wlast { padding: 4px 10px; border-radius: 99px; background: var(--bad); color: #fff; font-weight: 900; font-size: 13px; animation: blink .7s infinite alternate; }
.wlast.semi { background: var(--brand-tint); color: var(--brand-ink); animation: none; }
.whand { display: flex; gap: 0; overflow-x: auto; padding: 18px 8px 10px; scroll-snap-type: x proximity; }
.wslot { margin-left: -14px; padding: 0; border: 0; background: none; transition: transform .15s; scroll-snap-align: start; cursor: pointer; }
.wslot:first-child { margin-left: auto; } .wslot:last-child { margin-right: auto; }
.wslot[disabled] { cursor: default; } .wslot[disabled] .wcard { filter: saturate(.5) brightness(.93); }
.wslot.ok .wcard { border-color: var(--brand); box-shadow: 0 3px 0 var(--brand-dk); }
.wslot.ok:hover, .wslot.picked { transform: translateY(-14px); }
.wshapes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.wshapes p { width: 100%; margin: 0; text-align: center; font-weight: 900; }
.wshapes .btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 10px; min-width: 64px; }
.wshapes .wsh { width: 26px; height: 26px; fill: #8b1e2d; }
[data-theme="dark"] .wshapes .wsh, [data-theme="dark"] .wneed .wsh { fill: #ff8a95; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wshapes .wsh { fill: #ff8a95; } }

/* ---------- chat ---------- */
body.has-chat #app { padding-bottom: 84px; }
.chat-fab { position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 50; width: 56px; height: 56px; border-radius: 50%;
  border: 0; background: var(--navy); color: #fff; font-size: 26px; box-shadow: 0 4px 0 var(--navy-dk), 0 8px 20px rgba(20,16,42,.25); cursor: pointer; }
.chat-fab:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--navy-dk); }
.chat-fab .badge { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--bad); color: #fff;
  font: 900 13px/22px Nunito, sans-serif; border: 2px solid var(--bg); animation: blink .7s infinite alternate; }
.chat-sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 55; width: min(100%, 520px); height: min(72vh, 560px);
  display: flex; flex-direction: column; background: var(--card); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(20,16,42,.3);
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); animation: chatUp .22s ease both; }
@keyframes chatUp { from { transform: translate(-50%, 40px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.chat-head b { font: 400 22px 'Fredoka', sans-serif; }
.chat-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 10px 2px; }
.cmsg { align-self: flex-start; max-width: 82%; padding: 7px 12px; border-radius: 16px 16px 16px 4px; background: var(--chip); }
.cmsg b { display: block; font-size: 12px; color: var(--brand-deep); }
.cmsg span { font-weight: 700; word-wrap: break-word; }
.cmsg.me { align-self: flex-end; background: var(--brand-tint); border-radius: 16px 16px 4px 16px; }
.cmsg.me b { text-align: right; }
.cmsg.q span { font-weight: 900; }
.chat-quick { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
.chat-quick + .chat-quick { padding-bottom: 8px; }
.chat-quick .chip { flex: none; padding: 7px 12px; border-radius: 99px; border: 2px solid var(--line); background: var(--card); color: var(--text); font: 800 14px Nunito, sans-serif; cursor: pointer; white-space: nowrap; }
.chat-quick .chip.emo { font-size: 20px; padding: 3px 9px; }
.chat-quick .chip:active { background: var(--brand-tint); }
.chat-input { display: flex; gap: 8px; }
.chat-input input { flex: 1; margin: 0; }
.chat-input .btn { margin: 0; }
.chat-peek { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 70; max-width: min(92vw, 440px);
  padding: 10px 16px; border-radius: 16px; border: 0; background: var(--navy); color: #fff; font: 700 15px Nunito, sans-serif; text-align: left;
  box-shadow: 0 8px 24px rgba(20,16,42,.3); animation: upCentered .25s ease both; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-peek b { color: var(--brand); margin-right: 4px; }
.chat-peek.out { opacity: 0; transition: opacity .35s; }
body.ls-on .chat-sheet { height: 88vh; }

/* ---------- legal pages + footer ---------- */
.legal-page { background: var(--bg); }
.legal { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 18px 18px 40px; line-height: 1.6; font-weight: 600; }
.legal-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.legal-top .btn { margin: 0; width: auto; padding: 8px 14px; font-size: 14px; }
.legal-top a:not(.btn) { color: var(--brand-deep); font-weight: 800; }
.legal h1 { font: 400 40px/1.1 'Fredoka', sans-serif; margin: 18px 0 4px; }
.legal h2 { font: 400 23px/1.2 'Fredoka', sans-serif; margin: 30px 0 8px; scroll-margin-top: 16px; }
.legal h3 { font-size: 16px; margin: 18px 0 4px; font-weight: 900; }
.legal p, .legal li { font-size: 16px; }
.legal ul { padding-left: 22px; }
.legal li { margin: 5px 0; }
.legal a { color: var(--brand-deep); font-weight: 800; }
.legal .link { font-size: inherit; padding: 0; color: var(--brand-deep); font-weight: 800; text-decoration: underline; }
.legal-meta { color: var(--muted); font-size: 14px !important; margin: 0 0 16px; }
.legal-lead { font-size: 17px !important; padding: 14px 16px; background: var(--brand-tint); border-radius: 16px; color: var(--text); }
.legal-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 15px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 2px solid var(--line); }
.legal-table th { font-weight: 900; background: var(--soft-bg); }
.legal-foot { margin-top: 40px; padding-top: 16px; border-top: 2px solid var(--line); color: var(--muted); font-size: 14px; text-align: center; }
.app-foot { margin: 26px 0 10px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.9; }
.app-foot a, .app-foot .link { color: var(--muted); font-weight: 800; font-size: 13px; text-decoration: underline; padding: 0; }
.agree { margin: 12px 0 0; text-align: center; }
.agree a { color: var(--brand-deep); font-weight: 800; }
.danger-zone h3 { margin-top: 0; }
.btn.danger { color: var(--bad-dk); border-color: var(--bad-sh); }

/* ---------- cookie banner ---------- */
.consent { position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90;
  width: min(94vw, 520px); padding: 14px 16px; border-radius: 20px; background: var(--card); color: var(--text);
  box-shadow: 0 10px 40px rgba(20,16,42,.3); border: 2px solid var(--line); animation: upCentered .25s ease both; font-size: 14px; }
.consent p { margin: 0 0 10px; line-height: 1.5; }
.consent a { color: var(--brand-deep); font-weight: 800; }
.consent-btns { display: flex; gap: 8px; }
.consent-btns .btn { flex: 1; margin: 0; padding: 10px 8px; font-size: 15px; }
.consent.panel h3 { margin: 0 0 8px; font: 400 22px 'Fredoka', sans-serif; }
.consent-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 2px solid var(--line); }
.consent-row small { display: block; color: var(--muted); font-weight: 700; }
.consent-row input { width: 24px; height: 24px; flex: none; accent-color: var(--brand-dk); margin: 0; }
.consent.panel .consent-btns { margin-top: 12px; }

@keyframes upCentered { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- install card, report a problem ---------- */
.install { display: flex; align-items: center; gap: 12px; position: relative; padding-right: 38px; }
.install .emoji { font-size: 30px; }
.install div { flex: 1; }
.install b { display: block; }
.install small { display: block; color: var(--muted); font-weight: 700; }
.install .btn { width: auto; margin: 0; padding: 10px 16px; }
.install .x { position: absolute; top: 8px; right: 10px; color: var(--muted); font-size: 16px; padding: 4px; }
.room-foot { text-align: center; margin: 18px 0 6px; }
.room-foot .link, .app-foot [data-act="app:report"] { color: var(--muted); font-size: 13px; font-weight: 800; }
.report-sheet { z-index: 95; }
.report-sheet textarea { width: 100%; box-sizing: border-box; font: 700 16px Nunito, sans-serif; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--text); resize: vertical; }
.report-sheet label { font-size: 13px; font-weight: 900; color: var(--muted); text-align: left; }

/* ---------- switch game ---------- */
.hostbar { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.switch-sheet { align-items: flex-end; }
.switch-sheet .gone-card { max-height: 88vh; overflow-y: auto; }
.switch-sheet .grid { display: flex; flex-direction: column; gap: 8px; margin: 4px 0; }
.switch-sheet .game-card { margin: 0; }
.switch-sheet .game-card.current { outline: 3px solid var(--brand); }

/* ---------- Police Catch Thief: papers on the floor ---------- */
.floor { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 14px; padding: 22px 12px; margin: 10px 0;
  border-radius: 20px; background: radial-gradient(circle at 30% 20%, #c98d52 0%, #a86d38 60%, #8f5a2c 100%); box-shadow: inset 0 4px 14px rgba(0,0,0,.25); }
.paper { position: relative; width: 86px; height: 66px; border: 0; border-radius: 4px; cursor: pointer;
  background: linear-gradient(135deg, #fffdf6 0%, #f3ead7 48%, #e9dec6 50%, #fffaf0 100%);
  box-shadow: 0 6px 10px rgba(0,0,0,.28); transform: rotate(var(--r)); transition: transform .2s, opacity .3s;
  font: 900 18px Nunito, sans-serif; color: #8a6b3f; display: flex; align-items: center; justify-content: center; }
.paper .fold { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 49%, rgba(0,0,0,.08) 50%, transparent 51%); border-radius: 4px; pointer-events: none; }
.paper:not([disabled]):hover, .paper:not([disabled]):focus-visible { transform: rotate(0deg) scale(1.08) translateY(-4px); }
.paper:not([disabled]) { animation: paperWiggle 1.6s ease-in-out infinite; }
.paper.taken { opacity: .55; cursor: default; transform: rotate(var(--r)) scale(.92); }
.paper.mine { opacity: 1; outline: 3px solid var(--brand); }
.paper .who { position: relative; font-size: 13px; color: #5b4527; padding: 0 4px; text-align: center; line-height: 1.1; }
.paper .num { position: relative; opacity: .5; }
@keyframes paperWiggle { 0%, 100% { transform: rotate(var(--r)); } 50% { transform: rotate(calc(var(--r) + 4deg)) translateY(-2px); } }
.rolecard.unfold { animation: unfold .7s cubic-bezier(.2,1.4,.4,1) both; transform-origin: top center; }
@keyframes unfold { 0% { transform: perspective(600px) rotateX(-90deg) scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
.card .muted .on { color: var(--text); font-weight: 900; text-decoration: underline; }
.card .muted .done { text-decoration: line-through; opacity: .6; }
@media (prefers-reduced-motion: reduce) { .paper:not([disabled]), .rolecard.unfold { animation: none; } }

/* ---------- Premium page ---------- */
.premium-hero .price { font-size: 20px; margin: 6px 0; }
.premium-hero .price b { font: 400 30px 'Fredoka', sans-serif; color: var(--brand-deep); }
.tag.soon { display: inline-block; margin-top: 6px; background: var(--brand); color: var(--brand-ink); }
.perks { display: flex; flex-direction: column; gap: 14px; }
.perk { display: flex; gap: 12px; align-items: flex-start; }
.perk .emoji { font-size: 28px; line-height: 1; }
.perk b { display: block; font-size: 17px; }
.perk small { display: block; color: var(--muted); font-weight: 700; line-height: 1.45; }

/* ---------- Premium: plans, groups, backgrounds ---------- */
.plans { display: flex; flex-direction: column; gap: 10px; }
.plan { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; text-align: left; padding: 14px 16px;
  border-radius: 18px; border: 2px solid var(--line); background: var(--card); color: var(--text); box-shadow: 0 4px 0 var(--line); cursor: pointer; font: inherit; }
.plan:first-of-type { border-color: var(--brand); box-shadow: 0 4px 0 var(--brand-dk); }
.plan b { font-size: 18px; }
.plan .amt { grid-row: span 2; font: 400 28px 'Fredoka', sans-serif; color: var(--brand-deep); }
.plan small { color: var(--muted); font-weight: 700; }
.plan .tag { position: absolute; top: -10px; left: 14px; background: var(--brand); color: var(--brand-ink); }
.plan[disabled] { opacity: .6; }
.pstar { font-size: .85em; }
.bg-preview { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: center / cover no-repeat; margin: 8px 0; border: 2px solid var(--line); }
label.upload { display: block; cursor: pointer; text-align: center; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.pick label, .pick button { cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span, .pick button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); font-size: 22px; }
.pick input:checked + span, .pick button.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--brand); }
.pick .sw { display: block; width: 26px; height: 26px; min-width: 0; border-radius: 50%; border: 0; }
.group-card { text-decoration: none; color: inherit; border-left: 6px solid var(--gc); }
.group-hero { border-top: 8px solid var(--gc); }
.group-chip { display: inline-block; margin: -4px 0 8px; padding: 4px 12px; border-radius: 99px; background: var(--gc); color: #1D1A3A; font-weight: 900; font-size: 13px; text-decoration: none; }
.my-groups .row.between { display: flex; justify-content: space-between; align-items: center; }
.my-groups h3 { margin: 0; }
.my-groups .group-card { margin-top: 8px; }
/* Room background photo: shown softly behind the game so text stays readable */
body.room-bg .bgfx { background: linear-gradient(rgba(255, 250, 240, .62), rgba(255, 250, 240, .78)), var(--room-bg) center / cover no-repeat; }
body.room-bg .bgfx::before, body.room-bg .bgfx::after { display: none; }
[data-theme="dark"] body.room-bg .bgfx { background: linear-gradient(rgba(22, 19, 15, .62), rgba(22, 19, 15, .8)), var(--room-bg) center / cover no-repeat; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.room-bg .bgfx { background: linear-gradient(rgba(20, 16, 42, .62), rgba(20, 16, 42, .8)), var(--room-bg) center / cover no-repeat; } }

/* ---------- Premium page (design A: two cards) ---------- */
.prem-title h1 { margin: 6px 0 2px; font: 400 32px 'Fredoka', sans-serif; }
.prem-title p { margin: 0 0 12px; }
.billing { display: flex; width: max-content; max-width: 100%; margin: 0 auto 16px; padding: 4px; gap: 4px; border-radius: 99px; background: var(--chip); }
.billing button { border: 0; padding: 10px 16px; border-radius: 99px; background: transparent; font: 800 14px Nunito, sans-serif; color: var(--muted); cursor: pointer; }
.billing button.on { background: var(--navy); color: #fff; }
.tier-card { position: relative; margin: 0 0 16px; padding: 20px; border-radius: 24px; }
.tier-card.gold { background: linear-gradient(160deg, #FFE08A 0%, #FFC21A 55%, #F2A900 100%); color: #2A2440; border: 3px solid #2A2440; box-shadow: 0 6px 0 #2A2440; }
.tier-card.std { background: var(--card); border: 2px solid var(--line); box-shadow: 0 5px 0 var(--line); }
.tier-card .ribbon { position: absolute; top: -12px; right: 18px; background: #2A2440; color: #FFC21A; padding: 4px 12px; border-radius: 99px; font: 900 12px Nunito, sans-serif; }
.tier-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tname { font: 400 26px 'Fredoka', sans-serif; }
.tprice b { font: 400 30px 'Fredoka', sans-serif; }
.tprice span { font-size: 14px; font-weight: 800; }
.tsub { margin: 2px 0 12px; font-size: 13px; opacity: .8; }
.tier-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 15px; font-weight: 800; }
.tbtn { margin-top: 14px; width: 100%; padding: 14px; border-radius: 16px; cursor: pointer; font: 400 20px 'Fredoka', sans-serif; }
.tier-card.gold .tbtn { border: 0; background: #2A2440; color: #FFC21A; }
.tier-card.std .tbtn { border: 2px solid var(--text); background: var(--card); color: var(--text); }
.premium-hero.tier-gold { background: linear-gradient(160deg, #FFE08A, #FFC21A 60%, #F2A900) !important; color: #2A2440; }
.perk { position: relative; }
.perk .tick { margin-left: auto; font-weight: 900; color: var(--good); }
.perk.off { opacity: .45; }
.perk.off .tick { color: var(--muted); }
.install.top { border: 2px solid var(--brand); box-shadow: 0 4px 0 var(--brand-dk); margin-top: 6px; }
.install.ios .link:not(.x) { display: block; margin-top: 4px; padding: 0; font-size: 13px; color: var(--brand-deep); text-decoration: underline; }

/* ---------- voice notes ---------- */
#voicebar { position: fixed; left: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 50; display: flex; align-items: flex-end; gap: 8px; }
.vmic { width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--brand); color: var(--brand-ink); font-size: 26px; position: relative;
  box-shadow: 0 4px 0 var(--brand-dk), 0 6px 18px rgba(0,0,0,.18); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer; }
.vmic small { position: absolute; left: 50%; top: -22px; transform: translateX(-50%); white-space: nowrap; font: 800 11px Nunito, sans-serif; background: var(--card, #fff); color: var(--text);
  padding: 2px 8px; border-radius: 99px; box-shadow: 0 2px 6px rgba(0,0,0,.12); pointer-events: none; }
.vmic.rec { background: #e0392b; color: #fff; box-shadow: 0 0 0 6px rgba(224,57,43,.25), 0 4px 0 #8f1f15; animation: vpulse 1s ease-in-out infinite; }
.vmic .vdot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: #fff; }
@keyframes vpulse { 50% { box-shadow: 0 0 0 12px rgba(224,57,43,.12), 0 4px 0 #8f1f15; } }
.vmute { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line, #e8dcc0); background: var(--card, #fff); font-size: 18px; cursor: pointer; }
.vmute.on { background: #fde2df; }
#vbubble { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 99px; background: var(--card, #fff); color: var(--text); box-shadow: 0 6px 20px rgba(0,0,0,.18); font-weight: 800; max-width: calc(100vw - 32px); }
#vbubble .vplay { border: 0; background: var(--brand); color: var(--brand-ink); font: 900 15px Nunito, sans-serif; padding: 8px 14px; border-radius: 99px; cursor: pointer; }
.vwave { display: inline-flex; gap: 3px; align-items: center; height: 16px; }
.vwave i { width: 4px; height: 6px; border-radius: 2px; background: var(--brand-dk); animation: vwave .8s ease-in-out infinite; }
.vwave i:nth-child(2) { animation-delay: .15s; } .vwave i:nth-child(3) { animation-delay: .3s; }
@keyframes vwave { 50% { height: 16px; } }
@media (prefers-reduced-motion: reduce) { .vmic.rec, .vwave i { animation: none; } }
body.has-voice #app { padding-bottom: 104px; }
/* word games: play from anywhere */
.wrongs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.wrongs span { font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 99px; background: #fde2df; color: #8f1f15; }
.guessrow { margin-top: 10px; width: 100%; max-width: 420px; }
.guessrow input { flex: 1; min-width: 0; }
/* I Call On: letter shuffle */
.letter.spinning { animation: lspin .14s linear infinite; color: var(--muted, #888); }
.letter.landed { animation: lland .45s cubic-bezier(.3,1.7,.5,1); }
@keyframes lspin { 0% { transform: translateY(-6px) scale(.96); } 50% { transform: translateY(6px) scale(1.02); } 100% { transform: translateY(-6px) scale(.96); } }
@keyframes lland { 0% { transform: scale(1.6); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .letter.spinning, .letter.landed { animation: none; } }

/* ---------- How to play ---------- */
.how-sheet { z-index: 90; }
.how-sheet .gone-card { max-height: 88vh; overflow-y: auto; text-align: left; }
.how-sheet h4 { margin: 8px 0 0; font: 400 18px 'Fredoka', sans-serif; color: var(--text); }
.how-sheet .btn.wide { margin-top: 4px; }
.how-goal { font-weight: 800; color: var(--text); }
.how-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.4; }
.how-list li::marker { color: var(--brand-dk); font-weight: 900; }
.how-hero { font-size: 46px; text-align: center; }
.how-sheet h3 { text-align: center; }
.how-steps { list-style: none; counter-reset: s; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.how-steps li { counter-increment: s; position: relative; padding: 10px 12px 10px 52px; border-radius: 16px; background: var(--brand-tint); color: var(--text); display: flex; flex-direction: column; gap: 2px; }
.how-steps li::before { content: counter(s); position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font: 400 18px 'Fredoka', sans-serif; box-shadow: 0 3px 0 var(--brand-dk); }
.how-steps span { font-size: 14px; color: var(--muted); }
.how-grid { display: flex; flex-direction: column; gap: 8px; }
.how-row { padding: 10px 12px; }
.how-row .emoji { width: 44px; height: 44px; font-size: 24px; border-radius: 14px; }
.how-subs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.how-subs .chip { border: 2px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: 8px 12px; font: 800 14px Nunito, sans-serif; cursor: pointer; }
.btn.yt { --bc: #ff0033; --bd: #a80022; --bt: #fff; --bb: #ff0033; }
.how-link { display: block; margin: -2px auto 2px; }
.h2row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.h2row .link { white-space: nowrap; }
.how-btn { margin: 0 0 12px !important; }
.how-q { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 4px; vertical-align: 2px; border-radius: 50%; border: 2px solid var(--line-dk); background: var(--card); color: var(--muted); font: 900 13px Nunito, sans-serif; cursor: pointer; padding: 0; }

/* ---------- games you can play against the computer ---------- */
.gc-wrap { display: flex; flex-direction: column; gap: 0; }
.gc-wrap .game-card { border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }
.vs-ai { margin: -2px 10px 0; padding: 8px 12px 9px; border: 2px solid var(--line); border-top: 0; border-radius: 0 0 16px 16px; background: var(--brand-tint); color: var(--brand-deep);
  font: 900 14px Nunito, sans-serif; cursor: pointer; text-align: center; }
.vs-ai:active { transform: translateY(2px); }

/* ---------- harder word games ---------- */
.banned { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin: 10px 0 2px; }
.banned small { width: 100%; text-align: center; font-weight: 900; color: var(--bad, #E8432E); text-transform: uppercase; letter-spacing: .5px; font-size: 12px; }
.banned span { padding: 5px 12px; border-radius: 99px; background: rgba(232,67,46,.12); color: var(--bad, #E8432E); border: 2px solid rgba(232,67,46,.45); font-weight: 900; font-size: 15px; text-decoration: line-through; text-decoration-thickness: 2px; }
.banned.watch { margin-top: 14px; }
.starts .blanks { font: 400 26px 'Fredoka', sans-serif; letter-spacing: 2px; }
.starts small { display: block; color: var(--muted); font-weight: 800; }

/* ---------- Dots and Boxes ---------- */
.dotsbox { --dot: 22px; --c0: #e0392b; --c1: #e8a500; --c2: #3fa9f5; --c3: #22b573; display: grid; width: 100%; max-width: 380px; aspect-ratio: 1; margin: 6px auto 0; touch-action: manipulation; }
.dotsbox.s5 { --dot: 20px; } .dotsbox.s3 { --dot: 26px; }
.db-dot { position: relative; z-index: 2; display: grid; place-items: center; }
.db-dot::after { content: ''; width: 11px; height: 11px; border-radius: 50%; background: var(--text); }
.db-line { position: relative; border: 0; padding: 0; margin: 0; background: transparent; cursor: pointer; z-index: 1; }
.db-line i { position: absolute; border-radius: 4px; background: var(--line); transition: background .15s; }
.db-line.h i { left: -2px; right: -2px; top: 50%; height: 6px; margin-top: -3px; }
.db-line.v i { top: -2px; bottom: -2px; left: 50%; width: 6px; margin-left: -3px; }
.db-line:not([disabled]) i { background: var(--line-dk); opacity: .55; }
.db-line:not([disabled]):hover i, .db-line:not([disabled]):active i { opacity: 1; }
.db-line:not([disabled]):hover i, .db-line:not([disabled]):active i { background: var(--brand); }
.db-line[disabled] { cursor: default; }
.db-line.on i { background: var(--text); }
.db-line.on.p0 i { background: var(--c0); } .db-line.on.p1 i { background: var(--c1); } .db-line.on.p2 i { background: var(--c2); } .db-line.on.p3 i { background: var(--c3); }
.db-line.on.gone i { background: #999; }
.db-line.last i { box-shadow: 0 0 0 3px rgba(255,194,26,.6); }
.db-box { display: grid; place-items: center; margin: 3px; border-radius: 8px; font: 400 clamp(16px, 5vw, 26px) 'Fredoka', sans-serif; color: #fff; }
.db-box.p0 { background: var(--c0); } .db-box.p1 { background: var(--c1); } .db-box.p2 { background: var(--c2); } .db-box.p3 { background: var(--c3); }
.db-box.gone { background: #bbb; }
.db-box:not(:empty) { animation: dbPop .3s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes dbPop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .db-box:not(:empty) { animation: none; } }

/* ---------- Moving game icons (js/icons.js) ---------- */
.gicon { width: 78%; height: 78%; overflow: visible; display: block; }
.gicon .i-face { fill: var(--face); }
.gicon .i-line { stroke: var(--text); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.gicon .i-ink { fill: var(--text); }
.gicon .i-brand { fill: var(--brand); } .gicon .i-coral { fill: #FF6B4A; } .gicon .i-blue { fill: #3FA9F5; }
.gicon .i-txt { font-family: 'Fredoka', sans-serif; font-weight: 700; fill: var(--text); }
.gicon .i-num { font-family: Nunito, sans-serif; font-weight: 900; }
.gicon .i-sql { fill: var(--sq-l); } .gicon .i-sqd { fill: var(--sq-d); }
.gicon * { transform-box: fill-box; transform-origin: center; }
/* Word Games: typing dots */
.gi-wordgames .i-hop { animation: gHop 1.4s ease-in-out infinite; }
.gi-wordgames .d2 { animation-delay: .18s; } .gi-wordgames .d3 { animation-delay: .36s; }
@keyframes gHop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }
/* Imposter: shifty eyes and a blink */
.gi-imposter .i-look { animation: gLook 3.4s ease-in-out infinite; transform-box: view-box; }
@keyframes gLook { 0%, 15% { transform: translateX(0); } 25%, 45% { transform: translateX(-5px); } 55%, 75% { transform: translateX(5px); } 85%, 100% { transform: translateX(0); } }
.gi-imposter .i-blink { transform: scaleY(0); animation: gBlink 3.4s infinite; }
@keyframes gBlink { 0%, 88% { transform: scaleY(0); } 92% { transform: scaleY(1); } 96%, 100% { transform: scaleY(0); } }
/* Whot: the card flips over */
.gi-whot .i-flip { animation: gFlip 3s ease-in-out infinite; }
@keyframes gFlip { 0%, 32% { transform: scaleX(1); } 46% { transform: scaleX(0); } 60%, 100% { transform: scaleX(1); } }
.gi-whot .i-back { animation: gShowA 3s infinite; } .gi-whot .i-front { animation: gShowB 3s infinite; }
@keyframes gShowA { 0%, 45% { opacity: 1; } 46%, 100% { opacity: 0; } }
@keyframes gShowB { 0%, 45% { opacity: 0; } 46%, 100% { opacity: 1; } }
/* Draughts: a piece jumps and captures */
.gi-draughts .i-jump { animation: gJump 3s ease-in-out infinite; transform-box: view-box; transform-origin: 16px 48px; }
@keyframes gJump { 0%, 20% { transform: translate(0, 0) scale(1); } 32% { transform: translate(16px, -16px) scale(1.35); } 44%, 85% { transform: translate(32px, -32px) scale(1); } 100% { transform: translate(0, 0) scale(1); opacity: 1; } }
.gi-draughts .i-taken { animation: gTaken 3s infinite; }
@keyframes gTaken { 0%, 38% { opacity: 1; transform: scale(1); } 46%, 88% { opacity: 0; transform: scale(.2); } 100% { opacity: 1; transform: scale(1); } }
/* Connect 4: a disc drops in */
.gi-connect4 .i-drop { animation: gDrop 2.6s cubic-bezier(.5,0,.9,.5) infinite; transform-box: view-box; }
@keyframes gDrop { 0% { transform: translateY(-46px); } 32% { transform: translateY(0); } 42% { transform: translateY(-7px); } 52%, 86% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(0); opacity: 0; } }
/* Dots and Boxes: four lines, then the box is won */
.gi-dotsboxes .i-draw line { stroke: #FF6B4A; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: gDraw 3.4s infinite; }
.gi-dotsboxes .i-draw .d2 { animation-delay: .3s; } .gi-dotsboxes .i-draw .d3 { animation-delay: .6s; } .gi-dotsboxes .i-draw .d4 { animation-delay: .9s; }
@keyframes gDraw { 0% { stroke-dashoffset: 30; } 10%, 84% { stroke-dashoffset: 0; } 96%, 100% { stroke-dashoffset: 30; } }
.gi-dotsboxes .i-box { fill: #FF6B4A; transform: scale(0); animation: gBox 3.4s infinite; }
@keyframes gBox { 0%, 38% { transform: scale(0); } 48% { transform: scale(1.18); } 55%, 84% { transform: scale(1); } 96%, 100% { transform: scale(0); } }
/* Police: the siren flashes red and blue */
.gi-police .i-dome { animation: gSiren 1s steps(1) infinite; }
@keyframes gSiren { 0% { fill: #E8432E; } 50% { fill: #2F6BE8; } }
.gi-police .i-rays path { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.gi-police .i-red { stroke: #E8432E; animation: gRay 1s steps(1) infinite; } .gi-police .i-blue { stroke: #2F6BE8; animation: gRay 1s steps(1) .5s infinite; opacity: 0; }
@keyframes gRay { 0% { opacity: 1; } 50% { opacity: 0; } }
/* I Call On: the letter shuffles and lands */
.gi-napt .i-spin text { opacity: 0; animation: gLetter 3.2s steps(1) infinite; }
.gi-napt .s1 { animation-delay: 0s; } .gi-napt .s2 { animation-delay: .25s; } .gi-napt .s3 { animation-delay: .5s; } .gi-napt .s4 { animation-name: gLand; }
@keyframes gLetter { 0% { opacity: 1; } 7.8% { opacity: 0; } 100% { opacity: 0; } }
@keyframes gLand { 0%, 23% { opacity: 0; } 24%, 100% { opacity: 1; } }
/* Who's Most Likely To: votes rise, a crown lands on the winner */
.gi-mostlikely .i-bar { transform-origin: bottom; animation: gBar 3.2s ease-out infinite; }
.gi-mostlikely .d2 { animation-delay: .12s; } .gi-mostlikely .d3 { animation-delay: .24s; }
@keyframes gBar { 0% { transform: scaleY(0); } 30%, 88% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
.gi-mostlikely .i-crown { animation: gCrown 3.2s infinite; stroke-width: 2; }
@keyframes gCrown { 0%, 34% { opacity: 0; transform: translateY(-8px); } 44%, 86% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; } }
/* Hot Potato: the bomb shakes, the fuse sparks */
.gi-hotpotato .i-shake { animation: gShake .5s ease-in-out infinite; transform-box: view-box; transform-origin: 30px 40px; }
@keyframes gShake { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.gi-hotpotato .i-spark { animation: gSpark .3s steps(2) infinite; }
@keyframes gSpark { 0% { transform: scale(.7); opacity: .7; } 100% { transform: scale(1.25); opacity: 1; } }
/* Still pictures for people who turn motion off */
@media (prefers-reduced-motion: reduce) {
  .gicon * { animation: none !important; }
  .gi-imposter .i-blink, .gi-whot .i-back, .gi-draughts .i-taken, .gi-napt .i-spin text { opacity: 0; transform: scaleY(0); }
  .gi-napt .i-spin .s4, .gi-whot .i-front, .gi-dotsboxes .i-box { opacity: 1; transform: none; }
  .gi-dotsboxes .i-draw line { stroke-dashoffset: 0; }
  .gi-draughts .i-jump { transform: translate(32px, -32px); }
  .gi-police .i-dome { fill: #E8432E; } .gi-police .i-blue { opacity: 1; }
}

/* ---------- Home: game tiles in a grid ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
.game-tile { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px; border-radius: 22px; background: var(--card); border: 2px solid var(--line); box-shadow: 0 5px 0 var(--line); }
.gt-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.gt-top .emoji { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: var(--brand-tint); }
.gt-tag { white-space: nowrap; font: 900 10px/1.2 Nunito, sans-serif; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border: 2px solid var(--line); border-radius: 99px; padding: 4px 8px; text-align: center; }
.gt-name { margin: 2px 0 0; font: 700 21px/1.08 'Fredoka', sans-serif; color: var(--text); text-wrap: balance; letter-spacing: 0; text-transform: none; }
.gt-desc { margin: 0; font-size: 13px; line-height: 1.38; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gt-btns { margin-top: auto; padding-top: 4px; display: flex; flex-wrap: wrap; gap: 8px; }
.gt-btns .btn { flex: 1 1 auto; margin: 0; padding: 9px 10px; font-size: 16px; border-radius: 14px; min-width: 0; white-space: nowrap; box-shadow: 0 4px 0 var(--bd); }
.gt-btns .vs-ai { border: 2px solid var(--line); border-radius: 14px; margin: 0; background: var(--card); color: var(--text); font: 400 15px 'Fredoka', sans-serif; text-align: center; }
body[data-bg] .game-tile { background: var(--frost); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.how-icon { width: 64px; height: 64px; margin: 4px auto 0; border-radius: 20px; display: grid; place-items: center; background: var(--brand-tint); font-size: 32px; }
/* Guess the Meaning: the question mark pops */
.gi-meaning .i-q { animation: gPop 2.4s ease-in-out infinite; }
@keyframes gPop { 0%, 60%, 100% { transform: scale(1); } 70% { transform: scale(1.25) rotate(-10deg); } 80% { transform: scale(.95) rotate(6deg); } }
/* Scramble: the tiles swap places */
.gi-scramble .i-t1, .gi-scramble .i-t3 { transform-box: view-box; animation: gSwapA 3s ease-in-out infinite; }
.gi-scramble .i-t3 { animation-name: gSwapC; }
.gi-scramble .i-t2 { animation: gHop 3s ease-in-out infinite; }
@keyframes gSwapA { 0%, 25% { transform: translate(0, 0); } 40% { transform: translate(18px, -10px); } 55%, 80% { transform: translate(36px, 0); } 100% { transform: translate(0, 0); } }
@keyframes gSwapC { 0%, 25% { transform: translate(0, 0); } 40% { transform: translate(-18px, 10px); } 55%, 80% { transform: translate(-36px, 0); } 100% { transform: translate(0, 0); } }
/* Picture Puzzle: the sun rises, the question mark wobbles */
.gi-picture .i-sun { animation: gSun 3s ease-in-out infinite; }
@keyframes gSun { 0%, 100% { transform: translateY(4px); } 50% { transform: translateY(-2px); } }
.gi-picture .i-pq { animation: gPop 2.6s ease-in-out .4s infinite; }
@media (prefers-reduced-motion: reduce) { .gi-scramble *, .gi-meaning *, .gi-picture * { animation: none !important; } }

/* ---------- Lobby: invite without the QR code, settings summary ---------- */
.invite .invite-label { margin: 0; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
.invite .bigcode { margin: 2px 0 4px; }
.invite-btns { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.invite-btns .btn { margin: 0; padding: 11px 8px; font-size: 16px; min-width: 0; white-space: nowrap; }
.qr.big { width: min(260px, 70vw); margin: 4px auto 6px; background: #fff; padding: 10px; border-radius: 18px; }
.qr.big svg { width: 100%; height: auto; display: block; }
.set-sum { display: grid; gap: 10px; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.set-sum-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.set-sum-head b { font: 700 19px 'Fredoka', sans-serif; }
.set-sum-go { font-weight: 900; font-size: 14px; color: var(--brand-ink); background: var(--brand); padding: 6px 12px; border-radius: 99px; box-shadow: 0 3px 0 var(--brand-dk); }
.sum-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sum-chip { font-size: 12.5px; font-weight: 800; padding: 5px 10px; border-radius: 99px; background: var(--soft-bg); border: 2px solid var(--line); color: var(--text); }
.sum-chip.more { color: var(--muted); }

/* ---------- Settings page ---------- */
.set-sheet { z-index: 85; align-items: flex-end; padding: 0; }
.set-sheet .gone-card { max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 28px 28px 0 0; margin: 0; gap: 14px; padding: 18px max(16px, env(safe-area-inset-left, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)); animation: sheetUp .3s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
.set-hero { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 22px; background: linear-gradient(135deg, color-mix(in srgb, #FFC21A 30%, var(--card)), color-mix(in srgb, #FF6B4A 22%, var(--card))); }
.set-hero h3 { margin: 0; font: 700 26px 'Fredoka', sans-serif; }
.set-hero p { margin: 2px 0 0; font-size: 14px; color: var(--text); opacity: .85; }
.set-ic { flex: none; width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--card); font-size: 30px; box-shadow: 0 4px 0 rgba(0,0,0,.12); }
.set-group { --tone: #FF6B4A; --on-ink: #fff; border-radius: 22px; padding: 12px 12px 4px; background: color-mix(in srgb, var(--tone) 11%, var(--card)); border: 2px solid color-mix(in srgb, var(--tone) 35%, transparent); }
.set-group.tone-blue { --tone: #3FA9F5; } .set-group.tone-green { --tone: #22B573; } .set-group.tone-yellow { --tone: #FFC21A; --on-ink: #2B1C00; } .set-group.tone-purple { --tone: #8B6CFF; }
.set-group h4 { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 4px; padding: 5px 12px 5px 6px; border-radius: 99px; background: var(--tone); color: var(--on-ink); font: 700 15px 'Fredoka', sans-serif; }
.set-group h4 span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.35); font-size: 15px; }
.set-row { display: grid; gap: 8px; padding: 12px 2px; border-top: 2px dashed color-mix(in srgb, var(--tone) 25%, transparent); }
.set-row:first-of-type { border-top: 0; }
.set-txt b { display: block; font: 700 16.5px 'Fredoka', sans-serif; color: var(--text); }
.set-txt small { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 1px; }
.opts { display: flex; flex-wrap: wrap; gap: 7px; }
.opt { font: 800 14px Nunito, sans-serif; padding: 8px 13px; border-radius: 99px; border: 2px solid color-mix(in srgb, var(--tone) 40%, var(--line)); background: var(--card); color: var(--text); cursor: pointer; text-decoration: none; box-shadow: 0 2px 0 color-mix(in srgb, var(--tone) 30%, var(--line)); }
.opt.sm { padding: 6px 10px; font-size: 13px; min-width: 36px; text-align: center; }
.opt.on { background: var(--tone); border-color: var(--tone); color: var(--on-ink); box-shadow: 0 3px 0 color-mix(in srgb, var(--tone) 60%, #000); }
.opt[disabled] { cursor: default; }
.opt[disabled]:not(.on) { opacity: .6; }
.opt:not([disabled]):active { transform: translateY(2px); box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .set-sheet .gone-card { animation: none; } }

/* Guess the Meaning: tap to reveal the answer (no Board Master) */
details.reveal { margin: 10px auto 2px; max-width: 320px; }
details.reveal summary { list-style: none; cursor: pointer; display: inline-block; padding: 9px 16px; border-radius: 999px; background: var(--soft-bg); border: 2px dashed var(--line); color: var(--muted); font-weight: 800; font-size: 15px; user-select: none; }
details.reveal summary::-webkit-details-marker { display: none; }
details.reveal[open] summary { display: none; }
details.reveal[open] .answer { animation: revealPop .35s cubic-bezier(.3,1.5,.5,1); font-size: 18px; }
@keyframes revealPop { from { transform: scale(.7); opacity: 0; } }

/* ---------- Seat-style lobby ---------- */
.seats-card h3 { display: flex; align-items: center; gap: 8px; }
.seat-count { font-size: 13px; background: var(--soft-bg); color: var(--muted); border-radius: 999px; padding: 2px 10px; }
.seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 14px 6px; margin: 12px 0 4px; }
.seat { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; background: none; border: 0; padding: 0; font: inherit; color: inherit; }
.seat-av { --c: #888; position: relative; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-family: Fredoka, Nunito, sans-serif; font-weight: 700; font-size: 25px; border: 3px solid var(--card); box-shadow: 0 0 0 3px var(--c), 0 4px 0 3px color-mix(in srgb, var(--c) 55%, #000); animation: seatPop .45s cubic-bezier(.3,1.6,.5,1); }
.seat.me .seat-av { box-shadow: 0 0 0 3px var(--brand), 0 0 14px color-mix(in srgb, var(--brand) 60%, transparent), 0 4px 0 3px var(--brand-dk); }
.seat.off .seat-av { filter: grayscale(.85) opacity(.55); }
.seat.bot .seat-av { font-size: 26px; }
.seat-crown { position: absolute; top: -13px; right: -7px; font-size: 19px; transform: rotate(18deg); filter: drop-shadow(0 2px 1px rgba(0,0,0,.35)); }
.seat-off { position: absolute; bottom: -6px; left: -6px; font-size: 14px; }
.seat-x { position: absolute; top: -6px; left: -6px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--card); background: var(--bad, #FF7A5C); color: #fff; font-size: 11px; font-weight: 900; line-height: 1; padding: 0; cursor: pointer; display: grid; place-items: center; }
.seat-name { font-weight: 800; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-tag .tag { font-size: 10px; margin: 0; }
.seat.empty { cursor: pointer; }
.seat.empty .seat-av { background: transparent; color: var(--line-dk, #4a4234); border: 3px dashed var(--line-dk, #4a4234); box-shadow: none; animation: seatBreathe 1.8s ease-in-out infinite; animation-delay: var(--d, 0s); }
.seat.empty .seat-name { color: var(--muted); opacity: .75; }
.seat.empty:first-of-type .seat-name, .seat.empty:hover .seat-name { opacity: 1; }
.seat-wait { text-align: center; color: var(--muted); font-weight: 800; margin: 10px 0 0; }
.seat-wait.ready { color: var(--good, #2FC27F); }
.pulse-txt { animation: seatBreathe 1.8s ease-in-out infinite; }
@keyframes seatPop { from { transform: scale(0); } }
@keyframes seatBreathe { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .seat-av, .seat.empty .seat-av, .pulse-txt { animation: none; } }

/* ---------- Card-style prompts ---------- */
.pcard-wrap { perspective: 900px; padding: 14px 10px 26px; }
.pcard { position: relative; background: #FFF8EA; color: #2A2117; border-radius: 22px; padding: 24px 18px; min-height: 170px; display: flex; flex-direction: column; justify-content: center; text-align: center; transform: rotate(-2.5deg);
  box-shadow: 0 12px 0 -4px #E4D8C0, 0 24px 0 -10px #B3A68E, 0 18px 30px rgba(0,0,0,.28); animation: pcardIn .6s cubic-bezier(.3,1.35,.5,1); }
.pcard-lbl { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: #9B8D74; font-weight: 900; margin-bottom: 10px; }
.pcard-q { font-family: Fredoka, Nunito, sans-serif; font-weight: 700; font-size: 26px; line-height: 1.2; text-wrap: balance; }
.pcard-wrap.small { padding: 4px 8px 18px; }
.pcard-wrap.small .pcard { min-height: 0; padding: 14px 14px; transform: rotate(-1.5deg); box-shadow: 0 8px 0 -3px #E4D8C0, 0 12px 20px rgba(0,0,0,.22); }
.pcard-wrap.small .pcard-q { font-size: 19px; }
.pcard-wrap.small .pcard-lbl { font-size: 10px; margin-bottom: 4px; }
.bomb .pcard-q { font-size: 30px; }
@keyframes pcardIn { from { transform: rotateY(90deg) rotate(-2.5deg) scale(.85); opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .pcard { animation: none; } }

/* ---------- Whot table: felt, players around it, fanned hand ---------- */
.mg-card:has(.wfelt) { overflow: visible; }
.wfelt { position: relative; margin: 30px 2px 18px; padding: 62px 8px 40px; border-radius: 50% / 34%;
  background: radial-gradient(ellipse at 50% 45%, #2f7a45 0%, #1f5631 55%, #143a21 100%);
  box-shadow: inset 0 0 0 6px #6b4524, inset 0 0 0 9px #3d2614, inset 0 10px 30px rgba(0,0,0,.35), 0 0 34px rgba(47,194,127,.18), 0 8px 0 #2a1a0d; }
.wfelt.n0 { padding-top: 34px; }
.wfelt .wtable { position: relative; z-index: 1; padding: 0; }
.wfelt .wmarket, .wfelt .wmarket small { color: #d8f0de; }
.wfelt .wneed { background: #FFF8EA; color: #2B1C00; }
.wseat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; z-index: 2; width: 74px; pointer-events: none; }
.wseat-av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font: 700 18px Fredoka, Nunito, sans-serif; color: #fff; background: var(--pc, #4A4655); border: 3px solid #143a21; box-shadow: 0 0 0 2px var(--pc, #4A4655); transition: box-shadow .25s; }
.wseat.p0 { --pc: #e0392b; } .wseat.p1 { --pc: #E8A500; } .wseat.p2 { --pc: #3fa9f5; } .wseat.p3 { --pc: #22b573; } .wseat.p4 { --pc: #9b59b6; } .wseat.p5 { --pc: #ff8a3d; }
.wseat-name { font-weight: 900; font-size: 11px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wseat-cnt { font-weight: 900; font-size: 10px; background: rgba(10,8,6,.75); color: #fff; border-radius: 8px; padding: 1px 6px; white-space: nowrap; }
.wseat.turn .wseat-av, .wme.turn { box-shadow: 0 0 0 3px #FFC21A, 0 0 18px #FFC21A; animation: wturn 1.1s ease-in-out infinite alternate; }
.wme { position: absolute; left: 50%; bottom: -15px; transform: translateX(-50%); z-index: 2; display: flex; gap: 6px; align-items: center; background: #143a21; color: #fff; border: 2px solid #6b4524; border-radius: 999px; padding: 3px 14px; font: 700 14px Fredoka, Nunito, sans-serif; }
.wme small { font: 900 11px Nunito, sans-serif; }
@keyframes wturn { to { box-shadow: 0 0 0 3px #FFC21A, 0 0 6px #FFC21A; } }
.whand .wslot { rotate: var(--r, 0deg); translate: 0 var(--y, 0px); transform-origin: 50% 120%; }
.whand { padding-top: 24px; }
@media (prefers-reduced-motion: reduce) { .wseat.turn .wseat-av, .wme.turn { animation: none; } }
.wlast.semi { background: var(--brand); color: #2B1C00; }
.wseat.turn .wseat-av { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #FFC21A, 0 0 22px #FFC21A; animation: wturnS 0.9s ease-in-out infinite alternate; }
.wseat.turn .wseat-name::before { content: '▶ '; color: #FFC21A; }
@keyframes wturnS { to { transform: scale(1.1); } }

/* ---------- Game sponsors ---------- */
.game-tile { position: relative; overflow: hidden; }
.game-tile.sp { --sc: #FFC21A; border-color: var(--sc); box-shadow: 0 5px 0 color-mix(in srgb, var(--sc) 60%, #000); isolation: isolate; }
.game-tile.sp::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--stile, none) center / cover no-repeat, linear-gradient(135deg, var(--sc), color-mix(in srgb, var(--sc) 55%, #000)); }
.game-tile.sp::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(22,19,15,.10) 0%, rgba(22,19,15,.55) 42%, rgba(22,19,15,.93) 100%); }
.game-tile.sp .gt-name { color: #fff; }
.game-tile.sp .gt-desc { color: #F1E7D4; }
.game-tile.sp .gt-tag { color: #fff; border-color: rgba(255,255,255,.55); background: rgba(0,0,0,.3); }
.game-tile.sp .gt-top .emoji { background: rgba(255,255,255,.93); }
.game-tile.sp .gt-btns .vs-ai, .game-tile.sp .gt-btns .btn.ghost { background: rgba(22,19,15,.65); color: #fff; border-color: rgba(255,255,255,.35); }
.gt-sp { align-self: flex-start; max-width: 100%; display: inline-flex; align-items: center; gap: 5px; border: 0; cursor: pointer; font: 900 11px/1.2 Nunito, sans-serif; color: #fff; background: rgba(0,0,0,.5); border-radius: 8px; padding: 3px 8px 3px 3px; white-space: nowrap; overflow: hidden; }
.gt-sp span { overflow: hidden; text-overflow: ellipsis; }
.gt-sp img, .gt-sp i { flex: none; width: 18px; height: 18px; border-radius: 5px; object-fit: cover; display: grid; place-items: center; font-style: normal; font-size: 11px; background: var(--sc); }
.gt-sp.invite { padding: 3px 8px; background: var(--brand-tint); color: var(--brand-deep, #A87600); opacity: .85; }
.gt-sp.invite:hover { opacity: 1; }
.sp-splash { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; color: #fff; isolation: isolate;
  background: var(--stile, none) center / cover no-repeat, linear-gradient(150deg, var(--sc, #FFC21A), color-mix(in srgb, var(--sc, #FFC21A) 45%, #000)); animation: spIn .3s ease-out; transition: opacity .4s; }
.sp-splash::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 50% 40%, rgba(0,0,0,.05), rgba(0,0,0,.55)); }
.sp-splash.out { opacity: 0; }
.sp-splash small { font: 900 12px Nunito, sans-serif; letter-spacing: 2px; text-transform: uppercase; opacity: .9; }
.sp-gi { width: 96px; height: 96px; border-radius: 28px; background: #fff; display: grid; place-items: center; box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.sp-gi .gicon { width: 70px; height: 70px; } .sp-gi { font-size: 52px; }
.sp-gn { font: 700 34px Fredoka, Nunito, sans-serif; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.sp-brand { display: flex; align-items: center; gap: 10px; background: #fff; color: #1d1a16; border-radius: 18px; padding: 10px 18px; font: 700 22px Fredoka, Nunito, sans-serif; box-shadow: 0 5px 0 rgba(0,0,0,.2); max-width: 90vw; }
.sp-brand img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.sp-load { width: 55%; max-width: 240px; height: 6px; border-radius: 9px; background: rgba(255,255,255,.3); overflow: hidden; margin-top: 6px; }
.sp-load i { display: block; height: 100%; width: 0; background: #fff; animation: spLoad 2s ease-in-out forwards; }
@keyframes spLoad { to { width: 100%; } }
@keyframes spIn { from { opacity: 0; } }
.ad.sp-ad { border-color: var(--sc); background: color-mix(in srgb, var(--sc) 13%, var(--card)); }
.ad.sp-ad .ad-cta { background: var(--sc); color: #fff; }
.sp-by { text-align: center; font-size: 12px; color: var(--muted); margin: -2px 0 10px; }
.sp-by b { color: var(--text); }
.play-bar { height: 5px; border-radius: 5px; background: var(--brand); margin-top: 3px; min-width: 2px; }
.tier { display: inline-block; font: 700 11px Fredoka, sans-serif; border-radius: 6px; padding: 2px 7px; }
.tier.t1 { background: #FFC21A; color: #2B1C00; } .tier.t2 { background: #B9C2CF; color: #1d2330; } .tier.t3 { background: #C8814A; color: #fff; }
@media (prefers-reduced-motion: reduce) { .sp-splash, .sp-load i { animation: none; } .sp-load i { width: 100%; } }
.sp-splash::before { background: radial-gradient(circle at 50% 45%, rgba(0,0,0,.42), rgba(0,0,0,.62)); }
.sp-splash small { text-shadow: 0 1px 3px rgba(0,0,0,.6); }

/* ---------- Home: compact top bar + profile menu (Option C) ---------- */
.home-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0 6px; position: relative; z-index: 31; }
.home-top .alogo { --tw: min(22px, calc((100vw - 190px) / 9.4)); gap: 4px; align-items: center; }
.home-top .alogo .tile { box-shadow: 0 2px 0 #1D1A3A; border-width: 1.5px; }
.home-top .alogo .tile i { display: none; }
.home-top .alogo .games { font-size: 10px; letter-spacing: 7px; padding-left: 7px; line-height: 1; }
.ht-right { display: flex; align-items: center; gap: 8px; flex: none; }
.getapp { font: 700 13px Fredoka, Nunito, sans-serif; color: var(--brand-deep); background: var(--brand-tint); border: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); border-radius: 999px; padding: 6px 11px; cursor: pointer; white-space: nowrap; }
.pavatar { position: relative; width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; cursor: pointer; padding: 0;
  font: 700 18px Fredoka, Nunito, sans-serif; color: #fff; background: #6B5CC9; border: 2px solid color-mix(in srgb, #6B5CC9 60%, #fff); box-shadow: 0 3px 0 #3E3480; }
.pavatar.guest { background: #4b4560; border-color: #6c6588; box-shadow: 0 3px 0 #2c2838; }
.pavatar.prem { background: var(--brand); color: var(--brand-ink); border-color: #fff3c4; box-shadow: 0 3px 0 var(--brand-dk); }
.pavatar.sm { width: 34px; height: 34px; font-size: 15px; box-shadow: none; cursor: default; }
.pdot { position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--coral, #FF6B4A); border: 2px solid var(--bg); }
.pm-backdrop { position: fixed; inset: 0; background: transparent; border: 0; z-index: 40; cursor: default; }
.pmenu { position: absolute; right: 0; top: calc(100% - 2px); z-index: 41; width: min(260px, calc(100vw - 32px)); background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,.35); animation: pmIn .18s ease-out; }
@keyframes pmIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.pm-who { display: flex; align-items: center; gap: 10px; padding: 6px 8px 10px; border-bottom: 2px solid var(--line); margin-bottom: 4px; }
.pm-who div { flex: 1; min-width: 0; } .pm-who b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-who small { display: block; color: var(--muted); font-size: 12px; }
.pm-tier { font-size: 11px; font-weight: 900; background: var(--brand-tint); color: var(--brand-deep); border-radius: 99px; padding: 3px 8px; white-space: nowrap; }
.pm-it { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 10px; border-radius: 12px; border: 0; background: none; color: var(--text); font: 800 15px Nunito, sans-serif; text-align: left; cursor: pointer; text-decoration: none; }
.pm-it:hover { background: var(--soft-bg); }
.pm-theme { cursor: default; }
.pm-seg { margin-left: auto; display: inline-flex; background: var(--soft-bg); border: 2px solid var(--line); border-radius: 99px; padding: 2px; }
.pm-seg button { border: 0; background: none; width: 32px; height: 28px; border-radius: 99px; font-size: 14px; cursor: pointer; opacity: .6; }
.pm-seg button[aria-pressed="true"] { background: var(--card); opacity: 1; box-shadow: 0 1px 0 var(--line); }
.hi-row { margin: 6px 0 10px; }
.hi-row .hi { display: flex; align-items: center; gap: 4px; font: 700 24px Fredoka, Nunito, sans-serif; margin: 0; cursor: text; text-transform: none; letter-spacing: 0; color: var(--text); }
.hi-row .hi input { font: inherit; color: var(--text); background: transparent; border: 0; border-bottom: 2px dashed transparent; padding: 0 2px; margin: 0; width: auto; min-width: 3ch; max-width: 60vw; border-radius: 0; box-shadow: none; }
.hi-row .hi input:focus { outline: none; border-bottom-color: var(--brand); }
.hi-row .hi input::placeholder { color: var(--muted); opacity: .7; }
.hi-pen { font-size: 16px; opacity: .8; }
.hi-row p { margin: 2px 0 0; color: var(--muted); font-weight: 800; font-size: 14px; }
.card.joinbar { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 18px; }
.joinbar .jb-key { font-size: 18px; }
.joinbar input { flex: 1; min-width: 0; margin: 0; border: 0; background: transparent; box-shadow: none; padding: 10px 4px; text-transform: uppercase; letter-spacing: 3px; font-weight: 900; }
.joinbar input::placeholder { text-transform: none; letter-spacing: 0; font-weight: 800; }
.joinbar input:focus { outline: none; }
.joinbar .btn { width: auto; margin: 0; padding: 10px 18px; }
.home-groups { margin: 4px 0 6px; }
.hg-head { display: flex; justify-content: space-between; align-items: center; font-weight: 900; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.hg-head a { color: var(--brand-deep); text-decoration: none; }
.gchips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; scroll-snap-type: x proximity; }
.gchips::-webkit-scrollbar { display: none; }
.gchip { --gc: #FF6B4A; flex: none; display: flex; align-items: center; gap: 8px; background: var(--card); border: 2px solid var(--gc); border-radius: 16px; padding: 6px 12px 6px 6px;
  color: var(--text); text-decoration: none; scroll-snap-align: start; box-shadow: 0 3px 0 color-mix(in srgb, var(--gc) 45%, transparent); }
.gchip i { font-style: normal; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--gc) 25%, transparent); font-size: 16px; }
.gchip b { display: block; font-size: 14px; white-space: nowrap; } .gchip small { display: block; color: var(--muted); font-size: 11px; font-weight: 800; }
.gchip.more { border-style: dashed; border-color: var(--line); color: var(--muted); font-weight: 900; font-size: 13px; padding: 10px 14px; box-shadow: none; }

/* ---------- Premium banner (colourful) ---------- */
.ad.prem-ad { --a: #7C4DFF; --b: #FF4FA3; --c: #FFC21A; overflow: hidden; isolation: isolate; border: 0; padding: 14px 12px 14px 12px; min-height: 104px; gap: 12px; color: #fff;
  background: linear-gradient(125deg, var(--a) 0%, var(--b) 62%, var(--c) 130%); box-shadow: 0 6px 0 color-mix(in srgb, var(--a) 55%, #000), 0 14px 26px color-mix(in srgb, var(--b) 35%, transparent); border-radius: 22px; }
.ad.prem-ad.pa-sunset { --a: #FF5E3A; --b: #FF9F1C; --c: #FFE066; }
.ad.prem-ad.pa-ocean { --a: #1E6BFF; --b: #18C3B5; --c: #A6FF8F; }
.ad.prem-ad.pa-gold { --a: #C77700; --b: #FFB300; --c: #FFF1A8; }
.ad.prem-ad::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background: radial-gradient(circle at 12% 120%, rgba(255,255,255,.55) 0 18%, transparent 19%), radial-gradient(circle at 95% -10%, rgba(255,255,255,.4) 0 22%, transparent 23%), repeating-linear-gradient(-45deg, rgba(255,255,255,.07) 0 10px, transparent 10px 20px); }
.pa-shine { position: absolute; top: -20%; bottom: -20%; width: 38%; left: -45%; z-index: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-18deg); animation: paShine 4.5s ease-in-out infinite; }
@keyframes paShine { 0%, 55% { left: -45%; } 85%, 100% { left: 120%; } }
.pa-spark { position: absolute; font-style: normal; color: #fff; z-index: 1; pointer-events: none; text-shadow: 0 0 8px rgba(255,255,255,.9); animation: paTwinkle 2.4s ease-in-out infinite; }
.pa-spark.s1 { top: 8px; left: 70px; font-size: 13px; } .pa-spark.s2 { bottom: 10px; right: 104px; font-size: 10px; animation-delay: .8s; } .pa-spark.s3 { top: 12px; right: 40%; font-size: 15px; animation-delay: 1.5s; }
@keyframes paTwinkle { 0%, 100% { opacity: .2; transform: scale(.6) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(25deg); } }
.pa-art { position: relative; z-index: 1; flex: none; width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; font-size: 34px;
  background: rgba(255,255,255,.22); border: 2px solid rgba(255,255,255,.55); box-shadow: inset 0 -4px 0 rgba(0,0,0,.12); animation: paBob 2.8s ease-in-out infinite; }
.pa-art b { position: absolute; top: -12px; right: -10px; font-size: 22px; transform: rotate(18deg); filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
@keyframes paBob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-4px) rotate(3deg); } }
.prem-ad .pa-body { position: relative; z-index: 1; flex: 1; min-width: 0; }
.pa-badge { display: inline-block; font: 900 9.5px Nunito, sans-serif; letter-spacing: .08em; text-transform: uppercase; background: rgba(0,0,0,.22); color: #fff; border-radius: 99px; padding: 3px 8px; margin-bottom: 4px; }
.prem-ad .pa-body b { display: block; font: 700 17px/1.15 Fredoka, Nunito, sans-serif; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.18); }
.prem-ad .pa-body small { display: block; color: rgba(255,255,255,.92); font-size: 12px; font-weight: 800; line-height: 1.3; margin-top: 3px; }
.prem-ad .pa-body em { display: inline-block; margin-top: 5px; font-style: normal; font: 900 11px Nunito, sans-serif; background: #fff; color: color-mix(in srgb, var(--a) 80%, #000); border-radius: 8px; padding: 2px 7px; }
.pa-cta { position: relative; z-index: 1; flex: none; align-self: flex-end; font: 700 14px Fredoka, Nunito, sans-serif; background: #fff; color: color-mix(in srgb, var(--a) 85%, #000); border-radius: 14px; padding: 9px 12px; box-shadow: 0 4px 0 rgba(0,0,0,.2); white-space: nowrap; }
.prem-ad .ad-label { color: rgba(255,255,255,.75); z-index: 2; }
.ad.prem-ad.tap:active { transform: translateY(3px); box-shadow: 0 3px 0 color-mix(in srgb, var(--a) 55%, #000); }
@media (max-width: 360px) { .pa-cta { display: none; } }
@media (prefers-reduced-motion: reduce) { .pa-shine, .pa-spark, .pa-art { animation: none; } }
body .ad.prem-ad, body[data-bg] .ad.prem-ad { background: linear-gradient(125deg, var(--a) 0%, var(--b) 62%, var(--c) 130%); }
.pa-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.prem-ad .pa-foot em { margin-top: 0; }
.prem-ad .pa-cta { align-self: auto; padding: 8px 12px; font-size: 14px; }
.ad.prem-ad { align-items: flex-start; padding: 14px 14px 14px 12px; }
.prem-ad .pa-art { margin-top: 18px; }
.pa-spark.s2 { right: 18px; bottom: 54px; }
@media (max-width: 360px) { .pa-cta { display: inline-block; } .prem-ad .pa-foot em { display: none; } }

/* ---------- Ads inside games: half-height, one line ---------- */
.ad.compact { min-height: 0; padding: 7px 10px; gap: 10px; margin: 12px 0 6px; border-radius: 14px; }
.ad.compact .ad-emoji { width: 32px; height: 32px; font-size: 18px; border-radius: 10px; }
.ad.compact .ad-pic { width: 34px; height: 34px; border-radius: 9px; }
.ad.compact .ad-body b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad.compact .ad-body small { display: block; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 0; }
.ad.compact .ad-cta { padding: 6px 10px; font-size: 13px; border-radius: 10px; box-shadow: 0 2px 0 var(--brand-dk); }
.ad.compact .ad-label { top: 2px; right: 7px; font-size: 8.5px; }
.ad.prem-ad.compact { min-height: 0; padding: 7px 10px; align-items: center; border-radius: 16px; box-shadow: 0 4px 0 color-mix(in srgb, var(--a) 55%, #000); }
.ad.prem-ad.compact .pa-art { width: 36px; height: 36px; font-size: 20px; border-radius: 12px; margin-top: 0; animation: none; }
.ad.prem-ad.compact .pa-art b { font-size: 13px; top: -7px; right: -6px; }
.ad.prem-ad.compact .pa-badge, .ad.prem-ad.compact .pa-body small, .ad.prem-ad.compact .pa-foot em, .ad.prem-ad.compact .pa-spark.s2, .ad.prem-ad.compact .pa-spark.s1 { display: none; }
.ad.prem-ad.compact .pa-body { display: flex; align-items: center; gap: 8px; }
.ad.prem-ad.compact .pa-body b { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad.prem-ad.compact .pa-foot { margin: 0; flex: none; } .ad.prem-ad.compact .pa-foot > span:first-child:empty { display: none; }
.ad.prem-ad.compact .pa-cta { padding: 6px 10px; font-size: 13px; border-radius: 11px; box-shadow: 0 2px 0 rgba(0,0,0,.2); }

/* Premium banner: Earthy palette (flat, matte, no shine) */
body .ad.prem-ad, body[data-bg] .ad.prem-ad { background: linear-gradient(180deg, var(--a), color-mix(in srgb, var(--a) 82%, #000)); box-shadow: 0 4px 0 color-mix(in srgb, var(--a) 62%, #000); }
.ad.prem-ad.pa-terracotta { --a: #B5532E; } .ad.prem-ad.pa-olive { --a: #6B7A3A; } .ad.prem-ad.pa-clay { --a: #8A5A3C; } .ad.prem-ad.pa-mustard { --a: #B9861F; }
.ad.prem-ad::before { opacity: .12; background: repeating-linear-gradient(-45deg, rgba(255,255,255,.08) 0 10px, transparent 10px 20px); }
.ad.prem-ad .pa-art { animation: none; background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.32); }
.ad.prem-ad .pa-body b { text-shadow: none; }
.ad.prem-ad .pa-badge { background: rgba(0,0,0,.18); }
.ad.prem-ad .pa-cta, .ad.prem-ad .pa-body em { color: color-mix(in srgb, var(--a) 72%, #000); }
.ad.prem-ad.tap:active { box-shadow: 0 2px 0 color-mix(in srgb, var(--a) 62%, #000); }
.ad.prem-ad.compact { box-shadow: 0 3px 0 color-mix(in srgb, var(--a) 62%, #000); }

/* ---------- rating card + team inbox ---------- */
.rate-sheet { z-index: 94; }
.rate-sheet .gone-card { text-align: center; }
.rate-stars { display: flex; justify-content: center; gap: 6px; margin: 6px 0 0; }
.rate-star { font-size: 40px; line-height: 1; background: none; border: 0; padding: 4px; cursor: pointer; color: var(--line); transition: transform .12s, color .12s; }
.rate-star.on { color: #F5B301; text-shadow: 0 2px 0 #B07F00; }
.rate-star:active { transform: scale(1.25); }
.rate-word { min-height: 1.3em; margin: 2px 0 8px; font-weight: 900; color: var(--muted); }
.rate-sheet textarea { width: 100%; box-sizing: border-box; font: 700 16px Nunito, sans-serif; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--text); resize: vertical; margin-bottom: 10px; }
.rate-sheet label { display: block; font-size: 13px; font-weight: 900; color: var(--muted); text-align: left; margin-bottom: 4px; }
.rate-later { margin-top: 8px; }
.rate-big { font-size: 54px; }
.ib-sum { display: flex; gap: 18px; align-items: center; }
.ib-avg { text-align: center; min-width: 90px; } .ib-avg b { display: block; font: 700 44px Fredoka, sans-serif; } .ib-avg small { color: var(--muted); font-weight: 800; }
.ib-dist { flex: 1; display: grid; gap: 4px; }
.ib-bar { display: grid; grid-template-columns: 30px 1fr 28px; align-items: center; gap: 6px; font-weight: 900; font-size: 13px; }
.ib-bar i { display: block; height: 9px; border-radius: 9px; background: #F5B301; }
.ib-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.ib-tabs .chip { padding: 8px 14px; border-radius: 99px; border: 2px solid var(--line); background: var(--card); color: var(--text); font: 800 14px Nunito, sans-serif; cursor: pointer; }
.ib-tabs .chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand-dk); }
.ib-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ib-item { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.ib-item p { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ib-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ib-head small { color: var(--muted); font-weight: 800; }
.ib-stars { color: #F5B301; letter-spacing: 2px; } .ib-stars span { color: var(--line); }
.ib-item code { display: block; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 6px; }

/* ---------- Name, Animal, Place, Thing: challenge and vote ---------- */
.napt td.chal { background: color-mix(in srgb, #F5A623 22%, transparent); border-radius: 8px; }
.napt td .cellbtn { border-bottom: 1.5px dashed color-mix(in srgb, var(--text) 30%, transparent); }
.chal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.chal-row { border: 2px solid var(--line); border-radius: 16px; padding: 10px 12px; display: grid; gap: 8px; background: var(--card); }
.chal-row.open { border-color: #F5A623; } .chal-row.out { border-color: color-mix(in srgb, var(--bad) 55%, transparent); } .chal-row.kept { border-color: color-mix(in srgb, var(--good) 55%, transparent); }
.chal-txt { display: grid; gap: 2px; } .chal-txt small { color: var(--muted); font-weight: 800; }
.chal-btns { display: flex; gap: 8px; --tone: var(--good); --on-ink: #fff; } .chal-btns .opt { flex: 1; }
.chal-btns .opt.on.bad { background: var(--bad); border-color: var(--bad-dk); color: #fff; }
.chal-host { display: flex; gap: 10px; align-items: center; } .chal-host small { color: var(--muted); font-weight: 900; }
.timer.mini { display: inline-block; min-width: 1.6em; font-weight: 900; color: var(--text); }

/* ---------- name: on the welcome screen, and the pop-up before a game ---------- */
.how-name { display: grid; gap: 6px; margin: 14px 0 6px; text-align: left; }
.how-name span { font-weight: 900; font-size: 14px; }
.how-name input, .name-sheet input { width: 100%; box-sizing: border-box; font: 800 17px Nunito, sans-serif; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--text); }
.how-name input:focus, .name-sheet input:focus { outline: none; border-color: var(--brand); }
.name-sheet { z-index: 96; } .name-sheet .gone-card { text-align: center; } .name-sheet input { margin: 6px 0 10px; text-align: center; }
