/* GlyphDuel — home motion layer (paired with fx-boot.js + fx/hero-field.js).
   Every rule is scoped to .fx-ready (JS present), so without JS the page is unchanged.
   .fx-reduced (prefers-reduced-motion, honoured live) stops FX only — never the game's own animations. */

:root { --fx-ease: cubic-bezier(.16,1,.3,1); --fx-flip: cubic-bezier(.45,.05,.2,1); }

/* ── WebGL field host ──────────────────────────────────────────── */
#screen-home { position: relative; isolation: isolate; }
.gd-fx {
  position: absolute; z-index: -1; pointer-events: none;
  left: 50%; width: 100vw; margin-left: -50vw;
  top: -120px; height: min(980px, 118vh);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 12%, #000 34%, #000 58%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 12%, #000 34%, #000 58%, transparent 100%);
}
.gd-fx-canvas { width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.6s var(--fx-ease); }
.gd-fx-canvas.is-on { opacity: .92; }
[data-theme="light"] .gd-fx-canvas.is-on { opacity: .95; }
[data-theme="light"] .gd-fx::after { display: none; } /* grain reads as stripes on a pale ground */
/* same as dark: the home card goes see-through so the field reads behind the hero */
[data-theme="light"].fx-field-on #screen-home.card { background: transparent; border-color: transparent;
  box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
/* film grain, confined to the hero stage (not the whole page, not during games) */
.gd-fx::after {
  content: ""; position: absolute; inset: -40px; opacity: .05; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: fx-grain 1.2s steps(5) infinite;
}
@keyframes fx-grain { 0%,100% { transform: translate(0,0) } 25% { transform: translate(-14px,9px) } 50% { transform: translate(10px,-12px) } 75% { transform: translate(-8px,-5px) } }
@media (max-width: 680px) { .gd-fx { top: -90px; height: 640px; } }
.fx-field-on #screen-home.card { background: color-mix(in oklab, var(--card) 38%, transparent); border-color: transparent; }

/* ── title: masked rise (transform only) + validated-row ticks ─── */
.fx-ready .gd-hero__title { text-shadow: none; }
.fx-w { display: inline-block; overflow: hidden; vertical-align: top; padding: .06em .04em .16em; margin: -.06em -.04em -.16em; }
.fx-w__i { display: inline-block; }
.fx-in .fx-w__i { animation: fx-rise 1.05s var(--fx-ease) both; animation-delay: calc(80ms + var(--i) * 60ms); }
@keyframes fx-rise { from { transform: translate3d(0, 110%, 0) rotate(3deg); } }
/* key phrase: one light sweep across the italic once it has risen (no extra geometry) */
.fx-in .fx-key {
  background: linear-gradient(100deg, currentColor 40%, #fff 50%, currentColor 60%) 120% 0 / 250% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: fx-sweep 1.4s var(--fx-ease) 1.1s both;
}
@keyframes fx-sweep { from { background-position: 120% 0; } to { background-position: -20% 0; } }

/* the rest of the hero is readable at once: only a short settle, no hidden CTA */
.fx-in ~ .gd-hero__sub, .fx-ready .gd-hero__proof { animation: fx-settle .8s var(--fx-ease) both; }
.fx-ready .gd-hero__proof { animation-delay: .25s; }
@keyframes fx-settle { from { transform: translate3d(0, 10px, 0); } }
.fx-ready .gd-hero__proof { position: relative; border-top-color: transparent; }
.fx-ready .gd-hero__proof::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--accent-line), var(--line) 40%, transparent);
  transform-origin: 0 50%; animation: fx-draw 1.4s var(--fx-ease) .5s both;
}
@keyframes fx-draw { from { transform: scaleX(0); } }

/* ── hero board: glass, 3D tilt, conic edge, live duel ─────────── */
.fx-ready .gd-hero__right { perspective: 1400px; }
.fx-ready .gd-hero__board {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%;
  position: relative; transition: none;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  background: linear-gradient(160deg, color-mix(in oklab, var(--ink-1) 97%, transparent), color-mix(in oklab, var(--ink-0) 98%, transparent));
  -webkit-backdrop-filter: blur(22px) saturate(1.1); backdrop-filter: blur(22px) saturate(1.1);
  animation: fx-board-in 1.2s var(--fx-ease) .15s both;
}
[data-theme="light"].fx-ready .gd-hero__board {
  background: linear-gradient(160deg, color-mix(in oklab, #fff 97%, transparent), color-mix(in oklab, var(--card) 96%, transparent));
}
.fx-ready .gd-hero__board:hover { transform: rotateX(var(--rx)) rotateY(var(--ry)); }
@keyframes fx-board-in { from { opacity: 0; transform: translate3d(0, 36px, 0) rotateX(14deg); } }
.fx-ready .gd-hero__board::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--gx) var(--gy), color-mix(in oklab, var(--accent) 12%, transparent), transparent 55%);
}
/* edge light: a conic gradient on an oversized square that ROTATES (transform, composited),
   clipped to a 1px ring by the ::before mask. Animating a registered custom property instead
   (--fx-ang) forced a style recalc every frame (~360 recalcs in 6 s on mobile). */
.fx-ready .gd-hero__board .fx-edge { position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; overflow: hidden;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: .7; }
.fx-edge::before { content: ""; position: absolute; left: 50%; top: 50%; width: 150%; aspect-ratio: 1; translate: -50% -50%;
  background: conic-gradient(transparent 0 64%, var(--accent) 74%, color-mix(in oklab, var(--ok) 70%, transparent) 82%, transparent 92%);
  animation: fx-spin 9s linear infinite; }
/* the edge light races once when a word is found */
.fx-ready .gd-hero__board.is-won .fx-edge { opacity: 1; }
.fx-ready .gd-hero__board.is-won .fx-edge::before { animation: fx-spin 1.1s var(--fx-ease) 1, fx-spin 9s linear 1.1s infinite; }
@keyframes fx-spin { to { rotate: 360deg; } }

.fx-ready .hr-tile { transition: background-color .01s, border-color .01s; }
.fx-ready .hr-tile.fx-typed { border-color: var(--accent-line); transform: scale(1.06); transition: transform .12s var(--fx-ease); }
.fx-ready .hr-tile.fx-flip { animation: fx-flip .5s var(--fx-flip) both; }
@keyframes fx-flip { 0% { transform: rotateX(0) } 50% { transform: rotateX(90deg) } 100% { transform: rotateX(0) } }
.fx-ready .gd-hero__mini-grid .hr-tile.fx-winrow { animation: fx-win .7s cubic-bezier(.34,1.56,.64,1) both; animation-delay: calc(var(--c, 0) * 60ms); }
.fx-winrow:nth-child(5n+1) { --c: 0 } .fx-winrow:nth-child(5n+2) { --c: 1 } .fx-winrow:nth-child(5n+3) { --c: 2 } .fx-winrow:nth-child(5n+4) { --c: 3 } .fx-winrow:nth-child(5n) { --c: 4 }
@keyframes fx-win { 0%,100% { transform: none; } 45% { transform: translateY(-8px) scale(1.07); box-shadow: 0 12px 26px -8px color-mix(in oklab, var(--ok) 75%, transparent); } }

.fx-ready .gd-hero__score { position: relative; }
.fx-live .gd-hero__bar-fill { transition: width 1s var(--fx-ease); }
.fx-pop {
  position: absolute; right: 26px; top: -6px; font-family: var(--font-display); font-size: 28px; color: var(--accent);
  text-shadow: 0 0 22px color-mix(in oklab, var(--accent) 70%, transparent);
  opacity: 0; transform: translateY(8px) scale(.7); pointer-events: none;
}
.fx-pop.is-on { animation: fx-pop 1.6s var(--fx-ease) both; }
@keyframes fx-pop { 0% { opacity: 0; transform: translateY(8px) scale(.7) } 18% { opacity: 1; transform: translateY(-6px) scale(1.08) } 70% { opacity: 1; transform: translateY(-14px) scale(1) } 100% { opacity: 0; transform: translateY(-22px) scale(1) } }
.gd-hero__timer.is-low { color: var(--warn); text-shadow: 0 0 14px color-mix(in oklab, var(--warn) 55%, transparent); }

