/* Travel Pal. Sizes follow the pwa-standards skill: header (rule 7), tab bar
   (rule 6) and 12px side margins (rule 8) match Aptera Hub's. */
:root {
  color-scheme: light;
  --bg: #f3f6fa;
  --card: #ffffff;
  --card-2: #eef2f7;
  --text: #0d1726;
  --text-2: #4a5668;
  --text-3: #6f7c8f;
  --line: #dfe5ee;
  --accent: #0a66e8;
  --accent-ink: #ffffff;
  --accent-soft: rgb(10 102 232 / 0.1);
  --good: #0c8a4d;
  --good-soft: rgb(12 138 77 / 0.12);
  --warn: #b4540a;
  --phone-top: calc(2px + env(safe-area-inset-top));
  --side-l: calc(12px + env(safe-area-inset-left));
  --side-r: calc(12px + env(safe-area-inset-right));
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}
/* Dark: picked in Filters, or System on a phone set to dark (index.html sets
   data-theme in the head, so the page never flashes the wrong one). */
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0b1119;
    --card: #151d29;
    --card-2: #1c2635;
    --text: #eef3f9;
    --text-2: #b2becd;
    --text-3: #8492a6;
    --line: #243043;
    --accent: #4d9bff;
    --accent-ink: #04122a;
    --accent-soft: rgb(77 155 255 / 0.14);
    --good: #3ccf86;
    --good-soft: rgb(60 207 134 / 0.14);
    --warn: #f0a050;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); }
body { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
h2 { font-size: 15px; margin: 0 0 8px; letter-spacing: -0.01em; }
h2 small { font-weight: 500; margin-left: 4px; }
small { color: var(--text-3); }

/* --- The pinned column: header, what scrolls, tab bar ----------------------- */
.app {
  position: fixed; inset: 0; max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column; background: var(--bg);
}
/* Rule 7: one solid color, the same as the status bar, never inside what scrolls. */
.topbar {
  flex: none; background: var(--bg);
  padding: var(--phone-top) var(--side-r) 10px var(--side-l);
}
.title-row { min-height: 44px; display: flex; align-items: center; gap: 4px; }
.topbar h1 {
  flex: 1; min-width: 0; margin: 0; font-size: 26px; line-height: 1.15; font-weight: 800;
  letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.icon-btn {
  flex: none; width: 44px; height: 44px; margin: 0; padding: 10px; border: 0; border-radius: 12px;
  background: none; color: var(--accent); display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn svg { width: 24px; height: 24px; fill: currentColor; }
.icon-btn.spacer { visibility: hidden; }
.scroll {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 0 var(--side-r) 28px var(--side-l);
}

/* Rule 6: icons only, 56px plus the safe area, 28px icons, 16px above them. */
.tabbar {
  flex: none; display: flex; height: calc(56px + env(safe-area-inset-bottom));
  padding: 0 0 env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: var(--bg);
}
.tab {
  position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
  /* As Aptera Hub's: 16px on top, then the icon centered in what's left, so it sits a little low. */
  padding: 16px 0 0; border: 0; background: none; color: var(--text-3);
}
.tab svg { width: 28px; height: 28px; fill: currentColor; }
.tab.active { color: var(--accent); }
.tab .badge {
  position: absolute; top: 16px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700;
  line-height: 18px; text-align: center;
}

/* --- Deals -------------------------------------------------------------------- */
.status { margin: 0 0 10px; color: var(--text-3); font-size: 13px; }
.status b { color: var(--text-2); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.chips:empty { display: none; }
.chip {
  padding: 4px 10px; border-radius: 999px; background: var(--card-2); color: var(--text-2);
  font-size: 13px; border: 0;
}
.deals { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.deal {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; width: 100%; text-align: left;
  padding: 12px 14px; border: 0; border-radius: 16px; background: var(--card);
}
.deal .who { grid-column: 1; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal .what { grid-column: 1; font-weight: 650; line-height: 1.25; }
/* A trip's length, easy to spot and never split. */
.deal .days { display: inline-block; margin-right: 4px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 14px; white-space: nowrap; }
.nw { white-space: nowrap; }
.deal .when { grid-column: 1; font-size: 13px; color: var(--text-3); }
.deal .price { grid-column: 2; grid-row: 1 / span 3; text-align: right; align-self: center; }
.deal .amount { display: block; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.deal .per { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.deal .tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.deal .tags:empty { display: none; }
/* Drinks asked for but not sold by this line: the total isn't comparable. */
.deal.dim { opacity: 0.55; }
.rank { color: var(--text-3); font-weight: 600; margin-right: 2px; }
.tag { font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--card-2); color: var(--text-2); }
.tag.low { background: var(--good-soft); color: var(--good); }
.tag.new { background: var(--accent-soft); color: var(--accent); }
.tag.up { color: var(--warn); }
.empty { color: var(--text-3); text-align: center; margin: 32px 0; }

/* --- Filters and alerts ----------------------------------------------------- */
.hint { color: var(--text-3); font-size: 14px; margin: 0 0 14px; }
.group { margin: 0 0 20px; }
.seg { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--card-2); }
.seg button {
  flex: 1; min-height: 38px; padding: 6px 10px; border: 0; border-radius: 9px; background: none;
  color: var(--text-2); font-size: 15px; font-weight: 600;
}
.seg button[aria-checked="true"], .seg button[aria-pressed="true"] { background: var(--card); color: var(--accent); box-shadow: 0 1px 3px rgb(0 0 0 / 0.18); }
.seg.wrap { flex-wrap: wrap; }
.seg.wrap button { flex: 1 1 auto; }
.seg.multi button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.toggle {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 6px;
  border-radius: 14px; background: var(--card);
}
.toggle span { flex: 1; }
.toggle b { display: block; font-weight: 600; }
.toggle small { display: block; font-size: 13px; }
.toggle input { flex: none; width: 22px; height: 22px; accent-color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-3); }
.field select, .field input {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--text); font-size: 16px;
}
.field.money { flex-direction: row; align-items: center; gap: 8px; font-size: 18px; color: var(--text-2); }
.btn {
  display: block; width: 100%; min-height: 48px; margin: 10px 0 0; padding: 12px 16px; border: 0; border-radius: 14px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 16px; text-align: center;
  text-decoration: none;
}
.btn.ghost { background: var(--card-2); color: var(--accent); }
.btn:disabled { opacity: 0.55; }
.card { padding: 14px; border-radius: 16px; background: var(--card); margin: 0 0 12px; }
.card p { margin: 0 0 8px; color: var(--text-2); font-size: 15px; }
.note { font-size: 14px; color: var(--text-3) !important; margin-top: 10px !important; }
.lines { list-style: none; margin: 8px 0 0; padding: 0; font-size: 14px; }
.lines li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.lines li span:last-child { color: var(--text-3); text-align: right; }
.lines li.bad span:last-child { color: var(--warn); }

/* --- A cruise, full screen: square corners (rule 7) -------------------------- */
.sheet {
  position: fixed; inset: 0; z-index: 50; max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column; background: var(--bg); border-radius: 0;
}
.sheet .topbar h1 { text-align: center; font-size: 20px; letter-spacing: -0.02em; }
.hero { padding: 4px 0 14px; }
.hero .who { color: var(--text-2); font-size: 14px; }
.hero h2 { font-size: 22px; line-height: 1.2; margin: 2px 0 4px; letter-spacing: -0.02em; }
.hero .when { color: var(--text-3); font-size: 14px; }
.big { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 12px 0 0; }
.big small { font-size: 14px; font-weight: 500; letter-spacing: 0; }
.rooms { width: 100%; border-collapse: collapse; font-size: 15px; }
.rooms th { text-align: left; font-weight: 600; color: var(--text-3); font-size: 12px; padding: 0 0 6px; }
.rooms th:not(:first-child), .rooms td:not(:first-child) { text-align: right; }
.rooms td { padding: 9px 0; border-top: 1px solid var(--line); }
.rooms tr.picked td { font-weight: 700; color: var(--accent); }
.rooms .gone { color: var(--text-3); }
.parts { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.parts li { display: flex; justify-content: space-between; padding: 6px 0; }
.parts li.sum { border-top: 1px solid var(--line); font-weight: 700; margin-top: 4px; padding-top: 9px; }
.chart { width: 100%; height: 120px; display: block; }
.chart .ln { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart .area { fill: var(--accent-soft); }
.chart-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); margin-top: 4px; }
.stops { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 15px; }

@media (min-width: 761px) {
  .app, .sheet { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

/* --- Verdict, other dates, graph, watch star ------------------------------- */
.verdict { border-left: 4px solid var(--line); }
.verdict.good { border-left-color: var(--good); }
.verdict.good h2 { color: var(--good); }
.verdict.wait { border-left-color: var(--warn); }
.verdict.wait h2 { color: var(--warn); }
.dates { list-style: none; margin: 0; padding: 0; }
.date-row {
  display: flex; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 10px 0;
  border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); font-size: 15px; text-align: left;
}
.dates li:first-child .date-row { border-top: 0; }
.date-row b { color: var(--accent); }
.chart .low { stroke: var(--good); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.chart .dot { fill: var(--good); }
#btn-watch { color: var(--text-3); }
#btn-watch.on { color: #f5b301; }

/* Cheapest each month: a strip that scrolls sideways inside the page margins. */
.months {
  display: flex; gap: 6px; overflow-x: auto; margin: 0 calc(-1 * var(--side-r)) 10px calc(-1 * var(--side-l));
  padding: 0 var(--side-r) 2px var(--side-l); scrollbar-width: none; overscroll-behavior-x: contain;
}
.months::-webkit-scrollbar { display: none; }
/* Faded edges where more of the strip is off to that side. */
.months.more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
.months.more-left { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); }
.months.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
.months:empty { display: none; }
.month {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 64px; min-height: 44px;
  padding: 6px 10px; border: 0; border-radius: 12px; background: var(--card); color: var(--text-2); font-size: 12px;
}
.month b { font-size: 14px; color: var(--text); }
.month.best b { color: var(--good); }
.month[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.month[aria-pressed="true"] b { color: var(--accent-ink); }

/* The ship: photo at the top of a cruise, and its facts as tiles. */
.ship-photo { margin: 0 0 10px; }
.ship-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; background: var(--card-2); }
.ship-photo figcaption { margin-top: 4px; font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ship-photo figcaption a { color: inherit; }
.facts { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.facts li { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 12px; background: var(--card-2); min-width: 0; }
.facts b { font-size: 20px; letter-spacing: -0.02em; color: var(--text); }
.facts span { font-size: 12px; line-height: 1.25; color: var(--text-2); }
.highlights { margin: 0 0 10px; padding-left: 18px; color: var(--text-2); font-size: 15px; }
.highlights li { margin: 2px 0; }
.ship .note a { color: inherit; }

/* Route map under the stops: flat land and sea like a cruise line's map.
   Its own stacking layer keeps Leaflet's panes (z-index 400+) inside the card. */
.map-wrap { margin-top: 12px; }
.map { position: relative; z-index: 0; isolation: isolate; height: 280px; border-radius: 12px; overflow: hidden; background: #bfe3f1; }
.map.leaflet-container { background: #bfe3f1; font: inherit; }
.map.leaflet-container .leaflet-control-attribution { font-size: 10px; background: rgb(255 255 255 / 0.7); }
.pin-wrap, .arrow-wrap { background: none; border: 0; }
.ring {
  display: block; width: 14px; height: 14px; border-radius: 50%; border: 3.5px solid; background: #fff;
  transform: translate(-50%, -50%); box-sizing: border-box;
}
.dot {
  display: block; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; transform: translate(-50%, -50%);
  color: #fff; font: 700 11px/20px system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 2px #fff, 0 1px 3px rgb(0 0 0 / 0.35);
}
.arrow { display: block; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 10px solid; }
.port-label.leaflet-tooltip {
  background: rgb(255 255 255 / 0.9); border: 0; box-shadow: none; padding: 1px 5px; border-radius: 4px;
  font: 600 11px/1.3 system-ui, sans-serif; color: #1d2733;
}
.port-label.leaflet-tooltip::before { display: none; }
.map-key {
  display: flex; flex-direction: column; gap: 3px; padding: 6px 8px; border-radius: 8px;
  background: rgb(255 255 255 / 0.92); color: #1d2733; font: 600 10px/1.2 system-ui, sans-serif; box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
}
.map-key span { display: flex; align-items: center; gap: 6px; }
.map-key i { display: inline-block; flex: none; }
.map-key .ring { transform: none; width: 11px; height: 11px; border-width: 3px; }
.map-key .dot { transform: none; min-width: 11px; width: 11px; height: 11px; padding: 0; box-shadow: none; }
.map-key .line { width: 14px; height: 2px; border-radius: 1px; }
[data-theme="dark"] .map, [data-theme="dark"] .map.leaflet-container { background: #102a3b; }
[data-theme="dark"] .map.leaflet-container .leaflet-control-attribution { background: rgb(0 0 0 / 0.55); color: #c9d2de; }
[data-theme="dark"] .map.leaflet-container .leaflet-control-attribution a { color: #9cc2ff; }
[data-theme="dark"] .port-label.leaflet-tooltip { background: rgb(16 24 34 / 0.88); color: #e8eef5; }
[data-theme="dark"] .map-key { background: rgb(16 24 34 / 0.9); color: #e8eef5; }
[data-theme="dark"] .ring { background: #102a3b; }
[data-theme="dark"] .dot { box-shadow: 0 0 0 2px #102a3b, 0 1px 3px rgb(0 0 0 / 0.5); }

/* Stops: a row each that opens to a photo and guide. */
.stops.rich { list-style: none; padding: 0; margin: 0; }
.stop { border-top: 1px solid var(--line); }
.stop:first-child { border-top: 0; }
.stop.plain { display: flex; align-items: center; gap: 10px; padding: 10px 0; color: var(--text-3); font-size: 14px; }
.stop-row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) 16px; gap: 10px; align-items: center; width: 100%;
  min-height: 48px; padding: 8px 0; border: 0; background: none; color: inherit; text-align: left; font: inherit;
}
.num {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 11px;
  background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; flex: none;
}
.stop.plain .num { background: var(--card-2); color: var(--text-3); }
.stop-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.stop-name { font-weight: 650; color: var(--text); font-size: 15px; }
.stop.plain .stop-name { font-weight: 500; color: var(--text-3); }
.tagline { font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { width: 16px; height: 16px; fill: var(--text-3); transition: transform 0.2s; }
.stop.open .chev { transform: rotate(90deg); }
.stop-more { padding: 2px 0 14px 32px; }
.stop-more .big { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; background: var(--card-2); }
.guide { margin-top: 10px; font-size: 15px; line-height: 1.45; color: var(--text-2); }
.guide p { margin: 0 0 8px; }
.guide h3 { margin: 12px 0 6px; font-size: 14px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.todo { margin: 0; padding-left: 18px; }
.todo li { margin: 3px 0; }
.advisory { font-size: 13px; color: var(--text-3); margin-bottom: 4px !important; }
.level { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; color: #fff; }
.level.l1 { background: #2e9d57; }
.level.l2 { background: #c99a06; }
.level.l3 { background: #e0701b; }
.level.l4 { background: #d23b32; }
.stop-more .credit { margin: 8px 0 0; font-size: 11px; color: var(--text-3); }
.stop-more .credit a { color: inherit; }

/* Scrubbing the price graph. */
.chart-wrap { position: relative; touch-action: pan-y; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.chart { height: 140px; }
.scrub-line { position: absolute; top: 0; bottom: 0; width: 1.5px; margin-left: -0.75px; background: var(--text-2); pointer-events: none; }
.scrub-dot {
  position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px var(--card); pointer-events: none;
}
.scrub-read { margin: 8px 0 0 !important; font-size: 15px; color: var(--text) !important; min-height: 22px; }
.scrub-read b { font-size: 18px; letter-spacing: -0.01em; }
.scrub-read span { color: var(--text-3); font-size: 13px; margin-left: 4px; }

/* No double-tap zoom (pwa-standards rule 10). */
html { touch-action: manipulation; }

/* --- A computer: Finance's layout ---------------------------------------------
   A sidebar with the app's name and labelled screens; Deals and Watching show
   the list beside the cruise you picked; Filters and Alerts are card grids.
   Phones (under 1000px) keep everything above. */
.brand, .pick { display: none; }
.tab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.detail .col { display: contents; }

@media (min-width: 1000px) {
  :root { --side-w: 248px; --list-w: 460px; }
  .app {
    max-width: none; margin: 0; display: grid;
    grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "side head" "side main";
    background: radial-gradient(1100px 520px at 100% 0%, var(--accent-soft), transparent 70%), var(--bg);
  }
  html.split .app { grid-template-columns: var(--side-w) var(--list-w) minmax(0, 1fr); grid-template-areas: "side head ." "side main ."; }
  .topbar { grid-area: head; background: transparent; padding: 28px 28px 14px; }
  .topbar h1 { font-size: 32px; }
  .scroll { grid-area: main; padding: 0 28px 40px; }
  /* Every month or week at once, in rows: nothing to scroll sideways. */
  .months {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); overflow: visible;
    margin: 0 0 12px; padding: 0; -webkit-mask-image: none !important; mask-image: none !important;
  }
  .month { min-width: 0; padding: 6px 4px; cursor: pointer; }
  .month:hover:not([aria-pressed="true"]) { background: var(--card-2); }

  /* The sidebar. */
  .tabbar {
    grid-area: side; flex-direction: column; justify-content: flex-start; gap: 4px; height: auto;
    padding: 22px 14px; border-top: 0; border-right: 1px solid var(--line);
    background: color-mix(in srgb, var(--card) 55%, transparent);
  }
  .brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
  .brand img { width: 36px; height: 36px; border-radius: 10px; }
  .tab {
    flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; width: 100%;
    padding: 12px 14px; border-radius: 14px; font-size: 16px; font-weight: 600; color: var(--text-2);
  }
  .tab svg { width: 22px; height: 22px; }
  .tab .tab-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .tab.active { background: var(--accent-soft); color: var(--accent); }
  .tab .badge { position: static; margin-left: auto; }
  .tab:hover:not(.active) { background: var(--card-2); }

  /* The list, with the cruise you picked marked. */
  .deal { cursor: pointer; border: 2px solid transparent; }
  .deal:hover { border-color: var(--line); }
  .deal.picked { border-color: var(--accent); }

  /* The cruise, beside the list. */
  .sheet, .pick {
    position: fixed; top: 0; bottom: 0; right: 0; left: calc(var(--side-w) + var(--list-w)); max-width: none; margin: 0;
    border-left: 1px solid var(--line); z-index: 5;
  }
  .sheet { background: var(--bg); }
  .sheet .topbar { padding: 28px 28px 10px; }
  .sheet .topbar h1 { text-align: left; font-size: 26px; }
  #btn-close { display: none; }
  #sheet-body { padding: 0 28px 40px; container-type: inline-size; }
  .pick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--text-3); text-align: center; padding: 40px; }
  .pick[hidden] { display: none !important; }
  .pick svg { width: 56px; height: 56px; fill: var(--line); }
  .pick p { margin: 0; max-width: 300px; font-size: 15px; }
  .pick b { display: block; font-size: 20px; color: var(--text-2); margin-bottom: 6px; }
  html:not(.split) .sheet, html:not(.split) .pick { display: none !important; }

  /* Filters and Alerts: cards stacked in columns across the page. */
  #screen-filters, #screen-alerts { columns: 3 320px; column-gap: 16px; max-width: 1240px; }
  #screen-filters > .group, #screen-filters .filter-set > .group, #screen-alerts > .card { break-inside: avoid; margin: 0 0 16px; }
  #screen-filters > .hint, #screen-filters .filter-set > .hint, #screen-filters > .seg.kind { column-span: all; }
  #screen-filters > .seg.kind { max-width: 420px; }
  #screen-filters .group { padding: 16px; border-radius: 16px; background: var(--card); }
  #screen-filters > .btn { width: auto; display: inline-block; padding: 12px 22px; margin: 0; }

  /* The cruise: a shorter photo, and its two buttons side by side. */
  .sheet .ship-photo img { max-height: 320px; }
  .sheet .hero .btn { display: inline-flex; align-items: center; width: auto; padding: 0 22px; margin-right: 8px; }
  .btn:hover { filter: brightness(1.06); }
}
/* A wide cruise pane: its cards in two columns. */
@container (min-width: 820px) {
  .detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; align-items: start; }
  .detail .col { display: block; }
}
#f-theme + .hint { margin: 8px 0 0; }

/* --- Flights ---------------------------------------------------------------- */
.seg.kind { margin: 0 0 14px; }
.list-head { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); margin: 16px 0 8px; }
.list-head:first-of-type { margin-top: 4px; }
.card.setup { border-left: 4px solid var(--accent); }
.card.setup a { color: var(--accent); }
.key-form { margin-top: 10px; }
.key-form .field + .field { margin-top: 8px; }
.card.setup h3, #fl-key h3 { margin: 16px 0 6px; font-size: 15px; }
#fl-key h3:first-child { margin-top: 12px; }
.key-form input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px; }
.flights { list-style: none; margin: 0; padding: 0; }
.flight-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; width: 100%; padding: 10px 10px;
  margin: 0 0 6px; border: 2px solid transparent; border-radius: 12px; background: var(--card-2);
  color: var(--text); text-align: left; font: inherit; cursor: pointer;
}
.flight-row.picked { border-color: var(--accent); background: var(--accent-soft); }
.fr-time b { display: block; font-size: 16px; }
.fr-time span, .fr-info { font-size: 13px; color: var(--text-2); }
.fr-price { align-self: start; font-weight: 750; font-size: 16px; color: var(--accent); text-align: right; }
.fr-price small { display: block; font-size: 11px; font-weight: 500; color: var(--text-3); }
.fr-info, .fr-sun { grid-column: 1 / -1; }
.fr-sun { font-size: 13px; font-weight: 600; color: var(--good); }
.fr-sun.dark { color: var(--warn); }
.date-row.on b { color: var(--text); }
.date-row.on { font-weight: 700; }

/* A problem worth noticing in a status line. */
.warn { color: var(--warn); }
