/* Colours that change with the universe of the piece playing are registered, so they fade into each
   other (lights: night blue and gold; embers: charcoal and glowing orange). */
@property --bg { syntax: '<color>'; inherits: true; initial-value: #0d1024; }
@property --glow-1 { syntax: '<color>'; inherits: true; initial-value: #262a5e; }
@property --glow-2 { syntax: '<color>'; inherits: true; initial-value: #1d1a3f; }
@property --stage-top { syntax: '<color>'; inherits: true; initial-value: #111536; }
@property --stage-bottom { syntax: '<color>'; inherits: true; initial-value: #0b0e22; }
@property --shade { syntax: '<color>'; inherits: true; initial-value: rgb(8, 10, 26); }
@property --gold { syntax: '<color>'; inherits: true; initial-value: #f3c969; }
@property --gold-light { syntax: '<color>'; inherits: true; initial-value: #f7d47f; }
@property --gold-deep { syntax: '<color>'; inherits: true; initial-value: #d9a441; }
@property --raised { syntax: '<color>'; inherits: true; initial-value: #1c2150; }

:root {
  --bg: #0d1024;
  --glow-1: #262a5e;
  --glow-2: #1d1a3f;
  --stage-top: #111536;
  --stage-bottom: #0b0e22;
  --shade: rgb(8, 10, 26);
  --gold-light: #f7d47f;
  --raised: #1c2150;
  --bg-2: #141838;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 244, 220, 0.1);
  --text: #f4efe3;
  --muted: rgba(244, 239, 227, 0.62);
  --faint: rgba(244, 239, 227, 0.4);
  --gold: #f3c969;
  --gold-deep: #d9a441;
  --ink: #1b1608;
  --radius: 18px;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Nunito Sans', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
  transition: --bg 1.6s, --glow-1 1.6s, --glow-2 1.6s, --stage-top 1.6s, --stage-bottom 1.6s, --shade 1.6s,
    --gold 1.6s, --gold-light 1.6s, --gold-deep 1.6s, --raised 1.6s;
}
:root[data-theme="neon"] {
  --bg: #0c0620;
  --glow-1: #3a1260;
  --glow-2: #0e2a4a;
  --stage-top: #140a2e;
  --stage-bottom: #07030f;
  --shade: rgb(8, 4, 18);
  --gold: #ff5fd2;
  --gold-light: #ffa6e8;
  --gold-deep: #c43aa0;
  --raised: #221040;
  --ink: #26051d;
  --border: rgba(255, 180, 240, 0.12);
}
:root[data-theme="snow"] {
  --bg: #0a1220;
  --glow-1: #1c3252;
  --glow-2: #3a1d26;
  --stage-top: #0f1a2e;
  --stage-bottom: #070b14;
  --shade: rgb(7, 10, 18);
  --gold: #ff8f7a;
  --gold-light: #ffc7b8;
  --gold-deep: #d95a4a;
  --raised: #16243d;
  --ink: #2a0a06;
  --border: rgba(220, 235, 255, 0.11);
}
:root[data-theme="rain"] {
  --bg: #0d0b16;
  --glow-1: #2a2346;
  --glow-2: #172838;
  --stage-top: #121022;
  --stage-bottom: #07060d;
  --shade: rgb(9, 8, 16);
  --gold: #eaa6cf;
  --gold-light: #f8d4ea;
  --gold-deep: #b56b9f;
  --raised: #1f1a33;
  --ink: #1d0a17;
  --border: rgba(240, 210, 235, 0.1);
}
:root[data-theme="lanterns"] {
  --bg: #0b110c;
  --glow-1: #2c3a1c;
  --glow-2: #3a2412;
  --stage-top: #111a12;
  --stage-bottom: #070b07;
  --shade: rgb(8, 12, 8);
  --gold: #f2c46b;
  --gold-light: #ffe2a0;
  --gold-deep: #c98b2e;
  --raised: #1d2618;
  --ink: #1c1204;
  --border: rgba(255, 230, 180, 0.1);
}
:root[data-theme="aurora"] {
  --bg: #06121a;
  --glow-1: #0e3d4a;
  --glow-2: #1c1a4a;
  --stage-top: #081a24;
  --stage-bottom: #040b10;
  --shade: rgb(4, 12, 18);
  --gold: #7fe3d6;
  --gold-light: #c2f6ef;
  --gold-deep: #3fb4a6;
  --raised: #0f2a36;
  --ink: #032019;
  --border: rgba(190, 245, 235, 0.1);
}
:root[data-theme="pixels"] {
  --bg: #0b0a1a;
  --glow-1: #2a1c63;
  --glow-2: #0f3a3f;
  --stage-top: #121030;
  --stage-bottom: #07060f;
  --shade: rgb(8, 7, 20);
  --gold: #5ef08a;
  --gold-light: #a6ffbf;
  --gold-deep: #25b857;
  --raised: #1c1842;
  --ink: #031409;
  --border: rgba(190, 255, 210, 0.1);
}
:root[data-theme="embers"] {
  --bg: #120a08;
  --glow-1: #4a1d10;
  --glow-2: #2a120c;
  --stage-top: #1c0e0a;
  --stage-bottom: #0d0706;
  --shade: rgb(18, 8, 6);
  --gold: #ffa24d;
  --gold-light: #ffc27a;
  --gold-deep: #e0662c;
  --raised: #33170f;
  --ink: #210c04;
  --border: rgba(255, 214, 180, 0.1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 700px at 80% -10%, var(--glow-1) 0%, transparent 60%),
    radial-gradient(900px 600px at -10% 30%, var(--glow-2) 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 1em; height: 1em; flex: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; margin: 0; }

main { max-width: 1180px; margin: 0 auto; padding: 0 24px 64px; }

/* ---------------- header ---------------- */
.top {
  max-width: 1180px; margin: 0 auto; padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, color-mix(in srgb, var(--glow-1) 90%, white 5%), var(--stage-top)); border: 1px solid var(--border);
  color: var(--gold); font-size: 26px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 650; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 6px 14px 6px 11px; font-size: 13px; font-weight: 700; color: var(--text);
}
.pill[hidden] { display: none; }
.pill svg { font-size: 17px; color: var(--gold); }
.pill:hover { background: var(--surface-strong); }
.pill.done { color: var(--muted); cursor: default; }
.lang { display: flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; background: var(--surface); }
.lang button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }

/* ---------------- stage ---------------- */
.stage {
  position: relative; border-radius: 28px; overflow: hidden; min-height: 560px;
  background: linear-gradient(180deg, var(--stage-top) 0%, var(--stage-bottom) 100%);
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex; flex-direction: column; justify-content: flex-end;
}
#viz { position: absolute; left: 0; top: 0; width: 100%; height: 100%; } /* its height: the band above the title (visualizer.js) */

.start {
  position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 48px 32px; text-align: center; min-height: 560px;
  background: radial-gradient(600px 400px at 50% 40%, color-mix(in srgb, var(--stage-top) 40%, transparent), color-mix(in srgb, var(--stage-bottom) 92%, transparent));
}
.start[hidden] { display: none; }
.stage:has(.start:not([hidden])) .now { display: none; }

/* the universes: cards on the start screen, a switch above the player */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 270px)); gap: 16px; justify-content: center; width: 100%; max-width: 900px; margin-top: 8px; }
.universe-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  padding: 0 0 18px; border-radius: 20px; overflow: hidden; border: 1px solid var(--border); background: var(--surface);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.universe-card:not(:disabled):hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 16px 40px color-mix(in srgb, var(--accent) 22%, transparent); }
.universe-card .art { display: block; width: 100%; height: 118px; margin-bottom: 10px; background: var(--art); }
.card-name { font-family: var(--serif); font-size: 24px; font-weight: 650; padding: 0 18px; }
.card-text { font-size: 14px; color: var(--muted); padding: 0 18px; line-height: 1.4; }
.card-play {
  position: absolute; top: 90px; right: 16px; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-size: 24px; color: #1b1004; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 70%, white), var(--accent));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 40%, transparent);
}
.soon-cards { grid-template-columns: repeat(auto-fit, minmax(100px, 124px)); gap: 10px; margin-top: 4px; }
.soon-cards .universe-card { padding-bottom: 10px; border-radius: 14px; cursor: default; filter: grayscale(0.75); opacity: 0.5; }
.soon-cards .art { height: 44px; margin-bottom: 6px; }
.soon-cards .card-name { font-size: 15px; padding: 0 10px; }
.soon-cards .card-text { font-size: 11px; padding: 0 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.shared { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.shared[hidden] { display: none; }
.shared-kicker { color: var(--gold); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.universes { display: flex; gap: 8px; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.universes[hidden] { display: none; }
.universes::-webkit-scrollbar { display: none; }
.universe-pill {
  display: inline-flex; align-items: center; gap: 8px; flex: none; border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 8px 16px 8px 12px; font-weight: 700; font-size: 14px; color: var(--muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.universe-pill .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.universe-pill:not(:disabled):hover { color: var(--text); background: var(--surface-strong); }
.universe-pill[aria-pressed="true"] { color: var(--text); border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.universe-pill:disabled { cursor: default; opacity: 0.45; filter: grayscale(0.8); }
.universe-pill .soon-tag { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--faint); }

/* each universe's colour and a small picture of its theme */
.u-classique { --accent: #f3c969;
  --art: radial-gradient(circle at 22% 38%, #fff3c4 0 2px, #f3c96999 3px, transparent 10px), radial-gradient(circle at 48% 62%, #b69cff 0 2px, #b69cff88 3px, transparent 12px),
    radial-gradient(circle at 70% 30%, #5fd4c4 0 2px, #5fd4c488 3px, transparent 11px), radial-gradient(circle at 84% 58%, #f3c969 0 3px, #f3c96988 4px, transparent 16px),
    radial-gradient(120% 90% at 80% 0%, #2b3070, transparent 70%), linear-gradient(180deg, #151a44, #0b0e22); }
.u-cinematique { --accent: #ff9a4a;
  --art: radial-gradient(circle at 30% 50%, #ffe2b0 0 1.5px, transparent 3px), radial-gradient(circle at 55% 35%, #ffc27a 0 2px, transparent 4px),
    radial-gradient(circle at 68% 58%, #fff0d0 0 1.5px, transparent 3px), radial-gradient(circle at 80% 28%, #ffb057 0 1.5px, transparent 3px),
    radial-gradient(90% 80% at 55% 120%, #ff8a3c 0%, #b8401a 30%, #4a160a 60%, transparent 80%), linear-gradient(180deg, #1c0e0a, #0d0706); }
.u-chiptune { --accent: #7cf29c;
  --art: repeating-linear-gradient(90deg, #0000 0 11px, #0006 11px 12px), repeating-linear-gradient(0deg, #0000 0 11px, #0006 11px 12px),
    linear-gradient(135deg, #3b2a8c, #1f7a5c); }
.u-ambiance { --accent: #7fd6e8; --art: radial-gradient(80% 60% at 30% 70%, #3fb5a5aa, transparent 70%), radial-gradient(70% 60% at 75% 30%, #7a5cd6aa, transparent 70%), #0c1f2c; }
.u-fantaisie { --accent: #f2c46b;
  --art: radial-gradient(circle at 24% 42%, #ffe2a0 0 4px, #f2c46b88 6px, transparent 16px), radial-gradient(circle at 52% 30%, #ffd27a 0 3px, #f2a64a88 5px, transparent 14px),
    radial-gradient(circle at 78% 46%, #ffe2a0 0 4px, #f2c46b88 6px, transparent 16px), radial-gradient(circle at 38% 70%, #d8f08a 0 1.5px, transparent 3px),
    radial-gradient(circle at 66% 64%, #d8f08a 0 1.5px, transparent 3px), radial-gradient(90% 60% at 50% 120%, #6a3a14aa, transparent 70%),
    linear-gradient(180deg, #16241a, #0a110b); }
.u-lofi { --accent: #eaa6cf;
  --art: repeating-linear-gradient(100deg, #0000 0 14px, #ffffff14 14px 15px), radial-gradient(circle at 26% 46%, #ffd6a0aa 0 6px, transparent 22px),
    radial-gradient(circle at 60% 38%, #eaa6cf88 0 8px, transparent 26px), radial-gradient(circle at 80% 60%, #9fb4ff77 0 7px, transparent 24px),
    linear-gradient(135deg, #2a2240, #141c2c); }
.u-noel { --accent: #ff8f7a;
  --art: radial-gradient(circle at 18% 28%, #ffffffcc 0 1.5px, transparent 2.5px), radial-gradient(circle at 44% 16%, #ffffffaa 0 1px, transparent 2px),
    radial-gradient(circle at 70% 34%, #ffffffbb 0 1.5px, transparent 2.5px), radial-gradient(circle at 86% 14%, #ffffff99 0 1px, transparent 2px),
    radial-gradient(circle at 30% 48%, #ffffff88 0 1px, transparent 2px), radial-gradient(circle at 60% 58%, #ffffff99 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 12% 9%, #ff6b6b 0 2.5px, transparent 5px), radial-gradient(circle at 34% 12%, #ffd166 0 2.5px, transparent 5px),
    radial-gradient(circle at 56% 10%, #6fe3a0 0 2.5px, transparent 5px), radial-gradient(circle at 78% 7%, #7cc8ff 0 2.5px, transparent 5px),
    radial-gradient(60% 45% at 50% 118%, #ff9a5c99, transparent 70%), linear-gradient(180deg, #14264a, #0a1220); }
.u-synthwave { --accent: #ff5fd2; --art: repeating-linear-gradient(0deg, #0000 0 9px, #ff5fd255 9px 10px), linear-gradient(180deg, #2a0f4a 0%, #7a1f6b 60%, #ff8a4c 100%); }
.tagline { font-family: var(--serif); font-size: clamp(26px, 4vw, 44px); line-height: 1.15; max-width: 720px; margin: 0; }
.start-button {
  display: inline-flex; align-items: center; gap: 12px; border: 0; border-radius: 999px;
  padding: 18px 34px 18px 28px; font-size: 20px; font-weight: 700;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep)); color: var(--ink);
  box-shadow: 0 12px 40px color-mix(in srgb, var(--gold) 35%, transparent); transition: transform 0.15s, box-shadow 0.15s;
}
.start-button svg { font-size: 26px; }
.start-button:hover { transform: translateY(-2px); box-shadow: 0 16px 48px color-mix(in srgb, var(--gold) 45%, transparent); }
.start-hint { color: var(--muted); margin: 0; max-width: 460px; }
.start-intro { color: var(--text); opacity: 0.86; margin: 0; max-width: 640px; font-size: 17px; line-height: 1.5; }

.loading-note {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%); z-index: 2;
  padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, 0.45); color: var(--muted); font-size: 14px;
  opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.stage.loading .loading-note { opacity: 1; }

.now {
  position: relative; z-index: 1; padding: 80px 36px 30px;
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--shade) 70%, transparent) 30%, color-mix(in srgb, var(--shade) 90%, transparent) 100%);
}
.kicker { margin: 0 0 6px; color: var(--gold); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
#title { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.08; font-weight: 650; }
.details { margin: 8px 0 0; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 20px; min-height: 30px; }
.chip {
  --c: var(--gold);
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 9px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--border);
  transition: color 0.25s, background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); opacity: 0.45; transition: opacity 0.25s, box-shadow 0.25s; }
.chip.lit { color: var(--text); border-color: color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 14%, transparent); }
.chip.lit::before { opacity: 1; box-shadow: 0 0 10px var(--c); }

.progress { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { flex: 1; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); cursor: pointer; position: relative; }
.bar::after { content: ''; position: absolute; inset: -8px 0; }
.fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }

.controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; flex-wrap: wrap; }
.transport, .actions, .settings { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; font-size: 20px; color: var(--text); transition: background 0.15s, color 0.15s, transform 0.1s;
}
.icon-btn:hover { background: var(--surface-strong); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.small { width: 36px; height: 36px; font-size: 17px; }
.icon-btn.busy { opacity: 0.5; cursor: progress; }
.fav .on-icon, .fav.on .off { display: none; }
.fav.on .on-icon { display: block; }
.fav.on { color: #ff8fab; }
.play-btn {
  width: 64px; height: 64px; border-radius: 50%; border: 0; display: grid; place-items: center; font-size: 30px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep)); color: var(--ink);
  box-shadow: 0 8px 26px color-mix(in srgb, var(--gold) 30%, transparent);
}
.play-btn .when-playing, .play-btn.playing .when-paused { display: none; }
.play-btn.playing .when-playing { display: block; }
.volume, .timer { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 18px; }
.volume input { width: 110px; accent-color: var(--gold); }
.timer select, .field select {
  appearance: none; border: 1px solid var(--border); background: var(--surface); border-radius: 10px;
  padding: 7px 30px 7px 12px; font-size: 14px; color: var(--text);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%; background-size: 5px 5px; background-repeat: no-repeat;
}
.timer select option, .field select option { background: var(--raised); color: var(--text); }
.timer-left { font-size: 13px; color: var(--gold); }

/* ---------------- panels ---------------- */
.panels { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 22px; margin-top: 22px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card h2 { font-size: 24px; }
.hint { margin: 6px 0 18px; color: var(--muted); font-size: 14px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; color: var(--muted); }
.field select { width: 100%; font-weight: 600; }
.primary {
  margin-top: 20px; width: 100%; border: 0; border-radius: 12px; padding: 14px; font-size: 16px; font-weight: 700;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep)); color: var(--ink);
}
.primary:hover { filter: brightness(1.05); }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin: -6px -6px 12px; padding: 0 6px; overflow-x: auto; }
.tab {
  border: 0; background: none; padding: 10px 12px; font-weight: 700; color: var(--muted); font-size: 15px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--gold); }
#favCount { color: var(--gold); }
.list { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow-y: auto; }
.row { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 0; border-radius: 12px; }
.row + .row { margin-top: 2px; }
.row:hover { background: rgba(255, 255, 255, 0.03); }
.row.current { background: color-mix(in srgb, var(--gold) 8%, transparent); }
.row-main { flex: 1; min-width: 0; border: 0; background: none; text-align: left; padding: 8px 10px; display: flex; flex-direction: column; }
.row-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.current .row-title { color: var(--gold); }
.row-sub { font-size: 13px; color: var(--faint); }
.empty { color: var(--muted); padding: 18px 8px; }
.heard { margin: 12px 0 0; font-size: 13px; color: var(--faint); }

/* ---------------- why, footer ---------------- */
.why { margin-top: 56px; }
.why h2, footer h2 { font-size: 28px; margin-bottom: 18px; }
.why ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.why li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.why h3 { font-size: 19px; color: var(--gold); margin-bottom: 8px; }
.why p { margin: 0; color: var(--muted); font-size: 15px; }
footer { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); max-width: 780px; }
footer p { color: var(--muted); }
.credits { font-size: 13px; color: var(--faint) !important; }
.site-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 18px; font-size: 14px; color: var(--faint); }
.site-links a { color: var(--muted); text-decoration: none; }
.site-links a:hover, .site-links a[aria-current="page"] { color: var(--text); }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--raised); border: 1px solid var(--border); padding: 10px 18px; border-radius: 999px; font-weight: 600;
  transition: opacity 0.2s, transform 0.2s; z-index: 10;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

button:focus-visible, select:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.menu {
  position: fixed; z-index: 20; min-width: 230px; padding: 6px; border-radius: 14px;
  background: var(--raised); border: 1px solid var(--border); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.menu[hidden] { display: none; }
.menu button {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%; border: 0; background: none;
  padding: 10px 12px; border-radius: 10px; text-align: left;
}
.menu button:hover, .menu button:focus-visible { background: rgba(255, 255, 255, 0.07); outline: none; }
.menu-title { font-weight: 700; }
.menu-sub { font-size: 13px; color: var(--muted); }

/* ---------------- small screens ---------------- */
@media (max-width: 900px) {
  .panels { grid-template-columns: minmax(0, 1fr); }
  .why ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  main { padding: 0 16px 48px; }
  .pill span { display: none; }
  .pill { padding: 7px; }
  .top { padding: 16px; }
  .brand-name { font-size: 19px; }
  .start-intro { font-size: 15px; line-height: 1.45; }
  .stage { min-height: 620px; border-radius: 22px; }
  .start { padding: 36px 16px; min-height: 620px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .soon-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .now { padding: 90px 18px 22px; }
  .controls { justify-content: center; }
  .settings { width: 100%; justify-content: center; flex-wrap: wrap; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .why ul { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