/* ── mobile: the duel is the product — show a compact live board under the CTAs ── */
@media (max-width: 680px) {
  /* order: title, pitch, CTAs, then the live duel, then the numbers */
  .fx-js .gd-hero { gap: 0; }
  .fx-js .gd-hero__left { display: contents; }
  .fx-js .gd-hero__eyebrow { order: 1; } .fx-js .gd-hero__title { order: 2; } .fx-js .gd-hero__sub { order: 3; }
  .fx-js .gd-hero__cta { order: 4; margin-bottom: 20px; }
  .fx-js .gd-hero__right { display: block; order: 5; perspective: none; margin-bottom: 22px; }
  .fx-js .gd-hero__proof { order: 6; }
  .fx-js .gd-hero__board { padding: 14px; }
  .fx-js .gd-hero__board-hd { margin-bottom: 10px; padding-bottom: 8px; }
  .fx-js .gd-hero__mini-grid .hr-tile { font-size: 15px; }
  .fx-js .gd-hero__score { margin-top: 10px; padding-top: 10px; }
  .fx-js .gd-hero__proof { gap: 12px 20px; }
  .fx-pop { font-size: 22px; right: 18px; }
}

/* ── buttons: magnetic + light sweep on hover, press everywhere ── */
.fx-mag { --mx: 0px; --my: 0px; --lx: 50%; --ly: 50%; position: relative; overflow: hidden;
  transform: translate3d(var(--mx), var(--my), 0); transition: transform .35s var(--fx-ease), box-shadow .3s, background .3s; }
.fx-mag::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(140px circle at var(--lx) var(--ly), rgba(255,255,255,.32), transparent 60%); }
.fx-mag:hover::after { opacity: 1; }
.fx-mag:active { transform: translate3d(var(--mx), var(--my), 0) scale(.97); transition-duration: .08s; }
.fx-mag:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.fx-ready .gd-hero__btn-lg { box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 60%, transparent), 0 14px 40px -12px color-mix(in oklab, var(--accent) 75%, transparent); }

/* ── sections below: masked reveal; clip removed once shown ────── */
/* the base state stays geometrically present (IntersectionObserver ignores fully clipped targets) */
.fx-ready [data-reveal].is-visible { animation: fx-unmask 1.1s var(--fx-ease) both; }
@keyframes fx-unmask { from { clip-path: inset(0 0 92% 0 round 14px); } to { clip-path: inset(0 0 0 0 round 14px); } }
.fx-ready [data-reveal]:focus-within { clip-path: none; opacity: 1; transform: none; }

/* ── reduced motion: FX only, final states ─────────────────────── */
.fx-reduced .gd-fx { display: none; }
.fx-reduced .fx-w__i, .fx-reduced .fx-key, .fx-reduced .gd-hero__board, .fx-reduced .gd-hero__board::before, .fx-reduced .fx-edge::before,
.fx-reduced .gd-hero__proof, .fx-reduced .gd-hero__proof::before, .fx-reduced .gd-hero__sub,
.fx-reduced .hr-tile, .fx-reduced .fx-pop, .fx-reduced .gd-hero__bar-fill { animation: none !important; transition: none !important; }
.fx-reduced .gd-hero__board { transform: none !important; }
.fx-reduced .fx-mag { transform: none !important; }
.fx-reduced [data-reveal] { clip-path: none !important; animation: none !important; }
.fx-static .fx-w__i, .fx-static .fx-key { animation: none; }

/* ── outro: full-bleed finale that closes the home ─────────────── */
.gd-outro { position: relative; margin: 72px 0 40px; padding: 0 0 8px; text-align: center; }
.gd-outro__rail {
  position: relative; left: 50%; width: 100vw; margin-left: -50vw; overflow: hidden;
  display: grid; gap: 14px; padding: 6px 0 44px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.gd-outro__track { display: flex; width: max-content; }
.gd-outro__run { display: flex; gap: 34px; padding-right: 34px; animation: gd-rail 70s linear infinite; }
.gd-outro__track--rev .gd-outro__run { animation-duration: 84s; animation-direction: reverse; }
@keyframes gd-rail { to { transform: translate3d(-100%, 0, 0); } }
.gd-outro__rail:hover .gd-outro__run { animation-play-state: paused; }
.gd-outro__word { display: flex; gap: 5px; }
.gd-outro__tile {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 8px;
  font-family: var(--font-display); font-size: 21px; font-weight: 700; color: #fff;
  border: 1px solid var(--line); background: var(--ink-1); color: var(--ink);
  transition: background-color .01s .25s, border-color .01s .25s, color .01s .25s;
}
.gd-outro__tile.correct { --c: var(--ok); } .gd-outro__tile.present { --c: var(--warn); } .gd-outro__tile.absent { --c: var(--line); }
.gd-outro.is-in .gd-outro__tile { background: color-mix(in oklab, var(--c) 78%, var(--ink-0)); border-color: var(--c); color: #fff;
  animation: fx-flip .5s var(--fx-flip) both; animation-delay: calc(var(--d) * 90ms + .2s); transition-delay: calc(var(--d) * 90ms + .45s); }
.gd-outro__tile.absent { opacity: .75; }
[data-theme="light"] .gd-outro.is-in .gd-outro__tile { background: color-mix(in oklab, var(--c) 88%, #fff); }
.gd-outro__track--rev .gd-outro__tile { width: 34px; height: 34px; font-size: 15px; border-radius: 6px; opacity: .7; }
.gd-outro__track--rev .gd-outro__word { gap: 4px; }

.gd-outro__body { position: relative; max-width: 980px; margin: 0 auto; padding: 0 20px; }
.gd-outro__eyebrow { color: var(--muted); letter-spacing: .14em; }
.gd-outro__title { margin: 14px 0 16px; font-family: var(--font-display); font-weight: 800; line-height: .98;
  font-size: clamp(36px, 5.6vw, 80px); text-wrap: balance; letter-spacing: -.02em;
  background: none; -webkit-text-fill-color: currentColor; color: var(--ink); }
.gd-outro__title em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent); -webkit-text-fill-color: var(--accent); letter-spacing: 0; }
.gd-outro__sub { color: var(--muted); font-size: 17px; margin: 0 auto 28px; max-width: 34ch; }
.gd-outro__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.gd-outro::before { content: ""; position: absolute; left: 50%; bottom: -40px; width: min(900px, 90vw); height: 420px; transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in oklab, var(--accent) 16%, transparent), transparent); pointer-events: none; z-index: -1; }
@media (max-width: 680px) {
  .gd-outro { margin-top: 48px; }
  .gd-outro__tile { width: 36px; height: 36px; font-size: 16px; }
  .gd-outro__track--rev .gd-outro__tile { width: 28px; height: 28px; font-size: 12px; }
  .gd-outro__run { gap: 22px; padding-right: 22px; }
  .gd-outro__cta > * { flex: 1 1 100%; width: 100% !important; }
}
.fx-reduced .gd-outro__run, .fx-reduced .gd-outro__tile { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .gd-outro__run { animation: none; } }

/* ── solo panel ────────────────────────────────────────────────── */
/* daily: a real 6×5 grid replaces the empty stat boxes; the user's own grid once played */
.gd-solo__side.gd-daily { display: flex; flex-direction: column; gap: 14px; align-self: center; justify-self: end; width: min(100%, 330px);
  padding: 18px; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(160deg, color-mix(in oklab, var(--ink-1) 96%, transparent), var(--ink-0));
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.04); }
[data-theme="light"] .gd-solo__side.gd-daily { background: #fff; box-shadow: 0 24px 50px -28px rgba(30,40,70,.3); }
.gd-daily__hd, .gd-daily__foot { display: flex; justify-content: space-between; align-items: baseline; }
.gd-daily__num { color: var(--accent) !important; }
.gd-daily__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; perspective: 800px; }
.gd-daily__t { aspect-ratio: 1; border-radius: 7px; border: 1px solid var(--line); display: grid; place-items: center;
  font-family: var(--font-display); font-size: clamp(14px, 1.5vw, 20px); color: #fff; background: color-mix(in oklab, var(--ink-1) 60%, transparent); }
.gd-daily__t.is-correct { background: var(--correct-bg); border-color: var(--correct-line); color: var(--ink); }
.gd-daily__t.is-present { background: var(--present-bg); border-color: var(--present-line); color: var(--ink); }
.gd-daily__t.is-absent  { background: var(--absent-bg); border-color: var(--absent-line); color: var(--ink); }
.gd-daily__t.is-mystery { color: var(--accent); border-color: var(--accent-line); background: color-mix(in oklab, var(--accent) 8%, transparent); }
[data-theme="light"] .gd-daily__t:not([class*="is-"]) { background: var(--card); }
/* entrance: a diagonal wave sweeps the board (transform + opacity only, composited) */
/* no permanent will-change / backface-visibility: on real GPUs they rasterise each tile as a
   layer and clip its anti-aliased rounded border (jagged corners on the green tiles) */
.gd-daily__t { position: relative; }
.fx-ready .gd-solo.is-in .gd-daily__t { /* fill backwards only: once landed the tile drops its animation (and its GPU layer, which clipped the
   anti-aliased right/bottom border on real GPUs) */
  animation: gd-wave .8s cubic-bezier(.22,1,.36,1) backwards; animation-delay: calc((var(--r) + var(--c)) * 45ms); }
@keyframes gd-wave { from { transform: perspective(600px) rotateX(-80deg) translate3d(0, -6px, 0); opacity: 0; } to { transform: none; opacity: 1; } }
/* the ? row: a slow float, and a glow that fades in and out on its own layer (no box-shadow repaint) */
.gd-daily__t.is-mystery::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 20px 0 color-mix(in oklab, var(--accent) 55%, transparent), inset 0 0 12px color-mix(in oklab, var(--accent) 25%, transparent);
  opacity: 0; }
