/* Map System Styles — Redesigned to match map-v5.html prototype */
/* Hand-drawn paper map with circle emoji markers, positioned popup, overlays */

/* fonts: css/fonts.css (shipped with the game) */

/* ============================================================
   CSS VARIABLES
   ============================================================ */
#mapSection {
  --paper: #c9b898;
  --ink: #1e1914;
  --ink-faded: #3a3128;
  --ink-light: #6a5e52;
  --ink-muted: #8e8070;
  --red-dark: #5e1818;
  --red-marker: #8a2a2a;
  --blue-pen: #1a2a50;
  --blue-pen-bg: rgba(26,46,90,0.08);
  --border: rgba(90,75,55,0.28);
  --border-strong: rgba(90,75,55,0.42);
  --header-bg: #4a3f35;
  --header-text: #d4c8b4;
  --card-header: #5a4f44;
  --green: #3a6a2a;
  --gold: #6a5a1a;
}

/* ============================================================
   FULLSCREEN MAP SECTION
   ============================================================ */
#mapSection {
  font-family: 'Courier Prime', 'Courier New', monospace;
  color: var(--ink);
  position: relative;
  overflow: hidden;
  height: var(--vh100, 100vh);
  /* QA P2-13 — the map wants the whole window, but it sits in a
     body with 2rem padding: at small windows the sheet started
     32px down and the document scrolled by exactly 4rem, dragging
     the bottom bar and the district plates off-screen. Full bleed:
     negative margins swallow the body padding on all sides. */
  width: calc(100% + 4rem);
  padding: 0 !important;
  margin: -2rem !important;
  border: none !important;
  background: none !important;
}

#mapSection .map-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

#mapSection .map-image {
  position: absolute;
  inset: 0;
  /* Map image from assets/images/map/ — falls back to CSS texture if image not found */
  background: url('../assets/images/map/map.png') center/cover no-repeat,
              #b5a88e;
}

/* Paper texture overlay */
#mapSection .map-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23a)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* ============================================================
   VINTAGE MAP MARKERS — Icon always visible, plate on hover
   Icon = printed on map. Hover = frame appears around it.
   ============================================================ */

/* --- Marker wrapper --- */
#mapSection .dm {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity 0.6s ease;
  /* EXPLICIT frame = the icon box. Everything else (stamp, plate,
     badge) is absolute and anchors to this. Without a fixed size,
     Windows Chrome grew the box ~18px under the icon (stray text
     box in the flex flow), sinking the stamp + spotlight below the
     glyph — the "icon sits high" bug that only lived on real
     machines. Fixed frame = identical anchoring on every engine. */
  width: 30px;
  height: 30px;
}

/* During delivery mode — fade out district markers, focus on order/pickup/destination */
#mapSection.delivery-mode .dm {
  opacity: 0;
  pointer-events: none;
}

#mapSection .dm:hover { z-index: 15; }
#mapSection .dm.selected { z-index: 16; }

/* --- Icon: ALWAYS visible, printed on map --- */
#mapSection .dm-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 3;
  opacity: 0.7;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.15));
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#mapSection .dm:hover .dm-icon,
#mapSection .dm.selected .dm-icon {
  opacity: 1;
}
/* Scale on HOVER only — .selected persists after every click, and a
   persistently grown icon reads as "the icon shifted". Selection
   keeps the full-opacity ink; the size stays honest. */
#mapSection .dm:hover .dm-icon {
  transform: scale(1.05);
}

/* Soft paper-lightening glow behind icon — like aged map highlight */
#mapSection .dm-icon::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(220,210,185,0.75) 0%,
    rgba(210,198,170,0.4) 40%,
    rgba(201,184,152,0) 70%
  );
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: -1;
}

/* On hover / selected — glow fades out, plate takes over */
#mapSection .dm:hover .dm-icon::before,
#mapSection .dm.selected .dm-icon::before {
  opacity: 0;
}

#mapSection .dm-icon svg {
  width: 100%;
  height: 100%;
  fill: #3a3228;
}

/* --- Plate: HIDDEN by default, appears on hover AROUND icon + name below --- */
#mapSection .dm-plate {
  position: absolute;
  /* Starts slightly above the icon, extends down past it */
  top: -6px;
  left: 50%;
  transform: translateX(-50%) scale(0.85);
  transform-origin: top center;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Top padding covers icon area (30px icon + 6px top + 6px gap) */
  padding: 38px 12px 8px;
  /* QA N-02 — the district names only ever showed during the story
     tour; every later visit the map was icons with no labels and
     the names lived behind a hover nobody was told about. Now the
     plate itself is always "there" but invisible — transparent
     card, visible name — and hover/selection inks the card in. */
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  opacity: 1;
  pointer-events: none;
  transition:
    background 0.25s ease, border-color 0.25s ease,
    opacity   0.25s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Callout arrow at bottom */
#mapSection .dm-plate::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: rgba(180,168,140,0.9);
  border-right: 1px solid rgba(90,75,55,0.45);
  border-bottom: 1px solid rgba(90,75,55,0.45);
}

/* callout arrow hidden until the card inks in */
#mapSection .dm-plate::after { opacity: 0; transition: opacity 0.25s ease; }
#mapSection .dm:hover .dm-plate::after,
#mapSection .dm.selected .dm-plate::after { opacity: 1; }

