:root {
  --bg: #fbf7f0;
  --surface: #ffffff;
  --ink: #2a2320;
  --ink-soft: #6b625b;
  --line: #ece3d7;
  --brand: #e07a3f;
  --brand-deep: #c25e28;
  --accent: #2f7d6b;
  --sky-1: #f9a86b;
  --sky-2: #e07a3f;
  --sky-3: #6a5acd;
  --visited: #9aa0a6;
  --current: #e07a3f;
  --upcoming: #2f7d6b;
  --shadow: 0 10px 30px rgba(60, 40, 20, 0.12);
  --shadow-sm: 0 4px 14px rgba(60, 40, 20, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 960px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -0.01em; }

[hidden] { display: none !important; }

/* ================= Password gate ================= */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(160deg, #f9a86b 0%, #e07a3f 45%, #6a5acd 120%);
}
.gate__card {
  width: min(400px, 100%);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 40px 30px;
  text-align: center;
  box-shadow: var(--shadow);
  animation: pop 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@keyframes pop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.gate__emoji { font-size: 46px; }
.gate__title { margin: 8px 0 4px; font-size: 30px; }
.gate__subtitle { margin: 0 0 22px; color: var(--ink-soft); font-size: 15px; }
.gate__input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s;
}
.gate__input:focus { border-color: var(--brand); }
.gate__btn {
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.gate__btn:hover { background: var(--brand-deep); }
.gate__btn:active { transform: scale(0.98); }
.gate__error { color: #c0392b; font-size: 14px; margin: 14px 0 0; }

/* ================= Setup banner ================= */
.setup-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 10px 16px;
  background: #fff4d6;
  color: #7a5c12;
  font-size: 13.5px;
  border-bottom: 1px solid #f0e2b8;
}
.setup-banner code { background: rgba(0,0,0,0.06); padding: 1px 5px; border-radius: 5px; }
.setup-banner button {
  background: none; border: none; font-size: 20px; line-height: 1;
  cursor: pointer; color: inherit; opacity: 0.6;
}
.setup-banner button:hover { opacity: 1; }

/* ================= Hero ================= */
.hero {
  position: relative;
  color: #fff;
  padding: 64px 20px 28px;
  text-align: center;
  background: linear-gradient(160deg, #f9a86b 0%, #e07a3f 48%, #6a5acd 130%);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 15%, rgba(255,255,255,0.28), transparent 45%);
  pointer-events: none;
}
.hero__inner { position: relative; max-width: var(--max); margin: 0 auto; }
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0.9;
  margin: 0 0 6px;
}
.hero__title { font-size: clamp(30px, 7vw, 52px); margin: 0 0 8px; line-height: 1.05; }
.hero__dates { margin: 0; font-size: 15px; opacity: 0.92; }

.countdown {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 26px auto 0;
  max-width: 460px;
}
.countdown__unit {
  flex: 1;
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  padding: 14px 6px 10px;
}
.countdown__num { display: block; font-size: clamp(26px, 6vw, 40px); font-weight: 700; font-variant-numeric: tabular-nums; }
.countdown__label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.85; }

.status-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 12px 22px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
}
.status-banner__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #7dffb0;
  box-shadow: 0 0 0 0 rgba(125,255,176,0.7);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(125,255,176,0.6); }
  70% { box-shadow: 0 0 0 12px rgba(125,255,176,0); }
  100% { box-shadow: 0 0 0 0 rgba(125,255,176,0); }
}

.hero__nav {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}
.hero__nav a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  transition: background 0.2s;
}
.hero__nav a:hover { background: rgba(255,255,255,0.3); }

/* ================= Sections ================= */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 46px 20px 8px;
}
.section__title { font-size: clamp(22px, 5vw, 30px); margin: 0 0 4px; }
.section__subtitle { margin: 0 0 22px; color: var(--ink-soft); font-size: 15px; }

