/* ===== Design tokens: Wanderly's "travel journal" palette =====
   Paper, ink and one stamp-red accent; sea (teal) = good / in budget, sun (amber) = over budget.
   Dark = "the journal by lamplight", light = "warm paper". Same values as Wanderly's tokens.css. */
:root {
  --bg: #13161c;
  --glass: rgba(27, 31, 38, 0.92);
  --solid: #1b1f26;
  --ink: 239, 235, 226;
  --text: #efebe2;
  --text-2: #d4d0c8;
  --text-3: #bfc3ca;
  --muted: #a8aeb8;
  --tile: rgba(239, 235, 226, 0.045);
  --tile-hover: rgba(239, 235, 226, 0.08);
  --line: #34383f;
  --line-2: #4a4f58;
  --brand: #cc3f2f;
  --brand-2: #af2c1f;
  --brand-text: #f47c6b;
  --brand-soft: #47211b;
  --brand-rgb: 204, 63, 47;
  --grad: linear-gradient(135deg, #cc3f2f, #cc3f2f);
  --on-brand: #ffffff;
  --ok: #7cced2;
  --warn: #e9b860;
  --bad: #f7a597;
  --info: #7cb4fc;
  --wa: #25d366;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.35);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23f47c6b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  --display: "Outfit", "Inter", system-ui, sans-serif;
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
}
:root[data-theme="light"] {
  --bg: #f9f5ec;
  --glass: rgba(255, 253, 250, 0.92);
  --solid: #fffdfa;
  --ink: 26, 32, 41;
  --text: #1a2029;
  --text-2: #373d48;
  --text-3: #4a515c;
  --muted: #575e69;
  --tile: #f9f5ec;
  --tile-hover: #f2ece1;
  --line: #dbd7cf;
  --line-2: #c9c3b8;
  --brand: #c83122;
  --brand-2: #a52014;
  --brand-text: #c83122;
  --brand-soft: #ffe3de;
  --brand-rgb: 200, 49, 34;
  --grad: linear-gradient(135deg, #c83122, #c83122);
  --ok: #076b6f;
  --warn: #a66d00;
  --bad: #a52014;
  --info: #0961bb;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23c83122' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  --shadow: 0 10px 30px rgba(26, 32, 41, 0.12), 0 2px 6px rgba(26, 32, 41, 0.06);
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text); overflow: hidden;
  font: 14px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); font-weight: 500; }
.small { font-size: 12px; margin: 2px 0 0; }

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
}