/* Plate visible on hover / selected */
#mapSection .dm:hover .dm-plate,
#mapSection .dm.selected .dm-plate {
  opacity: 1;
  background: rgba(180,168,140,0.9);
  border-color: rgba(90,75,55,0.45);
  transform: translateX(-50%) scale(1);
  pointer-events: auto;
  box-shadow: 0 3px 16px rgba(0,0,0,0.12), 0 0 20px rgba(160,140,100,0.06);
  transition:
    opacity   0.25s cubic-bezier(0.0, 0, 0.2, 1) 0.02s,
    transform 0.3s  cubic-bezier(0.34, 1.4, 0.64, 1) 0.02s,
    box-shadow 0.35s ease 0.05s;
}

/* --- Nameplate text inside plate (normal flow to size the plate) --- */
#mapSection .dm-nameplate {
  font-family: 'Special Elite', cursive;
  font-size: 10px;
  color: #3a3228;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
  margin-top: 2px;
  /* N-02: the name rests readable on the map; a paper halo keeps
     10px type legible over the street grid. Hover sharpens it. */
  opacity: 0.85;
  text-shadow:
    0 0 4px rgba(235,230,216,0.95), 0 0 8px rgba(235,230,216,0.8),
    0 1px 2px rgba(235,230,216,0.9);
  transition: opacity 0.2s ease;
}

#mapSection .dm:hover .dm-nameplate,
#mapSection .dm.selected .dm-nameplate {
  opacity: 1;
  transition: opacity 0.25s ease 0.1s;
}

/* ============================================================
   MARKER STATES
   ============================================================ */

/* N-04 — the padlock refuses: a short head-shake on a locked click.
   The keyframes carry the base centering transform so the marker
   doesn't jump off its anchor. */
#mapSection .dm.dm-locked-no { animation: dmLockedNo 0.4s ease; }
@keyframes dmLockedNo {
  0%, 100% { transform: translate(-50%, -50%); }
  25% { transform: translate(calc(-50% - 4px), -50%); }
  50% { transform: translate(calc(-50% + 4px), -50%); }
  75% { transform: translate(calc(-50% - 2px), -50%); }
}


/* --- Current location (.here) — icon slightly brighter --- */
#mapSection .dm.here .dm-icon {
  opacity: 0.85;
}

/* Pulse glow ring behind icon for current location */
#mapSection .dm-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px solid rgba(90,75,55,0.25);
  opacity: 0;
  animation: dm-here-pulse 3s ease-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes dm-here-pulse {
  0% { transform: translate(-50%,-50%) scale(0.8); opacity: 0.5; }
  70% { transform: translate(-50%,-50%) scale(1.5); opacity: 0; }
  100% { transform: translate(-50%,-50%) scale(1.5); opacity: 0; }
}

/* Here hover — plate has thicker warmer border */
#mapSection .dm.here:hover .dm-plate,
#mapSection .dm.here.selected .dm-plate {
  border-width: 1.5px;
  border-color: rgba(80,65,45,0.55);
}

/* --- Story-accent: a gold pulsing ring around a specific zone marker
   to draw the player's eye when a tour beat is waiting for them to
   click that location. Toggled via MapSystem.setZoneAccent. --- */
#mapSection .dm.story-accent .dm-plate {
  border-color: #c4a87a;
  border-width: 1.5px;
  /* Static base — the peak-glow layer lives on ::after as an
     opacity pulse so nothing on this element re-composites.
     NOTE: no `position: relative` here — the plate is already
     `absolute` (pinned under the stamp); relative dropped it into
     the flex flow, sinking the label ~28px below its place on
     every tour marker. The ::after inset works on absolute too. */
  box-shadow:
    0 0 0 2px rgba(196, 168, 122, 0.40),
    0 0 14px rgba(196, 168, 122, 0.25);
}
#mapSection .dm.story-accent .dm-plate::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    0 0 0 3px rgba(196, 168, 122, 0.75),
    0 0 26px rgba(196, 168, 122, 0.55);
  opacity: 0;
  animation: dm-accent-glow 1.6s ease-in-out infinite;
}
#mapSection .dm.story-accent::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 22px;
  transform: translate(-50%, -50%) scale(1);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid #c4a87a;
  opacity: 0.6;
  pointer-events: none;
  animation: dm-accent-ring 1.6s ease-out infinite;
  z-index: 0;
}
@keyframes dm-accent-glow {
  0%, 100% { opacity: 0; }
  50%      { opacity: 1; }
}
@keyframes dm-accent-ring {
  0%   { transform: translate(-50%, -50%) scale(0.7); opacity: 0.75; }
  100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

/* Crossed-out zone — used for places the witness rules out narratively.
   NOTE: not used in PART XV's perimeter tour (which uses revealZone +
   accentZone instead). Kept for other potential uses. */
#mapSection .dm.story-crossed .dm-plate {
  filter: grayscale(0.85) brightness(0.7);
  opacity: 0.55;
}
#mapSection .dm.story-crossed .dm-plate-label {
  text-decoration: line-through;
  text-decoration-color: rgba(180, 40, 40, 0.75);
  text-decoration-thickness: 1.5px;
}

/* Tease accent — RED pulsing ring on a zone that stays locked (???).
   Signals "that block, not yet" — distinct from the gold story-accent
   which means "click here next". */
