/* SpeedBall Legends — Dark H5 Arcade Theme */
:root {
  color-scheme: dark light;
  interpolate-size: allow-keywords;

  --bg-dark: #0b0f19;
  --bg-light: #f8fafc;
  --surface-dark: #131a2a;
  --surface-light: #ffffff;
  --ink-dark: #f8fafc;
  --ink-light: #0f172a;
  --muted-dark: #94a3b8;
  --muted-light: #475569;

  --emerald: #10b981;
  --emerald-text-dark: #34d399;
  --emerald-text-light: #047857;
  --amber: #f59e0b;
  --amber-text-dark: #fbbf24;
  --amber-text-light: #b45309;
  --magenta: #f43f5e;
  --magenta-text-dark: #fb7185;
  --magenta-text-light: #be123c;
  --ink-on-accent: #0f172a;

  /* Default Dark H5 Arcade tokens */
  --bg: var(--bg-dark);
  --surface: var(--surface-dark);
  --ink: var(--ink-dark);
  --muted: var(--muted-dark);
  --emerald-text: var(--emerald-text-dark);
  --amber-text: var(--amber-text-dark);
  --magenta-text: var(--magenta-text-dark);

  @media (prefers-color-scheme: light) {
    --bg: var(--bg-light);
    --surface: var(--surface-light);
    --ink: var(--ink-light);
    --muted: var(--muted-light);
    --emerald-text: var(--emerald-text-light);
    --amber-text: var(--amber-text-light);
    --magenta-text: var(--magenta-text-light);
  }

  @supports (color: light-dark(white, black)) {
    --bg: light-dark(var(--bg-light), var(--bg-dark));
    --surface: light-dark(var(--surface-light), var(--surface-dark));
    --ink: light-dark(var(--ink-light), var(--ink-dark));
    --muted: light-dark(var(--muted-light), var(--muted-dark));
    --emerald-text: light-dark(var(--emerald-text-light), var(--emerald-text-dark));
    --amber-text: light-dark(var(--amber-text-light), var(--amber-text-dark));
    --magenta-text: light-dark(var(--magenta-text-light), var(--magenta-text-dark));
  }

  --surface-tint: color-mix(in srgb, var(--ink) 5%, var(--surface));
  --border: color-mix(in srgb, var(--ink) 14%, transparent);
  --border-strong: color-mix(in srgb, var(--ink) 24%, transparent);
  --shadow-sm: 0 1px 2px color-mix(in srgb, #0b0f19 25%, transparent);
  --shadow-md: 0 14px 34px color-mix(in srgb, #0b0f19 42%, transparent);

  --font-display: "Chakra Petch", system-ui, -apple-system, sans-serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --container: 1180px;
  --container-inner: 980px;

  --icon-menu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E");
  --icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");

  accent-color: var(--emerald);
  scrollbar-color: color-mix(in srgb, var(--ink) 32%, transparent) transparent;
}

:root:has(> head > meta[name="color-scheme"][content="dark"]),
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--bg-dark);
  --surface: var(--surface-dark);
  --ink: var(--ink-dark);
  --muted: var(--muted-dark);
  --emerald-text: var(--emerald-text-dark);
  --amber-text: var(--amber-text-dark);
  --magenta-text: var(--magenta-text-dark);
}

:root:has(> head > meta[name="color-scheme"][content="light"]),
:root[data-theme="light"] {
  color-scheme: light;
  --bg: var(--bg-light);
  --surface: var(--surface-light);
  --ink: var(--ink-light);
  --muted: var(--muted-light);
  --emerald-text: var(--emerald-text-light);
  --amber-text: var(--amber-text-light);
  --magenta-text: var(--magenta-text-light);
}

[hidden]:not([hidden="until-found"]) {
  display: none !important;
}

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

html {
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: clip;
}

