/* Layover Planner — "Postcard" design: Lagoon (light) and Midnight (dark).
   One set of tokens; the theme is the system setting unless the user picks
   one (html[data-theme="light" | "dark"]). */

:root {
  --brand-ai: #3a7cc0;     /* the ".ai" in the name (light design) */
  /* Lagoon / navy */
  --bg: #c3d7e5;            /* the coloured field behind everything */
  --field-ink: #141a22;     /* text placed directly on the field */
  --card: #ffffff;          /* postcards, sheets, bars */
  --chip: #eaf1f6;          /* chips, inputs, inner surfaces */
  --chip-2: #dce7f0;
  --ink: #141a22;
  --ink-2: #3c4757;
  --ink-3: #5a6676;
  --line: rgba(20, 26, 34, 0.12);
  --accent: #142c4c;        /* navy: buttons, highlights */
  --accent-ink: #ffffff;
  --accent-soft: #dbe6f1;
  --strong: #141a22;        /* secondary filled button */
  --strong-ink: #ffffff;
  --me: #142c4c;            /* her chat bubble */
  --me-ink: #ffffff;
  --price-bg: #142c4c;
  --price-ink: #ffffff;
  --tabs-bg: rgba(255, 255, 255, 0.45);
  --tabs-on: #ffffff;
  --ok: #1d7a52;
  --ok-soft: #ddf0e5;
  --warn: #9a5800;
  --warn-soft: #fbefd8;
  --toast: #141a22;
  --shadow: 0 1px 0 rgba(20, 26, 34, 0.04);
  --shadow-lift: 0 14px 34px rgba(20, 26, 34, 0.16);
  --r: 16px;          /* every tile, button, field, chip */
  --r-in: 12px;       /* things inside a tile (photos, inner rows) */
  --r-card: var(--r);
  --r-inner: var(--r);
  --r-sm: var(--r);
  --topbar-h: 60px;
  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --map-filter: none;
  color-scheme: light;
}

/* Midnight / sky – used for dark system setting, or when chosen. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b1520; --field-ink: #f4f7fa; --card: #15212e; --chip: #1f2e3e; --chip-2: #26384b;
    --ink: #f4f7fa; --ink-2: #bccad7; --ink-3: #94a6b8; --line: #2a3a4c;
    --accent: #6bb4ee; --accent-ink: #0b1520; --brand-ai: #6bb4ee; --accent-soft: rgba(107, 180, 238, 0.16);
    --strong: #24364a; --strong-ink: #f4f7fa; --me: #24415e; --me-ink: #ffffff;
    --price-bg: rgba(107, 180, 238, 0.16); --price-ink: #a9d4f6;
    --tabs-bg: #15212e; --tabs-on: #24364a;
    --ok: #5fd39a; --ok-soft: rgba(95, 211, 154, 0.14); --warn: #f0b45a; --warn-soft: rgba(240, 180, 90, 0.14);
    --toast: #24364a; --shadow: none; --shadow-lift: 0 14px 34px rgba(0, 0, 0, 0.5);
    --map-filter: invert(1) hue-rotate(180deg) brightness(0.88) contrast(0.88) saturate(0.55);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0b1520; --field-ink: #f4f7fa; --card: #15212e; --chip: #1f2e3e; --chip-2: #26384b;
  --ink: #f4f7fa; --ink-2: #bccad7; --ink-3: #94a6b8; --line: #2a3a4c;
  --accent: #6bb4ee; --accent-ink: #0b1520; --brand-ai: #6bb4ee; --accent-soft: rgba(107, 180, 238, 0.16);
  --strong: #24364a; --strong-ink: #f4f7fa; --me: #24415e; --me-ink: #ffffff;
  --price-bg: rgba(107, 180, 238, 0.16); --price-ink: #a9d4f6;
  --tabs-bg: #15212e; --tabs-on: #24364a;
  --ok: #5fd39a; --ok-soft: rgba(95, 211, 154, 0.14); --warn: #f0b45a; --warn-soft: rgba(240, 180, 90, 0.14);
  --toast: #24364a; --shadow: none; --shadow-lift: 0 14px 34px rgba(0, 0, 0, 0.5);
  --map-filter: invert(1) hue-rotate(180deg) brightness(0.88) contrast(0.88) saturate(0.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 450;
  line-height: 1.45;
  color: var(--field-ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 1000;
  height: calc(var(--topbar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 14px 0;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); color: var(--field-ink);
}
.brand { flex: 1; display: flex; align-items: center; gap: 7px; min-width: 0; cursor: pointer; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); flex: none; }
.brand-mark svg { width: 16px; height: 16px; }
.brand-text .ai { color: var(--brand-ai, var(--accent)); }
.brand-text { font-weight: 600; font-size: 18px; letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--r);
  background: var(--card); color: var(--ink); cursor: pointer; flex: none; transition: transform 0.15s;
}
.icon-btn:active { transform: scale(0.94); }
.sheet .icon-btn { background: var(--chip); }

/* ---------- Generic ---------- */
.view { max-width: 720px; margin: 0 auto; padding: 8px 16px 48px; }
h1 { font-size: 30px; line-height: 1.05; margin: 8px 0 10px; letter-spacing: -0.045em; font-weight: 600; }
h2 { font-size: 19px; margin: 26px 0 10px; letter-spacing: -0.03em; font-weight: 600; }
h3 { font-size: 16px; margin: 0; letter-spacing: -0.02em; font-weight: 600; }
.muted { color: var(--ink-2); }
.view > .muted, .view > p.muted { color: color-mix(in srgb, var(--field-ink) 84%, transparent); }
.small { font-size: 13px; }
.tiny { font-size: 12.5px; font-weight: 500; color: var(--ink-3); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r); border: 0;
  background: var(--chip); color: var(--ink); font-weight: 600; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: transform 0.12s, filter 0.15s, background-color 0.15s;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
@media (hover: hover) { .btn:hover:not(:disabled) { filter: brightness(0.97); } }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.dark { background: var(--strong); color: var(--strong-ink); }
.btn.ghost { background: transparent; color: var(--ink-2); }
@media (hover: hover) { .btn.ghost:hover:not(:disabled) { background: var(--chip); filter: none; } }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn.block { width: 100%; }
/* Long labels (a place name in it) wrap instead of being cut off. */
.btn.block { white-space: normal; text-wrap: balance; text-align: center; line-height: 1.25; padding-top: 10px; padding-bottom: 10px; }
.btn.on { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--accent); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.card { background: var(--card); color: var(--ink); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 18px; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.input, .field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--r-sm);
  border: 1.5px solid transparent; background: var(--chip); color: var(--ink); outline: none; transition: border-color 0.15s;
}
.field textarea { min-height: 96px; resize: vertical; } /* 3 lines: the example text fits in every language */
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--accent); background: var(--card); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .two { grid-template-columns: 1fr; gap: 0; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 0; background: var(--chip); color: var(--ink); border-radius: var(--r); padding: 8px 13px; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background-color 0.15s; }
.chip.on { background: var(--accent); color: var(--accent-ink); }

.hotel-results { display: grid; gap: 6px; margin-top: 8px; }
.hotel-option { text-align: left; padding: 11px 14px; border-radius: var(--r-sm); border: 1.5px solid transparent; background: var(--chip); cursor: pointer; }
@media (hover: hover) { .hotel-option:hover { border-color: var(--accent); } }
.hotel-picked { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: var(--r-sm); background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); margin-top: 8px; }
.hotel-picked .grow { flex: 1; min-width: 0; }