.fx-ready .gd-solo.is-in .gd-daily__t.is-mystery { animation: gd-wave .8s cubic-bezier(.22,1,.36,1) both, gd-float 3.2s cubic-bezier(.45,0,.55,1) infinite;
  animation-delay: calc(var(--c) * 45ms), calc(1s + var(--c) * 220ms); }
.fx-ready .gd-solo.is-in .gd-daily__t.is-mystery::after { animation: gd-glow 3.2s cubic-bezier(.45,0,.55,1) infinite; animation-delay: calc(1s + var(--c) * 220ms); }
@keyframes gd-float { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -3px, 0); } }
@keyframes gd-glow { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
.gd-daily__clock { font-family: var(--font-mono); font-size: 1.15rem; letter-spacing: .06em; color: var(--ink); font-variant-numeric: tabular-nums; }
.gd-solo { transition: box-shadow .4s; }
.gd-solo::after { content: ""; position: absolute; inset: auto -10% -60% 30%; height: 120%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--ok) 10%, transparent), transparent); z-index: 0; }

/* free mode: a slot-machine word that rerolls on hover */
.solo-free-strip { position: relative; overflow: hidden; }
.gd-free__dice { display: flex; gap: 5px; }
.gd-free__dice span { width: 34px; height: 34px; border-radius: 7px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 16px; color: var(--ink); background: var(--card); border: 1px solid var(--line);
  transition: transform .25s var(--fx-ease), border-color .25s, color .25s; }
.gd-free__dice span.is-spin { color: var(--muted); transform: translateY(-2px); filter: blur(.4px); }
.gd-free__dice span.is-land { border-color: var(--accent); color: var(--accent); transform: scale(1.1); }
.solo-free-strip:hover { border-color: var(--accent-line); }
.solo-free-strip::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: linear-gradient(100deg, transparent 30%, color-mix(in oklab, var(--accent) 10%, transparent) 50%, transparent 70%) -100% 0 / 200% 100% no-repeat; }
.solo-free-strip:hover::before { opacity: 1; animation: gd-shine 1.2s var(--fx-ease); }
@keyframes gd-shine { to { background-position: 200% 0; } }
.solo-free-strip { display: grid; grid-template-columns: auto 1fr auto; align-items: center; }

/* vs bot: each opponent gets its own colour, a difficulty meter and a lift on hover */
.gd-bot__card--easy { --bot: #60a5fa; } .gd-bot__card--medium { --bot: #a78bfa; } .gd-bot__card--hard { --bot: #f472b6; }
.gd-bot__card { position: relative; overflow: hidden; isolation: isolate; transition: transform .35s var(--fx-ease), border-color .25s, box-shadow .35s; }
.gd-bot__card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .0; transition: opacity .35s;
  background: radial-gradient(420px circle at 0% 0%, color-mix(in oklab, var(--bot) 22%, transparent), transparent 60%); }
.gd-bot__card:hover::before, .bot-card-radio:checked + .gd-bot__card::before { opacity: 1; }
.gd-bot__card:hover { transform: translateY(-4px); border-color: color-mix(in oklab, var(--bot) 60%, transparent);
  box-shadow: 0 20px 40px -20px color-mix(in oklab, var(--bot) 60%, transparent); }
.bot-card-radio:checked + .gd-bot__card { border-color: var(--bot); background: var(--card);
  box-shadow: inset 0 0 0 1px var(--bot), 0 18px 40px -18px color-mix(in oklab, var(--bot) 70%, transparent); }
.bot-card-radio:checked + .gd-bot__card .gd-bot__diff, .gd-bot__card .gd-bot__diff { color: var(--bot); }
.gd-bot__avatar { transition: transform .45s var(--fx-ease); box-shadow: 0 8px 22px -8px var(--bot); }
.gd-bot__card:hover .gd-bot__avatar { transform: rotate(-8deg) scale(1.08); }
.gd-bot__meter { position: absolute; top: 22px; right: 22px; display: flex; gap: 4px; align-items: flex-end; }
.gd-bot__meter i { width: 6px; border-radius: 2px; background: var(--line); }
.gd-bot__meter i:nth-child(1) { height: 8px; } .gd-bot__meter i:nth-child(2) { height: 13px; } .gd-bot__meter i:nth-child(3) { height: 18px; }
.gd-bot__meter[data-lvl="1"] i:nth-child(-n+1), .gd-bot__meter[data-lvl="2"] i:nth-child(-n+2), .gd-bot__meter[data-lvl="3"] i { background: var(--bot); box-shadow: 0 0 8px -1px var(--bot); }

@media (max-width: 680px) {
  .solo-free-strip { grid-template-columns: 1fr; justify-items: start; }
  .gd-free__dice span { width: 30px; height: 30px; font-size: 14px; }
}
.fx-reduced .gd-daily__t, .fx-reduced .gd-daily__t::after, .fx-reduced .solo-free-strip::before, .fx-reduced .gd-bot__avatar * { animation: none !important; }

.solo-length-strip__label { white-space: nowrap; }
.fx-ready #daily-countdown { display: none !important; } /* the live clock in the grid card replaces it */

/* ── how to play: an editorial rulebook in three cards ─────────── */
.fx-ready .how-to-play { margin-top: 64px; border-top: 0; padding-top: 0; }
.fx-ready .how-to-play > summary { font-family: var(--font-display); font-size: clamp(26px, 3vw, 40px); font-weight: 400; text-transform: none;
  letter-spacing: -.01em; color: var(--ink); gap: 14px; margin-bottom: 22px; }
/* toggle: a drawn plus (two bars, pixel-centred) in a filled disc; turns into × when open */
.fx-ready .how-to-play > summary { align-items: center; line-height: 1; }
.fx-ready .how-to-play > summary::-webkit-details-marker { display: none; }
/* toggle: a ghost button like "Partie rapide" — the box stays put, only the + turns into × */
.fx-ready .how-to-play > summary { position: relative; }
.fx-ready .how-to-play > summary::before {
  content: ""; flex: none; width: 44px; height: 44px; border-radius: 12px; box-sizing: border-box;
  border: 1px solid var(--line); background: var(--card-hi);
  transition: background-color .3s, box-shadow .3s, border-color .3s, scale .12s; }
.fx-ready .how-to-play > summary::after {
  content: ""; position: absolute; left: 0; top: 50%; width: 44px; height: 44px; margin-top: -22px; pointer-events: none;
  background:
    linear-gradient(var(--ink-soft), var(--ink-soft)) center / 14px 2px no-repeat,
    linear-gradient(var(--ink-soft), var(--ink-soft)) center / 2px 14px no-repeat;
  transition: transform .45s var(--fx-ease); }
.fx-ready .how-to-play > summary:hover::before { background-color: var(--surface);
  background-image: radial-gradient(40px circle at 50% 25%, rgba(255,255,255,.12), transparent 70%);
  border-color: color-mix(in oklab, var(--ink) 22%, var(--line)); }
.fx-ready .how-to-play > summary:hover::after {
  background:
    linear-gradient(var(--ink), var(--ink)) center / 14px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 14px no-repeat; }
.fx-ready .how-to-play > summary:active::before { scale: .94; }
.fx-ready .how-to-play[open] > summary::after { transform: rotate(135deg); }
.fx-reduced .how-to-play > summary::after { transition: none; }
.fx-ready .how-to-play > summary:focus-visible { outline: none; }
.fx-ready .how-to-play > summary:focus-visible::before { outline: 2px solid var(--accent); outline-offset: 3px; }
.fx-ready .rules-body { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; margin: 0; font-size: .92rem; }
.gd-rule { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 16px; padding: 26px 24px 24px;
  border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(170deg, var(--surface), var(--ink-0)); }