h1, h2, h3, h4, .footer-title, .sbl-game-fallback-title {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

a {
  color: var(--emerald-text);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

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

:focus-visible {
  outline: 2.5px solid var(--emerald);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.skip-link {
  position: absolute;
  inset-inline-start: 0.75rem;
  inset-block-start: -120px;
  z-index: 200;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  background-color: var(--amber);
  color: var(--ink-on-accent);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  inset-block-start: 0.75rem;
}

/* Slim 48px Top Arcade Header & Popover Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(10px);
  border-block-end: 1px solid var(--border);
}

.site-header.is-measuring * {
  transition: none !important;
}

.header-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0.15rem 1rem;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.header-inner > * {
  flex-shrink: 0;
  white-space: nowrap;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  min-height: 40px;
}

.site-brand .gf-site-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  margin-inline-start: auto;
}

.menu-button {
  anchor-name: --menu-button;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background-color: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.menu-button:hover {
  border-color: var(--emerald);
  background-color: var(--surface-tint);
}

.menu-icon {
  inline-size: 1.1em;
  block-size: 1.1em;
  background-color: currentColor;
  mask: var(--icon-menu) no-repeat center / contain;
  flex: none;
}

@supports not selector(:popover-open) {
  [popover]:not(.\:popover-open) {
    display: none;
  }
}

.site-menu {
  position: fixed;
  inset: auto;
  inset-block-start: 3.5rem;
  inset-block-start: anchor(--menu-button bottom);
  inset-inline-end: 1rem;
  inline-size: min(82dvw, 21rem);
  max-inline-size: calc(100dvw - 2rem);
  block-size: fit-content;
  max-block-size: calc(100dvh - 4.75rem);
  margin: 0.4rem 0 0;
  padding: 0.6rem;
  list-style: none;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background-color: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  overflow: auto;
}

.site-menu:is(:popover-open, .\:popover-open) {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.site-menu::backdrop {
  background: color-mix(in srgb, #0b0f19 55%, transparent);
}

.menu-close-row {
  display: flex;
  justify-content: flex-end;
  padding-block-end: 0.25rem;
  border-block-end: 1px solid var(--border);
  margin-block-end: 0.25rem;
}

.menu-close {
  min-height: 40px;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background-color: var(--surface-tint);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
}

.site-menu a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
}

.site-menu a:hover {
  background-color: var(--surface-tint);
  color: var(--emerald-text);
}

.site-menu a[aria-current="page"] {
  color: var(--emerald-text);
  background-color: color-mix(in srgb, var(--emerald) 14%, var(--surface));
  border-inline-start: 3px solid var(--emerald-text);
}

.site-header.is-wide .menu-button,
.site-header.is-wide .menu-close-row {
  display: none;
}

.site-header.is-wide .site-menu {
  position: static;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.15rem;
  inline-size: auto;
  max-inline-size: none;
  block-size: auto;
  max-block-size: none;
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.site-header.is-wide .site-menu::backdrop {
  display: none;
}

.site-header.is-wide .site-menu a {
  min-height: 36px;
  padding: 0.35rem 0.65rem;
  font-size: 0.875rem;
  border-inline-start: 0;
  border-block-end: 2.5px solid transparent;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.site-header.is-wide .site-menu a[aria-current="page"] {
  background-color: transparent;
  border-inline-start: 0;
  border-block-end-color: var(--emerald-text);
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.theme-toggle {
  min-width: 40px;
  min-height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background-color: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--emerald);
  background-color: var(--surface-tint);
}

.header-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  background-color: var(--emerald);
  color: var(--ink-on-accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background-color 150ms ease, transform 150ms ease;
}

.header-play-btn:hover {
  background-color: var(--amber);
  color: var(--ink-on-accent);
  transform: translateY(-1px);
}

/* Single-Column H5 Arena Shell (Zero Wiki Sidebar) */
.arena-shell {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0.25rem 1rem 3rem;
}

.arena-main {
  min-width: 0;
}

.sbl-article--inner {
  max-width: var(--container-inner);
  margin-inline: auto;
  padding-block-start: 0.65rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.55rem 1.05rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.btn-primary {
  background-color: var(--emerald);
  color: var(--ink-on-accent);
}

.btn-primary:hover {
  background-color: var(--amber);
  color: var(--ink-on-accent);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--emerald);
  color: var(--emerald-text);
  background-color: var(--surface-tint);
}

/* Full-Width H5 Cinema Theater */
.sbl-theater {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background-color: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.sbl-theater-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
  padding: 2px 0.85rem;
  min-height: 25px;
  border-block-end: 1px solid var(--border);
  background-color: var(--surface);
}

.sbl-theater-bar h1 {
  margin: 0;
  font-size: clamp(0.95rem, 1.3vw, 1.125rem);
  font-weight: 700;
  line-height: 1.2;
}

.sbl-theater-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.sbl-theater-tag a {
  font-weight: 700;
  text-decoration: none;
}

.sbl-game-mount {
  width: 100%;
  background-color: var(--bg-dark);
  min-height: 290px;
}

#sbl-game-root {
  border: 0;
  border-radius: 0;
}

.sbl-game-fallback {
  padding: 3rem 1.25rem;
  text-align: center;
  color: var(--muted-dark);
}

.sbl-game-fallback-title {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  color: var(--ink-dark);
}

@media (min-width: 768px) {
  #sbl-game-root:not(:fullscreen) .sbl-stage {
    height: clamp(290px, calc(100dvh - 238px), 620px);
    width: auto;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    margin-inline: auto;
  }
}

/* Desktop-only Ad Band (Zero Mobile Ads) */
.ad-band {
  margin: 0.25rem auto 0.9rem;
  padding: 2px 0.5rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
  background-color: var(--surface);
  text-align: center;
}

.ad-band-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 90px;
}

