/* =============================================================================
   4 STANS — design system (light)
   -----------------------------------------------------------------------------
   Paper ground, white cards, ink text. Elevation comes from shadow rather than
   from a lighter surface, which is the part that actually changes when a dark
   UI is brought into the light.

   Palette is pulled from the subject rather than picked off a shelf: brass for
   the interface accent, and the four countries carry steppe blue, Kyrgyz
   orange, Badakhshan garnet and Timurid green.
   ========================================================================== */

:root {
  /* surfaces */
  --paper:         #F2F4F7;
  --paper-2:       #E9ECF1;
  --card:          #FFFFFF;
  --fill-1:        rgba(17,22,32,.035);
  --fill-2:        rgba(17,22,32,.062);
  --line:          rgba(17,22,32,.11);
  --line-2:        rgba(17,22,32,.075);

  /* ink */
  --fg:            #111620;
  --fg-2:          #4E5968;
  --fg-3:          #646F7D;   /* 5.1:1 on white, 4.6:1 on paper — AA at any size */
  --fg-4:          #78838F;   /* 3.9:1 — decorative only, never sole carrier of information */

  /* accents */
  --brass:         #916009;
  --brass-soft:    #F5EBD6;
  --teal:          #0B857E;
  --red:           #C4382B;
  --amber:         #8F5E0A;
  --amber-soft:    #FBF0DC;
  --red-soft:      #FBE9E7;

  /* country hues */
  /* dark enough to pass 4.5:1 as chip text on white; also in data.js countries{} */
  --kz:            #0A74B2;
  --kg:            #C34B23;
  --tj:            #AF3A50;
  --uz:            #0A7D5D;

  /* elevation */
  --sh-1: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.05);
  --sh-2: 0 4px 14px rgba(16,24,40,.07), 0 1px 3px rgba(16,24,40,.05);
  --sh-3: 0 14px 38px rgba(16,24,40,.14), 0 2px 6px rgba(16,24,40,.06);

  /* geometry */
  --r-lg:          24px;
  --r-md:          16px;
  --r-sm:          11px;
  --r-pill:        999px;

  --pad:           18px;
  --tab-h:         calc(58px + env(safe-area-inset-bottom, 0px));
  --head-h:        54px;

  --ease:          cubic-bezier(.22,.9,.28,1);
  --spring:        cubic-bezier(.16,1.06,.28,1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Segoe UI Variable", "Segoe UI", Roboto, Inter, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "Roboto Mono", Menlo, monospace;
}

/* ---------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin:0; padding:0; }
/* pans only — the browser must never claim a pinch or double-tap for page
   zoom; the two maps run their own pinch handling on raw touches */
html { touch-action: pan-x pan-y; }

/* This app commits to a single light world on purpose. Pin the ground and the
   UA colour scheme so a host page's dark theme can't show through behind it. */
html {
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
  color-scheme: light;
}

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
  min-height: 100dvh;
}

button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { margin: 0; font-weight: 700; letter-spacing: -.022em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

::-webkit-scrollbar { width: 0; height: 0; }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 4px; }

/* a very quiet warm wash so the paper doesn't read as flat grey */
body::before {
  content:''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 520px at 82% -10%, rgba(154,103,16,.07), transparent 62%),
    radial-gradient(760px 460px at 4% 2%, rgba(11,127,196,.05), transparent 60%);
}

/* -------------------------------------------------------------- typography */
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--fg-3);
}
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.mono { font-family: var(--mono); }

/* ------------------------------------------------------------------ shell */
#app { position: relative; z-index: 1; padding-bottom: var(--tab-h); }

.view { display: none; animation: viewIn .34s var(--ease); }
.view.on { display: block; }
@keyframes viewIn { from { opacity:0; transform: translateY(7px);} to { opacity:1; transform:none; } }

.wrap { max-width: 620px; margin: 0 auto; padding: 0 var(--pad); }

/* ----------------------------------------------------------------- header */
.head {
  position: sticky; top: 0; z-index: 40;
  height: var(--head-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 var(--pad);
  background: rgba(242,244,247,.82);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid var(--line-2);
}
.head-title { font-size: 17px; font-weight: 700; letter-spacing:-.02em; }
.head-sub { font-size: 12px; color: var(--fg-3); font-weight: 500; }
.head-spacer { flex: 1; }

.head-btn {
  display:flex; align-items:center; gap:6px;
  height: 32px; padding: 0 12px; border-radius: var(--r-pill);
  background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  font-size: 13px; font-weight: 650; letter-spacing: -.01em;
  white-space: nowrap;
  transition: transform .16s var(--ease), background .16s;
}
/* SE-class screens: the date button, countdown and Day pill can't all fit —
   drop the countdown sub-line rather than let the header wrap to two rows */
@media (max-width: 359px) { .head-sub { display: none; } }
.head-btn:active { transform: scale(.95); }
.head-btn.accent { background: var(--fg); color: #fff; border-color: transparent; }
.head-btn[disabled] { opacity: .32; pointer-events: none; }

/* ------------------------------------------------------------ bottom tabs */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: var(--tab-h);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--line-2);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--fg-3); font-size: 10px; font-weight: 650; letter-spacing: .015em;
  transition: color .18s var(--ease);
}
/* phone-first, but don't let three tabs stretch across a laptop */
@media (min-width: 700px) {
  .tabs { grid-template-columns: repeat(3, 120px); justify-content: center; }
}
.tab svg { width: 22px; height: 22px; stroke-width: 1.9; }
.tab.on { color: var(--brass); }
.tab:active svg { transform: scale(.9); transition: transform .12s; }

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  overflow: hidden;
}
.card-pad { padding: var(--pad); }

