/* Layout: a season sky across the top, the trip builder lifted over its horizon like a
   postcard, then the working area — the trip (or the local picks) on the left and a
   sticky map on the right. One column on a phone, map first. */

:root {
  --ink: #142231;
  --ink-soft: #4b5c6d;
  --paper: #f4f6f8;
  --card: #ffffff;
  --card-2: #f7f9fb;
  --line: #dce3ea;
  --sign-blue: #1b5ea9;
  --sign-brown: #86471f;
  --warn: #9a5b00;
  --warn-bg: #fff4dc;
  --fox: #e2793a;
  --fox-light: #fff3e6;
  --fox-dark: #b4531f;

  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  --sign: 'Barlow Condensed', 'Arial Narrow', 'Segoe UI', sans-serif;

  /* The season tokens: summer by default, redefined per data-season below. */
  --accent: #df5530;
  --accent-ink: #ffffff;
  --accent-soft: #fde6dc;
  --hero-ink: #142231;
  --sky-1: #a9cdec;
  --sky-2: #f6c6b8;
  --sky-3: #ffd99b;
  --sun: #ffb347;
  --sun-opacity: 1;
  --sun-y: 0px;
  --aurora-a: #3ef0a9;
  --aurora-b: #6aaeff;
  --aurora-opacity: 0;
  --aurora-c: #b86bff;
  --stars-opacity: 0;
  --fell-far: #8ea2b6;
  --fell-near: #536f82;
  --tree-far: #3d5667;
  --tree-near: #213849;

  --deer: #6e5444; /* reindeer grey-brown: stands apart from the ruska hills */
  --deer-light: #eadbc2;
  --deer-inner: #eaa58c;
  --antler: #f1e3c3;
  --hoof: #3b2a21;

  --radius: 18px;
  /* Wide enough to use a 27" screen; the trip column stops growing at reading width
     and the map takes the rest (see .work). */
  --page: 1760px;
  /* The side margin grows with the screen: 16px on a phone, 40px on a big display. */
  --gutter: clamp(16px, 2.6vw, 40px);
  --shadow: 0 1px 2px rgb(20 34 49 / 6%), 0 8px 28px rgb(20 34 49 / 9%);
  color-scheme: light;
}

