/* ============================================
   Indie Games Show — design system (foundation)

   Source: Master Spec §39, §43.1 and the FINAL Master
   Mockup Board v3.6. Dark cinematic backdrop, glass
   surfaces, a vivid blue primary action, a gold
   secondary action, cyan for emphasis.

   Three layers, in this order:
     1. Tokens      — every colour, radius, size, shadow.
     2. Contexts    — public / developer / staff; public
                      desktop and public mobile differ by
                      breakpoint. Theme::css() overrides
                      the context tokens from the Founder's
                      Theme Manager. Screens never hard-code
                      a theme value; they read a token.
     3. Components  — the shared parts every screen uses.

   Page-specific layout lives in app.css / panel.css
   and is rebuilt screen by screen.
   ============================================ */

/* ── 1. Tokens ─────────────────────────────── */

:root {
  /* Palette primitives. Referenced only from the semantic tokens below. */
  --ink-950: #040a12;
  --ink-900: #07111d;
  --ink-850: #0a1826;
  --ink-800: #0e2032;
  --ink-700: #152d45;
  --ink-600: #1f3d5c;
  --blue-400: #4d8dff;
  --blue-500: #1f6bff;
  --blue-600: #1257e6;
  --cyan-300: #7de6f8;
  --cyan-400: #3fd3f0;
  --gold-300: #ffd27a;
  --gold-400: #f2b544;
  --gold-600: #b9801a;
  --green-400: #43d98b;
  --red-400: #ff5f6d;
  --orange-400: #ff9f43;
  --violet-400: #a78bfa;

  /* Semantic tokens (public desktop defaults). */
  --ds-font: "Inter", ui-sans-serif, system-ui, "Segoe UI", Arial, sans-serif;

  --ds-page: var(--ink-900);
  --ds-bg-image: none;
  --ds-bg-position: center center;
  --ds-bg-size: cover;
  --ds-bg-blur: 0px;
  --ds-overlay: 0.55;          /* 0..0.9, Theme Manager "Overlay Opacity" */
  --ds-vignette: 1;            /* 0 or 1 */

  --ds-primary: var(--blue-500);
  --ds-on-primary: #ffffff;
  --ds-accent: var(--cyan-400);          /* links, "see all", emphasis */
  --ds-gold: var(--gold-400);            /* secondary action, recognition */

  --ds-surface: rgba(9, 22, 37, 0.72);          /* glass panel */
  --ds-surface-solid: #0b1b2c;                    /* where blur is unavailable */
  --ds-surface-raised: rgba(18, 38, 60, 0.78);
  --ds-surface-hover: rgba(26, 52, 80, 0.85);
  --ds-surface-sunken: rgba(4, 12, 22, 0.66);     /* inputs, wells */
  --ds-glass-blur: 14px;
  --ds-border: rgba(120, 190, 240, 0.16);
  --ds-border-strong: rgba(120, 205, 250, 0.36);
  --ds-divider: rgba(255, 255, 255, 0.07);

  /* Text on --ds-page. Contrast measured on #07111d. */
  --ds-text-strong: #ffffff;   /* 18.6:1 */
  --ds-text: #d6e2ef;          /* 14.3:1 */
  --ds-text-muted: #a3b4c7;    /*  9.1:1 */
  --ds-text-faint: #8193a8;    /*  6.0:1 */

  --ds-ok: var(--green-400);
  /* IndieGamesShow Age Rating (§57.7). Colours the Theme Manager may change;
     the numbers they sit behind are policy and never do. */
  --age-3: #43d98b;
  --age-7: #7ccf4a;
  --age-12: #f2b544;
  --age-16: #ff9f43;
  --age-18: #ff5f6d;
  --ds-warn: var(--orange-400);
  --ds-bad: var(--red-400);
  --ds-info: var(--cyan-400);
  --ds-live: #ff3b4e;

  --ds-radius-xs: 6px;
  --ds-radius-sm: 8px;
  --ds-radius-md: 12px;
  --ds-radius-lg: 16px;
  --ds-radius-xl: 22px;
  --ds-radius-pill: 999px;

  --ds-space-1: 4px;
  --ds-space-2: 8px;
  --ds-space-3: 12px;
  --ds-space-4: 16px;
  --ds-space-5: 20px;
  --ds-space-6: 24px;
  --ds-space-8: 32px;
  --ds-space-10: 40px;
  --ds-space-12: 56px;

  --ds-fs-2xs: 0.75rem;
  --ds-fs-xs: 0.8125rem;
  --ds-fs-sm: 0.875rem;
  --ds-fs-md: 0.9375rem;
  --ds-fs-lg: 1.0625rem;
  --ds-fs-xl: 1.3125rem;
  --ds-fs-2xl: clamp(1.4rem, 2.6vw, 1.75rem);
  --ds-fs-3xl: clamp(1.9rem, 4.4vw, 3rem);

  --ds-shadow-1: 0 6px 20px rgba(0, 0, 0, 0.32);
  --ds-shadow-2: 0 18px 48px rgba(0, 0, 0, 0.5);
  --ds-glow-primary: 0 6px 22px rgba(31, 107, 255, 0.42);
  --ds-glow-gold: 0 0 20px rgba(242, 181, 68, 0.26);
  --ds-glow-accent: 0 0 0 1px var(--ds-border-strong), 0 10px 30px rgba(63, 211, 240, 0.14);
  --ds-focus: 0 0 0 2px var(--ds-page), 0 0 0 4px var(--ds-accent);

  --ds-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ds-fast: 0.16s;
  --ds-slow: 0.32s;

  --ds-header-h: 64px;
  --ds-container: 1240px;
  --ds-gutter: 16px;

}

