:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-raise: #16202e08;
  --surface-raise-2: #16202e0f;
  --text: #16202e;
  --text-dim: #455364;
  --text-faint: #596779;
  --line: #16202e17;
  --line-strong: #16202e29;

  --accent: #c83225;
  --accent-rgb: 200 50 37;
  --accent-hover: #b0271c;
  --accent-ink: #ffffff;

  --siu-board: #1f4f8e;
  --siu-strip: #183f73;
  --siu-grid: #ffffff14;
  --siu-grid-major: #ffffff2e;
  --siu-ground: #ffffffd9;
  --siu-ref: #ffffff;
  --siu-target: #ff6b5c;
  --siu-ghost: #ffffff66;
  --siu-ink: #ffffffeb;
  --siu-ink-soft: #ffffff78;
  --siu-pill: #ffffff;
  --siu-pill-ink: #183f73;
  --siu-tile: #28599a;
  --siu-spot: #16895e;
  --siu-spot-glint: #8ff0c6;
  --siu-name: #d33a2c;

  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 7px;
  --shadow-card: 0 4px 20px rgba(15, 28, 46, 0.06), 0 1px 3px rgba(15, 28, 46, 0.05);
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

html.dark {
  --bg: #0d121a;
  --surface: #141c27;
  --surface-raise: #ffffff09;
  --surface-raise-2: #ffffff12;
  --text: #e8edf4;
  --text-dim: #9aa6b6;
  --text-faint: #6c7889;
  --line: #ffffff17;
  --line-strong: #ffffff29;

  --siu-board: #183f73;
  --siu-strip: #112e56;
  --siu-name: #ff6b5c;
  --siu-spot: #2fb881;
  --shadow-card: 0 8px 28px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.25);
}

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

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
}

