/* NAIJA SUPERMARKET RUNS - UI foundation: fonts, design tokens, primitives (buttons, inputs, pills, cards), dialogs, toasts, menus.
   hud.css = the in-game HUD, the till and the interaction prompt · panels.css = Manage, Settings, New Game, Load, day summary, pause
   account.css = sign in / account dialogs and the account chip · touch.css = on-screen controls · arrange.css = shelf placement bar.
   The full reference (tokens, components, patterns) is docs/UI_DESIGN.md. */

/* =====================================================================================================================================
   DESIGN TOKENS (custom properties on :root; reuse them in any stylesheet, e.g. avatar.css)

   Surfaces     --surface-0 (wells, sidebars) < --surface-1 (panel body) < --surface-2 (cards) < --surface-3 (inputs, raised) < --surface-4
                (hover) < --surface-5 (selected). Graphite with a faint green cast. Over the live 3D view: --glass / --glass-strong + --blur.
   Lines        --line-1 .. --line-4: hairlines, white at 6 / 9 / 14 / 22 % alpha. Elevation = a hairline + a soft shadow (--elev-1..3).
   Text         --text-1 (primary) --text-2 (secondary) --text-3 (muted, still AA on every surface) --text-4 (disabled / placeholder).
   Accent       ONE brand colour, the Nigerian flag green: --accent-600 (#008751, filled buttons, white text AA), --accent-400 / -300 (on dark:
                icons, selected text, progress), --accent-soft (tinted backgrounds), --accent-line (tinted borders).
   Gold         money, XP, level, ratings: --gold-300 / -400 / -500, --gold-soft, --gold-line. Never a button fill.
   Semantic     --red-* (danger, losses), --amber-* (warnings), --blue-* (info) - used sparingly, mostly as text / tint, not fills.
   Type         --font-ui: Inter (variable, bundled) for everything; tabular numerals (.num / --tnum) for money, time, counts.
                --font-display: Archivo (variable width) for the logo and title moments only.
                Scale --fs-11 .. --fs-56 (px names). Weights 400 / 500 / 600 / 700 (800 for the logo).
   Spacing      8 px grid: --sp-1 4 · --sp-2 8 · --sp-3 12 · --sp-4 16 · --sp-5 24 · --sp-6 32 · --sp-7 40 · --sp-8 48.
   Radius       --r-1 8 (chips, small controls) · --r-2 12 (buttons, inputs, list rows) · --r-3 16 (cards, HUD panels) · --r-4 24 (dialogs).
   Motion       --dur-1 120 ms · --dur-2 180 ms · --dur-3 240 ms, --ease-out. prefers-reduced-motion switches every transition off.
   Focus        --focus ring (2 px, accent-300) on every focusable control for keyboard and gamepad navigation.
   Legacy names (--g600, --ink, --muted, --line, --gold, --glass ...) are kept as aliases so older code and inline styles keep working.
   ===================================================================================================================================== */