:root[data-season='autumn'] {
  --accent: #c43d27;
  --accent-soft: #fbe2d9;
  --sky-1: #c9dceb;
  --sky-2: #f2d3a6;
  --sky-3: #f2a565;
  --sun: #ffc861;
  --sun-y: 40px;
  --fell-far: #b47049;
  --fell-near: #8b452b;
  --tree-far: #574538;
  --tree-near: #2e2823;
}
:root[data-season='winter'] {
  --accent: #23b383;
  --accent-ink: #062016;
  --accent-soft: #d8f5ea;
  --hero-ink: #f2f7fb;
  --sky-1: #050f22;
  --sky-2: #10305a;
  --sky-3: #2b5f80;
  --sun-opacity: 0;
  --aurora-opacity: 1;
  --stars-opacity: 1;
  --fell-far: #c3d1de;
  --fell-near: #e6edf3;
  --tree-far: #1b3144;
  --tree-near: #0d1d2b;
}
:root[data-season='spring'] {
  --accent: #2a6ad3;
  --accent-soft: #dde9fb;
  --sky-1: #5eaae6;
  --sky-2: #b9def6;
  --sky-3: #f1f8fd;
  --sun: #fff0a6;
  --sun-y: -50px;
  --fell-far: #dbe6ef;
  --fell-near: #f5f8fb;
  --tree-far: #34505f;
  --tree-near: #1d3341;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --ink: #f2f5f8;
    --ink-soft: #c3ccd6;
    --paper: #2a3340;
    --card: #36414f;
    --card-2: #3e4a59;
    --line: #4d5a6b;
    --warn: #ffcf7a;
    --warn-bg: #4d3b1b;
    --accent-soft: color-mix(in srgb, var(--accent) 24%, #36414f);
    --shadow: 0 1px 2px rgb(0 0 0 / 22%), 0 10px 30px rgb(0 0 0 / 24%);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --ink: #f2f5f8;
  --ink-soft: #c3ccd6;
  --paper: #2a3340;
  --card: #36414f;
  --card-2: #3e4a59;
  --line: #4d5a6b;
  --warn: #ffcf7a;
  --warn-bg: #4d3b1b;
  --accent-soft: color-mix(in srgb, var(--accent) 24%, #36414f);
  --shadow: 0 1px 2px rgb(0 0 0 / 22%), 0 10px 30px rgb(0 0 0 / 24%);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
/* Components set their own display; hidden must still win. */
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--body);
}
h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.08;
  text-wrap: balance;
  margin: 0;
}
p {
  margin: 0;
}
a {
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
svg {
  display: block;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- the sky --------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  color: var(--hero-ink);
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 58%, var(--sky-3) 100%);
  padding: 18px var(--gutter) 150px;
  transition: background 0.8s ease;
}
.scene {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 300px;
  pointer-events: none;
}
.scene .sun {
  fill: var(--sun);
  opacity: var(--sun-opacity);
  transform: translateY(var(--sun-y));
  transition: opacity 0.8s ease, transform 0.8s ease, fill 0.8s ease;
}
.scene .fell-far {
  fill: var(--fell-far);
  transition: fill 0.8s ease;
}
.scene .fell-near {
  fill: var(--fell-near);
  transition: fill 0.8s ease;
}
.scene .tree-far {
  fill: var(--tree-far);
  transition: fill 0.8s ease;
}
.scene .tree-near {
  fill: var(--tree-near);
  transition: fill 0.8s ease;
}
.scene .road {
  fill: none;
  stroke: #3a4048;
  stroke-width: 26;
}
.scene .road-line {
  fill: none;
  stroke: #f4f1e8;
  stroke-width: 2.5;
  stroke-dasharray: 14 12;
}
/* The winter sky: stars and the northern lights, over the whole header. */
.sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.sky .stars {
  opacity: var(--stars-opacity);
  transition: opacity 0.8s ease;
}
.sky .star {
  fill: #fff;
}
.sky .aurora {
  opacity: var(--aurora-opacity);
  transition: opacity 0.8s ease;
}
.au-a {
  stop-color: var(--aurora-a);
}
.au-c {
  stop-color: var(--aurora-c);
}
.curtain {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  :root[data-season='winter'] .curtain {
    animation: curtain 17s ease-in-out infinite alternate;
  }
  :root[data-season='winter'] .curtain.c1 {
    animation-duration: 23s;
    animation-delay: -7s;
  }
  :root[data-season='winter'] .curtain.c2 {
    animation-duration: 13s;
    animation-delay: -4s;
  }
  :root[data-season='winter'] .star.twinkle {
    animation: twinkle 4s ease-in-out infinite;
  }
}
@keyframes curtain {
  from {
    transform: translateX(-26px) scaleY(0.88);
  }
  to {
    transform: translateX(34px) scaleY(1.14);
  }
}
@keyframes twinkle {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
}
:root[data-season='winter'] .hero-copy {
  text-shadow: 0 2px 16px rgb(4 12 30 / 60%);
}

/* SVG colours live here as classes: var() inside SVG presentation attributes is not
   reliably supported across browsers, CSS on a class is. */
.d-fur {
  fill: var(--deer);
}
.d-light {
  fill: var(--deer-light);
}
.d-inner {
  fill: var(--deer-inner);
}
.d-hoof {
  fill: var(--hoof);
}
.d-antler {
  stroke: var(--antler);
}
.d-split {
  stroke: var(--deer-light);
}
.f-fox {
  fill: var(--fox);
}
.f-light {
  fill: var(--fox-light);
}
.f-dark {
  fill: var(--fox-dark);
}
.f-ink {
  fill: #142231; /* the fox keeps dark eyes in dark mode */
}

.topbar {
  position: relative;
  z-index: 2;
  max-width: var(--page);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}
.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  background: var(--card);
  padding: 4px;
  box-shadow: var(--shadow);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.brand-text small {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}
.brand-text strong {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
}
.pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgb(255 255 255 / 70%);
  color: #142231;
}
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav a,
.nav button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: rgb(255 255 255 / 72%);
  color: #142231;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.nav a svg,
.nav button svg {
  width: 16px;
  height: 16px;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: var(--page);
  margin: 46px auto 0;
}
.season-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.season-tag svg {
  width: 18px;
  height: 18px;
}
.hero h1 {
  font-size: clamp(38px, 6.4vw, 76px);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 12ch;
}
.hero-lead {
  margin-top: 16px;
  max-width: 46ch;
  font-size: clamp(17px, 2vw, 20px);
  opacity: 0.92;
}

/* --- the trip builder ------------------------------------------------------- */