.sec { margin: 26px 0 10px; display:flex; align-items:baseline; gap:8px; }
.sec h2 { font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--fg-3); }
.sec .cnt { font-size: 12px; color: var(--fg-4); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------- pills */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--fill-1); border: 1px solid var(--line-2);
  font-size: 11.5px; font-weight: 650; letter-spacing: .01em; color: var(--fg-2);
  white-space: nowrap;
}
.pill .num { color: var(--fg); }
.pill.hot   { background: var(--red-soft);   border-color: rgba(196,56,43,.22);  color: #A32C21; }
.pill.warn  { background: var(--amber-soft); border-color: rgba(169,112,13,.24); color: #8A5B0B; }
.pill.gold  { background: var(--brass-soft); border-color: rgba(154,103,16,.24); color: var(--brass); }
.pill.teal  { background: #DFF2F0;           border-color: rgba(11,133,126,.22); color: #076B65; }
.pill.ghost { background: transparent; }

.badge-src {
  display:inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; padding: 2px 6px; border-radius: 5px;
  background: var(--amber-soft); color: #8A5B0B; border: 1px solid rgba(169,112,13,.22);
  vertical-align: middle;
}

/* ================================================================= DAY DECK */
/* Height is set in JS to the active slide (fitDeckHeight). Without that, a
   horizontal flex row is always as tall as the tallest day, so short days
   leave a huge empty gap under the card. overflow-y:hidden clips inactive
   tall slides so they don't re-expand the page. */
.deck-scroll {
  display: flex; align-items: flex-start; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; gap: 0;
  padding-bottom: 4px;
  /* smooth when switching short ↔ tall days */
  transition: height .28s var(--ease);
}
.deck-slide {
  flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always;
  min-width: 0; padding: 0 var(--pad) 12px;
  /* measure natural height even while the parent is height-locked */
  align-self: flex-start;
}
@media (min-width: 700px) {
  .deck-slide { padding: 0 calc((100% - 620px) / 2 + var(--pad)) 12px; }
}

/* --- hero ---------------------------------------------------------------- */
/* The generated art reads as a photograph, so the hero keeps a dark scrim and
   white type regardless of the surrounding light UI — exactly how a photo card
   behaves. */
.hero { position: relative; aspect-ratio: 16/9; background: #DDE3EA; }
.hero svg, .hero img { position:absolute; inset:0; width: 100%; height: 100%; display: block; object-fit: cover; }
.hero img { opacity: 0; transition: opacity .55s var(--ease); }
.hero img.ready { opacity: 1; }
.hero-veil {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,14,20,.86) 0%, rgba(10,14,20,.34) 42%, transparent 72%);
}
.hero-tag { position: absolute; left: 16px; top: 14px; display: flex; gap: 6px; align-items: center; }
.hero-day {
  font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 7px;
  background: rgba(255,255,255,.92); color: #111620;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.hero-flag {
  font-size: 11px; font-weight: 800; letter-spacing: .09em;
  padding: 4px 9px; border-radius: 7px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.hero-foot { position: absolute; left: 16px; right: 16px; bottom: 13px; color: #fff; }
.hero-date { font-size: 12px; font-weight: 650; color: rgba(255,255,255,.82); letter-spacing: .01em; }
.hero-h { font-size: 25px; font-weight: 800; letter-spacing: -.032em; line-height: 1.12; margin-top: 2px;
          text-shadow: 0 1px 12px rgba(0,0,0,.4); }

/* --- route strip --------------------------------------------------------- */
.leg { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 17px var(--pad) 4px; }
.leg-end { min-width: 0; }
.leg-end.r { text-align: right; }
.leg-place { font-size: 19px; font-weight: 750; letter-spacing: -.028em; line-height: 1.16;
             overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leg-alt { font-size: 11.5px; font-weight: 600; color: var(--fg-3); margin-top: 2px; font-variant-numeric: tabular-nums; }
.leg-mid { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--fg-4); }
.leg-mid .dist { font-size: 11px; font-weight: 700; color: var(--fg-2); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.leg-arrow { width: 46px; height: 8px; }

/* --- elevation profile --------------------------------------------------- */
.prof svg { width: 100%; height: 62px; display: block; overflow: visible; }
.prof-legend { display: flex; justify-content: space-between; margin-top: 5px; font-size: 10.5px; color: var(--fg-4); font-weight: 600; }

/* --- per-day route sketch ------------------------------------------------- */
/* a button since it opens the Map tab — width pinned because buttons shrink-wrap */
.rmap { display: block; width: 100%; background: var(--fill-1); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 6px; }
.rmap:active { transform: scale(.985); }
.rmap svg { display: block; width: 100%; height: auto; clip-path: inset(0 round 11px); }
/* halo keeps the labels legible once the terrain background paints in */
.rmap .rm-lab { fill: var(--fg-3); font-size: 9px; font-weight: 600;
                paint-order: stroke; stroke: rgba(255,255,255,.9); stroke-width: 2.5px; stroke-linejoin: round; }
.rmap .rm-lab.end { fill: var(--fg); font-weight: 700; }

/* --- body ---------------------------------------------------------------- */
.d-body { padding: 14px var(--pad) var(--pad); }
.d-summary { font-size: 15px; line-height: 1.62; color: var(--fg-2); }

.block { margin-top: 22px; }
.block-h {
  display: flex; align-items: center; gap: 7px; margin-bottom: 10px;
  font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3);
}
.block-h::after { content:''; flex:1; height:1px; background: var(--line-2); }

.hl { padding: 13px 14px; border-radius: var(--r-md); background: var(--fill-1); border: 1px solid var(--line-2); }
.hl + .hl { margin-top: 8px; }
.hl-t { font-size: 14.5px; font-weight: 700; letter-spacing: -.018em; }
.hl-d { font-size: 13.5px; line-height: 1.6; color: var(--fg-2); margin-top: 4px; }

.bullets li { position: relative; padding-left: 20px; font-size: 13.5px; line-height: 1.6; color: var(--fg-2); }
.bullets li + li { margin-top: 9px; }
.bullets li::before {
  content: ''; position: absolute; left: 4px; top: 8px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--fg-4);
}
.bullets.tip li::before { background: var(--amber); }

.food-row { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.food-row:last-child { border-bottom: 0; }
.food-dot { flex: 0 0 5px; height: 5px; margin-top: 7px; border-radius: 50%; background: var(--teal); }
.food-n { font-size: 14px; font-weight: 700; letter-spacing: -.015em; }
.food-d { font-size: 13px; line-height: 1.55; color: var(--fg-2); margin-top: 2px; }

/* --- weather (Apple Weather–style: glyph + big temp + H/L) ---------------- */
.wx { padding: 4px 0 2px; }
.wx-hero {
  display: flex; align-items: center; gap: 16px;
}
.wx-glyph {
  flex: 0 0 auto;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  color: var(--fg-2);
}
.wx-glyph svg { width: 52px; height: 52px; stroke-width: 1.35; }
/* light sky colouring — no boxes, just the glyph */
.wx-sun    { color: #E0A21A; }
.wx-partly { color: #8A97A8; }
.wx-cloud  { color: #7A8696; }
.wx-rain   { color: #3B7CC4; }
.wx-storm  { color: #6B5B9A; }
.wx-wind   { color: #4A8F85; }
.wx-cold   { color: #5B8FBF; }
.wx-now {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.wx-t {
  font-size: 52px; font-weight: 300; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums; line-height: 1; color: var(--fg);
}
.wx-c {
  font-size: 15px; line-height: 1.4; color: var(--fg-2); font-weight: 500;
  margin-top: 2px;
}
.wx-meta {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 14px;
  margin-top: 12px;
  font-size: 14px; font-weight: 550; color: var(--fg-3);
}
.wx-meta b {
  font-weight: 700; color: var(--fg); letter-spacing: -.02em;
}
.wx-src {
  font-size: 12px; color: var(--fg-4); font-weight: 600;
  margin-left: auto;
}

/* --- stay / hotel (flat row, matches list sections) ---------------------- */
.stay {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 0; text-decoration: none; color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.stay:active .stay-n { color: var(--brass); }
.stay-ico {
  flex: 0 0 36px; height: 36px; border-radius: 10px;
  background: var(--brass-soft); color: var(--brass);
  display: grid; place-items: center;
}
.stay-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.stay-n {
  font-size: 15px; font-weight: 700; letter-spacing: -.018em;
  transition: color .15s var(--ease);
}
.stay-c { font-size: 13px; color: var(--fg-3); font-weight: 550; }
.stay-go { flex: 0 0 auto; color: var(--fg-4); display: grid; place-items: center; }

/* --- alert --------------------------------------------------------------- */
.alert {
  display: flex; gap: 10px; padding: 12px 13px; border-radius: var(--r-md);
  background: var(--amber-soft); border: 1px solid rgba(169,112,13,.24);
}
.alert.red { background: var(--red-soft); border-color: rgba(196,56,43,.24); }
.alert-i { flex: 0 0 auto; color: var(--amber); margin-top: 1px; }
.alert.red .alert-i { color: var(--red); }
.alert-t { font-size: 13px; font-weight: 700; letter-spacing: -.012em; }
.alert-d { font-size: 12.5px; line-height: 1.55; color: var(--fg-2); margin-top: 2px; }

/* --- deck nav ------------------------------------------------------------ */
.deck-nav { display: flex; align-items: center; gap: 10px; padding: 0 var(--pad) 8px; }
.nav-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--sh-1);
  display: grid; place-items: center; color: var(--fg-2);
  transition: transform .16s var(--ease), background .16s;
}
.nav-btn:active { transform: scale(.9); background: var(--paper-2); }
.nav-btn[disabled] { opacity: .3; pointer-events: none; }

.dots { flex: 1; display: flex; gap: 4px; justify-content: center; align-items: center; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(17,22,32,.16); transition: all .28s var(--spring); }
.dot.on { width: 18px; border-radius: 3px; background: var(--brass); }
.dot.past { background: rgba(17,22,32,.3); }

/* ============================================================== TIMELINE */
.tl-day {
  display: grid; grid-template-columns: 52px 1fr; gap: 12px;
  padding: 12px 0; position: relative; width: 100%; text-align: left;
  transition: opacity .2s;
}
.tl-day:active { opacity: .6; }
.tl-l { position: relative; }
.tl-dnum { font-size: 10px; font-weight: 750; letter-spacing: .08em; color: var(--fg-4); text-transform: uppercase; }
.tl-date { font-size: 15px; font-weight: 750; letter-spacing: -.025em; margin-top: 1px; }
.tl-dow { font-size: 10.5px; font-weight: 650; color: var(--fg-3); text-transform: uppercase; letter-spacing: .06em; }

.tl-r { position: relative; padding-left: 20px; min-width: 0; }
.tl-r::before {
  content:''; position: absolute; left: 4px; top: 20px; bottom: -12px; width: 2px;
  background: var(--line); border-radius: 2px;
}
.tl-day:last-child .tl-r::before { display: none; }
.tl-node {
  position: absolute; left: 0; top: 6px; width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--paper); background: var(--fg-4); z-index: 1;
}
.tl-t { font-size: 15px; font-weight: 700; letter-spacing: -.022em; line-height: 1.3; }
.tl-s { font-size: 12px; color: var(--fg-3); margin-top: 3px; font-weight: 550; }
.tl-pills { margin-top: 7px; }

.tl-day.today .tl-t { color: var(--brass); }
.tl-day.today .tl-node { background: var(--brass); box-shadow: 0 0 0 4px rgba(154,103,16,.16); }
.tl-day.past { opacity: .5; }

.tl-month {
  font-size: 11px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase;
  color: var(--fg-4); padding: 16px 0 4px;
}

/* ================================================================== MAP */
.map-stage {
  position: relative; width: 100%; height: calc(100dvh - var(--head-h) - var(--tab-h));
  background: #EDF1F4;
  overflow: hidden; touch-action: none; cursor: grab;
}
.map-stage:active { cursor: grabbing; }
.map-stage svg { width: 100%; height: 100%; display: block; }
.map-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

#leafMap { width: 100%; height: calc(100dvh - var(--head-h) - var(--tab-h)); background: #EAEEF2; }
.leaflet-container { font: inherit; background: #EAEEF2; }
.leaflet-control-attribution {
  background: rgba(255,255,255,.78) !important; color: var(--fg-3) !important;
  font-size: 10px !important; padding: 1px 6px !important;
}
.leaflet-control-attribution a { color: var(--fg-2) !important; }
.leaflet-bar { border: 0 !important; box-shadow: var(--sh-2) !important; }
/* route-stop labels on the tiled map: the basemap names the big cities, these
   name the ones the trip actually turns on */
.leaflet-tooltip.lm-tip {
  background: rgba(255,255,255,.94); border: 1px solid var(--line-2);
  border-radius: 6px; box-shadow: var(--sh-1);
  color: var(--fg); font-size: 11px; font-weight: 750; letter-spacing: -.01em;
  padding: 2px 6px; white-space: nowrap;
}
.leaflet-tooltip.lm-tip::before { display: none; }

.mp-land   { fill: #E1E8DF; stroke: #C7CFC8; stroke-width: .6; vector-effect: non-scaling-stroke; }
.mp-land.focus { fill: #E6EDE4; stroke: #B6C0B6; }
.mp-lake   { fill: #C5DCEC; stroke: #A6C6DC; stroke-width: .5; vector-effect: non-scaling-stroke; }
.mp-route  { fill: none; stroke-width: 2.6; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
/* halo is a plain wide stroke, not a blur filter — filters are applied in user
   space and would grow as you zoom */
.mp-glow   { fill: none; stroke-width: 9; vector-effect: non-scaling-stroke; stroke-linecap: round;
             stroke-linejoin: round; opacity: .2; }
/* font-size and the halo are set from JS so they stay constant on screen */
.mp-label  { fill: #2C3644; font-weight: 700; letter-spacing: .01em; pointer-events: none;
             paint-order: stroke; stroke: #F4F7FA; stroke-width: 3.4; stroke-linejoin: round;
             vector-effect: non-scaling-stroke; }
.mp-clabel { fill: #A9B4C0; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
             pointer-events: none; }
.mp-stop   { cursor: pointer; }
.mp-stop circle.hit { fill: transparent; }
.mp-stop:active { opacity: .7; }
/* The default focus ring is drawn in the element's own coordinate space, so the
   map transform scales it into a huge disc. Mark focus on the marker instead. */
.mp-stop:focus { outline: none; }
.mp-stop:focus-visible > circle:first-child { stroke: var(--fg); }

.map-ctl { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 7px; z-index: 500; }
.map-btn {
  width: 38px; height: 38px; border-radius: 12px;
  background: rgba(255,255,255,.94); border: 1px solid var(--line-2); box-shadow: var(--sh-1);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: grid; place-items: center; color: var(--fg-2); font-size: 17px; font-weight: 600;
  transition: transform .15s var(--ease);
}
.map-btn:active { transform: scale(.9); }

.map-layers {
  position: absolute; left: 12px; top: 12px; z-index: 500;
  display: flex; gap: 3px; padding: 3px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.92); border: 1px solid var(--line-2); box-shadow: var(--sh-1);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.map-layer {
  height: 28px; padding: 0 12px; border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 700; color: var(--fg-3); letter-spacing: .01em;
  transition: all .2s var(--ease); white-space: nowrap;
}
.map-layer.on { background: var(--fg); color: #fff; }

/* mult.dev–style country chips — active day country lights up */
.map-chips {
  position: absolute; left: 12px; top: 52px; z-index: 500;
  display: flex; flex-wrap: wrap; gap: 5px; max-width: calc(100% - 70px);
}
.map-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 9px 0 7px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.92); border: 1px solid var(--line-2);
  box-shadow: var(--sh-1); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: var(--fg-3);
  transition: transform .18s var(--ease), color .18s, border-color .18s, background .18s, opacity .18s;
}
.map-chip i {
  width: 8px; height: 8px; border-radius: 50%; display: block; flex: 0 0 auto;
}
.map-chip.on {
  color: var(--fg); border-color: transparent;
  background: rgba(255,255,255,.98);
  box-shadow: var(--sh-2), 0 0 0 1.5px var(--chip, var(--brass));
  transform: scale(1.04);
}
.map-chip.done { opacity: .5; }
.map-chip.future { opacity: .7; }

.map-note {
  position: absolute; left: 12px; right: 58px; top: 92px; z-index: 500;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 12px; border-radius: var(--r-pill);
  background: var(--amber-soft); border: 1px solid rgba(169,112,13,.24);
  font-size: 11.5px; font-weight: 650; color: #8A5B0B; line-height: 1.35;
  box-shadow: var(--sh-1);
  transition: opacity .3s var(--ease);
}
.map-note button {
  flex: 0 0 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(169,112,13,.16); color: #8A5B0B; font-size: 13px; line-height: 1; margin-left: auto;
}

.map-info {
  position: absolute; left: 12px; right: 12px; bottom: calc(12px + 148px); z-index: 600;
  padding: 13px 15px; border-radius: var(--r-md);
  background: rgba(255,255,255,.96); border: 1px solid var(--line-2); box-shadow: var(--sh-3);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transform: translateY(calc(150% + 160px)); transition: transform .38s var(--spring);
}
.map-info.on { transform: none; }
.map-info-top { display: flex; align-items: flex-start; gap: 10px; }
.map-info-n { font-size: 16px; font-weight: 750; letter-spacing: -.024em; }
.map-info-m { font-size: 12px; color: var(--fg-3); margin-top: 2px; font-weight: 600; }
.map-info-go {
  margin-left: auto; flex: 0 0 auto; height: 30px; padding: 0 13px; border-radius: var(--r-pill);
  background: var(--fg); color: #fff; font-size: 12.5px; font-weight: 750;
}

/* Flighty / mult.dev–style trip progress HUD */
.map-progress {
  position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 610;
  padding: 12px 12px 11px;
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line-2);
  box-shadow: var(--sh-3);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}
.map-prog-track {
  height: 4px; border-radius: 999px; background: var(--fill-2);
  overflow: hidden; margin: 0 4px 10px;
}
.map-prog-fill {
  height: 100%; width: 0%; border-radius: inherit;
  background: linear-gradient(90deg, var(--brass), #C4891E);
  transition: width .45s var(--ease);
}
.map-prog-row {
  display: flex; align-items: center; gap: 6px;
}
.map-prog-nav {
  flex: 0 0 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: var(--fg-2);
  background: var(--fill-1);
  transition: transform .14s var(--ease), background .14s;
}
.map-prog-nav:active { transform: scale(.92); background: var(--fill-2); }
.map-prog-nav:disabled { opacity: .28; pointer-events: none; }
.map-prog-main {
  flex: 1; min-width: 0; text-align: left; padding: 2px 6px;
  border-radius: 10px;
}
.map-prog-main:active { background: var(--fill-1); }
.map-prog-k {
  font-size: 11px; font-weight: 750; letter-spacing: .08em;
  text-transform: uppercase; color: var(--fg-4);
}
.map-prog-t {
  font-size: 16px; font-weight: 750; letter-spacing: -.024em;
  line-height: 1.2; margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.map-prog-s {
  font-size: 12px; color: var(--fg-3); font-weight: 550; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.map-prog-elev {
  height: 40px; margin: 0 4px 8px; border-radius: 10px;
  background: var(--fill-1); overflow: hidden; position: relative;
}
.map-prog-elev[hidden] { display: none; }
.map-prog-elev svg { width: 100%; height: 100%; display: block; }
.map-prog-elev .mpe-lo,
.map-prog-elev .mpe-hi {
  position: absolute; top: 4px; font-size: 9px; font-weight: 750;
  letter-spacing: .02em; color: var(--fg-4); font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.map-prog-elev .mpe-lo { left: 6px; }
.map-prog-elev .mpe-hi { right: 6px; color: var(--fg-3); }

/* flowing dash on the active route leg (SVG offline map) */
.mp-route.flow {
  stroke-dasharray: 1.4 1.8;
  animation: mpFlow 1.1s linear infinite;
}
@keyframes mpFlow {
  to { stroke-dashoffset: -3.2; }
}

/* "you are here" pulse on the map */
.lm-here-pulse {
  animation: lmPulse 2s ease-out infinite;
}
@keyframes lmPulse {
  0%   { opacity: .55; }
  70%  { opacity: 0; }
  100% { opacity: 0; }
}
.mp-here-ring {
  fill: none; stroke: var(--brass); stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  opacity: .55; transform-origin: center;
  animation: mpPulse 2s ease-out infinite;
}
@keyframes mpPulse {
  0%   { opacity: .6; }
  70%  { opacity: 0; }
  100% { opacity: 0; }
}
.mp-here-dot {
  fill: var(--brass); stroke: #fff; stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

/* dish checklist (Kit → food drawer) */
.dish-prog { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.dish-prog .num { font-size: 13px; font-weight: 750; white-space: nowrap; }
.dish-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--fill-2); overflow: hidden; }
.dish-bar > div { height: 100%; border-radius: 3px; background: var(--brass); transition: width .3s var(--ease); }
.dish { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
        padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.dish:last-child { border-bottom: 0; }
.dish-img { position: relative; flex: 0 0 56px; width: 56px; height: 56px; border-radius: 12px;
            overflow: hidden; background: var(--fill-2); }
.dish-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dish-ltr { position: absolute; inset: 0; display: grid; place-items: center;
            font-size: 20px; font-weight: 800; color: var(--fg-4); z-index: -1; }
.dish-img { z-index: 0; }
.dish-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dish-n { font-size: 14.5px; font-weight: 700; letter-spacing: -.015em; }
.dish-wh { font-size: 11px; font-weight: 650; color: var(--brass); white-space: nowrap; }
.dish-win { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-3); }
.dish-win.now { color: var(--teal); }
.dish-win.missed { color: var(--red); }
.dish-d { font-size: 12.5px; line-height: 1.5; color: var(--fg-2); }
.dish .chk-box { flex: 0 0 auto; }
.dish.on .chk-box { background: var(--brass); border-color: var(--brass); }
.dish.on .chk-box svg { opacity: 1; }
.dish.on .dish-t { opacity: .55; }

/* named places to eat on the day card, each with a maps link */
.venue { display: flex; align-items: center; gap: 12px; padding: 10px 0;
         border-bottom: 1px solid var(--line-2); }
.venue:last-child { border-bottom: 0; }
.venue-b { flex: 1; min-width: 0; }
.venue-n { font-size: 14px; font-weight: 700; letter-spacing: -.015em; }
.venue-d { font-size: 12.5px; line-height: 1.55; color: var(--fg-2); margin-top: 1px; }
.venue-map { flex: 0 0 40px; height: 40px; border-radius: 12px; display: grid;
             place-items: center; background: var(--fill-1); color: var(--brass); }
.venue-map:active { transform: scale(.94); }

/* regional dishes catchable this day — tickable chips on the card, synced
   with the checklist drawer */
.dchips-k { font-size: 10.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase;
            color: var(--fg-3); margin: 14px 0 8px; }
.dchips { display: flex; flex-wrap: wrap; gap: 8px; }
.dchip { display: flex; align-items: center; gap: 7px; padding: 4px 12px 4px 4px;
         border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--line);
         box-shadow: var(--sh-1); font-size: 12.5px; font-weight: 650; }
.dchip:active { transform: scale(.96); }
.dchip-i { position: relative; width: 26px; height: 26px; border-radius: 50%;
           overflow: hidden; background: var(--fill-2); flex: 0 0 26px; }
.dchip-i img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dchip-c { position: absolute; inset: 0; display: grid; place-items: center;
           background: rgba(145,96,9,.85); opacity: 0; transition: opacity .15s; }
.dchip-c svg { width: 12px; height: 12px; }
.dchip.on { border-color: var(--brass); }
.dchip.on .dchip-c { opacity: 1; }
.dchip-l { margin-left: 6px; font-size: 9.5px; font-weight: 800; letter-spacing: .06em;
           text-transform: uppercase; color: var(--red); }
.dchip.on .dchip-l { display: none; }

/* dish detail sheet — stacks above the food drawer */
.dish-sheet { z-index: 950; max-height: 88dvh; }
.dish-sheet .sheet-body { padding: 0; }
.dish-hero { position: relative; height: 210px; background: var(--fill-2); }
.dish-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px;
          border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: var(--sh-1);
          font-size: 15px; font-weight: 700; display: grid; place-items: center; }
.dish-body-pad { padding: 16px var(--pad) 26px; }
.dish-hd h2 { font-size: 21px; font-weight: 800; letter-spacing: -.025em; }
.dish-sub { font-size: 12.5px; font-weight: 700; color: var(--brass); margin-top: 2px; }
.dish-winline { font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase;
                color: var(--fg-3); margin-top: 4px; }
.dish-note { font-size: 14.5px; line-height: 1.65; color: var(--fg-2); margin-top: 10px; }
.dish-tick { display: flex; align-items: center; justify-content: center; gap: 10px;
             width: 100%; height: 50px; margin-top: 16px; border-radius: var(--r-md);
             background: var(--fg); color: #fff; font-size: 14.5px; font-weight: 700; }
.dish-tick .chk-box { border-color: rgba(255,255,255,.5); background: transparent; }
.dish-tick.on { background: var(--brass-soft); color: var(--brass); }
.dish-tick.on .chk-box { background: var(--brass); border-color: var(--brass); }
.dish-tick.on .chk-box svg { opacity: 1; }
.dish-tick:active { transform: scale(.98); }
.dish-near { display: flex; align-items: center; justify-content: center; gap: 8px;
             margin-top: 14px; height: 44px; border-radius: var(--r-md);
             background: var(--fill-1); border: 1px solid var(--line-2);
             font-size: 13.5px; font-weight: 650; color: var(--fg-2); }

/* flying-in: riders grouped by airport pickup on the arrival card */
.fly-pk { font-size: 10.5px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase;
          color: var(--brass); margin-bottom: 4px; }
.fly-row { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; }
.fly-row + .fly-row { border-top: 1px solid var(--line-2); }
.fly-n { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.fly-f { font-size: 12.5px; color: var(--fg-2); }
.fly-call { background: var(--fill-1); border-radius: var(--r-md); border-bottom: 0;
            margin-top: 10px; padding: 12px 14px; }
.fly-call .call-num { font-size: 12.5px; }

/* live GPS blue dot (offline map; the tiled one is Leaflet-styled inline) */
.mp-loc-acc {
  fill: #1A73E8; fill-opacity: .12;
  stroke: #1A73E8; stroke-opacity: .3; stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.mp-loc-dot {
  fill: #1A73E8; stroke: #fff;
  vector-effect: non-scaling-stroke;
}

/* --- road tips deck (Kit drawer) ------------------------------------------
   Same snap discipline as the day deck: nothing may resize it mid-swipe. */
.tipdeck {
  display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; margin-top: 14px;
  scrollbar-width: none;
}
.tipdeck::-webkit-scrollbar { display: none; }
.tipcard {
  flex: 0 0 100%; scroll-snap-align: center; min-width: 0;
  background: var(--fill-1); border: 1px solid var(--line-2);
  border-radius: var(--r-lg); padding: 20px var(--pad);
  min-height: 148px;
}
.tipcard-top { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.tipcard-k { font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; color: var(--fg-3); }
.tipcard-t { font-size: 16.5px; line-height: 1.58; letter-spacing: -.01em; }
.tip-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 12px; }
.tip-count { font-size: 12.5px; font-weight: 700; color: var(--fg-3); min-width: 44px; text-align: center; }

/* ================================================================ GUIDES */
.g-card { padding: 16px var(--pad); }
.g-h { font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.g-meta { font-size: 12px; color: var(--fg-3); margin-top: 3px; font-weight: 600; }
.g-facts { display: grid; gap: 1px; margin-top: 14px; background: var(--line-2); border-radius: var(--r-md); overflow: hidden; }
.g-fact { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 11px 13px; background: var(--card); }
.g-fact-k { font-size: 10.5px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--fg-4); padding-top: 2px; }
.g-fact-v { font-size: 13.5px; color: var(--fg); font-weight: 600; line-height: 1.45; }
.g-sec { margin-top: 20px; }
.g-sec h3 { font-size: 15px; font-weight: 750; letter-spacing: -.022em; margin-bottom: 8px; color: var(--brass); }
.g-sec p { font-size: 14px; line-height: 1.68; color: var(--fg-2); }
.g-sec p + p { margin-top: 11px; }

/* =============================================================== KIT etc. */
.acc { border-bottom: 1px solid var(--line-2); }
.acc:last-child { border-bottom: 0; }
.acc-btn { width: 100%; display: flex; align-items: center; gap: 11px; padding: 15px var(--pad); text-align: left; }
.acc-ico { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
           background: var(--fill-1); color: var(--fg-2); }
.acc-ico svg { width: 17px; height: 17px; stroke-width: 1.9; }
.applet .acc-ico { flex-basis: 36px; width: 36px; height: 36px; border-radius: 12px; }
.applet .acc-ico svg { width: 19px; height: 19px; }
.ai-sos { background: var(--red-soft); color: var(--red); }
.acc-t { flex: 1; font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.acc-chev { color: var(--fg-4); transition: transform .3s var(--ease); }
.acc.open .acc-chev { transform: rotate(90deg); }
.acc-body { display: none; padding: 0 var(--pad) 18px; }
.acc.open .acc-body { display: block; animation: viewIn .3s var(--ease); }

.ph-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
          padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.ph-row:last-child { border-bottom: 0; }
.ph-en { font-size: 13px; color: var(--fg-3); font-weight: 600; }
.ph-ru { font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; margin-top: 1px; }
.ph-ph { font-size: 11.5px; color: var(--brass); font-weight: 650; letter-spacing: .02em; margin-top: 2px; font-family: var(--mono); }
.ph-say {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  background: var(--fill-1); display: grid; place-items: center; color: var(--fg-2);
  transition: transform .15s var(--ease), background .15s;
}
.ph-say:active { transform: scale(.88); background: var(--brass); color: #fff; }

.seg { display: flex; gap: 4px; overflow-x: auto; padding: 3px;
       border-radius: var(--r-pill); border: 1px solid var(--line-2);
       /* scroll shadows: the pinned edge shadows hint at clipped tabs (e.g. the
          phrasebook's Food) and are covered by the local-attachment layers when
          the row is scrolled to that end — no JS, degrades to a flat fill */
       background:
         linear-gradient(90deg,  var(--paper-2) 30%, rgba(233,236,241,0)),
         linear-gradient(270deg, var(--paper-2) 30%, rgba(233,236,241,0)),
         linear-gradient(90deg,  rgba(17,22,32,.14), rgba(17,22,32,0)),
         linear-gradient(270deg, rgba(17,22,32,.14), rgba(17,22,32,0)),
         var(--paper-2);
       background-position: left, right, left, right;
       background-size: 32px 100%, 32px 100%, 14px 100%, 14px 100%;
       background-repeat: no-repeat;
       background-attachment: local, local, scroll, scroll; }
.seg-b {
  flex: 0 0 auto; height: 30px; padding: 0 14px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 650; color: var(--fg-3); white-space: nowrap;
  transition: all .22s var(--ease);
}
.seg-b.on { background: var(--card); color: var(--fg); box-shadow: var(--sh-1); }

.cur-in {
  width: 100%; height: 52px; padding: 0 14px; border-radius: var(--r-md);
  background: var(--card); border: 1px solid var(--line);
  font-size: 22px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  outline: none; transition: border-color .2s;
}
.cur-in:focus { border-color: var(--brass); }
.cur-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
           padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.cur-row:last-child { border-bottom: 0; }
.cur-code { font-size: 14px; font-weight: 750; letter-spacing: -.01em; }
.cur-name { font-size: 11.5px; color: var(--fg-3); margin-top: 1px; }
.cur-val { font-size: 19px; font-weight: 750; letter-spacing: -.028em; font-variant-numeric: tabular-nums; text-align: right; }
.cur-rate { font-size: 10.5px; color: var(--fg-4); margin-top: 1px; font-variant-numeric: tabular-nums; }

.chk { display: flex; align-items: flex-start; gap: 11px; padding: 10px 0; width: 100%; text-align: left; }
.chk-box {
  flex: 0 0 21px; height: 21px; border-radius: 6px; margin-top: 1px;
  border: 1.8px solid var(--fg-4); display: grid; place-items: center;
  transition: all .2s var(--spring);
}
.chk-box svg { opacity: 0; }
.chk.on .chk-box { background: var(--brass); border-color: var(--brass); }
.chk.on .chk-box svg { opacity: 1; }
.chk.on .chk-t { color: var(--fg-4); text-decoration: line-through; }
.chk-t { font-size: 13.5px; line-height: 1.5; color: var(--fg-2); transition: color .2s; }

/* --------------------------------------------------------------------- SOS */
.sos-primary {
  display: flex; align-items: center; gap: 14px; padding: 17px;
  border-radius: var(--r-lg); background: linear-gradient(180deg, #FFF3F1, #FFE9E6);
  border: 1px solid rgba(196,56,43,.24); box-shadow: var(--sh-2);
}
.sos-ring {
  flex: 0 0 50px; height: 50px; border-radius: 50%; background: var(--red);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 0 0 0 rgba(196,56,43,.45); animation: ring 2.6s infinite;
}
@keyframes ring {
  0% { box-shadow: 0 0 0 0 rgba(196,56,43,.38); }
  70% { box-shadow: 0 0 0 15px rgba(196,56,43,0); }
  100% { box-shadow: 0 0 0 0 rgba(196,56,43,0); }
}
.sos-role { font-size: 10.5px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: #A32C21; }
.sos-name { font-size: 17px; font-weight: 750; letter-spacing: -.026em; margin-top: 1px; }
.sos-num { font-size: 13px; color: var(--fg-2); font-variant-numeric: tabular-nums; margin-top: 1px; font-weight: 600; }

.call-row { display: flex; align-items: center; gap: 12px; width: 100%;
            padding: 13px var(--pad); border-bottom: 1px solid var(--line-2); text-align: left; }
.call-row:last-child { border-bottom: 0; }
.call-row:active { background: var(--fill-1); }
.call-ico { flex: 0 0 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
            background: #DFF2F0; color: var(--teal); font-weight: 700; }
.call-ico.red { background: var(--red-soft); color: var(--red); }
.call-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.call-n { display: block; font-size: 14.5px; font-weight: 700; letter-spacing: -.02em; }
.call-s { display: block; font-size: 12px; color: var(--fg-3); margin-top: 1px;
          overflow: hidden; text-overflow: ellipsis; }
.call-num { flex: 0 0 auto; font-size: 14.5px; font-weight: 780; letter-spacing: -.02em;
            font-variant-numeric: tabular-nums; color: var(--fg); white-space: nowrap; }

/* ------------------------------------------------------------------ sheet */
.sheet-bg {
  position: fixed; inset: 0; z-index: 900; background: rgba(17,22,32,.34);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.sheet-bg.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 901;
  max-height: 86dvh; display: flex; flex-direction: column;
  background: var(--paper); border-top: 1px solid var(--line-2);
  border-radius: 24px 24px 0 0; box-shadow: 0 -12px 40px rgba(16,24,40,.18);
  transform: translateY(100%); transition: transform .42s var(--spring);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.sheet.on { transform: none; }
.sheet-grip { width: 38px; height: 4px; border-radius: 2px; background: rgba(17,22,32,.18); margin: 10px auto 4px; }
.sheet-head { display: flex; align-items: center; padding: 6px var(--pad) 12px; border-bottom: 1px solid var(--line-2); }
.sheet-h { font-size: 17px; font-weight: 750; letter-spacing: -.026em; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px var(--pad) 22px; }

/* ------------------------------------------------------------- pre-trip */
.count { text-align: center; padding: 30px 0 22px; }
.count-n {
  font-size: 76px; font-weight: 850; letter-spacing: -.06em; line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(170deg, #111620 25%, #9A6710 105%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.count-l { font-size: 12px; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; color: var(--fg-3); margin-top: 6px; }
.count-d { font-size: 13.5px; color: var(--fg-2); margin-top: 12px; }

.stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.stat { text-align: center; padding: 14px 6px; border-radius: var(--r-md);
        background: var(--fill-1); border: 1px solid var(--line-2); }
.stat-v { font-size: 21px; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.stat-l { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-4); margin-top: 3px; }

.foot { text-align: center; padding: 30px var(--pad) 12px; font-size: 11.5px; color: var(--fg-4); line-height: 1.7; }

/* --------------------------------------------------------------- utility */
.mt8{margin-top:8px}.mt10{margin-top:10px}.mt12{margin-top:12px}.mt14{margin-top:14px}
.mt16{margin-top:16px}.mt20{margin-top:20px}.mt24{margin-top:24px}
.muted{color:var(--fg-3)}.small{font-size:12.5px}
/* ------------------------------------------------ mini-app launcher (Kit) -- */
.applets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.applet {
  display: flex; flex-direction: column; align-items: flex-start; text-align: left;
  padding: 14px; background: var(--card); border: 1px solid var(--line-2);
  border-radius: var(--r-md); box-shadow: var(--sh-1);
}
.applet:active { transform: scale(.97); }
.applet-t { font-size: 14px; font-weight: 700; letter-spacing: -.01em; margin-top: 9px; }
.applet-s { font-size: 11.5px; color: var(--fg-3); margin-top: 1px; }

/* collapsible briefs inside a day card get their own box, since .acc was
   designed as a row inside a card list */
.d-body .acc { border: 1px solid var(--line-2); border-radius: var(--r-md); margin-top: 14px; }
.d-body .acc:last-child { border-bottom: 1px solid var(--line-2); }
.d-body .acc-btn { padding: 12px 14px; }
.d-body .acc-body { padding: 0 14px 16px; }

/* currency converter: every row is an input */
.cur-amt {
  width: 128px; text-align: right; font-size: 17px; font-weight: 700;
  padding: 9px 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--card); color: var(--fg);
}
.cur-amt:focus { border-color: var(--brass); outline: none; }

.hide{display:none !important}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration:.01ms !important; transition-duration:.01ms !important; }
  .deck-scroll { scroll-behavior: auto; }
}