#mapSection .dm.story-tease .dm-plate {
  border-color: rgba(196, 30, 30, 0.7);
  border-width: 1.5px;
  box-shadow:
    0 0 0 2px rgba(196, 30, 30, 0.35),
    0 0 12px rgba(196, 30, 30, 0.22);
  position: relative;
}
#mapSection .dm.story-tease .dm-plate::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    0 0 0 3px rgba(196, 30, 30, 0.7),
    0 0 24px rgba(196, 30, 30, 0.5);
  opacity: 0;
  animation: dm-tease-glow 1.8s ease-in-out infinite;
}
#mapSection .dm.story-tease::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 22px;
  transform: translate(-50%, -50%) scale(1);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(196, 30, 30, 0.7);
  opacity: 0.55;
  pointer-events: none;
  animation: dm-tease-ring 1.8s ease-out infinite;
  z-index: 0;
}
@keyframes dm-tease-glow {
  0%, 100% { opacity: 0; }
  50%      { opacity: 1; }
}
@keyframes dm-tease-ring {
  0%   { transform: translate(-50%, -50%) scale(0.7); opacity: 0.65; }
  100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

/* Zone reveal — fade + scale in when revealZone runs. Brief one-shot
   animation; CSS class is removed after it finishes. */
#mapSection .dm.story-reveal-in {
  animation: dm-reveal-in 0.95s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes dm-reveal-in {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.55); filter: blur(6px); }
  60%  { opacity: 1; filter: blur(1px); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); }
}

/* Sub-location pulse — gold ring on a single .sl row inside the zone
   popup. Used by pulseSubLocation to highlight a specific sub-loc the
   player should click next. */
#mapSection .sl.sl-story-accent,
.sl.sl-story-accent {
  position: relative;
  border: 1px solid #c4a87a;
  /* Static base shadow. Peak-glow pulses on ::before via opacity. */
  box-shadow:
    0 0 0 2px rgba(196, 168, 122, 0.30),
    0 0 10px rgba(196, 168, 122, 0.20);
}
.sl.sl-story-accent::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    0 0 0 3px rgba(196, 168, 122, 0.65),
    0 0 22px rgba(196, 168, 122, 0.5);
  opacity: 0;
  animation: sl-accent-glow 1.5s ease-in-out infinite;
}
.sl.sl-story-accent::after {
  content: '▸';
  position: absolute;
  /* Static right position — pulse the arrow via transform, NOT
     via animating the `right` property (which triggers layout). */
  right: -22px;
  top: 50%;
  transform: translate(0, -50%);
  font-family: 'Courier New', monospace;
  color: #c4a87a;
  font-size: 1.1rem;
  animation: sl-accent-arrow 1.2s ease-in-out infinite;
  pointer-events: none;
}
/* opacity-only glow surface on ::before */
@keyframes sl-accent-glow {
  0%, 100% { opacity: 0; }
  50%      { opacity: 1; }
}
/* transform + opacity only — the -6px slide is done via translateX,
   NOT via animating `right` (which triggered a layout on every frame). */
@keyframes sl-accent-arrow {
  0%, 100% { transform: translate(0, -50%);    opacity: 0.7; }
  50%      { transform: translate(-6px, -50%); opacity: 1;   }
}

/* --- Quest: "!" always visible next to icon --- */
#mapSection .dm-bang {
  position: absolute;
  top: -2px;
  right: -6px;
  font-family: 'Caveat', cursive;
  font-size: 14px;
  font-weight: 700;
  color: #6a5a1a;
  line-height: 1;
  z-index: 4;
  animation: dm-bang-bob 2.5s ease-in-out infinite;
}

@keyframes dm-bang-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* --- Locked: faded, no interaction --- */
#mapSection .dm.locked {
  cursor: default;
  pointer-events: none;
}

#mapSection .dm.locked .dm-icon {
  opacity: 0.25;
}

#mapSection .dm.locked .dm-icon svg {
  fill: #8a7e6e;
}

/* --- Sub-location count badge --- */
#mapSection .dm-count {
  position: absolute;
  bottom: -4px;
  right: -8px;
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  background: rgba(90,79,68,0.8);
  color: #d4c8b4;
  font-family: 'Courier Prime', monospace;
  font-size: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 1px solid rgba(90,75,55,0.2);
  z-index: 4;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

#mapSection .dm:hover .dm-count,
#mapSection .dm.selected .dm-count {
  opacity: 1;
}

/* --- Mobile: plates always visible --- */
@media (max-width: 768px) {
  #mapSection .dm-plate {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    pointer-events: auto;
  }
  #mapSection .dm-nameplate {
    opacity: 1;
  }
  #mapSection .dm-count {
    opacity: 1;
  }
}

/* ============================================================
   POSITIONED POPUP (near marker)
   ============================================================ */
#mapSection .map-popup {
  display: none;
  position: absolute;
  z-index: 50;
  width: 310px;
  background: rgba(201,184,152,0.97);
  border: 2px solid var(--border-strong);
  box-shadow: 2px 4px 20px rgba(0,0,0,0.22);
}

#mapSection .map-popup.open {
  display: block;
  animation: map-pop-in .15s ease;
}

