/* TripToClip guided trip builder — glass question cards over a live map. */
@font-face { font-family: "Outfit"; src: url("../fonts/Outfit.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0b1020;
  --glass: rgba(12, 17, 30, .84);
  --glass-2: rgba(255, 255, 255, .055);
  --glass-3: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --ink: #f2f5fa;
  --ink-2: #c9d2de;
  --muted: #8f9bb0;
  --accent: #ff4f7b;
  --accent-2: #ff8a3d;
  --accent-soft: rgba(255, 79, 123, .16);
  --sky: #2f6bff;
  --sea: #0aa6c9;
  --ok: #5fd39a;
  --warn: #f2c14e;
  --err: #ff8080;
  --go: linear-gradient(100deg, #ff4f7b 0%, #ff7a45 100%);
  --brand: linear-gradient(90deg, #0a6cff 0%, #00d4f0 32%, #ffd21a 55%, #ff7a1a 74%, #ff2d78 100%);
  --radius: 22px;
  --display: "Outfit", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
:root:not([data-theme="light"]) { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #7fe3ff; outline-offset: 2px; }

.g-app { position: fixed; inset: 0; }
.g-map { position: absolute; inset: 0; background: radial-gradient(120% 90% at 70% 40%, #1d3b66 0%, #0b1020 70%); }
.g-map.map-failed::after { content: ""; position: absolute; inset: 0; background: url("../img/contours.svg") center / 900px repeat; opacity: .12; }
.g-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 12, 24, .55) 0, rgba(8, 12, 24, 0) 120px), linear-gradient(90deg, rgba(8, 12, 24, .5) 0, rgba(8, 12, 24, .12) 560px, rgba(8, 12, 24, 0) 760px); }

/* ---- Top bar ------------------------------------------------------------------------------- */
.g-top { position: absolute; top: 0; left: 0; right: 0; height: 68px; display: flex; align-items: center; gap: 18px; padding: 0 22px; z-index: 3; }
.g-logo { display: flex; flex: none; }
.g-logo img { height: 30px; width: auto; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .45)); }
.g-progress { flex: 0 1 600px; margin: 0 auto; padding: 0 10px; border-radius: 14px; background: rgba(12, 17, 30, .55); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); } /* the five steps: core/progress.js, progress.css */
.g-exit { flex: none; color: #fff; text-decoration: none; font-size: .85rem; font-weight: 600; padding: 8px 14px; border-radius: 99px; background: rgba(12, 17, 30, .55); border: 1px solid var(--line-2); backdrop-filter: blur(10px); }
.g-exit:hover { background: rgba(12, 17, 30, .8); }

/* ---- The card ------------------------------------------------------------------------------ */
.g-stage { position: absolute; top: 80px; left: 26px; bottom: 26px; width: min(510px, calc(100vw - 52px)); display: flex; z-index: 2; }
.g-card { flex: 1; display: flex; min-height: 0; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); overflow: hidden; }
.g-inner { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.g-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 34px 32px 20px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.g-eyebrow { margin: 0 0 10px; font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.g-title { margin: 0; font: 700 2.15rem/1.12 var(--display); letter-spacing: -.01em; text-wrap: balance; }
.g-sub { margin: 10px 0 0; color: var(--ink-2); font-size: 1.02rem; text-wrap: pretty; }
.g-body { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.g-hint { margin: 0; color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.g-warn { margin: 0; color: var(--warn); font-size: .9rem; }

.g-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px 18px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .12); }
.g-foot-r { display: flex; align-items: center; gap: 8px; }
.g-back, .g-skip, .g-link { background: none; border: 0; color: var(--ink-2); padding: 10px 12px; border-radius: 12px; font-weight: 600; }
.g-back:hover, .g-skip:hover, .g-link:hover { background: var(--glass-2); color: var(--ink); }
.g-link { padding: 6px 10px; color: #ffb0c4; font-size: .9rem; }
.g-next { display: inline-flex; align-items: center; gap: 10px; border: 0; padding: 13px 22px; border-radius: 99px; background: var(--go); color: #fff; font-weight: 700; font-size: 1rem;
  box-shadow: 0 8px 22px rgba(255, 79, 123, .35); transition: transform .15s, box-shadow .15s, opacity .15s; }
.g-next:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(255, 79, 123, .45); }
.g-next:active:not(:disabled) { transform: translateY(1px); }
.g-next:disabled { opacity: .4; cursor: default; box-shadow: none; }
.g-arrow { transition: transform .2s; }
.g-next:hover .g-arrow, .g-big:hover .g-arrow { transform: translateX(3px); }

/* Entrance: the new card slides in from the side you're heading to. */
.g-card.in-fwd .g-inner { animation: g-in-fwd .42s cubic-bezier(.2, .8, .2, 1) both; }
.g-card.in-back .g-inner { animation: g-in-back .42s cubic-bezier(.2, .8, .2, 1) both; }
.g-card.in-fwd .g-body > *, .g-card.in-back .g-body > * { animation: g-rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.g-card .g-body > *:nth-child(2) { animation-delay: .05s; }
.g-card .g-body > *:nth-child(3) { animation-delay: .1s; }
.g-card .g-body > *:nth-child(n+4) { animation-delay: .14s; }
@keyframes g-in-fwd { from { opacity: 0; transform: translateX(34px); } }
@keyframes g-in-back { from { opacity: 0; transform: translateX(-34px); } }
@keyframes g-rise { from { opacity: 0; transform: translateY(10px); } }

/* ---- Place search ---------------------------------------------------------------------------- */
.g-place { display: flex; flex-direction: column; gap: 8px; }
.g-search-wrap { position: relative; display: block; }
.g-search-ic { position: absolute; left: 17px; top: 50%; width: 17px; height: 17px; margin-top: -9px; border: 2.4px solid var(--muted); border-radius: 50%; pointer-events: none; }
.g-search-ic::after { content: ""; position: absolute; width: 8px; height: 2.4px; background: var(--muted); right: -7px; bottom: -4px; transform: rotate(45deg); border-radius: 2px; }
.g-search { width: 100%; padding: 17px 18px 17px 50px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .06); font-size: 1.1rem; outline: none; transition: border-color .15s, background .15s, box-shadow .15s; }
.g-search::placeholder { color: #7d889c; }
.g-search:focus { border-color: rgba(255, 79, 123, .7); background: rgba(255, 255, 255, .09); box-shadow: 0 0 0 4px rgba(255, 79, 123, .16); }
.g-title-input { padding-left: 18px; font: 600 1.25rem var(--display); }
.g-search::-webkit-search-cancel-button { filter: invert(1); opacity: .5; }
.g-results { display: flex; flex-direction: column; gap: 2px; }
.g-result { display: flex; align-items: center; gap: 13px; width: 100%; padding: 11px 12px; border: 0; border-radius: 14px; background: none; text-align: left; transition: background .12s; }
.g-result:hover, .g-result:focus-visible { background: var(--glass-3); }
.g-r-text { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.g-r-text b { font-weight: 650; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-r-text small { color: var(--muted); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flag { width: 24px; height: 18px; border-radius: 3px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); }
.flag-none { display: inline-flex; align-items: center; justify-content: center; font-size: 15px; box-shadow: none; }
.g-empty { margin: 4px 2px; color: var(--muted); font-size: .92rem; display: flex; align-items: center; gap: 8px; }
.g-err { color: var(--err); }
.g-chosen { display: flex; align-items: center; gap: 13px; padding: 13px 14px; border-radius: 16px; background: linear-gradient(90deg, rgba(255, 79, 123, .14), rgba(255, 255, 255, .04)); border: 1px solid rgba(255, 79, 123, .28); }

/* ---- Switch -------------------------------------------------------------------------------- */
.g-toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 6px 2px; color: var(--ink-2); }
.g-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.g-switch { position: relative; width: 46px; height: 27px; border-radius: 99px; background: rgba(255, 255, 255, .16); flex: none; transition: background .2s; }
.g-switch i { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.g-toggle input:checked + .g-switch { background: var(--accent); }
.g-toggle input:checked + .g-switch i { transform: translateX(19px); }
.g-toggle input:focus-visible + .g-switch { outline: 2px solid #7fe3ff; outline-offset: 2px; }

/* ---- Days -------------------------------------------------------------------------------- */
.g-stepper { display: flex; align-items: center; justify-content: center; gap: 26px; padding: 12px 0 4px; }
.g-step-btn { width: 58px; height: 58px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--glass-2); font-size: 1.8rem; line-height: 1; transition: background .15s, transform .1s; }
.g-step-btn:hover:not(:disabled) { background: var(--glass-3); }
.g-step-btn:active:not(:disabled) { transform: scale(.94); }
.g-step-btn:disabled { opacity: .35; cursor: default; }
.g-step-val { display: flex; flex-direction: column; align-items: center; min-width: 120px; font: 700 4.4rem/1 var(--display); letter-spacing: -.02em; }
.g-step-val small { font: 500 1rem var(--sans); color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.g-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.g-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--glass-2); color: var(--ink-2); font-size: .9rem; transition: background .15s, border-color .15s, color .15s; }
.g-chip:hover { background: var(--glass-3); color: var(--ink); }
.g-chip.on { background: var(--accent-soft); border-color: rgba(255, 79, 123, .6); color: #fff; }
.g-chip .flag { width: 18px; height: 13px; }
.g-field { display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); font-weight: 600; }
.g-field small { color: var(--muted); font-weight: 400; }
.g-date { padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .06); color-scheme: dark; max-width: 240px; }

/* ---- Tiles (transport, kind of trip) --------------------------------------------------------- */
.g-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.g-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 15px 15px 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass-2); text-align: left;
  transition: transform .16s, background .16s, border-color .16s, box-shadow .16s; }
.g-tile:hover { transform: translateY(-2px); background: var(--glass-3); border-color: var(--line-2); }
.g-tile.on { border-color: rgba(255, 79, 123, .75); background: linear-gradient(160deg, rgba(255, 79, 123, .22), rgba(255, 138, 61, .1)); box-shadow: 0 10px 26px rgba(255, 79, 123, .22); }
.g-tile b { font-size: 1.02rem; margin-top: 8px; }
.g-tile small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.g-tile-ic { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: linear-gradient(140deg, #2f6bff, #00b8d9); box-shadow: 0 6px 16px rgba(47, 107, 255, .3); }
.g-tile.on .g-tile-ic { background: var(--go); box-shadow: 0 6px 16px rgba(255, 79, 123, .35); }
.g-tile-emoji { font-size: 2.1rem; line-height: 1; }
.g-kinds .g-tile { align-items: center; text-align: center; padding: 18px 12px; }
.g-kinds .g-tile b { margin-top: 10px; }

/* ---- Stops ------------------------------------------------------------------------------- */
.g-chain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.g-link-row { position: relative; display: flex; align-items: center; gap: 13px; padding: 9px 4px; }
.g-link-row:not(:last-child)::after { content: ""; position: absolute; left: 18px; top: 40px; bottom: -10px; width: 2px; background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .28) 0 5px, transparent 5px 10px); }
.g-num { width: 30px; height: 30px; margin: 0 1px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; background: var(--sky); color: #fff; box-shadow: 0 0 0 3px rgba(47, 107, 255, .25); }
.g-row-start .g-num { background: var(--ok); box-shadow: 0 0 0 3px rgba(95, 211, 154, .25); }
.g-row-end .g-num { background: var(--go); box-shadow: 0 0 0 3px rgba(255, 79, 123, .25); }
.g-row-home .g-num { background: rgba(255, 255, 255, .18); box-shadow: none; }
.g-mode { margin-top: 4px; align-self: flex-start; max-width: 100%; padding: 4px 26px 4px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23aab4c4' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 9px center; appearance: none; font-size: .85rem; color: var(--ink-2); }
.g-mode option { background: #141a28; color: var(--ink); }
.g-row-btns { display: flex; gap: 2px; flex: none; }
.g-icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 0; background: none; color: var(--muted); font-size: .95rem; }
.g-icon-btn:hover:not(:disabled) { background: var(--glass-3); color: var(--ink); }
.g-icon-btn:disabled { opacity: .3; cursor: default; }
.g-suggest:empty { display: none; }
.g-suggest { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: rgba(47, 107, 255, .1); border: 1px solid rgba(47, 107, 255, .25); }
.g-suggest-title { margin: 0; font-weight: 650; color: #b9cdff; font-size: .92rem; }
.g-chip-add { color: #fff; }

/* ---- AI ---------------------------------------------------------------------------------- */
.g-ai { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 20px; background: linear-gradient(150deg, rgba(47, 107, 255, .16), rgba(255, 79, 123, .1)); border: 1px solid rgba(140, 160, 255, .25); }
.g-ai-label { display: flex; align-items: center; gap: 8px; font: 650 1.05rem var(--display); }
.g-sparkle { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.2rem; }
/* The description box: one editable text with the places it recognises as chips inside the sentence. */
.g-rich-wrap { position: relative; }
.g-rich { position: relative; min-height: 128px; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(5, 8, 16, .45); font-size: 1.05rem; line-height: 1.75; outline: none;
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; cursor: text; -webkit-user-select: text; user-select: text; caret-color: #7fe3ff; transition: border-color .15s, box-shadow .15s; }
.g-rich:focus { border-color: rgba(140, 160, 255, .7); box-shadow: 0 0 0 4px rgba(47, 107, 255, .18); }
.g-rich[data-empty]::before { content: attr(data-placeholder); position: absolute; left: 16px; right: 16px; top: 13px; color: #7d889c; pointer-events: none; }
.g-ichip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; margin: 0 1px; padding: 0 7px 0 5px; border-radius: 8px; border: 1px solid rgba(127, 227, 255, .38); background: rgba(127, 227, 255, .13);
  color: #eafaff; font-size: .95em; line-height: 1.55; vertical-align: baseline; white-space: nowrap; cursor: pointer; -webkit-user-select: none; user-select: none; transition: background .15s, border-color .15s; }
.g-ichip:hover, .g-ichip[aria-expanded="true"] { background: rgba(127, 227, 255, .22); border-color: rgba(127, 227, 255, .7); }
.g-ichip:focus-visible { outline: 2px solid #7fe3ff; outline-offset: 1px; }
.g-ichip .flag { width: 17px; height: 12.75px; border-radius: 2px; }
.g-ichip .g-spin { width: 12px; height: 12px; border-width: 2px; }
.g-ichip-t { overflow: hidden; text-overflow: ellipsis; }
.g-ichip-ic { font-size: .9em; line-height: 1; }
.g-ichip.airport { border-color: rgba(47, 107, 255, .55); background: rgba(47, 107, 255, .2); }
.g-ichip.ferry { border-color: rgba(10, 166, 201, .55); background: rgba(10, 166, 201, .18); }
.g-ichip.none { border-color: rgba(255, 180, 80, .5); background: rgba(255, 180, 80, .1); color: #ffe2b8; }
.g-ichip.busy { opacity: .8; }
.g-ichip.far { border-color: rgba(242, 193, 78, .75); background: rgba(242, 193, 78, .16); color: #fff3d6; }
.g-ichip.which { border-color: rgba(120, 180, 255, .75); background: rgba(120, 180, 255, .16); }
.g-ichip.which .g-ichip-warn { background: #78b4ff; color: #0b1020; }
.g-ichip-warn { display: inline-flex; align-items: center; justify-content: center; width: 1.05em; height: 1.05em; border-radius: 50%; background: var(--warn); color: #1b1300; font: 800 .72em/1 var(--sans); }
.g-ichip.mode { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); padding-left: 4px; }
.g-ichip-mode { display: inline-flex; width: 1.25em; height: 1.25em; align-items: center; justify-content: center; border-radius: 6px; background: linear-gradient(140deg, #2f6bff, #00b8d9); }
.g-ichip-mode img { width: .95em; height: .95em; }
.g-opt-ic { display: inline-flex; width: 30px; height: 30px; flex: none; align-items: center; justify-content: center; border-radius: 9px; background: linear-gradient(140deg, #2f6bff, #00b8d9); }
.g-ignored { margin: -4px 2px 0; color: var(--muted); font-size: .84rem; }
/* Finished days, set aside above the box: a card each, tapped to edit */
.g-describe-box { display: flex; flex-direction: column; gap: 8px; }
.g-days-done { display: flex; flex-direction: column; gap: 8px; }
.g-day { display: flex; flex-direction: column; gap: 6px; animation: g-rise .35s both; }
.g-day-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 9px 12px; border-radius: 14px; border: 1px solid rgba(127, 227, 255, .28);
  background: rgba(5, 8, 16, .4); text-align: left; color: var(--ink); }
.g-day-btn:hover { border-color: rgba(127, 227, 255, .55); background: rgba(127, 227, 255, .06); }
.g-day-t { flex: none; font: 700 .78rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #9fe9ff; }
.g-day-seq { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 5px; font-size: .9rem; }
.g-day-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.g-day-chip .flag { width: 16px; height: 12px; }
.g-day-chip .g-ichip-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-day-chip.mode .g-ichip-mode { width: 1.3em; height: 1.3em; }
.g-day-to { color: var(--muted); font-size: .8rem; }
.g-day-text { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-day-edit { flex: none; color: var(--muted); }
.g-day-asks { display: flex; flex-direction: column; gap: 8px; padding-left: 10px; border-left: 2px solid rgba(127, 227, 255, .18); }
.g-day-asks[hidden] { display: none; }
/* Examples typing themselves into the empty box: a layer over it, the same size (nothing on the page moves) */
.g-demo-over { position: absolute; inset: 0; z-index: 5; overflow: hidden; border-radius: 14px; cursor: text; transition: opacity .35s; }
.g-demo-over.out { opacity: 0; }
.g-demo-text { padding: 13px 16px; font-size: 1.05rem; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); pointer-events: none; }
.g-demo-tag { position: absolute; right: 10px; bottom: 7px; color: var(--muted); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.g-demoing .g-rich[data-empty]::before { content: none; }
.g-ignored .g-link { padding: 2px 6px; font-size: .84rem; }
.g-ai .g-chip { font-size: .82rem; padding: 6px 12px; text-align: left; }
.g-ai-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.g-ai-note { color: var(--muted); font-size: .85rem; }
.g-ai-err { margin: 0; color: var(--err); font-size: .92rem; }
.g-ai-label { margin: 0; cursor: text; }
/* A chip's list of matches */
.g-place-menu { position: absolute; z-index: 30; top: 100%; left: 0; width: min(330px, calc(100vw - 48px)); max-height: 310px; overflow: auto; padding: 6px; border-radius: 14px; border: 1px solid var(--line-2); background: #141a2c; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); display: flex; flex-direction: column; gap: 2px; }
.g-place-opt { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; }
.g-place-opt:hover, .g-place-opt.on { background: var(--glass-3); }
.g-place-opt:focus-visible { outline: 2px solid #7fe3ff; outline-offset: -2px; }
.g-place-opt .g-r-text b { font-size: .95rem; }
.g-place-rm { border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 2px; color: var(--muted); }
.g-place-caret { color: var(--muted); font-size: .75rem; }
.g-code { display: inline-block; min-width: 2.6em; padding: 0 4px; margin-right: 2px; border-radius: 5px; background: rgba(255, 255, 255, .1); font: 700 .78rem/1.5 var(--sans); letter-spacing: .04em; text-align: center; }
@media (max-width: 760px) {
  /* On a phone the list spans the box, whichever chip opened it. */
  .g-rich-wrap .g-place-menu { left: 0 !important; right: 0; width: auto; }
}
/* Questions under the box, like replies in a chat */
.g-asks { display: flex; flex-direction: column; gap: 8px; }
.g-asks[hidden] { display: none; }
.g-ask { display: flex; flex-direction: column; gap: 10px; padding: 11px 12px; border-radius: 4px 16px 16px 16px; background: rgba(12, 17, 30, .55); border: 1px solid rgba(140, 160, 255, .22); animation: g-rise .35s both; min-width: 0; }
.g-ask:has(> .g-ask-done:only-child) { padding: 0; background: none; border: 0; }
.g-ask-q { margin: 0; color: var(--ink); font-size: .95rem; display: flex; align-items: baseline; gap: 7px; }
.g-ask-q > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.g-ask-ic { flex: none; width: 1.2em; text-align: center; }
.g-ask-modes, .g-ask-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.g-ask-mode { min-height: 40px; }
.g-ask-ok { min-height: 38px; color: #fff; border-color: rgba(95, 211, 154, .5); background: rgba(95, 211, 154, .14); }
.g-ask-ok:disabled { opacity: .5; }
/* The confirm for suggested airports: the obvious next tap. */
.g-ask-yes { min-height: 46px; padding: 10px 20px; font-weight: 700; font-size: 1.02rem; color: #06240f; border: 0; background: linear-gradient(180deg, #4fe08f, #22b862); box-shadow: 0 6px 18px rgba(34, 184, 98, .35); }
.g-ask-yes:hover:not(:disabled) { background: linear-gradient(180deg, #62ea9e, #27c46b); }
.g-ask-yes:focus-visible { outline: 3px solid #b8f5d1; outline-offset: 2px; }
/* "Finished describing my trip": the plan button appears once it's on. */
.g-finished { margin: 14px 0 4px; }
.g-ai-row[hidden] { display: none !important; }
.g-pop { animation: g-pop .32s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes g-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .g-pop { animation: none; } }
.g-ask-not { font-size: .85rem; }
.g-ask-far { border-color: rgba(242, 193, 78, .45); background: #1d1912; }
.g-ask-which { border-color: rgba(120, 180, 255, .45); }
.g-ask-tips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.g-ask-tips > small { color: var(--muted); font-size: .85rem; width: 100%; }
.g-ask-tip { min-height: 42px; gap: 8px; color: #fff; }
.g-ask-tip small { color: var(--muted); font-size: .78rem; }
.g-tick { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: .9rem; cursor: pointer; }
.g-tick input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 0; }
.g-ask-list { display: flex; flex-direction: column; gap: 2px; }
.g-ask-done { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 42px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--glass-2); text-align: left; color: var(--ink); font-size: .92rem; }
.g-ask-done:hover { background: var(--glass-3); }
.g-ask-t { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.g-ask-t small { color: var(--muted); font-size: .8rem; }
.g-ask-change { flex: none; color: #ffb0c4; font-size: .85rem; font-weight: 600; }
.g-ap-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 6px; }
.g-ap-to { align-self: center; color: var(--muted); }
.g-ap-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; min-height: 52px; padding: 7px 10px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); text-align: left; }
.g-ap-btn:hover, .g-ap-btn[aria-expanded="true"] { border-color: rgba(127, 227, 255, .6); background: rgba(127, 227, 255, .08); }
.g-ap-btn small { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; }
.g-ap-v { display: flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; }
.g-ap-v .flag { width: 18px; height: 13.5px; }
.g-ap-v b { font-size: .95rem; letter-spacing: .03em; }
.g-ap-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: .88rem; min-width: 0; }
.g-ap-host:empty { display: none; }
.g-ap-panel { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 12px; background: #141a2c; border: 1px solid var(--line-2); }
.g-ap-q { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .06); outline: none; font-size: 1rem; }
.g-ap-q:focus { border-color: rgba(127, 227, 255, .6); }
.g-ap-q::-webkit-search-cancel-button { filter: invert(1); opacity: .5; }
.g-ap-list { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow: auto; }
.g-flights { display: flex; flex-direction: column; gap: 8px; }
/* "Which cruise line and ship?" (guide/cruise.js) */
.g-cr-asks { margin-top: 8px; }
.g-cr-logo { flex: none; width: 34px; height: 34px; border-radius: 8px; object-fit: contain; background: #fff; padding: 2px; }
.g-cr-none { display: inline-flex; align-items: center; justify-content: center; background: var(--glass-3); font-size: 1.1rem; padding: 0; }
.g-cr-done .g-cr-logo { width: 28px; height: 28px; }
.g-cr-opt-note { color: var(--muted); font-weight: 400; font-size: .82rem; }
.g-cr-back { align-self: flex-start; font-size: .85rem; }
@media (max-width: 480px) {
  /* Narrow screens: the two airports one above the other, so their names fit. */
  .g-ap-row { grid-template-columns: minmax(0, 1fr); }
  .g-ap-to { display: none; }
  .g-ap-btn { min-height: 0; flex-direction: row; align-items: center; gap: 10px; }
  .g-ap-btn small { flex: none; width: 6.4em; white-space: nowrap; }
  .g-ap-v { flex: 1; }
}
.g-flight { display: flex; flex-direction: column; gap: 8px; }
.g-ai-said { display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(150deg, rgba(47, 107, 255, .16), rgba(255, 79, 123, .08)); border: 1px solid rgba(140, 160, 255, .25); }
.g-ai-said p { margin: 4px 0 0; color: var(--ink-2); }
/* The describe card (and its open place list) stays above the "or" line and the questions card below it. */
.g-ai { position: relative; z-index: 5; }
.g-or, .g-big { position: relative; z-index: 1; }
.g-or { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .85rem; }
.g-or::before, .g-or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.g-big { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 17px 20px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--glass-2); text-align: left; transition: background .15s, border-color .15s; }
.g-big:hover { background: var(--glass-3); border-color: rgba(255, 255, 255, .25); }
.g-big span { display: flex; flex-direction: column; }
.g-big b { font-size: 1.08rem; }
.g-big small { color: var(--muted); }
.g-promise { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.g-promise li { position: relative; padding-left: 34px; color: var(--ink-2); }
.g-promise li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--go); color: #fff; font-size: .8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.g-promise b { color: var(--ink); }
.g-start { align-self: flex-start; margin-top: 6px; padding: 15px 28px; font-size: 1.08rem; }
.g-card.g-thinking { animation: g-glow 1.6s ease-in-out infinite; }
@keyframes g-glow { 50% { box-shadow: 0 24px 60px rgba(0, 0, 0, .45), 0 0 0 2px rgba(140, 160, 255, .45), 0 0 40px rgba(47, 107, 255, .3); } }

/* ---- Building and the finished trip ----------------------------------------------------------- */
.g-buildbar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.g-buildbar span { display: block; height: 100%; width: 40%; border-radius: inherit; background: var(--brand); animation: g-slide 1.4s ease-in-out infinite; }
@keyframes g-slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.g-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.g-steps li { display: flex; align-items: center; gap: 11px; color: var(--ink-2); font-size: .95rem; animation: g-rise .35s both; }
.g-st-ic { width: 24px; height: 24px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; background: rgba(95, 211, 154, .18); color: var(--ok); }
.g-st-warn .g-st-ic { background: rgba(242, 193, 78, .18); color: var(--warn); }
.g-st-busy .g-st-ic { background: none; }
.g-spin { width: 16px; height: 16px; border-radius: 50%; border: 2.4px solid rgba(255, 255, 255, .2); border-top-color: #fff; display: inline-block; animation: g-turn .8s linear infinite; flex: none; }
@keyframes g-turn { to { transform: rotate(360deg); } }
.g-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.g-stat { display: flex; flex-direction: column; align-items: flex-start; padding: 13px 14px; border-radius: 16px; background: var(--glass-2); border: 1px solid var(--line); min-width: 0; }
.g-stat b { font: 700 1.7rem/1.05 var(--display); background: var(--go); -webkit-background-clip: text; background-clip: text; color: transparent; }
.g-stat span { color: var(--muted); font-size: .82rem; }
.g-summary { margin: 0; font-size: 1.06rem; line-height: 1.55; color: var(--ink); padding: 14px 16px; border-left: 3px solid var(--accent); background: rgba(255, 255, 255, .035); border-radius: 0 14px 14px 0; }
.g-days { margin: 0; padding: 0 0 0 22px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.g-days li::marker { color: var(--muted); }
.g-look { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--glass-2); border: 1px solid var(--line); }
.g-look-swatch { width: 64px; height: 40px; border-radius: 9px; flex: none; display: block; box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 2px 8px rgba(0, 0, 0, .25); }
.g-look-own { background: linear-gradient(135deg, #3a4660, #1c2333); }
.g-look-text { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 4px; }
.g-look-label { color: var(--muted); font-size: .9rem; }
.g-look-name { color: var(--ink); font-size: 1rem; }
.g-look-blurb { flex-basis: 100%; color: var(--muted); font-size: .8rem; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-shuffle { flex: none; white-space: nowrap; }
.g-open { padding: 14px 24px; }

/* ---- The route preview (guide/preview.js): beside the trip card on desktop, full width above it on phones ------ */
.gp { position: absolute; z-index: 2; top: 80px; bottom: 26px; right: 26px; left: calc(26px + min(510px, 100vw - 52px) + 28px); display: flex; align-items: center; justify-content: center;
  container-type: size; pointer-events: none; animation: gp-in .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes gp-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.gp-frame { position: relative; width: min(100cqw, 100cqh * 16 / 9); aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; pointer-events: auto; background: #0b1020;
  border: 1px solid var(--line-2); box-shadow: 0 30px 70px rgba(0, 0, 0, .55); }
.gp-screen { position: absolute; inset: 0; }
.gp-map, .gp-overlay, .gp-still { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gp-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, #111a2e 30%, #1c2742 50%, #111a2e 70%); background-size: 200% 100%; animation: gp-shimmer 1.4s linear infinite; transition: opacity .5s; }
.gp-screen.is-ready::after, .gp-screen.is-failed::after, .gp[data-state="static"] .gp-screen::after { opacity: 0; animation: none; }
@keyframes gp-shimmer { to { background-position: -200% 0; } }
.gp-skip, .gp-again { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 10px 18px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .28); background: rgba(12, 17, 30, .62); color: #fff; font-weight: 600; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.gp-skip:hover, .gp-again:hover { background: rgba(12, 17, 30, .85); }
.gp-skip { position: absolute; right: 12px; top: 12px; z-index: 2; min-height: 40px; padding: 8px 16px; font-size: .88rem; color: var(--ink-2); }
.gp-close { position: absolute; right: 12px; top: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .28); background: rgba(12, 17, 30, .62); color: #fff; font-size: 1.5rem; line-height: 1; }
.gp-end { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 48px 16px 18px;
  background: linear-gradient(0deg, rgba(8, 12, 24, .88) 0, rgba(8, 12, 24, .5) 55%, rgba(8, 12, 24, 0) 100%); animation: g-rise .35s both; }
.gp-main { padding: 14px 26px; }
.gp-skip, .gp-close, .gp-end { display: none; }
.gp[data-state="loading"] .gp-skip, .gp[data-state="playing"] .gp-skip { display: inline-flex; }
.gp[data-state="ended"] .gp-close, .gp[data-state="static"] .gp-close { display: block; }
.gp[data-state="ended"] .gp-end, .gp[data-state="static"] .gp-end { display: flex; }
.gp[data-state="static"] .gp-again { display: none; }
.g-app[data-media] .gp { display: none; }
.g-watch { align-self: flex-start; }
/* Between phone and wide desktop there's no room beside the card: the preview goes over it until it's closed. */
@media (min-width: 761px) and (max-width: 979px) {
  .gp { left: 26px; z-index: 4; }
}

/* "Watch an example" next to the description box */
.g-ai-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.g-example { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; font-size: .86rem; }
.g-example-ic { width: 18px; height: 18px; border-radius: 50%; background: #ffb0c4; position: relative; flex: none; }
.g-example-ic::after { content: ""; position: absolute; left: 7px; top: 5px; border-left: 7px solid #141a2c; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }

/* The example player (pages/demoDialog.js), in the planner's dark colours */
.demo-dialog { width: min(1100px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); border: 1px solid var(--line-2); border-radius: 20px; padding: 18px; background: #0f1526; color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); overflow: auto; }
.demo-dialog::backdrop { background: rgba(5, 8, 16, .78); backdrop-filter: blur(3px); }
.dd-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.dd-titles { flex: 1; min-width: 0; }
.dd-titles h2 { margin: 0; font: 700 1.35rem/1.2 var(--display); }
.dd-sub { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.dd-close { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--glass-2); font-size: 1.5rem; line-height: 1; }
.dd-close:hover { background: var(--glass-3); }
.demo-screen { position: relative; border-radius: 12px; overflow: hidden; background: #060b18; aspect-ratio: 16 / 9; max-height: calc(100dvh - 250px); margin: 0 auto; }
.dd-card[data-aspect="4:5"] .demo-screen { aspect-ratio: 4 / 5; }
.demo-map, .demo-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.demo-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, #111a2e 30%, #1c2742 50%, #111a2e 70%); background-size: 200% 100%; animation: gp-shimmer 1.4s linear infinite; transition: opacity .5s; }
.demo-card.is-ready .demo-screen::after, .demo-card.is-failed .demo-screen::after { opacity: 0; animation: none; }
.dd-controls { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.dd-play { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--go); position: relative; }
.dd-play::before, .dd-play::after { content: ""; position: absolute; top: 14px; width: 5px; height: 16px; background: #fff; border-radius: 1px; }
.dd-play::before { left: 15px; } .dd-play::after { left: 24px; }
.dd-play.is-paused::after { display: none; }
.dd-play.is-paused::before { left: 17px; top: 13px; width: 0; height: 0; background: none; border-left: 14px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-radius: 0; }
.dd-scrub { flex: 1; min-width: 0; accent-color: var(--accent); }
.dd-time { flex: none; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .85rem; }
.dd-sound { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--glass-2) no-repeat center / 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9d2de' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/svg%3E"); }
.dd-sound.is-off { opacity: .55; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9d2de' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E"); }
.dd-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.dd-actions .btn { min-height: 40px; padding: 8px 16px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--glass-2); color: var(--ink); font-weight: 600; font-size: .9rem; }
.dd-actions .btn:hover { background: var(--glass-3); }
.dd-spacer { flex: 1; }

/* ---- Map markers --------------------------------------------------------------------------- */
.g-pin { display: flex; align-items: center; gap: 6px; pointer-events: none; animation: g-pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.g-pin-dot { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 700 11px var(--sans); color: #fff; background: var(--sky); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.g-pin-start .g-pin-dot { background: #22b573; }
.g-pin-end .g-pin-dot { background: var(--accent); width: 26px; height: 26px; font-size: 12px; }
.g-pin-focus .g-pin-dot { background: #e0218a; }
.g-pin-label { padding: 3px 9px; border-radius: 99px; background: rgba(12, 17, 30, .86); color: #fff; font: 600 12px var(--sans); white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
@keyframes g-pop { from { opacity: 0; transform: scale(.4); } }

/* ---- Toast (shared editor helper) ---------------------------------------------------------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 14px; background: #1b2333; border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.toast.err { border-color: rgba(255, 128, 128, .5); }

/* ---- Phones: the map on top, the card as a sheet below --------------------------------------- */
@media (max-width: 760px) {
  .g-map { bottom: auto; height: 40vh; height: 40svh; }
  .g-shade { background: linear-gradient(180deg, rgba(8, 12, 24, .6) 0, rgba(8, 12, 24, 0) 90px); }
  .g-top { height: 58px; padding: 0 14px; gap: 12px; }
  .g-logo img { height: 24px; }
  .g-progress { flex: 1 1 auto; padding: 0 8px; border-radius: 12px; }
  .g-exit { padding: 6px 11px; font-size: .78rem; }
  .g-stage { top: calc(40vh - 26px); top: calc(40svh - 26px); left: 0; right: 0; bottom: 0; width: auto; }
  .g-card { border-radius: 24px 24px 0 0; border-bottom: 0; }
  .g-scroll { padding: 24px 18px 16px; }
  .g-title { font-size: 1.65rem; }
  .g-sub { font-size: .96rem; }
  .g-body { margin-top: 18px; gap: 14px; }
  .g-foot { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .g-next { padding: 12px 18px; }
  .g-tiles { gap: 9px; }
  .g-tile { padding: 12px 12px 11px; }
  .g-tile-ic { width: 44px; height: 44px; border-radius: 13px; }
  .g-tile-ic img { width: 28px; height: 28px; }
  .g-tile small { display: none; }
  .g-step-val { font-size: 3.6rem; }
  .g-stats { grid-template-columns: repeat(2, 1fr); }
  .g-search { font-size: 1.05rem; padding-top: 15px; padding-bottom: 15px; }
  .g-ai { padding: 14px; gap: 10px; }
  .g-rich { padding: 11px 13px; min-height: 140px; }
  .g-demo-text { padding: 11px 13px; }
  .g-rich[data-empty]::before { left: 13px; top: 11px; }
  /* Describing the trip: no globe — the card has the whole screen; the map comes back with the route. While a
     place chip's list is open (.g-peek) a strip of globe slides in above the card to show where that place is. */
  [data-step="welcome"] .g-shade { display: none; }
  [data-step="welcome"] .g-map { top: 58px; height: 0; visibility: hidden; transition: height .32s ease, visibility 0s linear .32s; }
  .g-peek[data-step="welcome"] .g-map { height: 30vh; height: 30svh; visibility: visible; transition: height .32s ease; }
  [data-step="welcome"] .g-stage { top: 58px; transition: top .32s ease; }
  .g-peek[data-step="welcome"] .g-stage { top: calc(58px + 30vh - 18px); top: calc(58px + 30svh - 18px); }
  [data-step="welcome"] .g-card { border-radius: 24px 24px 0 0; }
  [data-step="welcome"] .g-top { background: var(--bg); }
  /* The route preview fills the width under the top bar; the trip card moves down below it. */
  .gp { top: 58px; left: 0; right: 0; bottom: auto; z-index: 1; height: min(75vw, 46vh); height: min(75vw, 46svh); container-type: normal; }
  .gp-frame { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; border: 0; box-shadow: none; }
  .g-app[data-preview] .g-stage { top: calc(58px + min(75vw, 46vh) - 18px); top: calc(58px + min(75vw, 46svh) - 18px); }
  .gp-end { padding: 34px 12px 30px; gap: 8px; }
  .gp-main { padding: 12px 20px; }
  .demo-dialog { padding: 12px; width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .demo-screen { max-height: calc(100dvh - 230px); }
  .dd-spacer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* A problem with its one-tap fixes (editor/fixes.js), e.g. a plan that couldn't be made */
.problem { display: block; padding: 12px 14px; border: 1px solid var(--line-2); border-left: 3px solid var(--err); border-radius: 14px; background: var(--glass-2); color: var(--ink-2); font-size: .92rem; }
.problem .problem-title { display: block; color: var(--ink); }
.problem-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.problem-btn { min-height: 40px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--glass-3); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.problem-btn.primary { background: var(--go); border-color: transparent; color: #fff; }

/* ---- Phones first (roadmap 114; shared patterns in phone.css) -------------------------------------------------------
   Each card's main button is in the bar along the bottom: the card's foot (.g-foot), and on the description card
   "Plan it for me" (.g-ai-row), pinned to the bottom of the card while the description scrolls under it. */
@media (max-width: 900px) {
  .g-ai-row { margin: 0 -18px -18px; padding: 12px 18px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); border-radius: 0 0 20px 20px;
    background: rgba(14, 20, 37, .97); box-shadow: 0 -10px 22px -12px rgba(0, 0, 0, .6); }
}
@media (max-width: 760px) {
  .g-ai-row { margin: 0 -14px -14px; padding-left: 14px; padding-right: 14px; }
  .g-ai-row .g-next { flex: 1 1 auto; justify-content: center; min-height: 48px; }
  /* The top bar's steps show progress on a phone; each card has its own way back (Back, Change answers). */
  .g-progress .tc-go { pointer-events: none; }
  /* A chip's list is a bottom sheet (guide/describe.js puts it on the page; core/phone.js adds the grab handle; drag
     down or tap elsewhere to close), above the keyboard. */
  .g-place-menu.rr-sheet { position: fixed; top: auto !important; bottom: var(--rr-kb, 0px); left: 0 !important; right: 0; width: auto; max-height: min(62svh, 440px); z-index: 40;
    padding: 4px 8px max(10px, env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; border-bottom: 0; box-shadow: 0 -18px 50px rgba(0, 0, 0, .55);
    animation: rr-sheet-up .28s cubic-bezier(.2, .8, .2, 1) both; overscroll-behavior: contain; }
  body:has(> .g-place-menu.rr-sheet) .g-ai-row { visibility: hidden; } /* choosing: the chip shows above the list, not under the bar */
  .g-place-menu .rr-grab { position: sticky; top: -4px; margin: -4px -8px 0; padding-top: 2px; height: 22px; background: inherit; }
  /* Room between the lines of the description, so each chip in it can be tapped (its hit area is 44 px tall). */
  .g-rich, .g-demo-text { line-height: 2.15; }
}
/* Every control at least 44 × 44 px to a finger (tests/browser/phone_targets_test.py). Chips inside the description
   keep their size in the sentence: their hit area grows instead. */
@media (max-width: 760px), (pointer: coarse) {
  .g-logo { min-height: 44px; align-items: center; }
  .g-exit { position: relative; }
  .g-exit::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
  .g-chip, .g-link, .g-back, .g-skip, .g-toggle, .g-tick, .g-ask-done, .g-ap-btn, .g-day-btn, .problem-btn, .gp-skip, .dd-actions .btn { min-height: 44px; }
  .g-link { display: inline-flex; align-items: center; }
  .g-icon-btn { width: 44px; height: 44px; }
  .g-mode, .g-date, .g-ap-q { min-height: 44px; font-size: 16px; } /* 16 px: no zooming in on focus */
  .dd-scrub { height: 44px; margin: 0; }
  .g-ichip { position: relative; }
  .g-ichip::after { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }
}