[data-theme="light"] .gd-rule { background: #fff; }
.gd-rule > p:first-of-type { color: var(--ink-soft); line-height: 1.55; }
.gd-rule__n { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; color: var(--accent);
  display: flex; align-items: center; gap: 10px; }
.gd-rule__n::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--accent-line), transparent); }
/* 01 · colours: big tiles that flip in */
.gd-rule .rules-colors { gap: 12px; }
.gd-rule .rules-colors li { gap: 14px; color: var(--ink); }
.gd-rule .rc { width: 46px; height: 46px; border-radius: 9px; font-family: var(--font-display); font-size: 20px; border-width: 1px; }
.fx-ready .how-to-play.is-in .gd-rule .rc { animation: fx-flip .6s var(--fx-flip) both; }
.fx-ready .how-to-play.is-in .rules-colors li:nth-child(2) .rc { animation-delay: .15s; }
.fx-ready .how-to-play.is-in .rules-colors li:nth-child(3) .rc { animation-delay: .3s; }
/* 02 · scoring: the badges become a descending bar chart */
.gd-rule .rules-score-grid { grid-template-columns: 1fr auto; gap: 7px 12px; }
.gd-rule .rs-badge { justify-self: stretch; text-align: left; padding: 6px 10px; border-radius: 6px; font-family: var(--font-mono); font-size: .74rem;
  color: #04121a; min-width: 0; width: var(--w); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), color-mix(in oklab, var(--accent) 55%, var(--ok))); }
.gd-rule .rs-badge:nth-child(1) { --w: 100%; } .gd-rule .rs-badge:nth-child(3) { --w: 84%; } .gd-rule .rs-badge:nth-child(5) { --w: 68%; }
.gd-rule .rs-badge:nth-child(7) { --w: 52%; opacity: .9; } .gd-rule .rs-badge:nth-child(9) { --w: 38%; opacity: .8; } .gd-rule .rs-badge:nth-child(11) { --w: 26%; opacity: .7; }
.gd-rule .rules-score-grid > span:not(.rs-badge) { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.fx-ready .how-to-play.is-in .gd-rule .rs-badge { animation: gd-bar .9s var(--fx-ease) both; }
.gd-rule .rs-badge:nth-child(3) { animation-delay: .08s !important; } .gd-rule .rs-badge:nth-child(5) { animation-delay: .16s !important; }
.gd-rule .rs-badge:nth-child(7) { animation-delay: .24s !important; } .gd-rule .rs-badge:nth-child(9) { animation-delay: .32s !important; }
.gd-rule .rs-badge:nth-child(11) { animation-delay: .4s !important; }
@keyframes gd-bar { from { transform: scaleX(0); } }
/* 03 · end of round + win condition; the target score set huge */
.gd-rule--3 p { color: var(--ink-soft); line-height: 1.55; }
.gd-rule--3 p strong { color: var(--ink); }
.gd-rule--3 p:first-of-type strong { color: var(--warn); }
.gd-rule--3 p:last-of-type { margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line); }
.gd-rule--3 p:last-of-type strong:last-child { display: block; margin: 8px 0 0; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(34px, 3.4vw, 52px); line-height: 1; color: var(--accent); white-space: nowrap; }
.fx-ready .how-to-play.is-in .gd-rule--3 p:last-of-type strong:last-child { animation: fx-rise .9s var(--fx-ease) .2s both; }
.gd-rule { transition: transform .4s var(--fx-ease), border-color .3s; }
.gd-rule:hover { transform: translateY(-3px); border-color: var(--accent-line); }

/* about blurb: quieter frame, readable copy, GLYPH laid out as a word */
.fx-ready .home-about-blurb { margin-top: 18px; padding: 22px 24px; border-radius: 16px; }
.fx-ready .home-about-blurb-inner { flex-direction: column; gap: 14px; }
.fx-ready .home-about-tiles { flex-direction: row; gap: 5px; }
.fx-ready .hab-tile { width: 30px; height: 30px; font-size: .85rem; border-radius: 6px; }
.fx-ready .home-about-text { font-size: .9rem; color: var(--ink-soft); max-width: 90ch; }

@media (max-width: 980px) { .fx-ready .rules-body { grid-template-columns: 1fr; } }
.fx-reduced .gd-rule .rc, .fx-reduced .gd-rule .rs-badge, .fx-reduced .gd-rule--3 p strong { animation: none !important; }

/* ── page end: tile stacks in the side gutters ─────────────────── */
main { position: relative; }
.gd-stack { position: absolute; bottom: 36px; z-index: 0; pointer-events: none;
  display: flex; flex-direction: column; gap: 8px; perspective: 900px; }
/* centred in each viewport gutter (content card is 1152px wide, centred) */
.gd-stack--l { left: calc(50% - 50vw + (50vw - 576px) / 2); translate: -50% 0; rotate: -4deg; }
.gd-stack--r { left: calc(50% + 576px + (50vw - 576px) / 2); translate: -50% 0; rotate: 4deg; }
.gd-stack__row { display: flex; gap: 8px; }
.gd-stack__t { width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 22px; color: var(--ink);
  border: 1px solid var(--line); background: var(--ink-1);
  box-shadow: 0 14px 28px -16px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.05); }
.gd-stack__t.is-correct { background: var(--correct-bg); border-color: var(--correct-line); }
.gd-stack__t.is-present { background: var(--present-bg); border-color: var(--present-line); }
.gd-stack__t.is-absent  { background: var(--absent-bg);  border-color: var(--absent-line); color: var(--muted); }
/* older guesses sit further back; the solved row is lit */
.gd-stack__row { opacity: calc(.35 + var(--r) * .2); }
.gd-stack__row:last-child { opacity: 1; }
.gd-stack__row:last-child .gd-stack__t { box-shadow: 0 0 0 1px var(--correct-line), 0 18px 36px -14px color-mix(in oklab, var(--ok) 70%, transparent); }
[data-theme="light"] .gd-stack__t { box-shadow: 0 12px 24px -16px rgba(30,40,70,.4); }
/* entrance: rows fall into place from the top, then each tile flips to its colour */
.fx-ready .gd-stack__row { transform: translate3d(0, -40px, 0); opacity: 0; transition: transform .8s var(--fx-ease), opacity .6s; transition-delay: calc(var(--r) * 140ms); }
.fx-ready .gd-stacks-in .gd-stack__row { transform: none; opacity: calc(.35 + var(--r) * .2); }
.fx-ready .gd-stacks-in .gd-stack__row:last-child { opacity: 1; }
.fx-ready .gd-stacks-in .gd-stack__t { animation: fx-flip .55s var(--fx-flip) both; animation-delay: calc(var(--r) * 140ms + var(--c) * 70ms + .35s); }
.gd-stacks-off .gd-stack { display: none; }
/* gutters only: never over the content column */
@media (max-width: 2040px) { .gd-stack__t { width: 40px; height: 40px; font-size: 17px; border-radius: 8px; } .gd-stack, .gd-stack__row { gap: 6px; } }
@media (max-width: 1700px) { .gd-stack { display: none; } }
.fx-reduced .gd-stack__row { transition: none !important; transform: none !important; opacity: calc(.35 + var(--r) * .2) !important; }
.fx-reduced .gd-stack__t { animation: none !important; }

/* bot avatars: hand-drawn SVG faces, tinted by each bot's colour, idle micro-motion */
.gd-bot__avatar { width: 56px; height: 56px; border-radius: 14px; color: var(--bot); background: color-mix(in oklab, var(--bot) 12%, var(--ink-0)) !important;
  border: 1px solid color-mix(in oklab, var(--bot) 45%, transparent); padding: 6px; }