/* Derived tokens. Declared on body, not :root, so they follow the context
   values Theme::css() sets on body — a custom property resolves where it is
   declared, and one declared on :root would keep the default primary. */
body {
  --ds-primary-strong: color-mix(in srgb, var(--ds-primary) 80%, #000 20%);
  --ds-primary-soft: color-mix(in srgb, var(--ds-primary) 18%, transparent);
  --ds-accent-soft: color-mix(in srgb, var(--ds-accent) 12%, transparent);
  --ds-gold-soft: color-mix(in srgb, var(--ds-gold) 14%, transparent);
  --ds-glow-primary: 0 6px 22px color-mix(in srgb, var(--ds-primary) 45%, transparent);
  --ds-glow-gold: 0 0 20px color-mix(in srgb, var(--ds-gold) 28%, transparent);
  --ds-font-display: var(--ds-font);
  --accent-deep: var(--ds-primary-strong);
  --btn-amber: linear-gradient(180deg, var(--ds-primary), var(--ds-primary-strong));
  --btn-teal: linear-gradient(180deg, var(--ds-primary), var(--ds-primary-strong));
  --ds-focus: 0 0 0 2px var(--ds-page), 0 0 0 4px var(--ds-accent);

  /* ── Legacy names, pointed at the tokens ──
     Screens not yet rebuilt still read these. They take the new visual
     language through them; each disappears as its screen is rebuilt. */
  --bg: var(--ds-page);
  --bg-darkest: rgba(4, 10, 18, 0.86);
  --panel: var(--ds-surface);
  --panel-2: var(--ds-surface-raised);
  --panel-3: var(--ds-surface-hover);
  --accent: var(--ds-accent);
  --accent-bright: var(--cyan-300);
  --amber: var(--ds-gold);
  --amber-dark: var(--gold-600);
  --warn: var(--ds-warn);
  --bad: var(--ds-bad);
  --ok: var(--ds-ok);
  --fg: var(--ds-text);
  --fg-strong: var(--ds-text-strong);
  --fg-muted: var(--ds-text-muted);
  --fg-dim: var(--ds-text-faint);
  --fg-faint: var(--ds-text-faint);
  --line: var(--ds-border);
  --line-soft: var(--ds-divider);
  --line-strong: var(--ds-border-strong);
  --btn-amber-hover: linear-gradient(180deg, var(--blue-400), var(--ds-primary));
  --btn-grey: var(--ds-surface-raised);
  --radius: var(--ds-radius-md);
  --radius-sm: var(--ds-radius-sm);
  --shadow: var(--ds-shadow-1);
  --ease: var(--ds-ease);
}

/* ── 2. Contexts ───────────────────────────────
   Set on <body data-context="…">. Theme::css() prints the Founder's
   published values after this file, for the same selectors. */

body[data-context="developer"] {
  --ds-overlay: 0.72;
  --ds-surface: rgba(9, 22, 37, 0.82);
}

body[data-context="staff"] {
  /* §38.3/§43: staff screens are for work — the backdrop recedes further
     and surfaces are more opaque, so dense tables stay readable. */
  --ds-overlay: 0.82;
  --ds-surface: rgba(8, 19, 32, 0.9);
  --ds-surface-raised: rgba(16, 34, 54, 0.92);
}

/* Public mobile is the public context at phone width (§39.1). */
@media (max-width: 720px) {
  :root { --ds-header-h: 56px; }
  body[data-context="public"] { --ds-overlay: 0.5; }
}

/* ── Base ──────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--ds-page);
  color: var(--ds-text);
  font-family: var(--ds-font);
  font-size: var(--ds-fs-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--ds-font-display);
  color: var(--ds-text-strong);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--ds-fs-3xl); letter-spacing: -0.02em; }
h2 { font-size: var(--ds-fs-2xl); }
h3 { font-size: var(--ds-fs-lg); font-weight: 600; }
h4 { font-size: var(--ds-fs-md); font-weight: 600; }
p { margin: 0 0 0.75rem; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--ds-accent); color: var(--ink-950); }
:focus-visible { outline: none; box-shadow: var(--ds-focus); border-radius: var(--ds-radius-xs); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(120, 170, 220, 0.28); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(63, 211, 240, 0.55); background-clip: padding-box; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 200;
  padding: 10px 16px; border-radius: var(--ds-radius-sm);
  background: var(--ds-primary); color: var(--ds-on-primary); font-weight: 600;
}
.skip-link:focus { left: 8px; }

/* ── Backdrop ──────────────────────────────────
   One fixed layer behind everything: the context's picture, then a
   darkening gradient so text stays readable anywhere on it, then a
   vignette. With no picture set, only the navy and two soft glows
   remain — nothing pretends to be art. */

.ds-backdrop {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background-color: var(--ds-page);
  pointer-events: none;
}
/* Board 05–10: the public pages sit on dark navy; the theme picture is shown
   in hero bands (home, game detail), not behind every page. Panels keep it. */
/* Founder request 2026-09-18: the theme picture sits behind the whole page,
   not only the hero band. The overlay below keeps text readable over it. */
.ds-backdrop::before {
  content: ""; position: absolute; inset: calc(var(--ds-bg-blur) * -2);
  background-image: var(--ds-bg-image);
  background-size: var(--ds-bg-size);
  background-position: var(--ds-bg-position);
  background-repeat: no-repeat;
  filter: blur(var(--ds-bg-blur));
}
.ds-backdrop::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgb(4 10 18 / 0) 45%, rgb(4 10 18 / calc(0.75 * var(--ds-vignette))) 100%),
    linear-gradient(180deg,
      rgb(4 10 18 / calc(var(--ds-overlay) * 0.3)) 0%,
      rgb(4 10 18 / calc(var(--ds-overlay) * 0.7)) 38%,
      rgb(4 10 18 / var(--ds-overlay)) 70%,
      rgb(4 10 18 / calc(var(--ds-overlay) + (1 - var(--ds-overlay)) * 0.5)) 100%),
    radial-gradient(900px 520px at 12% -8%, rgba(63, 211, 240, 0.12), transparent 62%),
    radial-gradient(900px 620px at 100% 0%, rgba(31, 107, 255, 0.14), transparent 62%);
}

