:root {
  --bg: oklch(16% 0.022 145);
  --field: oklch(19% 0.032 145);
  --panel: oklch(24% 0.035 145);
  --line: oklch(80% 0.23 142);
  --text: oklch(96% 0.018 95);
  --muted: oklch(72% 0.035 145);
  --yellow: oklch(88% 0.17 91);
  --red: oklch(62% 0.19 31);
  --dark-line: oklch(36% 0.045 145);
  --surface-ink: oklch(10% 0.014 145);
  --footer-text: oklch(78% 0.035 145);
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  --space-4xl: 64px;
  --space-5xl: 96px;
  color-scheme: dark;
  font-family: "Archivo", "PingFang SC", "Microsoft JhengHei", sans-serif;
}

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-400.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-700.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 700 900;
}

@font-face {
  font-family: "Bowlby One SC";
  src: url("/assets/fonts/bowlby-one-sc.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--text);
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(62, 230, 62, 0.07) 50%, transparent 50.2%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 4px),
    var(--bg);
  min-width: 280px;
  font-size: 16px;
  line-height: 1.7;
}

.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-xl);
  align-items: center;
  width: min(100% - 32px, 1180px);
  min-height: 68px;
  margin: 0 auto;
  border-bottom: 1px solid var(--dark-line);
}

.wordmark {
  display: block;
  width: 72px;
  height: 56px;
  text-decoration: none;
}

.wordmark picture,
.wordmark img {
  display: block;
  width: 100%;
  height: 100%;
}

.wordmark img {
  object-fit: contain;
  image-rendering: pixelated;
  transition: transform 180ms ease-out;
}

.wordmark:hover img {
  transform: translateY(-2px);
}

.site-header nav {
  display: flex;
  gap: clamp(16px, 3vw, 36px);
}

.site-header nav a,
.language-menu summary,
.language-menu a {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"],
.language-menu summary:hover,
.language-menu a:hover,
.language-menu a[aria-current="page"] {
  color: var(--yellow);
}

.language-menu {
  position: relative;
}

.language-menu summary {
  cursor: pointer;
  justify-content: flex-end;
  list-style: none;
}

.language-menu summary::-webkit-details-marker {
  display: none;
}

.language-menu summary::after {
  content: " +";
  color: var(--line);
}

.language-menu[open] summary::after {
  content: " −";
}

.language-menu > div {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  display: grid;
  min-width: 168px;
  border: 2px solid var(--line);
  background: var(--surface-ink);
  box-shadow: 7px 7px 0 oklch(5% 0.01 145);
}

.language-menu a {
  padding: 11px 14px;
  border-bottom: 1px solid var(--dark-line);
}

.language-menu a:last-child {
  border-bottom: 0;
}

a {
  color: var(--yellow);
  text-underline-offset: 4px;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  transform: translateY(-160%);
  border: 2px solid var(--yellow);
  background: var(--bg);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(56px, 10vw, 120px) 20px clamp(36px, 6vw, 72px);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(8, 17, 12, 0) 55%, var(--bg)),
    repeating-linear-gradient(0deg, #0b1a10 0 30px, #0d2013 30px 60px);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  bottom: 12%;
  width: min(36vw, 420px);
  height: 2px;
  background: var(--dark-line);
  box-shadow: 0 9px 0 rgba(44, 68, 51, 0.7), 0 18px 0 rgba(44, 68, 51, 0.35);
}

.hero::before {
  left: -4%;
}

.hero::after {
  right: -4%;
}

.hero__lights {
  width: min(760px, 90vw);
  height: 14px;
  margin: 0 auto clamp(28px, 5vw, 56px);
  opacity: 0.65;
  background: repeating-linear-gradient(90deg, #344a57 0 8px, transparent 8px 16px);
  box-shadow: 0 7px 0 #171f19, 0 14px 0 #451813;
}

.hero__tag,
.section-kicker,
.eyebrow {
  margin: 0;
  color: var(--yellow);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.hero h1 {
  max-width: 1100px;
  margin: 16px auto 0;
  color: var(--line);
  font-size: clamp(46px, 9.4vw, 126px);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.82;
  text-transform: uppercase;
  text-shadow: 5px 5px 0 #1f4e2b, 9px 9px 0 #020704;
  font-family: "Bowlby One SC", "Arial Black", sans-serif;
}

.hero h1 span {
  display: block;
  color: var(--text);
  font-size: 0.58em;
  letter-spacing: -0.035em;
  text-shadow: 4px 4px 0 #465148, 8px 8px 0 #020704;
}

.hero__dek {
  margin: clamp(24px, 4vw, 40px) auto 0;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 19px);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.game-zone {
  position: relative;
  width: min(100% - 24px, 800px);
  margin: 0 auto;
  padding-bottom: clamp(80px, 12vw, 144px);
}

.scoreboard {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  width: min(88%, 560px);
  margin: 0 auto -2px;
  border: 3px solid var(--line);
  background: #0a140e;
  box-shadow: 5px 5px 0 #020704;
  padding: 10px clamp(10px, 4vw, 30px);
  color: var(--yellow);
  font-size: clamp(10px, 2.4vw, 14px);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-align: center;
}

.scoreboard__versus {
  color: var(--line);
}

.game-cabinet {
  position: relative;
  padding: clamp(8px, 1.5vw, 14px);
  border: 4px solid #3d5c46;
  background: #17231b;
  box-shadow:
    0 0 0 4px #050a07,
    0 0 0 7px var(--line),
    12px 14px 0 #020704;
}

.game-cabinet::before,
.game-cabinet::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 20%;
  bottom: 10%;
  width: 16px;
  border: 3px solid #3d5c46;
  background: #111b14;
}

.game-cabinet::before {
  left: -22px;
}

.game-cabinet::after {
  right: -22px;
}

.game-cabinet__screen {
  overflow: hidden;
  aspect-ratio: 256 / 224;
  background: #000;
  box-shadow: inset 0 0 0 2px #000;
}

.game-cabinet__screen:focus-within,
.game-cabinet__screen.is-game-focused {
  box-shadow: inset 0 0 0 4px var(--yellow);
}

.game-cabinet iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--field);
}

