/* =========================================================
   Joodpiece Wiki | Shonen Weekly Manga Page
   Newsprint paper, ink panel borders, screentone, one spot red.
   Every hex value lives in :root; components use tokens only.
   Dela Gothic One ships a single 400 weight.
   ========================================================= */
:root {
  --bg: #F4F1EA;
  --surface: #FFFDF8;
  --ink: #141414;
  --muted: #55524C;
  --tone: #E3DED3;
  --primary: #C8102E;
  --sun: #FFE14D;
  --violet: #5B3FD9;
  --red-soft: #FBE3E6;
  --sun-soft: #FFF3B8;
  --violet-soft: #E6E0FB;

  /* semantic aliases (no new hex) */
  --paper: var(--bg);
  --panel: var(--surface);
  --hot: var(--primary);
  --hot-fill: var(--red-soft);
  --flash: var(--sun);
  --flash-fill: var(--sun-soft);
  --cosmic: var(--violet);
  --cosmic-fill: var(--violet-soft);
  --border: var(--ink);

  --font-heading: 'Dela Gothic One', 'Rubik', Impact, sans-serif;
  --font-body: 'Rubik', system-ui, -apple-system, sans-serif;

  --radius: 8px;
  --pill: 999px;
  --line: 3px solid var(--ink);
  --line-thin: 2px solid var(--ink);
  --shadow-hard: 4px 4px 0 var(--ink);
  --shadow-soft: 0 8px 24px rgba(20, 20, 20, 0.08);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --halftone: radial-gradient(var(--tone) 1.4px, transparent 1.6px);
  --speed-lines: repeating-conic-gradient(from 0deg at 100% 0%, var(--tone) 0deg 1.2deg, transparent 1.2deg 5deg);

  --brush-red: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 14'%3E%3Cpath d='M3 9c18-6 34-6 52-1s34 4 52-2 32-4 50 1' fill='none' stroke='%23C8102E' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
  --brush-violet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 14'%3E%3Cpath d='M3 9c18-6 34-6 52-1s34 4 52-2 32-4 50 1' fill='none' stroke='%235B3FD9' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
  --brush-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 14'%3E%3Cpath d='M3 9c18-6 34-6 52-1s34 4 52-2 32-4 50 1' fill='none' stroke='%23141414' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
  --burst: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 80'%3E%3Cpath d='M60 3l9 15 21-9-3 19 28 3-21 13 15 19-25-4-6 18-18-14-17 15-4-20-26 7 14-19L4 32l26-4-4-19 21 9z' fill='%23FFE14D' stroke='%23141414' stroke-width='4' stroke-linejoin='round'/%3E%3C/svg%3E");
  --icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='12' height='12' rx='2'/%3E%3Cpath d='M16 8V5a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h3'/%3E%3C/svg%3E");
  --icon-heart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-8-5.2-8-11a4.5 4.5 0 0 1 8-2.8A4.5 4.5 0 0 1 20 10c0 5.8-8 11-8 11z' fill='%23000'/%3E%3C/svg%3E");
  --icon-share: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='M8.6 10.5l6.8-4M8.6 13.5l6.8 4'/%3E%3C/svg%3E");
  --icon-q: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M9 9a3 3 0 1 1 4.5 2.6c-1 .6-1.5 1.3-1.5 2.4'/%3E%3Ccircle cx='12' cy='18' r='1' fill='%23000'/%3E%3C/svg%3E");
  --icon-chart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 17l6-6 4 4 8-8'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  font-weight: 500;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
a:hover { color: var(--ink); }

h1, h2, h3, h4, .brand-text strong, .footer-logo {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
  margin-top: 0;
  letter-spacing: 0.01em;
}
h1 { font-size: 48px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }

:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: var(--surface);
  padding: 12px 16px;
  border-radius: var(--radius);
  z-index: 200;
}
.skip-link:focus { left: 16px; }

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------------- Header ---------------- */
.site-header {
  background: var(--surface);
  border-bottom: var(--line);
  position: sticky;
  top: 0;
  z-index: 60;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding-block: 8px;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-emblem svg { display: block; transition: transform .4s var(--spring); }
.brand:hover .brand-emblem svg { transform: rotate(-12deg) scale(1.08); }
.em-burst { fill: var(--sun); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.em-letter { fill: var(--primary); stroke: var(--ink); stroke-width: 1.4; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 18px; }
.brand-text small { font-size: 12px; color: var(--muted); font-weight: 500; }

.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--pill);
  border: 2px solid transparent;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: transform .25s var(--spring), background-color .2s ease;
}
.site-nav a:hover { border-color: var(--ink); background: var(--flash-fill); transform: translateY(-2px) rotate(-1deg); }
.site-nav a.nav-hot { background: var(--primary); color: var(--surface); border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.site-nav a.nav-hot:hover { background: var(--ink); color: var(--surface); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--pill);
  border: var(--line-thin);
  background: var(--sun);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}
