/* SlashArcade Website — Brand Guide Edition
   Self-hosted Bungee, Archivo, JetBrains Mono + live 24-theme CSS variables +
   floating info cards + real game art framing + live ASCII compatibility DB. */

@font-face {
  font-family: "Bungee";
  src: url("./fonts/Bungee-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("./fonts/Archivo-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("./fonts/Archivo-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("./fonts/Archivo-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("./fonts/JetBrainsMono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("./fonts/JetBrainsMono-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #FFF1CF;
  --card: #FFFAEB;
  --panel: #FFF1CF;
  --deep: #000000;
  --ink: #000000;
  --second: #3A2F1E;
  --outline: #000000;
  --shadow: #000000;
  --glass: rgba(255, 250, 235, 0.76);
  --glass-sheen: rgba(255, 255, 255, 0.90);
  --accent: #F4BB44;
  --on-accent: #000000;
  --on-deep: #FFF1CF;
  --on-b1: #FFF1CF;
  --on-b2: #000000;
  --on-b3: #000000;
  --on-b4: #000000;
  --on-b5: #000000;
  --warn: #D0103A;
  --b1: #D0103A;
  --b2: #F5352B;
  --b3: #FF6A13;
  --b4: #FF9324;
  --b5: #F4BB44;
  --score-5: #F4BB44;
  --score-4: #FF9324;
  --score-3: #FF6A13;
  --ascii-opacity: 0.92;
  --ascii-shadow: transparent;

  --font-display: "Bungee", "Arial Black", sans-serif;
  --font-body: "Archivo", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html[data-dark="0"] { color-scheme: light; }
html[data-dark="1"] { color-scheme: dark; }

/* Until the first theme paint is done, no colour fades (index.html removes the class). */
html.sa-loading *, html.sa-loading *::before, html.sa-loading *::after { transition: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: clip;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a { color: var(--ink); }
a:hover { color: var(--second); }

.sa-link {
  text-decoration: none;
  font-weight: 700;
}
.sa-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.sa-focus:focus-visible {
  outline: 4px solid var(--outline);
  outline-offset: 4px;
}
.sa-focus-light:focus-visible {
  outline: 4px solid var(--accent);
  outline-offset: 6px;
}

.sa-press {
  transition: transform 0.08s ease, box-shadow 0.08s ease, background-color 0.15s ease;
  cursor: pointer;
}
.sa-press:hover {
  transform: translate(-1px, -1px);
}
.sa-press:active {
  transform: translate(3px, 3px);
  box-shadow: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Blinking ASCII cursor */
@keyframes sa-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.sa-cursor {
  display: inline-block;
  animation: sa-blink 1.1s steps(1, end) infinite;
}

/* Floating animation for info cards */
@keyframes sa-float {
  0%, 100% { transform: translateY(0px) rotate(var(--card-rot, 0deg)); }
  50% { transform: translateY(-8px) rotate(calc(var(--card-rot, 0deg) + 0.35deg)); }
}
.sa-float-card {
  animation: sa-float 5.6s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  will-change: transform;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.sa-float-card:hover {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sa-cursor { animation: none; }
  .sa-float-card { animation: none !important; transform: none !important; }
  .sa-press:hover, .sa-press:active { transform: none; }
  .db-row-card:hover { transform: none; }
  .theme-card:hover { transform: none; }
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
}

/* Slash divider rule */
.slash-rule-wrap {
  padding: 0 24px;
}
.slash-rule {
  max-width: 1240px;
  margin: 0 auto;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  white-space: pre;
  color: var(--outline);
  user-select: none;
}
.slash-rule--accent { color: var(--b3); }

/* Gloss Sticky Nav */
.nav-wrap {
  position: sticky;
  top: 14px;
  z-index: 40;
  padding: 16px 24px 0;
}
.gloss-nav {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  min-height: 66px;
  padding: 8px 12px 8px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 3px solid var(--outline);
  border-radius: 22px;
  box-shadow: inset 0 2px 0 var(--glass-sheen), 4px 4px 0 var(--shadow);
}
.gloss-sheen {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 22px;
  height: 22px;
  pointer-events: none;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}
.brand-wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.01em;
}
/* Page tabs, drawn like the app's Settings tabs: chunky Bungee stickers, the open
   one lifted in its ramp colour with the hard Crimson stack. */
.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-tab {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  background: var(--card);
  color: var(--ink);
  border: 3px solid var(--outline);
  border-radius: 13px;
  box-shadow: 3px 3px 0 var(--shadow);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.nav-tab:hover { transform: translateY(-1px); box-shadow: 4px 4px 0 var(--shadow); }
.nav-tab[aria-current="page"] {
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--shadow), 6px 6px 0 var(--b1);
}
.nav-tab--home[aria-current="page"]     { background: var(--b5); color: var(--on-b5); }
.nav-tab--database[aria-current="page"] { background: var(--b4); color: var(--on-b4); }
.nav-tab--themes[aria-current="page"]   { background: var(--b3); color: var(--on-b3); }
.nav-tab--news[aria-current="page"]     { background: var(--b2); color: var(--on-b2); }
.nav-tab--superdx[aria-current="page"]  { background: var(--b1); color: var(--on-b1); box-shadow: 3px 3px 0 var(--shadow), 6px 6px 0 var(--b4); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 60;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--on-accent);
  border: 3px solid var(--outline);
  border-radius: 12px;
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

.nav-mode-group {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  gap: 3px;
  background: var(--panel);
  border: 3px solid var(--outline);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--shadow);
}
.nav-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 10px;
  background: transparent;
  color: var(--ink);
  border: 2px solid transparent;
  border-radius: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}
.nav-mode-btn[aria-pressed="true"],
html[data-mode="light"] .nav-mode-btn[data-set-mode="light"],
html[data-mode="dark"] .nav-mode-btn[data-set-mode="dark"],
html[data-mode="system"] .nav-mode-btn[data-set-mode="system"] {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--outline);
}
/* Tab pages */
.page--themes .themes-section,
.page--database .db-section { padding-top: 40px; }
.page-h1 { margin: 0; }
.page--database .page-h1 { font-size: clamp(34px, 5vw, 56px); }

/* News tab */
.news-section, .news-article { padding: 40px 24px 64px; }
/* 404 page (404.html, built by news.mjs) */
.notfound { max-width: 820px; padding: 56px 24px 96px; }
.notfound .section-lead { margin-top: 14px; }
.news-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 28px;
  margin-bottom: 30px;
}
.news-head .page-h1 { font-size: clamp(40px, 6vw, 64px); }
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.news-card {
  display: grid;
  gap: 8px;
  padding: 22px 26px;
  background: var(--card);
  color: var(--ink);
  border: 4px solid var(--outline);
  border-radius: 22px;
  box-shadow: 4px 4px 0 var(--shadow), 8px 8px 0 var(--b4), 12px 12px 0 var(--b1);
  text-decoration: none;
  transition: transform 0.1s steps(2, end);
}
.news-card:hover { transform: translate(-2px, -2px); }
.news-card--announcement {
  box-shadow: 4px 4px 0 var(--shadow), 8px 8px 0 var(--b3), 12px 12px 0 var(--b1);
}
.news-card-meta, .news-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.news-article-meta { margin-top: 12px; }
.news-article-meta .news-date { margin-top: 0; }
.news-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 2.5px solid var(--outline);
  border-radius: 9px;
  box-shadow: 2px 2px 0 var(--shadow);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}
.news-badge--monthly { background: var(--b5); color: var(--on-b5); }
.news-badge--announcement { background: var(--b1); color: var(--on-b1); }
.news-badge--draft { background: var(--panel); color: var(--second); border-style: dashed; box-shadow: none; }
.news-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.news-filter-btn {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  background: var(--card);
  color: var(--ink);
  border: 3px solid var(--outline);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--shadow);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}
