/* ============================================================
   BensBenchmark — design system
   Dark-first to match the logo; full light theme on the toggle.
   Every class the game pages use is kept; only the look changed.
   ============================================================ */

:root {
  --bg: #08080a;
  --bg-tint: #0d0d10;
  --surface: #111115;
  --surface-2: #19191e;
  --surface-3: #212127;
  --border: #24242b;
  --border-mid: #3a3a44;
  --ink: #f5f5f6;
  --text: #f5f5f6;
  --text-2: #b9b9c2;
  --muted: #8d8d98;          /* 6.0:1 on the background */
  --accent: #f5f5f6;
  --accent-text: #08080a;
  --pop: #8fa8ff;
  --glow: rgba(143, 168, 255, .55);

  /* Wordle-style tiles. Letters carry the contrast, so each fill has a partner. */
  --green: #50814b;  --on-green: #ffffff;
  --yellow: #c9b458; --on-yellow: #ffffff;
  --grey: #3a3a40;   --on-grey: #ffffff;
  --key-used: #0e0e11; --key-used-text: #5c5c66;

  --good: #6ad08a;  --good-soft: #10261a;
  --bad: #ff6b6b;   --bad-soft: #2b1214;
  --warn: #f2c14e;  --warn-soft: #2a2312;

  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 12px 32px rgba(0,0,0,.45);
  --shadow-lg: 0 30px 80px rgba(0,0,0,.6);
  --radius: 12px;
  --radius-lg: 18px;
  --pill: 999px;

  --ease: cubic-bezier(.22, .9, .3, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Outfit", "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --maxw: 1180px;
  --header-h: 64px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #fafafa;
  --bg-tint: #f3f3f5;
  --surface: #ffffff;
  --surface-2: #f1f1f4;
  --surface-3: #e8e8ec;
  --border: #e3e3e8;
  --border-mid: #c6c6ce;
  --ink: #0b0b0d;
  --text: #0b0b0d;
  --text-2: #464652;
  --muted: #6a6a75;          /* 5.1:1 on the background */
  --accent: #0b0b0d;
  --accent-text: #ffffff;
  --pop: #3651cf;
  --glow: rgba(54, 81, 207, .35);
  --grey: #777772;
  --key-used: #b4b4ae; --key-used-text: #ffffff;
  --good: #22783f;  --good-soft: #e8f5ec;
  --bad: #c0392b;   --bad-soft: #fbeceb;
  --warn: #9a6a00;  --warn-soft: #fdf5e3;
  --shadow: 0 1px 2px rgba(15,15,25,.06), 0 10px 30px rgba(15,15,25,.08);
  --shadow-lg: 0 30px 80px rgba(15,15,25,.16);
  color-scheme: light;
}

* { box-sizing: border-box; }

/* Keyboard focus is always visible; :focus-visible keeps it off mouse clicks. */
:focus-visible { outline: 3px solid var(--pop); outline-offset: 3px; border-radius: 6px; }
.btn:focus-visible, .chip:focus-visible, .icon-btn:focus-visible { outline-offset: 4px; }
.key:focus-visible, .cword:focus-visible, .cell:focus-visible, .tile:focus-visible { outline-offset: 2px; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s var(--ease-soft), color .4s var(--ease-soft);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--pop); color: var(--bg); }

h1, h2, h3, h4 { margin: 0; line-height: 1.08; letter-spacing: -.02em; font-weight: 700; font-family: var(--font-display); }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: -.025em; }

