/* Game Night — a lamp-lit table in the park palette.
   Phone first (390×844), large targets, no hover-only affordances.
   Board-specific rules are grouped by prefix: gf- Go Fish, ck- Checkers,
   ld- Ladders & Slides, fr- Four in a Row, db- Dots & Boxes, mc- Mancala,
   mm- Memory Match. */

:root {
  --night: #1d1733; --night-2: #261f42; --night-3: #312853; --night-4: #3d3266;
  --lamp: #ffd48a; --gold: #eab95c; --gold-deep: #b98630;
  --cream: #f7ecd6; --paper: #fffaf0; --ink: #3a2a18; --ink-soft: #6d5a42; --line: #e3cfa6;
  --wood: #8b5a33; --wood-deep: #5d391c; --felt: #1f6f57; --felt-deep: #134a3a;
  --text: #fbf3e2; --text-soft: #cdc2de; --text-dim: #a497bd;
  --good: #59c993; --warm: #ff9f70;
  --s0: #e8573f; --s1: #f2b632; --s2: #4a95e6; --s3: #43b374; --s4: #a06ddb; --s5: #ee83b4;
  --r: 18px;
  --tap: 48px;
  --shadow: 0 14px 34px -14px rgba(0, 0, 0, .65);
  --display: "Fredoka", "Outfit", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  color: var(--text); font: 17px/1.5 var(--body);
  background:
    radial-gradient(520px 340px at 50% -80px, rgba(255, 212, 138, .30), transparent 70%),
    radial-gradient(900px 600px at 110% 20%, rgba(160, 109, 219, .18), transparent 60%),
    linear-gradient(180deg, var(--night-2), var(--night) 60%);
  background-color: var(--night);
  background-attachment: fixed;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--lamp); outline-offset: 3px; border-radius: 10px; }
.gn-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gn-noscript, .gn-loading { text-align: center; color: var(--text-soft); padding: 40px 0; }

/* ---------- top bar (leaves room for the fixed back pill) ---------- */
.gn-top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  min-height: 64px;
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px calc(max(10px, env(safe-area-inset-left)) + 108px);
  background: rgba(29, 23, 51, .86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.gn-top-title { font: 600 1.15rem/1.1 var(--display); letter-spacing: .01em; color: var(--lamp); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gn-top-end { display: flex; align-items: center; gap: 8px; }
.gn-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 14px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06);
}
.gn-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gn-icon svg path:first-child { fill: var(--text); stroke: none; }
.gn-icon[aria-pressed="false"] .gn-wave { opacity: .15; }
.gn-icon[aria-pressed="false"] { opacity: .7; }

/* ---------- layout ---------- */
.gn { width: 100%; max-width: 560px; margin: 0 auto; padding: 12px max(16px, env(safe-area-inset-left)) 28px; }
.gn-foot { max-width: 560px; margin: 0 auto; padding: 8px 16px max(24px, env(safe-area-inset-bottom)); color: var(--text-dim); font-size: .85rem; text-align: center; }
.gn-foot a { color: var(--text-soft); }
.gn-stack { display: grid; gap: 14px; }
.gn-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gn-row > .gn-btn { flex: 1 1 140px; }
.gn-h2 { font: 600 1.35rem/1.15 var(--display); margin: 6px 0 2px; color: var(--paper); }
.gn-h3 { font: 600 1.05rem/1.2 var(--display); margin: 0; color: var(--paper); }
.gn-sub { margin: 0; color: var(--text-soft); font-size: .95rem; }
.gn-label { display: block; font-weight: 700; font-size: .92rem; color: var(--text-soft); margin: 0 0 6px; }
.gn-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .035));
  border: 1px solid rgba(255, 255, 255, .11); border-radius: var(--r); padding: 16px;
  box-shadow: var(--shadow);
}
.gn-note { margin: 0; padding: 10px 14px; border-radius: 14px; background: rgba(255, 212, 138, .10); border: 1px solid rgba(255, 212, 138, .25); color: var(--lamp); font-size: .95rem; }
.gn-error { margin: 0; min-height: 1.4em; color: var(--warm); font-weight: 700; font-size: .95rem; }

/* ---------- buttons & controls ---------- */
.gn-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 18px; border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .07);
  color: var(--text); font: 700 1rem/1.2 var(--body); text-decoration: none; text-align: center;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease;
}
.gn-btn:active { transform: scale(.98); }
.gn-btn.primary { background: linear-gradient(180deg, #ffd88f, var(--gold)); color: #2b1d08; border-color: #ffe2a8; box-shadow: 0 10px 22px -12px rgba(234, 185, 92, .9); }
.gn-btn.good { background: linear-gradient(180deg, #6fd8a6, #3fae7a); color: #08251a; border-color: #8ee7bd; }
.gn-btn.quiet { background: transparent; border-color: rgba(255, 255, 255, .14); color: var(--text-soft); min-height: 46px; }
.gn-btn.small { min-height: 44px; padding: 8px 14px; font-size: .95rem; border-radius: 13px; }
.gn-btn[disabled], .gn-btn[aria-disabled="true"] { opacity: .45; cursor: default; transform: none; }
.gn-btn .gn-emoji { font-size: 1.3rem; line-height: 1; }

.gn-big {
  display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 14px; width: 100%;
  min-height: 76px; padding: 12px 14px; border-radius: 20px; text-align: left;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06);
}
.gn-big.primary { background: linear-gradient(135deg, rgba(255, 212, 138, .26), rgba(234, 185, 92, .12)); border-color: rgba(255, 212, 138, .5); }
.gn-big-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; background: rgba(255, 255, 255, .09); }
.gn-big strong { display: block; font: 600 1.12rem/1.2 var(--display); color: var(--paper); }
.gn-big small { display: block; color: var(--text-soft); font-size: .92rem; line-height: 1.35; margin-top: 2px; }

.gn-input {
  width: 100%; min-height: 52px; padding: 10px 14px; border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .22); background: rgba(0, 0, 0, .22); color: var(--paper); font-size: 1.05rem;
}
.gn-input:focus { outline: 3px solid var(--lamp); outline-offset: 1px; }
.gn-code-input { text-transform: uppercase; letter-spacing: .5em; text-align: center; font: 700 1.8rem/1 var(--display); padding-left: calc(14px + .5em); }

.gn-seg { display: flex; gap: 6px; padding: 5px; border-radius: 16px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .1); }
.gn-seg button {
  flex: 1 1 0; min-height: 46px; padding: 6px 8px; border-radius: 12px; border: 0; background: transparent;
  color: var(--text-soft); font-weight: 700; font-size: .92rem; line-height: 1.15;
}
.gn-seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .5); }