/* ---------- Home ---------- */
.hello { font-size: 42px; line-height: 1; letter-spacing: -0.055em; font-weight: 600; margin: 10px 0 18px; color: var(--field-ink); }
.hello span { display: inline-block; background: var(--accent); color: var(--accent-ink); padding: 0 10px 3px; border-radius: var(--r-in); transform: rotate(-2deg); }
.next-card { display: block; background: var(--card); color: var(--ink); border-radius: var(--r); padding: 10px; text-decoration: none; cursor: pointer; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
@media (hover: hover) { .next-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); } }
.next-img { position: relative; height: 230px; border-radius: var(--r-in); overflow: hidden; background: linear-gradient(135deg, var(--accent), var(--chip-2)); }
.next-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
@media (hover: hover) { .next-card:hover .next-img img { transform: scale(1.03); } }
.stamp { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; background: var(--card); color: var(--ink); font-weight: 600; font-size: 12.5px; padding: 6px 11px; border-radius: 10px; }
.stamp svg { width: 13px; height: 13px; }
.next-card h3 { font-size: 32px; line-height: 1; letter-spacing: -0.05em; margin: 14px 8px 4px; }
.next-card .meta { margin: 0 8px 8px; color: var(--ink-2); font-size: 13.5px; }
.trip-list { display: grid; gap: 10px; }
.trip-item { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 10px; border-radius: var(--r-card); background: var(--card); color: var(--ink); box-shadow: var(--shadow); transition: transform 0.15s; }
@media (hover: hover) { .trip-item:hover { transform: translateY(-2px); } }
.trip-thumb { width: 58px; height: 58px; border-radius: var(--r-in); object-fit: cover; flex: none; background: var(--chip); display: grid; place-items: center; font-size: 24px; overflow: hidden; }
.trip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trip-item .city { font-weight: 600; font-size: 17px; letter-spacing: -0.03em; }
.trip-item .grow { flex: 1; min-width: 0; }
.home-actions { margin-top: 14px; }
.section-label { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin: 26px 4px 10px; }
.empty { text-align: center; padding: 28px 16px; color: var(--ink-2); }
.steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 10px; align-items: flex-start; }
.steps li > b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 13px; flex: none; }

.notice { padding: 13px 16px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--ink); }
.view > .notice { background: var(--card); box-shadow: inset 0 0 0 2px var(--warn); }

/* ---------- Trip view layout ---------- */
.trip-view { display: grid; grid-template-columns: minmax(360px, 460px) 1fr; height: calc(100dvh - var(--topbar-h) - env(safe-area-inset-top)); }
.pane { display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.pane-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 14px 20px; -webkit-overflow-scrolling: touch; }
.map-wrap { position: relative; min-height: 0; padding: 0 14px 14px 0; }
#map { position: absolute; inset: 0 14px 14px 0; background: var(--chip); border-radius: var(--r-card); overflow: hidden; }
.leaflet-tile-pane { filter: var(--map-filter); }
.tab.only-mobile { display: none; }

.tabs { display: flex; gap: 4px; margin: 2px 14px 6px; padding: 4px; border-radius: var(--r); background: var(--tabs-bg); }
.tab {
  flex: 1; border: 0; background: transparent; padding: 9px 8px; border-radius: var(--r-in); font-weight: 600; font-size: 14px;
  color: color-mix(in srgb, var(--field-ink) 84%, transparent); cursor: pointer; display: inline-flex; justify-content: center; align-items: center; gap: 6px; transition: background-color 0.2s, color 0.2s;
}
.tab.active { background: var(--tabs-on); color: var(--ink); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; display: inline-grid; place-items: center; }
.badge.zero { background: var(--chip); color: var(--ink-3); }