/* Smooth page-to-page morphs where the browser supports them. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .38s; animation-timing-function: var(--ease); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease-soft), background .4s var(--ease-soft);
}
.site-header.scrolled { border-bottom-color: var(--border); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 8px; }

.brand {
  display: flex; align-items: center; gap: 11px;
  margin-right: auto;
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.16rem; letter-spacing: -.02em;
}
.brand-mark { width: 42px; height: 30px; flex: 0 0 auto; position: relative; transition: transform .6s var(--spring); }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-mark .lm-dark { display: block; }
.brand-mark .lm-light { display: none; }
:root[data-theme="light"] .brand-mark .lm-dark { display: none; }
:root[data-theme="light"] .brand-mark .lm-light { display: block; }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.1); }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  position: relative; padding: 8px 13px;
  font-size: .91rem; font-weight: 500; color: var(--text-2);
  border-radius: var(--pill);
  transition: color .3s var(--ease), background .3s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); background: var(--surface-2); }

.header-actions { display: flex; align-items: center; gap: 7px; margin-left: 10px; }
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--pill);
  cursor: pointer;
  transition: border-color .3s var(--ease), transform .3s var(--spring), background .3s var(--ease);
}
.icon-btn:hover { border-color: var(--border-mid); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 17px; height: 17px; }
.nav-toggle { display: none; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 22px;
  border: 1px solid var(--accent);
  border-radius: var(--pill);
  background: var(--accent); color: var(--accent-text);
  font-size: .93rem; font-weight: 600; letter-spacing: -.005em;
  cursor: pointer; white-space: nowrap;
  transition: transform .3s var(--spring), box-shadow .35s var(--ease), background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), opacity .2s;
}
.btn > * { position: relative; z-index: 1; }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(110deg, transparent 30%, color-mix(in srgb, var(--accent-text) 18%, transparent) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 22%, transparent); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 16px; height: 16px; }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-mid); }
.btn-ghost::after { background: linear-gradient(110deg, transparent 30%, color-mix(in srgb, var(--text) 10%, transparent) 50%, transparent 70%); }
.btn-ghost:hover { border-color: var(--text); box-shadow: none; background: var(--surface-2); }
.btn-quiet { background: transparent; color: var(--text-2); border-color: transparent; }
.btn-quiet:hover { background: var(--surface-2); color: var(--text); box-shadow: none; transform: none; }
.btn-sm { min-height: 36px; padding: 7px 15px; font-size: .84rem; }
.btn-lg { min-height: 52px; padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ============================================================
   Hero — reactive particle field behind the logo
   ============================================================ */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(84vh, 760px);
  display: grid; place-items: center;
  padding: 70px 0 60px;
  text-align: center;
}
.hero-canvas { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; pointer-events: none; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 50% 42%, transparent 0%, color-mix(in srgb, var(--bg) 55%, transparent) 60%, var(--bg) 100%),
    linear-gradient(to bottom, transparent 70%, var(--bg));
}
.hero-logo {
  width: min(300px, 62vw); margin: 0 auto 26px;
  filter: drop-shadow(0 18px 50px rgba(0,0,0,.55));
  animation: logoIn 1.2s var(--ease) both;
}
.hero-logo .lm-dark { display: block; } .hero-logo .lm-light { display: none; }
:root[data-theme="light"] .hero-logo .lm-dark { display: none; }
:root[data-theme="light"] .hero-logo .lm-light { display: block; }
:root[data-theme="light"] .hero-logo { filter: drop-shadow(0 18px 40px rgba(20,20,40,.18)); }
@keyframes logoIn {
  0% { opacity: 0; transform: translateY(24px) scale(.86) rotate(-6deg); filter: blur(10px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: none; }
}
.hero h1 {
  font-size: clamp(2.6rem, 7.5vw, 5.2rem);
  font-weight: 800; letter-spacing: -.04em; line-height: .98;
}
.hero h1 .shine {
  background: linear-gradient(100deg, var(--text) 20%, var(--pop) 45%, var(--text) 70%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s var(--ease-in-out) infinite;
}
@keyframes shine { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0% 0; } }
.hero-sub { margin: 18px auto 0; max-width: 46ch; font-size: clamp(1rem, 2vw, 1.15rem); color: var(--text-2); }
.hero-cta { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.scroll-cue {
  display: grid; place-items: center; gap: 6px; margin: 38px auto 0; width: fit-content;
  cursor: pointer; color: var(--muted); background: none; border: 0;
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  transition: color .3s var(--ease);
}
.scroll-cue:hover { color: var(--text); }
.scroll-cue svg { width: 20px; height: 20px; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* live numbers */
.live-strip {
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin-top: 26px;
}
.live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border); border-radius: var(--pill);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(10px);
  font-size: .84rem; color: var(--text-2);
}
.live-pill b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.dot-live {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--good); position: relative; flex: 0 0 auto;
}
.dot-live::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--good); opacity: 0;
  animation: ping 2s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }

/* ============================================================
   Sections
   ============================================================ */
.section { padding: clamp(46px, 7vw, 86px) 0; }
.section-tint { background: var(--bg-tint); }
.section-head { margin-bottom: 28px; display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.section-head > div { flex: 1 1 300px; }
.kicker { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.035em; }
.section-head p { margin-top: 8px; color: var(--text-2); max-width: 52ch; }
.rule { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ============================================================
   Game grid — ranked cards with a pointer-tracked glow border
   (technique ported from 21st.dev "Glow Card Grid")
   ============================================================ */
/* The most played game gets a feature tile, sized so every row comes out full:
   2x2 in four columns, a full-width banner in three or two. */
.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; grid-auto-flow: dense; }
.game-grid > .gcard:first-child { grid-column: span 2; grid-row: span 2; }
.game-grid > .gcard:first-child .gcard-stage { aspect-ratio: auto; flex: 1 1 auto; min-height: 260px; }
.game-grid > .gcard:first-child .gcard-body { flex: none; }
.game-grid > .gcard:first-child .gcard-body p { font-size: 1rem; }
.game-grid > .gcard:first-child .gcard-foot h3, .game-grid > .gcard:first-child h3 { font-size: 1.6rem; }
@media (max-width: 1120px) {
  .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game-grid > .gcard:first-child { grid-column: 1 / -1; grid-row: span 1; }
  .game-grid > .gcard:first-child .gcard-stage { aspect-ratio: 21 / 8; flex: none; min-height: 0; }
}
@media (max-width: 860px) { .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .game-grid > .gcard:first-child .gcard-stage { aspect-ratio: 16 / 8; } }
@media (max-width: 580px) { .game-grid { grid-template-columns: 1fr; } .game-grid > .gcard:first-child .gcard-stage { aspect-ratio: 16 / 10; } }

.gcard {
  --px: -10; --py: -10;
  position: relative; display: flex; flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden; isolation: isolate;
  cursor: pointer;
  transition: transform .5s var(--ease), border-color .4s var(--ease), box-shadow .5s var(--ease);
}
/* the glow ring: a radial light that follows the pointer, masked to the border */
.gcard::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border-radius: inherit; padding: 1.5px;
  background: radial-gradient(240px circle at calc(50% + var(--px) * 50%) calc(50% + var(--py) * 50%),
              var(--tile, var(--pop)), transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s var(--ease);
}
/* a soft wash of the game colour behind the content, also pointer-led */
.gcard::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at calc(50% + var(--px) * 50%) calc(50% + var(--py) * 50%),
              color-mix(in srgb, var(--tile, var(--pop)) 16%, transparent), transparent 60%);
  opacity: 0; transition: opacity .5s var(--ease);
}
.game-grid:hover .gcard::before, .gcard:focus-within::before { opacity: 1; }
.gcard:hover::after { opacity: 1; }
.gcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.gcard:active { transform: translateY(-2px) scale(.985); }

.gcard-stage {
  position: relative; aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--tile, var(--pop)) 22%, transparent), transparent 70%),
    var(--bg-tint);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.gcard-rank {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  min-width: 30px; height: 30px; padding: 0 9px;
  display: grid; place-items: center;
  border-radius: var(--pill);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  font-family: var(--font-display); font-weight: 800; font-size: .86rem;
}
.gcard-rank.top { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.gcard-new {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  padding: 4px 10px; border-radius: var(--pill);
  background: var(--tile, var(--pop)); color: #fff;
  font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.gcard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.gcard-title { display: flex; align-items: center; gap: 10px; }
.gcard-title h3 { font-size: 1.22rem; font-weight: 700; letter-spacing: -.02em; }
.gcard-body p { color: var(--text-2); font-size: .9rem; }
.gcard-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }
.gcard-foot .plays { margin-left: auto; font-variant-numeric: tabular-nums; }
.mode-dot {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: var(--pill);
  border: 1px solid var(--border); font-weight: 600; color: var(--text-2);
}
.mode-dot svg { width: 12px; height: 12px; }

.game-glyph, .glyph {
  width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: 11px;
  display: grid; place-items: center;
  color: color-mix(in srgb, var(--tile, var(--pop)) 80%, var(--text));
  background: color-mix(in srgb, var(--tile, var(--pop)) 16%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--tile, var(--pop)) 30%, transparent);
}
.game-glyph svg, .glyph svg { width: 20px; height: 20px; }