/* ===== Map ===== */
#globe { position: fixed; inset: 0; }
.maplibregl-ctrl-attrib { background: rgba(19, 22, 28, 0.65) !important; color: #a8aeb8; font-size: 10px; }
.maplibregl-ctrl-attrib a { color: #d4d0c8 !important; }
:root[data-theme="light"] .maplibregl-ctrl-attrib { background: rgba(255, 253, 250, 0.85) !important; color: #575e69; }
:root[data-theme="light"] .maplibregl-ctrl-attrib a { color: #373d48 !important; }
.maplibregl-ctrl-group { background: var(--glass) !important; border: 1px solid var(--line); border-radius: 14px !important; overflow: hidden; box-shadow: var(--shadow) !important; backdrop-filter: blur(14px); }
.maplibregl-ctrl-group button { width: 38px !important; height: 38px !important; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line) !important; }
:root:not([data-theme="light"]) .maplibregl-ctrl-group .maplibregl-ctrl-icon { filter: invert(1); }
body.is-intro .maplibregl-ctrl-bottom-right .maplibregl-ctrl-group { display: none; }

/* ===== Top bar ===== */
.brand {
  position: fixed; z-index: 20; top: calc(14px + var(--top)); left: 14px;
  display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 7px; border-radius: 16px;
  text-decoration: none; transition: transform 0.15s ease;
}
.brand:hover { transform: translateY(-1px); }
.brand:active { transform: scale(0.97); }
.mark {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--grad); box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.35);
}
.mark svg { width: 78%; height: 78%; }
.mark.sm { width: 36px; height: 36px; }
.brand-name { font: 800 18px/1 var(--display); letter-spacing: -0.01em; }
.brand-tag { padding-left: 10px; border-left: 1px solid var(--line-2); color: var(--muted); font-size: 12px; }

.top-actions {
  position: fixed; z-index: 26; top: calc(14px + var(--top)); right: 14px;
  display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 16px;
}
.guides-link, .theme-toggle { height: 38px; border: none; background: none; color: var(--text); border-radius: 12px; }
.guides-link { display: flex; align-items: center; gap: 8px; padding: 0 12px; font-weight: 600; font-size: 14px; text-decoration: none; }
.theme-toggle { width: 38px; display: grid; place-items: center; font-size: 17px; }
.guides-link:hover, .theme-toggle:hover { background: var(--tile-hover); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 999px;
  padding: 11px 20px; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-main { background: var(--grad); color: var(--on-brand); box-shadow: 0 10px 26px rgba(var(--brand-rgb), 0.35); }
.btn-main:hover { filter: brightness(1.08); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { filter: brightness(1.05); }
.btn-line {
  border: 1px solid var(--line-2); background: transparent; border-radius: 999px; color: var(--text);
  padding: 8px 13px; font-weight: 600; font-size: 13px; white-space: nowrap; text-decoration: none;
}
.btn-line:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn-line.wa { color: var(--wa); border-color: rgba(37, 211, 102, 0.45); }
:root[data-theme="light"] .btn-line.wa { color: #15803d; }
.text-btn { background: none; border: none; padding: 0; color: var(--brand-text); font-weight: 600; }

/* ===== Intro: globe on top, a search card below ===== */
.intro {
  position: fixed; z-index: 30; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: min(860px, calc(100vw - 48px)); padding: 22px 26px 18px; text-align: center;
  background: var(--glass); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.intro.leaving { opacity: 0; transform: translate(-50%, 40px); pointer-events: none; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-text);
}
.kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.2); }
.intro h1 { margin: 0; font: 800 clamp(28px, 3.6vw, 44px)/1.08 var(--display); letter-spacing: -0.025em; }
.br-sm { display: none; }
.hl { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin: 8px auto 16px; max-width: 560px; color: var(--text-2); font-size: 15px; }

.search {
  display: grid; grid-template-columns: 1.3fr 1.25fr 0.7fr auto; align-items: center; gap: 0;
  padding: 6px 6px 6px 8px; text-align: left; border-radius: 999px;
  background: rgba(var(--ink), 0.05); border: 1px solid var(--line-2);
}
.sf { display: flex; flex-direction: column; gap: 2px; padding: 4px 16px; font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer; }
.sf + .sf { border-left: 1px solid var(--line-2); }
.sf select {
  padding: 0; border: none; outline: none; background: transparent; cursor: pointer;
  font: 700 16px/1.3 var(--display); color: var(--text); -webkit-appearance: none; appearance: none;
}
.sf select option { background: var(--solid); }
.search .btn-main { padding: 14px 26px; font-size: 15.5px; }
.search .btn-main span { transition: transform 0.15s; }
.search .btn-main:hover span { transform: translateX(3px); }

.intro-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.link-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--tile); color: var(--text-2);
  font-size: 13px; font-weight: 600; text-decoration: none;
}
.link-chip:hover { border-color: var(--brand); color: var(--text); }
.link-chip svg { width: 16px; height: 16px; flex-shrink: 0; }
.link-chip.wa svg { color: var(--wa); }
.install-link {
  display: block; margin: 10px auto 0; background: none; border: none; color: var(--brand-text);
  font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 3px;
}

/* ===== Side sheets: trips on the left, filters on the right ===== */
.sheet {
  position: fixed; z-index: 15; top: calc(76px + var(--top)); bottom: 14px; border-radius: 24px;
  display: flex; flex-direction: column; overflow: hidden; transition: opacity 0.5s ease, transform 0.5s ease;
}
.sheet-left { left: 14px; width: 420px; }
.sheet-right { right: 14px; width: 330px; }
body.is-intro .sheet { opacity: 0; pointer-events: none; }
body.is-intro .sheet-left { transform: translateX(-30px); }
body.is-intro .sheet-right { transform: translateX(30px); }
.pane { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px 10px; }
.sheet-head h2 { display: flex; align-items: center; gap: 9px; margin: 0; font: 700 19px/1.2 var(--display); letter-spacing: -0.01em; }
.hicon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 14px; background: var(--brand-soft); }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 18px 18px; }
.sheet-body::-webkit-scrollbar { width: 6px; }
.sheet-body::-webkit-scrollbar-thumb { background: rgba(var(--ink), 0.14); border-radius: 6px; }
.head-btns { display: flex; gap: 6px; flex-shrink: 0; }
.list-head { display: block; }
.lh-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lh-row h2 { white-space: nowrap; min-width: 0; }
.list-head .small { margin-top: 4px; }
.head-btns .btn-line { padding: 7px 11px; font-size: 12.5px; }