.builder {
  position: relative;
  z-index: 3;
  max-width: var(--page);
  margin: -110px auto 0;
  padding-inline: var(--gutter);
}
.builder-card {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 22px 24px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.field > .label,
.field > label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.f-when {
  grid-column: span 4;
}
.f-days {
  grid-column: span 4;
}
.f-from {
  grid-column: span 4;
}
.f-who {
  grid-column: span 5;
}
.f-pace {
  grid-column: span 7;
}
.f-likes {
  grid-column: span 12;
}
.f-notes {
  grid-column: span 12;
}
.f-go {
  grid-column: span 12;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.input {
  width: 100%;
  border: 1.5px solid var(--line);
  background: var(--card-2);
  border-radius: 12px;
  padding: 11px 14px;
  min-height: 46px;
}
.input:focus {
  border-color: var(--accent);
  outline: none;
}
.days {
  display: flex;
  align-items: center;
  gap: 12px;
}
.days input[type='range'] {
  flex: 1;
  accent-color: var(--accent);
  min-width: 0;
}
.days-out {
  min-width: 9.5em;
  font-weight: 600;
}
.days-out b {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  margin-right: 4px;
}
.days-out small {
  display: block;
  color: var(--ink-soft);
  font-weight: 500;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 8px 14px 8px 11px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.chip svg {
  width: 19px;
  height: 19px;
}
.chip:hover {
  border-color: var(--accent);
}
.chip[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.chip:active {
  transform: scale(0.97);
}

.seg {
  display: flex;
  background: var(--card-2);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
}
.seg button {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 9px 8px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
}
.seg button small {
  display: block;
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-soft);
}
.seg button[aria-pressed='true'] {
  background: var(--card);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s, filter 0.15s, background 0.15s;
}
.btn svg {
  width: 20px;
  height: 20px;
}
.btn:active {
  transform: scale(0.97);
}
.btn[disabled] {
  opacity: 0.55;
  cursor: progress;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn-primary:hover {
  filter: brightness(1.06);
}
.btn-ghost {
  background: var(--accent-soft);
  color: var(--ink);
}
.btn-small {
  padding: 8px 14px;
  font-size: 14px;
}
.hint {
  color: var(--ink-soft);
  font-size: 14px;
}

/* --- the working area ------------------------------------------------------ */

.work {
  max-width: var(--page);
  margin: 28px auto 0;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: 24px;
  align-items: start;
}
@media (min-width: 1680px) {
  .work {
    grid-template-columns: minmax(0, 820px) minmax(0, 1fr);
  }
}
.side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.mapbox {
  position: sticky;
  top: 16px;
  height: calc(100vh - 32px);
  min-height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card-2);
}
#map {
  position: absolute;
  inset: 0;
}
.map-legend {
  position: absolute;
  left: 12px;
  right: 56px; /* clear of the zoom buttons */
  top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}
.map-legend button {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: rgb(255 255 255 / 92%);
  color: #142231;
  border-radius: 999px;
  padding: 5px 11px 5px 7px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgb(0 0 0 / 15%);
}
.map-legend i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c);
}
.map-legend button[aria-pressed='true'] {
  outline: 2px solid var(--c);
}
.map-note {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgb(255 255 255 / 92%);
  color: #142231;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 1px 4px rgb(0 0 0 / 15%);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 800;
}
.section-head p {
  color: var(--ink-soft);
  max-width: 52ch;
  margin-top: 6px;
}

