:root {
  --paper: #f1e9d8;
  --paper-muted: rgba(241, 233, 216, .72);
  --gold: #c8a36a;
  --gold-light: #e3c995;
  --night: #100f0c;
  --glass: rgba(18, 17, 13, .84);
  --line: rgba(241, 233, 216, .22);
  --serif: "Iowan Old Style", "Baskerville", "Palatino Linotype", Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body, #pano { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { color: var(--paper); background: var(--night); font-family: var(--sans); }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.atlas-entry {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  padding: clamp(36px, 7vw, 112px);
  color: var(--paper);
  background:
    linear-gradient(90deg, rgba(9, 9, 7, .87) 0%, rgba(9, 9, 7, .7) 29%, rgba(9, 9, 7, .14) 66%, rgba(9, 9, 7, .18) 100%),
    linear-gradient(180deg, rgba(8, 8, 6, .2), transparent 46%, rgba(8, 8, 6, .68)),
    url("../Civil-War-Carriage-Monocacy.jpg") center 48% / cover no-repeat,
    #11110d;
  transition: opacity 1.55s cubic-bezier(.4, 0, .2, 1), visibility 1.55s;
}
.atlas-entry::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 74% 43%, transparent 0 24%, rgba(4, 4, 3, .22) 76%);
}
.atlas-entry__content {
  position: relative;
  z-index: 1;
  width: min(610px, 56vw);
  padding-left: clamp(18px, 2.4vw, 40px);
  border-left: 1px solid rgba(227, 201, 149, .48);
  text-shadow: 0 4px 30px rgba(0, 0, 0, .72);
  transition: opacity .9s ease, transform 1.2s cubic-bezier(.2, .75, .25, 1);
}
.atlas-entry__eyebrow,
.atlas-entry__date,
.atlas-entry__credit {
  color: var(--gold-light);
  font: 800 9px/1.3 var(--sans);
  letter-spacing: .24em;
  text-transform: uppercase;
}
.atlas-entry h1 {
  margin: 18px 0 23px;
  font: 400 clamp(58px, 8.5vw, 122px)/.73 var(--serif);
  letter-spacing: -.06em;
}
.atlas-entry h1 span,
.atlas-entry h1 em { display: block; }
.atlas-entry h1 em {
  margin-left: clamp(26px, 4vw, 62px);
  color: var(--gold-light);
  font-size: .64em;
  font-style: italic;
  letter-spacing: -.035em;
}
.atlas-entry__rule { width: 58px; height: 1px; margin-bottom: 19px; background: var(--gold); }
.atlas-entry__content > p {
  max-width: 410px;
  margin: 0 0 30px;
  color: rgba(241, 233, 216, .78);
  font: 17px/1.5 var(--serif);
  letter-spacing: .01em;
}
#enter-antietam {
  min-width: 260px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding: 15px 18px 15px 19px;
  border: 1px solid rgba(227, 201, 149, .5);
  color: var(--paper);
  background: rgba(12, 12, 9, .46);
  box-shadow: 0 18px 52px rgba(0, 0, 0, .2);
  backdrop-filter: blur(10px);
  font: 700 10px/1.25 var(--sans);
  letter-spacing: .16em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .25s, border-color .25s, background .25s, transform .25s;
}
#enter-antietam small {
  display: block;
  margin-bottom: 5px;
  color: rgba(241, 233, 216, .54);
  font-size: 7px;
  letter-spacing: .19em;
}
#enter-antietam svg { width: 37px; fill: none; stroke: var(--gold-light); stroke-width: 1; }
#enter-antietam:hover { color: white; border-color: var(--gold-light); background: rgba(19, 18, 13, .76); transform: translateX(3px); }
#enter-antietam:disabled { cursor: wait; }
.atlas-entry__date { display: block; margin-top: 18px; color: rgba(241, 233, 216, .5); font-size: 7px; }
.atlas-entry__credit {
  position: absolute;
  right: clamp(26px, 4vw, 62px);
  bottom: max(27px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(241, 233, 216, .58);
  font-size: 7px;
  text-shadow: 0 2px 12px black;
}
.atlas-entry__credit i { width: 28px; height: 1px; background: rgba(227, 201, 149, .46); }
.atlas-entry.is-transitioning .atlas-entry__content { opacity: .18; transform: translateX(-20px); }
.atlas-entry.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
html.entry-pending .experience-header,
html.entry-pending .story-panel,
html.entry-pending .scene-dock,
html.entry-pending .gesture-note,
html.entry-pending .next-view-cue,
body.is-entry .experience-header,
body.is-entry .story-panel,
body.is-entry .scene-dock,
body.is-entry .gesture-note,
body.is-entry .next-view-cue,
body.is-entry .object-study-modal,
body.is-entry .shot-panel { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }

.image-vignette,
.film-grain,
.placeholder-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.placeholder-backdrop {
  z-index: 1;
  overflow: hidden;
  opacity: 0;
  background: #171711;
  transition: opacity .8s ease;
}
body.is-placeholder .placeholder-backdrop { opacity: 1; }
.placeholder-sky,
.placeholder-horizon,
.placeholder-contours { position: absolute; inset: 0; }
.placeholder-sky {
  background:
    radial-gradient(ellipse at 22% 18%, rgba(180, 157, 112, .18), transparent 30%),
    radial-gradient(ellipse at 76% 34%, rgba(110, 119, 112, .22), transparent 38%),
    linear-gradient(175deg, #2b2b26 0%, #171813 58%, #0d0e0b 100%);
}
.placeholder-sky::before,
.placeholder-sky::after {
  content: "";
  position: absolute;
  width: 72vw;
  height: 34vw;
  border-radius: 50%;
  background: rgba(213, 203, 176, .035);
  filter: blur(40px);
  animation: cloud-drift 28s ease-in-out infinite alternate;
}
.placeholder-sky::before { top: -12vw; left: -8vw; }
.placeholder-sky::after { right: -18vw; bottom: 18vh; animation-delay: -11s; }
.placeholder-horizon {
  top: 50%;
  background:
    linear-gradient(164deg, transparent 0 49%, rgba(8, 9, 7, .38) 49.2% 55%, transparent 55.2%),
    linear-gradient(193deg, transparent 0 47%, rgba(12, 13, 10, .58) 47.2% 59%, transparent 59.2%);
  opacity: .9;
}
.placeholder-contours {
  opacity: .15;
  background-image:
    repeating-radial-gradient(ellipse at 45% 76%, transparent 0 34px, rgba(214, 192, 146, .4) 35px, transparent 36px),
    linear-gradient(90deg, transparent, rgba(198, 177, 133, .08), transparent);
  transform: perspective(620px) rotateX(62deg) scale(1.35) translateY(24%);
  transform-origin: bottom;
}
.placeholder-watermark {
  position: absolute;
  top: 44%;
  left: 59%;
  width: 72vw;
  color: rgba(227, 201, 149, .055);
  font: 400 clamp(82px, 12vw, 210px)/.8 var(--serif);
  letter-spacing: -.065em;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
  transform: translate(-50%, -50%);
}
.placeholder-card {
  position: absolute;
  top: 47%;
  left: 66%;
  width: min(410px, 31vw);
  padding-left: 26px;
  border-left: 1px solid rgba(227, 201, 149, .52);
  color: var(--paper);
  text-shadow: 0 4px 30px rgba(0, 0, 0, .72);
  transform: translate(-50%, -50%);
}
.placeholder-orbit {
  position: relative;
  width: 92px;
  height: 58px;
  margin-bottom: 19px;
}
.placeholder-orbit svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: rgba(227, 201, 149, .68);
  stroke-width: 1;
}
.placeholder-orbit span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--gold-light);
  font: 800 10px/1 var(--sans);
  letter-spacing: .08em;
}
.placeholder-card > p {
  margin: 0 0 12px;
  color: var(--gold-light);
  font: 800 8px/1 var(--sans);
  letter-spacing: .21em;
  text-transform: uppercase;
}
.placeholder-card h2 {
  max-width: 440px;
  margin: 0 0 22px;
  color: rgba(241, 233, 216, .9);
  font: 400 clamp(39px, 4.4vw, 72px)/.92 var(--serif);
  letter-spacing: -.045em;
  text-wrap: balance;
}
.placeholder-meta {
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(241, 233, 216, .58);
  font: 800 8px/1 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.placeholder-meta i { width: 27px; height: 1px; background: rgba(227, 201, 149, .42); }
.image-vignette {
  background:
    linear-gradient(180deg, rgba(7, 7, 5, .62) 0, transparent 19%, transparent 64%, rgba(7, 7, 5, .75) 100%),
    radial-gradient(circle at center, transparent 48%, rgba(5, 5, 4, .25) 100%);
}
.film-grain {
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.experience-header {
  position: fixed;
  z-index: 8;
  top: max(22px, env(safe-area-inset-top));
  right: 28px;
  left: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.identity,
.header-actions { pointer-events: auto; }
.identity {
  display: flex;
  align-items: baseline;
  gap: 14px;
  color: var(--paper);
  text-decoration: none;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .7);
}
.identity__place {
  font: 400 29px/1 var(--serif);
  letter-spacing: -.03em;
}
.identity__date {
  padding-left: 14px;
  border-left: 1px solid rgba(241, 233, 216, .45);
  color: var(--paper-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.header-actions { display: flex; gap: 8px; align-items: center; }
.text-control,
.icon-control {
  height: 38px;
  border: 1px solid var(--line);
  color: var(--paper);
  background: rgba(14, 14, 11, .56);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
  backdrop-filter: blur(12px);
  cursor: pointer;
}
.text-control {
  padding: 0 16px;
  font: 700 9px/1 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.map-control { display: inline-flex; align-items: center; gap: 8px; }
.map-control svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.35; }
.icon-control { width: 38px; display: grid; place-items: center; }
.icon-control svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.story-panel {
  position: fixed;
  z-index: 7;
  top: 104px;
  left: clamp(28px, 5vw, 74px);
  width: min(520px, calc(100vw - 56px));
  max-height: calc(100vh - 290px);
  overflow-y: auto;
  padding: 26px 32px 30px;
  border-left: 1px solid rgba(227, 201, 149, .52);
  color: var(--paper);
  background: linear-gradient(110deg, rgba(13, 13, 10, .9), rgba(13, 13, 10, .7));
  box-shadow: 22px 24px 70px rgba(0, 0, 0, .28);
  backdrop-filter: blur(16px) saturate(.78);
  transition: opacity .4s ease, transform .4s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(227, 201, 149, .35) transparent;
}
.story-panel.is-hidden { opacity: 0; pointer-events: none; transform: translateX(-24px); }
.story-panel.is-changing .story-heading,
.story-panel.is-changing h1,
.story-panel.is-changing .story-audio,
.story-panel.is-changing .story-copy,
.story-panel.is-changing .story-related { opacity: 0; transform: translateY(7px); }
.story-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  color: rgba(241, 233, 216, .68);
  background: transparent;
  font: 300 25px/1 var(--sans);
  cursor: pointer;
}
.story-rule { width: 38px; height: 1px; margin: 0 0 18px; background: var(--gold); }
.story-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-right: 34px;
  color: var(--gold-light);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
  transition: opacity .22s ease, transform .22s ease;
}
.story-panel h1 {
  max-width: 430px;
  margin: 12px 0 17px;
  font: 400 clamp(34px, 4vw, 50px)/.98 var(--serif);
  letter-spacing: -.035em;
  text-wrap: balance;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .35);
  transition: opacity .22s ease, transform .22s ease;
}
.story-audio {
  --audio-progress: 0%;
  margin: -2px 0 20px;
  padding: 12px 0 13px;
  border-top: 1px solid rgba(227, 201, 149, .24);
  border-bottom: 1px solid rgba(241, 233, 216, .11);
  transition: opacity .22s ease, transform .22s ease;
}
.story-audio audio { display: none; }
.story-audio__row {
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.story-audio__toggle {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  color: var(--paper);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.story-audio__toggle:disabled { cursor: default; }
.story-audio__icon {
  position: relative;
  flex: 0 0 39px;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(227, 201, 149, .58);
  border-radius: 50%;
  color: var(--gold-light);
  background: rgba(227, 201, 149, .05);
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.story-audio__icon::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(227, 201, 149, .12);
  border-radius: inherit;
}
.story-audio__icon svg { width: 24px; fill: currentColor; }
.story-audio__pause { display: none; }
.story-audio.is-playing .story-audio__play { display: none; }
.story-audio.is-playing .story-audio__pause { display: block; }
.story-audio__toggle:hover .story-audio__icon {
  color: white;
  border-color: var(--gold-light);
  background: rgba(227, 201, 149, .11);
  transform: scale(1.035);
}
.story-audio__label {
  min-width: 0;
  display: grid;
  gap: 5px;
}
.story-audio__label small {
  color: rgba(227, 201, 149, .72);
  font: 800 7px/1 var(--sans);
  letter-spacing: .19em;
  text-transform: uppercase;
}
.story-audio__label strong {
  overflow: hidden;
  color: rgba(241, 233, 216, .9);
  font: 400 14px/1.15 var(--serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.story-audio__time {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(241, 233, 216, .52);
  font: 700 8px/1 var(--sans);
  letter-spacing: .08em;
}
.story-audio__time i { color: rgba(227, 201, 149, .42); font-style: normal; }
.story-audio__scrubber { display: block; margin-top: 9px; }
.story-audio__scrubber input {
  width: 100%;
  height: 14px;
  display: block;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.story-audio__scrubber input::-webkit-slider-runnable-track {
  height: 1px;
  background: linear-gradient(90deg, var(--gold-light) var(--audio-progress), rgba(241, 233, 216, .2) var(--audio-progress));
}
.story-audio__scrubber input::-moz-range-track {
  height: 1px;
  background: linear-gradient(90deg, var(--gold-light) var(--audio-progress), rgba(241, 233, 216, .2) var(--audio-progress));
}
.story-audio__scrubber input::-webkit-slider-thumb {
  width: 8px;
  height: 8px;
  margin-top: -3.5px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--gold-light);
  border-radius: 50%;
  background: #171510;
}
.story-audio__scrubber input::-moz-range-thumb {
  width: 7px;
  height: 7px;
  border: 1px solid var(--gold-light);
  border-radius: 50%;
  background: #171510;
}
.story-audio.is-awaiting { opacity: .58; }
.story-audio.is-awaiting .story-audio__scrubber { display: none; }
.story-audio.is-awaiting .story-audio__time { display: none; }
.story-audio.is-awaiting .story-audio__icon { border-style: dashed; }
.story-copy { transition: opacity .22s ease, transform .22s ease; }
.story-copy p {
  margin: 0 0 11px;
  color: rgba(241, 233, 216, .82);
  font: 15px/1.58 var(--serif);
}
.story-copy p:last-child { margin-bottom: 0; }
.story-copy p:first-child::first-letter {
  float: left;
  margin: 6px 8px 0 0;
  color: var(--gold-light);
  font: 52px/.72 var(--serif);
}
.story-related {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 21px;
}
.story-related button,
.story-related a {
  display: inline-block;
  padding: 10px 0 3px;
  border: 0;
  border-bottom: 1px solid rgba(227, 201, 149, .52);
  color: var(--gold-light);
  background: transparent;
  font: 700 9px/1.3 var(--sans);
  letter-spacing: .13em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .22s ease, transform .22s ease, color .2s ease;
}
.story-related button:hover,
.story-related a:hover { color: white; }

.shot-panel {
  position: fixed;
  z-index: 9;
  top: 88px;
  right: clamp(28px, 4vw, 64px);
  width: min(410px, calc(100vw - 56px));
  max-height: calc(100vh - 230px);
  overflow-y: auto;
  padding: 25px 28px 29px;
  border-top: 1px solid rgba(227, 201, 149, .55);
  color: var(--paper);
  background: rgba(15, 15, 12, .92);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .38);
  backdrop-filter: blur(18px) saturate(.72);
}
.shot-close {
  position: absolute;
  top: 11px;
  right: 12px;
  width: 31px;
  height: 31px;
  border: 0;
  color: var(--paper-muted);
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}
.shot-heading { display: flex; justify-content: space-between; gap: 20px; padding-right: 31px; }
.shot-heading span,
.shot-heading strong,
.shot-panel dt {
  color: var(--gold-light);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.shot-heading strong { color: var(--paper-muted); }
.shot-panel h2 { margin: 12px 0 20px; font: 400 34px/.98 var(--serif); letter-spacing: -.025em; }
.shot-panel dl { display: grid; gap: 0; margin: 0; }
.shot-panel dl div { padding: 13px 0; border-top: 1px solid var(--line); }
.shot-panel dt { margin-bottom: 6px; }
.shot-panel dd { margin: 0; color: rgba(241, 233, 216, .78); font: 13px/1.5 var(--serif); }

.object-study-modal {
  position: fixed;
  z-index: 30;
  inset: clamp(12px, 2.5vw, 34px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #100f0c;
  box-shadow: 0 34px 110px rgba(0, 0, 0, .72);
}
.object-study-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 63px;
  padding: 11px 13px 11px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 15, 12, .96);
}
.object-study-modal__header > div { display: flex; align-items: baseline; gap: 13px; min-width: 0; }
.object-study-modal__header span {
  color: var(--gold-light);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.object-study-modal__header strong {
  overflow: hidden;
  font: 400 23px/1.05 var(--serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.object-study-modal__header button {
  min-height: 37px;
  padding: 0 14px;
  border: 1px solid var(--line);
  color: var(--paper);
  background: transparent;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.object-study-modal iframe { width: 100%; height: 100%; border: 0; background: #100f0c; }
body.has-object-study > :not(.object-study-modal) { filter: brightness(.38); }
body.has-object-study .object-study-modal { filter: none; }

.field-map-modal {
  position: fixed;
  z-index: 32;
  inset: clamp(12px, 2.5vw, 34px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(227, 201, 149, .28);
  color: var(--paper);
  background: #100f0c;
  box-shadow: 0 34px 110px rgba(0, 0, 0, .78);
}
.field-map-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 11px 13px 11px 21px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 15, 12, .98);
}
.field-map-modal__header > div:first-child { display: flex; align-items: baseline; gap: 13px; min-width: 0; }
.field-map-modal__header span {
  color: var(--gold-light);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.field-map-modal__header strong { font: 400 23px/1.05 var(--serif); }
.field-map-modal__header-actions { display: flex; align-items: center; gap: 14px; }
.field-map-modal__header-actions > span { color: rgba(241, 233, 216, .54); font-size: 7px; }
.field-map-modal__header button,
.field-map-route button {
  border: 1px solid var(--line);
  color: var(--paper);
  background: transparent;
  cursor: pointer;
}
.field-map-modal__header button {
  min-height: 37px;
  padding: 0 14px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.field-map-modal__body { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 360px); }
.field-map-canvas-wrap { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #191914; }
#field-map-canvas { position: absolute; inset: 0; }
.field-map-canvas-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 90px rgba(6, 6, 4, .24);
}
.field-map-mode {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 18px;
  display: flex;
  padding: 4px;
  border: 1px solid rgba(227, 201, 149, .28);
  background: rgba(16, 15, 12, .88);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .32);
  backdrop-filter: blur(13px);
}
.field-map-mode button {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border: 0;
  color: rgba(241, 233, 216, .65);
  background: transparent;
  font: 800 8px/1 var(--sans);
  letter-spacing: .13em;
  text-transform: uppercase;
  cursor: pointer;
}
.field-map-mode button.is-active { color: #16140f; background: var(--gold-light); }
.field-map-mode svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.field-map-type {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  display: flex;
  padding: 4px;
  border: 1px solid rgba(227, 201, 149, .28);
  background: rgba(16, 15, 12, .88);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .32);
  backdrop-filter: blur(13px);
}
.field-map-type button {
  height: 38px;
  padding: 0 14px;
  border: 0;
  color: rgba(241, 233, 216, .65);
  background: transparent;
  font: 800 8px/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.field-map-type button.is-active { color: #16140f; background: var(--gold-light); }
.field-map-loading {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--paper-muted);
  background: #171711;
  font: 700 9px/1 var(--sans);
  letter-spacing: .17em;
  text-transform: uppercase;
  transition: opacity .35s;
}
.field-map-loading.is-complete { opacity: 0; pointer-events: none; }
.field-map-loading.is-error { padding: 35px; color: var(--gold-light); line-height: 1.7; text-align: center; }
.field-map-route {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 26px 25px 20px;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(227, 201, 149, .05), transparent 32%),
    #13120f;
}
.field-map-route__eyebrow {
  margin-bottom: 16px;
  color: var(--gold-light);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.field-map-route__pair { display: grid; grid-template-columns: 1fr 38px 1fr; gap: 10px; align-items: center; }
.field-map-route__pair div { min-width: 0; }
.field-map-route__pair small,
.field-map-route__facts small {
  display: block;
  margin-bottom: 6px;
  color: rgba(241, 233, 216, .45);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.field-map-route__pair strong { display: block; font: 400 20px/1.05 var(--serif); }
.field-map-route__pair svg { width: 35px; fill: none; stroke: var(--gold); stroke-width: 1; }
.field-map-route__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 23px 0 13px;
  border-block: 1px solid var(--line);
}
.field-map-route__facts span { padding: 13px 0; }
.field-map-route__facts span + span { padding-left: 17px; border-left: 1px solid var(--line); }
.field-map-route__facts strong { color: var(--gold-light); font: 400 18px/1 var(--serif); }
.field-map-coordinates {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin: 0 0 13px;
  padding: 10px 12px;
  border: 1px solid rgba(227, 201, 149, .16);
  background: rgba(227, 201, 149, .035);
}
.field-map-coordinates div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field-map-coordinates div[hidden] { display: none; }
.field-map-coordinates small {
  color: rgba(241, 233, 216, .43);
  font: 800 7px/1 var(--sans);
  letter-spacing: .11em;
  text-transform: uppercase;
}
.field-map-coordinates code {
  color: var(--gold-light);
  font: 500 9px/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: .02em;
  white-space: nowrap;
}
.field-map-location {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 15px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.field-map-location:hover { border-color: var(--gold); background: rgba(227, 201, 149, .06); }
.field-map-location svg { width: 16px; fill: none; stroke: var(--gold-light); stroke-width: 1.4; }
.field-map-stop-list {
  min-height: 0;
  flex: 1;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(227, 201, 149, .32) transparent;
}
.field-map-stop-list button {
  width: 100%;
  min-height: 45px;
  display: grid;
  grid-template-columns: 27px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 7px;
  border-width: 1px 0 0;
  border-color: var(--line);
  text-align: left;
}
.field-map-stop-list li:last-child button { border-bottom-width: 1px; }
.field-map-stop-list button:hover,
.field-map-stop-list button.is-active { background: rgba(227, 201, 149, .07); }
.field-map-stop-list button.is-active { color: var(--gold-light); }
.field-map-stop-list button.is-captured:not(.is-active) { background: rgba(112, 132, 103, .08); }
.field-map-stop-list b {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(227, 201, 149, .38);
  border-radius: 50%;
  font-size: 7px;
}
.field-map-stop-list button.is-captured b {
  border-color: rgba(182, 200, 172, .72);
  color: #d8e3d1;
  background: rgba(88, 103, 86, .42);
}
.field-map-stop-list strong { font: 400 14px/1.1 var(--serif); }
.field-map-stop-list small { color: rgba(241, 233, 216, .4); font-size: 7px; letter-spacing: .09em; text-transform: uppercase; }
.field-map-stop-list button.is-captured small { color: rgba(182, 200, 172, .78); }
.field-map-route__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 14px; }
.field-map-route__nav button { min-height: 38px; padding: 7px; font-size: 7px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.field-map-route__nav button:hover:not(:disabled) { border-color: var(--gold); }
.field-map-route__nav button:disabled { opacity: .3; cursor: default; }
.field-map-advisory { margin: 12px 0 0; color: rgba(241, 233, 216, .48); font: 10px/1.45 var(--serif); }
.field-map-source { margin: 6px 0 0; color: rgba(241, 233, 216, .42); font: 8px/1.4 var(--sans); }
.field-map-source a { color: rgba(227, 201, 149, .78); text-underline-offset: 2px; }
.atlas-map-marker {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(227, 201, 149, .8);
  border-radius: 50% 50% 50% 0;
  color: #17140e;
  background: var(--gold-light);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .42);
  font: 900 8px/1 var(--sans);
  transform: rotate(-45deg);
  transition: transform .2s, background .2s;
}
.atlas-map-marker span { transform: rotate(45deg); }
.atlas-map-marker.is-active { color: var(--paper); background: #7f3f2f; transform: rotate(-45deg) scale(1.18); }
body.has-field-map > :not(.field-map-modal) { filter: brightness(.3); }
body.has-field-map .field-map-modal { filter: none; }
body.has-field-map .next-view-cue,
body.has-object-study .next-view-cue { opacity: 0; visibility: hidden; pointer-events: none; }

.next-view-cue {
  position: fixed;
  z-index: 7;
  right: clamp(24px, 3.4vw, 58px);
  bottom: 126px;
  min-width: 230px;
  max-width: min(340px, calc(100vw - 48px));
  padding: 12px 15px 11px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid rgba(227, 201, 149, .34);
  color: var(--paper);
  background: linear-gradient(90deg, rgba(15, 15, 12, .58), rgba(15, 15, 12, .84));
  box-shadow: 0 12px 36px rgba(0, 0, 0, .24);
  backdrop-filter: blur(12px) saturate(.72);
  cursor: pointer;
  opacity: .88;
  transition: opacity .25s ease, border-color .25s ease, transform .25s ease, visibility .25s ease;
}
.next-view-cue:hover,
.next-view-cue:focus-visible { opacity: 1; border-color: rgba(227, 201, 149, .72); transform: translateX(-3px); }
.next-view-cue span { min-width: 0; display: grid; gap: 3px; text-align: left; }
.next-view-cue small {
  color: var(--gold-light);
  font: 700 7px/1.2 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.next-view-cue strong {
  overflow: hidden;
  color: rgba(241, 233, 216, .9);
  font: 14px/1.2 var(--serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.next-view-cue svg { flex: 0 0 48px; width: 48px; fill: none; stroke: var(--gold-light); stroke-width: 1; }
.next-view-cue svg path { animation: next-view-drift 3.8s ease-in-out infinite; }

.gesture-note {
  position: fixed;
  z-index: 5;
  top: 50%;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(241, 233, 216, .72);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px black;
  transform: rotate(-90deg) translateX(50%);
  transform-origin: right center;
  animation: gesture-away 1s 8s forwards;
}
.gesture-note i { width: 18px; height: 1px; background: rgba(241, 233, 216, .5); }

.scene-dock {
  position: fixed;
  z-index: 8;
  right: clamp(14px, 2.5vw, 38px);
  bottom: max(17px, env(safe-area-inset-bottom));
  left: clamp(14px, 2.5vw, 38px);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 9px;
  align-items: end;
}
.scene-step {
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--paper);
  background: rgba(14, 14, 11, .72);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .24);
  backdrop-filter: blur(12px);
  cursor: pointer;
}
.scene-step:disabled { opacity: .3; cursor: default; }
.scene-step svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.scene-dock__center {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  background: rgba(14, 14, 11, .78);
  box-shadow: 0 14px 45px rgba(0, 0, 0, .27);
  backdrop-filter: blur(14px) saturate(.75);
}
.scene-dock__label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  padding: 1px 5px 9px;
}
.scene-dock__label span {
  flex: 0 0 auto;
  color: var(--gold-light);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.scene-dock__label strong {
  overflow: hidden;
  color: rgba(241, 233, 216, .84);
  font: 14px/1.15 var(--serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scene-rail { display: flex; gap: 5px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; }
.scene-rail::-webkit-scrollbar { display: none; }
.scene-rail button {
  position: relative;
  flex: 0 0 64px;
  height: 43px;
  padding: 0;
  overflow: hidden;
  border: 1px solid transparent;
  background: #24221b;
  cursor: pointer;
}
.scene-rail button::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  transition: border-color .2s ease;
}
.scene-rail button.is-planned {
  background:
    radial-gradient(circle at 34% 26%, rgba(205, 186, 148, .16), transparent 32%),
    linear-gradient(145deg, #313028, #11120e);
}
.scene-rail button.is-planned img { position: relative; z-index: 1; }
.scene-rail button.is-planned::after { z-index: 2; }
.planned-360-marker {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: rgba(227, 201, 149, .84);
}
.planned-360-marker svg {
  position: absolute;
  inset: 3px 8px;
  width: calc(100% - 16px);
  height: calc(100% - 6px);
  fill: none;
  stroke: rgba(227, 201, 149, .46);
  stroke-width: 1.2;
}
.planned-360-marker b {
  font: 800 7px/1 var(--sans);
  letter-spacing: .04em;
}
.scene-rail button.is-active::after { border-color: var(--gold-light); }
.scene-rail img { width: 100%; height: 100%; display: block; object-fit: cover; opacity: .56; filter: saturate(.72); transition: opacity .2s, filter .2s, transform .35s; }
.scene-rail button:hover img,
.scene-rail button.is-active img { opacity: 1; filter: saturate(.95); transform: scale(1.035); }
.scene-rail .scene-number {
  position: absolute;
  right: 3px;
  bottom: 2px;
  z-index: 3;
  color: white;
  font-size: 7px;
  font-weight: 800;
  text-shadow: 0 1px 5px black;
}

.loading {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: #0d0d0a;
  transition: opacity 1.2s ease;
}
.loading.is-complete { opacity: 0; pointer-events: none; }
.loading__title { width: min(650px, calc(100vw - 48px)); text-align: center; }
.loading__title span {
  color: var(--gold-light);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.loading__title h1 {
  margin: 13px 0 19px;
  font: 400 clamp(65px, 11vw, 124px)/.78 var(--serif);
  letter-spacing: -.055em;
}
.loading__title i { display: block; width: 65px; height: 1px; margin: 0 auto 17px; background: var(--gold); }
.loading__title p { margin: 0; color: var(--paper-muted); font: 14px var(--serif); letter-spacing: .08em; }

@keyframes gesture-away { to { opacity: 0; visibility: hidden; } }
@keyframes cloud-drift { to { transform: translate3d(9vw, 3vw, 0) scale(1.08); } }
@keyframes next-view-drift { 0%, 72%, 100% { transform: translateX(0); } 86% { transform: translateX(4px); } }

@media (max-width: 760px) {
  .atlas-entry {
    align-items: flex-end;
    padding: 28px 22px 92px;
    background:
      linear-gradient(180deg, rgba(8, 8, 6, .12), rgba(8, 8, 6, .46) 37%, rgba(8, 8, 6, .92)),
      url("../Civil-War-Carriage-Monocacy.jpg") 64% center / cover no-repeat,
      #11110d;
  }
  .atlas-entry__content { width: 100%; padding-left: 19px; }
  .atlas-entry h1 { margin-block: 14px 19px; font-size: clamp(53px, 18vw, 78px); }
  .atlas-entry__content > p { margin-bottom: 22px; font-size: 15px; }
  #enter-antietam { min-width: min(280px, 100%); }
  .atlas-entry__credit { right: 22px; bottom: 25px; }
  .placeholder-watermark {
    top: 38%;
    left: 50%;
    width: 130vw;
    font-size: clamp(74px, 24vw, 128px);
  }
  .placeholder-card {
    top: 36%;
    left: 50%;
    width: calc(100vw - 44px);
    padding: 22px 0 0;
    border-top: 1px solid rgba(227, 201, 149, .42);
    border-left: 0;
    text-align: center;
  }
  .placeholder-orbit { margin: 0 auto 14px; }
  .placeholder-card h2 { max-width: none; font-size: clamp(39px, 13vw, 60px); }
  .placeholder-meta { justify-content: center; }
  .experience-header { top: max(13px, env(safe-area-inset-top)); right: 13px; left: 16px; }
  .identity { gap: 9px; }
  .identity__place { font-size: 23px; }
  .identity__date { max-width: 93px; padding-left: 9px; font-size: 7px; line-height: 1.35; }
  .text-control { padding: 0 11px; }
  .map-control span { display: none; }
  .field-map-modal { inset: 0; border: 0; }
  .field-map-modal__header { min-height: 56px; padding-left: 14px; }
  .field-map-modal__header > div:first-child { display: grid; gap: 3px; }
  .field-map-modal__header > div:first-child > span { display: none; }
  .field-map-modal__header strong { font-size: 19px; }
  .field-map-modal__header-actions > span { display: none; }
  .field-map-modal__body { grid-template-columns: 1fr; grid-template-rows: minmax(260px, 46vh) minmax(0, 1fr); }
  .field-map-route { padding: 18px 18px max(15px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); border-left: 0; }
  .field-map-route__eyebrow { display: none; }
  .field-map-route__pair strong { font-size: 17px; }
  .field-map-route__facts { margin: 14px 0 10px; }
  .field-map-location { min-height: 37px; margin-bottom: 9px; }
  .field-map-stop-list { display: flex; flex: 0 0 auto; overflow-x: auto; overflow-y: hidden; }
  .field-map-stop-list li { flex: 0 0 142px; }
  .field-map-stop-list button { min-height: 48px; grid-template-columns: 24px 1fr; border-width: 1px 0 1px 1px; }
  .field-map-stop-list small { display: none; }
  .field-map-route__nav { margin-top: 8px; }
.field-map-advisory { margin-top: 8px; font-size: 9px; }
  .field-map-source { margin: 5px 0 0; color: rgba(241, 233, 216, .46); font: 8px/1.35 var(--sans); }
  .field-map-source a { color: rgba(227, 201, 149, .78); text-underline-offset: 2px; }
  .field-map-mode { top: 10px; left: 10px; }
  .field-map-type { top: 10px; right: 10px; }
  .field-map-type button { height: 35px; padding-inline: 11px; font-size: 7px; }
  .field-map-coordinates { margin-bottom: 9px; padding: 8px 10px; }
  .field-map-coordinates div { align-items: flex-start; flex-direction: column; gap: 4px; }
  .field-map-coordinates code { font-size: 8px; }
  .story-panel {
    top: auto;
    right: 10px;
    bottom: 109px;
    left: 10px;
    width: auto;
    max-height: min(56vh, 470px);
    padding: 22px 23px 25px;
    border-left-color: rgba(227, 201, 149, .48);
  }
  .story-panel h1 { font-size: 35px; }
  .story-audio { margin-bottom: 17px; padding-block: 10px 11px; }
  .story-audio__row { min-height: 40px; }
  .story-audio__icon { flex-basis: 36px; width: 36px; height: 36px; }
  .story-audio__label strong { font-size: 13px; }
  .story-audio__time { font-size: 7px; }
  .story-copy p { font-size: 14px; line-height: 1.52; }
  .story-panel.is-hidden { transform: translateY(22px); }
  .shot-panel { top: 68px; right: 10px; left: 10px; width: auto; max-height: calc(100vh - 180px); }
  .gesture-note { display: none; }
  .next-view-cue {
    right: 53px;
    bottom: max(57px, calc(env(safe-area-inset-bottom) + 50px));
    min-width: 0;
    max-width: calc(100vw - 66px);
    padding: 9px 11px 9px 13px;
  }
  .next-view-cue strong { font-size: 12px; }
  .next-view-cue svg { flex-basis: 36px; width: 36px; }
  .scene-dock {
    right: 7px;
    bottom: max(7px, env(safe-area-inset-bottom));
    left: 7px;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 5px;
  }
  .scene-step { height: 40px; }
  .scene-dock__center { padding: 5px; }
  .scene-dock__label { padding: 1px 4px 6px; }
  .scene-rail button { flex-basis: 51px; height: 35px; }
  .object-study-modal { inset: 0; border: 0; }
  .object-study-modal__header { min-height: 56px; padding-left: 14px; }
  .object-study-modal__header span { display: none; }
  .object-study-modal__header strong { font-size: 19px; }
}

@media (max-height: 700px) and (min-width: 761px) {
  .story-panel { top: 78px; max-height: calc(100vh - 230px); padding-top: 21px; padding-bottom: 23px; }
  .story-panel h1 { font-size: 37px; margin-block: 8px 12px; }
  .story-copy p { font-size: 14px; line-height: 1.48; }
  .scene-dock__label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
