/* Vistr — candy arcade. Grape-night background, every drum its own candy colour,
   chunky press-down buttons. The drums are the loud thing; the rest stays calm. */
:root {
  --night: #171b58;      /* page (top of the gradient) */
  --night-2: #221f6b;    /* panels, wells */
  --line: #463f9e;       /* borders */
  --cream: #fff7ec;      /* main text */
  --mute: #c7b8ee;       /* secondary text */
  --ink: #2a1450;        /* letters on drums, text on bright buttons */

  --tangerine: #ff8b3d;
  --bubblegum: #ff5fa8;
  --sky: #45c8f5;
  --lime: #a8e44a;
  --sunshine: #ffd23f;

  --good: var(--lime);
  --bad: #ff5c5c;
  --primary: var(--sunshine);
  --primary-deep: #d9a400;

  --ad-h: 60px;          /* permanent banner slot */
  --radius: 16px;
  font-family: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { overflow-x: hidden; }
body { overflow-x: clip; }   /* clip, not hidden: hidden would stop the top bar from sticking */
body {
  color: var(--cream);
  font-size: 17px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  background: var(--night);
  padding-bottom: calc(var(--ad-h) + env(safe-area-inset-bottom));
}
/* Navy-to-magenta backdrop with flowing light strands (bg.svg), fixed behind everything */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    url(bg.svg) center / cover no-repeat,
    radial-gradient(120% 60% at 0% 100%, rgba(236, 64, 190, 0.95) 0%, rgba(214, 46, 170, 0.75) 30%, rgba(120, 40, 150, 0) 70%),
    radial-gradient(90% 50% at 100% 95%, rgba(220, 60, 190, 0.6) 0%, rgba(220, 60, 190, 0) 70%),
    linear-gradient(175deg, #141850 0%, #1d2066 35%, #26236f 58%, #4a2585 76%, #9c2aa0 100%);
}
#app { min-height: calc(100dvh - var(--ad-h) - var(--appbar-h)); display: flex; justify-content: center; overflow-x: clip; }

.screen {
  width: 100%;
  max-width: 560px;
  padding: 18px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.screen { position: relative; }
.screen.narrow { max-width: 420px; justify-content: center; }

h1, h2 { margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; font-weight: 600; color: var(--mute); margin-top: 4px; }
.headline { font-size: clamp(1.7rem, 7vw, 2.3rem); font-weight: 700; line-height: 1.1; color: var(--cream); }

/* Wordmark: each letter a different candy, slightly tilted like stickers */
.wordmark { font-size: clamp(3.6rem, 16vw, 5.4rem); font-weight: 700; line-height: 0.95; letter-spacing: -0.02em; display: inline-flex; }
.wordmark span { display: inline-block; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); }
.wordmark span:nth-child(5n+1) { color: var(--tangerine); transform: rotate(-6deg); }
.wordmark span:nth-child(5n+2) { color: var(--bubblegum); transform: rotate(4deg) translateY(-3px); }
.wordmark span:nth-child(5n+3) { color: var(--sky); transform: rotate(-3deg); }
.wordmark span:nth-child(5n+4) { color: var(--lime); transform: rotate(5deg) translateY(2px); }
.wordmark span:nth-child(5n+5) { color: var(--sunshine); transform: rotate(-4deg); }
.wordmark.small { font-size: 1.7rem; }
.wordmark.small span { text-shadow: none; }

.lead { margin: 0; color: var(--mute); font-size: 1.12rem; max-width: 34ch; }
.hint { margin: 0; color: var(--mute); font-size: 0.95rem; }
.error { margin: 0; color: var(--bad); min-height: 1.4em; font-weight: 500; }
strong { color: var(--cream); font-weight: 600; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--mute); }
.you strong {
  display: inline-block; margin-left: 4px; padding: 1px 10px; border-radius: 999px;
  background: var(--sunshine); color: var(--ink); font-variant-numeric: tabular-nums;
}

