:root {
  /* Warm editorial palette */
  --paper: #efe9dc;
  --panel: #fcfaf4;
  --panel-2: #f6f1e7;
  --ink: #211e19;
  --ink-soft: #514d44;
  --muted: #8b8377;
  --faint: #b6ad9e;
  --line: #e6dfd0;
  --line-soft: #efe9dc;

  --accent: #7a2f4f;
  --accent-ink: #5f2440;
  --accent-soft: #f6e3ec;
  --gold: #ad7a33;

  --see: #2f6d8c;
  --food: #b4622f;
  --cafe: #9a6a3c;
  --shop: #8a5a8f;
  --transit: #76817a;
  --hike: #4f7a45;
  --beach: #2f8f93;
  --sport: #8a7a32;
  --experience: #5b6bb0;
  --stay: #9c6b6b;

  --ok: #3c7a57;
  --warn: #a9792c;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(33, 30, 25, 0.06);
  --shadow-md: 0 10px 30px rgba(33, 30, 25, 0.12);
  --shadow-lg: 0 24px 60px rgba(33, 30, 25, 0.22);

  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, a { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.hidden { display: none !important; }

.kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3 { margin: 0; }

/* ====== App shell ====== */
.app-shell {
  display: grid;
  grid-template-columns: 384px minmax(560px, 1fr) 412px;
  height: 100vh;
  min-width: 1100px;
}

.nav-panel,
.detail-panel {
  background: var(--panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.nav-panel { border-right: 1px solid var(--line); }
.detail-panel { border-left: 1px solid var(--line); overflow-y: auto; }

/* ====== Brand ====== */
.brand {
  padding: 22px 26px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.brand-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-mark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.9rem;
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
  line-height: 1;
}

.brand-trip {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.brand-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.brand-stats strong { color: var(--ink); font-weight: 800; }
.brand-stats .dot {
  width: 3px; height: 3px; border-radius: 999px; background: var(--faint);
}
.brand-stats .stat-mio strong { color: var(--accent); }

/* ====== Mode switch ====== */
.mode-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 16px 26px 0;
  padding: 4px;
  background: var(--panel-2);
  border-radius: 999px;
}

.mode-switch button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 9px 10px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.mode-switch button.active {
  background: var(--panel);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* ====== Day rail ====== */
.day-rail {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 16px 26px 14px;
  scrollbar-width: thin;
}
.day-rail::-webkit-scrollbar { height: 6px; }
.day-rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }

.day-chip {
  flex: 0 0 auto;
  width: 78px;
  text-align: left;
  padding: 9px 10px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  color: var(--ink-soft);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.day-chip:hover { transform: translateY(-2px); border-color: var(--faint); }

.day-chip .day-n {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.day-chip .day-mio {
  width: 6px; height: 6px; border-radius: 999px; background: var(--accent);
  opacity: 0;
}
.day-chip.has-mio .day-mio { opacity: 1; }

.day-chip .day-date {
  display: block;
  margin-top: 6px;
  font-family: var(--display);
  font-size: 1.04rem;
  font-weight: 600;
  line-height: 1;
}

.day-chip .day-city {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
  box-shadow: 0 8px 20px rgba(122, 47, 79, 0.16);
}
.day-chip.active .day-n,
.day-chip.active .day-city { color: var(--accent); }

/* ====== Scrollable panel body ====== */
.panel-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0 20px;
}
.panel-scroll::-webkit-scrollbar { width: 8px; }
.panel-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }

/* ====== Day head (route summary) ====== */
.day-head {
  padding: 16px 26px 4px;
}

.day-head .progress {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}
.day-head .progress-bar {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.day-head .progress-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 400ms ease;
}
.day-head .progress-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.day-head h2 {
  font-family: var(--display);
  font-size: 1.62rem;
  font-weight: 600;
  line-height: 1.06;
  margin-top: 8px;
  letter-spacing: -0.01em;
}

.day-head .day-sub {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.route-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.route-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 700;
}
.route-chip.mio { background: var(--accent-soft); color: var(--accent); }
.route-chip svg { opacity: 0.6; }

/* ====== Filters ====== */
.search-row {
  padding: 14px 26px 0;
}

.search-box {
  display: grid;
  grid-template-columns: 18px 1fr 28px;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 7px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  box-shadow: 0 6px 18px rgba(35, 31, 26, 0.05);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
}

.search-box input::placeholder {
  color: var(--faint);
  font-weight: 650;
}

.search-clear {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 800;
}

.search-clear:hover { background: var(--line); color: var(--ink); }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 16px 26px 14px;
  margin-top: 2px;
  border-bottom: 1px solid var(--line-soft);
}
.filter-break { flex-basis: 100%; height: 0; margin: 1px 0; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}
.filter-chip:hover { transform: translateY(-1px); border-color: var(--faint); }
.filter-chip .count {
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 800;
}
.filter-chip.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.filter-chip.active .count { color: rgba(255, 255, 255, 0.75); }
.filter-chip.empty { opacity: 0.42; }
.filter-chip.mio-chip { border-color: var(--accent-soft); color: var(--accent); }
.filter-chip.mio-chip.active { background: var(--accent); color: #fff; }
.filter-chip.mio-chip::before {
  content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--accent);
}
.filter-chip.mio-chip.active::before { background: #fff; }

.city-filter-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 26px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.city-filter-row::-webkit-scrollbar { height: 6px; }
.city-filter-row::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }

.city-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 29px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 750;
}

.city-chip .count {
  color: var(--faint);
  font-size: 0.66rem;
  font-weight: 850;
}

.city-chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.city-chip.active .count { color: rgba(255, 255, 255, 0.75); }

/* ====== Timeline ====== */
.timeline {
  padding: 14px 18px 8px;
  overflow-x: hidden;
}

.timeline-stop {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 48px 1fr 62px;
  gap: 11px;
  margin-bottom: 4px;
  padding: 11px 12px 11px 10px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: transparent;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.stop-thumb {
  flex: 0 0 auto;
  align-self: center;
  width: 62px; height: 62px;
  border-radius: 10px;
  background: var(--panel-2);
  background-position: center;
  background-size: cover;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(33, 30, 25, 0.08);
}
img.stop-thumb { display: block; }
.stop-thumb.ph {
  display: grid; place-items: center;
  color: #fff; background: var(--see);
}
.stop-thumb.ph svg { width: 22px; height: 22px; }
.stop-thumb.ph.food { background: var(--food); } .stop-thumb.ph.cafe { background: var(--cafe); }
.stop-thumb.ph.shop { background: var(--shop); } .stop-thumb.ph.transit { background: var(--transit); }
.stop-thumb.ph.hike { background: var(--hike); } .stop-thumb.ph.beach { background: var(--beach); }
.stop-thumb.ph.padel, .stop-thumb.ph.sport { background: var(--sport); }
.stop-thumb.ph.experience { background: var(--experience); } .stop-thumb.ph.stay { background: var(--stay); }
.timeline-stop:hover { background: var(--panel-2); }
.timeline-stop.active {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow-md);
}
.timeline-stop.active::before {
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
}

.stop-time {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--muted);
  line-height: 1.2;
  padding-top: 1px;
}
.timeline-stop.active .stop-time { color: var(--accent); }
.stop-time .stop-daytag {
  display: block;
  margin-top: 2px;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-stop-wrap { margin-bottom: 6px; }

.timeline-stop-wrap,
.stop-body {
  min-width: 0;
  max-width: 100%;
}

.choice-rail {
  margin: -1px 0 12px 59px;
  padding: 8px 0 2px;
  max-width: calc(100% - 59px);
  width: calc(100% - 59px);
  box-sizing: border-box;
  overflow: hidden;
  border-left: 1px solid var(--line);
}

.choice-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px 7px 11px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.choice-head strong {
  min-width: 0;
  color: var(--accent);
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.choice-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: 100%;
  padding: 0 10px 7px 11px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.choice-card {
  flex: 0 0 184px;
  display: grid;
  grid-template-columns: 46px 1fr;
  grid-template-rows: 1fr auto;
  gap: 8px;
  min-height: 108px;
  padding: 8px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(252, 250, 244, 0.72);
  color: var(--ink);
  scroll-snap-align: start;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.choice-card:hover {
  transform: translateY(-1px);
  background: var(--panel);
  border-color: rgba(122, 47, 79, 0.28);
  box-shadow: var(--shadow-sm);
}

.choice-card.selected {
  border-color: var(--gold);
  background: rgba(173, 122, 51, 0.1);
  box-shadow: 0 0 0 2px rgba(173, 122, 51, 0.12);
}

.choice-card.must:not(.selected) { border-color: rgba(173, 122, 51, 0.42); }

.choice-photo {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--panel-2) center / cover no-repeat;
  color: #fff;
  overflow: hidden;
}

.choice-photo svg { width: 18px; height: 18px; }
.choice-photo.ph.food { background: var(--food); }
.choice-photo.ph.cafe { background: var(--cafe); }
.choice-photo.ph.shop { background: var(--shop); }
.choice-photo.ph.padel, .choice-photo.ph.sport { background: var(--sport); }

.choice-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.choice-name {
  max-width: 100%;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.16;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.choice-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.2;
}

.choice-card .google-rating-pill {
  margin-top: 6px;
  padding: 2px 6px;
  font-size: 0.62rem;
}

.choice-want {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  color: var(--gold);
  font-size: 0.62rem;
  font-weight: 850;
}

.choice-action {
  grid-column: 1 / -1;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.choice-card.selected .choice-action {
  background: var(--gold);
  color: #fff;
}

.stop-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.2;
}
.stop-cat-icon {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--see);
  color: #fff;
}
.stop-cat-icon svg { width: 12px; height: 12px; display: block; }
.stop-cat-icon.food { background: var(--food); }
.stop-cat-icon.cafe { background: var(--cafe); }
.stop-cat-icon.shop { background: var(--shop); }
.stop-cat-icon.transit { background: var(--transit); }
.stop-cat-icon.hike { background: var(--hike); }
.stop-cat-icon.beach { background: var(--beach); }
.stop-cat-icon.padel { background: var(--sport); }
.stop-cat-icon.sport { background: var(--sport); }
.stop-cat-icon.experience { background: var(--experience); }
.stop-cat-icon.stay { background: var(--stay); }
.stop-cat-icon.mio { background: var(--accent); }

.stop-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.4;
}

.google-rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  margin-top: 7px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(173, 122, 51, 0.12);
  color: var(--gold);
  font-size: 0.69rem;
  font-weight: 850;
  line-height: 1.1;
}

