/* ── CSS Custom Properties ─────────────────────────────────────────────────── */
:root {
  /* Warm dark palette */
  --bg:           #1a1510;   /* deep espresso */
  --bg2:          #241f18;   /* warm dark surface */
  --bg3:          #2e2820;   /* elevated surface / hover */
  --bg4:          #3a3228;   /* subtle hover highlight */
  --border:       rgba(240,235,220,0.08);
  --border-warm:  rgba(240,235,220,0.14);
  --text:         #f0ebe0;   /* warm off-white */
  --text-muted:   #9a8f7a;   /* warm taupe */
  --text-dim:     #6a6050;   /* very muted */

  /* Accent colours */
  --accent:       #d4821a;   /* burnt amber */
  --accent-light: #e8a040;   /* lighter amber for hover */
  --accent-dark:  #a86010;
  --teal:         #2a8a7f;   /* earthy teal */
  --teal-light:   #3aaa9e;
  --route:        #d45a1a;   /* burnt sienna */
  --status:       #6a8faa;   /* muted slate */
  --video:        #8a78c0;   /* dusty violet */

  /* Layout */
  --navbar-h:     68px;
  --timeline-w:   72px;
  --modal-w:      680px;
  --modal-max-h:  88vh;
  --radius:       12px;
  --radius-sm:    7px;
  --shadow:       0 24px 64px rgba(0,0,0,0.7);
  --shadow-sm:    0 4px 16px rgba(0,0,0,0.45);
  --transition:   0.22s cubic-bezier(0.4,0,0.2,1);

  /* Serif font — headings */
  --font-serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Navbar ─────────────────────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  background: rgba(26,21,16,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.navbar-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: 0.01em;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── Filter Bar ─────────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.filter-btn:hover {
  background: var(--bg3);
  color: var(--text);
  border-color: var(--border-warm);
}

.filter-btn.active {
  background: var(--bg3);
  color: var(--text);
  border-color: var(--border-warm);
}

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.dot-blog    { background: var(--accent); }
.dot-gallery { background: var(--teal); }
.dot-status  { background: var(--status); }
.dot-route   { background: var(--route); }

/* ── Navbar right ───────────────────────────────────────────────────────────── */
.navbar-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-count {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

/* ── Page Nav ───────────────────────────────────────────────────────────────── */
.page-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.page-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.page-nav-link:hover {
  background: var(--bg3);
  color: var(--text);
  border-color: var(--border-warm);
}

.page-nav-link.active {
  background: var(--bg3);
  color: var(--accent-light);
  border-color: rgba(212,130,26,0.3);
}

/* ── Map ────────────────────────────────────────────────────────────────────── */
#map {
  position: fixed;
  top: var(--navbar-h);
  left: var(--timeline-w);
  right: 0; bottom: 0;
}

/* ── Mapbox control overrides ───────────────────────────────────────────────── */
.mapboxgl-ctrl-group {
  background: rgba(26,21,16,0.92) !important;
  border: 1px solid var(--border-warm) !important;
  border-radius: var(--radius-sm) !important;
  overflow: hidden;
  backdrop-filter: blur(10px) !important;
}
.mapboxgl-ctrl-group button {
  background: none !important;
  color: var(--text) !important;
}
.mapboxgl-ctrl-group button:hover { background: var(--bg3) !important; }
.mapboxgl-ctrl-icon { filter: invert(0.75) sepia(0.2) !important; }
.mapboxgl-ctrl-attrib {
  background: rgba(26,21,16,0.75) !important;
  color: var(--text-dim) !important;
  font-size: 10px !important;
}
.mapboxgl-ctrl-attrib a { color: var(--text-muted) !important; }

/* ── Style Toggle Button ────────────────────────────────────────────────────── */
#style-toggle {
  position: absolute;
  bottom: 108px;
  right: 10px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  background: rgba(26,21,16,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  border: 1px solid var(--border-warm);
  border-radius: 20px;
  font-size: 12.5px;
  font-family: var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition);
  box-shadow: var(--shadow-sm);
}

#style-toggle:hover {
  background: var(--bg3);
  border-color: rgba(240,235,220,0.2);
}