/* forms */
.stack { display: flex; flex-direction: column; gap: 12px; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; min-width: 0; }
label { display: flex; flex-direction: column; gap: 6px; color: var(--mute); font-size: 0.95rem; }
input {
  font: inherit; font-size: 1.1rem; color: var(--cream);
  background: var(--night-2); border: 2px solid var(--line); border-radius: 14px;
  padding: 12px 14px; outline: none;
}
input::placeholder { color: #8c7cc0; }
input:focus-visible { border-color: var(--sky); }
.id-input { font-size: 2.2rem; font-weight: 700; letter-spacing: 0.1em; text-align: center; font-variant-numeric: tabular-nums; }

/* Buttons: chunky, with a ledge that disappears when pressed */
.btn {
  font: inherit; font-weight: 600; font-size: 1.08rem; cursor: pointer;
  color: var(--cream); background: var(--night-2);
  border: 2px solid var(--line); border-radius: 14px;
  padding: 12px 18px; min-height: 50px;
  box-shadow: 0 4px 0 var(--line);
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--ink); box-shadow: 0 5px 0 var(--primary-deep); }
.btn.primary:active:not(:disabled) { box-shadow: 0 2px 0 var(--primary-deep); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--mute); box-shadow: none; }
.btn.big { font-size: 1.25rem; min-height: 60px; }
.btn:disabled { background: transparent; border-color: var(--line); color: #8c7cc0; box-shadow: none; cursor: not-allowed; }
.link { font: inherit; background: none; border: 0; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 4px 0; }
button:focus-visible, .level:focus-visible, summary:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
[hidden] { display: none !important; }

/* Level picker: each length has its own candy colour */
.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.level {
  --c: var(--tangerine);
  font: inherit; cursor: pointer; color: var(--cream);
  background: var(--night-2); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 14px 4px 10px; display: flex; flex-direction: column; align-items: center; gap: 0;
  box-shadow: 0 4px 0 var(--line);
}
.level[data-level="5"] { --c: var(--bubblegum); }
.level[data-level="6"] { --c: var(--sky); }
.level[data-level="7"] { --c: var(--lime); }
.level b { font-size: 2.4rem; font-weight: 700; line-height: 1; color: var(--c); }
.level span { font-size: 0.85rem; color: var(--mute); }
.level[aria-checked="true"] { background: var(--c); border-color: var(--c); box-shadow: 0 4px 0 rgba(0,0,0,0.3); transform: translateY(-2px); }
.level[aria-checked="true"] b, .level[aria-checked="true"] span { color: var(--ink); }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Score boards */
.boards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 460px) { .boards { grid-template-columns: 1fr; } }
.board { background: rgba(28, 26, 92, 0.86); border-radius: var(--radius); padding: 14px 16px; border: 2px solid var(--line); }
.board:nth-child(2) { border-color: rgba(255, 95, 168, 0.45); }
.board h3 { margin: 0 0 8px; font-size: 1.02rem; font-weight: 600; }
.board ol { margin: 0; padding: 0; list-style: none; counter-reset: rank; }
.board li { counter-increment: rank; display: grid; grid-template-columns: 1.8em 1fr auto; gap: 8px; padding: 4px 0; font-variant-numeric: tabular-nums; color: var(--mute); }
.board li::before { content: counter(rank); font-weight: 700; color: var(--line); }
.board li:nth-child(1)::before { color: var(--sunshine); }
.board li:nth-child(2)::before { color: var(--sky); }
.board li:nth-child(3)::before { color: var(--tangerine); }
.board li b { color: var(--cream); font-weight: 700; }
.board li.mine { color: var(--cream); }
.board li.mine b { color: var(--sunshine); }
.board .empty { color: var(--mute); font-size: 0.95rem; margin: 0; }

/* Lobby + ready lists */
.players { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.players li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(28, 26, 92, 0.86); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px 10px 16px; min-height: 58px;
}
.players .pid { font-weight: 600; font-variant-numeric: tabular-nums; }
.players .status { color: var(--mute); font-size: 0.95rem; margin-left: 6px; }
.players .status.on { color: var(--lime); }
.players .btn { min-height: 42px; padding: 6px 16px; box-shadow: 0 3px 0 var(--line); }
.players .empty { background: none; border: 2px dashed var(--line); color: var(--mute); }

/* ── game ───────────────────────────────────────────── */
.game { gap: 14px; position: relative; }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.score { display: flex; flex-direction: column; }
.score span { color: var(--mute); font-size: 0.9rem; }
.score b { font-size: 2.6rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--sunshine); }
.score.opp { text-align: right; align-items: flex-end; }
.score.opp b { color: var(--sky); }
.score b.pop { animation: pop 380ms ease-out; }
@keyframes pop { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }
.clock {
  font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--cream);
  background: var(--night-2); border: 2px solid var(--line); border-radius: 999px; padding: 4px 16px;
}
.clock.low { color: var(--ink); background: var(--bad); border-color: var(--bad); }

.chain { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; min-height: 1.9em; font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.04em; }
.chain li { padding: 2px 10px; border-radius: 999px; background: var(--night-2); color: var(--mute); }
.chain li.bad { text-decoration: line-through; color: var(--bad); }
.chain li:last-child:not(.bad) { background: var(--lime); color: var(--ink); font-weight: 600; }

.streak {
  align-self: center; margin: -4px 0 0; padding: 3px 14px; border-radius: 999px;
  background: var(--bubblegum); color: var(--ink); font-weight: 700; font-size: 0.95rem;
}
.streak.bump { animation: pop 380ms ease-out; }

/* The drums: candy reels, one colour each. The rolled one lifts and glows. */
.drums {
  --n: 5;
  --w: min(84px, calc((100vw - 32px - (var(--n) - 1) * 8px) / var(--n)));
  position: relative;
  display: flex; justify-content: center; gap: 8px; padding: 14px 0 4px;
  touch-action: none; user-select: none;
}
.drum { --c: var(--tangerine); width: var(--w); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.drum:nth-child(5n+2) { --c: var(--bubblegum); }
.drum:nth-child(5n+3) { --c: var(--sky); }
.drum:nth-child(5n+4) { --c: var(--lime); }
.drum:nth-child(5n+5) { --c: var(--sunshine); }
.drum .nudge {
  width: 100%; height: 36px; font-size: 1rem; color: var(--c); cursor: pointer;
  background: transparent; border: 0; border-radius: 10px;
}
.drum .nudge:hover { background: rgba(255,255,255,0.06); }
.drum .face {
  position: relative; width: 100%; height: calc(var(--w) * 2.1); overflow: hidden; cursor: ns-resize;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(42,20,80,0.45) 0%, rgba(42,20,80,0) 32%, rgba(255,255,255,0.18) 50%, rgba(42,20,80,0) 68%, rgba(42,20,80,0.45) 100%),
    var(--c);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.28), inset 0 0 0 2px rgba(255,255,255,0.25);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.drum .reel { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); transition: transform 140ms ease-out; }