.game-cabinet iframe:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: -5px;
}

.game-hint {
  margin: 24px 0 0;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-align: center;
  animation: blink 1.1s steps(2, end) infinite;
}

@keyframes blink {
  50% { opacity: 0.38; }
}

.story {
  width: min(100% - 40px, 920px);
  margin: 0 auto;
}

.page-flow {
  display: grid;
}

.story > section {
  padding: clamp(64px, 9vw, 104px) 0;
  border-top: 2px solid var(--dark-line);
}

.story__intro {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  column-gap: clamp(32px, 7vw, 90px);
}

.story__intro .section-kicker,
.story__intro h2 {
  grid-column: 1;
}

.story__intro .lead,
.story__intro > p:last-child {
  grid-column: 2;
}

.story__intro .lead {
  grid-row: 1 / span 2;
  margin-top: 0;
}

.story h2 {
  max-width: 760px;
  margin: 12px 0 30px;
  color: var(--text);
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.story h3 {
  margin: 0 0 7px;
  color: var(--line);
  font-size: 16px;
  line-height: 1.2;
  text-transform: uppercase;
}

.story p {
  margin: 0 0 20px;
  color: var(--muted);
}

.story .lead {
  color: var(--text);
  font-size: clamp(18px, 2.5vw, 22px);
  line-height: 1.62;
}

.story strong {
  color: var(--line);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  min-height: 210px;
  border: 2px solid var(--dark-line);
  background: linear-gradient(180deg, var(--panel), #0e1b13);
  padding: 22px;
}

.steps__number {
  display: block;
  margin-bottom: 48px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 900;
}

.steps p {
  margin: 0;
  font-size: 14px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 8vw, 100px);
}

.editorial-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(32px, 7vw, 90px);
}

.editorial-intro h2 {
  margin-bottom: 0;
}