.ask-bar { background: var(--card); color: var(--ink); border-radius: var(--r-card) var(--r-card) 0 0; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
.ask-row { display: flex; gap: 8px; }
.ask-row input { flex: 1; min-width: 0; min-height: 46px; padding: 0 16px; border-radius: var(--r); border: 1.5px solid transparent; background: var(--chip); color: var(--ink); outline: none; }
.ask-row input:focus { border-color: var(--accent); }
.ask-row .btn { width: 46px; min-height: 46px; padding: 0; }
.quick { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.quick .chip { padding: 6px 11px; font-size: 12.5px; }

@media (max-width: 860px) {
  .trip-view { display: block; position: relative; }
  .pane { height: 100%; }
  .tab.only-mobile { display: inline-flex; }
  .map-wrap { position: absolute; inset: 0; top: 54px; z-index: 5; display: none; padding: 0; background: var(--bg); }
  /* Same side margins as the tab menu, a gap below it, clear of the home bar. */
  #map { inset: 10px 14px calc(14px + env(safe-area-inset-bottom)) 14px; }
  .map-wrap .map-toggle { top: 22px; }
  .trip-view.show-map .map-wrap { display: block; }
  .trip-view.show-map .ask-bar { display: none; }
}

/* ---------- Trip header ---------- */
.trip-head { margin: 2px 4px 12px; color: var(--field-ink); }
.trip-head .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: color-mix(in srgb, var(--field-ink) 84%, transparent); }
.trip-head .title { font-size: 28px; font-weight: 600; letter-spacing: -0.05em; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.trip-head .title .btn { font-size: 13px; letter-spacing: 0; }
.trip-head .title .btn.ghost { color: var(--field-ink); }
.trip-head .fact { color: var(--ink); }

/* ---------- Chat / suggestions ---------- */
.feed { display: grid; gap: 12px; }
.bubble { padding: 11px 15px; border-radius: var(--r); max-width: 88%; font-size: 14.5px; }
.bubble.user { justify-self: end; background: var(--me); color: var(--me-ink); border-bottom-right-radius: 6px; }
.bubble.ai { justify-self: start; background: var(--card); color: var(--ink); border-bottom-left-radius: 6px; }
.bubble.ai .tiny { margin-top: 4px; }
.bubble.error { background: var(--warn-soft); color: var(--field-ink); }
.thinking { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.place { background: var(--card); color: var(--ink); border-radius: var(--r-card); padding: 16px; display: grid; gap: 8px; box-shadow: var(--shadow); transition: box-shadow 0.2s; }
.place.selected { box-shadow: 0 0 0 2.5px var(--accent); }
.place.flash { animation: flash 1.2s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 5px var(--accent); } 100% { box-shadow: var(--shadow); } }
.place-top { display: flex; gap: 10px; align-items: flex-start; }
.place-emoji { font-size: 20px; line-height: 1; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--chip); flex: none; }
.place-title { flex: 1; min-width: 0; }
.place-title h3 { font-size: 19px; line-height: 1.2; letter-spacing: -0.035em; }
.place-title .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.place p { margin: 0; color: var(--ink-2); font-size: 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; }
.fact { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; height: 28px; padding: 0 11px; border-radius: var(--r); background: var(--chip); white-space: nowrap; }
.fact.price { background: var(--price-bg); color: var(--price-ink); font-weight: 600; }
.fact .sub { font-weight: 400; opacity: 0.75; font-size: 12px; }
.fact.warn { background: var(--warn-soft); }
.tip { font-size: 13px; color: var(--ink-2); }
.place-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.place-actions .btn { flex: 1; min-width: 0; }

/* ---------- Plan ---------- */
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 12px; }
.stat { background: var(--card); color: var(--ink); border-radius: var(--r-inner); padding: 11px 13px; }
.stat .k { font-size: 12px; color: var(--ink-3); }
.stat .v { font-size: 17px; font-weight: 600; letter-spacing: -0.03em; }
.stat .v .sub { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.pane-body > p.muted, .pane-body > p.tiny { color: color-mix(in srgb, var(--field-ink) 84%, transparent); }
.pane-body > h2 { color: var(--field-ink); }
.day { margin-top: 22px; }
.day-head { display: flex; align-items: baseline; gap: 8px; margin: 0 4px 10px; flex-wrap: wrap; }
.day-head h2 { margin: 0; font-size: 20px; }
.day-head .muted { color: color-mix(in srgb, var(--field-ink) 84%, transparent); }
.timeline { position: relative; display: grid; gap: 0; }
.tl-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; }
.tl-time { font-weight: 600; font-size: 14px; padding-top: 12px; text-align: right; font-variant-numeric: tabular-nums; color: var(--field-ink); }
.tl-leg { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: color-mix(in srgb, var(--field-ink) 84%, transparent); padding: 7px 0 7px 14px; border-left: 2px dashed color-mix(in srgb, var(--field-ink) 30%, transparent); margin-left: 85px; flex-wrap: wrap; }
.tl-leg a { color: var(--field-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.tl-stop { background: var(--card); color: var(--ink); border-radius: var(--r-inner); padding: 11px 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; box-shadow: var(--shadow); min-width: 0; }
.tl-stop > * { min-width: 0; }
.tl-stop .head { display: flex; gap: 8px; align-items: flex-start; }
.num { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.num.hotel { background: var(--strong); color: var(--strong-ink); }
.tl-stop .name { font-weight: 600; flex: 1; min-width: 0; letter-spacing: -0.02em; }
.tl-stop .note { font-size: 13px; color: var(--ink-2); }
.tl-stop .tools { display: flex; gap: 2px; flex-wrap: nowrap; align-items: center; }
.tl-stop .tools .btn { flex-shrink: 0; }
.tl-stop .tools .btn.ghost { padding: 0 9px; }
.tl-stop .tools .btn.web { min-width: 0; max-width: 150px; flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; line-height: 36px; }
.tl-stop .tools .spacer { flex: 1; }
.tl-hotel { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--card) 55%, transparent); color: var(--field-ink); font-size: 14px; }
.plan-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.plan-actions .wide { grid-column: 1 / -1; }
.plan-actions .btn:not(.primary):not(.dark) { background: var(--card); }
.tips { margin: 12px 0 0; padding: 14px 16px 14px 34px; color: var(--ink-2); font-size: 14px; background: var(--card); border-radius: var(--r-inner); }
.picks-list { display: grid; gap: 8px; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; background: var(--card); color: var(--ink); border-radius: var(--r-inner); }
.pick-row .grow { flex: 1; min-width: 0; }
.pick-row .name { font-weight: 600; font-size: 14px; letter-spacing: -0.02em; }

/* ---------- Map markers & popups ---------- */
.mk { display: grid; place-items: center; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); font-size: 14px; }
.mk.sugg { width: 16px; height: 16px; background: #ffffff; border: 3px solid var(--accent); }
.mk.pick { width: 20px; height: 20px; background: var(--accent); border: 3px solid #ffffff; }
/* A spare pick: the same colour as a ring, so it reads as "an option". */
.mk.spare { width: 26px; height: 26px; background: #ffffff; color: var(--accent); border: 2px solid var(--accent); border-radius: 9px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.mk.spare svg { width: 13px; height: 13px; }
/* The airport: like the hotel, with the plane. */
.mk.airport { width: 30px; height: 30px; background: #141a22; color: #fff; border-radius: 9px; }
.mk.airport svg { width: 16px; height: 16px; transform: rotate(45deg); }
.mk.num { width: 30px; height: 30px; color: #fff; font-weight: 700; font-size: 13px; }
.mk.hotel { width: 30px; height: 30px; background: #141a22; color: #fff; font-weight: 700; font-size: 14px; border-radius: 9px; }
.leaflet-container { font-family: var(--font); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--card); color: var(--ink); }
.leaflet-popup-content-wrapper { border-radius: var(--r-inner); }
.leaflet-popup-content { margin: 12px 14px; }
.leaflet-popup-content .pop-title { font-weight: 600; font-size: 14.5px; margin-bottom: 2px; letter-spacing: -0.02em; }
.leaflet-popup-content .pop-meta { font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.leaflet-popup-content .btn { min-height: 32px; font-size: 13px; padding: 0 11px; }
.leaflet-bar a, .leaflet-bar a:hover { background: var(--card); color: var(--ink); border-color: var(--line); }
.leaflet-control-attribution { background: color-mix(in srgb, var(--card) 80%, transparent) !important; color: var(--ink-2); }
.leaflet-control-attribution a { color: var(--ink-2); }
.map-toggle { position: absolute; z-index: 500; top: 12px; left: 50%; transform: translateX(-50%); display: flex; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow-lift); padding: 4px; }
.map-toggle button { border: 0; background: transparent; padding: 7px 13px; border-radius: var(--r-in); font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.map-toggle button.active { background: var(--accent); color: var(--accent-ink); }

/* ---------- Dialogs ---------- */
dialog.sheet {
  border: 0; padding: 0; border-radius: var(--r-card); width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 40px);
  background: var(--card); color: var(--ink); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}
dialog.sheet::backdrop { background: rgba(5, 12, 20, 0.5); backdrop-filter: blur(2px); }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 16px 18px; position: sticky; top: 0; background: var(--card); z-index: 1; }
.sheet-head h2 { margin: 0; flex: 1; font-size: 21px; }
.sheet-body { padding: 4px 18px 18px; overflow-y: auto; }
.sheet-body h2 { font-size: 17px; }
.sheet-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
@media (max-width: 560px) {
  dialog.sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: var(--r-card) var(--r-card) 0 0; max-height: 92dvh; }
}
.key-row { display: flex; gap: 6px; }
.key-row input { flex: 1; min-width: 0; }
.status-line { font-size: 13px; margin-top: 6px; min-height: 18px; }
.status-line.ok { color: var(--ok); }
.status-line.err { color: var(--warn); }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: var(--r); background: var(--chip); }
.seg button { flex: 1; border: 0; background: transparent; padding: 8px 6px; border-radius: var(--r-in); font-weight: 600; font-size: 13.5px; color: var(--ink-2); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }

/* ---------- Toast ---------- */
/* Like a card: same width and colours as the rest; tap (or ×) to close. */
.toast {
  position: fixed; left: 16px; right: 16px; margin: 0 auto; max-width: 520px; bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 16px; min-height: 52px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: 0 12px 32px rgba(5, 12, 20, 0.18);
  font-size: 14.5px; opacity: 0; transform: translateY(12px); pointer-events: none; cursor: pointer;
  transition: opacity 0.18s, transform 0.18s; z-index: 3000;
}
.toast.show { opacity: 1; transform: none; pointer-events: auto; }
/* Above the chat bar while it is there. */
html.in-trip:has(#askForm:not([hidden])) .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
.toast-msg { flex: 1; min-width: 0; line-height: 1.35; padding: 6px 0; }
.toast-act { flex: none; border: 0; border-radius: var(--r-in); padding: 9px 14px; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer; }
.toast-x { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); display: grid; place-items: center; cursor: pointer; }
.toast-x .ico { width: 18px; height: 18px; }

.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Date & time picker ---------- */
.when { display: grid; gap: 8px; }
.when > * { min-width: 0; }
.when-label { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-top: 4px; }
.cal { border-radius: var(--r-inner); padding: 8px; background: var(--chip); max-width: 380px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 6px; }
.cal-head b { font-size: 15px; letter-spacing: -0.02em; }
.cal-nav { width: 36px; height: 36px; border-radius: var(--r-in); border: 0; background: var(--card); font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-grid .dow { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding: 2px 0 4px; }
.cal-day { aspect-ratio: 1; min-height: 36px; max-height: 46px; width: 100%; border: 0; border-radius: 12px; background: transparent; font-size: 14px; font-variant-numeric: tabular-nums; cursor: pointer; color: var(--ink); }
/* Hover only with a mouse – on phones a "sticky" hover hid the selection. */
@media (hover: hover) { .cal-day:not(.on):hover:not(:disabled) { background: var(--card); } }
.cal-day.past { color: var(--ink-3); }
.cal-day.range { background: var(--accent-soft); border-radius: 0; }
.cal-day.today { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.cal-day.on { background: var(--accent); color: var(--accent-ink); border-radius: 12px; font-weight: 700; }
.cal-day:disabled { opacity: 0.3; cursor: default; }
.when-time { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.when-hint { font-size: 13px; color: var(--ink-3); margin: -2px 2px 2px; }
.when-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px; row-gap: 4px; min-width: 0; margin-top: 2px; }
.when-row .when-label { grid-column: 1 / -1; margin: 0; }
.when-row .when-day { min-width: 0; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.when-row .time-select { width: 104px; }
.when-hours { flex-wrap: wrap; gap: 6px; }
.when-hours .chip { padding: 8px 11px; }
.when-summary .len { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-2); }
.time-select { width: 130px; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); border: 0; background: var(--chip); color: var(--ink); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.when-summary { margin-top: 4px; padding: 11px 14px; border-radius: var(--r-sm); background: var(--accent-soft); font-size: 14px; }
.when-summary.bad { background: var(--warn-soft); }

/* ---------- City autocomplete ---------- */
.ac { position: relative; }
.ac-list { position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 6px); background: var(--card); border-radius: var(--r-inner); box-shadow: var(--shadow-lift); overflow: hidden; display: grid; padding: 4px; }
.ac-list[hidden] { display: none; }
.ac-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: var(--r-sm); background: transparent; text-align: left; cursor: pointer; color: var(--ink); }
.ac-item:hover, .ac-item.active { background: var(--chip); }
.ac-name { flex: 1; min-width: 0; font-weight: 600; display: grid; }
.ac-country { font-weight: 400; font-size: 12.5px; color: var(--ink-3); }
.ac-codes { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 55%; }
.ac-code { font-size: 12px; font-weight: 700; color: var(--ink-2); background: var(--chip); padding: 4px 8px; border-radius: var(--r); white-space: nowrap; }

/* ---------- Photos ---------- */
.place.has-photo { padding-top: 8px; }
.place-photo { position: relative; display: block; margin: 0 -8px 4px; height: 186px; padding: 0; border: 0; border-radius: var(--r-in); background: var(--chip); cursor: zoom-in; overflow: hidden; }
.place-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s; }
@media (hover: hover) { .place-photo:hover img { transform: scale(1.03); } }
.photo-count { position: absolute; right: 10px; bottom: 10px; background: rgba(5, 12, 20, 0.65); color: #fff; font-size: 12px; font-weight: 500; padding: 4px 9px; border-radius: 8px; }
.own-badge { color: var(--ink-2); font-weight: 600; }
.mini { width: 42px; height: 42px; flex: none; border-radius: var(--r-in); overflow: hidden; padding: 0; border: 0; background: var(--chip); display: grid; place-items: center; font-size: 20px; }
button.mini { cursor: zoom-in; }
.mini img, img.mini { width: 42px; height: 42px; object-fit: cover; display: block; }
.pop-img { display: block; width: calc(100% + 28px); margin: -12px -14px 8px; height: 116px; object-fit: cover; border-radius: var(--r-inner) var(--r-inner) 0 0; cursor: zoom-in; }

dialog.lightbox { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: rgba(5, 10, 16, 0.97); color: #fff; display: none; flex-direction: column; }
dialog.lightbox[open] { display: flex; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, 0.8); }
.lb-top { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px 16px; }
.lb-title { flex: 1; min-width: 0; display: grid; }
.lb-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-title span { font-size: 12px; opacity: 0.7; }
.lb-stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; padding: 0 8px; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; user-select: none; -webkit-user-drag: none; }
.lb-btn { border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 20px; cursor: pointer; display: grid; place-items: center; }
@media (hover: hover) { .lb-btn:hover { background: rgba(255, 255, 255, 0.22); } }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 30px; line-height: 1; }
.lb-nav.prev { left: 12px; }
.lb-nav.next { right: 12px; }
.lb-bottom { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); font-size: 12.5px; }
.lb-bottom a { color: rgba(255, 255, 255, 0.8); }
.lb-bottom .btn { background: #fff; color: #141a22; }

/* ---------- Save to Google Maps ---------- */
.progress { height: 6px; border-radius: 3px; background: var(--chip); overflow: hidden; }
.progress div { height: 100%; background: var(--accent); transition: width 0.3s; }
.pick-row.done { opacity: 0.7; }
.sheet .pick-row { background: var(--chip); }
.gm-way { padding: 16px 0; border-top: 1px solid var(--line); }
.gm-way:first-child { padding-top: 0; border-top: 0; }
.gm-way h3 { font-size: 16px; margin-bottom: 4px; }
.gm-way p { margin: 0 0 10px; }
details summary { cursor: pointer; color: var(--ink-2); }

/* ---------- Website links ---------- */
.web-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { .web-link:hover { text-decoration-color: currentColor; } }
.pop-web { margin-top: 8px; }

/* ---------- Plan editing: drag, swap, remove ---------- */
.stops { min-height: 8px; }
.drop-hint { margin: 6px 0 6px 62px; padding: 14px; border: 2px dashed color-mix(in srgb, var(--field-ink) 30%, transparent); border-radius: var(--r-inner); text-align: center; font-size: 13px; color: var(--field-ink); }
.drag { flex: none; width: 30px; height: 30px; margin: -3px -2px 0 -6px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-3); font-size: 18px; line-height: 1; cursor: grab; touch-action: none; display: grid; place-items: center; }
.drag:active { cursor: grabbing; }
@media (hover: hover) { .drag:hover { background: var(--chip); color: var(--ink); } }
.drag-ghost { opacity: 0.35; }
.drag-chosen .tl-stop { box-shadow: var(--shadow-lift), 0 0 0 2px var(--accent); }
.sortable-fallback { opacity: 0.95 !important; }
.btn.icon-only { width: 36px; padding: 0; }
.swap-list { display: grid; gap: 8px; }
.swap-option { text-align: left; display: grid; gap: 6px; padding: 13px; border-radius: var(--r-inner); border: 2px solid transparent; background: var(--chip); color: var(--ink); cursor: pointer; }
@media (hover: hover) { .swap-option:hover { border-color: var(--accent); } }
.swap-option .name { font-weight: 600; }
.swap-option .fact { background: var(--card); }
.swap-option .fact.price { background: var(--price-bg); }