#style-toggle.satellite-active {
  background: rgba(42,138,127,0.18);
  border-color: var(--teal);
  color: var(--teal-light);
}

#style-toggle.satellite-active:hover {
  background: rgba(42,138,127,0.28);
}

/* ── Modal scrim ────────────────────────────────────────────────────────────── */
#modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(10,8,5,0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

body.modal-open #modal-scrim {
  opacity: 1;
  pointer-events: all;
}

/* ── Detail Modal ───────────────────────────────────────────────────────────── */
#modal {
  position: fixed;
  top: 50%;
  left: calc(var(--timeline-w) + (100vw - var(--timeline-w) - var(--modal-w)) / 2);
  width: var(--modal-w);
  max-height: var(--modal-max-h);
  z-index: 160;
  background: var(--bg2);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;

  /* Hidden state */
  opacity: 0;
  transform: translateY(calc(-50% + 16px));
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}

#modal.open {
  opacity: 1;
  transform: translateY(-50%);
  pointer-events: all;
}

/* Close button — top-right of modal, inside content area */
#modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background: rgba(26,21,16,0.7);
  border: 1px solid var(--border-warm);
  color: var(--text-muted);
  cursor: pointer;
  padding: 7px;
  border-radius: 50%;
  line-height: 0;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  backdrop-filter: blur(6px);
}
#modal-close:hover {
  color: var(--text);
  background: var(--bg3);
  border-color: rgba(240,235,220,0.2);
}
#modal-close svg { width: 16px; height: 16px; display: block; }

#modal-content {
  flex: 1;
  min-height: 0;
  padding-bottom: 56px;
}

/* Scrollbar */
#modal::-webkit-scrollbar { width: 4px; }
#modal::-webkit-scrollbar-track { background: transparent; }
#modal::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 4px; }

/* ── Modal inner layout pieces ──────────────────────────────────────────────── */

/* Hero image — full bleed at top, no scrim, no overlaid title */
.modal-hero {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}

.modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Inner content area */
.modal-inner {
  padding: 22px 28px 48px;
}

/* Format badge */
.modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 10px;
  border: 1px solid transparent;
}
.modal-badge.blog    {
  background: rgba(212,130,26,0.15);
  color: var(--accent-light);
  border-color: rgba(212,130,26,0.25);
}
.modal-badge.gallery {
  background: rgba(42,138,127,0.15);
  color: var(--teal-light);
  border-color: rgba(42,138,127,0.25);
}
.modal-badge.status  {
  background: rgba(106,143,170,0.15);
  color: var(--status);
  border-color: rgba(106,143,170,0.25);
}
.modal-badge.video   {
  background: rgba(138,120,192,0.15);
  color: var(--video);
  border-color: rgba(138,120,192,0.25);
}
.modal-badge.page    {
  background: rgba(154,143,122,0.12);
  color: var(--text-muted);
  border-color: rgba(154,143,122,0.2);
}

/* Post title — serif */
.modal-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

/* Meta row */
.modal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.modal-meta time { }

.modal-location {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Divider */
.modal-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 20px;
}

/* Body text */
.modal-body {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text);
}
.modal-body p { margin-bottom: 16px; }
.modal-body a { color: var(--accent-light); text-decoration: none; }
.modal-body a:hover { text-decoration: underline; }
.modal-body img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  display: block;
  margin: 18px 0;
}
.modal-body h1, .modal-body h2, .modal-body h3 {
  font-family: var(--font-serif);
  color: var(--text);
  margin: 24px 0 10px;
  font-weight: 700;
  line-height: 1.25;
}
.modal-body h2 { font-size: 20px; }
.modal-body h3 { font-size: 17px; }
.modal-body ul, .modal-body ol {
  padding-left: 22px;
  margin-bottom: 16px;
}
.modal-body li { margin-bottom: 6px; }