.drum .reel span {
  display: block; height: calc(var(--w) * 0.8); line-height: calc(var(--w) * 0.8);
  text-align: center; font-weight: 700; font-size: calc(var(--w) * 0.64); color: var(--ink);
  text-transform: uppercase;
}
.drum .reel span.dim { opacity: 0.32; }
.drum.focus .face { box-shadow: 0 5px 0 rgba(0,0,0,0.28), 0 0 0 3px var(--cream); }
.drum.changed .face {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 11px 0 rgba(0,0,0,0.3), 0 0 0 4px var(--cream), 0 0 28px 4px var(--c);
}
.drums.locked { pointer-events: none; }
.drums.locked .face { animation: judge 0.7s ease-in-out infinite; }
@keyframes judge { 50% { filter: brightness(0.8) saturate(0.7); } }
.drums.bad { animation: shake 360ms ease-in-out; }
@keyframes shake { 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }

/* Confetti burst on a real word */
.confetti { position: absolute; left: 50%; top: 45%; width: 0; height: 0; pointer-events: none; }
.confetti i {
  position: absolute; width: 10px; height: 14px; border-radius: 3px;
  animation: burst 900ms cubic-bezier(.15,.7,.3,1) forwards;
}
@keyframes burst {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}

.verdict { margin: 0; text-align: center; min-height: 1.5em; font-weight: 600; font-size: 1.15rem; }
.verdict.good { color: var(--lime); }
.verdict.bad { color: var(--bad); }
.verdict.info { color: var(--mute); }
.actions { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.keys { margin: 0; text-align: center; color: #8c7cc0; font-size: 0.85rem; }
@media (hover: none) { .keys { display: none; } }
.end { align-self: center; }

/* Results */
.final { display: flex; flex-direction: column; gap: 10px; }
.final .row { display: flex; justify-content: space-between; align-items: center; background: var(--night-2); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 18px; }
.final .row b { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.final .row.win { background: var(--sunshine); border-color: var(--sunshine); color: var(--ink); }
.final .row.win b { color: var(--ink); }
.final .words { color: var(--mute); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; margin: 0; }

/* Sign-in extras */
.new-player { margin-top: 14px; padding-top: 18px; border-top: 2px dashed var(--line); }
.big-id { margin: 0; font-size: clamp(5.5rem, 32vw, 9rem); font-weight: 700; line-height: 1; color: var(--sunshine); font-variant-numeric: tabular-nums; text-shadow: 0 6px 0 rgba(0,0,0,0.3); }
.advanced summary { color: var(--mute); cursor: pointer; padding: 4px 0; }
.advanced form { margin-top: 12px; }

dialog {
  background: var(--night-2); color: var(--cream); border: 3px solid var(--bubblegum);
  border-radius: 20px; padding: 22px; max-width: 360px; width: calc(100% - 32px);
}
dialog::backdrop { background: rgba(20, 8, 46, 0.75); }
dialog p { margin: 0; }

/* ── Ads ─────────────────────────────────────────────── */
/* Permanent banner: always the bottom 60px, on every screen. */
.ad-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--ad-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--ad-bg, #170a36); border-top: 2px solid rgba(0,0,0,0.25);
  display: flex; justify-content: center;
}
.ad-banner a, .ad-banner .ad-body {
  width: 100%; max-width: 560px; height: var(--ad-h);
  display: flex; align-items: center; gap: 12px; padding: 0 12px 0 16px;
  color: var(--ad-fg, var(--cream)); text-decoration: none;
}
.ad-banner img { height: 44px; width: auto; border-radius: 8px; }
.ad-banner .ad-text { flex: 1; min-width: 0; line-height: 1.2; }
.ad-banner .ad-text b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-banner .ad-text small { display: block; font-size: 0.82rem; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-banner .ad-cta { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--ad-fg, var(--cream)); color: var(--ad-bg-solid, var(--ink)); font-weight: 600; font-size: 0.9rem; }
.ad-tag { flex: none; align-self: flex-start; margin-top: 6px; font-size: 0.7rem; padding: 0 5px; border-radius: 4px; border: 1px solid currentColor; opacity: 0.7; }

/* Between-round ad: a card, never during play */
.ad-interstitial { border-color: var(--sky); padding: 0; overflow: hidden; max-width: 380px; }
.ad-interstitial .ad-card { display: flex; flex-direction: column; gap: 12px; padding: 22px; background: var(--ad-bg, var(--night-2)); color: var(--ad-fg, var(--cream)); }
.ad-interstitial .ad-card img { width: 100%; border-radius: 12px; }
.ad-interstitial h3 { margin: 0; font-size: 1.5rem; line-height: 1.15; }
.ad-interstitial p { margin: 0; }
.ad-interstitial .ad-head { display: flex; justify-content: space-between; align-items: center; }
.ad-interstitial .ad-skip { font: inherit; font-weight: 600; background: rgba(0,0,0,0.25); color: inherit; border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.ad-interstitial a.btn { display: block; text-align: center; text-decoration: none; background: var(--ad-fg, var(--sunshine)); border-color: var(--ad-fg, var(--sunshine)); color: var(--ad-bg-solid, var(--ink)); box-shadow: 0 4px 0 rgba(0,0,0,0.3); }
.ad-interstitial .ad-skip:disabled { cursor: default; opacity: 0.8; }

@media (prefers-reduced-motion: reduce) {
  .drum .reel, .drum .face, .btn { transition: none; }
  .drums.locked .face, .drums.bad, .score b.pop, .streak.bump { animation: none; }
  .confetti { display: none; }
}

/* ── Bonuses and celebrations ───────────────────────── */
.chips-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: -4px; }
.chips-row .streak { margin: 0; }
.jackpots {
  margin: 0; padding: 3px 14px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  border: 2px solid var(--sunshine); color: var(--sunshine);
}
.jackpots.bump { animation: pop 380ms ease-out; }

.parts { list-style: none; margin: -6px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 1.7em; }
.parts li { padding: 2px 12px; border-radius: 999px; background: var(--night-2); color: var(--cream); font-size: 0.92rem; font-weight: 500; }
.parts li.k-hot { background: var(--tangerine); color: var(--ink); }
.parts li.k-streak { background: var(--bubblegum); color: var(--ink); }
.parts li.k-jackpot { background: var(--sunshine); color: var(--ink); font-weight: 700; }
.parts li.k-miss { background: var(--bad); color: var(--ink); }

.rules { list-style: none; margin: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; background: var(--night-2); border: 2px solid var(--line); border-radius: var(--radius); }
.rules li { display: flex; justify-content: space-between; gap: 12px; color: var(--mute); }
.rules li b { color: var(--cream); white-space: nowrap; }
.rules li.jp b { color: var(--sunshine); }

/* Full-screen effects layer: never blocks taps */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }

/* Stars racing across the screen with a glowing trail */
.star { position: absolute; left: 0; display: flex; align-items: center; animation: run var(--dur, 1.4s) linear forwards; }
.star::before { content: ""; width: 90px; height: 5px; border-radius: 3px; margin-right: -8px; background: linear-gradient(90deg, transparent, var(--c)); }
.star i { width: var(--size, 28px); height: var(--size, 28px); background: var(--c); animation: spin 0.9s linear infinite;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.star.rtl { animation-name: run-rtl; }
@keyframes run { from { transform: translateX(-140px); } to { transform: translateX(calc(100vw + 40px)); } }
@keyframes run-rtl { from { transform: translateX(calc(100vw + 40px)) scaleX(-1); } to { transform: translateX(-140px) scaleX(-1); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Balloons floating up from the bottom */
.balloon { position: absolute; bottom: -150px; left: var(--x); animation: rise var(--dur, 4s) ease-in forwards; }
.balloon i {
  position: relative; display: block; width: var(--bw, 58px); height: calc(var(--bw, 58px) * 1.22);
  border-radius: 50% 50% 47% 47% / 55% 55% 45% 45%;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.75) 0 7%, rgba(255,255,255,0) 8%), var(--c);
  box-shadow: inset -6px -8px 0 rgba(0,0,0,0.12);
  animation: sway 1.7s ease-in-out infinite alternate;
}
.balloon i::before { content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 6px solid transparent; border-bottom-color: var(--c); border-top: 0; transform: translateX(-50%) rotate(180deg); }
.balloon i::after { content: ""; position: absolute; left: 50%; top: calc(100% + 4px); width: 2px; height: 60px; background: rgba(255, 247, 236, 0.55); transform-origin: top; transform: rotate(4deg); }
@keyframes rise { to { transform: translateY(calc(-100vh - 260px)); } }
@keyframes sway { from { transform: translateX(-10px) rotate(-5deg); } to { transform: translateX(10px) rotate(5deg); } }

/* BIG SCORE banner */
.bigscore {
  position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; text-align: center; white-space: nowrap;
  animation: big-in 2.6s cubic-bezier(.2,1.4,.4,1) forwards;
}
.bigscore b {
  font-size: clamp(3rem, 15vw, 6.5rem); font-weight: 700; line-height: 1; color: var(--sunshine);
  text-shadow: 0 5px 0 var(--bubblegum), 0 10px 0 var(--ink), 0 0 40px rgba(255, 210, 63, 0.6);
  -webkit-text-stroke: 2px var(--ink);
}
.bigscore span {
  margin-top: 10px; font-size: clamp(2rem, 10vw, 3.6rem); font-weight: 700; color: var(--ink);
  background: var(--lime); padding: 2px 22px; border-radius: 999px; box-shadow: 0 5px 0 rgba(0,0,0,0.3);
}
@keyframes big-in {
  0% { transform: translate(-50%, -50%) scale(0.2) rotate(-12deg); opacity: 0; }
  18% { transform: translate(-50%, -50%) scale(1.12) rotate(3deg); opacity: 1; }
  28% { transform: translate(-50%, -50%) scale(1) rotate(-2deg); }
  80% { transform: translate(-50%, -50%) scale(1) rotate(0); opacity: 1; }
  100% { transform: translate(-50%, -62%) scale(0.9); opacity: 0; }
}

/* Points floating up from the score */
.float-pts { position: fixed; font-size: 1.8rem; font-weight: 700; color: var(--sunshine); text-shadow: 0 3px 0 var(--ink); animation: float-up 1.1s ease-out forwards; }
.float-pts.minus { color: var(--bad); }
@keyframes float-up { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-70px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .star, .balloon { display: none; }
  .bigscore { animation: big-fade 2.2s linear forwards; }
  .float-pts { animation: big-fade 1.2s linear forwards; }
  .jackpots.bump { animation: none; }
  @keyframes big-fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
}
.chain li.fresh { background: var(--sky); color: var(--ink); }
.chain li.fresh::before { content: "New: "; font-weight: 600; }

/* ── Play with someone ───────────────────────────────── */
.together {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px; border-radius: 20px;
  background: linear-gradient(160deg, rgba(69, 200, 245, 0.16), rgba(255, 95, 168, 0.14));
  border: 2px solid rgba(69, 200, 245, 0.45);
}
.together-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.together-head h2 { margin: 0; font-size: 1.25rem; color: var(--cream); }
.together .players li { background: rgba(20, 22, 80, 0.8); }
.together .players .who { display: flex; flex-direction: column; min-width: 0; }
.together .players .status { margin-left: 0; font-variant-numeric: tabular-nums; }
.together .players .btn { background: var(--sky); border-color: var(--sky); color: var(--ink); box-shadow: 0 3px 0 #2a8fb3; white-space: nowrap; }
.together .error { min-height: 0; }

/* On/off switch */
.switch { flex-direction: row; align-items: center; gap: 10px; cursor: pointer; color: var(--cream); font-weight: 500; font-size: 0.98rem; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { position: relative; flex: none; width: 50px; height: 30px; border-radius: 999px; background: var(--line); transition: background 150ms ease; }
.switch .track::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--cream); transition: transform 150ms ease; box-shadow: 0 2px 0 rgba(0,0,0,0.25); }
.switch input:checked + .track { background: var(--lime); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--sky); outline-offset: 3px; }

.outgoing { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--sunshine); color: var(--ink); font-weight: 500; }
.outgoing .link { color: var(--ink); }