/* ---------- Theme button: shows the design it switches to next ---------- */
#themeBtn svg { display: none; }
#themeBtn[data-next='dark'] .moon, #themeBtn[data-next='blush'] .petal, #themeBtn[data-next='light'] .sun { display: block; }
/* ---------- Blush: blush field, light-pink cards, aubergine buttons & highlights ---------- */
:root[data-theme='blush'] {
  --brand-ai: var(--accent);
  --bg: #f2c6d8; --field-ink: #3d1238; --card: #fdeaf2; --chip: #f7d6e5; --chip-2: #efc4d8;
  --ink: #3d1238; --ink-2: #6b2f62; --ink-3: #8a4d80; --line: rgba(61, 18, 56, 0.14);
  --accent: #8e2c79; --accent-ink: #ffffff; --accent-soft: rgba(142, 44, 121, 0.12);
  --strong: #5c1a50; --strong-ink: #fdeaf2; --me: #8e2c79; --me-ink: #ffffff;
  --price-bg: #8e2c79; --price-ink: #ffffff;
  --tabs-bg: rgba(255, 255, 255, 0.4); --tabs-on: #fdeaf2;
  --ok: #2f7a52; --ok-soft: #e1eddc; --warn: #9a4b00; --warn-soft: #f9dccf;
  --toast: #5c1a50; --shadow: 0 1px 0 rgba(61, 18, 56, 0.05); --shadow-lift: 0 14px 34px rgba(92, 26, 80, 0.2);
  --map-filter: sepia(0.12) saturate(0.95);
  color-scheme: light;
}
.ac-note { padding: 12px 14px; font-size: 13.5px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }

/* ---------- Buttons inside their text field (chat, hotel, search, settings) ---------- */
.ask-row, .key-row { position: relative; display: block; }
.ask-row input { width: 100%; padding-right: 54px; }
.ask-row .btn { position: absolute; right: 5px; top: 5px; width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: var(--r-in); }
.key-row input { width: 100%; padding-right: 92px; }
.key-row > .btn { position: absolute; right: 5px; top: 5px; height: 36px; min-height: 36px; padding: 0 13px; font-size: 13.5px; border-radius: var(--r-in); }
.key-row > .btn:not(.primary) { background: var(--card); }
.field .key-row input:focus ~ .btn, .key-row:focus-within > .btn:not(.primary) { background: var(--chip); }

/* ---------- Simple line icons and letter placeholders ---------- */
.ico { width: 15px; height: 15px; flex: none; }
.icon-btn .ico { width: 18px; height: 18px; }
.btn .ico { width: 16px; height: 16px; }
.mini.emoji, .trip-thumb span { font-weight: 600; color: var(--ink-2); font-size: 17px; text-transform: uppercase; }
.trip-thumb span { font-size: 22px; }
.tip b, .tl-stop .note b { font-weight: 600; color: var(--ink); margin-right: 2px; }

/* ---------- Keep the screen steady on phones ---------- */
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body { overscroll-behavior: none; }
.pane-body, .sheet-body, .view { overscroll-behavior: contain; }
input, select, textarea, .ask-row input, .key-row input, .time-select { font-size: 16px; }

/* ---------- Drive legs as chips; plan cards like Discover cards ---------- */
.tl-leg { gap: 6px; padding: 8px 0 8px 14px; }
.tl-leg .fact { height: 26px; font-size: 12px; background: color-mix(in srgb, var(--card) 72%, transparent); color: var(--ink); }
.tl-leg a.fact { text-decoration: none; font-weight: 600; }
.fact .ico { width: 14px; height: 14px; opacity: 0.85; }
.tl-stop { gap: 8px; padding: 12px; }
.tl-stop .head { align-items: center; }
.tl-stop .name { font-size: 15.5px; }
.place-actions .btn.icon-only { flex: none; width: 36px; }

/* ---------- Send: just the arrow inside the field ---------- */
.ask-row .btn, .ask-row .btn.primary { background: transparent; color: var(--accent); width: 40px; height: 40px; right: 3px; top: 3px; }
.ask-row .btn svg { width: 22px; height: 22px; }
@media (hover: hover) { .ask-row .btn:hover:not(:disabled) { filter: none; opacity: 0.75; } }

/* ---------- "Add your own place" at the end of the suggestions ---------- */
.own-cta { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r); color: var(--field-ink); border: 1.5px dashed color-mix(in srgb, var(--field-ink) 32%, transparent); }
.own-cta .grow { flex: 1; min-width: 0; }
.own-cta .tiny { color: color-mix(in srgb, var(--field-ink) 80%, transparent); margin-top: 2px; }
.own-cta .btn { flex: none; background: var(--card); }

/* ---------- Vector base map (OpenFreeMap) ---------- */
.gl-map .leaflet-tile-pane { filter: none; } /* colours come from the map style itself */
.leaflet-gl-layer, .maplibregl-canvas { outline: none; }