.news-filter-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--shadow);
}
.news-card-date, .news-date { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--second); margin: 0; }
.news-card-title { font-family: var(--font-display); font-size: clamp(20px, 2.6vw, 28px); line-height: 1.1; }
.news-card-summary { color: var(--second); max-width: 70ch; }
.news-card-more { font-family: var(--font-mono); font-weight: 700; }
.news-empty {
  padding: 34px 24px;
  border: 3px dashed var(--outline);
  border-radius: 22px;
  text-align: center;
}
.news-empty-title { margin: 0 0 14px; font-family: var(--font-display); font-size: 22px; }
.news-empty pre { margin: 0 auto; font-family: var(--font-mono); font-size: clamp(9px, 2.4vw, 14px); font-weight: 700; white-space: pre; overflow-x: auto; max-width: 100%; }
.news-article { max-width: 820px; }
.news-article .page-h1 { font-size: clamp(30px, 4.6vw, 50px); line-height: 1.05; }
.news-date { margin-top: 10px; }
.news-body {
  margin-top: 28px;
  padding: 26px 34px 32px;
  background: var(--card);
  border: 4px solid var(--outline);
  border-radius: 24px;
  box-shadow: 4px 4px 0 var(--shadow), 8px 8px 0 var(--b4), 12px 12px 0 var(--b1);
  font-size: 18px;
  line-height: 1.6;
}
.news-body h2 {
  margin: 30px 0 10px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.15;
  text-shadow: 2px 2px 0 var(--b5);
}
.news-body p { margin: 0 0 14px; }
.news-body code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  font-weight: 700;
  padding: 1px 6px;
  border: 2px solid var(--outline);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
}
.news-body ul { margin: 0 0 14px; padding-left: 1.3em; }
.news-body li { margin: 4px 0; }
.news-body li::marker { color: var(--b3); content: "> "; font-family: var(--font-mono); font-weight: 700; }
.news-hello { font-weight: 700; }
.news-numbers ul { list-style: none; padding: 0; display: grid; gap: 6px; font-family: var(--font-mono); font-size: 16px; }
.news-numbers li::marker { content: ""; }
.news-numbers strong { font-family: var(--font-display); font-weight: 400; font-size: 1.35em; color: var(--ink); text-shadow: 2px 2px 0 var(--b4); margin-right: 4px; }
.news-figure { margin: 22px 0 26px; }
.news-figure img { display: block; width: 100%; height: auto; border: 3px solid var(--outline); border-radius: 16px; box-shadow: 4px 4px 0 var(--shadow); }
.news-figure figcaption { margin-top: 10px; font-family: var(--font-mono); font-size: 13px; line-height: 1.45; color: var(--second); }
.news-viz-stage {
  background: var(--panel);
  color: var(--ink);
  border: 3.5px solid var(--outline);
  border-radius: 18px;
  box-shadow: 4px 4px 0 var(--shadow), 8px 8px 0 var(--b5);
  padding: 18px 20px;
  overflow: hidden;
}
.news-viz-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2.5px dashed var(--outline);
}
.news-viz-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(15px, 2vw, 19px);
  line-height: 1.15;
  color: var(--ink);
}
.news-viz-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--second);
  margin: 0 0 2px;
}
.news-viz-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.news-viz-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 11px;
  background: var(--card);
  color: var(--ink);
  border: 2.5px solid var(--outline);
  border-radius: 9px;
  box-shadow: 2px 2px 0 var(--shadow);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.08s steps(2, end), box-shadow 0.08s steps(2, end), background-color 0.12s steps(2, end);
}
.news-viz-btn:hover { transform: translate(-1px, -1px); }
.news-viz-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.news-viz-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--shadow);
}
.news-viz-btn:focus-visible { outline: 3px solid var(--outline); outline-offset: 2px; }
.news-viz-note {
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  color: var(--second);
}
.news-back { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.news-head .sticker-btn, .news-back .sticker-btn { text-decoration: none; }
@media (max-width: 600px) {
  .news-section, .news-article, .notfound { padding-left: 14px; padding-right: 14px; }
  .news-body { padding: 20px 18px 24px; font-size: 17px; }
  .news-viz-stage { padding: 14px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .news-card:hover, .news-viz-btn:hover, .news-viz-btn:active { transform: none; }
  .news-viz-stage *, .news-viz-stage *::before, .news-viz-stage *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* SuperDX tab: our own layer first, then the open-source layers behind it */
.sdx-hero {
  padding: 40px 24px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 36px 48px;
}
.sdx-hero-card {
  flex: 1 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: clamp(24px, 3.6vw, 40px);
  background: var(--card);
  border: 4px solid var(--outline);
  border-radius: 28px;
  box-shadow: 4px 4px 0 var(--shadow), 8px 8px 0 var(--b5), 12px 12px 0 var(--b3), 16px 16px 0 var(--b1), 19px 19px 0 var(--shadow);
}
.sdx-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, 9vw, 112px);
  line-height: 0.92;
  text-shadow: 3px 3px 0 var(--b5), 6px 6px 0 var(--b3), 9px 9px 0 var(--b1);
}
.sdx-lead { margin: 0; font-size: clamp(18px, 1.9vw, 21px); line-height: 1.45; max-width: 36ch; }
.sdx-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.sdx-chips li {
  padding: 5px 11px;
  background: var(--panel);
  border: 3px solid var(--outline);
  border-radius: 11px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}
.sdx-meta { margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--second); }
.sdx-gt { color: var(--warn); font-weight: 700; }
.sdx-stack {
  flex: 0 1 auto;
  max-width: 100%;
  overflow-x: auto;
  padding: 22px 24px;
  background: var(--deep);
  color: var(--on-deep);
  border: 4px solid var(--outline);
  border-radius: 24px;
  box-shadow: 4px 4px 0 var(--shadow), 8px 8px 0 var(--b1);
  transform: rotate(1deg);
}
.sdx-stack pre { margin: 0; font-family: var(--font-mono); font-size: clamp(11px, 1.35vw, 15px); font-weight: 700; line-height: 1.3; white-space: pre; font-variant-ligatures: none; }
.sdx-ours { color: var(--score-5); }
.sdx-tag { color: var(--score-3); }
.sdx-section { padding: 30px 24px 26px; display: flex; flex-direction: column; gap: 18px; }
.sdx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.sdx-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 24px;
  border: 4px solid var(--outline);
  border-radius: 22px;
  box-shadow: 4px 4px 0 var(--shadow);
}
.sdx-card h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(19px, 2vw, 23px); line-height: 1.1; }
.sdx-card p { margin: 0; font-size: 16px; line-height: 1.5; }
.sdx-card--b5 { background: var(--b5); color: var(--on-b5); }
.sdx-card--b4 { background: var(--b4); color: var(--on-b4); }
.sdx-card--b3 { background: var(--b3); color: var(--on-b3); }
.sdx-card--b2 { background: var(--b2); color: var(--on-b2); }
.sdx-card--plain { background: var(--card); color: var(--ink); }
.sdx-card--plain p { color: var(--second); }
.sdx-progress {
  align-self: flex-start;
  max-width: 100%;
  padding: 18px 22px;
  background: var(--card);
  border: 3px dashed var(--outline);
  border-radius: 18px;
}
.sdx-progress-title { margin: 0 0 10px; font-family: var(--font-display); font-weight: 400; font-size: 18px; }
.sdx-progress pre { margin: 0; font-family: var(--font-mono); font-size: 14px; font-weight: 700; line-height: 1.55; white-space: pre-wrap; }
.sdx-now { color: var(--on-b5); background: var(--b5); padding: 0 2px; }
.sdx-wip { color: var(--warn); }
.sdx-ladder {
  background: var(--card);
  border: 4px solid var(--outline);
  border-radius: 22px;
  box-shadow: 4px 4px 0 var(--shadow), 8px 8px 0 var(--b4);
  overflow: hidden;
}
.sdx-ladder-row {
  display: grid;
  grid-template-columns: minmax(110px, 160px) 1fr;
  gap: 6px 18px;
  padding: 11px 20px;
  border-top: 2px solid var(--outline);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.45;
}
.sdx-ladder-row:first-child { border-top: 0; }
.sdx-ladder-row > span:first-child { font-weight: 700; }
.sdx-ladder-row .sdx-ours { color: var(--on-b5); background: var(--b5); padding: 0 4px; border-radius: 4px; }
.sdx-layers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.sdx-layer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background: var(--card);
  border: 3px solid var(--outline);
  border-radius: 16px;
  box-shadow: 3px 3px 0 var(--shadow);
}
.sdx-layer-name { font-family: var(--font-display); font-size: 18px; line-height: 1.1; }
.sdx-layer-what { font-size: 15px; color: var(--second); flex: 1; }
.sdx-layer-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-family: var(--font-mono); font-size: 12px; font-weight: 700; }
.sdx-patched { padding: 1px 7px; background: var(--b3); color: var(--on-b3); border-radius: 8px; }
.sdx-note { margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--second); }
@media (max-width: 600px) {
  .sdx-hero, .sdx-section { padding-left: 14px; padding-right: 14px; }
  .sdx-stack { transform: none; }
  .sdx-ladder-row { grid-template-columns: 1fr; }
}