.badges { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.badge.mio { background: var(--accent-soft); color: var(--accent); }
.badge.booked { background: #e7eef0; color: var(--see); }
.badge.optional { background: #efece2; color: var(--gold); }
.badge.must { background: rgba(173, 122, 51, 0.16); color: var(--gold); }
.badge.maybe { background: #e7eef0; color: var(--see); }
.badge.no { background: rgba(126, 55, 43, 0.1); color: #8f4b3d; }

/* ====== Timeline empty state ====== */
.timeline-empty {
  margin: 8px 16px;
  padding: 26px 22px;
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  text-align: center;
  background: var(--panel-2);
}
.timeline-empty .em-icon { font-size: 1.4rem; }
.timeline-empty h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 8px 0 4px;
}
.timeline-empty p { margin: 0 0 14px; color: var(--muted); font-size: 0.85rem; line-height: 1.45; }
.timeline-empty button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 800;
  font-size: 0.8rem;
}

/* ====== Day groups, view toggle, mood board ====== */
.day-view-toggle {
  display: inline-flex;
  gap: 2px;
  margin: 0 0 14px;
  padding: 3px;
  background: var(--panel-2);
  border-radius: 999px;
}
.day-view-toggle button {
  border: 0; background: transparent;
  padding: 6px 14px; border-radius: 999px;
  color: var(--muted); font-size: 0.76rem; font-weight: 800;
}
.day-view-toggle button.active { background: var(--panel); color: var(--accent); box-shadow: var(--shadow-sm); }

.tl-group { margin-bottom: 10px; }
.tl-group-head {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 4px 8px;
  color: var(--ink-soft);
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.tl-group-head svg { width: 15px; height: 15px; color: var(--gold); flex: 0 0 auto; }
.tl-group-count { margin-left: auto; color: var(--faint); letter-spacing: 0; font-weight: 800; }

.mood-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 2px 2px 6px; }
.mood-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 0; border-radius: var(--r-md);
  background: var(--panel-2);
  background-position: center; background-size: cover;
  overflow: hidden; cursor: pointer; padding: 0;
  box-shadow: inset 0 0 0 1px rgba(33, 30, 25, 0.08);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.mood-tile:hover { transform: translateY(-2px); }
.mood-tile.active { box-shadow: 0 0 0 2px var(--accent), var(--shadow-md); }
.mood-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 42%, rgba(0,0,0,0.66)); }
.mood-ph { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: var(--see); }
.mood-ph svg { width: 30px; height: 30px; }
.mood-ph.food { background: var(--food); } .mood-ph.cafe { background: var(--cafe); }
.mood-ph.shop { background: var(--shop); } .mood-ph.transit { background: var(--transit); }
.mood-ph.hike { background: var(--hike); } .mood-ph.beach { background: var(--beach); }
.mood-ph.padel, .mood-ph.sport { background: var(--sport); }
.mood-ph.experience { background: var(--experience); } .mood-ph.stay { background: var(--stay); }
.mood-cap { position: absolute; left: 11px; right: 11px; bottom: 9px; z-index: 1; text-align: left; color: #fff; }
.mood-name { display: block; font-weight: 800; font-size: 0.82rem; line-height: 1.15; }
.mood-meta { display: block; margin-top: 2px; font-size: 0.68rem; font-weight: 600; color: rgba(255, 255, 255, 0.85); }
.mood-fav {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px;
  background: rgba(252, 250, 244, 0.92); color: var(--accent); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* ====== Map ====== */
.map-stage { position: relative; background: var(--paper); }
#map { position: absolute; inset: 0; }

.map-topbar {
  position: absolute;
  z-index: 5;
  top: 18px; left: 18px;
  display: flex;
  gap: 8px;
}

.map-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: rgba(252, 250, 244, 0.92);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.84rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  transition: transform 150ms ease, background 150ms ease;
}
.map-btn:hover { transform: translateY(-1px); }
.map-btn.primary { background: var(--accent); color: #fff; border-color: transparent; }
.map-btn.primary:hover { background: var(--accent-ink); }

/* Play HUD */
.play-hud {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 360px;
  padding: 13px 15px 15px;
  border-radius: var(--r-md);
  background: rgba(26, 23, 19, 0.86);
  color: #fff;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  animation: hudIn 220ms ease;
}
@keyframes hudIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.play-hud-row { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.play-hud-nav-group { flex: 0 0 auto; display: flex; gap: 6px; }
.play-hud-nav {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16); color: #fff;
  transition: background 150ms ease, opacity 150ms ease, transform 150ms ease;
}
.play-hud-nav:hover:not(:disabled) { background: rgba(255, 255, 255, 0.32); transform: scale(1.05); }
.play-hud-nav:disabled { opacity: 0.28; cursor: default; }
.play-hud-nav svg { width: 15px; height: 15px; }
.play-hud-info { flex: 1; min-width: 0; }
.play-hud-step {
  display: block;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.play-hud-stop {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 0.72rem;
  font-weight: 800;
}
.play-hud-title {
  display: block;
  margin: 2px 0 0;
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.12;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.play-hud-track { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.play-hud-track span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #fff, var(--gold));
  border-radius: 999px;
  transition: width 350ms ease;
}
.play-hud.paused .play-hud-step { color: var(--gold); }
.play-hud.paused .play-hud-track span { opacity: 0.55; }

/* Legend / map key */
.map-legend {
  position: absolute;
  z-index: 5;
  left: 18px; bottom: 18px;
  width: 264px;
  border-radius: var(--r-md);
  background: rgba(252, 250, 244, 0.94);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  overflow: hidden;
}
.legend-head {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  border: 0; background: transparent;
  color: var(--muted);
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.legend-head .chev { transition: transform 200ms ease; font-size: 0.7rem; }
.map-legend.collapsed .legend-head .chev { transform: rotate(-90deg); }
.legend-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 12px;
  padding: 2px 14px 13px;
}
.map-legend.collapsed .legend-body { display: none; }
.legend-row {
  display: flex; align-items: center; gap: 8px;
  color: var(--ink-soft); font-size: 0.74rem; font-weight: 700;
}
.legend-pin {
  flex: 0 0 auto;
  width: 19px; height: 19px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--see); color: #fff;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.legend-pin svg { width: 11px; height: 11px; display: block; }
.legend-pin.food { background: var(--food); }
.legend-pin.cafe { background: var(--cafe); }
.legend-pin.shop { background: var(--shop); }
.legend-pin.transit { background: var(--transit); }
.legend-pin.hike { background: var(--hike); }
.legend-pin.beach { background: var(--beach); }
.legend-pin.padel { background: var(--sport); }
.legend-pin.sport { background: var(--sport); }
.legend-pin.experience { background: var(--experience); }
.legend-pin.stay { background: var(--stay); }
.legend-pin.mio { background: var(--accent); }
.legend-divider { grid-column: 1 / -1; height: 1px; background: var(--line); margin: 5px 0 3px; }
.legend-status { grid-column: 1 / -1; display: flex; gap: 14px; flex-wrap: wrap; }
.legend-swatch {
  flex: 0 0 auto; width: 16px; height: 16px; border-radius: 999px;
  background: var(--see); border: 1.5px solid #fff;
}
.legend-swatch.mio { background: var(--accent); box-shadow: 0 0 0 2.5px rgba(122, 47, 79, 0.3); }
.legend-swatch.booked { background: var(--ink-soft); box-shadow: 0 0 0 2.5px rgba(173, 122, 51, 0.55); }
.legend-swatch.homebase { background: #0f766e; box-shadow: 0 0 0 2.5px rgba(173, 122, 51, 0.55); }
.legend-swatch.optional { background: transparent; border: 1.5px dashed var(--gold); }

.hero-cat svg { width: 12px; height: 12px; vertical-align: -2px; margin-right: 4px; }

/* ====== Map pins ====== */
.pin {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--see);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 150ms ease, opacity 150ms ease, box-shadow 150ms ease;
}
.pin svg { width: 16px; height: 16px; display: block; }
.pin.food { background: var(--food); }
.pin.cafe { background: var(--cafe); }
.pin.shop { background: var(--shop); }
.pin.transit { background: var(--transit); }
.pin.hike { background: var(--hike); }
.pin.beach { background: var(--beach); }
.pin.padel { background: var(--sport); }
.pin.sport { background: var(--sport); }
.pin.experience { background: var(--experience); }
.pin.stay { background: var(--stay); }
.pin.homebase {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #0f766e, #154c57) !important;
  border: 3px solid #fff8df;
  box-shadow: 0 0 0 4px rgba(173, 122, 51, 0.5), 0 8px 22px rgba(0, 0, 0, 0.38);
}
.pin.homebase::before {
  content: "HOME";
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(252, 250, 244, 0.97);
  color: #0f766e;
  font-size: 0.52rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.06em;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.18);
}
.pin.homebase svg { width: 18px; height: 18px; }
.pin.mio { background: var(--accent); box-shadow: 0 0 0 4px rgba(122, 47, 79, 0.22), 0 4px 12px rgba(0, 0, 0, 0.3); }
.pin.booked { box-shadow: 0 0 0 3px rgba(173, 122, 51, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3); }
.pin.homebase.booked {
  box-shadow: 0 0 0 4px rgba(173, 122, 51, 0.5), 0 8px 22px rgba(0, 0, 0, 0.38);
}
.pin.optional { border-style: dashed; opacity: 0.85; }
.pin.mustdo {
  box-shadow: 0 0 0 4px rgba(173, 122, 51, 0.5), 0 0 0 8px rgba(255, 255, 255, 0.78), 0 6px 16px rgba(0, 0, 0, 0.34);
}
.pin.mustdo::after {
  content: "\2605";
  position: absolute;
  top: -8px; right: -8px;
  width: 16px; height: 16px;
  display: grid; place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font-size: 9px;
  line-height: 1;
}
.pin.maybe { box-shadow: 0 0 0 4px rgba(47, 109, 140, 0.34), 0 4px 12px rgba(0, 0, 0, 0.3); }
.pin.no { opacity: 0.55; filter: saturate(0.65); }
.pin.dimmed { opacity: 0.26; filter: saturate(0.4); }
.pin.selected {
  transform: scale(1.32);
  z-index: 3;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.9), 0 8px 20px rgba(0, 0, 0, 0.36);
}
.pin.mio.selected { box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.92), 0 0 0 9px rgba(122, 47, 79, 0.3); }

/* Ghost pins: carousel options echoed on the map (visual only, not the fixed route) */
.pin.ghost {
  pointer-events: none !important;
  width: 23px; height: 23px;
  opacity: 0.62 !important;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.92);
  background: #7f8581 !important;
  color: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  filter: grayscale(1) saturate(0.25);
}
.pin.ghost svg { width: 12px; height: 12px; }
.pin.ghost::after { display: none; }
.pin.ghost.ghost-chosen {
  opacity: 0.92 !important;
  border-style: solid;
  background: #6f756f !important;
  box-shadow: 0 0 0 3px rgba(173, 122, 51, 0.55), 0 3px 9px rgba(0, 0, 0, 0.28);
  filter: grayscale(1) saturate(0.35);
}
.pin.ghost.ghost-chosen::before {
  content: "ALT";
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(252, 250, 244, 0.94);
  color: var(--gold);
  font-size: 0.52rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.pin.mustdo.selected { box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.92), 0 0 0 10px rgba(173, 122, 51, 0.42), 0 8px 20px rgba(0, 0, 0, 0.36); }

/* Popups */
.mapboxgl-popup-content {
  padding: 10px 13px;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-md);
  font-family: var(--sans);
}
.popup-title { margin: 0 0 2px; font-weight: 800; color: var(--ink); }
.popup-meta { margin: 0; color: var(--muted); font-size: 0.76rem; font-weight: 600; }