/* local picks */
.picks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.pick {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}
.pick.wanted {
  border-color: var(--accent);
}
.pick-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}
.pick h3 {
  font-size: 19px;
  font-weight: 700;
}
.pick .where {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}
.pick p {
  font-size: 14.5px;
  color: var(--ink-soft);
}
.tagrow {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px 2px 5px;
  color: var(--ink-soft);
}
.tag svg {
  width: 14px;
  height: 14px;
}
.want {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 5px 10px 5px 7px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.want svg {
  width: 17px;
  height: 17px;
}
.want[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.want[aria-pressed='true'] svg path {
  fill: currentColor;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.badge svg {
  width: 14px;
  height: 14px;
}

/* the trip */
.trip-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.trip-head h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border-radius: 999px;
  padding: 6px 12px 6px 9px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow);
  font-variant-numeric: tabular-nums;
}
.stat svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.guide {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.guide-avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--accent-soft);
  padding: 6px;
}
.bubble {
  position: relative;
  background: var(--card);
  border-radius: 6px var(--radius) var(--radius) var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  min-width: 0;
}
.bubble .who {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.bubble p + p,
.bubble p + ul,
.bubble ul + p {
  margin-top: 10px;
}
.bubble ul {
  margin: 0;
  padding-left: 20px;
}
.bubble.mine {
  background: var(--accent-soft);
  border-radius: var(--radius) 6px var(--radius) var(--radius);
}

/* the road while the guide works */
.working {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.working-road {
  position: relative;
  height: 46px;
  overflow: hidden;
}
.working-road::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 32px;
  border-top: 3px dashed var(--line);
}
.working-road .car {
  position: absolute;
  top: 6px;
  left: 0;
  width: 40px;
  height: 40px;
  color: var(--accent);
}
@media (prefers-reduced-motion: no-preference) {
  .working-road .car {
    animation: drive 6s linear infinite;
  }
}
@keyframes drive {
  from {
    left: -44px;
  }
  to {
    left: 100%;
  }
}
.working-line {
  font-weight: 700;
  font-size: 17px;
}
.working-fact {
  color: var(--ink-soft);
  font-size: 14.5px;
}
.working-fact b {
  color: var(--ink);
}
.working-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* a day */
.day {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 6px solid var(--c);
  min-width: 0;
}
.day-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.day-sign {
  font-family: var(--sign);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--c);
  padding: 2px 10px;
  border-radius: 5px;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 85%), 0 0 0 1px var(--c);
}
.day-date {
  font-weight: 600;
  color: var(--ink-soft);
}
.day h3 {
  font-size: 24px;
  font-weight: 750;
}
.day-story {
  color: var(--ink);
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* A Finnish direction sign: white condensed letters on blue. */
.sign {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--sign);
  font-weight: 600;
  font-size: 17px;
  line-height: 1;
  color: #fff;
  background: var(--sign-blue);
  border-radius: 6px;
  padding: 6px 10px;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 90%), 0 0 0 1px var(--sign-blue);
  font-variant-numeric: tabular-nums;
}
.sign svg {
  width: 18px;
  height: 18px;
}
.sign.brown {
  background: var(--sign-brown);
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 90%), 0 0 0 1px var(--sign-brown);
}
.fact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px 5px 8px;
  font-weight: 600;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.fact svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.fact small {
  font-weight: 500;
  color: var(--ink-soft);
}

.stops {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.stop {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 14px;
}
.stop::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 34px;
  bottom: 0;
  border-left: 2.5px dotted color-mix(in srgb, var(--c) 60%, transparent);
}
.stop:last-child::before {
  display: none;
}
.stop-n {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 15px;
}
.stop-n.town {
  background: var(--card);
  color: var(--c);
  border: 2.5px solid var(--c);
}
.stop-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
}
.stop-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-weight: 700;
  font-size: 17px;
}
.stop-meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.stop-note {
  font-weight: 500;
}
.stop-about {
  font-size: 14.5px;
  color: var(--ink-soft);
}
.stop-tip {
  font-size: 14px;
  color: var(--ink-soft);
}
.stop-tip b {
  color: var(--ink);
}
.heads-up {
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
}
.word {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}
.word b {
  font-family: var(--display);
  font-size: 16px;
  color: var(--ink);
}

/* change something */
.tweak {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tweak h3 {
  font-size: 20px;
}
.ask {
  display: flex;
  gap: 8px;
}
.ask .input {
  flex: 1;
  min-width: 0;
}
.ask .btn {
  padding-inline: 18px;
}
.history {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.history summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-soft);
}
.error {
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
}

.stamp {
  max-width: var(--page);
  margin: 32px auto 0;
  padding: 0 var(--gutter) 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12.5px;
}
.stamp code {
  font-family: ui-monospace, 'Cascadia Mono', Menlo, monospace;
  font-size: 12px;
}

