/* =====================================================
   Portugal Trip — Shared Design System (Option C + Cultural Motifs)
   UI-Pro-Max: Playfair Display + Inter + JetBrains Mono
   Warm Cream + Terracotta + Azulejo + Olive Palette
   ===================================================== */

/* ---------- Design tokens ---------- */
:root {
  --ink: #241C15;
  --muted-fg: #6B5B4E;
  --cream: #FBF4EA;
  --cream-soft: #F5ECDD;
  --paper: #FFFDF9;
  --line: #E7DACB;
  --line-strong: #D5C2AF;
  --terracotta: #B5551F;
  --terracotta-dark: #8F3F12;
  --terracotta-wash: #F7E8DD;
  --azulejo: #2B6693;
  --azulejo-deep: #133650;
  --azulejo-wash: #E5EFF5;
  --olive: #5B7A4F;
  --olive-dark: #3F5935;
  --olive-wash: #EAF0E5;
  --gold: #D4AF37;
  --gold-wash: #FDF8E8;
  --alert: #B23A2E;
  --alert-wash: #FBEAE7;
  --success: #2d7a58;
  --success-wash: #e5f3ec;
  --shadow-sm: 0 2px 8px rgba(36,28,21,.04);
  --shadow: 0 12px 32px rgba(36,28,21,.08);
  --shadow-lg: 0 18px 48px rgba(36,28,21,.12);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--cream);
  background-image: 
    radial-gradient(circle at 90% 10%, rgba(212, 175, 55, 0.14) 0%, transparent 45%),
    radial-gradient(circle at 10% 70%, rgba(43, 102, 147, 0.10) 0%, transparent 40%),
    linear-gradient(180deg, rgba(251, 244, 234, 0.82) 0%, rgba(251, 244, 234, 0.94) 35%, rgba(251, 244, 234, 0.98) 100%),
    url('images/hero/portugal_hero.jpg?v=2');
  background-size: cover;
  background-position: center 20%;
  background-attachment: fixed;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
}
a { color: inherit; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}

/* ---------- Layout ---------- */
.shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px 60px;
  position: relative;
  z-index: 1;
}

