/* ============================================================
   The Logbook — rennhack.net /travels/
   Palette: deep navy / parchment / brass / off-white
   ============================================================ */

:root {
  --navy-900: #060f1f;
  --navy-800: #0a1a33;
  --navy-700: #0f2447;
  --navy-600: #1a3360;
  --parchment: #f4ecd8;
  --parchment-soft: #ede3c8;
  --brass: #c9a961;
  --brass-bright: #e3c178;
  --brass-deep: #8a6f2f;
  --ink: #f4ecd8;
  --ink-mute: #b9b09a;
  --ink-deep: #2a2418;
  --line: rgba(201,169,97,.25);
  --line-strong: rgba(201,169,97,.55);
  --bg: var(--navy-900);
  --surface: var(--navy-800);
  --surface-2: var(--navy-700);
  --shadow-deep: 0 24px 60px -20px rgba(0,0,0,.65), 0 8px 20px -10px rgba(0,0,0,.4);

  --font-serif: 'Cormorant Garamond', 'Hoefler Text', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="light"] {
  --bg: var(--parchment);
  --surface: #fbf7e9;
  --surface-2: #f0e7cd;
  --ink: #2a2418;
  --ink-mute: #6a604a;
  --ink-deep: #1a1610;
  --line: rgba(138,111,47,.3);
  --line-strong: rgba(138,111,47,.6);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

a { color: var(--brass-bright); text-decoration: none; }
a:hover { color: var(--brass); text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; letter-spacing: 0.01em; margin: 0; }

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

/* ----- Top bar ----- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 28px;
  background: linear-gradient(180deg, var(--surface) 0%, transparent 100%);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  font-size: 28px;
  color: var(--brass-bright);
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.4));
}
.brand-title {
  font-size: 28px;
  letter-spacing: 0.04em;
  color: var(--parchment);
  line-height: 1;
}
[data-theme="light"] .brand-title { color: var(--ink-deep); }
.brand-sub {
  margin: 4px 0 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
}

.topbar-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 18px;
  transition: transform .15s ease, background .15s ease;
}
.icon-btn:hover { background: var(--surface-2); transform: rotate(15deg); }

/* ----- Hero map ----- */
.hero {
  position: relative;
  height: clamp(420px, 65vh, 720px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
#map { position: absolute; inset: 0; background: var(--navy-900); }

/* Map legend — small key in the corner explaining line colors */
.map-legend {
  position: absolute;
  left: 14px; bottom: 14px;
  z-index: 900;
  background: rgba(10, 26, 51, 0.78);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 11px;
  color: var(--ink);
  backdrop-filter: blur(4px);
  pointer-events: none;
  max-width: 220px;
}
[data-theme="light"] .map-legend {
  background: rgba(244, 236, 216, 0.88);
  color: var(--ink-deep);
}
.map-legend .legend-title {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 600;
  margin-bottom: 6px;
}
.map-legend .legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 0;
}
.map-legend .legend-swatch {
  flex: 0 0 28px;
  height: 0;
  border-top-width: 2px;
  border-top-style: solid;
}

/* Legacy .hero-overlay class kept for backward compat (no longer used). */
.hero-overlay { display: none; }

/* Stat band sits below the map — own background, never overlaps tiles. */
.stat-band {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 22px 28px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.stat {
  text-align: center;
  padding: 8px 4px;
  cursor: pointer;
  border-radius: 6px;
  transition: background .15s ease, transform .15s ease;
}
.stat:hover { background: rgba(201,169,97,.08); transform: translateY(-1px); }
.stat:hover .stat-num { color: var(--brass-bright); }
[data-theme="light"] .stat:hover .stat-num { color: var(--brass-deep); }
.stat::after {
  content: ' →';
  font-size: 11px;
  color: var(--brass);
  opacity: 0;
  transition: opacity .15s ease;
  margin-left: 2px;
  letter-spacing: 0;
}
.stat:hover::after { opacity: 0.7; }
.stat-num {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.6vw, 42px);
  font-weight: 700;
  color: var(--brass-bright);
  line-height: 1;
  letter-spacing: 0.01em;
}
[data-theme="light"] .stat-num { color: var(--brass-deep); }
.stat-label {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

@media (max-width: 720px) {
  .stat-strip { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .stat:nth-child(4), .stat:nth-child(5) { display: none; }
  .stat-band { padding: 16px 18px; }
}

/* ----- Filters ----- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 20px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-right: 4px;
}
.chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all .15s ease;
  white-space: nowrap;
}
.chip:hover { background: rgba(201,169,97,.08); border-color: var(--brass); }
.chip.active {
  background: var(--brass);
  color: var(--navy-900);
  border-color: var(--brass);
  font-weight: 600;
}

#year-min, #year-max {
  -webkit-appearance: none; appearance: none;
  width: 110px;
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
  outline: none;
}
#year-min::-webkit-slider-thumb, #year-max::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--brass-bright);
  cursor: pointer;
  border: 2px solid var(--navy-900);
}
[data-theme="light"] #year-min::-webkit-slider-thumb,
[data-theme="light"] #year-max::-webkit-slider-thumb { border-color: var(--parchment); }

#year-min-label, #year-max-label {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--brass-bright);
  min-width: 3ch;
  text-align: center;
}

/* ----- Sections ----- */
.section-title {
  font-size: clamp(22px, 3vw, 32px);
  color: var(--parchment);
  margin: 0 0 18px;
  letter-spacing: 0.02em;
}
[data-theme="light"] .section-title { color: var(--ink-deep); }
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--brass);
  margin-top: 8px;
}

/* ----- Highlights ----- */
.highlights { padding: 36px 28px 12px; max-width: 1400px; margin: 0 auto; }
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.hl-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.hl-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 70px; height: 70px;
  background: radial-gradient(circle at top right, rgba(201,169,97,.12), transparent 70%);
  pointer-events: none;
}
.hl-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}
.hl-value {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  color: var(--brass-bright);
  line-height: 1.05;
  margin-top: 4px;
}
[data-theme="light"] .hl-value { color: var(--brass-deep); }
.hl-value .unit {
  font-family: var(--font-sans);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  font-weight: 600;
  margin-left: 4px;
}
.hl-sub {
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 2px;
  line-height: 1.35;
}
.hl-card.clickable {
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.hl-card.clickable:hover {
  transform: translateY(-2px);
  border-color: var(--brass);
}
.hl-card.clickable::after {
  content: '→';
  position: absolute;
  top: 12px; right: 14px;
  color: var(--brass);
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
  font-size: 14px;
  z-index: 2;
}
.hl-card.clickable:hover::after { opacity: 0.8; transform: translateX(2px); }

/* Stat-detail drawer styles */
.stat-detail h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--parchment);
  margin: 0 0 4px;
}
[data-theme="light"] .stat-detail h2 { color: var(--ink-deep); }
.stat-detail .lead {
  font-size: 13px; color: var(--ink-mute); margin: 0 0 18px;
}
.stat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.stat-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.stat-list li:last-child { border-bottom: none; }
.stat-list .item-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.stat-list .item-sub {
  display: block;
  font-size: 11px;
  color: var(--ink-mute);
  font-weight: 400;
  margin-top: 2px;
}
.stat-list .item-count {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--brass-bright);
  min-width: 36px;
  text-align: right;
}
[data-theme="light"] .stat-list .item-count { color: var(--brass-deep); }
.stat-list .item-meta {
  font-size: 11px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.stat-list .trip-mini {
  display: block;
  font-size: 12px;
  color: var(--ink-mute);
  padding-left: 12px;
  margin-top: 2px;
  border-left: 2px solid var(--line);
  cursor: pointer;
}
.stat-list .trip-mini:hover { color: var(--brass-bright); border-color: var(--brass); }
.stat-list details summary {
  cursor: pointer;
  list-style: none;
}
.stat-list details summary::-webkit-details-marker { display: none; }
.stat-list details[open] .item-name::after { content: ' ▾'; color: var(--brass); }
.stat-list details:not([open]) .item-name::after { content: ' ▸'; color: var(--ink-mute); }

/* Transit-kind markers — slightly smaller, hollow */
.stop-marker.transit-kind {
  width: 8px; height: 8px;
  background: transparent !important;
  border: 2px solid #6fb8ff;
}

.section-title-link a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  transition: color .15s ease;
}
.section-title-link a:hover { color: var(--brass-bright); }
.section-title-link .arrow {
  font-size: 0.7em;
  color: var(--brass);
  transition: transform .15s ease;
}
.section-title-link a:hover .arrow { transform: translateX(4px); }