.nav-toggle-bars {
  width: 16px;
  height: 2px;
  background: var(--ink);
  box-shadow: 0 -5px 0 var(--ink), 0 5px 0 var(--ink);
}

/* ---------------- Buttons ---------------- */
.btn-primary,
.btn-secondary,
.btn-ghost-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 24px;
  border-radius: var(--pill);
  border: var(--line-thin);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--spring), box-shadow .2s ease, background-color .2s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--surface);
  box-shadow: var(--shadow-hard);
}
.btn-primary:hover { background: var(--ink); color: var(--surface); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn-primary:active { transform: translate(4px, 4px); box-shadow: none; }

.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-hard); }
.btn-secondary:hover { background: var(--flash-fill); color: var(--ink); }

/* power-up style helper buttons: icon coin via ::before */
.btn-ghost-light {
  background: var(--surface);
  color: var(--ink);
  padding: 4px 16px 4px 4px;
  font-size: 14px;
}
.btn-ghost-light { position: relative; }
.btn-ghost-light::before {
  content: '';
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: var(--line-thin);
  background-color: var(--coin, var(--flash));
  flex-shrink: 0;
}
.btn-ghost-light::after {
  content: '';
  position: absolute;
  left: 13px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background: var(--ink);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.btn-faq { --coin: var(--flash); --icon: var(--icon-q); }
.btn-like { --coin: var(--hot-fill); --icon: var(--icon-heart); }
.btn-share { --coin: var(--cosmic-fill); --icon: var(--icon-share); }
.btn-ghost-light:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 2px 2px 0 var(--ink); color: var(--ink); }
.btn-ghost-light[data-gf-liked] { background: var(--hot-fill); }
.btn-ghost-light[data-gf-liked]::before { background-color: var(--primary); }
.btn-ghost-light[data-gf-liked]::after { background: var(--surface); }

.share-msg { font-size: 14px; color: var(--primary); font-weight: 700; }

/* ---------------- Splash (manga title page) ---------------- */
.splash {
  padding: 24px 0 32px;
  background: var(--halftone) 0 0 / 12px 12px, var(--paper);
  border-bottom: var(--line);
}

.splash-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas:
    "title codes"
    "title art"
    "foot foot";
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: var(--line);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}

.panel-title {
  grid-area: title;
  padding: 32px;
  overflow: hidden;
  isolation: isolate;
}
.panel-title::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--speed-lines);
  -webkit-mask-image: radial-gradient(circle at 100% 0%, var(--ink) 0%, transparent 60%);
  mask-image: radial-gradient(circle at 100% 0%, var(--ink) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}

.kicker-stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 4px 12px;
  background: var(--ink);
  color: var(--surface);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--pill);
  transform: rotate(-2deg);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sun);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.6); opacity: .5; } }

.title-tiles {
  font-size: 36px;
  line-height: 1.5;
  margin: 0 0 16px;
}
.tile {
  display: inline-block;
  padding: 0 12px 4px;
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  margin: 0 4px 8px 0;
  transition: transform .35s var(--spring);
}
.tile-a { background: var(--primary); color: var(--surface); transform: rotate(-2deg); }
.tile-b { background: var(--sun); color: var(--ink); transform: rotate(1.5deg); }
.tile-c { background: var(--violet); color: var(--surface); transform: rotate(-1deg); }
.title-tiles:hover .tile { transform: rotate(0) translateY(-2px); }

.hero-lead {
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 16px;
  max-width: 60ch;
}

/* narration caption box */
.hero-short-answer,
.quick-answer-box {
  position: relative;
  background: var(--flash-fill);
  border: var(--line-thin);
  border-radius: var(--radius);
  padding: 24px 16px 16px;
  margin: 24px 0;
  font-size: 16px;
  max-width: 70ch;
}
.hero-short-answer strong,
.quick-answer-box strong {
  position: absolute;
  top: -14px;
  left: 12px;
  padding: 2px 12px;
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 14px;
  border-radius: var(--pill);
}