/* ---------- Classy Top Navigation (nav.js) ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(251, 244, 234, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}
.site-nav-container {
  max-width: 1220px;
  margin: auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  white-space: nowrap;
  flex: 0 0 auto;
}
.site-brand .flag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}
.site-nav-inner {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0;
}
.site-nav-inner::-webkit-scrollbar { display: none; }
.navbtn {
  flex: 0 0 auto;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 600;
  font-size: .8rem;
  font-family: Inter, system-ui, sans-serif;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
}
.navbtn:hover {
  transform: translateY(-1px);
  border-color: var(--terracotta);
  color: var(--terracotta-dark);
}
.navbtn.active {
  background: var(--terracotta);
  color: #fff;
  border-color: var(--terracotta);
  box-shadow: 0 2px 6px rgba(181, 85, 31, 0.25);
}

/* ---------- Page Header & Badges ---------- */
.page-header {
  padding: 40px 0 28px;
}
.page-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.page-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--terracotta-wash);
  color: var(--terracotta);
  border: 1px solid color-mix(in srgb, var(--terracotta) 25%, transparent);
}
.page-header h1 {
  font-size: clamp(1.8rem, 4.2vw, 2.5rem);
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.page-header .lede {
  color: var(--muted-fg);
  max-width: 65ch;
  margin: 10px 0 0;
  font-size: 1.02rem;
}

/* ---------- Authentic Azulejo & Cultural Accents ---------- */
.azulejo-watermark {
  background-image: radial-gradient(var(--azulejo-wash) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
}
.azulejo-tile-header {
  background: linear-gradient(135deg, rgba(229, 239, 245, 0.7), rgba(247, 232, 221, 0.5));
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
  border-radius: 15px 15px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 32px 0;
  color: var(--line-strong);
  font-size: 13px;
}
.ornament-divider::before,
.ornament-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Regional Theme Badges */
.region-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.region-badge.lisbon { background: #E4ECE8; color: #2E5C50; border: 1px solid #BDD5CB; }
.region-badge.madeira { background: #E1EFF5; color: #235873; border: 1px solid #B7D9E7; }
.region-badge.porto { background: #ECE5DE; color: #5C4332; border: 1px solid #D6C4B5; }
.region-badge.algarve { background: #F8EBE5; color: #9E4A28; border: 1px solid #E9C6B8; }
.region-badge.transit { background: #EBE8DE; color: #695B3D; border: 1px solid #D5CEBA; }

/* ---------- Route Transit Ribbon ---------- */
.route-ribbon {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 18px;
  margin: 20px 0 32px;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: var(--shadow-sm);
}
.route-ribbon::-webkit-scrollbar { display: none; }
.route-step {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.route-arrow {
  color: var(--terracotta);
  font-size: 11px;
  opacity: 0.7;
}

/* ---------- Panels & Cards ---------- */
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
  position: relative;
  transition: transform .2s ease, box-shadow .2s ease;
}

/* Section titles */
.section-title {
  margin: 44px 0 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}
.section-title h2 { font-size: 1.85rem; line-height: 1.1; margin: 0; }
.section-title p { margin: 0; color: var(--muted-fg); max-width: 670px; font-size: 0.95rem; }

/* Metrics grid */
.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 18px;
}
.metric {
  background: var(--paper);
  padding: 16px 18px;
}
.metric strong {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  display: block;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.metric span {
  font-size: 11.5px;
  color: var(--muted-fg);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Note / callout */
.note {
  border-left: 4px solid var(--terracotta);
  padding: 13px 16px;
  background: var(--terracotta-wash);
  border-radius: 0 12px 12px 0;
  margin-top: 16px;
  font-size: 14px;
}
.note strong { color: var(--terracotta-dark); }

/* Status pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
  white-space: nowrap;
}
.pill.charge { background: var(--azulejo-wash); color: var(--azulejo-deep); border: 1px solid color-mix(in srgb, var(--azulejo) 25%, transparent); }
.pill.ok, .pill.property-pay { background: var(--olive-wash); color: var(--olive-dark); border: 1px solid color-mix(in srgb, var(--olive) 25%, transparent); }
.pill.alert { background: var(--alert-wash); color: var(--alert); border: 1px solid color-mix(in srgb, var(--alert) 25%, transparent); }

/* Intro / overview panel */
.intro {
  padding: 28px 30px;
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: 26px;
}
.intro h2 { margin: 0 0 10px; font-size: 1.5rem; }
.intro p { margin: .45rem 0; color: var(--muted-fg); }

/* Timeline */
.timeline-section { margin-top: 42px; }
.timeline-reset {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12.5px;
  font-family: Inter, system-ui, sans-serif;
  transition: all .18s;
}
.timeline-reset:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}
.timeline {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 8px 0 8px 30px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 10px;
  bottom: 10px;
  width: 2.5px;
  background: var(--line);
  border-radius: 10px;
}
.timeline-segment { position: relative; }
.timeline-dot {
  position: absolute;
  left: -24px;
  top: 24px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 2px var(--line);
  z-index: 2;
}
.timeline-dot.lisbon { background: #416d61; }
.timeline-dot.madeira { background: #4c88a4; }
.timeline-dot.algarve { background: #c27b5c; }
.timeline-dot.transfer { background: #8e7e5c; }
.timeline-dot.porto { background: #735d4d; }
.timeline-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  transition: all .2s ease;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.timeline-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--terracotta);
  transform: translateY(-1px);
}
.timeline-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted-fg);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.edit-hint {
  opacity: 0;
  transition: .2s;
  color: var(--terracotta);
  font-size: .68rem;
  letter-spacing: .04em;
  text-transform: none;
}
.timeline-card:hover .edit-hint { opacity: 1; }
.timeline-card h3 { margin: 4px 0 5px; font-size: 1.22rem; }
.timeline-card p { margin: .2rem 0; color: var(--muted-fg); }
.transport {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--olive-wash);
  font-size: .75rem;
  font-weight: 700;
  color: var(--olive-dark);
  border: 1px solid color-mix(in srgb, var(--olive) 20%, transparent);
}
.date-editor {
  display: flex;
  gap: 10px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .25s, opacity .2s, margin .2s;
  margin-top: 0;
}
.timeline-card:hover .date-editor,
.timeline-card:focus-within .date-editor {
  max-height: 80px;
  opacity: 1;
  margin-top: 12px;
}
.date-editor label {
  font-size: .7rem;
  color: var(--muted-fg);
  font-weight: 800;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.date-editor input {
  font: inherit;
  font-weight: 700;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 7px 8px;
  color: var(--ink);
}

/* Bookings */
.booking-panel {
  margin-top: 32px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.booking-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.booking-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  background: var(--cream);
  box-shadow: var(--shadow-sm);
  transition: transform .18s;
}
.booking-card:hover {
  transform: translateY(-2px);
  border-color: var(--azulejo);
}
.booking-label {
  font-family: "JetBrains Mono", monospace;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 900;
  color: var(--muted-fg);
}
.booking-card h3 { margin: 5px 0 4px; }
.booking-card p { margin: .2rem 0 .6rem; }
.booking-card ul { padding-left: 18px; margin: .4rem 0 0; color: var(--muted-fg); font-size: .88rem; }
.booking-card li { margin: .25rem 0; }

/* Map */
.map-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
}
.map {
  height: 520px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.legend {
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.legend h3 { margin: 0 0 10px; }
.legend-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0;
  font-size: .9rem;
  color: var(--muted-fg);
}
.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  margin-top: 5px;
  flex: 0 0 auto;
}
.dot.lisbon { background: #416d61; }
.dot.algarve { background: #c27b5c; }
.dot.madeira { background: #4c88a4; }
.dot.transfer { background: #8e7e5c; }
.dot.porto { background: #735d4d; }

/* Location / Places grid */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.location-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.location-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--terracotta);
}
.location-image { height: 220px; background: center/cover no-repeat; position: relative; border-bottom: 1px solid var(--line); }
.image-lisbon { background-image: linear-gradient(180deg,rgba(0,0,0,.05),rgba(0,0,0,.45)),url('images/lisbon/lisbon_hero_praca.jpg?v=2'); }
.image-madeira { background-image: linear-gradient(180deg,rgba(0,0,0,.05),rgba(0,0,0,.45)),url('images/madeira/madeira_hero_funchal.jpg?v=2'); }
.image-porto { background-image: linear-gradient(180deg,rgba(0,0,0,.05),rgba(0,0,0,.45)),url('images/porto/porto_hero_dom_luis.jpg?v=2'); }
.image-algarve { background-image: linear-gradient(180deg,rgba(0,0,0,.05),rgba(0,0,0,.45)),url('images/algarve/algarve_hero_ponta_piedade.jpg?v=2'); }
.location-content { padding: 20px; }
.location-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .11em;
  color: var(--muted-fg);
  font-weight: 900;
}
.location-content h3 { margin: 5px 0 8px; font-size: 1.45rem; }
.location-content > p { color: var(--muted-fg); }
.option {
  border-top: 1px solid var(--line);
  padding: 13px 0;
}
.option > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.option strong { font-size: .94rem; }
.option span { font-size: .72rem; color: var(--muted-fg); text-align: right; }
.option-body { margin-top: 5px; font-size: .88rem; color: var(--muted-fg); }
.easy-alt {
  margin-top: 12px;
  padding: 12px 13px;
  border-radius: 14px;
  background: var(--olive-wash);
  border: 1px dashed var(--olive);
  font-size: .84rem;
  color: var(--muted-fg);
}
.easy-alt strong { color: var(--olive); }

/* Activity & Bookable */
.explore-head {
  background: linear-gradient(135deg, var(--cream), var(--azulejo-wash));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.activity-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}
.filter-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 700;
  cursor: pointer;
  font-size: .8rem;
  font-family: Inter, system-ui, sans-serif;
  transition: all .18s;
}
.filter-btn:hover { border-color: var(--terracotta); }
.filter-btn.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.activity-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .18s, box-shadow .18s;
}
.activity-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--terracotta);
}
.activity-card.hidden { display: none; }
.activity-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.activity-card h3 { margin: 0; font-size: 1.1rem; }
.activity-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.activity-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--olive-wash);
  font-family: "JetBrains Mono", monospace;
  font-size: .7rem;
  font-weight: 800;
}
.activity-badge.date { background: var(--terracotta-wash); color: var(--terracotta-dark); }
.activity-badge.live { background: var(--alert-wash); color: var(--alert); }
.activity-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.meta-box {
  background: var(--cream);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: .78rem;
}
.meta-box strong {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted-fg);
  margin-bottom: 2px;
}
.activity-card p { margin: 0; color: var(--muted-fg); font-size: .88rem; }
.why {
  padding: 10px 12px;
  border-left: 3px solid var(--olive);
  background: var(--olive-wash);
  border-radius: 0 10px 10px 0;
  font-size: .84rem;
}
.activity-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}
.activity-actions a {
  display: inline-block;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: .78rem;
  font-weight: 800;
  transition: all .18s;
}
.activity-actions a:hover { transform: translateY(-1px); }
.activity-actions a.primary {
  background: var(--terracotta);
  color: #fff;
  border-color: var(--terracotta);
}
.event-card { border-left: 4px solid var(--terracotta); }
.source-strip {
  font-size: .75rem;
  color: var(--muted-fg);
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 18px;
}

/* Food & Culture */
.food {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.food-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: transform .18s;
}
.food-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.food-card h3 { margin-top: 0; }
.food-card ul { padding-left: 19px; margin-bottom: 0; }

/* Logistics Planner */
.planner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.mini {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.mini h3 { margin: 0 0 8px; }
.mini p { margin: .2rem 0; color: var(--muted-fg); font-size: .92rem; }
.mini a {
  display: inline-block;
  margin-top: 10px;
  text-decoration: none;
  background: var(--olive-wash);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: .8rem;
  font-weight: 800;
}

/* References */
.sources { padding: 22px 24px; margin-top: 26px; }
.sources ul { margin: 8px 0 0; padding-left: 20px; }
.sources li { margin: 5px 0; }

/* Footers */
.footer {
  color: var(--muted-fg);
  font-size: .82rem;
  padding: 24px 0 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.footer-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}
.ambience-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-family: "JetBrains Mono", monospace;
  cursor: pointer;
  color: var(--muted-fg);
  transition: all .18s;
}
.ambience-btn:hover {
  border-color: var(--terracotta);
  color: var(--ink);
}

/* Back to top */
.backtop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow);
  font-size: 1.2rem;
  z-index: 999;
  transition: transform .18s, background .18s;
}
.backtop:hover {
  transform: translateY(-2px);
  background: var(--terracotta);
}

/* Edit toolbar */
#edit-toolbar {
  position: fixed;
  bottom: 18px;
  right: 74px;
  z-index: 9999;
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: Inter, system-ui, sans-serif;
}
#edit-status {
  font-size: .8rem;
  color: var(--muted-fg);
  background: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  display: none;
}
#edit-btn, #save-btn, #cancel-btn {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  font-family: Inter, system-ui, sans-serif;
  font-weight: 600;
}
#edit-btn { background: var(--terracotta); }
#save-btn { background: var(--terracotta); display: none; }
#cancel-btn { background: var(--muted-fg); display: none; }

/* Responsive */
@media (max-width: 900px) {
  .intro, .map-wrap, .food, .location-grid { grid-template-columns: 1fr; }
  .planner { grid-template-columns: 1fr 1fr; }
  .activity-grid, .booking-grid { grid-template-columns: 1fr; }
  .timeline-card:hover .date-editor { max-height: 140px; }
  .date-editor { flex-wrap: wrap; }
  .site-nav-container { flex-direction: column; align-items: flex-start; gap: 8px; }
  .site-nav-inner { width: 100%; }
}
@media (max-width: 620px) {
  .shell { padding: 0 12px 40px; }
  .planner { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .map { height: 420px; }
}
