:root {
  --ink: #2e3a59;
  --ink-soft: #5b6784;
  --card: #fffaf0;
  --accent: #ff7a7a;
  --wave: rgba(255, 255, 255, 0.9);
  --wake: rgba(255, 255, 255, 0.95);
  --estonia: #ffd35c;
  --ferry: #ff8f6b;
  --car: #e9585b;
  --car-roof: #c94448;
  --train: #f08a24; /* Elron orange */

  /* ---- look & feel (themes override these in theme.css) ---- */
  --font-display: "Fredoka", sans-serif;   /* headings, buttons, map labels */
  --font-map: var(--font-display);       /* place names on the map */
  --font-body: "Nunito", system-ui, sans-serif;
  --backdrop: #e9dcc0;  /* page around the map board */
  --surface: #fff;      /* panel body, selected tab */
  --line: var(--ink);   /* outlines of panels and buttons */
  --hover: #fff3c4;
  --link: #c2454a;
  --rule: rgba(46, 58, 89, 0.2);
  --bw-3: 3px;          /* outline widths: big, medium, small */
  --bw-2: 2.5px;
  --bw-1: 2px;
  --round: 1;           /* multiplies every corner radius */
  --pill: 999px;
  --shadow-lg: 4px 5px 0 var(--ink);
  --shadow: 3px 4px 0 var(--ink);
  --shadow-sm: 2px 3px 0 var(--ink);
  --shadow-soft: 3px 4px 0 rgba(46, 58, 89, 0.25);
  --compass-shadow: drop-shadow(3px 4px 0 var(--ink));
  --road: #ffd96a;
  --road-casing: var(--ink);
  --contrail-edge: #9d8df1;

}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--backdrop); /* same as the backdrop around the map board */
  color: var(--ink);
  font-family: var(--font-body);
  overflow: hidden;
}

.stage {
  position: fixed;
  inset: 0;
}

#map {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#map:active { cursor: grabbing; }

/* ---------- Map layers ---------- */

/* Terrain: tile images in one layer per zoom level, inside a pane that zoom/pan
   moves with a CSS transform (so the browser never redraws them while moving). */
#pane {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}
#board-shadow {
  position: absolute;
  left: 5px;
  top: 6px;
  border-radius: calc(14px * var(--round));
  background: var(--ink);
}
.level {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}
.tile {
  position: absolute;
  /* a hair larger than 256px so neighbouring tiles overlap and no seams show */
  width: 256.6px;
  height: 256.6px;
  opacity: 0;
  transition: opacity 0.2s;
}
.tile.in { opacity: 1; }
#board-edge {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
#map {
  position: absolute;
  inset: 0;
}

/* Counter-scaled content (<g class="cs">): lives at a map point, drawn in
   screen pixels. js/map.js scales these groups by 1/zoom × --ui (--ui shrinks
   them a little on phones; "cs-full" ones keep full size). */


/* Detail levels: #world[data-lvl] is set from the zoom level. */
#world[data-lvl="0"] .lvl-1,
#world[data-lvl="0"] .lvl-2,
#world[data-lvl="1"] .lvl-2,
#world[data-lvl="0"] .lvl-3,
#world[data-lvl="1"] .lvl-3,
#world[data-lvl="2"] .lvl-3,
#world:not([data-lvl="4"]) .lvl-4,
#world:not([data-lvl="0"]) .only-0 { display: none; }

/* ---------- Labels & markers ---------- */

.label text {
  font-family: var(--font-map);
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: var(--card);
  stroke-linejoin: round;
  pointer-events: none;
}
.label.country text {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  fill: var(--ink-soft);
  stroke-width: 3.5px;
  opacity: 0.85;
}
.label.estonia text {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  fill: var(--ink);
  stroke-width: 5px;
}

.city circle.dot {
  fill: var(--card);
  stroke: var(--ink);
  stroke-width: 2;
}
.city text {
  font-family: var(--font-map);
  font-size: 13px;
  font-weight: 600;
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--card);
  stroke-width: 4px;
  stroke-linejoin: round;
  dominant-baseline: middle;
}

.pin text {
  font-family: var(--font-map);
  font-weight: 700;
  font-size: 16px;
  fill: var(--ink);
  text-anchor: middle;
  paint-order: stroke;
  stroke: var(--card);
  stroke-width: 5px;
  stroke-linejoin: round;
}
.pin .badge {
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linejoin: round;
}
.pin .pulse {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  transform-origin: 0 0;
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  from { transform: scale(0.6); opacity: 0.9; }
  to   { transform: scale(2.2); opacity: 0; }
}
.pin .heart-beat {
  transform-origin: 0 0;
  animation: beat 2.2s ease-in-out infinite;
}
@keyframes beat {
  0%, 100% { transform: scale(1); }
  12%      { transform: scale(1.15); }
  24%      { transform: scale(1); }
  36%      { transform: scale(1.1); }
}


/* ---------- Trips: routes, trails, vehicles ---------- */