/* ====== Hover card ====== */
.hover-card {
  position: absolute;
  z-index: 8;
  width: 264px;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: hoverIn 130ms ease-out;
}
@keyframes hoverIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.hover-carousel-wrap {
  position: relative;
  background: #14110e;
}
.hover-carousel {
  display: grid;
  grid-auto-columns: 100%;
  grid-auto-flow: column;
  overflow-x: auto;
  background: #14110e;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.hover-carousel::-webkit-scrollbar { display: none; }
.hover-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 999px;
  background: rgba(20,17,14,0.62);
  color: #fff;
  font-size: 1.08rem;
  line-height: 1;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 140ms ease, background 140ms ease;
}
.hover-card:hover .hover-arrow { opacity: 1; }
.hover-arrow:hover { background: rgba(20,17,14,0.84); }
.hover-arrow.prev { left: 8px; }
.hover-arrow.next { right: 8px; }
.hover-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}
.hover-dot {
  width: 6px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255,255,255,0.48);
}
.hover-dot.active {
  width: 15px;
  background: #fff;
}
.hover-slide {
  position: relative;
  height: 150px;
  background-color: #d8d2c6;
  background-position: center;
  background-size: cover;
  color: #fff;
  text-decoration: none;
  scroll-snap-align: start;
}
.hover-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.55));
}
.hover-slide span {
  position: absolute; left: 10px; right: 10px; bottom: 9px; z-index: 1;
  font-size: 0.7rem; font-weight: 700; line-height: 1.2;
}
.hover-slide.action {
  display: flex; flex-direction: column; justify-content: flex-end; padding: 12px;
  background: linear-gradient(135deg, #211e19, var(--accent));
}
.hover-slide.action::after { display: none; }
.hover-slide.action strong { font-size: 0.98rem; }
.hover-slide.action span { position: static; margin-top: 3px; color: rgba(255,255,255,0.8); }
.hover-slide.placeholder {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 12px;
  background: #211e19;
  color: #fff;
}
.hover-slide.placeholder::after { display: none; }
.hover-slide.placeholder strong {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
}
.hover-slide.placeholder span {
  position: static;
  color: rgba(255,255,255,0.72);
  font-size: 0.72rem;
}

.hover-copy { padding: 11px 13px 13px; }
.hover-copy .hover-meta {
  display: flex; align-items: center; gap: 7px; margin-bottom: 6px;
}
.hover-copy .hover-kick {
  color: var(--accent); font-size: 0.66rem; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.hover-copy strong { display: block; font-size: 1.02rem; line-height: 1.15; }
.hover-google {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(173, 122, 51, 0.11);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
}
.hover-google strong { color: var(--gold); font-weight: 900; }
.hover-google a {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
  text-decoration: none;
}
.hover-google a:hover { text-decoration: underline; }
.hover-google.muted {
  justify-content: flex-start;
  background: var(--panel-2);
  color: var(--muted);
}
.hover-copy .hover-what { display: block; margin-top: 5px; color: var(--muted); font-size: 0.78rem; line-height: 1.35; }

/* Confidence chip (shared) */
.conf {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.64rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--panel-2); color: var(--muted);
}
.conf::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.conf.exact { background: rgba(60, 122, 87, 0.14); color: var(--ok); }
.conf.context { background: rgba(169, 121, 44, 0.16); color: var(--warn); }
.conf.search { background: var(--panel-2); color: var(--muted); }

/* ====== Detail / empty ====== */
.detail-empty { padding: 40px 32px; }
.detail-empty h2 {
  margin: 10px 0;
  font-family: var(--display);
  font-size: 1.95rem;
  font-weight: 600;
  line-height: 1.05;
}
.detail-empty p:last-child { color: var(--muted); line-height: 1.5; }

/* Hero carousel */
.detail-hero {
  position: relative;
  height: 258px;
  background: #14110e;
  overflow: hidden;
}
.hero-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  position: relative;
  background-color: #d8d2c6;
  background-position: center;
  background-size: cover;
}
.hero-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0) 32%, rgba(0,0,0,0.06) 60%, rgba(0,0,0,0.62) 100%);
}
.hero-slide.action {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg, #211e19, var(--accent));
  color: #fff; text-decoration: none;
}
.hero-slide.action::after { display: none; }
.hero-slide.action strong { font-size: 1.05rem; }
.hero-slide.action span { color: rgba(255,255,255,0.78); font-size: 0.82rem; }
.hero-slide.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 28px;
  background: #211e19;
  color: #fff;
  text-align: center;
}
.hero-slide.placeholder::after { display: none; }
.hero-slide.placeholder strong {
  font-family: var(--display);
  font-size: 1.32rem;
  font-weight: 600;
}
.hero-slide.placeholder span {
  color: rgba(255,255,255,0.72);
  font-size: 0.84rem;
  font-weight: 700;
}

