/* === TIPPING PANEL === */
.tt-tip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; font-size: 9px; }
.tt-tip-industry { display: flex; align-items: center; gap: 4px; padding: 2px 0; }
.tt-tip-amount { color: var(--na-gold-mid); font-family: var(--font-data); font-weight: 700; }
.tt-tip-note { color: #7a8a5a; font-size: 8px; font-style: italic; }
.tt-tip-service-charge { background: rgba(239,108,0,0.08); border-left: 2px solid #c9a84c; padding: 4px 6px; font-size: 8.5px; margin: 4px 0; }
.tt-tip-quick { border-left: 3px solid #c9a84c; background: rgba(201,168,76,0.06); padding: 6px 8px; font-size: 9px; margin-top: 6px; }
.tt-tip-calc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 9px; color: #a89060; }
.tt-tip-calc-input { width: 96px; background: rgba(255,255,255,0.05); border: 1px solid var(--na-glass-border); color: var(--na-parchment); font-family: var(--font-data); font-size: 16px; padding: 3px 6px; border-radius: 3px; }
.tt-tip-calc-result { flex: 1 0 100%; color: #c9a84c; font-weight: 700; font-size: 11px; line-height: 1.5; }

/* === SAFETY ETHICS === */
.tt-safety-ethics { background: rgba(14,11,6,0.6); border-left: 3px solid #c9a84c; padding: 8px 10px; margin-top: 8px; font-size: 8.5px; line-height: 1.5; color: #a89060; }
.tt-safety-reliability { display: inline-block; padding: 2px 5px; border-radius: 2px; font-size: 8px; font-weight: 600; }
.tt-safety-reliability.high { background: rgba(46,125,50,0.15); color: #a5d6a7; border: 1px solid rgba(46,125,50,0.3); }
.tt-safety-reliability.moderate { background: rgba(239,108,0,0.12); color: #ffcc80; border: 1px solid rgba(239,108,0,0.3); }
.tt-safety-reliability.low { background: rgba(198,40,40,0.12); color: #ef9a9a; border: 1px solid rgba(198,40,40,0.3); }

/* === PHRASEBOOK === */
.tt-phrasebook { margin-top: 6px; }
.tt-phrasebook details { border: 1px solid rgba(201,168,76,0.15); border-radius: 4px; }
.tt-phrasebook summary { cursor: pointer; padding: 6px 8px; font-size: 9px; color: #c9a84c; list-style: none; user-select: none; }
.tt-phrasebook summary::-webkit-details-marker { display: none; }
.tt-phrase-table { width: 100%; border-collapse: collapse; font-size: 8.5px; margin-top: 4px; }
.tt-phrase-table td { padding: 3px 6px; border-bottom: 1px solid rgba(201,168,76,0.07); vertical-align: top; }
.tt-phrase-local { color: #e8d5a3; font-weight: 500; }
.tt-phrase-pron { color: #7a8a5a; font-style: italic; }

/* === VACCINE & ALTITUDE === */
.tt-vaccine-required { display: inline-block; background: rgba(198,40,40,0.12); color: #ef9a9a; border: 1px solid rgba(198,40,40,0.3); padding: 2px 6px; border-radius: 2px; font-size: 8px; }
.tt-vaccine-recommended { display: inline-block; background: rgba(239,108,0,0.12); color: #ffcc80; border: 1px solid rgba(239,108,0,0.3); padding: 2px 6px; border-radius: 2px; font-size: 8px; }
.tt-altitude-warning { border-left: 3px solid #C62828; background: rgba(198,40,40,0.08); padding: 8px 10px; margin-top: 8px; font-size: 9px; color: #ef9a9a; line-height: 1.5; }

/* === VERDICT ROW === */
.tt-verdict-row td { background: rgba(201,168,76,0.10); border-top: 2px solid #c9a84c; padding: 6px 8px; }
.tt-verdict-winner { color: #c9a84c; font-weight: 700; font-size: 10px; }
.tt-verdict-behind { color: #7a8a5a; font-size: 9px; }
.tt-verdict-insight td { font-size: 8.5px; color: #a89060; padding: 4px 8px; border-top: 1px solid rgba(201,168,76,0.1); font-style: italic; }

/* === PASSPORT RANK === */
.tt-passport-rank { border: 1px solid rgba(201,168,76,0.2); border-radius: 4px; padding: 8px; margin-top: 8px; }
.tt-passport-rank-bar { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; margin: 4px 0; position: relative; overflow: hidden; }
.tt-passport-rank-fill { height: 100%; background: #c9a84c; border-radius: 2px; transition: width 0.4s ease; }

/* === ENTRY DENIED === */
.tt-entry-denied { border-left: 3px solid #C62828; background: rgba(198,40,40,0.08); padding: 8px 10px; margin-top: 8px; }
.tt-entry-denied-title { color: #ef9a9a; font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }

/* ─── Compare Panel Empty State ─────────────────────────────────────────── */
.compare-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-6) var(--sp-5);
  min-height: 160px;
  color: var(--na-text-secondary);
}
.compare-empty-state strong { font-style: normal; }

/* ─── 320 px breakpoint: smallest Android / fold devices ───────────────── */
@media (max-width: 359px) {
  #na-header-wordmark { display: none; }
  .na-nav-item-label  { font-size: 8px; }
  #na-sidebar         { width: 200px; }
  .tt-panel           { max-width: 100vw; }
  #topbar             { padding: 0 var(--sp-2); }
}

/* ─── Preferences Sheet ──────────────────────────────────────────────────── */
#na-prefs-sheet {
  position: fixed; inset: 0; z-index: 2200;
  display: flex; align-items: flex-end;
}
#na-prefs-sheet[hidden] { display: none; }

#na-prefs-overlay {
  position: absolute; inset: 0;
  background: rgba(5,8,20,0.72); -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px);
}

#na-prefs-panel {
  position: relative; z-index: 1;
  width: 100%; max-height: 85vh; overflow-y: auto;
  background: var(--na-glass-navy, rgba(8,15,40,0.97));
  border: 1px solid rgba(201,168,76,0.18);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  padding: var(--sp-3) var(--sp-5) var(--sp-6);
}

#na-prefs-handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: rgba(201,168,76,0.35);
  margin: 0 auto var(--sp-3);
}

#na-prefs-title {
  font-family: var(--font-label); font-size: 11px;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--na-gold-mid, #c9a84c);
  text-align: center; margin-bottom: var(--sp-2);
}

#na-prefs-body { padding-top: var(--sp-3); }

.pref-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid rgba(201,168,76,0.08);
}
.pref-row:last-child { border-bottom: none; }

.pref-label {
  font-family: var(--font-label); font-size: 9px;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--na-text-secondary, rgba(232,213,163,0.65));
}

.pref-toggle-group {
  display: flex; gap: 4px;
}

.pref-opt {
  font-family: var(--font-label); font-size: 9px;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--na-text-secondary, rgba(232,213,163,0.55));
  background: rgba(201,168,76,0.06);
  border: 1px solid rgba(201,168,76,0.18);
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pref-opt:hover {
  background: rgba(201,168,76,0.14);
  color: var(--na-text-primary, #e8d5a3);
  border-color: rgba(201,168,76,0.35);
}
.pref-opt.active {
  background: rgba(201,168,76,0.22);
  color: var(--na-gold-mid, #c9a84c);
  border-color: rgba(201,168,76,0.6);
  font-weight: 700;
}

/* ─── Multi-Layer Glyph Overlay ("enamel chips") ─────────────────────────────
   Rendered as Leaflet divIcons in the glyphPane when 2+ rated layers are active.
   Each chip is an opaque score-coloured tile carrying the layer symbol, with a
   dark-inner / gold-outer double stroke for an almanac "enamel badge" feel. */
.na-glyph-icon { background: none; border: none; }
.na-glyph-cluster {
  display: flex;
  gap: 3px;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}
.na-glyph-chip {
  position: relative;
  width: 19px;
  height: 19px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* dark inner ring + gold outer ring + soft drop shadow = the enamel-badge edge */
  box-shadow:
    0 0 0 1px rgba(14,11,6,0.92),
    0 0 0 2px rgba(201,168,76,0.85),
    0 1px 3px rgba(0,0,0,0.55);
  transition: transform 140ms ease;
}
.na-glyph-sym {
  font-size: 11px;
  line-height: 1;
  /* keep emoji crisp on the coloured tile; subtle shadow lifts them off the fill */
  filter: drop-shadow(0 0 1px rgba(14,11,6,0.6));
}
.na-glyph-more {
  background: rgba(20,16,9,0.94) !important;
  color: var(--na-gold-foil, #f0d080);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
/* Colour-blind tier badge: a numeric score (1 best → 4 worst) in the chip corner,
   so the chip's score is decodable without relying on its background hue. */
.na-glyph-tier {
  position: absolute;
  right: -3px; bottom: -3px;
  min-width: 10px; height: 10px;
  padding: 0 1px;
  border-radius: 5px;
  background: rgba(14,11,6,0.95);
  color: #fff;
  font-family: var(--fm, monospace);
  font-size: 7px; font-weight: 700; line-height: 10px;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.6);
}
.na-glyph-icon:hover .na-glyph-chip { transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) {
  .na-glyph-chip { transition: none; }
  .na-glyph-icon:hover .na-glyph-chip { transform: none; }
}

/* ─── Events & Holidays markers ──────────────────────────────────────────────
   The Events & Holidays layer drops one emoji-glyph marker per country that has a
   festival or public holiday in the selected month. A red badge counts how many,
   so the map reads as a live "what's on this month" calendar. */
.na-event-divicon { background: none; border: none; }
.na-event-glyph {
  position: relative;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 34%, rgba(245,158,11,0.96), rgba(217,119,6,0.92));
  box-shadow: 0 0 0 1.5px rgba(255,255,255,0.85), 0 2px 6px rgba(0,0,0,0.45);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.na-event-glyph.has-fest {
  background: radial-gradient(circle at 50% 34%, rgba(168,85,247,0.96), rgba(124,58,237,0.92));
}
.na-event-glyph:hover { transform: translateY(-2px) scale(1.07); }
.na-event-sym { font-size: 15px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.4)); }
.na-event-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: 7px;
  background: #c62828; color: #fff;
  font-size: 9px; font-weight: 700; line-height: 14px; text-align: center;
  box-shadow: 0 0 0 1.5px rgba(255,255,255,0.9);
}
@media (prefers-reduced-motion: reduce) {
  .na-event-glyph { transition: none; }
  .na-event-glyph:hover { transform: none; }
}

/* ─── Visitors layer ─────────────────────────────────────────────────────────
   One pin per country, area proportional to the number of visits, the count inside. The fill is a
   deep amber so the white count reads at 4.5:1 or better at every size. */
.na-visit-divicon { background: none; border: none; }
.na-visit-pin {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 34%, #9A6212, #6E430A);
  box-shadow: 0 0 0 1.5px rgba(255,255,255,0.85), 0 2px 6px rgba(0,0,0,0.45);
  color: #fff; font-family: var(--fm, 'IBM Plex Mono', monospace); font-weight: 700; line-height: 1;
  cursor: pointer; transition: transform 0.12s ease;
}
.na-visit-divicon:hover .na-visit-pin, .na-visit-divicon:focus-visible .na-visit-pin { transform: scale(1.08); }
.na-visit-divicon:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 50%; }
.na-vis-scale { gap: 6px; }
.na-vis-dot {
  display: inline-block; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 50% 34%, #9A6212, #6E430A);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.7);
}
/* Region level (see NA_VISITORS_REGIONS in app.js): a rounded SQUARE in teal, so a region
   pin differs from a country pin by shape and colour, not by colour alone. White on #14777B and on
   #0B4A4D is 5.3:1 or better. */
.na-visit-pin-region {
  border-radius: 28%;
  background: radial-gradient(circle at 50% 34%, #14777B, #0B4A4D);
}
.na-visit-divicon-region:focus-visible { border-radius: 28%; }
.na-vis-dot-region {
  border-radius: 28%;
  background: radial-gradient(circle at 50% 34%, #14777B, #0B4A4D);
}
.llabel-note.na-vis-privacy,
#legend-visitors .llabel-note {
  /* The privacy note is meant to be read, so it is larger and brighter than the other legend notes. */
  display: block; margin-left: 0; white-space: normal; line-height: 1.4; letter-spacing: 0.2px;
  font-size: 9.5px; color: var(--sand); opacity: 0.92;
}
.llabel-note.na-vis-privacy { margin-top: 4px; }
[data-theme="light"] .llabel-note.na-vis-privacy,
[data-theme="light"] #legend-visitors .llabel-note { color: #2E2008; }
@media (prefers-reduced-motion: reduce) {
  .na-visit-pin { transition: none; }
  .na-visit-divicon:hover .na-visit-pin, .na-visit-divicon:focus-visible .na-visit-pin { transform: none; }
}

/* ─── Animated Trip Route Line ───────────────────────────────────────────────
   The trip planner draws an ordered journey line through the pins. A soft gold
   casing adds depth; the flowing dashed line "marches" from the first pin toward
   the last for a clear sense of travel direction. */
.na-route-casing { filter: drop-shadow(0 0 3px rgba(201,168,76,0.25)); }
.na-route-flow {
  animation: na-route-march 1.1s linear infinite;
}
@keyframes na-route-march {
  to { stroke-dashoffset: -24; }
}
@media (prefers-reduced-motion: reduce) {
  .na-route-flow { animation: none; }
}

/* ─── Enriched country dossier (facts / emergency / history / phrasebook) ───────
   Colours use the theme-aware --na-text-* / --na-gold-mid tokens so the dossier
   stays legible in BOTH the dark (default) and light themes. */
.na-sec-h {
  font-size: 7px; font-weight: 700; color: var(--na-gold-mid);
  letter-spacing: 1.8px; text-transform: uppercase;
  margin: 0 0 7px; display: flex; align-items: center; gap: 6px;
}
.na-sec-h::before {
  content: ""; flex: 0 0 14px; height: 1px;
  background: linear-gradient(90deg, var(--na-gold-mid), transparent);
}

/* Master unit toggle in the dossier header (left of the close button) */
.na-unit-master {
  position: absolute; top: 8px; right: 38px; z-index: 2001;
  height: 22px; padding: 0 8px;
  background: rgba(200,168,75,0.12);
  border: 1px solid rgba(200,168,75,0.32);
  border-radius: 5px; color: var(--na-gold-mid);
  font-family: var(--fm); font-size: 8.5px; font-weight: 700;
  letter-spacing: 0.5px; cursor: pointer; line-height: 1;
  transition: background .12s, color .12s;
}
.na-unit-master:hover { background: rgba(200,168,75,0.24); color: var(--na-text-primary); }
.na-unit-master:focus-visible { outline: 2px solid var(--na-gold-mid); outline-offset: 1px; }

/* At-a-glance fact grid */
.na-facts { margin: 2px 0 10px; }
.na-facts-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.na-fact {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 7px 8px; border-radius: 7px;
  background: rgba(200,168,75,0.06);
  border: 1px solid rgba(200,168,75,0.14);
}
.na-fact-ico {
  flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(200,168,75,0.16); font-size: 10px; line-height: 1;
}
.na-fact-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.na-fact-label {
  font-size: 6.5px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--na-text-secondary); font-weight: 700;
}
.na-fact-val {
  font-size: 9.5px; color: var(--na-text-primary); font-weight: 600;
  line-height: 1.3; word-break: break-word;
}
.na-fact-sub { color: var(--na-text-secondary); font-weight: 400; font-size: 8px; }

/* Emergency band: prominent, distinct red accent (legible on both themes) */
.na-emergency {
  display: flex; align-items: center; gap: 9px;
  margin: 2px 0 11px; padding: 8px 10px;
  background: rgba(198,40,40,0.12);
  border: 1px solid rgba(198,40,40,0.40);
  border-left: 3px solid #d32f2f; border-radius: 7px;
}
.na-emg-ico { font-size: 15px; line-height: 1; flex-shrink: 0; }
.na-emg-body { flex: 1; min-width: 0; }
.na-emg-h {
  font-size: 7px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
  color: #c62828; margin-bottom: 4px;
}
.na-emg-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.na-emg-chip {
  display: inline-flex; align-items: baseline; gap: 4px;
  padding: 2px 7px; border-radius: 11px;
  background: #c62828; border: 1px solid rgba(198,40,40,0.6);
}
.na-emg-k { font-size: 6.5px; letter-spacing: 0.5px; text-transform: uppercase; color: rgba(255,255,255,0.85); }
.na-emg-n { font-size: 11px; font-weight: 700; color: #fff; letter-spacing: 0.5px; }

/* History */
.na-history { margin: 2px 0 11px; }
.na-history-p {
  margin: 0; font-size: 9px; line-height: 1.6;
  color: var(--na-text-primary); font-weight: 400;
}

/* Phrasebook */
.na-phrasebook {
  margin: 2px 0 6px; padding: 9px 10px;
  background: rgba(200,168,75,0.06);
  border: 1px solid rgba(200,168,75,0.16); border-radius: 8px;
}
.na-ph-native { color: var(--na-text-secondary); font-weight: 400; text-transform: none; letter-spacing: 0; }
.na-ph-table { width: 100%; border-collapse: collapse; }
.na-ph-table td { padding: 4px 0; vertical-align: top; border-bottom: 1px solid rgba(200,168,75,0.12); }
.na-ph-table tr:last-child td { border-bottom: none; }
.na-ph-en { font-size: 8px; color: var(--na-text-secondary); padding-right: 10px !important; white-space: nowrap; }
.na-ph-loc { font-size: 11px; color: var(--na-text-primary); font-weight: 600; text-align: right; }
.na-ph-pron { display: block; font-size: 7.5px; color: var(--na-gold-mid); font-weight: 400; font-style: italic; margin-top: 1px; }
.na-ph-more { margin-top: 6px; }
.na-ph-more > summary {
  cursor: pointer; list-style: none; outline: none;
  font-size: 7px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--na-gold-mid); padding: 3px 0;
}
.na-ph-more > summary::-webkit-details-marker { display: none; }
.na-ph-more > summary::before { content: "▸ "; }
.na-ph-more[open] > summary::before { content: "▾ "; }
.na-ph-nums-h {
  font-size: 6.5px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--na-text-secondary); font-weight: 700; margin: 8px 0 5px;
}
.na-ph-nums { display: flex; flex-wrap: wrap; gap: 5px; }
.na-ph-num {
  font-size: 8.5px; color: var(--na-text-primary);
  padding: 2px 6px; border-radius: 5px; background: rgba(200,168,75,0.10);
}
.na-ph-num b { color: var(--na-gold-mid); margin-right: 2px; }
.na-ph-num .na-ph-pron { display: inline; font-size: 7px; margin-left: 2px; }

/* ─── Language flag picker (welcome card + Preferences) ─────────────────────── */
.na-lang-picker {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 6px 0 2px;
}
.na-lang-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; cursor: pointer;
  background: rgba(200,168,75,0.06);
  border: 1px solid rgba(200,168,75,0.22); border-radius: 9px;
  color: var(--na-text-primary); font-size: 11px; font-weight: 500;
  transition: background .15s, border-color .15s, color .15s;
}
.na-lang-opt:hover { background: rgba(200,168,75,0.16); border-color: var(--na-gold-mid); }
.na-lang-opt.active { background: rgba(200,168,75,0.22); border-color: var(--na-gold-bright); color: var(--na-gold-bright); }
.na-lang-opt:focus-visible { outline: 2px solid var(--na-gold-mid); outline-offset: 2px; }
.na-lang-flag { font-size: 16px; line-height: 1; }
.na-lang-name { white-space: nowrap; }
.na-lang-current-flag { font-size: 16px; line-height: 1; }

/* Compact flag button used in the header / welcome corner. */
.na-lang-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px; cursor: pointer;
  background: rgba(200,168,75,0.08);
  border: 1px solid rgba(200,168,75,0.3); border-radius: 8px;
  color: var(--na-text-primary); font-size: 12px;
}
.na-lang-btn:hover { background: rgba(200,168,75,0.18); }

/* (Floating language FAB removed: language lives in Preferences + welcome card.) */

/* ─── Right-to-left support (Arabic & Hebrew) ───────────────────────────────
   Document direction flips for content/text flow; the Leaflet map and its
   controls are pinned LTR so panning, zoom buttons and attribution stay sane. */
html[dir="rtl"] #map,
html[dir="rtl"] .leaflet-container,
html[dir="rtl"] .leaflet-control-container { direction: ltr; }
html[dir="rtl"] .na-ph-en { padding-right: 0 !important; padding-left: 10px !important; }
html[dir="rtl"] .na-ph-loc { text-align: left; }
html[dir="rtl"] .na-fact-label,
html[dir="rtl"] .na-sec-h { text-align: right; }
html[dir="rtl"] .na-lang-name { white-space: nowrap; }
html[dir="rtl"] .na-hint-flag-menu { left: auto; right: 50%; transform: translateX(50%); text-align: right; }
html[dir="rtl"] .na-hint-flag-menu .na-lang-opt { justify-content: flex-end; }

/* ─── Welcome card additions (flag picker + links) ──────────────────────────── */
/* Welcome card single-flag language picker: a small flag chip sitting inline
   with the How-it-works / FAQ links, opening a dropdown of every language. */
.na-hint-flagpick { position: relative; display: inline-flex; align-items: center; }
.na-hint-flag-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-width: 24px; min-height: 24px;         /* WCAG 2.5.8 target size */
  padding: 2px 5px; border-radius: 6px; cursor: pointer;
  background: none; border: none;            /* no circle: flag + native name */
  transition: transform .15s, opacity .15s;
}
.na-hint-flag-btn:hover { transform: scale(1.05); opacity: 0.85; }
.na-hint-flag-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.na-hint-flag-btn .na-lang-current-flag { font-size: 17px; line-height: 1; }
.na-hint-flag-btn .na-lang-current-name { font-size: 11px; font-weight: 600; line-height: 1; color: var(--na-gold-mid); }
.na-hint-flag-menu {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(100% + 8px); z-index: 5;
  display: flex; flex-direction: column; gap: 3px;
  max-height: 46vh; overflow-y: auto; min-width: 156px;
  padding: 7px; border-radius: 12px;
  background: rgba(16,12,5,0.98);
  border: 1px solid var(--b2);
  box-shadow: 0 12px 36px rgba(0,0,0,0.6);
  text-align: left;
}
.na-hint-flag-menu[hidden] { display: none; }
.na-hint-flag-menu .na-lang-opt { width: 100%; justify-content: flex-start; }
.hint-links { display: flex; align-items: center; gap: 8px; margin-top: 10px; justify-content: center; }
.hint-link {
  background: none; border: none; cursor: pointer; padding: 2px 4px;
  color: var(--na-gold-mid); font-size: 11px; font-weight: 600; text-decoration: underline;
  text-underline-offset: 2px; white-space: nowrap;
}
.hint-link:hover { color: var(--na-gold-bright); }
.hint-link-sep { color: var(--na-text-dim); }
/* The Privacy link sits on its own line under How it works / FAQ / language, so a long translation can never push the first row wider than the card. */
.hint-links-privacy { margin-top: 2px; }

/* ─── Preferences picker rows ───────────────────────────────────────────────── */
.pref-row-stack { flex-direction: column; align-items: stretch; gap: 6px; }
.pref-picker-wrap { width: 100%; }
.pref-curr-note { font-size: 9px; color: var(--na-text-dim); margin-top: 2px; }
/* Privacy row: the visit-count notice and the visitor's opt-out. Body-size text, not the 9px label
   size, because this is a notice people are meant to read. */
.pref-privacy-note {
  margin: 0; max-width: 72ch;
  font-family: var(--font-data); font-size: 13px; line-height: 1.5;
  font-variant: normal; text-transform: none; letter-spacing: 0;
  color: var(--na-text-secondary, rgba(232,213,163,0.75));
}
.pref-privacy-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.pref-privacy-note[hidden] { display: none; }

/* ─── Update banner (na-update.js) ───────────────────────────────────────────────
   Shown when a newer release exists and a reload would discard something the user typed, or the app
   has been in use. Above the toast line, clear of the bottom navigation on phones. */
#na-update-bar {
  position: fixed;
  left: 8px; right: 8px;
  bottom: calc(var(--bottom-nav-h) + var(--nav-safe-bottom) + 64px);
  z-index: 3001;
  display: flex; justify-content: center;
  pointer-events: none;
}
/* From 768 px the navigation is a floating pill (bottom 18px, about 60px high): stay clear of it. */
@media (min-width: 768px) { #na-update-bar { bottom: 96px; } }
.na-update-banner {
  display: flex; align-items: center; gap: var(--sp-2);
  max-width: 100%;
  background: var(--na-glass-navy);
  backdrop-filter: blur(var(--na-glass-blur));
  -webkit-backdrop-filter: blur(var(--na-glass-blur));
  border: var(--na-border-glass);
  border-left: 3px solid var(--na-gold-mid);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  border-radius: var(--na-border-radius);
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4);
  font-family: var(--font-label); font-size: var(--ts-small); letter-spacing: var(--track-wide);
  color: var(--na-text-primary);
  pointer-events: auto;
  animation: na-toast-in var(--dur-mid) var(--ease-panel) forwards;
}
.na-update-msg { min-width: 0; }
.na-update-btn, .na-update-later {
  min-width: 44px; min-height: 44px; padding: 0 var(--sp-4);
  border-radius: var(--na-border-radius);
  font: inherit; letter-spacing: inherit; cursor: pointer;
}
.na-update-btn { background: var(--na-gold-mid); border: 1px solid var(--na-gold-mid); color: #1B2A4A; font-weight: 700; }
.na-update-later { background: none; border: 1px solid rgba(232,213,163,0.35); color: var(--na-text-secondary, rgba(232,213,163,0.75)); }
.na-update-btn:focus-visible, .na-update-later:focus-visible { outline: 2px solid var(--na-gold-bright); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .na-update-banner { animation: none; } }

/* Release line at the foot of Preferences (na-update.js): "v65 · nomadicalmanac.com". */
.pref-version {
  margin: 14px 0 0; padding-bottom: 6px; text-align: center;
  font-family: var(--font-data); font-size: 12px; letter-spacing: 0.04em;
  color: var(--na-text-secondary, rgba(232,213,163,0.75)); opacity: 0.8;
  -webkit-user-select: text; user-select: text;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
/* The last line of the sheet clears the iPhone home indicator (less when the window already ends above it). */
.pref-version:last-child { padding-bottom: calc(14px + max(env(safe-area-inset-bottom, 0px) - var(--na-vp-short, 0px), 0px)); }
.pref-version:focus-visible { outline: 2px solid var(--na-gold-bright); outline-offset: 2px; }
.pref-version:empty { display: none; }
/* Tapping the release line shows what the phone reports about its screen (na-update.js). */
.pref-version-detail { margin-top: 0; font-size: 11px; line-height: 1.5; letter-spacing: 0; cursor: auto; }
/* The ten-second full-height try (na-viewport.js): a bar under the status bar that is always in view, and the
   button in the readout that starts it. */
#na-vp-bar { position: fixed; left: 8px; right: 8px; top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 10000; }
.na-vp-msg { flex: 1; min-width: 0; }
.na-vp-test-btn {
  display: block; margin: 10px auto 0; min-height: 44px; padding: 0 var(--sp-4);
  background: none; border: 1px solid var(--na-gold-mid); border-radius: var(--na-border-radius);
  color: var(--na-gold-mid); font: inherit; font-size: 12px; letter-spacing: 0.04em; cursor: pointer;
}
.na-vp-test-btn:focus-visible { outline: 2px solid var(--na-gold-bright); outline-offset: 2px; }
.na-vp-test-btn:last-child { margin-bottom: calc(14px + max(env(safe-area-inset-bottom, 0px) - var(--na-vp-short, 0px), 0px)); }
.na-curr-picker { display: flex; flex-wrap: wrap; gap: 5px; max-height: 168px; overflow-y: auto; padding: 2px; }
.na-curr-opt {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  padding: 5px 8px; border-radius: 8px; font-size: 10.5px;
  background: rgba(200,168,75,0.06); border: 1px solid rgba(200,168,75,0.22);
  color: var(--na-text-primary); transition: background .15s, border-color .15s, color .15s;
}
.na-curr-opt:hover { background: rgba(200,168,75,0.16); border-color: var(--na-gold-mid); }
.na-curr-opt.active { background: rgba(200,168,75,0.22); border-color: var(--na-gold-bright); color: var(--na-gold-bright); }
.na-curr-opt:focus-visible { outline: 2px solid var(--na-gold-mid); outline-offset: 2px; }
.na-curr-code { font-weight: 700; letter-spacing: 0.4px; }
.na-curr-sym { color: var(--na-text-secondary); }
.na-curr-opt.active .na-curr-sym { color: var(--na-gold-bright); }

/* ─── Help modal: written tutorial + FAQ ────────────────────────────────────── */
#na-help-overlay { position: fixed; inset: 0; z-index: 4000; display: flex; align-items: center; justify-content: center; }
#na-help-backdrop { position: absolute; inset: 0; background: rgba(4,9,18,0.66); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
#na-help-panel {
  position: relative; z-index: 1; width: min(560px, 92vw); max-height: 86vh; overflow-y: auto;
  padding: 22px 24px 26px; border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
}
#na-help-close {
  position: absolute; top: 12px; right: 14px; width: 30px; height: 30px;
  background: none; border: none; cursor: pointer; font-size: 24px; line-height: 1;
  color: var(--na-text-secondary);
}
#na-help-close:hover { color: var(--na-gold-bright); }
#na-help-close:focus-visible { outline: 2px solid var(--na-gold-mid); outline-offset: 2px; border-radius: 6px; }
.na-help-title { margin: 0 0 8px; font-size: 17px; color: var(--na-gold-bright); letter-spacing: 0.4px; }
.na-help-body { margin-top: 12px; }
.na-help-step { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(200,168,75,0.12); }
.na-help-step:last-of-type { border-bottom: none; }
.na-help-step-n {
  flex: 0 0 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(200,168,75,0.16); color: var(--na-gold-bright);
  font-size: 12px; font-weight: 700;
}
.na-help-step-c h3 { margin: 2px 0 3px; font-size: 13px; color: var(--na-text-primary); }
.na-help-step-c p { margin: 0; font-size: 12px; line-height: 1.55; color: var(--na-text-secondary); }
.na-help-cta { margin-top: 16px; text-align: center; }
.na-faq-item { padding: 8px 0; border-bottom: 1px solid rgba(200,168,75,0.12); }
.na-faq-item:last-of-type { border-bottom: none; }
.na-faq-item > summary {
  cursor: pointer; list-style: none; outline: none;
  font-size: 13px; font-weight: 600; color: var(--na-text-primary); padding: 3px 0;
}
.na-faq-item > summary::-webkit-details-marker { display: none; }
.na-faq-item > summary::before { content: "+ "; color: var(--na-gold-mid); font-weight: 700; }
.na-faq-item[open] > summary::before { content: "– "; }
.na-faq-item > p { margin: 6px 0 4px; font-size: 12px; line-height: 1.6; color: var(--na-text-secondary); }
.na-faq-item > summary:focus-visible { outline: 2px solid var(--na-gold-mid); outline-offset: 2px; border-radius: 4px; }

/* ─── Dossier: additional traveler content ──────────────────────────────────── */
.na-extra-wrap { margin: 2px 0 10px; }
.na-extra-tap {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 8px 10px; margin-bottom: 8px; border-radius: 8px;
  background: rgba(200,168,75,0.06); border: 1px solid rgba(200,168,75,0.16);
}
.na-extra-ico { font-size: 16px; line-height: 1.2; }
.na-extra-tc { flex: 1; }
.na-extra-h {
  font-size: 7px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--na-text-secondary); font-weight: 700; margin-bottom: 3px;
}
.na-extra-p { font-size: 9px; line-height: 1.55; color: var(--na-text-primary); }
.tw-badge {
  display: inline-block; margin-left: 4px; padding: 1px 5px; border-radius: 8px;
  font-size: 7px; font-weight: 700; letter-spacing: 0.4px; text-transform: capitalize;
  color: #fff;
}
.tw-safe .tw-badge    { background: #2e7d32; }
.tw-caution .tw-badge { background: #b8860b; }
.tw-unsafe .tw-badge  { background: #c62828; }
.na-extra-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.na-extra-block {
  padding: 7px 9px; border-radius: 8px;
  background: rgba(200,168,75,0.05); border: 1px solid rgba(200,168,75,0.13);
}
.na-extra-block:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.na-extra-ul { margin: 0; padding-left: 14px; }
.na-extra-ul li { font-size: 9px; line-height: 1.5; color: var(--na-text-primary); margin-bottom: 2px; }
@media (max-width: 420px) { .na-extra-grid { grid-template-columns: 1fr; } }

/* ─── Dossier header action cluster (compare · wishlist · add-to-trip) ───────── */
.tt-head-actions { display: flex; justify-content: flex-end; gap: 5px; margin-top: 7px; }
.tt-hact {
  width: 30px; height: 28px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1;
  background: rgba(200,168,75,0.08); border: 1px solid rgba(200,168,75,0.28);
  border-radius: 7px; color: var(--na-text-secondary);
  transition: background .14s, border-color .14s, color .14s, transform .14s;
}
.tt-hact:hover { background: rgba(200,168,75,0.18); border-color: var(--na-gold-mid); color: var(--na-gold-bright); transform: translateY(-1px); }
.tt-hact:focus-visible { outline: 2px solid var(--na-gold-mid); outline-offset: 2px; }
.tt-hact.tt-pin-btn.pinned { color: var(--na-gold-bright); border-color: var(--na-gold-bright); background: rgba(200,168,75,0.22); }
.tt-hact.tt-wish.on { color: #ec4899; border-color: rgba(236,72,153,0.6); background: rgba(236,72,153,0.12); }

/* ─── Collapsible country-info sections ─────────────────────────────────────── */
.na-dsec { border-bottom: 1px solid rgba(200,168,75,0.10); }
.na-dsec:last-of-type { border-bottom: none; }
.na-dsec-h {
  list-style: none; cursor: pointer; outline: none;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 2px; user-select: none;
}
.na-dsec-h::-webkit-details-marker { display: none; }
.na-dsec-t {
  font-size: 8px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--na-gold-mid);
}
.na-dsec-x { color: var(--na-text-secondary); transition: transform .18s ease; flex-shrink: 0; }
.na-dsec[open] > .na-dsec-h .na-dsec-x { transform: rotate(180deg); }
.na-dsec-h:hover .na-dsec-t { color: var(--na-gold-bright); }
.na-dsec-h:focus-visible { outline: 2px solid var(--na-gold-mid); outline-offset: -2px; border-radius: 4px; }
.na-dsec-b { padding: 0 2px 10px; }
.na-dsec-emg .na-dsec-t { color: #ef5350; }
.na-ph-lang { font-size: 9px; color: var(--na-text-secondary); margin-bottom: 6px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .na-dsec-x { transition: none; } }

/* ─── iOS-style window treatment: soft large radius + layered shadow ─────────── */
:root {
  --na-win-radius: 20px;
  --na-win-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 3px 12px rgba(0,0,0,0.34);
}
#onboarding-hint,
#tt,
#na-help-panel,
#compare-panel,
#trip-panel,
#na-search-panel,
#na-prefs-panel,
#na-more-panel,
#na-sheet-panel {
  border-radius: var(--na-win-radius) !important;
  box-shadow: var(--na-win-shadow) !important;
}
/* Menus and dropdowns: slightly tighter radius, same soft shadow. */
.cat-dd,
#explore-dd,
.na-curr-picker {
  border-radius: 14px !important;
  box-shadow: var(--na-win-shadow) !important;
}
/* Mobile bottom-sheets keep their top-only rounding (flush to the screen edge). */
@media (max-width: 767px) {
  #na-prefs-panel, #na-more-panel, #na-sheet-panel { border-radius: 22px 22px 0 0 !important; }
}

/* ─── Mobile "More" sheet: reuses the Preferences sheet layout ──────────── */
#na-more-sheet {
  position: fixed; inset: 0; z-index: 2200;
  display: flex; align-items: flex-end;
}
#na-more-sheet[hidden] { display: none; }
#na-more-overlay {
  position: absolute; inset: 0;
  background: rgba(5,8,20,0.72); -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px);
}
#na-more-panel {
  position: relative; z-index: 1;
  width: 100%; max-height: 85vh; overflow-y: auto;
  background: var(--na-glass-navy, rgba(8,15,40,0.97));
  border: 1px solid rgba(201,168,76,0.18);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  padding: var(--sp-3) var(--sp-5) var(--sp-6);
}
#na-more-handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: rgba(201,168,76,0.35);
  margin: 0 auto var(--sp-3);
}
#na-more-title {
  font-family: var(--font-label); font-size: 11px;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--na-gold-mid, #c9a84c);
  text-align: center; margin-bottom: var(--sp-2);
}
#na-more-body { padding-top: var(--sp-3); }
#na-more-passport select {
  width: 100%; min-height: 44px;
  font-family: var(--font-label); font-size: 12px;
  color: var(--na-text-primary, #e8d5a3);
  background: rgba(201,168,76,0.06);
  border: 1px solid rgba(201,168,76,0.22);
  border-radius: 8px; padding: 6px 10px;
}
.na-more-action {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: 48px;
  margin-top: 10px; padding: 12px 14px;
  font-family: var(--font-label); font-size: 11px;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--na-text-primary, #e8d5a3);
  background: rgba(201,168,76,0.06);
  border: 1px solid rgba(201,168,76,0.20);
  border-radius: 10px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.na-more-action::after { content: '›'; color: var(--na-gold-mid, #c9a84c); font-size: 16px; }
.na-more-action:hover { background: rgba(201,168,76,0.14); border-color: rgba(201,168,76,0.4); }
.na-more-action:focus-visible { outline: 2px solid var(--na-gold-mid); outline-offset: 2px; }

/* ─── Web top bar mirrors mobile: the cluttered desktop control strip is hidden,
   leaving the clean persistent header (#na-header). Month, nationality and layer
   controls remain reachable via the left sidebar and the bottom menu. ───────── */
@media (min-width: 768px) {
  #topbar { display: none !important; }
}

/* ── UX-audit fix: meet the 44px minimum touch target on dense mobile chrome ── */
@media (max-width: 767px) {
  .mb, #btn-year, .cat-btn, .lb { min-height: 44px; }
  #na-tour-pop .tour-btn, #onboarding-hint .hint-btn { min-height: 44px; }
}


/* ── Country-guide button inside province/county tooltips ──────────────────── */
.tt-open-country {
  display: block;
  width: 100%;
  margin: 7px 0 3px;
  padding: 6px 9px;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 8px;
  color: var(--gold, #c9a84c);
  font-family: var(--fm, 'IBM Plex Mono', monospace);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.tt-open-country:hover,
.tt-open-country:focus-visible {
  background: rgba(201, 168, 76, 0.18);
  border-color: rgba(201, 168, 76, 0.6);
}
[data-theme="light"] .tt-open-country {
  color: #6b5212;
  border-color: rgba(107, 82, 18, 0.4);
  background: rgba(107, 82, 18, 0.06);
}
[data-theme="light"] .tt-open-country:hover,
[data-theme="light"] .tt-open-country:focus-visible {
  background: rgba(107, 82, 18, 0.14);
}

/* Hover card (R3): desktop pointer only, never intercepts the pointer, hidden from assistive tech. */
#na-hover-card {
  position: fixed; z-index: 1200; max-width: 280px; padding: 8px 10px; pointer-events: none;
  background: var(--panel); color: var(--na-text-primary); border: 1px solid var(--b2); border-radius: 3px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5); font-family: var(--font-data); font-size: 12px; line-height: 1.35;
}
#na-hover-card[hidden] { display: none; }
#na-hover-card .nhc-head { font-family: var(--font-label); font-size: 12px; letter-spacing: 0.04em; color: var(--na-gold-bright); margin-bottom: 5px; }
#na-hover-card .nhc-row { display: flex; gap: 7px; align-items: flex-start; margin-top: 4px; }
#na-hover-card .nhc-sw { flex: none; width: 10px; height: 10px; margin-top: 3px; border: 1px solid rgba(255,255,255,0.35); }
#na-hover-card .nhc-line { display: block; }
#na-hover-card .nhc-src { display: block; font-size: 10px; color: var(--na-text-secondary); }
[data-theme="light"] #na-hover-card { background: var(--na-parchment); color: #1A1008; }
[data-theme="light"] #na-hover-card .nhc-head { color: #5a3a08; }
[data-theme="light"] #na-hover-card .nhc-src { color: #4a3a1a; }
@media (hover: none), (pointer: coarse) { #na-hover-card { display: none !important; } }

/* Tipping: 7-tier strip and collapsible sections (R6). */
.tt-tip7 { margin: 6px 0; }
.tt-tip7-row { display: flex; flex-wrap: wrap; gap: 3px; }
.tt-tip7-chip { flex: 1 1 auto; min-width: 0; text-align: center; padding: 3px 4px; font-size: 8px; border: 1px solid rgba(201,168,76,0.25); border-radius: 3px; opacity: 0.55; }
.tt-tip7-chip.on { opacity: 1; background: rgba(201,168,76,0.22); border-color: var(--gold); font-weight: 700; }
.tt-tip7-cur { margin-top: 4px; font-size: 9px; color: var(--gold); }
.tt-tip7-src { margin-top: 3px; font-size: 7.5px; color: var(--dim); line-height: 1.4; }
.tt-tip-sec { margin-top: 6px; border-top: 1px solid rgba(201,168,76,0.12); }
.tt-tip-sec > summary { cursor: pointer; padding: 6px 0; min-height: 24px; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.tt-tip-donts { margin: 2px 0 2px 16px; padding: 0; font-size: 9px; line-height: 1.5; }
/* The rich tipping panel had no styles for these: its cells rendered as unstyled large text. The icon
   field holds an icon NAME, not a glyph, so it stays hidden (the label carries the meaning). */
.tt-tip-header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 10px; }
.tt-tip-label { color: var(--na-gold-bright); font-weight: 700; }
.tt-tip-dots { letter-spacing: 2px; color: var(--gold); }
.tt-tip-industry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin: 4px 0; }
.tt-tip-industry-cell { display: flex; flex-direction: column; font-size: 9px; line-height: 1.35; padding: 2px 0; }
.tt-tip-ind-icon { display: none; }
.tt-tip-ind-name { color: rgba(232,213,163,0.65); font-size: 8px; }
.tt-tip-ind-val { color: var(--sand); font-weight: 700; }
.tt-tip-sc-notice { display: flex; gap: 6px; align-items: baseline; margin: 4px 0; font-size: 8.5px; color: #c9a84c; }
.tt-tip-quicktip { margin: 4px 0; font-size: 9px; font-style: italic; line-height: 1.45; color: var(--sand); }