/* ===== Form controls ===== */
.field { margin-bottom: 18px; }
.field > label, .field-row > label { display: block; margin-bottom: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.field-row > label { margin: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
select {
  width: 100%; padding: 11px 14px; border-radius: 14px; outline: none; -webkit-appearance: none; appearance: none;
  background-color: rgba(var(--ink), 0.06); border: 1px solid transparent; font-weight: 600;
  background-image: var(--chevron);
  background-position: calc(100% - 14px) 50%; background-repeat: no-repeat;
}
select option { background: var(--solid); }
select:focus { border-color: var(--brand); }
.budget-big { margin: 4px 0 8px; font: 800 28px/1.1 var(--display); letter-spacing: -0.02em; }
input[type="range"] {
  --fill: 50%;
  width: 100%; height: 8px; border-radius: 8px; outline: none; -webkit-appearance: none; appearance: none;
  background: linear-gradient(90deg, var(--brand), var(--brand-2) var(--fill), rgba(var(--ink), 0.1) var(--fill));
}
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--brand-2); cursor: pointer; box-shadow: 0 4px 12px rgba(12, 16, 21, 0.4); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--brand-2); cursor: pointer; }

/* Single-choice groups are rows of separate chips */
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick button {
  flex: 0 1 auto; padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  color: var(--text-3); background: transparent; border: 1px solid var(--line-2);
}
.pick button:hover { color: var(--text); border-color: var(--brand); }
.pick button.on { color: #fff; background: var(--grad); border-color: transparent; box-shadow: 0 6px 16px rgba(var(--brand-rgb), 0.3); }
.pick-sm button { padding: 5px 10px; font-size: 11.5px; }

.counter { display: flex; align-items: center; justify-content: space-between; padding: 5px; border-radius: 999px; background: rgba(var(--ink), 0.06); }
.counter button { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--solid); font-size: 17px; font-weight: 700; color: var(--brand-text); box-shadow: 0 2px 6px rgba(12, 16, 21, 0.25); }
.counter button:hover { background: var(--brand-soft); }
.counter output { font: 700 17px/1 var(--display); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 11px; border-radius: 10px; font-size: 12.5px; font-weight: 600; color: var(--text-3); background: rgba(var(--ink), 0.05); border: 1px solid transparent; }
button.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.on { color: var(--brand-text); background: var(--brand-soft); border-color: rgba(var(--brand-rgb), 0.55); }
.chips.mini { margin-top: 10px; }
.chips.mini .chip { padding: 4px 9px; font-size: 11.5px; border-radius: 8px; }

.switches { display: flex; flex-direction: column; gap: 10px; }
.switch { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.switch input { display: none; }
.switch span { position: relative; flex-shrink: 0; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line-2); transition: background 0.15s, border-color 0.15s; }
.switch span::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform 0.15s; }
.switch input:checked + span { background: var(--grad); border-color: transparent; }
.switch input:checked + span::after { transform: rotate(45deg) scale(1); }