@keyframes map-pop-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* Popup header */
#mapSection .pp-head {
  background: var(--card-header);
  color: var(--header-text);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#mapSection .pp-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#mapSection .pp-icon svg {
  width: 100%;
  height: 100%;
  fill: var(--header-text);
}
#mapSection .pp-info { flex: 1; }
#mapSection .pp-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
#mapSection .pp-sub { font-size: 10px; opacity: 0.6; }
#mapSection .pp-here { font-size: 9px; opacity: 0.5; margin-top: 1px; }

#mapSection .pp-x {
  background: none;
  border: none;
  color: var(--header-text);
  font-size: 16px;
  cursor: pointer;
  opacity: 0.5;
  line-height: 1;
}
#mapSection .pp-x:hover { opacity: 1; }

/* Popup body */
#mapSection .pp-body {
  padding: 10px 14px;
  max-height: 340px;
  overflow-y: auto;
}
#mapSection .pp-body::-webkit-scrollbar { width: 3px; }
#mapSection .pp-body::-webkit-scrollbar-thumb { background: var(--ink-muted); border-radius: 2px; }

#mapSection .pp-desc {
  font-size: 11px;
  color: var(--ink-faded);
  line-height: 1.5;
  margin-bottom: 10px;
}

#mapSection .pp-section {
  font-family: 'Special Elite', cursive;
  font-size: 9px;
  color: var(--red-dark);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
  border-bottom: 1px dashed rgba(94,24,24,0.15);
  padding-bottom: 3px;
}

/* Sub-location rows */
#mapSection .sl {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 3px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.12s;
  background: rgba(255,255,255,0.04);
}
#mapSection .sl:hover {
  background: rgba(0,0,0,0.03);
  border-color: var(--border-strong);
}
#mapSection .sl.sl-locked {
  opacity: 0.3;
  cursor: default;
}

#mapSection .sl-icon { font-size: 16px; flex-shrink: 0; }
#mapSection .sl-info { flex: 1; min-width: 0; }
#mapSection .sl-name { font-size: 11px; font-weight: 700; }
#mapSection .sl-detail { font-size: 9px; color: var(--ink-light); }
#mapSection .sl-hours { font-size: 9px; color: var(--ink-muted); }

#mapSection .sl-btn {
  font-family: 'Courier Prime', monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 8px;
  background: var(--card-header);
  color: var(--header-text);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
#mapSection .sl-btn:hover { background: var(--ink-faded); }

#mapSection .sl-lock-text {
  font-family: 'Special Elite', cursive;
  font-size: 8px;
  color: var(--ink-muted);
  letter-spacing: 1px;
  flex-shrink: 0;
}

/* Handwritten note */
#mapSection .pp-note {
  font-family: 'Caveat', cursive;
  font-size: 13px;
  color: var(--blue-pen);
  padding: 8px 10px;
  background: var(--blue-pen-bg);
  border-left: 2px solid rgba(26,42,80,0.22);
  line-height: 1.4;
  margin-top: 10px;
}

/* Popup footer */
#mapSection .pp-foot {
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#mapSection .pp-travel { font-size: 10px; color: var(--ink-light); }

#mapSection .pp-btn {
  font-family: 'Courier Prime', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 7px 16px;
  background: var(--card-header);
  color: var(--header-text);
  border: none;
  cursor: pointer;
}
#mapSection .pp-btn:hover { background: var(--ink-faded); }
#mapSection .pp-btn:disabled { opacity: 0.35; cursor: default; }

/* ============================================================
   OVERLAYS — City label, Compass, Bottom bar
   ============================================================ */

/* City label (top-left) */
#mapSection .ol-city {
  position: absolute;
  /* QA P3-02 — the card began at y16 under the 80px top panel and
     "Est. 1923" lost its top. Below the bar now. */
  top: 88px;
  left: 16px;
  z-index: 8;
  padding: 8px 14px;
  background: rgba(201,184,152,0.9);
  border: 1px solid var(--border-strong);
}
#mapSection .ol-city-name {
  font-family: 'Special Elite', cursive;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 700;
}
#mapSection .ol-city-sub {
  font-family: 'Caveat', cursive;
  font-size: 10px;
  color: var(--ink-light);
}

/* Compass (top-right) */
#mapSection .ol-compass {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 8;
  width: 44px;
  height: 44px;
  opacity: 0.5;
}
#mapSection .ol-compass-ring {
  width: 100%;
  height: 100%;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
  background: rgba(201,184,152,0.8);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
#mapSection .ol-n { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); font-family: 'Special Elite', cursive; font-size: 8px; color: var(--red-dark); font-weight: 700; }
#mapSection .ol-s { position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); font-family: 'Special Elite', cursive; font-size: 6px; color: var(--ink-muted); }
#mapSection .ol-e { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); font-family: 'Special Elite', cursive; font-size: 6px; color: var(--ink-muted); }
#mapSection .ol-w { position: absolute; left: 5px; top: 50%; transform: translateY(-50%); font-family: 'Special Elite', cursive; font-size: 6px; color: var(--ink-muted); }
#mapSection .ol-needle { width: 1.5px; height: 14px; background: linear-gradient(var(--red-dark) 50%, var(--ink-muted) 50%); }

/* Bottom bar */
#mapSection .ol-bar {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 20px;
  background: rgba(201,184,152,0.92);
  border: 1px solid var(--border);
  font-size: 10px;
  white-space: nowrap;
}
#mapSection .ol-bar-loc {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}
#mapSection .ol-bar-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red-marker);
}
#mapSection .ol-bar-time { color: var(--ink-faded); }

