/* Namibia Self-Drive Planner — desert-inspired palette */
:root {
  --sand: #f3ead9;
  --sand-2: #e9dcc1;
  --terracotta: #b5552b;
  --terracotta-dk: #8c3e1d;
  --dune: #c98a4b;
  --sky: #7fa8b8;
  --ink: #2b241d;
  --ink-2: #5a4e42;
  --ok: #3f7a3a;
  --warn: #c47b1a;
  --bad: #a8362a;
  --paper: #fffdf7;
  --line: #d9ccb2;
  --shadow: 0 6px 24px rgba(80,50,20,0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: "Helvetica Neue", "Inter", system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* --- Hero --- */
.hero {
  background:
    linear-gradient(180deg, rgba(43,36,29,0.45) 0%, rgba(43,36,29,0.65) 100%),
    url('hero.png') center 40% / cover no-repeat;
  color: var(--paper);
  padding: 56px 24px 72px;
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 1100px; margin: 0 auto; padding: 0 32px; }
.brand { display: flex; align-items: center; gap: 10px; opacity: 0.96; }
.brand-badge { flex-shrink: 0; display: block; }
.brand-wordmark { display: flex; align-items: baseline; gap: 0; line-height: 1; }
.brand-namib {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.35rem; font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.brand-ai {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.35rem; font-weight: 400;
  letter-spacing: -0.01em;
  color: rgba(255,255,255,0.72);
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 14px 0 8px;
  max-width: 20ch;
  line-height: 1.05;
}
.hero .tagline { font-size: 1.1rem; max-width: 56ch; margin: 0 0 6px; opacity: 0.95; }
.hero .sub { font-style: italic; opacity: 0.75; margin: 0; }

/* --- Page navigation tabs --- */
.page-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--paper);
  border-bottom: 2px solid var(--line);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.page-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.page-nav-inner::-webkit-scrollbar { display: none; }
.page-nav-link {
  flex: 0 0 auto;
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.page-nav-link:hover { color: var(--terracotta); }
.page-nav-link.active {
  color: var(--terracotta);
  border-bottom-color: var(--terracotta);
}
/* Offset anchor targets so sticky nav doesn't cover them */
#planner, #highlights, #verified, #why { scroll-margin-top: 80px; }
#packing { scroll-margin-top: 100px; }

/* --- Main layout --- */
main {
  max-width: 1100px;
  margin: 0 auto 40px;
  padding: 24px 32px 0;
  display: grid;
  gap: 24px;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px 40px;
  box-shadow: var(--shadow);
}
.panel h2 { margin: 0 0 18px; font-size: 1.5rem; }
.panel h3 { margin: 0 0 12px; font-size: 1.15rem; }

/* --- Form --- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 800px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .grid { grid-template-columns: 1fr; }
  .panel { padding: 24px 20px; }
  main { padding: 16px 16px 0; }
}
.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.95rem; }
.field > span, .field > legend { font-weight: 600; color: var(--ink-2); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.field input, .field select {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}
.field input:focus, .field select:focus { outline: 2px solid var(--terracotta); outline-offset: 1px; }
.field small { color: var(--ink-2); font-size: 0.8rem; }
.arrival-time-hint { font-size: 0.8rem; color: var(--ink-2); }
.hint-early { color: var(--ok); font-weight: 600; }
.hint-late  { color: var(--terracotta); font-weight: 600; }

.flight-time-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.flight-time-row.hidden { display: none; }
.time-select-wrap { display: flex; align-items: center; gap: 4px; }
.time-sel { flex: 1; min-width: 0; }
.time-colon { font-size: 1.1rem; font-weight: 700; color: var(--ink-2); line-height: 1; }
.interests { grid-column: 1 / -1; border: 1px dashed var(--line); padding: 10px 16px 12px; border-radius: 10px; }
.interests legend { padding: 0 6px; }
.interests .interest-options { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 2px; }
.interests label { display: inline-flex; align-items: center; gap: 6px; margin: 4px 20px 4px 0; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 0.95rem; }

.actions { grid-column: 1 / -1; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
button {
  font: inherit;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.05s ease, background 0.2s, color 0.2s;
}
button:active { transform: translateY(1px); }
.primary { background: var(--terracotta); color: var(--paper); }
.primary:hover { background: var(--terracotta-dk); }
.ghost { background: transparent; color: var(--terracotta); border-color: var(--terracotta); }
.ghost:hover:not(:disabled) { background: var(--terracotta); color: var(--paper); }
.ghost:disabled { opacity: 0.4; cursor: not-allowed; }

/* --- Result --- */
.result { padding-top: 18px; }
.result.hidden { display: none; }
.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.stat { background: var(--sand-2); border-radius: 10px; padding: 12px 14px; }
.stat-wide { grid-column: span 2; }
.stat .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.stat .value { font-size: 1.2rem; font-weight: 600; margin-top: 2px; }
.end-date-hint { color: var(--terracotta); font-weight: 600; }

.alerts { display: grid; gap: 8px; margin-bottom: 22px; }
.alert { padding: 10px 14px; border-radius: 8px; font-size: 0.92rem; border-left: 4px solid; background: var(--sand-2); }
.alert.warn { border-color: var(--warn); }
.alert.bad  { border-color: var(--bad); }
.alert.info { border-color: var(--sky); }

.day {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
}
.day:last-child { border-bottom: 1px solid var(--line); }
.day-num { font-family: Georgia, serif; font-size: 1.3rem; color: var(--terracotta-dk); }
.day-num small { display: block; font-family: inherit; color: var(--ink-2); font-size: 0.8rem; font-weight: normal; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.day-date { display: block; font-family: "Helvetica Neue", system-ui, sans-serif; font-size: 0.78rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.07em; margin-top: 3px; }
.airport-alert { margin-top: 10px; padding: 8px 12px; background: #fff8ec; border: 1px solid var(--warn); border-radius: 8px; font-size: 0.85rem; color: var(--ink); }
.day-body h4 { margin: 0 0 4px; font-size: 1.15rem; }
.day-body .route { color: var(--ink-2); font-size: 0.9rem; margin: 0 0 10px; }
.day-body .drive { display: inline-block; background: var(--sand-2); padding: 3px 8px; border-radius: 6px; font-size: 0.85rem; margin-right: 8px; }
.day-body ul.activities { margin: 10px 0 0; padding-left: 18px; }
.day-body ul.activities li { margin-bottom: 4px; font-size: 0.95rem; }
.day-body .notes { margin-top: 10px; font-size: 0.9rem; color: var(--ink-2); font-style: italic; }
.tag { display: inline-block; font-size: 0.72rem; padding: 2px 7px; border-radius: 999px; margin-right: 4px; background: var(--sand-2); color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.04em; }
.tag.tar { background: #d7dfe2; color: #2f4a55; }
.tag.gravel { background: #ecd7b9; color: #7a4a18; }
.tag.rough { background: #e6b89a; color: #6b2d11; }

.bullets { margin: 0; padding-left: 18px; color: var(--ink-2); }
.bullets li { margin-bottom: 6px; }

footer { text-align: center; padding: 30px 20px 40px; color: var(--ink-2); }

/* --- Map --- */
.trip-map {
  height: 420px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 22px;
  background: var(--sand-2);
  position: relative;
  z-index: 1;
  isolation: isolate;
}
/* --- Map markers --- */
.map-pin {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--terracotta);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: "Helvetica Neue", system-ui, sans-serif;
  font-weight: 700; font-size: 0.8rem;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.28), 0 0 0 1px rgba(181,85,43,0.18);
  cursor: pointer;
  transition: transform 0.15s;
}
.map-pin:hover { transform: scale(1.15); }
.map-pin.transit {
  background: var(--ink); font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.28), 0 0 0 1px rgba(43,36,29,0.18);
}
/* Popup */
.map-popup-wrap .leaflet-popup-content-wrapper {
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.14);
  padding: 0;
  border: 1px solid var(--line);
}
.map-popup-wrap .leaflet-popup-content { margin: 12px 16px; }
.map-popup-wrap .leaflet-popup-tip-container { margin-top: -1px; }
.map-popup strong { font-size: 0.95rem; color: var(--ink); }
.mp-lodge { font-size: 0.8rem; color: var(--terracotta); margin-top: 3px; font-style: italic; }
.mp-nights { font-size: 0.78rem; color: var(--ink-2); margin-top: 3px; }

/* --- Result head with share button --- */
.result-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 6px;
}
.result-head h2 { margin: 0; }
button.small { padding: 7px 14px; font-size: 0.85rem; }

/* --- Share popover --- */
.share-wrap { position: relative; }
.share-popover {
  position: fixed;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(80,50,20,0.18);
  padding: 6px;
  min-width: 220px;
  z-index: 9999;
}
.share-popover[hidden] { display: none; }
.share-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 0.9rem; font-weight: 500; cursor: pointer;
  text-decoration: none; color: var(--ink);
  background: none; border: none; width: 100%; text-align: left;
  transition: background 0.15s;
}
.share-item:hover { background: var(--sand); }
.share-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.share-fb  { color: #1877f2; }
.share-fb:hover  { background: #e7f0fd; }
.share-wa  { color: #25d366; }
.share-wa:hover  { background: #e6faf0; }
.share-li  { color: #0a66c2; }
.share-li:hover  { background: #e8f1fb; }
.share-ig  { color: #e1306c; }
.share-ig:hover  { background: #fdeef4; }
.share-copy { color: var(--ink-2); }
.share-copy:hover { background: var(--sand); }

/* --- Stops overview --- */
.stops-overview { margin: 4px 0 22px; }
.stops-overview h3 { margin: 0 0 12px; }
.stops-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.stop-card {
  background: var(--sand-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.stop-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px; flex-wrap: wrap;
}
.stop-chip {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--terracotta); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.78rem;
}
.stop-chip.transit { background: var(--ink-2); }
.stop-nights {
  margin-left: auto; font-size: 0.78rem; color: var(--ink-2);
  background: var(--paper); padding: 2px 8px; border-radius: 10px;
}
.stop-date { display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); margin: 4px 0 6px; }
.stop-lodge { font-size: 0.9rem; color: var(--terracotta-dk); margin-bottom: 4px; }
.stop-why { font-size: 0.85rem; color: var(--ink-2); }
.stop-why em { font-style: normal; color: var(--ink); font-weight: 600; }

/* --- Budget --- */
.budget {
  background: var(--sand-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 22px;
}
.budget h3 { margin: 0 0 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.budget h3 small { font-size: 0.8rem; color: var(--ink-2); font-weight: 400; font-family: inherit; text-transform: none; letter-spacing: 0; }
.budget-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.budget-table td {
  padding: 8px 4px;
  border-bottom: 1px dotted var(--line);
  vertical-align: baseline;
}
.budget-table .b-label { font-weight: 600; width: 30%; }
.budget-table .b-detail { color: var(--ink-2); font-size: 0.88rem; }
.budget-table .b-amt { text-align: right; font-variant-numeric: tabular-nums; width: 22%; font-weight: 500; }
.budget-table tfoot td { border-bottom: none; border-top: 2px solid var(--terracotta); padding-top: 12px; }
.budget-table tfoot .b-total td { font-size: 1.05rem; font-weight: 700; color: var(--terracotta-dk); border-top: 2px solid var(--terracotta); }
.budget-table tfoot tr:last-child td { border-top: none; padding-top: 2px; color: var(--ink-2); font-weight: 500; }
.budget-notes { margin-top: 12px; font-size: 0.82rem; color: var(--ink-2); line-height: 1.5; }

/* --- Lodge line in day cards --- */
.lodge-line {
  margin: 10px 0 2px; font-size: 0.92rem;
  color: var(--terracotta-dk);
}

/* --- NightsBridge availability button --- */
.nb-btn {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: var(--terracotta);
  border-radius: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.nb-btn:hover { background: var(--terracotta-dk); }

/* --- Packing list --- */
.packing {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 2px solid var(--line);
}
.packing h3 { margin: 0 0 4px; }
.packing-sub { margin: 0 0 16px; font-size: 0.9rem; color: var(--ink-2); font-style: italic; }
.packing-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.packing-cat {
  background: var(--sand-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}
.packing-cat h4 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--terracotta-dk);
  font-family: Georgia, serif;
}
.packing-cat ul { list-style: none; padding: 0; margin: 0; }
.packing-cat li { margin-bottom: 6px; font-size: 0.9rem; line-height: 1.4; }
.packing-cat label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.packing-cat input[type="checkbox"] { margin-top: 3px; accent-color: var(--terracotta); flex-shrink: 0; }
.packing-cat input[type="checkbox"]:checked + span { text-decoration: line-through; color: var(--ink-2); opacity: 0.6; }

/* --- Chat widget --- */
#chat-widget {
  position: fixed; bottom: 20px; right: 20px; z-index: 1000;
  font-family: inherit;
}
#chat-toggle {
  background: var(--terracotta);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 6px 20px rgba(140, 62, 29, 0.35);
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
}
#chat-toggle:hover { background: var(--terracotta-dk); transform: translateY(-1px); }

#chat-panel {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 380px;
  height: 540px;
  max-height: calc(100vh - 120px);
  background: var(--paper);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(40, 20, 10, 0.28);
  border: 1px solid var(--line);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
#chat-panel.open { display: flex; }

.chat-head {
  padding: 12px 16px;
  background: var(--terracotta);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-head strong { font-size: 1rem; }
.chat-head button {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--sand);
}
.chat-msg {
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 85%;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.chat-user {
  align-self: flex-end;
  background: var(--terracotta);
  color: white;
  border-bottom-right-radius: 4px;
}
.chat-bot {
  align-self: flex-start;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.chat-bot.loading { opacity: 0.65; font-style: italic; }
.chat-bot.error { border-color: var(--bad); color: var(--bad); background: #fdf1ee; }

/* Chat markdown formatting */
.chat-bot p { margin: 0 0 8px; }
.chat-bot p:last-child { margin-bottom: 0; }
.chat-bot h3, .chat-bot h4, .chat-bot h5 {
  margin: 10px 0 6px;
  font-family: Georgia, serif;
  color: var(--terracotta-dk);
}
.chat-bot h3 { font-size: 1.05rem; }
.chat-bot h4 { font-size: 0.98rem; }
.chat-bot h5 { font-size: 0.92rem; }
.chat-bot ul { margin: 6px 0 8px; padding-left: 20px; }
.chat-bot li { margin-bottom: 3px; }
.chat-bot strong { color: var(--terracotta-dk); }
.chat-bot code {
  background: var(--sand-2);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: "SF Mono", "Monaco", monospace;
}
.chat-bot a { color: var(--terracotta); text-decoration: underline; }
.caret {
  display: inline-block;
  animation: caret-blink 1s infinite;
  color: var(--terracotta);
  font-weight: normal;
}
@keyframes caret-blink { 0%,50% { opacity: 1; } 50.01%,100% { opacity: 0; } }

.chat-suggestions {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 4px;
}
.chat-suggestions button {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.chat-suggestions button:hover {
  background: var(--terracotta);
  color: white;
  border-color: var(--terracotta);
}

.chat-applied {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
}

.chat-input-row {
  display: flex;
  gap: 6px;
  padding: 10px;
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.chat-input-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: var(--paper);
  color: var(--ink);
}
.chat-input-row input:focus { outline: 2px solid var(--terracotta); outline-offset: 1px; }
.chat-input-row button {
  background: var(--terracotta);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}
.chat-input-row button:hover { background: var(--terracotta-dk); }

@media (max-width: 500px) {
  #chat-panel { width: calc(100vw - 40px); }
}

/* --- Language switch --- */
.hero-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.lang-switch {
  display: inline-flex; gap: 0;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px; padding: 3px;
  backdrop-filter: blur(4px);
}
.lang-btn {
  background: transparent; color: inherit;
  border: none; padding: 5px 11px;
  font: inherit; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  border-radius: 999px; cursor: pointer;
  color: rgba(255,255,255,0.85);
  transition: background 0.15s, color 0.15s;
}
.lang-btn:hover { color: white; }
.lang-btn.active {
  background: white; color: var(--terracotta);
}
.switchers {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.cur-switch {
  display: inline-flex; gap: 0;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px; padding: 3px;
  backdrop-filter: blur(4px);
}
.budget-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-bottom: 12px;
}
.budget-header h3 { margin: 0; }
.budget-header .cur-switch {
  background: #f5ede0;
  border: 1px solid var(--terracotta);
}
.budget-header .cur-btn { color: var(--charcoal); }
.budget-header .cur-btn:hover { color: var(--terracotta); }
.budget-header .cur-btn.active { background: var(--terracotta); color: white; }
.cur-btn {
  background: transparent; color: inherit;
  border: none; padding: 5px 10px;
  font: inherit; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em;
  border-radius: 999px; cursor: pointer;
  color: rgba(255,255,255,0.85);
  transition: background 0.15s, color 0.15s;
  min-width: 32px;
}
.cur-btn:hover { color: white; }
.cur-btn.active {
  background: white; color: var(--terracotta);
}
@media print { .lang-switch, .cur-switch, .switchers { display: none !important; } }

/* --- Email gate modal --- */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(26,18,12,0.55); backdrop-filter: blur(2px); }
.modal-card {
  position: relative;
  background: var(--paper);
  border-radius: 14px;
  max-width: 440px;
  width: calc(100vw - 40px);
  padding: 28px 28px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  animation: modalIn .18s ease-out;
}
@keyframes modalIn {
  from { transform: translateY(10px) scale(.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-x {
  position: absolute; top: 8px; right: 10px;
  background: none; border: none; font-size: 1.6rem; line-height: 1;
  cursor: pointer; color: var(--ink-2);
}
.modal-x:hover { color: var(--ink); }
.modal-card h3 { margin: 0 0 8px; font-size: 1.25rem; }
.modal-sub { margin: 0 0 18px; color: var(--ink-2); font-size: 0.95rem; line-height: 1.45; }
#email-gate-form input[type="email"] {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: var(--paper);
  color: var(--ink);
  box-sizing: border-box;
}
#email-gate-form input[type="email"]:focus {
  outline: 2px solid var(--terracotta);
  outline-offset: 1px;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.modal-error { color: #a8362a; font-size: 0.9rem; margin-top: 10px; min-height: 1.2em; }

/* --- Namibia highlights --- */
.highlights-sub {
  margin: -4px 0 18px; color: var(--ink-2); font-size: 0.95rem; max-width: 60ch;
}
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.highlight-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px 20px 16px;
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid rgba(140, 62, 29, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 8px rgba(43, 36, 29, 0.07), 0 0 0 1px rgba(43,36,29,0.03);
}
.highlight-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(43, 36, 29, 0.13), 0 0 0 1px rgba(43,36,29,0.03);
}
.highlight-card h4 {
  margin: 0; font-size: 1.05rem; color: var(--terracotta-dk);
  font-family: Georgia, serif; font-weight: 700; letter-spacing: -0.01em;
}
.highlight-card p {
  margin: 0; font-size: 0.875rem; color: var(--ink); line-height: 1.5;
}
/* Interest tag pills inside highlight cards */
.highlight-tags {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 6px;
}
.tag-pill {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 2px 7px; border-radius: 20px;
  background: rgba(140, 62, 29, 0.08); color: var(--terracotta);
  border: 1px solid rgba(140, 62, 29, 0.18);
  transition: background 0.15s, color 0.15s;
}
.tag-pill.active {
  background: var(--terracotta); color: #fff;
  border-color: var(--terracotta);
}
/* Highlight matching / dimming when interests are filtered */
.highlight-card.highlight-match {
  box-shadow: 0 0 0 2px var(--terracotta), 0 6px 20px rgba(43,36,29,0.10);
  transform: translateY(-2px);
}
.highlight-card.highlight-dim {
  opacity: 0.3;
  filter: grayscale(60%);
  transform: none;
  box-shadow: none;
}

/* Mini-map locator — sits below the interest line, inside each card */
.highlight-map {
  align-self: center;
  width: 96px; height: 90px;
  margin-top: 10px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.95;
}
.highlight-map svg {
  width: 100%; height: 100%;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(43, 36, 29, 0.08));
}

/* --- Sedan warning --- */
.sedan-warn {
  margin: 6px 0 0;
  padding: 7px 10px;
  background: #fff8ec;
  border: 1px solid var(--warn);
  border-radius: 6px;
  color: var(--warn);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
}
.sedan-warn.hidden { display: none; }

/* --- Second-car hint --- */
.second-car-hint {
  margin: 6px 0 0;
  padding: 7px 10px;
  background: #fff8ec;
  border: 1px solid var(--dune);
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
}
.second-car-hint.hidden { display: none; }
.second-car-hint .inline-link, a.inline-link {
  color: var(--terracotta); font-weight: 600; text-decoration: none;
}
.second-car-hint .inline-link:hover { text-decoration: underline; }

/* --- Vehicle enquire button --- */
/* --- Budget vehicle enquire button --- */
.budget-enquire-btn {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  background: var(--sand-2);
  border: 1px solid var(--dune);
  border-radius: 20px;
  color: var(--terracotta);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  vertical-align: middle;
  transition: background 0.15s;
  white-space: nowrap;
}
.budget-enquire-btn:hover {
  background: var(--terracotta);
  color: #fff;
  border-color: var(--terracotta);
}

/* --- Form preview map --- */
.form-map-wrap {
  grid-column: 1 / -1;
  margin-top: 4px;
}
.preview-map-label {
  font-size: 0.86rem;
  color: var(--ink-2);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 1.5em;
}
.preview-loop-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.7);
}
#form-preview-map {
  height: 220px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--sand-2);
}
@media (min-width: 640px) { #form-preview-map { height: 260px; } }

/* --- Verified Routes --- */
.verified-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 22px;
}
.verified-head h3 { margin: 0 0 4px; font-size: 1.25rem; }
.verified-sub { margin: 0; color: var(--ink-2); font-size: 0.9rem; }
.verified-share-btn { align-self: center; white-space: nowrap; }

.verified-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.verified-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
  transition: box-shadow 0.18s;
}
.verified-card:hover { box-shadow: 0 8px 28px rgba(80,50,20,0.13); }

/* Landscape-inspired photo gradients */
.verified-photo {
  height: 180px;
  position: relative;
  display: flex; align-items: flex-end; justify-content: flex-start;
  padding: 10px 12px;
  background-size: cover;
  background-position: center;
  border-radius: 12px 12px 0 0;
}
/* Dark gradient overlay so text stays readable over any photo */
.verified-photo::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(to top, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.15) 55%, rgba(0,0,0,0.08) 100%);
}
.verified-photo > * { position: relative; z-index: 1; }

.verified-photo--dunes {
  background-image: url('https://images.unsplash.com/photo-1750232533953-80b7740a85b5?w=800&q=75&auto=format&fit=crop');
  background-position: center 50%;
}
.verified-photo--coast {
  background-image: url('https://images.unsplash.com/photo-1711963070890-48a66cdb5b52?w=800&q=75&auto=format&fit=crop');
  background-position: center 40%;
}
.verified-photo--canyon {
  background-image: url('https://images.unsplash.com/photo-1665613252734-7ed473dce464?w=800&q=75&auto=format&fit=crop');
  background-position: center 30%;
}
.verified-photo--kalahari {
  background-image: url('https://images.unsplash.com/photo-1650489619490-ddebed1b8246?w=800&q=75&auto=format&fit=crop');
  background-position: center 60%;
}
.verified-photo--spitzkoppe {
  background-image: url('https://images.unsplash.com/photo-1711092047480-4382d9626abc?w=800&q=75&auto=format&fit=crop');
  background-position: center 40%;
}
.verified-photo--zambezi {
  background-image: url('https://images.unsplash.com/photo-1533631278779-d722ded4c7df?w=800&q=75&auto=format&fit=crop');
  background-position: center 50%;
}

.verified-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,0.92); color: var(--ok);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 8px; border-radius: 20px;
}
.verified-dest {
  color: rgba(255,255,255,0.95); font-weight: 600; font-size: 0.85rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.verified-body { padding: 14px 16px 16px; }
.verified-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.verified-name { font-weight: 700; font-size: 0.9rem; }
.verified-when { font-size: 0.78rem; color: var(--ink-2); }

.verified-route-line {
  font-size: 0.78rem; color: var(--ink-2); margin-bottom: 8px;
  line-height: 1.4;
}
.verified-stats {
  display: flex; gap: 10px; align-items: center;
  font-size: 0.8rem; margin-bottom: 10px; flex-wrap: wrap;
}
.verified-stars { color: var(--dune); letter-spacing: 1px; }

.verified-quote {
  margin: 0; padding: 8px 10px;
  background: var(--sand); border-left: 3px solid var(--terracotta);
  font-style: italic; font-size: 0.82rem; color: var(--ink-2);
  border-radius: 0 6px 6px 0; line-height: 1.45;
}

@media (max-width: 600px) {
  .verified-grid { grid-template-columns: 1fr; }
  .verified-head { flex-direction: column; }
}

/* --- Print --- */
@media print {
  header.hero, .form-panel, .meta, footer, .actions,
  .trip-map, #share-btn, #chat-widget, #email-gate { display: none !important; }
  .highlights { page-break-before: always; }
  .highlight-map { display: none; }
  .highlights-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .highlight-card { border: 1px solid #ccc; padding: 10px; }
  body { background: white; }
  main { margin: 0; padding: 0; }
  .panel { box-shadow: none; border: none; padding: 0; }
  .day, .stop-card, .packing-cat { break-inside: avoid; }
  .stop-card, .packing-cat { background: transparent; }
  .packing { page-break-before: always; }
}