.hero-overlay {
  position: absolute;
  z-index: 2;
  top: 14px; left: 14px; right: 14px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.hero-overlay .left { display: flex; gap: 7px; }
.hero-cat {
  padding: 5px 10px; border-radius: 999px;
  background: rgba(20,17,14,0.55); color: #fff;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.hero-overlay .conf { background: rgba(255,255,255,0.92); }
.hero-maps {
  position: absolute; z-index: 2; right: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.16);
  color: #fff; font-size: 0.78rem; font-weight: 800;
  backdrop-filter: blur(10px);
}
.hero-maps:hover { background: rgba(255,255,255,0.28); }

.hero-arrow {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; border-radius: 999px;
  background: rgba(255,255,255,0.86);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  opacity: 0; transition: opacity 160ms ease;
}
.detail-hero:hover .hero-arrow { opacity: 1; }
.hero-arrow.prev { left: 12px; }
.hero-arrow.next { right: 12px; }

.hero-dots {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 50px;
  display: flex; justify-content: center; gap: 6px;
}
.hero-dot {
  width: 6px; height: 6px; border-radius: 999px; border: 0;
  background: rgba(255,255,255,0.5);
  transition: width 160ms ease, background 160ms ease;
}
.hero-dot.active { width: 18px; background: #fff; }

/* Detail body */
.detail-body { padding: 20px 26px 32px; }
.detail-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.detail-title-row {
  display: flex; gap: 14px; justify-content: space-between; align-items: flex-start;
  margin-top: 8px;
}
.detail-title-row h2 {
  font-family: var(--display);
  font-size: 1.95rem; font-weight: 600; line-height: 1.05; letter-spacing: -0.01em;
}
.detail-mio-badge {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
}
.detail-mio-badge svg { width: 11px; height: 11px; }

.google-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 750;
}
.google-meta strong { color: var(--gold); font-weight: 900; }
.google-meta a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 850;
}
.google-meta a:hover { text-decoration: underline; }