/* ── Layout helpers ────────────────────────── */

.container { width: 100%; max-width: var(--ds-container); margin-inline: auto; padding-inline: var(--ds-gutter); }
.section { padding-block: var(--ds-space-8); }
.stack > * + * { margin-top: var(--ds-space-2); }
.center { text-align: center; }
.narrow { max-width: 720px; margin-inline: auto; }
.narrow-text { max-width: 66ch; }
.full { width: 100%; }
.right { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.grid { display: grid; gap: var(--ds-space-4); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.rule { border: 0; height: 1px; margin: var(--ds-space-4) 0; background: var(--ds-divider); }

.muted { color: var(--ds-text-muted); }
.dim { color: var(--ds-text-faint); }
.small { font-size: var(--ds-fs-sm); }
.fineprint { margin: 6px 0 0; font-size: var(--ds-fs-xs); line-height: 1.45; color: var(--ds-text-faint); }
.grad { color: var(--ds-accent); }
.orb, .grid-lines, .ring { display: none; }

/* ── 3. Components ─────────────────────────── */

/* Glass surface */
.surface, .ds-glass {
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-md);
  box-shadow: var(--ds-shadow-1);
  -webkit-backdrop-filter: blur(var(--ds-glass-blur)) saturate(1.2);
  backdrop-filter: blur(var(--ds-glass-blur)) saturate(1.2);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .surface, .ds-glass { background: var(--ds-surface-solid); }
}
.pad { padding: var(--ds-space-5); }

/* Icons: inline SVG from icon(), sized by font-size. */
.ico { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ico-fill { fill: currentColor; stroke: none; }

/* Buttons */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 9px 18px;
  border: 1px solid transparent; border-radius: var(--ds-radius-sm);
  font: inherit; font-size: var(--ds-fs-sm); font-weight: 600; line-height: 1.2;
  color: var(--ds-text-strong); text-align: center; white-space: nowrap;
  background: var(--ds-surface-raised);
  cursor: pointer; user-select: none;
  transition: background var(--ds-fast) var(--ds-ease), border-color var(--ds-fast) var(--ds-ease),
              box-shadow var(--ds-fast) var(--ds-ease), transform var(--ds-fast) var(--ds-ease), color var(--ds-fast);
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; box-shadow: none; }
.btn-lg { min-height: 48px; padding: 12px 26px; font-size: var(--ds-fs-md); border-radius: var(--ds-radius-sm); }
.btn.small, .btn-sm { min-height: 32px; padding: 6px 12px; font-size: var(--ds-fs-xs); }
.btn-block { width: 100%; }

.btn-primary, .btn-ok {
  background: linear-gradient(180deg, color-mix(in srgb, var(--ds-primary) 88%, #fff 12%), var(--ds-primary-strong));
  border-color: color-mix(in srgb, var(--ds-primary) 70%, #fff 30%);
  color: var(--ds-on-primary);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset;
}
.btn-primary:hover, .btn-ok:hover { box-shadow: var(--ds-glow-primary), 0 1px 0 rgba(255, 255, 255, 0.22) inset; filter: brightness(1.06); }

/* The gold outline: the second action beside a primary one (board 01, 15). */
.btn-gold {
  background: rgba(10, 18, 28, 0.72);
  border-color: var(--ds-gold);
  color: var(--ds-text-strong);
}
.btn-gold .ico { color: var(--ds-gold); }
.btn-gold:hover { background: var(--ds-gold-soft); box-shadow: var(--ds-glow-gold); }
.btn-gold-solid { background: linear-gradient(180deg, var(--gold-300), var(--ds-gold)); border-color: var(--gold-300); color: #1d1405; }
.btn-gold-solid:hover { box-shadow: var(--ds-glow-gold); }

.btn-ghost {
  background: var(--ds-surface-raised);
  border-color: var(--ds-border);
  color: var(--ds-text);
}
.btn-ghost:hover { border-color: var(--ds-border-strong); background: var(--ds-surface-hover); color: var(--ds-text-strong); }

.btn-quiet { background: transparent; color: var(--ds-text-muted); }
.btn-quiet:hover { background: var(--ds-accent-soft); color: var(--ds-text-strong); }

.btn-bad { background: rgba(255, 95, 109, 0.14); border-color: rgba(255, 95, 109, 0.5); color: #ffc2c8; }
.btn-bad:hover { background: rgba(255, 95, 109, 0.26); color: #fff; }

.btn-icon { min-width: 40px; padding-inline: 0; }
.btn[aria-busy="true"] { color: transparent !important; pointer-events: none; }
.btn[aria-busy="true"]::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  animation: ds-spin 0.7s linear infinite;
}
@keyframes ds-spin { to { transform: rotate(360deg); } }

.link-btn { padding: 0; border: 0; background: none; color: var(--ds-accent); font: inherit; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; }

/* Header */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 12, 22, 0.62);
  border-bottom: 1px solid var(--ds-border);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  transition: background var(--ds-slow) var(--ds-ease);
}
.nav.is-scrolled { background: rgba(4, 10, 18, 0.88); }
.nav-inner { display: flex; align-items: center; gap: var(--ds-space-3); height: var(--ds-header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--ds-text-strong); }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: var(--ds-accent); }
.brand-mark .ico { width: 30px; height: 30px; stroke-width: 1.6; }
.brand-logo { display: block; width: auto; object-fit: contain; }
.brand-text { font-size: 1.12rem; font-weight: 700; letter-spacing: -0.01em; color: var(--ds-text-strong); }
.brand-text .grad { color: var(--ds-accent); }

.nav-links { display: none; gap: 2px; margin-left: var(--ds-space-4); }
.nav-links a {
  position: relative; padding: 8px 12px; border-radius: var(--ds-radius-sm);
  font-size: var(--ds-fs-sm); font-weight: 500; color: var(--ds-text-muted);
  transition: color var(--ds-fast);
}
.nav-links a:hover { color: var(--ds-text-strong); }
.nav-links a[aria-current="page"] { color: var(--ds-text-strong); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
  border-radius: 2px; background: var(--ds-accent);
}

.nav-cta { display: flex; align-items: center; gap: var(--ds-space-2); margin-left: auto; }

.account { position: relative; margin-left: auto; }
.account-btn {
  display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px;
  border: 1px solid var(--ds-border); border-radius: var(--ds-radius-pill);
  background: var(--ds-surface-raised); color: var(--ds-text); font: inherit; cursor: pointer;
}
.account-btn:hover { border-color: var(--ds-border-strong); color: var(--ds-text-strong); }
.account-name { display: none; font-size: var(--ds-fs-sm); font-weight: 500; }

.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 248px; overflow: hidden;
  background: rgba(8, 20, 34, 0.96); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-md);
  box-shadow: var(--ds-shadow-2);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.menu-head { display: grid; gap: 2px; padding: 12px 14px; border-bottom: 1px solid var(--ds-divider); }
.menu-head strong { color: var(--ds-text-strong); font-weight: 600; }
.menu-head span { font-size: var(--ds-fs-xs); color: var(--ds-text-faint); }
.menu-head .chip { justify-self: start; margin-top: 6px; }
.menu > a { display: flex; align-items: center; gap: 10px; padding: 9px 14px; font-size: var(--ds-fs-sm); color: var(--ds-text); }
.menu > a:hover { background: var(--ds-surface-hover); color: var(--ds-text-strong); }
.menu-form { border-top: 1px solid var(--ds-divider); }
.menu-danger { width: 100%; padding: 10px 14px; border: 0; background: none; text-align: left;
  color: var(--ds-bad); font-size: var(--ds-fs-sm); cursor: pointer; }
.menu-danger:hover { background: rgba(255, 95, 109, 0.12); }

.nav-mobile { background: rgba(4, 10, 18, 0.96); border-top: 1px solid var(--ds-divider); }
.nav-mobile .container { display: grid; gap: 2px; padding-block: 10px; }
.nav-mobile a { padding: 11px 12px; border-radius: var(--ds-radius-sm); color: var(--ds-text); font-size: var(--ds-fs-md); }
.nav-mobile a:hover { background: var(--ds-surface-hover); color: var(--ds-text-strong); }

.account-caret { width: 14px; height: 14px; color: var(--ds-text-faint); }
/* Right-hand tools: icon links (search, notifications, messages), then the
   account or the sign-in pair (board 01, 03). */
.nav-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-icon {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: transparent; color: var(--ds-text-muted); cursor: pointer;
  transition: color var(--ds-fast), background var(--ds-fast);
}
.nav-icon .ico { width: 21px; height: 21px; }
.nav-icon:hover { color: var(--ds-text-strong); background: rgb(255 255 255 / 0.06); }
.nav-dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ds-accent); box-shadow: 0 0 0 2px var(--ink-950); }
.nav-tools .account { margin-left: 6px; }
.nav-tools .lang-switch { margin-inline: 4px; }
.nav-cta { margin-left: 4px; }