html.dark .site-header {
  background: #141c27;
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 56px;
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

@media (max-width: 680px) {
  .site-header {
    height: auto !important;
  }
  .header-inner {
    padding: 8px 12px 10px;
    gap: 8px;
    min-height: unset;
  }
  .header-left {
    gap: 8px;
    order: 1;
  }
  .header-actions {
    order: 2;
    margin-left: auto;
  }
  .mode-tabs {
    order: 3;
    width: auto;
    max-width: 100%;
    margin: 4px auto 0;
    display: flex;
    justify-content: center;
  }
  .brand-badge {
    display: none;
  }
  .mode-tab {
    padding: 5px 12px;
    font-size: 12px;
  }
  .category-filter-wrap {
    order: 4;
    width: 100%;
  }
  .category-select {
    width: 100%;
  }
}

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

.brand-icon {
  width: 34px;
  height: 34px;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Mode Switcher Tabs */
.mode-tabs {
  display: inline-flex;
  background: #eef2f7;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(22, 32, 46, 0.12);
  box-shadow: 0 1px 3px rgba(15, 28, 46, 0.05);
}

html.dark .mode-tabs {
  background: #1c2736;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.mode-tab:hover {
  color: var(--text);
}

.mode-tab.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(15, 28, 46, 0.12);
}

html.dark .mode-tab.active {
  background: #2b394d;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.tab-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  background: #fde8e5;
  color: #b7261a;
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-select {
  appearance: none;
  background: var(--surface-raise);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 26px 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c7889' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.icon-btn:hover {
  background: var(--surface-raise-2);
  color: var(--text);
  border-color: var(--line-strong);
}

html:not(.dark) .moon-icon { display: none; }
html.dark .sun-icon { display: none; }

/* Page Layout */
.page-layout {
  max-width: 820px;
  margin: 0 auto;
  padding: 18px 16px 48px;
}

@media (max-width: 680px) {
  .page-layout {
    padding: 22px 14px 48px;
  }
  .page-title-banner {
    margin: 0 0 16px;
  }
}

.main-column {
  width: 100%;
}

/* Page Title Banner */
.page-title-banner {
  text-align: center;
  margin: 0 0 14px;
}

.page-title-h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
}

.page-title-sub {
  margin: 4px 0 0;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Game Card */
.game-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 14px 18px 18px;
  position: relative;
  overflow: hidden;
}

@media (max-width: 560px) {
  .game-card {
    padding: 12px 14px 16px;
  }
}

/* HUD */
.game-hud {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.hud-stages {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.game-stage {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.game-stage-name {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  transition: color 0.2s;
}

.game-pip {
  height: 5px;
  border-radius: 999px;
  background: var(--surface-raise-2);
  transition: background-color 0.25s, transform 0.2s;
}

.game-stage[data-state="current"] .game-stage-name {
  color: var(--text);
}

.game-stage[data-state="current"] .game-pip {
  background: var(--text);
}

.game-stage[data-state="solved"] .game-stage-name {
  color: var(--siu-spot);
}

.game-stage[data-state="solved"] .game-pip {
  background: var(--siu-spot);
}

.game-stage[data-state="close"] .game-stage-name {
  color: #d97706;
}

.game-stage[data-state="close"] .game-pip {
  background: #d97706;
}

.game-stage[data-state="missed"] .game-stage-name {
  color: var(--accent);
}

.game-stage[data-state="missed"] .game-pip {
  background: var(--accent);
}

.hud-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hud-score-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.game-score {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.game-hud-max {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}

.hud-best-pill {
  margin-left: 8px;
  font-size: 11.5px;
  color: var(--text-dim);
  background: var(--surface-raise-2);
  padding: 2px 8px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.hud-controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 1-Click Unit Switcher (Metric / Imperial) */
.unit-switch {
  display: inline-flex;
  background: var(--surface-raise);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.unit-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
  line-height: 1.3;
}

.unit-btn:hover {
  color: var(--text);
}

.unit-btn.active {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.game-round-counter {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}

.game-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface-raise);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.game-back-btn:hover {
  background: var(--surface-raise-2);
  color: var(--text);
}

/* Prompt Head */
.siu-head {
  padding: 10px 0 10px;
  text-align: center;
  min-height: 56px;
}

.siu-prompt {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.siu-prompt-ask {
  font-size: clamp(17px, 2.5vw, 20px);
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1.25;
}

.siu-prompt-name {
  font-size: 1.25em;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--siu-name);
}

.siu-prompt-sub {
  font-size: 12px;
  color: var(--text-faint);
  min-height: 16px;
}

/* Blueprint Board Frame */
.siu-frame {
  position: relative;
  width: 100%;
}

.siu-board {
  position: relative;
  width: 100%;
  height: clamp(200px, 28vh, 250px);
  border-radius: var(--radius-md);
  background-color: var(--siu-board);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: grab;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.siu-board:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb) / 0.45);
}

.siu-board[data-dragging="true"] {
  cursor: grabbing;
}

.siu-board[data-live="false"] {
  cursor: default;
}

.siu-plan {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--siu-grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--siu-grid-major) 1px, transparent 1px),
    linear-gradient(var(--siu-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--siu-grid) 1px, transparent 1px);
}

.siu-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.siu-strip {
  fill: var(--siu-strip);
}

.siu-ground {
  stroke: var(--siu-ground);
  stroke-width: 2px;
}

.siu-tick {
  stroke: var(--siu-ink);
  stroke-width: 1.5px;
}

.siu-tick-minor {
  stroke: var(--siu-ink-soft);
  stroke-width: 1px;
}

.siu-tick-label {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  fill: var(--siu-ink);
}

.siu-ref {
  fill: var(--siu-ref);
  stroke: var(--siu-ref);
  stroke-linejoin: round;
}

.siu-target {
  fill: var(--siu-target);
  stroke: var(--siu-target);
  stroke-linejoin: round;
}

.siu-board[data-live="true"] .siu-ref,
.siu-board[data-live="true"] .siu-target {
  cursor: move;
}

.siu-ghost {
  fill: var(--siu-ghost);
  pointer-events: none;
}

.siu-speck {
  fill: var(--siu-ink);
}

/* Interactive Handles */
.siu-knob {
  cursor: ew-resize;
}

.siu-knob-stem {
  stroke: var(--siu-target);
  stroke-width: 2px;
}

.siu-knob-grip {
  fill: var(--siu-target);
}

.siu-knob-lines {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.5px;
  stroke-linecap: round;
}

.siu-handle {
  cursor: nesw-resize;
}

.siu-handle circle {
  fill: #ffffff;
  stroke: var(--siu-target);
  stroke-width: 3px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.siu-handle path {
  fill: none;
  stroke: var(--siu-target);
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Flags in Reveal State */
.siu-flag line {
  stroke-width: 2px;
}

.siu-flag text {
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.siu-flag-you line {
  stroke: var(--siu-ink-soft);
  stroke-dasharray: 3 3;
}

.siu-flag-you text {
  fill: var(--siu-ink);
}

.siu-flag-real line {
  stroke: var(--siu-target);
}

.siu-flag-real text {
  fill: var(--siu-target);
}

/* Labels & Pills on Blueprint */
.siu-ref-label {
  position: absolute;
  top: 10px;
  left: 14px;
  z-index: 2;
  margin: 0;
  pointer-events: none;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--siu-ink);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(12, 32, 62, 0.55);
  padding: 4px 10px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.siu-ref-label::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--siu-ref);
  flex-shrink: 0;
}

.siu-ref-label b {
  font-weight: 700;
  color: #ffffff;
}

.siu-pill {
  position: absolute;
  z-index: 3;
  background: var(--siu-pill);
  color: var(--siu-pill-ink);
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
  border-radius: 8px;
  padding: 4px 10px;
  transform: translate(14px, calc(-100% - 10px));
  box-shadow: 0 3px 10px rgba(8, 24, 48, 0.32);
}

.siu-pill[data-flip="true"] {
  transform: translate(calc(-100% - 14px), calc(-100% - 10px));
}

.siu-imperial {
  opacity: 0.72;
  font-style: normal;
  font-weight: 600;
}

/* Zoom Controls */
.siu-zoom {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  background: rgba(8, 24, 48, 0.52);
  border-radius: 9px;
  padding: 2px;
  display: flex;
  gap: 2px;
  backdrop-filter: blur(4px);
}

.siu-zoom button {
  width: 30px;
  height: 28px;
  border: none;
  background: transparent;
  color: #ffffff;
  border-radius: 7px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.15s, opacity 0.15s;
}

.siu-zoom button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
}

.siu-zoom button:disabled {
  opacity: 0.35;
  cursor: default;
}

@keyframes siu-nudge {
  50% { box-shadow: 0 0 0 4px rgba(var(--accent-rgb) / 0.45); }
}

.siu-zoom button[data-nudge="true"] {
  background: var(--accent);
  animation: 1.2s ease-in-out infinite siu-nudge;
}

/* Bottom Deck */
.siu-foot {
  padding-top: 14px;
}

.siu-deck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  flex-wrap: wrap;
}

.siu-slider-wrap {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.siu-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.siu-slider-track {
  flex: 1;
  display: flex;
  align-items: center;
}

.siu-nudge-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--surface-raise);
  border: 1px solid var(--line-strong);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.08s, border-color 0.15s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.siu-nudge-btn:hover {
  background: var(--surface-raise-2);
  border-color: var(--text-dim);
}

.siu-nudge-btn:active {
  transform: scale(0.92);
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.siu-range-input {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
  height: 6px;
}

.siu-hint {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-dim);
}

.game-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s, background-color 0.15s, box-shadow 0.15s;
}