.themes-banner {
  margin-bottom: 34px;
  padding: clamp(22px, 3.4vw, 34px) clamp(22px, 3.4vw, 38px);
  background: var(--card);
  border: 4px solid var(--outline);
  border-radius: 26px;
  box-shadow: 4px 4px 0 var(--shadow), 8px 8px 0 var(--b5), 12px 12px 0 var(--b3), 16px 16px 0 var(--b1), 19px 19px 0 var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.themes-banner-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.08;
}
.themes-banner-sub {
  margin: 0;
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.45;
  color: var(--second);
}

/* HERO */
.hero-section {
  position: relative;
  padding: 28px 24px 56px;
  overflow: hidden;
}
.ascii-field {
  position: absolute;
  left: 0;
  top: -12px;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
  opacity: var(--ascii-opacity);
}
.ascii-field-inner {
  position: relative;
  left: min(69.4%, calc(50% + 280px));
  margin-left: -81em;
  width: max-content;
  font-size: clamp(10px, 1.158vw, 17px);
  font-weight: 700;
  text-shadow: 0.06em 0.06em 0 var(--ascii-shadow);
}
.ascii-zone {
  margin: 0;
  font-family: var(--font-mono);
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.1;
  letter-spacing: 0;
  white-space: pre;
}
.ascii-zone--5 { color: var(--b5); }
.ascii-zone--4 { color: var(--b4); }
.ascii-zone--3 { color: var(--b3); }
.ascii-zone--2 { color: var(--b2); }
.ascii-zone--1 { color: var(--b1); }

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