.ad-label {
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 767.98px) {
  .ad-band,
  [data-gf-ad-desktop-only="1"] {
    display: none !important;
  }
}

/* Inner Page Header */
.sbl-page-head {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface);
  box-shadow: var(--shadow-sm);
  margin-block-end: 0.9rem;
}

.sbl-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-block-end: 0.35rem;
}

.sbl-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.sbl-breadcrumb a:hover {
  color: var(--emerald-text);
  text-decoration: underline;
}

.sbl-kicker {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald-text);
}

.sbl-page-head h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
}

.sbl-subtitle {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 72ch;
}

.sbl-updated {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  color: var(--muted);
}

.sbl-direct-answer {
  margin-block-start: 0.75rem;
  padding: 0.75rem 0.95rem;
  border-inline-start: 4px solid var(--emerald);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background-color: var(--surface-tint);
}

.sbl-direct-answer p {
  margin: 0;
  font-weight: 500;
  max-width: 72ch;
}

/* Prose Content */
.sbl-prose {
  min-width: 0;
}

.sbl-prose > * + * {
  margin-block-start: 1rem;
}

.sbl-prose h2 {
  margin-block: 1.65rem 0.65rem;
  padding-block-end: 0.35rem;
  border-block-end: 1.5px solid var(--border);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.sbl-prose h3 {
  margin-block: 1.25rem 0.45rem;
  font-size: 1.125rem;
}

.sbl-prose p,
.sbl-prose li {
  max-width: 74ch;
}

.sbl-prose ul,
.sbl-prose ol {
  padding-inline-start: 1.35rem;
}

.sbl-prose li + li {
  margin-block-start: 0.35rem;
}

.sbl-prose kbd {
  display: inline-block;
  padding: 0.1rem 0.42rem;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  background-color: var(--surface-tint);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.85em;
  font-weight: 700;
}

.sbl-prose code {
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background-color: var(--surface-tint);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Responsive Tables (never grid on td/th) */
.sbl-table-wrap,
.sbl-table-scroll,
.sbl-prose table {
  max-width: 100%;
}

.sbl-table-wrap,
.sbl-table-scroll {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--surface);
  box-shadow: var(--shadow-sm);
}

.sbl-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.sbl-prose th,
.sbl-prose td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-block-end: 1px solid var(--border);
  vertical-align: top;
}

.sbl-prose thead th {
  background-color: var(--surface-tint);
  font-family: var(--font-display);
  font-weight: 700;
  white-space: nowrap;
}

.sbl-prose tbody tr:last-child td {
  border-block-end: 0;
}

/* Arcade Modes Grid, Quick Facts, TOC & Sources */
.sbl-facts {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface);
  box-shadow: var(--shadow-sm);
}

.sbl-facts-grid {
  margin: 0;
  display: grid;
  gap: 0.75rem 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}

.sbl-facts-grid > div {
  min-width: 0;
  padding-inline-start: 0.65rem;
  border-inline-start: 3px solid var(--emerald);
}

.sbl-facts-grid dt {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.sbl-facts-grid dd {
  margin: 0.15rem 0 0;
  font-weight: 700;
  font-size: 0.9375rem;
}

.sbl-toc {
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface-tint);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  align-items: center;
}

.sbl-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 0.9rem;
  font-weight: 600;
}

.sbl-steps {
  display: grid;
  gap: 0.6rem;
}

.sbl-sources {
  margin-block-start: 1.75rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface-tint);
  font-size: 0.9375rem;
}

.sbl-sources h2,
.sbl-sources h3 {
  margin-block-start: 0;
}

.sbl-hub-grid,
.sbl-video-grid,
.sbl-shots-grid,
.sbl-media-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

.sbl-hub-card,
.sbl-video-card,
.sbl-shot-card,
.sbl-media-card {
  margin: 0;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background-color: var(--surface);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.sbl-video-card h3,
.sbl-hub-card h3 {
  margin: 0.6rem 0 0.3rem;
  font-size: 1.05rem;
}

.sbl-hub-card h3 {
  margin-block-start: 0;
}

.sbl-hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: border-color 150ms ease, transform 150ms ease;
}

.sbl-arcade-card {
  border-color: color-mix(in srgb, var(--emerald) 30%, var(--border));
}

