:root {
  color-scheme: dark;
  --ink: #f1f4e9;
  --muted: #afc2b9;
  --accent: #c9e5b0;
  --line: #bfd8c22b;
  --panel: #102b28e8;
  --deck: 270px;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--ink);
  background: #bcc8c2;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
button,
a,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
[hidden] {
  display: none !important;
}
a {
  color: var(--accent);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 24px;
  z-index: 100;
  padding: 14px;
  background: #102b28;
}
.skip-link:focus {
  top: 10px;
}
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, #0f292aad, transparent 42%),
    linear-gradient(#17373855, transparent 30%, transparent 55%, #152e2866);
}
.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 18px 60px #001b252b;
  backdrop-filter: blur(20px);
}
.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 0 32px;
  background: linear-gradient(#112a2be8, #153031ce);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  white-space: nowrap;
}
.brand svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
}
.brand small {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  letter-spacing: 0.45px;
  color: var(--muted);
  font-weight: 400;
}
.location-trail {
  display: flex;
  gap: 17px;
  font-size: 11px;
  color: var(--muted);
}
.location-trail strong {
  color: var(--ink);
  font-weight: 500;
}
.location-trail i {
  font-style: normal;
  opacity: 0.5;
}
.header-actions {
  display: flex;
  gap: 9px;
}
.header-actions button,
.time-actions button {
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: #ffffff05;
  border-radius: 5px;
  font-size: 11px;
}
.header-actions button:hover,
.time-actions button:hover:not(:disabled) {
  background: #ffffff12;
}
#inspect-toggle {
  background: #c9e5b0;
  color: #183630;
  border-color: #c9e5b0;
}
#inspect-toggle span {
  margin-left: 12px;
}
.interface {
  position: relative;
  z-index: 10;
}
.place-card {
  position: fixed;
  top: 130px;
  left: 40px;
  width: 310px;
  filter: drop-shadow(0 2px 12px #152e2840);
}
.place-kicker {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #e0ebd9;
  display: flex;
  align-items: center;
  gap: 10px;
}
.source-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.prototype-badge {
  font-size: 8px;
  letter-spacing: 0.6px;
  padding: 4px 6px;
  border: 1px solid #dfebd73d;
  border-radius: 3px;
  color: #c0d1c8;
}
h1 {
  font:
    normal clamp(44px, 4.6vw, 68px)/1.02 Georgia,
    serif;
  letter-spacing: -2.8px;
  margin: 23px 0 12px;
}
.place-subtitle {
  font-size: 12px;
  color: #e1e9db;
  margin: 0 0 30px;
  letter-spacing: 0.2px;
}
.micro-label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.map-tools {
  position: fixed;
  z-index: 12;
  left: 40px;
  bottom: calc(var(--deck) + 46px);
  display: flex;
  gap: 10px;
}
.view-buttons,
.layer-buttons {
  display: flex;
  border-radius: 6px;
  padding: 4px;
}
.map-tools button {
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-radius: 3px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.map-tools button:hover {
  background: #ffffff10;
}
.map-tools button[aria-pressed="true"] {
  background: #d2e5c119;
  color: #e9f3dc;
}
.view-button span {
  font-size: 9px;
  color: #9eb4a9;
}
.line-symbol {
  width: 14px;
  height: 2px;
  background: #8bd7bd;
  transform: rotate(-25deg);
}
.terrain-symbol {
  font-style: normal;
  font-size: 19px;
  line-height: 12px;
}
.map-caption {
  position: fixed;
  z-index: 9;
  bottom: calc(var(--deck) + 26px);
  left: 40px;
  display: flex;
  gap: 15px;
  font-size: 9px;
  color: #e2eadf;
  text-shadow: 0 1px 5px #0008;
}
.map-caption span + span:before {
  content: "·";
  margin-right: 15px;
}
.compass {
  position: fixed;
  right: 32px;
  top: 120px;
  z-index: 9;
  text-align: center;
  pointer-events: none;
  color: #173a31;
  text-shadow: 0 1px 3px #fff8;
}
.compass span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 3px;
}
.compass svg {
  width: 24px;
  height: 36px;
  fill: #173a31;
  filter: drop-shadow(0 1px 2px #fff6);
}
.inspector {
  position: fixed;
  z-index: 25;
  right: 24px;
  top: 108px;
  width: min(365px, calc(100vw - 32px));
  max-height: calc(100dvh - 136px);
  overflow: auto;
  border-radius: 10px;
  padding: 25px;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-heading h2 {
  font:
    normal 26px Georgia,
    serif;
  margin: 9px 0;
}
.panel-heading button {
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  width: 32px;
  height: 32px;
  font-size: 23px;
}
.inspector-intro,
.interpretation p,
.provenance p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.inspector h3 {
  font-size: 12px;
  font-weight: 500;
  margin: 24px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.evidence-list {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px;
  font-size: 11px;
  line-height: 1.6;
}
.evidence-list dt,
.readout-grid dt {
  color: var(--muted);
}
.evidence-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.readout-grid {
  font-size: 11px;
  display: grid;
  gap: 14px;
}
.readout-grid dd {
  margin: 4px 0 0;
}
.inspect-hint {
  font-size: 11px;
  color: var(--muted);
}
details {
  margin-top: 20px;
  font-size: 11px;
}
summary {
  cursor: pointer;
  line-height: 1.5;
}
pre {
  background: #071e1b;
  padding: 12px;
  overflow: auto;
  font: 10px/1.6 monospace;
  max-height: 260px;
}
.interpretation {
  margin-top: 22px;
  padding: 15px;
  background: #ccdfb90a;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.interpretation strong {
  font-size: 11px;
  font-weight: 500;
}
.interpretation p {
  font-size: 11px;
  margin: 7px 0 0;
}
.loading-screen {
  position: fixed;
  z-index: 30;
  inset: 88px 0 0;
  background: #17342d;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  pointer-events: none;
  transition:
    opacity 0.6s,
    visibility 0.6s;
}
.loading-screen.ready {
  opacity: 0;
  visibility: hidden;
}
.loading-screen strong {
  font:
    28px Georgia,
    serif;
}
.loading-screen > span {
  font-size: 12px;
  color: var(--muted);
}
.loading-pulse {
  width: 46px;
  height: 46px;
  border: 1px solid #d5e7b944;
  border-top-color: #d5e7b9;
  border-radius: 50%;
  animation: spin 1.6s linear infinite;
  margin-bottom: 16px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.error {
  position: fixed;
  z-index: 15;
  top: 110px;
  right: 30px;
  width: 320px;
  max-width: calc(100vw - 36px);
  padding: 18px;
  font-size: 12px;
  line-height: 1.6;
  border-radius: 8px;
  color: #f2dfba;
}
.error strong {
  display: block;
  font-size: 14px;
  margin-bottom: 7px;
}
.error button {
  margin-top: 12px;
  background: none;
  border: 1px solid #f2dfba55;
  border-radius: 3px;
  padding: 8px 12px;
}
.focus-view .place-card,
.focus-view .control-deck {
  display: none;
}
.focus-view .map-tools {
  bottom: 50px;
}
.focus-view .map-caption {
  bottom: 27px;
}
.focus-view .world-label {
  display: none;
}
@media (min-width: 1700px) {
  :root {
    --deck: 290px;
  }
  .place-card {
    top: 150px;
    left: 55px;
  }
  .topbar {
    padding: 0 45px;
  }
  .map-tools,
  .map-caption {
    left: 55px;
  }
}
@media (max-height: 800px) and (min-width: 801px) {
  :root {
    --deck: 230px;
  }
  .place-card {
    top: 112px;
    width: 290px;
  }
  .place-card h1 {
    font-size: 46px;
    margin: 15px 0 8px;
  }
  .place-subtitle {
    margin-bottom: 18px;
  }
  .map-tools {
    left: auto;
    right: 28px;
  }
  .compass {
    top: 106px;
    right: 35px;
  }
}
@media (max-width: 1100px) {
  .location-trail span:last-child,
  .location-trail i:last-of-type {
    display: none;
  }
  .topbar {
    gap: 15px;
    padding: 0 24px;
  }
  .place-card {
    left: 28px;
  }
  .map-tools,
  .map-caption {
    left: 28px;
  }
  .layer-buttons button {
    padding: 10px 9px;
  }
}
@media (max-width: 800px) {
  :root {
    --deck: 155px;
  }
  .topbar {
    height: 72px;
    padding: 0 18px;
  }
  .brand {
    font-size: 11px;
    letter-spacing: 1.5px;
    gap: 7px;
  }
  .brand svg {
    width: 30px;
  }
  .brand small {
    font-size: 8px;
  }
  .location-trail {
    display: none;
  }
  .header-actions {
    gap: 6px;
  }
  .header-actions button {
    padding: 9px 10px;
    font-size: 10px;
  }
  #inspect-toggle span {
    display: none;
  }
  .place-card {
    top: 100px;
    left: 22px;
    width: 260px;
  }
  .place-kicker {
    font-size: 8px;
    letter-spacing: 1.3px;
  }
  .prototype-badge {
    display: none;
  }
  h1 {
    font-size: 43px;
    margin: 16px 0 10px;
    letter-spacing: -1.5px;
  }
  h1 br {
    display: none;
  }
  .place-subtitle {
    font-size: 10px;
    margin: 0 0 19px;
  }
  .map-tools {
    left: 18px;
    right: auto;
    bottom: calc(var(--deck) + 35px);
    gap: 6px;
  }
  .map-tools button {
    padding: 10px 9px;
    font-size: 10px;
    gap: 6px;
  }
  .layer-buttons button:last-child {
    display: none;
  }
  .map-caption {
    left: 22px;
    bottom: calc(var(--deck) + 18px);
    font-size: 8px;
    gap: 8px;
  }
  .map-caption span + span:before {
    margin-right: 8px;
  }
  .compass {
    top: 98px;
    right: 24px;
  }
  .inspector {
    top: 88px;
    right: 16px;
    max-height: calc(100dvh - 108px);
    padding: 22px;
  }
  .loading-screen {
    inset: 72px 0 0;
  }
  .error {
    top: 90px;
    right: 18px;
    width: 290px;
  }
  body .world-label {
    display: none;
  }
  .timeline-open {
    --deck: 305px;
  }
  .timeline-open .place-card {
    max-height: calc(100dvh - 480px);
    overflow: auto;
  }
  .timeline-open .seasonal-condition {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.compass[hidden] { display: none; }

.header-actions .place-link { color: var(--cream, #f4f0df); font-size: 11px; text-decoration: none; padding: 9px 10px; }
.header-actions .place-link:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .topbar { gap: 8px; }
  .brand { font-size: 10px; }
  .header-actions button { font-size: 9px; padding: 8px 7px; }
  .header-actions .place-link { font-size: 9px; padding: 6px; white-space: nowrap; }
}

.stage-buttons { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; max-width: 360px; }
.stage-buttons[hidden] { display: none; }
.stage-buttons button { font: inherit; font-size: 12px; padding: 7px 10px; border-radius: 8px; border: 0;
  background: transparent; color: var(--cream, #f4f0df); cursor: pointer; }
.stage-buttons button.active { background: #ffffff26; }
.stage-buttons button:focus-visible { outline: 2px solid var(--cream, #f4f0df); outline-offset: 1px; }
.stage-buttons p { flex-basis: 100%; margin: 4px 6px 2px; font-size: 11px; line-height: 1.35; opacity: .85; }