/* LARGE FRONT-PAGE COMING SOON BANNER — bright Paper sticker in Light, warm card in Dark */
.coming-soon-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 16px 22px;
  background: var(--card);
  color: var(--ink);
  border: 4px solid var(--outline);
  border-radius: 24px;
  box-shadow: 4px 4px 0 var(--shadow), 8px 8px 0 var(--b5);
}
.coming-soon-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}
.coming-soon-stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--accent);
  color: var(--on-accent);
  border: 3px solid var(--outline);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--shadow);
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1;
  letter-spacing: 0.03em;
}
.coming-soon-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.coming-soon-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(15px, 1.9vw, 20px);
  line-height: 1.15;
  color: var(--ink);
}
.coming-soon-sub {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--second);
}
.coming-soon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Hero top row */
.hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 36px 48px;
}
.hero-sticker {
  flex: 1 1 540px;
  max-width: 670px;
  min-width: 0;
  background: var(--panel);
  border: 4px solid var(--outline);
  border-radius: 28px;
  box-shadow: 4px 4px 0 var(--shadow), 8px 8px 0 var(--b5), 12px 12px 0 var(--b3), 16px 16px 0 var(--b1), 19px 19px 0 var(--shadow);
  padding: clamp(24px, 3.8vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.hero-h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.04;
  text-wrap: balance;
}
.hero-sub {
  margin: 0;
  max-width: 520px;
  font-size: 18px;
  line-height: 1.48;
  font-weight: 500;
  color: var(--second);
}
.hero-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 4px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 24px;
  background: var(--accent);
  color: var(--on-accent);
  border: 4px solid var(--outline);
  border-radius: 18px;
  box-shadow: 4px 4px 0 var(--shadow), 8px 8px 0 var(--b1);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 19px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary:hover { color: var(--on-accent); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 20px;
  background: var(--card);
  color: var(--ink);
  border: 3px solid var(--outline);
  border-radius: 18px;
  box-shadow: 4px 4px 0 var(--shadow);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.btn-secondary:hover { color: var(--ink); }
.hero-meta-line {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--second);
}
.hero-badge-col {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}
.hero-badge-wrap {
  width: min(350px, 100%);
}
/* Brand logo badge stays true to its Cream/Black/Sunset sticker regardless of theme */
.sa-brand-preserve svg {
  display: block;
  width: 100%;
  height: auto;
}

/* How it works + Interactive Library Window Preview with REAL game artwork */
.how-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 32px 48px;
  padding-top: 8px;
}
.how-lead {
  flex: 1 1 290px;
  max-width: 390px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 18px;
}
.section-h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.08;
}
.section-lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--second);
}

