:root {
  color-scheme: dark;
  --ketchup: #e31837;
  --ketchup-deep: #9b1226;
  --mustard: #f5c518;
  --mustard-deep: #c4920a;
  --bun: #e8b86d;
  --frank: #c45c26;
  --navy: #10203c;
  --navy-2: #1b2d4f;
  --ink: #f6f1e4;
  --muted: #c5c0b3;
  --line: rgba(245, 197, 24, 0.28);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
  --font-mono: "Share Tech Mono", ui-monospace, monospace;
  --radius: 1.1rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(227, 24, 55, 0.18), transparent 55%),
    radial-gradient(900px 500px at -10% 20%, rgba(245, 197, 24, 0.12), transparent 50%),
    linear-gradient(180deg, #0b1426 0%, #121c33 40%, #0b1426 100%);
  line-height: 1.5;
}

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

a {
  color: var(--mustard);
  text-underline-offset: 0.18em;
}

button,
input,
select {
  font: inherit;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--mustard);
  color: #111;
  padding: 0.6rem 1rem;
  z-index: 20;
}
.skip:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 4vw;
  background: rgba(11, 20, 38, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}
.brand img {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--mustard);
}
.brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  line-height: 1;
}
.brand span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}
.nav a:hover,
.nav a:focus-visible {
  color: var(--mustard);
}

.header-tools {
  display: flex;
  gap: 0.4rem;
}

.icon-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--navy-2);
  color: var(--ink);
  border-radius: 999px;
  min-width: 2.6rem;
  min-height: 2.6rem;
  cursor: pointer;
}
.icon-btn[aria-pressed="true"] {
  background: var(--mustard);
  color: #111;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: end stretch;
  overflow: hidden;
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 20, 38, 0.15), rgba(11, 20, 38, 0.88) 72%),
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(255, 255, 255, 0.03) 46px 47px);
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding: 8rem 6vw 4rem;
  max-width: 70rem;
}
.kicker {
  font-family: var(--font-mono);
  color: var(--mustard);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(4.2rem, 14vw, 11rem);
  line-height: 0.8;
  margin: 0.2rem 0 0.6rem;
  letter-spacing: 0.04em;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}
.hero p.lede {
  max-width: 40rem;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  font-weight: 500;
}
.price-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  background: var(--ketchup);
  color: white;
  padding: 0.55rem 1rem 0.45rem;
  border-radius: 999px;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  box-shadow: var(--shadow);
}
.price-pill b {
  font-size: 2rem;
  line-height: 1;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  font-weight: 800;
}
.btn-primary {
  background: var(--mustard);
  color: #16110a;
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

section {
  padding: 5rem 6vw;
  scroll-margin-top: 4.5rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 2rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  letter-spacing: 0.06em;
  margin: 0;
  line-height: 0.9;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 28rem;
}

.beauty-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}
.essay {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  max-width: 42rem;
}
.essay p {
  margin: 0 0 1rem;
}
.frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.frame img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.frame figcaption {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  background: rgba(11, 20, 38, 0.8);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-top: 2rem;
}
.stat {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--mustard);
  letter-spacing: 0.04em;
}
.stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

.nutrition-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  align-items: start;
}

.label {
  background: #fff;
  color: #111;
  color-scheme: light;
  border: 3px solid #111;
  padding: 0.8rem;
  max-width: 320px;
  font-family: Helvetica, Arial, sans-serif;
}
.label h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 0.9;
  border-bottom: 12px solid #111;
  padding-bottom: 0.2rem;
}
.label .serv {
  font-size: 0.85rem;
  border-bottom: 1px solid #111;
  padding: 0.3rem 0;
}
.label .cal {
  display: flex;
  justify-content: space-between;
  align-items: end;
  border-bottom: 8px solid #111;
  font-size: 1.1rem;
  font-weight: 800;
}
.label .cal b {
  font-size: 2.6rem;
  line-height: 1;
}
.row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #111;
  padding: 0.18rem 0;
  font-size: 0.92rem;
}
.row.thick {
  border-bottom-width: 8px;
}
.fine {
  font-size: 0.72rem;
  color: #333;
  margin-top: 0.5rem;
}