/* Faint district labels on map background */
#mapSection .map-lbl {
  position: absolute;
  font-family: 'Caveat', cursive;
  font-size: 11px;
  color: rgba(90,75,55,0.18);
  letter-spacing: 3px;
  pointer-events: none;
  z-index: 2;
}

/* ============================================================
   TRAVEL ANIMATION OVERLAY (preserved from original)
   ============================================================ */
.travel-animation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(58, 50, 56, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.travel-animation-overlay.active {
  opacity: 1;
}

.travel-animation-container {
  text-align: center;
  width: 90%;
  max-width: 500px;
  transition: transform 0.3s ease;
}

.travel-animation-container.interrupted {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 50%, 90% { transform: translateX(-5px); }
  30%, 70% { transform: translateX(5px); }
}

.travel-title {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: #8E7F7F;
  letter-spacing: 3px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.travel-route {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.travel-location {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: #EBE6D8;
  font-weight: bold;
  letter-spacing: 1px;
}

.travel-arrow {
  font-size: 1.2rem;
  color: #8E7F7F;
}

.travel-route-visual {
  position: relative;
  height: 60px;
  margin: 1rem auto;
  max-width: 400px;
}

.travel-waypoint {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.travel-waypoint.origin {
  left: 0;
  background: #6b8e3d;
  border: 2px solid #5a7a33;
}

.travel-waypoint.destination {
  right: 0;
  background: #8B4513;
  border: 2px solid #654321;
}

.travel-path {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}

.travel-path svg {
  width: 100%;
  height: 100%;
}

.travel-agent {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #8B0000;
  color: #EBE6D8;
  font-family: 'Courier New', monospace;
  font-size: 0.55rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.travel-agent.stopped {
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.travel-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

.travel-stat {
  text-align: center;
}

.travel-stat-label {
  font-family: 'Courier New', monospace;
  font-size: 0.65rem;
  color: #8E7F7F;
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
}

.travel-stat-value {
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  color: #EBE6D8;
  font-weight: bold;
}

.travel-stat-value.negative {
  color: #cc6666;
}

.travel-status {
  margin-top: 1.5rem;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: #5F5449;
  font-style: italic;
}

.travel-status.warning {
  color: #ff4444;
  font-weight: bold;
  font-style: normal;
  animation: blink 0.5s ease infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ============================================================
   TRAVEL EVENT OVERLAY (preserved from original)
   ============================================================ */
.travel-event-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(58, 50, 56, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.travel-event-overlay.active {
  opacity: 1;
}

.travel-event-container {
  text-align: center;
  width: 90%;
  max-width: 500px;
  background: #EBE6D8;
  border: 3px solid #8B4513;
  padding: 2rem;
}

.event-warning {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.event-title {
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  color: #8B0000;
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.event-description {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: #5F5449;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.event-consequences {
  background: rgba(139, 69, 19, 0.1);
  border: 1px solid #8B4513;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.event-consequences-title {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  color: #8B4513;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.event-consequence-item {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
}

.event-consequence-label {
  color: #5F5449;
}

.event-consequence-value {
  color: #8B0000;
  font-weight: bold;
}

.event-consequence-value.positive {
  color: #6b8e3d;
}

.event-continue-button {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 1px;
  padding: 0.8rem 2rem;
  background: #5a7a8e;
  color: #EBE6D8;
  border: 2px solid #4a6a7e;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s;
}

.event-continue-button:hover {
  background: #4a6a7e;
}

/* ============================================================
   FBI MODAL — Used by Time Skip Menu (preserved)
   ============================================================ */
.fbi-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.fbi-modal-content {
  background: #F5EFE0;
  border: 3px solid #8B4513;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.vintage-button {
  background: rgba(212, 200, 190, 0.5);
  border: 2px solid #8B4513;
  color: #3A3238;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.vintage-button:hover {
  background: rgba(212, 200, 190, 0.8);
  border-color: #654321;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.vintage-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   TIME SKIP — Slider Custom Styling (preserved)
   ============================================================ */
input[type="range"]#timeSkipSlider {
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]#timeSkipSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #8B4513;
  border: 2px solid #654321;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

input[type="range"]#timeSkipSlider::-webkit-slider-thumb:hover {
  background: #654321;
  transform: scale(1.2);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

input[type="range"]#timeSkipSlider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #8B4513;
  border: 2px solid #654321;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

input[type="range"]#timeSkipSlider::-moz-range-thumb:hover {
  background: #654321;
  transform: scale(1.2);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

input[type="range"]#timeSkipSlider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
}

input[type="range"]#timeSkipSlider::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background: #D4C8BE;
}

/* ============================================================
   LOCATION INFO OVERLAY & POPUP (preserved from original)
   ============================================================ */
.location-info-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(58, 50, 56, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10002;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.location-info-overlay.active {
  opacity: 1;
}

.location-info-popup {
  background: #EBE6D8;
  border: 3px solid #8B4513;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.location-info-popup.active {
  opacity: 1;
  transform: translateY(0);
}

.location-info-header {
  background: #D4C8BE;
  padding: 1rem;
  border-bottom: 2px solid #8B4513;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.location-info-classified {
  position: absolute;
  top: 0.3rem;
  right: 3rem;
  background: darkred;
  color: #EBE6D8;
  padding: 2px 8px;
  font-size: 0.6rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.location-info-title {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: bold;
  color: #3A3238;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.location-info-close {
  background: none;
  border: none;
  color: #8E7F7F;
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.2s;
}

.location-info-close:hover {
  color: #3A3238;
}

.location-info-content {
  padding: 1.5rem;
}

.location-info-zone {
  margin-bottom: 1rem;
  font-family: 'Courier New', monospace;
}

.location-info-image img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border: 2px solid #8B4513;
  margin-bottom: 1rem;
}

.location-info-image-placeholder {
  width: 100%;
  height: 120px;
  background: #D4C8BE;
  border: 2px dashed #8E7F7F;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.placeholder-text {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: #8E7F7F;
  letter-spacing: 1px;
}

.placeholder-stamp {
  font-family: 'Courier New', monospace;
  font-size: 0.6rem;
  color: #8B4513;
  margin-top: 0.5rem;
  font-weight: bold;
  letter-spacing: 2px;
}

.info-section-header {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  color: #8B4513;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #8E7F7F;
  padding-bottom: 0.3rem;
}

.info-description-text {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: #5F5449;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.location-info-section {
  margin-top: 1rem;
}

.sublocation-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sublocation-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f5f5dc;
  border: 1px solid #8E7F7F;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: #3A3238;
  transition: all 0.2s;
}

.sublocation-button:hover:not(:disabled) {
  background: #D4C8BE;
  border-color: #8B4513;
}

.sublocation-button.closed {
  opacity: 0.5;
  cursor: default;
}

.subloc-number {
  color: #8E7F7F;
  font-weight: bold;
}

.subloc-name {
  flex: 1;
  font-weight: bold;
}

.subloc-status {
  font-size: 0.65rem;
  letter-spacing: 1px;
}

.subloc-status.open { color: #6b8e3d; }
.subloc-status.closed { color: #8B0000; }

.subloc-arrow {
  color: #8E7F7F;
}

.people-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.person-card {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(212, 200, 190, 0.3);
  padding: 0.3rem 0.5rem;
  border: 1px solid #8E7F7F;
  cursor: pointer;
  transition: all 0.2s;
}

.person-card:hover {
  background: rgba(212, 200, 190, 0.6);
}

.person-photo {
  width: 20px;
  height: 20px;
  background: #5F5449;
  color: #D4C8BE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
}

.person-name {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  color: #3A3238;
}

.location-info-footer {
  padding: 1rem;
  border-top: 2px solid #8B4513;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.location-enter-button {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  font-weight: bold;
  padding: 0.7rem 2rem;
  background: #6b8e3d;
  color: #f5f5dc;
  border: 2px solid #5a7a33;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s;
}

.location-enter-button:hover {
  background: #5a7a33;
}

.location-cancel-button {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  font-weight: bold;
  padding: 0.7rem 2rem;
  background: #8E7F7F;
  color: #f5f5dc;
  border: 2px solid #5F5449;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s;
}

.location-cancel-button:hover {
  background: #5F5449;
}

/* ============================================================
   MAP PEOPLE TOOLTIP (preserved from original)
   ============================================================ */
.map-people-tooltip {
  position: fixed;
  z-index: 10003;
  background: #EBE6D8;
  border: 2px solid #8B4513;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  padding: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
  max-width: 250px;
}

.map-people-tooltip.active {
  opacity: 1;
}

.tooltip-header {
  background: #D4C8BE;
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid #8B4513;
}

.tooltip-classification {
  font-family: 'Courier New', monospace;
  font-size: 0.5rem;
  color: #8B0000;
  letter-spacing: 1px;
  font-weight: bold;
}

.tooltip-title {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  color: #3A3238;
  font-weight: bold;
  letter-spacing: 1px;
}

.tooltip-people-grid {
  padding: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tooltip-person-card {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(212, 200, 190, 0.3);
  padding: 0.2rem 0.4rem;
  border: 1px solid #8E7F7F;
  cursor: pointer;
  transition: all 0.2s;
}

.tooltip-person-card:hover {
  background: rgba(212, 200, 190, 0.6);
}

.tooltip-person-photo {
  width: 16px;
  height: 16px;
  background: #5F5449;
  color: #D4C8BE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.4rem;
}

.tooltip-person-name {
  font-family: 'Courier New', monospace;
  font-size: 0.6rem;
  color: #3A3238;
}

/* ============================================================
   TIME SKIP — Animation (Digit Roll / Slot Machine) (preserved)
   ============================================================ */
.time-slot {
  position: relative;
  width: 80px;
  height: 120px;
  background: #EBE6D8;
  border: 2px solid #8B4513;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), inset 0 -1px 0 rgba(255, 255, 255, 0.3);
}

@keyframes digitRoll1 { 0% { transform: translateY(0); } 100% { transform: translateY(-120px); } }
@keyframes digitRoll2 { 0% { transform: translateY(0); } 100% { transform: translateY(-240px); } }
@keyframes digitRoll3 { 0% { transform: translateY(0); } 100% { transform: translateY(-360px); } }
@keyframes digitRoll4 { 0% { transform: translateY(0); } 100% { transform: translateY(-480px); } }
@keyframes digitRoll5 { 0% { transform: translateY(0); } 100% { transform: translateY(-600px); } }
@keyframes digitRoll6 { 0% { transform: translateY(0); } 100% { transform: translateY(-720px); } }
@keyframes digitRoll7 { 0% { transform: translateY(0); } 100% { transform: translateY(-840px); } }
@keyframes digitRoll8 { 0% { transform: translateY(0); } 100% { transform: translateY(-960px); } }
@keyframes digitRoll9 { 0% { transform: translateY(0); } 100% { transform: translateY(-1080px); } }

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ============================================================
   4-STATE MARKER SYSTEM (ink stamps on the 1923 paper)
   States: locked ghost → default stamp → hover → .is-highlighted.
   Overrides the legacy bare-glyph look; appended last so it wins
   equal-specificity fights. Animations: transform/opacity ONLY.
   ============================================================ */

/* ── STATE 2: default — permanent ink-stamp plate ── */
#mapSection .dm-stamp {
  position: absolute;
  top: 50%; left: 50%;
  width: 42px; height: 42px;
  margin: -21px 0 0 -21px;
  background: #241c12;
  opacity: 0.94;                     /* paper faintly bleeds through */
  border: 1.5px solid #d9c9a3;
  /* irregular contour — ink soaked into paper, not a sticker */
  border-radius: 48% 52% 51% 49% / 52% 48% 51% 49%;
  transform: rotate(var(--stamp-rot, 0deg));
  transition: transform 0.15s ease, border-color 0.15s ease;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45)); /* static */
  pointer-events: none;
  z-index: 2;
}
/* Glyph sits ON the ink now — cream, full strength. */
#mapSection .dm:not(.locked) .dm-icon { opacity: 1; }
#mapSection .dm:not(.locked) .dm-icon svg { fill: #e4d5b0; }
/* The old paper-lightening halo fights the stamp — off. */
#mapSection .dm:not(.locked) .dm-icon::before { opacity: 0; }

/* Badge — typewriter tag, top-right, overlapping the stamp. */
#mapSection .dm:not(.locked) .dm-count {
  bottom: auto;
  top: -10px; right: -12px;
  min-width: 15px; height: auto;
  padding: 1px 4px;
  border-radius: 1px;
  border: none;
  background: #d9c9a3;
  color: #241c12;
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: 700;
  transform: rotate(4deg);
  opacity: 1;
  z-index: 4;
}

/* ── STATE 1: locked ghost (was the default look) ──
   Same stamp geometry, un-inked: barely-there fill, DASHED faded
   border — the seal is there, the ink isn't. Same deterministic
   rotation as its future unlocked self. */
#mapSection .dm.locked .dm-icon { opacity: 0.55; }
#mapSection .dm.locked .dm-stamp {
  background: rgba(36, 28, 18, 0.16);
  border: 1.5px dashed rgba(217, 201, 163, 0.38);
  opacity: 0.6;
  filter: none;
}

/* ── STATE 3: hover — grows on hover ONLY. The tutorial highlight
   deliberately does NOT scale: the spotlight retargeting between
   zones made every icon visibly jump/shift as it grew. The red
   border + spotlight carry the emphasis; the icon stays put. */
#mapSection .dm:hover .dm-stamp {
  transform: rotate(var(--stamp-rot, 0deg)) scale(1.1);
}
#mapSection .dm.is-highlighted .dm-stamp {
  transform: rotate(var(--stamp-rot, 0deg));
}
/* Hover card → small typewriter tag UNDER the stamp. */
#mapSection .dm-plate {
  top: 26px;
  padding: 3px 8px;
  background: #241c12;
  border: 1px solid #d9c9a3;
  border-radius: 1px;
  transform: translateX(-50%) rotate(-1.5deg) scale(0.85);
}
#mapSection .dm-plate::after { content: none; } /* no callout arrow */
#mapSection .dm:hover .dm-plate,
#mapSection .dm.selected .dm-plate,
#mapSection .dm.is-highlighted .dm-plate {
  opacity: 1;
  transform: translateX(-50%) rotate(-1.5deg) scale(1);
  pointer-events: auto;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
#mapSection .dm-nameplate {
  font-family: 'Courier New', Courier, monospace;
  font-size: 10px;
  color: #d9c9a3;
  letter-spacing: 2px;
  margin-top: 0;
}
#mapSection .dm:hover .dm-nameplate,
#mapSection .dm.selected .dm-nameplate,
#mapSection .dm.is-highlighted .dm-nameplate { opacity: 1; }

/* ── STATE 4: active / tutorial / quest target ── */
#mapSection .dm.is-highlighted .dm-stamp {
  border: 2px solid #a33526;          /* dried blood */
}
#mapSection .dm.is-highlighted .dm-count {
  background: #a33526;
  color: #d9c9a3;
}
/* Pulsing ring — transform + opacity only. */
#mapSection .dm.is-highlighted::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 2px solid #a33526;
  border-radius: 50%;
  pointer-events: none;
  animation: dm-hl-ring 2s ease-out infinite;
  z-index: 1;
}
@keyframes dm-hl-ring {
  0%   { transform: scale(0.7);  opacity: 0.9; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* Tutorial spotlight — STATIC shadow, opacity-only transitions.
   Repositioning happens while faded out (see _spotlightTo). */
#mapSpotlight {
  position: absolute;   /* inside .map-wrap — scrolls WITH the map */
  width: 96px; height: 96px;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(10, 8, 4, 0.55);
  pointer-events: none;
  z-index: 9;
  opacity: 0;
  transition: opacity 0.35s ease;
}
#mapSpotlight.on { opacity: 1; }

/* The highlighted marker (stamp, icon, label) rides ABOVE the
   spotlight's darkness — the caption stays readable instead of
   drowning in the shadow below the circle. */
#mapSection .dm.is-highlighted { z-index: 10; }

/* ── TOUR VISUAL HYGIENE ──────────────────────────────────────
   When a marker is under the tutorial SPOTLIGHT (.is-highlighted,
   dark map + lit circle), the gold accent ring/glow would stack on
   top and spill outside the light — one language at a time: the
   spotlight + red stamp speak, the accent stays quiet. */
#mapSection .dm.is-highlighted.story-accent::before,
#mapSection .dm.is-highlighted.story-accent .dm-plate::after {
  display: none;
}