.lib-preview {
  position: relative;
  flex: 2 1 540px;
  min-width: 0;
  max-width: 800px;
  background: var(--panel);
  border: 4px solid var(--outline);
  border-radius: 28px;
  box-shadow: 6px 6px 0 var(--shadow), 12px 12px 0 var(--b5);
  overflow: hidden;
  display: flex;
  transform: rotate(1.4deg);
}
.lib-glow-a {
  position: absolute;
  right: -60px;
  top: -90px;
  width: 420px;
  height: 280px;
  border-radius: 50%;
  background: var(--b3);
  filter: blur(54px);
  opacity: 0.42;
  pointer-events: none;
}
.lib-glow-b {
  position: absolute;
  left: 30px;
  top: -70px;
  width: 320px;
  height: 240px;
  border-radius: 50%;
  background: var(--b5);
  filter: blur(54px);
  opacity: 0.52;
  pointer-events: none;
}
.lib-sidebar {
  position: relative;
  z-index: 1;
  flex: none;
  width: 68px;
  padding: 14px 0;
  background: var(--glass);
  border-right: 3px solid var(--outline);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lib-rail-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.lib-rail-btn--active {
  background: var(--accent);
  color: var(--on-accent);
  border: 2px solid var(--outline);
  box-shadow: 2px 2px 0 var(--shadow);
}
.lib-body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lib-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 12px;
  background: var(--glass);
  border: 2px solid var(--outline);
  border-radius: 14px;
}
.lib-topbar-title {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1;
}
.lib-count-pill {
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1;
  padding: 4px 8px;
  background: var(--deep);
  color: var(--on-deep);
  border-radius: 8px;
}
.lib-search-mock {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0 10px;
  background: var(--card);
  border: 2px solid var(--outline);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--second);
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  white-space: nowrap;
}
/* Brand Guide Page 08 bright split featured row: Bone/glow title column + real hero art sticker */
.lib-featured {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 18px;
  padding: 6px 4px 4px;
}
.lib-featured-content {
  flex: 1 1 230px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}
.lib-featured-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.08;
  color: var(--ink);
}
.lib-featured-art-frame {
  flex: 1.15 1 240px;
  min-width: 0;
  aspect-ratio: 16 / 9;
  border: 3px solid var(--outline);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 3px 3px 0 var(--shadow), 6px 6px 0 var(--b5), 9px 9px 0 var(--b3);
  transform: rotate(1.5deg);
}
.lib-featured-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}
.lib-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lib-chip {
  padding: 3px 8px;
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--outline);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}
.lib-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lib-play-pill {
  padding: 7px 16px;
  background: var(--accent);
  color: var(--on-accent);
  border: 2.5px solid var(--outline);
  border-radius: 11px;
  box-shadow: 3px 3px 0 var(--shadow);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1;
}
.lib-details-pill {
  padding: 7px 12px;
  background: var(--glass);
  color: var(--ink);
  border: 2px solid var(--outline);
  border-radius: 11px;
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1;
}