.builder {
  display: grid;
  gap: 1rem;
}
.builder fieldset {
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
}
.builder legend {
  padding: 0 0.4rem;
  color: var(--mustard);
  font-weight: 800;
}
.builder label {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  margin: 0.2rem 1rem 0.2rem 0;
  cursor: pointer;
}
.toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  border: 1px solid var(--line);
  background: var(--navy-2);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}
.chip[aria-pressed="true"] {
  background: var(--mustard);
  color: #111;
  border-color: var(--mustard);
}
.meter {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
  height: 0.7rem;
  border: 1px solid var(--line);
}
.meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--mustard), var(--ketchup));
  width: 0%;
}

.timeline {
  position: relative;
  display: grid;
  gap: 1.2rem;
  padding-left: 1.2rem;
  margin: 0;
  list-style: none;
  border-left: 4px solid var(--mustard);
}
.event {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
}
.event time {
  font-family: var(--font-mono);
  color: var(--mustard);
}
.event h3 {
  margin: 0.2rem 0 0.4rem;
  font-size: 1.2rem;
}

.world {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.7rem;
}
.country {
  background: var(--navy-2);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.9rem;
}
.country b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
}
.country span {
  color: var(--muted);
  font-size: 0.85rem;
}

.arcade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.9rem;
}
.cabinet {
  appearance: none;
  text-align: left;
  color: inherit;
  background:
    linear-gradient(180deg, rgba(227, 24, 55, 0.2), rgba(27, 45, 79, 0.9)),
    var(--navy-2);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  padding: 1rem;
  cursor: pointer;
  min-height: 10.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-shadow: inset 0 0 0 1px rgba(245, 197, 24, 0.08);
}
.cabinet:hover,
.cabinet:focus-visible {
  border-color: var(--mustard);
  transform: translateY(-2px);
}
.cabinet strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.05em;
}
.cabinet span {
  color: var(--muted);
  font-size: 0.92rem;
}
.cabinet em {
  margin-top: auto;
  font-style: normal;
  color: var(--mustard);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.cabinet.done {
  outline: 2px solid var(--mustard);
}

.soundboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
}
.pad {
  appearance: none;
  border: 0;
  border-radius: 1rem;
  min-height: 5.4rem;
  cursor: pointer;
  font-weight: 800;
  color: #111;
  background: var(--mustard);
}
.pad:nth-child(3n) { background: var(--ketchup); color: #fff; }
.pad:nth-child(3n+2) { background: var(--bun); }
.pad:active { transform: scale(0.97); }

.passport {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px dashed var(--mustard);
  border-radius: 1rem;
}

footer {
  padding: 2rem 6vw 4rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

dialog {
  width: min(920px, 96vw);
  max-height: 94svh;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  padding: 0;
  background: #10192c;
  color: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: scale(0.94);
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.28s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}
dialog[open] {
  opacity: 1;
  transform: scale(1);
  @starting-style {
    opacity: 0;
    transform: scale(0.94);
  }
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0);
  transition: display 0.28s allow-discrete, overlay 0.28s allow-discrete, background-color 0.28s ease-out;
}
dialog[open]::backdrop {
  background: rgba(4, 8, 16, 0.72);
  @starting-style {
    background: rgba(0, 0, 0, 0);
  }
}

.dialog-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
}
.dialog-bar h2 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  font-size: 1.8rem;
}
.how {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
#game-canvas {
  display: block;
  width: 100%;
  height: min(62svh, 520px);
  background: #0e1526;
  touch-action: none;
}
.hud {
  padding: 0.6rem 1rem 1rem;
  font-family: var(--font-mono);
  color: var(--mustard);
}

.gate {
  width: min(480px, 92vw);
  text-align: center;
  padding: 2rem 1.4rem;
}
.gate img {
  width: 8rem;
  height: 8rem;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--mustard);
}
.gate h1 {
  font-family: var(--font-display);
  font-size: 3.4rem;
  letter-spacing: 0.08em;
  margin: 0.6rem 0 0.2rem;
}

.live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (max-width: 860px) {
  .nav { display: none; }
  .beauty-grid,
  .nutrition-layout {
    grid-template-columns: 1fr;
  }
  .stat-row {
    grid-template-columns: 1fr 1fr;
  }
  .hero-copy { padding-top: 7rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cabinet { transform: none; }
  dialog,
  dialog[open] {
    transform: none;
    transition-duration: 0.1s;
  }
  @starting-style {
    dialog[open] { transform: none; }
  }
}
