:root {
  --atlas-ink: #f0f0f0;
  --atlas-muted: #a7a7a7;
  --atlas-bg: #0b0b0b;
  --atlas-panel: #151515;
  --atlas-panel-soft: #1b1b1b;
  --atlas-line: rgba(239, 239, 239, 0.14);
  --atlas-gold: #b7b7b7;
  --atlas-blue: #a9a9a9;
  --atlas-green: #bababa;
  --atlas-lilac: #b1b1b1;
  --atlas-rust: #838383;
  --atlas-serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --atlas-sans: Inter, "Helvetica Neue", Arial, sans-serif;
}

.atlas-app {
  width: min(1500px, calc(100% - 28px));
  margin: 0 auto;
  padding: 26px 0 70px;
  color: var(--atlas-ink);
  font-family: var(--atlas-sans);
}

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

.atlas-app [hidden] {
  display: none !important;
}

.atlas-kicker {
  display: block;
  color: var(--atlas-gold);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.atlas-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid var(--atlas-line);
  border-radius: 8px 8px 0 0;
  background:
    radial-gradient(circle at 82% 12%, rgba(169, 169, 169, 0.18), transparent 30%),
    linear-gradient(135deg, #1b1b1b 0%, #0d0d0d 68%);
}

.atlas-hero::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 36px 36px;
  content: "";
  mask-image: linear-gradient(90deg, black, transparent 78%);
  pointer-events: none;
}

.atlas-hero__copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 900px;
  padding: clamp(30px, 5vw, 68px);
}

.atlas-hero h1 {
  max-width: 820px;
  margin: 10px 0 14px;
  color: #ffffff;
  font-family: var(--atlas-serif);
  font-size: clamp(2.1rem, 4.6vw, 4.8rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.atlas-hero__copy > p {
  max-width: 760px;
  margin: 0;
  color: #c6c6c6;
  font-size: clamp(0.96rem, 1.6vw, 1.12rem);
  line-height: 1.62;
}

.atlas-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.atlas-hero__facts span {
  padding: 8px 12px;
  border: 1px solid var(--atlas-line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--atlas-muted);
  font-size: 0.72rem;
}

.atlas-hero__facts strong {
  margin-right: 4px;
  color: var(--atlas-ink);
}

.atlas-hero__agnes {
  position: relative;
  z-index: 1;
  align-self: end;
  height: 100%;
  min-height: 330px;
  margin: 0;
}

.atlas-hero__agnes img {
  position: absolute;
  right: 24px;
  bottom: -38px;
  width: 185px;
  height: 360px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.52));
}

.atlas-hero__agnes figcaption {
  position: absolute;
  right: 22px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  min-width: 150px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(8px);
}

.atlas-hero__agnes figcaption strong {
  color: var(--atlas-gold);
  font-family: var(--atlas-serif);
  font-size: 1.05rem;
}

.atlas-hero__agnes figcaption span {
  color: var(--atlas-muted);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.atlas-console {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(380px, 0.75fr);
  border: 1px solid var(--atlas-line);
  border-top: 0;
  background: var(--atlas-bg);
}

.atlas-map-stage {
  min-width: 0;
  border-right: 1px solid var(--atlas-line);
}

.atlas-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--atlas-line);
  background: #111111;
}

.atlas-field-state strong {
  display: block;
  max-width: 390px;
  margin-top: 3px;
  color: #e1e1e1;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
}

.atlas-map-actions,
.voice-player__actions,
.encounter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.atlas-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(239, 239, 239, 0.2);
  border-radius: 3px;
  background: transparent;
  color: #e4e4e4;
  font-family: var(--atlas-sans);
  font-size: 0.7rem;
  font-weight: 720;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.atlas-control:hover,
.atlas-control:focus-visible {
  border-color: var(--atlas-gold);
  color: #ffffff;
}

.atlas-control--primary {
  border-color: var(--atlas-gold);
  background: var(--atlas-gold);
  color: #121212;
}

.atlas-control--primary:hover,
.atlas-control--primary:focus-visible {
  background: #cacaca;
  color: #0c0c0c;
}

.atlas-control:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.atlas-map-wrap {
  position: relative;
  min-height: clamp(540px, 69vh, 790px);
}

.atlas-map {
  position: absolute;
  inset: 0;
}