[data-theme="light"] .gd-bot__avatar { background: color-mix(in oklab, var(--bot) 10%, #fff) !important; }
.gd-bot__avatar svg { width: 100%; height: 100%; display: block; overflow: visible; }
/* SVG transforms are not composited: each frame costs a style recalc + layout of the page,
   even off-screen. So bots only come alive on the card you point at, or the one you picked. */
:is(.gd-bot__card:hover, .bot-card-radio:checked + .gd-bot__card) .bot-eyes { transform-origin: 24px 25px; animation: bot-blink 4.5s infinite; }
@keyframes bot-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
:is(.gd-bot__card:hover, .bot-card-radio:checked + .gd-bot__card) .bot-ant { animation: bot-ant 2.4s ease-in-out infinite; }
@keyframes bot-ant { 50% { opacity: .35; } }
:is(.gd-bot__card:hover, .bot-card-radio:checked + .gd-bot__card) .bot-scan { animation: bot-scan 2.2s cubic-bezier(.45,0,.55,1) infinite alternate; }
@keyframes bot-scan { to { transform: translateX(14px); } }
:is(.gd-bot__card:hover, .bot-card-radio:checked + .gd-bot__card) .bot-core { transform-origin: 24px 22px; animation: bot-core 2.8s ease-in-out infinite; }
@keyframes bot-core { 50% { transform: scale(1.18); opacity: .75; } }
.gd-bot__card:hover .gd-bot__avatar .bot-scan { animation-duration: .7s; }
.gd-bot__card:hover .gd-bot__avatar .bot-core { animation-duration: 1s; }

/* the site-wide light "CRT" scanlines sit above everything and stripe the 3D field: keep them off the home hero */
[data-theme="light"].fx-field-on body::before { display: none; }

/* ── multiplayer tab ───────────────────────────────────────────── */
/* live room preview: seats, word slots and round clock follow the form */
.gd-room { position: relative; overflow: hidden; padding: 22px; border-radius: var(--r-l); border: 1px solid var(--accent-line);
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in oklab, var(--accent) 12%, transparent), transparent 60%), linear-gradient(170deg, var(--ink-1), var(--ink-0));
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); display: grid; gap: 18px; }
[data-theme="light"] .gd-room { background: radial-gradient(120% 90% at 100% 0%, color-mix(in oklab, var(--accent) 10%, transparent), transparent 60%), #fff; box-shadow: 0 24px 50px -28px rgba(30,40,70,.35); }
.gd-room.is-pulse { animation: gd-room-pulse .6s var(--fx-ease); }
@keyframes gd-room-pulse { 40% { box-shadow: 0 0 0 1px var(--accent), 0 0 40px -6px color-mix(in oklab, var(--accent) 60%, transparent); } }
.gd-room__hd { display: flex; justify-content: space-between; align-items: center; }
.gd-room__code { color: var(--accent) !important; letter-spacing: .3em !important; }
.gd-room__seats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gd-room__seat { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0;
  transition: opacity .4s var(--fx-ease), transform .5s var(--fx-ease); }
.gd-room__seat b { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 400; font-size: 18px;
  color: var(--pc); border: 1.5px dashed color-mix(in oklab, var(--pc) 60%, transparent); background: color-mix(in oklab, var(--pc) 8%, transparent); }
.gd-room__seat.is-you b { border-style: solid; color: #04121a; background: var(--pc); box-shadow: 0 0 22px -4px var(--pc); }
.gd-room__seat.is-open:not(.is-you) b { animation: gd-seat 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * .3s); }
@keyframes gd-seat { 50% { transform: scale(1.06); border-color: var(--pc); } }
.gd-room__seat em { font-style: normal; font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; color: var(--muted);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-room__seat.is-you em { color: var(--ink); }
.gd-room__seat.is-off { opacity: .18; transform: scale(.86); }
.gd-room__word { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 6px; }
.gd-room__word span { aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center; font-family: var(--font-display); font-size: 18px;
  color: transparent; border: 1px solid var(--line); background: color-mix(in oklab, var(--ink-1) 70%, transparent);
  animation: gd-slot .5s var(--fx-ease) both; animation-delay: calc(var(--i) * 45ms); }
[data-theme="light"] .gd-room__word span { background: var(--card-hi); }
@keyframes gd-slot { from { transform: translate3d(0, 10px, 0) scale(.8); opacity: 0; } }
.gd-room__meta { display: flex; align-items: center; gap: 14px; }
.gd-room__meta > div { display: grid; gap: 2px; }
.gd-room__meta strong { font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--ink); line-height: 1; }
.gd-room__ring { width: 44px; height: 44px; rotate: -90deg; flex: none; }
.gd-room__ring circle { fill: none; stroke-width: 3.5; }
.gd-room__ring-bg { stroke: var(--line); }
.gd-room__ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray .6s var(--fx-ease); }
.gd-room.is-unlimited .gd-room__ring-fg { stroke-dasharray: 18 7 !important; animation: gd-ring 6s linear infinite; }
@keyframes gd-ring { to { stroke-dashoffset: -100; } }

/* room code as five tiles (the real input sits on top, transparent) */
.gd-code { position: relative; }
.gd-code__slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; pointer-events: none; }
.gd-code__slots i { aspect-ratio: 1; max-height: 58px; border-radius: 10px; display: grid; place-items: center; font-style: normal;
  font-family: var(--font-display); font-size: 24px; color: var(--ink); border: 1px solid var(--line); background: var(--card);
  transition: border-color .2s, background-color .2s; }
.gd-code__slots i.is-cur { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent); }
.gd-code__slots i.is-cur:empty::after { content: ""; width: 2px; height: 40%; background: var(--accent); animation: gd-caret 1s steps(1) infinite; }
@keyframes gd-caret { 50% { opacity: 0; } }
.gd-code__slots i.is-filled { border-color: var(--accent-line); }
.gd-code__slots i.is-pop { animation: gd-pop .28s cubic-bezier(.34,1.56,.64,1); }
@keyframes gd-pop { from { transform: scale(.82); } }
.gd-code.is-full .gd-code__slots i { background: var(--correct-bg); border-color: var(--correct-line); animation: fx-flip .5s var(--fx-flip) both; }
.gd-code.is-full .gd-code__slots i:nth-child(2) { animation-delay: .06s; } .gd-code.is-full .gd-code__slots i:nth-child(3) { animation-delay: .12s; }
.gd-code.is-full .gd-code__slots i:nth-child(4) { animation-delay: .18s; } .gd-code.is-full .gd-code__slots i:nth-child(5) { animation-delay: .24s; }
.fx-ready .gd-code input.input--code { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; max-height: 58px; opacity: .001;
  font-size: 16px; caret-color: transparent; }
.fx-ready .gd-code > span:first-child { margin-bottom: 6px; }

/* create card: a touch more editorial */
.fx-ready .gd-multi__title { font-size: clamp(28px, 3vw, 42px); }
.fx-ready .gd-multi__create { border-color: var(--line); }
@media (max-width: 900px) { .gd-room__seat b { width: 40px; height: 40px; font-size: 16px; } }
@media (max-width: 480px) { .gd-room__seat:not(.is-you) em { visibility: hidden; } }
.fx-reduced .gd-room, .fx-reduced .gd-room *, .fx-reduced .gd-code__slots i { animation: none !important; }

