:root {
  --ink: #1c1a12;
  --muted: #4a4638;
  --cream: #f3ecd0;
  --paper: #efe6c0;
  --nav: #f4efd4;
  --grass-a: #4d9a3d;
  --line: #1a1a12;
  --gold: #f0d24a;
  --red: #b42318;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: "VT323", monospace;
  font-size: 22px;
  line-height: 1.35;
  min-height: 100vh;
}

a { color: inherit; }

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 22px;
  background: var(--nav);
  border-bottom: 3px solid var(--line);
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--gold);
  border: 3px solid var(--line);
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
}
.word {
  font-family: "Press Start 2P", monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
}
.icon-btn {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  background: var(--paper);
  border: 3px solid var(--line);
  padding: 8px 9px;
  cursor: pointer;
  color: var(--ink);
  white-space: nowrap;
}
.icon-btn.mute { margin-left: 8px; }
.icon-btn:hover { background: var(--gold); }
.nav nav { display: flex; align-items: center; gap: 22px; }
.nav nav a {
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  text-decoration: none;
  color: var(--ink);
}
.nav nav a:hover,
.nav nav a.on { color: var(--red); }
.ext { font-size: 8px; }
.say-hey {
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  text-decoration: none;
  background: var(--gold);
  border: 3px solid var(--line);
  padding: 10px 12px;
  white-space: nowrap;
  color: #1a1a12;
}
.say-hey:hover { background: #ffe56a; }

.town-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.town-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  pointer-events: none;
}

.hero-fold,
.cta-fold {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 3px solid var(--line);
}
.hero-fold { min-height: calc(100vh - 52px); }
.cta-fold { min-height: 420px; }

.hero-copy,
.cta-copy {
  position: relative;
  z-index: 2;
  pointer-events: none;
}
.hero-copy a,
.hero-copy button,
.cta-copy a,
.cta-copy button { pointer-events: auto; }

