/* ===================================================================
   冰岛环岛自驾之旅 2026 — style.css
   Theme: glacial blue / glacier ice / aurora green / volcanic black
   =================================================================== */

:root {
  /* Iceland palette */
  --ice-blue:      #a9c7d8;   /* glacier sky */
  --glacier:       #7fb6d4;   /* glacial water */
  --deep-blue:     #1d2b45;   /* deep ocean / night */
  --ink:           #0b1220;   /* volcanic black-ink */
  --volcanic:      #23232b;   /* volcanic rock */
  --volcanic-2:    #2e2e38;
  --aurora:        #39d98a;   /* aurora green */
  --aurora-soft:   #7fe7b4;
  --gold:          #e8c66b;   /* golden hour */
  --paper:         #f4f7f9;   /* glacier-white paper */
  --paper-2:       #ffffff;
  --text:          #12202f;
  --text-muted:    #5b6b7a;
  --line:          rgba(18, 32, 47, .10);

  --radius:        14px;
  --radius-sm:     9px;
  --shadow:        0 12px 30px rgba(11, 18, 32, .14);
  --shadow-soft:   0 6px 18px rgba(11, 18, 32, .10);
  --max-w:         1120px;

  --font:   "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:   ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* ------------------------------------------------ Trip completion / progress panel */
.section--progress { padding-top: clamp(24px, 3.6vw, 36px); }
.progress-panel {
  background: linear-gradient(140deg, var(--deep-blue), #24384f);
  border: 1px solid rgba(127,182,212,.22);
  border-radius: var(--radius);
  padding: 18px 20px 16px;
  color: #eaf3f8;
  box-shadow: var(--shadow-soft);
}
.progress-panel__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.progress-panel__title { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: .02em; color: #eaf3f8; }
.progress-panel__count { font-size: 14px; color: #bfe0d0; font-weight: 600; }
.progress-panel__count b { color: var(--aurora); font-size: 17px; }

.progress-track {
  height: 16px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.25);
}
.progress-fill {
  height: 100%; width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--aurora), #2fbf8c, var(--aurora-soft));
  background-size: 200% 100%;
  transition: width .9s cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 0 12px rgba(57,217,138,.45);
  animation: progressShimmer 3s linear infinite;
}
@keyframes progressShimmer { 0% { background-position: 0% 0; } 100% { background-position: 200% 0; } }

.progress-panel__foot { display: flex; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.progress-pct { font-size: 22px; font-weight: 800; color: var(--aurora); letter-spacing: .01em; min-width: 56px; }
.progress-days { display: flex; flex-wrap: wrap; gap: 6px; }
.day-badge {
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  color: #b9cbd6; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .12s;
}
.day-badge:hover { transform: translateY(-1px); }
.day-badge.is-done {
  background: linear-gradient(135deg, var(--aurora), #2fbf8c);
  color: #0b1220; border-color: var(--aurora);
  box-shadow: 0 2px 8px rgba(57,217,138,.4);
}
.day-badge.is-done::after { content: "✓"; }
.progress-hint { margin: 12px 0 0; font-size: 12.5px; color: #9db8c6; }

/* identity selector (per-person check-in) — prominent dropdown */
.progress-person {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 14px; padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(120deg, rgba(57,217,138,.16), rgba(232,198,107,.10));
  border: 1px solid rgba(57,217,138,.40);
  box-shadow: 0 4px 16px rgba(57,217,138,.14);
}
.progress-person__label {
  font-size: 14px; font-weight: 800; letter-spacing: .02em;
  color: var(--aurora); text-shadow: 0 0 12px rgba(57,217,138,.35);
}
.progress-person__control { position: relative; max-width: 480px; }
.person-select {
  width: 100%; font: inherit; font-size: 15.5px; font-weight: 800;
  color: #0b1220; cursor: pointer;
  padding: 12px 40px 12px 14px;
  border-radius: 10px;
  border: 2px solid var(--aurora);
  background: #f4f7f9;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  transition: box-shadow .18s, border-color .18s;
}
.person-select:focus { outline: none; border-color: #2fbf8c; box-shadow: 0 0 0 4px rgba(57,217,138,.25); }
.person-select__icon {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  pointer-events: none; color: var(--aurora); font-size: 14px; font-weight: 800;
}

/* Day-card check-in button + completed state */
.day-card__banner { position: relative; }
.day-card__banner.is-done {
  background:
    radial-gradient(600px 260px at 90% -20%, rgba(57,217,138,.55), transparent 60%),
    linear-gradient(140deg, #143a2c, #1d5c43);
}
.day-card__banner.is-done .dc__done-stamp {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 800; color: #0b1220;
  background: var(--aurora); border-radius: 999px; padding: 5px 13px;
  box-shadow: 0 3px 12px rgba(57,217,138,.4);
}
.dc__done-stamp { display: none; }
.day-check {
  position: absolute; top: 16px; right: 18px;
  display: inline-flex; align-items: center; gap: 7px;
  cursor: pointer; user-select: none;
  font: inherit; font-size: 13.5px; font-weight: 700;
  color: #eaf3f8;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px; padding: 7px 14px;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s, transform .12s;
}
.day-check:hover { transform: translateY(-1px); background: rgba(255,255,255,.18); }
.day-check .day-check__box {
  width: 15px; height: 15px; border-radius: 4px;
  border: 2px solid rgba(255,255,255,.8);
  display: inline-grid; place-items: center;
  font-size: 11px; line-height: 1; color: transparent;
  transition: background .2s, border-color .2s, color .2s;
}
.day-check.is-done {
  color: #0b1220;
  background: var(--aurora); border-color: var(--aurora);
  box-shadow: 0 3px 12px rgba(57,217,138,.4);
}
.day-check.is-done .day-check__box { background: #0b1220; border-color: #0b1220; color: var(--aurora); }
.day-card__banner { padding-right: 132px; }
@media (max-width: 560px) { .day-card__banner { padding-right: 116px; } .day-check { padding: 6px 10px; font-size: 12.5px; } }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

#app { max-width: 100%; }

img { max-width: 100%; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------ Hero */
.hero {
  position: relative;
  color: #eaf3f8;
  background:
    radial-gradient(1100px 520px at 78% -10%, rgba(57, 217, 138, .28), transparent 60%),
    radial-gradient(900px 480px at 12% 8%, rgba(127, 182, 212, .30), transparent 55%),
    linear-gradient(160deg, #0b1220 0%, #14273f 45%, #1d2b45 100%);
  padding: clamp(48px, 9vw, 104px) 20px clamp(44px, 8vw, 84px);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(127, 182, 212, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 182, 212, .06) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 80%);
}
.hero__inner { position: relative; max-width: var(--max-w); margin: 0 auto; text-align: center; }
.hero__eyebrow {
  letter-spacing: .34em; font-size: 12px; font-weight: 600;
  text-transform: uppercase; color: var(--aurora);
  margin: 0 0 12px;
}
.hero__title {
  font-size: clamp(30px, 5.4vw, 62px);
  font-weight: 800; letter-spacing: .01em; line-height: 1.12;
  margin: 0 0 10px;
  text-shadow: 0 4px 30px rgba(0,0,0,.35);
}
.hero__subtitle {
  font-size: clamp(15px, 2vw, 20px);
  color: #cfe0ea; margin: 0 0 22px; font-weight: 400;
}
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 20px; }
.meta-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(4px);
  font-size: 13.5px; color: #eaf3f8;
}
.meta-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--aurora); }
.hero__guests { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.guest-pill {
  font-size: 12.5px; padding: 5px 11px; border-radius: 999px;
  background: rgba(127, 182, 212, .14);
  border: 1px solid rgba(127, 182, 212, .28);
  color: #dcecf3; letter-spacing: .02em;
}
.hero__scroll-hint {
  margin-top: 30px; font-size: 13px; color: #b9ccd6; letter-spacing: .18em; text-transform: uppercase;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* ------------------------------------------------ Day nav */
.daynav {
  position: sticky; top: 0; z-index: 900;
  background: rgba(11, 18, 32, .92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(127, 182, 212, .18);
}
.daynav__track {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; gap: 4px; overflow-x: auto;
  padding: 10px 14px; scrollbar-width: thin;
}
.daynav__track::-webkit-scrollbar { height: 6px; }
.daynav__track::-webkit-scrollbar-thumb { background: rgba(127,182,212,.4); border-radius: 3px; }
.day-chip {
  flex: 0 0 auto; cursor: pointer;
  padding: 9px 15px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; color: #bcd0da;
  border: 1px solid transparent; background: transparent;
  transition: background .18s ease, color .18s ease, border .18s ease, transform .12s;
  white-space: nowrap;
}
.day-chip small { display: block; font-weight: 500; font-size: 11px; color: #7f96a6; }
.day-chip:hover { color: #fff; background: rgba(127,182,212,.14); }
.day-chip.is-active {
  background: linear-gradient(120deg, var(--aurora), #2fbf8c);
  color: #0b1220; border-color: transparent; box-shadow: 0 4px 16px rgba(57,217,138,.35);
}
.day-chip.is-active small { color: #0b1220; }
.day-chip.is-overview { color: var(--gold); }
.day-chip.is-overview.is-active {
  background: linear-gradient(120deg, var(--gold), #e0aa4e);
  color: #0b1220; box-shadow: 0 4px 16px rgba(232,198,107,.35);
}
.day-chip.is-done { border-color: rgba(57,217,138,.5); color: #d9f5e7; }
.day-chip.is-done::before {
  content: "✓"; display: inline-block; margin-right: 4px; color: var(--aurora); font-weight: 800;
}
.day-chip.is-done.is-active { color: #0b1220; }

/* ------------------------------------------------ Sections */
.section { max-width: var(--max-w); margin: 0 auto; padding: clamp(38px, 6vw, 66px) 18px; }
.section--map { padding-top: clamp(26px, 4vw, 40px); }
.section__head { margin-bottom: 20px; }
.section__title {
  font-size: clamp(23px, 3.4vw, 32px); font-weight: 800; color: var(--deep-blue);
  margin: 0 0 6px; letter-spacing: .01em;
}
.section__count {
  font-size: .62em; font-weight: 700; color: var(--aurora);
  background: rgba(57,217,138,.12); padding: 4px 12px; border-radius: 999px; vertical-align: middle;
}
.section__sub { color: var(--text-muted); margin: 0; font-size: 15px; }

/* ------------------------------------------------ Map */
.map-wrap {
  position: relative; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
#map { height: clamp(360px, 58vw, 560px); width: 100%; background: #cfdee6; }
.leaflet-tile-pane { filter: saturate(1.05); }

.map__legend {
  position: absolute; top: 14px; left: 14px; z-index: 800;
  background: rgba(11, 18, 32, .82); color: #eaf3f8;
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 12.5px; line-height: 1.7; box-shadow: var(--shadow-soft);
  max-width: 220px; border: 1px solid rgba(127,182,212,.22);
  /* Cap height so it never reaches the bottom-left zoom control (avoid overlap) */
  max-height: calc(100% - 96px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.map__legend::-webkit-scrollbar { width: 6px; }
.map__legend::-webkit-scrollbar-thumb { background: rgba(127,182,212,.4); border-radius: 3px; }
.map__legend h4 { margin: 0 0 7px; font-size: 13px; color: var(--aurora); letter-spacing: .04em; }
.map__legend-row { display: flex; align-items: center; gap: 8px; }
.legend-swatch {
  width: 22px; height: 8px; border-radius: 4px; flex: 0 0 auto;
}
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }

/* collapsible legend toggle */
.legend-toggle {
  width: 100%; text-align: left; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .03em;
  color: var(--aurora); background: transparent; border: 0; padding: 0 0 8px;
}
.legend-toggle:hover { color: var(--aurora-soft); }
.map__legend.is-collapsed { max-height: none; }
.map__legend.is-collapsed .legend-body { display: none; }
.legend-active {
  margin: 0 0 8px; padding: 7px 9px; border-radius: 7px;
  background: rgba(57,217,138,.14); border: 1px solid rgba(57,217,138,.28);
  font-size: 12px; line-height: 1.5;
}
.legend-active b { color: var(--aurora); }

/* two-way linkage link inside map popups */
.popup-day-link {
  margin-top: 9px; padding-top: 7px;
  border-top: 1px dashed rgba(18,32,47,.18);
  cursor: pointer; font-size: 12.5px; font-weight: 700; color: #1d6fd1;
}
.popup-day-link:hover { text-decoration: underline; color: #1a5bb0; }

/* clickable D1-D12 list beside the map */
.map__days {
  position: absolute; right: 14px; bottom: 34px; z-index: 800;
  display: flex; flex-wrap: wrap; gap: 6px;
  max-width: 320px;
  background: rgba(11, 18, 32, .82);
  border: 1px solid rgba(127,182,212,.22);
  border-radius: var(--radius-sm);
  padding: 10px;
  box-shadow: var(--shadow-soft);
}
@media (max-width: 720px) {
  .map__days { max-width: 210px; right: 10px; bottom: 30px; }
}
.map-day {
  flex: 0 0 auto; cursor: pointer; user-select: none;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 6px 9px; border-radius: 7px; border: 1px solid transparent;
  background: rgba(255,255,255,.06); color: #cfe0ea;
  font: inherit; line-height: 1.25; transition: background .18s, color .18s, border .18s, transform .12s;
}
.map-day b { font-size: 13px; font-weight: 800; }
.map-day small { font-size: 10.5px; color: #8fb0c4; }
.map-day:hover { transform: translateY(-1px); background: rgba(127,182,212,.16); }
.map-day.is-active {
  background: linear-gradient(120deg, var(--aurora), #2fbf8c);
  color: #0b1220; border-color: var(--aurora);
  box-shadow: 0 2px 8px rgba(57,217,138,.4);
}
.map-day.is-active small { color: #0b1220; }
.map-day.is-done b::after { content: "✓"; color: var(--aurora); margin-left: 2px; }
.map-day.is-active.is-done b::after { color: #0b1220; }

.map__overview-btn {
  position: absolute; top: 14px; right: 14px; z-index: 800;
  cursor: pointer; user-select: none;
  background: rgba(232,198,107,.94); color: #0b1220;
  padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 13.5px;
  box-shadow: var(--shadow-soft); transition: transform .12s ease, background .18s;
  border: 1px solid rgba(232,198,107,.6);
}
.map__overview-btn:hover { transform: translateY(-1px); background: #f2d98a; }
.map__overview-btn.is-active { background: #0b1220; color: var(--gold); }

.map-day-summary {
  margin-top: 14px; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  box-shadow: var(--shadow-soft);
}
.map-day-summary .mds__k { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.map-day-summary .mds__v { font-weight: 700; color: var(--deep-blue); font-size: 15px; }
.map-day-summary .mds__item { display: flex; flex-direction: column; gap: 1px; }
.map-day-summary .mds__title { font-size: 16px; font-weight: 800; color: var(--deep-blue); }

/* marker icon styling */
.spot-icon {
  background: transparent; border: none;
}
.spot-icon__inner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.spot-icon--start .spot-icon__inner { background: var(--aurora); }
.spot-icon--end .spot-icon__inner   { background: var(--volcanic); }
.spot-icon--spot .spot-icon__inner  { background: var(--glacier); }
.spot-icon--stay .spot-icon__inner  { background: var(--gold); }

/* done end marker (green + check) */
.spot-icon--end-done .spot-icon__inner {
  background: var(--aurora); border-color: var(--aurora);
  display: grid; place-items: center;
}
.spot-icon--end-done .spot-icon__inner::after { content: "✓"; color: #0b1220; font-size: 12px; font-weight: 800; }
.marker-label {
  font-size: 11px; font-weight: 700; color: #0b1220;
  background: rgba(255,255,255,.9); padding: 2px 6px; border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); white-space: nowrap;
}

/* ------------------------------------------------ Day card */
.day-card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-soft); overflow: hidden;
}
.day-card__banner {
  padding: 22px 24px; color: #eaf3f8;
  background:
    radial-gradient(600px 260px at 90% -20%, rgba(57,217,138,.35), transparent 60%),
    linear-gradient(140deg, #14273f, #1d2b45);
}
.day-card__banner .dc__meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.dc__tag {
  font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: #dcecf3;
}
.dc__tag--drive { background: var(--aurora); color: #0b1220; border-color: var(--aurora); }
.dc__tag--stay  { background: rgba(232,198,107,.2); color: #f5e7b8; border-color: rgba(232,198,107,.4); }
.day-card__banner h3 { margin: 0 0 6px; font-size: clamp(22px, 3.2vw, 30px); font-weight: 800; }
.day-card__banner .dc__summary { margin: 0; color: #cfe0ea; font-size: 15.5px; max-width: 760px; }

/* 本日亮点 strip */
.highlights { display: grid; gap: 8px; }
.highlight {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  background: linear-gradient(120deg, rgba(57,217,138,.14), rgba(127,182,212,.10));
  border: 1px solid rgba(57,217,138,.28);
  font-size: 14px; color: var(--text);
}
.highlight__dot {
  flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%;
  margin-top: 7px; background: var(--aurora);
}

/* 进阶 / 隐藏玩法 */
.protips { display: grid; gap: 9px; }
.protip {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 13px; border-radius: var(--radius-sm);
  background: var(--paper); border: 1px dashed rgba(232,198,107,.55);
  font-size: 14px; color: var(--text);
}
.protip__icon {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 800; letter-spacing: .05em;
  color: #0b1220; background: var(--gold);
  border-radius: 6px; padding: 2px 5px; margin-top: 2px;
}

.day-card__body { padding: 8px 0 0; }
.acc {
  border-top: 1px solid var(--line);
}
.acc:first-child { border-top: none; }
.acc__btn {
  width: 100%; text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  background: transparent; border: 0; padding: 16px 24px;
  font: inherit; color: var(--deep-blue);
}
.acc__btn:hover { background: rgba(127,182,212,.06); }
.acc__icon {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; font-size: 17px;
  background: rgba(127,182,212,.14); color: var(--deep-blue);
}
.acc__title { flex: 1 1 auto; font-size: 16.5px; font-weight: 700; }
.acc__chev { flex: 0 0 auto; transition: transform .25s ease; color: var(--text-muted); }
.acc.is-open .acc__chev { transform: rotate(180deg); }
.acc__body { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.acc.is-open .acc__body { max-height: 4000px; }
.acc__content { padding: 4px 24px 22px; }

/* inside accordion content */
.kv-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14.5px; }
.kv-list dt { color: var(--text-muted); font-weight: 600; }
.kv-list dd { margin: 0; color: var(--text); }

/* 途经公路 badges (in 行程概览·交通) */
.roads { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.roads__label { font-size: 12.5px; font-weight: 700; color: var(--text-muted); margin-right: 2px; }
.roads__badge {
  font-size: 11.5px; font-weight: 700; color: var(--deep-blue);
  background: rgba(127,182,212,.16); border: 1px solid rgba(127,182,212,.32);
  padding: 3px 9px; border-radius: 999px;
}

/* 分段车程 (per-segment driving table) */
.legs { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.legs__title {
  padding: 8px 12px; font-size: 12.5px; font-weight: 800; letter-spacing: .03em;
  color: #dcecf3; background: rgba(29,43,69,.92);
}
.legs__rows { max-height: 340px; overflow-y: auto; }
.legs__row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-top: 1px solid var(--line);
  font-size: 13px;
}
.legs__row:first-child { border-top: 0; }
.legs__from { color: var(--deep-blue); font-weight: 700; white-space: nowrap; }
.legs__arrow { color: var(--aurora); font-weight: 800; flex: 0 0 auto; }
.legs__to { color: var(--text); font-weight: 600; white-space: nowrap; }
.legs__meta { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; flex: 0 0 auto; }
.legs__km {
  font-size: 12.5px; font-weight: 700; color: var(--deep-blue);
  background: rgba(127,182,212,.14); border: 1px solid rgba(127,182,212,.3);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.legs__dur {
  font-size: 12.5px; font-weight: 700; color: var(--text-muted);
  background: rgba(232,198,107,.14); border: 1px solid rgba(232,198,107,.32);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
@media (max-width: 560px) {
  /* keep each leg on a single line: route (from→to) clamps with ellipsis, km/dur on the right */
  .legs__row { gap: 5px; padding: 8px 9px; font-size: 12px; }
  .legs__from, .legs__to { max-width: 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
  .legs__meta { margin-left: auto; gap: 4px; }
  .legs__km, .legs__dur { font-size: 11px; padding: 2px 6px; }
}

/* spots */
.spots { display: grid; gap: 16px; }
.spot {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 18px; background: linear-gradient(180deg, #fbfdfe, #f3f7f9);
}
/* spot card with image = horizontal layout (image left, text right) */
.spot.has-img { display: flex; gap: 0; padding: 0; overflow: hidden; }
.spot__media {
  flex: 0 0 46%; max-width: 46%; position: relative; min-height: 150px;
}
.spot__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.spot__media-veil {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(18,32,47,0) 70%, rgba(18,32,47,.06) 100%);
  pointer-events: none;
}
.spot.has-img .spot__body { flex: 1 1 auto; padding: 14px 16px; min-width: 0; }
.spot__head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.spot__name { font-size: 17px; font-weight: 800; color: var(--deep-blue); }
.spot__cat {
  font-size: 11.5px; font-weight: 700; color: var(--deep-blue);
  background: rgba(57,217,138,.14); border: 1px solid rgba(57,217,138,.3);
  padding: 2px 9px; border-radius: 999px;
}
.spot__intro { margin: 0 0 10px; font-size: 14.5px; color: var(--text); }
.spot__facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact {
  font-size: 13px; padding: 6px 11px; border-radius: 8px;
  background: var(--paper-2); border: 1px solid var(--line); color: var(--text-muted);
}
.fact strong { color: var(--deep-blue); }

/* 影视取景 badge (inside spot card) */
.filming {
  display: flex; flex-direction: column; gap: 5px;
  margin: 3px 0 10px; padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: rgba(232,198,107,.10);
  border: 1px solid rgba(232,198,107,.34);
}
.filming__badge {
  align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .04em;
  color: #0b1220; background: var(--gold);
  border-radius: 6px; padding: 2px 8px;
}
.filming__text { font-size: 13.5px; color: var(--text); line-height: 1.6; }

/* day-level film notes strip */
.day-film {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start;
  padding: 11px 13px; border-radius: var(--radius-sm);
  background: linear-gradient(120deg, rgba(232,198,107,.12), rgba(192,120,60,.08));
  border: 1px solid rgba(232,198,107,.40);
}
.day-film__badge {
  flex: 0 0 auto; font-size: 11.5px; font-weight: 800; letter-spacing: .02em;
  color: #0b1220; background: var(--gold);
  border-radius: 6px; padding: 3px 9px;
}
.day-film__text { flex: 1 1 auto; font-size: 13.5px; color: var(--text); line-height: 1.6; }

/* film-location reference images (non-route GOT spots) */
.film-refs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.film-ref {
  margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow: hidden; background: rgba(11,18,32,.05); box-shadow: var(--shadow-soft);
}
.film-ref__img {
  display: block; width: 100%; height: auto; max-height: 360px;
  object-fit: contain; object-position: center;
  background: rgba(11,18,32,.05); /* light backdrop for the letterboxed area */
}
.film-ref__cap {
  padding: 10px 12px; font-size: 13px; line-height: 1.55; color: var(--text);
  text-align: center;
}
@media (max-width: 560px) {
  .film-refs { grid-template-columns: 1fr; gap: 12px; }
  .film-ref__img { max-height: 360px; }
  .film-ref__cap { font-size: 12.5px; text-align: center; }
}


/* daily cover image over dark overlay at top of day card */
.day-cover__label {
  display: inline-block; margin: 4px 0 2px; padding: 3px 10px;
  font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: #0b1220; background: var(--aurora); border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

/* food / souvenirs / notes pills */
.pill-list { display: grid; gap: 10px; }
.food, .souvenir {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; background: var(--paper-2);
}
.food__name, .souvenir__name { font-weight: 800; color: var(--deep-blue); font-size: 15px; }
.food__why, .souvenir__why { font-size: 14px; color: var(--text-muted); margin-top: 3px; }
.food__type, .food__tip, .souvenir__where { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.food__type b, .souvenir__where b { color: var(--deep-blue); }

.note-list { padding-left: 20px; margin: 0; }
.note-list li { margin: 5px 0; font-size: 14.5px; }
.note-list li::marker { color: var(--aurora); }

/* ------------------------------------------------ Stay cards */
.stay-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.stay-card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-soft);
  overflow: hidden; transition: transform .15s ease, box-shadow .15s;
  display: flex; flex-direction: column;
}
.stay-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stay-card__head {
  padding: 16px 18px; color: #eaf3f8;
  background: linear-gradient(135deg, #1d2b45, #2e4257);
}
.stay-card__head .sc__nights { font-size: 12px; color: var(--aurora); letter-spacing: .06em; font-weight: 700; }
.stay-card__head h3 { margin: 4px 0 0; font-size: 17px; font-weight: 800; }
.stay-card__head .sc__city { font-size: 13px; color: #bcd0da; }
.stay-card__body { padding: 16px 18px; flex: 1; }
.stay-card__row { display: flex; justify-content: space-between; gap: 10px; font-size: 13.8px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.stay-card__row:last-child { border-bottom: 0; }
.stay-card__row .k { color: var(--text-muted); }
.stay-card__row .v { font-weight: 600; color: var(--text); text-align: right; }
.stay-card__total { font-size: 20px; font-weight: 800; color: var(--aurora); margin-top: 10px; }
.stay-card__guests { margin-top: 6px; font-size: 13px; color: var(--text-muted); }
.stay-card__foot { padding: 0 18px 18px; }
.stay-card__share {
  display: inline-block; font-size: 12.5px; cursor: pointer;
  color: var(--deep-blue); background: rgba(127,182,212,.12);
  border: 1px solid rgba(127,182,212,.3); border-radius: 8px;
  padding: 6px 12px; font-weight: 600;
}

/* ------------------------------------------------ Notes */
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.note-card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-soft);
}
.note-card h3 { margin: 0 0 10px; font-size: 16px; font-weight: 800; color: var(--deep-blue); display: flex; gap: 8px; align-items: center; }
.note-card ul { margin: 0; padding-left: 18px; }
.note-card li { font-size: 14px; margin: 5px 0; }
.note-card li::marker { color: var(--gold); }

/* ------------------------------------------------ Flight info */
.flight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.flight-card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-soft); overflow: hidden;
}
.flight-card__head {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 15px 18px; color: #eaf3f8;
  background: linear-gradient(135deg, #1d2b45, #2e4257);
}
.flight-card__title { font-size: 18px; font-weight: 800; }
.flight-card__route { flex: 1 1 auto; font-size: 13px; color: #bcd0da; text-align: right; }
.flight-card__chev { transition: transform .25s ease; color: #9db1c2; }
.flight-card.is-open .flight-card__chev { transform: rotate(180deg); }
.flight-card__body { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.flight-card.is-open .flight-card__body { max-height: 2000px; }
.flight__leg { padding: 12px 18px; }
.flight__leg + .flight__leg { border-top: 1px dashed var(--line); }
.flight__leg-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.flight__leg-num {
  font-size: 11px; font-weight: 800; color: var(--aurora);
  background: rgba(57,217,138,.12); border: 1px solid rgba(57,217,138,.3);
  padding: 2px 8px; border-radius: 999px;
}
.flight__leg-route { font-size: 14.5px; font-weight: 700; color: var(--deep-blue); }
.flight__row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.flight__row:last-child { border-bottom: 0; }
.flight__row .k { color: var(--text-muted); }
.flight__row .v { font-weight: 600; color: var(--text); text-align: right; }

@media (max-width: 480px) {
  .flight-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------ Footer */
.footer {
  text-align: center; color: #9db1c2; font-size: 13px;
  padding: 30px 18px 40px; border-top: 1px solid var(--line); margin-top: 10px;
}
.footer__offline { margin: 8px 0 0; font-size: 12px; color: #8ba7ba; }

/* ------------------------------------------------ Responsive */
@media (max-width: 720px) {
  .map__legend { max-width: 190px; font-size: 11.5px; padding: 10px; }
  .kv-list { grid-template-columns: 1fr; gap: 4px; }
  .acc__btn { padding: 14px 16px; }
  .acc__content { padding: 2px 16px 18px; }
  .day-card__banner { padding: 18px 18px 18px; padding-right: 132px; }
  .map-day-summary { gap: 10px; }
  .stay-grid, .notes-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  /* spot card stacks on narrow screens so the image doesn't break layout */
  .spot.has-img { flex-direction: column; }
  .spot.has-img .spot__media { flex: 0 0 auto; width: 100%; max-width: 100%; min-height: 150px; }
  .spot.has-img .spot__body { width: 100%; }
  /* person dropdown: full width, tap-friendly */
  .person-select { font-size: 15px; padding: 13px 38px 13px 14px; }
  .progress-person__control { max-width: none; }
  /* map occupies a sensible height, no overflow */
  #map { height: clamp(300px, 70vw, 420px); }
  .day-card__banner { padding: 16px; }
  .dc__meta { gap: 6px; }
  .map-days { max-width: 150px; right: 8px; bottom: 24px; }

  /* ---- compact / collapsed map UI so the map body is visible ---- */
  /* zoom control: smaller + tucked to a corner */
  .leaflet-control-zoom.leaflet-bar { margin: 6px !important; }
  .leaflet-control-zoom.leaflet-bar a {
    width: 28px !important; height: 28px !important; line-height: 26px !important;
    font-size: 16px !important; font-weight: 700;
  }
  /* overview button: smaller */
  .map__overview-btn {
    top: 8px; right: 8px; padding: 5px 10px; font-size: 11.5px;
    background: rgba(11,18,32,.72); color: var(--gold);
    border: 1px solid rgba(232,198,107,.5);
  }
  /* legend: collapsed by default (only a toggle chip), tiny */
  .map__legend {
    top: 8px; left: 8px;
    max-width: 150px; max-height: none; padding: 6px 8px;
    background: rgba(11,18,32,.66); font-size: 10.5px;
  }
  .map__legend.is-collapsed { background: rgba(11,18,32,.66); max-width: none; }
  .legend-toggle { font-size: 11px; padding-bottom: 4px; }
  .map__legend .legend-body { font-size: 10.5px; }
  .legend-active { font-size: 10.5px; padding: 4px 6px; }
  .map__legend-row { gap: 5px; }
  .legend-swatch { width: 14px; height: 6px; }
  .legend-dot { width: 8px; height: 8px; }
  .map__legend h4 { font-size: 10.5px; margin-bottom: 4px; }
  /* D1-D12 list: tighter, translucent, only highlights active day */
  .map__days {
    right: 6px; bottom: 20px; max-width: 150px; padding: 6px; gap: 3px;
    background: rgba(11,18,32,.60); border-radius: 8px;
  }
  .map-day { padding: 3px 5px; font-size: 10px; }
  .map-day b { font-size: 10.5px; }
  .map-day small { font-size: 8.5px; }
  /* D1-D12: on mobile replace the button list with a compact dropdown */
  .map__days { display: none !important; }
  .map-days-select {
    position: absolute; right: 8px; bottom: 20px; z-index: 800;
    display: block !important; width: 158px; max-width: 46vw;
    font: inherit; font-size: 11px; font-weight: 700;
    padding: 7px 26px 7px 10px; border-radius: 8px;
    color: #eaf3f8; background: rgba(11,18,32,.78);
    border: 1px solid rgba(127,182,212,.35);
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
  }
  .map-days-select option { color: #0b1220; background: #fff; }
  .map-days-select::-ms-expand { display: none; }
  /* short-name labels: smaller + more translucent */
  .short-label-icon .short-label {
    font-size: 9.5px; padding: 2px 5px; border-radius: 6px;
    background: rgba(11,18,32,.55);
    transform: translate(10px, -5px);
  }
  /* mileage label: smaller + more translucent */
  .dist-label { font-size: 10px; padding: 4px 8px; background: rgba(11,18,32,.62); }
  .dist-label::before { font-size: 8px; margin-right: 4px; }
  .dist-label--leg { font-size: 9.5px; padding: 2px 6px; background: rgba(232,198,107,.8); }
  /* day summary bar: compact, well-proportioned, no overflow/weird stretch */
  .map-day-summary {
    padding: 10px 12px; gap: 6px 14px;
    display: flex; flex-wrap: wrap; align-items: center;
    min-height: 0; max-height: 96px; overflow: hidden;
  }
  .map-day-summary .mds__item {
    min-width: 0; flex: 0 1 auto;
    display: inline-flex; flex-direction: row; gap: 6px; align-items: baseline;
  }
  /* the title+meta block spans the full width on mobile */
  .map-day-summary .mds__item:first-child { flex: 1 1 100%; flex-direction: column; gap: 1px; }
  .map-day-summary .mds__title {
    font-size: 13px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 100%;
  }
  .map-day-summary .mds__k { font-size: 11px; line-height: 1.35; }
  .map-day-summary .mds__v { font-size: 12.5px; line-height: 1.3; }
}
@media (max-width: 480px) {
  .hero__guests { gap: 6px; }
  .guest-pill { font-size: 11.5px; padding: 4px 9px; }
  .map__overview-btn { font-size: 12px; padding: 7px 12px; }
}

/* Leaflet zoom control: keep bottom-left, clear of legend/overview/attribution, theme-consistent */
.leaflet-control-zoom.leaflet-bar {
  border: 1px solid rgba(127,182,212,.30);
  box-shadow: var(--shadow-soft);
}
.leaflet-control-zoom.leaflet-bar a {
  color: var(--deep-blue);
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid rgba(127,182,212,.16);
}
.leaflet-control-zoom.leaflet-bar a:hover { background: #eaf3f8; }
@media (max-width: 480px) {
  .leaflet-control-zoom.leaflet-bar { margin-left: 10px; margin-bottom: 10px; }
}

/* driving-distance label on the route (only when >100km day selected) */
.dist-label-icon { background: transparent; border: none; }
.dist-label {
  display: inline-block; white-space: nowrap;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(11, 18, 32, .82);
  border: 1px solid rgba(127, 182, 212, .35);
  color: #eaf3f8; font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 3px 10px rgba(11, 18, 32, .28);
}
.dist-label::before {
  content: "▶"; margin-right: 6px; color: var(--aurora); font-size: 10px;
}
/* per-leg (>100km) km label: smaller, gold accent, distinct from the day-total label */
.dist-label--leg {
  font-size: 11px; padding: 3px 8px;
  background: rgba(232, 198, 107, .86);
  border: 1px solid rgba(232,198,107,.5);
  color: #0b1220;
}
.dist-label--leg::before { content: "▲"; color: #8a6d1f; font-size: 9px; margin-right: 4px; }

/* short display-name labels on map markers (start / end / spots) */
.short-label-icon { background: transparent; border: none; }
.short-label-icon .short-label {
  display: inline-block; white-space: nowrap;
  background: rgba(11, 18, 32, .82);
  border: 1px solid rgba(127, 182, 212, .35);
  color: #eaf3f8; font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
  padding: 3px 8px; border-radius: 999px;
  box-shadow: 0 3px 10px rgba(11, 18, 32, .28);
  transform: translate(14px, -8px); /* offset to the right of the marker dot */
}