/* ============================================================
   Animated game previews (shared by cards and detail pages)
   ============================================================ */
.pv-host { position: absolute; inset: 0; }
.pv { position: absolute; inset: 0; display: grid; place-items: center; --u: 1; }
.pv.paused * { animation-play-state: paused !important; }
.pv-row { display: flex; gap: calc(5px * var(--u)); }
.pv-col { display: flex; flex-direction: column; gap: calc(5px * var(--u)); }
.pv-tile {
  width: calc(30px * var(--u)); height: calc(30px * var(--u));
  border-radius: calc(5px * var(--u));
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: calc(15px * var(--u));
  text-transform: uppercase;
  border: 2px solid var(--border-mid); background: var(--surface); color: var(--text);
}
.pv-chip {
  padding: calc(7px * var(--u)) calc(10px * var(--u));
  border-radius: calc(7px * var(--u));
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: calc(10.5px * var(--u)); font-weight: 700; letter-spacing: .03em;
}
.pv-text { font-family: var(--font-display); font-weight: 800; font-size: calc(22px * var(--u)); letter-spacing: -.02em; }
.pv-small { font-size: calc(11px * var(--u)); color: var(--text-2); font-weight: 600; }

/* ============================================================
   Game detail page
   ============================================================ */
.detail { padding: 34px 0 70px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 34px; align-items: start; }
.detail-stage {
  position: relative; aspect-ratio: 16 / 11;
  border-radius: 24px; overflow: hidden;
  border: 1px solid var(--border);
  background:
    radial-gradient(110% 90% at 50% 0%, color-mix(in srgb, var(--tile, var(--pop)) 26%, transparent), transparent 65%),
    var(--bg-tint);
  box-shadow: var(--shadow-lg);
}
.detail-stage .pv { --u: 1.9; }
.detail-info h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -.04em; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.detail-meta .tag { font-size: .74rem; }
.detail-lede { font-size: 1.08rem; color: var(--text-2); }
.how { margin-top: 22px; display: grid; gap: 10px; }
.how li { list-style: none; display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); font-size: .94rem; }
.how li b { color: var(--text); font-weight: 600; }
.how .n {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: .74rem; font-weight: 800; color: var(--text);
}
.how ul { margin: 0; padding: 0; display: grid; gap: 10px; }

.modes-pick { display: grid; gap: 10px; margin-top: 26px; }
.mode-btn {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; min-height: 64px;
  border-radius: 16px; border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer; text-align: left;
  transition: transform .35s var(--spring), border-color .3s var(--ease), background .3s var(--ease), box-shadow .4s var(--ease);
}
.mode-btn:hover { transform: translateX(4px); border-color: var(--border-mid); box-shadow: var(--shadow); }
.mode-btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.mode-btn.primary .mode-sub { color: color-mix(in srgb, var(--accent-text) 70%, transparent); }
.mode-btn .mode-ico {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--tile, var(--pop)) 18%, transparent);
  color: var(--tile, var(--pop));
}
.mode-btn.primary .mode-ico { background: color-mix(in srgb, var(--accent-text) 12%, transparent); color: var(--accent-text); }
.mode-btn .mode-ico svg { width: 20px; height: 20px; }
.mode-btn .mode-name { font-weight: 700; font-size: 1rem; display: block; }
.mode-btn .mode-sub { font-size: .82rem; color: var(--muted); display: block; margin-top: 1px; }
.mode-btn .go { margin-left: auto; transition: transform .35s var(--spring); }
.mode-btn:hover .go { transform: translateX(4px); }
.mode-btn .go svg { width: 18px; height: 18px; }
.mode-btn.done { opacity: .72; }
.mode-btn .badge { margin-left: 8px; }

.best-line {
  margin-top: 16px; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 14px; background: var(--surface-2); font-size: .9rem;
}

/* ============================================================
   Stats / steps / misc blocks
   ============================================================ */