/* Gallery strip */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
  margin-bottom: 20px;
}
.gallery-thumb {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  background: var(--bg3);
  width: 100%;
}
.gallery-thumb:hover {
  opacity: 0.82;
  transform: scale(1.04);
}

/* Video embed */
.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin: 0 0 20px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* KML download link */
.modal-kml-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 8px 15px;
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-sm);
  color: var(--status);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.modal-kml-link:hover {
  border-color: var(--status);
  background: rgba(106,143,170,0.08);
  color: var(--text);
}

/* Loading state */
.content-loading {
  color: var(--text-muted);
  font-size: 13px;
  padding: 14px 0;
}

/* ── Group chooser ──────────────────────────────────────────────────────────── */
.group-header {
  margin-bottom: 18px;
}
.group-count {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.group-location {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.group-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.group-item {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.group-item:hover {
  background: var(--bg4);
  border-color: var(--border-warm);
}

.group-item-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bg4);
}
.group-item-thumb--placeholder {
  background: var(--bg4);
}

.group-item-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.group-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-item-date {
  font-size: 12px;
  color: var(--text-muted);
}
.group-item-location {
  font-size: 11px;
  color: var(--text-dim);
}

/* ── Lightbox ───────────────────────────────────────────────────────────────── */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(6,5,3,0.96);
  display: none;
  align-items: center;
  justify-content: center;
}
#lightbox.open { display: flex; }

#lightbox-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--bg3);
  border: 1px solid var(--border-warm);
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  z-index: 1;
  line-height: 0;
  transition: background var(--transition), color var(--transition);
}
#lightbox-close:hover { background: var(--bg4); color: var(--text); }
#lightbox-close svg { width: 18px; height: 18px; display: block; }

#lightbox-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 160px);
  max-height: calc(100vh - 80px);
  flex: 1;
}
#lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
}

#lightbox-prev, #lightbox-next {
  background: var(--bg3);
  border: 1px solid var(--border-warm);
  color: var(--text);
  font-size: 26px;
  cursor: pointer;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin: 0 10px;
  transition: background var(--transition);
  user-select: none;
}
#lightbox-prev:hover, #lightbox-next:hover { background: var(--bg4); }

#lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(0,0,0,0.5);
  padding: 4px 12px;
  border-radius: 12px;
  letter-spacing: 0.04em;
}

/* ── Splash Screen ──────────────────────────────────────────────────────────── */
#splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow: hidden;
  transition: opacity 0.7s ease;
}

#splash.hidden {
  opacity: 0;
  pointer-events: none;
}

#splash-bg {
  position: absolute;
  inset: 0;
  background-image: url('images/2014/07/image1.jpg');
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.03);
}

#splash-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,8,5,0.12) 0%,
    rgba(10,8,5,0.35) 50%,
    rgba(10,8,5,0.88) 100%
  );
}

#splash-content {
  position: absolute;
  left: 8%;
  bottom: 12%;
  max-width: 540px;
  z-index: 1;
}

.splash-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-light);
  margin-bottom: 12px;
}

.splash-title {
  font-family: var(--font-serif);
  font-size: clamp(48px, 7.5vw, 78px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 10px;
}

.splash-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.splash-blurb {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255,255,255,0.75);
  max-width: 460px;
  margin-bottom: 34px;
}

#splash-enter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 30px;
  font-size: 14.5px;
  font-weight: 700;
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 24px rgba(212,130,26,0.4);
}

#splash-enter:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212,130,26,0.5);
}

#splash-enter:active { transform: translateY(0); }

#splash-loading {
  position: absolute;
  bottom: 22px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1;
  transition: opacity 0.4s ease;
}

#splash-loading .loading-spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
  border-color: rgba(255,255,255,0.18);
  border-top-color: rgba(255,255,255,0.55);
}

