/* Modern: a clean map-app look in the spirit of Google Maps. Roboto, white
   cards with soft shadows, hairlines instead of ink outlines, grey map labels
   with white halos, blue routes. */
:root {
  --ink: #202124;
  --ink-soft: #5f6368;
  --card: #ffffff;
  --accent: #ea4335;
  --estonia: #ffe28a;
  --train: #e8782a;
  --car: #1a73e8;
  --car-roof: #1557b0;
  --font-display: "Roboto", system-ui, sans-serif;
  --font-body: "Roboto", system-ui, sans-serif;
  --backdrop: #e8eaed;
  --surface: #ffffff;
  --line: #dadce0;
  --hover: #f2f5f7;
  --link: #1a73e8;
  --rule: #e6e9ec;
  --bw-3: 1px;
  --bw-2: 1px;
  --bw-1: 1px;
  --round: 0.75;
  --shadow-lg: 0 8px 30px rgba(20, 30, 40, 0.14), 0 1px 3px rgba(20, 30, 40, 0.08);
  --shadow: 0 2px 10px rgba(20, 30, 40, 0.14);
  --shadow-sm: 0 1px 3px rgba(20, 30, 40, 0.1);
  --shadow-soft: none;
  --compass-shadow: drop-shadow(0 2px 4px rgba(20, 30, 40, 0.2));
  --road: #fde293;
  --road-casing: #e0ad3e;
  --contrail-edge: #8fa3c9;
  --bob: none;
}

#sidebar { border: none; border-radius: 16px; }
@media (min-width: 721px) { .sb-head { padding-bottom: 14px; } }
.eyebrow { font-weight: 500; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.sb-head h1 { font-weight: 500; letter-spacing: -0.01em; }
.prose h2, .sb-sub, .option h2, #trip-detail h3 { font-weight: 500; letter-spacing: -0.01em; }
.tabs { border-bottom: 1px solid var(--line); gap: 0; padding: 0 16px; }
.tabs button {
  flex: none;
  margin: 0 14px -1px 0;
  padding: 10px 0;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-weight: 500;
}
.tabs button[aria-selected="true"] { background: none; border-bottom-color: var(--ink); }
.shortcut, .city-chip, .chip { font-weight: 500; background: #fff; border-color: var(--line); color: #3c4043; }
.shortcut:hover, .city-chip:hover, .chip:hover { background: #f1f3f4; }
.city-chip { box-shadow: none; }
.city-chip[aria-pressed="true"], .chip[aria-pressed="true"] { background: #e8f0fe; color: #1967d2; border-color: #d2e3fc; }
.btn { font-weight: 500; box-shadow: none; color: #1a73e8; border-color: var(--line); }
.btn:hover { background: #f6fafe; }
.btn:active { transform: none; }
.option { background: #f8f9fa; border-color: transparent; }
.option.playing { border-color: var(--accent); }
.todo { border-width: 1px; }
.controls button { border: none; font-weight: 400; }
.controls button:active { transform: scale(0.96); box-shadow: var(--shadow); }
.loading { border: none; }

/* the map */
#board-edge { stroke: rgba(20, 30, 40, 0.25); stroke-width: 1; rx: 6px; }
#board-shadow { background: rgba(20, 30, 40, 0.08); left: 0; top: 3px; filter: blur(6px); }
.label text, .city text, .station text, .pin text { stroke: #fff; stroke-width: 3px; }
.label.country text { fill: #6b6f75; text-transform: none; }
.city text { fill: #3c4043; }
.city circle.dot { fill: #fff; stroke: #70757a; stroke-width: 1.5; }
.station rect { stroke: #fff; stroke-width: 1.5; }
/* routes in Google blue */
.trail-road-casing { stroke: #1967d2; stroke-width: 7; }
.trail-road { stroke: #4b8ef5; stroke-width: 4.5; }
.trail-train-casing { stroke: #fff; stroke-width: 7; }
.trail-train { stroke-width: 4; }
.rail-casing { stroke: #9aa0a6; stroke-width: 4; }
.rail { stroke: #fff; stroke-width: 2; }
.label.country text { font-weight: 500; font-size: 13px; letter-spacing: 0.04em; }
.label.estonia text { font-weight: 700; letter-spacing: 0.01em; fill: #202124; }
.city text, .station text { font-weight: 500; }
.origin-dot { fill: #ea4335; }
.pin text { font-weight: 700; }
.origin .pill { stroke: none; }
/* a soft shadow as a shape (a shadow filter made zooming slow on phones) */
.origin .pill-shadow { fill: #141e28; stroke: #141e28; stroke-width: 2.5; opacity: .1; transform: translate(-1.5px, -0.5px); }
.origin text { font-weight: 500; font-size: 12.5px; }
.origin:hover .pill { fill: #f2f5f7; }
.origin-dot { stroke: #fff; }
.main-road-casing { stroke-width: 5; }
.main-road { stroke-width: 3; }
.vm-banner span { border: none; font-weight: 700; }
.vm-pin-body { stroke: none; filter: drop-shadow(0 2px 4px rgba(20, 30, 40, 0.3)); }
.vm-label-bg { stroke: none; fill: rgba(255, 255, 255, 0.95); }
@media (max-width: 720px) {
  #sidebar { border-radius: 16px 16px 0 0; box-shadow: 0 -4px 24px rgba(20, 30, 40, 0.16); }
  .controls button { border: none; box-shadow: var(--shadow); }
}

/* the venue map */
#venue-view { background: #e3eed3; }
.vm-banner span { font-size: clamp(18px, 2vw, 24px); font-weight: 500; padding: 8px 22px; }
.vm-num-bg { stroke: #fff; stroke-width: 1.5; }
.vm-label text { font-weight: 500; }
.vm-credit { background: rgba(255, 255, 255, 0.85); }

/* with web-map tiles: the tiles carry place names and roads already */
.basemap #labels, .basemap #main-roads, .basemap .city, .basemap .pin.tallinn text { display: none; }
.map-credit {
  position: absolute;
  right: 76px;
  bottom: calc(6px + env(safe-area-inset-bottom));
  margin: 0;
  padding: 1px 6px;
  font-size: 11px;
  color: #5f6368;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 4px;
}
.map-credit a { color: inherit; }
.venue-open .map-credit { display: none; }
@media (max-width: 720px) {
  .map-credit { top: calc(4px + env(safe-area-inset-top)); right: 4px; bottom: auto; font-size: 10px; }
}

/* venue pins: white markers, names as plain map text */
#venue-view { background: #eef1e4; }
.vm-bob { animation: none; }
.vm-pin-body { fill: #fff; stroke: none; filter: drop-shadow(0 1px 3px rgba(60, 64, 67, 0.4)); }
.vm-pin.picked .vm-pin-body { fill: #fce8e6; }
.vm-num-bg { fill: #ea4335; stroke: #fff; stroke-width: 1.5; }
.vm-label-bg { display: none; }
.vm-label text { fill: #3c4043; font-weight: 500; font-size: 13px; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.vm-pin.picked .vm-label text { fill: #c5221f; }
.basemap #board-edge, .basemap #board-shadow { display: none; }

/* map data hosted with the site, drawn by MapLibre (js/vector-map.js) */
#vector-map { position: absolute; inset: 0; background: #aad3ee; }
.vector #pane { display: none; }