.stat-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface);
}
.stat-cell { padding: 22px 8px; text-align: center; border-right: 1px solid var(--border); }
.stat-cell:last-child { border-right: 0; }
.stat-num { font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.stat-label { margin-top: 7px; font-size: .78rem; color: var(--muted); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin-bottom: 20px; }
.stat-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; text-align: center;
  transition: border-color .35s var(--ease);
}
.stat-box:hover { border-color: var(--border-mid); }
.stat-box .v { font-family: var(--font-display); font-size: 1.36rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-box .k { font-size: .66rem; color: var(--muted); text-transform: uppercase; letter-spacing: .11em; margin-top: 2px; font-weight: 700; }
.stat-box.hl .v { color: var(--pop); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.step {
  padding: 24px 22px; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface);
  transition: transform .45s var(--ease), border-color .35s var(--ease);
}
.step:hover { transform: translateY(-4px); border-color: var(--border-mid); }
.step-n { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; color: var(--muted); transition: color .35s var(--ease); }
.step:hover .step-n { color: var(--pop); }
.step h3 { margin-top: 6px; font-size: 1.06rem; }
.step p { margin-top: 5px; color: var(--text-2); font-size: .9rem; }

/* ============================================================
   Forms
   ============================================================ */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 7px; color: var(--text-2); }
.input, textarea.input, select.input {
  width: 100%; min-height: 46px; padding: 11px 14px;
  font: inherit; font-size: .96rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-mid);
  border-radius: var(--radius); outline: none;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.input:focus { border-color: var(--pop); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pop) 18%, transparent); }
.input::placeholder { color: var(--muted); }
textarea.input { resize: vertical; min-height: 110px; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 7px; }
.notice { padding: 11px 14px; border-radius: var(--radius); font-size: .87rem; font-weight: 600; margin-bottom: 14px; border: 1px solid transparent; animation: slideDown .35s var(--ease); }
.notice-bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.notice-good { background: var(--good-soft); color: var(--good); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(20px, 3.5vw, 30px); }

.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--pill); }
.tabs button {
  min-height: 34px; padding: 6px 15px; border: 0; background: transparent;
  border-radius: var(--pill); font-size: .85rem; font-weight: 600; color: var(--text-2);
  cursor: pointer; transition: background .35s var(--ease), color .3s var(--ease);
}
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--accent); color: var(--accent-text); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 38px; padding: 8px 15px;
  border: 1px solid var(--border-mid); border-radius: var(--pill);
  background: var(--surface); font-size: .83rem; font-weight: 600;
  cursor: pointer;
  transition: transform .3s var(--spring), background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.chip:hover { border-color: var(--text); transform: translateY(-2px); }
.chip.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.chip:disabled { opacity: .55; cursor: default; transform: none; }
.chip small { opacity: .65; font-weight: 500; }
.chip.done { border-style: dashed; opacity: .7; }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--pill);
  font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--tile, var(--pop)) 40%, transparent);
  color: color-mix(in srgb, var(--tile, var(--pop)) 75%, var(--text));
  background: color-mix(in srgb, var(--tile, var(--pop)) 12%, transparent);
}
.best-chip { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); font-size: .8rem; display: inline-flex; align-items: center; }
.crown { margin-right: 4px; color: var(--warn); display: inline-flex; }
.crown svg { width: 13px; height: 13px; }
.heart svg { width: 17px; height: 17px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { border-top: 1px solid var(--border); padding: 54px 0 30px; margin-top: 30px; background: var(--bg-tint); }
.footer-live {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  margin-bottom: 44px;
}
.footer-live .fl {
  padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface);
  display: flex; align-items: center; gap: 14px;
}
.footer-live .fl b { display: block; font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.footer-live .fl span { font-size: .8rem; color: var(--muted); }
.footer-live .fl .ico {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--surface-2); color: var(--text-2);
}
.footer-live .fl .ico svg { width: 19px; height: 19px; }
.footer-top { display: flex; gap: 40px; flex-wrap: wrap; justify-content: space-between; }
.footer-brand { max-width: 280px; }
.footer-brand p { margin-top: 12px; color: var(--muted); font-size: .88rem; }
.footer-cols { display: flex; gap: 52px; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--font); font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 12px; font-weight: 700; }
.footer-col a { display: block; padding: 4px 0; font-size: .88rem; color: var(--text-2); transition: color .3s var(--ease), transform .35s var(--ease); }
.footer-col a:hover { color: var(--text); transform: translateX(4px); }
.footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border);
  display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap;
  font-size: .82rem; color: var(--muted);
}
.player-count { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-2); }
.player-count b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ============================================================
   Scroll reveal & progress
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.reveal-scale { transform: translateY(16px) scale(.97); }
.progress-bar {
  position: fixed; top: 0; left: 0; height: 2px; z-index: 300; width: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--pop), var(--text));
  transition: width .1s linear;
}

