/* Sherpie — real design system. Flat, warm; teal + mint. */

/* The [hidden] attribute must ALWAYS win: author display rules (.btn's
   inline-flex etc.) silently override the UA's [hidden] otherwise — that's
   how the list pager's "hidden" button stayed visible (sweep #9b). */
[hidden] { display: none !important; }

:root {
  --teal: #0F6E56;
  --teal-dark: #085041;
  --mint: #9FE1CB;
  --mint-surface: #E1F5EE;
  --ink: #23201D;
  --muted: #6B655E;
  --line: #E7E4DC;
  --bg: #FFFFFF;
  --surface: #F7F5F1;
  --amber-bg: #FAEEDA;
  --amber-ink: #854F0B;
  --amber-ink2: #633806;
  --danger: #C0392B;
  --r-card: 15px;
  --r-tile: 12px;
  --r-btn: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
}
button { font: inherit; color: inherit; }
a { color: var(--teal); text-decoration: none; }
h1, h2, h3 { font-weight: 500; }
ul { margin: 0; }

/* phone-style centred column */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: 76px;
}
.screen-body { padding-bottom: 16px; }

.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
.danger { color: var(--danger); }
.loading { padding: 1.5rem 16px; color: var(--muted); }

/* icons */
.ic { width: 22px; height: 22px; display: inline-block; vertical-align: middle; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ───────────── header ───────────── */
.app-header { background: var(--teal); color: #fff; padding: 14px 16px 18px; border-radius: 0 0 20px 20px; }
.hdr-top { display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
/* Transparent tile: the sheep mark is its own cream rounded chip — no teal ring around it. */
.brand-tile { width: 56px; height: 56px; border-radius: 14px; background: transparent;
  display: flex; align-items: center; justify-content: center; flex: none; }
.brand-tile img, .brand-tile .ic, .brand-tile svg { width: 52px; height: 52px; }
.brand-name { font-weight: 600; font-size: 1.3rem; line-height: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdr-btn { width: 42px; height: 42px; border-radius: 12px; border: 0; background: rgba(255,255,255,.16);
  color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
/* Home header lang pill: same 44px rail as the QA-sized buttons (uniform row). */
.hdr-top .lang-btn { height: 44px; padding: 0 11px; border: 0; flex: none; max-width: 34vw; }
.lang-btn--compact span { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.03em; }
.lang-btn-flag { font-size: 1.05rem; line-height: 1; flex: none; }
/* Language picker trigger (opens the searchable sheet). */
.lang-btn { display: inline-flex; align-items: center; gap: 6px; max-width: 42vw; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; }
.lang-btn .ic { width: 18px; height: 18px; color: var(--teal); flex: none; }
.lang-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Searchable language sheet (phone-style full menu). */
.lang-sheet { position: fixed; inset: 0; z-index: 1200; background: rgba(0, 0, 0, 0.35); display: flex; justify-content: center; align-items: flex-end; }
.lang-sheet-inner { width: 100%; max-width: 480px; height: 88vh; background: var(--bg, #fff); border-radius: 18px 18px 0 0;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.25); }
.lang-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; }
.lang-sheet-title { font-size: 1.1rem; font-weight: 600; }
.lang-search-wrap { display: flex; align-items: center; gap: 9px; margin: 4px 16px 8px; padding: 10px 12px;
  background: var(--surface); border-radius: 12px; }
.lang-search-wrap .ic { width: 18px; height: 18px; color: var(--muted); flex: none; }
.lang-search { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); }
.lang-list { flex: 1; overflow-y: auto; padding: 0 8px 16px; -webkit-overflow-scrolling: touch; }
.lang-group { padding: 12px 12px 6px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted); }
.lang-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; border: 0; background: none;
  border-radius: 12px; cursor: pointer; text-align: start; color: var(--ink); font: inherit; }
.lang-row:active { background: var(--surface); }
.lang-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lang-flag { font-size: 1.35rem; line-height: 1; flex: none; }
.lang-native { font-size: 1.02rem; line-height: 1.25; }
.lang-en { font-size: 0.8rem; color: var(--muted); }
.lang-row.lang-on .lang-native { color: var(--teal); font-weight: 600; }
.lang-check { width: 20px; height: 20px; color: var(--teal); flex: none; }

/* ── RTL support (ar/he/fa/ur): mirror the layout once, applied via <html dir=rtl>. */
[dir="rtl"] body { direction: rtl; }
[dir="rtl"] .lang-row, [dir="rtl"] .loc-relocate { text-align: right; }
[dir="rtl"] .bottom-nav { direction: rtl; }
/* Flip directional glyphs (back arrow, chevrons, nav arrow) horizontally. */
[dir="rtl"] .icon-btn .ic, [dir="rtl"] .ic-chev, [dir="rtl"] .lang-btn .ic { transform: scaleX(-1); }
/* Mirror the few physical-side paddings/rounded corners that aren't logical. */
[dir="rtl"] .app-header, [dir="rtl"] .hero { border-radius: 0 0 20px 20px; }
[dir="rtl"] .search-results, [dir="rtl"] .lang-list { text-align: right; }
[dir="rtl"] .trip-banner, [dir="rtl"] .row, [dir="rtl"] .go-row, [dir="rtl"] .meta-row { flex-direction: row-reverse; }

.search-pill { display: flex; align-items: center; gap: 9px; background: #fff; border-radius: 12px; padding: 7px 12px; margin-top: 12px; color: var(--muted); }
.search-pill .ic { color: var(--muted); }
.search-pill input { border: 0; outline: 0; font: inherit; flex: 1; min-width: 0; color: var(--ink); background: transparent; }
/* Keep the search pill compact: the in-pill locate button shouldn't dominate height. */
.search-pill .hdr-btn { width: 32px; height: 32px; border-radius: 9px; flex: none; }
.search-pill .hdr-btn .ic { width: 18px; height: 18px; }
.loc-line { color: var(--mint); font-size: 0.86rem; margin-top: 11px; display: flex; align-items: center; gap: 6px; }
.loc-line .ic { width: 18px; height: 18px; }
/* The "You're in {city} · Update" status line is a real re-locate button. */
.loc-relocate { background: none; border: 0; padding: 0; font: inherit; color: var(--mint);
  cursor: pointer; text-align: left; flex-wrap: wrap; gap: 4px; }
.loc-relocate .loc-city { display: inline-flex; align-items: center; gap: 6px; }
.loc-relocate .loc-action { font-weight: 600; text-decoration: underline; color: #fff; }
.loc-relocate:active { opacity: 0.7; }
/* Status row: relocate line on the left, milestones ☆ on the right */
.loc-row { display: flex; align-items: center; gap: 8px; }
.loc-row .loc-relocate { flex: 1; min-width: 0; }
.loc-star { margin-top: 11px; color: var(--mint); display: flex; align-items: center; flex: none; padding: 2px; }
.loc-star .ic { width: 20px; height: 20px; }
/* Inline relocate failure (self-clearing; readable on teal) */
.loc-error { margin: 6px 0 0; font-size: 0.8rem; color: #FFD9CF; }

/* Stale-location nudge — dismissible bar at the top of the returning home. */
.relocate-nudge { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 12px 16px 0;
  padding: 10px 12px; background: var(--mint-surface); border: 1px solid var(--mint); border-radius: 12px; }
.relocate-nudge .rn-text { flex: 1 1 55%; min-width: 0; display: flex; align-items: center; gap: 6px;
  font-size: 0.9rem; color: var(--ink); }
.relocate-nudge .rn-text .ic { width: 18px; height: 18px; color: var(--teal); flex: none; }
.relocate-nudge .rn-go { flex: none; background: var(--teal); color: #fff; border: 0; border-radius: 9px;
  padding: 7px 11px; font-size: 0.85rem; font-weight: 500; cursor: pointer; }
.relocate-nudge .rn-x { flex: none; background: none; border: 0; color: var(--muted); font-size: 1rem;
  line-height: 1; padding: 4px 6px; cursor: pointer; }

.search-results { display: flex; flex-direction: column; gap: 6px; padding: 8px 16px 0; }
.search-results .result { text-align: left; padding: 0.55rem 0.7rem; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; cursor: pointer; color: var(--ink); }
.search-results .result:hover { border-color: var(--teal); }
.result-dist { margin-left: auto; padding-left: 8px; color: var(--muted); font-size: 0.82rem; white-space: nowrap; flex: none; }

/* ───────────── home: section + grid + tip ───────────── */
.section-eyebrow { font-size: 0.72rem; letter-spacing: 0.12em; color: var(--muted); font-weight: 500; margin: 18px 16px 9px; text-transform: uppercase; }

.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; }
.cat-tile { display: flex; flex-direction: column; gap: 9px; padding: 16px; border: 1px solid var(--line);
  border-radius: var(--r-card); background: #fff; color: var(--ink); text-align: left; }
.cat-tile .ic { width: 26px; height: 26px; color: var(--teal); }
.cat-tile .t-label { font-weight: 500; }
.cat-tile .t-sub { font-size: 0.8rem; color: var(--muted); }
.cat-tile:active { background: var(--surface); }
/* All Discover cards share one neutral style now (José: "no need to be greenier").
   The free trust-layer tiles keep the same class for behaviour, just no green fill. */
.cat-tile--safety { background: transparent; border-color: var(--line); }
.cat-tile { position: relative; }

/* interest detail: honest source + affiliate disclosure */
.src-note { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; color: var(--muted); margin: 0 16px 8px; }
.src-note .ic { width: 15px; height: 15px; }
.aff-note { font-size: 0.72rem; color: var(--muted); margin: 8px 16px 4px; }

/* interest picker chips + the personalize row on home */
.chip-wrap { display: flex; flex-wrap: wrap; gap: 9px; padding: 0 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 0.88rem; cursor: pointer; }
.chip .ic { width: 17px; height: 17px; color: var(--muted); }
.chip--on { background: var(--mint-surface); border-color: var(--teal); color: var(--teal); }
.chip--on .ic { color: var(--teal); }
/* "More interests ▸" — collapsed niche tail of the interest pickers */
.chips-more { display: inline-flex; align-items: center; gap: 5px; margin: 10px 16px 0; padding: 6px 2px;
  border: 0; background: none; color: var(--teal); font: inherit; font-size: 0.88rem; font-weight: 500; cursor: pointer; }
.chips-more-arrow { transition: transform 0.15s; display: inline-block; }
.chips-more--open .chips-more-arrow { transform: rotate(90deg); }
.chips-niche { margin-top: 9px; }
.personalize-row { border-top: 1px solid var(--line); margin-top: 16px; }

/* ───────────── trip mode ───────────── */
.trip-banner { display: flex; align-items: center; gap: 9px; margin: 14px 16px 4px; padding: 11px 14px;
  background: var(--mint-surface); border: 1px solid var(--mint); border-radius: var(--r-card); color: var(--teal); font-weight: 500; }
.trip-banner span { flex: 1; }
.trip-banner .ic-chev { color: var(--teal); }
.trip-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 4px; }
.trip-when { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.92rem; }
.trip-when .ic { width: 18px; height: 18px; }
.status-pill { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.status-upcoming { background: var(--amber-bg); color: var(--amber-ink); }
.status-active { background: var(--teal); color: #fff; }
.status-past { background: var(--surface); color: var(--muted); }

.checklist { background: #fff; }
.check-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 16px;
  background: #fff; color: var(--ink); border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check-item:disabled { opacity: 0.7; }
.check-main { flex: 1; min-width: 0; }
.check-label { font-weight: 500; }
.check-desc { font-size: 0.82rem; color: var(--muted); margin-top: 1px; }
.check-done .row-tile { background: var(--teal); color: #fff; }

.field-label { display: block; font-size: 0.78rem; font-weight: 500; color: var(--muted); margin: 16px 0 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.search-pill--field { border: 1px solid var(--line); margin-top: 0; }
.chosen-dest[hidden] { display: none; }
.chosen-dest { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 11px 14px; background: var(--mint-surface);
  border: 1px solid var(--mint); border-radius: 12px; color: var(--teal); }
.date-row { display: flex; align-items: center; gap: 10px; }
.date-row input { flex: 1; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; color: var(--ink); background: #fff; }
.chip-wrap--flush { padding: 0; }

/* ───────────── emergency quick-access ───────────── */
/* Discreet entry point — muted, not red, ignorable until you need it. The big
   high-contrast call buttons live on the emergency screen itself, not here. */
.hdr-sos .ic { color: var(--muted); }
.emergency-screen .emg-verified { display: flex; align-items: center; gap: 7px; margin: 14px 16px 10px; color: var(--teal); font-size: 0.9rem; font-weight: 500; }
.emergency-screen .emg-verified .ic { color: var(--teal); }
.emg-calls { display: flex; flex-direction: column; gap: 12px; padding: 0 16px; }
.emg-call { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-radius: var(--r-card);
  background: #d11a2a; color: #fff; text-decoration: none; box-shadow: 0 2px 10px rgba(209,26,42,0.28); }
.emg-call:active { transform: translateY(1px); }
.emg-call .emg-num { font-size: 2.1rem; font-weight: 700; letter-spacing: 0.02em; line-height: 1; }
.emg-call .emg-label { flex: 1; font-size: 0.95rem; opacity: 0.95; text-transform: capitalize; }
.emg-call .ic { width: 28px; height: 28px; color: #fff; }
.emg-raw { margin: 10px 16px 2px; font-size: 0.8rem; color: var(--muted); }
.emg-select { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; color: var(--ink); background: #fff; }

/* ───────────── currency converter ───────────── */
.cc-row { display: flex; gap: 10px; align-items: stretch; margin: 12px 16px; }
.cc-amt { flex: 1; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 1.3rem; font-weight: 600; color: var(--ink); background: #fff; }
.cc-result { flex: 1; min-width: 0; padding: 14px; border-radius: 12px; font-size: 1.3rem; font-weight: 700; color: var(--teal); background: var(--mint-surface); display: flex; align-items: center; overflow: hidden; }
.cc-cur { width: 110px; flex: none; padding: 14px 10px; border: 1px solid var(--line); border-radius: 12px; font: inherit; font-weight: 600; color: var(--ink); background: #fff; }
.cc-swap-row { display: flex; justify-content: center; margin: 2px 16px; }

/* ───────────── phrasebook ───────────── */
.ph-list { background: #fff; }
.ph-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line);
  background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.ph-row:active { background: var(--surface); }
.ph-row .ic-chev { color: var(--muted); flex: none; }
.ph-main { flex: 1; min-width: 0; }
.ph-local { font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.ph-mean { flex: none; max-width: 38%; text-align: right; font-size: 0.85rem; color: var(--muted); }

/* ───────────── offline map packs ───────────── */
.om-list { background: #fff; }
.om-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.om-main { flex: 1; min-width: 0; }
.om-name { font-weight: 500; }
.om-sub { font-size: 0.82rem; color: var(--muted); margin-top: 1px; }
.om-row .btn.sm { flex: none; }

/* ───────────── sync & devices ───────────── */
.pair-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.8rem; font-weight: 700; letter-spacing: 0.12em;
  text-align: center; padding: 14px; margin-top: 8px; background: var(--mint-surface); border: 1px solid var(--mint); border-radius: var(--r-card); color: var(--teal); }

/* ───────────── live alerts (Safety screen) ───────────── */
.alerts-list { background: #fff; }
.alert-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; color: var(--ink);
  border-bottom: 1px solid var(--line); border-left: 4px solid var(--muted); text-decoration: none; }
.alert-row:active { background: var(--surface); }
.alert-row--static { cursor: default; }
.alert-row--static:active { background: inherit; }
.alert-medium { border-left-color: #e8851b; }
.alert-high { border-left-color: #d11a2a; }
.alert-low { border-left-color: var(--mint); }
.alert-main { flex: 1; min-width: 0; }
.alert-title { font-weight: 500; }
.alert-sum { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.alert-src { font-size: 0.72rem; color: var(--muted); margin-top: 3px; }
.alert-none { display: flex; align-items: center; gap: 8px; margin: 0 16px; padding: 12px 14px; background: var(--mint-surface);
  border: 1px solid var(--mint); border-radius: var(--r-card); color: var(--teal); font-size: 0.9rem; }

/* ───────────── Ask Sherpie ───────────── */
.ask-q { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; font: inherit; color: var(--ink); background: #fff; }
.ask-out { min-height: 8px; }
.ask-answer { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; line-height: 1.5; color: var(--ink); }

/* "Show this screen" — local text is the hero, big enough to hand over */
.phrase-show { position: fixed; inset: 0; z-index: 1000; background: #fff; display: flex; flex-direction: column; }
.ps-close { align-self: flex-start; margin: 12px; width: 44px; height: 44px; border-radius: 11px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.ps-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 28px 60px; text-align: center; }
.ps-local { font-size: 2.6rem; line-height: 1.2; font-weight: 700; color: var(--ink); }
.ps-mean { font-size: 1rem; color: var(--muted); }

.tip-card { display: flex; gap: 11px; align-items: flex-start; margin: 16px; padding: 13px 14px;
  background: var(--amber-bg); border-radius: var(--r-card); color: var(--amber-ink2); }
.tip-card .ic { color: var(--amber-ink); margin-top: 1px; }
.tip-title { font-weight: 500; color: var(--amber-ink); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* ───────────── bottom nav ───────────── */
.bottom-nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px;
  display: flex; background: #fff; border-top: 1px solid var(--line); z-index: 40; }
.bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 calc(9px + env(safe-area-inset-bottom)); color: var(--muted); background: none; border: 0; cursor: pointer; font-size: 0.7rem; text-decoration: none; }
.bn-item .ic { width: 24px; height: 24px; }
.bn-item.active { color: var(--teal); }

/* ───────────── list rows (menu, POIs) ───────────── */
.rows { background: #fff; }
.row, .go-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff;
  width: 100%; text-align: left; color: var(--ink); border: 0; border-bottom: 1px solid var(--line); }
.row { cursor: pointer; }
.row-tile { width: 40px; height: 40px; border-radius: 11px; background: var(--mint-surface);
  display: flex; align-items: center; justify-content: center; color: var(--teal); flex: none; }
.row-tile .ic { width: 22px; height: 22px; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; background: none; border: 0; text-align: left; color: inherit; cursor: pointer; padding: 0; }
.row-label { font-weight: 500; }
.row-sub { font-size: 0.82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic-chev { color: var(--muted); }
.row--safety .row-tile { background: var(--teal); color: #fff; }
.go-row .go-btn { flex: none; }

/* ───────────── screen head ───────────── */
.screen-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.screen-title { font-weight: 500; font-size: 1.12rem; flex: 1; }

.icon-btn { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: #fff;
  display: flex; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; flex: none; }

/* ───────────── buttons ───────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 16px;
  border-radius: var(--r-btn); border: 1px solid var(--teal); background: #fff; color: var(--teal); font-weight: 500; cursor: pointer; }
.btn .ic { width: 20px; height: 20px; }
.btn:active { transform: translateY(1px); }
.btn--full { width: 100%; }
.btn--primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn.sm { padding: 0.5rem 0.7rem; font-size: 0.85rem; }
.btn-square { width: 48px; height: 48px; padding: 0; flex: none; }
.btn--block-row { display: flex; gap: 10px; padding: 16px; }
/* Secondary/quiet button (e.g. the "Open in Maps" hand-off under Directions). */
.btn--ghost { background: var(--surface, #f4efe3); border-color: transparent; color: var(--ink, #1d2b27); font-weight: 400; }

/* ── Nav-lite: Sherpie marker + rotating direction arrow ─────────────────── */
.nav-puck { position: relative; width: 50px; height: 50px; }
.nav-sheep { position: absolute; top: 8px; left: 8px; width: 34px; height: 34px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45); display: flex; align-items: center; justify-content: center; }
.nav-sheep svg { display: block; }
/* The arrow layer fills the puck; its triangle sits at top-centre and the layer
   rotates about its centre, so the triangle orbits the sheep to point the way. */
.nav-arrow { position: absolute; inset: 0; transform-origin: 50% 50%; transition: transform 0.25s ease-out; pointer-events: none; }
.nav-arrow::before { content: ""; position: absolute; top: -2px; left: 50%; transform: translateX(-50%);
  border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 12px solid var(--teal, #0F6E56);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4)); }

/* Nav-lite overlay panel (bottom of the map screen). */
.nav-panel { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1001;
  background: var(--card, #fff); border-radius: 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
  padding: 12px 14px; max-height: 46%; overflow-y: auto; }
.nav-head { display: flex; align-items: center; gap: 10px; }
.nav-info { flex: 1; min-width: 0; }
.nav-info strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-sub { font-size: 0.85rem; color: var(--muted, #6b756f); margin-top: 2px; }
.nav-stop { flex: none; }
.nav-step-list { margin: 10px 0 0; padding-left: 20px; font-size: 0.9rem; line-height: 1.5; }
.nav-step-list li { margin-bottom: 4px; }
.nav-maps { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  font-size: 0.9rem; color: var(--teal, #0F6E56); text-decoration: none; }
.nav-maps .ic { width: 16px; height: 16px; }

/* ── Customize Sherpie page ──────────────────────────────────────────────── */
.cz-preview { display: flex; justify-content: center; padding: 18px 0 6px; }
.cz-preview svg { filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.12)); border-radius: 26px; }
.cz-free { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 0 16px 8px;
  color: var(--teal); font-size: 0.9rem; font-weight: 500; }
.cz-free .ic { width: 16px; height: 16px; }
.cz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; padding: 4px 16px 8px; }
.cz-swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px;
  background: transparent; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--ink); }
.cz-swatch.cz-on { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.cz-chip { width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.cz-name { font-size: 0.78rem; color: var(--muted); }
.cz-swatch.cz-on .cz-name { color: var(--teal); font-weight: 500; }
.cz-toggles { display: flex; flex-direction: column; gap: 10px; padding: 4px 16px 20px; }
.cz-toggle { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px;
  background: transparent; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--ink); font: inherit; }
.cz-switch { position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--line); transition: background 0.15s; flex: none; }
.cz-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.15s; }
.cz-toggle.cz-on .cz-switch { background: var(--teal); }
.cz-toggle.cz-on .cz-switch::after { transform: translateX(18px); }

.placeholder { border: 2px dashed #d8b56a; background: #fffaf0; border-radius: var(--r-card); padding: 0.9rem; margin: 16px; }
.placeholder strong { display: block; margin-bottom: 4px; }
.placeholder-note { font-size: 0.75rem; color: var(--muted); margin: 6px 16px; }
.pad { padding: 16px; }
code { background: var(--surface); padding: 0.05rem 0.3rem; border-radius: 4px; font-size: 0.85em; }

/* ───────────── safety ───────────── */
.emergency { background: var(--teal); color: #fff; border-radius: var(--r-card); padding: 16px; margin: 14px 16px;
  display: flex; align-items: center; gap: 14px; }
.emergency .row-tile { background: var(--teal-dark); color: #fff; }
.emergency .e-label { color: var(--mint); font-size: 0.8rem; }
.emergency .big { font-size: 1.7rem; font-weight: 500; color: #fff; line-height: 1.1; }
.fact-card { margin: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: #fff; }
.fact-row { display: flex; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.fact-row:last-child { border-bottom: 0; }
.fact-row .ic { color: var(--teal); margin-top: 2px; }
.warn-card { margin: 12px 16px; background: var(--amber-bg); color: var(--amber-ink2); border-radius: var(--r-card); padding: 13px 14px; }
.warn-card b { color: var(--amber-ink); }
.offline-note { color: var(--muted); font-size: 0.82rem; padding: 12px 16px; display: flex; gap: 7px; align-items: center; }
.offline-note .ic { width: 18px; height: 18px; color: var(--muted); }

/* ───────────── place detail (hero) ───────────── */
/* z-index 1000 so the full-screen detail takeover paints above Leaflet's marker
   pane (z-index 600) on the Map screen — otherwise the live map hides it. */
/* z 1100: the open place detail must sit ABOVE the nav panel (1001) — at 1000
   its buttons were intercepted during active navigation (audit #10.2). */
.detail { position: fixed; inset: 0; z-index: 1100; background: var(--bg); max-width: 480px; margin: 0 auto; overflow-y: auto; }
.hero { background: var(--teal); color: #fff; padding: 14px 16px 22px; border-radius: 0 0 20px 20px; }
.hero-top { display: flex; justify-content: space-between; }
.hero .icon-btn { background: rgba(255,255,255,.16); border: 0; color: #fff; }
.hero .icon-btn.fav-on { background: #fff; color: var(--teal); }
.hero .eyebrow { color: var(--mint); font-size: 0.74rem; letter-spacing: 0.1em; margin-top: 14px; text-transform: uppercase; }
.hero h1 { font-size: 1.4rem; margin: 4px 0 6px; }
.hero-meta { color: #d7efe7; font-size: 0.9rem; }
.meta-list { padding: 6px 16px; }
.meta-row { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--line); }
.meta-row .ic { color: var(--teal); margin-top: 2px; }

/* ───────────── map ───────────── */
.map { height: 320px; border: 1px solid var(--line); border-radius: var(--r-card); margin: 12px 16px; }
.map--full { height: calc(100vh - 150px); margin: 0; border-radius: 0; border: 0; }
.map-wrap { position: relative; }
.map-status { margin: 12px 16px; padding: 12px 14px; background: var(--amber-bg); color: var(--amber-ink2);
  border-radius: var(--r-card); font-size: 0.9rem; line-height: 1.4; }
.map-legend { position: absolute; top: 12px; right: 12px; z-index: 1000; background: rgba(255,255,255,0.96);
  border: 1px solid var(--line); border-radius: 12px; padding: 5px; display: flex; flex-direction: column; gap: 5px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.14); }
/* Map attribution: smaller + muted, single right-aligned line. LICENSE: the
   "© OpenStreetMap contributors © CARTO" / "© Protomaps" texts are required by
   ODbL/CARTO terms — restyle, never remove/hide. */
.leaflet-control-attribution { font-size: 9px !important; color: #8a938e !important; background: rgba(255,255,255,0.7) !important;
  white-space: nowrap; text-align: right; padding: 1px 5px !important; }
.leaflet-control-attribution a { color: #8a938e !important; }
/* Icon-only legend chips: color + icon carry the meaning, label via tooltip/toast */
.legend-chip { width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--gc);
  color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.legend-chip .ic { width: 19px; height: 19px; }
.legend-chip:active { transform: scale(0.94); }
.legend-off { opacity: 0.32; filter: grayscale(0.6); }
/* Sheep "you are here" marker on the plain map */
.sheep-marker { background: none; border: 0; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35)); }
.map-recenter { position: absolute; bottom: 18px; right: 14px; z-index: 1000; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--teal); display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.18); }
.map-recenter .ic { width: 22px; height: 22px; }
.map-recenter:active { transform: translateY(1px); }
/* "Save this city for offline" control (Protomaps/ODbL vector — legal download) */
.map-save { position: absolute; left: 12px; bottom: 18px; z-index: 1000; max-width: calc(100% - 80px); }
.ms-save { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--teal);
  background: var(--teal); color: #fff; font-weight: 500; font-size: 0.82rem; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.18); }
.ms-save .ic { width: 16px; height: 16px; }
.ms-saved { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--mint-surface);
  border: 1px solid var(--mint); color: var(--teal); font-weight: 500; font-size: 0.8rem; }
.ms-del { margin-left: 6px; padding: 8px 11px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; font-size: 0.78rem; }
.ms-progress { display: inline-flex; padding: 10px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  color: var(--ink); font-weight: 500; font-size: 0.82rem; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }

/* ───────────── onboarding ───────────── */
.onboard { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 32px 24px; gap: 14px; }
.onboard .mark { width: 88px; height: 88px; border-radius: 24px; background: var(--teal); color: var(--mint);
  display: flex; align-items: center; justify-content: center; }
.onboard .mark img, .onboard .mark svg { width: 56px; height: 56px; }
.onboard .mark .ic { width: 48px; height: 48px; stroke-width: 1.6; }
.onboard h1 { font-size: 1.7rem; margin: 4px 0 0; }
.onboard p { color: var(--muted); margin: 0; max-width: 320px; }
.onboard .actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 320px; margin-top: 10px; }
.onboard-why { font-size: 0.78rem; line-height: 1.4; }
/* interests step: top-aligned + scrollable (the chip list can be long) */
.onboard--scroll { justify-content: flex-start; padding-top: 40px; overflow-y: auto; }
.onboard-chips { justify-content: center; max-width: 380px; margin-top: 6px; padding: 0; }
.skip { color: var(--muted); background: none; border: 0; margin-top: 4px; cursor: pointer; }

/* ───────────── about / privacy ───────────── */
.prose { padding: 16px; }
.prose h2 { margin-top: 0; }
.prose h3 { margin: 1.2em 0 0.3em; }
.disclosure { font-size: 0.88rem; background: var(--mint-surface); border: 1px solid var(--mint); border-radius: 10px; padding: 0.7rem 0.85rem; }
.scams ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }

/* ───────── v0.3 QA: WCAG AA contrast, ≥44px tap targets, no overflow ───────── */
html, body { overflow-x: hidden; }
/* mint-on-teal small text → pale mint (≈5.5:1 vs teal; #9FE1CB is only 4.2:1) */
/* tap targets */
.icon-btn, .hdr-btn { width: 44px; height: 44px; }
.btn, .btn.sm { min-height: 44px; }
.search-results .result { min-height: 44px; display: flex; align-items: center; }
.skip { min-height: 44px; padding: 10px 14px; }
.bn-item { min-height: 50px; justify-content: center; }
.row, .go-row { min-height: 56px; }
/* keep flex children from forcing overflow on 320px */
.go-row .row-main, .row .row-main, .brand span { min-width: 0; }
.go-row .go-btn { white-space: nowrap; }
/* Partner rows (data/partners.json; rendered only when a link is live) */
.partner-chip { font-size: .62rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--teal); border: 1px solid var(--teal); border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 2px; }
.ms-esim { display: block; margin-top: 6px; font-size: .8rem; color: var(--teal); text-decoration: none; }
/* Travel passport (D3) */
.stamp-toast { position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); opacity: 0; background: var(--teal); color: #fff; padding: 10px 18px; border-radius: 22px; font-size: .9rem; font-weight: 600; z-index: 60; transition: all .35s ease; pointer-events: none; }
.stamp-toast.on { transform: translate(-50%, 0); opacity: 1; }
.stamp-head { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 16px 6px; }
.stamp-count { font-size: 1.15rem; font-weight: 800; color: var(--ink); }
.stamp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 16px; }
.stamp-tile { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; text-align: center; }
.stamp-flag { font-size: 1.8rem; }
.stamp-name { font-size: .78rem; font-weight: 700; margin-top: 4px; }
.stamp-date { font-size: .68rem; color: var(--muted); margin-top: 2px; }
/* Wardrobe milestones (D6). NOTE: no `display` here — `inline-block` used to
   override the tile's flex centering and baseline-shifted the sheep 2px high. */
.brand-tile { position: relative; }
.ms-esim-note { display: block; font-size: .66rem; color: var(--muted); margin-top: 2px; }
/* Sweep #9: 🚶/🚗 mode chips — visible collapsed AND expanded */
.nav-modes { display: flex; gap: 8px; padding: 6px 0 2px; }
.nav-mode { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-size: 0.86rem; cursor: pointer; }
.nav-mode--on { background: var(--mint-surface); border-color: var(--teal); color: var(--teal); font-weight: 600; }
.nav-mode:disabled { opacity: 0.45; cursor: default; }
/* Sweep #8: collapsed nav panel + row hearts */
.nav-panel--collapsed #nav-steps, .nav-panel--collapsed #nav-maps { display: none; }
.nav-panel:not(.nav-panel--collapsed) #nav-next { display: none; }
.nav-next { padding: 6px 2px 2px; font-size: .85rem; font-weight: 600; color: var(--ink); }
.nav-expand { flex: 0 0 auto; }
.nav-chev { transition: transform .2s ease; transform: rotate(90deg); }
.nav-chev--up { transform: rotate(-90deg); }
.row-fav { flex: 0 0 auto; background: none; border: none; padding: 6px; color: #c9c2b4; cursor: pointer; }
.row-fav.fav-on { color: #d11a2a; }
.row-fav svg { width: 18px; height: 18px; }
.guide-row--compact { min-height: 44px; }
.guide-row--compact .row-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.guides-more { display: block; padding: 4px 16px 10px; font-size: .82rem; color: var(--teal); text-decoration: none; }
.cc-chips { padding: 6px 16px 0; }
/* Sweep #9b: list pager — Show more + Show less side by side */
.int-pager { display: flex; gap: 10px; }
.int-pager .btn { flex: 1; }
/* Sweep #9b: read-only milestones checklist */
.ms-mrow { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.ms-mstate { width: 26px; height: 26px; border-radius: 50%; background: var(--surface); color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 0.82rem; flex: none; }
.ms-mdone .ms-mstate { background: var(--mint-surface); color: var(--teal); font-weight: 800; }
.ms-msoon { flex: none; font-size: 0.68rem; color: var(--muted); background: var(--surface); border-radius: 999px; padding: 3px 8px; }
/* Hints are the point of this screen — wrap, never ellipsize */
.ms-mrow .row-sub { white-space: normal; overflow: visible; text-overflow: clip; }
/* Sweep #8 part 2: share-card preview modal (web fallback — no silent downloads) */
.card-preview { position: fixed; inset: 0; z-index: 1300; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center; padding: 18px; }
.cp-inner { position: relative; width: 100%; max-width: 420px; max-height: 92vh; overflow-y: auto;
  background: var(--bg, #fff); border-radius: 18px; padding: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.35); }
.cp-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--surface); color: var(--ink); font-size: 1rem; cursor: pointer; }
.cp-img { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.cp-text { margin: 12px 2px 0; font-size: 0.88rem; line-height: 1.45; color: var(--ink);
  background: var(--surface); border-radius: 10px; padding: 10px 12px; user-select: all; -webkit-user-select: all; }
.cp-actions { display: flex; gap: 10px; margin-top: 12px; }
.cp-actions .btn { flex: 1; text-decoration: none; }