#loading-text {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--bg3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Timeline ───────────────────────────────────────────────────────────────── */
#timeline {
  position: fixed;
  top: var(--navbar-h);
  left: 0;
  bottom: 0;
  width: var(--timeline-w);
  z-index: 90;
  background: rgba(26,21,16,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0 12px;
  user-select: none;
}

#timeline-track {
  position: relative;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.tl-month {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  padding-top: 2px;
  min-height: 0;
}

.tl-month-label {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  padding: 0 3px;
}

/* Density bar — left strip */
.tl-month-bar {
  position: absolute;
  left: 5px;
  top: 16px;
  bottom: 0;
  width: 3px;
  border-radius: 2px;
  background: var(--bg3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.tl-month-bar-fill {
  width: 100%;
  flex-shrink: 0;
  opacity: 0.4;
  border-radius: 2px;
  transition: opacity 0.2s;
}
.tl-month-bar-fill.tl-bar-content { background: var(--accent); }
.tl-month-bar-fill.tl-bar-status  { background: var(--status); }
.tl-month.in-range .tl-month-bar-fill { opacity: 1; }

/* Range overlay and handles */
#timeline-range {
  position: absolute;
  top: 14px;
  left: 0; right: 0;
  bottom: 12px;
  pointer-events: none;
}

#timeline-selection {
  position: absolute;
  left: 0; right: 0;
  background: rgba(212,130,26,0.12);
  border-left: 2px solid var(--accent);
  pointer-events: none;
}

.timeline-handle {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 10px;
  background: var(--accent);
  border-radius: 4px;
  cursor: ns-resize;
  pointer-events: all;
  z-index: 2;
  transition: background 0.15s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.timeline-handle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 2px;
  border-top: 1.5px solid rgba(0,0,0,0.35);
  border-bottom: 1.5px solid rgba(0,0,0,0.35);
}
.timeline-handle:hover,
.timeline-handle.dragging {
  background: var(--accent-light);
}

/* Floating date labels */
.timeline-label {
  position: absolute;
  left: calc(var(--timeline-w) + 6px);
  background: var(--bg2);
  border: 1px solid var(--border-warm);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 200;
  box-shadow: var(--shadow-sm);
}
.timeline-label.visible { opacity: 1; }

/* Reset button */
#timeline-reset {
  margin-top: 8px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-muted);
  font-size: 11px;
  width: 28px;
  height: 22px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}
#timeline-reset:hover { color: var(--text); border-color: var(--accent); }
#timeline-reset.visible { display: flex; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --timeline-w: 0px;
    --modal-w: 100vw;
  }

  #timeline { display: none; }

  #map { left: 0; }

  /* Modal becomes a bottom sheet on mobile */
  #modal {
    top: auto;
    left: 0 !important;
    bottom: 0;
    width: 100% !important;
    max-height: 88vh;
    border-radius: var(--radius) var(--radius) 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    transform: translateY(100%);
    transition: opacity var(--transition), transform var(--transition);
  }

  #modal.open {
    transform: translateY(0);
    opacity: 1;
  }

  #style-toggle {
    right: 10px;
    bottom: 80px;
  }

  #splash-content {
    left: 6%;
    right: 6%;
    bottom: 10%;
    max-width: 100%;
  }

  .splash-blurb { display: none; }

  #splash-loading {
    bottom: 16px;
    right: 16px;
  }

  .filter-bar { gap: 4px; }
  .filter-btn { padding: 4px 10px; font-size: 12px; }
  .brand-sub  { display: none; }
  .page-nav   { gap: 2px; }
  .page-nav-link { padding: 4px 9px; font-size: 12px; }
  #lightbox-img-wrap { max-width: calc(100vw - 100px); }
}

@media (max-width: 480px) {
  .filter-btn span:not(.dot) { display: none; }
  .filter-btn { padding: 5px 10px; }
  .filter-bar { gap: 3px; }
  .page-nav-link { font-size: 11px; padding: 4px 7px; }
}