.sbl-card-pill {
  align-self: flex-start;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--emerald) 45%, var(--border));
  background-color: color-mix(in srgb, var(--emerald) 14%, var(--surface));
  color: var(--emerald-text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.sbl-hub-card:hover {
  border-color: var(--emerald);
  transform: translateY(-2px);
}

.sbl-hub-card a {
  margin-block-start: auto;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
}

/* Lite YouTube & Screenshots */
[data-youtube] {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #0b0f19;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

[data-youtube] img,
img[src*="hqdefault.jpg"] {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sbl-yt-play,
[data-youtube]:not(:has(.sbl-yt-play))::after {
  content: "▶ Play Clip";
  position: absolute;
  inset-inline-start: 50%;
  inset-block-start: 50%;
  transform: translate(-50%, -50%);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background-color: var(--emerald);
  color: var(--ink-on-accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}

[data-youtube]:hover .sbl-yt-play,
[data-youtube]:not(:has(.sbl-yt-play)):hover::after {
  background-color: var(--amber);
}

.sbl-video-iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius-md);
  display: block;
}

.sbl-shot-card[data-sbl-lightbox] img,
.sbl-shot-btn img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.sbl-shot-card[data-sbl-lightbox] {
  cursor: zoom-in;
}

.sbl-shot-card figcaption,
.sbl-media-card figcaption {
  margin-block-start: 0.55rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Native <details> Accordion */
.sbl-faq {
  margin-block-start: 2rem;
  padding-block-start: 1.25rem;
  border-block-start: 1.5px solid var(--border);
}

.sbl-faq h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.sbl-faq-list {
  display: grid;
  gap: 0.6rem;
}

.sbl-faq-item,
.sbl-prose details {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--surface);
  overflow: clip;
}

.sbl-faq-item > summary,
.sbl-prose details > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6ch;
  padding: 0.85rem 1rem;
  min-height: 44px;
  font-weight: 700;
  cursor: pointer;
}

.sbl-faq-item > summary::-webkit-details-marker,
.sbl-prose details > summary::-webkit-details-marker {
  display: none;
}

.sbl-faq-item > summary:hover,
.sbl-prose details > summary:hover {
  background-color: var(--surface-tint);
}

.sbl-faq-item > summary::before,
.sbl-prose details > summary::before {
  content: "";
  inline-size: 1em;
  block-size: 1em;
  flex: none;
  background-color: var(--emerald-text);
  mask: var(--icon-chevron) no-repeat center / contain;
  rotate: -90deg;
}

.sbl-faq-item[open] > summary::before,
.sbl-prose details[open] > summary::before {
  rotate: 0deg;
}

.sbl-faq-item::details-content,
.sbl-prose details::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
  contain: layout;
}

.sbl-faq-item:not([open])::details-content,
.sbl-prose details:not([open])::details-content {
  block-size: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .sbl-faq-item > summary::before,
  .sbl-prose details > summary::before {
    transition: rotate 0.2s ease;
  }

  .sbl-faq-item::details-content,
  .sbl-prose details::details-content {
    transition: block-size, content-visibility, display;
    transition-duration: 0.26s;
    transition-timing-function: ease-in-out;
    transition-behavior: allow-discrete;
  }
}

.sbl-faq-answer {
  padding: 0 1rem 0.95rem 2.25rem;
  color: var(--muted);
}

.sbl-faq-answer p {
  margin: 0;
  max-width: 74ch;
}

/* Native Modal <dialog> Lightbox */
dialog.sbl-lightbox {
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background-color: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  max-inline-size: min(92dvw, 58rem);
  max-block-size: 88dvh;
  margin: auto;
}

dialog.sbl-lightbox:modal {
  overscroll-behavior: contain;
}

dialog.sbl-lightbox::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: color-mix(in srgb, #0b0f19 78%, transparent);
}

.sbl-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-block-end: 1px solid var(--border);
}

.sbl-lightbox-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}

.sbl-lightbox-close {
  min-height: 44px;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background-color: var(--surface);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.sbl-lightbox-close:hover {
  border-color: var(--magenta);
  color: var(--magenta-text);
}

.sbl-lightbox-body {
  padding: 1rem;
  overflow: auto;
  max-block-size: calc(88dvh - 4.5rem);
}

.sbl-lightbox-body img {
  margin-inline: auto;
  border-radius: var(--radius-sm);
  max-block-size: 72dvh;
  width: auto;
}

/* 404 */
.sbl-404-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-block-start: 1rem;
}

/* Footer */
.site-footer {
  border-block-start: 1px solid var(--border);
  background-color: var(--surface);
  padding: 2rem 1rem;
}

.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  display: grid;
  gap: 1.15rem;
}

.footer-title {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  max-width: 60ch;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
}

.footer-nav a:hover {
  color: var(--emerald-text);
}

.footer-meta {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Tool Mounts */
.sbl-tool-mount {
  margin-block: 1rem 1.5rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background-color: var(--surface);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

@media (max-width: 640px) {
  .header-inner {
    padding-inline: 0.65rem;
  }

  .header-play-btn {
    display: none;
  }

  .arena-shell {
    padding-inline: 0.5rem;
  }

  .sbl-theater-bar {
    padding: 0.3rem 0.6rem;
  }

  .sbl-theater-tag {
    display: none;
  }
}

@media (forced-colors: active) {
  .site-menu a[aria-current="page"] {
    outline: 2px solid Highlight;
  }
}