.timeline-wrap { padding: 36px 28px 12px; max-width: 1400px; margin: 0 auto; }
.timeline {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 280px;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 4px 24px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--brass) transparent;
}
.timeline::-webkit-scrollbar { height: 8px; }
.timeline::-webkit-scrollbar-thumb { background: var(--brass); border-radius: 999px; }
.timeline::-webkit-scrollbar-track { background: transparent; }

.log-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.log-card:hover {
  transform: translateY(-3px);
  border-color: var(--brass);
  box-shadow: var(--shadow-deep);
}
.log-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--brass);
  opacity: 0;
  transition: opacity .18s ease;
}
.log-card:hover::before { opacity: 1; }

.log-date {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 600;
}
.log-title {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.25;
  margin: 6px 0 8px;
  color: var(--parchment);
}
[data-theme="light"] .log-title { color: var(--ink-deep); }

.log-meta {
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}
/* ----- Flag pills (first-of / maiden voyage tags) ----- */
.flag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 8px;
}
.flag-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(201,169,97,.18), rgba(201,169,97,.06));
  border: 1px solid var(--brass);
  color: var(--brass-bright);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
[data-theme="light"] .flag-pill { color: var(--brass-deep); }
.flag-pill-big {
  font-size: 11px;
  padding: 4px 10px;
  letter-spacing: 0.08em;
}
.log-card.has-flags { border-color: rgba(201,169,97,.45); }
.drawer-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 18px;
}