.lib-shelf-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--second);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lib-tiles-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 6px;
}
.lib-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 2.5px solid var(--outline);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--shadow);
  overflow: hidden;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  text-align: left;
}
.lib-tile:hover {
  transform: translateY(-4px) rotate(-1deg);
}
.lib-tile[aria-pressed="true"] {
  border-color: var(--outline);
  box-shadow: 2px 2px 0 var(--shadow), 4px 4px 0 var(--b5), 6px 6px 0 var(--b3), 8px 8px 0 var(--b1);
  transform: translateY(-4px) rotate(1.5deg);
}
.lib-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.lib-tile-caption {
  padding: 5px 6px;
  background: var(--card);
  color: var(--ink);
  border-top: 2px solid var(--outline);
  font-family: var(--font-display);
  font-size: 9.5px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* BENEFITS / FLOATING INFO CARDS */
.benefits-section {
  padding: 52px 24px 64px;
}
.benefits-stack {
  display: flex;
  flex-direction: column;
  gap: 38px;
}
.benefits-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}
.info-card {
  border: 4px solid var(--outline);
  border-radius: 28px;
  padding: clamp(24px, 3.6vw, 38px);
}
.info-card--library {
  flex: 7 1 460px;
  min-width: 0;
  background: var(--card);
  box-shadow: 4px 4px 0 var(--shadow), 8px 8px 0 var(--b5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  --float-delay: 0s;
  --card-rot: -0.4deg;
}
.info-card--controller {
  flex: 5 1 340px;
  min-width: 0;
  background: var(--b4);
  color: var(--on-b4);
  box-shadow: 4px 4px 0 var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  --float-delay: -1.4s;
  --card-rot: 0.5deg;
}
.info-card--doctor {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 10px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 44px;
}
.info-card--shared {
  background: var(--b2);
  color: var(--on-b2);
  box-shadow: 4px 4px 0 var(--shadow), 8px 8px 0 var(--b5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px 52px;
  --float-delay: -4.1s;
  --card-rot: 0.35deg;
}
.info-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(23px, 3vw, 34px);
  line-height: 1.08;
}
.info-card p {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
}
.info-card--library p,
.info-card--doctor .doctor-copy p {
  color: var(--second);
}
.store-ticket {
  flex: none;
  max-width: 100%;
  overflow-x: auto;
  background: var(--accent);
  color: var(--on-accent);
  border: 3px solid var(--outline);
  border-radius: 18px;
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 15px 18px;
  transform: rotate(2deg);
}
.store-ticket pre,
.ascii-box pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(9.5px, 2.4vw, 13.5px);
  font-weight: 700;
  line-height: 1.3;
  white-space: pre;
}
.controller-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 10px 15px;
  background: var(--glass);
  color: var(--ink);
  border: 3px solid var(--outline);
  border-radius: 14px;
  box-shadow: inset 0 2px 0 var(--glass-sheen), 4px 4px 0 var(--shadow);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
}
.doctor-copy {
  flex: 1 1 320px;
  max-width: 470px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.doctor-terminal {
  flex: 1.2 1 380px;
  max-width: 560px;
  background: var(--card);
  border: 4px solid var(--outline);
  border-radius: 26px;
  box-shadow: 4px 4px 0 var(--shadow), 8px 8px 0 var(--b5), 12px 12px 0 var(--b3), 16px 16px 0 var(--b1), 19px 19px 0 var(--shadow);
  padding: 22px 26px;
  overflow-x: auto;
  --float-delay: -2.8s;
  --card-rot: -1deg;
}
.doctor-terminal-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 17px;
}
.doctor-terminal pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(9.5px, 2.35vw, 13.5px);
  line-height: 1.45;
  white-space: pre;
  color: var(--ink);
}
.doctor-fail { color: var(--warn); font-weight: 700; }
.doctor-ok {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  padding: 0 4px;
  border-radius: 4px;
}

/* THEMES SECTION — ALL 24 INTERACTIVE */
.themes-section {
  padding: 52px 24px 64px;
}
.themes-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
  margin-bottom: 30px;
}
.themes-header-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}
.themes-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.themes-mode-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.sticker-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  background: var(--card);
  color: var(--ink);
  border: 3px solid var(--outline);
  border-radius: 13px;
  box-shadow: 3px 3px 0 var(--shadow);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.sticker-btn--active,
.sticker-btn[aria-pressed="true"],
html[data-mode="light"] .sticker-btn[data-set-mode="light"],
html[data-mode="dark"] .sticker-btn[data-set-mode="dark"],
html[data-mode="system"] .sticker-btn[data-set-mode="system"] {
  background: var(--accent);
  color: var(--on-accent);
}

.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 22px 20px;
  list-style: none;
  margin: 0;
  padding: 4px 8px 12px 0;
}
.theme-card {
  width: 100%;
  background: var(--card);
  color: var(--ink);
  border: 3px solid var(--outline);
  border-radius: 20px;
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.theme-card:hover {
  transform: translateY(-4px) rotate(0deg);
  box-shadow: 5px 7px 0 var(--shadow);
}
.theme-card[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 4px 4px 0 var(--shadow), 8px 8px 0 var(--b5), 12px 12px 0 var(--b3);
  transform: translateY(-3px) rotate(0deg);
}
.theme-swatch-box {
  border: 3px solid var(--outline);
  border-radius: 12px;
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.theme-bands {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 4px;
  overflow: hidden;
}
.theme-band {
  height: 9px;
  width: 100%;
}
.theme-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.theme-key-pill {
  width: 48px;
  height: 15px;
  border-radius: 5px;
}
.theme-active-dot {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  border: 2px solid var(--outline);
}
.theme-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.theme-name {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}
.theme-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--second);
  text-transform: uppercase;
}