/* ============================================================
   Game shell (every individual game page)
   ============================================================ */
.game-shell { padding: 28px 0 60px; }
.game-head { display: flex; align-items: flex-start; gap: 15px; flex-wrap: wrap; margin-bottom: 20px; }
.game-head h1 { font-size: clamp(1.6rem, 3.6vw, 2.1rem); font-weight: 800; letter-spacing: -.03em; }
.game-head p { color: var(--text-2); font-size: .92rem; margin-top: 3px; }
.game-head .glyph { width: 44px; height: 44px; border-radius: 13px; }
.game-head-main { flex: 1 1 260px; }
.game-head-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px;
  font-size: .85rem; font-weight: 600; color: var(--muted); white-space: nowrap;
  transition: color .3s var(--ease), transform .35s var(--ease);
}
.back-link:hover { color: var(--text); transform: translateX(-3px); }
.back-link svg { width: 14px; height: 14px; }

.mode-bar {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 11px 14px; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.mode-bar .lbl { font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.mode-bar .sep { width: 1px; height: 20px; background: var(--border); }

.board-area {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: clamp(16px, 3vw, 28px);
  box-shadow: var(--shadow);
}
.msg-line { min-height: 24px; text-align: center; font-size: .9rem; font-weight: 600; color: var(--text-2); margin-top: 12px; }
.daily-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 16px;
  border: 1px solid var(--border); border-left: 3px solid var(--tile, var(--pop));
  border-radius: var(--radius); background: var(--surface); font-size: .88rem;
}
.countdown-num { font-variant-numeric: tabular-nums; font-weight: 700; }
.modes-label { font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }

/* keyboard */
.keyboard { display: grid; gap: 6px; margin-top: 18px; user-select: none; }
.krow { display: flex; gap: 5px; justify-content: center; }
.key {
  flex: 1 1 auto; min-width: 0; max-width: 44px; height: 54px;
  border: 0; border-radius: 8px;
  background: var(--surface-3);
  font-size: .86rem; font-weight: 700; text-transform: uppercase;
  cursor: pointer; display: grid; place-items: center;
  transition: transform .12s var(--ease), background .4s var(--ease), color .4s var(--ease);
}
.key:hover { background: var(--border-mid); }
.key:active { transform: scale(.9); }
.key.wide { max-width: 70px; flex: 1.5 1 auto; font-size: .7rem; }
.key.correct { background: var(--green); color: var(--on-green); }
.key.present { background: var(--yellow); color: var(--on-yellow); }
.key.absent { background: var(--key-used); color: var(--key-used-text); }

/* toast & modal */
.toast-wrap { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  padding: 11px 20px; background: var(--accent); color: var(--accent-text);
  border-radius: var(--pill); font-size: .88rem; font-weight: 600; box-shadow: var(--shadow-lg);
  animation: toastIn .45s var(--spring);
}
.toast.out { animation: toastOut .3s var(--ease-soft) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px); } }

.modal-back {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(4, 4, 6, .62);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 18px;
  animation: fadeIn .3s var(--ease-soft);
}
.modal-back.closing { animation: fadeOut .2s var(--ease-soft) forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
.modal {
  width: 100%; max-width: 420px; max-height: calc(100vh - 36px); overflow: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 22px; padding: 28px;
  box-shadow: var(--shadow-lg);
  animation: modalIn .5s var(--spring);
}
.modal-wide { max-width: 540px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(26px) scale(.94); } to { opacity: 1; transform: none; } }
.modal h2 { font-size: 1.4rem; font-weight: 800; }
.modal p.sub { color: var(--text-2); font-size: .92rem; margin-top: 6px; }
.modal-close {
  float: right; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--muted); cursor: pointer;
  display: grid; place-items: center;
  transition: background .3s var(--ease), color .3s var(--ease), transform .45s var(--spring);
}
.modal-close:hover { background: var(--accent); color: var(--accent-text); transform: rotate(90deg); }
.modal-close svg { width: 15px; height: 15px; }