/* At a glance */
.glance {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--panel);
}
.glance-row { display: flex; gap: 12px; padding: 13px 15px; }
.glance-row + .glance-row { border-top: 1px solid var(--line-soft); }
.glance-row.mio { background: var(--accent-soft); }
.glance-label {
  flex: 0 0 96px;
  color: var(--muted);
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding-top: 2px;
}
.glance-row.mio .glance-label { color: var(--accent); }
.glance-text { color: var(--ink); font-size: 0.92rem; line-height: 1.45; }
.glance-row.mio .glance-text { color: var(--accent-ink); }

/* Media block */
.media-block { margin-top: 24px; }
.media-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 11px;
}
.media-head h3 {
  font-family: var(--display);
  font-size: 1.08rem; font-weight: 600;
}

.video-frame {
  margin-top: 10px;
  overflow: hidden; border-radius: var(--r-md); background: #14110e; aspect-ratio: 16 / 9;
}
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.video-fallback {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  background: var(--panel-2);
}
.video-fallback p { margin: 0 0 14px; color: var(--ink-soft); font-size: 0.88rem; line-height: 1.45; }
.video-fallback .fallback-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.video-fallback a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink); font-size: 0.8rem; font-weight: 800; text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease;
}
.video-fallback a:hover { transform: translateY(-1px); border-color: var(--faint); }
.video-fallback a.primary { border-color: var(--accent); background: var(--accent); color: #fff; }

.social-search {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
}
.social-search p {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 800;
}
.social-search .fallback-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.social-search .find-clips {
  margin-top: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  text-decoration: none;
}
.social-search .find-clips:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.tiktok-embed {
  margin-top: 10px;
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-md); background: #111;
}
.tiktok-embed iframe { display: block; width: 100%; height: 560px; border: 0; }
.tiktok-embed a {
  display: block; padding: 10px 13px; background: var(--panel); color: var(--ink);
  font-size: 0.78rem; font-weight: 800; text-decoration: none;
}