.engage-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Top codes panel */
.panel-codes {
  grid-area: codes;
  background: var(--ink);
  color: var(--surface);
  box-shadow: 6px 6px 0 var(--primary);
}
.panel-tag {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 12px;
  background: var(--sun);
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 14px;
  border-radius: var(--pill);
  transform: rotate(-2deg);
}
.code-strip {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.code-ticket {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "code btn" "reward btn";
  align-items: center;
  column-gap: 12px;
  padding: 8px 8px 8px 16px;
  background: var(--surface);
  color: var(--ink);
  border: var(--line-thin);
  border-radius: var(--radius);
  position: relative;
  transition: transform .25s var(--spring);
}
.code-ticket::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  border-left: 2px dashed var(--tone);
}
.code-ticket:nth-child(1) { transform: rotate(-1deg); }
.code-ticket:nth-child(2) { transform: rotate(.6deg); }
.code-ticket:nth-child(3) { transform: rotate(-.4deg); }
.code-ticket:hover { transform: rotate(0) translateX(4px); }
.code-ticket code {
  grid-area: code;
  font-family: var(--font-heading);
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.code-reward { grid-area: reward; font-size: 14px; color: var(--muted); }
.code-ticket .copy-code-btn { grid-area: btn; }

.btn-allcodes { width: 100%; box-shadow: 4px 4px 0 var(--sun); border-color: var(--surface); }
.btn-allcodes:hover { background: var(--sun); color: var(--ink); box-shadow: 6px 6px 0 var(--surface); }

/* Copy button + the signature SFX impact burst */
.copy-code-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 96px;
  padding: 8px 16px;
  border-radius: var(--pill);
  border: var(--line-thin);
  background: var(--primary);
  color: var(--surface);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .2s var(--spring), background-color .2s ease;
}
.copy-code-btn::before {
  content: '';
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--icon-copy) center / contain no-repeat;
  mask: var(--icon-copy) center / contain no-repeat;
  flex-shrink: 0;
}
.copy-code-btn::after {
  content: 'COPIED!';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 136px;
  height: 84px;
  display: grid;
  place-items: center;
  padding: 4px 0 0 4px;
  background: var(--burst) center / contain no-repeat;
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 0;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0) rotate(-12deg);
  z-index: 5;
}
.copy-code-btn:hover { background: var(--ink); transform: translateY(-2px); }
.copy-code-btn:active { transform: translateY(2px); box-shadow: none; }
.copy-code-btn.is-copied { background: var(--ink); color: var(--surface); }
.copy-code-btn.is-copied::after { animation: sfx-pop 1.6s var(--spring) forwards; }
@keyframes sfx-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(-24deg); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(-6deg); }
  30% { transform: translate(-50%, -50%) scale(1) rotate(-8deg); }
  85% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-8deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.9) rotate(-8deg); }
}

/* Art panel */
.panel-art {
  grid-area: art;
  padding: 12px;
  transform: rotate(.8deg);
  box-shadow: var(--shadow-hard);
}
.showcase-frame { margin: 0; }
.showcase-frame img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: var(--line-thin);
  border-radius: var(--radius);
}
.showcase-frame figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.shot-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.shot-thumb {
  display: block;
  width: 100%;
  min-height: 44px;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: var(--line-thin);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--tone);
  cursor: pointer;
  filter: grayscale(1) contrast(1.1);
  transition: transform .25s var(--spring), filter .2s ease;
}
.shot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shot-thumb:hover { filter: none; transform: translateY(-2px); }
.shot-thumb.is-active { filter: none; transform: rotate(-2deg) translateY(-2px); box-shadow: 2px 2px 0 var(--primary); }

/* Splash footer row: live narration pill + mixed-shape chips */
.splash-foot {
  grid-area: foot;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.hero-live,
.side-live-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 4px 8px 4px 16px;
  margin: 0;
  background: var(--ink);
  color: var(--surface);
  border: var(--line-thin);
  border-radius: var(--pill);
  font-size: 14px;
}
.hero-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 3px var(--primary);
  flex-shrink: 0;
}
.hero-live-main { flex: 1 1 auto; min-width: 0; }
.hero-live-main strong,
.side-live-row strong { color: var(--sun); font-weight: 700; }
.hero-live-spark { display: inline-flex; align-items: center; height: 18px; flex-shrink: 0; }
.hero-live-spark:empty { display: none; }
.hero-live-spark polyline { stroke: var(--sun); }
.hero-live-link,
.side-live-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 16px;
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
  border-radius: var(--pill);
  background: var(--sun);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s var(--spring);
}
.hero-live-link::before,
.side-live-link::before {
  content: '';
  width: 14px;
  height: 14px;
  background: var(--ink);
  -webkit-mask: var(--icon-chart) center / contain no-repeat;
  mask: var(--icon-chart) center / contain no-repeat;
}
.hero-live-link:hover,
.side-live-link:hover { color: var(--ink); transform: rotate(-2deg) scale(1.04); }

.spec-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0;
}
.spec-chips > div { margin: 0; border: var(--line-thin); background: var(--surface); }
.spec-chips dt { font-size: 12px; color: var(--muted); font-weight: 500; line-height: 1.2; }
.spec-chips dd { margin: 0; font-family: var(--font-heading); font-size: 14px; line-height: 1.2; color: var(--ink); }