.game-btn:active {
  transform: scale(0.98);
}

.game-btn-tall {
  height: 46px;
}

.game-btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 4px 14px rgba(var(--accent-rgb) / 0.28);
}

.game-btn-primary:hover {
  background: var(--accent-hover);
}

.game-btn-ghost {
  background: var(--surface-raise);
  color: var(--text);
  border-color: var(--line-strong);
}

.game-btn-ghost:hover {
  background: var(--surface-raise-2);
}

.siu-lock {
  min-width: 175px;
}

/* Reveal Result Deck */
.siu-deck.siu-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "verdict points next"
    "fact fact fact";
  align-items: center;
  gap: 10px 24px;
}

@media (max-width: 600px) {
  .siu-deck.siu-result {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "verdict points"
      "fact fact"
      "next next";
  }
  .siu-lock {
    width: 100%;
  }
}

.siu-verdict {
  grid-area: verdict;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.siu-verdict-head {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.siu-verdict b {
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.siu-off {
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-raise-2);
}

.siu-meter {
  background: var(--surface-raise-2);
  border-radius: 999px;
  width: min(100%, 340px);
  height: 7px;
  margin-top: 7px;
  display: block;
  overflow: hidden;
}

.siu-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  transform-origin: 0 50%;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.siu-verdict-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.siu-points {
  grid-area: points;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.siu-points-n {
  display: flex;
  align-items: center;
  gap: 6px;
}

.siu-points b {
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.siu-mult {
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 800;
  border-radius: 6px;
  padding: 2px 6px;
}

.siu-points small {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.siu-next {
  grid-area: next;
  min-width: 150px;
}

.siu-fact {
  grid-area: fact;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-dim);
}

/* Game Over Summary */
.siu-over {
  padding: 18px 0 6px;
  text-align: center;
}

.over-mode-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  background: var(--surface-raise-2);
  padding: 3px 10px;
  border-radius: 999px;
}

.siu-over-title {
  margin: 8px 0 0;
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.siu-over-max {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-faint);
  margin-left: 4px;
}

.siu-record {
  display: inline-block;
  margin: 8px 0 0;
  padding: 4px 10px;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 7px;
}

.siu-breakdown {
  max-width: 440px;
  margin: 16px auto;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}

.siu-breakdown li {
  display: grid;
  grid-template-columns: 1fr auto 70px;
  align-items: baseline;
  gap: 12px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.siu-bd-name {
  text-align: left;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.siu-bd-off {
  font-size: 12px;
  font-weight: 600;
}

.siu-bd-score {
  text-align: right;
  font-weight: 800;
  color: var(--text-dim);
}

.siu-breakdown li[data-close="true"] .siu-bd-score {
  color: var(--siu-spot);
}

.daily-countdown-box {
  margin: 14px auto;
  padding: 10px 16px;
  max-width: 440px;
  background: var(--surface-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

.link-btn:hover {
  text-decoration: underline;
}

.siu-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

@media (max-width: 560px) {
  .siu-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .siu-actions .game-btn {
    padding: 10px 8px;
    font-size: 13px;
  }
}

.game-btn-dare {
  background: #e63946;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(230, 57, 70, 0.35);
}

.game-btn-dare:hover {
  background: #d62828;
}

/* Friend Challenge Top Banner */
.challenge-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.14), rgba(var(--accent-rgb) / 0.12));
  border: 1px solid rgba(230, 57, 70, 0.35);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  margin-bottom: 12px;
  font-size: 13px;
}

.challenge-banner-info {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.challenge-tag {
  display: inline-block;
  background: #e63946;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
}

.challenge-dismiss {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.challenge-dismiss:hover {
  color: var(--text);
}

/* Head-to-Head Comparison Card */
.challenge-h2h-card {
  background: var(--surface-raise);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin: 12px 0 16px;
  text-align: center;
}

.h2h-columns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.h2h-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.h2h-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 700;
}

.h2h-score {
  font-size: 26px;
  font-weight: 900;
  font-family: var(--font-mono);
}

.h2h-player .h2h-score {
  color: var(--accent);
}

.h2h-friend .h2h-score {
  color: var(--siu-name);
}

.h2h-vs {
  font-size: 12px;
  font-weight: 900;
  color: var(--text-faint);
  letter-spacing: 0.12em;
}

.h2h-verdict {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 700;
}

/* =========================================================================
   Game Variants Showcase Section (SEO & Cross-Game Suite Navigation)
   ========================================================================= */
.game-variants-section {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 28px 32px;
  box-shadow: var(--shadow-card);
}

@media (max-width: 560px) {
  .game-variants-section {
    padding: 20px 16px 24px;
  }
}

.variants-header {
  margin-bottom: 22px;
}

.variants-header .section-kicker {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--siu-target, #c83225);
  display: block;
  margin-bottom: 4px;
}

.variants-header h2 {
  margin: 0 0 6px;
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
}

.variants-header .variants-sub {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-dim);
  line-height: 1.5;
}

.variants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.variant-card {
  background: var(--surface-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.variant-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.variant-card.current {
  border-color: rgba(31, 79, 142, 0.35);
  background: linear-gradient(180deg, var(--surface-raise) 0%, rgba(31, 79, 142, 0.03) 100%);
}

.variant-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.variant-card-icon {
  font-size: 28px;
  line-height: 1;
}

.variant-card-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.variant-card-desc {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.5;
  flex-grow: 1;
}

.variant-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.variant-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-raise-2);
  color: var(--text-dim);
}

.variant-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--siu-board, #1f4f8e);
}

/* Editorial Content (SEO & AdSense Value) */
.editorial-content {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 28px 36px;
  box-shadow: var(--shadow-card);
}

@media (max-width: 560px) {
  .editorial-content {
    padding: 20px 16px 26px;
  }
}

.editorial-intro h1 {
  margin: 0 0 10px;
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.editorial-intro .lead {
  margin: 0;
  font-size: 15.5px;
  color: var(--text-dim);
  line-height: 1.65;
}

.quick-stats-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.stat-box {
  background: var(--surface-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}

.stat-desc {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 4px;
}

.rules-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.rules-section h2 {
  font-size: 18px;
  margin: 0 0 14px;
}

.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: var(--text-dim);
}

.steps-list strong {
  color: var(--text);
}

.step-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--siu-board);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.article-grid {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 760px) {
  .article-grid {
    grid-template-columns: 200px minmax(0, 1fr);
  }
}

.article-toc {
  position: sticky;
  top: 72px;
  align-self: start;
}

.toc-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.article-toc ol {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.article-toc a {
  color: var(--text-dim);
  text-decoration: none;
}

.article-toc a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.article-body section {
  margin-bottom: 32px;
  scroll-margin-top: 72px;
}

.section-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 4px;
}

.article-body h2 {
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.article-body h3 {
  margin: 18px 0 6px;
  font-size: 15.5px;
}

.article-body p,
.article-body li {
  font-size: 14.5px;
  color: var(--text-dim);
  line-height: 1.65;
}

.strategy-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scoring-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-top: 12px;
}

.scoring-table th,
.scoring-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
}

.scoring-table th {
  font-weight: 700;
  color: var(--text);
  background: var(--surface-raise);
}

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.faq-item summary {
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  color: var(--text);
}

.faq-item p {
  margin: 8px 0 0;
}

/* Footer */
.site-footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 16px 36px;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-brand p {
  margin: 4px 0 0;
  max-width: 620px;
  font-size: 12px;
  color: var(--text-faint);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  text-decoration: none;
}

.footer-link-btn:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-brand a,
.legal-pane a,
.faq-item a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-brand a:hover,
.legal-pane a:hover,
.faq-item a:hover {
  opacity: 0.85;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 18, 30, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-dialog {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal-dialog-wide {
  max-width: 660px;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-dim);
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 18px 20px 22px;
  overflow-y: auto;
  font-size: 14px;
  color: var(--text-dim);
}

.modal-subhead {
  margin: 14px 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.modal-subhead:first-child {
  margin-top: 0;
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-card {
  background: var(--surface-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.stat-card b {
  font-size: 22px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-card span {
  font-size: 11px;
  margin-top: 2px;
}

.modal-steps {
  padding-left: 20px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 16px 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-raise);
  overflow-x: auto;
}

.legal-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
}

.legal-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.legal-pane h3 {
  margin-top: 0;
  color: var(--text);
}

.contact-email-box {
  background: var(--surface-raise);
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 3px solid var(--accent);
  margin: 14px 0;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  background: var(--text);
  color: var(--surface);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