/* LIVE GAME DATABASE */
.db-section {
  padding: 52px 24px 64px;
}
.db-hero-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 28px 36px;
  margin-bottom: 28px;
}
.db-intro-card {
  flex: 1 1 480px;
  min-width: 0;
  background: var(--panel);
  border: 4px solid var(--outline);
  border-radius: 28px;
  box-shadow: 4px 4px 0 var(--shadow), 8px 8px 0 var(--b5), 12px 12px 0 var(--b3), 16px 16px 0 var(--b1), 19px 19px 0 var(--shadow);
  padding: clamp(24px, 3.6vw, 36px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.db-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}
.db-kicker-slash { color: var(--b3); }
.db-live-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--second);
}
.db-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--outline);
  border-radius: 9px;
  font-weight: 700;
}
.db-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid var(--outline);
}
.db-live-dot--warn { background: var(--warn); }

.db-scoreboard {
  flex: 1 1 500px;
  min-width: 0;
  background: var(--deep);
  color: var(--on-deep);
  border: 4px solid var(--outline);
  border-radius: 28px;
  box-shadow: 4px 4px 0 var(--b3), 8px 8px 0 var(--shadow);
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}
.score-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}
.score-digits {
  margin: 0;
  min-width: 190px;
  font-family: var(--font-mono);
  font-size: clamp(9px, 1.1vw, 12px);
  font-weight: 700;
  line-height: 1.06;
  white-space: pre;
}
.score-digits--5 { color: var(--score-5); }
.score-digits--4 { color: var(--score-4); }
.score-digits--3 { color: var(--score-3); }
.score-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.score-label {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.15;
  color: var(--on-deep);
}
.score-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-deep);
  opacity: 0.88;
}

/* Sticky frosted search & filters */
.db-controls-card {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 3px solid var(--outline);
  border-radius: 24px;
  box-shadow: inset 0 2px 0 var(--glass-sheen), 4px 4px 0 var(--shadow);
  padding: 18px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}
.db-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.db-search-box {
  flex: 1 1 320px;
  min-width: 0;
  height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: var(--card);
  border: 3px solid var(--outline);
  border-radius: 15px;
  box-shadow: 3px 3px 0 var(--shadow);
}
.db-search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  outline: none;
}
.db-search-box input::placeholder { color: var(--second); opacity: 0.85; }
.db-kbd {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
  border: 2px solid var(--outline);
  border-radius: 7px;
}
.db-select {
  height: 50px;
  padding: 0 14px;
  background: var(--card);
  color: var(--ink);
  border: 3px solid var(--outline);
  border-radius: 15px;
  box-shadow: 3px 3px 0 var(--shadow);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.db-filter-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.db-filter-label {
  width: 84px;
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.db-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-pill {
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--card);
  color: var(--ink);
  border: 2.5px solid var(--outline);
  border-radius: 11px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.filter-pill[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 3px 3px 0 var(--shadow);
}
.filter-pill-count {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.82;
}
.status-dot {
  width: 11px;
  height: 11px;
  border: 2px solid var(--outline);
  border-radius: 3px;
  flex: none;
}

/* Database table */
.db-list-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin-bottom: 14px;
}
.db-list-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--second);
}
.db-table-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1.5fr) 156px 124px 66px 186px 46px;
  gap: 12px;
  padding: 0 16px 8px;
  border-bottom: 3px solid var(--outline);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}
.db-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.db-row-card {
  background: var(--card);
  border: 3px solid var(--outline);
  border-radius: 20px;
  box-shadow: 4px 4px 0 var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.db-row-card:hover {
  transform: translate(-2px, -2px);
}
.db-row-card--open {
  box-shadow: 4px 4px 0 var(--shadow), 8px 8px 0 var(--b5), 12px 12px 0 var(--b3);
}
.db-row-summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1.5fr) 156px 124px 66px 186px 46px;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  min-height: 60px;
}
.db-row-index {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--second);
}
.db-game-title {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.2;
}
.db-game-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--second);
}
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 2.5px solid var(--outline);
  border-radius: 10px;
  box-shadow: 2px 2px 0 var(--shadow);
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
.status-badge--verified { background: var(--b5); color: var(--on-b5); }
.status-badge--works    { background: var(--b4); color: var(--on-b4); }
.status-badge--mixed    { background: var(--b3); color: var(--on-b3); }
.status-badge--retest   { background: var(--panel); color: var(--ink); }
.status-badge--unable   { background: var(--b1); color: var(--on-b1); }
.status-badge--blocked  { background: var(--deep); color: var(--on-deep); }
.status-badge--untested { background: var(--card); color: var(--second); }

.store-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--panel);
  color: var(--ink);
  border: 2px solid var(--outline);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}
.api-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  background: var(--deep);
  color: var(--on-deep);
  border: 2px solid var(--outline);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