.chip-ticket {
  padding: 8px 16px;
  border-radius: var(--radius);
  transform: rotate(-2deg);
  background: var(--surface);
  border-style: dashed !important;
}
.chip-coin {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background: var(--sun) !important;
  box-shadow: 2px 2px 0 var(--ink);
}
.chip-coin dt { font-size: 12px; color: var(--ink); }
.chip-coin dd { font-size: 16px; }
.chip-tag {
  padding: 8px 16px 8px 24px;
  border-radius: var(--pill);
  background: var(--violet-soft) !important;
  position: relative;
}
.chip-tag::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  transform: translateY(-50%);
}
.chip-stamp {
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 3px double var(--primary) !important;
  transform: rotate(3deg);
}
.chip-stamp dt { color: var(--primary); }
.chip-stamp dd { color: var(--primary); }

/* ---------------- Chapter jump bar ---------------- */
.jump-bar {
  background: var(--surface);
  border-bottom: var(--line);
}
.jump-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  padding-block: 12px;
  scrollbar-width: none;
  counter-reset: chapter;
}
.jump-inner::-webkit-scrollbar { display: none; }
.jump-inner a {
  counter-increment: chapter;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 16px 4px 4px;
  border-radius: var(--pill);
  border: var(--line-thin);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: transform .25s var(--spring), background-color .2s ease;
}
.jump-inner a::before {
  content: 'CH.' counter(chapter, decimal-leading-zero);
  padding: 4px 8px;
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-heading);
  font-size: 12px;
  line-height: 1.2;
}
.jump-inner a:hover { background: var(--flash-fill); color: var(--ink); transform: translateY(-2px) rotate(-1deg); }

/* ---------------- Quick reference (4-koma) ---------------- */
.systems-tabs {
  padding: 48px 0;
  background: var(--surface);
  border-bottom: var(--line);
}
.tabs-layout {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 32px;
  align-items: start;
}
.tabs-header h2 {
  font-size: 28px;
  margin-bottom: 12px;
  padding-bottom: 16px;
  background: var(--brush-red) left bottom / 160px 14px no-repeat;
}
.tabs-subtitle { margin: 0 0 24px; color: var(--muted); }

.tablist { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 24px 8px 12px;
  border-radius: var(--pill);
  border: var(--line-thin);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 16px;
  cursor: pointer;
  transition: transform .3s var(--spring), box-shadow .2s ease, background-color .2s ease;
}
.tab-btn::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: var(--line-thin);
  background: var(--tab-bg);
  flex-shrink: 0;
}
.tab-btn:nth-child(1) { --tab-bg: var(--primary); --tab-fg: var(--surface); }
.tab-btn:nth-child(2) { --tab-bg: var(--sun); --tab-fg: var(--ink); }
.tab-btn:nth-child(3) { --tab-bg: var(--violet); --tab-fg: var(--surface); }
.tab-btn:nth-child(4) { --tab-bg: var(--ink); --tab-fg: var(--surface); }
.tab-btn:hover { transform: translateX(4px); }
.tab-btn.is-active,
.tab-btn[aria-selected="true"] {
  background: var(--tab-bg);
  color: var(--tab-fg);
  box-shadow: var(--shadow-hard);
  transform: translate(8px, -2px) rotate(-1.5deg);
}
.tab-btn.is-active::before { background: var(--surface); }

.quick-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  counter-reset: koma;
  padding: 12px;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--ink);
  box-shadow: var(--shadow-soft);
}
.tab-panel { animation: panel-in .35s var(--spring); }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.quick-card {
  counter-increment: koma;
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 16px 16px;
  min-height: 160px;
}
.quick-card::before {
  content: counter(koma);
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: var(--line-thin);
  font-family: var(--font-heading);
  font-size: 14px;
  background: var(--surface);
}
.quick-card:nth-child(1) { background: var(--halftone) 0 0 / 10px 10px, var(--surface); }
.quick-card:nth-child(2)::before { background: var(--sun); }
.quick-card:nth-child(3)::before { background: var(--violet-soft); }
.quick-card:nth-child(4) { background: var(--flash-fill); }
.q-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}
.quick-card strong {
  display: block;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 8px;
  padding-right: 32px;
}
.quick-card p { margin: 0; font-size: 14px; color: var(--muted); }