/* light: the darker letters must not run under the stats / waiting-rooms rows below the hero */
[data-theme="light"] .gd-fx { -webkit-mask-image: linear-gradient(180deg, transparent 12%, #000 32%, #000 52%, transparent 78%);
  mask-image: linear-gradient(180deg, transparent 12%, #000 32%, #000 52%, transparent 78%); }

/* perf: below-the-fold sections skip style/layout/paint until they approach the viewport
   (their infinite rails and flips cost main-thread time on load otherwise) */
.fx-js .gd-outro, .fx-js .how-to-play, .fx-js .home-about-blurb { content-visibility: auto; contain-intrinsic-size: auto 600px; }

/* ── screen transitions: a wave of tiles flips away to reveal the new screen ── */
.fx-wipe { position: fixed; inset: 0; z-index: 900; pointer-events: none; display: grid;
  grid-template-columns: repeat(var(--cols), 1fr); grid-template-rows: repeat(var(--rows), 1fr);
  gap: 3px; padding: 3px; visibility: hidden; }
.fx-wipe.is-on { visibility: visible; }
.fx-wipe i { border-radius: 8px; background: var(--ink-1); border: 1px solid color-mix(in oklab, var(--accent) 22%, transparent);
  backface-visibility: hidden; opacity: 0; }
[data-theme="light"] .fx-wipe i { background: var(--cell-bg); border-color: var(--cell-line); }
.fx-wipe i.is-ok { background: var(--correct-bg, #1f8a4c); border-color: var(--correct-line, #2fb866); }
.fx-wipe i.is-ac { background: color-mix(in oklab, var(--accent) 30%, var(--ink-1)); border-color: var(--accent); }
[data-theme="light"] .fx-wipe i.is-ac { background: color-mix(in oklab, var(--accent) 22%, #fff); }
/* delay follows the diagonal; --dir flips the origin corner */
.fx-wipe.is-on i {
  --k: calc((var(--x) + var(--y)) / var(--span));
  --kd: calc(var(--dir) * var(--k) + (1 - var(--dir)) / 2);
  animation: fx-wipe-out .34s var(--fx-flip) both; animation-delay: calc(var(--kd) * 320ms); }
@keyframes fx-wipe-out {
  0% { opacity: 1; transform: perspective(500px) rotateX(0) scale(1); }
  75% { opacity: 1; transform: perspective(500px) rotateX(72deg) scale(.9); }
  100% { opacity: 0; transform: perspective(500px) rotateX(90deg) scale(.86); } }
.fx-reduced .fx-wipe { display: none; }

/* ── UI sound toggle (top bar) ── */
.fx-sound { position: relative; padding: 0 !important; gap: 4px; flex: none !important; width: auto !important; min-width: 33px; height: 33px; margin-left: auto; justify-content: center; box-sizing: border-box; }
.fx-sound.is-on { padding: 0 9px !important; }
.fx-sound + .lang-wrap { margin-left: 8px; }
.fx-sound .fx-sound__w1, .fx-sound .fx-sound__w2 { display: none; }
.fx-sound.is-on .fx-sound__w1, .fx-sound.is-on .fx-sound__w2 { display: inline; }
.fx-sound.is-on .fx-sound__x { display: none; }
.fx-sound.is-on { color: var(--accent); border-color: var(--accent-line); }
.fx-sound__bars { display: none; align-items: flex-end; gap: 2px; height: 11px; }
.fx-sound.is-on .fx-sound__bars { display: inline-flex; }
.fx-sound__bars i { width: 2px; height: 100%; background: currentColor; border-radius: 1px; transform-origin: bottom; animation: fx-eq 1s ease-in-out infinite; }
.fx-sound__bars i:nth-child(2) { animation-delay: -.35s; } .fx-sound__bars i:nth-child(3) { animation-delay: -.7s; }
@keyframes fx-eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.fx-reduced .fx-sound__bars i { animation: none; transform: scaleY(.6); }

/* ── tile cursor: the arrow drawn inside a tile, pinned to the pointer (system arrow hidden) ── */
/* Le curseur dessiné remplace la flèche système (cursor: none) : il doit passer au-dessus de TOUT,
   pop-ups compris, sinon la souris devient invisible (ex. annonce des mots fléchés, z-index 1000). */
.fx-cursor { position: fixed; left: 0; top: 0; z-index: 2147483647; pointer-events: none; width: 26px; height: 26px; margin: -3px 0 0 -3px;
  border-radius: 7px; opacity: 0; will-change: transform; display: grid; place-items: center;
  background: color-mix(in oklab, var(--ink-1) 88%, transparent); border: 1.5px solid color-mix(in oklab, var(--accent) 75%, transparent);
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.6), 0 0 0 1px rgba(0,0,0,.25);
  transition: opacity .2s, background-color .18s, border-color .18s, box-shadow .18s, scale .12s; }
.fx-cursor svg { width: 16px; height: 16px; fill: var(--accent); stroke: color-mix(in oklab, var(--ink-0) 70%, transparent); stroke-width: .8; stroke-linejoin: round; margin: -2px 0 0 -1px; }
.fx-cursor.is-on { opacity: 1; }
.fx-cursor.is-hot { background: var(--correct-bg); border-color: var(--correct-line); box-shadow: 0 6px 18px -6px var(--correct-line); }
.fx-cursor.is-hot svg { fill: #fff; stroke: rgba(0,0,0,.35); }
.fx-cursor.is-text { opacity: 0; }
.fx-cursor.is-down { scale: .88; }
[data-theme="light"] .fx-cursor { background: #fff; border-color: var(--accent); box-shadow: 0 6px 16px -8px rgba(30,40,70,.5); }
[data-theme="light"] .fx-cursor.is-hot { background: var(--correct-line); }
body.in-game .fx-cursor { display: none; }

body.in-game .fx-sound { display: none; }
@media (max-width: 680px) { .fx-sound { margin-left: 0; } }

/* neutralise the global button:hover (solid cyan + lift) on the sound toggle */
button.fx-sound:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: none; transform: none;
  border-color: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--ink); }
button.fx-sound.is-on:hover:not(:disabled) { color: var(--accent); }

/* ── solo result card ─────────────────────────────────────────── */
.gd-res-card { position: relative; overflow: visible; min-width: min(380px, calc(100vw - 32px)); padding: 34px 34px 26px !important; gap: 14px !important;
  border-radius: 22px !important; border: 1px solid var(--accent-line) !important;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 60%), linear-gradient(170deg, var(--ink-1), var(--ink-0)) !important;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.85), 0 0 0 1px color-mix(in oklab, var(--accent) 12%, transparent) !important; }
.gd-res-card.is-won { border-color: var(--correct-line) !important;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in oklab, var(--correct-line) 18%, transparent), transparent 60%), linear-gradient(170deg, var(--ink-1), var(--ink-0)) !important; }
[data-theme="light"] .gd-res-card { background: radial-gradient(120% 80% at 50% 0%, color-mix(in oklab, var(--accent) 10%, transparent), transparent 60%), #fff !important; box-shadow: 0 30px 70px -30px rgba(30,40,70,.45) !important; }
[data-theme="light"] .gd-res-card.is-won { background: radial-gradient(120% 80% at 50% 0%, color-mix(in oklab, var(--correct-line) 14%, transparent), transparent 60%), #fff !important; }
.gd-res-card .round-overlay-label { font-family: var(--font-mono); letter-spacing: .3em; color: var(--accent); font-size: .72rem; }
.gd-res-card.is-won .round-overlay-label { color: var(--correct-line); }
.gd-res-card #solo-result-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* read by screen readers, drawn as tiles */
.gd-res { display: grid; justify-items: center; gap: 16px; position: relative; }
.gd-res__word { display: grid; grid-template-columns: repeat(var(--n), 52px); gap: 7px; perspective: 700px; }
.gd-res__word span { height: 52px; display: grid; place-items: center; border-radius: 10px; font-family: var(--font-display); font-size: 26px;
  color: #fff; background: var(--absent-bg, #3a3f55); border: 1px solid var(--absent-line, #4b5270); }
.is-won .gd-res__word span { background: var(--correct-bg); border-color: var(--correct-line); box-shadow: 0 10px 26px -12px var(--correct-line); }
.is-lost .gd-res__word span { background: color-mix(in oklab, var(--accent) 16%, var(--ink-1)); border-color: var(--accent-line); color: var(--ink); }
[data-theme="light"] .gd-res__word span { color: var(--ink); }
.gd-res.is-in .gd-res__word span { animation: gd-res-flip .6s var(--fx-flip) both; animation-delay: calc(120ms + var(--i) * 90ms); }
@keyframes gd-res-flip { 0% { transform: rotateX(-90deg); opacity: 0; } 60% { transform: rotateX(12deg); opacity: 1; } 100% { transform: none; } }
.gd-res.is-in .is-won .gd-res__word span, .is-won .gd-res.is-in .gd-res__word span { animation: gd-res-flip .6s var(--fx-flip) both, gd-res-bounce .45s var(--fx-ease) both;
  animation-delay: calc(120ms + var(--i) * 90ms), calc(700ms + var(--i) * 70ms + var(--n) * 90ms); }
@keyframes gd-res-bounce { 40% { transform: translateY(-9px); } }
.gd-res__recap { display: grid; gap: 3px; }
.gd-res__recap div { display: flex; gap: 3px; justify-content: center; }
.gd-res__recap i { width: 12px; height: 12px; border-radius: 3px; background: var(--absent-bg, #3a3f55); }
.gd-res__recap i.correct { background: var(--correct-line); } .gd-res__recap i.present { background: var(--present-line, #e0a326); }
.gd-res.is-in .gd-res__recap i { animation: gd-res-pop .35s var(--fx-ease) both; animation-delay: calc(500ms + var(--d)); }
@keyframes gd-res-pop { from { transform: scale(0); } }
.gd-res__burst { position: absolute; left: 50%; top: 26px; width: 0; height: 0; pointer-events: none; }
.gd-res__burst i { position: absolute; width: 12px; height: 12px; margin: -6px; border-radius: 3px; opacity: 0; background: var(--correct-line); }
.gd-res__burst i.present { background: var(--present-line, #e0a326); } .gd-res__burst i.accent { background: var(--accent); }
.gd-res.is-in .gd-res__burst i { animation: gd-res-burst 1.3s cubic-bezier(.15,.8,.3,1) both; animation-delay: calc(650ms + var(--n, 5) * 90ms); }
@keyframes gd-res-burst { 0% { opacity: 1; transform: translate(0,0) scale(.3) rotate(0); }
  70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 60px)) scale(var(--s)) rotate(var(--r)); } }
.gd-res-card .round-overlay-winner { color: var(--ink-soft); font-size: .95rem; }
.gd-res-card.is-won .round-overlay-winner { color: var(--correct-line); }
.gd-res-card .solo-result-actions { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.gd-res-card .solo-result-actions .btn-cta { width: auto; flex: 1 1 100%; order: -1; }
.gd-res-card .solo-result-actions .secondary { flex: 1 1 0; min-width: 0; height: 46px; padding: 0 14px !important; font-size: .9rem !important;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.gd-res-card .solo-result-actions .btn-cta { height: 50px; }

/* result buttons, shared by the solo and match cards:
   secondary = the hero "Partie rapide" ghost (translucent glass, hairline, light sweep);
   primary  = the cyan CTA with a soft ring, glow and a sheen on hover */
.gd-res-card .secondary, .gd-mres .secondary {
  position: relative; overflow: hidden; border-radius: 12px !important;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)) !important;
  border: 1px solid rgba(255,255,255,.12) !important; color: var(--ink) !important; font-weight: 600;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06) !important;
  transition: background .25s, border-color .25s, transform .2s var(--fx-ease) !important; }
.gd-res-card .secondary:hover:not(:disabled), .gd-mres .secondary:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.04)) !important;
  border-color: rgba(255,255,255,.22) !important; transform: translateY(-1px) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,.08) !important; }
.gd-res-card .secondary:active, .gd-mres .secondary:active { transform: scale(.98) !important; }
[data-theme="light"] .gd-res-card .secondary, [data-theme="light"] .gd-mres .secondary {
  background: linear-gradient(180deg, #fff, #f3f6fc) !important; border-color: var(--line) !important; box-shadow: 0 1px 2px rgba(30,40,70,.08) !important; }
.gd-res-card .btn-cta, .gd-mres .btn-cta {
  position: relative; overflow: hidden; border-radius: 12px !important; font-weight: 700; letter-spacing: .01em;
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 60%, transparent), 0 14px 34px -14px color-mix(in oklab, var(--accent) 85%, transparent) !important;
  transition: transform .2s var(--fx-ease), box-shadow .25s !important; }
.gd-res-card .btn-cta::after, .gd-mres .btn-cta::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%) -150% 0 / 250% 100% no-repeat; }
.gd-res-card .btn-cta:hover:not(:disabled), .gd-mres .btn-cta:hover:not(:disabled) { transform: translateY(-1px) !important;
  box-shadow: 0 0 0 1px var(--accent), 0 18px 40px -12px color-mix(in oklab, var(--accent) 95%, transparent) !important; }
.gd-res-card .btn-cta:hover::after, .gd-mres .btn-cta:hover::after { animation: gd-sheen .8s var(--fx-ease); }
@keyframes gd-sheen { to { background-position: 150% 0; } }
.gd-res-card .btn-cta:active, .gd-mres .btn-cta:active { transform: scale(.985) !important; }
/* the guess distribution: tiles-grade styling to match the card */
.gd-res-card .guess-dist { gap: 5px; margin: 4px 0 0; }
.gd-res-card .guess-dist-bar-wrap { height: 16px; border-radius: 5px; background: rgba(255,255,255,.04); }
[data-theme="light"] .gd-res-card .guess-dist-bar-wrap { background: var(--cell-bg); }
.gd-res-card .guess-dist-bar { border-radius: 5px; background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 55%, transparent), var(--accent)); }
.gd-res-card.is-won .guess-dist-bar { background: linear-gradient(90deg, color-mix(in oklab, var(--correct-line) 55%, transparent), var(--correct-line)); }
.gd-res-card .guess-dist-label, .gd-res-card .guess-dist-count { font-family: var(--font-mono); }
@media (max-width: 420px) { .gd-res__word { grid-template-columns: repeat(var(--n), 44px); } .gd-res__word span { height: 44px; font-size: 22px; } }
.fx-reduced .gd-res *, .fx-reduced .gd-res__word span { animation: none !important; }

