:root {
  --bg: #07070a;
  --bg-2: #101018;
  --ink: #f4efe2;
  --muted: #9a917c;
  --gold: #f0c14b;
  --gold-2: #d4a017;
  --gold-3: #8a6d1f;
  --gold-soft: rgba(240, 193, 75, 0.18);
  --line: #e6c35c;
  --card: #16161e;
  --card-border: #3a3424;
  --danger: #c45c5c;
  --cyan: #7ec8c8;
  --px-year: 16;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  overflow: hidden;
}

h1, h2, h3, .display {
  font-family: Cinzel, "Palatino Linotype", serif;
  font-weight: 500;
  letter-spacing: 0.04em;
}

#intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(240,193,75,0.08), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(80,60,20,0.25), transparent 45%),
    var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6vh 8vw;
  transition: opacity 0.7s ease, visibility 0.7s;
}
#intro.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#intro .kicker {
  color: var(--gold);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 1.2rem;
}
#intro h1 {
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.95;
  font-weight: 400;
  max-width: 18ch;
}
#intro h1 em {
  font-style: normal;
  color: var(--gold);
}
#intro p.lead {
  margin-top: 1.6rem;
  max-width: 46ch;
  color: #d7d0be;
  font-size: 1.08rem;
  line-height: 1.55;
}
#intro .hint {
  margin-top: 2.4rem;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.95rem;
}
#intro .hint .bar {
  width: 140px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
#intro .sources {
  position: absolute;
  bottom: 28px;
  left: 8vw;
  color: var(--muted);
  font-size: 0.78rem;
  max-width: 70ch;
}

#hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 12px 18px;
  background: linear-gradient(180deg, rgba(7,7,10,0.92), rgba(7,7,10,0.4) 70%, transparent);
  pointer-events: none;
}
#hud > * { pointer-events: auto; }
#hud .brand {
  font-family: Cinzel, serif;
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
#year-readout {
  font-variant-numeric: tabular-nums;
  font-size: 1.35rem;
  color: var(--ink);
  min-width: 7.5rem;
}
#year-readout span {
  color: var(--gold);
  font-family: Cinzel, serif;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: auto;
}
.filters button, .jumps button, #begin-btn, .zoom-controls button, #a11y-toggle {
  background: transparent;
  border: 1px solid var(--gold-3);
  color: var(--gold);
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 0.32rem 0.65rem;
  cursor: pointer;
  border-radius: 99px;
  transition: all 0.2s ease;
}
.filters button.on, #a11y-toggle[aria-expanded="true"] {
  background: var(--gold);
  color: #1a1406;
  border-color: var(--gold);
}
.zoom-controls button:hover, #a11y-toggle:hover {
  background: var(--gold-3);
  border-color: var(--gold);
}
.zoom-controls button:active, #a11y-toggle:active {
  transform: scale(0.95);
}
.zoom-controls button:focus, #a11y-toggle:focus, .filters button:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.zoom-level {
  font-variant-numeric: tabular-nums;
  min-width: 3rem;
  text-align: center;
  padding: 0.32rem 0.4rem;
  font-size: 0.78rem;
}
.zoom-controls {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.jumps {
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  max-width: 70vw;
}
.jumps button { background: rgba(7,7,10,0.75); }

/* Accessibility Panel */
.a11y-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  background: var(--card);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 1.5rem;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.a11y-panel[hidden] {
  display: none;
}
.a11y-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--gold-3);
  padding-bottom: 0.8rem;
}
.a11y-header h2 {
  font-size: 1.1rem;
  color: var(--gold);
  margin: 0;
}
#a11y-close {
  background: transparent;
  border: none;
  color: var(--gold);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  min-width: auto;
  min-height: auto;
}
#a11y-close:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.a11y-content {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.a11y-option {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.a11y-option label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--ink);
}
.a11y-option input[type="checkbox"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
}
.a11y-option select {
  padding: 0.5rem;
  background: var(--bg-2);
  border: 1px solid var(--gold-3);
  color: var(--ink);
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
}
.a11y-option select:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.a11y-description {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  margin-left: 1.8rem;
}
.a11y-shortcuts {
  border-top: 1px solid var(--gold-3);
  padding-top: 1rem;
}
.a11y-shortcuts h3 {
  font-size: 0.95rem;
  color: var(--gold);
  margin-bottom: 0.8rem;
  margin-top: 0;
}
.a11y-shortcuts ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.a11y-shortcuts li {
  font-size: 0.85rem;
  color: var(--ink);
}
kbd {
  background: var(--bg);
  border: 1px solid var(--gold-3);
  border-radius: 3px;
  padding: 0.2rem 0.4rem;
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--gold);
}

