@font-face { font-family: 'Financier Display'; font-style: normal; font-weight: 300; font-display: swap; src: url(/accounts/static/lonvi-v8/fonts/FinancierDisplay-Light.woff2) format('woff2'); }
    @font-face { font-family: 'Financier Display'; font-style: italic; font-weight: 300; font-display: swap; src: url(/accounts/static/lonvi-v8/fonts/FinancierDisplay-LightItalic.woff2) format('woff2'); }
    @font-face { font-family: 'FT Base'; font-style: normal; font-weight: 400; font-display: swap; src: url(/accounts/static/lonvi-v8/fonts/FTBase-Regular.woff2) format('woff2'); }
    @font-face { font-family: 'FT Base'; font-style: normal; font-weight: 600; font-display: swap; src: url(/accounts/static/lonvi-v8/fonts/FTBase-Semibold.woff2) format('woff2'); }
    @font-face { font-family: 'Fragment Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/accounts/static/lonvi-v8/fonts/FragmentMono-Regular.woff2) format('woff2'); }

    :root {
      --beige: #FEF9EF; --cream: #F5EEE1; --dark-cream: #D1C9BF; --midnight: #2A2B2F;
      --gray: #515151; --orange: #B05A36; --orange-10: #F6E9DC; --orange-on-dark: #E59A73;
      --error: #B3261E; --error-on-dark: #FFB4A6;

      --font-serif: 'Financier Display', Georgia, 'Times New Roman', serif;
      --font-sans: 'FT Base', system-ui, -apple-system, 'Segoe UI', sans-serif;
      --font-mono: 'Fragment Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

      --site-margin: clamp(1.25rem, 4.1353vw + .2782rem, 4rem);
      --section: clamp(3.5rem, 4.812vw + 2.4rem, 6.2rem);
      --radius-xl: clamp(1.5rem, 1.5038vw + 1.1466rem, 2.5rem);
      --radius-lg: clamp(1rem, .7519vw + .8233rem, 1.5rem);
      --h2: clamp(2.5rem, 1.7vw + 2.1rem, 4rem);
      --h3: clamp(1.75rem, .8vw + 1.55rem, 2.25rem);
      --ease: cubic-bezier(.2, .8, .2, 1);
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }
    body {
      background: var(--beige); color: var(--midnight);
      font-family: var(--font-sans); font-size: 1.0625rem; line-height: 1.6; font-weight: 400;
      -webkit-font-smoothing: antialiased; overflow-x: hidden;
    }
    ::selection { background: var(--orange); color: var(--beige); }
    a { color: inherit; text-decoration: none; }
    ul { list-style: none; }
    img { display: block; max-width: 100%; }
    :focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
    .site-header :focus-visible { outline-color: var(--beige); }

    .wrap { width: min(100% - 2 * var(--site-margin), 82rem); margin-inline: auto; }
    .tag { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gray); }
    .accent { font-style: italic; color: var(--orange); font-weight: 300; }
    .h2 { font-family: var(--font-serif); font-weight: 300; font-size: var(--h2); line-height: 1.02; letter-spacing: -0.01em; text-align: center; text-wrap: balance; }
    .lede { font-size: 1.25rem; line-height: 1.6; color: var(--gray); max-width: 36rem; text-wrap: pretty; }
    .center { text-align: center; margin-inline: auto; }
    .head-block { display: grid; gap: 1.25rem; justify-items: center; margin-bottom: clamp(2.5rem, 4vw, 4rem); }

    .btn {
      --bg: var(--orange); --fg: var(--beige); --bd: var(--orange); --hbg: var(--midnight); --hfg: var(--beige); --hbd: var(--midnight);
      appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: .75rem; width: fit-content;
      height: 3rem; padding: 0 1.75rem; border: 1.5px solid var(--bd); border-radius: 999px; background: var(--bg); color: var(--fg);
      font: 600 1rem/1.5 var(--font-sans); text-align: center; cursor: pointer;
      transition: background-color .2s ease, color .2s ease, border-color .2s ease;
    }
    .btn:hover { background: var(--hbg); color: var(--hfg); border-color: var(--hbd); }
    .btn--light { --bg: var(--beige); --fg: var(--orange); --bd: var(--beige); --hbg: var(--orange); --hfg: var(--beige); --hbd: var(--orange); }

    /* ─── HEADER ─────────────────────────────────────────── */
    .site-header { position: fixed; z-index: 50; top: .75rem; left: 0; right: 0; padding-inline: var(--site-margin); pointer-events: none; }
    .nav {
      pointer-events: auto; max-width: 82rem; margin-inline: auto; height: 4.25rem; padding: 0 1rem 0 1.5rem;
      display: flex; align-items: center; justify-content: space-between; gap: 1rem;
      border-radius: 1.5rem; background: rgba(42,43,47,.94); color: var(--beige);
      -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    }
    .logo { display: flex; align-items: center; gap: .625rem; }
    .logo-mark { width: 2rem; height: 2rem; border-radius: .5rem; background: #B05A36; display: flex; align-items: center; justify-content: center; }
    .logo-mark svg { width: 1rem; height: 1rem; }
    .logo-word { font-family: var(--font-serif); font-weight: 300; font-size: 1.75rem; line-height: 1; letter-spacing: -0.01em; padding-top: .28rem; }
    .nav-links { display: flex; gap: 2rem; }
    .nav-links a { font-size: 1rem; color: var(--beige); opacity: .92; transition: opacity .2s ease; }
    .nav-links a:hover, .nav-links a[aria-current] { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
    .nav-right { display: flex; align-items: center; gap: 1.25rem; }
    .nav-login { font-weight: 600; font-size: 1rem; }
    .nav-right .btn { height: 2.75rem; padding: 0 1.375rem; }
    @media (max-width: 960px) { .nav-links { display: none; } }
    @media (max-width: 560px) { .nav-login { display: none; } .nav { height: 3.75rem; padding: 0 .75rem 0 1rem; } }

    .skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .75rem 1.25rem; border-radius: 999px; background: var(--beige); color: var(--midnight); font-weight: 600; }
    .skip:focus { top: 1rem; }

    /* ─── FOOTER ─────────────────────────────────────────── */
    footer { background: var(--midnight); color: var(--beige); padding: 3.5rem 0 2.5rem; }
    .ft-row { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
    .ft-links { display: flex; gap: 1.75rem; flex-wrap: wrap; font-size: 1rem; }
    .ft-links a { color: var(--beige); opacity: .92; }
    .ft-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
    .ft-stores { display: flex; align-items: center; gap: .875rem 1rem; flex-wrap: wrap; margin-top: 2.25rem; }
    .store-badge { display: inline-block; line-height: 0; border-radius: .5rem; transition: opacity .2s ease, transform .2s var(--ease); }
    .store-badge img { height: 2.75rem; width: auto; }
    .store-badge:hover { opacity: .88; transform: translateY(-1px); }
    .ft-legal { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(254,249,239,.2); font-size: .875rem; line-height: 1.65; color: rgba(254,249,239,.82); max-width: 52rem; }
  
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ─── SIGN-UP GATE (modal on desktop, bottom sheet on phones) ───────── */
.gate { border: 0; padding: 0; background: transparent; color: var(--beige); max-width: none; width: min(100% - 2rem, 26rem); margin: auto; overflow: visible; }
.gate::backdrop { background: rgba(20,21,24,.66); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.gate[open] { animation: gate-in .45s var(--ease) both; }
.gate[open]::backdrop { animation: gate-fade .35s ease both; }
@keyframes gate-in { from { opacity: 0; transform: translateY(1.5rem) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes gate-fade { from { opacity: 0; } to { opacity: 1; } }

.gate-card { position: relative; overflow: hidden; display: grid; justify-items: center; text-align: center;
  background: var(--midnight); border: 1px solid rgba(254,249,239,.1); border-radius: var(--radius-xl);
  padding: 2.5rem 2rem 1.75rem; box-shadow: 0 2.5rem 5rem rgba(0,0,0,.45); }
.gate-card::before { content: ""; position: absolute; inset: -55% -25% auto; height: 80%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(176,90,54,.5), transparent); }
.gate-card > * { position: relative; }

.gate-x { position: absolute; top: .875rem; right: .875rem; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%;
  background: rgba(254,249,239,.08); color: rgba(254,249,239,.85); font-size: 1.5rem; line-height: 1; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.gate-x:hover { background: rgba(254,249,239,.18); color: var(--beige); }

/* 1 · brand */
.gate-logo { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 1rem; background: var(--orange); box-shadow: 0 .625rem 1.75rem rgba(176,90,54,.5); }
.gate-logo svg { width: 1.75rem; height: 1.75rem; }

/* 2 · the ask: the biggest thing on the sheet */
.gate h2 { margin-top: 1.75rem; font-family: var(--font-serif); font-weight: 300; font-size: clamp(2.125rem, 1.4rem + 3vw, 2.75rem); line-height: 1.04; letter-spacing: -0.015em; text-wrap: balance; }
.gate h2 span { display: block; font-size: .5em; line-height: 1.2; letter-spacing: .01em; color: rgba(254,249,239,.78); margin-bottom: .35em; }
.gate h2 em { font-style: italic; color: var(--orange-on-dark); }

/* 3 · subtitle, then reassurance under the button: quiet, one tidy row */
.gate-sub { margin: 1rem 0 1.75rem; font-size: 1.0625rem; line-height: 1.5; color: rgba(254,249,239,.82); }
.gate-perks { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.125rem; margin: 1.25rem 0 .75rem; font-size: .875rem; color: rgba(254,249,239,.85); }
.gate-perks li { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.gate-perks svg { flex: none; width: 1rem; height: 1rem; color: var(--orange-on-dark); }

/* 4 · the action */
.gate-google { display: flex; align-items: center; justify-content: center; gap: .75rem; width: 100%; height: 3.5rem; border-radius: 999px;
  background: #fff; color: #1f1f1f; font: 600 1.0625rem/1 var(--font-sans);
  box-shadow: 0 .625rem 1.75rem rgba(176,90,54,.38); transition: transform .2s var(--ease), box-shadow .2s ease; }
.gate-google:hover { transform: translateY(-2px); box-shadow: 0 .875rem 2.25rem rgba(176,90,54,.55); }
.gate-google:active { transform: none; }
.gate-google:focus-visible { outline: 2px solid var(--beige); outline-offset: 3px; }
.gate-google svg { width: 1.375rem; height: 1.375rem; }

/* 5 · the exits: clearly secondary, then the small print */
/* email sign-up */
.gate-or { display: flex; align-items: center; gap: .875rem; width: 100%; margin: .75rem 0 1rem; font-size: .8125rem; color: rgba(254,249,239,.6); }
.gate-or::before, .gate-or::after { content: ""; flex: 1; height: 1px; background: rgba(254,249,239,.14); }
.gate-form { display: grid; gap: .625rem; width: 100%; }
.gate-reveal { display: grid; gap: .625rem; animation: gate-reveal .3s var(--ease) both; }
.gate-reveal[hidden] { display: none; }
@keyframes gate-reveal { from { opacity: 0; transform: translateY(-.375rem); } to { opacity: 1; transform: none; } }
.gate-input { width: 100%; height: 3.25rem; padding: 0 1.25rem; border: 1.5px solid rgba(254,249,239,.2); border-radius: 999px; background: rgba(254,249,239,.06); color: var(--beige); font: 400 1rem var(--font-sans); transition: border-color .2s ease, background-color .2s ease; }
.gate-input::placeholder { color: rgba(254,249,239,.6); }
.gate-input:focus { outline: none; border-color: var(--orange-on-dark); background: rgba(254,249,239,.1); }
.gate-pwwrap { position: relative; }
.gate-pwwrap .gate-input { padding-right: 3.25rem; }
.gate-eye { position: absolute; top: 50%; right: .5rem; transform: translateY(-50%); display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; background: none; color: rgba(254,249,239,.7); cursor: pointer; transition: color .2s ease, background-color .2s ease; }
.gate-eye:hover { color: var(--beige); background: rgba(254,249,239,.1); }
.gate-eye:focus-visible { outline: 2px solid var(--orange-on-dark); outline-offset: 1px; }
.gate-eye svg { width: 1.25rem; height: 1.25rem; }
.gate-eye .e-hide, .gate-eye.on .e-show { display: none; }
.gate-eye.on .e-hide { display: block; }
.gate-submit { height: 3.25rem; border: 0; border-radius: 999px; background: var(--orange); color: var(--beige); font: 600 1.0625rem var(--font-sans); cursor: pointer; transition: background-color .2s ease; }
.gate-submit:hover:not(:disabled) { background: #c46a43; }
.gate-submit:disabled { opacity: .7; cursor: progress; }
.gate-msg { min-height: 0; font-size: .875rem; line-height: 1.45; color: var(--error-on-dark); text-align: left; padding-inline: .5rem; }
.gate-msg:empty { display: none; }
.gate-legal { width: 100%; margin-top: .75rem; padding-top: 1rem; border-top: 1px solid rgba(254,249,239,.1); font-size: .75rem; line-height: 1.5; color: rgba(254,249,239,.6); }
.gate-legal a { text-decoration: underline; text-underline-offset: 2px; }
.gate-legal a:hover { color: var(--beige); }

@media (max-width: 560px) {
  .gate { width: 100%; margin: auto 0 0; }
  .gate-card { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-width: 0; padding: 2rem 1.5rem calc(1.25rem + env(safe-area-inset-bottom)); }
  .gate-card::after { content: ""; position: absolute; top: .5rem; left: 50%; width: 2.5rem; height: .25rem; margin-left: -1.25rem; border-radius: 999px; background: rgba(254,249,239,.22); } /* sheet grabber */
  .gate[open] { animation-name: gate-sheet; }
  @keyframes gate-sheet { from { transform: translateY(100%); } to { transform: none; } }
}
@media (prefers-reduced-motion: reduce) { .gate[open], .gate[open]::backdrop, .gate-reveal { animation: none; } }

/* ─── HEADER: signed-in state ───────────────────────────────────────── */
.nav-user { display: inline-flex; align-items: center; gap: .625rem; min-width: 0; font-weight: 600; font-size: 1rem; }
.nav-avatar { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--orange); color: var(--beige); font-size: .9375rem; }
.nav-name { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .nav-name { display: none; } }

/* ─── KEEP PLAYING (related games, on every game page) ──────────────── */
.more-games { padding: 0 0 var(--section); }
.mg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: .875rem; border-bottom: 1px solid var(--dark-cream); }
.mg-title { font-family: var(--font-serif); font-weight: 300; font-size: var(--h3); line-height: 1.1; }
.mg-all { font-weight: 600; color: var(--orange); white-space: nowrap; }
.mg-all:hover { text-decoration: underline; text-underline-offset: 4px; }
.mg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .875rem; }
@media (max-width: 960px) { .mg-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .mg-grid { grid-template-columns: 1fr; } }
.mg-card { display: flex; align-items: center; gap: 1rem; padding: .625rem 1rem .625rem .625rem; background: var(--cream); border-radius: var(--radius-lg); transition: transform .2s var(--ease), background-color .2s ease; }
.mg-card:hover { transform: translateY(-2px); background: var(--orange-10); }
.mg-ico { flex: none; display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: calc(var(--radius-lg) - .25rem); background: var(--midnight); }
.mg-ico svg { width: 78%; height: 78%; }
.mg-txt { display: grid; gap: .125rem; min-width: 0; }
.mg-label { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; color: var(--orange); }
.mg-name { font-family: var(--font-serif); font-weight: 300; font-size: 1.375rem; line-height: 1.15; }

/* ─── SHARE SHEET (result card) ─────────────────────────────────────── */
.share-sheet { border: 0; padding: 0; background: transparent; color: var(--beige); max-width: none; width: min(100% - 2rem, 26rem); margin: auto; overflow: visible; }
.share-sheet::backdrop { background: rgba(20,21,24,.66); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.share-sheet[open] { animation: gate-in .4s var(--ease) both; }
.share-card { position: relative; display: grid; justify-items: center; gap: 1rem; padding: 1.75rem 1.5rem 1.25rem; background: var(--midnight); border: 1px solid rgba(254,249,239,.1); border-radius: var(--radius-xl); box-shadow: 0 2.5rem 5rem rgba(0,0,0,.45); }
.share-title { font-family: var(--font-serif); font-weight: 300; font-size: 1.75rem; line-height: 1.1; }
.share-title em { font-style: italic; color: var(--orange-on-dark); }
.share-preview { width: auto; max-width: 100%; max-height: min(52vh, 26rem); aspect-ratio: 4 / 5; border-radius: 1rem; box-shadow: 0 1rem 2rem rgba(0,0,0,.35); background: #222; }
.share-actions { display: grid; gap: .5rem; width: 100%; }
video.share-preview { aspect-ratio: 9 / 16; object-fit: cover; }
.share-preview[hidden] { display: none; }
.share-seg { display: inline-flex; padding: .25rem; gap: .25rem; border-radius: 999px; background: rgba(254,249,239,.08); }
.share-seg[hidden] { display: none; }
.share-seg button:disabled { opacity: .55; cursor: default; }
.share-wait { aspect-ratio: 4 / 5; height: min(52vh, 26rem); max-height: none; background: linear-gradient(100deg, #2a2b2f 30%, #3a3b40 50%, #2a2b2f 70%) 0 0 / 300% 100%; animation: share-wait 1.2s linear infinite; }
@keyframes share-wait { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (max-width: 600px) { .share-wait { height: 42vh; } }
.share-sheet[data-busy] .share-actions > * { opacity: .45; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .share-wait { animation: none; } }
.share-seg button { appearance: none; border: 0; border-radius: 999px; padding: .4rem 1.1rem; background: transparent; color: var(--beige); font: 600 .875rem var(--font-sans); cursor: pointer; }
.share-seg button[aria-pressed="true"] { background: var(--beige); color: var(--midnight); }
.share-primary, .share-secondary { display: flex; align-items: center; justify-content: center; width: 100%; height: 3.25rem; border-radius: 999px; font: 600 1rem var(--font-sans); cursor: pointer; text-decoration: none; transition: background-color .2s ease, color .2s ease; }
.share-primary { border: 0; background: var(--beige); color: var(--midnight); }
.share-primary:hover { background: #fff; }
.share-secondary { border: 1.5px solid rgba(254,249,239,.25); background: transparent; color: var(--beige); }
.share-secondary:hover { background: rgba(254,249,239,.08); }
.share-actions [hidden] { display: none; }
.share-note { min-height: 1.2em; font-size: .875rem; color: rgba(254,249,239,.75); text-align: center; }
.share-note:empty { display: none; }
@media (max-width: 560px) {
  .share-sheet { width: 100%; margin: auto 0 0; }
  .share-card { border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding-bottom: calc(1.25rem + env(safe-area-inset-bottom)); }
  .share-sheet[open] { animation-name: gate-sheet; }
  .share-preview { max-height: 42vh; }
}
@media (prefers-reduced-motion: reduce) { .share-sheet[open] { animation: none; } }

/* "A friend shared a score of 24. Your turn." on links opened from a share */
.vs-banner { justify-self: center; display: inline-block; margin-bottom: .5rem; padding: .625rem 1.125rem; border-radius: 999px; background: var(--orange-10); color: var(--midnight); font-size: .9375rem; text-align: center; }
.vs-banner strong { color: var(--orange); font-weight: 600; }

/* ─── PLAY AREA: shared brand base for canvas games ─────────────────────
   Every game's play area sits on Lonvi charcoal with a warm orange glow, the same look as the share cards.
   Canvas code should use the same values: bg #2A2B2F, deep #1F2024, glow rgba(176,90,54,.45),
   text #FEF9EF, dim rgba(254,249,239,.7), accent #E59A73, brand #B05A36. */
:root {
  --play-bg: #2A2B2F;
  --play-deep: #1F2024;
  --play-glow: rgba(176,90,54,.45);
  --play-radius: var(--radius-xl);
  --play-shadow: 0 1.5rem 3rem rgba(42,43,47,.25);
}
.play-area { position: relative; overflow: hidden; border-radius: var(--play-radius); box-shadow: var(--play-shadow);
  background: radial-gradient(120% 70% at 50% 0%, var(--play-glow), transparent 60%), linear-gradient(var(--play-bg), var(--play-deep)); }

/* Watermark inside the play area, so screen recordings cropped to the game still say Lonvi.
   Added by games-share.js to any element with data-watermark="bl|br|bc|tl|tr" (default bc). */
.lonvi-wm { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: .4rem; pointer-events: none; user-select: none;
  font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .06em; color: rgba(254,249,239,.62); white-space: nowrap; }
.lonvi-wm i { display: grid; place-items: center; width: 1.05rem; height: 1.05rem; border-radius: .3rem; background: #B05A36; font-style: normal; }
.lonvi-wm svg { width: .55rem; height: .55rem; }
.lonvi-wm[data-pos="bl"] { left: .875rem; bottom: .75rem; }
.lonvi-wm[data-pos="br"] { right: .875rem; bottom: .75rem; }
.lonvi-wm[data-pos="bc"] { left: 50%; bottom: .75rem; transform: translateX(-50%); }
.lonvi-wm[data-pos="tl"] { left: .875rem; top: .75rem; }
.lonvi-wm[data-pos="tr"] { right: .875rem; top: .75rem; }
.lonvi-wm[data-tone="dark"] { color: rgba(42,43,47,.6); }

/* ─── GAME SHELL: full-screen game pages ─────────────────────────────────
   <body class="gs"> + one <div class="gs-stage"> that fills the viewport (no page scroll), with:
   .gs-top (home mark, spacer, ? help button, sound button), the game in between, .gs-dock along the bottom,
   and a <dialog class="gs-help" id="help"> holding How to play, Why, FAQ, Keep playing and the legal line.
   games-share.js wires [data-help-open] / [data-help-close] and opens the sheet for #faq / #how-to-play links.
   Reference page: perfect-circle.html. */
html:has(body.gs), body.gs { height: 100%; overflow: hidden; overscroll-behavior: none; }
body.gs { background: var(--play-bg); }
.gs-stage { position: fixed; inset: 0; height: 100vh; overflow: hidden; color: var(--beige); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  background: radial-gradient(120% 60% at 50% 0%, var(--play-glow), transparent 60%), linear-gradient(var(--play-bg), var(--play-deep)); }
@supports (height: 100dvh) { .gs-stage { height: 100dvh; } }
.gs-stage :focus-visible { outline: 2px solid var(--orange-on-dark); outline-offset: 2px; }

.gs-top { position: absolute; z-index: 6; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: .5rem; pointer-events: none;
  padding: calc(env(safe-area-inset-top) + .75rem) calc(env(safe-area-inset-right) + .75rem) 0 calc(env(safe-area-inset-left) + .75rem); }
.gs-top > * { pointer-events: auto; }
.gs-spacer { flex: 1; pointer-events: none !important; }
.gs-btn { appearance: none; flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 50%; background: rgba(254,249,239,.1); color: var(--beige); cursor: pointer; transition: background-color .2s ease; }
.gs-btn:hover { background: rgba(254,249,239,.2); }
/* keep the top-bar icons readable over light game content (gates, illusions) */
.gs-top .gs-btn:not(.gs-home) { background: rgba(31,32,36,.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.gs-top .gs-btn:not(.gs-home):hover { background: rgba(31,32,36,.72); }
.gs-btn svg { width: 1.25rem; height: 1.25rem; }
.gs-home { background: transparent; }
.gs-home:hover { background: transparent; }
.gs-home .logo-mark { width: 2.25rem; height: 2.25rem; }
/* sound toggle: put both icons in the button, class "on" and "off" */
.gs-btn[aria-pressed="false"] .on, .gs-btn[aria-pressed="true"] .off { display: none; }

.gs-dock { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; display: grid; justify-items: center; gap: .625rem; text-align: center; pointer-events: none;
  padding: 0 calc(env(safe-area-inset-right) + 1rem) calc(env(safe-area-inset-bottom) + 2.5rem) calc(env(safe-area-inset-left) + 1rem); }
.gs-dock > * { pointer-events: auto; }
.gs-chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.gs-chip { appearance: none; border: 1.5px solid rgba(254,249,239,.35); background: transparent; color: var(--beige); border-radius: 999px; padding: .5rem 1rem; font: 600 .875rem var(--font-sans); cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.gs-chip:hover { background: rgba(254,249,239,.1); }
.gs-chip[aria-pressed="true"] { background: var(--beige); border-color: var(--beige); color: var(--midnight); }
.gs-stage .btn--big { height: 3.25rem; padding: 0 2.25rem; font-size: 1.0625rem; }
.gs-stage .btn--ghost { --bg: transparent; --fg: var(--beige); --bd: rgba(254,249,239,.5); --hbg: var(--beige); --hfg: var(--midnight); --hbd: var(--beige); }
.gs-stage .lonvi-wm { bottom: calc(env(safe-area-inset-bottom) + .75rem); }

/* help sheet */
.gs-help { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: var(--beige); color: var(--midnight); overflow-y: auto; overscroll-behavior: contain; }
.gs-help::backdrop { background: rgba(31,32,36,.5); }
.gs-help[open] { animation: gs-help-in .28s var(--ease); }
@keyframes gs-help-in { from { opacity: 0; transform: translateY(1.5rem); } to { opacity: 1; transform: none; } }
.gs-help-in { max-width: 44rem; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 1rem) 1.25rem calc(env(safe-area-inset-bottom) + 6rem); }
.gs-help-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0; background: var(--beige); }
.gs-help-top a:hover { color: var(--orange); text-decoration: underline; }
.gs-help-x { appearance: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: var(--cream); color: var(--midnight); cursor: pointer; }
.gs-help-x:hover { background: var(--dark-cream); }
.gs-help-x svg { width: 1.25rem; height: 1.25rem; }
.gs-help-h { margin-top: .75rem; font-family: var(--font-serif); font-weight: 300; font-size: clamp(2.25rem, 8vw, 3.25rem); line-height: 1.05; }
.gs-help-h:focus { outline: none; }
.gs-help-lede { margin-top: .5rem; color: var(--gray); font-size: 1.0625rem; }
.gs-help .wrap { width: 100%; padding-inline: 0; max-width: none; }
.gs-help .how, .gs-help .info, .gs-help .faq, .gs-help .more-games { padding: 2.5rem 0 0; }
.gs-help .head-block { text-align: left; align-items: start; justify-items: start; margin-bottom: 1.25rem; }
.gs-help .head-block .h2 { text-align: left; font-size: clamp(1.75rem, 6vw, 2.25rem); }
.gs-help .how ol { display: grid; gap: 1rem; counter-reset: s; max-width: none; margin: 0; }
.gs-help .how li { counter-increment: s; display: grid; grid-template-columns: 2rem 1fr; gap: .75rem; color: var(--gray); }
.gs-help .how li::before { content: counter(s); font-family: var(--font-mono); color: var(--orange); font-size: 1.25rem; }
.gs-help .how li strong { color: var(--midnight); font-weight: 600; }
.gs-help .prose { display: grid; gap: 1rem; color: var(--gray); max-width: none; margin: 0; }
.gs-help .safety { margin: 1.5rem 0 0; max-width: none; padding: 1.25rem 1.5rem; background: var(--cream); border-radius: var(--radius-lg); font-size: .9375rem; color: var(--gray); }
.gs-help .safety strong { color: var(--midnight); }
.gs-help .faq-list { display: grid; gap: .75rem; max-width: none; margin: 0; }
.gs-help .faq-list details { background: var(--cream); border-radius: var(--radius-lg); padding: 1.125rem 1.5rem; }
.gs-help .faq-list summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-weight: 600; color: var(--midnight); }
.gs-help .faq-list summary::-webkit-details-marker { display: none; }
.gs-help .faq-list summary::after { content: "+"; flex: none; font-family: var(--font-mono); font-size: 1.25rem; line-height: 1; color: var(--orange); }
.gs-help .faq-list details[open] summary::after { content: "\2212"; }
.gs-help .faq-list details p { margin-top: .75rem; color: var(--gray); }
.gs-help .mg-grid { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 600px) { .gs-help .mg-grid { grid-template-columns: 1fr; } }
.gs-help-foot { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--dark-cream); display: grid; gap: .75rem; font-size: .8125rem; color: var(--gray); }
.gs-help-foot a { text-decoration: underline; text-underline-offset: 3px; }
.gs-help-play { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 1.25rem); transform: translateX(-50%); box-shadow: 0 .75rem 2rem rgba(42,43,47,.25); }
@media (prefers-reduced-motion: reduce) { .gs-help[open] { animation: none; } }