.atlas-map-legend {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
  max-width: calc(100% - 110px);
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  background: rgba(11, 11, 11, 0.86);
  color: #d3d3d3;
  font-size: 0.61rem;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.atlas-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.atlas-map-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.atlas-map-legend .is-start { background: var(--atlas-blue); }
.atlas-map-legend .is-story { background: var(--atlas-gold); }
.atlas-map-legend .is-direction { background: var(--atlas-green); }
.atlas-map-legend .is-manual { background: var(--atlas-lilac); }

.atlas-location-note {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 12px;
  width: min(540px, calc(100% - 24px));
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 3px;
  background: rgba(11, 11, 11, 0.88);
  color: #a7a7a7;
  font-size: 0.61rem;
  line-height: 1.45;
  backdrop-filter: blur(8px);
}

.atlas-progress {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  align-items: center;
  gap: 11px;
  min-height: 47px;
  padding: 9px 14px;
  border-top: 1px solid var(--atlas-line);
  background: #111111;
  color: var(--atlas-muted);
  font-size: 0.67rem;
}

.atlas-progress__track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.atlas-progress__track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--atlas-blue), var(--atlas-gold));
  transition: width 260ms ease;
}

.atlas-progress button {
  border: 0;
  background: transparent;
  color: #868686;
  font-size: 0.63rem;
  text-decoration: underline;
  cursor: pointer;
}

.tour-player {
  min-width: 0;
  background: var(--atlas-panel);
}

.encounter-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.stop-image {
  position: relative;
  aspect-ratio: 1.45 / 1;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--atlas-line);
  border-radius: 5px;
  background: #0a0a0a;
}

.stop-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: stopImageIn 300ms ease both;
}

.stop-image figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 18px 10px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.62rem;
  line-height: 1.35;
}

.encounter-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.encounter-header > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.encounter-type {
  color: var(--atlas-gold);
  font-size: 0.66rem;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.encounter-distance {
  color: var(--atlas-muted);
  font-size: 0.64rem;
}

.encounter-number {
  color: #6a6a6a;
  font-family: var(--atlas-serif);
  font-size: 1rem;
}

.encounter-card h2 {
  margin: -2px 0 0;
  color: #ffffff;
  font-family: var(--atlas-serif);
  font-size: clamp(1.75rem, 2.4vw, 2.65rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.03;
}

.encounter-dek,
.encounter-field-cue {
  margin: 0;
  color: #c0c0c0;
  font-size: 0.82rem;
  line-height: 1.55;
}

.encounter-field-cue {
  padding: 10px 11px;
  border-left: 2px solid var(--atlas-blue);
  background: rgba(169, 169, 169, 0.08);
  color: #c5c5c5;
  font-size: 0.72rem;
}

.voice-player {
  padding: 12px;
  border: 1px solid rgba(183, 183, 183, 0.25);
  border-radius: 4px;
  background: #0e0e0e;
}

.voice-player > header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #a3a3a3;
  font-size: 0.61rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.voice-player audio {
  width: 100%;
  height: 38px;
  margin: 0 0 9px;
  accent-color: var(--atlas-gold);
}

.voice-player > p {
  margin: 9px 0 0;
  color: #878787;
  font-size: 0.62rem;
  line-height: 1.45;
}

.live-script {
  overflow: hidden;
  border: 1px solid var(--atlas-line);
  border-radius: 4px;
  background: #101010;
}

.live-script > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--atlas-line);
}

.live-script h3 {
  margin: 3px 0 0;
  color: #e8e8e8;
  font-family: var(--atlas-serif);
  font-size: 1.05rem;
  font-weight: 500;
}

.live-script__status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  color: #878787;
  font-size: 0.62rem;
}

.live-script__status button {
  padding: 3px 7px;
  border: 1px solid var(--atlas-line);
  border-radius: 999px;
  background: transparent;
  color: #b7b7b7;
  font-size: 0.58rem;
  cursor: pointer;
}

.live-script__status button[aria-pressed="true"] {
  border-color: rgba(183, 183, 183, 0.45);
  color: var(--atlas-gold);
}

.live-script__now {
  min-height: 62px;
  margin: 0;
  padding: 12px;
  border-bottom: 1px solid var(--atlas-line);
  background: rgba(183, 183, 183, 0.08);
  color: #ebebeb;
  font-family: var(--atlas-serif);
  font-size: 0.92rem;
  line-height: 1.45;
}

