:root {
  --brand: #2563eb; /* Primary actions, selected day, links */
  --brand-soft: #eef2ff; /* Selected and hover backgrounds */
  --warn: #f59e0b; /* Needs attention: borders, badges */
  --warn-bg: #fffbeb; /* Needs attention: fill */
  --warn-soft: #fef3c7; /* Needs attention: stronger fill */
  --warn-ink: #92400e; /* Needs attention: text */
  --bad: #b91c1c; /* Problem or destructive: text and buttons */
  --bad-ink: #991b1b; /* Problem: text on a pale fill */
  --good-bg: #dcfce7; /* Good or free: fill */
  --good-ink: #166534; /* Good or free: text */
  --line: #cbd5e1; /* Borders of controls */
  --line-soft: #e2e8f0; /* Borders of cards */
  --ink-2: #475569; /* Secondary text */
  --ink-3: #64748b; /* Quiet text */
  --vote-ink: #5b21b6; /* Attractions and suggestions: text */
  --select-bg: #dbeafe; /* Selected control background */
  --toast-bg: #1f2937; /* Undo message: fill */
  --toast-ink: #ffffff; /* Undo message: text */
  --toast-act: #93c5fd; /* Undo message: the Undo button */
  --bg: #f5f6f8; /* The page behind the cards */
  --surface: #ffffff; /* Cards, panels and buttons */
  --surface-2: #f1f5f9; /* A step darker than a card: chips, wells */
  --surface-3: #f8fafc; /* A step lighter than the page: calm panels */
  --ink: #1f2937; /* Main text */
  --ink-1: #334155; /* Strong secondary text */
  --line-strong: #94a3b8; /* Dashed and emphasised borders */
  --line-faint: #eef0f3; /* Hairlines inside a card */
  --on-brand: #ffffff; /* Text on a blue (brand) fill */
}
/* Colour tokens: one meaning per colour. Blue = action and selection, amber = needs attention, red = problem or destructive, green = good or free,
   indigo = suggestions and votes, violet = Attractions. Change a value here to retheme every panel that uses it. */
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* one rule for every hidden element, whatever display its class sets */
html { font-size: calc(16px * var(--ts, 1)); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html[data-text="s"] { --ts: .92; } html[data-text="l"] { --ts: 1.12; } html[data-text="xl"] { --ts: 1.25; } /* Preferences > Text size */
button { color: inherit; } /* iPhone paints a button's text blue unless a colour is set */
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--brand); }
h1 { font-size: 1.4rem; margin: 0; }
h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
#app { padding: 14px; }
.top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.top h1 { flex: 1; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; font: inherit; font-size: .9rem; }
.btn:hover { background: var(--brand-soft); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #1d4ed8; }
.btn.small-btn { padding: 4px 10px; font-size: .8rem; }
.danger { color: var(--bad); }
.panel { background: var(--surface); border-radius: 12px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card { background: var(--surface); border-radius: 12px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); text-decoration: none; color: inherit; display: block; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.error { color: var(--bad); }
.notice { background: #fef9c3; padding: 8px 12px; border-radius: 8px; font-size: .9rem; }
.tag { font-size: .74rem; background: #e0e7ff; color: #3730a3; padding: 2px 6px; border-radius: 6px; text-transform: capitalize; }

form.panel { max-width: 420px; display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
input, select, textarea { font: inherit; padding: 8px; border: 1px solid var(--line); border-radius: 8px; width: 100%; }

.tabs { display: flex; gap: 8px; overflow-x: auto; margin: 12px 0; }
.tabs button { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; font: inherit; text-align: left; white-space: nowrap; }
.tabs button.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.tabs small { opacity: .8; }


.search { display: flex; gap: 8px; margin-bottom: 8px; }
.search input { flex: 1; }
.result { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-faint); }
.summary { background: var(--brand-soft); padding: 10px; border-radius: 8px; margin: 12px 0; font-size: .9rem; }
.stops { padding-left: 20px; margin: 0; }
.stop { padding: 10px 0; border-bottom: 1px solid var(--line-faint); }
.stop-head { display: flex; gap: 8px; align-items: center; }
.leg { font-size: .8rem; color: #0f766e; margin: 4px 0; }
.fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.fields input, .fields select { font-size: .85rem; padding: 6px; }
.stop textarea { font-size: .85rem; min-height: 46px; margin-top: 4px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.day-card { background: var(--surface); border: 1px solid #d1d5db; border-radius: 12px; padding: 16px; break-inside: avoid; }
.day-card ol { padding-left: 0; list-style: none; margin: 0; }
.day-card li { border-left: 3px solid var(--brand); padding: 6px 0 8px 10px; margin-bottom: 6px; }
.time { display: block; font-size: .8rem; color: var(--brand); font-weight: 600; }

@media print {
  body { background: var(--surface); }
  .no-print, .tabs, nav, #divider, #right { display: none !important; }
  #shell { display: block; height: auto; }
  #left { width: auto !important; overflow: visible; }
  .cards { grid-template-columns: 1fr 1fr; }
  .day-card { box-shadow: none; }
}

/* split-pane shell */
html, body { height: 100%; }
#shell { display: flex; height: 100vh; }
#left { width: clamp(400px, 45vw, 900px); min-width: 280px; max-width: 70%; overflow-y: auto; background: var(--bg); } /* wide enough for the plan to read well; a width chosen with the divider wins */
#divider { width: 6px; cursor: col-resize; background: #d1d5db; flex: none; }
#divider:hover, #divider.drag { background: var(--brand); }
#right { flex: 1; min-width: 0; }
#map { height: 100%; width: 100%; }
body.resizing { user-select: none; cursor: col-resize; }
body.resizing #map { pointer-events: none; }
@media (max-width: 700px) {
  #shell { flex-direction: column; }
  #left { width: 100% !important; max-width: none; height: 55vh; }
  #divider { display: none; }
  #right { height: 45vh; flex: none; }
}

.top.compact { margin-bottom: 8px; } .top.compact h1 { flex: 1 1 100%; } /* the trip name gets a row of its own; the buttons sit under it */
.top.compact select { width: auto; max-width: 180px; padding: 6px; }
.title-input { flex: 1 1 100%; font-size: 1.1rem; font-weight: 600; border: 1px solid transparent; background: transparent; padding: 4px 6px; min-width: 0; }
.title-input:hover, .title-input:focus { border-color: var(--line); background: var(--surface); }
.searchbox { position: relative; margin-bottom: 10px; }
.searchbox input { padding: 10px 12px; font-size: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.dropdown { position: absolute; left: 0; right: 0; top: 100%; z-index: 1000; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin-top: 4px; max-height: 320px; overflow-y: auto; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.dropdown .opt { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line-faint); }
.dropdown .opt:hover, .dropdown .opt.hl { background: var(--brand-soft); }
.dropdown .msg { padding: 8px 12px; }
.section-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin: 14px 0 6px; }
.sug { background: var(--surface); border-radius: 10px; padding: 10px; margin-bottom: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.06); display: flex; gap: 8px; justify-content: space-between; align-items: center; cursor: pointer; }
.sug:hover { background: #fff7ed; }
.sug .meta { font-size: .8rem; color: var(--ink-3); }
.badge { font-size: .74rem; background: var(--warn-soft); color: var(--warn-ink); padding: 1px 6px; border-radius: 6px; }
.pill { font-weight: 600; color: #0f766e; }
.tabs { margin: 8px 0; }


/* itinerary timeline */
.itinerary { margin-top: 8px; }
.tl { display: flex; gap: 10px; background: var(--surface); border-radius: 10px; padding: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.tl-time { min-width: 46px; font-weight: 600; color: var(--brand); font-size: .9rem; line-height: 1.3; }
.tl-body { flex: 1; min-width: 0; }
.itinerary .leg { margin: 4px 0 4px 56px; padding-left: 10px; border-left: 2px dashed var(--line-strong); }
.plan-box { background: var(--surface); border: 1px solid #c7d2fe; border-radius: 10px; padding: 10px; margin: 8px 0; font-size: .9rem; }
.plan-box.warn { background: var(--warn-bg); border-color: #fcd34d; }
.plan-day { margin-top: 6px; }
.plan-link { margin: 6px 0; }

/* start / stay / end slots */
.anchor { display: flex; gap: 8px; align-items: center; border-radius: 10px; padding: 10px; margin: 8px 0; font: inherit; width: 100%; text-align: left; }
.anchor.set { background: #f0fdf4; border: 1px solid #bbf7d0; }
.anchor.empty { background: transparent; border: 2px dashed var(--line); color: var(--ink-2); cursor: pointer; }
.anchor.empty:hover { background: var(--surface); border-color: var(--brand); }
.anchor.editing { display: block; background: var(--surface); border: 1px solid var(--brand); }
.anchor.editing .searchbox { margin: 6px 0; }

/* start / stay / end chips in the day-tab row */
.tabs { align-items: center; }
.tabs .slot { flex: none; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 2px dashed var(--line-strong); background: var(--surface); font-size: 1.05rem; cursor: pointer; text-align: center; }
.tabs .slot:hover, .tabs .slot.open { border-color: var(--brand); background: var(--brand-soft); }
.tabs .slot.filled { border: 2px solid var(--c, #16a34a); background: var(--surface); }

.tabs button.travel-out, .tabs button.travel-back { border-style: dashed; }
.tabs button.travel-out.active, .tabs button.travel-back.active { background: var(--ink-2); border-color: var(--ink-2); }

/* header */
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.topbar .muted { margin-left: auto; }
.top.compact { flex-wrap: nowrap; }

/* day tabs: no horizontal scroll; one row if it fits, else rows per group */
.tabs { overflow: visible; flex-wrap: wrap; gap: 6px; }
.tabs.one { display: flex; flex-wrap: nowrap; }
.tabs.grouped { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.tab-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tab-row[data-label]::before { content: attr(data-label); flex-basis: 100%; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.tabs button { flex: none; }

/* centred tab rows, day summaries, green selected slots */
.tabs.one, .tab-row { justify-content: center; }
.tabs.grouped .tab-row[data-label]::before { text-align: center; }
.tabs button[data-day] { text-align: center; min-width: 112px; line-height: 1.25; }
.tabs .ti { display: block; font-size: .74rem; opacity: .9; white-space: nowrap; }
.tabs .ti.wx { margin-top: 1px; }
.tabs button.active .ti.muted { color: #e0e7ff; }
.tabs .slot.filled { background: #16a34a; border: 2px solid #15803d; box-shadow: 0 0 0 2px var(--good-bg); }
.tabs .slot.filled:hover { background: #15803d; }

/* travel / tour groups with headers and travel options */
.tab-group { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tb-icon { display: none; }
.tab-head { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.tab-head .gl { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; }
.tab-head .gt { font-size: .85rem; font-weight: 700; color: #0f766e; background: #ccfbf1; padding: 1px 8px; border-radius: 999px; }
.tab-head .gw { font-size: .75rem; color: #b45309; }
.tab-opts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tab-opts .opt { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; cursor: pointer; font: inherit; font-size: .8rem; text-align: center; line-height: 1.2; }
.tab-opts .opt small { display: block; font-size: .74rem; color: var(--ink-3); }
.tab-opts .opt:hover { border-color: var(--brand); }
.tab-opts .opt.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.tab-opts .opt.on small { color: var(--select-bg); }
.tabs.grouped { gap: 12px; }
.tabs.grouped .tab-row[data-label]::before { content: none; }

/* light highlight for set start / stay / end buttons */
.tabs .slot.filled { background: var(--good-bg); border: 2px solid #86efac; box-shadow: none; }
.tabs .slot.filled:hover { background: #bbf7d0; }
.tabs .slot.open { border-color: var(--brand); }
.tab-head .adj { margin-left: 18px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 12px; font: inherit; font-size: .78rem; cursor: pointer; color: var(--ink); }
.tab-head .adj:hover, .tab-head .adj.on { background: var(--brand-soft); border-color: var(--brand); }
.tabs button[data-day] small { display: block; }

/* middle-right "Adjust Travel Days" button, modal */
.tab-row { position: relative; }
.tab-row.has-adj { padding-right: 150px; min-height: 44px; }
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; z-index: 5000; padding: 16px; }
.modal { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; padding: 0; width: min(520px, 100%); max-height: 90vh; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.modal-h { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.modal-h h3 { margin: 0; font-size: 1.05rem; }
.modal-b { padding: 14px 16px 18px; overflow-y: auto; }
.modal-x { flex: none; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 1rem; line-height: 1; cursor: pointer; }
/* a segmented choice: a tray with one raised tile for what is picked */
.seg2 { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.seg2 button { min-height: 34px; padding: 5px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.seg2 button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .25); }
.pref-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 14px; } .pref-row[hidden] { display: none; }
.pref-l { min-width: 84px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.pref-note { margin: 4px 0 0; font-size: .95rem; color: var(--ink); }
.choice { display: flex; flex-direction: column; gap: 2px; border: 2px solid #e5e7eb; border-radius: 10px; padding: 10px 12px; margin-top: 8px; cursor: pointer; }
.choice:hover { border-color: #93c5fd; }
.choice.on { border-color: var(--brand); background: #eff6ff; }
.modal input[type=date] { width: auto; }

/* tabs that need re-planning */
.tabs button[data-day] { position: relative; }
.tabs button.replan { border-color: var(--warn); background: var(--warn-bg); box-shadow: 0 0 0 2px #fde68a; }
.tabs button.replan.active { background: var(--brand); border-color: var(--warn); }
.tabs .rp { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; background: var(--warn); color: #fff; font-size: .74rem; line-height: 20px; text-align: center; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.25); }

.tab-row.has-adj { padding-right: 110px; }

/* "Adjust Travel": just the icon and label */
.tab-row.has-adj { padding-right: 120px; }

/* beat the generic ".tabs button" rule (white box, border, padding) */

/* gear and label side by side */
.tab-row.has-adj { padding-right: 90px; }

/* + Add day on the last tour day, warning badge moved to the left corner */
.tabwrap { position: relative; display: flex; }
.tabs .add-day { position: absolute; top: -9px; right: -9px; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 0; background: var(--brand); color: #fff; font-size: 1rem; line-height: 22px; text-align: center; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.tabs .add-day:hover { background: #1d4ed8; transform: scale(1.1); }
.tabs .rp { right: auto; left: -7px; }

/* calendar and delete icons inside day tabs */
.tabs button[data-day] { padding-left: 20px; padding-right: 20px; }
.tabs .tab-cal, .tabs .tab-del { position: absolute; right: 4px; font-size: .8rem; line-height: 1; cursor: pointer; opacity: .55; padding: 2px; border-radius: 4px; }
.tabs .tab-cal { top: 4px; }
.tabs .tab-del { top: 24px; }
.tabs .tab-cal:hover, .tabs .tab-del:hover { opacity: 1; background: rgba(148,163,184,.3); }

/* round corner badges on day tabs: calendar (top-left), + (top-right), warning (bottom-left), delete (bottom-right) */
.tabs button[data-day] { padding-left: 14px; padding-right: 14px; }
.tab-row { padding-top: 8px; padding-bottom: 8px; }
.tabs .tab-cal, .tabs .tab-del, .tabs .rp { position: absolute; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border-radius: 50%; opacity: 1; box-shadow: 0 1px 3px rgba(0,0,0,.3); cursor: pointer; font-size: .75rem; line-height: 1; }
.tabs .tab-cal { top: -9px; left: -9px; right: auto; background: #0d9488; }
.tabs .tab-del { bottom: -9px; right: -9px; top: auto; background: #dc2626; }
.tabs .rp { bottom: -9px; left: -9px; top: auto; right: auto; }
.tabs .tab-cal:hover { background: #0f766e; transform: scale(1.1); }
.tabs .tab-del:hover { background: var(--bad); transform: scale(1.1); }

/* left pane sections: top, search, day tabs, itinerary, attractions, history */
.sec { border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.sec-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin: 0 0 8px; font-weight: 700; }
.sec-top { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.sec-top .top.compact { margin-bottom: 0; }
.sec-top .topbar { margin-bottom: 6px; }
.sec-search { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 10px; position: relative; z-index: 20; }
.sec-search .searchbox { margin-bottom: 0; }
.sec-tabs { background: var(--surface-3); border: 1px solid var(--line-soft); padding-top: 8px; padding-bottom: 8px; }
.sec-tabs .tabs { margin: 0; }
.sec-itin { background: #e8f0ff; border: 1px solid #bfd3ff; }
.sec-itin .summary { background: var(--surface); border: 1px solid #d6e2ff; }
.sec-itin .sec-h { color: #1e40af; }
.sec-attr { background: #fff6e5; border: 1px solid #fcd9a0; }
.sec-attr .sec-h { color: #9a5b00; }
.sec-attr .sug { background: var(--surface); }
.sec-attr .section-title:first-child { margin-top: 0; }
#app { padding: 12px; }

/* drag and drop */
.sug.draggable { cursor: grab; }
.sug.draggable:active { cursor: grabbing; }
.grip { color: var(--ink-3); font-size: 1.1rem; line-height: 1; user-select: none; flex: none; }
.tl-time[draggable="true"] { cursor: grab; }
.tl-time .grip { font-size: .9rem; }
.added { font-size: .74rem; color: #15803d; background: var(--good-bg); padding: 1px 6px; border-radius: 6px; }
body.dragging .tabs button[data-day] { outline: 2px dashed #93c5fd; outline-offset: 2px; }
.tabs button[data-day].drop-over { outline: 3px solid var(--brand); background: var(--select-bg); transform: scale(1.04); }
.sec-itin.drop-over, body.dragging .sec-itin { box-shadow: inset 0 0 0 2px #93c5fd; }

/* several attractions per row */
.sug-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 8px; }
.sug-grid .sug { margin: 0; padding: 8px 10px; gap: 6px; align-items: flex-start; min-width: 0; }
.sug-grid .sug strong { overflow-wrap: anywhere; }
.sug-grid .sug .meta { margin-top: 2px; }
.sug-grid .sug .btn.small-btn { padding: 2px 7px; }

.sugroup { background: #fffdf8; border: 1px solid #f5d9a8; border-radius: 12px; padding: 8px; margin-bottom: 10px; }
.sugroup-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.sugroup .sug-grid { margin-bottom: 0; }
.mode-note { background: var(--surface); border: 1px dashed #f0b85b; border-radius: 8px; padding: 6px 10px; margin: 6px 0; }

/* Attractions: lavender */
.sec-attr { background: #f1ecfd; border: 1px solid #cdbdf5; }
.sec-attr .sec-h { color: var(--vote-ink); }
.sugroup { background: #faf8ff; border-color: #d9ccf7; }
.mode-note { border-color: #b9a2ee; }
.sec-attr .badge { background: #ede4ff; color: var(--vote-ink); }

/* Itinerary: blue by default, amber when the day needs attention, pale green when it looks good */
.itin-note { margin-left: 10px; font-size: .78rem; font-weight: 600; text-transform: none; letter-spacing: 0; padding: 2px 10px; border-radius: 999px; background: var(--surface); border: 1px solid currentColor; }
.sec-itin.state-warn { background: #fff1cc; border: 1px solid var(--warn); box-shadow: inset 0 0 0 2px #fde68a; } /* inside the edge, so nothing shows beside the sticky bars */
.sec-itin.state-warn .sec-h { color: var(--warn-ink); }
.sec-itin.state-warn .summary { border-color: #fcd34d; }
.sec-itin.state-warn .itin-note { color: #b45309; background: var(--warn-bg); }
.sec-itin.state-good { background: #e6f6ec; border: 1px solid #a7dfb9; }
.sec-itin.state-good .sec-h { color: var(--good-ink); }
.sec-itin.state-good .summary { border-color: #c4ead2; }
.sec-itin.state-good .itin-note { color: #15803d; background: #f4fcf7; }

/* collapsible Attractions with summary, Add attractions on the itinerary, condition chips */
.attr-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chev { border: 0; background: #ede4ff; color: var(--vote-ink); width: 24px; height: 24px; border-radius: 6px; cursor: pointer; font-size: .9rem; line-height: 1; }
.attr-summary { font-size: .8rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: #4c1d95; }
.itin-h { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ins { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chip { font-size: .74rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-1); border: 1px solid var(--line-soft); white-space: normal; }
.chip.good { background: #ecfdf3; color: var(--good-ink); border-color: #bbf7d0; }
.chip.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: #fde68a; }
.chip.bad { background: #fef2f2; color: var(--bad-ink); border-color: #fecaca; }
.modal .searchbox { margin-bottom: 8px; }


.chip.ask { cursor: pointer; background: var(--surface); border: 1px dashed var(--line-strong); color: var(--ink-2); font: inherit; font-size: .74rem; }
.chip.ask:hover { border-color: var(--brand); color: var(--brand); }

/* pins, priorities, fixed times */
.mark { font-size: .74rem; padding: 1px 7px; border-radius: 999px; margin-left: 4px; white-space: nowrap; }
.mark.must { background: var(--warn-soft); color: var(--warn-ink); } .mark.opt { background: var(--surface-2); color: var(--ink-3); }
.mark.lock { background: #e0e7ff; color: #3730a3; } .mark.fix { background: #fce7f3; color: #9d174d; }
.late { background: #fef2f2; color: var(--bad-ink); border: 1px solid #fecaca; border-radius: 8px; padding: 4px 8px; font-size: .8rem; margin: 4px 0; }
.mini-time { width: auto; padding: 2px 6px; font-size: .85rem; }
.fields { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.good-txt { color: #15803d; font-weight: 600; }

.topbar .small-btn { text-decoration: none; }
.itin-h .btn { text-transform: none; letter-spacing: 0; font-weight: 600; }
.itin-h #addToDay + #navDay { margin-left: 4px; }
@media print {
  .sec-top, .sec-search, .sec-attr, .sec-tabs, .sec-itin, .sec-hist { display: none !important; }
  .cards { display: block; }
  .day-card { break-inside: avoid; margin-bottom: 12px; box-shadow: none; }
}

.pace { flex-direction: row; align-items: center; gap: 8px; margin-top: 8px; font-size: .85rem; color: var(--ink-2); }
.pace select { width: auto; padding: 4px 8px; font-size: .85rem; }

.mark.book.need { background: var(--warn-soft); color: var(--warn-ink); } .mark.book.done { background: var(--good-bg); color: var(--good-ink); }


.sg-form { display: grid; grid-template-columns: 130px 1fr; gap: 6px; margin: 8px 0; }
.sg-form input { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; width: 100%; box-sizing: border-box; }
.sg-list { list-style: none; margin: 8px 0 0; padding: 0; }
.sg-list li { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid #ffedd5; }
.sg-main { flex: 1; min-width: 0; }
.sg-vote { border: 1px solid #fdba74; background: var(--surface); border-radius: 16px; padding: 3px 10px; cursor: pointer; font: inherit; }
.sg-vote.on { background: #fed7aa; font-weight: 600; }
.sg-list .x { border: 0; background: none; cursor: pointer; color: var(--bad-ink); }

.today { background: var(--surface); border: 1px solid #bfdbfe; border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.today-h { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 6px; }
.today-h input, .today-h select { font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; max-width: 220px; }
.today-late { color: #b45309; font-weight: 600; } .today-list { margin: 6px 0 0; padding-left: 18px; }
@media print { .today { display: none !important; } }

.wx-tip { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 8px 12px; margin: 8px 0; font-size: .9rem; }
@media print { .wx-tip { display: none !important; } }
.mv-days { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.lunch { background: var(--warn-bg); border: 1px dashed var(--warn); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.brk { background: var(--surface-2); border-radius: 8px; padding: 5px 10px; margin: 4px 0; font-size: .88rem; }

.seg { display: inline-flex; } .seg .btn { border-radius: 0; margin-left: -1px; } .seg .btn:first-child { border-radius: 8px 0 0 8px; margin-left: 0; } .seg .btn:last-child { border-radius: 0 8px 8px 0; }
.seg .btn.on { position: relative; z-index: 1; background: var(--select-bg); border-color: #60a5fa; font-weight: 600; } /* raised, so the next button's overlapping edge does not cover its right border */
.lunch-len { margin-left: 8px; vertical-align: middle; }
.pref { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; font-weight: 600; } .pref select, .pref input { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-weight: 400; }

.itin-actions { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lunch { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.lunch .lunch-len { margin-left: auto; } .lunch .ins { flex-basis: 100%; }

.itin-actions { flex: 1 0 100%; margin-left: 0; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 2px; }
.itin-actions .btn { white-space: nowrap; flex: 0 0 auto; }
.itin-note.act { cursor: pointer; } .itin-note.act:hover { background: var(--warn-soft); }

/* actions share the title row; they only drop to a second row when the pane is too narrow */
.itin-actions { flex: 1 1 auto; margin-left: auto; justify-content: flex-end; overflow-x: visible; }

/* when the itinerary is not wide enough for the labels, the action buttons keep only their icons (tooltips still explain them) */
.itin-actions .ico { vertical-align: -3px; }

.pv { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px; margin: 6px 0; }
.pv-photos { display: flex; gap: 6px; overflow-x: auto; } .pv-photos img { height: 110px; width: auto; border-radius: 8px; cursor: zoom-in; flex: 0 0 auto; }
.pv-text { margin: 8px 0 4px; font-size: .9rem; line-height: 1.4; }
@media print { .preview { display: none !important; } }
.seg-label { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; background: var(--surface-3); font-size: .8rem; font-weight: 600; color: var(--ink-1); } .seg-label + .btn { border-radius: 0; margin-left: 0; }
.seg #navSeg, #navSeg .btn:first-child { border-radius: 8px 0 0 8px; }

.stop-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 10px; }
.stop-title { flex: 1 1 220px; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.stop-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stop-actions .btn { white-space: nowrap; padding: 3px 8px; }

.edit-panel { background: var(--surface-3); border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
.edit-panel textarea { width: 100%; box-sizing: border-box; margin-top: 6px; font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.vt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; } .vt-l { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.removed-badge { background: var(--warn-soft); color: var(--warn-ink); border-radius: 999px; padding: 1px 8px; font-size: .75rem; }
.stop-title .btn { padding: 1px 7px; }

.ep-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-end; }
.ep-g { display: flex; flex-direction: column; gap: 3px; } .ep-g input[type=time] { font: inherit; padding: 3px 6px; border: 1px solid var(--line); border-radius: 8px; }
.edit-panel .seg .btn { padding: 3px 9px; }

.mark.busy.busy { background: #fee2e2; color: var(--bad-ink); } .mark.busy.moderate { background: var(--warn-soft); color: var(--warn-ink); } .mark.busy.quiet { background: var(--good-bg); color: var(--good-ink); }

/* everything above the itinerary stays on screen while the itinerary scrolls */
.pinned { position: sticky; top: 0; z-index: 30; background: var(--bg); max-height: 62vh; overflow-y: auto; margin: -12px -12px 8px; padding: 12px 12px 0; box-shadow: 0 6px 10px -8px rgba(15, 23, 42, .35); }
.pinned .sec:last-child { margin-bottom: 8px; }
.top-div { border: 0; border-top: 1px solid #d5dbe3; margin: 6px 0 8px; }
/* on / off state of the header toggles */
/* previous trips: several per row */
.prev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.prev-grid .sug { margin: 0; padding: 8px 10px; }
@media print { .pinned { position: static; max-height: none; box-shadow: none; } }

/* pin, must visit and okay to skip show their state the same way as the header toggles */
.stop-actions [data-state=on] { background: var(--select-bg); border-color: #3b82f6; box-shadow: inset 0 -2px 0 #3b82f6; }
.stop-actions [data-state=on]::after { content: ' ✓'; color: #1d4ed8; font-weight: 700; }

.lunch-tools { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.lunch .lunch-tools .lunch-len { margin-left: 0; }

/* the lunch row keeps only the icons when it is narrow */

/* labels show while the actions fit beside the title; the moment they would wrap or overlap, script adds .icons-only */
.icons-only .lbl { display: none; }
.itin-actions.icons-only .btn { padding: 4px 8px; }

/* the trip name keeps a readable width; Optimize / Print / Share wrap below it when the pane is narrow */
.top.compact { flex-wrap: wrap; row-gap: 6px; }
.top.compact .title-input { flex: 1 1 180px; min-width: 150px; }

/* print view: onward travel, tour days and return travel on their own backgrounds */
.card-group { border-radius: 14px; padding: 14px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.card-group.out, .card-group.back { background: #e0f2fe; } .card-group.tour { background: #ecfdf5; }
.group-h { margin: 0 0 10px; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-1); }
.group-div { border: 0; border-top: 2px dashed var(--line-strong); margin: 14px 0; }
@media print { .card-group { break-inside: auto; margin-bottom: 4px; } .group-div { margin: 8px 0; } }

/* print view: two days per row; the stay is a rounded-square icon beside a rectangular label */
.card-group .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .card-group .cards { grid-template-columns: 1fr; } }
@media print { .card-group .cards { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); } .day-card { margin-bottom: 0; } }
.stay-box { display: flex; align-items: stretch; margin-top: 8px; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--surface-3); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.stay-ico { flex: 0 0 38px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; background: var(--select-bg); border-radius: 10px; margin: 5px; }
.stay-txt { display: flex; flex-direction: column; padding: 5px 10px 5px 2px; min-width: 0; } .stay-txt small { color: var(--ink-3); } .stay-k { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }

/* printout: US Letter, using about 95% of the page width, with a title block on top */
@page { size: letter; margin: 0.3in; }
.print-title { display: none; }
.print-title.show { display: block; margin-bottom: 12px; }
.print-title h1 { margin: 0; font-size: 1.7rem; } .print-sub { color: var(--ink-2); font-size: .95rem; margin-top: 2px; }
@media print {
  #app { width: 95%; margin: 0 auto; padding: 0; max-width: none; }
  .print-title { display: block; margin-bottom: 10px; border-bottom: 2px solid #334155; padding-bottom: 6px; }
}
.road-tip { margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px; }

/* Attractions: a menu button in the title row opens it as a floating panel over the itinerary */
.menu-attr { background: #f1ecfd; border-color: #cdbdf5; color: var(--vote-ink); font-weight: 600; }
.menu-attr.on { background: #e4d9fb; box-shadow: inset 0 -2px 0 #7c3aed; }
.attr-count:not(:empty) { background: #7c3aed; color: #fff; border-radius: 999px; padding: 0 7px; font-size: .75rem; margin-left: 2px; }
.attr-overlay { position: fixed; z-index: 45; overflow-y: auto; margin: 0; box-shadow: 0 12px 30px rgba(15, 23, 42, .28); }
.attr-close { margin-left: auto; width: 26px; height: 26px; }

/* printing: let the page flow naturally (the screen layout fixes heights and a 70% max width) */
@media print {
  html, body { height: auto !important; overflow: visible !important; background: var(--surface); }
  #shell { display: block !important; height: auto !important; overflow: visible !important; }
  #left { width: 100% !important; max-width: none !important; min-width: 0 !important; height: auto !important; overflow: visible !important; background: var(--surface); }
}

/* print layout: two days side by side in a row that never splits across pages; compact break lines */
.card-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; break-inside: avoid; page-break-inside: avoid; }
.card-row .day-card { break-inside: avoid; page-break-inside: avoid; }
@media (max-width: 640px) { .card-row { grid-template-columns: 1fr; } }
@media print { .card-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .group-h { break-after: avoid; } .card-group { margin-bottom: 0; } }
.brk-line { margin: 8px 0; padding: 5px 8px; background: var(--surface-2); border-radius: 8px; font-size: .85rem; color: var(--ink-1); }
.brk-li { font-size: .85rem; color: var(--ink-1); border-left-color: var(--line-strong) !important; padding-top: 2px !important; padding-bottom: 2px !important; }

/* an unset stay pulses amber with a "!" because it changes the whole plan; unset start / end get a quieter amber ring */
.tabs .slot.needs { border: 2px dashed var(--warn); background: var(--warn-bg); position: relative; animation: attn 1.6s ease-out infinite; }
.tabs .slot.needs::after { content: '!'; position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%; background: var(--warn); color: #fff; font: 700 11px/16px system-ui, sans-serif; text-align: center; }
.tabs .slot.hint { border-color: var(--warn); }
.tabs .slot.needs:hover, .tabs .slot.needs.open { animation: none; }
@keyframes attn { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .65); } 70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } }
@media (prefers-reduced-motion: reduce) { .tabs .slot.needs { animation: none; box-shadow: 0 0 0 3px rgba(245, 158, 11, .5); } }
@media print { .tabs .slot.needs { animation: none; } }

.sugroup-h { flex-wrap: wrap; gap: 6px 10px; }
.drag-hint { margin-left: auto; font-size: .78rem; color: var(--vote-ink); text-align: right; }

/* review strip under the day tabs (pinned with them) and the recent searches in the Attractions panel */
.sec-review { background: var(--surface); border: 1px solid var(--line-soft); padding: 8px 10px; }
.rv-h { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 4px; }
.rv-items { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.rv { cursor: pointer; font: inherit; font-size: .8rem; }
.chip.rv.warn { background: var(--warn-bg); border-color: var(--warn); color: var(--warn-ink); }
.chip.rv.bad { background: #fee2e2; border-color: #f87171; color: var(--bad-ink); }
.chip.rv.easy { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.chip.rv:hover { filter: brightness(.96); }
.rv-ok { font-size: .85rem; color: var(--good-ink); }
.recents { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 2px; }
.chip.recent, .chip.recent-clear { cursor: pointer; font: inherit; font-size: .78rem; background: var(--surface); border: 1px solid #cdbdf5; color: var(--vote-ink); }
.recents:empty { display: none; }
/* unset start and end now pulse as well, a little slower than an unset stay */
.tabs .slot.hint { border: 2px dashed var(--warn); background: var(--warn-bg); animation: attn 2.4s ease-out infinite; }
.tabs .slot.hint:hover, .tabs .slot.hint.open { animation: none; }
@media (prefers-reduced-motion: reduce) { .tabs .slot.hint { animation: none; box-shadow: 0 0 0 3px rgba(245, 158, 11, .4); } }

/* the pinned area is a column: top, search and review stay put, only the day tabs scroll if the area is too tall */
.pinned { display: flex; flex-direction: column; overflow: hidden; }
.pinned > .sec { flex: 0 0 auto; }
.pinned > .sec-tabs { flex: 1 1 auto; min-height: 150px; overflow-y: auto; }
.rv-items { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; } .chip.rv { white-space: nowrap; flex: 0 0 auto; }
.pinned { max-height: 70vh; } .pinned > .sec-tabs { min-height: 220px; }

/* small or short screens: nothing is pinned, so the itinerary can always be reached */
@media (max-width: 900px), (max-height: 760px) {
  .pinned { position: static; max-height: none; overflow: visible; display: block; box-shadow: none; }
  .pinned > .sec-tabs { overflow: visible; }
}

.park-tip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; padding: 6px 8px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; }
.park-name { font-size: .78rem; font-weight: 700; margin-right: 4px; } .park-name a { color: var(--good-ink); }
@media print { .park-tip { display: none; } }
.badge.src { background: #ccfbf1; color: #115e59; }

/* previous trips: a pop-up under the top bar instead of a section at the bottom */
.topbar #status { margin-left: auto; }
.prev-pop { position: fixed; z-index: 55; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; box-shadow: 0 12px 30px rgba(15, 23, 42, .28); }
.prev-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
#prevBtn.on { background: var(--brand-soft); border-color: #6366f1; }

/* review follow-ups: the pinned area gets less of the screen, can be made compact, and touch targets grow on touch screens */
.pinned { max-height: 56vh; } .pinned > .sec-tabs { min-height: 160px; }
@media (pointer: coarse) { .btn, .chip, .slot, button { min-height: 36px; } .btn.small-btn { padding: 8px 12px; } .add-day { min-width: 32px; min-height: 32px; } }

/* Attractions panel: suggested groups sit side by side when there is room */
.sugroups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; align-items: start; }
.sugroups .sugroup { margin-bottom: 0; }
.attr-ctx { background: #ede4ff; border: 1px solid #cdbdf5; border-radius: 10px; padding: 6px 10px; margin: 6px 0; font-size: .85rem; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.attr-ctx .chev { margin-left: auto; }

.sugroups { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.sugroups .sug-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* travel rows: one-tap fly / N-day choices where the Adjust button used to be */
.tab-row.has-adj { padding-right: 96px; }
.tab-row .adj-seg { position: absolute; right: 0; top: 50%; transform: translateY(-50%); flex-direction: column; }
.tab-row .adj-seg .btn { border-radius: 0; margin: -1px 0 0; white-space: nowrap; font-size: .75rem; padding: 3px 8px; text-align: left; }
.tab-row .adj-seg .btn:first-child { border-radius: 8px 8px 0 0; margin-top: 0; } .tab-row .adj-seg .btn:last-child { border-radius: 0 0 8px 8px; }

/* day tabs are not pinned: a slim day bar replaces them once they scroll away, and they drop down over the itinerary on request */
.pinned { display: block; overflow: visible; max-height: none; }
.pinned > .sec-tabs { min-height: 0; overflow: visible; }
.daybar { position: absolute; left: 12px; right: 12px; top: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 12px 12px; box-shadow: 0 6px 14px rgba(15, 23, 42, .18); z-index: 31; }

#tabsSec.floating { position: fixed; z-index: 44; overflow-y: auto; box-shadow: 0 12px 30px rgba(15, 23, 42, .28); margin: 0; }
.rv-items { flex-wrap: wrap; overflow: visible; } .chip.rv { white-space: normal; flex: 0 1 auto; }
@media (max-width: 900px), (max-height: 760px) { .daybar { display: none !important; } #tabsSec.floating { position: static; } }


/* day chips inside the Attractions panel */
.attr-days { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; padding: 6px 8px; background: var(--surface); border: 1px dashed #cdbdf5; border-radius: 10px; }

.chip.day-chip.on { background: #7c3aed; color: #fff; border-color: #6d28d9; } .chip.day-chip.on .muted { color: #e9d5ff; }

/* day cards inside the Attractions panel: the same look as the day tabs, big enough to drop a place on */
.attr-days { display: block; }
.attr-days-h { margin-bottom: 6px; }
.attr-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.attr-tabs button { flex: none; min-width: 112px; min-height: 100px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; font: inherit; text-align: center; line-height: 1.25; white-space: nowrap; }
.attr-tabs button:hover { border-color: var(--brand); }
.attr-tabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); } .attr-tabs button.on .muted { color: #e0e7ff; }
.attr-tabs .ti { display: block; font-size: .74rem; opacity: .9; }
.attr-tabs button.new { border-style: dashed; font-weight: 600; color: var(--ink-2); align-self: stretch; }
.attr-tabs button.drop-over { outline: 3px dashed #7c3aed; outline-offset: 2px; background: #ede4ff; color: var(--ink); }
.attr-tabs button { font-size: .85rem; min-width: 104px; }

/* the same attention badge as the day tabs, on the day cards inside the Attractions panel */
.attr-tabs button { position: relative; }
.attr-tabs button.replan { border-color: var(--warn); background: var(--warn-bg); box-shadow: 0 0 0 2px #fde68a; }
.attr-tabs button.replan.on { background: var(--brand); border-color: var(--warn); }
.attr-tabs .rp { position: absolute; bottom: -9px; left: -9px; width: 22px; height: 22px; border-radius: 50%; background: var(--warn); color: #fff; font-size: .75rem; line-height: 22px; text-align: center; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.3); }

/* once the full day tabs have scrolled away, the tour days stay one tap away as compact cards under the review strip */
.daybar { flex-wrap: wrap; justify-content: center; gap: 8px; padding: 8px 10px 10px; }
.dbcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 128px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; font: inherit; font-size: .8rem; line-height: 1.25; text-align: center; }
.dbcard:hover { border-color: var(--brand); }
.dbcard .ti { font-size: .74rem; white-space: nowrap; }
.dbcard.on { background: var(--brand); color: #fff; border-color: var(--brand); } .dbcard.on .muted { color: #e0e7ff; }
.dbcard.replan { border-color: var(--warn); background: var(--warn-bg); box-shadow: 0 0 0 2px #fde68a; } .dbcard.replan.on { background: var(--brand); }
.dbcard .rp { position: absolute; bottom: -8px; left: -8px; width: 20px; height: 20px; border-radius: 50%; background: var(--warn); color: #fff; font-size: .74rem; line-height: 20px; text-align: center; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.3); }

/* spacing after the review card, and the day strip as its own rounded card instead of a flap under the header */
.sec-review { margin-bottom: 12px; }
.daybar { top: calc(100% + 2px); border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.sec-review { margin-bottom: 0; }
.pinned { padding-bottom: 12px; }
.daybar { top: calc(100% + 2px); }

/* one deck: the day strip continues the review card (no gap, shared edges), corners rounded only at the very bottom */
.sec-review.attached { border-radius: 14px 14px 0 0; border-bottom-color: transparent; }
.daybar { top: auto; border-radius: 0 0 14px 14px; border-top: 1px solid var(--line-soft); box-shadow: 0 8px 14px -6px rgba(15, 23, 42, .25); }

/* scrolling down an itinerary moves only the places: the itinerary header stays under the day strip as part of the same deck */
@media (min-width: 901px) and (min-height: 761px) {
  .sec-itin { padding-top: 0; }
  .itin-h { position: sticky; top: var(--stick, 0px); z-index: 29; background: inherit; margin: 0 -12px 8px; padding: 12px 12px 8px; border-radius: 14px 14px 0 0; }
  .sec-itin .itin-h { box-shadow: 0 6px 8px -6px rgba(15, 23, 42, .25); }
}
.daybar.stuck { border-radius: 0; box-shadow: none; }

/* the day summary: date and start time on one line, the numbers as separate tiles, the time range underneath */
#summary { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
.sum-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; }
.sum-date a { margin-left: 8px; font-size: .85rem; }
.sum-start { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; font-size: .9rem; }
.sum-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.sum-stats .stat { background: var(--surface-2); border-radius: 10px; padding: 6px 12px; font-size: .9rem; white-space: nowrap; }
.sum-stats .stat b { font-weight: 700; }
.sum-range { color: var(--ink-3); font-size: .85rem; }
/* the chips under each place: a little more room */
.ins { gap: 6px 8px; margin: 10px 0 6px; }

/* hotel suggestions: price band and live-price links */
.stay-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 6px; }
.chip.stay-link { text-decoration: none; font-size: .75rem; background: var(--brand-soft); border: 1px solid #c7d2fe; color: #3730a3; cursor: pointer; }
.chip.stay-link:hover { background: #e0e7ff; }
.badge.price { background: var(--good-bg); color: var(--good-ink); font-weight: 700; }

/* archive and delete */
.prev-row { display: flex; align-items: center; gap: 8px; }
.prev-link { flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.trip-acts { display: inline-flex; gap: 4px; }
.archived-box { margin: 14px 0 6px; background: var(--surface-2); border: 1px solid #dde3ea; border-radius: 14px; padding: 8px 12px; }
 .archived-box summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
.archived-box .prev-grid { margin-top: 8px; }

/* review: the label on the left and every item on the same row, right-justified */
.rv-row { display: flex; align-items: flex-start; gap: 12px; }
.rv-row .rv-h { margin: 5px 0 0; flex: 0 0 auto; }
.rv-row .rv-items { flex: 1; justify-content: flex-end; }


/* date picker: a month grid with weekends and holidays marked, and quick picks for upcoming weekends */
.modal.wide { width: min(700px, 100%); }
.cal-wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; margin-top: 8px; }
.cal { flex: 0 0 290px; }
.cal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-wd span { text-align: center; font-size: .74rem; font-weight: 700; color: var(--ink-3); } .cal-wd .we { color: #b45309; }
.cal-d { aspect-ratio: 1; border: 1px solid transparent; border-radius: 8px; background: var(--surface); cursor: pointer; font: inherit; font-size: .85rem; padding: 0; }
.cal-d:hover { border-color: var(--brand); }
.cal-d.we { background: #fff7ed; color: #9a3412; } .cal-d.hol { box-shadow: inset 0 -3px 0 var(--warn); }
.cal-d.span { background: var(--select-bg); color: #1e3a8a; } .cal-d.we.span { background: #bfdbfe; }
.cal-d.today { outline: 2px solid #94a3b8; outline-offset: -2px; }
.cal-d.on { background: var(--brand); color: #fff; font-weight: 700; }
.cal-key { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.cal-key .k { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; } .cal-key .k.we { background: #fed7aa; } .cal-key .k.hol { background: var(--surface); box-shadow: inset 0 -3px 0 var(--warn); border: 1px solid var(--line-soft); } .cal-key .k.span { background: #bfdbfe; }
.cal-side { flex: 1 1 230px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.cal-side .section-title { margin: 0; }
.chip.cal-chip { cursor: pointer; font: inherit; font-size: .8rem; background: #fff7ed; border: 1px solid #fdba74; color: #9a3412; text-align: left; }
.chip.cal-chip.lw { background: #ecfeff; border-color: #67e8f9; color: #155e75; }
.chip.cal-chip:hover { filter: brightness(.96); }

/* EV range: a few groups of popular models instead of typing a number */
.ev-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 6px 0; }
.ev-card { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font: inherit; font-weight: 400; }
.ev-card strong { font-size: .9rem; } .ev-card span { font-size: .8rem; color: var(--brand); font-weight: 600; } .ev-card small { color: var(--ink-3); font-size: .74rem; line-height: 1.3; }
.ev-card:hover { border-color: var(--brand); } .ev-card.on { background: var(--select-bg); border-color: var(--brand); box-shadow: inset 0 -3px 0 var(--brand); }
.cal-g { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-d, .cal-pad { min-width: 0; width: 100%; box-sizing: border-box; }
.cal-d { height: 38px; aspect-ratio: auto; }
.cal-pad { height: 38px; display: block; }

/* stay pop-up: four tabs, and the shared price date beside the section title */
.stay-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 2px; border-bottom: 1px solid var(--line-soft); }
.stay-tab { border: 1px solid transparent; border-bottom: 0; background: none; padding: 6px 10px; border-radius: 8px 8px 0 0; cursor: pointer; font: inherit; font-size: .85rem; color: var(--ink-2); }
.stay-tab.on { background: var(--brand-soft); border-color: #c7d2fe; color: #3730a3; font-weight: 700; }
.stay-when { text-transform: none; letter-spacing: 0; font-weight: 500; }
.chip.stay-link.big { font-size: .9rem; padding: 6px 14px; }
.badge.public { background: var(--good-bg); color: var(--good-ink); } .badge.private { background: #fee2e2; color: var(--bad-ink); }
.stay-tabs { flex-wrap: nowrap; } .stay-tab { white-space: nowrap; text-align: center; }
.stay-tabs.icons-only .lbl { display: none; } .stay-tabs.icons-only .stay-tab { font-size: 1.1rem; }

/* anchored pop-up (the stay picker): fixed distance from the top, centred across the left pane, only its height changes */
.modal-overlay.anchored { align-items: flex-start; justify-content: flex-start; padding: 0; }
.modal-overlay.anchored .modal { position: absolute; top: 6vh; left: var(--ax, 50%); transform: translateX(-50%); width: min(560px, calc(100% - 32px)); min-height: 0; max-height: 88vh; transition: height .25s ease; }
.stay-tab { flex: 1 0 auto; padding: 6px 8px; }
.cal-more { border: 0; background: none; color: var(--brand); cursor: pointer; font: inherit; font-size: .85rem; padding: 2px 0; }
.cal-more:hover { text-decoration: underline; }

/* data that could not load right now: quiet, dashed, and it says it will come back */
.chip.soft { background: var(--surface-3); border: 1px dashed var(--line-strong); color: var(--ink-2); }
.soft-note { color: var(--ink-2); background: var(--surface-3); border: 1px dashed var(--line); border-radius: 8px; padding: 6px 10px; }

/* collaboration: roles, share pop-up, suggestions, reactions, versions */
.role-note { font-size: .85rem; }
.share-row { padding: 10px 0; border-bottom: 1px solid var(--line-soft); } .share-row:last-child { border-bottom: 0; }
.share-url { display: flex; flex-wrap: wrap; gap: 6px; } .share-url input { flex: 1 1 220px; min-width: 0; font: inherit; font-size: .8rem; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-3); }
.sg-form { grid-template-columns: 130px 130px 1fr; } .sg-form select { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
@media (max-width: 560px) { .sg-form { grid-template-columns: 1fr 1fr; } .sg-form .searchbox { grid-column: 1 / -1; } }
.sg-list li { align-items: flex-start; flex-wrap: wrap; }
.btn.react.on { background: var(--select-bg); border-color: #3b82f6; box-shadow: inset 0 -2px 0 #3b82f6; }
.crowd-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.react-count { background: var(--surface-2); border-radius: 999px; padding: 2px 8px; font-size: .78rem; }
.pr-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.pr-text { flex: 1 1 220px; } .pr-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pr-acts select { font: inherit; font-size: .8rem; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; }
.chip.rv.vote { background: var(--brand-soft); border-color: #818cf8; color: #3730a3; }
.mv-days { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ver-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.ver-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: inherit; }
.ver-row.on { background: var(--brand-soft); border-color: #6366f1; } .ver-row:hover { border-color: var(--brand); }
.ver-new { display: flex; gap: 8px; margin-top: 10px; } .ver-new input { flex: 1; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.badge.ver { background: #ecfccb; color: #3f6212; }

/* ---------- phones (up to 820 px wide) ---------- */
.topbar.icons-only .lbl, .top.compact.icons-only .lbl { display: none; }
@media (max-width: 820px) {
  html, body { height: auto; }
  #shell { display: block; height: auto; }
  #left { width: 100% !important; max-width: none; min-width: 0; height: auto; overflow: visible; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  #divider { display: none; }
  /* the pinned header, day strip and floating tab drawers are for computers; on a phone everything scrolls with the page */
  .pinned { position: static; max-height: none; overflow: visible; box-shadow: none; padding-bottom: 0; margin: 0 0 8px; }
  .daybar { display: none !important; }
  .itin-h { position: static !important; }
  /* pop-ups become bottom sheets, the Attractions panel and the trip list fill the screen */
  .modal-overlay, .modal-overlay.anchored { align-items: flex-end; justify-content: stretch; padding: 0; }
  .modal-overlay .modal, .modal-overlay.anchored .modal { position: relative; top: auto; left: auto; transform: none; width: 100% !important; max-width: none; border-radius: 18px 18px 0 0; max-height: 92vh; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .attr-overlay { position: fixed !important; inset: 0 0 var(--tabH, 0px) 0 !important; width: auto !important; max-height: none !important; border-radius: 0; z-index: 60; padding-bottom: 24px; }
  .prev-pop { left: 8px !important; right: 8px !important; width: auto !important; }
  /* touch-sized controls and no zoom-on-focus on iPhones */
  input, select, textarea { font-size: 16px !important; }
  .btn, button { min-height: 40px; } .btn.small-btn { padding: 8px 12px; }
  /* chips are labels, not tap targets, unless they are buttons; keep them compact so a card does not fill with tall pills */
  .chip, a.chip { min-height: 0; } button.chip { min-height: 36px; }
  .stop-actions { margin-left: 0; width: 100%; } .stop-actions .btn { flex: 1 1 auto; }
  .itin-actions { justify-content: flex-start; flex-wrap: wrap !important; overflow-x: visible; }
  .tl { grid-template-columns: 56px 1fr; }
  .cal-wrap { flex-direction: column; } .cal { flex: 1 1 auto; width: 100%; }
  .ev-groups { grid-template-columns: 1fr; }
  .card-row { grid-template-columns: 1fr; }
  .attr-tabs button { min-width: 96px; }
}
@media (max-width: 420px) { .rv-row { flex-direction: column; gap: 4px; } .rv-row .rv-items { justify-content: flex-start; } }

.data-credit { margin: 16px 0 6px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); text-align: center; }
.credit-h { font-size: .8rem; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.credit-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.credit-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 6px; border: 1px solid var(--line-soft); border-radius: 999px; background: var(--brand-soft); color: var(--ink-2); font-size: .75rem; text-decoration: none; }
.credit-chip:hover { border-color: var(--brand); color: var(--brand); }
.credit-ic { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); font-size: .8rem; }
.credit-fine { font-size: .74rem; color: var(--ink-3); margin-top: 8px; line-height: 1.4; }

/* Clean theme: the light look. A soft blue-grey page, white cards, one blue accent, and the same colour meanings as the dark look (green good, amber needs attention, red problem). */
:root[data-theme="clean"] {
  --brand: #2563eb; --brand-soft: #eaf1ff; --on-brand: #ffffff; --select-bg: #dbe7ff;
  --warn: #d97706; --warn-bg: #fff7e6; --warn-soft: #fdecc8; --warn-ink: #8a4b08;
  --bad: #b91c1c; --bad-ink: #8f1d1d; --good-bg: #e5f6ec; --good-ink: #17653a; --vote-ink: #4338ca;
  --line: #d3dbe8; --line-soft: #e3e9f2; --line-strong: #9aa8bd; --line-faint: #edf1f7;
  --ink: #0f172a; --ink-1: #273449; --ink-2: #475569; --ink-3: #64748b;
  --bg: #f3f6fb; --surface: #ffffff; --surface-2: #eef2f8; --surface-3: #f7f9fc;
}
[data-theme="clean"] body { background: var(--bg); }
[data-theme="clean"] .sec, [data-theme="clean"] .sec-tabs, [data-theme="clean"] .sec-itin, [data-theme="clean"] .sec-attr,
[data-theme="clean"] .sec-itin.state-warn, [data-theme="clean"] .sec-itin.state-good { background: var(--surface); border: 1px solid var(--line-soft); box-shadow: none; }
[data-theme="clean"] .sec-itin .summary { background: var(--surface-3); border-color: var(--line-soft); }
[data-theme="clean"] .sec-h, [data-theme="clean"] .sec-itin .sec-h, [data-theme="clean"] .sec-attr .sec-h,
[data-theme="clean"] .sec-itin.state-warn .sec-h, [data-theme="clean"] .sec-itin.state-good .sec-h { color: var(--ink-3); }
[data-theme="clean"] .sec-itin.state-warn .itin-note, [data-theme="clean"] .sec-itin.state-good .itin-note { color: var(--ink-2); background: var(--surface-3); }
[data-theme="clean"] .sec-attr .badge { background: var(--surface-2); color: var(--ink-2); }
[data-theme="clean"] .sec-top, [data-theme="clean"] .sec-search { box-shadow: none; border: 1px solid var(--line-soft); }
[data-theme="clean"] .btn { border-radius: 8px; }

.est-who { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 8px 0; }
.est-who label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; } .est-who input { width: 92px; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-weight: 400; }
.est-table td { vertical-align: top; } .est-table td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.est-total td { border-top: 2px solid var(--line); }

.est-strip { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 0 0 12px; background: var(--surface); break-inside: avoid; }
.est-head { font-weight: 700; font-size: .85rem; margin-bottom: 6px; }
.est-cells { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.est-cell { border-left: 3px solid var(--line-soft); padding-left: 8px; } .est-cell:last-child { border-left-color: var(--brand); }
.est-t { font-size: .75rem; color: var(--ink-2); } .est-v { font-size: 1.05rem; font-weight: 700; } .est-n { font-size: .74rem; color: var(--ink-3); } .est-fine { font-size: .74rem; color: var(--ink-3); margin-top: 4px; }
@media (max-width: 640px) { .est-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media print { .est-cells { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; } }

.opt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .opt-cols ol { margin: 2px 0 0; padding-left: 20px; }

.ico-attr { vertical-align: -5px; }
.menu-attr { color: #6d28d9; } .menu-attr:hover { background: #e9defc; }
[data-theme="clean"] .menu-attr { background: var(--surface); border-color: var(--line); color: var(--brand); }

.est-tabs { display: flex; margin: 4px 0 10px; } .est-tabs .btn { flex: 1; }
.est-fams { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin: 8px 0; }
.est-fam { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px; min-width: 110px; }
.est-fam label { display: flex; flex-direction: column; font-weight: 600; } .est-fam input { width: 70px; font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; font-weight: 400; }
.est-h { margin: 16px 0 6px; font-size: .95rem; } .est-table th { text-align: right; font-size: .8rem; } .est-table th:first-child { text-align: left; }
.est-table td:not(:first-child) { text-align: right; } .good-txt { color: var(--good-ink); }

.est-compare { margin-top: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--brand-soft); } .est-compare .est-h { margin: 0 0 6px; }

.est-main { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--brand-soft); } .est-main .est-fam, .est-main .est-who input, .est-main .est-fam input { background: var(--surface); }
[data-theme="clean"] .est-main { background: var(--surface); border-color: var(--line); }

.est-cols { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 10px; }
.est-col { border-left: 3px solid var(--line-soft); padding-left: 8px; min-width: 0; } .est-col:last-child { border-left-color: var(--brand); }
.est-line { display: flex; justify-content: space-between; gap: 6px; font-size: .76rem; padding: 1px 0; }
.est-cmp .est-line { display: grid; grid-template-columns: 1.6fr 1fr 1fr; } .est-cmp .est-line span:not(:first-child) { text-align: right; }
.est-sum { font-weight: 700; border-top: 1px solid var(--line-soft); margin-top: 2px; padding-top: 2px; } .est-th { color: var(--ink-3); font-weight: 600; }
@media (max-width: 640px) { .est-cols { grid-template-columns: 1fr; } }
@media print { .est-cols { grid-template-columns: 1fr 1fr 2fr !important; } }

/* Vector icons (modern theme): one size and weight, coloured by the text around them */
.ic { display: inline-flex; width: 1.1em; height: 1.1em; vertical-align: -0.2em; align-items: center; justify-content: center; line-height: 1; }
.ic svg { width: 100%; height: 100%; display: block; }

/* Controls that are shown but not available yet */
.btn:disabled, .btn.disabled, .seg .btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
a.btn.disabled { pointer-events: auto; } .btn:disabled:hover { background: inherit; border-color: var(--line); }

.rv-empty { color: var(--ink-3); font-size: .85rem; line-height: 1.35; }

@media print { .data-credit { display: none !important; } }

/* Showcase strip: its own box above the top bar; it scrolls away with the page */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); }
/* thumbnails in My trips */
.prev-link { display: flex; align-items: center; gap: 10px; }
.prev-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: 0 0 52px; background: var(--brand-soft); }
.prev-thumb.ph { display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.prev-text { min-width: 0; display: block; }

kbd { display: inline-block; min-width: 1.5em; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); font: inherit; font-size: .8rem; font-weight: 600; text-align: center; color: var(--ink-2); }
.kb-table { width: 100%; border-collapse: collapse; } .kb-table td { padding: 4px 6px; vertical-align: top; } .kb-table td:first-child { white-space: nowrap; width: 1%; }

/* Landing page */
body.on-landing #shell { display: none; } .landing { height: 100vh; overflow-y: auto; background: var(--page, #f5f6f8); scroll-behavior: smooth; }

.ld-nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 5vw; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line-soft); }
.ld-nav nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; } .ld-nav nav a:not(.btn) { color: var(--ink-2); text-decoration: none; font-size: .9rem; } .ld-nav nav a:not(.btn):hover { color: var(--brand); }
.ld-brand { font-weight: 800; font-size: 1.15rem; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; } .ld-logo { font-size: 1.3rem; }
.ld-hero { padding: 2.5vh 5vw 16px; text-align: center; background: linear-gradient(180deg, var(--brand-soft), transparent); }
.ld-hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.8rem); line-height: 1.15; max-width: 880px; margin: 0 auto 14px; } .ld-hero em { color: var(--brand); font-style: normal; }
.ld-hero p { max-width: 640px; margin: 0 auto 20px; color: var(--ink-2); font-size: 1.05rem; line-height: 1.5; }
.ld-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; } .ld-cta .btn { padding: 11px 20px; font-size: 1rem; } .ld-fine { margin-top: 12px; font-size: .8rem; color: var(--ink-3); }
.ld-sec { padding: 5vh 5vw; max-width: 1180px; margin: 0 auto; } .ld-sec h2 { font-size: 1.5rem; margin: 0 0 6px; text-align: center; } .ld-sub { text-align: center; color: var(--ink-3); margin: 0 0 14px; }
.ld-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-top: 18px; }
.ld-feat { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px; padding: 16px; } .ld-feat h3 { margin: 6px 0 4px; font-size: 1rem; } .ld-feat p { margin: 0; color: var(--ink-2); font-size: .88rem; line-height: 1.45; }
.ld-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.ld-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; } .ld-step { padding: 8px 12px; } .ld-step h3 { margin: 8px 0 4px; font-size: 1rem; } .ld-step p { margin: 0; color: var(--ink-2); font-size: .88rem; line-height: 1.45; }
.ld-n { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; align-items: center; justify-content: center; }
.ld-filter { display: flex; gap: 8px; justify-content: center; margin: 4px 0 16px; } .ld-filter .chip.on { background: var(--select-bg); border-color: var(--brand); font-weight: 700; }
.ld-tours { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.ld-tour { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s ease, box-shadow .2s ease; }
.ld-tour:hover, .ld-tour:focus-visible { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,.14); border-color: var(--brand); }
.ld-tour img, .ld-ph { width: 100%; height: 130px; object-fit: cover; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.ld-tb { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; } .ld-tb strong { font-size: .95rem; } .ld-tag { font-size: .75rem; color: var(--brand); font-weight: 600; } .ld-bl { font-size: .8rem; color: var(--ink-3); line-height: 1.35; }
.ld-foot { padding: 24px 5vw 40px; text-align: center; border-top: 1px solid var(--line-soft); margin-top: 20px; }
@media (prefers-reduced-motion: reduce) { .ld-tour { transition: none; } .landing { scroll-behavior: auto; } }
@media print { .landing { display: none !important; } }

.ld-how { padding: 0 5vw 6px; max-width: 1180px; margin: 0 auto; }
.ld-how .ld-steps { display: flex; gap: 10px; margin: 0; flex-wrap: wrap; }
.ld-how .ld-step { flex: 1 1 220px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; }
.ld-how .ld-step strong { display: block; font-size: .9rem; } .ld-how .ld-step small { display: block; color: var(--ink-3); font-size: .78rem; line-height: 1.3; }
.ld-how .ld-n { flex: none; width: 26px; height: 26px; font-size: .85rem; }

.ld-how { padding: 0 5vw; margin: 0 auto 16px; } #ld-tours { padding-top: 0; }

/* How it works: plain information above the buttons, not cards */
.ld-hero { padding-bottom: 22px; }
ol.ld-how { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin: 0 auto 18px; padding: 0; max-width: 980px; text-align: left; }
ol.ld-how li { display: flex; align-items: flex-start; gap: 8px; max-width: 290px; color: var(--ink-2); font-size: .86rem; line-height: 1.35; }
ol.ld-how .ld-n { flex: none; width: 22px; height: 22px; font-size: .75rem; background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand); }
ol.ld-how strong { color: var(--ink-2); } .ld-st > span { color: var(--ink-3); }
#ld-tours { padding-top: 8px; }

/* Brand bar: Preferences | logo and name | My trips, New trip. The logo and name sit in the exact centre; the bar stays at the top while the page scrolls. */
.topbar.brandbar { position: sticky; top: 0; z-index: 40; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 0 0 10px; padding: 8px 10px; min-height: 52px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px; box-shadow: 0 6px 8px -6px rgba(15, 23, 42, .35); }
.tb-side { display: flex; align-items: center; gap: 8px; } .tb-side .btn { white-space: nowrap; } .tb-right { justify-content: flex-end; }
.tb-brand { display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--ink-2); }
.tb-logo { width: 30px; height: 30px; flex: none; } .tb-name { font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; color: var(--ink); line-height: 1; white-space: nowrap; }
.tb-brand:hover .tb-name { color: var(--brand); }
/* messages ("Saved", "Added to Tour day 2") pop up under the bar like a small toast, so the logo stays centred */
.tb-status { position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); z-index: 41; max-width: 90%; padding: 4px 12px; border-radius: 999px; background: #1f2937; color: #fff !important; font-size: .78rem; line-height: 1.3; text-align: center; box-shadow: 0 4px 12px rgba(0,0,0,.25); pointer-events: none; margin: 0 !important; }
.tb-status:empty { display: none; }
.pinned { top: var(--bar-h, 0px); }
@media (max-width: 520px) { .tb-name { font-size: 1.05rem; } }
@media (max-width: 820px) { /* phones keep Preferences at the left and My trips at the right; on a computer My trips comes first */
  .topbar.brandbar { top: 0; grid-template-columns: auto 1fr auto auto; } .topbar.brandbar > .tb-side:first-child { display: contents; }
  #prefsBtn { grid-column: 1; grid-row: 1; } .tb-brand { grid-column: 2; grid-row: 1; } #prevBtn { grid-column: 3; grid-row: 1; } .tb-right { grid-column: 4; grid-row: 1; }
}
@media print { .brandbar { display: none !important; } }

.ld-brand .ld-logo { width: 32px; height: 32px; } .ld-name { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }

.copies { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .74rem; font-weight: 700; vertical-align: middle; white-space: nowrap; }
h1 .copies { font-size: .8rem; }

/* Notes on a showcase tour: what you could do here, and the copy button */

/* the view-only review strip: label and note on the left, centred up and down */
.rv-row.rv-center { justify-content: flex-start; align-items: center; text-align: left; }
.rv-center .rv-items { justify-content: flex-start; align-items: center; flex: 0 1 auto; } .rv-center .sc-hintbox { margin: 0; justify-content: flex-start; text-align: left; }
.rv-center .rv-h { margin-bottom: 0; }

/* the showcase message under the trip title: centred, a little larger, no extra space around it */

/* One yellow bar style for every showcase message: the one under the trip title and the notes about what you could do. Same colour, size, centring and air around it. */

.map-off { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; color: var(--ink-3); background: #eef2f7; font-size: 2rem; } .map-off p { font-size: .9rem; max-width: 280px; margin: 8px 0 0; }
body.on-landing #tabBar { display: none !important; }

/* ---------- phones (added in the mobile review) ---------- */
@media (max-width: 560px) {
  .top.compact { gap: 8px; } .top.compact h1, .top.compact .title-input { flex: 1 1 100%; min-width: 0; }
  .tb-brand { min-width: 0; } .tb-logo { display: block; width: 26px; height: 26px; }
  .ld-nav { padding: 8px 4vw; flex-wrap: nowrap; } .ld-nav nav a:not(.btn) { display: none; } .ld-brand { white-space: nowrap; font-size: 1.05rem; } .ld-name { font-size: 1.1rem; }
  .ld-hero { padding-left: 4vw; padding-right: 4vw; } .ld-hero h1 { font-size: 1.55rem; }
  .ld-tours { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .ld-tour img, .ld-ph { height: 92px; } .ld-bl { display: none; } .ld-tb { padding: 8px 10px 10px; } .ld-tb strong { font-size: .85rem; }
  .ld-sec { padding-left: 4vw; padding-right: 4vw; }
  .modal .est-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; } .est-who input { width: 80px; }
  .est-compare { padding: 8px; } .kb-table td:first-child { white-space: normal; }
}
@media (hover: none) { #pfKeys { display: none; } }
@media (max-width: 560px) { .topbar.brandbar .lbl { display: none; } .topbar.brandbar { grid-template-columns: auto 1fr auto auto; gap: 6px; padding: 6px 8px; } .tb-side .btn { padding: 8px 10px; } .tb-name { font-size: 1.05rem; } .tb-brand { justify-self: center; } }
.tb-logo { max-width: none; min-width: 26px; }

.ld-hl { color: var(--brand); font-weight: 800; }

/* ---------- phones: floating bars and smaller day tabs ---------- */
@media (max-width: 820px) {
  /* the app bar already sticks; the day strip hangs under it once the tabs have scrolled away, and the itinerary heading sticks under both */
  .daybar { display: flex !important; position: fixed; top: 60px; left: 8px; right: 8px; z-index: 38; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 6px 14px rgba(15, 23, 42, .18); scrollbar-width: none; }
  .daybar::-webkit-scrollbar { display: none; } .daybar[hidden] { display: none !important; }
  .dbcard { flex: 0 0 auto; min-width: 0; padding: 4px 10px; font-size: .74rem; min-height: 0; } .dbcard .ti, .dbcard .rp { display: none; } .dbcard strong { font-size: .76rem; } .dbcard .muted { font-size: .74rem; }
  .itin-h { position: static !important; } /* its toolbar is tall, so on a phone it scrolls away; the day strip above is what stays */
  /* smaller day tabs: a title, a short date and the one fact that matters */
  .tabs button[data-day] { min-width: 0; padding: 4px 8px; font-size: .78rem; line-height: 1.2; border-radius: 10px; }
  .tabs button[data-day] .ti { font-size: .74rem; }
  .tabs button.tour .ti:nth-of-type(n+3), .tabs button.travel-out .ti:nth-of-type(n+2), .tabs button.travel-back .ti:nth-of-type(n+2), .tabs button[data-day] .ti.wx { display: none; }
  .tabs .slot { width: 30px; height: 30px; font-size: .9rem; } .tabs.grouped { gap: 8px; } .tab-row { gap: 4px; }
  .tab-head .gl { font-size: .74rem; } .tab-head .gt { font-size: .74rem; }
}
@media (max-width: 820px) {
  /* the fly or drive choice goes under the day cards as one row instead of a tall box on the right */
  .tab-row.has-adj { padding-right: 0; min-height: 0; }
  .tab-row .adj-seg { position: static; transform: none; flex-direction: row; flex: 1 1 100%; justify-content: center; margin-top: 4px; }
  .tab-row .adj-seg .btn { border-radius: 999px !important; margin: 0 3px; padding: 4px 10px; font-size: .74rem; min-height: 32px; }
  .tabs.grouped .tab-row { flex-wrap: wrap; max-width: 100%; }
  .tabs button[data-day] { max-width: 26vw; overflow: hidden; text-overflow: ellipsis; padding: 3px 6px; }
  .tabwrap { max-width: 100%; }
}
@media (max-width: 820px) {
  .tabwrap { padding-right: 12px; } .tabs .add-day, .add-day { right: -2px !important; top: -10px !important; width: 24px !important; height: 24px !important; min-height: 0; font-size: 1rem; }
  .tab-cal { left: -8px !important; top: -9px !important; transform: scale(.8); transform-origin: top left; }
}

/* ---------- phones, second pass: bars edge to edge, day cards share the row equally ---------- */
@media (max-width: 820px) {
  /* the app bar and the day strip run edge to edge and meet with no gap, so nothing peeks between or beside them */
  .topbar.brandbar { margin: -12px -12px 8px; border-radius: 0 0 14px 14px; border-width: 0 0 1px; box-shadow: 0 3px 8px -4px rgba(15, 23, 42, .35); }
  .daybar { left: 0 !important; right: 0 !important; border-radius: 0 0 14px 14px; border-width: 0 0 1px; padding: 5px 8px 6px; gap: 5px; box-shadow: 0 6px 10px -6px rgba(15, 23, 42, .35); }
  .dbcard { flex: 1 1 0; min-width: 46px; padding: 3px 4px; text-align: center; align-items: center; } .dbcard strong { font-size: .8rem; }
  /* each row (onward travel, tour, return travel): the cards split the width equally, three to a line at most; the stay circles stay small between them */
  .tabs.grouped .tab-row { flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; }
  .tabs.grouped .tab-row > button[data-day], .tabs.grouped .tab-row > .tabwrap { flex: 1 1 0; min-width: 78px; max-width: none; }
  .tabs.grouped .tab-row > .tabwrap > button[data-day] { flex: 1; width: 100%; max-width: none; }
  .tabs.grouped .tab-row > .slot { flex: 0 0 28px; width: 28px; height: 28px; font-size: .8rem; }
  .tabs button[data-day] { max-width: none; font-size: .74rem; }
  .tabs button[data-day] .ti { font-size: .74rem; }
}
@media (max-width: 820px) {
  .tabs.grouped .tab-row > button[data-day], .tabs.grouped .tab-row > .tabwrap { min-width: 62px; }
  .tabs.grouped .tab-row > .tabwrap { padding-right: 0; }
  .tabs.grouped .tab-row > .slot { flex-basis: 24px; width: 24px; height: 24px; font-size: .74rem; border-width: 2px; }
  .tabs button[data-day] { padding: 3px 3px; text-overflow: clip; font-size: .74rem; } .tabs button[data-day] strong, .tabs button[data-day] .ti { white-space: nowrap; }
}

/* ---------- phones, polish from the first real-size look ---------- */
.anchor-card { margin: 6px 0 10px; padding: 8px 10px; border: 1px solid var(--brand); border-radius: 12px; background: var(--surface); }
.ac-h { margin: 0 0 4px; font-size: .85rem; color: var(--ink-2); }
/* same left and right edges as the day box below it */
/* redesign: a thin day-length bar in each tour-day tab */
.tabs .load { display: block; height: 4px; border-radius: 2px; background: rgba(148, 163, 184, .35); overflow: hidden; margin-top: 4px; }
.tabs .load i { display: block; height: 100%; border-radius: 2px; background: var(--good); }
.tabs .load.long i { background: var(--warn); }
.tabs .load.light i { background: var(--brand); }
.tabs button.active .load { background: rgba(255, 255, 255, .35); }
.tabs button.active .load i { background: var(--surface); }
/* redesign: a stop card on a phone starts as one short block; its details, and the day's notes, unfold on a tap */
.ins-toggle, .stop-chev { display: none; }
/* redesign: the Undo message after a one-tap change */
.undo-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 24px); padding: 10px 14px; border-radius: 12px; background: var(--toast-bg); color: var(--toast-ink); font-size: .88rem; box-shadow: 0 10px 24px rgba(15, 23, 42, .3); }
.undo-toast button { min-height: 36px; padding: 0 8px; border: 0; background: transparent; color: var(--toast-act); font: inherit; font-weight: 800; cursor: pointer; }
/* ---------- phones: tab bar, map sheet and full-screen panels ---------- */
#tabBar, .sheet-grip { display: none; }
.phone-panel-box { display: none; }
/* ---------- computers: Review, Group and Costs under the map ---------- */
.side-pane { display: none; }
@media (min-width: 821px) {
  #right { display: flex; flex-direction: column; }
  #right #map { flex: 1 1 auto; min-height: 220px; height: auto; }
  .side-pane:not([hidden]) { display: block; flex: none; max-height: 40%; overflow-y: auto; background: var(--surface); border-top: 1px solid var(--line-soft); }
  .side-tabs { display: flex; gap: 4px; padding: 8px 12px 0; position: sticky; top: 0; background: var(--surface); z-index: 1; }
  .side-tabs button { border: 0; border-radius: 8px; padding: 6px 12px; background: none; color: var(--ink-2); font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; }
  .side-tabs button[aria-selected="true"] { background: var(--brand-soft); color: var(--brand); }
  .side-body { padding: 8px 12px 12px; } .side-body #review { margin: 0; }
  .side-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
  .side-costs { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; } .side-costs div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: .78rem; color: var(--ink-2); } .side-costs b { display: block; font-size: 1.1rem; color: var(--ink); }
}
/* ---------- computers: the day tabs are one row in the pinned area, always in view ---------- */
@media (min-width: 821px) and (min-height: 761px) {
  .daybar { display: none !important; }
  #tabsSec { margin: 0 0 8px; padding: 6px 10px 8px; }
  #tabs.tabs.grouped { flex-direction: row; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 14px; overflow-x: auto; margin: 0; padding-bottom: 4px; }
  .tab-group { flex: none; align-items: stretch; gap: 2px; }
  .tab-group .tab-head { margin: 0; justify-content: flex-start; } .tab-head .hint,
  .tab-row { flex-wrap: nowrap; justify-content: flex-start; } .tab-row.has-adj { padding-right: 0; min-height: 0; }
  .tab-row .adj-seg { position: static; transform: none; flex-direction: row; margin-left: 4px; } .tab-row .adj-seg .btn { border-radius: 8px !important; margin: 0 2px; padding: 3px 8px; }
  .tabs button[data-day] { min-width: 92px; padding: 5px 8px; }
  .tabs .ti { display: none; } .tabs .ti.ti-main { display: block; } /* the badge is a span too, so first-of-type would pick it instead of the places line */
  .tabs .slot { width: 30px; height: 30px; flex: 0 0 30px; font-size: .9rem; }
}
@media (min-width: 821px) {
  /* a folded showcase strip is one slim line */
}
@media (min-width: 821px) and (min-height: 761px) { #tabs.tabs.grouped { scrollbar-width: thin; } }
/* view mode shows what was chosen instead of the controls: how the trip travels, and the day's pace */
.tab-head .gh { margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .74rem; font-weight: 700; white-space: nowrap; }
.pace-note { padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .74rem; font-weight: 700; white-space: nowrap; }
/* ---------- tall computer screens: one header across the top of both columns ---------- */
@media (min-width: 821px) and (min-height: 821px) {
  #appHead { position: fixed; top: 0; left: 0; right: 0; z-index: 42; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; max-height: 45vh; overflow-y: auto; padding: 8px 12px 4px; background: var(--bg); box-shadow: 0 4px 10px -6px rgba(15, 23, 42, .35); }
  body:not(.on-landing) #shell { padding-top: var(--head-h, 0px); }
  #appHead .pinned { display: contents; }
  #appHead > .brandbar { position: static; grid-column: 1; grid-row: 1; margin: 0; min-height: 0; padding: 4px 8px; box-shadow: none; }
  #appHead .sec-top { grid-column: 2; grid-row: 1; margin: 0; padding: 0; background: none; box-shadow: none; border: 0; }
  #appHead .sec-top .top.compact { flex-wrap: nowrap; margin: 0; } #appHead .sec-top .top.compact .btn { white-space: nowrap; flex: none; } #appHead .sec-top .top.compact h1, #appHead .sec-top .title-input { flex: 1 1 auto; min-width: 120px; }
  #appHead .sec-top .notice { margin: 4px 0 0; padding: 4px 10px; font-size: .8rem; }
  #appHead #tabsSec { grid-column: 1 / -1; grid-row: 2; margin: 4px 0 0; }
  #appHead .sec-search { grid-column: 1 / -1; grid-row: 3; margin: 6px 0 0; }
  #appHead .sec-review { display: none; }
}
/* redesign: a stop flashes when its pin is clicked; the day length is also written under its bar; the phone app bar hides while scrolling down */
.tl.flash { animation: tl-flash 1.4s ease-out; }
@keyframes tl-flash { 0% { box-shadow: 0 0 0 3px var(--brand); } 100% { box-shadow: 0 0 0 3px transparent; } }
@media (prefers-reduced-motion: reduce) { .tl.flash { animation: none; box-shadow: 0 0 0 3px var(--brand); } }
.tabs .load-t { display: block; margin-top: 1px; font-size: .74rem; opacity: .85; white-space: nowrap; }
.mode-seg .btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
/* redesign: the data credits fold into one line; Terms and Privacy stay in view */
.data-credit summary { cursor: pointer; list-style: none; margin: 0; padding: 4px 0; min-height: 32px; }
.data-credit summary::-webkit-details-marker { display: none; }
.data-credit summary::after { content: ' ▾'; }
.data-credit details[open] summary::after { content: ' ▴'; }
.data-credit details[open] summary { margin-bottom: 8px; }

/* a stop on a computer: the number is part of the name; the phone-only pieces (number circle, duration beside the time, quick actions, button words) stay hidden */
.stop-title .num, .tl-dur, .stop-quick, .crowd-bar .react .lbl { display: none; }

/* ---------- the day summary and the day's notes are one box; the Trips window ---------- */
.day-box { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; margin: 8px 0; }
.day-box .summary { margin: 0; border: 0; border-radius: 0; background: none; }
.day-box .insights { padding: 0 12px 8px; } .day-box .insights:empty { padding: 0; }
.tabs2 { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; } .tabs2::-webkit-scrollbar { display: none; }
.tabs2 button { border: 0; background: none; padding: 7px 14px; border-radius: 10px; min-height: 38px; font: inherit; font-size: .86rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.tabs2 button[aria-selected="true"] { background: var(--brand-soft); color: var(--brand); }
.modal.trips-modal { width: min(660px, 100%); }
.trips-body { display: grid; gap: 10px; margin-top: 10px; align-content: start; }
.trips-foot { display: flex; justify-content: flex-end; margin-top: 14px; }
.trip-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); }
.trip-link { display: flex; flex: 1; min-width: 0; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.trip-thumb { flex: none; width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; font-size: 1.3rem; }
.trip-text { display: grid; gap: 2px; min-width: 0; } .trip-text strong { overflow-wrap: anywhere; } .trip-text .meta { font-size: .78rem; color: var(--ink-3); } .trip-text .pill { justify-self: start; }
.trips-arch summary { cursor: pointer; padding: 6px 0; font-weight: 700; color: var(--ink-2); } .trips-arch .trip-row { margin-top: 8px; }
.tours-hero { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); font-size: .86rem; color: var(--ink-2); line-height: 1.4; } .tours-hero strong { font-size: 1rem; color: var(--ink); }
.tour-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.tour-filters button { min-height: 36px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.tour-filters button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.tour-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } @media (min-width: 560px) { .tour-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tour-card { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; background: var(--surface); }
.tour-pic { display: block; background: var(--surface-2); } .tour-pic img, .tour-pic .ph { display: block; width: 100%; height: 92px; object-fit: cover; text-align: center; line-height: 92px; }
.tour-tx { display: grid; gap: 4px; padding: 8px 10px 10px; align-content: start; } .tour-tx a { color: inherit; text-decoration: none; } .tour-tx strong { font-size: .88rem; line-height: 1.25; } .tour-tx .meta { font-size: .76rem; color: var(--ink-3); } .tour-tx .copies { justify-self: start; } .tour-tx .btn { justify-content: center; }

/* the trip name with its dates, and the row of actions, as two groups (a computer lays them out as one row) */
.trip-head, .top-acts { display: contents; } .trip-sub { display: none; }

.add-places, .swipe-hint { display: none; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink-1); font-size: 16px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { background: var(--surface-3); }
.sug { flex-wrap: wrap; }
.sug-pv { flex: 0 0 100%; display: grid; gap: 8px; margin-top: 6px; cursor: default; }
.sug-pv-act { display: flex; gap: 8px; justify-content: flex-end; }
.sug-pv-act .btn.on { border-color: var(--brand); color: var(--brand); }
.sug-pv-act .btn.on::first-letter { color: #e11d48; }
.lunch a.chip.ask, .rest-card a.btn { text-decoration: none; }
/* App bar on a computer: the logo at the far left, then My trips; "Plan a trip" sits with the trip's actions, before Make it mine */
.topbar.brandbar { grid-template-columns: auto auto 1fr; }
.topbar.brandbar .tb-brand { grid-column: 2; justify-content: flex-start; }
.topbar.brandbar .tb-trips { grid-column: 1; }
.topbar.brandbar .tb-right { display: none; }
/* Landing bar follows the theme, with brighter links */
.ld-nav { background: color-mix(in srgb, var(--bg) 92%, transparent); }
.ld-nav nav a:not(.btn) { color: var(--ink-1); font-weight: 600; } .ld-nav nav a:not(.btn):hover { color: var(--brand); }
.ld-name { color: var(--ink); }
/* A day is not wrapped in green or yellow: the day's badge says it. The itinerary and the day tabs stay neutral, like on a phone */
.sec-itin.state-warn, .sec-itin.state-good { background: none; border: 0; box-shadow: none; }
.sec-itin.state-warn .sec-h, .sec-itin.state-good .sec-h { color: var(--ink-3); }
.sec-itin.state-warn .summary, .sec-itin.state-good .summary { border-color: var(--line-soft); }
.tabs button.replan, .attr-tabs button.replan, .dbcard.replan { border-color: var(--line); background: var(--surface); box-shadow: none; }
.tabs button.replan.active, .attr-tabs button.replan.on, .dbcard.replan.on { background: var(--brand); border-color: var(--brand); }
.park-tip { background: var(--surface-2); border-color: var(--line-soft); }
.park-name a { color: var(--brand); }
/* Desktop day bar: travel groups are as wide as their day cards (their heading wraps); the tour days share what is left and grow */
@media (min-width: 821px) and (min-height: 761px) {
  #tabs.tabs.grouped { justify-content: center; } /* the groups sit in the middle of the bar: the same space left and right */
  #tabs.tabs.grouped .tab-group .tab-head { width: 0; min-width: 100%; }
  #tabs.tabs.grouped .tab-group { justify-content: flex-end; }
  #tabs.tabs.grouped .tab-group.tour .tab-row > button[data-day], #tabs.tabs.grouped .tab-group.tour .tab-row > .tabwrap { flex: 1 1 190px; min-width: 150px; max-width: 230px; }
}
/* Computer: lunch and drive cards look like the phone's: a quiet card with a coloured edge */
@media (min-width: 821px) {
  .itin-h { background: var(--bg); } /* the day's toolbar stays solid while it sticks above the scrolling places */
  html[data-theme] .itinerary .leg, .itinerary .leg { display: flex; align-items: center; gap: 6px; margin: 6px 0; padding: 7px 10px; line-height: 1.2; border: 1px solid var(--line-soft); border-left: 3px solid #0f766e; border-radius: 10px; background: var(--surface); }
  html[data-theme] .lunch, .lunch { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 0 8px; padding: 6px 10px; margin: 6px 0; border: 1px solid var(--line-soft); border-left: 3px solid var(--warn); border-radius: 10px; background: var(--surface); }
  .lunch > strong { grid-column: 1; font-size: .85rem; } .lunch > .muted { grid-column: 1; font-size: .78rem; line-height: 1.25; }
  .lunch .lunch-tools { grid-column: 2; grid-row: 1 / span 2; margin: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
  .lunch > .ins { grid-column: 1 / -1; margin-top: 2px; }
}
/* Desktop day bar: every day card is the same height, its text centred, and the start, stay and end icons sit on the cards' middle line */
@media (min-width: 821px) and (min-height: 761px) {
  #tabs.tabs.grouped .tab-row { align-items: center; }
  #tabs.tabs.grouped .tab-row > button[data-day], #tabs.tabs.grouped .tab-row > .tabwrap > button[data-day] { height: 112px; min-height: 112px; display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; }
  #tabs.tabs.grouped .tab-row > .tabwrap { display: flex; align-items: center; }
  #tabs.tabs.grouped .tab-row > .slot { align-self: center; margin: 0; }
}
.dflag { display: inline-flex; vertical-align: -2px; margin-left: 5px; font-size: .85em; color: var(--warn); } .dflag.light { color: var(--brand); }
.tabs button.active .dflag { color: #fff; }
/* App bar on a computer: My trips first, then the logo, with no bar around them */
.topbar.brandbar .tb-trips { grid-column: 1; } .topbar.brandbar .tb-brand { grid-column: 2; }
@media (min-width: 821px) {
  #appHead > .brandbar, .topbar.brandbar { background: none; border: 0; box-shadow: none; }
  /* the day's maps buttons are in the summary, as on a phone */
  #navSeg { display: none; }
  .sd-actions { display: flex; justify-content: flex-end; margin-top: 8px; } .sd-nav { display: inline-flex; gap: 6px; }
  .sd-actions .tool-btn { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border: 1px solid var(--brand); border-radius: 12px; background: var(--brand-soft); color: var(--brand); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
  .sd-actions .tool-btn:disabled { opacity: .5; cursor: default; } .map-ico { width: 15px; height: 15px; vertical-align: -3px; margin-right: 5px; }
}
.tabs .dname { display: block; }
.tabs .dname + br { display: none; }
.dflag, .dflag.light, .dflag.busy, .tabs button.active .dflag { color: #f5b301; }
@media (min-width: 821px) { .sum-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; } .sum-head .sd-actions { margin: 0 0 0 auto; } }
/* An unfolded preview stays inside its card: it may not be wider than the card, its pictures scroll sideways, and the card takes the whole row of its list */
.sug-pv { min-width: 0; max-width: 100%; box-sizing: border-box; overflow: hidden; }
.sug-pv > *, .sug-pv .pv { min-width: 0; max-width: 100%; box-sizing: border-box; }
.sug-pv .pv-photos { max-width: 100%; }
.sug-grid > .sug:has(.sug-pv) { grid-column: 1 / -1; }
/* Computer: the trip name sits in the middle of the space between the logo and the buttons */
@media (min-width: 821px) and (min-height: 761px) { #appHead .sec-top .title-input, #appHead .sec-top .top.compact h1 { text-align: center; } }
/* Lunch break: the button's words and icons sit in the middle of it, and the button sits in the middle of the card's height */
.lunch .lunch-tools { align-self: center; }
.lunch .lunch-tools .chip.ask { display: inline-flex; align-items: center; justify-content: center; gap: 4px; text-align: center; line-height: 1; }
.lunch .lunch-tools .chip.ask svg, .lunch .lunch-tools .chip.ask .ico { flex: none; vertical-align: 0; margin: 0; }
@media (min-width: 821px) { .lunch .lunch-tools .chip.ask { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-2); padding: 2px 10px; min-height: 28px; font-size: .75rem; } }
/* Rest break: the Find label and its icons sit in the middle of the button */
.rest-card a.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; text-align: center; line-height: 1; }
.rest-card a.btn svg, .rest-card a.btn .ico { flex: none; margin: 0; vertical-align: 0; }
.lunch > strong { font-size: .95rem; }
@media (min-width: 821px) { .lunch { padding: 10px 14px; gap: 4px 10px; align-items: center; } .lunch > .muted { font-size: .84rem; line-height: 1.3; } }
/* Computer, editing: the way to travel (Fly, same day, 1 day, 2 days ...) is one column of choices, the chosen one marked with a blue bar; the date button sits left of the home button */
@media (min-width: 821px) and (min-height: 761px) {
  #tabs.tabs.grouped .tab-row .adj-seg { flex-direction: column; align-items: stretch; gap: 3px; margin-left: 10px; max-height: 118px; overflow-y: auto; border: 0; }
  #tabs.tabs.grouped .adj-seg .btn { text-align: left; border-radius: 8px !important; margin: 0 !important; padding: 3px 10px 3px 8px; min-height: 26px; border: 1px solid var(--line-soft); border-left: 3px solid transparent; white-space: nowrap; }
  #tabs.tabs.grouped .adj-seg .btn.on { border-left-color: var(--brand); background: var(--brand-soft); color: var(--ink); font-weight: 700; }
}
.tabs .slot.cal { border: 2px solid var(--line-strong); background: var(--surface); }
.tabs .slot.cal:hover { border-color: var(--brand); background: var(--brand-soft); }
/* A day and its stay are one box with two columns, a quiet line between them; the date and home buttons are one box too */
.tabs .daybox { display: inline-flex; align-items: stretch; flex: none; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); position: relative; }
.tabs .daybox.travel-out, .tabs .daybox.travel-back { border-style: dashed; }
.tabs .daybox:has(button[data-day].active) { border-color: var(--brand); }
.tabs .daybox.travel-out:has(button[data-day].active), .tabs .daybox.travel-back:has(button[data-day].active) { border-color: var(--ink-2); border-style: solid; }
.tabs .daybox > button[data-day], .tabs .daybox > .tabwrap > button[data-day] { border: 0 !important; box-shadow: none !important; border-radius: 11px 0 0 11px; background: transparent; }
.tabs .daybox button[data-day].active { background: var(--brand); } .tabs .daybox button[data-day].travel-out.active, .tabs .daybox button[data-day].travel-back.active { background: var(--ink-2); }
.tabs .daybox > .tabwrap { display: inline-flex; align-items: stretch; }
.tabs .daybox > .slot { flex: 0 0 44px; width: 44px !important; height: auto !important; align-self: stretch; margin: 0; border: 0; border-left: 1px solid var(--line-faint); border-radius: 0 11px 11px 0 !important; background: transparent; box-shadow: none; }
.tabs .daybox > .slot.filled { background: var(--good-bg); border-left: 1px solid var(--line-faint); }
.tabs .daybox:not(:has(.slot)) > button[data-day], .tabs .daybox:not(:has(.slot)) > .tabwrap > button[data-day] { border-radius: 11px; }
.tabs .startbox { display: inline-flex; flex: none; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.tabs .startbox > .slot { flex: 0 0 40px; width: 40px !important; height: 40px !important; margin: 0; border: 0; border-radius: 0 !important; background: transparent; box-shadow: none; }
.tabs .startbox > .slot:first-child { border-radius: 11px 0 0 11px !important; } .tabs .startbox > .slot:last-child { border-radius: 0 11px 11px 0 !important; }
.tabs .startbox > .slot + .slot { border-left: 1px solid var(--line-faint); }
.tabs .startbox > .slot.filled { background: var(--good-bg); }
@media (max-width: 820px) { .tabs .startbox { flex-direction: column; } .tabs .startbox > .slot { flex: 0 0 auto; width: 36px !important; height: 30px !important; } .tabs .startbox > .slot:first-child { border-radius: 11px 11px 0 0 !important; } .tabs .startbox > .slot:last-child { border-radius: 0 0 11px 11px !important; } .tabs .startbox > .slot + .slot { border-left: 0; border-top: 1px solid var(--line-faint); } }
.tabs .daybox > .slot, .tabs .daybox > .slot.filled, .tabs .startbox > .slot, .tabs .startbox > .slot.filled { border-width: 0 !important; box-shadow: none !important; background: transparent !important; }
.tabs .daybox > .slot, .tabs .daybox > .slot.filled { border-left: 1px solid var(--line-faint) !important; }
.tabs .startbox > .slot + .slot { border-left: 1px solid var(--line-faint) !important; }
.tabs .daybox > .slot.filled, .tabs .startbox > .slot.filled { background: color-mix(in srgb, var(--good-bg) 45%, transparent) !important; }
@media (max-width: 820px) { .tabs .startbox > .slot + .slot { border-left-width: 0 !important; border-top: 1px solid var(--line-faint) !important; } }
/* The first day carries the start on its left (with the start date under it when editing), the last day the end on its right */
.tabs .daybox > button[data-day], .tabs .daybox > .tabwrap > button[data-day] { border-radius: 11px; }
.tabs .daybox.has-l > button[data-day], .tabs .daybox.has-l > .tabwrap > button[data-day] { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.tabs .daybox.has-r > button[data-day], .tabs .daybox.has-r > .tabwrap > button[data-day] { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tabs .daybox > .startcol { display: flex; flex-direction: column; flex: 0 0 44px; width: 44px; border-right: 1px solid var(--line-faint); }
.tabs .daybox > .startcol > .slot { flex: 1 1 0; width: 100% !important; height: auto !important; min-height: 30px; margin: 0; border-width: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
.tabs .daybox > .startcol > .slot:first-child { border-top-left-radius: 11px !important; } .tabs .daybox > .startcol > .slot:last-child { border-bottom-left-radius: 11px !important; }
.tabs .daybox > .startcol > .slot + .slot { border-top: 1px solid var(--line-faint) !important; }
.tabs .daybox > .startcol > .slot.filled { background: color-mix(in srgb, var(--good-bg) 45%, transparent) !important; }
.tabs .daybox > .slot[data-slot^="end"] { border-radius: 0 11px 11px 0 !important; }
/* Day bars: green when the day is comfortable, yellow when it is too long or too light; travel days have one too */
.tabs .load.light i, .tabs .load.long i { background: #f5b301; }
.tabs .daybox > .add-day { position: absolute; top: -11px; right: 11px !important; left: auto; z-index: 4; }
@media (max-width: 820px) {
  .tabs .load { display: block !important; height: 4px; margin-top: 3px; } .tabs .load-t { display: block !important; font-size: .74rem; }
  .tabs .daybox > .add-day { top: -11px !important; right: 11px !important; width: 22px !important; height: 22px !important; line-height: 22px; }
}
.chg-list { margin: 8px 0 12px; padding-left: 18px; display: grid; gap: 6px; } .chg-list ul { margin: 4px 0 0; padding-left: 16px; }
.modal-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
/* Saved attraction groups flow into columns, so a short group leaves no hole under it */
.sugroups { display: block !important; column-width: 300px; column-gap: 10px; }
.sugroups .sugroup { break-inside: avoid; margin-bottom: 10px; }
.attr-tabs button[data-chip] { min-width: 0; padding: 6px 12px; }
/* +/- on every tour day, a quiet empty slot for what is not set, and no attention badge on the stay */
.tabs .daybox > .add-day, .tabs .daybox > .add-day:hover { width: auto !important; min-width: 30px; height: 20px !important; padding: 0 7px; border-radius: 10px; font-size: .74rem; font-weight: 700; line-height: 20px !important; top: -10px !important; right: 7px !important; transform: none; }
.tabs .slot.needs::after { display: none; }
.tabs .slot.empty { opacity: .4; cursor: default; }
.opt-list { display: grid; gap: 8px; margin: 8px 0 12px; }
.opt-list label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface); cursor: pointer; }
.opt-list label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.opt-list label.off { opacity: .5; cursor: default; } .opt-list small { display: block; color: var(--ink-2); font-size: .8rem; margin-top: 2px; }
.opt-list input[type=radio] { flex: none; width: auto; min-height: 0; margin: 4px 0 0; }
.who-pill { display: inline-flex; align-items: center; gap: 4px; max-width: 220px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--brand-soft); color: var(--ink); font: inherit; font-size: .82rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-pill b { overflow: hidden; text-overflow: ellipsis; } .who-pill:hover { border-color: var(--brand); }
.who-pill[hidden] { display: none; }
.pref-name { display: grid; gap: 4px; } .pref-name input { width: 100%; max-width: 260px; }
.mark.rate { background: var(--surface-2); color: var(--ink-1); border: 0; }
.badge.pop { background: var(--surface-2); color: var(--ink-1); margin-left: 4px; white-space: nowrap; }

/* Group activity: what the group suggested, liked and what the owner decided */
.group-activity { margin: 6px 0 4px; }
.act-h { margin: 12px 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.act-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.act-list li { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border: 1px solid var(--line-soft); border-radius: 8px; font-size: .88rem; }
.act-ic { flex: none; width: 1.4em; text-align: center; }
.act-list li > div { min-width: 0; overflow-wrap: anywhere; }

/* Is the stay confirmed? Shown to people who are only looking */
.stay-status { display: inline-block; margin: 0 0 8px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.stay-status.ok { background: #dcfce7; color: #166534; } .stay-status.wait { background: #fef3c7; color: #92400e; }

/* The stay pop-up is taller so search results and suggestions have room; a search list pushes what is below it instead of floating over it */
.stay-detail { margin: 14px 0 6px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); }
.stay-detail .sd-h { margin: 0 0 8px; font-size: 1rem; }
#anchorPanel .dropdown, .stay-detail .dropdown { position: static; margin-top: 4px; }
.stay-status { display: inline-block; margin: 0 0 0 4px; vertical-align: middle; }
.stay-none { margin: 0 0 8px; }

/* Stay section: head (status, name, popularity, likes), alternatives, then the search; on a phone the results come first and the search bar last */
.stay-line { margin: 0 0 8px; font-size: .92rem; }
.stay-head { padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-3, var(--surface)); }
.stay-head.ok { border-color: #86efac; } .stay-head.wait { border-color: #fcd34d; }
.stay-head .sh-top { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; } .stay-head .sh-name { font-size: 1.02rem; }
.stay-head .sh-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .stay-head .sh-acts:empty { display: none; }
.badge.likes { background: var(--brand-soft); color: var(--brand); }
.stay-find { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.stay-find .stay-tabs { order: 1; } .stay-find .sf-search { order: 2; } .stay-find .stay-body { order: 3; }
.sf-search { display: flex; gap: 8px; } .sf-search input { flex: 1; min-width: 0; padding: 9px 12px; font-size: 1rem; }
@media (max-width: 820px) { .stay-find .stay-body { order: 1; } .stay-find .stay-tabs { order: 2; } .stay-find .sf-search { order: 3; } }

.sh-top .sh-x { margin-left: auto; }
.stay-opt .sh-top { align-items: center; }

.stay-body .show-more { width: 100%; margin-top: 8px; }

.stay-head .sh-confirm { margin-left: auto; }

/* The status tag sits beside the name on a computer; on a phone it moves under the address, with the like buttons at the right */
.stay-head .st-m { display: none; }
.stay-head .sh-acts:not(:has(> :not(.st-m))) { display: none; }
@media (max-width: 820px) {
  .stay-head .st-d { display: none; }
  .stay-head .st-m { display: inline-flex; margin-right: auto; }
  .stay-head .sh-acts { display: flex; align-items: center; gap: 8px; }
  .stay-head .sh-acts:not(:has(> :not(.st-m))) { display: flex; }
  .stay-head .sh-acts > .seg { margin-left: auto; }
}

.live-pin { background: none; border: 0; } .live-pin span { display: block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }

/* Weather and road conditions in a day's summary (the phone centres them, see phone.css) */
.sd-cond:empty { display: none; } .sd-cond { margin-top: 8px; } .sd-wx { font-weight: 700; color: var(--ink); }
.sd-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sd-flags .chip { font-weight: 700; } .sd-flags .chip.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn); }
.sd-flags .chip.bad { background: color-mix(in srgb, var(--bad) 18%, var(--surface)); color: var(--bad-ink); border-color: var(--bad); }
.tool-btn.tm-btn { background: var(--brand); color: #fff; border-color: var(--brand); } .tool-btn.tm-btn svg { vertical-align: -3px; }

/* Desktop Trip Maps: food, parks and restrooms along the day's route, over the map */
@media (min-width: 821px) {
  #right { position: relative; }
  .desk-maps { position: absolute; top: 10px; left: 56px; z-index: 600; max-width: min(460px, calc(100% - 140px)); display: flex; flex-direction: column; gap: 6px; }
  .desk-maps[hidden] { display: none; }
  .dm-bar, .dm-res { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 4px 16px rgba(15, 23, 42, .25); }
  .dm-res { flex-direction: column; align-items: stretch; } .dm-top { display: flex; align-items: center; gap: 8px; } .dm-top .btn { margin-left: auto; }
  .dm-t { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; } .dm-open { box-shadow: 0 4px 16px rgba(15, 23, 42, .3); }
  .desk-maps .btn.on { background: var(--select-bg); border-color: var(--brand); }
  .dm-it { display: flex; align-items: center; gap: 6px; } .dm-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; } .dm-tx b, .dm-tx span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .desk-maps .spin { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
}
@media (max-width: 820px) { .desk-maps { display: none !important; } }
.sum-head > .sd-cond { flex: 1 0 100%; }

/* Computer: Trip Maps always sits on the map; its tools wrap, and Apple and Google Maps follow a divider */
@media (min-width: 821px) {
  .desk-maps { max-width: calc(100% - 130px); }
  .dm-sep { align-self: stretch; width: 1px; margin: 2px 4px; background: var(--line); }
  .dm-note { padding: 4px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: .78rem; color: var(--ink-2); box-shadow: 0 4px 16px rgba(15, 23, 42, .2); }
  .desk-maps .lv-app svg { width: 16px; height: 16px; vertical-align: -3px; }
}
/* Computer: onward and return travel sit beside their days, labelled up the side, as on the phone */
@media (min-width: 821px) {
  #tabs.tabs.grouped .tab-group { flex-direction: row; align-items: stretch; justify-content: flex-start; gap: 6px; }
  #tabs.tabs.grouped .tab-group .tab-head { width: auto; min-width: 0; margin: 0; padding: 0; justify-content: center; writing-mode: vertical-rl; transform: rotate(180deg); }
  #tabs.tabs.grouped .tab-head .gl { font-size: 0; } #tabs.tabs.grouped .tab-head .gl::after { content: attr(data-short); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
  #tabs.tabs.grouped .tab-head .gt, #tabs.tabs.grouped .tab-head .gh, #tabs.tabs.grouped .tab-head .gw, #tabs.tabs.grouped .tab-group > .tab-opts { display: none; }
}

/* Computer: the Trip Maps tools are centred over the map */
@media (min-width: 821px) { .desk-maps { left: 50%; transform: translateX(-50%); align-items: center; width: max-content; max-width: calc(100% - 140px); } .dm-res, .dm-note { width: min(460px, 100%); } }

/* Computer: Trip Maps tools stay on one line; a result's title and its buttons share a line, the buttons at the right */
@media (min-width: 821px) {
  .desk-maps { max-width: calc(100% - 100px); } .dm-bar { flex-wrap: nowrap; white-space: nowrap; } .dm-bar .btn { padding-left: 8px; padding-right: 8px; flex: none; }
  .dm-top .btn { margin-left: 0; } .dm-acts { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
  .dm-res { width: min(520px, 100%); }
}
@media (min-width: 821px) { .dm-top b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

/* Computer: a long drive is cut into its parts at each break, as on the phone: the part of the drive, then the break */
@media (min-width: 821px) {
  .drive-card { margin: 6px 0; padding: 8px 12px; border-radius: 10px; background: var(--good-bg); color: var(--good-ink); font-weight: 700; font-size: .92rem; border-left: 3px solid #0f766e; }
  .rest-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0; padding: 7px 12px; border: 1px dashed var(--line); border-left: 3px solid var(--travel); border-radius: 10px; background: var(--surface); }
  .rest-card .rc-tx { display: grid; gap: 2px; min-width: 0; } .rest-card .rc-tx b { font-size: .9rem; } .rest-card .rc-tx span { font-size: .8rem; color: var(--ink-2); } .rest-card .btn { flex: none; white-space: nowrap; }
}

/* Computer: the map with Trip Maps is right beside the plan, so a break needs no Find button (the phone keeps it, as its map is another tab) */
@media (min-width: 821px) { .lunch .lunch-tools .chip.ask.tm, .rest-card .btn.tm { display: none !important; } }
.sd-wx.sd-wx-quiet { font-weight: 400; font-size: .85rem; color: var(--ink-3); }

/* Showcase tour filters: chips for All and Popular, tour days and places, in the Trips window and on the home page. On a computer they flow as one wrapped run; the phone's rules follow */
.tour-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tour-filters .tf-run { display: contents; }
.tour-filters .tf-sep { align-self: stretch; width: 1px; margin: 4px 4px; background: var(--line); }
.tour-filters .tf-n { margin-left: 2px; font-weight: 600; opacity: .6; } .tour-filters button[aria-pressed="true"] .tf-n { opacity: .85; }
.tour-filters button:disabled { opacity: .4; cursor: default; }
.tour-filters .tf-result { display: none; }
.ld-filter { display: block; max-width: 980px; margin: 4px auto 18px; } .ld-filter .tour-filters { justify-content: center; }
@media (max-width: 820px) {
  /* a phone: two swipeable lines (days, then places) that stay under the top bar while the tours scroll, with how many tours match and a Clear button */
  .ld-filter { position: sticky; top: 60px; z-index: 9; margin: 0 -5vw 12px; padding: 8px 5vw 6px; background: var(--page, #0b1220); border-bottom: 1px solid var(--line); }
  .tour-filters { display: block; }
  .tour-filters .tf-run { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; margin: 0; padding: 2px 0 6px; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
  .tour-filters .tf-run::-webkit-scrollbar { display: none; }
  .tour-filters .tf-run button { flex: none; white-space: nowrap; min-height: 40px; }
  .tour-filters .tf-sep, .tour-filters .tf-n { display: none; }
  .tour-filters .tf-result { display: flex; align-items: center; gap: 12px; font-size: .8rem; color: var(--ink-3); font-weight: 600; }
  .tour-filters .tf-clear { min-height: 32px; padding: 2px 12px; border: 0; background: none; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; }
}
@media (max-width: 820px) { .ld-filter .tour-filters .tf-run button { min-height: 36px; padding-top: 4px; padding-bottom: 4px; } .ld-filter .tour-filters .tf-run { padding-bottom: 4px; } .ld-filter { padding-bottom: 4px; } }

@media (max-width: 820px) {
  .ld-filter .tour-filters .tf-run { margin: 0 -5vw; padding-left: 5vw; padding-right: 5vw; }
  .tour-filters .tf-result { min-height: 40px; } .tour-filters .tf-clear { min-height: 40px; }
  .tour-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tour-card { min-width: 0; } #tripsBody { min-width: 0; overflow-x: hidden; }
}
.tour-filters button:disabled { opacity: .55; }
#ld-tours { scroll-margin-top: 70px; }
.trips-body { grid-template-columns: minmax(0, 1fr); } .trips-body > * { min-width: 0; }

/* the Trips window's three tabs fit a phone */
@media (max-width: 820px) { .tabs2 button { padding: 7px 9px; font-size: .82rem; flex: 1 1 auto; white-space: nowrap; } }