/* ----- Media gallery (per-trip photos) ----- */
.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin: 0 0 18px;
}
.media-tile {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
  cursor: zoom-in;
  transition: transform .15s ease;
}
.media-tile:hover { transform: scale(1.02); border-color: var(--brass); }
.media-tile img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
}
.media-tile figcaption {
  font-size: 11px;
  color: var(--ink-mute);
  padding: 4px 6px;
  line-height: 1.3;
}

.log-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(201,169,97,.15);
  border: 1px solid var(--line);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brass-bright);
  font-weight: 600;
}
[data-theme="light"] .log-type-badge { color: var(--brass-deep); }

/* ----- Charts ----- */
.charts { padding: 36px 28px; max-width: 1400px; margin: 0 auto; }
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}
.chart-card h3 {
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 14px;
  font-weight: 600;
}
.chart-card canvas { flex: 1; max-height: 280px; }

/* ----- Footer ----- */
.footer {
  padding: 32px 28px;
  text-align: center;
  border-top: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: 13px;
}
.footer p { margin: 4px 0; }

/* ----- Trip play HUD + vehicle marker ----- */
.play-hud {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 1200;
  background: rgba(6, 15, 31, 0.92);
  border: 1px solid var(--brass);
  border-radius: 10px;
  padding: 14px 18px;
  min-width: 320px;
  max-width: 90vw;
  box-shadow: 0 16px 40px rgba(0,0,0,.55);
  display: flex;
  flex-direction: column;
  gap: 10px;
  backdrop-filter: blur(6px);
}
[data-theme="light"] .play-hud {
  background: rgba(244, 236, 216, 0.96);
  color: var(--ink-deep);
}
.play-hud[hidden] { display: none; }
.play-hud-row { display: flex; align-items: center; gap: 12px; }
.play-hud-icon { font-size: 26px; }
.play-hud-text { flex: 1; min-width: 0; }
.play-hud-title {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--parchment);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-theme="light"] .play-hud-title { color: var(--ink-deep); }
.play-hud-sub {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
  margin-top: 2px;
}
.play-progress {
  flex: 1;
  height: 4px;
  background: rgba(201,169,97,.18);
  border-radius: 2px;
  overflow: hidden;
}
.play-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brass), var(--brass-bright));
  transition: width .15s linear;
}
.play-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}
.play-btn:hover { background: var(--brass); color: var(--navy-900); border-color: var(--brass); }

.play-vehicle {
  font-size: 26px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.6));
  text-align: center;
  line-height: 1;
  transform-origin: 50% 50%;
  /* No CSS transition — each animation frame sets transform directly. */
}

.play-trail-segment { pointer-events: none; }

/* "Now visiting" pulse on the current stop marker */
@keyframes nowPulse {
  0%   { box-shadow: 0 0 0 0   rgba(227,193,120,0.75); transform: scale(1); }
  70%  { box-shadow: 0 0 0 14px rgba(227,193,120,0);   transform: scale(1.3); }
  100% { box-shadow: 0 0 0 0   rgba(227,193,120,0);   transform: scale(1); }
}
.now-pulse {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--brass-bright);
  border: 2px solid var(--navy-900);
  animation: nowPulse 1.6s ease-out infinite;
}