/* High Contrast Mode */
html.high-contrast {
  --bg: #000;
  --bg-2: #1a1a1a;
  --ink: #fff;
  --muted: #ccc;
  --gold: #ffff00;
  --gold-2: #ffff99;
  --gold-3: #999900;
  --gold-soft: rgba(255, 255, 0, 0.3);
  --line: #ffff99;
  --card: #1a1a1a;
  --card-border: #666;
}

/* Text Size Adjustments */
html.text-small .tick-label { font-size: 0.7rem; }
html.text-large .tick-label { font-size: 1.1rem; }
html.text-xlarge .tick-label { font-size: 1.3rem; }

html.text-small .cap-text { font-size: 0.75rem; }
html.text-large .cap-text { font-size: 1rem; }
html.text-xlarge .cap-text { font-size: 1.15rem; }

/* Focus indicators for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Screen reader text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

#begin-btn {
  margin-top: 1.6rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  align-self: flex-start;
  width: auto;
}

#scroller {
  height: 100vh;
  width: 100vw;
  overflow-x: auto;
  overflow-y: auto;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(240,193,75,0.05), transparent 40%),
    var(--bg);
}
#scroller::-webkit-scrollbar { height: 10px; width: 10px; }
#scroller::-webkit-scrollbar-thumb { background: var(--gold-3); border-radius: 99px; }
#scroller::-webkit-scrollbar-track { background: #0c0c10; }

#world {
  position: relative;
  min-height: 640px;
}

#ticks { position: absolute; inset: 0; pointer-events: none; }
.tick {
  position: absolute;
  bottom: 52px;
  width: 1px;
  background: rgba(240,193,75,0.22);
  transform: translateY(-100%);
}
.tick.y50 { height: 10px; }
.tick.y100 { height: 18px; background: rgba(240,193,75,0.45); }
.tick.y500 { height: 28px; background: var(--gold); width: 2px; }
.tick-label {
  position: absolute;
  bottom: 18px;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-family: Cinzel, serif;
  white-space: nowrap;
}
.tick-label.big { font-size: 0.95rem; color: #f6d889; }

#tracks { position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
.track-line {
  position: absolute;
  height: 3px;
  border-radius: 99px;
  transform: translateY(-50%);
}
.track-line.israel {
  background: linear-gradient(90deg, #6a5428, #c4a06a 30%, #e6c989);
  box-shadow: 0 0 10px rgba(196,160,106,0.25);
}
.track-line.other { opacity: 0.95; }
.track-line.main {
  height: 4px;
  background: linear-gradient(90deg, #7a5a12, var(--gold) 8%, #ffe08a 50%, var(--gold));
  box-shadow: 0 0 18px rgba(240,193,75,0.35);
}
.track-label {
  position: absolute;
  transform: translate(14px, -34px);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.92;
  pointer-events: none;
  z-index: 3;
  background: rgba(7,7,10,0.78);
  padding: 1px 7px 2px;
  border-radius: 2px;
  text-shadow: 0 1px 4px #000;
}
.fork {
  position: absolute;
  width: 1px;
  transform-origin: top left;
}
.stem {
  position: absolute;
  width: 1px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.85;
}
.track-line.twig {
  height: 1px;
  opacity: 0.75;
}

.marker {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 4;
  background: none;
  border: 0;
  padding: 8px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}
.marker .dot {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(240,193,75,0.22), 0 0 10px rgba(240,193,75,0.45);
  transition: transform 0.15s ease, box-shadow 0.15s;
}
.marker.pope.saint .dot {
  background: #fff4c2;
  box-shadow: 0 0 0 3px rgba(255,244,194,0.25), 0 0 12px rgba(240,193,75,0.6);
}
.marker.pope.major .dot {
  width: 14px;
  height: 14px;
}
.marker.saint-m .dot {
  width: 8px;
  height: 8px;
  background: #e8d5a3;
  box-shadow: 0 0 0 2px rgba(232,213,163,0.2);
}
.marker.saint-m.martyr .dot {
  background: #e08a6a;
  box-shadow: 0 0 0 2px rgba(224,138,106,0.25);
}
.marker.council .dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 0 2px rgba(126,200,200,0.2);
}
.marker.event .dot {
  width: 7px;
  height: 7px;
  background: #b9b3a3;
}
.marker.event.marian .dot {
  background: #e8a0b8;
  box-shadow: 0 0 0 2px rgba(232,160,184,0.28), 0 0 10px rgba(232,160,184,0.35);
}
.marker.event.marian.dogma .dot,
.marker.event.marian.rosary.major .dot {
  width: 9px;
  height: 9px;
  background: #f0b7c8;
}
.marker.event.marian .caption { color: #f3d0da; }
.marker.event.biblical .dot {
  background: #c4a06a;
  box-shadow: 0 0 0 2px rgba(196,160,106,0.3);
}
.marker.event.literacy .dot {
  border-radius: 2px;
  background: #b4aa78;
}
.marker.event.other .dot {
  background: #2f8f73;
  box-shadow: 0 0 0 2px rgba(47,143,115,0.28);
}
.marker.schism.other .dot {
  background: #2f8f73;
}
.marker.event.prophecy .dot {
  width: 8px;
  height: 8px;
  background: #d4b36a;
  box-shadow: 0 0 0 2px rgba(212,179,106,0.3);
}
.marker.event.prophecy.theme-mary .dot { background: #e8a0b8; }
.marker.event.prophecy.theme-jerusalem .dot { background: #c47a5a; }
.marker.event.prophecy.theme-rome .dot { background: #8a6a4a; }
.marker.schism .dot {
  width: 12px;
  height: 12px;
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(196,92,92,0.25);
}
.marker.split .dot {
  width: 7px;
  height: 7px;
  background: #e0a090;
  box-shadow: 0 0 0 2px rgba(224,160,144,0.25);
}
.marker.split .caption {
  font-size: 0.62rem;
  color: #d8c4b4;
}
.marker.split:hover .caption,
.marker.schism:hover .caption,
.marker.council:hover .caption,
.marker.saint-m:hover .caption { opacity: 1; }
.marker:hover .dot, .marker:focus .dot {
  transform: scale(1.45);
  box-shadow: 0 0 0 6px rgba(240,193,75,0.22);
}
.marker .caption {
  position: absolute;
  left: var(--lab-dx, 11px);
  top: var(--lab-dy, -11px);
  white-space: nowrap;
  font-size: 0.64rem;
  line-height: 1.15;
  color: #efe6c9;
  opacity: 0.94;
  pointer-events: none;
  text-shadow: 0 1px 5px #000, 0 0 8px #07070a;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 5;
  background: rgba(7,7,10,0.55);
  padding: 0 4px 1px;
  border-radius: 2px;
}
.marker.lab-tight .caption {
  font-size: 0.56rem;
  max-width: 7.4rem;
  opacity: 0.88;
}
.marker:hover { z-index: 12; }
.marker:hover .caption, .marker.pinned .caption {
  opacity: 1;
  max-width: 18rem;
  background: rgba(7,7,10,0.88);
}
.marker.pope.major .caption { opacity: 0.96; color: #f6e4b0; }
.marker.event.major .caption { opacity: 0.96; color: #f6d889; }
.marker.map-pin .dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #6ec8c0;
  box-shadow: 0 0 0 2px rgba(110,200,192,0.28);
}
.marker.map-pin .caption {
  color: #b7e4de;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
}

#globe-dock {
  position: fixed;
  top: 58px;
  right: 14px;
  z-index: 28;
  width: min(420px, 38vw);
  background: rgba(10,12,16,0.9);
  border: 1px solid var(--card-border);
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  padding: 8px 8px 10px;
}
#globe-dock .globe-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
#globe-dock .globe-kicker {
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.62rem;
}
#globe-year {
  font-family: Cinzel, serif;
  color: #f6e4b0;
  font-size: 1.15rem;
  line-height: 1.1;
}
.globe-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}
.globe-controls button {
  background: transparent;
  border: 1px solid var(--gold-3);
  color: var(--gold);
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.45rem;
  cursor: pointer;
  border-radius: 99px;
}
.globe-controls button.on {
  background: var(--gold);
  color: #1a1406;
  border-color: var(--gold);
}
#globe-play { border-color: #6ec8c0; color: #b7e4de; }
#globe-play:hover { background: rgba(110,200,192,0.15); }
#globe-stage { line-height: 0; }
.globe-svg { width: 100%; height: auto; display: block; border-radius: 4px; background: #0b1418; }
.globe-svg image.atlas,
#modal .spread-map image.atlas {
  filter: invert(0.9) sepia(0.25) hue-rotate(160deg) saturate(0.45) brightness(0.78) contrast(1.15);
}
.globe-svg .region {
  fill: rgba(255,255,255,0);
  stroke: rgba(255,255,255,0);
  stroke-width: 0.6;
  transition: fill 0.45s ease, stroke 0.45s ease;
}
.globe-svg .region.christian { fill: rgba(240,193,75,0.42); stroke: rgba(246,216,137,0.85); filter: url(#globe-glow); }
.globe-svg .region.mission { fill: rgba(180,140,50,0.28); stroke: rgba(168,136,64,0.7); }
.globe-svg .region.minority { fill: rgba(196,160,106,0.32); stroke: rgba(196,160,106,0.8); }
.globe-svg .region.dhimmi { fill: rgba(47,143,115,0.38); stroke: rgba(110,200,168,0.8); }
.globe-svg .region.lost { fill: rgba(122,48,48,0.42); stroke: rgba(196,92,92,0.85); }
.globe-svg .region.islam { fill: rgba(30,90,72,0.4); stroke: rgba(47,143,115,0.85); }
.globe-svg .region.fresh { animation: globe-pulse 0.7s ease; }
@keyframes globe-pulse {
  0% { opacity: 0.25; }
  60% { opacity: 1; }
  100% { opacity: 1; }
}
#globe-caption {
  margin-top: 6px;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #cfc6a8;
  max-height: 5.6rem;
  overflow: auto;
}
#globe-caption .title-line { color: var(--gold); font-size: 0.74rem; margin-bottom: 2px; }
#globe-caption .islam-line { color: #8fceb8; margin-top: 3px; }

.dock-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.dock-tab {
  flex: 1;
  background: transparent;
  border: 1px solid var(--gold-3);
  color: var(--gold);
  font: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.4rem;
  cursor: pointer;
  border-radius: 99px;
}
.dock-tab.on {
  background: var(--gold);
  color: #1a1406;
  border-color: var(--gold);
}
#visitor-count {
  font-family: Cinzel, serif;
  color: #f6e4b0;
  font-size: 1.3rem;
  line-height: 1.1;
}
#visitor-stage { line-height: 0; min-height: 60px; }
#visitor-caption {
  margin-top: 6px;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #cfc6a8;
}
.visitor-svg .visitor-dot {
  fill: #ff1744;
  stroke: rgba(0,0,0,0.55);
  stroke-width: 0.4;
  filter: drop-shadow(0 0 1.6px rgba(255,23,68,0.95));
}
.visitor-svg .visitor-dot.you {
  fill: #ff003c;
  stroke: #fff;
  stroke-width: 0.6;
  filter: drop-shadow(0 0 2.6px rgba(255,0,60,1));
  animation: globe-pulse 0.9s ease;
}
.visitor-svg { cursor: grab; touch-action: none; }
.visitor-svg.grabbing { cursor: grabbing; }
.visitor-svg .visitor-count-label {
  fill: #fff;
  font-family: "Source Sans 3", sans-serif;
  font-weight: 600;
  paint-order: stroke;
  stroke: rgba(0,0,0,0.55);
  stroke-width: 0.3;
  pointer-events: none;
}

#legend {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  background: rgba(16,16,24,0.86);
  border: 1px solid var(--card-border);
  padding: 10px 12px;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.7;
}
#legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

#modal-back {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 60;
  display: none;
}
#modal-back.show { display: block; }
#modal {
  position: fixed;
  z-index: 61;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, 92vw);
  max-height: 82vh;
  overflow: auto;
  background: linear-gradient(180deg, #1b1b24, #121218);
  border: 1px solid var(--gold-3);
  box-shadow: 0 20px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(240,193,75,0.08);
  padding: 28px 28px 24px;
  display: none;
}
#modal.show { display: block; }
#modal.wide {
  width: min(740px, 94vw);
  max-height: 86vh;
}
#modal .rosary-set {
  margin-top: 1.15rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(240,193,75,0.22);
}
#modal .rosary-set h3 {
  color: var(--gold);
  font-size: 1.12rem;
  margin-bottom: 0.2rem;
}
#modal .mystery {
  margin: 0.85rem 0 1.05rem;
  padding: 0.65rem 0.75rem;
  background: rgba(240,193,75,0.04);
  border: 1px solid rgba(240,193,75,0.12);
  border-radius: 6px;
}
#modal .mystery h4 {
  font-size: 0.98rem;
  color: #f6e4b0;
  margin-bottom: 0.25rem;
}
#modal .fruit {
  font-size: 0.78rem;
  color: #e8a0b8;
  letter-spacing: 0.04em;
  margin-bottom: 0.55rem;
}
#modal .passage { margin: 0.55rem 0; }
#modal .passage .ref {
  font-size: 0.75rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}
#modal .passage .txt {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #ddd6c4;
}
#modal .also {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.45rem;
}
#modal .verses { margin-top: 0.85rem; }
#modal .verses-kicker {
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
  margin-bottom: 0.45rem;
}
#modal .verse-row {
  margin: 0.45rem 0 0.7rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(240,193,75,0.1);
}
#modal .verse-row .refs { font-size: 0.88rem; line-height: 1.45; }
#modal .verse-row .ot { color: #e6c989; }
#modal .verse-row .nt { color: #f0c14b; }
#modal .verse-row .arrow { color: var(--muted); }
#modal .verse-row .point {
  font-size: 0.86rem;
  color: #d7cda8;
  margin-top: 0.2rem;
  line-height: 1.45;
}
#modal .kind {
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.7rem;
  margin-bottom: 0.45rem;
}
#modal h2 {
  font-size: 1.55rem;
  margin-bottom: 0.35rem;
  line-height: 1.2;
}
#modal .when {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}
#modal p { line-height: 1.55; color: #e6e0d2; margin-bottom: 0.8rem; }
#modal .note {
  border-left: 2px solid var(--gold-2);
  padding-left: 12px;
  color: #d7cda8;
  font-size: 0.92rem;
}
#modal .assoc {
  margin-top: 0.8rem;
  font-size: 0.88rem;
  color: #cfc6a8;
}
#modal .close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: 0;
  color: var(--gold);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
#modal .links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.1rem;
}
#modal .links a {
  color: #1a1406;
  background: var(--gold);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.6rem;
  border-radius: 99px;
}
#modal .links a:hover { background: #ffe08a; }
#modal .links a.yt {
  background: #8b1e1e;
  color: #f6e2b3;
}
#modal .links a.yt:hover { background: #b43030; color: #fff8e4; }

#modal .spread-map {
  width: 100%;
  height: auto;
  display: block;
  margin: 0.2rem 0 0.55rem;
  background: #0c1214;
  border: 1px solid rgba(240,193,75,0.18);
  border-radius: 6px;
}
#modal .spread-map .land { fill: transparent; stroke: transparent; }
#modal .spread-map .land.christian { fill: rgba(212,160,23,0.42); stroke: rgba(240,193,75,0.85); }
#modal .spread-map .land.mission { fill: rgba(122,98,48,0.32); stroke: rgba(168,136,64,0.75); }
#modal .spread-map .land.minority { fill: rgba(196,160,106,0.34); stroke: rgba(196,160,106,0.8); }
#modal .spread-map .land.dhimmi { fill: rgba(47,143,115,0.4); stroke: rgba(110,200,168,0.8); }
#modal .spread-map .land.lost { fill: rgba(106,48,48,0.42); stroke: rgba(196,92,92,0.85); }
#modal .spread-map .land.islam { fill: rgba(30,90,72,0.42); stroke: rgba(47,143,115,0.85); }
#modal .spread-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}
#modal .spread-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  vertical-align: middle;
  border-radius: 1px;
}
#modal .spread-legend .christian { background: #d4a017; }
#modal .spread-legend .mission { background: #7a6230; }
#modal .spread-legend .minority { background: #c4a06a; }
#modal .spread-legend .dhimmi { background: #2f8f73; }
#modal .spread-legend .lost { background: #6a3030; }
#modal .spread-legend .islam { background: #1e5a48; }
#modal .spread-block { margin: 0.7rem 0 0.85rem; }
#modal .spread-block h3 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.25rem;
}
#modal .spread-block.islam h3 { color: #8fceb8; }
#modal .spread-block.churches h3 { color: #e08a6a; }
#modal .spread-block p { margin-bottom: 0; font-size: 0.92rem; }

.guide-year {
  position: fixed;
  top: 64px;
  bottom: 70px;
  width: 1px;
  background: rgba(240,193,75,0.28);
  pointer-events: none;
  z-index: 5;
  left: 28%;
}
.guide-year::after {
  content: "";
  position: absolute;
  top: -4px;
  left: -3px;
  width: 7px;
  height: 7px;
  background: var(--gold);
  border-radius: 50%;
}

@media (max-width: 800px) {
  #hud { flex-wrap: wrap; }
  .jumps { max-width: 96vw; left: 8px; }
  #legend { display: none; }
  #globe-dock { display: none; }
  #intro h1 { font-size: 2.4rem; }
}