/* Travel under story lock — the ⧗ hold, same as every "not yet". */
#mapSection .pp-btn.pp-held,
.pp-btn.pp-held {
  pointer-events: none;
  background: transparent !important;
  color: #d4af37 !important;
  border-color: rgba(212, 175, 55, 0.7) !important;
  animation: ppHeldPulse 2.4s ease-in-out infinite;
}
@keyframes ppHeldPulse {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .pp-btn.pp-held { animation: none; }
}

/* The TRAVEL lesson — the button calls for the click, same gold
   language as the Ch14 power button. One-shot; dies with the popup. */
.pp-btn.pp-call {
  color: #d4af37 !important;
  border-color: rgba(212, 175, 55, 0.8) !important;
  animation: ppCallPulse 1.6s ease-in-out infinite;
}
@keyframes ppCallPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
  50%      { box-shadow: 0 0 12px 3px rgba(212, 175, 55, 0.55); }
}
@media (prefers-reduced-motion: reduce) {
  .pp-btn.pp-call { animation: none; }
}

/* ── VIEW-ONLY map (opened mid-paper): the way back ── */
#mapReturnToStory {
  position: absolute;
  bottom: 86px; left: 50%;   /* above the bottom status bar — the
                                top slot hid under the HUD strip */
  transform: translateX(-50%);
  z-index: 60;
  background: #3A3238;
  color: #EBE6D8;
  border: 1.5px solid #8E7F7F;
  border-radius: 2px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem; font-weight: bold;
  letter-spacing: 2px;
  padding: 0.55rem 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