.live-script__scroll {
  position: relative;
  height: clamp(250px, 37vh, 410px);
  overflow: auto;
  scroll-behavior: smooth;
}

.script-cue {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-left: 3px solid transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  background: transparent;
  color: #a4a4a4;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.script-cue:hover,
.script-cue:focus-visible {
  background: rgba(255, 255, 255, 0.035);
  color: #d8d8d8;
}

.script-cue > span {
  padding-top: 2px;
  color: #676767;
  font-size: 0.58rem;
}

.script-cue p {
  margin: 0;
  font-family: var(--atlas-serif);
  font-size: 0.82rem;
  line-height: 1.48;
}

.script-cue.is-stage p {
  color: #a9a9a9;
  font-family: var(--atlas-sans);
  font-size: 0.66rem;
  font-style: italic;
}

.script-cue.is-active {
  border-left-color: var(--atlas-gold);
  background: rgba(183, 183, 183, 0.1);
  color: #ffffff;
}

.script-cue.is-active > span {
  color: var(--atlas-gold);
}

.encounter-actions {
  padding-top: 2px;
}

.route-index {
  border: 1px solid var(--atlas-line);
  border-top: 0;
  background: #111111;
}

.route-index > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 20px;
  color: var(--atlas-ink);
  cursor: pointer;
}

.route-index > summary > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.route-index > summary strong {
  font-family: var(--atlas-serif);
  font-size: 1.16rem;
  font-weight: 500;
}

.route-index > summary > span:last-child {
  color: var(--atlas-muted);
  font-size: 0.67rem;
}

.encounter-route-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 1px;
  border-top: 1px solid var(--atlas-line);
  background: var(--atlas-line);
  list-style: none;
}

.encounter-route-list li {
  min-width: 0;
  background: var(--atlas-panel);
}

.encounter-route-list button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 64px;
  padding: 9px 11px;
  border: 0;
  background: transparent;
  color: #c6c6c6;
  text-align: left;
  cursor: pointer;
}

.encounter-route-list button:hover,
.encounter-route-list button:focus-visible,
.encounter-route-list li.is-current button {
  background: rgba(183, 183, 183, 0.08);
}

.route-stop-number {
  color: var(--atlas-gold);
  font-family: var(--atlas-serif);
  font-size: 1.1rem;
  text-align: center;
}

.route-stop-copy {
  min-width: 0;
}

.route-stop-copy strong,
.route-stop-copy small {
  display: block;
}

.route-stop-copy strong {
  overflow: hidden;
  color: #e0e0e0;
  font-size: 0.72rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-stop-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: #777777;
  font-size: 0.58rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-stop-state {
  color: #626262;
  font-size: 0.65rem;
  text-align: right;
}

.encounter-route-list li.is-complete .route-stop-number,
.encounter-route-list li.is-complete .route-stop-state {
  color: var(--atlas-green);
}

.atlas-boundary {
  margin: 0;
  padding: 14px 18px;
  border: 1px solid var(--atlas-line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #0b0b0b;
  color: #747474;
  font-size: 0.62rem;
  line-height: 1.5;
}

.atlas-position-marker {
  position: relative;
  width: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

.atlas-position-marker__pulse {
  position: absolute;
  left: -22px;
  bottom: -5px;
  width: 44px;
  height: 18px;
  border: 1px solid rgba(131, 131, 131, 0.78);
  border-radius: 50%;
  background: rgba(131, 131, 131, 0.2);
  box-shadow: 0 0 20px rgba(131, 131, 131, 0.44);
  animation: atlasPosition 2.4s ease-out infinite;
}

.atlas-position-marker__agnes {
  position: absolute;
  left: 0;
  bottom: 0;
  display: block;
  width: auto;
  height: clamp(94px, 8vw, 126px);
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.62));
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  transition: opacity 180ms ease;
}

.atlas-position-marker.is-simulated .atlas-position-marker__agnes {
  opacity: 0.88;
}

.atlas-position-marker.is-fallback {
  width: 16px;
  height: 16px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--atlas-blue);
  box-shadow: 0 0 0 9px rgba(169, 169, 169, 0.18);
}