/* ── match result card ─────────────────────────────────────────── */
.gd-mres { position: relative; overflow: visible; min-width: min(420px, calc(100vw - 32px)) !important; padding: 36px 34px 28px !important; gap: 16px !important;
  border-radius: 22px !important; border: 1px solid var(--accent-line) !important;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 60%), linear-gradient(170deg, var(--ink-1), var(--ink-0)) !important;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.85) !important; }
.gd-mres.is-won { border-color: var(--correct-line) !important;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in oklab, var(--correct-line) 18%, transparent), transparent 60%), linear-gradient(170deg, var(--ink-1), var(--ink-0)) !important; }
[data-theme="light"] .gd-mres { background: radial-gradient(120% 80% at 50% 0%, color-mix(in oklab, var(--accent) 10%, transparent), transparent 60%), #fff !important; box-shadow: 0 30px 70px -30px rgba(30,40,70,.45) !important; }
.gd-mres .match-overlay-label { font-family: var(--font-mono); letter-spacing: .3em; color: var(--accent); }
.gd-mres.is-won .match-overlay-label { color: var(--correct-line); }
.gd-mres .match-overlay-title { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.gd-mres.is-in .match-overlay-title { animation: gd-mres-title .7s var(--fx-ease) .1s both; }
@keyframes gd-mres-title { from { opacity: 0; transform: translateY(12px) scale(.96); filter: blur(4px); } }
.gd-mres .match-overlay-scores { gap: 8px; }
.gd-mres .match-score-item { position: relative; overflow: hidden; gap: 10px; padding: 10px 14px; border-radius: 12px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); isolation: isolate; }
[data-theme="light"] .gd-mres .match-score-item { background: var(--cell-bg); border-color: var(--cell-line); }
/* the score as a bar filling the row */
.gd-mres .match-score-item::before { content: ""; position: absolute; inset: 0; z-index: -1; width: var(--w, 0%); border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 6%, transparent), color-mix(in oklab, var(--accent) 22%, transparent));
  transform-origin: left; }