.quick-guide-links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
  border-top: 2px dashed var(--tone);
}
.quick-guide-label {
  font-family: var(--font-heading);
  font-size: 14px;
  margin-right: 8px;
}
.quick-guide-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--pill);
  border: var(--line-thin);
  background: var(--chip);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transform: rotate(var(--tilt));
  transition: transform .3s var(--spring), box-shadow .2s ease;
}
.quick-guide-links a:nth-of-type(3n+1) { --chip: var(--hot-fill); --tilt: -2deg; }
.quick-guide-links a:nth-of-type(3n+2) { --chip: var(--flash-fill); --tilt: 1.5deg; }
.quick-guide-links a:nth-of-type(3n) { --chip: var(--cosmic-fill); --tilt: -1deg; }
.quick-guide-links a:hover { transform: rotate(0) translateY(-4px); box-shadow: var(--shadow-hard); color: var(--ink); }

/* ---------------- Article (single column) ---------------- */
.article-band {
  padding: 48px 0 64px;
  background: var(--halftone) 0 0 / 14px 14px, var(--paper);
}

.wiki-article {
  max-width: 896px;
  margin-inline: auto;
  background: var(--panel);
  border: var(--line);
  border-radius: var(--radius);
  padding: 48px;
  box-shadow: var(--shadow-hard);
}

.last-updated {
  display: inline-block;
  margin: 0 0 24px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  border: 2px dashed var(--tone);
  border-radius: var(--pill);
}

.wiki-article h2 {
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  background: var(--brush-red) left bottom / 160px 14px no-repeat;
}
.wiki-article h2:nth-of-type(3n+2) { background-image: var(--brush-violet); }
.wiki-article h2:nth-of-type(3n) { background-image: var(--brush-ink); }
.wiki-article h2:first-of-type { margin-top: 24px; }

.wiki-article h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  margin-bottom: 12px;
  font-size: 18px;
}
.wiki-article h3::before {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--primary);
  border: 2px solid var(--ink);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.wiki-article p,
.wiki-article ul,
.wiki-article ol { margin: 0 0 16px; max-width: 70ch; }

.wiki-article ul { list-style: none; padding-left: 0; }
.wiki-article ul > li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
}
.wiki-article ul > li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  width: 8px;
  height: 8px;
  background: var(--sun);
  border: 2px solid var(--ink);
  transform: rotate(45deg);
}

.wiki-article ol { list-style: none; padding-left: 0; counter-reset: step; }
.wiki-article ol > li {
  counter-increment: step;
  position: relative;
  padding-left: 48px;
  margin-bottom: 12px;
  min-height: 32px;
}
.wiki-article ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-heading);
  font-size: 14px;
  box-shadow: 2px 2px 0 var(--primary);
}

.wiki-article code {
  background: var(--tone);
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* figures as tilted manga panels with a narration strip */
.wiki-article figure {
  margin: 32px 0;
  padding: 8px 8px 0;
  background: var(--surface);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  transform: rotate(-.8deg);
}
.wiki-article figure:nth-of-type(even) { transform: rotate(.8deg); }
.wiki-article figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: var(--line-thin);
  border-radius: var(--radius);
}
.wiki-article figure figcaption {
  position: relative;
  margin: -16px 16px 12px;
  padding: 8px 12px;
  font-size: 14px;
  background: var(--flash-fill);
  border: var(--line-thin);
  border-radius: var(--radius);
  max-width: 60ch;
}

/* official listing card as a polaroid */
.media-float-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin: 24px 0;
  padding: 16px;
  background: var(--cosmic-fill);
  border: var(--line-thin);
  border-radius: var(--radius);
}
.media-float-card img {
  width: 128px;
  height: 128px;
  object-fit: cover;
  border: var(--line-thin);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 4px;
  box-shadow: var(--shadow-hard);
  transform: rotate(-4deg);
}

/* tables */
.table-scroll,
.live-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0 24px;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--tone);
  vertical-align: top;
}
thead th {
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 14px;
}
tbody tr:nth-child(even) { background: var(--paper); }
tbody tr:hover { background: var(--flash-fill); }

/* highlight the column this site covers */
.versus-table th:nth-child(2) { background: var(--primary); }
.versus-table td:nth-child(2) { background: var(--hot-fill); font-weight: 500; border-left: 2px solid var(--primary); border-right: 2px solid var(--primary); }

/* codes table: each code is an ink ticket */
.codes-table td:first-child,
.codes-table td:nth-child(4) {
  white-space: nowrap;
}
.codes-table td:first-child code {
  display: inline-block;
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-heading);
  font-weight: 400;
  padding: 4px 12px;
  white-space: nowrap;
  overflow-wrap: normal;
  transform: rotate(-1.5deg);
}
.codes-table td:nth-child(3) { font-weight: 500; }

/* compare cards as speech bubbles */
.compare-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 24px 0 32px;
}
.compare-box {
  position: relative;
  background: var(--surface);
  border: var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-hard);
}
.compare-box::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 32px;
  width: 20px;
  height: 20px;
  background: inherit;
  border-right: var(--line);
  border-bottom: var(--line);
  transform: rotate(45deg);
}
.compare-box:nth-child(2) { background: var(--cosmic-fill); }
.compare-box:nth-child(2)::after { left: auto; right: 32px; }
.compare-box h3 { margin-top: 0; }
.compare-box p { margin: 0; }