.atlas-position-marker.is-fallback .atlas-position-marker__agnes {
  display: none;
}

.maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 3px !important;
  background: rgba(10, 10, 10, 0.88) !important;
  box-shadow: none !important;
}

.maplibregl-ctrl-group button {
  filter: invert(1);
}

.maplibregl-ctrl-attrib {
  background: rgba(10, 10, 10, 0.75) !important;
  color: #8b8b8b !important;
  font-size: 9px !important;
}

.maplibregl-ctrl-attrib a {
  color: #b9b9b9 !important;
}

@keyframes atlasPosition {
  0% { opacity: 0.85; transform: scale(0.72); }
  100% { opacity: 0; transform: scale(1.45); }
}

@keyframes stopImageIn {
  from { opacity: 0; transform: scale(1.015); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 1180px) {
  .atlas-console {
    grid-template-columns: minmax(0, 1fr) minmax(350px, 0.72fr);
  }

  .atlas-map-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .atlas-map-actions {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .atlas-hero {
    grid-template-columns: minmax(0, 1fr) 190px;
  }

  .atlas-hero__copy {
    padding-right: 18px;
  }

  .atlas-hero__agnes img {
    right: 8px;
    width: 155px;
  }

  .atlas-console {
    display: block;
  }

  .atlas-map-stage {
    border-right: 0;
    border-bottom: 1px solid var(--atlas-line);
  }

  .atlas-map-wrap {
    min-height: 600px;
  }

  .stop-image {
    aspect-ratio: 1.7 / 1;
  }
}

@media (max-width: 680px) {
  .atlas-app {
    width: min(100%, calc(100% - 14px));
    padding-top: 8px;
  }

  .atlas-hero {
    display: block;
    min-height: 390px;
  }

  .atlas-hero__copy {
    padding: 28px 22px 150px;
  }

  .atlas-hero h1 {
    font-size: clamp(2.15rem, 12vw, 3.5rem);
  }

  .atlas-hero__agnes {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 190px;
    min-height: 190px;
  }

  .atlas-hero__agnes img {
    right: 5px;
    bottom: -52px;
    width: 130px;
    height: 245px;
  }

  .atlas-hero__agnes figcaption {
    right: 12px;
    bottom: 10px;
    min-width: 132px;
  }

  .atlas-map-toolbar {
    padding: 12px;
  }

  .atlas-map-actions .atlas-control {
    flex: 1 1 calc(50% - 7px);
  }

  .atlas-map-wrap {
    min-height: 520px;
  }

  .atlas-map-legend {
    max-width: calc(100% - 70px);
  }

  .atlas-location-note {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
  }

  .atlas-progress {
    grid-template-columns: 1fr auto;
  }

  .atlas-progress__track {
    grid-column: 1 / -1;
  }

  .encounter-card {
    padding: 13px;
  }

  .stop-image {
    aspect-ratio: 1.15 / 1;
  }

  .voice-player > header,
  .live-script > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .live-script__status {
    align-items: flex-start;
    flex-direction: row;
  }

  .live-script__scroll {
    height: 330px;
  }

  .encounter-route-list {
    grid-template-columns: 1fr;
  }

  .route-index > summary {
    padding: 14px;
  }

  .atlas-position-marker__agnes {
    height: 92px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atlas-app *,
  .atlas-app *::before,
  .atlas-app *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Public shell; monochrome applies to remote map tiles and source photographs too. */
html { color-scheme: dark; background:#090909; }
body { margin:0; background:#090909; color:#f3f3f3; font-family:Arial,sans-serif; filter:grayscale(1); }
.public-atlas-nav { max-width:1472px; margin:auto; padding:18px 20px; display:flex; gap:16px; flex-wrap:wrap; align-items:center; }
.public-atlas-nav a { color:inherit; text-underline-offset:4px; }
.public-atlas-nav strong { margin-right:auto; }
.public-atlas-footer { max-width:1472px; margin:auto; padding:16px 20px 32px; line-height:1.6; }
.public-atlas-footer a { color:inherit; }
.public-atlas-skip { position:absolute; top:-100px; left:16px; padding:12px; background:#fff; color:#000; z-index:100; }
.public-atlas-skip:focus { top:10px; }
.atlas-control:focus-visible, a:focus-visible { outline:2px solid #fff; outline-offset:4px; }