/* leaderboard */
.lb-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.lb-table th { text-align: left; font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 800; padding: 0 8px 8px; border-bottom: 1px solid var(--border); }
.lb-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); transition: background .3s var(--ease); }
.lb-table tr:last-child td { border-bottom: 0; }
.lb-table tbody tr:hover td { background: var(--surface-2); }
.lb-table td.rank { width: 36px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 700; }
.lb-table td.score { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.lb-table tr.me td { background: var(--surface-2); font-weight: 700; }
.empty { text-align: center; padding: 30px 18px; color: var(--muted); font-size: .9rem; }

/* party rooms */
.code-display { font-family: var(--font-mono); font-size: clamp(2.4rem, 9vw, 3.6rem); font-weight: 700; letter-spacing: .24em; text-align: center; padding: 6px 0 0 .24em; }
.code-input { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700; letter-spacing: .34em; text-align: center; text-transform: uppercase; padding: 14px 10px 14px calc(10px + .34em); }
.player-list { display: grid; gap: 7px; }
.player-row {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); animation: slideIn .4s var(--ease);
  transition: border-color .3s var(--ease);
}
.player-row:hover { border-color: var(--border-mid); }
@keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.player-row.you { border-color: var(--text); }
.avatar-sm { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-text); font-size: .72rem; font-weight: 800; flex: 0 0 auto; }
.player-row .nm { font-weight: 600; font-size: .92rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: var(--pill); border: 1px solid var(--border-mid); color: var(--muted); }
.badge.host { border-color: var(--text); color: var(--text); }
.badge.done { border-color: var(--good); color: var(--good); }
.race-bar { height: 6px; background: var(--surface-2); border-radius: var(--pill); overflow: hidden; flex: 1; min-width: 60px; }
.race-bar i { display: block; height: 100%; background: var(--text); border-radius: var(--pill); width: 0; transition: width .6s var(--ease); }
.race-bar.me i { background: var(--pop); }
.podium { display: grid; gap: 8px; }
.podium-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); animation: popRow .5s var(--spring) both; }
@keyframes popRow { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: none; } }
.podium-row.first { border-color: var(--text); border-width: 2px; }
.podium-pos { font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; width: 28px; }

/* ============================================================
   Utilities
   ============================================================ */
.mono { font-family: var(--font-mono); }
.center { text-align: center; }
.muted { color: var(--muted); }
.row { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 11px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 34px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 880px) {
  .detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-live { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 auto;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 18px 18px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: opacity .3s var(--ease-soft), transform .35s var(--ease);
  }
  .nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 13px 14px; font-size: 1rem; }
  .nav-toggle { display: grid; }
  .wrap { padding: 0 16px; }
  .brand { min-width: 0; font-size: 1.02rem; }
  .brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-actions { gap: 5px; margin-left: 4px; }
  #bb-account .btn { max-width: 104px; overflow: hidden; text-overflow: ellipsis; }
  .hero { min-height: 0; padding: 54px 0 44px; }
}
@media (max-width: 420px) {
  .brand > span:last-child { display: none; }
  #bb-sound { display: none; }
}

/* ============================================================
   Motion. On for everyone by default, whatever the system setting.
   "off" (the footer button) freezes it all; previews hold a finished frame.
   ============================================================ */
:root[data-motion="off"] :not(.pv, .pv *),
:root[data-motion="off"] :not(.pv, .pv *)::before,
:root[data-motion="off"] :not(.pv, .pv *)::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}
:root[data-motion="off"] { scroll-behavior: auto; }
:root[data-motion="off"] .reveal { opacity: 1; transform: none; }