/* ================= Map ================= */
.map {
  height: 380px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  z-index: 0;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.legend__dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.legend__dot--visited { background: var(--visited); }
.legend__dot--current { background: var(--current); }
.legend__dot--upcoming { background: var(--upcoming); }
/* Shared numbered map pins (overall map + mini-maps) */
.num-pin {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid #fff;
  color: #fff;
  font: 700 12px/1 "Inter", sans-serif;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.num-pin--lg { width: 28px; height: 28px; font-size: 13px; }
.num-pin--home { font-size: 15px; border-width: 3px; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.num-pin--current { animation: bounce 1.4s infinite; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.route-arrow { font-size: 15px; line-height: 1; text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.map-anchor-label {
  background: #2a2320; color: #fff; border: none; font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.map-anchor-label::before { border-top-color: #2a2320; }

/* ================= Itinerary (collapsible) ================= */
.itinerary { list-style: none; margin: 0; padding: 0; position: relative; }
.itinerary::before {
  content: "";
  position: absolute;
  left: 15px; top: 10px; bottom: 10px;
  width: 2px;
  background: var(--line);
}
.trip-stop {
  position: relative;
  padding: 0 0 16px 46px;
}
.trip-stop__marker {
  position: absolute;
  left: 6px; top: 18px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--line);
  z-index: 1;
}
.trip-stop--visited .trip-stop__marker { background: var(--visited); }
.trip-stop--current .trip-stop__marker { background: var(--current); box-shadow: 0 0 0 2px var(--current); }
.trip-stop--upcoming .trip-stop__marker { background: var(--upcoming); }

.stop {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.trip-stop--current .stop { border-color: var(--current); box-shadow: 0 6px 20px rgba(224,122,63,0.18); }

.stop__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.stop__summary::-webkit-details-marker { display: none; }
.stop__summary:hover { background: #fdfaf5; }
.stop__index {
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  background: #fdeadf; color: var(--brand-deep);
  border-radius: 50%;
  font-size: 13px; font-weight: 700;
  font-family: "Inter", sans-serif;
}
.stop__head { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.stop__city { font-family: "Fraunces", serif; font-size: 18px; font-weight: 600; line-height: 1.2; }
.stop__meta { font-size: 12.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.stop__badges { display: flex; gap: 6px; flex: none; }
.stop__chev { flex: none; color: var(--ink-soft); transition: transform 0.25s; font-size: 14px; }
.stop[open] .stop__chev { transform: rotate(180deg); }

.pill {
  display: inline-block;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 3px 9px; border-radius: 999px;
  font-family: "Inter", sans-serif; white-space: nowrap;
}
.pill--visited { background: #eef0f1; color: #6b727a; }
.pill--current { background: #fdeadf; color: var(--brand-deep); }
.pill--upcoming { background: #e4f2ee; color: var(--accent); }
.pill--flex { background: #eee7fb; color: #6a5acd; }
.pill--tbd { background: #fff3d4; color: #9a6b00; }

.stop__body { padding: 0 16px 16px; }
.stop__notes { margin: 0 0 14px; font-size: 14px; color: var(--ink-soft); }
.mini-map {
  height: 220px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  z-index: 0;
}
.mini-pin {
  width: 15px; height: 15px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.mini-legend {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin: 0 0 16px; font-size: 12px; color: var(--ink-soft);
}
.mini-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.mini-legend__item i { width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* Day-by-day */
.days { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.day-item { list-style: none; }

.day-card {
  border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden;
}
.day-item--tbd .day-card { border-color: #f0c96b; }
.day-card__summary {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; cursor: pointer; list-style: none; user-select: none;
}
.day-card__summary::-webkit-details-marker { display: none; }
.day-card__summary:hover { background: #fdfaf5; }
.day-card[open] .day-card__chev { transform: rotate(180deg); }
.day-card__title-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; flex: 1; }
.day-card__title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.day-card__chev { flex: none; color: var(--ink-soft); font-size: 13px; transition: transform 0.2s; }
.day-card__body { padding: 10px 12px 12px; border-top: 1px solid var(--line); }

.day__date {
  flex: none; width: 52px; text-align: center;
  display: flex; flex-direction: column; align-items: center; padding-top: 2px;
}
.day__dot { width: 9px; height: 9px; border-radius: 50%; margin-bottom: 3px; }
.day__dow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.day__dm { font-family: "Fraunces", serif; font-size: 16px; font-weight: 600; line-height: 1.1; }

.day-blocks { display: grid; gap: 14px; margin-top: 4px; }
.time-block { border-left: 3px solid var(--day-color, var(--brand)); padding-left: 12px; }
.time-block__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 6px; }
.time-block__period {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--day-color, var(--brand));
}
.time-block__time {
  font-size: 12px; font-weight: 600; color: var(--ink-soft);
  background: #faf6ef; padding: 2px 8px; border-radius: 999px;
}
.time-block__title { font-size: 14px; font-weight: 600; color: var(--ink); flex: 1 1 100%; }
.time-block__skip { margin: 0 0 8px; font-size: 12px; color: var(--ink-soft); font-style: italic; }
.time-block__places { display: grid; gap: 6px; }

.place-card { border: 1px solid var(--line); border-radius: 10px; background: #fdfaf5; }
.place-card--simple {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 8px 10px;
}
.place-card__summary {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px;
  padding: 8px 10px; cursor: pointer; list-style: none;
}
.place-card__summary::-webkit-details-marker { display: none; }
.place-card__summary:hover { background: #f8f3ea; }
.place-card[open] .place-card__chev { transform: rotate(180deg); }
.place-card__num {
  flex: none; width: 20px; height: 20px; display: grid; place-items: center;
  border-radius: 50%; background: var(--day-color, var(--brand)); color: #fff;
  font-size: 11px; font-weight: 700;
}
.place-card__name { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; }
.place-card__time {
  font-size: 11px; font-weight: 600; color: var(--day-color, var(--brand));
  background: color-mix(in srgb, var(--day-color, var(--brand)) 12%, transparent);
  padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}
.place-card__tickets {
  font-size: 10.5px; font-weight: 600; color: #7a5a10;
  background: #fff8e8; border: 1px solid #f0d88a; padding: 2px 7px; border-radius: 999px;
}
.place-card__chev { margin-left: auto; color: var(--ink-soft); font-size: 11px; transition: transform 0.2s; }
.place-card__body { padding: 0 10px 10px 36px; }
.place-card__desc { margin: 0 0 4px; font-size: 13px; line-height: 1.4; color: var(--ink-soft); }
.place-card__tip { margin: 0 0 6px; font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); }
.place-card__photo {
  display: block; margin-top: 6px; width: 100%; max-width: 200px;
  aspect-ratio: 8 / 5; object-fit: cover; border-radius: 8px; background: var(--line);
}

.day__activities { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--ink); }
.day__activities li { margin: 2px 0; }
/* Ordered, numbered waypoint list (matches the mini-map markers) */
.route-pill {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 6px;
  padding: 4px 10px;
  background: #f4ede2;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 500; color: var(--ink);
}
.route-pill__icon { font-size: 13px; }
.waypoints { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.waypoint { display: flex; align-items: flex-start; gap: 9px; }
.waypoint__num {
  flex: none;
  width: 20px; height: 20px; margin-top: 1px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--day-color, var(--brand));
  color: #fff; font-size: 11px; font-weight: 700;
}
.waypoint__body { min-width: 0; flex: 1; }
.waypoint__head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px;
}
.waypoint__name { font-size: 14px; font-weight: 600; color: var(--ink); }
.waypoint__time {
  flex: none; font-size: 11px; font-weight: 600; line-height: 1;
  color: var(--day-color, var(--brand));
  background: color-mix(in srgb, var(--day-color, var(--brand)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--day-color, var(--brand)) 30%, transparent);
  padding: 3px 7px; border-radius: 999px; white-space: nowrap;
}
.waypoint__desc { margin: 3px 0 0; font-size: 13px; line-height: 1.4; color: var(--ink-soft); }
.waypoint__tip {
  margin: 4px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-soft);
}
.waypoint__photo {
  display: block; margin-top: 7px;
  width: 100%; max-width: 200px; aspect-ratio: 8 / 5;
  object-fit: cover; border-radius: 9px; background: var(--line);
}
/* Legacy single-line note (kept for older waypoint data) */
.waypoint__text { font-size: 14px; }
.waypoint__note { display: block; font-size: 12.5px; color: var(--ink-soft); }
.day__note {
  margin: 8px 0 0; font-size: 12.5px; color: var(--ink-soft);
  background: #faf6ef; border-left: 3px solid var(--line);
  padding: 6px 10px; border-radius: 0 8px 8px 0;
}
.day-item--tbd .day__note { background: #fff8e8; border-left-color: #f0c96b; }
.day__photo {
  display: block; margin-top: 10px;
  width: 100%; max-width: 260px; aspect-ratio: 8 / 5;
  object-fit: cover; border-radius: 10px; background: var(--line);
}

/* ================= Checklist ================= */
.checklist { display: grid; gap: 18px; }
@media (min-width: 640px) { .checklist { grid-template-columns: 1fr 1fr; } }
.check-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.check-group__title {
  font-family: "Fraunces", serif;
  font-size: 16px;
  margin: 0 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.check-group__count { margin-left: auto; font-family: "Inter"; font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.check-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 0; min-height: 40px;
  border-top: 1px solid var(--line);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.check-item:first-of-type { border-top: none; }
.check-item:hover .check-item__box { border-color: var(--accent); }
/* Visually-hidden real checkbox (kept focusable/accessible) */
.check-item__input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0;
  pointer-events: none;
}
.check-item__box {
  flex: none;
  width: 22px; height: 22px; margin-top: 1px;
  border-radius: 6px;
  border: 2px solid var(--line);
  display: grid; place-items: center;
  font-size: 13px; color: #fff;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.check-item__box::selection { background: transparent; }
.check-item--done .check-item__box { background: var(--accent); border-color: var(--accent); }
/* Keyboard focus ring on the box when the hidden input is focused */
.check-item__input:focus-visible ~ .check-item__box {
  outline: 2px solid var(--brand); outline-offset: 2px;
}
.check-item:active .check-item__box { transform: scale(0.9); }
.check-item__text { font-size: 14.5px; user-select: none; }
.check-item--done .check-item__text { color: var(--ink-soft); text-decoration: line-through; }
.check-item__notes { display: block; font-size: 12.5px; color: var(--ink-soft); text-decoration: none; }
.check-summary { font-weight: 600; }
.check-sync {
  font-size: 12px; font-weight: 500; color: var(--ink-soft);
  margin-left: 8px; white-space: nowrap;
}
.check-sync--on { color: var(--accent); }
.check-reset {
  margin-left: 10px;
  font: 600 12px/1 "Inter", sans-serif;
  color: var(--ink-soft);
  background: none; border: none; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
  padding: 2px 4px;
}
.check-reset:hover { color: var(--brand-deep); }
.progress {
  height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 8px;
  max-width: 320px;
}
.progress__bar { height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width 0.5s; }

/* ================= Photos (album cards) ================= */
.albums {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .albums { grid-template-columns: 1fr 1fr; } }
.album-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}
.album-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--brand);
}
.album-card__emoji {
  flex: none;
  font-size: 26px;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: #fdeadf;
  border-radius: 12px;
}
.album-card__body { display: flex; flex-direction: column; min-width: 0; }
.album-card__title { font-family: "Fraunces", serif; font-size: 17px; font-weight: 600; }
.album-card__sub { font-size: 13px; color: var(--ink-soft); }
.album-card__go { margin-left: auto; flex: none; font-size: 14px; font-weight: 600; color: var(--brand-deep); }
.photos-empty {
  padding: 26px; text-align: center; color: var(--ink-soft); font-size: 14px; line-height: 1.6;
  border: 1.5px dashed var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.photos-empty code { background: rgba(0,0,0,0.05); padding: 1px 5px; border-radius: 5px; }

/* ================= Footer ================= */
.footer { text-align: center; padding: 40px 20px 50px; color: var(--ink-soft); font-size: 13.5px; }

@media (min-width: 700px) { .map { height: 460px; } }