.menu-group { padding: 6px 0; }
.menu-group + .menu-group, .menu-group + .menu-form { border-top: 1px solid var(--ds-divider); }
.menu-group a { display: flex; align-items: center; gap: 10px; padding: 8px 14px; font-size: var(--ds-fs-sm); color: var(--ds-text); }
.menu-group a .ico { width: 17px; height: 17px; color: var(--ds-text-faint); }
.menu-group a:hover { background: var(--ds-surface-hover); color: var(--ds-text-strong); }
.menu-group a:hover .ico { color: var(--ds-accent); }
.menu-group .dot { margin-left: auto; }
.menu-label { display: block; padding: 6px 14px 2px; font-size: var(--ds-fs-2xs); font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ds-text-faint); }
.menu-lang { padding: 10px 14px; }
.menu-danger { display: flex; align-items: center; gap: 10px; }
.menu-danger .ico { width: 17px; height: 17px; }

.lang-switch { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 2px; gap: 2px;
  border: 1px solid var(--ds-border); border-radius: var(--ds-radius-pill); background: var(--ds-surface-sunken); }
.lang-opt { padding: 4px 9px; border-radius: var(--ds-radius-pill); font-size: var(--ds-fs-2xs); font-weight: 700;
  letter-spacing: 0.04em; color: var(--ds-text-faint); white-space: nowrap; }