.motion-toggle { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: .82rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.motion-toggle:hover { color: var(--text); }

/* ---------- Full screen games ---------- */
.fs-btn { gap: 6px; }
.bb-fs .site-header, .bb-fs .site-footer, .bb-fs footer, .bb-fs header.site-header, .bb-fs .back-link { display: none !important; }
.bb-fs .game-shell { padding: 14px 0 20px; min-height: 100vh; }
/* Full screen is for playing: drop the menus and the blurb, keep the live stats. */
.bb-fs .mode-bar, .bb-fs .game-head-main p, .bb-fs .game-head .glyph { display: none !important; }
.bb-fs .game-head { margin-bottom: 10px; }
.bb-fs .stat-row { margin-bottom: 12px; }
.bb-fs body { background: var(--bg); }
@media (max-width: 640px) { .fs-btn span { display: none; } }

/* ---------- How everyone answered ---------- */
.everyone { margin-top: 26px; text-align: left; }
.dist { margin-top: 16px; text-align: left; }
.dist-row { display: grid; grid-template-columns: minmax(64px, 34%) 1fr 42px; gap: 8px; align-items: center; font-size: .84rem;
  padding: 3px 0; animation: distIn .45s var(--ease) both; }
@keyframes distIn { from { opacity: 0; transform: translateX(-8px); } }
.dist-row .dl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.dist-row .db { height: 16px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.dist-row .db i { display: block; height: 100%; background: var(--grey, #6b6b74); border-radius: 4px; animation: distGrow .8s var(--ease) both; transform-origin: left; }
@keyframes distGrow { from { transform: scaleX(0); } }
.dist-row.on .db i { background: var(--tile, var(--green)); }
.dist-row.on .dl { color: var(--text); font-weight: 700; }
.dist-row .dp { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.dist-n { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.dist-q { font-weight: 700; font-size: .88rem; margin-top: 14px; }
.dist-you { font-size: .8rem; color: var(--muted); }

/* ============================================================
   Game polish: richer boards, stats and keys, shared by every game
   ============================================================ */
.board-area {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(130% 70% at 50% -10%, color-mix(in srgb, var(--tile, var(--pop)) 13%, transparent), transparent 62%),
    var(--surface);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.05);
  animation: boardIn .7s var(--spring) both;
}
.board-area::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1.2px);
  background-size: 18px 18px;
  -webkit-mask: radial-gradient(90% 70% at 50% 0%, #000, transparent 75%); mask: radial-gradient(90% 70% at 50% 0%, #000, transparent 75%);
}
@keyframes boardIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.stat-box { position: relative; overflow: hidden; }
.stat-box::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; opacity: .0;
  background: linear-gradient(90deg, transparent, var(--tile, var(--pop)), transparent); transition: opacity .4s var(--ease); }
.stat-box.hl::after, .stat-box:hover::after { opacity: .9; }
.stat-box.hl .v { color: color-mix(in srgb, var(--tile, var(--pop)) 70%, var(--text)); }
.game-head .glyph { box-shadow: 0 0 0 1px color-mix(in srgb, var(--tile) 40%, transparent), 0 8px 26px color-mix(in srgb, var(--tile) 35%, transparent); }
/* keys get a little depth and a real press */
.key { box-shadow: inset 0 -3px 0 rgba(0,0,0,.28), 0 1px 0 rgba(255,255,255,.04); }
.key:active, .key.press { transform: translateY(2px) scale(.94); box-shadow: inset 0 -1px 0 rgba(0,0,0,.28); }
.key.correct, .key.present { text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.key.correct { box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), 0 0 14px color-mix(in srgb, var(--green) 40%, transparent); }
/* letters stay white and crisp on coloured tiles */
.tile.correct, .tile.present, .pv-tile { text-shadow: 0 1px 2px rgba(0,0,0,.35); }

/* the slam banner (BB.fx.banner), the same drama as chess checkmate */
.fx-banner { position: fixed; z-index: 9996; pointer-events: none; text-align: center; transform: translate(-50%, -50%);
  font-family: var(--font-display); font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: #fff; white-space: nowrap;
  padding: .28em .5em; box-sizing: border-box; overflow: hidden; text-shadow: 0 4px 18px rgba(0,0,0,.45);
  background: linear-gradient(90deg, transparent, var(--fxb) 14%, var(--fxb) 86%, transparent); }
.fx-banner small { display: block; font-size: .36em; letter-spacing: .2em; opacity: .85; margin-top: .25em; font-weight: 700; }