/* map markers */
.mk {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font: 800 14px/1 var(--body);
  background: var(--c);
  border: 2.5px solid #fff;
  box-shadow: 0 2px 6px rgb(0 0 0 / 30%);
  cursor: pointer;
}
.mk.town {
  background: #fff;
  color: var(--c);
  border-color: var(--c);
}
.mk.rec {
  box-shadow: 0 0 0 3px var(--accent), 0 2px 6px rgb(0 0 0 / 30%);
}
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #5f7385;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgb(0 0 0 / 30%);
  cursor: pointer;
}
.dot.rec {
  width: 26px;
  height: 26px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
}
.dot.rec svg {
  width: 15px;
  height: 15px;
}
.dot.wanted {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.maplibregl-popup-content {
  border-radius: 14px !important;
  padding: 12px 14px !important;
  font: 400 14px/1.45 var(--body);
  color: #142231;
  max-width: 260px;
}
.maplibregl-popup-content h4 {
  margin: 0 0 4px;
  font: 700 16px/1.2 var(--display);
}

/* --- the reindeer, peeking over a card's top edge ------------------------- */

.peekable {
  position: relative;
}
.peekable > .peek-card {
  position: relative;
  z-index: 1;
}
/* No z-index here: the head (behind the card) and the hooves (in front of it)
   must stack against the card itself. */
.deer {
  position: absolute;
  top: 0;
  right: 16%;
  width: 150px;
  pointer-events: none;
}
.deer-head {
  position: absolute;
  left: 0;
  top: -114px; /* 152 of 200 units, at 0.75 px per unit */
  width: 150px;
  height: 150px;
  z-index: 0;
  overflow: visible;
  filter: drop-shadow(0 8px 14px rgb(20 20 45 / 20%));
  transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.deer-hooves {
  position: absolute;
  left: 0;
  top: -9px; /* the card edge at y=12 of the hooves' 30 */
  width: 150px;
  height: 22.5px;
  z-index: 2;
}
.deer-bob {
  transform-box: view-box;
  transform-origin: 50% 90%; /* sway from the neck, not the corner */
}
.deer-eyes {
  transform-box: fill-box;
  transform-origin: center;
}
@media (prefers-reduced-motion: no-preference) {
  .deer-bob {
    animation: deer-bob 5.5s ease-in-out infinite;
  }
  .deer-eyes {
    animation: deer-blink 6.5s infinite;
  }
  /* Hovering a button brings it up for a better look. */
  .peekable:has(.btn:hover) .deer-head {
    transform: translateY(-14px);
  }
}
@keyframes deer-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-6px) rotate(2deg);
  }
}
@keyframes deer-blink {
  0%,
  93%,
  97%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.08);
  }
}
.deer.small {
  right: auto;
  left: 9%;
  width: 96px;
}
.deer.small .deer-head {
  top: -73px;
  width: 96px;
  height: 96px;
}
.deer.small .deer-hooves {
  top: -6px;
  width: 96px;
  height: 14.4px;
}

/* --- simple view and more features ------------------------------------------ */

.viewswitch {
  display: inline-flex;
  background: rgb(255 255 255 / 72%);
  border-radius: 999px;
  padding: 3px;
}
.nav .viewswitch button {
  background: transparent;
  padding: 6px 12px;
}
.nav .viewswitch button[aria-pressed='true'] {
  background: #142231;
  color: #fff;
}
.linkish {
  border: 0;
  background: none;
  padding: 4px 0;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.map-hint {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgb(255 255 255 / 92%);
  color: #142231;
  border-radius: 999px;
  padding: 6px 12px 6px 8px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 1px 4px rgb(0 0 0 / 15%);
  pointer-events: none;
}
.map-hint svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.maplibregl-popup-content .want {
  margin-top: 10px;
}

:root[data-view='simple'] .more {
  display: none !important;
}
:root[data-view='full'] .simple-only {
  display: none !important;
}
:root[data-view='simple'] .f-when,
:root[data-view='simple'] .f-days {
  grid-column: span 6;
}
/* Before a trip exists, the simple view is the form and a map of the local picks. */
:root[data-view='simple'] .work:not(.has-trip) {
  grid-template-columns: minmax(0, 1fr);
}
:root[data-view='simple'] .work:not(.has-trip) .mapbox {
  position: relative;
  top: 0;
  height: min(64vh, 600px);
}
:root[data-view='full'] .map-hint,
.work.has-trip .map-hint {
  display: none;
}

@media (max-width: 900px) {
  :root[data-view] .f-when,
  :root[data-view] .f-days {
    grid-column: span 12;
  }
  .deer {
    right: 8%;
    width: 96px;
  }
  .deer-head {
    top: -73px;
    width: 96px;
    height: 96px;
  }
  .deer-hooves {
    top: -6px;
    width: 96px;
    height: 14.4px;
  }
  .builder-card {
    padding: 18px;
    gap: 18px;
  }
  .f-when,
  .f-days,
  .f-from,
  .f-who,
  .f-pace {
    grid-column: span 12;
  }
  .work {
    grid-template-columns: minmax(0, 1fr);
  }
  .mapbox {
    position: relative;
    top: 0;
    height: 52vh;
    min-height: 320px;
    order: -1;
  }
  /* Room above the form for the reindeer, clear of the intro text. */
  .hero {
    padding-bottom: 196px;
  }
  .hero-copy {
    margin-top: 28px;
  }
}
@media (max-width: 520px) {
  .brand-text small,
  .brand .pill {
    display: none;
  }
  .brand {
    flex: 1;
  }
  .brand-text strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 16px;
  }
  .nav a span,
  .nav button span {
    display: none;
  }
  .seg button small {
    display: none;
  }
  .btn {
    width: 100%;
  }
  .f-go .hint {
    width: 100%;
  }
}