.prose {
  max-width: 70ch;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.route {
  display: grid;
  align-content: start;
  min-height: 320px;
  padding: clamp(24px, 4vw, 40px);
  border: 2px solid var(--dark-line);
  color: var(--text);
  background: var(--panel);
  text-decoration: none;
  transition: border-color 180ms ease-out, transform 180ms ease-out;
}

.route:nth-child(2) {
  background: var(--field);
}

.route:hover {
  transform: translateY(-4px);
  border-color: var(--line);
}

.route > span {
  color: var(--yellow);
  font-size: 12px;
  font-weight: 800;
}

.route h2 {
  margin: 56px 0 var(--space-lg);
  font-size: clamp(25px, 3.7vw, 38px);
}

.route p {
  margin-bottom: var(--space-xl);
}

.route strong {
  align-self: end;
  margin-top: auto;
  color: var(--line);
  font-size: 13px;
}

.split h2 {
  margin-bottom: 0;
}

.faq {
  border-bottom: 2px solid var(--dark-line);
}

.faq details {
  border-top: 2px solid var(--dark-line);
}

.faq summary {
  position: relative;
  min-height: 64px;
  padding: 20px 56px 20px 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  top: 14px;
  right: 0;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 2px solid var(--line);
  color: var(--yellow);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  max-width: 680px;
  padding: 0 56px 22px 0;
}

footer {
  width: min(100% - 40px, 920px);
  margin: clamp(40px, 8vw, 100px) auto 0;
  border-top: 1px solid var(--dark-line);
  padding: 28px 0 44px;
  color: var(--footer-text);
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
}

.site-footer {
  display: flex;
  gap: var(--space-2xl);
  align-items: start;
  justify-content: space-between;
  text-align: left;
}

.site-footer > div {
  max-width: 58ch;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: flex-end;
}

.site-footer a {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  color: var(--muted);
}

.article-page {
  width: min(100% - 40px, 1040px);
  margin: 0 auto;
}

.breadcrumbs {
  display: flex;
  gap: var(--space-md);
  padding-top: var(--space-2xl);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.breadcrumbs a {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  color: var(--yellow);
}

.article-hero {
  max-width: 880px;
  padding: clamp(72px, 12vw, 142px) 0 clamp(64px, 10vw, 112px);
}

.article-hero h1,
.error-page h1 {
  max-width: 920px;
  margin: var(--space-lg) 0 var(--space-xl);
  color: var(--text);
  font-family: "Bowlby One SC", "Arial Black", sans-serif;
  font-size: clamp(42px, 8vw, 88px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.97;
}

.article-hero > p:not(.eyebrow) {
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(18px, 2.4vw, 22px);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: var(--space-xl);
  color: var(--muted);
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-meta a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--yellow);
}

.play-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: var(--space-xl);
  border-bottom: 2px solid var(--line);
  color: var(--yellow);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.article-body {
  display: grid;
}

.article-body > section,
.article-section {
  padding: clamp(56px, 8vw, 92px) 0;
  border-top: 2px solid var(--dark-line);
}

.article-body h2 {
  max-width: 760px;
  margin: 0 0 var(--space-2xl);
  font-size: clamp(28px, 5vw, 48px);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.article-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(32px, 8vw, 100px);
}

.article-section h2 {
  margin: 0;
}

.article-section p,
.fact-grid p,
.guide-steps p,
.tips li {
  color: var(--muted);
}

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

.guide-steps li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--space-xl);
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--dark-line);
}

.guide-steps li:first-child {
  border-top: 0;
}

.guide-steps > li > span {
  color: var(--yellow);
  font-size: 12px;
  font-weight: 800;
}

.guide-steps h2 {
  margin-bottom: var(--space-md);
  font-size: clamp(24px, 4vw, 38px);
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  border: 1px solid var(--dark-line);
  background: var(--dark-line);
}

.fact-grid > div {
  min-height: 210px;
  padding: var(--space-xl);
  background: var(--field);
}

.fact-grid h3 {
  margin: 0 0 var(--space-3xl);
  color: var(--line);
  font-size: 16px;
}

.tips ol {
  display: grid;
  gap: var(--space-lg);
  max-width: 720px;
  margin: 0;
  padding-left: 1.4em;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.contact-links a {
  padding: 12px 16px;
  border: 2px solid var(--line);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.error-page {
  display: grid;
  min-height: 100vh;
  align-content: center;
  width: min(100% - 40px, 960px);
  margin: 0 auto;
}

footer p {
  margin: 0;
}

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

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

@media (max-width: 700px) {
  .site-header {
    grid-template-columns: auto 1fr;
    gap: var(--space-lg);
    padding: 10px 0;
  }

  .site-header nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    width: 100%;
  }

  .site-header nav a {
    font-size: 10px;
  }

  .language-menu {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .hero {
    padding-top: 44px;
  }

  .hero__lights {
    margin-bottom: 34px;
  }

  .hero h1 {
    max-width: calc(100vw - 36px);
    font-size: clamp(36px, 12.5vw, 54px);
    letter-spacing: -0.08em;
    text-shadow: 3px 3px 0 #1f4e2b, 6px 6px 0 #020704;
  }

  .hero h1 span {
    font-size: 0.55em;
  }

  .game-zone {
    width: calc(100% - 28px);
  }

  .game-cabinet::before,
  .game-cabinet::after {
    display: none;
  }

  .story__intro,
  .split,
  .editorial-intro,
  .article-section {
    grid-template-columns: 1fr;
  }

  .route-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .article-hero h1,
  .error-page h1 {
    font-size: clamp(38px, 12vw, 62px);
  }

  .story__intro .section-kicker,
  .story__intro h2,
  .story__intro .lead,
  .story__intro > p:last-child {
    grid-column: 1;
  }

  .story__intro .lead {
    grid-row: auto;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .steps li {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    min-height: 0;
    padding: 20px;
  }

  .steps__number {
    margin: 2px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .game-hint {
    animation: none;
  }
}