/* ---------- Places arriving from the AI ---------- */
.place.preview { opacity: 0.88; }
.fact.loading-bar { width: 46px; padding: 0; background: linear-gradient(90deg, var(--chip) 25%, var(--chip-2) 50%, var(--chip) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .fact.loading-bar { animation: none; } }

/* ---------- Swap options with photo ---------- */
.swap-option { grid-template-columns: minmax(0, 1fr); }
.swap-option.has-img { grid-template-columns: 76px minmax(0, 1fr); align-items: start; gap: 12px; }
.swap-img { width: 76px; height: 76px; border-radius: var(--r-in); overflow: hidden; background: var(--chip-2); }
.swap-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.swap-text { display: grid; gap: 4px; min-width: 0; }
.swap-option:disabled { opacity: 0.75; cursor: progress; }

/* ---------- Send: a round button inside the field ---------- */
.ask-row .btn, .ask-row .btn.primary { background: var(--accent); color: var(--accent-ink); width: 36px; height: 36px; min-height: 36px; right: 5px; top: 5px; border-radius: 50%; }
.ask-row .btn svg { width: 17px; height: 17px; margin-left: -1px; }
@media (hover: hover) { .ask-row .btn:hover:not(:disabled) { opacity: 1; filter: brightness(1.1); } }

/* ---------- Picks & plan: calmer spacing ---------- */
.pane-body > h2 { margin: 6px 4px 12px; }
.picks-list { gap: 10px; }
.pick-row { padding: 10px 8px 10px 10px; gap: 12px; }
.pick-row .name { line-height: 1.3; }
.pick-row .tiny { margin-top: 2px; }
.picks-list + .summary-grid { margin-top: 16px; }
.summary-grid { gap: 10px; }
.summary-grid:has(> .stat:nth-child(2):last-child) { grid-template-columns: 1fr 1fr; }
.cost-card { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 14px 16px; margin: 2px 0 14px; border-radius: var(--r); background: var(--card); color: var(--ink); }
.cost-card .k { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.cost-card .v { font-size: 24px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; }
.cost-card .split { text-align: right; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.day { margin-top: 26px; }
.day-head { margin-bottom: 12px; }

/* ---------- My plan: Picks · Itinerary switch, reorderable picks ---------- */
.plan-seg { margin: 0 0 14px; background: color-mix(in srgb, var(--card) 55%, transparent); }
.plan-seg button.on { background: var(--card); }
.pick-row .drag { margin: 0 -4px 0 -4px; }
.btn.icon-only .ico, a.btn.icon-only .ico { width: 18px; height: 18px; }
.trip-head .title .btn.icon-only { width: 40px; min-height: 40px; color: var(--field-ink); }

.more-btn { background: var(--card); }

/* ---------- Swap sheet = a small Discover ---------- */
dialog.sheet:has(.swap-body)[open] { display: flex; flex-direction: column; height: min(88dvh, 820px); }
.swap-body { flex: 1; min-height: 0; overflow-y: auto; background: var(--bg); padding: 14px; }
.swap-body .place { box-shadow: var(--shadow); }
.swap-ask { border-radius: 0; }
@media (max-width: 560px) { dialog.sheet:has(.swap-body)[open] { height: 92dvh; } }

/* ---------- Google Maps actions: route vs. save ---------- */
.gm-action { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: var(--r-in); background: var(--card); color: var(--ink); text-align: left; font: inherit; text-decoration: none; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.gm-action:hover { box-shadow: var(--shadow); }
.gm-action:active { transform: scale(.98); }
.gm-action .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gm-action b { font-size: 15px; }
.gm-action .tiny { color: var(--ink-3); }
.gm-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.gm-ico .ico { width: 20px; height: 20px; margin: 0; }
.gm-action.primary { background: var(--strong); color: var(--strong-ink); }
.gm-action.primary .tiny { color: inherit; opacity: .75; }
.gm-action.primary .gm-ico { background: rgba(255, 255, 255, .14); color: inherit; }
.gm-go { flex: none; color: var(--ink-3); font-size: 18px; }

/* ---------- Discover = a chat ---------- */
/* Suggestions: a bit more compact. */
.feed > .place { padding: 12px 14px; gap: 6px; }
.feed > .place.has-photo { padding-top: 6px; }
.feed > .place .place-photo { height: 128px; margin: 0 -8px 2px; }
.feed > .place .place-title h3 { font-size: 16.5px; }
.feed > .place .place-title .sub { font-size: 12px; }
.feed > .place p { font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feed > .place .fact { height: 26px; padding: 0 9px; font-size: 12px; }
.feed > .place .tip { font-size: 12.5px; }
.feed > .place .web-link { font-size: 13px; }
.feed > .place .place-actions .btn { min-height: 34px; }
/* The chip row scrolls sideways instead of widening the feed. */
.feed { grid-template-columns: minmax(0, 1fr); }

/* A slim message field docked at the bottom – no panel, just the pill. */
/* The message bar stands apart: its own surface with a soft edge to the feed. */
.pane > .ask-bar { background: var(--card); border-radius: var(--r-card) var(--r-card) 0 0; box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, 0.18); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); position: relative; z-index: 1; }
.pane > .ask-bar .ask-row input { background: var(--chip); border-radius: 999px; padding-left: 18px; }
/* Quick ideas as reply chips in the chat. */
.feed-quick { flex-wrap: wrap; overflow: visible; padding: 0; }
.feed-quick .chip { background: var(--card); }
/* Keyboard open on a phone: the app is exactly as tall as the visible area. */
.trip-view { height: calc(var(--app-h, 100dvh) - var(--topbar-h) - env(safe-area-inset-top)); }
html.kb, html.kb body { height: var(--app-h); overflow: hidden; }
html.kb .pane > .ask-bar { padding-bottom: 8px; }
/* Reply chips: one row to swipe sideways, edge to edge. */
.feed-quick { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 0 14px 2px; }

/* Tip on iPhone Safari: add to the home screen. */
.install-hint { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px 10px 12px 16px; border-radius: var(--r); background: var(--card); color: var(--ink); }
.install-hint .grow { flex: 1; min-width: 0; }
.install-hint .tiny { margin-top: 3px; color: var(--ink-2); }

/* Phones: the chat bar's colour reaches all the way down – to the keyboard or
   under Safari's toolbar – whether or not the browser shrinks the page. */
@media (max-width: 860px) {
  /* Safari tints the space outside the page (around its keyboard and toolbar)
     with the page background – so in a layover that is the chat bar colour.
     The top bar and the content paint their own background on top. */
  html.in-trip, html.in-trip body { background: var(--card); }
  /* A solid shadow paints the bar colour below it without making the page scrollable. */
  html.in-trip .pane > .ask-bar { box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, 0.18), 0 50vh 0 50vh var(--card); }
  html.in-trip .trip-view.show-map .ask-bar { box-shadow: none; }
}
html.kb, html.kb body { background: var(--card); }

/* ---------- Sign-in ---------- */
.login { display: grid; gap: 12px; margin-top: 8px; }
.login .field { margin: 0; }
.login .btn.ghost { justify-self: center; }
.login-note { text-align: center; margin-top: 12px; color: color-mix(in srgb, var(--field-ink) 80%, transparent); }
.login .status-line:empty { display: none; }

/* ---------- Tip with a lightbulb ---------- */
.tip { display: flex; gap: 6px; align-items: flex-start; }
.tip > .ico { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--accent); }


/* ---------- One icon style ----------
   All interface icons are outlines with exactly the same line thickness,
   whatever size they are shown at (the logo stays a filled shape). */
:root { --icon-stroke: 1.8px; }
svg.ico [stroke], svg.i [stroke] { stroke-width: var(--icon-stroke); vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn svg.ico, #backBtn svg.ico { --icon-stroke: 2px; }
/* Lines inside a group keep their width too (vector-effect is not inherited). */
svg.ico [stroke] *, svg.i [stroke] * { vector-effect: non-scaling-stroke; }
/* The icons at the top of a layover match the settings icon. */
.trip-head .title .btn.icon-only svg.ico { --icon-stroke: 2px; }

/* ---------- Password: smaller, airier dots ---------- */
input[type='password'] { font-size: 14px; letter-spacing: 0.12em; }
input[type='password']::placeholder { letter-spacing: normal; }

/* ---------- Calendar: the whole stay in the same colour as the start ---------- */
.cal-day.range { background: var(--accent); color: var(--accent-ink); border-radius: 12px; font-weight: 600; }

/* ---------- Home: the big card's text sits as tight as on the small ones ---------- */
.next-body { display: flex; align-items: center; gap: 8px; padding: 12px 4px 4px 8px; }
.next-body .grow { flex: 1; min-width: 0; }
.next-card .next-body h3 { margin: 0 0 4px; }
.next-card .next-body .meta { margin: 0; }

/* ---------- My plan: time control, "Not in the plan yet" ---------- */
button.fact { border: 0; font: inherit; font-size: 12.5px; font-weight: 500; color: inherit; cursor: pointer; }
.fact.time-edit.edited { box-shadow: inset 0 0 0 1.5px var(--accent); }
.dur-edit { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.dur-edit span { flex: 1; text-align: center; font-size: 13px; font-weight: 600; }
.dur-edit .btn { flex: none; }
.unsched-list { display: grid; gap: 10px; margin-bottom: 6px; }
.unsched-item { display: grid; gap: 8px; padding: 10px; border-radius: var(--r-card); background: var(--card); color: var(--ink); box-shadow: var(--shadow); min-width: 0; }
.unsched-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.unsched-top .grow { flex: 1; min-width: 0; }
.unsched-top .name { font-weight: 600; overflow-wrap: anywhere; }
.unsched-add { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Spreading several days ---------- */
.build-box { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-card); background: var(--card); color: var(--ink); box-shadow: var(--shadow); margin: 6px 0 8px; }
.build-title { font-weight: 600; font-size: 15px; }
.build-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.build-modes .btn { min-width: 0; }
.build-box .tiny { margin: 0; }
.mode-seg { margin-bottom: 12px; }

/* ---------- Sheets: the head and the buttons stay, only the content scrolls ---------- */
dialog.sheet[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog.sheet > .sheet-head, dialog.sheet > .sheet-foot { flex: none; }
dialog.sheet > .sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
dialog.sheet > .sheet-foot { border-top: 1px solid var(--line); background: var(--card); }
dialog.sheet > .sheet-foot .btn.primary { min-width: 120px; }

/* ---------- Settings ---------- */
#settingsDlg div.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
#settingsDlg .chips .chip { padding: 7px 12px; font-size: 13px; }
.settings-body { padding-top: 0; }
.lbl-ico { display: flex !important; align-items: center; gap: 6px; }
.lbl-ico .ico { width: 16px; height: 16px; }
.set-group { padding: 16px 0 18px; border-top: 1px solid var(--line); }
.set-group:first-child { border-top: 0; padding-top: 4px; }
.set-group h3 { margin: 0 0 12px; font-size: 16px; font-weight: 600; color: var(--ink); }
.set-group h3 .tiny { font-weight: 400; }
.set-group .field:last-child { margin-bottom: 0; }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.set-row .field { margin-bottom: 14px; }
.set-row:has(.set-narrow) { grid-template-columns: minmax(0, 1fr) 96px; }
.set-how { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.set-how .ico { width: 17px; height: 17px; vertical-align: -3px; margin: 0 1px; }
.set-account { display: flex; align-items: center; gap: 12px; }
.set-account .grow { flex: 1; min-width: 0; }
.set-account .btn { flex: none; }
.set-account .grow { font-size: 14.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-credits { margin: 4px 0 0; padding-top: 14px; border-top: 1px solid var(--line); line-height: 1.5; }
.set-privacy { margin: 4px 0 10px; line-height: 1.5; }

/* ---------- Sharing ---------- */
.shared-line { font-size: 13px; margin: -2px 0 6px; color: color-mix(in srgb, var(--field-ink) 85%, transparent); }
.share-body h3 { font-size: 15px; margin: 18px 0 6px; }
.share-body h3:first-child { margin-top: 0; }
.share-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.share-form input { grid-column: 1 / -1; min-height: 46px; padding: 0 14px; border-radius: var(--r-in); border: 1.5px solid transparent; background: var(--chip); color: var(--ink); font-size: 16px; }
.share-form select, .person select { min-height: 40px; padding: 0 10px; border-radius: var(--r-in); border: 0; background: var(--chip); color: var(--ink); font: inherit; font-size: 14px; }
.share-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.people { display: grid; gap: 8px; }
.person { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-in); background: var(--chip); }
.person .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
/* View only: nothing that changes the layover. */
.read-only .pane > .ask-bar, .read-only [data-toggle], .read-only [data-swap], .read-only [data-remove], .read-only .drag,
.read-only [data-addto], .read-only .build-box, .read-only [data-act="build"], .read-only .feed-quick, .read-only .notice [data-act="build"] { display: none !important; }
.read-only .fact.time-edit { pointer-events: none; }

/* ---------- Times you can change; the Share pill ---------- */
.tl-time.time-btn { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 4px; }
.fact.time-edit .edit-hint { display: inline-flex; margin-left: 2px; opacity: 0.55; }
.fact.time-edit .edit-hint .ico { width: 12px; height: 12px; }
.time-panel { display: grid; gap: 6px; margin-top: 2px; padding: 8px; border-radius: var(--r-in); background: var(--chip); }
.time-panel .dur-edit { margin: 0; }
.time-panel .lbl { width: 74px; flex: none; text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.time-panel .dur-edit b { flex: 1; text-align: center; font-size: 13.5px; }
.time-panel .btn { background: var(--card); }
.share-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--card); color: var(--ink); padding: 0 12px; }
.share-btn .ico { width: 16px; height: 16px; }
.trip-head .title .share-btn { font-size: 13px; font-weight: 600; letter-spacing: 0; }

.time-panel { gap: 8px; }
.tp-row { display: grid; gap: 4px; min-width: 0; }
.tp-row .lbl { width: auto; font-size: 12px; }
.tp-row .dur-edit { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; gap: 8px; }
.tp-row .dur-edit .btn { min-width: 0; width: 100%; }
.tp-row .dur-edit b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bubble { overflow-wrap: anywhere; }

/* ---------- Greeting with her name; leaving time ---------- */
.hello .hi { display: block; background: none; color: inherit; padding: 0; transform: none; font-size: 0.5em; letter-spacing: -0.03em; margin-bottom: 8px; overflow-wrap: anywhere; }
.tl-hotel-wrap { flex: 1; min-width: 0; display: grid; gap: 6px; }

/* ---------- Spare picks ---------- */
.spare-head { margin: 18px 4px 8px; font-size: 16px; }
.pick-row.spare { opacity: 0.92; }
.pick-row.spare .mini { filter: saturate(0.6); }
.pick-acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.pick-acts .btn { min-height: 32px; padding: 0 12px; font-size: 13px; }

/* ---------- A safety note on a place ---------- */
.tip.caution { color: var(--ink-2); }
.tip.caution > .ico { color: #c77700; }
.pop-tag { display: inline-flex; align-items: center; gap: 5px; margin: 4px 0 8px; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: 12px; font-weight: 600; }
.pop-tag svg { width: 12px; height: 12px; color: var(--accent); }
.kind-seg { margin-bottom: 16px; }
.city-found { margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.city-found.err { color: var(--warn); }
/* Date picker: the small card on the tapped day, and one plain summary line. */
.when { position: relative; }
.cal.dim .cal-day:not(.on) { opacity: 0.45; }
.when-pop { position: absolute; left: 8px; right: 8px; z-index: 5; display: grid; gap: 10px; padding: 12px 14px 14px; border-radius: var(--r-inner); background: var(--card); color: var(--ink); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05); max-width: 364px; }
.when-pop::before { content: ''; position: absolute; top: -7px; left: var(--arrow, 40px); width: 14px; height: 14px; background: var(--card); transform: rotate(45deg); box-shadow: -2px -2px 3px rgba(0, 0, 0, 0.04); }
.when-pop-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: -6px; }
.when-k { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.when-x { width: 32px; height: 32px; margin: -6px -8px -6px 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.when-x .ico { width: 18px; height: 18px; }
.when-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.when-v { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; min-width: 0; }
.when-pop .time-select { width: 112px; }
.when-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: -4px; }
.when-quick .chip { padding: 9px 0; text-align: center; }
.when-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 2px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--accent-soft); font-size: 14px; font-weight: 500; }
.when-summary .len { display: inline; margin: 0; font-size: 14px; color: inherit; white-space: nowrap; }
.when-summary.hint { color: var(--ink-2); }
.when-summary .nw { white-space: nowrap; }
/* The small × in a filled search field (city, hotel): tap it to search again. */
.field-clear { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: var(--card); color: var(--ink-3); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.field-clear[hidden] { display: none; }
.field-clear .ico { width: 15px; height: 15px; }
.ac:has(.field-clear:not([hidden])) > input { padding-right: 46px; }
/* Hotel: the × sits left of the Find button inside the field. */
.key-row .field-clear { right: 90px; }
.key-row .ac:has(.field-clear:not([hidden])) > input { padding-right: 126px; }
/* Like the clear button in iPhone search fields: a small grey disc, the same in every state. */
.field-clear { width: 22px; height: 22px; right: 14px; background: var(--ink-3); color: var(--card); opacity: 0.85; }
.field-clear .ico { width: 12px; height: 12px; stroke-width: 3; }
.key-row .field-clear { right: 98px; }
.field-clear::after { content: ''; position: absolute; inset: -11px; } /* a finger-sized target */

/* ---------- Desktop polish ---------- */
/* The calendar fills the form like the other fields; wide screens show two months. */
.cal { max-width: none; }
.cal.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 10px 12px; }
.cal-nav-gap { width: 36px; height: 36px; }
.cal.pair .cal-day { max-height: 42px; }
.when-pop { right: auto; max-width: none; }

/* Selects (times, language, currency): our own arrow with room to breathe, the same everywhere. */
select:not([multiple]):not(#_) {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%237d8897' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 11px 8px;
  cursor: pointer;
}
.time-select:not(#_) { text-align: left; }

/* Scrollbars: thin and round, in the app's colours (not the system's grey bar). */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: rgba(125, 136, 151, 0.4); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(125, 136, 151, 0.65); }
::-webkit-scrollbar-corner { background: transparent; }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: rgba(125, 136, 151, 0.5) transparent; }
}

/* Home on wide screens: the other layovers in two columns. */
@media (min-width: 760px) {
  .trip-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Below the calendar: the stay as a small grey line with a tick, like the town and the hotel. */
.when-summary:not(#_) { display: block; margin-top: 8px; padding: 0; border-radius: 0; background: none; font-size: 13px; font-weight: 400; color: var(--ink-2); }
.when-summary.hint:not(#_) { color: var(--ink-3); }
.when-summary.err:not(#_) { color: var(--warn); }
/* Discover header: a middle dot between the hotel and the dates. */
.trip-head .meta:not(#_) { display: block; }
.trip-head .meta > span { display: inline; }
.trip-head .meta > span:not(:last-child)::after { content: '\00a0\00b7 '; padding: 0 3px; }

/* ---------- The first-time guide (js/onboarding.js) ---------- */
dialog.onb { padding: 0; border: 0; margin: 0; width: 100%; height: 100%; max-width: none; max-height: none; background: transparent; color: var(--ink); }
dialog.onb::backdrop { background: rgba(10, 20, 35, 0.5); }
.onb-sheet { position: absolute; left: 0; right: 0; bottom: 0; height: min(676px, calc(100dvh - 40px)); box-sizing: border-box; display: flex; flex-direction: column; padding: 10px 22px calc(26px + env(safe-area-inset-bottom)); border-radius: 30px 30px 0 0; background: var(--card); box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2); animation: onb-up 0.28s ease-out; overflow: hidden; }
@keyframes onb-up { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .onb-sheet { animation: none; } }
@media (min-width: 700px) {
  .onb-sheet { left: 50%; right: auto; bottom: 50%; width: 420px; transform: translate(-50%, 50%); border-radius: 30px; animation: none; }
  .onb-grab { visibility: hidden; }
}
.onb-grab { flex: none; width: 40px; height: 5px; margin: 0 auto 12px; border-radius: 9px; background: var(--chip); }
.onb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.onb-dots { display: flex; gap: 6px; }
.onb-dots i { width: 7px; height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 20%, transparent); transition: width 0.2s; }
.onb-dots i.on { width: 22px; background: var(--accent); }
.onb-x { width: 34px; height: 34px; border: 0; border-radius: 99px; background: var(--chip); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.onb-x .ico { width: 16px; height: 16px; }
.onb-pic { flex: none; position: relative; height: min(300px, 36dvh); display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 24px; background: var(--bg); }
.onb-pic > img { max-width: calc(100% - 28px); max-height: calc(100% - 28px); border-radius: 14px; box-shadow: 0 6px 20px rgba(10, 20, 35, 0.12); }
.onb-pic > img.top { align-self: flex-start; margin-top: 14px; max-height: none; width: calc(100% - 28px); object-fit: cover; object-position: top; height: calc(100% - 14px); border-radius: 14px 14px 0 0; }
.onb-pic > img.top.short { height: calc(100% - 64px); border-radius: 14px; }
.onb-pic.cover > img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; border-radius: 0; box-shadow: none; }
.onb-chat { width: 100%; height: 100%; box-sizing: border-box; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.onb-chat .bubble { margin: 0; padding: 9px 12px; max-width: 82%; font-size: 13.5px; }
.onb-chat .bubble.user { align-self: flex-end; }
.onb-chat .bubble.ai { align-self: flex-start; }
.onb-chat img { width: 100%; border-radius: 14px; box-shadow: 0 6px 20px rgba(10, 20, 35, 0.12); }
.onb-tags { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.onb-tags.left { justify-content: flex-start; }
.onb-tags span { padding: 7px 12px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.onb-tags span.light { background: var(--card); color: var(--ink); }
.onb-step { min-height: 18px; margin: 18px 0 4px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-3); }
dialog.onb h2 { margin: 0 0 8px; font-size: 25px; line-height: 1.12; letter-spacing: -0.035em; }
dialog.onb p { margin: 0; font-size: 15.5px; line-height: 1.45; color: var(--ink-2); }
.onb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.onb-chips span { padding: 7px 12px; border-radius: 99px; background: var(--chip); font-size: 12.5px; font-weight: 600; }
.onb-lang { display: block; margin-top: 16px; }
.onb-k { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.onb-k .ico { width: 15px; height: 15px; }
.onb-seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--chip); }
.onb-seg button { flex: 1; min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .15s, box-shadow .15s; }
.onb-seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .14); }
.onb-grow { flex: 1; min-height: 12px; }
.onb-nav { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }

/* "Create my itinerary": one free-standing button in the accent colour; for several days two small pills below. */
.build-cta-wrap { margin: 10px 0 16px; }
.build-cta { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 56px; border: 0; border-radius: 18px; background: var(--accent); color: var(--accent-ink); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; cursor: pointer; transition: transform 0.15s, filter 0.15s; }
.build-cta .ico { width: 19px; height: 19px; }
.build-cta:active { transform: scale(0.98); }
@media (hover: hover) { .build-cta:hover { filter: brightness(1.08); } }
.build-pills { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 13px; }
.build-pills .k { color: var(--ink-2); margin-right: 2px; }
.build-pill { padding: 6px 12px; border: 0; border-radius: 99px; background: var(--card); color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer; }
.build-pill.on { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--accent); }
.read-only .build-cta-wrap { display: none !important; }
/* The guide, round 2: a taller card and picture, whole pictures, the chat with its bar. */
.onb-sheet:not(#_) { height: min(740px, calc(100dvh - 24px)); }
.onb-pic:not(#_) { height: min(360px, 42dvh); }
.onb-pic > img.short { max-height: calc(100% - 70px); align-self: flex-start; margin-top: 14px; }
.onb-chat { justify-content: flex-end; }
.onb-chat img.info { width: 100%; border-radius: 14px; box-shadow: 0 6px 20px rgba(10, 20, 35, 0.12); }
.onb-ask { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 99px; background: var(--card); box-shadow: 0 6px 20px rgba(10, 20, 35, 0.1); }
.onb-ask span { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.onb-ask i { flex: none; width: 34px; height: 34px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; }
.onb-ask .ico { width: 17px; height: 17px; }
/* The guide's height follows its content (set in js/onboarding.js); the probe measures it unseen. */
.onb-probe:not(#_) { height: auto; visibility: hidden; pointer-events: none; animation: none; }
.onb-sheet { transition: height 0.25s ease; }
.onb-grow:not(#_) { min-height: 20px; }
/* Invite link in Settings: the whole link, small, easy to select */
.invite-link .input { font-size: 13px; min-height: 40px; }
/* Guests: trying the app without an account */
.try-card { margin-top: 12px; display: grid; gap: 10px; }
.guest-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 4px 14px; font-size: 14px; color: var(--ink-2); }
/* Cloudflare's bot check: only visible when it needs a tap */
.captcha-box { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 1000; }
.captcha-box:empty { display: none; }
/* The guest's "keep your layover" sheet: from below, at least half the screen */
dialog.guest-sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: calc(100dvh - 24px); border-radius: 30px 30px 0 0; background: var(--card); color: var(--ink); box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25); animation: onb-up 0.28s ease-out; }
dialog.guest-sheet::backdrop { background: rgba(5, 12, 20, 0.5); backdrop-filter: blur(2px); }
.gs { position: relative; min-height: 52dvh; display: flex; flex-direction: column; gap: 12px; padding: 26px 22px calc(22px + env(safe-area-inset-bottom)); overflow-y: auto; }
.gs-x { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--chip); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.gs-x .ico { width: 16px; height: 16px; }
.gs-title { margin: 6px 44px 0 0; font-size: 36px; }
.gs-why { margin: 0; font-size: 17px; color: var(--ink-2); }
.gs-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 15px; }
.gs-list li::before { content: '✓'; display: inline-block; width: 22px; font-weight: 700; color: var(--accent); }
.gs-form { display: grid; gap: 10px; margin-top: 4px; }
@media (min-width: 700px) { dialog.guest-sheet { margin: auto; border-radius: 30px; } .gs { min-height: 0; } }

/* ---------- Date picker: the two lines under the calendar (day + time each) ---------- */
.when-lines { display: grid; gap: 6px; }
.when-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: var(--r-sm); background: var(--chip); }
.when-line.blank { opacity: 0.6; } /* (not ".empty": that one centres the empty lists) */
.when-line.focus { box-shadow: inset 0 0 0 2px var(--accent); }
.when-line-text { display: grid; min-width: 0; }
.when-line .when-v { font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.when-line .time-select { width: 100px; min-height: 40px; background: var(--card); }
/* The hint under the calendar: like the line under the hotel (grey, no box). */
.when .when-hint { margin: -2px 2px 0; padding: 0; background: none; color: var(--ink-2); font-size: 13px; font-weight: 400; }
.when-note { margin: 0 2px; font-size: 12.5px; line-height: 1.4; color: var(--ink-3); }