.ascii-meter {
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre;
}
.ascii-meter-fill { color: var(--warn); font-weight: 700; }
.ascii-meter-empty { color: var(--second); }
.expand-btn {
  width: 40px;
  height: 36px;
  padding: 0;
  background: var(--card);
  color: var(--ink);
  border: 2.5px solid var(--outline);
  border-radius: 10px;
  box-shadow: 2px 2px 0 var(--shadow);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.expand-btn[aria-expanded="true"] {
  background: var(--accent);
  color: var(--on-accent);
}
.db-row-detail {
  border-top: 3px dashed var(--outline);
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.detail-term {
  flex: 1 1 320px;
  padding: 16px 18px;
  background: var(--deep);
  color: var(--on-deep);
  border: 3px solid var(--outline);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--b3);
}
.detail-term h4 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--b5);
}
.detail-term pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-chips-card {
  flex: 1 1 320px;
  padding: 16px 18px;
  background: var(--panel);
  border: 3px solid var(--outline);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--shadow);
}
.detail-chips-card h4 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 15px;
}
.detail-chips-card pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.db-empty-state {
  background: var(--card);
  border: 3px dashed var(--outline);
  border-radius: 22px;
  padding: 36px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.db-empty-state h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
}
.db-empty-state p {
  margin: 0;
  max-width: 560px;
  color: var(--second);
  font-size: 15px;
}
.db-empty-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  background: var(--panel);
  border: 2px solid var(--outline);
  border-radius: 10px;
}

/* CLOSING DEEP BAND */
.closing-section {
  background: var(--deep);
  color: var(--on-deep);
  border-top: 4px solid var(--outline);
}
.closing-inner {
  padding: 56px 24px 68px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px 72px;
}
.closing-badge {
  flex: none;
  width: min(300px, 100%);
}
.closing-copy {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.closing-copy h2 {
  margin: 0;
  max-width: 620px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1.1;
  color: var(--on-deep);
}
.closing-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--on-deep);
  opacity: 0.9;
}
.closing-btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 24px;
  background: var(--accent);
  color: var(--on-accent);
  border: 4px solid var(--outline);
  border-radius: 18px;
  box-shadow: 0 0 0 3px var(--on-deep), 7px 7px 0 3px var(--b1);
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.coming-soon-actions .sticker-btn {
  box-shadow: 3px 3px 0 var(--shadow);
}
.closing-btn-light:hover { color: var(--on-accent); }
.rainbow-bar {
  display: flex;
  flex-direction: column;
}
.rainbow-bar span { height: 8px; display: block; }

/* FOOTER */
.site-footer {
  padding: 38px 24px 44px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
  margin-bottom: 22px;
}
.footer-req-box {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(11px, 2.5vw, 14px);
  font-weight: 700;
  line-height: 1.25;
  white-space: pre;
  overflow-x: auto;
  max-width: 100%;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}
.privacy-drawer {
  margin-bottom: 20px;
  padding: 18px 22px;
  background: var(--card);
  border: 3px solid var(--outline);
  border-radius: 18px;
  box-shadow: 4px 4px 0 var(--shadow);
  font-size: 15px;
}
.privacy-drawer[hidden] { display: none; }
.privacy-drawer h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 17px;
}
.privacy-drawer p {
  margin: 0;
  color: var(--second);
}
.footer-wordmark {
  max-width: 100%;
  overflow: hidden;
  margin: 6px 0 18px;
}
.footer-wordmark pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(4px, 0.98vw, 14px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
  white-space: pre;
  color: var(--ink);
}
.footer-wordmark-cut { color: var(--b3); }
.footer-ascii {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--second);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 14px;
  border-top: 3px solid var(--outline);
}

/* Responsive adjustments */
@media (max-width: 980px) {
  .lib-preview { transform: none; }
  .lib-tiles-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .db-table-head { display: none; }
  .db-row-summary {
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
  }
  .db-row-index { display: none; }
  .hero-badge-col { justify-content: center; }
}
@media (max-width: 600px) {
  .nav-wrap { padding: 10px 12px 0; }
  .gloss-nav { padding: 8px 10px 8px 14px; border-radius: 18px; }
  /* Phone: brand and mode on one row, the tabs below (they wrap when the screen is too narrow). */
  .gloss-nav { gap: 10px 8px; }
  .brand-wordmark { font-size: 15px; }
  .nav-mode-group { order: 2; }
  .nav-mode-label { display: none; }
  .nav-mode-btn { padding: 0 8px; }
  .nav-tabs { order: 3; width: 100%; gap: 6px 5px; flex-wrap: wrap; }
  .nav-tab { min-height: 34px; padding: 0 7px; font-size: 11px; }
  .hero-section, .benefits-section, .themes-section, .db-section { padding-left: 14px; padding-right: 14px; }
  .slash-rule-wrap { padding: 0 14px; }
  .lib-sidebar { width: 52px; }
  .lib-featured { min-height: 154px; }
  .lib-featured-content { max-width: 100%; }
  .coming-soon-banner { padding: 16px; }
  .themes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}

/* Very small phones: the hero's sticker buttons shrink a little so their one-line labels
   stay inside the card. */
@media (max-width: 420px) {
  .btn-primary { font-size: 15px; padding: 0 16px; min-height: 48px; }
  .btn-secondary { font-size: 14px; padding: 0 14px; min-height: 48px; }
}