.gn-stepper { display: flex; align-items: center; gap: 12px; }
.gn-stepper button { width: var(--tap); height: var(--tap); border-radius: 14px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); font: 700 1.4rem/1 var(--display); }
.gn-stepper button[disabled] { opacity: .35; }
.gn-stepper output { min-width: 2.2em; text-align: center; font: 600 1.4rem/1 var(--display); color: var(--paper); }
.gn-stepper-label { color: var(--text-soft); font-size: .95rem; }

.gn-avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.gn-avatars button { aspect-ratio: 1; border-radius: 16px; border: 2px solid transparent; background: rgba(255, 255, 255, .06); padding: 6px; min-height: var(--tap); }
.gn-avatars button[aria-pressed="true"] { border-color: var(--lamp); background: rgba(255, 212, 138, .18); }
.gn-avatars img { width: 100%; height: 100%; }

/* ---------- home ---------- */
.gn-hero { text-align: center; padding: 8px 4px 4px; position: relative; }
.gn-lights { height: 26px; margin: 0 auto 4px; max-width: 360px; background:
  radial-gradient(circle at 6% 30%, #ffd48a 0 4px, transparent 5px),
  radial-gradient(circle at 20% 55%, #ff9f70 0 4px, transparent 5px),
  radial-gradient(circle at 34% 70%, #ffd48a 0 4px, transparent 5px),
  radial-gradient(circle at 50% 75%, #8fe0b8 0 4px, transparent 5px),
  radial-gradient(circle at 66% 70%, #ffd48a 0 4px, transparent 5px),
  radial-gradient(circle at 80% 55%, #ee83b4 0 4px, transparent 5px),
  radial-gradient(circle at 94% 30%, #ffd48a 0 4px, transparent 5px);
  filter: drop-shadow(0 0 6px rgba(255, 212, 138, .7)); }
.gn-hero h1 { margin: 0; font: 700 clamp(2.4rem, 12vw, 3.2rem)/1 var(--display); color: var(--lamp); letter-spacing: .01em; text-shadow: 0 0 26px rgba(255, 212, 138, .45); }
.gn-hero p { margin: 8px auto 0; max-width: 30em; color: var(--text-soft); }
.gn-resume { display: grid; gap: 10px; }

.gn-shelf { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gn-tile {
  position: relative; display: grid; grid-template-rows: auto 1fr; text-align: left; padding: 0; overflow: hidden;
  border-radius: 20px; border: 1px solid rgba(255, 255, 255, .13); background: var(--night-3); min-height: 196px;
  box-shadow: var(--shadow);
}
.gn-tile-art { aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; }
.gn-tile-art svg { width: 100%; height: 100%; display: block; }
.gn-tile-copy { padding: 10px 12px 12px; display: grid; gap: 3px; align-content: start; }
.gn-tile-copy strong { font: 600 1.06rem/1.15 var(--display); color: var(--paper); }
.gn-tile-copy small { color: var(--text-soft); font-size: .84rem; line-height: 1.3; }
.gn-tile-copy .gn-meta { color: var(--lamp); font-weight: 700; font-size: .8rem; letter-spacing: .02em; }
/* An odd tile out at the end of the shelf lies across both columns. */
.gn-shelf > .gn-tile:last-child:nth-child(odd), .gn-picker > .gn-tile:last-child:nth-child(odd):not(:only-child) { grid-column: 1 / -1; grid-template-rows: none; grid-template-columns: 46% 1fr; min-height: 0; }
.gn-shelf > .gn-tile:last-child:nth-child(odd) .gn-tile-art, .gn-picker > .gn-tile:last-child:nth-child(odd):not(:only-child) .gn-tile-art { aspect-ratio: auto; height: 100%; min-height: 76px; }
.gn-shelf > .gn-tile:last-child:nth-child(odd) .gn-tile-copy, .gn-picker > .gn-tile:last-child:nth-child(odd):not(:only-child) .gn-tile-copy { align-content: center; }
.gn-tile.is-picked { border-color: var(--lamp); box-shadow: 0 0 0 3px rgba(255, 212, 138, .55), var(--shadow); }
.gn-tile.is-picked::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--lamp); color: #2b1d08; font-weight: 800; }

/* ---------- sheets (dialog) ---------- */
.gn-sheet {
  width: min(560px, 100vw); max-width: 100vw; max-height: 92dvh; margin: auto auto 0; padding: 0;
  border: 0; border-radius: 26px 26px 0 0; background: var(--night-2); color: var(--text);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .55);
}
.gn-sheet::backdrop { background: rgba(10, 6, 20, .66); backdrop-filter: blur(3px); }
.gn-sheet-inner { padding: 18px max(16px, env(safe-area-inset-left)) max(22px, env(safe-area-inset-bottom)); display: grid; gap: 16px; }
.gn-sheet-head { display: flex; align-items: start; gap: 12px; }
.gn-sheet-head > div { flex: 1; min-width: 0; }
.gn-sheet-art { width: 76px; height: 54px; border-radius: 12px; overflow: hidden; flex: none; }
.gn-sheet-art svg { width: 100%; height: 100%; display: block; }
.gn-x { width: 44px; height: 44px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); font-size: 1.3rem; flex: none; }
.gn-rules { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--text-soft); }
.gn-rules li::marker { color: var(--lamp); }
.gn-names { display: grid; gap: 8px; }
.gn-how { border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); }
.gn-how summary { min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 14px; font-weight: 700; cursor: pointer; list-style: none; }
.gn-how summary::-webkit-details-marker { display: none; }
.gn-how summary::before { content: "＋"; color: var(--lamp); font-weight: 800; }
.gn-how[open] summary::before { content: "－"; }
.gn-how .gn-rules { padding: 0 14px 14px 2.2em; }

/* ---------- lobby ---------- */
.gn-codebox { text-align: center; display: grid; gap: 8px; }
.gn-code { font: 700 2.8rem/1 var(--display); letter-spacing: .28em; color: var(--lamp); padding-left: .28em; }
.gn-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gn-person { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, .05); }
.gn-person img { width: 40px; height: 40px; flex: none; }
.gn-person .gn-pname { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.gn-tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 800; letter-spacing: .03em; background: rgba(255, 255, 255, .1); color: var(--text-soft); white-space: nowrap; }
.gn-tag.host { background: rgba(255, 212, 138, .2); color: var(--lamp); }
.gn-tag.you { background: rgba(89, 201, 147, .2); color: #9df0c6; }
.gn-tag.bot { background: rgba(74, 149, 230, .22); color: #b9d8ff; }
.gn-plan { display: flex; flex-wrap: wrap; gap: 8px; }
.gn-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-weight: 700; font-size: .92rem; }
.gn-chip img { width: 26px; height: 26px; }
.gn-tally { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gn-tally li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .05); }
.gn-tally b { color: var(--lamp); }
.gn-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gn-picker .gn-tile { min-height: 0; }
.gn-picker .gn-tile-art { aspect-ratio: 16 / 7; }
.gn-picker .gn-tile-copy { padding: 8px 10px 10px; }
.gn-picker .gn-tile-copy small { display: none; }
.gn-picker .gn-tile.is-picked::after { width: 26px; height: 26px; top: 6px; right: 6px; }
/* The host's Start stays in reach while they browse the shelf. */
.gn-startbar { position: sticky; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 5; padding: 10px; margin: 0 -6px; border-radius: 20px; background: rgba(38, 31, 66, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, .7); }

/* ---------- play screen ---------- */
/* One column on a phone held upright: the panel's parts wrap around the
   board in reading order. On anything wider, or a phone on its side, the
   board stays in view on the left and the panel scrolls beside it. */
.gn-play { display: grid; gap: 10px; --avail: calc(100vh - 252px); --avail: calc(100dvh - 252px); }
.gn-play-main { order: 7; min-width: 0; }
.gn-play-side { display: contents; }
.gn-o-head { order: 1; } .gn-o-offline { order: 2; } .gn-o-seats { order: 3; } .gn-o-prompt { order: 4; } .gn-o-tools { order: 5; }
.gn-o-banner { order: 6; } .gn-o-error { order: 8; } .gn-o-results { order: 9; } .gn-o-react { order: 10; } .gn-o-log { order: 11; } .gn-o-actions { order: 12; }
.gn-play-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gn-play-title { margin: 0; font: 600 1.3rem/1.15 var(--display); color: var(--paper); }
.gn-pill { padding: 4px 10px; border-radius: 999px; background: rgba(255, 212, 138, .14); border: 1px solid rgba(255, 212, 138, .35); color: var(--lamp); font: 700 .82rem/1.2 var(--body); letter-spacing: .06em; }
/* A board never needs scrolling to see: its width follows the height left
   for it (--ratio is its width over height; --extra its controls). */
.gn-fit { width: 100%; max-width: max(200px, calc((var(--avail) - var(--extra, 0px)) * var(--ratio, 1))); margin-inline: auto; }
@media (min-width: 640px) and (min-aspect-ratio: 5/4) {
  .gn[data-screen="play"] { max-width: 1180px; }
  .gn-play { grid-template-columns: minmax(0, 1fr) minmax(270px, 360px); gap: 10px 22px; align-items: start; --avail: calc(100vh - 100px); --avail: calc(100dvh - 100px); }
  /* Kept in view; a tall one (Go Fish on a short screen) scrolls on its own
     rather than leaving its bottom out of reach. */
  .gn-play-main { grid-column: 1; grid-row: 1; position: sticky; top: 70px; max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow-y: auto; overscroll-behavior: contain; padding: 18px 8px 8px; margin: -18px -8px 0; }
  .gn-play-side { display: flex; flex-direction: column; gap: 10px; grid-column: 2; grid-row: 1; min-width: 0; }
  .gn-seats { flex-wrap: wrap; overflow: visible; }
  .gn-seat { max-width: none; }
}
@media (max-width: 400px) {
  .gn-top-title { visibility: hidden; }
}
@media (min-width: 700px) and (max-aspect-ratio: 5/4) {
  .gn[data-screen="play"] { max-width: 640px; }
}

/* ---------- hint & take back ---------- */
.gn-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.gn-tool { flex: 0 0 auto; min-height: 46px; }
.gn-tool.is-on { background: rgba(255, 212, 138, .18); border-color: var(--lamp); color: var(--lamp); }
@keyframes gn-glow { 0%, 100% { box-shadow: 0 0 0 3px rgba(255, 212, 138, .95), 0 0 16px 4px rgba(255, 212, 138, .55); } 50% { box-shadow: 0 0 0 5px rgba(255, 212, 138, .6), 0 0 26px 8px rgba(255, 212, 138, .35); } }
.is-hinted { box-shadow: 0 0 0 3px rgba(255, 212, 138, .95), 0 0 16px 4px rgba(255, 212, 138, .55); animation: gn-glow 1.3s ease-in-out infinite; position: relative; z-index: 2; }
.fr-drops button.is-hinted { animation: none; color: #fff; text-shadow: 0 0 10px var(--lamp); transform: scale(1.35); }
.db-hinted { stroke-linecap: round; animation: db-hint 1.2s ease-in-out infinite; pointer-events: none; }
@keyframes db-hint { 50% { stroke-opacity: .35; } }
.gn-prompt.nudge { animation: gn-nudge 1.6s ease 1; }
@keyframes gn-nudge { 0%, 100% { transform: none; } 15% { transform: scale(1.03); } 30% { transform: none; } 45% { transform: scale(1.02); } }

/* ---------- standings & records ---------- */
.gn-standings { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.gn-standing { display: grid; grid-template-columns: 30px 30px 1fr auto; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); }
.gn-standing img { width: 30px; height: 30px; }
.gn-standing.won { background: rgba(255, 212, 138, .16); box-shadow: inset 0 0 0 1px rgba(255, 212, 138, .45); }
.gn-standing.you .gn-sname { color: #9df0c6; }
.gn-medal { font-size: 1.25rem; text-align: center; font-weight: 800; color: var(--text-soft); }
.gn-standing .gn-sname { font-weight: 800; overflow-wrap: anywhere; }
.gn-sscore { color: var(--text-soft); font-weight: 700; font-size: .92rem; white-space: nowrap; }
.gn-record { margin: 0; padding: 8px 12px; border-radius: 12px; background: rgba(89, 201, 147, .12); border: 1px solid rgba(89, 201, 147, .35); color: #b6f0d3; font-weight: 700; font-size: .95rem; }
.gn-badge { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(29, 23, 51, .85); color: var(--lamp); font: 800 .78rem/1.2 var(--body); }
.gn-tile-art { position: relative; }
.gn-recs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gn-rec { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); }
.gn-rec-name { font: 600 1.02rem/1.2 var(--display); color: var(--paper); }
.gn-rec-nums { color: var(--lamp); font-weight: 700; font-size: .92rem; }
.gn-rec-vs { color: var(--text-soft); font-size: .88rem; }

/* ---------- reactions ---------- */
.gn-react-bar { display: flex; gap: 8px; justify-content: space-between; }
.gn-react-bar button { flex: 1 1 0; min-height: 48px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .07); font-size: 1.45rem; line-height: 1; transition: transform .12s ease; }
.gn-react-bar button:active { transform: scale(.9); }
.gn-react-bar button[disabled] { opacity: .45; }
.gn-react-layer { position: fixed; left: 0; right: 0; bottom: 0; height: 70vh; pointer-events: none; z-index: 9980; overflow: hidden; }
.gn-react-bubble { position: absolute; bottom: 70px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 5px; border-radius: 999px; background: rgba(29, 23, 51, .92); border: 1px solid rgba(255, 212, 138, .4); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .7); animation: gn-float 3s ease-out both; }
.gn-react-bubble img { width: 26px; height: 26px; }
.gn-react-e { font-size: 1.6rem; line-height: 1; }
.gn-react-n { font-weight: 800; font-size: .85rem; color: var(--paper); max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes gn-float { 0% { transform: translateY(20px) scale(.6); opacity: 0; } 12% { transform: translateY(0) scale(1.08); opacity: 1; } 75% { opacity: 1; } 100% { transform: translateY(-46vh) scale(1); opacity: 0; } }
.gn-react-bubble.still { animation: gn-fade 3s ease both; }
@keyframes gn-fade { 0%, 100% { opacity: 0; } 10%, 80% { opacity: 1; } }

/* ---------- flying cards ---------- */
.gn-flyer { position: fixed; z-index: 9985; transform: translate(-50%, -50%) scale(.9); transition: transform .6s cubic-bezier(.3, .8, .3, 1), opacity .6s ease; pointer-events: none; opacity: 0; }
.gn-seats { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.gn-seats::-webkit-scrollbar { display: none; }
.gn-seat {
  flex: 1 0 auto; min-width: 92px; max-width: 150px; display: grid; grid-template-columns: 34px 1fr; gap: 2px 8px; align-items: center;
  padding: 7px 10px 7px 7px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 2px solid transparent;
  scroll-snap-align: start; position: relative;
}
.gn-seat img { width: 34px; height: 34px; grid-row: span 2; }
.gn-seat .gn-sname { font-weight: 800; font-size: .9rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gn-seat .gn-sstat { font-size: .78rem; color: var(--text-soft); line-height: 1.1; white-space: nowrap; }
.gn-seat.is-turn { border-color: var(--seat, var(--lamp)); background: rgba(255, 255, 255, .12); box-shadow: 0 0 0 4px color-mix(in srgb, var(--seat, var(--lamp)) 25%, transparent); }
.gn-seat.is-you .gn-sname::after { content: " · you"; color: #9df0c6; font-weight: 700; }
.gn-seat.is-away { opacity: .7; }
.gn-seat-dot { position: absolute; left: 30px; top: 30px; width: 14px; height: 14px; border-radius: 50%; background: var(--seat); border: 2px solid var(--night-2); }

.gn-prompt {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  font: 600 1.05rem/1.25 var(--display); color: var(--paper);
}
.gn-prompt.is-yours { background: linear-gradient(135deg, rgba(255, 212, 138, .24), rgba(255, 212, 138, .08)); border-color: rgba(255, 212, 138, .55); color: var(--lamp); }
.gn-prompt .gn-dots::after { content: "…"; display: inline-block; animation: gn-think 1.4s steps(4, end) infinite; width: 1.2em; overflow: hidden; vertical-align: bottom; }
@keyframes gn-think { from { width: 0; } to { width: 1.2em; } }
.gn-board { position: relative; }
.gn-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.gn-log li { padding: 7px 12px; border-radius: 12px; background: rgba(255, 255, 255, .045); color: var(--text-soft); font-size: .92rem; line-height: 1.35; }
.gn-log li:last-child { color: var(--paper); background: rgba(255, 255, 255, .08); }
.gn-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gn-actions .gn-btn { flex: 1 1 140px; }
.gn-banner { padding: 12px 14px; border-radius: 16px; background: rgba(74, 149, 230, .16); border: 1px solid rgba(74, 149, 230, .4); display: grid; gap: 10px; }

/* ---------- results & covers ---------- */
.gn-results { text-align: center; display: grid; gap: 12px; padding: 20px 16px; border-radius: 22px;
  background: radial-gradient(400px 200px at 50% 0, rgba(255, 212, 138, .25), transparent 70%), rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 212, 138, .35); }
.gn-results .gn-trophy { font-size: 3rem; line-height: 1; }
.gn-results h2 { margin: 0; font: 700 1.6rem/1.15 var(--display); color: var(--lamp); }
.gn-cover {
  position: fixed; inset: 0; z-index: 9995; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(500px 300px at 50% 30%, rgba(255, 212, 138, .22), transparent 70%), var(--night);
}
.gn-cover-card { width: min(420px, 100%); text-align: center; display: grid; gap: 16px; }
.gn-cover-card img { width: 96px; height: 96px; margin: 0 auto; }
.gn-cover-card h2 { margin: 0; font: 700 1.8rem/1.15 var(--display); color: var(--lamp); }
.gn-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.gn-confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: gn-fall 2.6s ease-in forwards; }
@keyframes gn-fall { to { transform: translateY(105vh) rotate(540deg); opacity: .9; } }

/* ---------- shared card faces (Go Fish) ---------- */
.gf-card {
  --w: 62px; width: var(--w); height: calc(var(--w) * 1.42); flex: none; position: relative;
  border-radius: 9px; background: #fffdf7; color: #2c2117; border: 1px solid #d9c7a4;
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .55); font-family: var(--display);
}
.gf-card.red { color: #c43d2b; }
.gf-card .gf-r { position: absolute; top: 4px; left: 6px; font-weight: 700; font-size: calc(var(--w) * .3); line-height: 1; }
.gf-card .gf-s { position: absolute; top: calc(var(--w) * .33); left: 6px; font-size: calc(var(--w) * .22); line-height: 1; }
.gf-card .gf-big { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--w) * .5); padding-top: calc(var(--w) * .2); padding-left: calc(var(--w) * .2); }
.gf-card.court .gf-big { font-size: calc(var(--w) * .58); padding-top: calc(var(--w) * .18); }
.gf-card.court { background: linear-gradient(160deg, #fffdf7 55%, #f6ead2); }
.gf-opp, .gf-hand-wrap { position: relative; }
.gf-bubble {
  position: absolute; left: 50%; top: -14px; z-index: 6; transform: translate(-50%, -50%); max-width: 92%;
  padding: 6px 12px; border-radius: 16px; background: var(--paper); color: var(--ink); white-space: nowrap;
  font: 700 .92rem/1.2 var(--display); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .7); pointer-events: none;
  animation: gf-say .35s cubic-bezier(.3, 1.6, .4, 1) both;
}
.gf-bubble::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.gf-bubble.fish { background: #d8f1ff; }
.gf-bubble.give { background: #dcf7e9; }
@keyframes gf-say { from { transform: translate(-50%, -30%) scale(.5); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.gf-book.is-new { animation: gf-book .8s cubic-bezier(.3, 1.6, .4, 1); }
@keyframes gf-book { 0% { transform: scale(.2) rotate(-20deg); } 100% { transform: none; } }
.gf-back { background: repeating-linear-gradient(45deg, #8b5a33 0 6px, #7a4d2a 6px 12px); border-color: #e8c98e; }
.gf-back::after { content: "🥄"; position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--w) * .38); filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }

.gf-table { display: grid; gap: 12px; }
.gf-opps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.gf-opp { display: grid; grid-template-columns: 40px 1fr; gap: 2px 10px; align-items: center; padding: 10px; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 2px solid transparent; text-align: left; min-height: 64px; }
.gf-opp img { width: 40px; height: 40px; grid-row: span 2; }
.gf-opp strong { font-size: .95rem; line-height: 1.15; overflow-wrap: anywhere; }
.gf-opp small { color: var(--text-soft); font-size: .82rem; }
.gf-opp.is-target { background: rgba(255, 212, 138, .12); }
.gf-opp.is-turn { border-color: var(--lamp); box-shadow: 0 0 0 4px rgba(255, 212, 138, .2); }
button.gf-opp:not([disabled]) { border-color: rgba(255, 212, 138, .55); }
button.gf-opp[disabled] { opacity: .5; }
.gf-pond { display: flex; align-items: center; gap: 14px; justify-content: center; padding: 10px; border-radius: 18px; background: radial-gradient(circle at 50% 40%, #2b7f9e, #164b63); border: 1px solid rgba(255, 255, 255, .15); min-height: 92px; }
.gf-pond .gf-card { --w: 46px; }
.gf-pond-copy { font-weight: 700; color: #e6f7ff; }
.gf-pond-copy small { display: block; font-weight: 400; color: #b6dcec; }
.gf-books { display: flex; flex-wrap: wrap; gap: 4px; min-height: 0; }
.gf-book { font: 700 .74rem/1 var(--display); padding: 3px 6px; border-radius: 6px; background: var(--paper); color: var(--ink); }
.gf-hand-wrap { padding: 12px 8px 14px; border-radius: 20px; background: linear-gradient(180deg, var(--felt), var(--felt-deep)); border: 1px solid rgba(255, 255, 255, .14); }
.gf-hand-title { display: flex; justify-content: space-between; gap: 8px; padding: 0 6px 8px; font-weight: 700; color: #d9f5e9; font-size: .92rem; }
.gf-hand { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 0; padding: 0 6px; }
.gf-group { display: flex; margin: 0 6px; padding: 0; border: 0; background: none; border-radius: 12px; transition: transform .15s ease; }
.gf-group .gf-card + .gf-card { margin-left: -38px; }
.gf-group[aria-pressed="true"] { transform: translateY(-12px); }
.gf-group[aria-pressed="true"] .gf-card { box-shadow: 0 0 0 3px var(--lamp), 0 10px 18px -6px rgba(0, 0, 0, .6); }
.gf-group[disabled] { cursor: default; }
.gf-group.is-new .gf-card:last-child { animation: gf-pop .5s ease; }
@keyframes gf-pop { from { transform: translateY(-20px) scale(1.1); } to { transform: none; } }
.gf-ask { display: grid; gap: 8px; }

/* ---------- Checkers ---------- */
.ck-board {
  display: grid; grid-template-columns: repeat(8, 1fr); width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden;
  border: 8px solid var(--wood-deep); box-shadow: var(--shadow), inset 0 0 0 2px rgba(0, 0, 0, .3); background: var(--wood);
}
.ck-sq { position: relative; border: 0; padding: 0; background: #f1dfb8; display: grid; place-items: center; min-width: 0; }
.ck-sq.dark { background: #8b5a33; }
.ck-sq.dark:nth-child(odd) { background: #87562f; }
.ck-sq.is-last { box-shadow: inset 0 0 0 3px rgba(255, 212, 138, .55); }
.ck-sq.is-target::after { content: ""; width: 34%; height: 34%; border-radius: 50%; background: rgba(255, 212, 138, .85); box-shadow: 0 0 0 4px rgba(255, 212, 138, .3); }
.ck-sq.is-cap::before { content: ""; position: absolute; inset: 18%; border-radius: 50%; border: 3px dashed rgba(255, 159, 112, .9); }
.ck-pc {
  width: 80%; height: 80%; border-radius: 50%; position: relative; display: grid; place-items: center;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .45), inset 0 -4px 0 rgba(0, 0, 0, .22), inset 0 3px 0 rgba(255, 255, 255, .25);
  transition: transform .28s cubic-bezier(.3, .7, .3, 1);
}
.ck-pc.red { background: radial-gradient(circle at 35% 30%, #ff8a70, #d4412d 55%, #9f2c1d); }
.ck-pc.black { background: radial-gradient(circle at 35% 30%, #6c6f80, #2f3140 55%, #17181f); }
.ck-pc::after { content: ""; position: absolute; inset: 18%; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .22); }
.ck-pc.king::before { content: "♛"; position: relative; z-index: 1; color: #ffd86b; font-size: clamp(14px, 5.2vw, 24px); line-height: 1; text-shadow: 0 1px 1px rgba(0, 0, 0, .6); }
.ck-pc.can-move { box-shadow: 0 0 0 3px rgba(255, 212, 138, .85), 0 3px 0 rgba(0, 0, 0, .45), inset 0 -4px 0 rgba(0, 0, 0, .22); }
.ck-pc.is-sel { transform: translateY(-4px) scale(1.06); box-shadow: 0 0 0 4px var(--lamp), 0 8px 14px rgba(0, 0, 0, .5); }
.ck-pc.ghost { opacity: .35; }
.ck-legend { display: flex; gap: 6px 12px; justify-content: center; color: var(--text-soft); font-size: .84rem; flex-wrap: wrap; margin-top: 6px; }
.ck-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ck-legend i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }
.ck-legend i.red { background: radial-gradient(circle at 35% 30%, #ff8a70, #d4412d); }
.ck-legend i.black { background: radial-gradient(circle at 35% 30%, #6c6f80, #2f3140); }
.ck-board { position: relative; }
.ck-trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; opacity: .85; }
.ck-trail.is-fresh polyline { animation: ck-trail .55s ease-out; }
@keyframes ck-trail { from { stroke-dashoffset: 3; opacity: 0; } to { stroke-dashoffset: 0; opacity: 1; } }
.ck-sq .ck-pc { z-index: 2; }
.ck-gone { animation: ck-gone .7s ease-in forwards; }
@keyframes ck-gone { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(.3) rotate(25deg); opacity: 0; } }
.ck-pc.crowned::before { animation: ck-crown .8s cubic-bezier(.3, 1.6, .4, 1); display: inline-block; }
@keyframes ck-crown { from { transform: translateY(-14px) scale(1.8); opacity: 0; } to { transform: none; opacity: 1; } }
.ck-sq.is-hinted { z-index: 2; }

/* ---------- Four in a Row ---------- */
.fr-wrap { display: grid; gap: 8px; }
.fr-drops { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; padding: 0 10px; }
.fr-drops button { min-height: 44px; border: 0; background: none; display: grid; place-items: center; color: var(--lamp); font-size: 1.3rem; border-radius: 10px; }
.fr-drops button[disabled] { visibility: hidden; }
.fr-board {
  position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 10px; border-radius: 18px;
  background: linear-gradient(180deg, #3f6fd0, #2a50a6); box-shadow: var(--shadow), inset 0 -6px 0 rgba(0, 0, 0, .18);
}
.fr-cell { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 50%; background: #18203f; box-shadow: inset 0 4px 6px rgba(0, 0, 0, .55); overflow: visible; }
.fr-cell[data-col]:not([disabled]) { cursor: pointer; }
.fr-disc { position: absolute; inset: 5%; border-radius: 50%; display: grid; place-items: center; font-size: clamp(12px, 3.8vw, 20px); }
.fr-disc.p0 { background: radial-gradient(circle at 35% 30%, #ff8a70, #e1452f 60%, #a92f1f); }
.fr-disc.p0::after { content: "★"; color: rgba(255, 255, 255, .6); }
.fr-disc.p1 { background: radial-gradient(circle at 35% 30%, #ffe7a3, #f2b632 60%, #bf8314); }
.fr-disc.p1::after { content: "●"; color: rgba(120, 70, 0, .45); }
.fr-disc.drop { animation: fr-drop .5s cubic-bezier(.45, 0, .9, .6); }
@keyframes fr-drop { 0% { transform: translateY(calc(var(--fall, 6) * -110%)); } 75% { transform: translateY(0); } 87% { transform: translateY(-9%); } 100% { transform: none; } }
.fr-disc.is-last { box-shadow: 0 0 0 3px rgba(255, 255, 255, .55); }
.fr-disc.win { animation: fr-win 1s ease-in-out infinite; }
@keyframes fr-win { 50% { transform: scale(1.08); } }
.fr-disc.win { box-shadow: 0 0 0 4px #fff, 0 0 18px 4px rgba(255, 255, 255, .7); }
.fr-cell.is-hint { box-shadow: inset 0 4px 6px rgba(0, 0, 0, .55), 0 0 0 3px rgba(255, 212, 138, .5); }

/* ---------- Dots & Boxes ---------- */
.db-wrap { padding: 12px; border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.db-svg { width: 100%; height: auto; display: block; touch-action: manipulation; }
.db-line { stroke-linecap: round; }
.db-hit { fill: transparent; cursor: pointer; }
.db-hit:focus { outline: none; }
.db-hit:focus-visible + .db-line, .db-hit.is-hover + .db-line { stroke: rgba(58, 42, 24, .45) !important; }
.db-box-txt { font: 700 22px var(--display); text-anchor: middle; dominant-baseline: central; fill: rgba(255, 255, 255, .95); }
.db-new { animation: db-pop .45s ease; }
.db-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: db-draw .35s ease-out forwards; }
@keyframes db-draw { to { stroke-dashoffset: 0; } }
@keyframes db-pop { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Mancala ---------- */
.mc-board {
  display: grid; grid-template-columns: 1fr repeat(6, 1.1fr) 1fr; grid-template-rows: 1fr 1fr; gap: 6px;
  padding: 12px 10px; border-radius: 26px; background: linear-gradient(180deg, #9a6438, #6e4422);
  box-shadow: var(--shadow), inset 0 2px 0 rgba(255, 255, 255, .2), inset 0 -6px 0 rgba(0, 0, 0, .2);
}
.mc-store { grid-row: 1 / 3; border-radius: 999px; background: #4a2c14; box-shadow: inset 0 5px 10px rgba(0, 0, 0, .55); display: grid; place-items: center; min-height: 150px; position: relative; }
.mc-pit { position: relative; aspect-ratio: 1 / 1.15; border: 0; padding: 0; border-radius: 999px; background: #4f2f16; box-shadow: inset 0 4px 8px rgba(0, 0, 0, .55); min-width: 0; }
.mc-pit.can { box-shadow: inset 0 4px 8px rgba(0, 0, 0, .55), 0 0 0 3px rgba(255, 212, 138, .8); }
.mc-pit.is-from { box-shadow: inset 0 4px 8px rgba(0, 0, 0, .55), 0 0 0 3px rgba(255, 255, 255, .5); }
.mc-pit.is-hit, .mc-store.is-hit { animation: mc-hit .5s ease; }
@keyframes mc-hit { 50% { background: #7a4a22; box-shadow: inset 0 4px 8px rgba(0, 0, 0, .55), 0 0 0 3px rgba(255, 212, 138, .45); } }
.mc-pit.is-hit .mc-count, .mc-store.is-hit .mc-count { animation: mc-count .3s ease; }
@keyframes mc-count { 50% { transform: translate(-50%, 50%) scale(1.25); } }
.mc-store.is-hit .mc-count { animation: none; }
.mc-stones { position: absolute; inset: 10%; }
.mc-stone { position: absolute; width: 26%; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .3), inset 0 2px 0 rgba(255, 255, 255, .45); }
.mc-count { position: absolute; left: 50%; bottom: -2px; transform: translate(-50%, 50%); min-width: 26px; padding: 1px 6px; border-radius: 999px; background: var(--paper); color: var(--ink); font: 700 .86rem/1.3 var(--display); text-align: center; box-shadow: 0 2px 4px rgba(0,0,0,.4); }
.mc-store .mc-count { bottom: 10px; transform: translateX(-50%); font-size: 1.05rem; }
.mc-side { display: flex; justify-content: space-between; color: var(--text-soft); font-size: .88rem; padding: 0 6px; }
.mc-side b { color: var(--paper); }

/* ---------- Memory Match ---------- */
.mm-grid { display: grid; gap: 7px; }
.mm-card { position: relative; aspect-ratio: 1 / 1.08; border: 0; padding: 0; background: none; perspective: 600px; min-width: 0; }
.mm-inner { position: absolute; inset: 0; transition: transform .35s ease; transform-style: preserve-3d; }
.mm-card.is-up .mm-inner { transform: rotateY(180deg); }
.mm-face, .mm-back { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; }
.mm-back { background: radial-gradient(circle at 50% 40%, #a06ddb, #5a3a99); border: 2px solid rgba(255, 255, 255, .3); box-shadow: 0 5px 12px -5px rgba(0, 0, 0, .6); }
.mm-back::after { content: "🥄"; font-size: clamp(16px, 6vw, 28px); opacity: .85; }
.mm-face { transform: rotateY(180deg); background: var(--paper); border: 3px solid var(--line); font-size: clamp(24px, 9vw, 40px); }
.mm-card.is-found .mm-face { border-color: var(--seat, var(--good)); box-shadow: 0 0 0 2px var(--seat, var(--good)); }
.mm-card.is-found .mm-inner { opacity: .82; }
.mm-card.is-peek .mm-face { border-color: var(--warm); }
.mm-card.just-found { animation: mm-found .7s cubic-bezier(.3, 1.5, .5, 1) .35s; z-index: 2; }
@keyframes mm-found { 0% { transform: scale(1); } 40% { transform: scale(1.14); } 100% { transform: scale(1); } }
.mm-grid.cols-6 .mm-face { font-size: clamp(18px, 6vw, 30px); }

/* ---------- Ladders & Slides ---------- */
.ld-wrap { position: relative; width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 6px solid var(--wood-deep); box-shadow: var(--shadow); }
.ld-grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(10, 1fr); }
.ld-sq { position: relative; font: 700 clamp(8px, 2.4vw, 12px)/1 var(--display); color: rgba(58, 42, 24, .62); padding: 3px; }
.ld-sq.goal { background: linear-gradient(135deg, #ffe08f, #f2b632) !important; color: #5a3a00; }
.ld-sq.goal::after { content: "★"; position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(14px, 4vw, 22px); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.ld-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ld-tokens { position: absolute; inset: 0; pointer-events: none; }
.ld-tok { position: absolute; width: 7.6%; aspect-ratio: 1; margin: -3.8% 0 0 -3.8%; border-radius: 50%; border: 2px solid #fff; background: var(--seat); box-shadow: 0 3px 6px rgba(0, 0, 0, .45); transition: left .5s ease, top .5s ease; display: grid; place-items: center; }
.ld-tok img { width: 86%; height: 86%; }
.ld-tok.is-turn { box-shadow: 0 0 0 3px var(--lamp), 0 3px 6px rgba(0, 0, 0, .45); z-index: 2; }
.ld-controls { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.ld-die { width: 64px; height: 64px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15), 0 6px 14px -6px rgba(0, 0, 0, .6); display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 9px; }
.ld-die i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); place-self: center; visibility: hidden; }
.ld-die.rolling { animation: ld-shake .5s ease; }
@keyframes ld-shake { 25% { transform: rotate(-12deg); } 50% { transform: rotate(10deg) scale(1.06); } 75% { transform: rotate(-6deg); } }

/* ---------- motion & small screens ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .gn-confetti { display: none; }
  /* Shown still rather than not at all (their animations end faded out). */
  .gn-react-bubble, .gn-react-bubble.still { animation: none !important; opacity: 1; }
  .ck-gone { display: none; }
}
@media (max-width: 360px) {
  .gn-shelf, .gn-picker { gap: 8px; }
  .gn-tile-copy small { display: none; }
  .gf-card { --w: 54px; }
  .gf-group .gf-card + .gf-card { margin-left: -34px; }
}
@media (min-width: 520px) {
  .gn-shelf { grid-template-columns: 1fr 1fr 1fr; }
}

/* ---------- the Comfort Dial ("How's today?", /js/comfort.js) ----------
   The guest's park-wide comfort choices arrive as classes on <html>, set
   before first paint. /css/comfort.css handles the shared pieces (the dial,
   the shade for Dim, stilling every animation for Calm); these are the parts
   only this game knows about. Quiet is handled in js/kit.js. */

/* Calm motion: the same stillness as a device that asks for reduced motion. */
html.comfort-calm .gn-confetti { display: none; }
html.comfort-calm .gn-react-bubble, html.comfort-calm .gn-react-bubble.still { animation: none !important; opacity: 1; }
html.comfort-calm .ck-gone { display: none; }
html.comfort-calm .gn-btn:active, html.comfort-calm .gn-react-bar button:active { transform: none; }

/* Bigger buttons: every control grows and gets more room around it. The
   boards themselves already fill the screen's width, so they stay as they are. */
html.comfort-big { --tap: 60px; }
html.comfort-big .gn-icon { width: 56px; height: 56px; }
html.comfort-big .gn-btn { min-height: 64px; padding: 14px 20px; font-size: 1.08rem; }
html.comfort-big .gn-btn.quiet { min-height: 60px; }
html.comfort-big .gn-btn.small { min-height: 60px; padding: 12px 18px; font-size: 1.02rem; }
html.comfort-big .gn-big { min-height: 92px; }
html.comfort-big .gn-input { min-height: 64px; }
html.comfort-big .gn-seg button { min-height: 60px; font-size: 1rem; }
html.comfort-big .gn-tool { min-height: 60px; }
html.comfort-big .gn-how summary { min-height: 60px; }
html.comfort-big .gn-react-bar button { min-height: 60px; }
html.comfort-big .fr-drops button { min-height: 60px; }
html.comfort-big .gn-x { width: 56px; height: 56px; }
html.comfort-big .gn-stack { gap: 18px; }
html.comfort-big .gn-row, html.comfort-big .gn-actions, html.comfort-big .gn-tools,
html.comfort-big .gn-react-bar { gap: 14px; }
html.comfort-big .gn-shelf, html.comfort-big .gn-picker { gap: 16px; }
/* Under a game, each action takes a row of its own. */
html.comfort-big .gn-actions .gn-btn { flex-basis: 100%; }
/* The footer's Terms link keeps its place in the sentence; an unseen pad
   around it catches the tap. */
html.comfort-big .gn-foot a { position: relative; }
html.comfort-big .gn-foot a::before { content: ""; position: absolute; top: -20px; right: -12px; bottom: -20px; left: -12px; }

/* Fewer words: the names stay, the second lines step aside. The "no timers,
   no rush" note, the rules and anything a player needs to act on are kept. */
html.comfort-brief .gn-hero p,
html.comfort-brief .gn-sub,
html.comfort-brief .gn-big small,
html.comfort-brief .gn-tile-copy small { display: none; }