.lang-opt:hover { color: var(--ds-text-strong); }
.lang-opt.is-active { background: var(--ds-accent-soft); color: var(--ds-accent); cursor: default; }
.nav-mobile .lang-switch { justify-self: start; margin-top: 10px; }

.nav-links a, .nav-cta .btn, .account-name { white-space: nowrap; }

@media (min-width: 1100px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .account-name { display: block; }
}
@media (max-width: 1240px) and (min-width: 1100px) {
  .nav-links { margin-left: var(--ds-space-2); }
  .nav-links a { padding-inline: 9px; }
}

/* Public mobile shell (board 04): brand, search, and the menu. Sign-in, the
   language choice and the rest move into the menu panel; the bottom bar
   carries the main places. Nothing in the bar may push the page sideways. */
@media (max-width: 720px) {
  .nav-inner { gap: var(--ds-space-2); }
  .nav-tools > .lang-switch, .nav-cta, .nav-icon-wide, .account-name, .account-caret { display: none !important; }
  .nav-tools { gap: 2px; }
  .nav-tools .account { margin-left: 2px; }
  .account-btn { padding: 2px; border-color: transparent; background: none; }
  .brand { min-width: 0; }
  .brand-text { font-size: 1rem; }
}

/* Notices (flash banners and inline states) */
.banner { font-size: var(--ds-fs-sm); }
.banner .container { padding-block: 10px; }
.banner-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.banner-ok, .notice-ok { background: rgba(67, 217, 139, 0.12); border-bottom: 1px solid rgba(67, 217, 139, 0.35); color: #bff3d6; }
.banner-bad, .notice-bad { background: rgba(255, 95, 109, 0.12); border-bottom: 1px solid rgba(255, 95, 109, 0.35); color: #ffd0d5; }
.banner-warn, .notice-warn { background: rgba(255, 159, 67, 0.12); border-bottom: 1px solid rgba(255, 159, 67, 0.35); color: #ffdcb8; }
.notice {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
  border: 1px solid var(--ds-border); border-radius: var(--ds-radius-sm);
  background: var(--ds-surface-raised); font-size: var(--ds-fs-sm);
}
.notice.notice-ok { border-color: rgba(67, 217, 139, 0.4); background: rgba(67, 217, 139, 0.12); color: #bff3d6; }
.notice.notice-bad { border-color: rgba(255, 95, 109, 0.4); background: rgba(255, 95, 109, 0.12); color: #ffd0d5; }
.notice.notice-warn { border-color: rgba(255, 159, 67, 0.4); background: rgba(255, 159, 67, 0.12); color: #ffdcb8; }
.notice .ico { margin-top: 2px; }
.notice-info { border-color: rgba(63, 211, 240, 0.35); background: var(--ds-accent-soft); color: var(--ds-text); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: var(--ds-radius-pill);
  border: 1px solid var(--ds-border); background: var(--ds-surface-raised);
  font-size: var(--ds-fs-xs); font-weight: 600; color: var(--ds-text);
}
.badge-live {
  background: var(--ds-live); border-color: transparent; color: #fff;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  animation: ds-pulse 1.6s infinite; }
@keyframes ds-pulse { 70% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
.badge-new { padding: 2px 8px; border-radius: var(--ds-radius-pill); background: var(--ds-primary); color: #fff;
  font-size: var(--ds-fs-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }

.dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--ds-radius-pill); background: var(--ds-bad); font-size: 0.66rem; font-weight: 700; color: #fff; }

/* Chips: genres, tags, statuses. Never a rating. */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: var(--ds-radius-xs); border: 1px solid rgba(63, 211, 240, 0.18);
  background: rgba(63, 211, 240, 0.08);
  font-size: var(--ds-fs-xs); font-weight: 500; color: var(--cyan-300); white-space: nowrap;
}
.chip-plain { border-color: var(--ds-divider); background: rgba(255, 255, 255, 0.04); color: var(--ds-text-muted); }
.chip-violet { border-color: rgba(167, 139, 250, 0.3); background: rgba(167, 139, 250, 0.12); color: #d6c9ff; }
.chip-ok { border-color: rgba(67, 217, 139, 0.3); background: rgba(67, 217, 139, 0.12); color: #a9efc8; }
.chip-warn { border-color: rgba(255, 159, 67, 0.32); background: rgba(255, 159, 67, 0.12); color: #ffd1a3; }
.chip-bad { border-color: rgba(255, 95, 109, 0.32); background: rgba(255, 95, 109, 0.12); color: #ffc2c8; }
.chip-gold { border-color: rgba(242, 181, 68, 0.36); background: var(--ds-gold-soft); color: var(--gold-300); }
a.chip:hover { border-color: var(--ds-accent); color: #fff; }

/* Status label laid over artwork */
.pill {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: var(--ds-radius-pill); border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(4, 10, 18, 0.72);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: var(--ds-fs-2xs); font-weight: 600; color: var(--ds-text-strong);
}
.pill-pick { left: auto; right: 10px; color: var(--gold-300); }
.pill-released { color: #a9efc8; }
.pill-demo_available { color: var(--cyan-300); }
.pill-in_development { color: #ffd1a3; }
.pill-coming_soon { color: #c9d6e6; }
.chips .pill, .game-hero-text .pill { position: static; }

/* Segmented filters and surface tabs: pills with a solid active state (board 05). */
.pill-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 14px;
  border-radius: var(--ds-radius-sm); border: 1px solid var(--ds-border);
  background: var(--ds-surface-raised); color: var(--ds-text-muted);
  font-size: var(--ds-fs-sm); font-weight: 500; white-space: nowrap;
  transition: color var(--ds-fast), border-color var(--ds-fast), background var(--ds-fast);
}
.pill-link:hover { color: var(--ds-text-strong); border-color: var(--ds-border-strong); }
.pill-link.is-active, .pill-link[aria-current="page"] {
  background: var(--ds-primary); border-color: color-mix(in srgb, var(--ds-primary) 70%, #fff 30%); color: var(--ds-on-primary);
  box-shadow: var(--ds-glow-primary);
}

/* Underlined tabs (board 06, 07, 08) */
.tabs { display: flex; gap: var(--ds-space-1); overflow-x: auto; border-bottom: 1px solid var(--ds-divider); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; padding: 12px 14px; white-space: nowrap;
  font-size: var(--ds-fs-sm); font-weight: 500; color: var(--ds-text-muted);
  transition: color var(--ds-fast);
}
.tab:hover { color: var(--ds-text-strong); }
.tab.is-active, .tab[aria-current="page"], .tab[aria-selected="true"] { color: var(--ds-text-strong); }
.tab.is-active::after, .tab[aria-current="page"]::after, .tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px;
  border-radius: 2px; background: var(--ds-accent);
}

/* Avatars: round, as on the board */
.avatar {
  display: inline-grid; place-items: center; flex-shrink: 0; overflow: hidden;
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(180deg, var(--ink-600), var(--ink-800));
  border: 1px solid var(--ds-border-strong);
  font-size: 0.7rem; font-weight: 700; color: var(--cyan-300);
}
.avatar-sm { width: 24px; height: 24px; font-size: 0.6rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 0.95rem; }
.avatar-xl { width: 76px; height: 76px; font-size: 1.5rem; border-width: 2px; }
.avatar-img { object-fit: cover; }
.avatar-ring { box-shadow: 0 0 0 2px var(--ds-page), 0 0 0 3px var(--ds-accent), 0 0 18px rgba(63, 211, 240, 0.35); }

/* Section heading: title left, cyan "see all" right (board 01, 03) */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: var(--ds-space-3); margin-bottom: var(--ds-space-4); }
.section-head.center { justify-content: center; text-align: center; }
.section-head h2 { font-size: var(--ds-fs-xl); font-weight: 700; }
.section-head p { margin-top: 4px; max-width: 64ch; font-size: var(--ds-fs-sm); color: var(--ds-text-muted); }
.section-link { display: inline-flex; align-items: center; gap: 4px; font-size: var(--ds-fs-sm); font-weight: 600; color: var(--ds-accent); }
.section-link:hover { color: var(--cyan-300); }
.section-link .ico { transition: transform var(--ds-fast) var(--ds-ease); }
.section-link:hover .ico { transform: translateX(2px); }
.eyebrow { display: block; margin-bottom: 4px; font-size: var(--ds-fs-2xs); font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ds-accent); }
.eyebrow.aqua, .eyebrow.violet { color: var(--ds-accent); }

/* Game card (board 01, 03, 05) */
.rail { display: flex; gap: var(--ds-space-4); overflow-x: auto; padding: 2px 2px var(--ds-space-3);
  scroll-snap-type: x proximity; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }

.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-md);
  transition: transform var(--ds-slow) var(--ds-ease), border-color var(--ds-fast), box-shadow var(--ds-slow) var(--ds-ease);
}
.card:hover { transform: translateY(-3px); border-color: var(--ds-border-strong); box-shadow: var(--ds-glow-accent); }
.card:focus-within { border-color: var(--ds-border-strong); }
.card-sm { flex: 0 0 200px; width: 200px; }
.card-md { flex: 0 0 260px; }
.grid .card-md, .grid .card-sm { width: auto; flex: initial; }
.card-lg { flex-direction: row; }

.card-art { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--ink-850); }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ds-ease); }
.card:hover .card-art img { transform: scale(1.04); }
.card-lg .card-art { flex: 0 0 46%; aspect-ratio: auto; min-height: 220px; }
.card-glyph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.2rem; color: var(--ds-text-faint); }
.card-scrim { position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(to top, rgba(4, 10, 18, 0.7), transparent); }

.card-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.card-lg .card-body { justify-content: center; padding: var(--ds-space-6); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-head h3 { font-size: var(--ds-fs-md); font-weight: 700; color: var(--ds-text-strong);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-lg .card-head h3 { font-size: var(--ds-fs-xl); white-space: normal; }
.card-studio { margin: 0; font-size: var(--ds-fs-xs); color: var(--ds-text-faint); }
.card-desc { flex: 1; margin: 2px 0 0; font-size: var(--ds-fs-sm); color: var(--ds-text-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.card-meta { display: flex; align-items: center; gap: 14px; font-size: var(--ds-fs-xs); color: var(--ds-text-muted);
  font-variant-numeric: tabular-nums; }
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.votes { display: inline-flex; align-items: center; gap: 5px; font-size: var(--ds-fs-xs); color: var(--ds-text-muted); white-space: nowrap; }
.score { display: none; }   /* retired star score; nothing should render one */
.card-why { font-size: var(--ds-fs-xs); color: var(--ds-text-faint); }
.card-stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }

@media (max-width: 640px) {
  .card-lg { flex-direction: column; }
  .card-lg .card-art { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
}

/* Stat with icon (board 01 counters, 07 profile, 11 dashboard) */
.ds-stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.ds-stat { display: flex; align-items: center; gap: 12px; padding: var(--ds-space-4) var(--ds-space-5); }
.ds-stats > .ds-stat + .ds-stat { border-left: 1px solid var(--ds-divider); }
.ds-stat .ico { width: 30px; height: 30px; color: var(--ds-text); stroke-width: 1.5; }
.ds-stat-num { display: block; font-size: var(--ds-fs-xl); font-weight: 700; line-height: 1.1; color: var(--ds-text-strong);
  font-variant-numeric: tabular-nums; }
.ds-stat-label { display: block; font-size: var(--ds-fs-xs); color: var(--ds-text-muted); }
@media (max-width: 560px) {
  .ds-stat { flex-direction: column; gap: 4px; padding: var(--ds-space-3) var(--ds-space-2); text-align: center; }
  .ds-stat .ico { width: 22px; height: 22px; }
}

/* Forms */
input, textarea, select {
  width: 100%; min-height: 40px; padding: 9px 12px;
  font: inherit; font-size: var(--ds-fs-sm); color: var(--ds-text-strong);
  background: var(--ds-surface-sunken);
  border: 1px solid var(--ds-border); border-radius: var(--ds-radius-sm);
  transition: border-color var(--ds-fast), box-shadow var(--ds-fast), background var(--ds-fast);
}
input::placeholder, textarea::placeholder { color: var(--ds-text-faint); }
input:hover, textarea:hover, select:hover { border-color: var(--ds-border-strong); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--ds-primary);
  box-shadow: 0 0 0 3px var(--ds-primary-soft);
}
input:disabled, textarea:disabled, select:disabled { opacity: 0.55; cursor: not-allowed; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--ds-bad); }
select option, select optgroup { background-color: var(--ink-800); color: var(--ds-text-strong); }
textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"], input[type="radio"] {
  width: 16px; height: 16px; min-height: 0; padding: 0; accent-color: var(--ds-primary); vertical-align: middle;
}
input[type="range"] { min-height: 0; padding: 0; border: 0; background: none; accent-color: var(--ds-primary); }
input[type="color"] { padding: 2px; width: 44px; }

.label { display: block; margin: var(--ds-space-4) 0 6px; font-size: var(--ds-fs-sm); font-weight: 600; color: var(--ds-text); }
.label:first-child { margin-top: 0; }
.check { display: flex; align-items: center; gap: 8px; font-size: var(--ds-fs-sm); color: var(--ds-text); cursor: pointer; }
fieldset { margin: 0 0 var(--ds-space-4); padding: var(--ds-space-4); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-md); }
legend { padding: 0 8px; font-size: var(--ds-fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ds-accent); }
.form-error { margin-bottom: var(--ds-space-4); padding: 10px 14px; border: 1px solid rgba(255, 95, 109, 0.4);
  border-radius: var(--ds-radius-sm); background: rgba(255, 95, 109, 0.1); color: #ffd0d5; font-size: var(--ds-fs-sm); }
.field-error { margin: 6px 0 0; font-size: var(--ds-fs-xs); color: #ffb3bb; }
.field-warn { margin: 8px 0 0; font-size: var(--ds-fs-xs); color: #ffd1a3; }

/* Search field with an icon inside (board 01 hero, 05) */
.ds-search { position: relative; display: flex; align-items: center; }
.ds-search .ico { position: absolute; left: 14px; color: var(--ds-text-faint); pointer-events: none; }
.ds-search input { padding-left: 42px; }

/* Empty, loading, error states */
.empty {
  display: grid; place-items: center; gap: 6px; padding: 48px 20px; text-align: center;
  background: var(--ds-surface); border: 1px dashed var(--ds-border); border-radius: var(--ds-radius-md);
}
.empty p { max-width: 46ch; color: var(--ds-text-muted); }
.empty .btn { margin-top: 12px; }
.empty-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 4px;
  border-radius: 50%; background: var(--ds-accent-soft); color: var(--ds-accent); font-size: 1.4rem; }
.empty-icon .ico { width: 26px; height: 26px; }
.empty-icon.big { width: auto; height: auto; background: none; font-size: 2.8rem; }
.center-page { display: grid; place-items: center; gap: 8px; min-height: 58vh; text-align: center; }

.ds-skeleton {
  border-radius: var(--ds-radius-sm);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 20%, rgba(255, 255, 255, 0.1) 40%, rgba(255, 255, 255, 0.04) 60%);
  background-size: 300% 100%; animation: ds-shimmer 1.4s ease-in-out infinite;
}
@keyframes ds-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Footer */
.footer { margin-top: var(--ds-space-12); background: rgba(4, 10, 18, 0.78); border-top: 1px solid var(--ds-border);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.footer-grid { display: grid; gap: 28px; padding-block: 40px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.footer-brand { grid-column: span 2; max-width: 340px; }
.footer-brand p { margin-top: 12px; font-size: var(--ds-fs-sm); color: var(--ds-text-faint); }
.footer h3 { margin-bottom: 12px; font-size: var(--ds-fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ds-text-muted); }
.footer > .container > div > a { display: block; margin-bottom: 8px; font-size: var(--ds-fs-sm); color: var(--ds-text-faint); }
.footer > .container > div > a:hover { color: var(--ds-accent); }
.footer-legal { border-top: 1px solid var(--ds-divider); }
.footer-legal-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-block: 16px;
  font-size: var(--ds-fs-xs); color: var(--ds-text-faint); }
.footer-legal-links { display: inline-flex; gap: 14px; }
.footer-legal-links a:hover { color: var(--ds-accent); }

/* Public mobile: bottom navigation (board 04) */
.bottom-nav { display: none; }
@media (max-width: 720px) {
  .bottom-nav {
    position: fixed; inset: auto 0 0 0; z-index: 40;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: rgba(4, 10, 18, 0.9); border-top: 1px solid var(--ds-border);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  }
  .bottom-nav a { display: grid; justify-items: center; gap: 3px; padding: 4px 0; font-size: 0.66rem; font-weight: 500; color: var(--ds-text-faint); }
  .bottom-nav a .ico { width: 22px; height: 22px; }
  .bottom-nav a[aria-current="page"] { color: var(--ds-accent); }
  body[data-context="public"] { padding-bottom: 68px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}

/* IndieGamesShow Age Rating mark (§57.7): the site’s own, a number in a
   rounded square. Never a PEGI or store logo. */
.age-badge {
  --age: var(--age-12);
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 5px;
  border-radius: 7px; border: 2px solid var(--age);
  background: rgba(4, 10, 18, 0.78); color: var(--age);
  font-size: 12px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.age-3 { --age: var(--age-3); }
.age-7 { --age: var(--age-7); }
.age-12 { --age: var(--age-12); }
.age-16 { --age: var(--age-16); }
.age-18 { --age: var(--age-18); }
.age-on-art { position: absolute; right: 8px; bottom: 8px; z-index: 2; min-width: 24px; height: 24px; font-size: 11px; }
.age-lg { min-width: 44px; height: 44px; font-size: 18px; border-radius: 10px; }
.age-panel { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--ds-border); }
.age-panel strong { display: block; font-size: var(--ds-fs-sm); }
.age-panel .fineprint { margin: 6px 0 0; }
.age-descriptors { margin-top: 6px; }
.gd-chips .age-badge { height: 30px; min-width: 30px; }

/* The declaration in the submit form. */
.age-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.age-pick { position: relative; cursor: pointer; }
.age-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.age-pick .age-badge { min-width: 48px; height: 48px; font-size: 18px; border-radius: 12px; opacity: 0.55; transition: opacity var(--ds-fast), transform var(--ds-fast); }
.age-pick:hover .age-badge { opacity: 0.85; }
.age-pick input:checked + .age-badge { opacity: 1; transform: translateY(-2px); box-shadow: 0 0 0 3px color-mix(in srgb, var(--age) 30%, transparent); }
.age-pick input:focus-visible + .age-badge { box-shadow: var(--ds-focus); }

/* Discover ▾ — the paths under Discover, Collections among them. */
.nav-drop { position: relative; display: flex; align-items: center; }
.nav-drop > a { padding-right: 4px; }
.nav-drop-toggle { display: grid; place-items: center; width: 22px; height: 30px; padding: 0; border: 0; background: none; color: var(--ds-text-muted); cursor: pointer; border-radius: var(--ds-radius-sm); }
.nav-drop-toggle .ico { width: 14px; height: 14px; transition: transform var(--ds-fast); }
.nav-drop-toggle:hover, .nav-drop-toggle:focus-visible { color: var(--ds-text-strong); }
.nav-drop-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 210px;
  display: grid; gap: 2px; padding: 6px; border-radius: var(--ds-radius-md);
  border: 1px solid var(--ds-border); background: var(--ink-900); box-shadow: var(--ds-shadow-2, 0 18px 40px rgba(0,0,0,.45));
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity var(--ds-fast), transform var(--ds-fast), visibility 0s linear var(--ds-fast);
}
.nav-drop-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu, .nav-drop.is-open .nav-drop-menu {
  opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
}
.nav-drop.is-open .nav-drop-toggle .ico { transform: rotate(180deg); }
.nav-links .nav-drop-menu a { padding: 9px 12px; }
.nav-links .nav-drop-menu a[aria-current="page"]::after { display: none; }
.nav-links .nav-drop-menu a[aria-current="page"] { background: var(--ds-surface-hover); }
.nav-links .nav-drop-menu a:hover { background: var(--ds-surface-hover); }
.nav-mobile-label { display: block; padding: 12px 12px 4px; font-size: var(--ds-fs-2xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ds-text-muted); }
.nav-mobile a.nav-mobile-sub { padding-left: 24px; }
.nav-mobile a[aria-current="page"] { color: var(--ds-text-strong); background: var(--ds-surface-hover); }

/* Readable over any theme picture: public content gets a floor of darkness
   behind it, and text a soft shadow that no photograph can wash out. */
body[data-context="public"] .ds-backdrop::after {
  background:
    linear-gradient(180deg, rgb(4 10 18 / max(0.55, calc(var(--ds-overlay) * 0.8))) 0%, rgb(4 10 18 / max(0.72, var(--ds-overlay))) 45%, rgb(4 10 18 / 0.9) 100%),
    radial-gradient(ellipse at center, rgb(4 10 18 / 0) 45%, rgb(4 10 18 / calc(0.75 * var(--ds-vignette))) 100%);
}
body[data-context="public"] main h1, body[data-context="public"] main h2, body[data-context="public"] main h3,
body[data-context="public"] main p, body[data-context="public"] main .muted, body[data-context="public"] main small {
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.55);
}
body[data-context="public"] { --ds-text-muted: #b8c7d8; }

.nav-submit { background: var(--ds-accent); color: #0b0f15; font-weight: 700; border: 0; }
.nav-submit:hover { color: #0b0f15; box-shadow: 0 0 18px color-mix(in srgb, var(--ds-accent) 40%, transparent); }
@media (max-width: 1499px) { .nav-submit { display: none; } }