/* Trip-drawer play button */
.drawer-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brass);
  color: var(--navy-900);
  border: none;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  margin: 10px 0 4px;
  transition: background .15s ease, transform .15s ease;
}
.drawer-play-btn:hover { background: var(--brass-bright); transform: translateY(-1px); }

.drawer-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 4px;
}
.drawer-actions .drawer-play-btn { margin: 0; }
.drawer-edit-link {
  font-size: 12px;
  color: var(--ink-mute);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px dashed var(--line-strong);
  transition: all .15s ease;
}
.drawer-edit-link:hover {
  color: var(--brass-bright);
  border-color: var(--brass);
  border-style: solid;
  text-decoration: none;
}

/* ----- Drawer ----- */
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(440px, 92vw);
  background: var(--surface);
  border-left: 1px solid var(--line-strong);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  z-index: 1100;
  overflow-y: auto;
  box-shadow: -16px 0 40px rgba(0,0,0,.4);
}
.drawer.open { transform: translateX(0); }
.drawer-close {
  position: sticky;
  top: 0;
  float: right;
  margin: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 16px;
  z-index: 5;
}
.drawer-content { padding: 16px 28px 40px; }
.drawer-content h2 {
  font-size: 26px;
  color: var(--parchment);
  margin-bottom: 6px;
}
[data-theme="light"] .drawer-content h2 { color: var(--ink-deep); }
.drawer-content .drawer-sub {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 600;
  margin-bottom: 18px;
}
.drawer-content .field-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.drawer-content .field-row .k {
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  align-self: center;
}
.drawer-content .ports-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  border-left: 2px solid var(--brass);
}
.drawer-content .ports-list li {
  padding: 6px 14px;
  position: relative;
  font-size: 14px;
}
.drawer-content .ports-list li::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 14px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brass-bright);
  border: 2px solid var(--surface);
}
.drawer-content .ports-list li.sea::before { background: var(--ink-mute); }
.drawer-content .ports-list li.skipped { text-decoration: line-through; color: var(--ink-mute); }
.drawer-content .ports-list li.skipped::before { background: #ff7a8e; }
.drawer-content .notes { font-style: italic; color: var(--ink-mute); margin-top: 16px; font-size: 14px; }

.drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1090;
  opacity: 0;
  transition: opacity .3s ease;
}
.drawer-scrim.show { opacity: 1; }

/* ----- Leaflet customization ----- */
.leaflet-container { background: var(--navy-900); font-family: var(--font-sans); }
[data-theme="light"] .leaflet-container { background: #cfd6df; }
.leaflet-popup-content-wrapper {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-family: var(--font-sans);
}
.leaflet-popup-tip { background: var(--surface); }
.leaflet-popup-content { margin: 10px 14px; font-size: 13px; }
.leaflet-popup-content b { color: var(--brass-bright); }
[data-theme="light"] .leaflet-popup-content b { color: var(--brass-deep); }

.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border-color: var(--line-strong) !important;
}
.leaflet-control-attribution {
  background: rgba(6,15,31,.7) !important;
  color: var(--ink-mute) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--brass) !important; }
[data-theme="light"] .leaflet-control-attribution { background: rgba(244,236,216,.85) !important; color: var(--ink-deep) !important; }

/* Map markers: small brass dots */
.stop-marker {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--brass-bright);
  border: 2px solid rgba(6,15,31,.8);
  box-shadow: 0 0 0 2px rgba(201,169,97,.3);
  transition: transform .15s ease, box-shadow .15s ease;
}
.stop-marker.selected {
  transform: scale(1.6);
  box-shadow: 0 0 0 4px var(--brass);
}
.stop-marker.cruise { background: var(--brass-bright); }
.stop-marker.international { background: #6fb8ff; }
.stop-marker.domestic { background: #7adba0; }
.stop-marker.park { background: #ff9a6b; }
.stop-marker.concert { background: #d97aff; }
.stop-marker.milestone { background: #ff7a8e; }

/* ----- Responsive ----- */
@media (max-width: 720px) {
  .topbar { padding: 12px 18px; }
  .filters { padding: 16px 18px; gap: 16px; }
  .timeline-wrap, .charts { padding-left: 18px; padding-right: 18px; }
  .filter-group { width: 100%; }
  .brand-title { font-size: 22px; }
  .brand-sub { font-size: 10px; }
}