/* notice as a narration caption */
.notice-box {
  position: relative;
  background: var(--surface);
  border: var(--line-thin);
  border-left: 12px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0 24px;
  max-width: 70ch;
  box-shadow: var(--shadow-soft);
}

/* ---------------- FAQ band ---------------- */
.faq-band {
  padding: 64px 0;
  background: var(--halftone) 0 0 / 12px 12px, var(--cosmic-fill);
  border-top: var(--line);
  border-bottom: var(--line);
}
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 48px;
  align-items: start;
}
.faq-intro {
  position: sticky;
  top: 96px;
}
.faq-intro h2 {
  font-size: 36px;
  padding-bottom: 16px;
  background: var(--brush-violet) left bottom / 160px 14px no-repeat;
}
.faq-doodle,
.error-burst {
  width: 128px;
  height: 128px;
  margin-top: 16px;
  transform: rotate(-8deg);
  animation: wobble 4s ease-in-out infinite;
}
@keyframes wobble { 50% { transform: rotate(4deg) scale(1.04); } }
.fd-burst { fill: var(--sun); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.fd-mark { font-family: var(--font-heading); font-size: 28px; fill: var(--ink); }

.faq-list { display: grid; gap: 12px; }
.faq-group-title {
  justify-self: start;
  margin: 16px 0 4px;
  padding: 4px 12px;
  font-size: 14px;
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--pill);
  transform: rotate(-1deg);
}
.faq-group-title:first-child { margin-top: 0; }
.faq-item {
  background: var(--surface);
  border: var(--line-thin);
  border-radius: var(--radius);
  transition: box-shadow .2s ease, transform .25s var(--spring);
}
.faq-item[open] { box-shadow: var(--shadow-hard); transform: translate(-2px, -2px); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 8px 12px 8px 16px;
  font-weight: 700;
  font-size: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: var(--line-thin);
  background: var(--sun);
  font-family: var(--font-heading);
  font-size: 22px;
  line-height: 1;
  transition: transform .35s var(--spring), background-color .2s ease;
}
.faq-item[open] summary::after { transform: rotate(135deg); background: var(--primary); color: var(--surface); }
.faq-item p { margin: 0; padding: 0 16px 16px; color: var(--muted); max-width: 70ch; }

.inner-faq { margin-top: 48px; }

/* ---------------- Comments ---------------- */
.comments-band { padding: 64px 0; }
.comments-wrap { max-width: 848px; }
.comments-wrap h2 {
  padding-bottom: 16px;
  background: var(--brush-red) left bottom / 160px 14px no-repeat;
}
.comments-intro { color: var(--muted); margin: 0 0 24px; max-width: 70ch; }

.composer { display: grid; gap: 16px; margin-bottom: 32px; }
.composer-bubble {
  position: relative;
  background: var(--surface);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  margin-bottom: 8px;
}
.composer-bubble::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 32px;
  width: 20px;
  height: 20px;
  background: var(--surface);
  border-right: var(--line);
  border-bottom: var(--line);
  transform: rotate(45deg);
}
.composer-bubble textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  padding: 16px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  resize: vertical;
}
.composer-bubble textarea:focus { outline: none; }
.composer-bubble:focus-within { outline: 3px solid var(--violet); outline-offset: 2px; }

.composer-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}
.sign-off {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
.sign-word { font-family: var(--font-heading); font-size: 18px; }
.sign-off input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  border-bottom: 3px dashed var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
}
.sign-off input:focus { outline: none; border-bottom-color: var(--violet); border-bottom-style: solid; }

.comment-msg { margin: 0; font-size: 14px; font-weight: 700; color: var(--primary); }

.comment-list { display: grid; gap: 16px; }
.comment-list[data-gf-empty]::before {
  content: 'No comments yet. Drop the first verified tip!';
  display: block;
  padding: 24px;
  border: 2px dashed var(--muted);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}
.comment-item {
  position: relative;
  background: var(--surface);
  border: var(--line-thin);
  border-radius: var(--radius);
  padding: 12px 16px;
  animation: panel-in .35s var(--spring);
}
.comment-item:nth-child(even) { background: var(--flash-fill); margin-left: 32px; }
.comment-item[data-gf-owner] { background: var(--hot-fill); border-color: var(--primary); }
.comment-meta { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 4px; }
.comment-meta time { color: var(--muted); font-size: 12px; }
.comment-item p { margin: 0; }
.owner-badge {
  background: var(--primary);
  color: var(--surface);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--pill);
}