#mapReturnToStory:hover { background: #5F5449; }


/* ── The travel chip rides ON the curve ───────────────────────
      showTravelAnimation's dynamic keyframes put left/top at the
      exact point of the SVG path; this centers the chip on that
      point (the base rule only lifted it vertically). Also carries
      the witness portrait when one is on file. ── */
.travel-agent.on-path {
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  background-size: cover;
  background-position: center top;
  border: 2px solid #c4a87a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  filter: saturate(0.8) contrast(1.05);
}


/* ── One coordinate space for the curve and the chip ──────────
      fbi-document-style's legacy .travel-path (top:50% +
      translateY(-50%) + fixed height) slid the SVG ~30px above
      the container the keyframe math samples — the chip rode
      exactly that far under the dashed line. Scoped to the map's
      overlay; the delivery overlays keep their own geometry. ── */
#travelAnimationOverlay .travel-path {
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  height: auto;
  transform: none;
}

/* ── WHERE HE IS ──────────────────────────────────────────
   The bottom bar says it in words. This says it on the map:
   a red tag pinned over the marker he is standing on, the
   only thing here that reads at a glance. */
#mapSection .dm-here {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  white-space: nowrap;
  color: #8B0000;
  background: rgba(235, 230, 216, 0.94);
  border: 1.5px solid rgba(139, 0, 0, 0.85);
  padding: 2px 6px;
  z-index: 4;
  pointer-events: none;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.3);
  animation: dm-here-tag 2.6s ease-in-out infinite;
}
@keyframes dm-here-tag {
  0%, 100% { opacity: 0.84; }
  50%      { opacity: 1; }
}
#mapSection .dm.here .dm-pulse {
  border-color: rgba(139, 0, 0, 0.42);
  border-width: 2px;
}

/* ── A ROW WITH NO DOOR SAYS WHY ──────────────────────────
   Enter belongs to the district he is standing in. Silence
   around that read as a broken button; the reason stands
   where the button would. */
#mapSection .sl.sl-locked { opacity: 0.62; cursor: default; }
#mapSection .sl-far {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 8px;
  color: var(--ink-faded, #8E7F7F);
  border: 1px dashed var(--ink-faded, #8E7F7F);
  flex-shrink: 0;
  white-space: nowrap;
}
#mapSection .location-enter-button.location-enter-far,
.location-enter-button.location-enter-far {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.6);
}
/* A door that is not dressed yet — the card still opens. */
#mapSection .sl-far.sl-shut {
  border-style: solid;
  opacity: 0.75;
}
/* Said once, in the header, not nine times down the list. */
#mapSection .pp-section-note {
  float: right;
  font-size: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-faded, #8E7F7F);
  opacity: 0.85;
}