.plan, .trail {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
/* the way ahead, before the vehicle has got there: clear but lighter than the trail */
.plan { stroke-width: 2.4; stroke-dasharray: 1 6; }
.plan-air { stroke: #6f8fbf; stroke-opacity: 0.75; stroke-dasharray: 2 6; }
.plan-alt { stroke: #9f86d6; stroke-opacity: 0.8; stroke-dasharray: 2 6; }
.plan-road { stroke: #4b8ef5; stroke-opacity: 0.35; stroke-width: 5; stroke-dasharray: none; }
.plan-rail { stroke: #f08a24; stroke-opacity: 0.45; stroke-width: 4; stroke-dasharray: 5 4; }
/* the plane leaves a white contrail with a soft lavender edge */
.trail-casing { stroke: var(--contrail-edge); stroke-width: 6; stroke-opacity: 0.75; }
.trail-air { stroke: #fff; stroke-width: 2.4; }
/* the car paints its road red as it goes */
.trail-road-casing { stroke: #fff; stroke-width: 8; }
.trail-road { stroke: var(--car); stroke-width: 4.5; }

/* the roads guests will drive: bold cartoon roads */
.main-road-casing, .main-road {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.main-road-casing { stroke: var(--road-casing); stroke-width: 6; }
.main-road { stroke: var(--road); stroke-width: 3.2; }
/* hidden until their city is picked */
.trip { display: none; }
.trip.active { display: inline; }
.trip:not(.active) .plan { display: none; }

/* Tallinn → Mustjõe: the railway (classic black-and-white track), the last
   stretch from the station to the farm, and the train/car trails */
.rail-casing, .rail, .last-leg {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.rail-casing { stroke: var(--ink); stroke-width: 5; }
.rail { stroke: #fff; stroke-width: 2.4; stroke-dasharray: 6 6; stroke-linecap: butt; }
.last-leg { stroke: var(--accent); stroke-width: 2.4; stroke-dasharray: 2 6; }
.plan-local-car { stroke: #4b8ef5; stroke-opacity: 0.35; stroke-width: 5; stroke-dasharray: none; display: none; }
.plan-local-car.shown { display: inline; }
.trail-train-casing { stroke: #fff; stroke-width: 9; }
.trail-train { stroke: var(--train); stroke-width: 5; }
.vehicle.off { display: none; }

.station rect { fill: var(--train); stroke: var(--ink); stroke-width: 2; }
.station text {
  font: 600 13px var(--font-map);
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--card);
  stroke-width: 4px;
  stroke-linejoin: round;
  dominant-baseline: middle;
}

.vehicle, .origin { cursor: pointer; }
.vehicle use { transition: transform 0.15s; }
.vehicle:hover use { transform: scale(1.25); }

/* Trip cities: a dot on the city (a ring pulses out of it now and then) and a
   small pill with the name that gently bobs. */
.origin-dot { fill: var(--accent); stroke: var(--ink); stroke-width: 2; }
.origin-hit { fill: #000; fill-opacity: 0; }
.origin-leader { stroke: var(--ink); stroke-width: 1.2; opacity: .45; }
/* the names float gently */
.origin-pill { animation: bob 4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
/* (zoomed in on Tallinn the cities are far off screen: no need to keep them bobbing) */
#world[data-lvl="4"] .origin-pill { animation: none; }
/* (nor the ones off screen: js/map.js marks them .away) */
.away .origin-pill, .away .pulse, .away .heart-beat { animation: none; }
.origin .pill { fill: var(--card); stroke: var(--ink); stroke-width: 1.5; }
.origin .pill-shadow { fill: var(--ink); opacity: var(--pill-shadow, 1); }
.origin text {
  font-family: var(--font-map);
  font-size: 12.5px;
  font-weight: 700;
  fill: var(--ink);
  dominant-baseline: middle;
}
.origin:hover .pill,
.origin:focus-visible .pill { fill: var(--hover); }
.origin, .vehicle, .pin { outline: none; -webkit-tap-highlight-color: transparent; }
.origin:focus-visible .pill { stroke: var(--link); stroke-width: 3; }

/* ---------- Guide sidebar (a pull-up sheet on phones) ---------- */

#sidebar {
  position: absolute;
  z-index: 5;
  left: 16px;
  top: 16px;
  bottom: 16px;
  width: min(410px, 42vw);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: var(--bw-3) solid var(--line);
  border-radius: calc(18px * var(--round));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.sheet-grip { display: none; }
.sb-head { padding: 16px 20px 10px; }
.eyebrow {
  margin: 0;
  font: 600 14px var(--font-display);
  letter-spacing: 0.04em;
  color: var(--accent);
}
/* the title on one line (…-shortened if it must be) */
.sb-head h1 {
  margin: 2px 0 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 700 24px/1.2 var(--font-display);
}
/* the date (and countdown) beside "Are you coming?" and the calendar icon */
.head-actions { display: flex; align-items: center; gap: 8px; }
.head-when { flex: 1; min-width: 0; display: flex; flex-direction: column; margin: 0; font-size: 13px; line-height: 1.3; color: var(--ink-soft); }
.head-date { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.tabs {
  display: flex;
  gap: 4px;
  padding: 0 12px;
  border-bottom: var(--bw-2) solid var(--line);
}
.tabs button {
  flex: 1;
  margin-bottom: -2.5px;
  padding: 9px 6px 8px;
  font: 600 15px var(--font-display);
  color: var(--ink-soft);
  background: transparent;
  border: 2.5px solid transparent;
  border-bottom: none;
  border-radius: calc(12px * var(--round)) calc(12px * var(--round)) 0 0;
  cursor: pointer;
  white-space: nowrap;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--ink);
}
.tabs button:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }

.sb-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 20px 28px;
  background: var(--surface);
}
.tab[hidden] { display: none; }

/* long-form text */
.prose { font-size: 15px; line-height: 1.55; }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose h2, .sb-sub {
  margin: 20px 0 8px;
  font: 700 19px var(--font-display);
}
.prose h2:first-child { margin-top: 4px; }
.prose h3 { margin: 16px 0 6px; font: 700 16px var(--font-display); }
.prose a { color: var(--link); font-weight: 700; }
.prose .address { color: var(--ink-soft); font-size: 14px; }
.todo {
  padding: 8px 12px;
  font-size: 14px;
  color: #7a5a14;
  background: #fff6de;
  border: 2px dashed #e3a13b;
  border-radius: calc(10px * var(--round));
}

.shortcuts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--ink-soft);
}
.shortcuts span { margin-right: 2px; }
.shortcut {
  font: 600 13px var(--font-display);
  color: var(--ink);
  background: var(--card);
  border: var(--bw-1) solid var(--line);
  border-radius: var(--pill);
  padding: 4px 10px;
  min-height: 32px;
  cursor: pointer;
}
.shortcut:hover { background: var(--hover); }

/* travel options (train, car…) */
.option {
  margin: 14px 0 18px;
  padding: 12px 14px 6px;
  background: var(--card);
  border: var(--bw-2) solid var(--line);
  border-radius: calc(16px * var(--round));
  box-shadow: var(--shadow-soft);
}
.option h2, #trip-detail h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font: 700 18px var(--font-display);
}
.option h2 svg, #trip-detail h3 svg { width: 28px; height: 28px; overflow: visible; flex: none; }
.badge {
  padding: 2px 9px;
  font: 600 12px var(--font-body);
  color: #fff;
  background: var(--accent);
  border-radius: var(--pill);
}
.facts { margin: 0 0 10px; font-size: 15px; }
/* the one thing drivers must not miss: through Aegviidu */
.drive-via { margin: 8px 0 12px; padding: 9px 12px; font-size: 14px; line-height: 1.45; color: var(--ink); background: #fef7e0; border-left: 3px solid #f9ab00; border-radius: 6px; }
.option.playing { border-color: var(--accent); }

.city-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.city-chip {
  font: 600 15px var(--font-display);
  color: var(--ink);
  background: var(--surface);
  border: var(--bw-2) solid var(--line);
  border-radius: var(--pill);
  box-shadow: var(--shadow-sm);
  padding: 5px 14px;
  min-height: 38px;
  cursor: pointer;
}
.city-chip:hover { background: var(--hover); }
.city-chip[aria-pressed="true"] { background: var(--estonia); }

/* the picked city's details */
#trip-detail:empty { display: none; }
#trip-detail { margin-top: 10px; }
#trip-detail .codes {
  margin-left: auto;
  font: 600 13px var(--font-body);
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.trip-part { padding: 12px 0 4px; border-top: 2px dashed var(--rule); }
.trip-part p, .trip-dates p { margin: 0 0 10px; font-size: 14px; line-height: 1.45; }
.trip-part .muted, .trip-dates .muted { color: var(--ink-soft); }
.trip-dates { padding: 8px 0 6px; }
.drive-facts { font-size: 15px !important; }
.chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 13px;
}
.chip-row span { width: 64px; color: var(--ink-soft); }
.chip {
  font: 600 13px var(--font-body);
  color: var(--ink);
  background: var(--surface);
  border: var(--bw-1) solid var(--line);
  border-radius: var(--pill);
  padding: 5px 10px;
  min-height: 34px;
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--estonia); }
.flight-list { margin: 4px 0 10px; padding-left: 18px; font-size: 14px; }

.link-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.link-row.small .btn { font-size: 13px; padding: 5px 10px; box-shadow: var(--shadow-sm); }
.btn {
  display: inline-block;
  font: 600 14px var(--font-display);
  color: var(--ink);
  text-decoration: none;
  background: var(--card);
  border: var(--bw-2) solid var(--line);
  border-radius: calc(12px * var(--round));
  box-shadow: var(--shadow-sm);
  padding: 7px 12px;
  cursor: pointer;
}
.btn:hover { background: var(--hover); }
.btn:active { transform: translate(2px, 3px); box-shadow: none; }
.chip:focus-visible, .btn:focus-visible, .shortcut:focus-visible, .city-chip:focus-visible, .sheet-grip:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* ---------- The illustrated venue map ---------- */

#venue-view {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  background: #b9d48a;
}
#venue-view[hidden] { display: none; }
.venue-open .controls, .venue-open .compass { display: none; }
/* the big map isn't drawn while the farm's map covers it (phones: less memory) */
.venue-open #map, .venue-open #vector-map { visibility: hidden; }
/* (and its little animations stop: hidden, they still made the browser lay the
   whole map out again on every frame, under the farm's map) */
.venue-open #map * { animation-play-state: paused !important; }
#venue-canvas {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}
#venue-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}
#venue-svg:active { cursor: grabbing; }
/* (.vm-cs groups: scaled by 1/zoom from js/venue.js, so pins keep their size) */

.vm-pin { cursor: pointer; }
.vm-pin:focus { outline: none; }
.vm-bob { animation: var(--vm-bob, vm-bob) 2.6s ease-in-out infinite; }
@keyframes vm-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
.vm-pin-body { fill: var(--card); stroke: var(--ink); stroke-width: 2.5; }
.vm-pin:hover .vm-pin-body, .vm-pin:focus-visible .vm-pin-body { fill: var(--hover); }
.vm-pin.picked .vm-pin-body { fill: var(--estonia); }
.vm-pin.picked .vm-bob { animation-duration: 0.9s; }
.vm-icon { font-size: 18px; text-anchor: middle; dominant-baseline: central; }
.vm-num-bg { fill: var(--accent); stroke: var(--ink); stroke-width: 2; }
.vm-num { font: 700 11px var(--font-map); fill: #fff; text-anchor: middle; dominant-baseline: central; }
.vm-compact .vm-label { display: none; }
.vm-compact .vm-pin.picked .vm-label { display: inline; }
.vm-label-bg { fill: rgba(255, 250, 240, 0.92); stroke: var(--ink); stroke-width: 1.5; }
.vm-label text {
  font: 600 13px var(--font-map);
  fill: var(--ink);
  text-anchor: middle;
  dominant-baseline: central;
}
.vm-smoke circle {
  fill: rgba(255, 255, 255, 0.85);
  stroke: rgba(46, 58, 89, 0.3);
  animation: vm-smoke 2.7s ease-out infinite;
  opacity: 0;
}
@keyframes vm-smoke {
  0%   { transform: translate(0, 0) scale(0.4); opacity: 0; }
  20%  { opacity: 0.9; }
  100% { transform: translate(6px, -26px) scale(1.4); opacity: 0; }
}

.vm-banner {
  position: absolute;
  top: 18px;
  left: calc(min(410px, 42vw) + 32px);
  right: 16px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.vm-banner span {
  position: relative;
  padding: 8px 34px 10px;
  font: 700 clamp(20px, 2.4vw, 30px) var(--font-display);
  color: var(--ink);
  background: var(--card);
  border: var(--bw-3) solid var(--line);
  border-radius: calc(10px * var(--round));
  box-shadow: var(--shadow-lg);
}
.vm-back {
  position: absolute;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
}
.vm-credit {
  position: absolute;
  right: 16px;
  bottom: calc(64px + env(safe-area-inset-bottom));
  margin: 0;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--ink-soft);
  background: rgba(255, 250, 240, 0.8);
  border-radius: calc(6px * var(--round));
}
.vm-credit a { color: inherit; }

/* the list of places in the venue tab */
.muted-note { margin: -4px 0 10px; font-size: 13px; color: var(--ink-soft); }
.attractions { list-style: none; margin: 0 0 18px; padding: 0; }
.attractions li { border-bottom: 1.5px dashed var(--rule); }
.attractions button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 2px;
  font: 600 15px var(--font-display);
  color: var(--ink);
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.attractions button:hover { color: var(--link); }
.attractions .num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  font-size: 12px;
  color: #fff;
  background: var(--accent);
  border: var(--bw-1) solid var(--line);
  border-radius: 50%;
}
.attractions .icon { font-size: 18px; }
.attractions p { margin: 0 0 10px 36px; font-size: 14px; line-height: 1.5; }
.attractions li.open button { color: var(--ink); }
.attractions li.open { background: #fffbe9; }

/* ---------- Map controls ---------- */

.controls {
  position: absolute;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.controls button {
  width: 48px;
  height: 48px;
  font: 600 24px/1 var(--font-display);
  color: var(--ink);
  background: var(--card);
  border: var(--bw-3) solid var(--line);
  border-radius: calc(14px * var(--round));
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s, background 0.15s;
}
.controls button:hover { background: var(--surface); }
.controls button:active { transform: translate(3px, 4px); box-shadow: 0 0 0 var(--ink); }
.controls button:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }

.compass {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 64px;
  height: 64px;
  pointer-events: none;
  filter: var(--compass-shadow);
}
.compass text { font: 700 14px var(--font-map); fill: var(--ink); }

.loading {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 10px 18px;
  font: 600 16px var(--font-display);
  color: var(--ink);
  background: var(--card);
  border: var(--bw-3) solid var(--line);
  border-radius: var(--pill);
  box-shadow: var(--shadow);
  animation: breathe 1.4s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: 0.6; } }
.map-ready .loading { display: none; }

/* ---------- Phones & narrow screens: the guide becomes a bottom sheet ---------- */

@media (max-width: 720px) {
  #sidebar {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: auto;
    height: 52vh;
    height: 52dvh;
    border-bottom: none;
    border-radius: calc(22px * var(--round)) calc(22px * var(--round)) 0 0;
    box-shadow: 0 -3px 0 rgba(46, 58, 89, 0.25);
    transition: height 0.3s ease;
  }
  #sidebar.dragging { transition: none; }
  /* in its smallest state the sheet is just a handle: title, date and buttons, tabs */
  #sidebar[data-sheet="peek"] .sb-body { visibility: hidden; }
  .sb-head, .tabs, .sheet-grip { touch-action: none; }
  :root { --ui: 0.82; }
  .sheet-grip {
    display: block;
    flex: none;
    width: 100%;
    height: 22px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .sheet-grip span {
    display: block;
    width: 48px;
    height: 5px;
    margin: 0 auto;
    border-radius: calc(3px * var(--round));
    background: var(--ink-soft);
  }
  .sb-head { padding: 0 16px 8px; }
  .sb-head h1 { font-size: 18px; margin: 4px 0 6px; }
  .head-place { display: none; } /* (phones: just the date) */
  .eyebrow { display: none; }
  .tabs { padding: 0 8px; }
  .tabs button { font-size: 14px; padding: 8px 4px 7px; }
  .sb-body { padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); }
  .compass { display: none; }
  .controls {
    top: calc(12px + env(safe-area-inset-top));
    bottom: auto;
    left: 12px;
    right: auto;
  }
  #sidebar[data-sheet="full"] ~ .controls { display: none; }
  .controls button { width: 40px; height: 40px; font-size: 22px; border-width: 2.5px; box-shadow: var(--shadow-sm); }
  .vm-banner { left: 16px; top: 12px; }
  .vm-banner span { font-size: 19px; padding: 6px 24px 7px; }
  .vm-back { top: 64px; bottom: auto; right: 12px; }
  .vm-credit { display: none; }
  #world[data-lvl="0"] .city text,
  #world[data-lvl="0"] .label.country:not(.estonia) { display: none; }
  .label.estonia text { font-size: 16px; }
  .pin text { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .pin .pulse, .pin .heart-beat, .origin-pill, .vm-bob, .vm-smoke circle { animation: none; }
  #sidebar { transition: none; }
}

/* Mustjõe stop → the farm */
.leg-title { margin: 14px 0 6px; font: 600 15px var(--font-display); }
.legs { margin: 0 0 10px; padding-left: 18px; }
.legs li { margin-bottom: 6px; }
.todo-inline { color: #7a5a14; background: #fff6de; border-radius: 4px; padding: 0 4px; }
.walk-path { fill: none; stroke: #4b8ef5; stroke-width: 3.2; stroke-dasharray: 0.1 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.rail-stop circle { fill: #fff; stroke: #5f6368; stroke-width: 1.6; }
.rail-stop text { font: 500 11px var(--font-map); fill: #3c4043; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.walker circle, .van rect { }
.walker.off, .van.off { display: none; }

/* ---------- Quick-jump chips along the top of the map ---------- */
.map-chips {
  position: absolute;
  z-index: 3;
  top: 16px;
  left: calc(min(480px, 44vw) + 32px);
  right: 90px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}
.map-chips::-webkit-scrollbar { display: none; }
.map-chips button {
  flex: none;
  padding: 7px 14px;
  font: 500 14px var(--font-body);
  color: var(--ink);
  background: var(--surface);
  border: var(--bw-1) solid var(--line);
  border-radius: var(--pill);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  white-space: nowrap;
}
.map-chips button:hover { background: var(--hover); }
.map-chips button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.venue-open .map-chips { display: none; }

/* ---------- Welcome ---------- */
.welcome {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(32, 33, 36, 0.45);
  backdrop-filter: blur(2px);
}
.welcome[hidden] { display: none; }
.welcome-card {
  width: min(460px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 24px 24px 20px;
  background: var(--surface);
  border-radius: calc(16px * var(--round));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.welcome-card h2 { margin: 2px 0 10px; font: 500 26px/1.2 var(--font-display); }
.welcome-lead { margin: 0 0 16px; font-size: 16px; line-height: 1.55; }
.welcome-steps { list-style: none; margin: 0 0 14px; padding: 0; }
.welcome-steps li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; font-size: 15px; line-height: 1.45; }
.step-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font: 600 14px var(--font-body);
  color: #fff;
  background: var(--link);
  border-radius: 50%;
}
.welcome-tip { margin: 0 0 18px; padding: 10px 12px; font-size: 14px; line-height: 1.5; color: var(--ink-soft); background: var(--hover); border-radius: calc(10px * var(--round)); }
.only-phone { display: none; }
.btn.btn-primary { display: block; width: 100%; padding: 11px; font-size: 16px; text-align: center; color: #fff; background: var(--link); border-color: var(--link); }
.btn.btn-primary:hover { color: #fff; background: var(--link); filter: brightness(1.08); }
.help-btn {
  float: right;
  width: 30px;
  height: 30px;
  margin: -2px -4px 0 8px;
  font: 600 15px var(--font-body);
  color: var(--ink-soft);
  background: var(--surface);
  border: var(--bw-1) solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}
.help-btn:hover { color: var(--ink); background: var(--hover); }

/* the guide gets more room and larger text: it's the main thing to read */
@media (min-width: 721px) { #sidebar { width: min(480px, 44vw); } }
.prose { font-size: 16px; line-height: 1.6; }
.vm-banner { left: calc(min(480px, 44vw) + 32px); }

@media (max-width: 720px) {
  .only-phone { display: block; }
  .only-desk { display: none; }
  .map-chips {
    top: calc(10px + env(safe-area-inset-top));
    left: 0;
    right: 0;
    padding: 2px 12px;
  }
  .map-chips button { padding: 7px 12px; font-size: 14px; }
  /* pinch to zoom on phones; the chips take the top edge */
  .controls { display: none; }
  .map-credit { top: calc(52px + env(safe-area-inset-top)) !important; right: auto !important; left: 4px; }
  .vm-banner { top: calc(56px + env(safe-area-inset-top)); left: 16px; }
  .vm-back { top: calc(108px + env(safe-area-inset-top)); }
  .prose { font-size: 16px; }
  .welcome-card { padding: 20px 18px 16px; }
  .welcome-card h2 { font-size: 23px; }
}
#sidebar[data-sheet="full"] ~ .map-chips { display: none; }

/* ---------- Venue: places list and place card ---------- */
.attractions button { padding: 12px 4px; font: 500 16px var(--font-body); }
.attractions .icon { font-size: 22px; width: 30px; text-align: center; }
.attractions .pl-name { flex: 1; }
.attractions .pl-go { color: var(--ink-soft); font-size: 22px; }
.attractions li.open { background: var(--hover); }

.place-card {
  position: absolute;
  z-index: 6;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: min(400px, 36vw);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-radius: calc(16px * var(--round));
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.place-card[hidden] { display: none; }
.pc-close {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  font: 400 24px/1 var(--font-body);
  color: #fff;
  background: rgba(32, 33, 36, 0.55);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.pc-close:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
/* the photos: together, as a collage (1, 2, or 3 with a "+N" on the last) */
.pc-gallery { flex: none; display: grid; grid-auto-rows: 1fr; gap: 3px; aspect-ratio: 4 / 3; background: var(--surface); }
.pc-gallery[hidden] { display: none; }
.pc-gallery.n2 { grid-template-columns: 1fr 1fr; }
.pc-gallery.n2.wide { grid-template-columns: none; grid-template-rows: 1fr 1fr; aspect-ratio: 4 / 5; }
.pc-gallery.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 1; }
.pc-gallery.n3 .pc-shot:first-child { grid-row: span 2; }
.pc-gallery.n3.wide { grid-template-columns: 1fr 1fr; grid-template-rows: 2fr 1fr; aspect-ratio: 3 / 4; }
.pc-gallery.n3.wide .pc-shot:first-child { grid-row: auto; grid-column: span 2; }
.pc-shot { position: relative; min-width: 0; min-height: 0; padding: 0; overflow: hidden; background: #e8eaed; border: 0; cursor: zoom-in; }
.pc-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; } /* (the photo's own size doesn't stretch the collage) */
.pc-shot:hover img { transform: scale(1.03); }
.pc-shot:focus-visible { outline: 3px solid var(--link); outline-offset: -3px; }
.pc-more { position: absolute; inset: 0; display: grid; place-items: center; font: 600 24px var(--font-body); color: #fff; background: rgba(0, 0, 0, 0.45); }
/* …and big, over the whole page */
.pv { position: fixed; inset: 0; z-index: 100; background: rgba(12, 13, 15, 0.94); }
.pv[hidden] { display: none; }
.pv-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.pv-track::-webkit-scrollbar { display: none; }
.pv-track figure { flex: 0 0 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; margin: 0; padding: 56px 16px 48px; box-sizing: border-box; scroll-snap-align: center; }
.pv-track img { max-width: 100%; min-height: 0; flex: 0 1 auto; object-fit: contain; border-radius: 4px; }
.pv-track figcaption { flex: none; max-width: 640px; font-size: 15px; color: #e8eaed; text-align: center; }
.pv-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; font: 400 34px/1 var(--font-body); color: #fff; background: rgba(255, 255, 255, 0.12); border: 0; border-radius: 50%; cursor: pointer; }
.pv-btn:hover { background: rgba(255, 255, 255, 0.24); }
.pv-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pv-btn[hidden] { display: none; }
.pv-prev, .pv-next { top: 50%; transform: translateY(-50%); }
.pv-prev { left: 16px; }
.pv-next { right: 16px; }
.pv-close { top: 12px; right: 12px; width: 44px; height: 44px; font-size: 30px; }
.pv-count { position: absolute; left: 0; right: 0; bottom: 12px; margin: 0; font-size: 14px; color: #bdc1c6; text-align: center; pointer-events: none; }
@media (hover: none) and (max-width: 720px) {
  .pv-prev, .pv-next { display: none; } /* (phones swipe) */
}
/* something guests must not miss */
.must-know { margin: 8px 0 12px; padding: 10px 12px; font-size: 15px; line-height: 1.45; color: #5c0b06; background: #fce8e6; border-left: 4px solid #d93025; border-radius: 6px; }
.must-know strong { color: #a50e0e; }
.must-know:empty { display: none; }
.pc-body { flex: 1; overflow-y: auto; padding: 14px 20px 20px; }
.pc-title { margin: 0 0 10px; font: 500 22px/1.25 var(--font-display); }
.pc-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 12px; font-size: 14px; }
.pc-facts:empty { display: none; }
.pc-facts dt { color: var(--ink-soft); }
.pc-facts dd { margin: 0; }
.pc-text p { margin: 0 0 10px; font-size: 16px; line-height: 1.6; }

@media (max-width: 720px) {
  /* on phones the card slides over everything from the bottom */
  .place-card {
    position: fixed;
    z-index: 15;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: 82dvh;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.25);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .pc-gallery { max-height: 56dvh; } /* (some of the text still shows below) */
}
.vm-life { pointer-events: none; }
.vm-deco-label text { font: 500 12px var(--font-body); fill: #5f6368; text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
/* the Helsinki + ferry way, alongside the direct flight */
.trail-alt { stroke: #b39ddb; }
.trail-ferry { stroke: #fff; stroke-width: 3; stroke-dasharray: 1 5; stroke-linecap: round; }
.trip:not(.active) .vehicle.alt, .trip:not(.active) .vehicle.ferry { display: none; }

/* venue map styles (js/venue-styles.js): background and a gentle light */
body[data-venue-style="meadow"] #venue-view { background: #ece7cb; }
body[data-venue-style="nordic"] #venue-view { background: #dfe4cf; }
body[data-venue-style="golden"] #venue-view { background: #e9e3b2; }
body[data-venue-style="watercolour"] #venue-view { background: #f1ecdc; }
#venue-view::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
body[data-venue-style="golden"] #venue-view::after {
  background: radial-gradient(ellipse at 20% 10%, rgba(255, 214, 140, 0.28), transparent 60%),
              radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(120, 70, 20, 0.18));
}
body[data-venue-style="meadow"] #venue-view::after { background: radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(120, 100, 50, 0.12)); }
body[data-venue-style="nordic"] #venue-view::after { background: radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(30, 50, 45, 0.14)); }
body[data-venue-style="watercolour"] #venue-view::after { background: radial-gradient(ellipse at 50% 50%, transparent 65%, rgba(140, 120, 90, 0.14)); }
/* warmer pins and names on the cosier styles */
body:not([data-venue-style="clean"]) .vm-pin-body { fill: #fffaf0; }
body[data-venue-style="nordic"] .vm-label text { fill: #2f3a33; }
body[data-venue-style="golden"] .vm-label text,
body[data-venue-style="meadow"] .vm-label text { fill: #4a3a28; stroke: #fff8e8; }
body[data-venue-style="watercolour"] .vm-label text { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 14px; fill: #4b3b2c; stroke: #fbf6ea; }
#venue-view::after { z-index: 1; }
#venue-svg { z-index: 2; }
.vm-back, .vm-credit { z-index: 3; }
/* flight trails, coloured by altitude (see altColor in js/map.js) */
.trail-flight { fill: none; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* venue places: the building is the button; a small tag names it */
.vm-hit { fill: rgba(255, 244, 214, 0); stroke: none; cursor: pointer; transition: fill 0.2s; }
.vm-hit:hover, .vm-hit.hover { fill: rgba(255, 244, 214, 0.35); stroke: rgba(255, 255, 255, 0.9); stroke-width: 0.6; }
.vm-hit.picked { fill: rgba(255, 236, 190, 0.4); stroke: #c0522f; stroke-width: 0.9; }
.vm-tag-bg { fill: rgba(255, 251, 240, 0.88); stroke: rgba(120, 90, 50, 0.25); stroke-width: 1; }
.vm-tag-icon { font-size: 12px; text-anchor: middle; dominant-baseline: central; }
.vm-tag .vm-label { font: 500 12px var(--font-body); fill: #4a3a28; dominant-baseline: central; paint-order: normal; stroke: none; }
.vm-pin:hover .vm-tag-bg, .vm-pin:focus-visible .vm-tag-bg { fill: #fff; }
.vm-pin.picked .vm-tag-bg { fill: #fff; stroke: #c0522f; }
.vm-pin.picked .vm-tag .vm-label { fill: #c0522f; }
/* far out: just the icon in a small round badge */
.vm-compact .vm-tag .vm-label { display: none; }
/* Mustjõe stop: clickable; the way to the farm stands out once picked */
.station-arrive { cursor: pointer; outline: none; }
.station-arrive:hover rect { stroke-width: 3; }
.arrival-focus .walk-path { stroke: #1a73e8; stroke-width: 5; stroke-dasharray: 0.1 8; }
.leg-title.flash { animation: leg-flash 1.6s ease-out; border-radius: 6px; }
@keyframes leg-flash { 0%, 40% { background: #fde293; } 100% { background: transparent; } }

/* language switcher in the guide's header */
/* the language: one small button ("EN ▾"), a menu with all three under it */
.lang-switch { position: relative; float: right; margin: 2px 8px 0 0; }
.lang-now { padding: 4px 7px; font: 600 11px var(--font-body); letter-spacing: 0.04em; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.lang-now::after { content: " ▾"; font-size: 9px; }
.lang-now:hover { background: var(--hover); }
.lang-menu { position: absolute; z-index: 30; right: 0; top: calc(100% + 4px); min-width: 120px; padding: 4px; background: var(--surface); border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2); }
.lang-menu[hidden] { display: none; }
.lang-menu button { display: block; width: 100%; padding: 8px 10px; font: 500 14px var(--font-body); color: var(--ink); text-align: left; background: none; border: 0; border-radius: 6px; cursor: pointer; }
.lang-menu button:hover, .lang-menu button:focus-visible { background: var(--hover); outline: none; }
.lang-menu button[aria-checked="true"] { font-weight: 700; }
.lang-menu button[aria-checked="true"]::after { content: " ✓"; color: var(--link); }
.countdown { color: var(--accent); font-weight: 500; white-space: nowrap; }
.countdown:empty { display: none; }
.welcome-countdown { margin: -6px 0 14px; font-size: 15px; }

/* ---------- Tips tab ---------- */
.stays { display: grid; gap: 10px; margin-bottom: 18px; }
.stay { padding: 12px 14px 8px; background: #f8f9fa; border-radius: calc(12px * var(--round)); }
.stay h3 { margin: 0 0 4px; font: 500 16px var(--font-display); }
.stay p { margin: 0 0 8px; font-size: 15px; line-height: 1.5; }
.facts-list { list-style: none; padding: 0; }
.facts-list li { margin-bottom: 8px; }
.packing { list-style: none; margin: 0 0 18px; padding: 0; }
.packing li { display: flex; align-items: center; gap: 10px; padding: 7px 2px; border-bottom: 1px solid var(--rule); font-size: 15px; }
.packing input { width: 20px; height: 20px; accent-color: var(--link); flex: none; }
.packing input:checked + label { color: var(--ink-soft); text-decoration: line-through; }
.phrases { list-style: none; margin: 0 0 18px; padding: 0; }
.phrases li { display: grid; grid-template-columns: 36px 1fr; grid-template-areas: "say et" "say sound" "say mean"; column-gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.phrases .say { grid-area: say; align-self: center; width: 32px; height: 32px; font-size: 13px; color: var(--link); background: #e8f0fe; border: 0; border-radius: 50%; cursor: pointer; }
.phrases .say:hover { background: #d2e3fc; }
.ph-et { grid-area: et; font: 600 16px var(--font-display); }
.ph-sound { grid-area: sound; font-size: 13px; color: var(--ink-soft); font-style: italic; }
.ph-mean { grid-area: mean; font-size: 14px; }
@media (max-width: 720px) { .tabs button { font-size: 13px; padding: 8px 2px 7px; } }

/* "you are here" */
.locate-btn {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: calc(132px + env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #5f6368;
  background: var(--surface);
  border: 0;
  border-radius: calc(14px * var(--round));
  box-shadow: var(--shadow);
  cursor: pointer;
}
.locate-btn svg { width: 24px; height: 24px; }
.locate-btn.on { color: var(--link); }
.locate-btn.busy svg { animation: breathe 1s ease-in-out infinite; }
.venue-open .locate-btn { display: none; }
.me-ring { fill: rgba(66, 133, 244, 0.15); stroke: rgba(66, 133, 244, 0.4); stroke-width: 1; vector-effect: non-scaling-stroke; }
.me-halo { fill: rgba(66, 133, 244, 0.2); transform-origin: 0 0; }
/* (only once it's shown: even hidden, a running animation makes the browser redo the map every frame) */
.me.on .me-halo { animation: pulse 2s ease-out infinite; }
.me-dot { fill: #4285f4; stroke: #fff; stroke-width: 2.5; }
.toast {
  position: absolute;
  z-index: 25;
  left: 50%;
  top: 70px;
  transform: translateX(-50%);
  max-width: min(420px, calc(100% - 32px));
  margin: 0;
  padding: 10px 16px;
  font-size: 14px;
  color: #fff;
  background: rgba(32, 33, 36, 0.92);
  border-radius: 10px;
}
.toast[hidden] { display: none; }
@media (max-width: 720px) {
  .locate-btn { top: calc(58px + env(safe-area-inset-top)); bottom: auto; right: 12px; width: 42px; height: 42px; }
  #sidebar[data-sheet="full"] ~ .locate-btn { display: none; }
}

/* photo points on the big map */
.photo-point { cursor: pointer; outline: none; }
.photo-point circle { fill: #fff; stroke: #5f6368; stroke-width: 1.2; }
.photo-point text { font-size: 10px; }
.photo-point:hover circle:not(.shadow), .photo-point:focus-visible circle:not(.shadow) { stroke: var(--link); stroke-width: 2; }

/* ---------- Plan my trip ---------- */
.map-chips .chip-plan { color: #fff; background: var(--link); border-color: var(--link); font-weight: 500; }
.map-chips .chip-plan:hover { background: #1557b0; }
.plan-open { width: 100%; padding: 10px; font-size: 15px; border-radius: 8px; }
.planner-card { position: relative; width: min(560px, 100%); }
.planner-card h2 { margin: 2px 0 6px; font: 500 24px/1.2 var(--font-display); }
.planner .planner-close { top: 12px; right: 12px; color: var(--ink); background: #f1f3f4; }
.plan-q { margin: 16px 0 8px; font: 600 15px var(--font-body); }
.plan-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-choices .city-chip { font-size: 14px; min-height: 34px; }
.plan-time { font: 16px var(--font-body); padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
.plan-bar { display: flex; gap: 2px; height: 26px; margin: 4px 0 14px; border-radius: 13px; overflow: hidden; }
.plan-bar .seg { display: grid; place-items: center; min-width: 22px; font-size: 13px; }
.seg-air, .step-air .step-icon { background: #d2e3fc; }
.seg-ferry, .step-ferry .step-icon { background: #c8e6f5; }
.seg-train, .step-train .step-icon { background: #fde0c2; }
.seg-car, .step-car .step-icon { background: #d4edda; }
.seg-local, .step-local .step-icon { background: #ececec; }
.seg-walk, .step-walk .step-icon { background: #e6f4d7; }
.step-end .step-icon { background: #fce8e6; }
.timeline { list-style: none; margin: 0 0 8px; padding: 0; }
.step { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--line); }
.step-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: 17px; }
.step-main { flex: 1; min-width: 0; }
.step-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font-size: 15px; }
.step-dur { color: var(--ink-soft); font-size: 13px; white-space: nowrap; }
.step p { margin: 3px 0 6px; font-size: 14px; line-height: 1.45; color: #3c4043; }

/* ---------- add to calendar ---------- */
.cal-wrap { position: relative; display: inline-block; }
.cal-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 6px 0 0; padding: 5px 12px; font: 500 13px var(--font-body); color: var(--link); background: var(--surface); border: 1px solid var(--line); border-radius: var(--pill); cursor: pointer; }
.cal-btn:hover { background: #f6fafe; }
.cal-menu { position: absolute; z-index: 30; left: 0; top: calc(100% + 6px); min-width: 250px; padding: 6px; background: var(--surface); border-radius: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2); }
.cal-menu[hidden] { display: none; }
.cal-menu a, .cal-menu button { display: block; width: 100%; padding: 9px 12px; font: 14px var(--font-body); color: var(--ink); text-align: left; text-decoration: none; background: none; border: 0; border-radius: 8px; cursor: pointer; }
.cal-menu a:hover, .cal-menu button:hover { background: #f1f3f4; }
.welcome .cal-wrap { display: flex; }
.welcome .cal-btn { width: 100%; margin: 0; justify-content: center; padding: 10px; font-size: 15px; border-radius: 8px; }

/* ---------- In Tallinn: tram lines, trams and places (js/map.js) ---------- */
#world:not([data-lvl="4"]) .city-layer { display: none; }
#world[data-lvl="4"] .not-4 { display: none; }
.tram-casing, .tram-path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tram-casing { stroke: #fff; stroke-width: 5; }
.tram-path { stroke: var(--line); stroke-width: 2.5; opacity: .55; }
.tram-line.key .tram-casing { stroke-width: 8; }
.tram-line.key .tram-path { stroke-width: 4.5; opacity: 1; }
.city-layer.focus .tram-line:not(.focused) { opacity: .15; }
.city-layer.overview:not(.focus) .tram-line:not(.key) { opacity: .6; }
.city-layer.overview:not(.focus) .tram:not(.key) { opacity: .55; }
.city-layer.overview:not(.focus) .tram-end:not(.key) { display: none; }
.city-layer.far .tram-end { display: none; }
/* while the train and car to Mustjõe play, the trams step right back */
#world.local-trip .city-layer { opacity: .3; }
#world.local-trip .city-layer .tram-stop, #world.local-trip .city-layer .tram-end, #world.local-trip .city-layer .trams { display: none; }
#world.local-trip .city-place { opacity: .45; }
#world.local-trip .city-place .name { display: none; }
.city-layer.focus .tram-line.focused .tram-path { stroke-width: 5; opacity: 1; }
.city-layer.focus .tram:not(.focused) { opacity: .2; }
.tram-stop circle { fill: #fff; stroke: #5f6368; stroke-width: 1.3; }
.tram-stop.key circle { stroke: var(--ink); stroke-width: 1.6; }
.tram-stop text { font: 500 10.5px var(--font-map); fill: #3c4043; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.tram-end text, .tram text { font: 700 11px var(--font-map); fill: #fff; text-anchor: middle; }
.tram-end rect { stroke: #fff; stroke-width: 1.5; }
#map .tram .tram-body { stroke: #fff; stroke-width: 2; }
.tram-hit { fill: none; stroke: #000; stroke-width: 18; stroke-linecap: round; vector-effect: non-scaling-stroke; visibility: hidden; pointer-events: stroke; cursor: pointer; }
#map .tram, .tram-end { cursor: pointer; }
#world.local-trip .tram-hit { pointer-events: none; }
/* quiet tram lines (outside "In Tallinn", or there once a picked line is let go again):
   thin and pale like the other lines, no stops or line numbers; the trams themselves stay */
.city-layer.quiet:not(.focus) .tram-casing, .city-layer.quiet:not(.focus) .tram-line.key .tram-casing { stroke-width: 3.5; }
.city-layer.quiet:not(.focus) .tram-path, .city-layer.quiet:not(.focus) .tram-line.key .tram-path { stroke-width: 1.8; opacity: .45; }
.city-layer.quiet:not(.focus) .tram-line { opacity: 1; }
.city-layer.quiet:not(.focus) .tram-end, .city-layer.quiet:not(.focus) .tram-stop { display: none; }
.city-layer.quiet:not(.focus) .tram { opacity: .8; }
#map .tram .tram-shadow { fill: #000; opacity: .16; }
/* the way a tram is going: a little arrow on its edge */
#map .tram .tram-dir path { stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; } /* (a shape, not a shadow filter: trams move all the time) */
#map .trams.is-live .tram .tram-body { stroke: #fff; stroke-width: 2.5; }
.city-place { cursor: pointer; outline: none; }
.city-place circle { fill: #fff; stroke: var(--ink); stroke-width: 1.8; }
.city-place circle.shadow, .photo-point circle.shadow { fill: #000; stroke: none; opacity: .14; } /* (shapes: shadow filters are slow to redraw while zooming) */
.city-place .icon { font-size: 13px; }
.city-place .name { font: 700 12.5px var(--font-map); fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.city-place:hover circle:not(.shadow), .city-place:focus-visible circle:not(.shadow) { stroke: var(--link); stroke-width: 2.5; }

/* the guide: tram line buttons, live badge, trips list */
.tram-lines { display: grid; gap: 6px; margin: 4px 0 8px; }
.tram-btn {
  display: flex; align-items: center; gap: 10px; text-align: left;
  font: inherit; font-size: 14px; color: var(--ink); background: var(--card);
  border: 1px solid #dadce0; border-radius: 10px; padding: 7px 10px; cursor: pointer;
}
.tram-btn:hover { background: #f1f3f4; }
.tram-btn[aria-pressed="true"] { border-color: var(--link); box-shadow: 0 0 0 1px var(--link) inset; background: #e8f0fe; }
.tram-num {
  flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px;
  background: var(--line, #e8710a); color: #fff; font-weight: 700;
}
.live-badge { font-size: 12px; font-weight: 700; color: #1e9e57; background: #e6f4ea; border-radius: 10px; padding: 2px 8px; vertical-align: middle; }
.city-trips { padding-left: 18px; margin: 4px 0 10px; }
.city-trips li { margin: 6px 0; line-height: 1.45; }

/* ---------- The how-to-pay decks (js/tickets.js) ---------- */
.deck { margin: 6px 0 10px; }
.deck-stage { position: relative; border-radius: 14px; overflow: hidden; background: #eaf3fb; border: 1px solid #dadce0; cursor: pointer; }
.deck-stage svg { display: block; width: 100%; height: auto; aspect-ratio: 320 / 180; }
.deck-step { position: absolute; top: 8px; right: 10px; font-size: 12px; font-weight: 700; color: #5f6368; background: rgba(255, 255, 255, .85); border-radius: 10px; padding: 1px 8px; }
.deck-caption { min-height: 3em; margin: 8px 2px 4px; line-height: 1.45; }
.deck-nav { display: flex; align-items: center; justify-content: center; gap: 10px; }
.deck-nav > button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #dadce0; background: var(--card); font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink); }
.deck-nav > button:hover { background: #f1f3f4; }
.deck-dots { display: flex; gap: 6px; }
.deck-dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: #c4c7c5; cursor: pointer; }
.deck-dots button[aria-current="true"] { background: var(--link); width: 22px; border-radius: 5px; }
/* Ticket decks: the drawings (js/tickets.js) — flat colours, one ink outline */
.deck svg text { font-family: var(--font-map); }
.deck svg .scr { fill: #fff; font-size: 8px; font-weight: 700; text-anchor: middle; }
.deck svg .scr.small { font-size: 5.5px; font-weight: 500; fill: #c9d2dc; }
.deck svg .scr-ok .scr.small { fill: #fff; }
.deck svg .scr-list { fill: #fff; font-size: 6.5px; font-weight: 500; }
.deck svg .visa { fill: #fff; font: italic 900 8px var(--font-map); }
.deck svg .led-text { fill: #ffb020; font: 700 5.4px ui-monospace, monospace; }
.deck svg .elron { fill: #fff; font-size: 12px; font-weight: 800; }
.deck svg .elron.dark { fill: #ee6a06; font-size: 9px; text-anchor: middle; }
.deck svg .station { fill: #7a6a48; font-size: 11px; font-weight: 800; letter-spacing: 3px; text-anchor: middle; }
.deck svg .stop { fill: #2e3a59; font-size: 5px; font-weight: 700; text-anchor: middle; }
.deck svg .chip { fill: #fff; font-size: 6px; font-weight: 700; text-anchor: middle; }
.deck svg .badge { fill: #2e3a59; font-size: 3.6px; font-weight: 800; text-anchor: middle; }
.deck svg .tag-text { font-size: 10px; font-weight: 700; fill: #2e3a59; text-anchor: middle; }
.deck svg .waves path { stroke: #ff7a1a; }
.deck svg .waves.ok path { stroke: #1e9e57; }
.deck svg .reader-scr { fill: #7d8791; }

/* the motion (restarted on each step: svg.play) */
.deck svg .leg, .deck svg .wheel, .deck svg .pulse, .deck svg .tag, .deck svg .flag, .deck svg .scr-ok { transform-box: fill-box; }
/* the tram / train pulls in and slows to a stop; its wheels turn; the pantograph sways */
.deck svg.play .arrive { animation: tk-arrive 2s cubic-bezier(.15, .6, .3, 1) both; }
@keyframes tk-arrive { from { transform: translateX(-300px); } }
.deck svg .wheel { transform-origin: center; }
.deck svg.play .wheel { animation: tk-roll 2s cubic-bezier(.15, .6, .3, 1) both; }
@keyframes tk-roll { from { transform: rotate(-1440deg); } }
.deck svg.play .arrive .tram-body { animation: tk-sway 2s ease-out both; }
@keyframes tk-sway { 0%, 80% { transform: translateY(0); } 88% { transform: translateY(1.2px); } 100% { transform: translateY(0); } }
/* doors slide open once it has stopped */
.deck svg.play .leaf-l { animation: tk-open-l .6s ease-in-out 2.1s both; }
.deck svg.play .leaf-r { animation: tk-open-r .6s ease-in-out 2.1s both; }
@keyframes tk-open-l { to { transform: translateX(-9px); } }
@keyframes tk-open-r { to { transform: translateX(9px); } }
.deck svg .door-light { opacity: 0; }
.deck svg.play .door-light { animation: tk-blink .5s steps(1) 2.1s 6 both; }
@keyframes tk-blink { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }
/* and in you go, legs swinging, the suitcase bumping along */
.deck svg.play .walk-in { animation: tk-walk 3s linear 2.4s both; }
@keyframes tk-walk { 0% { transform: translateX(-40px); } 88% { transform: translateX(242px); opacity: 1; } 100% { transform: translateX(247px); opacity: 0; } }
.deck svg.play .walk-in.train { animation-name: tk-walk-train; animation-duration: 2s; }
@keyframes tk-walk-train { 0% { transform: translateX(-40px); } 85% { transform: translateX(38px); opacity: 1; } 100% { transform: translateX(43px); opacity: 0; } }
.deck svg .leg { transform-origin: 50% 0; }
.deck svg.play .walk-in .leg-a { animation: tk-step .32s ease-in-out infinite alternate; }
.deck svg.play .walk-in .leg-b { animation: tk-step .32s ease-in-out infinite alternate-reverse; }
@keyframes tk-step { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }
.deck svg.play .walk-in .case { animation: tk-bump .16s ease-in-out infinite alternate; }
@keyframes tk-bump { to { transform: translateY(-1px); } }
.deck svg .flag { transform-origin: 0 50%; }
.deck svg.play .flag { animation: tk-flag 1.2s ease-in-out infinite alternate; }
@keyframes tk-flag { to { transform: skewY(6deg) scaleX(.9); } }
/* look here: a pulsing ring and a nudging arrow */
.deck svg .pulse { transform-origin: center; }
.deck svg.play .pulse { animation: tk-pulse 1.5s ease-out infinite; }
@keyframes tk-pulse { from { transform: scale(.8); opacity: .9; } to { transform: scale(1.15); opacity: 0; } }
.deck svg.play .nudge { animation: tk-nudge 1s ease-in-out infinite; }
@keyframes tk-nudge { 50% { transform: translateX(-7px); } }
.deck svg.play .validator .led { animation: tk-led 1.4s ease-in-out infinite alternate; }
@keyframes tk-led { to { opacity: .35; } }
/* the card comes in, touches the reader, rests a moment, goes */
.deck svg.play .tapping { animation: tk-tap 3.2s ease-in-out infinite; }
@keyframes tk-tap {
  0% { transform: translate(130px, 50px) rotate(14deg); }
  32%, 70% { transform: translate(0, 0) rotate(0); }
  100% { transform: translate(130px, 50px) rotate(14deg); }
}
.deck svg.play .waves.tap path { opacity: 0; animation: tk-wave 3.2s ease-out infinite; }
.deck svg.play .waves.tap path:nth-child(2) { animation-delay: .1s; }
.deck svg.play .waves.tap path:nth-child(3) { animation-delay: .2s; }
@keyframes tk-wave { 0%, 33% { opacity: 0; } 40% { opacity: 1; } 68%, 100% { opacity: 0; } }
.deck svg .scr-busy { opacity: 0; }
.deck svg.play .scr-busy { animation: tk-busy 3.2s steps(1) infinite; }
@keyframes tk-busy { 0% { opacity: 0; } 33% { opacity: 1; } 70% { opacity: 0; } }
.deck svg.play .scr-busy .dot { animation: tk-dot .5s ease-in-out infinite alternate; }
.deck svg.play .scr-busy .d1 { animation-delay: .17s; }
.deck svg.play .scr-busy .d2 { animation-delay: .34s; }
@keyframes tk-dot { to { transform: translateY(-3px); opacity: .4; } }
/* paid: the screen turns green with a pop, it beeps */
.deck svg .scr-ok { transform-origin: center; }
.deck svg.play .validator .scr-ok { animation: tk-pop-in .4s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes tk-pop-in { from { transform: scale(.5); opacity: 0; } }
.deck svg.play .waves.ok path { opacity: 0; animation: tk-beep 1.3s ease-out infinite; }
.deck svg.play .waves.ok path:nth-child(2) { animation-delay: .12s; }
.deck svg.play .waves.ok path:nth-child(3) { animation-delay: .24s; }
.deck svg.play .waves.ok.late path { animation-delay: 1.3s; }
@keyframes tk-beep { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
.deck svg .tag { transform-origin: center; }
.deck svg.play .tag.pop { animation: tk-pop .45s cubic-bezier(.3, 1.6, .5, 1) .5s both; }
.deck svg.play .tag.pop.late { animation-delay: 1.2s; }
@keyframes tk-pop { from { opacity: 0; transform: scale(.3); } }
.deck svg.play .bob { animation: tk-bob 1.6s ease-in-out infinite alternate; }
@keyframes tk-bob { to { transform: translateY(-4px) rotate(-3deg); } }
/* a ticket check: the card goes to the reader, which beeps green */
.deck svg.play .show { animation: tk-show 3s ease-in-out infinite; }
@keyframes tk-show { 0%, 100% { transform: translate(0, 0); } 40%, 75% { transform: translate(167px, 29px) rotate(-8deg); } }
.deck svg.play .show.train { animation-name: tk-show-train; }
@keyframes tk-show-train { 0%, 100% { transform: translate(0, 0); } 40%, 75% { transform: translate(148px, 29px) rotate(-8deg); } }
.deck svg.play .reader-scr { animation: tk-reader 3s steps(1) infinite; }
@keyframes tk-reader { 0% { fill: #7d8791; } 45% { fill: #3ad07a; } 78% { fill: #7d8791; } }
/* one step: tap the card, and while it's on the reader the screen goes green, it beeps, the price shows */
.deck svg .validator.tap .scr-ok, .deck svg .led-ok, .deck svg .sync { opacity: 0; }
.deck svg.play .validator.tap .scr-ok, .deck svg.play .led-ok { animation: tk-paid 3.2s steps(1) infinite; }
.deck svg.play .validator.tap .scr-idle { animation: tk-unpaid 3.2s steps(1) infinite; }
@keyframes tk-paid { 0% { opacity: 0; } 38% { opacity: 1; } 76% { opacity: 0; } }
@keyframes tk-unpaid { 0% { opacity: 1; } 38% { opacity: 0; } 76% { opacity: 1; } }
.deck svg.play .sync { animation: tk-sync 3.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.deck svg.play .sync.late { animation-name: tk-sync-late; }
@keyframes tk-sync { 0%, 38% { opacity: 0; transform: scale(.4); } 44%, 74% { opacity: 1; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(1); } }
@keyframes tk-sync-late { 0%, 46% { opacity: 0; transform: scale(.4); } 52%, 74% { opacity: 1; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(1); } }
.deck svg.play .waves.ok.sync path { animation: tk-sync-beep 3.2s ease-out infinite; }
.deck svg.play .waves.ok.sync path:nth-child(2) { animation-delay: .1s; }
.deck svg.play .waves.ok.sync path:nth-child(3) { animation-delay: .2s; }
@keyframes tk-sync-beep { 0%, 38% { opacity: 0; } 44% { opacity: 1; } 60%, 100% { opacity: 0; } }
.deck svg .halt-name { fill: #2e3a59; font-size: 8px; font-weight: 800; text-anchor: middle; letter-spacing: .5px; }
/* the train: choose the stop, then pay */
.deck svg .mini-visa { fill: #fff; font: italic 900 4.4px var(--font-map); text-anchor: middle; }
.deck svg .tap-ring { transform-box: fill-box; transform-origin: center; opacity: 0; }
.deck svg.play .tap-ring { animation: tk-tap-ring 2.6s ease-out infinite; }
@keyframes tk-tap-ring { 0%, 36% { transform: scale(1); opacity: 0; } 40% { opacity: 1; } 75%, 100% { transform: scale(3.4); opacity: 0; } }
.deck svg .tap-mark > circle { transform-box: fill-box; transform-origin: center; }
.deck svg.play .tap-mark > circle { animation: tk-tap-dot 2.6s ease-in-out infinite; }
@keyframes tk-tap-dot { 0%, 30% { transform: scale(0); } 40% { transform: scale(1.2); } 50%, 80% { transform: scale(1); } 90%, 100% { transform: scale(0); } }
.deck svg.play .validator:not(.busy):not(.ok) .sticker { animation: tk-sticker 1.4s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes tk-sticker { to { transform: scale(1.15); } }
.deck svg.play .pointing { animation: tk-point 2.6s ease-in-out infinite; }
@keyframes tk-point { 0%, 100% { transform: translate(30px, 34px); } 38%, 72% { transform: translate(0, 0); } }
.deck svg.play .row.pick rect { animation: tk-pick 2.6s steps(1) infinite; }
@keyframes tk-pick { 0% { fill: #2f3b52; } 40% { fill: #1e9e57; } 90% { fill: #2f3b52; } }
.deck svg .scr-done { opacity: 0; }
.deck svg.play .scr-done { animation: tk-done 3.2s steps(1) infinite; }
@keyframes tk-done { 0% { opacity: 0; } 38% { opacity: 1; } 90% { opacity: 0; } }
.deck svg.play .forest { animation: tk-forest 4s linear infinite; }
@keyframes tk-forest { to { transform: translateX(-320px); } }
@media (prefers-reduced-motion: reduce) {
  .deck svg.play * { animation: none !important; }
  .deck svg .door-light, .deck svg .waves path { opacity: 1; }
}

/* ---------- "Are you coming?" (js/rsvp.js) ---------- */
/* (the two header buttons: same height, on one line) */
.head-actions .btn, .head-actions .cal-btn { flex: none; margin: 0; min-height: 36px; padding: 7px 14px; font-size: 14px; line-height: 20px; border-radius: var(--pill); }
/* "Are you coming?" is the one bold button; the calendar is a round icon */
.head-actions .rsvp-btn { color: #fff; background: var(--link); border-color: var(--link); }
.head-actions .rsvp-btn:hover { background: var(--link); filter: brightness(1.08); }
.head-actions .cal-icon { width: 36px; height: 36px; padding: 0; }
/* (the icon sits at the guide's right edge: its menu opens leftwards, inside the guide) */
.head-actions .cal-menu { left: auto; right: 0; }
.rsvp-btn.done::after { content: " ✓"; }
.welcome .rsvp-btn { width: 100%; margin-bottom: 8px; padding: 10px; font-size: 15px; border-radius: 8px; }
.welcome-pair { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.welcome-pair > * { flex: 1 1 150px; }  /* (side by side where the labels fit, else one under the other) */
.welcome-pair .btn, .welcome-pair .cal-btn { white-space: nowrap; }
.rsvp-form input[type="text"], .rsvp-form input[type="email"], .rsvp-form textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; /* (16px: phones don't zoom in) */
  color: var(--ink); background: var(--card); border: 1px solid #c4c7c5; border-radius: 8px; padding: 9px 11px;
}
.rsvp-form input:focus, .rsvp-form textarea:focus { outline: 2px solid var(--link); outline-offset: 0; border-color: transparent; }
.rsvp-form [aria-invalid="true"] { border-color: #d93025; box-shadow: 0 0 0 1px #d93025 inset; }
.rsvp-form textarea { resize: vertical; min-height: 70px; }
.rsvp-people { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 10px; }
.rsvp-person { border: 1px solid #e3e3e3; border-radius: 10px; padding: 8px; display: grid; gap: 6px; background: #fafafa; }
.rsvp-row { display: flex; gap: 8px; align-items: center; }
.rsvp-row .rsvp-diet { flex: 1; font-size: 14px; }
.rsvp-remove { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid #dadce0; background: #fff; font-size: 18px; cursor: pointer; color: #5f6368; }
.rsvp-add { margin-bottom: 4px; }
.rsvp-label { display: block; margin-top: 14px; }
.rsvp-trap { position: absolute !important; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.rsvp-status { min-height: 1.4em; color: #5f6368; margin: 10px 0 6px; }
.rsvp-status.err { color: #d93025; }
.rsvp-send { width: 100%; }
.rsvp-summary { margin: 8px 0 14px; padding-left: 18px; }

/* ---------- Line icons in buttons (the sprite is at the top of index.html) ---------- */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 18px; height: 18px; flex: none; }
.rsvp-btn, .plan-open, .map-chips .chip-plan { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.map-chips .chip-plan .ico { width: 17px; height: 17px; }
/* text only for screen readers */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* a tab's places are shown as the buttons along the top of the map instead */
.shortcuts[hidden] { display: none; }
/* To Tallinn: the city chooser comes first, the reading after it */
#tab-tallinn .prose { margin-top: 20px; }

/* ---------- Flying down to the farm and back: the clouds (js/map.js) ---------- */
/* above the farm's map, under the guide; only transform and opacity move (smooth
   even while the page is busy drawing the farm) */
.sky { position: absolute; inset: 0; z-index: 4; overflow: hidden; pointer-events: none; }
.sky[hidden] { display: none; }
.sky-haze { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; will-change: opacity; }
.cloud { position: absolute; opacity: 0; will-change: transform, opacity; }