.hero-copy {
  max-width: 920px;
  padding: 56px 48px 120px;
}
.pin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--nav);
  border: 3px solid var(--line);
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  padding: 7px 10px;
  margin-bottom: 22px;
}
.dot {
  width: 8px; height: 8px;
  background: #2f7a32;
  border: 2px solid var(--line);
}
.hero-copy h1 {
  font-family: "Press Start 2P", monospace;
  font-weight: 400;
  font-size: clamp(16px, 2.8vw, 30px);
  line-height: 1.5;
  letter-spacing: 0;
  max-width: none;
  color: #1a1408;
}
.hero-copy h1 .line {
  display: block;
  white-space: nowrap;
}
.hero-copy .name { color: #fff8d6; }
.lede {
  margin-top: 22px;
  max-width: 22em;
  font-size: 26px;
  color: #fff;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.btn {
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  text-decoration: none;
  border: 3px solid var(--line);
  padding: 11px 14px;
  background: var(--gold);
  color: #1a1a12;
}
.btn.ghost { background: var(--nav); }

.stats {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 3;
  display: flex;
  border: 3px solid var(--line);
  background: var(--nav);
}
.stats div {
  padding: 10px 14px;
  border-right: 3px solid var(--line);
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  line-height: 1.5;
}
.stats div:last-child { border-right: 0; }
.stats b {
  display: block;
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 4px;
}

.page {
  background: var(--cream);
}
.section {
  padding: 72px 48px;
  max-width: 1180px;
  margin: 0 auto;
}
.eyebrow {
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  color: var(--red);
  letter-spacing: 0.4px;
  margin-bottom: 16px;
}
.eyebrow span { color: var(--muted); }
.split-head {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 40px;
}
.split-head h2 {
  font-family: "Press Start 2P", monospace;
  font-weight: 400;
  font-size: clamp(28px, 4.6vw, 52px);
  line-height: 1.15;
  max-width: 10ch;
}
.split-head p {
  color: var(--muted);
  font-size: 24px;
  max-width: 28em;
}

.quests {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 28px;
}
.quest {
  text-decoration: none;
  color: inherit;
  display: block;
}
.thumb {
  position: relative;
  border: 3px solid var(--line);
  background: #ddd4b4;
  box-shadow: 6px 6px 0 var(--line);
  aspect-ratio: 16 / 11;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.num {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--nav);
  border: 3px solid var(--line);
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  padding: 6px 7px;
}
.quest-meta { padding: 16px 2px 0; }
.quest-meta .tag {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  color: var(--red);
  margin-bottom: 8px;
}
.quest-meta h3 {
  font-family: "Press Start 2P", monospace;
  font-weight: 400;
  font-size: 18px;
  margin-bottom: 8px;
}
.quest-meta p { color: var(--muted); font-size: 22px; }
.more-link {
  display: inline-block;
  margin-top: 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
}

.map-head { margin-bottom: 18px; }
.map-head h2 {
  font-family: "Press Start 2P", monospace;
  font-weight: 400;
  font-size: clamp(22px, 3vw, 36px);
  margin: 10px 0 8px;
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 10px; }
.filters button {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  background: transparent;
  border: 0;
  padding: 8px 4px;
  cursor: pointer;
  color: var(--muted);
}
.filters button.on { color: var(--ink); border-bottom: 3px solid var(--ink); }

.full-map { list-style: none; border-top: 3px solid var(--line); }
.full-map a {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 3px solid var(--line);
  text-decoration: none;
}
.full-map em {
  font-style: normal;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  color: var(--muted);
}
.full-map strong {
  font-family: "Press Start 2P", monospace;
  font-weight: 400;
  font-size: 13px;
}
.full-map span {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  color: var(--muted);
  align-self: center;
}
.full-map a:hover strong { color: var(--red); }

.cta-copy {
  max-width: 720px;
  padding: 80px 48px;
}
.cta-copy .eyebrow { color: var(--red); }
.cta-copy h2 {
  font-family: "Press Start 2P", monospace;
  font-weight: 400;
  font-size: clamp(22px, 3.4vw, 34px);
  line-height: 1.35;
  max-width: 16ch;
  margin: 10px 0 16px;
  color: #1a1408;
}
.cta-copy p { max-width: 28em; color: #1a1408; font-size: 24px; }
.cta-copy .btn { margin-top: 22px; display: inline-block; }

.site-foot {
  background: var(--nav);
  border-top: 3px solid var(--line);
  padding: 16px 48px 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  line-height: 1.7;
}
.site-foot a { text-decoration: none; }

.case, .about, .play {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 28px 80px;
}
.case-back, .case-kicker {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  text-decoration: none;
  color: var(--muted);
}
.case-kicker { color: var(--red); margin: 16px 0 10px; }
.case h1, .about h1, .play h1 {
  font-family: "Press Start 2P", monospace;
  font-weight: 400;
  font-size: clamp(18px, 3vw, 28px);
  line-height: 1.4;
}
.intro, .about p { margin-top: 16px; color: var(--muted); }
.pull { font-size: 26px; margin: 14px 0 18px; max-width: 28em; }
.scope { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.scope span {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  border: 3px solid var(--line);
  padding: 6px 8px;
  background: var(--paper);
}
.meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 16px 0 20px;
  border-top: 3px solid var(--line);
  border-bottom: 3px solid var(--line);
  margin-bottom: 22px;
}
.meta h3, .work-block h3 {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  margin-bottom: 6px;
}
.meta p { font-size: 20px; color: var(--muted); }
.work-block { margin: 28px 0 36px; padding-top: 18px; border-top: 3px solid var(--line); }
.work-block h2 {
  font-family: "Press Start 2P", monospace;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 12px;
}
.work-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.gallery { display: grid; gap: 22px; }
.gallery img {
  width: 100%; height: auto; display: block;
  border: 3px solid var(--line);
  background: #fff;
  cursor: zoom-in;
}
.gallery img[src*="mock-"] {
  border: none;
  background: transparent;
}
.gallery figcaption {
  margin-top: 8px;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  line-height: 1.5;
  color: var(--muted);
}
.hero-still { margin: 0 0 18px; }
.hero-still img {
  width: 100%; height: auto; display: block;
  background: transparent;
}
.hero-still figcaption,
.car-cap {
  margin-top: 8px;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  line-height: 1.5;
  color: var(--muted);
}

.carousel { margin-top: 6px; outline: none; }
.car-stage {
  position: relative;
  border: 3px solid var(--line);
  background: #1c1a12;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.car-stage img {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #1c1a12;
  cursor: zoom-in;
}
.car-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  font-family: "Press Start 2P", monospace;
  font-size: 16px;
  line-height: 1;
  background: var(--gold);
  border: 3px solid var(--line);
  cursor: pointer;
  z-index: 2;
}
.car-prev { left: 10px; }
.car-next { right: 10px; }
.car-btn:hover { background: #ffe56a; }
.car-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.car-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.car-dot {
  width: 10px; height: 10px;
  padding: 0;
  border: 2px solid var(--line);
  background: var(--paper);
  cursor: pointer;
}
.car-dot.on { background: var(--gold); }

.about ul { margin-top: 22px; list-style: none; }
.about li { padding: 8px 0; border-bottom: 3px solid var(--line); }
.inv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  margin-top: 22px;
}
.inv div {
  border-top: 3px solid var(--line);
  padding-top: 10px;
}
.inv em {
  font-style: normal;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  color: var(--muted);
}

.play {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 28px;
  align-items: start;
}
.play-title .line { display: block; white-space: nowrap; }
.wager {
  display: inline-block;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  text-decoration: none;
  background: var(--gold);
  border: 3px solid var(--line);
  padding: 8px 10px;
  white-space: nowrap;
  margin-bottom: 14px;
}
.scoreline {
  display: flex; justify-content: space-between;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  margin: 10px 0;
}
.table-wrap { border: 3px solid var(--line); background: #2f6b46; }
.table-wrap canvas { display: block; width: 100%; height: auto; }
.play-msg { margin-top: 10px; }
.play-actions { margin-top: 12px; display: flex; gap: 8px; }
.play-actions button {
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  background: var(--ink); color: var(--nav);
  border: 0; padding: 10px 12px; cursor: pointer;
}
.play-actions button.ghost {
  background: var(--paper); color: var(--ink); border: 3px solid var(--line);
}
.play-aside p {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.4;
  margin-top: 12px;
}

.talk {
  position: fixed;
  z-index: 40;
  max-width: 280px;
  background: var(--nav);
  border: 4px solid var(--line);
  box-shadow: 6px 6px 0 var(--line);
  padding: 10px 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  line-height: 1.6;
  pointer-events: none;
}
.talk[hidden] { display: none; }
.talk .who { color: var(--red); margin-bottom: 6px; }

.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(10,10,8,.82);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox[hidden] { display: none !important; }
.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 78vh;
  border: 4px solid var(--nav);
}
.lightbox .lb-x {
  position: absolute; top: 16px; right: 16px;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  background: var(--gold); border: 3px solid var(--line);
  padding: 8px 10px; cursor: pointer;
}
.lightbox .lb-nav {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  font-family: "Press Start 2P", monospace;
  font-size: 18px;
  background: var(--gold); border: 3px solid var(--line);
  cursor: pointer;
}
.lightbox .lb-prev { left: 16px; }
.lightbox .lb-next { right: 16px; }
.lightbox #lbCap { color: var(--nav); margin-top: 10px; font-size: 18px; }

html.night {
  --ink: #efe6c0;
  --muted: #c4b896;
  --cream: #16141c;
  --paper: #1c1a24;
  --nav: #1a1820;
}
html.night body { background: #16141c; color: #efe6c0; }
html.night .hero-copy h1 { color: #efe6c0; }
html.night .hero-copy .name { color: #f5d24a; }
html.night .lede { color: #fff; }
html.night .btn { color: #1a1a12; }
html.night .cta-copy h2,
html.night .cta-copy p { color: #fff; }
html.night .page { background: #16141c; }
html.night .quest, html.night .full-map a, html.night .work-block {
  background: #1c1a24;
}

@media (max-width: 860px) {
  .hero-copy, .section, .cta-copy { padding-left: 20px; padding-right: 20px; }
  .hero-copy h1 {
    font-size: 20px;
    line-height: 1.46;
    letter-spacing: -1px;
  }
  .lede {
    font-size: 17px;
    line-height: 1.35;
    max-width: 100%;
  }
  .split-head, .quests, .play, .meta, .work-split, .inv { grid-template-columns: 1fr; }
  .stats { position: relative; right: auto; bottom: auto; margin: 24px 20px 20px; width: calc(100% - 40px); }
  .nav { flex-wrap: wrap; }
  .nav nav { width: 100%; gap: 14px; }
  .full-map a { grid-template-columns: 40px 1fr; }
  .full-map span { grid-column: 2; }
}
