:root {
  --bg: #0c0e0c;
  --panel: #161916;
  --ink: #f4efe6;
  --muted: #d5ddd2;
  --gold: #e8c572;
  --copper: #d4784a;
  --line: rgba(244, 239, 230, 0.1);
  --big: #e8c572;
  --small: #d4784a;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Nunito, system-ui, sans-serif;
}
button {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  margin: 0;
}
.sprites { position: absolute; width: 0; height: 0; overflow: hidden; }
header, main, footer { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
}
.brand { margin: 0; font-family: Fraunces, serif; font-weight: 800; font-size: 22px; display: flex; gap: 8px; align-items: center; }
button svg, .brand svg, .kicker svg, .north svg, .search svg, .picker svg { width: 1em; height: 1em; vertical-align: -0.15em; }
.tools { display: flex; gap: 8px; }
.tools button, .primary, .icon-btn, .ghost {
  -webkit-appearance: none;
  appearance: none;
  background: #243024;
  border: 2px solid #f4efe6;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  min-height: 48px;
  color: #f4efe6;
  font-weight: 800;
}
.tools button.on, .ghost.on { background: var(--gold); color: #14140b; border-color: var(--gold); }
.tools button:hover, .icon-btn:hover, .picker:hover { border-color: var(--gold); }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; }
h1 {
  font-family: Fraunces, serif;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
  margin: 8px 0 6px;
  letter-spacing: -0.03em;
}
.lead, .kicker { color: var(--muted); }
.lead { margin: 0 0 18px; font-size: 17px; }
.kicker { display: flex; gap: 8px; align-items: center; letter-spacing: 0.08em; text-transform: uppercase; font-size: 11px; color: var(--gold); }