/* Request popup */
#request-dialog { border-color: var(--sky); }
.request-title { font-size: 1.25rem; line-height: 1.3; }

/* Short messages at the top of the screen */
.toast {
  position: fixed; left: 50%; top: calc(var(--appbar-h) + 10px); z-index: 45; transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 10px 18px; border-radius: 14px;
  background: var(--cream); color: var(--ink); font-weight: 600; box-shadow: 0 6px 0 rgba(0,0,0,0.25);
}
.toast.show { animation: toast-in 260ms ease-out; }
@keyframes toast-in { from { transform: translate(-50%, -20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .toast.show { animation: none; } .switch .track, .switch .track::after { transition: none; } }

/* Standalone / Live */
.mode-chip { padding: 2px 12px; border-radius: 999px; border: 2px solid var(--line); color: var(--mute); font-size: 0.9rem; font-weight: 600; }
.link.center { align-self: center; }
.together.is-live { border-color: var(--lime); }

/* "Next word" skip */
.btn.skip { align-self: center; display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; min-height: 46px; border-color: var(--sky); box-shadow: 0 4px 0 #2a8fb3; }
.btn.skip .skips-left { padding: 1px 10px; border-radius: 999px; background: var(--sky); color: var(--ink); font-size: 0.88rem; }
.btn.skip.last { border-color: var(--bad); box-shadow: 0 4px 0 #b33d3d; }
.btn.skip.last .skips-left { background: var(--bad); }

/* ── Online / Offline ─────────────────────────────── */
/* Status badge: always says which mode you're in */
.net-pill {
  display: inline-flex; align-items: center; gap: 8px; margin: 0; align-self: flex-start;
  padding: 4px 12px 4px 10px; border-radius: 999px; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(255, 255, 255, 0.1); color: var(--mute); border: 2px solid rgba(255, 255, 255, 0.18);
}
.net-pill i { width: 10px; height: 10px; border-radius: 50%; background: #9a93c9; }
.net-pill[data-net="online"] { color: var(--ink); background: var(--lime); border-color: var(--lime); }
.net-pill[data-net="online"] i { background: #1f7a3a; box-shadow: 0 0 0 3px rgba(31, 122, 58, 0.25); }
.net-pill[data-net="connecting"] { color: var(--ink); background: var(--sunshine); border-color: var(--sunshine); }
.net-pill[data-net="connecting"] i { background: var(--ink); animation: blink 0.8s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.2; } }

/* Two labelled buttons instead of a switch, so it's obvious which is on */
.mode-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 16px; background: rgba(10, 12, 50, 0.55); border: 2px solid var(--line); }
.mode-toggle button {
  font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer; min-height: 48px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; background: transparent; color: var(--mute);
}
.mode-toggle button i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.mode-toggle button[aria-checked="true"][data-mode="offline"] { background: var(--cream); color: var(--ink); }
.mode-toggle button[aria-checked="true"][data-mode="online"] { background: var(--lime); color: var(--ink); }
.mode-toggle button[aria-checked="true"] i { opacity: 1; }
.mode-toggle button.connecting { background: var(--sunshine); color: var(--ink); }
.mode-toggle button.connecting i { opacity: 1; animation: blink 0.8s ease-in-out infinite; }
.mode-toggle button:disabled { cursor: wait; }
.together h2 { margin: 0; font-size: 1.25rem; color: var(--cream); }

/* × on between-round ads: close right away */
.ad-close { display: inline-flex; align-items: center; gap: 8px; }
.ad-x { font: inherit; font-size: 1.5rem; line-height: 1; width: 40px; height: 40px; border: 0; border-radius: 50%; cursor: pointer; background: rgba(0, 0, 0, 0.25); color: inherit; }
.ad-x:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .net-pill i, .mode-toggle button.connecting i { animation: none; } }

/* Intensity picker: stars say how hard it is at a glance */
.intensity { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.intensity button {
  font: inherit; cursor: pointer; color: var(--cream); min-height: 64px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: rgba(28, 26, 92, 0.86); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 0 var(--line);
}
.intensity .stars { color: var(--sunshine); font-size: 0.9rem; letter-spacing: 2px; }
.intensity b { font-weight: 600; font-size: 0.98rem; }
.intensity button[aria-checked="true"] { background: var(--sunshine); border-color: var(--sunshine); color: var(--ink); transform: translateY(-2px); box-shadow: 0 4px 0 var(--primary-deep); }
.intensity button[aria-checked="true"] .stars { color: var(--ink); }
.intensity-about { margin-top: -8px; }

/* Hint + Next word row */
.helpers { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.helpers .btn.skip { align-self: auto; }
.btn.hint-btn { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; min-height: 46px; border-color: var(--sunshine); box-shadow: 0 4px 0 var(--primary-deep); }
.btn.hint-btn .hints-left { padding: 1px 10px; border-radius: 999px; background: var(--sunshine); color: var(--ink); font-size: 0.88rem; }
.btn.hint-btn .hints-left:empty { display: none; }
.drum.hinted .face { box-shadow: 0 5px 0 rgba(0,0,0,0.28), 0 0 0 4px var(--sunshine), 0 0 30px 6px rgba(255, 210, 63, 0.7); }
.drum.hinted .nudge { animation: nudge 0.9s ease-in-out infinite; color: var(--sunshine); }
@keyframes nudge { 50% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .drum.hinted .nudge { animation: none; } }

/* With AdMob on, the native banner sits over this reserved strip */
body.native-ads .ad-banner { background: transparent; border-top: 0; }

.privacy-link { font-size: 0.9rem; }

/* Top badge is the one Offline/Online control: tap to switch */
button.net-pill { font-family: inherit; cursor: pointer; }
button.net-pill .swap { font-size: 0.95rem; opacity: 0.75; margin-left: 2px; }
button.net-pill:disabled { cursor: wait; }
button.net-pill:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }

/* Offline: how to play + Go online */
.about, .live-area { display: flex; flex-direction: column; gap: 12px; }
.about h2, .live-area h2 { margin: 0; font-size: 1.25rem; color: var(--cream); }
.how { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 10px; }
.how li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; color: var(--mute); line-height: 1.4; }
.how li::before {
  content: counter(step); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 0.9rem; color: var(--ink); background: var(--sky);
}
.how li:nth-child(2)::before { background: var(--tangerine); }
.how li:nth-child(3)::before { background: var(--sunshine); }
.how li:nth-child(4)::before { background: var(--bubblegum); }
.how li:nth-child(5)::before { background: var(--lime); }
.how li b { color: var(--cream); font-weight: 600; }
.btn.go-online {
  display: flex; flex-direction: column; align-items: center; gap: 0; padding: 12px 18px; min-height: 66px;
  background: var(--lime); border-color: var(--lime); color: var(--ink); box-shadow: 0 5px 0 #6f9c26;
}
.btn.go-online:active:not(:disabled) { box-shadow: 0 2px 0 #6f9c26; }
.btn.go-online .go-title { font-size: 1.2rem; font-weight: 700; }
.btn.go-online .go-sub { font-size: 0.9rem; font-weight: 500; opacity: 0.85; }
.btn.go-online.connecting { background: var(--sunshine); border-color: var(--sunshine); box-shadow: 0 5px 0 var(--primary-deep); }

/* Rules rows: label and value both wrap, so nothing runs off small screens or
   large text settings */
.rules li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.rules li b { margin-left: auto; white-space: normal; text-align: right; overflow-wrap: anywhere; }

.signin-title { margin: 0; font-size: 1.4rem; color: var(--cream); }

/* One letter per move: the other drums lock once a letter is changed */
.drum.held .face { opacity: 0.45; filter: saturate(0.4); }
.drum.held .nudge { opacity: 0.25; }
.drum.held .face::after { content: "🔒"; position: absolute; right: 4px; top: 2px; font-size: 0.75rem; }
.drum.nag .face { animation: nag 420ms ease-in-out; }
@keyframes nag { 0%, 100% { transform: none; } 30% { transform: scale(1.08); box-shadow: 0 0 0 4px var(--sunshine); } 60% { transform: scale(0.97); } }

/* Two-player turns */
.turn { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 10px; padding: 10px 14px; border-radius: 16px;
  background: var(--night-2); border: 2px solid var(--line); font-weight: 600; }
.turn[hidden] { display: none; }
.turn .turn-who { color: var(--mute); }
.turn .turn-time { font-variant-numeric: tabular-nums; color: var(--mute); }
.turn .turn-bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.12); overflow: hidden; }
.turn .turn-bar i { display: block; height: 100%; width: 100%; background: var(--mute); border-radius: 3px; transition: width 250ms linear; }
.turn.mine { border-color: var(--lime); box-shadow: 0 0 18px rgba(168, 228, 74, 0.35); }
.turn.mine .turn-who, .turn.mine .turn-time { color: var(--lime); }
.turn.mine .turn-bar i { background: var(--lime); }
.turn.mine.low .turn-time { color: var(--bad); }
.turn.mine.low .turn-bar i { background: var(--bad); }
.drums.waiting { pointer-events: none; }
.drums.waiting .face { opacity: 0.5; filter: saturate(0.35); }
.drums.waiting .nudge { opacity: 0.2; }
.chain li.theirs:not(.bad) { background: transparent; border: 2px solid var(--bubblegum); color: var(--cream); }
.chain li.theirs:last-child:not(.bad) { background: var(--bubblegum); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .drum.nag .face { animation: none; } .turn .turn-bar i { transition: none; } }

/* Words played: at the bottom of the game screen, full list, so the controls never move */
.words-played { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.words-played h2 { margin: 0 0 10px; font-size: 0.95rem; font-weight: 600; color: var(--mute); }
.words-played h2 span { font-weight: 500; }
.words-played .chain { min-height: 0; }
.game .actions { margin-top: 2px; }

/* Jackpot and streak badges share one line of fixed height, so nothing below them moves */
.chips-row { flex-wrap: nowrap; min-height: 2.1em; align-items: center; }
.chips-row > * { white-space: nowrap; }

/* ── Top bar on every screen: Vistr, Online/Offline and the menu stay in place ── */
:root { --appbar-h: calc(62px + env(safe-area-inset-top)); }
.appbar {
  position: sticky; top: 0; z-index: 40; height: var(--appbar-h);
  padding: env(safe-area-inset-top) 16px 0;
  background: rgba(23, 27, 88, 0.84);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.appbar-in { max-width: 560px; height: 100%; margin: 0 auto; display: flex; align-items: center; gap: 10px; color: var(--mute); }
.appbar .brand { background: none; border: none; padding: 0; cursor: pointer; margin-right: 4px; line-height: 1; }
.appbar .net-pill { align-self: center; }
.appbar .grow { flex: 1; }
.appbar .you { white-space: nowrap; }
.appbar .you[hidden] { display: none; }
@media (max-width: 380px) {
  .appbar-in { gap: 7px; }
  .appbar .wordmark.small { font-size: 1.4rem; }
  .appbar .net-pill { padding: 3px 9px 3px 8px; gap: 6px; font-size: 0.78rem; }
  .appbar .net-pill .swap { display: none; }
  .appbar .you { font-size: 0.85rem; }
  .appbar .you strong { margin-left: 2px; padding: 1px 7px; }
  .menu-btn { width: 40px; height: 40px; }
}
.menu-btn {
  flex: none; width: 44px; height: 44px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border-radius: 14px; border: 2px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.08); cursor: pointer; padding: 0;
}
.menu-btn i { display: block; width: 20px; height: 3px; border-radius: 2px; background: var(--cream); }
.menu-btn:hover, .menu-btn:focus-visible { background: rgba(255, 255, 255, 0.16); }

/* Menu: a panel sliding in from the right */
dialog.menu-sheet {
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(320px, 86vw); max-width: none;
  border: none; border-left: 3px solid var(--bubblegum); border-radius: 22px 0 0 22px;
  padding: max(14px, env(safe-area-inset-top)) 16px 20px; display: none; flex-direction: column; gap: 10px;
  background: linear-gradient(180deg, #221f6b, #3a1f78);
}
dialog.menu-sheet[open] { display: flex; animation: slide-in 220ms ease-out; }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.menu-head { display: flex; align-items: center; justify-content: space-between; }
.menu-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.menu-list button {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 14px; text-align: left;
  font: inherit; font-weight: 600; font-size: 1.05rem; color: var(--cream); cursor: pointer;
  background: rgba(255, 255, 255, 0.07); border: 2px solid transparent; border-radius: 16px;
}
.menu-list button:hover, .menu-list button:focus-visible { border-color: var(--sky); background: rgba(255, 255, 255, 0.12); }
.menu-list button[hidden] { display: none; }
.menu-list .ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font-size: 1.05rem; color: var(--ink); background: var(--sunshine); }
.menu-list button:nth-child(2) .ic { background: var(--sky); }
.menu-list button:nth-child(3) .ic { background: var(--lime); }
.menu-list button:nth-child(4) .ic { background: var(--bubblegum); }
.menu-list button:nth-child(5) .ic { background: var(--tangerine); }
.menu-foot { margin-top: auto !important; color: var(--mute); font-size: 0.9rem; text-align: center; }
.menu-sheet .x, .reader .x {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08); color: var(--cream); font-size: 1.5rem; line-height: 1; cursor: pointer;
}

/* Reader: About, How to play, Privacy and Terms, full screen */
dialog.reader {
  position: fixed; inset: var(--appbar-h) 0 calc(var(--ad-h) + env(safe-area-inset-bottom)) 0; z-index: 35;
  margin: 0; width: 100%; max-width: none; height: auto; max-height: none; padding: 0; border: none; border-radius: 0;
  display: none; flex-direction: column; background: linear-gradient(170deg, #1b1d5e 0%, #3a1f78 60%, #7a2a8f 100%);
  overscroll-behavior: contain;
}
dialog.reader[open] { display: flex; }
.reader-head {
  display: flex; align-items: center; gap: 10px; padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); background: rgba(23, 27, 88, 0.6);
}
.reader-head h2 { flex: 1; margin: 0; font-size: 1.2rem; text-align: center; }
.reader-back { flex: none; width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent; color: var(--cream); font-size: 2rem; line-height: 1; cursor: pointer; }
.reader-body { flex: 1; overflow-y: auto; padding: 8px 18px 40px; max-width: 680px; width: 100%; margin: 0 auto; box-sizing: border-box; -webkit-overflow-scrolling: touch; }
.reader-body h2 { font-size: 1.1rem; margin: 24px 0 6px; color: var(--sunshine); }
.reader-body p, .reader-body li { color: #e4dcff; margin: 6px 0; }
.reader-body ul, .reader-body ol { padding-left: 1.3em; }
.reader-body a { color: var(--sky); }
.reader-body .meta { color: var(--mute); font-size: 0.92rem; }
.reader-body .fill { background: var(--sunshine); color: var(--ink); padding: 0 4px; border-radius: 4px; }
.reader-body .note { padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); }
.reader-body table { width: 100%; border-collapse: collapse; }
.reader-body td { padding: 7px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); color: #e4dcff; vertical-align: top; }
.reader-body td:last-child { text-align: right; font-weight: 700; color: var(--cream); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { dialog.menu-sheet[open] { animation: none; } }

.legal-links { margin: 0; text-align: center; color: var(--mute); font-size: 0.9rem; }
.legal-links .link { font-size: inherit; }

/* Contact form and reviews inside the app */
.reader-body .contact-form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.reader-body .contact-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; color: var(--cream); font-size: 1rem; }
.reader-body .contact-form small { font-weight: 400; color: var(--mute); }
.reader-body input, .reader-body select, .reader-body textarea {
  font: inherit; color: var(--cream); background: rgba(0, 0, 0, 0.25); border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px; padding: 10px 12px; width: 100%; }
.reader-body input:focus, .reader-body select:focus, .reader-body textarea:focus { outline: none; border-color: var(--sky); }
.reader-body select option { background: var(--night-2); }
.reader-body .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.reader-body .send { font: inherit; font-weight: 700; font-size: 1.1rem; color: var(--ink); background: var(--sunshine); border: none; border-radius: 14px; padding: 13px; cursor: pointer; box-shadow: 0 4px 0 #d9a514; }
.reader-body .send:disabled { opacity: 0.6; }
.reader-body .form-status { min-height: 1.4em; margin: 0; font-weight: 600; }
.reader-body .form-status.ok { color: var(--lime); }
.reader-body .form-status.bad { color: #ff7a7a; }
.rv-summary { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; margin: 10px 0 6px; }
.rv-summary b { display: block; font-size: 3rem; line-height: 1; color: var(--cream); }
.rv-summary .meta { display: block; }
.rv-stars { color: var(--sunshine); letter-spacing: 0.08em; }
.rv-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.reader-body .rv-bars li { display: grid; grid-template-columns: 2.2em 1fr 2em; align-items: center; gap: 8px; margin: 0; font-size: 0.85rem; color: var(--mute); }
.rv-bars i { display: block; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.rv-bars i i { height: 100%; background: var(--sunshine); }
.rv-write { margin: 16px 0; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); }
.rv-write h2 { margin-top: 0 !important; }
.rv-write form { display: flex; flex-direction: column; gap: 10px; }
.rv-pick { display: flex; gap: 6px; }
.rv-pick button { font-size: 2.1rem; line-height: 1; background: none; border: none; padding: 2px; cursor: pointer; color: rgba(255, 255, 255, 0.25); }
.rv-pick button.on { color: var(--sunshine); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.rv-list { list-style: none; padding: 0 !important; }
.reader-body .rv-list li { padding: 12px 0; margin: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.rv-list small { color: var(--mute); margin-left: 6px; }
.reader-body .rv-list p { margin: 6px 0 0; }
.menu-list button:nth-child(5) .ic { background: var(--tangerine); }
.menu-list button:nth-child(6) .ic { background: var(--sunshine); }
.menu-list button:nth-child(7) .ic { background: var(--sky); }

@media (max-width: 380px) { .menu-btn { width: 40px; height: 40px; } }

/* Games played counter under Play solo */
.plays { margin: -8px 0 0; text-align: center; color: var(--mute); font-size: 0.95rem; }
.plays b { color: var(--sunshine); font-weight: 700; }
.plays::before { content: "🎮 "; }

/* Language picker at the top of the menu */
.menu-lang { padding: 10px 2px 2px; }
.menu-lang-label { margin: 0 0 8px; color: var(--mute); font-weight: 600; font-size: 0.95rem; }
.lang-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lang-chips button {
  font: inherit; font-weight: 600; font-size: 0.95rem; color: var(--cream); cursor: pointer;
  padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 2px solid rgba(255, 255, 255, 0.18);
}
.lang-chips button[aria-checked="true"] { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.lang-chips.locked button:not([aria-checked="true"]) { opacity: 0.45; }
.lang-note { margin: 8px 0 0; font-size: 0.9rem; font-weight: 600; color: var(--sun, #ffd23f); }
.lang-note.show { animation: lang-nudge 0.4s; }
@keyframes lang-nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.lang-tag { font-size: 0.75rem; color: var(--mute); border: 1px solid rgba(255,255,255,0.25); border-radius: 999px; padding: 0 6px; margin-left: 4px; }

/* Longer words in other languages (Principiante, Intermédiaire …) must still fit three across */
.intensity { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.intensity button { min-width: 0; padding: 6px 4px; }
.intensity b { font-size: clamp(0.78rem, 3.7vw, 0.98rem); max-width: 100%; overflow-wrap: anywhere; text-align: center; line-height: 1.15; }