/* ---------------- Inner page hero ---------------- */
.page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--surface);
  border-bottom: var(--line);
  padding: 32px 0;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--speed-lines);
  -webkit-mask-image: radial-gradient(circle at 100% 0%, var(--ink) 0%, transparent 55%);
  mask-image: radial-gradient(circle at 100% 0%, var(--ink) 0%, transparent 55%);
  z-index: -1;
}
.page-hero-inner { max-width: 944px; }
.page-hero h1 { font-size: 36px; margin-bottom: 16px; max-width: 24ch; }
.page-hero .last-updated { margin-bottom: 16px; background: var(--surface); }
.page-hero .side-live-row { max-width: 640px; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; }

.page-article .quick-answer-box { margin-top: 0; }
.page-article:has(.live-board) .quick-answer-box { margin-bottom: 24px; }
.article-band:has(.live-board) ~ * .side-live-row,
body:has(.live-board) .side-live-row { display: none; }

/* ---------------- 404 ---------------- */
.error-card { text-align: left; }
.error-card h1 { font-size: 36px; }
.error-burst .fd-mark { font-size: 28px; }
.error-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; }

/* ---------------- Live telemetry board ---------------- */
.live-board {
  margin: 0 0 24px;
  padding: 24px;
  background: var(--ink);
  color: var(--surface);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--primary);
}
.live-board-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.live-board-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--sun);
}
.live-board-updated { font-size: 12px; color: var(--tone); }
.live-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.live-kpi {
  background: var(--surface);
  color: var(--ink);
  border: var(--line-thin);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.live-kpi:nth-child(1) { background: var(--sun); transform: rotate(-1.5deg); }
.live-kpi:nth-child(2) { border-radius: var(--pill); text-align: center; }
.live-kpi:nth-child(3) { border-style: dashed; }
.live-kpi:nth-child(4) { background: var(--cosmic-fill); }
.live-kpi-label { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.live-kpi:nth-child(1) .live-kpi-label { color: var(--ink); }
.live-kpi-val { font-family: var(--font-heading); font-size: 28px; line-height: 1.2; color: var(--ink); margin: 0; }
.live-kpi-val.is-accent { color: var(--ink); }
.live-kpi-sub { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.live-kpi:nth-child(1) .live-kpi-sub { color: var(--ink); }

.live-chart-box {
  background: var(--surface);
  color: var(--ink);
  border: var(--line-thin);
  border-radius: var(--radius);
  padding: 16px;
}
.live-chart-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.live-chart-title { font-family: var(--font-heading); font-size: 14px; margin: 0; }
.live-range-tabs { display: inline-flex; gap: 8px; }
.live-range-btn {
  min-height: 44px;
  min-width: 56px;
  padding: 8px 16px;
  border-radius: var(--pill);
  border: var(--line-thin);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 14px;
  cursor: pointer;
  transition: transform .25s var(--spring);
}
.live-range-btn[aria-pressed="true"] {
  background: var(--violet);
  color: var(--surface);
  box-shadow: 2px 2px 0 var(--ink);
  transform: translateY(-2px) rotate(-2deg);
}
.live-chart-svg { width: 100%; height: 150px; display: block; }
.live-chart-svg polyline { stroke: var(--violet); }
.live-chart-svg polygon { fill: var(--violet-soft); }
.live-chart-svg line { stroke: var(--tone); }
.live-chart-svg circle { fill: var(--primary); }
.live-chart-svg text { fill: var(--ink); }
.live-chart-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.live-chart-foot a { display: inline-flex; align-items: center; min-height: 44px; }
.live-snapshot-note {
  padding: 16px;
  background: var(--flash-fill);
  border: var(--line-thin);
  border-radius: var(--radius);
  font-size: 14px;
}

/* ---------------- Footer ---------------- */
.site-footer {
  position: relative;
  background: var(--ink);
  color: var(--surface);
  padding: 64px 0 48px;
}
.site-footer::before {
  content: 'To be continued...';
  position: absolute;
  top: -20px;
  right: 24px;
  padding: 8px 16px;
  background: var(--sun);
  color: var(--ink);
  border: var(--line);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 14px;
  transform: rotate(-3deg);
}
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-about { max-width: 480px; }
.footer-logo { font-size: 22px; color: var(--surface); margin-bottom: 8px; }
.footer-desc,
.footer-copy { margin: 0 0 8px; font-size: 14px; color: var(--tone); }
.footer-nav-columns { display: flex; flex-wrap: wrap; gap: 48px; }
.footer-links { display: flex; flex-direction: column; gap: 0; }
.footer-col-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 14px;
  color: var(--sun);
  margin-bottom: 4px;
}
.footer-links a {
  color: var(--surface);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-links a:hover { color: var(--sun); text-decoration: underline; }

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
  .splash-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "codes" "foot" "art";
  }
  .splash-foot { grid-template-columns: minmax(0, 1fr); }
  .tabs-layout,
  .faq-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tablist { flex-direction: row; flex-wrap: wrap; }
  .tab-btn.is-active,
  .tab-btn[aria-selected="true"] { transform: translateY(-2px) rotate(-1.5deg); }
  .tab-btn:hover { transform: translateY(-2px); }
  .faq-intro { position: static; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .faq-doodle { width: 88px; height: 88px; margin-top: 0; flex-shrink: 0; }
  .live-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--surface);
    border-bottom: var(--line);
    padding: 12px 16px 16px;
    flex-direction: column;
    align-items: stretch;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:hover { transform: none; }

  .wiki-article { padding: 24px 16px; }
  .compare-cards { grid-template-columns: minmax(0, 1fr); }

  table.responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  table.responsive-table,
  table.responsive-table tbody,
  table.responsive-table tr,
  table.responsive-table td { display: block; width: 100%; }
  .table-scroll--cards { border: 0; background: transparent; overflow: visible; }
  table.responsive-table tbody tr {
    background: var(--surface);
    border: var(--line-thin);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 2px 2px 0 var(--ink);
  }
  table.responsive-table tbody tr:nth-child(even) { background: var(--surface); }
  table.responsive-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--tone);
    border-left: 0 !important;
    border-right: 0 !important;
    text-align: right;
  }
  table.responsive-table td:last-child { border-bottom: none; }
  table.responsive-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    text-align: left;
    flex-shrink: 0;
    max-width: 45%;
  }
  .versus-table td:nth-child(2) { background: var(--hot-fill); padding-inline: 8px; border-radius: var(--radius); }
  .codes-table td:first-child,
  .codes-table td:nth-child(4) { white-space: normal; }
  .hero-live,
  .side-live-row { flex-wrap: wrap; border-radius: var(--radius); padding: 12px 16px; }
}