.gd-mres .match-score-item.is-winner { border-color: var(--correct-line); }
.gd-mres .match-score-item.is-winner::before { background: linear-gradient(90deg, color-mix(in oklab, var(--correct-line) 10%, transparent), color-mix(in oklab, var(--correct-line) 34%, transparent)); }
.gd-mres.is-in .match-score-item { animation: gd-mres-row .55s var(--fx-ease) both; animation-delay: calc(250ms + var(--i) * 110ms); }
.gd-mres.is-in .match-score-item::before { animation: gd-mres-bar .9s var(--fx-ease) both; animation-delay: calc(450ms + var(--i) * 110ms); }
@keyframes gd-mres-row { from { opacity: 0; transform: translateX(-14px); } }
@keyframes gd-mres-bar { from { transform: scaleX(0); } }
.gd-mres .score-rank { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); width: 22px; }
.gd-mres__av { width: 28px; height: 28px; flex: none; border-radius: 7px; display: grid; place-items: center; font-family: var(--font-display); font-size: 14px;
  color: var(--ink); background: var(--absent-bg, #2a2f45); border: 1px solid rgba(255,255,255,.1); }
.is-winner .gd-mres__av { background: var(--correct-bg); border-color: var(--correct-line); color: #fff; }
.is-me .gd-mres__av { box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 60%, transparent); }
.gd-mres .score-name { flex: 1; font-weight: 600; }
.gd-mres .score-pts { font-family: var(--font-display); font-size: 1rem; }
.gd-mres .multi-stats-block { border-radius: 12px; }
.gd-mres__acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.gd-mres__acts .btn-cta { flex: 1 1 100%; height: 50px; width: auto !important; }
.gd-mres__acts .secondary { flex: 1 1 0; min-width: 0; height: 46px; padding: 0 14px !important; font-size: .9rem !important; width: auto !important;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.gd-mres__acts .hidden { display: none !important; }
.gd-mres__burst { top: 70px; }
.gd-mres.is-in .gd-mres__burst i { animation: gd-res-burst 1.3s cubic-bezier(.15,.8,.3,1) both; animation-delay: .35s; }
@media (max-width: 420px) { .gd-mres__acts .secondary { font-size: .82rem !important; padding: 0 8px !important; } }
.fx-reduced .gd-mres, .fx-reduced .gd-mres * { animation: none !important; }

.gd-mres .match-overlay-title { text-wrap: balance; max-width: 16ch; justify-self: center; }
[data-theme="light"] .is-winner .gd-mres__av { background: var(--correct-line); color: #fff; }
.gd-mres__acts .secondary svg { flex: none; }
@media (max-width: 420px) { .gd-mres__acts .secondary { gap: 6px; } .gd-mres .match-overlay-title { font-size: 1.5rem; } }
@media (max-width: 420px) { .gd-mres__acts .secondary { flex: 1 1 100%; } }

/* ── lobby ─────────────────────────────────────────────────────── */
.gd-lobby { position: relative; overflow: hidden; }
.gd-lobby::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(60% 50% at 85% 0%, color-mix(in oklab, var(--accent) 10%, transparent), transparent 70%),
              radial-gradient(50% 60% at 0% 100%, color-mix(in oklab, var(--correct-line) 7%, transparent), transparent 70%); }
.gd-lobby > * { position: relative; z-index: 1; }
.gd-lobby .lobby-head-left > h2 { display: none; }  /* the eyebrow + code tiles carry the header */
.gd-lobby__eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--correct-line) !important; letter-spacing: .28em !important; margin-bottom: 10px; }
.gd-lobby__live { width: 8px; height: 8px; border-radius: 50%; background: var(--correct-line); box-shadow: 0 0 0 0 var(--correct-line); animation: gd-live 1.8s ease-out infinite; }
@keyframes gd-live { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.gd-lobby .lobby-code-label { display: none; }
.gd-lobby .lobby-code-pill { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; gap: 12px; display: inline-flex; align-items: center; }
.gd-lobby #lobby-room-code { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* kept for a11y + copy */
.gd-lobby__code { display: inline-grid; grid-auto-flow: column; gap: 7px; perspective: 700px; cursor: pointer; }
.gd-lobby__code i { width: 56px; height: 62px; border-radius: 12px; display: grid; place-items: center; font-style: normal; font-family: var(--font-display); font-size: 30px;
  color: #fff; background: var(--correct-bg); border: 1px solid var(--correct-line); box-shadow: 0 14px 30px -16px var(--correct-line); }
[data-theme="light"] .gd-lobby__code i { background: var(--correct-line); }
.gd-lobby__code.is-in i { animation: gd-res-flip .6s var(--fx-flip) both; animation-delay: calc(var(--i) * 90ms); }
.gd-lobby .lobby-copy-btn { width: 44px !important; height: 44px; border-radius: 12px !important; padding: 0 !important; display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)) !important; border: 1px solid rgba(255,255,255,.12) !important; color: var(--ink-soft) !important; }
.gd-lobby .lobby-copy-btn:hover { border-color: rgba(255,255,255,.24) !important; color: var(--ink) !important; transform: none !important; box-shadow: none !important; }
.gd-lobby #lobby-config-badges { margin-top: 14px; }
.gd-lobby .lobby-head-actions { display: flex; gap: 10px; }
.gd-lobby .lobby-head-actions button { height: 42px; border-radius: 12px !important; padding: 0 16px !important; display: inline-flex; align-items: center; gap: 8px; width: auto !important; }
.gd-lobby #leave-lobby-btn { background: transparent !important; border: 1px solid color-mix(in oklab, var(--bad, #ef4444) 40%, transparent) !important; color: color-mix(in oklab, var(--bad, #ef4444) 85%, var(--ink)) !important; box-shadow: none !important; }
.gd-lobby #leave-lobby-btn:hover { background: color-mix(in oklab, var(--bad, #ef4444) 10%, transparent) !important; transform: none !important; }
.gd-lobby #share-room-btn { display: none; } /* the invite strip below already has a primary "Inviter mes amis" */
/* invite strip: glass */
.gd-lobby .lobby-invite-strip { border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015)); border-color: rgba(255,255,255,.1); padding: 18px 22px; }
[data-theme="light"] .gd-lobby .lobby-invite-strip { background: #fff; border-color: var(--line); }
.gd-lobby .lobby-invite-strip__url { font-size: 1.05rem; }
.gd-lobby .lobby-invite-strip__actions { align-items: center; }
.gd-lobby .lobby-invite-strip__actions .btn-cta { height: 46px; padding: 0 22px !important; width: auto !important; border-radius: 12px !important; display: inline-flex; align-items: center; gap: 8px; }
.gd-lobby .lobby-invite-strip__actions .secondary { height: 46px; padding: 0 16px !important; border-radius: 12px !important; display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)) !important; border: 1px solid rgba(255,255,255,.12) !important; color: var(--ink) !important; }
[data-theme="light"] .gd-lobby .lobby-invite-strip__actions .secondary { background: #fff !important; border-color: var(--line) !important; }
/* the table: taken seats + open seats as one grid of cards */
.gd-lobby #lobby-players { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gd-lobby #lobby-players .lobby-seat { grid-template-columns: 44px 1fr auto; padding: 14px 16px; border-radius: 14px; min-height: 72px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); border-color: rgba(255,255,255,.1);
  animation: gd-seat-in .5s var(--fx-ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
[data-theme="light"] .gd-lobby #lobby-players .lobby-seat { background: #fff; border-color: var(--line); }
.gd-lobby #lobby-players .lobby-seat--host { border-color: var(--accent-line); }
.gd-lobby .lobby-seat__av { width: 44px; height: 44px; border-radius: 12px; font-size: 1.1rem; }
@keyframes gd-seat-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.gd-lobby__open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.gd-lobby__open:empty { display: none; }
.gd-lobby__seat { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 72px; border-radius: 14px; border: 1.5px dashed color-mix(in oklab, var(--accent) 30%, var(--line)); color: var(--muted); }
.gd-lobby__seat b { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 400; color: var(--accent);
  border: 1.5px dashed color-mix(in oklab, var(--accent) 50%, transparent); animation: gd-seat 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * .3s); }
.gd-lobby__seat span { font-size: .9rem; }
/* start: fills with the table */
.gd-lobby #start-match-btn { position: relative; overflow: hidden; height: 56px; border-radius: 14px !important; font-size: 1.05rem; isolation: isolate; }
.gd-lobby #start-match-btn.is-waiting { background: color-mix(in oklab, var(--accent) 12%, var(--ink-1)) !important; color: var(--ink) !important; border: 1px solid var(--accent-line) !important; box-shadow: none !important; opacity: 1 !important; }
.gd-lobby #start-match-btn.is-waiting::before { content: ""; position: absolute; inset: 0; z-index: -1; width: var(--fill, 0%);
  background: repeating-linear-gradient(115deg, color-mix(in oklab, var(--accent) 30%, transparent) 0 14px, color-mix(in oklab, var(--accent) 20%, transparent) 14px 28px);
  background-size: 200% 100%; animation: gd-stripes 1.6s linear infinite; transition: width .6s var(--fx-ease); }
@keyframes gd-stripes { to { background-position: -40px 0; } }
.gd-lobby .chat-block { border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)); border-color: rgba(255,255,255,.08); }
[data-theme="light"] .gd-lobby .chat-block { background: #fff; }
@media (max-width: 680px) {
  .gd-lobby__code i { width: 46px; height: 52px; font-size: 24px; }
  .gd-lobby #lobby-players, .gd-lobby__open { grid-template-columns: 1fr; }
  .gd-lobby .lobby-head { flex-direction: column; }
}
.fx-reduced .gd-lobby *, .fx-reduced .gd-lobby *::before { animation: none !important; }

/* ── cursor v2: the pointer itself is drawn inside a tile ── */
@media (hover: hover) and (pointer: fine) {
  .fx-cursor-on, .fx-cursor-on * { cursor: none !important; }
  .fx-cursor-on input, .fx-cursor-on textarea, .fx-cursor-on [contenteditable] { cursor: text !important; }
}
/* lobby: seats use the whole left column as a 2-up grid; open seats continue the same grid */
@media (min-width: 900px) {
  .gd-lobby #screen-lobby, .gd-lobby { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) !important; }
}
.gd-lobby .list-block:not(.chat-block) { display: grid; grid-template-columns: 1fr; }
.gd-lobby #lobby-players:has(> :only-child) + .lobby-waiting-msg + .gd-lobby__open,
.gd-lobby #lobby-players + .gd-lobby__open { margin-top: 10px; }
.gd-lobby #lobby-players, .gd-lobby__open { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 680px) { .gd-lobby #lobby-players, .gd-lobby__open { grid-template-columns: 1fr; } }
.gd-lobby #lobby-players .lobby-seat { grid-template-columns: 44px minmax(0, 1fr) auto auto; }
.gd-lobby .lobby-seat__kick { width: 30px !important; height: 30px; padding: 0 !important; border-radius: 9px !important; display: grid; place-items: center; }
/* cursor: tile centred on the pointer, arrow centred in the tile (click point = tile centre) */
.fx-cursor { margin: -13px 0 0 -13px; }
.fx-cursor svg { margin: 0; width: 15px; height: 15px; }