.instagram-strip {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.instagram-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #111;
}

.instagram-card iframe {
  display: block;
  width: 100%;
  height: 620px;
  border: 0;
  background: #fff;
}

.instagram-card a {
  display: block;
  padding: 10px 13px;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.find-clips {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 11px;
  color: var(--accent); font-size: 0.8rem; font-weight: 800; text-decoration: none;
}
.find-clips:hover { text-decoration: underline; }

/* Same day */
.sameday { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.sameday-list { display: grid; gap: 7px; margin-top: 12px; }
.sameday-item {
  display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center;
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--panel); text-align: left;
  transition: border-color 150ms ease, transform 150ms ease, background 150ms ease;
}
.sameday-item:hover { transform: translateY(-1px); border-color: var(--faint); background: var(--panel-2); }
.sameday-item .sd-time { font-size: 0.74rem; font-weight: 800; color: var(--muted); }
.sameday-item .sd-name { font-size: 0.86rem; font-weight: 700; line-height: 1.2; }
.sameday-item .sd-mio {
  width: 7px; height: 7px; border-radius: 999px; background: var(--accent);
}

/* ====== Responsive: keep usable at 1440x900 and 1366x768 ====== */
@media (max-width: 1480px) {
  .app-shell { grid-template-columns: 356px minmax(480px, 1fr) 384px; }
  .brand-mark { font-size: 1.75rem; }
  .day-head h2 { font-size: 1.5rem; }
  .detail-title-row h2 { font-size: 1.75rem; }
}

/* ====== v3: Cinematic trip story ====== */
.cinema {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
}
.cinema.hidden { display: none; }
.cinema-skip {
  position: absolute;
  top: 18px; right: 18px;
  pointer-events: auto !important;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(20, 17, 14, 0.62);
  color: #fff;
  font-size: 0.78rem; font-weight: 800;
  backdrop-filter: blur(10px);
}
.cinema-dots {
  position: absolute;
  top: 22px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(20, 17, 14, 0.45);
  backdrop-filter: blur(10px);
}
.cinema-dots i {
  width: 7px; height: 7px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  transition: width 220ms ease, background 220ms ease;
}
.cinema-dots i.active { width: 22px; background: #fff; }
.cinema-dots i.done { background: var(--gold); }

.cinema-caption {
  position: absolute;
  left: 26px; bottom: 30px;
  width: 380px;
  display: flex; gap: 14px; align-items: center;
  padding: 16px;
  border-radius: var(--r-lg);
  background: rgba(20, 17, 14, 0.82);
  color: #fff;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
  animation: cinemaIn 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes cinemaIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.cinema-photo {
  flex: 0 0 96px;
  width: 96px; height: 96px;
  border-radius: var(--r-md);
  background-color: #2a2620;
  background-position: center; background-size: cover;
  animation: kenburns 5s ease-out forwards;
}
@keyframes kenburns { from { background-size: 118%; } to { background-size: 132%; } }
.cinema-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
}
.cinema-caption h2 {
  margin: 6px 0 0;
  font-family: var(--display);
  font-size: 1.5rem; font-weight: 600; line-height: 1.05;
}
.cinema-sub { margin: 6px 0 0; color: rgba(255, 255, 255, 0.72); font-size: 0.82rem; font-weight: 600; }

/* ====== v3: "Ours" personal layer ====== */
.stop-fav {
  position: absolute;
  top: 7px; right: 7px;
  z-index: 1;
  display: grid; place-items: center;
  width: 20px; height: 20px; border-radius: 999px;
  background: rgba(252, 250, 244, 0.92);
  color: var(--accent);
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.stop-status-dot {
  flex: 0 0 auto;
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--gold);
}
.timeline-stop { position: relative; }

.filter-chip.saved-chip { border-color: var(--accent-soft); color: var(--accent); }
.filter-chip.saved-chip::before { content: "\2665"; font-size: 0.78rem; line-height: 1; }
.filter-chip.saved-chip.active { background: var(--accent); color: #fff; }

.filter-chip.ig-chip { border-color: #d8c2da; color: var(--shop); }
.filter-chip.ig-chip::before {
  content: "";
  width: 11px; height: 11px;
  border: 1.6px solid currentColor;
  border-radius: 3.5px;
}
.filter-chip.ig-chip.active { background: var(--shop); color: #fff; border-color: var(--shop); }

.filter-chip.mustdo-chip { border-color: rgba(173, 122, 51, 0.5); color: var(--gold); }
.filter-chip.mustdo-chip::before { content: "\2605"; font-size: 0.78rem; line-height: 1; }
.filter-chip.mustdo-chip.active { background: var(--gold); color: #fff; border-color: var(--gold); }

/* Who-wants-it attribution chips (shared picks) */
.pick-chips { display: inline-flex; gap: 3px; vertical-align: middle; }
.pick-chip {
  display: inline-grid; place-items: center;
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px;
  font-size: 0.58rem; font-weight: 900; line-height: 1; letter-spacing: 0.02em;
  border: 1.5px solid var(--pc);
  color: var(--pc); background: transparent;
}
.pick-chip.must { background: var(--pc); color: #fff; }
.pick-chip.maybe { border-style: dashed; opacity: 0.8; }
.pick-chip.no {
  opacity: 0.72;
  text-decoration: line-through;
  background: rgba(126, 55, 43, 0.08);
}

.detail-wants {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
}
.detail-wants-text { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); }

.personal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px 0;
}
.personal-who { font-size: 0.76rem; color: var(--muted); font-weight: 600; }
.who-switch {
  border: 0; background: transparent; padding: 0 0 0 4px;
  color: var(--accent); font-size: 0.72rem; font-weight: 800; text-decoration: underline;
}
.export-picks {
  flex: 0 0 auto;
  border: 1px solid var(--line); background: var(--panel);
  border-radius: 999px; padding: 6px 12px;
  font-size: 0.74rem; font-weight: 800; color: var(--ink-soft);
  transition: border-color 150ms ease, transform 150ms ease;
}
.export-picks:hover { transform: translateY(-1px); border-color: var(--faint); }

.personal {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  overflow: hidden;
}
.personal-bar {
  display: flex; gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.pbtn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 0.78rem; font-weight: 800;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}
.pbtn:hover { transform: translateY(-1px); }
.pbtn.heart.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.pbtn.must.active { border-color: var(--gold); background: rgba(173, 122, 51, 0.14); color: var(--gold); }
.pbtn.maybe.active { border-color: var(--see); background: rgba(47, 109, 140, 0.12); color: var(--see); }
.pbtn.no.active { border-color: #8f4b3d; background: rgba(143, 75, 61, 0.12); color: #8f4b3d; }
.personal-note {
  display: block;
  width: 100%;
  min-height: 60px;
  border: 0;
  padding: 12px 14px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.45;
  resize: vertical;
}
.personal-note::placeholder { color: var(--faint); }
.personal-note:focus-visible { outline: none; background: var(--panel-2); }

/* ====== v3: Trip-day toolkit ====== */
.day-toolkit {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.tool {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 0.76rem; font-weight: 700;
}
.tool .tool-ico { font-size: 0.92rem; line-height: 1; }
.tool.sunset { color: var(--food); }
.tool.weather.loading { color: var(--faint); }
.tool-print {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--panel);
  color: var(--accent);
  font-size: 0.76rem; font-weight: 800;
  transition: background 150ms ease, color 150ms ease;
}
.tool-print:hover { background: var(--accent); color: #fff; }

/* Print sheet (screen-hidden, print-only) */
.print-sheet { display: none; }

@media print {
  body { overflow: visible; background: #fff; }
  .app-shell, .cinema, .hover-card { display: none !important; }
  .print-sheet {
    display: block;
    padding: 0;
    color: #000;
    font-family: var(--sans);
  }
  .print-sheet .ps-kicker { color: #7a2f4f; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; margin: 0; }
  .print-sheet h1 { font-family: var(--display); font-size: 30px; margin: 4px 0 2px; }
  .print-sheet .ps-meta { color: #555; font-size: 13px; margin: 0 0 18px; }
  .print-sheet .ps-cover { width: 100%; height: 168px; object-fit: cover; border-radius: 8px; margin-bottom: 16px; }
  .print-sheet .ps-group { margin-top: 16px; }
  .print-sheet .ps-group-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 8px 0 6px;
    border-bottom: 2px solid #7a2f4f;
    break-after: avoid;
    page-break-after: avoid;
    font-family: var(--display);
    font-size: 20px;
    color: #231f20;
  }
  .print-sheet .ps-group-title small {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a2f4f;
  }
  .print-sheet .ps-stop { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid #ddd; page-break-inside: avoid; }
  .print-sheet .ps-group-title + .ps-stop { border-top: 0; }
  .print-sheet .ps-photo { flex: 0 0 96px; width: 96px; height: 96px; object-fit: cover; border-radius: 8px; }
  .print-sheet .ps-stop-body { flex: 1; }
  .print-sheet .ps-time { font-weight: 800; font-size: 12px; color: #7a2f4f; }
  .print-sheet .ps-name { font-size: 16px; font-weight: 700; margin: 2px 0; }
  .print-sheet .ps-what { font-size: 12.5px; color: #333; margin: 2px 0; }
  .print-sheet .ps-why { font-size: 12.5px; color: #555; margin: 2px 0; font-style: italic; }
  .print-sheet .ps-note { font-size: 12.5px; color: #7a2f4f; margin: 4px 0 0; }
  .print-sheet .ps-tag { font-size: 10.5px; font-weight: 800; text-transform: uppercase; color: #7a2f4f; }
}

@media (max-width: 1366px) {
  .app-shell { grid-template-columns: 334px minmax(440px, 1fr) 360px; }
  .brand { padding: 18px 22px 14px; }
  .mode-switch { margin: 12px 22px 0; }
  .day-rail { padding: 13px 22px 12px; }
  .day-chip { width: 72px; }
  .day-head { padding: 14px 22px 4px; }
  .filter-row { padding: 13px 22px 12px; }
  .detail-hero { height: 224px; }
  .detail-body { padding: 18px 22px 28px; }
  .detail-title-row h2 { font-size: 1.62rem; }
}