@media (max-width: 640px) {
  h1 { font-size: 32px; }
  h2 { font-size: 22px; }
  .container { padding-inline: 16px; }

  .site-header { position: relative; }
  .brand-text small { display: none; }

  .splash { padding: 16px 0 24px; }
  .kicker-stamp { border-radius: var(--radius); }
  .panel, .panel-title { padding: 16px; }
  .title-tiles { font-size: 28px; line-height: 1.6; }
  .tile { display: inline; padding: 2px 8px; box-decoration-break: clone; -webkit-box-decoration-break: clone; transform: none; box-shadow: 2px 2px 0 var(--ink); }
  .hero-lead { font-size: 16px; }
  .engage-bar > * { flex: 1 1 100%; }
  .panel-art { transform: none; }
  .code-ticket { grid-template-columns: minmax(0, 1fr); grid-template-areas: "code" "reward" "btn"; row-gap: 8px; padding: 12px 12px 12px 16px; }
  .code-ticket .copy-code-btn { width: 100%; }
  .hero-live, .side-live-row { border-radius: var(--radius); padding: 12px; }
  .hero-live-link, .side-live-link { margin-left: 0; width: 100%; justify-content: center; }
  .spec-chips { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .chip-ticket, .chip-tag, .chip-stamp { grid-column: 1 / -1; }
  .chip-coin { grid-row: 1; grid-column: 2; }
  .chip-ticket { grid-column: 1; grid-row: 1; }
  .chip-ticket dd { overflow-wrap: anywhere; }

  .systems-tabs { padding: 32px 0; }
  .tablist { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .tab-btn { width: 100%; }
  .quick-cards { grid-template-columns: minmax(0, 1fr); }
  .quick-card { min-height: 0; }
  .quick-guide-links a { flex: 1 1 calc(50% - 12px); justify-content: center; text-align: center; }

  .article-band { padding: 24px 0 48px; }
  .wiki-article { box-shadow: 2px 2px 0 var(--ink); }
  .wiki-article figure,
  .wiki-article figure:nth-of-type(even) { transform: none; }
  .media-float-card { grid-template-columns: minmax(0, 1fr); justify-items: start; }

  .page-hero h1 { font-size: 28px; }
  .faq-band, .comments-band { padding: 48px 0; }
  .faq-intro h2 { font-size: 28px; }
  .composer-foot { grid-template-columns: minmax(0, 1fr); }
  .composer-foot .btn-primary { width: 100%; }
  .comment-item:nth-child(even) { margin-left: 16px; }
  .btn-primary, .btn-secondary { width: 100%; }
  .live-kpi-grid { grid-template-columns: minmax(0, 1fr); }
  .site-footer::before { right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  .copy-code-btn.is-copied::after { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-8deg); }
}