/* ---------- fonts: Inter (UI) + Archivo (display), bundled; the older game faces stay for the 3D signs and canvas labels ---------- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/inter-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2190-21FF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url('../fonts/archivo-latin-wdth-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/inter-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+20A6; }

/* the 3D world (shop signs, sprites, canvas labels) still paints with these: keep them declared */
@font-face { font-family: 'Baloo 2'; font-weight: 500; font-display: block; src: url('../fonts/baloo-2-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Baloo 2'; font-weight: 700; font-display: block; src: url('../fonts/baloo-2-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Baloo 2'; font-weight: 800; font-display: block; src: url('../fonts/baloo-2-latin-800-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Baloo 2'; font-weight: 500; font-display: block; src: url('../fonts/baloo-2-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+20A6; }
@font-face { font-family: 'Baloo 2'; font-weight: 700; font-display: block; src: url('../fonts/baloo-2-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+20A6; }
@font-face { font-family: 'Baloo 2'; font-weight: 800; font-display: block; src: url('../fonts/baloo-2-latin-ext-800-normal.woff2') format('woff2'); unicode-range: U+20A6; }
@font-face { font-family: 'Fredoka'; font-weight: 400; font-display: block; src: url('../fonts/fredoka-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; font-weight: 500; font-display: block; src: url('../fonts/fredoka-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; font-weight: 600; font-display: block; src: url('../fonts/fredoka-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; font-weight: 700; font-display: block; src: url('../fonts/fredoka-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; font-weight: 400; font-display: block; src: url('../fonts/baloo-2-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+20A6; }
@font-face { font-family: 'Fredoka'; font-weight: 500; font-display: block; src: url('../fonts/baloo-2-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+20A6; }
@font-face { font-family: 'Fredoka'; font-weight: 600; font-display: block; src: url('../fonts/baloo-2-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+20A6; }
@font-face { font-family: 'Fredoka'; font-weight: 700; font-display: block; src: url('../fonts/baloo-2-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+20A6; }
@font-face { font-family: 'Lilita One'; font-weight: 400; font-display: block; src: url('../fonts/lilita-one-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Lilita One'; font-weight: 400; font-display: block; src: url('../fonts/baloo-2-latin-ext-800-normal.woff2') format('woff2'); unicode-range: U+20A6; }

:root {
  color-scheme: dark;
  /* ---- neutrals: graphite with a faint green cast */
  --n-950: #07090a; --n-900: #0d1012; --n-850: #121619; --n-800: #181d21; --n-750: #1e2429; --n-700: #252c32; --n-650: #2e363d; --n-600: #3a434b;
  --n-500: #47524c; --n-400: #6a7570; --n-300: #8f9a94; --n-200: #b8c1bc; --n-100: #dfe5e2; --n-50: #f2f5f3;
  --bg: var(--n-950);
  --surface-0: var(--n-900); --surface-1: var(--n-850); --surface-2: var(--n-800); --surface-3: var(--n-750); --surface-4: var(--n-700); --surface-5: var(--n-650);
  --line-1: rgba(255, 255, 255, .06); --line-2: rgba(255, 255, 255, .09); --line-3: rgba(255, 255, 255, .14); --line-4: rgba(255, 255, 255, .22);
  --text-1: #f1f4f2; --text-2: #b6bfba; --text-3: #8c9690; --text-4: #626c67; --text-inv: #0b0f0d;
  /* ---- brand accent (Nigerian green) */
  --accent-200: #c6f7cf; --accent-300: #86ec98; --accent-400: #4fdc6b; --accent-500: #33c552; --accent-600: #22a942; --accent-650: #29b84a; --accent-700: #17862f; --accent-900: #06260f;
  --accent-soft: rgba(60, 207, 94, .14); --accent-soft-2: rgba(60, 207, 94, .24); --accent-line: rgba(79, 220, 107, .42);
  /* ---- gold: money, XP, level, ratings */
  --gold-200: #ffecb3; --gold-300: #ffdb6e; --gold-400: #ffc83d; --gold-500: #f0ae17; --gold-600: #c08608;
  --gold-soft: rgba(245, 189, 80, .13); --gold-line: rgba(245, 189, 80, .38);
  /* ---- semantic (sparingly) */
  --red-300: #ff9f96; --red-400: #ff6e64; --red-500: #e5484d; --red-600: #c2353a; --red-soft: rgba(229, 72, 77, .14); --red-line: rgba(255, 110, 100, .38);
  --amber-300: #ffc66e; --amber-400: #f9ad3c; --amber-soft: rgba(249, 173, 60, .14); --amber-line: rgba(249, 173, 60, .38);
  --blue-300: #93c6ff; --blue-400: #5aa6f7; --blue-soft: rgba(90, 166, 247, .13); --blue-line: rgba(147, 198, 255, .32);
  --focus: var(--accent-300);
  /* ---- glass over the live 3D view */
  --glass: rgba(11, 14, 13, .70); --glass-strong: rgba(10, 13, 12, .86); --glass-line: rgba(255, 255, 255, .10); --glass-hl: rgba(255, 255, 255, .05);
  --blur: blur(14px) saturate(1.4);
  /* ---- type */
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Archivo', 'Inter', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  --fs-11: .6875rem; --fs-12: .75rem; --fs-13: .8125rem; --fs-14: .875rem; --fs-15: .9375rem; --fs-16: 1rem; --fs-17: 1.0625rem; --fs-20: 1.25rem; --fs-24: 1.5rem; --fs-32: 2rem; --fs-40: 2.5rem; --fs-56: 3.5rem;
  --tnum: tabular-nums;
  /* ---- spacing (8 px grid) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 40px; --sp-8: 48px;
  /* ---- radius */
  --r-1: 10px; --r-2: 14px; --r-3: 18px; --r-4: 26px; --r-pill: 999px;
  /* ---- elevation */
  --hl: inset 0 1px 0 rgba(255, 255, 255, .05);
  --elev-1: 0 1px 2px rgba(0, 0, 0, .35), 0 1px 1px rgba(0, 0, 0, .2);
  --elev-2: 0 10px 28px -8px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .3);
  --elev-3: 0 40px 100px -20px rgba(0, 0, 0, .75), 0 16px 40px -12px rgba(0, 0, 0, .5);
  /* ---- motion */
  --dur-1: 120ms; --dur-2: 180ms; --dur-3: 240ms; --ease-out: cubic-bezier(.16, 1, .3, 1); --ease: var(--ease-out);
  /* ---- layout */
  --tap: 44px;
  --sa-t: var(--sat, env(safe-area-inset-top, 0px)); --sa-r: var(--sar, env(safe-area-inset-right, 0px)); --sa-b: var(--sab, env(safe-area-inset-bottom, 0px)); --sa-l: var(--sal, env(safe-area-inset-left, 0px));
  --vh: var(--app-h, 100vh); --vw: var(--app-w, 100vw);
  --ui-scale: 1;

  /* ---- legacy aliases (older code, inline styles and the account / creator sheets read these) */
  --g950: var(--accent-900); --g900: #063d26; --g800: var(--accent-300); --g700: var(--accent-400); --g600: var(--accent-600); --g500: var(--accent-500); --g300: var(--accent-line); --g200: var(--accent-soft-2); --g100: var(--accent-soft); --g50: rgba(20, 173, 110, .07);
  --white: #fff; --paper: var(--surface-1); --canvas: var(--surface-0); --canvas2: var(--surface-3);
  --ink: var(--text-1); --ink2: var(--text-2); --muted: var(--text-3); --line: var(--line-2); --line2: var(--line-3);
  --gold: var(--gold-400); --gold-d: var(--gold-300); --gold-l: var(--gold-soft); --gold-ln: var(--gold-line); --mango: var(--gold-400); --mango-d: var(--gold-300); --sun: var(--gold-300);
  --chili: var(--red-500); --chili-d: var(--red-600); --danger: var(--red-400); --bad-l: var(--red-soft); --bad-ln: var(--red-line);
  --sky: var(--blue-400); --sky-d: var(--blue-300); --sky-l: var(--blue-soft); --sky-ln: var(--blue-line); --plum: #b28cf0; --good: var(--accent-400);
  --glass-hi: var(--glass-strong); --glass-ink: var(--text-1); --glass-mute: var(--text-2);
  --r-xs: var(--r-1); --r-sm: var(--r-2); --r-sm2: 10px; --r: var(--r-3); --r-lg: var(--r-4); --r-xl: var(--r-4);
  --sh-1: var(--elev-1); --sh-2: var(--elev-2); --sh-3: var(--elev-3); --sh-glass: 0 8px 24px -6px rgba(0, 0, 0, .45); --shadow: var(--elev-2);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px;
  --fs-xs: var(--fs-12); --fs-sm: var(--fs-14); --fs-md: var(--fs-16); --fs-lg: var(--fs-17); --fs-xl: var(--fs-20); --fs-2xl: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  --f-title: var(--font-display); --f-ui: var(--font-ui); --f-body: var(--font-ui);
}

/* =================================================================================================================== base */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--bg); color: var(--text-1); font-family: var(--font-ui); font-weight: 450; font-size: 16px; line-height: 1.4; user-select: none; -webkit-user-select: none; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { position: fixed; inset: 0; touch-action: manipulation; }
canvas#game { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; background: #1c2321; touch-action: none; }
canvas#overlay { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; display: block; pointer-events: none; }
canvas#overlay.vig { background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .26) 100%); }
#scene-fade { background: radial-gradient(ellipse 80% 60% at 50% 38%, #0d1a14 0%, var(--bg) 70%) !important; }
#ui { position: fixed; inset: 0; pointer-events: none; }
#ui > * { pointer-events: none; }
#ui .interactive, #ui button, #ui input, #ui select, #ui textarea, #ui a, #ui label, #ui .card, #ui .modal-back { pointer-events: auto; }
[hidden] { display: none !important; }
button { font-family: var(--font-ui); cursor: pointer; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible, .switch input:focus-visible + .track { outline: 2px solid var(--focus); outline-offset: 2px; }
button:focus:not(:focus-visible) { outline: none; }
input, select, textarea { font-family: var(--font-ui); font-weight: 500; color: var(--text-1); user-select: text; -webkit-user-select: text; }
h1, h2, h3, h4, h5 { margin: 0; font-family: var(--font-ui); font-weight: 650; letter-spacing: -.01em; line-height: 1.2; }
b, strong { font-weight: 650; }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .16) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .24); }
::-webkit-scrollbar-track { background: transparent; }
::selection { background: rgba(60, 205, 141, .35); color: #fff; }

/* utilities */
.muted { color: var(--text-3); }
.small { font-size: var(--fs-13); }
.tiny { font-size: var(--fs-12); }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.wrap { flex-wrap: wrap; }
.center { text-align: center; }
.right { text-align: right; }
.mono, .num { font-variant-numeric: tabular-nums; }
.good { color: var(--accent-300); } .bad { color: var(--red-400); } .warn { color: var(--amber-300); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ankara-band { display: none; }
.lbl { font-weight: 550; font-size: var(--fs-13); color: var(--text-2); }

/* =================================================================================================================== icons */
.ico-svg { flex: none; display: inline-block; vertical-align: middle; stroke-width: 1.85; }
.btn .ico-svg { margin: 0 -1px; }

/* =================================================================================================================== buttons
   .btn          solid light (the default confirm action)       .btn.alt   brand green (the ONE hero action on a screen)
   .btn.ghost    secondary: raised surface + hairline            .btn.quiet text button        .btn.red  destructive (tinted, fills on hover)
   .btn.blue     same weight as .btn (kept for older callers)    sizes: .xs 28 · .sm 34 · default 40 · .lg 52 · .block · .icon (square) */
.btn {
  --bc: var(--n-50); --bh: #ffffff; --bfg: var(--text-inv); --bbd: transparent;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--bbd); border-radius: var(--r-2); background: var(--bc); color: var(--bfg);
  font-family: var(--font-ui); font-size: var(--fs-15); font-weight: 600; letter-spacing: -.005em; line-height: 1.1; white-space: nowrap; text-decoration: none;
  box-shadow: var(--elev-1);
  transition: background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), color var(--dur-2), transform var(--dur-1) var(--ease-out), box-shadow var(--dur-2), opacity var(--dur-2);
  touch-action: manipulation;
}
.btn:hover:not(:disabled) { background: var(--bh); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.985); }
.btn:disabled, .btn.disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn small { font-weight: 500; opacity: .75; font-size: var(--fs-12); }
.btn.alt { --bc: var(--accent-600); --bh: var(--accent-650); --bfg: #fff; --bbd: rgba(255, 255, 255, .08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 18px -6px rgba(0, 135, 81, .55); }
.btn.blue { --bc: var(--surface-4); --bh: var(--surface-5); --bfg: var(--text-1); --bbd: var(--line-3); box-shadow: var(--hl); }
.btn.dark, .btn.ghost { --bc: var(--surface-4); --bh: var(--surface-5); --bfg: var(--text-1); --bbd: var(--line-3); box-shadow: var(--hl); }
.btn.ghost:hover:not(:disabled) { --bbd: var(--line-4); }
.btn.quiet { --bc: transparent; --bh: rgba(255, 255, 255, .06); --bfg: var(--text-2); box-shadow: none; }
.btn.quiet:hover:not(:disabled) { color: var(--text-1); }
.btn.red { --bc: var(--red-soft); --bh: var(--red-500); --bfg: var(--red-300); --bbd: var(--red-line); box-shadow: none; }
.btn.red:hover:not(:disabled) { color: #fff; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: var(--fs-14); border-radius: 10px; gap: 6px; }
.btn.xs { min-height: 28px; padding: 0 10px; font-size: var(--fs-13); border-radius: var(--r-1); gap: 5px; }
.btn.lg { min-height: 52px; padding: 0 24px; font-size: var(--fs-16); border-radius: 14px; gap: 10px; }
.btn.block { display: flex; width: 100%; }
.btn.icon { padding: 0; width: 40px; }
.btn.icon.sm { width: 34px; }
.btn.on { box-shadow: 0 0 0 2px var(--accent-400); }
.btn .ico { font-size: 1.1em; line-height: 1; }
html.is-touch .btn, html.is-touch .btn.sm, html.is-touch .btn.xs { min-height: var(--tap); }
html.is-touch .btn.icon, html.is-touch .btn.icon.sm { width: var(--tap); }

/* keycaps and gamepad glyphs (prompts, help, menus) */
.kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 1.75em; height: 1.75em; padding: 0 .45em;
  font-family: var(--font-ui); font-size: .75em; font-weight: 650; letter-spacing: 0; line-height: 1; vertical-align: middle; color: var(--text-1);
  background: linear-gradient(180deg, #2c3531, #1f2623); border: 1px solid rgba(255, 255, 255, .16); border-bottom-color: rgba(0, 0, 0, .55);
  border-radius: 6px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 2px 0 rgba(0, 0, 0, .45);
}
.kbd.pad { min-width: 1.75em; width: 1.75em; padding: 0; border-radius: 50%; font-weight: 750; color: #fff; border: 0; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .3), 0 1px 3px rgba(0, 0, 0, .4); background: #3a443f; }
.kbd.pad-a { background: #2f9e5b; } .kbd.pad-b { background: #d0453f; } .kbd.pad-x { background: #2f73cf; } .kbd.pad-y { background: #d6a019; color: #1d1600; }
html.is-touch .kbd.key-only { display: none; }

/* =================================================================================================================== inputs */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-weight: 550; font-size: var(--fs-13); color: var(--text-2); }
.hint { font-size: var(--fs-13); color: var(--text-3); line-height: 1.45; }
.inp {
  width: 100%; min-height: 44px; padding: 8px 14px; font-size: var(--fs-15); font-weight: 500; border: 1px solid var(--line-3); border-radius: var(--r-2);
  background: var(--surface-0); color: var(--text-1); outline: none; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25);
  transition: border-color var(--dur-2), box-shadow var(--dur-2), background-color var(--dur-2);
}
.inp:hover { border-color: var(--line-4); }
.inp::placeholder { color: var(--text-4); font-weight: 450; }
.inp:focus { border-color: var(--accent-400); box-shadow: 0 0 0 3px rgba(60, 205, 141, .2); background: var(--surface-1); }
.inp.sm { min-height: 34px; padding: 4px 10px; font-size: var(--fs-14); border-radius: 10px; }
input[type=number].inp { font-variant-numeric: tabular-nums; }
html.is-touch .inp, html.is-touch .inp.sm, html.is-touch select, html.is-touch input { font-size: 16px; }
html.is-touch .inp.sm { min-height: var(--tap); }
select.inp {
  appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b6bfba' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
select.inp option { background: var(--surface-2); color: var(--text-1); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; min-width: 0; height: 28px; background: transparent; outline: none; margin: 0; cursor: pointer; touch-action: pan-y; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent-400) var(--fill, 50%), rgba(255, 255, 255, .12) var(--fill, 50%)); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent-400) var(--fill, 50%), rgba(255, 255, 255, .12) var(--fill, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 2px 6px rgba(0, 0, 0, .5); transition: transform var(--dur-1); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 2px 6px rgba(0, 0, 0, .5); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.12); }
input[type=range]:focus-visible { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--surface-1), 0 0 0 4px var(--focus); }
html.is-touch input[type=range] { height: 44px; }
html.is-touch input[type=range]::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -11px; }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: -9px; width: calc(100% + 18px); height: calc(100% + 18px); margin: 0; cursor: pointer; z-index: 2; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); transition: background-color var(--dur-2) var(--ease-out); }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); transition: transform var(--dur-2) var(--ease-out); }
.switch input:checked + .track { background: var(--accent-500); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch.sm { width: 38px; height: 22px; }
.switch.sm .track::after { width: 16px; height: 16px; }
.switch.sm input:checked + .track::after { transform: translateX(16px); }
html.is-touch .switch.sm { width: 44px; height: 26px; } html.is-touch .switch.sm .track::after { width: 20px; height: 20px; } html.is-touch .switch.sm input:checked + .track::after { transform: translateX(18px); }
/* segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-2); background: var(--surface-0); box-shadow: inset 0 0 0 1px var(--line-2); max-width: 100%; }
.seg button { flex: 1 1 auto; min-height: 32px; border: 0; background: transparent; padding: 0 14px; border-radius: 9px; font-size: var(--fs-14); font-weight: 550; color: var(--text-3); white-space: nowrap; transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2), box-shadow var(--dur-2); }
.seg button.on { background: var(--surface-5); color: var(--text-1); box-shadow: inset 0 0 0 1px var(--line-3), 0 1px 2px rgba(0, 0, 0, .4); }
.seg button:hover:not(.on) { color: var(--text-1); }
html.is-touch .seg button { min-height: var(--tap); }

/* =================================================================================================================== cards, pills, bars */
.card { background: var(--surface-1); border-radius: var(--r-4); box-shadow: var(--elev-3), inset 0 0 0 1px var(--line-2); color: var(--text-1); overflow: hidden; border: 0; }
.card > .head {
  flex: none; display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 20px; min-height: 64px; color: var(--text-1);
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, 0)); border-bottom: 1px solid var(--line-1);
  font-family: var(--font-display); font-stretch: 108%; font-weight: 700; font-size: var(--fs-20); letter-spacing: -.01em;
}
.card > .head > .head-ico { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(60, 205, 141, .2); color: var(--accent-300); display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; line-height: 1; }
.card > .head > .head-ico .ico-svg { color: var(--accent-300); width: 19px; height: 19px; }
.card > .head > .head-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card > .body { padding: 20px 24px; }
.card > .foot { flex: none; padding: 14px 20px; background: var(--surface-1); border-top: 1px solid var(--line-1); display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.section-title { font-weight: 600; font-size: var(--fs-15); color: var(--text-1); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; letter-spacing: -.005em; }
.section-title .count { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: rgba(255, 255, 255, .07); font-weight: 600; font-size: var(--fs-12); color: var(--text-2); font-variant-numeric: tabular-nums; }
.section-title .ico-svg { color: var(--text-3); width: 17px; height: 17px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 9px; border-radius: var(--r-pill); font-weight: 550; font-size: var(--fs-12); line-height: 1;
  background: var(--accent-soft); color: var(--accent-300); box-shadow: inset 0 0 0 1px rgba(60, 205, 141, .18); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.pill.warn { background: var(--gold-soft); color: var(--gold-300); box-shadow: inset 0 0 0 1px rgba(245, 189, 80, .2); }
.pill.bad { background: var(--red-soft); color: var(--red-300); box-shadow: inset 0 0 0 1px rgba(255, 110, 100, .2); }
.pill.blue { background: var(--blue-soft); color: var(--blue-300); box-shadow: inset 0 0 0 1px rgba(147, 198, 255, .18); }
.pill.plum { background: rgba(178, 140, 240, .14); color: #cdb4f7; box-shadow: none; }
.pill.dark { background: rgba(255, 255, 255, .06); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.pill .ico-svg { margin-left: -2px; width: 13px; height: 13px; }
.divider { height: 1px; background: var(--line-2); margin: 12px 0; }
.bar { position: relative; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; background: var(--accent-400); transition: width var(--dur-3) var(--ease-out); }
.bar.mango > i { background: var(--gold-400); }
.bar.red > i { background: var(--red-400); }
.bar.blue > i { background: var(--blue-400); }
.bar > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); }
.stars { display: inline-flex; align-items: center; gap: 1px; color: var(--gold-400); line-height: 1; }
.stars .ico-svg { width: 1em; height: 1em; }
.stars .off { color: rgba(255, 255, 255, .18); }
.banner {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-2); background: var(--gold-soft); box-shadow: inset 0 0 0 1px rgba(245, 189, 80, .22);
  color: var(--text-1); font-weight: 500; font-size: var(--fs-14); line-height: 1.45;
}
.banner > .ico-svg { color: var(--gold-300); flex: none; }
.banner.info { background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px var(--line-2); }
.banner.info > .ico-svg { color: var(--blue-300); }
.banner.bad { background: var(--red-soft); box-shadow: inset 0 0 0 1px rgba(255, 110, 100, .24); }
.banner.bad > .ico-svg { color: var(--red-300); }
.banner.good { background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(60, 205, 141, .22); }
.banner.good > .ico-svg { color: var(--accent-300); }
.banner .btn { margin-left: auto; flex: none; }
.empty-note { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 16px; text-align: center; color: var(--text-3); font-weight: 500; font-size: var(--fs-14); border-radius: var(--r-3); border: 1px dashed var(--line-3); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .12); border-top-color: var(--accent-400); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tip { position: absolute; z-index: 99; max-width: 280px; padding: 8px 10px; border-radius: var(--r-1); background: var(--n-600); color: var(--text-1); font-size: var(--fs-13); font-weight: 500; line-height: 1.35; pointer-events: none; box-shadow: var(--elev-2), inset 0 0 0 1px var(--line-3); }

/* =================================================================================================================== dialogs */
#modals { position: absolute; inset: 0; }
.modal-back { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: max(16px, var(--sa-t)) max(16px, var(--sa-r)) max(16px, var(--sa-b)) max(16px, var(--sa-l)); background: rgba(3, 5, 4, .62); animation: fadeIn var(--dur-2) ease-out; }
html.is-desktop .modal-back:not(.clear) { -webkit-backdrop-filter: blur(6px) saturate(.9); backdrop-filter: blur(6px) saturate(.9); }
.modal-back.clear { background: transparent; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { animation: pop var(--dur-3) var(--ease-out); max-width: 100%; }
@keyframes pop { from { transform: translateY(10px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.card.modal { display: flex; flex-direction: column; max-height: calc(var(--vh) - 32px); }
.card.modal > .body, .big-card > .body, .mid-card > .body { overflow: auto; flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.x-btn { flex: none; margin-left: auto; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--text-3); padding: 0; display: inline-flex; align-items: center; justify-content: center; transition: background-color var(--dur-2), color var(--dur-2); }
.x-btn:hover { background: rgba(255, 255, 255, .07); color: var(--text-1); }
.x-btn .ico-svg { display: block; }
html.is-touch .x-btn { width: var(--tap); height: var(--tap); }
.mini { width: min(440px, 100%); }
.mid-card { width: min(680px, 100%); }
.big-card { width: min(980px, 100%); }
.error-card { width: min(560px, 100%); }
.confirm-text { font-size: var(--fs-15); font-weight: 450; line-height: 1.55; color: var(--text-2); }
.card.mini > .head { min-height: 60px; }
.card.mini > .body { padding: 20px; }
.card.mini > .foot { border-top: 0; padding-top: 4px; padding-bottom: 20px; }
/* phones: big dialogs become full-screen sheets; small ones rise from the bottom */
html.is-phone .modal-back, html.vp-xs .modal-back { padding: 0; }
html.is-phone .card.modal.sheet, html.vp-xs .card.modal.sheet { width: 100% !important; height: var(--vh); max-height: none; border-radius: 0; box-shadow: none; animation: sheetUp var(--dur-3) var(--ease-out); }
html.is-phone .card.modal.sheet > .head, html.vp-xs .card.modal.sheet > .head { padding-top: calc(10px + var(--sa-t)); padding-left: max(16px, var(--sa-l)); padding-right: max(12px, var(--sa-r)); min-height: 58px; font-size: var(--fs-17); }
html.is-phone .card.modal.sheet > .foot, html.vp-xs .card.modal.sheet > .foot { padding-bottom: max(12px, var(--sa-b)); padding-left: max(16px, var(--sa-l)); padding-right: max(16px, var(--sa-r)); }
html.is-phone.is-portrait .modal-back.has-mini, html.vp-xs .modal-back.has-mini { align-items: flex-end; }
html.is-phone.is-portrait .card.modal.mini, html.vp-xs .card.modal.mini { width: 100%; border-radius: var(--r-4) var(--r-4) 0 0; animation: sheetUp var(--dur-3) var(--ease-out); max-height: calc(var(--vh) - 40px); }
html.is-phone.is-portrait .card.modal.mini::before, html.vp-xs .card.modal.mini::before { content: ''; position: absolute; left: 50%; top: 7px; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: rgba(255, 255, 255, .18); }
html.is-phone.is-portrait .card.modal.mini, html.vp-xs .card.modal.mini { position: relative; }
html.is-phone.is-portrait .card.modal.mini > .foot, html.vp-xs .card.modal.mini > .foot { padding-bottom: max(16px, var(--sa-b)); }
html.is-phone.is-portrait .card.modal.mini > .foot > .btn, html.vp-xs .card.modal.mini > .foot > .btn { flex: 1 1 0; }
@keyframes sheetUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
/* short landscape windows (phones on their side, small laptops): full-height dialogs */
@media (max-height: 520px) {
  .card.modal { max-height: calc(var(--vh) - 8px); }
  .modal-back { padding-top: 4px; padding-bottom: 4px; }
  .card > .head { min-height: 52px; padding-top: 8px; padding-bottom: 8px; font-size: var(--fs-17); }
  .card > .head > .head-ico { width: 32px; height: 32px; }
  .card > .body { padding: 12px 16px; }
  .card > .foot { padding: 8px 16px; }
}
/* dual-screen (Surface Duo / foldables): every dialog and menu stays inside the first screen */
html.is-dual #modals, html.is-dual #screen { left: var(--seg-x); width: var(--seg-w); right: auto; }

/* =================================================================================================================== toasts */
#toasts { position: absolute; top: calc(var(--sa-t) + 108px); right: calc(var(--sa-r) + 12px); display: flex; flex-direction: column; gap: 8px; align-items: flex-end; width: min(360px, calc(100vw - 24px)); pointer-events: none; }
.toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px 11px 12px; border-radius: var(--r-2); max-width: 100%;
  font-weight: 500; font-size: var(--fs-14); line-height: 1.4; color: var(--text-1);
  background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--elev-2), inset 0 0 0 1px var(--glass-line), var(--hl); animation: toastIn var(--dur-3) var(--ease-out);
}
.toast .t-ico { margin-top: 1px; width: 18px; height: 18px; }
.toast.good .t-ico { color: var(--accent-300); } .toast.warn .t-ico { color: var(--amber-300); } .toast.bad .t-ico, .toast.alert .t-ico { color: var(--red-300); } .toast.info .t-ico { color: var(--blue-300); } .toast.event .t-ico { color: var(--gold-300); }
.toast.alert { background: rgba(58, 14, 14, .9); box-shadow: var(--elev-2), inset 0 0 0 1px rgba(255, 110, 100, .35); animation: toastIn var(--dur-3) var(--ease-out), shake .45s .25s; }
.toast.out { opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .3s; }
@keyframes toastIn { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
html.is-phone #toasts, html.vp-xs #toasts { right: 50%; transform: translateX(50%); align-items: center; width: min(400px, calc(100vw - 24px)); top: calc(var(--sa-t) + 232px); }
html.is-phone.is-landscape #toasts { top: calc(var(--sa-t) + 120px); right: calc(var(--sa-r) + 12px); transform: none; align-items: flex-end; width: min(300px, 34vw); }
html.is-phone.modal-open #toasts, html.vp-xs.modal-open #toasts { top: auto; bottom: calc(var(--sa-b) + 96px); flex-direction: column-reverse; }
html.is-dual #toasts { right: auto; left: calc(var(--seg-x) + var(--seg-w) - 12px); transform: translateX(-100%); }

/* =================================================================================================================== full screens (menus) */
#screen { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
#modals { z-index: 30; } #toasts { z-index: 40; }
.scr { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: calc(var(--sa-t) + 16px) calc(var(--sa-r) + 16px) calc(var(--sa-b) + 16px) calc(var(--sa-l) + 16px); pointer-events: none; }
/* no fade-in on full screens: on a busy GPU a half-finished fade left the menu see-through over the street */
.scr > * { pointer-events: auto; }
.scr.dim { background: radial-gradient(ellipse 120% 90% at 50% 50%, rgba(3, 5, 4, .55), rgba(3, 5, 4, .8)); pointer-events: auto; }
html.is-desktop .scr.dim { -webkit-backdrop-filter: blur(8px) saturate(.85); backdrop-filter: blur(8px) saturate(.85); }
.scr.sheet-host { padding: 16px; }
@keyframes scrIn { from { opacity: 0; } to { opacity: 1; } }
html.is-phone .scr.sheet-host, html.vp-xs .scr.sheet-host { padding: 0; }
html.is-phone .scr.sheet-host > .card, html.vp-xs .scr.sheet-host > .card { width: 100% !important; height: 100%; max-height: none; border-radius: 0; box-shadow: none; }
html.is-phone .scr.sheet-host > .card > .head, html.vp-xs .scr.sheet-host > .card > .head { padding-top: calc(10px + var(--sa-t)); padding-left: max(16px, var(--sa-l)); padding-right: max(12px, var(--sa-r)); }
html.is-phone .scr.sheet-host > .card > .foot, html.vp-xs .scr.sheet-host > .card > .foot { padding-bottom: max(12px, var(--sa-b)); padding-left: max(16px, var(--sa-l)); padding-right: max(16px, var(--sa-r)); }
.big-card, .mid-card { display: flex; flex-direction: column; max-height: calc(var(--vh) - 32px); }
@media (max-height: 520px) { .big-card, .mid-card { max-height: calc(var(--vh) - 8px); } .scr.sheet-host { padding-top: 4px; padding-bottom: 4px; } }

/* =================================================================================================================== the logo lockup
   markup (index.html #loading and screens.js logo()): .logo > .sign > .l1 "Naija" · .l2 "Supermarket" · .l3 "Runs" + i (naira coin)
   A typographic lockup: a small flag mark + spaced "NAIJA", then SUPERMARKET / RUNS in wide Archivo, RUNS in the brand green. */
.logo { display: inline-flex; flex-direction: column; align-self: flex-start; width: max-content; max-width: 100%; text-align: left; line-height: 1; --logo-size: clamp(28px, 3.7vw, 54px); }
.logo .sign { display: flex; flex-direction: column; align-items: flex-start; }
.logo .l1 { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-ui); font-weight: 650; font-size: max(11px, calc(var(--logo-size) * .25)); letter-spacing: .34em; text-transform: uppercase; color: var(--text-1); margin-bottom: calc(var(--logo-size) * .2); }
.logo .l1::before { content: ''; flex: none; width: max(18px, calc(var(--logo-size) * .42)); height: max(12px, calc(var(--logo-size) * .28)); border-radius: 2px; background: linear-gradient(90deg, var(--accent-600) 0 33.4%, #f4f7f5 33.4% 66.6%, var(--accent-600) 66.6%); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
.logo .l2, .logo .l3 { font-family: var(--font-display); font-stretch: 125%; font-weight: 800; font-size: var(--logo-size); line-height: .9; letter-spacing: -.012em; text-transform: uppercase; white-space: nowrap; }
.logo .l2 { color: #f6f8f7; text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
.logo .l3 { display: inline-flex; align-items: center; gap: .22em; color: var(--accent-400); margin-top: .04em; }
.logo .l3 i { display: inline-flex; align-items: center; justify-content: center; width: .62em; height: .62em; border-radius: 50%; font-style: normal; color: #3b2500; background: radial-gradient(circle at 35% 30%, #ffe7ad, var(--gold-400) 55%, var(--gold-600)); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18), 0 4px 14px rgba(245, 189, 80, .3); }
.logo .l3 i svg { width: 64%; height: 64%; stroke-width: 2.6; }

/* splash */
#splash { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; pointer-events: auto; cursor: pointer; background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(3, 5, 4, .35) 0%, rgba(3, 5, 4, .78) 100%); }
#splash .logo { --logo-size: clamp(34px, 6.4vw, 92px); animation: logoIn .7s var(--ease-out) .1s both; }
#splash .logo, .loading .logo { align-self: center; align-items: center; text-align: center; }
#splash .logo .sign, .loading .logo .sign { align-items: center; }
.press { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: var(--r-pill); background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 0 0 1px var(--glass-line); color: var(--text-1); font-weight: 500; font-size: var(--fs-14); letter-spacing: .01em; animation: fadeIn .6s 1s both, breathe 2.6s 1.6s ease-in-out infinite; }
@keyframes logoIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes breathe { 50% { opacity: .55; } }

/* main menu: a cinematic left column over the live street; the account chip top-right */
.menu-scr { justify-content: flex-start; align-items: stretch; padding: 0; background: linear-gradient(90deg, rgba(4, 6, 5, .92) 0%, rgba(4, 6, 5, .78) 26%, rgba(4, 6, 5, .32) 50%, rgba(4, 6, 5, 0) 68%), linear-gradient(0deg, rgba(4, 6, 5, .6) 0%, rgba(4, 6, 5, 0) 30%); }
.menu-wrap { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 44px; width: min(640px, 100%); height: 100%; padding: calc(var(--sa-t) + 32px) 24px calc(var(--sa-b) + 64px) calc(var(--sa-l) + clamp(24px, 6.5vw, 104px)); overflow-y: auto; overscroll-behavior: contain; }
.menu-list { display: flex; flex-direction: column; gap: 8px; width: min(360px, 100%); }
.menu-list .btn { justify-content: flex-start; min-height: 52px; padding: 0 18px; font-size: var(--fs-16); font-weight: 600; border-radius: 14px; gap: 14px; }
.menu-list .btn.ghost { --bc: rgba(14, 18, 16, .55); --bh: rgba(30, 37, 34, .78); --bbd: rgba(255, 255, 255, .09); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--hl); }
.menu-list .btn.ghost .ico-svg { color: var(--text-3); transition: color var(--dur-2); }
.menu-list .btn.ghost:hover:not(:disabled) .ico-svg, .menu-list .btn.ghost:focus-visible .ico-svg { color: var(--accent-300); }
.menu-list .btn::after { content: ''; margin-left: auto; width: 16px; height: 16px; flex: none; opacity: 0; transform: translateX(-4px); transition: opacity var(--dur-2), transform var(--dur-2) var(--ease-out); background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.menu-list .btn:hover:not(:disabled)::after, .menu-list .btn:focus-visible::after { opacity: .7; transform: none; }
.menu-list .btn.alt { min-height: 56px; }
.menu-list .btn.continue { min-height: 68px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; padding: 10px 18px; position: relative; }
.menu-list .btn.continue::after { position: absolute; right: 18px; top: 50%; margin-top: -8px; }
.menu-list .btn.continue .c1 { font-size: var(--fs-17); display: inline-flex; align-items: center; gap: 10px; }
.menu-list .btn.continue .c2 { font-size: var(--fs-13); font-weight: 500; opacity: .78; white-space: normal; text-align: left; padding-left: 28px; }
/* no save yet: clearly disabled (no fill, dashed hairline), title and reason on two lines */
.menu-list .btn.continue:disabled { min-height: 60px; opacity: 1; --bc: rgba(14, 18, 16, .35); --bfg: var(--text-3); --bbd: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); background-image: none; cursor: not-allowed; }
.menu-list .btn.continue:disabled::after { display: none; }
.menu-list .btn.continue:disabled .c1 { font-size: var(--fs-15); }
.menu-list .btn.continue:disabled .c2 { opacity: 1; color: var(--text-4); }
.menu-top { position: absolute; top: calc(var(--sa-t) + 16px); right: calc(var(--sa-r) + 16px); display: flex; gap: 10px; align-items: center; z-index: 2; }
.menu-foot { position: absolute; left: calc(var(--sa-l) + clamp(24px, 6.5vw, 104px)); right: 16px; bottom: calc(var(--sa-b) + 18px); display: flex; align-items: center; gap: 10px; font-size: var(--fs-12); font-weight: 500; color: var(--text-3); letter-spacing: .02em; pointer-events: none; }
.icon-glass { width: 44px; height: 44px; border-radius: var(--r-2); border: 0; background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: var(--text-1); display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px var(--glass-line), var(--sh-glass); transition: background-color var(--dur-2); }
.icon-glass:hover { background: var(--glass-strong); }
.icon-glass .ico-svg { display: block; }
@media (max-width: 640px) {
  .menu-scr { background: linear-gradient(180deg, rgba(4, 6, 5, .55) 0%, rgba(4, 6, 5, .2) 30%, rgba(4, 6, 5, .5) 55%, rgba(4, 6, 5, .94) 100%); }
  .menu-wrap { width: 100%; align-items: center; justify-content: flex-end; padding: calc(var(--sa-t) + 76px) 20px calc(var(--sa-b) + 52px); gap: 28px; }
  .menu-wrap .logo { margin-bottom: auto; margin-top: 12px; align-self: center; align-items: center; --logo-size: clamp(28px, 9.4vw, 44px); }
  .menu-wrap .logo .sign { align-items: center; }
  .menu-list { width: 100%; }
  .menu-foot { left: 16px; justify-content: center; }
}
@media (max-height: 520px) and (min-width: 560px) {
  .menu-wrap { width: 100%; max-width: none; flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; padding: calc(var(--sa-t) + 56px) calc(var(--sa-r) + 24px) calc(var(--sa-b) + 34px) calc(var(--sa-l) + 28px); }
  .menu-wrap .logo { --logo-size: clamp(26px, 5.4vh, 36px); }
  .menu-list { width: min(320px, 46%); gap: 6px; }
  .menu-list .btn { min-height: 44px; }
  .menu-list .btn.continue { min-height: 58px; }
  .menu-foot { left: calc(var(--sa-l) + 28px); bottom: calc(var(--sa-b) + 10px); }
  .menu-scr { background: linear-gradient(90deg, rgba(4, 6, 5, .85) 0%, rgba(4, 6, 5, .35) 48%, rgba(4, 6, 5, .8) 100%); }
}
.install-hint { position: absolute; left: 50%; bottom: calc(var(--sa-b) + 14px); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; width: min(420px, calc(100vw - 24px)); padding: 10px 8px 10px 16px; border-radius: var(--r-3); background: var(--surface-3); color: var(--text-1); box-shadow: var(--elev-3), inset 0 0 0 1px var(--line-3); font-weight: 500; font-size: var(--fs-14); line-height: 1.4; z-index: 3; animation: sheetUp .3s var(--ease-out); }
.install-hint > .ico-svg { color: var(--accent-300); }
.install-hint .x-btn { width: 40px; height: 40px; }

/* credits */
.credits-scroll { height: min(380px, 52vh); overflow: hidden; position: relative; border-radius: var(--r-3); background: var(--surface-0); box-shadow: inset 0 0 0 1px var(--line-1); -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent); }
.credits-inner { position: absolute; left: 0; right: 0; text-align: center; animation: creditsUp 48s linear infinite; padding: 40px 20px; }
.credits-inner h3 { color: var(--accent-300); margin: 28px 0 6px; font-size: var(--fs-12); font-weight: 650; letter-spacing: .14em; text-transform: uppercase; }
.credits-inner h3:first-child { font-family: var(--font-display); font-stretch: 120%; font-weight: 800; font-size: var(--fs-24); letter-spacing: -.01em; color: var(--text-1); }
.credits-inner p { margin: 4px auto; font-weight: 450; font-size: var(--fs-15); line-height: 1.55; max-width: 46ch; color: var(--text-2); }
@keyframes creditsUp { from { transform: translateY(min(380px, 52vh)); } to { transform: translateY(-100%); } }

/* =================================================================================================================== loading screen (index.html / main.js) */
.loading { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; padding: 24px; background: radial-gradient(ellipse 70% 55% at 50% 42%, #0e1d16 0%, var(--bg) 72%); color: var(--text-1); font-family: var(--font-ui); pointer-events: auto; }
.loading .fail { max-width: 560px; padding: 28px; border-radius: var(--r-4); background: var(--surface-1); box-shadow: var(--elev-3), inset 0 0 0 1px var(--line-2); text-align: left; font-weight: 450; font-size: var(--fs-15); line-height: 1.55; color: var(--text-2); }
.loading .fail h2 { font-family: var(--font-display); font-stretch: 110%; font-size: var(--fs-24); font-weight: 750; color: var(--text-1); margin-bottom: 10px; }
.loading .fail b { color: var(--text-1); }
.loading .fail pre { text-align: left; white-space: pre-wrap; background: var(--surface-0); color: var(--text-2); padding: 12px; border-radius: var(--r-2); font-family: var(--font-mono); font-size: .76rem; max-height: 30vh; overflow: auto; user-select: text; box-shadow: inset 0 0 0 1px var(--line-1); }
.loading .fail .btn { margin-top: 12px; }
noscript { position: fixed; inset: 0; background: var(--bg); color: var(--text-1); display: flex; align-items: center; justify-content: center; font: 600 1.2rem system-ui, sans-serif; z-index: 100; text-align: center; padding: 20px; }

/* =================================================================================================================== misc icon placement */
.next-unlock { display: flex; align-items: center; justify-content: center; gap: 6px; }
.chip-nav { display: inline-flex; align-items: center; justify-content: center; }
.mini-rating { display: none; align-items: center; gap: 3px; }
.tag { gap: 4px; }
.tag .ico-svg { margin-left: -2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .credits-inner { animation: none !important; position: static; }
  .credits-scroll { overflow: auto; }
}
html.is-touch .btn, html.is-touch .cat-chip, html.is-touch .opt-chip, html.is-touch .tab, html.is-touch .keybtn { min-width: var(--tap); }