.pickers { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.picker {
  flex: 1 1 240px;
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px;
  cursor: pointer;
}
.picker .photo {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: #0b0d0b;
  flex: none;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.picker .photo svg, .card .photo svg { width: 86%; height: 86%; display: block; }
.picker .photo img, .card .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picker small { display: block; color: var(--muted); font-size: 12px; }
.picker strong { display: block; font-size: 20px; }

.workspace { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 12px; }
.stage, .facts { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
.stage { position: relative; min-height: 520px; overflow: hidden; }
.stage { touch-action: none; }
#map { width: 100%; height: 520px; display: block; }
path.big, path.small { stroke: var(--ink); stroke-width: 2px; vector-effect: non-scaling-stroke; }
path.big { fill: var(--big); fill-opacity: 0.4; }
path.small { fill: var(--small); fill-opacity: 0.88; }
.label { font: 800 16px Nunito, sans-serif; fill: var(--ink); paint-order: stroke; stroke: #0c0e0c; stroke-width: 5px; }
.north, .hint { position: absolute; margin: 0; color: var(--ink); font-size: 14px; }
.north { top: 12px; right: 14px; display: flex; gap: 4px; align-items: center; }
.hint { left: 14px; bottom: 12px; right: 80px; }

.facts { padding: 18px 18px 20px; }
.facts h2 { font-family: Fraunces, serif; font-size: 40px; margin: 6px 0 12px; letter-spacing: -0.04em; }
dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 14px; }
dt { margin: 0 0 4px; color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
dd { margin: 0; font-family: Fraunces, serif; font-size: 22px; }
#factCopy { color: var(--muted); line-height: 1.5; margin: 0 0 10px; }
.extra { color: var(--gold); margin: 0; font-size: 15px; }

.punch { font-family: Fraunces, serif; font-size: clamp(24px, 3.4vw, 36px); margin: 16px 0 8px; color: var(--gold); }
.note { color: var(--muted); margin: 0 0 28px; max-width: 46rem; line-height: 1.5; }
.about { max-width: 46rem; padding-bottom: 24px; }
.about h2 { font-family: Fraunces, serif; font-size: 26px; }
.about p { color: var(--muted); line-height: 1.55; }
.all h2 { font-family: Fraunces, serif; font-size: 26px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 36px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.card .photo { display: grid; place-items: center; width: 100%; height: 110px; background: #0b0d0b; overflow: hidden; }
.card .body { padding: 10px; display: block; }
.card b { display: block; }
.card small { color: var(--muted); }

.chooser { position: fixed; inset: 0; background: var(--bg); z-index: 40; overflow: auto; padding: 16px; }
.chooser[hidden], .onboard[hidden], .dossier[hidden], button[hidden] { display: none !important; }
.chooser-bar, .search { width: min(1080px, 100%); margin: 0 auto 12px; }
.chooser-bar { display: flex; justify-content: space-between; align-items: center; }
.search { display: flex; gap: 8px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.search input { flex: 1; background: transparent; border: 0; color: var(--ink); font: 700 16px Nunito, sans-serif; outline: none; }

.onboard {
  position: fixed; inset: 0; background: rgba(8,10,8,.84); z-index: 50;
  display: grid; place-items: center; padding: 16px;
}
.onboard-card { background: #1c211c; border: 1px solid rgba(244, 239, 230, 0.28); border-radius: 20px; padding: 22px; max-width: 420px; color: var(--ink); }
.onboard-card h2 { font-family: Fraunces, serif; margin: 8px 0; color: var(--ink); }
.onboard-card p { color: var(--ink); }
.onboard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.primary { background: var(--gold); color: #14140b; border-color: var(--gold); font-weight: 800; }
.ghost { background: #f4efe6; color: #14140b; border-color: #f4efe6; }
.dots { text-align: center; color: var(--muted); }
footer { color: var(--muted); padding: 8px 0 28px; font-size: 13px; }

footer { color: var(--muted); padding: 8px 0 28px; font-size: 13px; }
.progress { margin: 0; color: var(--gold); font-size: 13px; font-weight: 800; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.chip {
  -webkit-appearance: none; appearance: none;
  background: #243024; border: 2px solid #f4efe6; color: #f4efe6;
  border-radius: 999px; padding: 8px 14px; min-height: 40px; font-weight: 800; cursor: pointer;
}
.chip.on { background: var(--gold); color: #14140b; border-color: var(--gold); }
.chip.kind { border-color: rgba(244,239,230,.45); }
select.state-pick {
  -webkit-appearance: none; appearance: none;
  background: #243024; border: 2px solid #f4efe6; color: #f4efe6;
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 40px;
  font: 800 14px Nunito, sans-serif;
  line-height: 1;
}
.atlas-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.atlas-note { color: var(--muted); margin: 0 0 10px; font-size: 14px; }
.card small.kind-tag { display: block; color: var(--gold); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.atlas-search { margin-bottom: 14px; }
.text-link {
  display: inline-block; margin-top: 12px; color: var(--gold); font-weight: 800;
  background: none; border: 0; cursor: pointer; text-decoration: none;
}
.card { position: relative; }
.card .been {
  position: absolute; top: 8px; right: 8px; width: 36px; height: 36px;
  border-radius: 999px; background: #243024; border: 2px solid #f4efe6;
  display: grid; place-items: center; z-index: 2;
}
.card.visited .been { background: var(--gold); color: #14140b; border-color: var(--gold); }
.card.saved { outline: 2px solid var(--copper); }
.photo.tall { height: 180px; width: 100%; display: grid; place-items: center; background: #0b0d0b; border-radius: 16px; overflow: hidden; }
.photo.tall svg { width: 80%; height: 80%; }

.dossier {
  position: fixed; inset: 0; background: rgba(8,10,8,.88); z-index: 45;
  display: grid; place-items: end center; padding: 12px;
}
.dossier[hidden] { display: none !important; }
.dossier-inner {
  background: #161916; color: var(--ink); width: min(720px, 100%);
  max-height: min(92vh, 900px); overflow: auto; border-radius: 20px 20px 12px 12px;
  border: 1px solid rgba(244,239,230,.2); padding: 16px 18px 28px;
}
.dossier-bar { display: flex; justify-content: space-between; align-items: center; }
.dossier-hero { display: grid; grid-template-columns: 180px 1fr; gap: 16px; margin: 10px 0 16px; }
.dossier-inner h2 { font-family: Fraunces, serif; font-size: 36px; margin: 4px 0 12px; }
.dossier-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fun { padding-left: 18px; color: var(--muted); line-height: 1.5; }
.ghost.on { background: var(--gold); color: #14140b; border-color: var(--gold); }
.compact { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.map-chrome {
  position: absolute; left: 12px; top: 12px; right: 48px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start;
  pointer-events: none; z-index: 3;
}
.map-chrome[hidden] { display: none !important; }
.map-legend, .map-actions { pointer-events: auto; }
.map-legend {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  background: rgba(12,14,12,.82); border: 1px solid rgba(244,239,230,.18);
  border-radius: 14px; padding: 8px 10px; font-size: 12px; font-weight: 800;
}
.map-legend span { display: flex; gap: 6px; align-items: center; color: var(--ink); }
.map-legend i {
  width: 10px; height: 10px; border-radius: 99px; display: inline-block;
  border: 1px solid rgba(244,239,230,.55);
}
.map-legend i.visited { box-shadow: 0 0 0 2px #84f4a4; border-color: #84f4a4; }
.map-legend i.open { opacity: .7; }
.map-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.map-check {
  display: flex; gap: 6px; align-items: center;
  background: rgba(12,14,12,.82); border: 1px solid rgba(244,239,230,.18);
  border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 800;
}
.art {
  position: fixed; inset: 0; background: rgba(8,10,8,.88); z-index: 46;
  display: grid; place-items: center; padding: 12px;
}
.art[hidden] { display: none !important; }
.art-inner {
  background: #161916; color: var(--ink); width: min(920px, 100%);
  max-height: min(94vh, 980px); overflow: auto; border-radius: 20px;
  border: 1px solid rgba(244,239,230,.2); padding: 16px 18px 24px;
}
.art-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 14px; }
.art-preview { background: #0b0d0b; border-radius: 16px; overflow: auto; }
.art-preview svg { width: 100%; height: auto; display: block; }

@media (max-width: 860px) {
  .workspace { grid-template-columns: 1fr; }
  #map, .stage { min-height: 380px; height: auto; }
  #map { height: 380px; }
  .tools span, .tools button { font-size: 13px; }
  .dossier-hero { grid-template-columns: 1fr; }
  header { flex-wrap: wrap; }
}