/* ===== Trip list ===== */
.sort-row { display: flex; align-items: center; gap: 10px; padding: 0 18px 12px; }
.sort-row .pick { flex: 1; }
.trip {
  display: flex; gap: 12px; margin-bottom: 10px; padding: 13px 14px 12px; border-radius: 18px; cursor: pointer;
  background: var(--tile); border: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--ok);
  transition: background 0.15s, border-color 0.15s, transform 0.15s; animation: rise 0.45s ease both;
}
.trip.over { box-shadow: inset 3px 0 0 var(--warn); }
.trip:hover { background: var(--tile-hover); border-color: var(--line-2); transform: translateX(2px); }
.trip.on { border-color: var(--brand); background: var(--brand-soft); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.emoji-tile {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 24px;
  background: radial-gradient(circle at 30% 25%, rgba(var(--brand-rgb), 0.24), rgba(var(--brand-rgb), 0.07) 65%);
  border: 1px solid var(--line);
}
.trip-main { flex: 1; min-width: 0; }
.trip-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.trip-name { font: 700 16px/1.25 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip-price { font: 800 17px/1.25 var(--display); white-space: nowrap; }
.trip-sub { display: flex; justify-content: space-between; gap: 8px; margin-top: 1px; color: var(--muted); font-size: 12px; }
.meter { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11.5px; font-weight: 700; color: var(--brand-text); }
.meter i { position: relative; flex: 1; height: 5px; border-radius: 5px; background: rgba(var(--ink), 0.08); overflow: hidden; }
.meter i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--pct); border-radius: 5px; background: var(--grad); }
.trip-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; color: var(--text-3); border: 1px solid var(--line-2); }
.tag.good { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.tag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.tag.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.tag.match { color: var(--brand-text); border-color: rgba(var(--brand-rgb), 0.5); }
.empty { padding: 40px 10px; text-align: center; color: var(--muted); }
.empty b { display: block; margin-bottom: 6px; font: 700 17px var(--display); color: var(--text); }
.empty em { font-style: normal; font-weight: 700; color: var(--brand-text); }

/* ===== Trip detail ===== */
.detail-top { padding: 14px 18px 14px; border-bottom: 1px solid var(--line); }
.back { margin-bottom: 12px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.back:hover { color: var(--text); border-color: var(--brand); }
.detail-title { display: flex; align-items: center; gap: 12px; }
.detail-title .emoji-tile { width: 58px; height: 58px; font-size: 30px; }
.detail-title h2 { margin: 0; font: 800 26px/1.1 var(--display); letter-spacing: -0.02em; }
.detail-title p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.blurb { margin: 12px 0 0; color: var(--text-2); line-height: 1.55; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--tile); }
.stat { padding: 10px 12px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.stat b { font: 800 20px/1.3 var(--display); letter-spacing: -0.01em; }
.stat.hero b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat b.ok { color: var(--ok); }
.stat b.over { color: var(--warn); }
.block { margin-top: 22px; }
.block h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 700 16px/1.2 var(--display); color: var(--text); }
.block h3 span { font-size: 15px; }
.money { display: grid; grid-template-columns: 118px 1fr; gap: 16px; align-items: center; }
.donut { width: 118px; height: 118px; }
.donut .t1 { font: 600 10px var(--display); fill: var(--muted); }
.donut .t2 { font: 800 17px var(--display); fill: var(--text); }
.legend { display: flex; flex-direction: column; gap: 6px; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.legend i { flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; }
.legend b { margin-left: auto; font-weight: 700; color: var(--text); }
.rows { display: flex; flex-direction: column; gap: 7px; }
.row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; cursor: pointer;
  background: var(--tile); border: 1px solid var(--line); text-decoration: none; color: inherit;
}
.row:hover { border-color: var(--line-2); }
.row.on { border-color: var(--brand); background: var(--brand-soft); }
.radio { flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); }
.row.on .radio { border-color: transparent; background: radial-gradient(circle, #fff 0 3px, transparent 3.5px), var(--grad); }
.row .ico { font-size: 18px; }
.row .nm { font-weight: 700; font-size: 13px; }
.row .meta { color: var(--muted); font-size: 11.5px; }
.row .pr { margin-left: auto; font: 800 15px var(--display); text-align: right; }
.row .pr small { display: block; font: 500 10.5px "Inter", sans-serif; color: var(--muted); }
.book-links { display: flex; flex-wrap: wrap; gap: 7px; }
.book-links a { flex: 1 1 45%; text-align: center; }
a.btn.book { display: flex; width: 100%; margin-bottom: 10px; }
.timeline { display: flex; flex-direction: column; }
.day { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding-bottom: 16px; }
.day::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 2px; width: 2px; border-radius: 2px; background: var(--line-2); }
.day:last-child::before { display: none; }
.dnum { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 13px var(--display); color: #fff; background: var(--grad); }
.day h4 { margin: 5px 0 4px; font: 700 14.5px var(--display); }
.day ul, .bullets { margin: 0; color: var(--text-2); font-size: 13px; }
.day ul { padding-left: 0; list-style: none; line-height: 1.6; }
.bullets { padding-left: 18px; line-height: 1.6; }
.food .chip { cursor: default; }
.split { padding: 14px; border-radius: 16px; background: var(--tile); border: 1px solid var(--line); }
.split-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.split .counter { width: 136px; }
.split-total { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); font-size: 13px; }
.split-total b { font: 800 17px var(--display); }
.split-total.plain { margin-top: 4px; padding-top: 0; border: none; }
.share-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.share-btns .btn-wa { padding: 11px; font-weight: 700; }
.fine { margin-top: 16px; font-size: 11px; line-height: 1.5; color: var(--muted); }
.note { padding: 9px 12px; margin-top: 8px; border-radius: 12px; font-size: 12.5px; border-left: 3px solid; }
.note.warn { background: rgba(251, 191, 36, 0.08); color: var(--warn); border-color: var(--warn); }
.note.info { background: rgba(125, 211, 252, 0.08); color: var(--info); border-color: var(--info); }

/* ===== Map markers: little callouts with a tail ===== */
.pin {
  position: relative; display: flex; align-items: center; gap: 5px; padding: 3px 4px; border-radius: 12px; cursor: pointer;
  background: #fffdfa; color: #1a2029; font: 700 11.5px/1 "Inter", sans-serif; white-space: nowrap;
  box-shadow: 0 8px 20px rgba(12, 16, 21, 0.45); transition: transform 0.15s; animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.pin::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 9px; height: 9px; margin-left: -4.5px; transform: rotate(45deg); border-radius: 2px; background: #fffdfa; }
.pin .e { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 8px; background: #f2ece1; font-size: 12px; }
.pin em { font-style: normal; padding: 3px 6px; border-radius: 8px; background: #d5f2f3; color: #076b6f; }
.pin.over em { background: #f7ebcf; color: #a66d00; }
.pin:hover, .pin.on { z-index: 5; transform: scale(1.12) translateY(-2px); background: #c83122; color: #fff; }
.pin:hover::after, .pin.on::after { background: #c83122; }
.pin:hover .e, .pin.on .e { background: rgba(255, 255, 255, 0.22); }
.pin:hover em, .pin.on em { background: rgba(255, 255, 255, 0.22); color: #fff; }
@keyframes pop { from { opacity: 0; transform: scale(0.4) translateY(10px); } to { opacity: 1; transform: none; } }
.home-pin { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.home-pin i {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--grad);
  border: 2px solid #fffdfa; box-shadow: 0 0 0 6px rgba(var(--brand-rgb), 0.28), 0 8px 20px rgba(12, 16, 21, 0.5);
}
.home-pin svg { width: 14px; height: 14px; }
.home-pin span { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; color: #fffdfa; background: #1a2029; }
.plane { width: 28px; height: 28px; filter: drop-shadow(0 4px 8px rgba(12, 16, 21, 0.6)); }
@media (hover: none) { .pin, .home-pin { pointer-events: none; } }

/* ===== Tabs, toast, install ===== */
.tabs { display: none; }
.toast {
  position: fixed; z-index: 50; left: 50%; bottom: calc(28px + var(--bottom)); transform: translateX(-50%);
  padding: 11px 18px; border-radius: 999px; font-weight: 600; background: var(--solid); color: var(--text);
  border: 1px solid var(--brand); box-shadow: var(--shadow);
}
.install-bar {
  position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(80px + var(--bottom));
  display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 12px; border-radius: 20px; animation: rise 0.4s ease both;
}
body.is-intro .install-bar { top: calc(66px + var(--top)); bottom: auto; }
.ib-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; font-size: 13px; }
.ib-text small { color: var(--muted); font-size: 11.5px; }
.ib-close { padding: 6px; background: none; border: none; color: var(--muted); font-size: 14px; }
.apk-mini { padding: 8px 11px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--brand-text); font-size: 12.5px; font-weight: 800; text-decoration: none; }
.ios-help { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; padding: 12px 12px calc(12px + var(--bottom)); background: rgba(12, 16, 21, 0.55); }
.ios-card { width: 100%; padding: 18px; border-radius: 24px; background: var(--solid); border: 1px solid var(--line); }
.ios-card b { font: 700 17px var(--display); }
.ios-card ol { padding-left: 20px; line-height: 2; color: var(--text-2); font-size: 14px; }
.ios-card .btn { width: 100%; margin-top: 4px; }
.kbd { padding: 1px 7px; border-radius: 6px; font-weight: 700; color: var(--text); background: var(--tile); border: 1px solid var(--line); }
.share-ico { color: var(--info); font-weight: 800; }
.grab { display: none; }

/* ===== Laptops ===== */
@media (min-width: 861px) {
  body:not(.is-intro) .maplibregl-ctrl-bottom-right { right: 352px; }
  .install-bar, .install-link { display: none !important; }
}

/* ===== Phones ===== */
@media (max-width: 860px) {
  #globe { bottom: auto; height: 42vh; height: 42dvh; }
  body.is-intro #globe { height: 100vh; height: 100dvh; }
  body.map-only #globe { height: calc(100dvh - 68px - var(--bottom)); }
  .brand { top: calc(12px + var(--top)); left: 12px; padding: 6px 12px 6px 6px; }
  .brand-tag { display: none; }
  .top-actions { top: calc(12px + var(--top)); right: 12px; }
  .guides-link { padding: 0 10px; }
  .guides-link .lbl, .link-chip .lbl, #surpriseBtn .lbl { display: none; }
  #surpriseBtn { width: 34px; padding: 7px 0; }
  .maplibregl-ctrl-bottom-right { bottom: 26px; }

  .intro {
    bottom: 0; width: 100%; padding: 18px 16px calc(16px + var(--bottom));
    border-radius: 26px 26px 0 0; border-bottom: none; background: var(--solid);
  }
  .intro.leaving { transform: translate(-50%, 30px); }
  .br-sm { display: inline; }
  .intro h1 { font-size: 30px; }
  .lede { font-size: 14px; margin-bottom: 14px; }
  .search { grid-template-columns: 1fr 1fr 0.75fr; padding: 6px; border-radius: 20px; row-gap: 8px; }
  .sf { padding: 4px 10px; }
  .sf select { font-size: 14.5px; }
  .search .btn-main { grid-column: 1 / -1; padding: 13px; }
  .intro-links { margin-top: 12px; }

  .sheet {
    display: none; top: 42vh; top: 42dvh; bottom: calc(68px + var(--bottom)); left: 0 !important; right: 0 !important; width: auto !important;
    border-radius: 24px 24px 0 0; border-bottom: none; background: var(--solid);
  }
  .sheet.show { display: flex; }
  body.is-intro .sheet { display: none; }
  .sheet-head { padding: 12px 16px 8px; }
  .sheet-body { padding: 4px 16px 16px; }
  .sort-row { padding: 0 16px 10px; }
  .detail-top { padding: 12px 16px; }

  .tabs {
    position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr);
    padding: 6px 10px calc(6px + var(--bottom)); border-radius: 0; border-left: none; border-right: none; border-bottom: none; background: var(--solid);
  }
  body.is-intro .tabs { display: none; }
  .tabs button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px; border: none; background: none; font-size: 11.5px; font-weight: 600; color: var(--muted); }
  .tabs .ti { width: 56px; height: 30px; border-radius: 999px; display: grid; place-items: center; font-size: 16px; transition: background 0.2s; }
  .tabs button.on { color: var(--text); }
  .tabs button.on .ti { background: var(--brand-soft); box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), 0.45); }

  .grab {
    display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; width: 100%; padding: 8px 0 2px;
    border: none; background: none; color: var(--muted); font-size: 12px; font-weight: 600;
  }
  .grab i { width: 36px; height: 4px; border-radius: 4px; background: var(--line-2); }
  .grab .when-closed { display: none; }
  body.sheet-min .grab { padding: 10px 0 12px; }
  body.sheet-min .grab .when-open { display: none; }
  body.sheet-min .grab .when-closed { display: inline; color: var(--brand-text); font-size: 13px; }
  body.sheet-min #globe { height: calc(100vh - 126px); height: calc(100dvh - 126px - var(--bottom)); }
  body.sheet-min .sheet { top: calc(100vh - 126px); top: calc(100dvh - 126px - var(--bottom)); }
  body.sheet-min .sheet > :not(.grab) { display: none !important; }
}
@media (max-width: 400px) {
  .link-chip { font-size: 12px; padding: 6px 10px; }
  .intro h1 { font-size: 27px; }
}
