/* /css/style.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Filled Tabler icons (#2941). Tabler 3.x keeps them in a second font whose
   stylesheet sets `.ti { font-family: tabler-icons-filled !important }` and
   reuses the outline class names, so linking it turns every icon on the site
   filled and blanks the ones with no filled glyph (the Shopping category, the
   Budget and People tabs). Only the font is loaded here, and each ti-*-filled
   class this app uses is mapped by hand. Codepoints from
   @tabler/icons-webfont@3.44.0's tabler-icons-filled.min.css, kept in step
   with the base stylesheet's version in index.html
   (test/tabler-filled-stylesheet.test.js). */
@font-face {
  font-family: "tabler-icons-filled";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/assets/icons/tabler-icons-filled-0e7b4a42.woff2") format("woff2");
}
.ti.ti-star-filled,
.ti.ti-heart-filled,
.ti.ti-bookmark-filled,
.ti.ti-rosette-discount-check-filled,
.ti.ti-map-pin-filled,
.ti.ti-point-filled { font-family: "tabler-icons-filled" !important; }
.ti-star-filled::before { content: "\f6a6"; }
.ti-heart-filled::before { content: "\f67c"; }
.ti-bookmark-filled::before { content: "\fa88"; }
.ti-rosette-discount-check-filled::before { content: "\f746"; }
.ti-map-pin-filled::before { content: "\f680"; }
.ti-point-filled::before { content: "\f698"; }

/* Visually hidden but present for screen readers/document outline — e.g. a
   page's real <h1> where the visual design carries the title some other way. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Issue #756 — a skip link is .sr-only until focused, at which point it
   must become the single most visible thing on screen (a keyboard user
   just tabbed to it and needs to see where focus landed). */
.sr-only-focusable:focus {
  position: fixed;
  top: var(--space-md);
  left: var(--space-md);
  width: auto;
  height: auto;
  padding: var(--space-sm) var(--space-lg);
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  z-index: 10000;
  background: var(--vn-trail-green);
  /* --vn-trail-green flips to a bright mint in dark mode — #432's own fix, see
     that issue's note further down this file. */
  color: var(--surface-2);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* Issue #756 — the avatar preset picker's radio buttons (renderAvatarPresets(),
   js/auth.js). 44px matches --tap-min exactly; a plain-<img> version of this
   used to skip the button chrome entirely and rely on an inline border swap
   for selection. */
.avatar-preset-btn {
  width: var(--tap-min);
  height: var(--tap-min);
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  background: none;
  overflow: hidden;
  line-height: 0;
}
.avatar-preset-btn img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}
.avatar-preset-btn.sel {
  border-color: var(--vn-trail-green);
}


/* @generated:tokens:start — written by scripts/generate-tokens.mjs from design/tokens.json. Do not edit by hand: change the source and run `npm run generate-tokens`. */
/* Single source of truth for colour, edge, radius, shadow, type, spacing and motion
   tokens (#6757). Every value below is written once, in design/tokens.json. The names
   without a role (--vn-*, --df-*, --error*, --surface-*, --space-*) are the existing
   names every rule reads; the --color-*, --radius-* and --shadow-* role names are listed
   in the last block and alias them. The Field Journal tokens flagged RETIRED are kept
   only until nothing reads them (test/token-migration-ratchet.test.js counts the reads). */
:root {
  /* #4667: the one stacking tier for toasts — above the top bar, tab bar, modals
     and bottom sheets. Only the focused skip-link (10000) outranks it. */
  --z-toast: 9999;
  /* Issue #757 — the app's own CSS themes via `light-dark()` (issue #1000),
     but without this, browser-owned chrome (<select> panels,
     date/datetime-local pickers, scrollbars, autofill) stays light-themed
     regardless, against a dark app. The base value here tracks the OS,
     same as before #1000 — it's what a visitor with JS disabled (or before
     the boot script runs) gets. The two overrides right after the token
     list below are what let the account-menu theme toggle (index.html's
     boot script setting `data-theme` on <html>) pin it one way or the
     other regardless of the OS setting. */
  color-scheme: light dark;
  /* #6634 — the dark step was #54ff82 ("Mint Flash"), a neon mint that needed
     its own rule (the Mint Flip Rule, #432), a pinned twin (Field Green) and
     the --on-brand-* tokens to stay usable. #66BD80 is Trail Green after dark:
     a calmer green that still takes dark text (8.2:1 under Night Market ink,
     8.2:1 as text on Night Market). White on it is still 2.3:1, so a fill of
     it takes --on-action, never a literal white. */
  --vn-trail-green: light-dark(#10702A, #66BD80);
  /* Lit Trail Green (#3101 D8): the dark --vn-trail-green step in BOTH themes, for a green
     mark on an ink surface (7.8:1 on Green-Black). Since #6634 a selected
     control is an ink fill, so this is no longer a selected-state colour. */
  --vn-trail-green-lit: #66BD80;
  --vn-trail-green-light: light-dark(#E3FBEA, rgba(102,189,128,0.16));
  /* Issue #757 — light value was #1E9E52 (white-on-this measured 3.46:1,
     below AA's 4.5:1) everywhere it pairs with `color: var(--surface-2)`
     (white in light mode): .btn-primary:hover, .settle-confirm-btn's
     resting state, .day-box-add-btn:hover, .comment-send-btn:hover.
     #15803d clears ~5:1 against white. The dark value (a bright mint
     paired with a dark foreground per #432) is untouched. */
  --vn-trail-green-mid: light-dark(#15803d, #85CF99);

  /* Tints for a control sitting ON a --vn-trail-green field (the day-box header's
     Sub-Trip trigger and spend chip today). They exist because the obvious
     idiom — a translucent white fill and border — bakes in "the field behind
     me is dark", which is only true in light mode: --vn-trail-green flips to a
     bright mint after dark, where white-on-white leaves the control with no
     visible edge at all. Same reasoning as the --surface-2 foreground rule
     documented on --vn-trail-green below; these are its fill and keyline
     counterparts, so a control on a brand field never needs a literal
     rgba(255,255,255,…) again. The dark half is ink, not white — derived
     from --text-primary's dark value (#1a1a1a) with a green bias so it
     reads as a shadow on the brand rather than a grey wash. */
  /* ⚠️ The light-mode alpha here is contrast-critical, not taste. The
     foreground on these controls is --surface-2, which is pure white in
     light mode, and every point of white tint added to the deep-green field
     underneath raises the ground toward that same white: 0.20 measures
     4.09:1 and fails, 0.12 measures 4.84:1. The hover therefore moves the
     KEYLINE rather than pushing more white into the fill — a brighter edge
     is legible feedback that cannot walk the text into a failure. */
  --on-brand-fill: light-dark(rgba(255, 255, 255, 0.12), rgba(12, 26, 16, 0.16));
  --on-brand-fill-hover: light-dark(rgba(255, 255, 255, 0.14), rgba(12, 26, 16, 0.28));
  --on-brand-line: light-dark(rgba(255, 255, 255, 0.6), rgba(12, 26, 16, 0.45));
  --on-brand-line-hover: light-dark(rgba(255, 255, 255, 0.95), rgba(12, 26, 16, 0.8));
  --vn-amber: light-dark(#BA7517, #E8A33D);
  --vn-amber-light: light-dark(#FAEEDA, rgba(232,163,61,0.16));
  --vn-amber-mid: light-dark(#EF9F27, #F2B45A);
  /* --vn-amber fails WCAG AA as text in light mode (3.72:1 / 3.41:1, issue
     #354 Phase 2) despite passing as a fill/border — this darkened variant
     is for `color` only. Keep --vn-amber itself unchanged; it's correct for
     backgrounds/borders/chips. Already clears AA as text on both dark
     surfaces, so the dark half needs no separate darkening (issue #354
     Phase 2 audit). */
  --vn-amber-text: light-dark(#8A5610, #E8A33D);
  --vn-coral: light-dark(#993C1D, #EC8862);
  --vn-coral-light: light-dark(#FAECE7, rgba(226,114,74,0.16));
  --vn-coral-mid: light-dark(#D85A30, #EE9270);

  /* Issue #354 Phase 5 — several rules already read `var(--error)`
     expecting this token to exist, but it was never defined anywhere, so
     every one of those was silently always falling back to the literal.
     Defined once here (not per-theme) since that's exactly the behavior
     those call sites already had — a genuinely distinct "danger red" hue
     from --vn-coral's branded terracotta, used only for destructive
     drop-zone/delete affordances. Unchanged between themes, unlike its
     text-safe ink just below. */
  /* #6634 — danger moved off Stamp Coral's hue. The old red (#e53935, Material
     red 600; solid #B3261E) sat ~12deg from coral #993C1D at 1.06:1, so a
     stamp and a delete button read as one colour. Danger is now a cool
     crimson (hue ~343deg, about 30deg the other side of red from coral's
     ~15deg). The --danger-* names further down are the semantic layer; these
     --error-* names stay as aliases because hundreds of rules read them. */
  --error: #C2214F;  /* fixed in both themes, as before: 5.4:1 on Cut Stock, ~5.8:1 under white text */
  --error-light: light-dark(#F6E0DB, rgba(255,122,153,0.16));
  /* Issue #545 harden pass — --error itself measures ~3.98:1 as text on
     --df-panel, clearing the ~3:1 UI-component/border floor but missing the
     4.5:1 text floor (e.g. .agent-diff-badge's "Removed" state, which
     renders this as `color`, not just a border). Same fill-vs-text split as
     --vn-sky-text/--vn-coral-text below: --error stays correct as a border/
     background hue, this is the text-safe ink for when it's read as copy.
     The dark value is lightened the same way --vn-trail-green/--vn-coral lighten
     for dark mode, rather than reusing the light-mode value verbatim. */
  --error-text: light-dark(#A3123F, #FF7A99);
  /* #1805 — fill for a destructive button carrying white text: #A3123F
     (#6634, was #B3261E) is 7.7:1 against #fff in both themes. */
  --error-solid: #A3123F;

  /* RETIRED (#6757): the Field Journal greys. Nothing new reads --text-*, --surface-* or --border*; use the Departure Fever roles (--df-ink, --df-panel, --edge-hairline). Kept until the last reader moves; test/token-migration-ratchet.test.js counts the reads. */
  --text-primary: light-dark(#1a1a1a, #f0f0f0);
  --text-secondary: light-dark(#666666, #b3b3b3);

  /* WCAG AA fix (issue #354 Phase 2) — light value #999999 was 2.85:1 /
     2.61:1 against white/--surface-1, well under the 4.5:1 floor for body
     text; the dark value #808080 failed the same audit against dark
     --surface-2 (3.93:1) when it was first set with only light mode
     measured. */
  /* #1030 critique — was a cold neutral grey (#6E6E6E / #949494); DESIGN.md's
     secondary tier is warm, "never a cold grey". Now the same values as
     --df-ink-soft (Green-Black Soft / Lamplight Soft): 7.6:1 on white, 6.2:1
     on Cut Stock, ~7:1 on the dark surfaces, so every use still clears 4.5:1. */
  --text-muted: light-dark(#4a5851, #9aa79f);
  --surface-1: light-dark(#f5f5f5, #1a1a1a);
  --surface-2: light-dark(#ffffff, #242424);
  --border: light-dark(#e0e0e0, #3a3a3a);
  --border-strong: light-dark(#d0d0d0, #4a4a4a);
  /* Type scale (#6635, DESIGN.md Typography > The scale): the six interface
     steps, the single source of truth for interface text. Never write a raw
     px size for interface text, and never add a step between two of these. */
  --fs-xs: 12px;  /* caption and label: the floor, nothing is smaller */
  --fs-sm: 14px;  /* BodyDense: rows, names, amounts, controls */
  --fs-md: 16px;  /* Body: prose, card copy, form text */
  --fs-lg: 18px;  /* Title: card and step headings */
  --fs-xl: 22px;  /* sheet, dialog and Workbench screen titles */
  --fs-2xl: 28px;  /* the largest interface title */
  /* Poster and figure sizes: not interface text, so outside the scale above. */
  --fs-display-32: 32px;
  --fs-figure-40: 40px;  /* Figure tier: one screen shout */
  --fs-figure-26: 26px;  /* Figure tier: the other figures */
  --fs-icon-36: 36px;  /* glyph size of an empty-state icon, not text */
  --fs-icon-44: 44px;
  --fs-display-46: 46px;  /* landing hero */
  /* WCAG 2.2 SC 2.5.8 (Target Size Minimum) floor for any tappable control.
     Apply as min-height/min-width, never height/width, so a button's own
     content-driven sizing still wins when it's already larger. */
  --tap-min: 44px;
  /* #5247 — the desktop side margin of every top-level screen (>=1024px): .home-main (My Trips) and Profile share it. */
  --screen-side-pad: clamp(40px, calc((100% - 840px) / 2), 220px);
  /* Issue #3717 — the Route Mark's display sizes. brand/logo/README.md sets
     only minimums (primary symbol >=48px, small cut below that, horizontal
     lockup >=120px wide), so every surface used to pick its own (56/64/72px
     heroes, a 43px lockup beside a 36px symbol). These are the sizes, not
     floors. --logo-nav equals --tap-min: the brand control and its tap target
     are one box, and the lockup (708.99x256) at 44px tall is ~122px wide,
     over its 120px floor. Width always follows from height (width: auto), so
     the artwork can never stretch. admin.css and legal-shared.css restate
     the one they use, since neither page loads this file. */
  --logo-hero: 64px;  /* primary symbol alone above a headline: boot, auth, guest walls */
  --logo-nav: 44px;  /* top-bar height of the horizontal lockup or the small-cut symbol */
  /* #4237 — the one height of every in-app top bar (My Trips, trip view, Discover, Profile): the lockup plus
     the bar's 0.9rem top and bottom padding. .home-topbar is pinned to it, and everything that clears the bar reads it. */
  --topbar-h: calc(1.8rem + var(--logo-nav) + 1px);
  --logo-footer: 24px;  /* wordmark height in a footer meta row */
  /* Issue #941 (reverses #873) — #873 gave every desktop panel a shared
     1180px container cap; this replaces it with a shared *prose* measure
     instead. Panels themselves are full-bleed now (see .panel, >=1024px
     block), but a long run of body copy inside one — .section-sub, help
     text, empty-state paragraphs — still shouldn't stretch edge to edge on
     a wide monitor. ~68ch sits in the normal 60-75ch readable range. Applied
     at the text block, never at the panel/container level — that's the
     substitution that makes full-bleed safe for prose without recapping
     everything else. */
  --prose-measure: 68ch;

  /* RETIRED (#6757): the size-driven radius scale. New rules use the object radii (--radius-control, --radius-card, --radius-stub, --radius-print). */
  /* Radius scale — the single source of truth for border-radius. */
  --radius-xs: 6px;  /* micro badges/tags/small icon buttons */
  --radius-sm: 10px;  /* controls: inputs, buttons, form elements */
  --radius-md: 16px;  /* cards: any bordered content block with padding */
  --radius-pill: 999px;  /* fully-rounded chips/pills */

  /* RETIRED (#6757): the ten-step 2px-based spacing scale (#354). It is replaced by the eight-step 4-64px scale, adopted one tab at a time. */
  --space-2xs: 2px;
  --space-xs: 4px;
  --space-sm: 6px;
  --space-md: 8px;
  --space-lg: 10px;
  --space-xl: 12px;
  --space-2xl: 14px;
  --space-3xl: 16px;
  --space-4xl: 20px;
  --space-5xl: 32px;

  /* The eight-step spacing scale, 4 to 64px (#6637, ruled 2026-11-16; #6764). Same step names on web and in app/. Prefixed --sp-* because the retired --space-* names above carry different values (--space-md is 8px). Nothing reads these yet: a screen adopts them during its own redesign. */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-lg: 16px;
  --sp-xl: 24px;
  --sp-2xl: 32px;
  --sp-3xl: 48px;
  --sp-4xl: 64px;

  /* RETIRED (#6757): the soft shadows. Depth is the hard offset ink shadows below (--df-press, --df-press-large, --df-press-lift). */
  /* Shadow scale — resting-state elevation for cards (the app was
     previously almost pure flat/border-only). */
  --shadow-resting: 0 1px 2px rgba(15,23,42,0.06), 0 1px 3px rgba(15,23,42,0.08);
  --shadow-hover: 0 4px 12px rgba(15,23,42,0.10);
  /* Motion scale — the single source of truth for durations/easing, same
     convention as the type and spacing scales above. Three tiers, chosen by
     how far the thing being animated actually travels:
       feedback — acknowledge a tap; anything longer reads as latency
       state    — a thing changed in place (expand, indicator, chip)
       view     — a panel, sheet or overlay arrived
     --ease-out is an exponential decelerate: fast departure, long settle, so
     an arrival looks confident rather than mechanical. Deliberately NOT a
     bounce/elastic curve — this is a trip planner people use one-handed on
     the move, and overshoot on a list of times reads as instability.
     --trace-tick is the stagger unit for the itinerary route trace only (see
     the Itinerary route trace section); it is not a general delay token. */
  --ease-out: cubic-bezier(0.25, 0.75, 0.35, 1);
  --dur-feedback: 140ms;
  --dur-state: 260ms;
  --dur-view: 380ms;
  --ease-move: cubic-bezier(0.3, 0, 0.15, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --dur-sheet: 440ms;
  --dur-exit: 220ms;
  --dur-lift: 360ms;  /* #6240 trip entry lift; 420ms from 1024px */
  --dur-lift-wide: 420ms;
  /* Strike tier (DESIGN.md → Motion): the one overshoot curve and its length, for a
     stamp being struck. Nothing else may overshoot. */
  --ease-slam: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-strike: 420ms;
  --trace-tick: 50ms;
  /* A short hold before a second element of one entrance starts (#6986). Named so a delay is never a bare number. */
  --delay-beat: 60ms;
  /* The fade of a just-added highlight (#6986): deliberately far longer than the tiers, because it is a cue to find the new row, not a response to a tap. */
  --dur-highlight: 1800ms;

  /* Additional semantic hues, formalizing two colors that were
     previously one-off hardcoded hex values (cat-hotel, cat-activity). */
  /* #6634 — the four category hues were Tailwind defaults (indigo-700,
     purple-700, sky-600, green-800) with cold tints on an apricot ground.
     Redrawn as warm, lower-chroma inks. Each light value is >=4.5:1 as text
     on its own tint and on Cut Stock, each dark value >=5:1 on its own 16%
     tint over dark --surface-2, so the -text variants below now equal the
     base hue. Activity is an olive (hue ~70deg) so it can never be read as
     Trail Green (~137deg). Tints are the hue at 12% over Cut Stock. */
  --vn-indigo: light-dark(#45477E, #AAB0DA);
  --vn-indigo-light: light-dark(#E9E2DF, rgba(170,176,218,0.16));
  --vn-green: light-dark(#5C6620, #BCC470);
  --vn-green-light: light-dark(#EBE6D4, rgba(188,196,112,0.14));
  --vn-green-mid: light-dark(#22883f, #22c55e);
  --vn-purple: light-dark(#763A6E, #D49ACB);
  --vn-purple-light: light-dark(#EFE0DD, rgba(212,154,203,0.16));
  --vn-sky: light-dark(#2A5E73, #86BACD);
  --vn-sky-light: light-dark(#E5E5DD, rgba(134,186,205,0.16));
  /* #6853 — food and shopping were Route Amber and Stamp Coral, so a coral dot
     could mean shopping, unread, today or owed. Each now has a category ink of
     its own. Food is Pandan Teal (hue ~171deg, between Trail Green and Sky);
     shopping is Batik Violet (~263deg, between Indigo and Plum). Same bar as the
     four above: >=5:1 as text on Cut Stock and on its own tint in both themes,
     so no -text variant is needed. */
  --vn-pandan: light-dark(#1D6A5F, #7CC4B6);
  --vn-pandan-light: light-dark(#E4E6DB, rgba(124,196,182,0.16));
  --vn-batik: light-dark(#5A3E8E, #B9A2E0);
  --vn-batik-light: light-dark(#EBE1E1, rgba(185,162,224,0.16));
  /* --vn-sky fails WCAG AA as text in light mode (4.10:1 / 3.76:1, issue
     #354 Phase 2) — same fill/border-vs-text split as --vn-amber-text
     above. Already clears AA as text on both dark surfaces, same reasoning
     as --vn-amber-text. */
  --vn-sky-text: light-dark(#2A5E73, #86BACD);
  /* The rest of the fill-vs-text split, completed. Amber and sky already had
     text-safe variants; coral, indigo and purple were still setting the raw
     hue as .cat-pill's `color`, which holds in light mode but not against
     their own dark-mode tint: measured 3.97:1 (shopping), 4.32:1
     (accommodation) and 4.4955:1 (attraction) on real pixels. In light mode
     these are identical to the base hue, so nothing changes there. The dark
     values are lightened against each hue's own 16% tint over dark
     --surface-2 (#242424): 5.29:1, 5.43:1 and 5.42:1 respectively, up from
     the ratios above. Coral's dark value is --vn-coral-mid, already in the
     palette; the other two are its indigo and purple equivalents. Keep the
     base hues unchanged — they are correct as fills and borders. */
  --vn-coral-text: light-dark(#993C1D, #EE9270);
  --vn-indigo-text: light-dark(#45477E, #AAB0DA);
  --vn-purple-text: light-dark(#763A6E, #D49ACB);
  /* ==================== Semantic roles (#6634) ==========================
     What a colour MEANS, kept separate from what the brand IS. A rule that
     paints a role reads one of these, never a brand/category token directly,
     so a role can move without repainting the brand (and vice versa).
       action   — a thing you can press (primary buttons, links, switch "on")
       selected — the chosen one of several, or "you are here": ONE look for
                  every control, an ink fill. Ink works on every ground: it is
                  Green-Black on apricot/stock by day and Lamplight after dark.
       success  — it worked (settled, saved, done)
       danger   — destructive or failed; never coral (Stamp Coral is branded)
       info     — neutral notice, no action implied
     Every fill role has its paired on-* foreground; a fill never takes a
     literal white. This replaces the Mint Flip Rule (#432). */
  --action: var(--vn-trail-green);
  --on-action: var(--surface-2);
  --selected-bg: var(--df-ink);
  --on-selected: var(--df-panel);
  --success: var(--vn-trail-green);
  --success-light: var(--vn-trail-green-light);
  --danger: var(--error);
  --danger-light: var(--error-light);
  --danger-text: var(--error-text);
  --danger-solid: var(--error-solid);
  --on-danger: #ffffff;
  --info: light-dark(#35566E, #9EBCD2);
  --info-light: light-dark(#E7E4DD, rgba(158,188,210,0.16));  /* #7103: Info Ink at 12% over Cut Stock, the wash a notice sits on */
  /* Day plan flip (issue #154) — its own color channel, deliberately NOT
     reusing any --vn-* above: every one of those is already an itinerary
     category accent (amber=food, teal=transport, coral=shopping,
     indigo=hotel, green=activity, purple=attraction — see .cat-pill /
     .itin-cal-block.cat-*), so reusing one would collide with the category
     pill on the same stop card. Main Trip gets a new warm-brown pair; Sub-Trip
     reuses --vn-sky, the one hue with no category already claiming it.
     Brown vs blue (not green vs brown) is deliberate: green already reads
     as "brand/success" throughout this app, and green-vs-brown is close to
     the worst pairing for red-green colorblindness. */
  --trip-main-accent: light-dark(#8A5A2B, #C9925C);
  --trip-main-bg: light-dark(#F6EEE4, rgba(201,146,92,0.16));
  /* Fixed (non theme-aware) top-nav-bar colors — the bar is always the
     literal brand green regardless of light/dark mode, so its own
     foreground tones are pinned rather than following --vn-trail-green (which
     itself flips to a bright mint in dark mode).

     These two were transposed from the day they landed (391fb91): --topbar-bg
     held #54ff82, the *dark-mode* step of --vn-trail-green, which painted the bar
     neon mint in both themes and left the white pills sitting on it (logo
     badge, profile trigger, notification bell) with almost no separation —
     the exact opposite of what the comment above described. #354 Phase 2
     then audited --topbar-fg-muted against that wrong background and
     concluded no alpha could clear AA; that constraint was an artifact of
     the transposition, not of the design. */
  --topbar-bg: #10702A;
  --topbar-fg: #ffffff;
  /* 4.98:1 against --topbar-bg — a real muted tier is reachable again now
     that the background is the brand green rather than the mint (see above).
     Kept as its own token so call sites keep naming "muted" intent and a
     future tweak has one place to change. */
  --topbar-fg-muted: rgba(255, 255, 255, 0.85);

  /* ==================== Departure Fever — converted app surfaces ==========
     DESIGN.md's world is normative everywhere, and the in-app screens are
     being converted to it one whole screen at a time (My Trips is the first;
     the auth gate was converted before it, in css/landing.css). These are
     that system's ground/stock/ink/type/geometry values for screens inside
     the app shell, and they live at :root rather than on a screen class so
     the next screen to convert reads them without redeclaring anything.

     Why these are NOT the landing page's --lp-* tokens: the poster and the
     app are two surfaces, and DESIGN.md's Aliased Ink Rule is explicit that a
     surface owns its ground, stock, type and geometry while the *brand*
     belongs to the product. So the two ground values below deliberately
     restate the poster's apricot/green-black, and every ink a CONTROL is
     painted in is an alias of --vn-* and cannot drift off-brand. If the
     palette moves, --vn-* is still the one place it moves.

     ⚠️ --df-brand follows --vn-trail-green, which is a DEEP GREEN in light mode and
     a BRIGHT MINT in dark (issue #432). Anything filled with it takes
     --df-brand-fg as its foreground, never a literal white. A full-bleed
     plane of green takes --topbar-bg (Field Green), never --df-brand. */
  /* Night market (dark half): only ground/stock/ink change here — no brand
     ink is restated, because --df-brand/-coral/-amber alias --vn-* tokens,
     which already flip via light-dark() above. Restating them would be a
     second source of truth for one colour. */
  --df-ground: light-dark(#ffe3c4, #0c1410);  /* Noon Apricot / Night Market — the day ground */
  --df-panel: light-dark(#fff7ec, #151d17);  /* Cut Stock / Night Stock — what a card, stub or panel is cut from */
  --df-ink: light-dark(#101a14, #ffeeda);  /* Green-Black / Lamplight — body text, every keyline; warm, never a cold grey */
  --df-ink-soft: light-dark(#4a5851, #9aa79f);  /* 5.9:1 on --df-ground in light mode */
  --df-hair: light-dark(rgba(16, 26, 20, 0.16), rgba(255, 238, 218, 0.18));
  /* Edge weights (DESIGN.md, Shapes): the grouping weight. A hairline is ink at reduced
     strength, 1px, and only ever drawn inside a 2px-keylined container, never on the
     page ground. The dark value is Lamplight at a strength that still reads on Night
     Stock. --edge-tone is the other grouping device: a fill one step off the
     container's stock, for rows or sections that want a band instead of a line. */
  --edge-hairline: 1px solid light-dark(rgba(16, 26, 20, 0.22), rgba(255, 238, 218, 0.24));
  --edge-tone: light-dark(rgba(16, 26, 20, 0.05), rgba(255, 238, 218, 0.07));
  /* Ghost-chip fill for a small secondary control sitting on a neutral
     --df-panel field (day header actions) — the ink-tint equivalent of
     --on-brand-fill, which only works on a solid --vn-trail-green/coral fill. */
  --df-chip-fill: light-dark(rgba(16, 26, 20, 0.06), rgba(255, 238, 218, 0.08));
  --df-chip-fill-hover: light-dark(rgba(16, 26, 20, 0.12), rgba(255, 238, 218, 0.16));
  --df-brand: var(--vn-trail-green);
  --df-brand-fg: var(--surface-2);
  --df-coral: var(--vn-coral);
  --df-amber: var(--vn-amber);
  /* Route Amber Ink — the foreground for anything set ON a --df-amber fill
     (the route's numbered pins). PINNED in both themes, exactly like
     --lp-amber-fg on the landing page and for the same reason: --vn-amber
     LIGHTENS after dark (#BA7517 to #E8A33D), so a theme-aware foreground
     would flip the wrong way and leave dark copy on a lighter fill getting
     lighter. It is the brand green run almost to black rather than a true
     black, so it sits warm on the amber. This is the amber counterpart to
     --df-brand-fg above; do not use it as text on any other ground. */
  --df-amber-fg: #1c1509;
  /* Instant Stock — the film stock a photograph is printed on, and Instant
     Stock Ink for the fine print on its bottom margin. PINNED in both
     themes, like --df-amber-fg above and for a related reason: a print is
     white at midnight too, which is what makes it the brightest object on
     the night page — correct for a photograph of somewhere sunny. Anything
     set on this stock must stay dark in both themes. */
  --df-instant-stock: #fdf6ea;
  --df-instant-stock-ink: #5f6b63;
  /* The halftone dot screen. A real 6px radial grid, not noise — the printed
     artefact is the whole visual argument, which is also why nothing on a
     converted screen may put a backdrop-filter over it (it would blur the
     dots inside the bar and leave them crisp below it: a ghost band). */
  --df-halftone: radial-gradient(light-dark(rgba(16, 26, 20, 0.16), rgba(255, 238, 218, 0.09)) 0.9px, transparent 1px);
  --df-wash: radial-gradient(85% 60% at 15% -5%, light-dark(rgba(239, 159, 39, 0.30), rgba(232, 163, 61, 0.13)), transparent 60%),
        radial-gradient(75% 55% at 92% 4%, light-dark(rgba(153, 60, 29, 0.11), rgba(226, 114, 74, 0.15)), transparent 62%);
  --df-display: 'Bricolage Grotesque Variable', 'Arial Black', Impact, sans-serif;
  /* D131 — titles and headings are Fraunces; Bricolage keeps the stamp and wordmark. */
  --df-title: 'Fraunces Variable', Georgia, 'Times New Roman', serif;
  --df-sans: 'Bricolage Grotesque Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --df-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Radii are chosen by what the object IS, not by its size: pills for
     anything pressable, 14px for cards, 12px for stubs, 3px for a photo
     print's stock edge. Deliberately separate from --radius-* above, which
     is the retired system's size-driven scale. */
  --df-radius-stub: 12px;
  --df-radius-card: 14px;
  --df-radius-print: 3px;
  /* Depth is hard offset ink — a flat block of colour with an opaque,
     zero-blur shadow, offset diagonally, like a sticker. Pressing moves the
     object INTO its own shadow. No blur radius exists anywhere in this
     system except under a photographic print. */
  --df-press: 4px 4px 0 var(--df-ink);
  --df-press-large: 5px 5px 0 var(--df-ink);
  --df-press-hover: 2px 2px 0 var(--df-ink);
  --df-press-active: 0 0 0 var(--df-ink);
  /* The one sanctioned blurred shadow in the system — a physical print
     lifted off the page. Ink-based, not pure black, same reasoning as every
     other shadow here; doesn't flip with theme (a print is a separate
     object in both, and this is DESIGN.md's literal token). */
  --df-press-lift: 0 1px 0 rgba(9, 20, 13, 0.1), 0 22px 40px -26px rgba(9, 20, 13, 0.75);
  /* Full-screen scrim behind a lit-up photo (js/itinerary.js's viewPhoto()/
     viewPlacePhoto()) — undocumented rgba(0,0,0,*) literals before this,
     found by the design critique's detector pass (issue #545 follow-up).
     Ink-based like every other shadow/overlay in the system, not literal
     black; doesn't flip with theme, matching Instant Stock's own
     never-inverts precedent — a lightbox dims the app around the photo the
     same way in both themes. */
  --df-scrim: rgba(16, 26, 20, 0.92);
  --df-scrim-soft: rgba(16, 26, 20, 0.82);
  --df-scrim-60: rgba(16, 26, 20, 0.6);
  /* Pinned literals (#6172): the Departure Fever values that deliberately do
     NOT flip with the theme (ticket stock, control stickers on the green
     topbar, stamps). Named once here so a rule never writes the hex. For a
     value that should follow the theme, use --df-ground / --df-ink instead. */
  --df-pin-apricot: #ffe3c4;  /* Noon Apricot, day value */
  --df-pin-lamplight: #ffeeda;  /* Lamplight, night ink value */
  --df-pin-ink: #101a14;  /* Green-Black, day ink value */
  --df-pin-deep-green: #0d4a21;  /* deep-green text/icons on apricot stickers */
  --df-pin-keyline: #062811;  /* keyline on apricot stickers */
  --df-pin-stock-shade: #e8dcc7;  /* shaded print stock */
  --df-pin-night-panel: #1b2520;  /* night-side panel on a pinned ink ground */
  --df-pin-white: #fff;  /* white on a pinned colour (coral, red, scrim) — never a brand foreground */
  --df-pin-trail-green-night: #66BD80;  /* Trail Green's dark step on the near-black toast, both themes (#6634) */
  --df-pin-field: #fff;  /* the stub-notice form field's day fill (#6856) */
  /* The out-of-register second ink pass (#6763): Trail Green at 30%, landing a hair off the coral stamp. Was a copy in --lp-ghost and --dtl-ghost. */
  --df-ghost: color-mix(in srgb, var(--vn-trail-green) 30%, transparent);
  --df-tape: light-dark(rgba(186, 117, 23, 0.42), rgba(232, 163, 61, 0.28));  /* Route Amber tape (#6763); was --lp-tape and --dtl-tape */
  --df-invert-bg: light-dark(#0d4a21, #ffeeda);  /* the inverted band's ground: flips with the theme (#6763) */
  --df-invert-fg: light-dark(#ffe3c4, #0c1410);  /* text on the inverted band (#6763) */
  --df-invert-soft: light-dark(#b9cbb6, #3e4a42);  /* quiet text on the inverted band (#6763) */
  /* Lift proportioned down for a row-sized print (#6763); was --dtl-lift-sm. The full Lift's 40px blur washes out under a 64px thumbnail. */
  --df-press-lift-sm: 0 1px 0 rgba(9, 20, 13, 0.1), 0 9px 16px -11px rgba(9, 20, 13, 0.7);

  /* Role names (#6757): what each token is for, as an alias of the name above. These become
     the canonical names as each surface is renamed (the teal to Trail Green rename landed in #6763). */
  --color-route-amber: var(--vn-amber);
  --color-route-amber-light: var(--vn-amber-light);
  --color-route-amber-mid: var(--vn-amber-mid);
  --color-route-amber-text: var(--vn-amber-text);
  --color-stamp-coral: var(--vn-coral);
  --color-stamp-coral-light: var(--vn-coral-light);
  --color-stamp-coral-mid: var(--vn-coral-mid);
  --radius-control: var(--radius-pill);
  --color-indigo: var(--vn-indigo);
  --color-indigo-light: var(--vn-indigo-light);
  --color-olive: var(--vn-green);
  --color-olive-light: var(--vn-green-light);
  --color-olive-mid: var(--vn-green-mid);
  --color-purple: var(--vn-purple);
  --color-purple-light: var(--vn-purple-light);
  --color-sky: var(--vn-sky);
  --color-sky-light: var(--vn-sky-light);
  --color-pandan: var(--vn-pandan);
  --color-pandan-light: var(--vn-pandan-light);
  --color-batik: var(--vn-batik);
  --color-batik-light: var(--vn-batik-light);
  --color-sky-text: var(--vn-sky-text);
  --color-stamp-coral-text: var(--vn-coral-text);
  --color-indigo-text: var(--vn-indigo-text);
  --color-purple-text: var(--vn-purple-text);
  --color-field-green: var(--topbar-bg);
  --color-ground: var(--df-ground);
  --color-stock: var(--df-panel);
  --color-ink: var(--df-ink);
  --color-ink-soft: var(--df-ink-soft);
  --color-hair: var(--df-hair);
  --radius-stub: var(--df-radius-stub);
  --radius-card: var(--df-radius-card);
  --radius-print: var(--df-radius-print);
  --shadow-press: var(--df-press);
  --shadow-press-large: var(--df-press-large);
  --shadow-lift: var(--df-press-lift);
}

/* Tokens whose dark value is not a recolour of the light one (light-dark() swaps a <color> only),
   so they are pinned per theme, gated by data-theme the same way as color-scheme (#1000). */
:root[data-theme="dark"] {
  --shadow-resting: 0 1px 3px rgba(0,0,0,0.45);
  --shadow-hover: 0 6px 16px rgba(0,0,0,0.55);
}
/* @generated:tokens:end */

/* Page grounds (#5977/#5978). The ONLY way to paint a page ground: put the
   class on the screen (or compose it into the screen's rule with the tokens
   above). Each sets colour, image, size and attachment together, so no screen
   can forget the 6px tile size (.dp-modal did, and drew one stray dot).
   Print ground: halftone over the washes, outside a trip. Working ground:
   washes only, inside a trip and on pages that carry dense content. */
.df-ground-print,
.home-screen,
#discover-screen, #shared-trip-screen, #user-profile-screen, #profile-screen, #invite-screen,
#stamps-screen, #friends-screen, #journey-public-screen,
.landing-screen,
.no-longer-member,
.app.active.is-recap-tab {
  background-color: var(--df-ground);
  background-image: var(--df-halftone), var(--df-wash);
  background-size: 6px 6px, auto, auto;
  background-attachment: fixed;
}
.df-ground-working,
#pending-approval-screen,
.modal-content.dp-modal, .gs-body, #createTripModal .modal-content {
  background-color: var(--df-ground);
  background-image: var(--df-wash);
  background-size: auto, auto;
  background-attachment: fixed;
}
/* Trip ground: the whole trip view is Noon Apricot (Night Market in dark),
   flat, edge to edge — the strip behind the Floating Pass, the margins beside
   the column and the working area are one colour (founder rulings 2026-11-24:
   one ground, no frame/working-area split, and that ground is apricot, so
   #6644's Cut Stock working area is gone; cards stand out by fill again).
   Recap keeps the print ground (#6802): the print rule's
   .app.active.is-recap-tab outranks this one. */
.df-ground-trip,
.app.active {
  background-color: var(--df-ground);
  background-image: none;
}

/* Issue #1000 — every token that only ever swapped colour between themes was
   folded into a single light-dark() declaration above (and across
   landing.css/discover.css/recap.css/skeleton.css), so the OS-only
   @media (prefers-color-scheme: dark) block that used to live here is gone.
   `data-theme` is set on <html> by index.html's boot script from the
   account-menu theme preference ('system' resolves against the OS and keeps
   listening for changes; 'light'/'dark' pin it). These two rules are what
   let that override the browser-chrome half of the theme (color-scheme
   already flips the light-dark() tokens above via inheritance — no
   selector needed for those). Without JS (or before the boot script runs),
   :root's own `color-scheme: light dark` still tracks the OS, same as
   before #1000. */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

body, input, select, textarea, button {
  font-family: var(--df-sans);
}

/* Buttons don't inherit a size; without this they paint the browser's 13.33px. */
button {
  font-size: inherit;
  line-height: inherit;
}

body {
  font-size: var(--fs-sm);
  color: var(--text-primary);
  background: var(--df-ground);
}

/* Applied by lockBodyScroll()/unlockBodyScroll() (js/ui.js) while any modal
   is open. position:fixed (not overflow:hidden alone) is what actually
   stops iOS Safari's rubber-band scroll from reaching the document behind
   a fixed-position overlay; `top` is set inline per-lock to the negative
   scroll offset so the page doesn't visibly jump to 0 while locked. */
body.scroll-locked {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}

/* ==================== Landing Page ==================== */
/* .landing-screen is #auth-screen's structural base — flex-centers a column
   in its auth-gate state, block-fills for the marketing page's own layout.
   Everything about how it actually PAINTS (ground, ink, type, the .ap-*
   auth-gate components) now lives in css/landing.css: the auth gate was
   migrated onto the same "Departure Fever" system as the marketing page it
   sits behind (DESIGN.md — normative everywhere, no exceptions; this was
   the one surface still on the retired Field Journal look). See the
   "Auth gate" section at the top of css/landing.css. */
.landing-screen,
.app.active.is-recap-tab {
  min-height: 100vh;
}

.landing-buttons {
  display: flex;
  gap: var(--space-xl);
  flex-direction: column;
  width: 100%;
  max-width: 300px;
}

.btn-large {
  padding: var(--space-2xl) var(--space-4xl);
  min-height: var(--tap-min);
  font-size: var(--fs-md);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  transition: background var(--dur-state) var(--ease-out), color var(--dur-state) var(--ease-out), border-color var(--dur-state) var(--ease-out), box-shadow var(--dur-state) var(--ease-out), transform var(--dur-state) var(--ease-out), opacity var(--dur-state) var(--ease-out);
}

/* .btn-create/.btn-join are only used on the auth gate's main CTAs plus the
   retry button — their actual paint now lives in css/landing.css alongside
   the rest of the #auth-panel "Departure Fever" component set, so a plain
   .btn-large.btn-create with no #auth-panel ancestor still gets a sane
   (if unthemed) fallback rather than nothing. */
.btn-create {
  background: var(--vn-trail-green);
  color: var(--surface-2);
  border: none;
}

.btn-join {
  background: var(--surface-1);
  color: var(--text-primary);
  border: 1.5px solid var(--border-strong);
}

/* ==================== Modal ==================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16, 26, 20, 0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.modal.active {
  display: flex;
  animation: modal-backdrop-in var(--dur-view) var(--ease-out) both;
}

/* Exit (#6985). closeModal() still drops .active synchronously - several suites
   assert exactly that on the next line - and adds .is-leaving, which holds the
   element on screen, inert, for one quick reverse (js/ui.js _modalBeginLeave).
   Opening again removes it, so a re-open during the exit is never blocked. */
.modal.is-leaving {
  display: flex;
  pointer-events: none;
  animation: modal-backdrop-out var(--dur-exit) var(--ease-exit) both;
}

.modal.is-leaving .modal-content {
  animation: modal-sheet-out var(--dur-exit) var(--ease-exit) both;
}

@keyframes modal-backdrop-out {
  to { opacity: 0; }
}

@keyframes modal-sheet-out {
  to { opacity: 0; transform: translateY(var(--sheet-y, 12px)); }
}

@keyframes modal-backdrop-in {
  from { opacity: 0; }
}

/* The sheet travels further on phones because that is where it is a bottom
   sheet (see the ≤680px block below) — a sheet that barely moves does not
   read as having come up from the edge. Kept as a var rather than a second
   @keyframes so there is one definition of the motion and one of the
   distance. */
@keyframes modal-sheet-in {
  from { opacity: 0; transform: translateY(var(--sheet-y, 12px)); }
}

.modal.active .modal-content {
  animation: modal-sheet-in var(--dur-view) var(--ease-out) both;
}

.modal-content {
  background: var(--df-panel);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh; /* fallback for browsers without dvh support */
  max-height: 90dvh; /* respects mobile browser chrome collapsing/expanding, see css/discover.css's screen shells */
  overflow-y: auto;
  overscroll-behavior: contain; /* stop scroll-chaining from this panel into the locked body behind it */
}

/* Desktop dialogs (#3149): from 681px up the shared shell is the cream Cut Stock
   panel with the 2px ink keyline and hard offset shadow, as the approved boards
   draw it. Phone bottom sheets are already cream, so this is the same surface
   on both. .df-modal-content (below) restates the same values on the dialogs
   that opt in, so nothing here changes them. */
@media (min-width: 681px) {
  .modal-content {
    background: var(--df-panel);
    border: 2px solid var(--df-ink);
    border-radius: var(--df-radius-card);
    color: var(--df-ink);
  }

  .modal-content .modal-close {
    background: var(--df-panel);
    border: 2px solid var(--df-ink);
    color: var(--df-ink);
    box-shadow: var(--df-press);
  }

  .modal-content .modal-close i { color: var(--df-ink); }
}

/* Below the app's single-column breakpoint, render every modal as a bottom
   sheet instead of a centered dialog — a centered fixed panel doesn't
   reflow when the soft keyboard opens, so a focused field (or the Save
   button) can end up hidden behind it. Anchoring to the bottom edge keeps
   the panel's top free to ride above the keyboard instead. */
@media (max-width: 680px) {
  .modal {
    align-items: flex-end;
    padding: 0;
  }

  .modal-content {
    max-width: 100%;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }

  /* #6985 - a bottom sheet travels its own height, with no fade, in and out. */
  .modal.active .modal-content {
    animation: modal-sheet-rise var(--dur-sheet) var(--ease-out) both;
  }

  .modal.is-leaving .modal-content {
    animation: modal-sheet-drop var(--dur-exit) var(--ease-exit) both;
  }
}

@keyframes modal-sheet-rise {
  from { transform: translateY(100%); }
}

@keyframes modal-sheet-drop {
  to { transform: translateY(100%); }
}

.modal-header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: 1.5rem;
  /* title stays left, close button pushed to the far right */
}

/* Add Expense can run long (receipt scan, itemized split, etc.) — keep the
   close button reachable without scrolling back to the top. Bleeds out to
   the modal's full padded width via negative margins, then re-adds that
   padding, so it reads as a proper header bar rather than a floating button. */
#addExpenseModal .modal-header {
  position: sticky;
  top: -2rem;
  z-index: 5;
  margin: -2rem -2rem 1.5rem;
  padding: 2rem 2rem 1rem;
  background: var(--df-panel);
  border-radius: var(--df-radius-card) var(--df-radius-card) 0 0;
}

.modal-header h2 {
  font-size: var(--fs-lg);
  font-weight: 600;
  flex: 1;          /* grow to fill, pushes close btn to the edge */
}

/* Issue: hardcoded #ffffff/#000000 with !important had no dark-mode
   override anywhere — every modal's close button ignored the theme
   entirely. Tokenized, plus the .stop-menu-btn::before tap-target
   expansion pattern (visible glyph stays 32px, hit region reaches
   --tap-min) since the visual size is a deliberate part of the modal
   header's proportions. */
.modal-close {
  flex-shrink: 0;
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-md);
  cursor: pointer;
  color: var(--text-primary);
  transition: background var(--dur-feedback) var(--ease-out), color var(--dur-feedback) var(--ease-out), border-color var(--dur-feedback) var(--ease-out);
  line-height: 1;
  box-shadow: var(--shadow-resting);
  position: relative;
}

.modal-close::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}

.modal-close i {
  color: var(--text-primary);
}

.modal-close:hover {
  background: var(--df-hair);
  border-color: var(--df-ink);
  color: var(--df-ink);
}

.modal-close:hover i {
  color: var(--df-ink);
}

.form-group {
  margin-bottom: 1rem;
}

/* Issue #623 F9 — generic version of css/landing.css's #auth-panel-scoped
   field-error styling, for applyFieldErrors() (js/auth.js) callers outside
   the auth panel (expense, itinerary, accommodation, transport forms). */
input[aria-invalid="true"], select[aria-invalid="true"] {
  border-color: var(--error);
}
input[aria-invalid="true"]:focus, select[aria-invalid="true"]:focus {
  outline-color: var(--error);
  border-color: var(--error);
}
.field-error {
  display: none;
  margin: var(--space-sm) 0 0;
  font-size: var(--fs-xs);
  line-height: 1.5;
  font-weight: 600;
  color: var(--error-text);
}
.field-error.is-visible { display: block; }

.form-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  text-transform: none;
  letter-spacing: 0;
}

/* An inline aside inside a .form-label ("(optional — ...)") drops to caption size so it stays subordinate to its label. */
.form-error { color: var(--danger); font-size: var(--fs-xs, 13px); margin-top: var(--space-xs, 4px); }
.form-error[hidden] { display: none; }
/* #5874 — a validation message eases in (same keyframes as the auth forms' .field-error-in, css/landing.css). */
.form-error:not([hidden]) { animation: field-error-in var(--dur-feedback) var(--ease-out) both; }
.form-hint {
  text-transform: none;
  letter-spacing: normal;
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--text-muted);
}

/* Issue #710 — one flex input(s)+button row, extracted from three near-
   identical inline-styled copies: the decision board's "Suggest a
   destination"/"Suggest dates" rows and the AI planner's destination-editor
   add row. Wraps on narrow screens rather than a fixed row of fixed-width
   inputs; a call site with extra spacing needs (e.g. margin-top under a
   list above it) still adds that inline, same as any other utility class. */
.inline-add-row {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Groups the Add Expense modal's ~19 controls into three labelled sections
   (What was it / How much / Who's splitting it) instead of one undivided
   list — a real <fieldset>/<legend> pair, not just a visual heading, so a
   screen reader announces the grouping too. Reset to blend with the
   existing .form-group/.form-full rhythm rather than a browser-default
   fieldset border-box. */
.exp-form-section {
  border: none;
  margin: 0 0 var(--sp-xl);
  padding: 0;
}
.exp-form-section + .exp-form-section {
  border-top: 0.5px solid var(--border);
  padding-top: var(--sp-xl);
}
.exp-form-section-legend {
  padding: 0;
  margin-bottom: var(--sp-md);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--df-ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Create Trip wizard: dates + destination-search UI (issues #382, #419) ──
   .wizard-date-row-line/.wizard-date-labels are Q2a's exact-date pair
   layout (js/auth.js's wizardWhenDatesScreenHtml()); .trip-destination-
   input-wrap/.trip-destination-suggestions* are Q1a's destination-search
   sub-screen (wizardWhereDestinationScreenHtml()) — issue #710 split these
   apart from a single shared block once it turned out the two screens no
   longer actually reuse the same rules, despite the "trip-city-*" name
   they'd both inherited from when they did. */
.wizard-date-row-line {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  align-items: center;
}

/* "Start date"/"End date" column headers directly above the date
   row-line — a relative "min" hint alone isn't visible until the picker is
   actually opened. */
.wizard-date-labels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  padding: 0 var(--space-2xs);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--df-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Inline range calendar on the When step (#5386). Two months side by side from
   768px up, one on phones. Colours/fonts via tokens only. */
.wizard-cal-nav-btn {
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  color: var(--df-ink);
  cursor: pointer;
  font-size: var(--fs-lg);
}
.wizard-cal-nav-btn:disabled { opacity: 0.35; cursor: default; }
/* Each month is a bordered card with its arrows beside the title (AW5/AW6). */
.wizard-cal-months { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
.wizard-cal-month { background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub); padding: var(--space-sm) var(--space-md) var(--space-md); }
.wizard-cal-head { display: flex; align-items: center; justify-content: space-between; }
.wizard-cal-head .wizard-cal-title { flex: 1; width: auto; white-space: nowrap; }
.wizard-cal-month-2 { display: none; }
@media (min-width: 768px) {
  .wizard-cal-months { grid-template-columns: 1fr 1fr; }
  .wizard-cal-month-2 { display: block; }
  .wizard-cal-month-2 .wizard-cal-head::before { content: ''; min-width: var(--tap-min); }
  .wizard-cal-nav-btn.is-next-solo { display: none; }
  /* Spacers keep each title centred between its one arrow and the card edge. */
  .wizard-cal-head:has(.is-prev)::after { content: ''; min-width: var(--tap-min); }
}
/* The Continue button carries the night count, so the readout is for screen readers only. */
.wizard-nights-readout { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wizard-dates-row { display: flex; flex-direction: column; gap: var(--space-md); align-items: flex-start; }
.wizard-dates-row .wizard-cal { width: 100%; }
@media (min-width: 1024px) {
  .wizard-dates-row { flex-direction: row; }
  .wizard-dates-row .wizard-cal { flex: 1 1 auto; min-width: 0; }
  #wizard-past-slot { flex: 0 0 260px; }
  #wizard-past-slot:empty { display: none; }
  /* The card sits beside a single month: no room for two. */
  .wizard-dates-row:has(.wizard-past-card) .wizard-cal-months { grid-template-columns: 1fr; }
  .wizard-dates-row:has(.wizard-past-card) .wizard-cal-month-2 { display: none; }
  .wizard-dates-row:has(.wizard-past-card) .wizard-cal-nav-btn.is-next-solo { display: inline-flex; }
  .wizard-dates-row:has(.wizard-past-card) .wizard-cal-head::after,
  .wizard-dates-row:has(.wizard-past-card) .wizard-cal-head::before { display: none; }
  .wizard-dates-row:has(.wizard-past-card) .wizard-cal-title { justify-content: flex-start; }
  .wizard-dates-row:has(.wizard-past-card) .is-prev { order: 2; }
  .wizard-dates-row:has(.wizard-past-card) .is-next { order: 3; }
  .wizard-dates-row:has(.wizard-past-card) ~ .wizard-dates-undecided { display: none; }
  /* The When screen's calendars use the width the boards give them, not the 640px question column. */
  #createTripModal .modal-content.has-band.is-dates { padding-right: 62px; }
  #createTripModal .wizard-footer.is-dates-blocked .wizard-escape-hatch { visibility: hidden; }
}
/* "Not decided yet" on the When screen is a small dashed pill, not a full-width row. */
.wizard-dates-undecided { align-items: flex-start; margin-top: var(--space-md); }
.wizard-dates-undecided .wizard-chip { width: auto; padding: var(--space-sm) var(--space-lg); border-style: dashed; border-radius: 999px; box-shadow: none; background: transparent; font-weight: 600; }
.wizard-past-card .wizard-past-actions .wizard-past-yes,
.wizard-past-card .wizard-past-actions .wizard-past-change { min-height: var(--tap-min); padding-inline: var(--space-lg); border: 2px solid var(--df-ink); border-radius: 999px; box-shadow: var(--df-press); font-family: var(--df-sans); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.wizard-past-card .wizard-past-actions .wizard-past-yes { background: var(--df-brand); color: var(--df-brand-fg); }
.wizard-past-card .wizard-past-actions .wizard-past-change { background: var(--df-panel); color: var(--df-ink); }
.wizard-cal-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  width: 100%;
  min-height: var(--tap-min);
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--df-sans);
  font-weight: 600;
  color: var(--df-ink);
  text-decoration: underline dotted;
  text-underline-offset: 4px;
  margin-bottom: var(--space-xs);
  font-size: var(--fs-lg);
}
.wizard-cal-title:focus-visible { outline: 2px solid var(--df-ink); outline-offset: -2px; }
/* Month/year picker (#5496): opens under the title; months before this one are dashed but pickable. */
.wizard-cal-picker { margin-bottom: var(--space-sm); padding: var(--space-sm); background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub); }
.wizard-cal-picker-year { display: flex; align-items: center; justify-content: space-between; font-family: var(--df-sans); font-weight: 600; color: var(--df-ink); margin-bottom: var(--space-xs); }
.wizard-cal-picker-months { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xs); }
.wizard-cal-picker-month {
  min-height: var(--tap-min);
  background: transparent;
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  color: var(--df-ink);
  font-family: var(--df-sans);
  cursor: pointer;
}
.wizard-cal-picker-month.is-past-month { border-style: dashed; color: var(--df-ink-soft); }
.wizard-cal-picker-month.is-current { background: var(--df-ink); color: var(--df-panel); }
.wizard-cal-cell.is-past:not(.is-in-range) { color: var(--df-ink-soft); }
.wizard-cal-blank { color: var(--df-ink-soft); opacity: 0.55; }
.wizard-past-card {
  margin-top: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  font-family: var(--df-sans);
  color: var(--df-ink);
}
.wizard-past-card { margin-top: 0; }
.wizard-past-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.wizard-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px 0; }
.wizard-cal-dow {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--df-ink);
  text-align: center;
  text-transform: uppercase;
  padding-block: var(--space-xs);
  border-bottom: 2px solid var(--df-ink);
  margin-bottom: var(--space-xs);
}
.wizard-cal-dow:nth-child(n+6) { color: var(--df-brand); }
.wizard-cal-cell {
  min-height: var(--tap-min);
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  color: var(--df-ink);
  border-radius: var(--df-radius-stub);
  cursor: pointer;
  user-select: none;
  transition: background-color var(--dur-feedback) var(--ease-out);
}
.wizard-cal-cell:focus-visible { outline: 2px solid var(--df-ink); outline-offset: -2px; }
/* #5722 — weekend columns carry a faint tint, today a ring, and a day answers hover and press. */
.wizard-cal-cell.is-weekend { background: var(--df-hair); } /* #7103: neutral, not amber. */
.wizard-cal-cell.is-today { box-shadow: inset 0 0 0 2px var(--df-ink); font-weight: 600; }
@media (hover: hover) {
  .wizard-cal-cell:not(.wizard-cal-blank):not(.is-start):not(.is-end):hover { background: color-mix(in srgb, var(--df-ink) 16%, var(--df-panel)); }
}
.wizard-cal-cell:not(.wizard-cal-blank):active { background: color-mix(in srgb, var(--df-ink) 28%, var(--df-panel)); }
.wizard-cal-grid { grid-template-rows: auto repeat(6, var(--tap-min)); }
.wizard-when-presets { margin-bottom: var(--space-md); }
.wizard-date-hint:empty { display: none; }
/* Desktop: the two weekend shortcuts sit in one row so the calendar fits the 800px modal. */
@media (min-width: 768px) {
  .wizard-chip-grid.wizard-when-presets { flex-direction: row; flex-wrap: wrap; margin: 0 0 var(--space-md); }
  .wizard-chip-grid.wizard-when-presets .wizard-chip { width: auto; padding: var(--space-sm) var(--space-xl); font-weight: 600; }
  .wizard-chip-grid.wizard-dates-undecided { margin-top: var(--space-sm); margin-bottom: 0; }
}

/* Range: the shared selected fill between green end caps (AW5/AW6; #7103 retired the amber tint). */
.wizard-cal-cell.is-in-range, .wizard-cal-cell.is-in-range.is-weekend { background: var(--selected-bg); color: var(--on-selected); border-radius: 0; }
.wizard-cal-cell.is-start,
.wizard-cal-cell.is-end,
.wizard-cal-cell.is-start.is-weekend,
.wizard-cal-cell.is-end.is-weekend { background: var(--df-brand); color: var(--df-brand-fg); font-weight: 600; }
.wizard-cal-cell.is-start { border-radius: 999px 0 0 999px; }
.wizard-cal-cell.is-end { border-radius: 0 999px 999px 0; }
.wizard-cal-cell.is-start.is-end { border-radius: 999px; }
.wizard-cal-blank { cursor: default; }
.wizard-date-hint {
  margin-top: var(--space-sm);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  min-height: 1.2em;
}

.trip-destination-input-wrap { position: relative; }

/* Hard offset, zero-blur — the one soft/blurred shadow left in this dropdown
   was a leftover from the retired Field Journal system; DESIGN.md's Hard
   Shadow Rule reserves blur for the instant print alone. */
.trip-destination-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  box-shadow: var(--df-press);
  z-index: 10;
  overflow: hidden;
}

.trip-destination-suggestion {
  padding: var(--space-md) var(--space-lg);
  min-height: var(--tap-min);
  font-size: var(--fs-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.trip-destination-suggestion:hover { background: var(--vn-trail-green-light); }

/* Issue #1094 — GeoNames CC BY attribution for the city search box above. */
.geonames-credit {
  margin-top: var(--space-xs);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.geonames-credit a { color: inherit; }

.trip-destination-suggestion-region {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="number"],
input[type="tel"],
input[type="file"],
select,
textarea {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-xl);
  font-size: var(--fs-sm);
  font-family: inherit;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  background: var(--surface-1);
  box-sizing: border-box;
}

/* iOS Safari auto-zooms the whole page on focus of any control under 16px,
   then leaves the viewport zoomed after blur — this is the one shared rule
   every form control in the app inherits from (see CLAUDE.md's Date inputs
   note), so it's the one place to fix it rather than a per-form override.
   Issue #483 — height: var(--tap-min) added here too, same reasoning: fixed
   once at the shared rule, never per-control (#15/#446). Scoped to this
   mobile breakpoint only, not the base rule above — --tap-min is a touch-
   target floor, and desktop density (Add Stop's 11 controls, Create Trip's
   confirm step) doesn't need it for a mouse. #4432: the condition is a narrow
   viewport OR a touch-screen primary pointer, so an upright tablet (iPad
   744-1024px) gets the same 16px / 44px as a phone while laptops and narrow
   desktop windows (fine pointer) keep the desktop density. */
@media (max-width: 680px), (pointer: coarse) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="date"],
  input[type="datetime-local"],
  input[type="time"],
  input[type="number"],
  input[type="tel"],
  input[type="search"],
  input[type="url"],
  input:not([type]),
  input[type="file"],
  select,
  textarea {
    font-size: var(--fs-md);
    height: var(--tap-min);
  }
}

textarea {
  height: auto;
  min-height: 80px;
  padding: var(--space-lg) var(--space-xl);
}

/* A native checkbox/radio glyph is far under --tap-min, and most of this
   app's checkbox rows are a plain <label style="display:flex..."> wrapping
   one — one shared rule rather than a per-modal fix, same reasoning as the
   input-font-size rule above. Only sets min-height: the many inline
   display:flex styles already on these labels keep winning for layout, this
   just guarantees the label itself is a full-height tap target around the
   13px glyph. */
label:has(> input[type="checkbox"]),
label:has(> input[type="radio"]) {
  min-height: var(--tap-min);
}

/* Ghost-filled value inherited from a linked itinerary stop (Place/Description
   in Add Expense) — muted until the user focuses the field, which clears it. */
.field-ghost {
  color: var(--text-muted) !important;
}

input[type="file"] {
  height: auto;
  padding: var(--space-lg) var(--space-xl);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--vn-trail-green);
  box-shadow: 0 0 0 3px var(--vn-trail-green-light);
}

/* The keyboard focus ring for everything that isn't a form control.
   Until this existed the stylesheet defined exactly two :focus-visible rules
   (both on .stop-connector, both colour-only), so every button, link and chip
   in the app fell back to the UA default — and any future `outline: none`
   would have removed focus visibility silently. Uses the same Trail Green +
   Trail Green Mist glow DESIGN.md documents for inputs, so the whole system
   has one focus language.
   :focus-visible, not :focus — a mouse click on a button must not leave a
   ring behind, which is why the input rule above is deliberately untouched. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 2px solid var(--vn-trail-green);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--vn-trail-green-light);
  /* Deliberately no border-radius here: `outline` already follows the
     element's own radius, so setting one would square off the pill-shaped
     chips and the segmented view toggle the instant they took focus. */
}

.btn-primary {
  width: 100%;
  padding: var(--space-xl);
  min-height: var(--tap-min);
  background: var(--vn-trail-green);
  color: var(--surface-2);
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 1rem;
}

.btn-primary:hover {
  background: var(--vn-trail-green-mid);
}

.btn-secondary {
  width: 100%;
  padding: var(--space-lg);
  min-height: var(--tap-min);
  background: var(--surface-1);
  color: var(--text-primary);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  cursor: pointer;
  font-family: inherit;
}

.btn-secondary:hover {
  background: var(--border);
}

/* Issue #317 follow-up: withButtonGuard() (js/ui.js) disables a one-shot
   creation button for the duration of its request. Without this, a custom-
   colored button's disabled state is visually identical to enabled (the UA
   default dimming gets overridden by the explicit background-color above),
   so a disabled click would silently do nothing with no feedback. */
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-small:disabled {
  opacity: 0.55;
  cursor: default;
}
.btn-primary:disabled:hover {
  background: var(--vn-trail-green);
}
.btn-secondary:disabled:hover {
  background: var(--surface-1);
}

/* Shared by the Itinerary toolbar and the Hotel Stays action row: on mobile
   the buttons flex:1 to fill the narrow column; on desktop (see the
   Desktop layout override below) they shrink back to their natural width
   instead of stretching into oversized bars now that the column is wide. */
.itin-toolbar {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.itin-toolbar.itin-toolbar-empty { margin-bottom: 0; }

.itin-action-btn {
  flex: 1;
  min-width: 140px;
}

/* Issue #952 — the create actions are one group for show/hide
   (renderItinToolbar()), but their buttons flow in the toolbar's own row
   alongside its other buttons, so the wrapper adds no box of its own. */
.itin-create-actions {
  display: contents;
}
/* A disabled create action's reason, inline and on its own line. */
.itin-create-reason {
  flex-basis: 100%;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* Issue #911 follow-up (code review) — Destination/Dates/Member flex-wrap as
   ONE unit rather than each wrapping independently. Without this wrapper,
   each .itin-toolbar-pill is its own flex item in .itin-toolbar, and at
   a narrow width where Create Itinerary + Proposals already fill the row,
   only the overflowing item (Member, being last) wraps — leaving it
   orphaned alone on the next line while Destination/Dates stay behind on
   the row above. margin-left:auto lives here (on the group), not on each
   button, so the whole cluster moves together; flex-wrap here is a safety
   net for a viewport too narrow even for the group's own 3 buttons side by
   side (not hit at any real device width tested). */
.itin-decide-group {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-left: auto;
  flex-wrap: wrap;
}

/* Issue #4662 — phone toolbar: view switch, people chip, active-filter chip
   and a "⋯" menu. The menu, its button and the chip exist only at <=680px;
   tablet and desktop keep the filter row's chips, Proposals and the sparkle
   exactly where they were. */
.itin-more-btn,
.itin-more-menu { display: none; }
/* #5936 — the button also carries .itin-toolbar-pill, whose later
   `.itin-toolbar .itin-toolbar-pill { display: flex }` out-ranks the rule
   above, so the ⋯ showed on desktop with a menu that can never open. Three
   classes beat both. */
.itin-toolbar .itin-toolbar-pill.itin-more-btn { display: none; }
.itin-more-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 30;
  min-width: 220px;
  margin-top: var(--space-sm);
  padding: var(--space-sm);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-1);
}
.itin-more-menu[hidden] { display: none; }
.itin-more-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  min-height: var(--tap-min);
  padding: 0 var(--space-lg);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-size: var(--fs-xs);
  text-align: left;
  cursor: pointer;
}
.itin-more-item.active { background: var(--surface-2); font-weight: 600; }
@media (max-width: 680px) {
  /* Issue #4870 — a viewer who can't edit has no use for the create
     actions (templates, AI, upload) and their reason line; collapse them so
     the selected day and its first stop come first. */
  .itin-toolbar-readonly .itin-create-actions { display: none; }
  .itin-more-btn,
  .itin-toolbar .itin-toolbar-pill.itin-more-btn { display: inline-flex; justify-content: center; margin-left: 0; }
  .itin-more-menu:not([hidden]) { display: block; }
  /* These three now live in the menu. Zoom and the "All" day pill stay in
     the filter row: they drive the date track, which #4677 owns. */
  #itin-proposals-btn { display: none !important; }
}

/* Issue #4881 — at phone width the view switch, people chip and "⋯" share one
   row. The switch drops to icons (each button keeps its aria-label and a 44px
   target), the create actions take rows of their own, and the chip group no
   longer wraps beneath the switch. */
@media (max-width: 680px) {
  .itin-create-actions {
    display: flex;
    flex-wrap: wrap;
    flex-basis: 100%;
    gap: var(--space-md);
  }
  #itin-phone-views .itin-view-label { display: none; }
  #itin-phone-views .itin-view-toggle-btn {
    min-width: var(--tap-min);
    padding: var(--space-md);
  }
  .itin-decide-group { flex-wrap: nowrap; }
}

/* Issue #498 — the permanent member/invite control. flex:0/margin-left:auto
   (not .itin-action-btn's flex:1) so it doesn't compete for width with the
   other toolbar buttons — it's a compact glance badge, not a full action
   button. min-height/min-width match --tap-min directly since the visible
   glyph (icon + 1-2 digit count) is already close to that size; unlike
   .builder-stop-del (#758) there's no smaller visual to preserve underneath
   a ::before expansion. */
.itin-toolbar-pill {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  padding: 0 var(--space-lg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-primary);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
}
.itin-toolbar-pill:hover {
  border-color: var(--border-strong);
}

/* Issue #911 follow-up (code review) — user's design critique: "the Decide
   button is not according to the design.md." Create Itinerary/Proposals
   were still the retired Field Journal (--radius-sm, no keyline, no offset
   shadow) and Decide/member-count were a 1.5px hairline pill — a screen
   DESIGN.md says should read as one printed sheet was carrying three
   different button treatments. Per the user's own choice, converted as one
   unit rather than the Decide button alone (DESIGN.md's migration posture:
   convert a screen/control-group whole, never half). Scoped to
   .itin-toolbar only, mirroring the #panel-bookings precedent below — the
   shared .btn-primary/.btn-secondary base classes stay legacy everywhere
   else until a dedicated app-wide pass. Only shape, type and shadow change
   here; the palette is already shared, so nothing needs a colour edit. */
.itin-toolbar .itin-action-btn,
.itin-toolbar .itin-toolbar-pill {
  font-family: var(--df-sans);
  border-radius: var(--radius-pill);
  border: 2px solid var(--df-ink);
  box-shadow: var(--df-press);
  transition: transform var(--dur-feedback) var(--ease-out), box-shadow var(--dur-feedback) var(--ease-out);
}
.itin-toolbar .itin-action-btn:hover,
.itin-toolbar .itin-toolbar-pill:hover {
  border-color: var(--df-ink);
  transform: translate(2px, 2px);
  box-shadow: var(--df-press-hover);
}
.itin-toolbar .itin-action-btn:active,
.itin-toolbar .itin-toolbar-pill:active {
  transform: translate(4px, 4px);
  box-shadow: var(--df-press-active);
}
.itin-toolbar .itin-action-btn:disabled,
.itin-toolbar .itin-action-btn:disabled:hover {
  box-shadow: var(--df-press);
  transform: none;
}

/* Issue #159 — List/Calendar segmented toggle, revealed alongside "Ask AI to
   Adjust" once stops exist (see renderItinToolbar() in js/itinerary.js). */
.itin-view-toggle {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  flex-shrink: 0;
}
/* Issue #545 follow-up (design critique) — #itin-phone-views is this shared
   class's itinerary-tab instance, scoped to the id rather than the class so
   any other .itin-view-toggle instance stays on its own footing. The
   List/Calendar toggle is the most-touched control on the tab, and
   DESIGN.md's Shapes rule reserves hairlines for the retired system.
   (The Create Trip wizard, once the other cited counterexample here, was
   converted to Departure Fever in a later audit along with the rest of its
   modal chrome — see the wizard block and .df-modal-content below.)
   #members-subtab-toggle (js/members.js/index.html) shares the same 2px
   treatment as of the People-tab design critique 2026-08-22 — it's this
   panel's most-used control and had been quietly left on the retired
   1.5px hairline while its itinerary sibling got the real keyline.
   (#bookings-view-toggle was a third instance until the Bookings tab
   became one continuous route and its Upcoming/All/By-kind filter was
   retired with it.) */
#itin-phone-views,
#members-subtab-toggle {
  border: 2px solid var(--df-ink);
}
#itin-phone-views .itin-view-toggle-btn + .itin-view-toggle-btn,
#members-subtab-toggle .itin-view-toggle-btn + .itin-view-toggle-btn {
  border-left: 2px solid var(--df-ink);
}
.itin-view-toggle-btn {
  display: flex;
  align-items: center;
  /* Centres the label now that #482 gave the control a min-height taller
     than its own line box. */
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  min-height: var(--tap-min);
  font-size: var(--fs-sm);
  font-weight: 600;
  font-family: var(--df-sans);
  border: none;
  /* #6634 QA - transparent on the stock it sits on, like every other segmented
     control. --surface-2 is the retired palette's pure white. */
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--dur-feedback) var(--ease-out), color var(--dur-feedback) var(--ease-out);
}
.itin-view-toggle-btn + .itin-view-toggle-btn {
  border-left: 1.5px solid var(--border);
}
.itin-view-toggle-btn.active {
  background: var(--selected-bg);
  color: var(--on-selected);
}
/* #6089 - at >=1024px the view switch is the Itinerary tab's extension in the
   tab bar; only phones keep this compact switch in the toolbar. */
@media (min-width: 1024px) {
  #itin-phone-views { display: none; }
}

/* Complete People-tab layout redesign — #itin-phone-views sits inline in a
   toolbar next to other controls (renderItinToolbar()), so its two buttons
   staying at their natural content width is correct there. #members-subtab-
   toggle is now the lone header of a full-width roster card (its own row,
   nothing beside it) — at that width "Travel Companions" and "Join
   Requests" sizing themselves to their own text left a large blank gap of
   card background inside the pill's right side. Scoped to the id so
   #itin-phone-views's sizing is untouched. */
#members-subtab-toggle .itin-view-toggle-btn {
  flex: 1;
}

/* Issue #419 — Create Trip guided wizard v3, converted to Departure Fever in
   a later audit alongside the rest of #createTripModal's/#joinTripModal's
   .df-modal-content chrome (index.html). The palette doesn't change here —
   --vn-trail-green/-light/-mid already alias the same Trail Green values
   .df-modal-content itself resolves to — only shape (2px df-ink keylines,
   --df-radius-stub), shadow (hard offset --df-press*, no blur) and type
   (label-tier text) move. */
.wizard-progress-bar { margin-bottom: 0.75rem; }
.wizard-progress-segments {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}
/* One segment per spine question — always 5, never more (wizardProgress(),
   js/auth.js) — filled solid once answered, half-filled while sitting on
   one of that question's sub-screens. Tapping an answered segment jumps
   back to it, same effect as Back (wizardJumpToSegment()). */
.wizard-progress-segment {
  position: relative;
  flex: 1;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}
/* A question past the current one isn't jumpable yet (wizardJumpToSegment()
   is a no-op on it), so it renders `disabled` above; this is the only
   affordance difference from an answered segment. */
.wizard-progress-segment:disabled {
  cursor: default;
}
/* Expands the tappable area to --tap-min without inflating the visible
   track — the track itself stays a thin bar (an IG-story-style progress
   read), while the button underneath remains a real touch target, same
   ::before-expansion convention used for every other visually-small
   control in this file. */
.wizard-progress-segment::before {
  content: '';
  position: absolute;
  inset: 50% 0 auto 0;
  height: max(var(--tap-min), 100%);
  transform: translateY(-50%);
}
.wizard-progress-segment-track {
  display: block;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--df-hair);
  overflow: hidden;
}
/* A width→transform swap (scaleX from the left, composited); the fraction
   arrives as --fill from the wizard's own render (js/auth.js). */
.wizard-progress-segment-fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: var(--radius-pill);
  background: var(--vn-trail-green);
  transform: scaleX(var(--fill, 0));
  transform-origin: left center;
  transition: transform var(--dur-state) var(--ease-out);
}
.wizard-progress-segment.active .wizard-progress-segment-fill { background: var(--vn-trail-green-mid); }
.wizard-progress-label {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--df-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Options before inputs (issue #419 §2) — every chip question renders as a
   vertical stack of full-width tappable rows, never a grid of squares,
   so a long translated label never truncates. */
/* Each wizard step's question: title tier (Fraunces 700, sentence case),
   not the uppercase label tier (#4695). */
.wizard-question {
  display: block;
  margin: 0 0 var(--space-lg);
  font-family: var(--df-sans);
  font-size: clamp(1.0625rem, 4.4vw, 1.25rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--df-ink);
}
.wizard-chip .ti { flex: none; font-size: 1.25em; line-height: 1; }

.wizard-chip-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin: var(--space-sm) 0 var(--space-lg);
}
.wizard-chip {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--space-lg) var(--space-xl);
  font-size: var(--fs-sm);
  font-family: inherit;
  text-align: left;
  color: var(--df-ink);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  box-shadow: var(--df-press);
  cursor: pointer;
  transition: transform var(--dur-feedback) var(--df-ease), box-shadow var(--dur-feedback) var(--df-ease), background var(--dur-feedback) var(--df-ease), border-color var(--dur-feedback) var(--df-ease), color var(--dur-feedback) var(--df-ease);
}
.wizard-chip:hover { background: var(--vn-trail-green-light); border-color: var(--vn-trail-green); transform: translate(2px, 2px); box-shadow: var(--df-press-hover); }
/* Auto-advance on tap (issue #419 §4) means a chip is only ever :active for
   the brief window before its onclick navigates away — this IS the "shows
   the selected state for ~150ms" feedback the PRD calls for, no separate
   timer needed. */
.wizard-chip:active { background: var(--vn-trail-green-light); border-color: var(--vn-trail-green); color: var(--vn-trail-green); transform: translate(4px, 4px); box-shadow: var(--df-press-active); }
/* Q5's name chips are the one exception (js/auth.js's wizardNameScreenHtml())
   — picking one patches state and re-renders in place rather than
   navigating away, so it needs a look that PERSISTS past the tap, not the
   transient :active feedback every auto-advancing chip uses above. Stays at
   the resting --df-press offset (not pressed-in) — selected is a state, not
   a press. */
.wizard-chip.selected {
  background: var(--selected-bg);
  border-color: var(--selected-bg);
  color: var(--on-selected);
  font-weight: 600;
}

/* Issue #895 — the legs picked so far, shown above the where:more confirm
   chips so "That's everything" isn't confirming an invisible list. Same
   numbered-pill-plus-remove shape as Settings → General's .set-dest-chip
   (js/settings.js), but drawn in the wizard's own Departure Fever voice
   (--df-panel/--df-ink/--df-press-hover) rather than that screen's flatter
   --df-hair pill, and without the reorder buttons that screen needs and
   this one-shot confirm step doesn't. */
.wizard-leg-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
  margin: var(--sp-xs) 0;
}
.wizard-leg-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-md);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  box-shadow: var(--df-press-hover);
  font-size: var(--fs-xs);
  font-weight: 600;
  max-width: 100%;
}
.wizard-leg-chip-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Visually a small in-chip glyph, but the hit region still reaches
   --tap-min via the same ::before-expansion convention as .set-dest-chip-btn. */
.wizard-leg-chip-remove {
  flex-shrink: 0;
  position: relative;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--df-ink-soft);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--fs-xs);
}
.wizard-leg-chip-remove::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}
.wizard-leg-chip-remove:hover { color: var(--danger-text); }

.wizard-nights-readout {
  margin-top: var(--space-sm);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  min-height: 1em;
}

/* Recap card (issue #419 §5) — one tappable row per answered question,
   jumping back via wizardJumpToSegment() (renderCreateTripRecapCard(),
   js/auth.js). Replaces the old plain-text review lines. The dashed rule
   between rows borrows the stub's own torn-ticket internal
   rule (DESIGN.md Shapes) — apt for a review card reached right before the
   trip gets "stamped" into existence. */
.wizard-recap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--space-md) var(--space-xl);
  font-family: inherit;
  font-size: var(--fs-sm);
  text-align: left;
  color: var(--df-ink-soft);
  background: none;
  border: none;
  border-bottom: 2px dashed var(--df-hair);
  cursor: pointer;
  transition: background var(--dur-feedback) var(--ease-out);
}
.wizard-recap-row:last-child { border-bottom: none; }
.wizard-recap-row:hover { background: var(--vn-trail-green-light); }
.wizard-recap-label {
  font-family: var(--df-sans);
  font-weight: 700;
  color: var(--df-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.wizard-recap-value {
  color: var(--df-ink);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Back/Continue standardized to identical size/color/font (same .btn-small
   class on both, index.html) — no Skip button any more (issue #419 §7),
   and no primary-vs-secondary visual hierarchy across the row. */
.wizard-nav {
  display: flex;
  gap: var(--space-md);
  margin-bottom: 0.75rem;
}
.wizard-nav button {
  flex: 1;
}

/* The quiet "Create trip now" escape hatch (issue #419 §7) — visible from
   Q2 onward (wizardNavState(), js/auth.js). Deliberately not styled like a
   button: a full-strength CTA here would compete with "Create Trip" itself
   on the last screen. */
.wizard-escape-hatch {
  text-align: center;
  margin-bottom: var(--space-sm);
}
.wizard-quiet-link {
  min-height: var(--tap-min);
  padding: var(--space-sm) var(--space-lg);
  background: none;
  border: none;
  font-family: inherit;
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  text-decoration: underline;
  cursor: pointer;
}
.wizard-quiet-link:hover { color: var(--df-ink); }
/* Issue #3171 — "Create trip now" is the organiser's main shortcut, so it is
   an outlined button: heavier than a text link, lighter than Continue. */
.wizard-create-now {
  min-height: var(--tap-min);
  padding: var(--space-sm) var(--space-lg);
  background: none;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-md, 8px);
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--df-ink);
  cursor: pointer;
}
.wizard-create-now:hover { border-color: var(--df-ink); }

/* Issue #382 — budget step's currency picker next to the amount input.
   Defaults to the resolved home currency (openCreateTripModal(), js/ui.js)
   but is a real editable <select>, not a read-only badge — Trip.budgetCurrency
   exists specifically so a deliberately different choice (e.g. budgeting a
   Japan trip in JPY with a MYR home currency) has somewhere to be recorded
   instead of silently mismatching later budget-vs-spend comparisons. */
.create-trip-budget-row {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}
/* Issue #896 — 50/50 split, currency and amount each take half the row, the
   same shape as #accommodationPriceCurrency's price/currency pair. This was
   a 30/70 split with a color:transparent select and a code-only badge
   painted on top; at ~105px the badge couldn't contain the label and Blink
   painted the select's own "CODE (Full Name)" through it (see #630). No
   fixed height on either child: they stay normal in-flow so the shared
   input/select rule's @media(max-width:680px) --tap-min bump still reaches
   them (a fixed height here previously pinned this control to 40px, under
   the 44px touch floor — bug #483's class). */
.create-trip-budget-currency-sel {
  flex: 1 1 50%;
  min-width: 0;
}
.create-trip-budget-row input {
  flex: 1 1 50%;
  min-width: 0;
}
/* Typed budget (AW9, #5577): a compact currency select beside a large bold amount
   with a green focus ring. The select stays a native one (see #896) — it just
   takes less of the row so the amount leads. */
#createTripModal .create-trip-budget-currency-sel { flex: 0 0 11rem; font-size: var(--fs-md); font-weight: 600; min-height: 3.5rem; padding-inline: var(--space-md); }
#createTripModal [data-wizard-step="budget:amount"] .wizard-chip-grid { margin-top: var(--space-lg); gap: var(--space-md); }
#createTripModal [data-wizard-step="budget:amount"] .wizard-chip { font-size: var(--fs-md); font-weight: 600; padding: var(--space-md) var(--space-xl); }
#createTripModal [data-wizard-step="budget:amount"] .wizard-chip:last-child { border-style: dashed; box-shadow: none; background: transparent; }
#createTripModal #createTripBudget {
  flex: 1 1 auto;
  font: 800 1.75rem/1.2 var(--df-display);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  min-height: 3.5rem;
}
#createTripModal #createTripBudget:focus { outline: none; border-color: var(--df-brand); box-shadow: 0 0 0 3px var(--df-brand); }

/* ==================== App Layout ==================== */
/* .app is now just the show/hide shell — .home-topbar (top bar) and .tabs
   (sidebar/bottom bar) both need to span/sit outside the mobile-width
   column, so the column properties that used to live here now live on
   .app-main, the wrapper around the actual panels. Mirrors the
   .home-screen / .home-main split on the My Trips screen. */
.app {
  display: none;
}

/* Departure Fever ground for the trip view — same halftone/wash treatment as
   .home-screen (My Trips), but the trip view has no viewport-height wrapper
   of its own (the whole page scrolls, see .app-main below), so the ground
   paints on .app.active directly rather than on a flex-column shell.
   min-height, not just background: .app sizes to its content by default —
   a short itinerary (or one with no stops yet) would otherwise end above
   the viewport bottom, a seam breaking the printed-ground illusion on any
   viewport taller than the content. */
.app.active {
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--df-ink);
  font-family: var(--df-sans);
}

/* Same page-wide focus ring as .home-screen's — scoped here rather than
   raising the app-wide 2px rule, which still belongs to the surfaces that
   haven't converted yet. */
.app a:focus-visible,
.app button:focus-visible,
.app [tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 3px solid var(--df-brand);
  outline-offset: 3px;
}

/* Departure Fever skins for the shared .btn-primary/.btn-secondary/.btn-small
   controls — scoped to .app rather than editing those base rules directly,
   since they're also used by still-unconverted screens (Discover, and
   several account/social modals reachable from both My Trips and the trip
   view: profile, friends, create/join trip). Editing the base rule would
   silently start converting fragments of screens this PR doesn't own —
   exactly the half-conversion DESIGN.md's whole-screen rule forbids. Same
   pattern as .home-error button's own scoped override on the My Trips
   screen. Color declarations are untouched (already correct --vn-* tokens);
   only shape, keyline and shadow change. */
.app .btn-primary {
  border-radius: var(--radius-pill);
  transition: transform var(--dur-feedback) var(--df-ease), background var(--dur-feedback) var(--df-ease);
}
.app .btn-primary:hover {
  transform: translate(2px, 2px);
}
.app .btn-primary:active {
  transform: translate(4px, 4px);
}
.app .btn-primary:disabled {
  transform: none;
}

.app .btn-secondary {
  --press-bw: 2px;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
  color: var(--df-ink);
  transition: transform var(--dur-feedback) var(--df-ease);
}
.app .btn-secondary:hover {
  background: var(--df-panel);
  transform: translate(2px, 2px);
}
.app .btn-secondary:active {
  transform: translate(4px, 4px);
}
.app .btn-secondary:disabled {
  transform: none;
}

.app .btn-small {
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
  color: var(--df-ink);
}
.app .btn-small:hover {
  background: var(--df-hair);
}

/* Departure Fever skin for trip-owned modals — everything from the
   itinerary builder/decision-board/proposals/booking modals down to Add
   Expense/packing/sharing, plus create/join trip (added in a Create Trip
   wizard theming audit). Marked with
   the .df-modal-content class on each modal's .modal-content div
   (index.html) rather than reached via .app descendant selectors, because
   several of these render as DOM siblings of #app, not children of it
   (decisionBoardModal, itinProposalsModal, itin-builder-modal and others sit
   earlier in the document; createTripModal/joinTripModal earlier still).
   Create/join trip were converted together specifically because they sit as
   siblings in index.html and open from the same My Trips screen — doing
   only one would have traded the old half-converted-screen seam for a
   half-converted-modal-pair one. The rest of the account/social/pre-trip
   cluster (profile, friends) deliberately still does NOT carry this class —
   those are shared with My Trips, which this doesn't convert (My Trips
   itself still opens Field-Journal profileModal/friendsModal today without
   that being a violation — same precedent).

   discoverDetailModal used to be the exception in that cluster and carried
   it — retired by #659 in favor of the /discover/:code page (renderDiscoverDetail()
   styled by css/discover.css's "Trip details" block regardless), so that
   exception no longer applies to anything currently in the DOM. */
.df-modal-content {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  font-family: var(--df-sans);
  color: var(--df-ink);
}

/* #6645 — a sheet or dialog title is the name of a thing the person opened, at
   18px+ (--fs-lg), so it is Fraunces. This one rule sets every sheet's title;
   it used to set --df-display 800 and outranked each per-sheet Fraunces opt-in
   with a weaker selector (the Votes title rendered Bricolage). Two exceptions:
   the person sheet titles a person, not a made thing (Bricolage 600, as
   .pf-identity-name), and the Expenses kit's uppercase figure titles (Settle
   up, Edit expense, Link a stop) keep the shout tier their boards draw. */
.df-modal-content .modal-header h2 {
  font-family: var(--df-title);
  font-weight: 700; /* the Fraunces-name weight; the base .modal-header h2 is 600 (#6716) */
  letter-spacing: 0;
}
.df-modal-content .modal-header h2.person-sheet-title {
  font-family: var(--df-sans);
  font-weight: 600;
}
.df-modal-content .modal-header h2.xk-figure {
  font-family: var(--df-display);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.df-modal-content .modal-close {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  color: var(--df-ink);
  box-shadow: var(--df-press);
  transition: transform var(--dur-feedback) var(--df-ease), box-shadow var(--dur-feedback) var(--df-ease);
}
.df-modal-content .modal-close i { color: var(--df-ink); }
.df-modal-content .modal-close:hover {
  background: var(--df-hair);
  border-color: var(--df-ink);
  color: var(--df-ink);
  transform: translate(2px, 2px);
  box-shadow: var(--df-press-hover);
}
.df-modal-content .modal-close:hover i { color: var(--df-ink); }

.df-modal-content .form-label {
  font-family: var(--df-sans);
  color: var(--df-ink-soft);
  letter-spacing: 0.08em;
}
.df-modal-content .form-hint { color: var(--df-ink-soft); }

/* ── Export PDF modal (#6377, Trip Settings board 08/09) ──────────────
   Quick pick + section chips, the split-days segmented choice, one counting
   primary button, and the JSON record as a quiet footer link. Below 680px
   .modal-content is already a bottom sheet through openModal(). The footer
   bleeds to the sheet's edges over a peach band. */
.modal-content.export-pdf-modal { max-width: 560px; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.modal-content.export-pdf-modal .modal-header { padding: 1.5rem 1.5rem 0; margin-bottom: var(--space-md); }
.modal-content.export-pdf-modal .modal-header h2 { font-family: var(--df-title); font-weight: 700; font-size: var(--fs-xl); letter-spacing: 0; }
.exp-pdf-body { padding: 0 1.5rem 1.25rem; overflow-y: auto; display: flex; flex-direction: column; gap: var(--sp-md); }
.exp-pdf-field[hidden], .exp-pdf-chip[hidden] { display: none; }
.exp-pdf-label { display: block; margin-bottom: var(--sp-sm); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--df-ink-soft); }
.exp-pdf-chips { display: flex; flex-wrap: wrap; gap: var(--sp-sm); }
.exp-pdf-chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: var(--tap-min); padding: 0 var(--sp-md);
  font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--df-ink);
  background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: 999px; cursor: pointer;
  transition: background var(--dur-feedback) var(--df-ease), color var(--dur-feedback) var(--df-ease);
}
.exp-pdf-chip:hover { background: var(--df-chip-fill-hover); }
.exp-pdf-chip.on { background: var(--selected-bg); color: var(--on-selected); font-weight: 600; }
.exp-pdf-chip.on::before { content: "\2713"; font-weight: 800; }
.exp-pdf-seg { display: inline-flex; padding: 0; gap: 0; overflow: hidden; border: 2px solid var(--df-ink); border-radius: 999px; background: var(--df-panel); }
.exp-pdf-seg-btn {
  min-height: var(--tap-min); padding: 0 var(--sp-md);
  font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--df-ink-soft);
  background: transparent; border: 0; border-radius: 999px; cursor: pointer;
}
.exp-pdf-seg-btn.sel { background: var(--df-ink); color: var(--df-panel); }
.exp-pdf-foot {
  display: grid; gap: var(--sp-sm); padding: var(--sp-md) 1.5rem 1.5rem;
  border-top: 2px solid var(--df-ink);
  background: color-mix(in srgb, var(--df-ground) 70%, var(--df-panel));
}
.exp-pdf-go { width: 100%; font-weight: 600; font-size: var(--fs-sm); display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-sm); }
.exp-pdf-go:disabled { opacity: 0.5; cursor: not-allowed; }
.exp-pdf-json {
  justify-self: center; display: inline-flex; align-items: center; gap: var(--sp-sm);
  min-height: var(--tap-min); padding: 0 var(--sp-sm);
  font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--df-ink);
  background: none; border: 0; cursor: pointer;
}
.exp-pdf-json:hover { text-decoration: underline; }
.exp-pdf-chip .ti { margin-right: var(--sp-xs, 4px); }

/* ── "On your profile" sharing modal (#6385, Trip Settings board 07/10) ──
   One "Everything at once" segmented control, then a row per kind: name and
   count on the left, hide switch and visibility dropdown on the right, the
   items inline under the row when its count is tapped. Below 680px .modal-content
   is already a bottom sheet through openModal(), and the controls stack under
   the row name. The footer bleeds to the edges over a peach band, like Export. */
.modal-content.sharing-modal { max-width: 520px; padding: 0; overflow: hidden; display: flex; flex-direction: column; max-height: 85vh; max-height: 85dvh; }
.modal-content.sharing-modal .modal-header { padding: 1.5rem 1.5rem 0; margin-bottom: var(--space-md); }
.modal-content.sharing-modal .modal-header h2 { font-family: var(--df-title); font-weight: 700; font-size: var(--fs-xl); letter-spacing: 0; }
.sharing-modal-body { padding: 0 1.5rem 1rem; overflow-y: auto; flex: 1 1 auto; display: flex; flex-direction: column; gap: var(--space-lg); }
.sharing-notice { font-size: var(--fs-xs); color: var(--info); background: var(--surface-2); border: 0.5px solid var(--info); border-radius: var(--radius-sm); padding: var(--space-md) var(--space-lg); }
.sharing-eyebrow { display: block; margin-bottom: var(--space-sm); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--df-ink-soft); }
.sharing-all-row { display: flex; align-items: center; gap: var(--space-lg); flex-wrap: wrap; }
.sharing-all-hint { font-size: var(--fs-xs); color: var(--df-ink-soft); flex: 1 1 140px; }
.sharing-seg { display: inline-flex; border: 2px solid var(--df-ink); border-radius: 999px; background: var(--df-panel); padding: 0; }
.sharing-seg-btn {
  min-height: var(--tap-min); padding: 0 var(--space-xl);
  font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--df-ink-soft);
  background: transparent; border: 0; border-radius: 999px; cursor: pointer;
}
.sharing-seg-btn.is-on { background: var(--df-ink); color: var(--df-panel); }
.sharing-seg-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.sharing-seg-btn:focus-visible { outline: 2px solid var(--vn-trail-green); outline-offset: 2px; }
.sharing-cat { padding: var(--space-lg) 0 var(--space-sm); border-top: 2px dashed var(--df-hair); }
.sharing-cat-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); }
.sharing-cat-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sharing-cat-name strong { font-weight: 600; }
.sharing-count {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start;
  min-height: var(--tap-min); margin: 0; padding: 0; font: inherit; font-size: var(--fs-xs); color: var(--df-ink-soft);
  background: none; border: 0; cursor: pointer; text-align: left;
}
button.sharing-count:hover { color: var(--df-ink); text-decoration: underline; }
.sharing-count.is-empty { cursor: default; min-height: 0; }
.sharing-cat-controls { display: flex; align-items: center; gap: var(--space-md); flex-shrink: 0; }
.sharing-cat .sharing-mask-label { display: inline-flex; align-items: center; gap: var(--space-sm); font-size: var(--fs-xs); color: var(--df-ink-soft); }
.sharing-sel { position: relative; display: inline-flex; align-items: center; }
.sharing-sel select {
  appearance: none; min-height: var(--tap-min); padding: 0 calc(var(--space-lg) + 18px) 0 var(--space-lg);
  font-family: inherit; font-weight: 600; border-radius: 999px !important; cursor: pointer;
}
/* Size comes from the shared input rule (16px on phones and touch, #4432); only the desktop density is set here. */
@media (min-width: 681px) and (pointer: fine) { .sharing-sel select { font-size: var(--fs-sm); } .sharing-item .sharing-sel select { font-size: var(--fs-xs); } }
.sharing-sel select:disabled { opacity: 0.6; cursor: not-allowed; }
.sharing-sel-icon { position: absolute; right: var(--space-md); pointer-events: none; font-size: 16px; }
.sharing-items { margin: var(--space-md) 0 0; padding: var(--space-sm) var(--space-lg); background: var(--df-ground); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub); display: flex; flex-direction: column; }
.sharing-items[hidden] { display: none; }
.sharing-item { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-xs) 0; }
.sharing-item-name { flex: 1; min-width: 0; font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sharing-empty { font-size: var(--fs-xs); color: var(--df-ink-soft); padding: var(--space-sm) 0; }
.sharing-foot-note { margin: 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.sharing-footer {
  padding: var(--space-lg) 1.5rem 1.5rem; border-top: 2px solid var(--df-ink);
  background: color-mix(in srgb, var(--df-ground) 70%, var(--df-panel));
}
.sharing-footer .btn-primary { width: 100%; font-weight: 600; font-size: var(--fs-sm); }
@media (max-width: 680px) {
  .sharing-cat-head { flex-direction: column; align-items: stretch; gap: var(--space-sm); }
  .sharing-cat-controls { justify-content: space-between; }
  .sharing-all-hint { flex-basis: 100%; }
  .sharing-item { flex-wrap: wrap; }
  .sharing-item-name { flex-basis: 100%; }
  .sharing-item .sharing-sel { margin-left: auto; }
}

/* :not([type=radio]):not([type=checkbox]) — settingsSheetModal (added
   2026-08-21) is the first df-modal-content consumer to contain radio/
   checkbox inputs (.share-radio-group, .set-toggle-row). Both already carry
   their own on-brand styling (accent-color: var(--vn-trail-green), i.e. Trail
   Green) and stay native-rendered by design; without this exclusion they'd
   also pick up this rule's border/background/radius, drawing a bordered
   stub box around a small native circle. */
.df-modal-content input:not([type="radio"]):not([type="checkbox"]),
.df-modal-content select,
.df-modal-content textarea {
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: var(--df-panel);
  color: var(--df-ink);
}

.df-modal-content .btn-primary {
  border-radius: var(--radius-pill);
  transition: transform var(--dur-feedback) var(--df-ease), background var(--dur-feedback) var(--df-ease);
}
.df-modal-content .btn-primary:hover { transform: translate(2px, 2px); }
.df-modal-content .btn-primary:active { transform: translate(4px, 4px); }
.df-modal-content .btn-primary:disabled { transform: none; }

/* #1805 — destructive button fill: Alert Red, never Stamp Coral. */
.btn-primary.btn-danger,
.btn-secondary.btn-danger,
.df-modal-content .btn-primary.btn-danger {
  background: var(--error-solid);
  border-color: var(--error-solid);
  color: var(--df-pin-white);
}
.btn-primary.btn-danger:hover,
.btn-secondary.btn-danger:hover,
.df-modal-content .btn-primary.btn-danger:hover { background: var(--error-solid); filter: brightness(0.9); }
.danger-note {
  font-size: var(--fs-xs);
  color: var(--error-text);
  background: var(--surface-2);
  border: 0.5px solid var(--error-text);
  border-radius: var(--radius-sm);
  padding: var(--space-lg);
  margin-bottom: 1rem;
}

/* confirmAction()'s destructive variant — Alert Red, never Stamp Coral
   (DESIGN.md: coral is branded and must not read as danger). */
.df-modal-content .btn-primary.btn-danger-solid {
  background: var(--danger-solid);
  color: var(--on-danger);
}
.df-modal-content .btn-primary.btn-danger-solid:hover { background: var(--danger-solid); filter: brightness(0.9); }

/* confirmAction() dialog width. Kept out of the element's inline style so the
   desktop .confirm-sheet widening below can override it (#4361). */
#confirmModalContent { max-width: 380px; }
/* Wide enough that "Remove Chen Wei from the trip?" stays on one line at
   1280px; the 390px bottom sheet is untouched. Long names still wrap, balanced. */
@media (min-width: 681px) {
  #confirmModalContent.confirm-sheet { max-width: 480px; }
}

/* confirmAction()'s default body: small, soft ink. Kept out of the element's
   inline style so the .confirm-sheet rule below can override it (#4026). */
#confirmModalBody {
  color: var(--df-ink-soft, var(--text-secondary));
  font-size: var(--fs-xs);
}

/* confirmAction({ sheet: true, bullets: true }) — the People remove-member
   board (#3864): no warning icon, a real list at body size in ink, a
   full-width danger button over a text Cancel. */
.df-modal-content.confirm-sheet .confirm-icon { display: none; }
.df-modal-content.confirm-sheet #confirmModalBody {
  color: var(--df-ink);
  font-size: var(--fs-sm, 1rem);
}
.df-modal-content.confirm-sheet .confirm-list {
  margin: 0;
  padding-left: 1.25em;
}
.df-modal-content.confirm-sheet .confirm-list li { margin-bottom: var(--space-md); line-height: 1.5; }
/* The global .btn-primary margin-top would stretch Cancel to 60px in the flex row (#5040). */
.confirm-actions .btn-primary { margin-top: 0; }
.df-modal-content.confirm-sheet .confirm-actions {
  flex-direction: column-reverse;
  align-items: stretch;
}
.df-modal-content.confirm-sheet .confirm-actions .btn-primary { width: 100%; }
.df-modal-content.confirm-sheet #confirmModalTitle { text-wrap: balance; }
/* #7023: every confirm is the Friends sheet (S6/S7): a Fraunces title, a pill in Danger Crimson with its
   press shadow, an outlined Cancel pill, and a grab handle on phones. This replaces board 12's
   left-aligned labels, text-only Cancel and literal red (#4111): the founder's ruling is the sheet
   shape without the boards' rust. */
#confirmModalContent .confirm-actions .btn-primary,
#confirmModalContent .confirm-actions .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; border-radius: 999px; font-weight: 600;
}
#confirmModalContent .confirm-actions .btn-secondary { border: 2px solid var(--df-ink); background: var(--df-panel); color: var(--df-ink); }
#confirmModalContent .confirm-actions .btn-primary.btn-danger-solid { border: 2px solid var(--df-ink); --press-bw: 2px; }
#confirmModalContent .confirm-icon { display: none; }
#confirmModalContent #confirmModalTitle { font-size: var(--fs-xl); line-height: 1.2; }
#confirmModalContent #confirmModalBody:not(:has(.confirm-list)) { color: var(--df-ink-soft); font-size: var(--fs-sm); line-height: 1.45; }
.confirm-handle { display: none; }
@media (max-width: 680px) {
  #confirmModalContent { padding-top: 12px; }
  #confirmModalContent .confirm-handle {
    display: block; width: 40px; height: 4px; margin: 0 auto 16px;
    border-radius: 999px; background: var(--df-ink); opacity: 0.35;
  }
  #confirmModalContent .confirm-actions { flex-direction: column-reverse; align-items: stretch; }
  #confirmModalContent .confirm-actions .btn-primary, #confirmModalContent .confirm-actions .btn-secondary { width: 100%; }
}

.df-modal-content .btn-secondary {
  --press-bw: 2px;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
  color: var(--df-ink);
  transition: transform var(--dur-feedback) var(--df-ease);
}
.df-modal-content .btn-secondary:hover { background: var(--df-panel); transform: translate(2px, 2px); }
.df-modal-content .btn-secondary:active { transform: translate(4px, 4px); }
.df-modal-content .btn-secondary:disabled { transform: none; }

.df-modal-content .btn-small {
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
  color: var(--df-ink);
}
.df-modal-content .btn-small:hover { background: var(--df-hair); }

/* Design canvas gap-close — Add/Edit Stop modal footer: Delete (edit mode
   only, toggled via [hidden] in js/itinerary.js) + Cancel + Save, replacing
   a lone Save button so the form that already knows which stop it's editing
   is also where deleting it lives. */
.stop-modal-footer {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
.stop-modal-footer .btn-primary,
.stop-modal-footer .btn-secondary { flex: 1 1 0; width: auto; min-width: 0; margin-top: 0; white-space: nowrap; } /* #6573: equal columns, Save never wraps */

/* Icon-only, outlined in Alert Red rather than filled — this sits beside a
   filled Cancel/Save pair and a second solid-red pill would out-shout them
   both; DESIGN.md's coral is brand, not danger, so red is still the only
   correct hue (same reasoning as .btn-danger-solid above). */
.stop-modal-delete-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-min);
  height: var(--tap-min);
  padding: 0;
  border: 2px solid var(--error);
  border-radius: 50%;
  background: var(--df-panel);
  color: var(--error);
  --press-bw: 2px;
  font-size: 16px;
  transition: transform var(--dur-feedback) var(--df-ease), background var(--dur-feedback) var(--df-ease);
}
/* The display above outranks the user-agent [hidden] rule; restore it (#4245). */
.stop-modal-delete-btn[hidden] { display: none; }
.stop-modal-delete-btn:hover { background: linear-gradient(var(--error-light), var(--error-light)), var(--df-panel); /* opaque: the shadow pseudo must not show through the dark tint */ transform: translate(2px, 2px); }
.stop-modal-delete-btn:active { transform: translate(4px, 4px); }

@media (max-width: 680px) {
  .df-modal-content {
    border-radius: var(--df-radius-card) var(--df-radius-card) 0 0;
  }
}

.app-main {
  max-width: 680px;
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 1rem) 0 calc(80px + env(safe-area-inset-bottom)); /* top clears the fixed .home-topbar, bottom clears the ~25%-larger .tabs bar */
  /* Contains the incoming panel's sideways travel (see .panel-enter below) so
     a tab switch can never flash a horizontal scrollbar. `clip`, not
     `hidden`, is load-bearing: `hidden` would make this a scroll container
     and break #itin-ideas-sidebar's position:sticky at the desktop
     breakpoint, and would force overflow-y to auto as well. Nothing that
     needs to escape this box is nested inside it — the stop "⋯" popover is
     appended to <body> on purpose (see toggleStopMenu(), js/itinerary.js). */
  overflow-x: clip;
  /* No background of its own: .app.active paints the trip ground (apricot)
     edge to edge, so there is no frame around the working area (2026-11-24).
     min-height lets a short tab still reach the viewport. */
  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Unlike the My Trips screen (whose topbar never scrolls because
   .home-screen clips to viewport height and only .home-body scrolls inside
   it — see the Home / My Trips Screen section below), the in-trip app has
   no such wrapper: the whole page scrolls, so without this the topbar
   scrolled away with everything else. Scoped to .app (not the base
   .home-topbar rule) so the My Trips screen's copy is untouched. */
.app .home-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

/* #6231: the Floating Pass is inset from the viewport edge, and the trip view
   scrolls the document, so without this content showed through the inset gap
   (the inner-box screens never do). A ground band over the whole strip above
   the pass's bottom edge, just under the pass's z-index 45 so the pass keeps
   its keyline, radius and Press shadow. Replaces #6107's pager-only mask. */
.app.active::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  background: var(--df-ground);
  pointer-events: none;
  z-index: 44;
}

/* The Route Mark on the Field Green top bars: the all-apricot treatment, the
   only one that goes on green (coral dot never sits on green; brand/logo/
   README.md). No badge ground — apricot on green is the mark. Every bar
   (My Trips, Stamps, Profile, trip view) carries the horizontal lockup at
   --logo-nav tall (#3717, #3895); the page title beside it is its own h1.
   flex-shrink:0 so a long trip name never squashes it. */
.home-topbar-lockup {
  display: block;
  width: auto;
  height: var(--logo-nav);
  flex-shrink: 0;
}

.header-sub {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.3;
  color: var(--topbar-fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Destination photo backdrop (Pexels, best-effort — see
   applyDestinationPhoto in js/utils.js). A fixed, full-viewport layer behind
   the entire trip view (nav bar, tabs, and every panel all paint above it —
   z-index:-1 puts it behind everything else in the page's stacking order),
   not squeezed into the nav bar strip (too cramped there for a photo to read
   as anything but noise). Only ever shows through the actual gaps around
   content — the desktop column's side margins, the sliver above/between day
   cards — since every panel/card in front of it has its own opaque
   background. mask-image is the actual "opacity 1 top-right → 0
   bottom-left" fade the image itself carries; the plain opacity transition
   below is a separate, one-time fade-IN once the photo finishes loading.
   pointer-events:none so it can never intercept a click meant for the real
   content sitting in front of it. */
.app-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-view) var(--ease-out);
}
.app-backdrop.app-backdrop-photo {
  /* Sized to 75% width × 75% height, pinned to the top-right corner, rather
     than covering the full viewport — no-repeat so it doesn't tile into the
     remaining area. */
  background-image: var(--content-photo);
  background-size: 75% 75%;
  background-position: top right;
  background-repeat: no-repeat;
  /* mask-size/repeat must be set explicitly — the default (auto / repeat)
     tiles the gradient in many small repetitions across an element this
     large instead of spanning it once, which averages out to the mask
     looking almost entirely transparent instead of fading smoothly.
     Radial, centered at the top-right corner (same corner the photo itself
     is pinned to). */
  -webkit-mask-image: radial-gradient(circle at top right, #000 0%, transparent 25%);
  mask-image: radial-gradient(circle at top right, #000 0%, transparent 25%);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.app-backdrop.app-backdrop-photo.app-backdrop-photo-visible {
  opacity: 1;
}

.tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  gap: 0;
  max-width: 680px;
  margin: 0 auto;
  background: var(--df-panel);
  border-top: 2px solid var(--df-ink); /* the keyline alone carries the separation — no ambient shadow in this system */
  padding: var(--space-md) max(var(--space-lg), env(safe-area-inset-left)) calc(var(--space-md) + env(safe-area-inset-bottom)) max(var(--space-lg), env(safe-area-inset-right)); /* ~25% larger than before, easier to see/tap on mobile */
  /* #546 — a safety net, not a layout: the row's hard floor is 44px × the
     visible tab count (see .tab below), so on a phone too narrow for that the
     bar scrolls sideways rather than pushing Settings off the screen edge.
     At every width the tabs fit, nothing scrolls and nothing changes. The
     travelling marker (::after) is positioned inside this scroll container,
     so it scrolls with the tabs and stays under the active one. */
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

/* #546 — 10px side padding is what tips eight tabs (a finished trip, #892)
   over a 360px phone: 8 × 44px + 2 × 10px = 372px. At 4px it is exactly
   360px, so the common Android width fits without the scroll fallback. */
@media (max-width: 400px) {
  .tabs {
    padding-left: max(var(--space-xs), env(safe-area-inset-left));
    padding-right: max(var(--space-xs), env(safe-area-inset-right));
  }
}

/* The active-tab marker, as one element that travels rather than one per tab
   blinking on and off. Which tab you're on and which one you just left are the
   same fact, and only a marker that moves between them says both.
   Positioned from --tab-ind-x/y, set by positionTabIndicator() (js/ui.js)
   from the active button's own offset box; --tab-ind-op stays 0 until that
   has run at least once, so it can never flash at the far left before it
   knows where to sit (and stays invisible under jsdom, which reports every
   offset as 0). Absolutely positioned against .tabs' padding box — .tabs is
   already position:fixed, so it is its own containing block. */
.tabs::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--selected-bg); /* #6634: the marker is the selected ink, not green */
  opacity: var(--tab-ind-op, 0);
  transform: translateX(var(--tab-ind-x, 0px));
  transition: transform var(--dur-state) var(--ease-move);
  pointer-events: none;
}

/* Set for exactly one frame while the marker is placed without a preceding
   position (first paint, a resize, a tab being hidden/shown by
   applyObserverTabRestrictions()) — it must appear where it belongs, not
   slide there from wherever it happened to be. */
.tabs.tabs-no-anim::after { transition: none; }

/* min-width, not just flex:1. `flex: 1` sets flex-basis:0, so growth is
   shared equally — but a flex item still cannot shrink below its min-content
   width, and with seven tabs the row's min-content sum exceeds a phone
   viewport. Every tab then sits at its own min-content, which made the
   icon-only Settings tab (no label to set a floor) the narrowest at 29px
   while its labelled siblings kept theirs (#544). The token is the floor for
   all of them; overflow:hidden means an unusually narrow viewport clips a
   label rather than pushing the bar wider than the screen.
   The floor is also a hard minimum on the whole row: 44px × the visible tab
   count, plus the bar's side padding. Collapsing Bookings to icon-only
   (applyTripPhaseUI(), js/ui.js) frees label width, not tab width, so .tabs
   above tightens its padding below 400px (eight tabs fit at 360px) and
   scrolls sideways below that (#546; the tab set itself was decided
   2026-09-26 to stay). */
.tab {
  flex: 1 1 auto;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  overflow: hidden;
  flex-direction: column;
  padding: var(--space-md) var(--space-xs);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.3;
  color: var(--df-ink-soft);
  cursor: pointer;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  transition: color var(--dur-feedback) var(--ease-out);
}

.tab.active {
  /* #6634 — one selected look for every control: an ink fill. The phone tab
     used to be green text alone, the only selected state with no fill. */
  background: var(--selected-bg);
  color: var(--on-selected);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.tab i {
  font-size: var(--fs-xl);
  /* The icon carries the tap acknowledgement, so the bar still confirms a
     press on its own if the travelling marker above never gets positioned. */
  transition: transform var(--dur-state) var(--ease-out);
}

.tab.active i {
  transform: translateY(-1px) scale(1.06);
}

.tab-icon-only i {
  font-size: var(--fs-xl);
}

/* #6089 - the Itinerary tab's calendar/map icons: >=1024px only (the phone bar
   has no room for two more 44px targets; phones keep #itin-phone-views). */
.tab-view-btn { display: none; }

.tab-icon-only span {
  display: none; /* label only shown in the desktop sidebar layout, see @media below */
}

/* #4158 — on a phone each trip tab carries its label under the icon (the
   boards' tab bar; this reverses #2698's icon-only bar). Labels never wrap or
   truncate: the tabs size to their content ("Check List" is the longest, about
   58px at the 12px caption tier) and share what is left of the bar, so six
   labelled tabs plus the icon-only Settings fit a 390px phone. Settings stays
   icon-only (.tab-icon-only above) and holds its 44px slot. */
.tab span {
  white-space: nowrap;
}

.tab-icon-only {
  flex: 0 0 var(--tap-min);
}

/* #5119 — with Recap shown the bar has 8 tabs; labels no longer fit a phone, so
   every tab drops its label together (the sidebar below re-shows them). */
.tabs-dense .tab span {
  display: none;
}

/* Tab labels are the 12px caption tier on a phone (#4001; DESIGN.md D2) and
   14px bodyDense in the sidebar below. The real answer to crowded labels is
   fewer top-level destinations, but that is a product decision (#546,
   decided 2026-09-26 to keep the current set). */

.panel {
  display: none;
  padding: 1rem;
}

.panel.active {
  display: block;
}

/* Issue #892 — the post-trip Recap tab + panel ship with this class and
   applyTripPhaseUI() (js/ui.js) removes it once tripPhase(tripData) ===
   'past', the same reveal-by-removing-a-class shape as
   css/features/itinerary-map.css's .feature-itinerary-map. !important
   because it has to beat .panel.active's own `display: block` in the brief
   window where a trip's dates are edited back out of the past while the
   viewer is sitting on the Recap panel. */
.tab-phase-hidden {
  display: none !important;
}


/* Tab switching. The tabs are an ordered row (Itinerary → Bookings → Expenses
   → Budget → People → Check List → Recap → Settings, in DOM order, Recap only
   on a finished trip) and the sidebar at ≥1024px keeps that same order
   vertically, so the incoming panel enters from whichever side it sits on
   relative to the one leaving — the bar's own order is the spatial model, and
   this is the only thing that makes it legible. --panel-dir is set by
   showTab() (js/ui.js): +1 moving down the list, -1 moving back up.
   10px, not a full-width slide: at this distance it reads as "a different
   thing arrived", which is the whole message, without the panel ever
   travelling far enough to feel like a page transition on a tab press. */
@keyframes panel-enter {
  from { opacity: 0; transform: translateX(calc(var(--panel-dir, 1) * 10px)); }
}

.panel.panel-enter {
  animation: panel-enter var(--dur-view) var(--ease-out) both;
}

/* #6985 - the outgoing panel fades out over the incoming one. It is lifted out of
   flow at its measured box (showTab sets top/left/width) so the incoming content
   is never held back, and it is inert. Opacity only: no travel on the way out. */
.panel.panel-leaving {
  display: block;
  position: absolute;
  box-sizing: border-box;
  pointer-events: none;
  animation: panel-leave var(--dur-feedback) var(--ease-exit) both;
}

@keyframes panel-leave {
  to { opacity: 0; }
}

/* #5871 — a top-level screen Arrives on a real navigation (initScreenArrive, js/ui.js). */
.screen-arrive {
  animation: panel-enter var(--dur-view) var(--ease-out) both;
}

/* A single row in a list (friend requests, friends list, blocked users,
   search results, trip invitations, shared-trip history) — same shape
   repeated inline across js/friends.js until this was pulled out. */
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}

.toast-msg {
  position: fixed;
  bottom: calc(76px + env(safe-area-inset-bottom)); /* clears the bottom tab bar */
  left: 50%;
  transform: translateX(-50%);
  /* Issue #755 — light-dark() covers the recolour; the border just below
     is what gives separation from whatever's behind it in dark mode
     (--surface-1 is nearly indistinguishable from this background there).
     A transparent border in light mode costs nothing visually — box-sizing
     is border-box app-wide, so it doesn't shift layout either. */
  background: light-dark(#1a1a1a, var(--surface-2));
  color: light-dark(var(--df-pin-white), var(--text-primary));
  border: 1px solid light-dark(transparent, var(--border));
  padding: var(--space-lg) var(--space-4xl);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 400;
  z-index: var(--z-toast);
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  /* #609 F1 — this used to live only on .toast-msg.has-action, so every
     plain-message toast (which is every error toast: none of them pass an
     `action`) rendered as one unwrapped, uncapped-width line. A ~80-char
     express-validator message laid out ~508px wide on a 390px viewport,
     bleeding off both edges with the first/last words cut clean off. */
  white-space: normal;
  max-width: min(92vw, 420px);
  /* Rises off the tab bar it sits above rather than materialising in place —
     the toast reports something that just happened down there. .toast-in is
     added by toast() (js/utils.js) alongside the opacity it already set. */
  transform: translateX(-50%) translateY(8px);
  transition: opacity var(--dur-state) var(--ease-out), transform var(--dur-state) var(--ease-out), background var(--dur-state) var(--ease-out);
}

/* #609 F3/F4 — the only visual/AA distinction a failure toast gets: passing
   `{ kind: 'error' }` to toast() (js/utils.js) swaps the background and adds
   a role="alert"/aria-live="assertive" pair plus a tappable close button
   (below). Text stays white — var(--error) is already used at this exact
   contrast for .btn-danger-solid, see css/style.css:1398. */
.toast-msg.toast-error {
  background: var(--error);
}

.toast-msg.toast-in {
  transform: translateX(-50%) translateY(0);
}

/* Leaving is not an event worth watching — a dismissal that takes as long as
   the arrival reads as the toast being reluctant to go. */
.toast-msg:not(.toast-in) {
  transition-duration: var(--dur-feedback);
}

/* Only set while the toast is offering a trailing button — toast()'s
   `action` option (an Undo affordance) or an error's close button (below):
   the base toast stays pointer-events:none so it can never swallow a tap
   aimed at the UI behind it. */
.toast-msg.has-action {
  pointer-events: auto;
  /* #6227: a long action label ("Autofill with Kyoto ideas") otherwise shrinks the
     message to a one-word column, because left:50% leaves only half the viewport. */
  width: max-content;
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.toast-action {
  flex-shrink: 0;
  min-height: var(--tap-min);
  padding: 0 var(--space-lg);
  background: none;
  border: none;
  /* Not --vn-trail-green: the toast is pinned to a #1a1a1a background in
     BOTH themes, so a theme-following token would resolve to the light-mode
     forest green (#10702A) against near-black. --df-pin-trail-green-night is Trail
     Green's dark step, pinned (#6634), for the same contrast reason. */
  color: var(--df-pin-trail-green-night);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}

.toast-action:hover { text-decoration: underline; }

/* #609 F3 — the close control an error toast gets that a plain one never
   had ("no dismiss control" — F3). Icon-only, so sized to --tap-min rather
   than reusing .toast-action's text padding. */
.toast-close {
  flex-shrink: 0;
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--df-pin-white);
  cursor: pointer;
}

.toast-close i { font-size: var(--fs-md); }

/* Runtime update detection (issue #191 Phase 3) - same dark pill look as
   .toast-msg, but persistent (no auto-dismiss/opacity transition) and with
   clickable controls, so unlike .toast-msg it needs pointer-events:auto and
   an explicit width cap so long copy wraps instead of overflowing. */
/* Issue #755 — #1a1a1a is byte-identical to dark-mode --surface-1, so this
   and .toast-msg above had no visible boundary against the page (body's own
   background) behind them in dark mode. --surface-2 is dark mode's next
   elevation step up, plus a real border rather than relying on the shadow
   alone (a black shadow on a near-black page is itself nearly invisible).
   See .toast-msg above for why the border is safe to declare unconditionally
   (transparent in light mode, border-box sizing app-wide). */
.version-update-banner {
  position: fixed;
  bottom: calc(76px + env(safe-area-inset-bottom)); /* clears the bottom tab bar */
  left: 50%;
  transform: translateX(-50%);
  background: light-dark(#1a1a1a, var(--surface-2));
  color: light-dark(var(--df-pin-white), var(--text-primary));
  border: 1px solid light-dark(transparent, var(--border));
  padding: var(--space-lg) var(--space-xl) var(--space-lg) var(--space-3xl);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 400;
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  max-width: calc(100vw - 32px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.version-update-refresh {
  background: var(--vn-green-mid);
  color: var(--df-pin-white);
  border: none;
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-2xl);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.version-update-dismiss {
  background: none;
  border: none;
  color: var(--df-pin-white);
  opacity: 1;
  font-size: var(--fs-lg);
  line-height: 1;
  cursor: pointer;
  padding: 0 var(--space-2xs);
}
/* Dimmed-until-hover is only a real affordance on a device that can hover —
   on touch, :hover never fires, so gating the dim behind (hover: hover)
   keeps it full-opacity by default there instead of permanently muted. */
@media (hover: hover) {
  .version-update-dismiss {
    opacity: 0.7;
  }
  .version-update-dismiss:hover {
    opacity: 1;
  }
}

/* Issue #1140 — the consent gate and its toggle rows (js/cookie-consent.js).
   The same rows render in three places: the gate modal, the register form
   (#reg-consent), and Profile → Cookie preferences. Every
   switch has identical visual weight — no pre-coloured or highlighted
   option — so nothing nudges toward "on" (EDPB Guidelines 03/2022 look at
   styling, not order). Replaces #1089's bottom banner and #1131's floating
   "Cookie choices" pill, both removed. */
.consent-toggles {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  justify-content: space-between;
}

.consent-row-text { flex: 1 1 auto; min-width: 0; }

.consent-row-title {
  display: block;
  font-weight: 600;
  font-size: var(--fs-sm);
  cursor: pointer;
}

.consent-row-desc {
  margin: 2px 0 0;
  font-size: var(--fs-xs);
  line-height: 1.45;
  color: var(--text-muted);
}

.consent-row-desc a { color: inherit; text-decoration: underline; }

/* Issue #3106 — the legal links inside the consent copy are inline text, so
   the glyphs stay on the baseline and the 44px --tap-min hit box comes from a
   centred ::before (DESIGN.md, the same convention as .modal-close). */
.consent-row-desc a,
.consent-policy-link a {
  position: relative;
}
.consent-row-desc a::before,
.consent-policy-link a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}

.consent-subrows {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: calc(-1 * var(--space-xs));
  padding-left: var(--space-lg);
  border-left: 2px solid var(--border);
}

/* The hidden attribute alone loses to the flex above; jsdom has no layout, so
   only a real browser shows it (#5569). */
.consent-subrows[hidden] { display: none; }

.consent-subrow .consent-row-title { font-weight: 600; font-size: var(--fs-xs); }

/* Issue #5569 — the heading is part of the shared rendering (the panel and the
   register form), and Non-essential collapses behind a real button. */
.consent-heading-title {
  margin: 0;
  font-family: var(--df-sans);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.25;
}

.consent-heading-text {
  margin: var(--space-xs) 0 0;
  font-size: var(--fs-xs);
  line-height: 1.45;
  color: var(--text-muted);
}

.consent-expand {
  align-self: flex-start;
  min-height: var(--tap-min);
  margin: calc(-1 * var(--space-sm)) 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.consent-expand:focus-visible { outline: 2px solid var(--vn-green-mid); outline-offset: 2px; }

/* Privacy Policy is a row with no switch: nothing to turn on or off. */
.consent-row-privacy .consent-row-title { cursor: default; }

.consent-note,
.consent-policy-link {
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.consent-policy-link a { color: inherit; text-decoration: underline; }

/* A native checkbox drawn as a switch — keeps checkbox semantics (and the
   master row's `indeterminate` mixed state) for assistive tech. The visible
   track is 44x26; the tap target meets --tap-min via ::before. */
.consent-switch {
  position: relative;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 26px;
  margin: 0;
  border-radius: 13px;
  background: var(--border);
  cursor: pointer;
  transition: background var(--dur-feedback) var(--ease-out);
}

.consent-switch::before {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}

.consent-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--df-pin-white);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
  transition: transform var(--dur-state) var(--ease-move);
}

.consent-switch:checked { background: var(--vn-green-mid); }
.consent-switch:checked::after { transform: translateX(18px); }
/* Mixed (some sub-categories on): knob centred, track neither colour. */
.consent-switch:indeterminate { background: color-mix(in srgb, var(--vn-green-mid) 45%, var(--border)); }
.consent-switch:indeterminate::after { transform: translateX(9px); }
.consent-switch:focus-visible { outline: 2px solid var(--vn-green-mid); outline-offset: 2px; }

.consent-gate-content { max-width: 480px; }

.consent-gate-intro {
  margin: 0 0 var(--space-lg);
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--text-muted);
}

.consent-gate-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

/* margin: 0 — .btn-primary/.btn-secondary each carry their own stacked-
   layout bottom margins, which misalign them side by side. */
.consent-gate-actions > button { flex: 1 1 0; margin: 0; }

.consent-gate-blocked p { margin: 0; line-height: 1.5; }

/* ---- Desktop layout: sidebar nav instead of a bottom tab bar, and a wider
   main content column instead of a centered 680px mobile-style strip.
   max-width explicitly cleared (not just omitted) since the base .app-main
   rule sets 680px and a media query only overrides properties it actually
   declares — the column fills whatever space is left next to the 220px
   sidebar rather than capping out and leaving a dead strip on wide
   monitors. ---- */
@media (min-width: 1024px) {
  .app-main {
    max-width: none;
    margin: 0; /* #5999: no sidebar — the tabs are the Floating Pass's second row */
    padding: calc(var(--topbar-h) + 1.5rem) 2.5rem 1.5rem;
  }

  .tabs {
    /* #5999 (Two-tier Pass, #6000): no sidebar — the tabs are the Floating Pass's second row; geometry, colour and tear line: the #app block at the end of this file. */
    flex-direction: row;
    align-items: center;
    gap: var(--space-xs);
    overflow: visible;
  }

  .tab {
    flex: none;
    flex-direction: row;
    justify-content: flex-start;
    gap: var(--space-md);
    padding: 0 var(--space-xl);
    font-size: var(--fs-sm);
    border-radius: var(--radius-pill, 999px);
  }

  .tab-icon-only {
    flex: none;
  }

  .tabs::after {
    display: none;
  }

  .tab i,
  .tab-icon-only i {
    font-size: var(--fs-lg);
  }

  .tab-icon-only span,
  .tabs-dense .tab span {
    display: inline;
  }

  .toast-msg,
  .version-update-banner {
    bottom: 24px; /* no bottom tab bar to clear at this width */
  }

  /* Itinerary/Hotel action buttons: stop flex-growing to fill the row now
     that the row itself is much wider — shrink to natural content width
     and stay left-aligned instead of stretching into oversized bars. */
  .itin-action-btn {
    flex: 0 1 auto;
    width: auto;
    min-width: 0;
  }

  /* Issue #941 (reverses #873's cap) — every desktop panel is full-bleed:
     no max-width here at all, so a .panel simply fills .app-main's content
     box like any other block element. The left edge already stays fixed
     against the sidebar with no margin-inline needed — that's just how a
     block-level div sits in its container, nothing to declare. What used to
     live here (a shared var(--panel-measure) cap, a .panel-wide opt-out for
     Itinerary/Map, Bookings overriding the token narrower) is gone: capping
     the container was standing in for giving each panel's interior
     something to do with the width. See the panels themselves for that —
     .itin-layout's minmax() grid (below), the Bookings card grid, the
     Packing/Budget column splits — and .section-sub below for the prose
     measure that replaces the old container measure for body copy. */
}

/* ==================== Summary Cards ==================== */
.stat-grid {
  margin-bottom: 1rem;
}

/* The standing figures as one boarding-pass stub. Two peer .stat-cards made
   the trip total and the viewer's own spend look like equals and cost a
   second keyline and a second hard shadow on a screen already made almost
   entirely of both. Below the perforation they are stub fields — your two
   numbers, subordinate to the group's one. */
.exp-stub {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  overflow: hidden;
}

.exp-stub-head {
  padding: var(--sp-lg) var(--sp-lg);
}

.exp-stub-fields {
  display: flex;
  border-top: 2px dashed var(--df-hair);
}

.exp-stub-field {
  flex: 1;
  min-width: 0;
  padding: var(--sp-md) var(--sp-lg) var(--sp-lg);
}

.exp-stub-field + .exp-stub-field {
  border-left: 2px solid var(--df-hair);
}

/* The stub's own two figures: below the trip total, above body copy.
   Scoped to the field rather than left as a bare `.stat-value-field`, which
   ties on specificity with `.stat-value` below and loses to it on order —
   the rule was silently doing nothing when measured in a real browser. */
.exp-stub-field .stat-value-field {
  font-size: var(--fs-md);
}

/* #2238 — To pay / To receive under the tear. The whole block is one button
   that opens Balances. */
button.exp-stub-open {
  width: 100%;
  background: none;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  min-height: var(--tap-min);
}
.exp-stub-line {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-sm);
  font-size: var(--fs-xs);
}
.exp-stub-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.exp-stub-amt {
  white-space: nowrap;
  font-weight: 400;
}
.exp-stub-none,
.exp-stub-square {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}
.exp-stub-square {
  padding: var(--sp-md) var(--sp-lg);
}
/* One-line form for the Balances and Shared fund views (below 1024px). */
.exp-stub-compact {
  display: none;
}
@media (max-width: 1023px) {
  .exp-panel[data-exp-view="balances"] .exp-stub-head,
  .exp-panel[data-exp-view="balances"] .exp-stub-fields,
  .exp-panel[data-exp-view="fund"] .exp-stub-head,
  .exp-panel[data-exp-view="fund"] .exp-stub-fields {
    display: none;
  }
  .exp-panel[data-exp-view="balances"] .exp-stub-compact,
  .exp-panel[data-exp-view="fund"] .exp-stub-compact {
    display: block;
    padding: var(--sp-md) var(--sp-lg);
    font-weight: 400;
  }
}

.stat-card {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  box-shadow: var(--df-press);
  padding: var(--space-xl) var(--space-3xl);
}

/* Shared Fund's inline selects/amount inputs (renderPotSection() et al) —
   these only need a WIDTH override for their flex-row layout; height, font-
   size, font-family, border and border-radius all come from the shared
   input/select rule (css/style.css:585) same as every other field in the
   app. Before this class existed they duplicated all of the above by hand
   with raw px values (28-36px tall, 11-13px text) — smaller than 16px on
   mobile, which re-triggers the iOS Safari auto-zoom-on-focus bug DESIGN.md
   already had to fix once (issue #15). */
.pot-inline-select,
.pot-inline-input {
  width: auto;
  min-width: 110px;
}

.pot-inline-select-flex {
  flex: 1;
  min-width: 120px;
  /* A member picker holding one name; without a ceiling it stretched to
     whatever the panel column happened to be (730px at a desktop width). */
  max-width: 320px;
}

.pot-inline-input {
  min-width: 90px;
  max-width: 140px;
}

.pot-inline-input-narrow {
  min-width: 80px;
  max-width: 100px;
}

.stat-label {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--df-ink-soft);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  font-family: var(--df-display);
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--df-ink);
  line-height: 1;
}

/* The trip total is the one thing this screen exists to answer, so it is the
   screen's single loud element (DESIGN.md's One Shout Rule) — a role the
   full-bleed green Add Expense slab used to hold by being the largest and
   most saturated object on the page. Every other figure here stays quiet. */
.stat-card-primary .stat-value,
.exp-stub-head .stat-value {
  font-size: var(--fs-2xl);
}

/* A multi-currency trip stacks one figure per currency in the same card —
   they are peers, so none of them takes the primary size. */
.stat-value-stacked {
  font-size: var(--fs-md);
}
.stat-card-primary .stat-value-stacked {
  font-size: var(--fs-lg);
}
.stat-value-stacked + .stat-value-stacked {
  margin-top: var(--space-xs);
}
.exp-stub-head .stat-value-stacked {
  font-size: var(--fs-lg);
}
.exp-stub-field .stat-value-stacked {
  font-size: var(--fs-sm);
}

.stat-sub {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin-top: var(--space-xs);
}

/* Budget tab "Spent so far" card (#2689, board BudgetScreen). One card style:
   label-tier eyebrow inside, 2px ink keyline, hard offset shadow. Colours are
   DESIGN.md's only: ink, Route Amber, Amber Ink (#8A5610). */
.budget-card {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.budget-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.budget-eyebrow { white-space: nowrap; font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; line-height: 1.3; letter-spacing: 0.1em; text-transform: uppercase; }
.budget-money-switch { display: flex; padding: 3px; border: 2px solid var(--df-ink); border-radius: 999px; }
.budget-money-switch button {
  min-height: var(--tap-min); min-width: var(--tap-min); padding: 0 12px; border: 0; border-radius: 999px;
  background: none; color: inherit; font-family: var(--df-sans); font-size: 14px; font-weight: 600; cursor: pointer;
}
.budget-money-switch button[aria-pressed="true"] { background: var(--df-ink); color: var(--df-panel); }
.budget-paid-lines { display: flex; flex-direction: column; gap: 4px; }
.budget-paid-line {
  display: flex; justify-content: space-between; gap: 0.5em; white-space: nowrap;
  font-family: var(--df-display); font-weight: 800; font-size: var(--fs-display-32);
  line-height: 1; letter-spacing: -0.03em; max-width: 360px; font-variant-numeric: tabular-nums;
}
.budget-paid-amt { text-align: right; font-variant-numeric: tabular-nums; }
.budget-hero-home { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.budget-hero-amount {
  font-family: var(--df-display); font-weight: 800; font-size: 18px;
  line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.budget-approx-btn {
  min-width: var(--tap-min); min-height: var(--tap-min); padding: 0 8px; border: 2px solid var(--df-ink);
  border-radius: 999px; background: var(--df-ground); color: var(--df-ink); font-weight: 800; font-size: 22px; cursor: pointer;
}
.budget-sub { font-size: 14px; line-height: 1.3; }
.budget-bar-wrap { position: relative; height: 22px; }
.budget-bar {
  position: absolute; left: 0; right: 0; top: 2px; height: 18px; box-sizing: border-box;
  border: 2px solid var(--df-ink); border-radius: 999px; overflow: hidden; background: var(--df-panel);
}
.budget-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; }
.budget-bar-tick { position: absolute; top: -4px; height: 30px; width: 4px; border-radius: 2px; background: var(--df-ink); }
.budget-bar-none { display: flex; align-items: center; gap: 8px; }
.budget-bar-none-fill { flex: 1; height: 18px; box-sizing: border-box; border: 2px solid var(--df-ink); border-radius: 999px; background: var(--df-ink); }
.budget-infinity { font-family: var(--df-display); font-weight: 800; font-size: 18px; line-height: 1; }
.budget-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.budget-legend > div { display: flex; flex-direction: column; gap: 3px; }
.budget-legend-end { align-items: flex-end; }
.budget-legend-label {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; line-height: 1.3; letter-spacing: 0.1em; text-transform: uppercase;
}
.budget-legend-val { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.budget-swatch { width: 12px; height: 12px; box-sizing: border-box; border: 2px solid var(--df-ink); border-radius: 3px; }
.budget-swatch-empty { background: var(--df-panel); }
.budget-message { margin: 0; font-size: 14px; line-height: 1.45; font-weight: 600; }
.budget-note { margin: 0; padding-top: 10px; border-top: 1.5px dashed var(--df-ink-soft); font-size: 14px; line-height: 1.45; }
.budget-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.budget-link-btn {
  min-height: var(--tap-min); padding: 0 4px; border: 0; background: none; color: var(--vn-trail-green);
  font-family: var(--df-sans); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
/* Edit budget sheet (#2690). */
.btn-secondary.budget-edit-btn { font-family: var(--df-sans); font-size: 14px; font-weight: 600; }
.budget-suggest-chip {
  display: inline-flex; align-items: center; min-height: var(--tap-min); margin-top: 8px; padding: 0 14px;
  border: 2px solid var(--df-ink); border-radius: 999px; background: var(--df-panel); color: var(--df-ink);
  font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer;
}
.budget-suggest-by { font-weight: 400; color: var(--df-ink-soft); white-space: pre; }
.budget-vis-head { display: flex; align-items: center; justify-content: space-between; }
.budget-help-btn {
  min-width: var(--tap-min); min-height: var(--tap-min); border: 0; background: none; color: var(--df-ink);
  font-size: 16px; font-weight: 600; cursor: pointer;
}
.budget-vis-group { display: flex; padding: 3px; border: 2px solid var(--df-ink); border-radius: 999px; }
.budget-vis-opt { flex: 1; position: relative; }
.budget-vis-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.budget-vis-opt span {
  display: flex; align-items: center; justify-content: center; min-height: 38px; border-radius: 999px;
  font-size: 14px; font-weight: 600; text-align: center;
}
.budget-vis-opt input:checked + span { background: var(--df-ink); color: var(--df-panel); }
.budget-vis-opt input:focus-visible + span { outline: 2px solid var(--vn-trail-green); outline-offset: 2px; }
.budget-edit-help { margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: var(--df-ink-soft); }
.budget-edit-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: var(--space-md); }
.budget-edit-section { margin-top: var(--space-lg, 20px); padding-top: var(--space-md); border-top: 1.5px dashed var(--df-ink-soft); }
.budget-conv-list { display: flex; flex-direction: column; border: 2px solid var(--df-ink); border-radius: 12px; overflow: hidden; }
.budget-conv-row { display: flex; justify-content: space-between; padding: 12px 14px; border-bottom: 1.5px dashed var(--df-ink-soft); font-size: 14px; }
.budget-conv-total { background: var(--df-ground); color: var(--df-ink); border-bottom: 0; }
.budget-conv-source { font-size: 14px; line-height: 1.45; }

/* Budget "Spent by category" card + category detail (#2691). Category spine
   colours are the categories' own; currency patterns (D29) are the same on
   every bar: JPY solid ink, KRW grey, THB 135deg hatch, home 90deg stripes,
   anything else dots. */

.budget-cat-card { gap: 0; }
.budget-cat-sub { font-size: 12px; font-weight: 400; line-height: 1.4; }
.budget-cat-row {
  display: grid; grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 6px; align-items: start;
  width: 100%; min-height: var(--tap-min); position: relative; padding: 12px 22px 12px 12px; margin: 0; text-align: left; font: inherit; color: inherit;
  background: none; border: 0; border-top: 1.5px dashed var(--df-ink-soft); border-left: 6px solid var(--df-ink-soft); cursor: pointer;
}
.budget-cat-row:first-of-type { margin-top: 12px; }
.budget-cat-chev { position: absolute; right: 4px; top: 12px; font-size: 18px; line-height: 1.3; color: var(--df-ink-soft); }
.cat-spine-food { border-left-color: var(--vn-pandan); }
.cat-spine-transport { border-left-color: var(--vn-sky); }
.cat-spine-shopping { border-left-color: var(--vn-batik); }
.cat-spine-hotel { border-left-color: var(--vn-indigo); }
.cat-spine-activity { border-left-color: var(--vn-green); }
.cat-spine-attraction { border-left-color: var(--vn-purple-text); }
.budget-cat-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.budget-cat-lines { display: flex; flex-direction: column; gap: 2px; min-width: 9em; }
.budget-cat-line { display: flex; justify-content: space-between; gap: 0.75em; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.budget-cat-line-none { color: var(--df-ink-soft); }
.budget-cat-more { align-self: flex-end; font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 400; line-height: 1.3; letter-spacing: 0; text-transform: none; }
.budget-cat-bar { grid-column: 1 / -1; position: relative; height: 12px; box-sizing: border-box; border: 2px solid var(--df-ink); border-radius: 999px; overflow: hidden; background: var(--df-panel); }
.budget-cat-target { grid-column: 1 / -1; font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 400; line-height: 1.3; letter-spacing: 0; text-transform: none; }
.budget-pat-solid { background: var(--df-ink); }
.budget-pat-grey { background: #4a5851; }
.budget-pat-hatch { background: repeating-linear-gradient(135deg, var(--df-ink) 0 3px, var(--df-panel) 3px 6px); }
.budget-pat-stripes { background: repeating-linear-gradient(90deg, var(--df-ink) 0 3px, var(--df-panel) 3px 6px); }
.budget-pat-dots { background: radial-gradient(var(--df-ink) 1.2px, var(--df-panel) 1.5px) 0 0 / 6px 6px; }
.budget-split-bar { display: flex; height: 18px; box-sizing: border-box; border: 2px solid var(--df-ink); border-radius: 999px; overflow: hidden; margin: 8px 0 12px; }
.budget-split-bar > span { display: block; height: 100%; }
.budget-paidin { display: flex; flex-direction: column; border: 2px solid var(--df-ink); border-radius: 12px; overflow: hidden; }
.budget-paidin-row { display: grid; grid-template-columns: 14px 1fr auto auto; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1.5px dashed var(--df-ink-soft); font-size: 14px; font-variant-numeric: tabular-nums; }
.budget-paidin-row:last-child { border-bottom: 0; }
.budget-paidin-amt { font-weight: 400; }
.budget-paidin-pct { min-width: 3em; text-align: right; }
.budget-paidin-target { display: flex; justify-content: space-between; background: var(--df-ground); }
.budget-cat-exps { display: flex; flex-direction: column; margin-top: 8px; }
.budget-cat-exp { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1.5px dashed var(--df-ink-soft); font-size: 14px; }
.budget-cat-exp-main { display: flex; flex-direction: column; min-width: 0; }
.budget-cat-exp-meta { font-size: var(--fs-sm); }
.budget-cat-exp-amt { font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.budget-target-form { margin-top: var(--space-md); }
.budget-target-controls { display: flex; gap: 8px; }
.budget-target-controls input { flex: 1; min-width: 0; }
@media (min-width: 1024px) {
  .budget-category-modal { align-items: stretch; justify-content: flex-end; padding: 0; }
  .budget-category-modal .modal-content { max-width: 400px !important; height: 100%; max-height: 100%; border-radius: 0; }
}

/* Budget layout (#2693, D27/D33; D33's 50/50 split reversed by the founder,
   2026-10-22, #3979). One 560px column below 1280px. From 1280px: Spent so far
   full width, then Spent by category (fills) | handle | Group spent, a
   draggable rail like Itinerary's Ideas column (js/pane-resizer.js owns
   --budget-pane-width). minmax(0, 1fr) so a long row can't stretch a track. */
.budget-layout { display: flex; flex-direction: column; gap: var(--space-xl); max-width: 560px; }
@media (min-width: 1280px) {
  .budget-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 6px minmax(260px, var(--budget-pane-width));
    column-gap: 0;
    row-gap: var(--space-xl);
    align-items: start;
    max-width: none;
  }
  .budget-layout-spent { grid-column: 1 / -1; }
  .budget-layout-main { grid-column: 1; grid-row: 2; }
  .budget-layout > .pane-resizer { grid-column: 2; grid-row: 2; }
  .budget-layout-rail {
    grid-column: 3;
    grid-row: 2;
    position: sticky;
    top: var(--rail-top);
    max-height: calc(100vh - var(--rail-top) - var(--space-3xl));
    overflow-y: auto;
    /* Room for the card's hard offset shadow inside the scroll box. */
    padding: 0 var(--space-xs) var(--space-xs) 0;
    /* #4425 — the grid area ends before the page does, so at the end of the
       page the container pushed the rail up under the top bar. The negative
       margin lets the sticky box overhang the area's end. */
    margin-bottom: calc(-1 * var(--rail-top));
  }
}
.budget-empty { padding: 0.5rem 0; font-size: var(--fs-sm); }
#panel-budget .section-sub { font-size: 14px; font-weight: 400; line-height: 1.6; }
.budget-eyebrow-gap { margin-top: var(--space-md); }
.budget-cat-row.is-selected { background: color-mix(in srgb, var(--df-ink) 7%, transparent); }

/* Group spent card (#2692) — one bar scale for every joined member; a shared
   budget is a tick, a private one a grey "budget private" state. */
.budget-group-rows { display: flex; flex-direction: column; gap: 14px; }
.budget-group-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; row-gap: 6px; align-items: center; }
.budget-group-row .member-avatar { width: 32px; height: 32px; border-width: 1.5px; font-size: var(--fs-xs); }
.budget-group-row .budget-group-bar { grid-column: 1 / -1; }
.budget-group-row > .budget-group-meta { grid-column: 1 / -1; }
.budget-group-row-private .budget-bar { border-color: var(--df-ink-soft); }
.budget-group-name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.budget-group-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.budget-group-meta { font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 400; line-height: 1.3; letter-spacing: 0; text-transform: none; color: var(--df-ink-soft); }
.budget-group-amt { font-weight: 600; font-size: 14px; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }
.budget-group-cats { display: flex; flex-direction: column; }
.budget-share-fill { background: var(--df-ink-soft); }
.budget-share-fill.cat-hue-food { background: var(--vn-pandan); }
.budget-share-fill.cat-hue-transport { background: var(--vn-sky); }
.budget-share-fill.cat-hue-shopping { background: var(--vn-batik); }
.budget-share-fill.cat-hue-hotel { background: var(--vn-indigo); }
.budget-share-fill.cat-hue-activity { background: var(--vn-green); }
.budget-share-fill.cat-hue-attraction { background: var(--vn-purple-text); }

/* Small conclusion line under the Spending by Category bars — absorbs what
   used to be a standalone "Expenses" stat tile. */
.cat-breakdown-count {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  text-align: right;
  margin-top: var(--space-2xs);
}

/* Issue #242 — per-member transport booking status (Transport section). */
.transport-member-status-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.transport-member-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
.transport-member-status-name {
  font-size: var(--fs-sm);
  color: var(--df-ink-soft);
}
.transport-member-status-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  border: 2px solid var(--df-ink);
  background: var(--df-panel);
  color: var(--df-ink-soft);
  border-radius: var(--radius-pill);
  padding: var(--space-2xs) var(--space-lg);
  font-size: var(--fs-xs);
  font-family: inherit;
  cursor: pointer;
}
/* Audit 2026-09-02: the interactive "Mark as booked" chip measured 123x24,
   under the 44px target floor (WCAG 2.5.8). Only the button variant grows —
   the read-only "Pending"/"Booked" span stays compact. */
button.transport-member-status-chip {
  min-height: var(--tap-min);
}
button.transport-member-status-chip:hover {
  border-color: var(--vn-trail-green);
}
.transport-member-status-chip.booked {
  border-color: var(--vn-trail-green);
  color: var(--vn-trail-green);
  background: var(--vn-trail-green-light);
  cursor: default;
}

/* ==================== Section Headings ==================== */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.25rem 0 0.6rem;
}

.section-head h3 {
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--df-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Issue: on the Expenses panel, this heading (13px/500/secondary) organizes
   content that's LARGER and DARKER than it — .expense-name is 14px/500/
   primary, so seven section labels in a row (All entries, Summary, Spending
   by category, Per person, Settlement, ...) read as fainter than what they
   introduce, and nothing on the screen claims visual priority. Scoped to
   this panel only — .section-head is a shared component used across the
   app and this isn't a redesign of it, just restoring hierarchy on the one
   screen where it inverted. */
#panel-expenses .section-head h3 {
  font-family: var(--df-display);
  font-size: var(--fs-md);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--df-ink);
}

.section-sub {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin: -0.3rem 0 0.6rem;
  line-height: 1.4;
  /* Issue #941 — panels are full-bleed now; this is the prose measure that
     stops a tab's intro line stretching edge to edge on a wide monitor
     instead of a container cap doing it for the whole panel. */
  max-width: var(--prose-measure);
}

/* ==================== Forms ==================== */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.form-full {
  margin-bottom: var(--space-lg);
}

/* Consistent input/select height across the expenses panel */
#panel-expenses input:not([type=file]),
#panel-expenses select,
#edit-expense-modal input:not([type=file]),
#edit-expense-modal select {
  height: 40px;
  box-sizing: border-box;
}

/* Issue #630 follow-up — this rule's ID-scoped selectors outrank the shared
   input/select/textarea rule's own @media (max-width: 680px) --tap-min
   override (verified via scripts/verify-mobile.mjs: every input/select
   inside these two containers measured a hard 40px at 390px regardless of
   the shared rule's mobile block), silently defeating the 44px tap floor
   for the entire Expenses panel and Edit Expense modal. Same condition
   as the shared rule (#4432: narrow viewport or touch pointer), same fix,
   scoped to match. */
@media (max-width: 680px), (pointer: coarse) {
  #panel-expenses input:not([type=file]),
  #panel-expenses select,
  #edit-expense-modal input:not([type=file]),
  #edit-expense-modal select {
    height: var(--tap-min);
  }
}

#panel-expenses textarea,
#edit-expense-modal textarea {
  height: auto;
  min-height: 60px;
  box-sizing: border-box;
}

/* Currency + amount wrapper */
.exp-amount-wrap {
  display: flex;
  gap: 0;
  align-items: stretch;
}

/* Code-only in both the closed select and the open dropdown list (issue
   #630) — no overlay, nothing to clip, nothing to fall out of sync. The
   full currency name lives in the conversion line below (#myr-convert)
   instead, where a name actually helps. Previously this was a
   color:transparent select with a badge painted on top to fake a
   code-only closed state while showing "CODE (Full Name)" open; Blink
   paints a closed select's text from the selected <option>'s computed
   color rather than the select's own, so the hidden text bled through
   under the badge on every Chromium browser. */
.exp-currency-picker {
  position: relative;
  min-width: 60px;
  flex-shrink: 0;
}

.exp-currency-sel {
  width: 100%;
  height: 100%;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-right: none !important;
}

.exp-amount-inp {
  flex: 1;
  min-width: 0;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

/* Issue #630 follow-up — the "Include tax" checkbox measured a native
   13x13 hit box (well under --tap-min) in scripts/verify-mobile.mjs. The
   wrapping <label> already extends the clickable area in practice, but its
   own row height isn't guaranteed >=44px either, so this uses the same
   ::before-expansion idiom as .stop-menu-btn/.member-menu-btn/.set-info-btn
   — glyph stays its native small size, tappable area doesn't. */
#exp-tax-toggle, #edit-exp-tax-toggle {
  position: relative;
  flex-shrink: 0;
}
#exp-tax-toggle::before, #edit-exp-tax-toggle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}

.pax-toggle {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Issue #630 — the single person-selection primitive across the Add/Edit
   Expense form's Paid by, Equal split and itemized rows (those rows moved
   off .assignee-btn onto this; .assignee-btn itself lives on for
   js/accommodations.js — see the comment above
   .item-assignees). Full display names are no longer truncated to a first
   word (two members sharing one could never be told apart) — max-width +
   ellipsis here, title="" at the call site carries the full name for
   anyone who needs it. */
.pax-btn {
  min-height: var(--tap-min);
  padding: var(--space-sm) var(--space-xl);
  font-size: var(--fs-xs);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  cursor: pointer;
  background: var(--df-panel);
  color: var(--df-ink-soft);
  font-family: inherit;
  min-width: var(--tap-min);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background var(--dur-feedback) var(--ease-out), color var(--dur-feedback) var(--ease-out), border-color var(--dur-feedback) var(--ease-out);
}

.pax-btn.sel {
  background: var(--selected-bg);
  border-color: var(--selected-bg);
  color: var(--on-selected);
}

/* Itemized rows are dense — tighten via gap (.item-assignees above) and
   horizontal padding only, never by dropping under --tap-min again (that
   was the old .assignee-btn's mistake at ~19px tall). */
.pax-btn-compact {
  padding: var(--space-xs) var(--space-md);
  max-width: 120px;
}

/* "All"/"None" for an itemized row's assignees — a text toggle, not a
   third person-chip variant, so it can't be mistaken for a member named
   "All" the way .assignee-btn.all-btn used to read. Visible box stays
   small and dense; ::before expands the real tappable zone to --tap-min,
   same trick as .stop-edit-btn (this pair has enough breathing room above
   its own chip row that the expanded zones don't overlap a neighbor). */
.item-all-none-toggle {
  display: flex;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-xs);
}
.item-all-none-btn {
  position: relative;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--df-brand);
  text-decoration: underline;
  cursor: pointer;
}
.item-all-none-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}


/* ==================== Categories ==================== */
.cat-pill {
  display: inline-flex;
  align-items: center;
  /* Issue #451 — the pill leads the stop row now and carries a label, so it
     must not be the thing that collapses when a long place name competes for
     width; .cat-pill-label truncates instead. */
  flex-shrink: 0;
  gap: var(--space-xs);
  font-size: var(--fs-xs);
  padding: var(--space-2xs) var(--space-md);
  border-radius: var(--radius-pill);
  font-weight: 500;
}

.cat-food {
  background: var(--vn-pandan-light);
  color: var(--vn-pandan);
}

.cat-transport {
  background: var(--vn-sky-light);
  color: var(--vn-sky-text);
}

.cat-shopping {
  background: var(--vn-batik-light);
  color: var(--vn-batik);
}

.cat-hotel {
  background: var(--vn-indigo-light);
  color: var(--vn-indigo-text);
}

.cat-activity {
  background: var(--vn-green-light);
  color: var(--vn-green);
}

.cat-other {
  background: var(--df-panel);
  color: var(--df-ink-soft);
}

/* Issue #630 — Add/Edit Expense's category picker, icon chips reusing the
   same Tabler glyph + hue taxonomy as the Expenses subtabs (issue #451) and
   .cat-food/etc above, instead of a native emoji <select>. */
.exp-cat-chip-row {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: var(--sp-xs);
  padding-bottom: var(--sp-xs);
}

/* #2233 — icon-only chips: 44px square targets, glyph tinted with the
   Category Compass hue even when unselected; the name lives in aria-label. */
.exp-cat-chip-row .exp-cat-chip {
  flex: 0 0 auto;
  justify-content: center;
  min-width: var(--tap-min);
  padding: var(--sp-sm);
}
.exp-cat-chip-row .exp-cat-chip i { font-size: var(--fs-lg, 1.25rem); }
.exp-cat-chip.cat-food:not(.sel) i { color: var(--vn-pandan); }
.exp-cat-chip.cat-transport:not(.sel) i { color: var(--vn-sky-text); }
.exp-cat-chip.cat-shopping:not(.sel) i { color: var(--vn-batik); }
.exp-cat-chip.cat-hotel:not(.sel) i { color: var(--vn-indigo-text); }
.exp-cat-chip.cat-activity:not(.sel) i { color: var(--vn-green); }
.exp-cat-from-stop { font-weight: 400; color: var(--df-ink-soft); }

/* #2233 — Split between: summary line and the "Not equal?" link. */
.split-summary { margin: var(--sp-sm) 0 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.split-notequal-link {
  min-height: var(--tap-min);
  padding: 0;
  border: none;
  background: none;
  color: var(--vn-trail-green);
  font: inherit;
  font-size: var(--fs-xs);
  text-decoration: underline;
  cursor: pointer;
}
.bk-split-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm); }
.bk-split-row .split-summary { margin: 0; flex: 1; min-width: 0; }
.split-modes { margin-top: var(--sp-xs); }
.split-modes:not(.xk-seg) .split-btn + .split-btn { border-left: 2px solid var(--df-ink); }
.split-modes .split-btn { padding-left: var(--sp-sm); padding-right: var(--sp-sm); }

.exp-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  min-height: var(--tap-min);
  padding: var(--sp-sm) var(--sp-md);
  font-size: var(--fs-xs);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  cursor: pointer;
  background: var(--df-panel);
  color: var(--df-ink-soft);
  font-family: inherit;
  transition: background var(--dur-feedback) var(--ease-out), color var(--dur-feedback) var(--ease-out), border-color var(--dur-feedback) var(--ease-out);
}

.exp-cat-chip.sel {
  border-color: var(--df-ink);
  color: var(--df-ink);
}

.exp-cat-chip.sel.cat-food { background: var(--vn-pandan-light); border-color: var(--vn-pandan); color: var(--vn-pandan); }
.exp-cat-chip.sel.cat-transport { background: var(--vn-sky-light); border-color: var(--vn-sky); color: var(--vn-sky-text); }
.exp-cat-chip.sel.cat-shopping { background: var(--vn-batik-light); border-color: var(--vn-batik); color: var(--vn-batik); }
.exp-cat-chip.sel.cat-hotel { background: var(--vn-indigo-light); border-color: var(--vn-indigo); color: var(--vn-indigo-text); }
.exp-cat-chip.sel.cat-activity { background: var(--vn-green-light); border-color: var(--vn-green); color: var(--vn-green); }

/* Design canvas gap-close — Add/Edit Stop and Quick Idea's Category/Type
   picker, same icon-chip idiom as .exp-cat-chip-row above but for the
   itinerary's own 7 PLACE_TYPES (js/state.js) rather than the 5 expense
   categories, so it needs its own attraction/other hues .exp-cat-chip never
   had to cover. */
.stop-cat-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.stop-cat-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-min);
  height: var(--tap-min);
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  padding: 0;
  font-size: var(--fs-md, 20px);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: inherit;
  transition: background var(--dur-feedback) var(--ease-out), color var(--dur-feedback) var(--ease-out), border-color var(--dur-feedback) var(--ease-out);
}
.stop-cat-chip:focus-visible { outline: 3px solid var(--df-ink); outline-offset: 2px; }
/* :not(.sel), not a bare base rule — every chip also carries a bare .cat-food/
   .cat-attraction/etc marker class (needed so .sel.cat-* below can target it),
   and those same classes are also the unscoped ".Categories" pill rules
   (same file, no .cat-pill scope) — same specificity as a bare .stop-cat-chip
   rule, so an UNselected chip would win or lose that tie purely on file
   order. :not(.sel) is one compound selector heavier and beats them outright. */
.stop-cat-chip:not(.sel) {
  background: var(--df-panel);
  color: var(--df-ink-soft);
}

/* #6215 — a picked chip fills with its category hue. Food on amber takes the
   dark ink foreground; the other hues take white. */
.stop-cat-chip.sel { border-color: var(--df-ink); color: var(--df-panel); } /* #6853: Cut Stock by day, Night Stock after dark: >=5:1 on every category fill */
.stop-cat-chip.sel.cat-food { background: var(--vn-pandan); }
.stop-cat-chip.sel.cat-transport { background: var(--vn-sky); }
.stop-cat-chip.sel.cat-shopping { background: var(--vn-batik); }
.stop-cat-chip.sel.cat-hotel { background: var(--vn-indigo); }
.stop-cat-chip.sel.cat-activity { background: var(--vn-green); }
.stop-cat-chip.sel.cat-attraction { background: var(--vn-purple); }
/* "Other" carries no hue in the Category Compass — selected goes to full ink. */
.stop-cat-chip.sel.cat-other { background: var(--df-ink); color: var(--df-panel); }

/* #6573: the label is the shared uppercase .form-label; only the picked name beside it stays sentence case, muted. */
#stopCategoryName, #ideaCategoryName { font-weight: 400; font-size: var(--fs-xs); color: var(--df-ink-soft); text-transform: none; letter-spacing: 0; }

/* Category breakdown bars (renderCategoryBars()) reuse a category's .cat-*
   class for its Compass hue, same as the .cat-pill badge above it — but a
   bar needs the bold, saturated color, not the pill's light tint
   background, or it reads as washed-out instead of a real fill. */
.cat-bar-row {
  margin-bottom: var(--space-lg);
}
.cat-bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-xs);
}
.cat-bar-value {
  font-size: var(--fs-xs);
  color: var(--df-ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cat-bar-pct {
  color: var(--df-ink-soft);
}
.cat-bar-track {
  height: 5px;
  background: var(--df-hair);
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.cat-bar-fill {
  height: 100%;
  border-radius: var(--radius-xs);
}
.cat-bar-fill.cat-food { background: var(--vn-pandan); }
.cat-bar-fill.cat-transport { background: var(--vn-sky); }
.cat-bar-fill.cat-shopping { background: var(--vn-batik); }
.cat-bar-fill.cat-hotel { background: var(--vn-indigo); }
.cat-bar-fill.cat-activity { background: var(--vn-green); }
.cat-bar-fill.cat-other { background: var(--df-ink-soft); }

.cat-attraction {
  background: var(--vn-purple-light);
  color: var(--vn-purple-text);
}

/* ==================== Expenses panel layout ====================
   The panel is three zones — standing (totals + settlement), the ledger
   (filters + entries + shared fund), and the breakdown (by category, per
   person) — laid out as one column on a phone and as a wide ledger plus a
   quiet rail from 1024px.

   What this replaced: one flat column of seven equally-weighted section
   heads, every container stretching to whatever width .app-main happened to
   give it. Above the 1024px breakpoint .app-main deliberately drops its
   680px cap so an itinerary stop row can use the width (see the Desktop
   layout block above .stat-grid) — but nothing on this panel has a second
   axis to spend it on, so an expense row measured 1588px at a 1920px
   viewport to carry a place name at one end and an amount at the other. The
   member's own balance and the settle action sat ~2000px down the page,
   below twelve entry cards, in that same stretched shape. Issue #873 gave
   this panel's own max-width: 1180px to the base .panel rule as
   var(--panel-measure). Issue #941 made full-bleed the *default* for the
   .panel layer and removed that shared token, and kept a 1180px interim
   cap on .exp-panel itself pending a real second axis — but that axis
   already existed (.exp-panel.active's ledger + sticky standing rail
   grid, below), just not checked closely enough when #941 was scoped.
   Issue #943 deletes the interim cap outright rather than replacing it:
   the ledger column (minmax(0, 720px), was minmax(0, 1fr)) now carries
   its own measure directly, so the panel needs no cap of its own — see
   that grid's comment for why the ledger content, not the panel, is what
   got capped. */

/* One spacing ladder, three rungs: zone > block > heading. Before this the
   whole panel sat on a single 1.25rem interval, so seven sections read as
   seven peers with nothing grouping any of them. */
.exp-zone {
  margin-bottom: clamp(48px, 6vw, 64px);
}
.exp-zone:last-child {
  margin-bottom: 0;
}

.exp-block + .exp-block {
  margin-top: var(--sp-2xl);
}

/* The shared .section-head carries its own top margin for the flat-column
   case; opening a block, the rung above it already separates it. */
.exp-panel .exp-zone-first-head {
  margin-top: 0;
}

.exp-count {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}

/* Heading, count and the Add control share one row: the count belongs to the
   heading (not to the far edge, which is where .section-head's own
   space-between would throw it), and the button takes the edge. */
.exp-ledger-head {
  justify-content: flex-start;
  gap: var(--sp-md);
  flex-wrap: wrap;
}
@media (max-width: 560px) {
  /* Two 174px columns can't hold a trip total — "JPY 152,380.00" at the
     primary size broke across two lines, which is the one figure on this
     screen that must read in a single glance. */
  .exp-zone-standing .stat-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Category filter chips ────────────────────────────────────
   Wraps instead of scrolling: the old .subtabs-scroll row clipped three of
   eight categories at 390px behind a gradient fade with no hit box. Outlined
   pills, per DESIGN.md's kicker-pill rule that the OUTLINE carries a chip,
   not a fill — so an inactive chip adds a keyline and no ink, and eight of
   them do not become eight blocks of colour. The active chip takes its own
   category hue, the same Category Compass as the ledger spines and the
   breakdown bars. */
.exp-filters {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  gap: var(--sp-sm);
  margin-bottom: 1rem;
  /* room for the 2px keyline + focus ring that overflow would clip */
  padding: 2px;
}
.exp-filters::-webkit-scrollbar { display: none; }

/* #2239 — Shared fund line above the ledger. */
.exp-fund-line {
  display: block;
  width: 100%;
  min-height: var(--tap-min);
  margin-bottom: var(--sp-md);
  padding: 0 var(--sp-lg);
  border: 2px solid var(--df-hair);
  border-radius: var(--radius-pill);
  background: none;
  color: var(--df-ink);
  font-family: inherit;
  font-size: var(--fs-xs);
  text-align: left;
  cursor: pointer;
}
.exp-fund-line:hover { border-color: var(--df-ink); }

.exp-filter {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  /* #2239 — full --tap-min tall now that the row scrolls sideways instead
     of wrapping: the old 34px chip + 44px ::before overlapped on wrapped rows. */
  min-height: var(--tap-min);
  /* #3795 — the Food & Drink chip measured 43px wide at 390px. */
  min-width: var(--tap-min);
  position: relative;
  flex: 0 0 auto;
  padding: 0 var(--sp-md);
  /* #2231 approved board: a solid 2px ink keyline on cut stock with the
     category icon in its own hue. The hairline + soft-ink version read as
     disabled at phone size. */
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur-feedback) var(--df-ease), color var(--dur-feedback) var(--df-ease), background var(--dur-feedback) var(--df-ease);
}
.exp-filter i { font-size: var(--fs-lg); }
.exp-filter.cmp-food:not(.active) i { color: var(--vn-pandan); }
.exp-filter.cmp-transport:not(.active) i { color: var(--vn-sky-text); }
.exp-filter.cmp-shopping:not(.active) i { color: var(--vn-batik); }
.exp-filter.cmp-hotel:not(.active) i { color: var(--vn-indigo-text); }
.exp-filter.cmp-activity:not(.active) i { color: var(--vn-green); }

.exp-filter:hover {
  background: var(--df-chip-fill-hover);
}

.exp-filter-count {
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-sm);
}

.exp-filter.active {
  border-color: var(--selected-bg);
  background: var(--selected-bg);
  color: var(--on-selected);
}

.exp-filter.cmp-food.active {
  background: var(--vn-pandan-light);
  border-color: var(--vn-pandan);
  color: var(--vn-pandan);
}
.exp-filter.cmp-transport.active {
  background: var(--vn-sky-light);
  border-color: var(--vn-sky);
  color: var(--vn-sky-text);
}
.exp-filter.cmp-shopping.active {
  background: var(--vn-batik-light);
  border-color: var(--vn-batik);
  color: var(--vn-batik);
}
.exp-filter.cmp-hotel.active {
  background: var(--vn-indigo-light);
  border-color: var(--vn-indigo);
  color: var(--vn-indigo-text);
}
.exp-filter.cmp-activity.active {
  background: var(--vn-green-light);
  border-color: var(--vn-green);
  color: var(--vn-green);
}

/* ── Breakdown disclosures ────────────────────────────────────
   Both blocks are analysis nobody opens this tab to read, and on a phone
   they were ~400px of always-rendered chart below the ledger. Same animated
   grid-template-rows 0fr<->1fr collapse as .exp-card-details — see that
   block's comment for why the inner wrapper must carry no padding. */
.exp-disclosures {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  overflow: hidden;
}

.exp-disclosure + .exp-disclosure {
  border-top: 2px dashed var(--df-hair);
}

.exp-disclosure-head {
  width: 100%;
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-md) var(--sp-lg);
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.exp-disclosure-head:hover {
  background: var(--df-chip-fill);
}

.exp-disclosure-title {
  flex: 1;
  font-family: var(--df-display);
  font-size: var(--fs-md);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--df-ink);
}

.exp-disclosure-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-view) var(--ease-move);
}

.exp-disclosure.open .exp-disclosure-body {
  grid-template-rows: 1fr;
}

.exp-disclosure-inner {
  overflow: hidden;
  min-height: 0;
}

.exp-disclosure-inner > * {
  margin: 0 var(--sp-lg) var(--sp-lg);
}

.exp-list-more {
  margin-top: var(--sp-sm);
}

.exp-pot-section:not(:empty) {
  margin-top: var(--sp-2xl);
}

/* #2237 — the Entries | Balances | Shared fund switch. Below 1024px only the
   chosen view's blocks show (the panel carries data-exp-view); at 1024px and
   up the two-column layout shows every block and the switch goes away. */
.exp-view-badge {
  display: inline-block;
  min-width: 1.25em;
  padding: 0 0.4em;
  margin-left: var(--sp-xs);
  border-radius: 999px;
  background: var(--df-ink);
  color: var(--df-panel);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}
/* #2231 approved board: a full-width pill track with a 2px keyline; the
   chosen view is a solid ink pill. The buttons carry aria-pressed, not the
   shared toggle's .active class, so the pressed state is styled off that. */
.exp-view-switch {
  width: 100%;
  box-sizing: border-box;
  gap: 2px;
  padding: 4px;
  border: 2px solid var(--df-ink);
  background: var(--df-panel);
}
.exp-view-switch .itin-view-toggle-btn {
  flex: 1;
  min-height: var(--tap-min);
  padding: 0 var(--sp-sm);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--df-ink);
  font-size: var(--fs-md);
  font-weight: 600;
  white-space: nowrap;
}
.exp-view-switch .itin-view-toggle-btn + .itin-view-toggle-btn { border-left: 0; }
.exp-view-switch .itin-view-toggle-btn[aria-pressed="true"] {
  background: var(--df-ink);
  color: var(--df-panel);
}
/* #4691 — the badge is ink, so inside the pressed ink pill it inverts. */
.exp-view-switch .itin-view-toggle-btn[aria-pressed="true"] .exp-view-badge {
  background: var(--df-panel);
  color: var(--df-ink);
}
@media (max-width: 1023px) {
  .exp-panel[data-exp-view="entries"] [data-exp-view="balances"],
  .exp-panel[data-exp-view="entries"] [data-exp-view="fund"],
  .exp-panel[data-exp-view="balances"] [data-exp-view="entries"],
  .exp-panel[data-exp-view="balances"] [data-exp-view="fund"],
  .exp-panel[data-exp-view="fund"] [data-exp-view="entries"],
  .exp-panel[data-exp-view="fund"] [data-exp-view="balances"] {
    display: none;
  }
}
@media (min-width: 1024px) {
  /* #2244 — the right column switches Balances | Shared fund, and, since #3203,
     always. Entries is not an option
     here: the ledger is always on screen, so that button goes. */
  .exp-view-switch [data-exp-view-btn="entries"] { display: none; }
  .exp-panel[data-exp-view="fund"] #exp-balances-block { display: none; }
  .exp-panel:not([data-exp-view="fund"]) .exp-zone-fund { display: none; }
  /* #4607 — on the Pot view the left column is the ledger alone (FundW4);
     Per person belongs to Balances. */
  .exp-panel[data-exp-view="fund"] .exp-zone-breakdown { display: none; }
}

/* ==================== Shared fund view (#2244) ====================
   Departure Fever: panel stock, 2px ink keylines, hard offset shadow. No
   hairlines — every divider is a 2px ink keyline. */
.fund-card {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  padding: var(--sp-lg);
  margin-bottom: var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}
.fund-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fund-left-label {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--df-ink-soft);
}
.fund-left-amount {
  font-family: var(--df-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--df-ink);
}
.fund-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}
.fund-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}
.fund-stats > div,
.fund-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-sm);
}
.fund-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}
.fund-row {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}
.fund-row-end {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
}
.fund-muted { color: var(--df-ink-soft); }
.fund-edit-btn {
  font-size: var(--fs-xs);
  padding: 2px var(--sp-sm);
}
.fund-section {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  padding-top: var(--sp-md);
  border-top: 2px solid var(--df-ink);
}
.fund-actions,
.fund-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-sm);
}
.fund-form-label {
  width: 100%;
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}
.fund-link-btn {
  align-self: flex-start;
  min-height: var(--tap-min);
  padding: 0;
  border: none;
  background: none;
  color: var(--df-ink);
  font: inherit;
  font-size: var(--fs-xs);
  text-decoration: underline;
  cursor: pointer;
}

@media (min-width: 1024px) {
  /* Side by side rather than stacked: neither block wants the full column
     (a 5px category bar does not get better at 714px), and the two answer
     the same question from opposite ends — by what, and by whom.
     Both also DEFAULT to open here — the disclosure exists because a phone
     cannot afford ~400px of chart below the ledger, and this column has the
     room. That default is set in JS (syncExpBreakdownDefaults(),
     js/expenses.js), not forced by CSS: a rule that painted a closed section
     open would leave aria-expanded lying about what is on screen. */
  .exp-disclosures {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--sp-2xl);
    align-items: start;
    background: none;
    border: none;
    box-shadow: none;
    overflow: visible;
  }
  .exp-disclosure {
    background: var(--df-panel);
    border: 2px solid var(--df-ink);
    border-radius: var(--df-radius-card);
    overflow: hidden;
  }
  .exp-disclosure + .exp-disclosure {
    border-top: var(--edge-hairline);
  }
}
@media (min-width: 1280px) {
  /* The long content — the entry ledger, then the breakdown under it — takes
     the wide column; the standing zone is a draggable rail that sticks to the
     top of the scroll, like Itinerary's Ideas column (#3978;
     js/pane-resizer.js owns --expenses-pane-width). Standing is deliberately
     the SHORT column: it is the one thing worth keeping on screen while the
     ledger is scanned. From 1024 to 1279px the zones stack in DOM order, one
     column. .active is in the selector because .panel.active's own
     `display: block` is more specific than a bare .exp-panel — the panel must
     stay display:none while another tab is showing. The ledger track fills
     (#3978 replaces #943's 720px cap): the handle column is the only gutter. */
  .exp-panel.active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 6px minmax(260px, var(--expenses-pane-width));
    column-gap: 0;
    align-items: start;
  }
  .exp-zone-ledger {
    grid-column: 1;
    grid-row: 1;
  }
  .exp-zone-breakdown {
    /* Under the ledger, never under the rail. */
    grid-column: 1;
    grid-row: 3;
    margin-bottom: 0;
  }
  /* #4159 — spans the flexible last row too, so its 100vh-100px handle height can't inflate the title row and ledger row.
     #4427 — handle and rail start on row 2, level with the first block under the title, as on every rail tab. */
  .exp-panel > .pane-resizer { grid-column: 2; grid-row: 2 / -1; }
  .exp-zone-standing {
    grid-column: 3;
    grid-row: 2 / -1;
    position: sticky;
    top: var(--rail-top);
    max-height: calc(100vh - var(--rail-top) - var(--sp-lg));
    overflow-y: auto;
    /* Room for the cards' 4px hard offset shadow inside the scroll box. */
    padding: 0 var(--sp-xs) var(--sp-xs) 0;
    margin-bottom: 0;
  }
  /* Stacked, the trip total gets the full rail width and becomes the
     screen's one loud element. */
  .exp-zone-standing .stat-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-sm);
  }
}

/* ==================== Expense List ==================== */
.expense-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

/* The ledger is ONE sheet, not one card per entry. Every expense used to
   carry its own 2px keyline and 4px hard offset shadow — the same chrome
   .stat-card, .settle-row and .balance-card wear — so forty entries painted
   forty identical objects and nothing on the screen could recede. The sheet
   keeps the keyline and the shadow once, at its own edge, and separates
   entries with the 2px dashed perforation DESIGN.md specifies for a torn
   stub: this screen is a receipt, and it never spent that vocabulary. */
.exp-sheet {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  overflow: hidden;
}

/* A day rule replaces the day badge that used to repeat on every card:
   struck across the sheet in the label voice, carrying that
   day's own subtotal. Ground-tinted rather than filled, so it separates
   without becoming a third kind of object. */
.exp-day-rule {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px var(--sp-md);
  padding: var(--sp-sm) var(--sp-lg);
  background: var(--df-chip-fill);
  border-bottom: 2px solid var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.exp-entry + .exp-day-rule {
  border-top: 2px solid var(--df-ink);
}
.exp-day-rule-label {
  font-weight: 600;
  color: var(--df-ink);
  /* "Day 2: 11 Mar 2026" breaking after "Mar" reads as two days. A
     multi-currency day's totals may take the second line instead. */
  white-space: nowrap;
}
.exp-day-rule-count {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  text-transform: none;
  letter-spacing: normal;
  color: var(--df-ink-soft);
}
.exp-day-rule-total {
  margin-left: auto;
  font-weight: 400;
  color: var(--df-ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* An entry inside the sheet. No border, no radius, no shadow of its own —
   the perforation and the category spine are the whole treatment. */
.exp-entry + .exp-entry {
  border-top: 2px dashed var(--df-hair);
}
.exp-entry {
  transition: background var(--dur-feedback) var(--df-ease);
  /* #6567 — rows below the fold skip layout and paint until scrolled near. */
  content-visibility: auto;
  contain-intrinsic-size: auto 76px;
}

/* The row's category meta, in the label voice. Replaces a colour pill, a
   pot badge and a day badge with one line; the hue moves to the spine. */
.exp-entry-meta {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--df-ink-soft);
  margin-top: var(--sp-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exp-card-header {
  display: flex;
  align-items: stretch;
}

/* The card's open/close control — was the whole .expense-item <div>'s
   onclick; now a real <button> so it's keyboard-reachable and its
   aria-expanded state is announced. Edit sits as a sibling, never nested
   inside it (see renderExpenses()'s comment). */
.exp-card-toggle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-md) var(--sp-lg);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.exp-card-toggle:hover {
  background: var(--df-hair);
}

/* Edit moved off the row and into the expanded detail (renderExpenses()):
   it was ~70px of permanently-visible chrome on every entry — a second
   outlined control per row, competing with the row's own amount and
   squeezing the name and meta line into a truncation at 390px — next to a
   Delete that already only appeared inside the fold. */
.exp-detail-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-sm);
  border-bottom: none;
  padding-top: var(--sp-md);
}

.exp-card-left {
  flex: 1;
  min-width: 0;
}

.exp-card-right {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-shrink: 0;
  text-align: right;
}

/* Category, pot flag and day sit on one metadata line above the name rather
   than bracketing it top and bottom. Same three fields, two lines instead of
   three, and the day badge is no longer read as a caption belonging to the
   name it sat under. */
.exp-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-xs);
}

.exp-cat-badge {
  display: inline-block;
}

.exp-day-badge {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  background: var(--df-ground);
  border-radius: var(--radius-stub);
  padding: 1px var(--sp-sm);
  display: inline-block;
}

.exp-chevron {
  font-size: var(--fs-sm);
  color: var(--df-ink-soft);
  transition: transform var(--dur-state) var(--ease-move);
  flex-shrink: 0;
}

.exp-chevron.rotated {
  transform: rotate(180deg);
}

/* #2235/#2319 — TREAT stamp: the kit's .xk-treat (24px, coral, -8deg). The
   strike plays once, on the treat action only (.is-striking, set by
   treatExpense() for that one render); a stamp already on the row just sits. */
.treat-stamp { pointer-events: none; }
.exp-card-toggle { position: relative; }
.exp-card-right { position: relative; }
/* #3301 — the stamp is a flex item of the amount group, before the amount, so
   no row text sits under it; the title column shrinks and ellipsises instead. */
.treat-stamp-row {
  flex-shrink: 0;
  white-space: nowrap;
}
.exp-card-left.has-treat-stamp { min-width: 0; }
.exp-card-left.has-treat-stamp .expense-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-card-left.has-treat-stamp .exp-entry-meta { overflow-wrap: anywhere; } /* wrap, so the full "TREATED BY SITI" shows */
.treat-stamp.is-striking { /* stays at --dur-state: a small inline tag, not a full stamp strike */ animation: treat-strike var(--dur-state) var(--ease-out) both; }
@keyframes treat-strike {
  from { transform: rotate(-8deg) scale(1.6); opacity: 0; }
  to   { transform: rotate(-8deg) scale(1); opacity: 1; }
}

/* Detail sheet */
.exp-sheet-head { display: flex; align-items: center; gap: var(--sp-md); margin-bottom: var(--sp-md); }
.exp-sheet-icon { font-size: var(--fs-lg); color: var(--df-ink-soft); }
.exp-sheet-sub { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.exp-sheet-amount {
  font-size: var(--fs-display-32, 2rem);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}
.exp-sheet-paid { color: var(--df-ink-soft); margin-bottom: var(--sp-md); }
.exp-sheet-label {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--df-ink-soft);
  margin: var(--sp-md) 0 var(--sp-sm);
}
.exp-sheet-split { list-style: none; margin: 0; padding: 0; }
.exp-sheet-split li {
  display: flex;
  justify-content: space-between;
  padding: var(--sp-sm) 0;
  border-bottom: 2px dashed var(--df-hair);
}
.exp-sheet-notes { font-style: italic; }
.exp-sheet-items { margin-top: var(--sp-sm); }
.exp-sheet-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin-top: var(--sp-md);
}
.exp-sheet-actions .stop-edit-btn,
.exp-sheet-actions .btn-small,
.exp-sheet-more summary { min-height: var(--tap-min); min-width: var(--tap-min); }
.exp-sheet-more summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  list-style: none;
  font-size: var(--fs-md);
}
.exp-sheet-more[open] { display: flex; flex-wrap: wrap; gap: var(--sp-sm); align-items: center; }

/* Issue: card expand/collapse was an instant style.display flip — the most-
   used interaction on the screen was the only one with no motion at all,
   and every card below it jumped. A grid-template-rows 0fr<->1fr transition
   animates the height without needing to know the content's real height in
   JS. The inner wrapper carries the visual chrome (border/background/
   padding) and min-height:0 so it can actually collapse to zero instead of
   enforcing its own content height on the 0fr track. */
.exp-card-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-view) var(--ease-move);
}

.exp-card-details.open {
  grid-template-rows: 1fr;
}

/* ⚠️ The clipper must carry no padding of its own. `overflow: hidden` clips
   at the PADDING box, not the content box — so with the 0fr track holding
   the content box at zero height, the 8px + 12px of vertical padding this
   rule used to declare stayed as a 20px window that a collapsed card's first
   detail row ("Paid by …") was plainly readable through. Every collapsed
   card on the tab showed a clipped strip of its own hidden content. The
   chrome (keyline, ground, padding) lives on the body wrapper inside. */
.exp-card-details-inner {
  overflow: hidden;
  min-height: 0;
}

.exp-card-details-body {
  border-top: 2px solid var(--df-hair);
  background: var(--df-ground);
  padding: var(--sp-sm) var(--sp-lg) var(--sp-md);
}

/* Issue #473 PR7a — progressive field disclosure inside a form (the Add
   Transport modal is the first user of this; a fresh, form-scoped class
   rather than reusing .exp-card-details, which is specifically an expense
   card's own display chrome). Same animated grid-template-rows 0fr<->1fr
   collapse as .exp-card-details above — see that block's comment for why. */
.form-more-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  min-height: var(--tap-min);
  background: none;
  border: none;
  padding: var(--space-md) 0;
  margin-bottom: var(--space-sm);
  font: inherit;
  font-weight: 600;
  color: var(--vn-trail-green);
  cursor: pointer;
  text-align: left;
}
.form-more-chevron {
  transition: transform var(--dur-state) var(--ease-move);
}
.form-more-toggle[aria-expanded="true"] .form-more-chevron {
  transform: rotate(180deg);
}
.form-more-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-view) var(--ease-move);
}
.form-more-details.open {
  grid-template-rows: 1fr;
}
.form-more-details-inner {
  overflow: hidden;
  min-height: 0;
}

.exp-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: var(--fs-xs);
  padding: var(--sp-sm) 0;
  border-bottom: 2px solid var(--df-hair);
  gap: var(--sp-md);
}

.exp-detail-row:last-child {
  border-bottom: none;
}

.exp-detail-row > span:first-child {
  color: var(--df-ink-soft);
  flex-shrink: 0;
}

.exp-detail-val {
  text-align: right;
  color: var(--df-ink-soft);
}

/* Issue: Delete used to sit in the always-visible card header, 8px from
   Edit, inside a card whose entire body is itself a click target — a
   mis-tap destroyed an expense behind nothing but a native confirm(). Moved
   into the expanded detail region as a clearly labeled (not icon-only)
   action, reachable only once a card is deliberately opened. */
.exp-delete-link {
  color: var(--danger-text);
  border-color: var(--danger);
}
.exp-delete-link:hover {
  background: var(--danger-light);
}

/* Category Compass — every category owns the same hue here as its .cat-pill
   badge and its subtabs filter chip below, extended to all six (previously
   only food/transport/shopping had a stripe at all, and transport's used
   the wrong hue — .expense-item.transport keyed off `type`, a 3-bucket
   field that never actually holds 'transport'; the class was dead). */
/* The stripe itself is the kit's inset .xk-row-spine now (--xk-spine, set per
   category further down); a border-left here drew a second one (#2326). */

.expense-name {
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--df-ink);
}

.expense-meta {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin-top: var(--space-2xs);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.expense-amount {
  font-size: var(--fs-md);
  font-weight: 400;
  color: var(--df-ink);
  text-align: right;
}

.expense-per {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  text-align: right;
}

.expense-pax {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}

/* ==================== Balance ==================== */
.balance-card {
  padding: var(--space-2xl) var(--space-3xl);
}
.balance-card + .balance-card { border-top: var(--edge-hairline); }

.balance-name {
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--df-ink);
  margin-bottom: var(--space-sm);
}

.top-payer-badge {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--df-ink);
  white-space: nowrap;
}

.balance-figures {
  display: flex;
  gap: var(--space-3xl);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin-bottom: var(--space-sm);
}
.balance-figures strong {
  color: var(--df-ink);
  font-weight: 600;
}

.balance-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* Settlements are one sheet too, for the same reason the ledger is: three
   free-standing cards stacked above the entries pushed the ledger most of a
   screen down on a phone, and each one repeated the panel's own chrome. */
.settle-sheet {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  overflow: hidden;
}

.settle-row {
  padding: var(--sp-md) var(--sp-lg);
}

.settle-row + .settle-row {
  border-top: var(--edge-hairline);
}

/* The sentence and the amount share a line. Apart they cost two lines per
   row for one fact, and the amount — set at --fs-2xl in the display face —
   became a second shout on a screen that already has one in the trip total. */
.settle-row-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

.settle-row-top {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--fs-sm);
  margin: var(--sp-sm) 0;
}

/* Single-column settlement amount + sentence wording — replaces the old
   rigid one-line layout (names + arrow + two currencies) that wrapped
   awkwardly on narrow screens. */
.settle-sentence {
  font-size: var(--fs-sm);
  color: var(--df-ink);
  line-height: 1.4;
}
.settle-amount {
  font-family: var(--df-display);
  /* Was --fs-2xl. One shout per screen (DESIGN.md): the trip total in the
     standing stub is this tab's, and three settlement amounts at 22px in the
     display face were competing with it from directly above. Still the
     display face and still direction-coloured — just no longer louder than
     everything around it. */
  font-size: var(--fs-md);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--df-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Issue: this used to be a flat, unconditional --vn-coral (the "warning"
   hue) for every row — being owed money read identically to owing it. Now
   colored by the viewer's own direction, matching the .owes-pos/.owes-neg
   convention already used in the Per-person cards above. A third-party row
   (neither .settle-amount-owe nor -owed) stays neutral ink. */
.settle-amount-owe,
.settle-amount-owed {
  color: var(--df-ink);
  font-variant-numeric: tabular-nums;
}

/* #6836 — calm money. Direction is a word and an arrow in the soft ink tier,
   never a colour; a settled balance wears the Success mark. */
.money-dir { color: var(--df-ink-soft); white-space: nowrap; }
.money-dir .exp-strong { color: var(--df-ink); }
.money-fig { color: var(--df-ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.money-settled { color: var(--df-ink-soft); white-space: nowrap; }
.money-settled .ti { color: var(--vn-trail-green); }
/* Balances: one container, a 2px keyline around the list, hairlines between rows. */
.money-list {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  overflow: hidden;
}

.settle-currency-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  min-height: var(--tap-min);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  padding: var(--sp-xs) var(--sp-md);
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--df-ink-soft);
  cursor: pointer;
  font-family: inherit;
  transition: background var(--dur-feedback) var(--ease-out), color var(--dur-feedback) var(--ease-out), border-color var(--dur-feedback) var(--ease-out);
}
.settle-currency-toggle:hover {
  background: var(--success-light);
  border-color: var(--df-brand);
  color: var(--df-brand);
}

/* ==================== Check List ==================== */
/* Issue #941 — the Check List tab's second axis. Single column below 1280px
   (1024–1279px too, #3981: .app-main is a narrow strip there and the founder
   set Itinerary's BP_IDEAS_COLUMN as the one breakpoint for every tab). From
   1280px the suggestions are a draggable rail like Itinerary's Ideas column
   (js/pane-resizer.js owns --checklist-pane-width): the list fills, the 6px
   handle column is the only gutter. minmax(0, 1fr) so a long item name can't
   stretch the track. */
.checklist-columns {
  display: flex;
  flex-direction: column;
}
@media (min-width: 1280px) {
  .checklist-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 6px minmax(260px, var(--checklist-pane-width));
    column-gap: 0;
    align-items: start;
  }
  .checklist-columns > .checklist-col:first-child { grid-column: 1; }
  .checklist-columns > .pane-resizer { grid-column: 2; }
  .checklist-rail {
    grid-column: 3;
    position: sticky;
    top: var(--rail-top);
    max-height: calc(100vh - var(--rail-top) - var(--space-3xl));
    overflow-y: auto;
    /* Room for the cards' hard offset shadow inside the scroll box. */
    padding: 0 var(--space-xs) var(--space-xs) 0;
    /* #4425 — same overhang as .budget-layout-rail: keeps the rail at 80px at the end of the page. */
    margin-bottom: calc(-1 * var(--rail-top));
  }
}
/* Check List redesign W1 (#2826) — header, headline, ticket-stub tabs,
   Personal | Group and Filter. Departure Fever tokens only. */
.checklist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
/* #3947 — every trip tab's page title: display 800, sentence case, one size
   ramp (DESIGN.md, "Trip view chrome"). .app prefix outranks the per-panel
   .section-head h3 label recipe. */
.app .trip-page-title {
  margin: 0;
  font-family: var(--df-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--df-ink);
}
@media (min-width: 1024px) {
  .app .trip-page-title { font-size: var(--fs-2xl); }
}
/* Bookings keeps its own spacing: the phone title's gap above the list, and the
   desktop title's auto right margin that keeps it left of the Add pill. */
.app .bk-title-phone.trip-page-title { margin-bottom: var(--sp-md); }
.app .bk-title.trip-page-title { margin-right: auto; }
.checklist-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-2xl);
  margin-bottom: var(--space-xl);
  background: var(--df-ink);
  color: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
}
.checklist-headline[hidden] { display: none; }
.checklist-headline-num {
  font-family: var(--df-display);
  font-size: var(--fs-display-32);
  font-weight: 800;
  line-height: 1;
}
.checklist-headline-text {
  font-family: var(--df-display);
  font-size: var(--fs-md, 1.125rem);
  font-weight: 600;
}
.checklist-headline-carry {
  flex: 0 0 100%;
  padding-top: var(--space-md);
  border-top: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  font-size: var(--fs-xs, 0.875rem);
  opacity: 0.85;
}
.checklist-stubs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.checklist-stub {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  min-height: var(--tap-min);
  padding: 0;
  text-align: left;
  font-family: inherit;
  color: var(--df-ink);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  box-shadow: var(--df-press);
  cursor: pointer;
}
.checklist-stub.sel {
  background: var(--selected-bg);
  color: var(--on-selected);
}
.checklist-stub-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-lg);
  min-width: 0;
}
.checklist-stub-title {
  font-family: var(--df-display);
  font-weight: 600;
  line-height: 1.15;
}
.checklist-stub-sub {
  font-size: var(--fs-xs);
  opacity: 0.8;
}
/* The tear: a dashed edge with a notch at each end, the stub's own signature. */
.checklist-stub-count {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  border-left: 2px dashed currentColor;
  font-family: var(--df-sans);
}
.checklist-stub-num {
  font-family: var(--df-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  line-height: 1;
}
.checklist-stub-unit {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
}
.checklist-stub-none {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
}
.checklist-stub-count::before,
.checklist-stub-count::after {
  content: '';
  position: absolute;
  left: -7px;
  width: 12px;
  height: 12px;
  background: var(--df-ground);
  border: 2px solid var(--df-ink);
  border-radius: 50%;
}
.checklist-stub-count::before { top: -8px; }
.checklist-stub-count::after { bottom: -8px; }
.checklist-controls {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.checklist-seg {
  display: flex;
  gap: var(--space-xl);
}
.checklist-seg-btn {
  min-height: var(--tap-min);
  padding: 0 var(--space-xs);
  font: inherit;
  font-weight: 600;
  color: var(--df-ink-soft);
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}
.checklist-seg-btn.sel {
  /* #6634: the shared selected ink fill, not a green underline. */
  padding: 0 var(--space-xl);
  border-radius: var(--radius-pill);
  border-bottom-color: transparent;
  background: var(--selected-bg);
  color: var(--on-selected);
}
.checklist-filter { position: relative; }
/* Issue 3103 / 3303: Group | Personal on Entries; the pill switch (.xk-seg) the app uses. */
.exp-mode-seg { margin-bottom: var(--sp-sm); }
.checklist-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--tap-min);
  padding: 0 var(--space-xl);
  font: inherit;
  font-weight: 600;
  color: var(--df-panel);
  background: var(--df-ink);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
/* #3831: the dark pill's open state — a brand ring, since the fill can't change. */
.checklist-filter-btn[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--df-brand); }
.checklist-filter-badge {
  min-width: 1.25rem;
  padding: 0 var(--space-xs);
  font-size: var(--fs-xs);
  text-align: center;
  color: var(--df-brand-fg);
  background: var(--df-brand);
  border-radius: var(--radius-pill);
}
.checklist-filter-menu {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-sm));
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  min-width: 240px;
  padding: var(--space-xl);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
}
.checklist-filter-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.checklist-filter-seg {
  display: flex;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.checklist-filter-seg button {
  flex: 1;
  min-height: var(--tap-min);
  font: inherit;
  color: var(--df-ink);
  background: var(--df-panel);
  border: 0;
  cursor: pointer;
}
.checklist-filter-seg button + button { border-left: 2px solid var(--df-ink); }
.checklist-filter-seg button.sel {
  color: var(--df-panel);
  background: var(--df-ink);
}
.checklist-filter-check {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: var(--tap-min);
  cursor: pointer;
}
.checklist-filter-clear {
  min-height: var(--tap-min);
  font: inherit;
  font-weight: 600;
  color: var(--df-brand);
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.checklist-nudge-btn {
  min-height: var(--tap-min);
}
.checklist-nudge-done {
  font-size: var(--fs-sm);
  color: var(--text-secondary, inherit);
}

.checklist-item-row {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  padding: var(--space-lg) var(--space-2xl);
  margin-bottom: var(--space-md);
}
.checklist-item-top {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.checklist-item-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--df-ink);
}
/* #2362 — a flight's check-in item: the name opens the flight. */
button.checklist-item-link {
  background: none; border: 0; padding: 0; font: inherit; color: inherit;
  text-align: left; cursor: pointer; text-decoration: underline;
  min-height: var(--tap-min);
}
.checklist-item-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-left: auto;
}

/* Check List row ⋯ menu (#3672, §6.6). One native <details> per row holds Edit,
   Delete, "Find it online" (#727) and Log price (#935); Add booking stays visible.
   Native disclosure, no JS positioning: the list is not a scroll container. */
.cl-row-menu { position: relative; flex: none; }
.cl-row-more {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--tap-min); min-height: var(--tap-min);
  color: var(--df-ink); cursor: pointer; list-style: none;
}
.cl-row-more::-webkit-details-marker { display: none; }
.cl-row-more:focus-visible { outline: 3px solid var(--df-brand); outline-offset: -3px; }
.cl-row-menu-list {
  position: absolute; right: 0; top: calc(100% + var(--space-2xs)); z-index: 5;
  display: flex; flex-direction: column; min-width: 160px;
  background: var(--df-panel); border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
}
.cl-row-menu-list button {
  display: flex; align-items: center; gap: var(--space-xs);
  min-height: var(--tap-min); padding: 0 var(--space-md);
  border: none; background: transparent; color: var(--df-ink);
  text-align: left; font: inherit; font-size: var(--fs-xs); cursor: pointer;
}
.cl-row-menu-list button:hover,
.cl-row-menu-list button:focus-visible { background: var(--df-ground); }
.cl-row-menu-group { display: flex; flex-direction: column; }
.cl-row-menu-label {
  padding: var(--space-xs) var(--space-md) 0;
  font-size: var(--fs-xs); color: var(--df-ink-soft);
}

/* Issue #70 — lightweight reassign picker */
.checklist-reassign-select {
  /* No own font-size (issue #446) — inherits the shared input/select/
     textarea rule so the @media (max-width: 680px) 16px bump isn't beaten,
     which was re-triggering the iOS Safari auto-zoom-on-focus bug. */
  padding: 0 var(--space-xs);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: var(--df-panel);
  color: var(--df-ink);
}

.checklist-suggestion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  background: var(--df-panel);
  border: 2px dashed var(--df-hair);
  border-radius: var(--df-radius-card);
  padding: var(--space-lg) var(--space-2xl);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}
.checklist-suggestion-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
  min-width: 0;
}
/* Board 01 (D42c): the name sits on its own line, the kind tag and the suggester's avatar under it. */
.checklist-suggestion-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.settle-row-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

.settle-action-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  min-height: var(--tap-min);
  background: var(--df-brand);
  color: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  padding: var(--sp-sm) var(--sp-md);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  --press-bw: 2px;
  transition: transform var(--dur-feedback) var(--df-ease);
}
.settle-action-btn:hover { transform: translate(2px, 2px); }
.settle-action-btn:active { transform: translate(4px, 4px); }

.settle-confirm-btn {
  background: var(--df-brand);
}

.settle-link-btn {
  background: none;
  border: 2px solid var(--df-ink);
  color: var(--df-ink-soft);
  border-radius: var(--radius-pill);
  padding: var(--sp-sm) var(--sp-md);
  min-height: var(--tap-min);
  font-size: var(--fs-xs);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
}

.settle-receipt-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  font-size: var(--fs-xs);
  color: var(--df-brand);
  text-decoration: none;
}

.settle-status {
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: var(--sp-xs) var(--sp-md);
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
}

.settle-status-pending {
  background: var(--df-panel);
  /* Was --text-muted (4.9:1 on --surface-1) — technically AA but the
     lowest-contrast text on the screen, on a status indicator that should
     read at a glance; --text-secondary gives real headroom. */
  color: var(--df-ink-soft);
}

.settle-status-verifying {
  background: var(--info-light);
  color: var(--info);
}

.settle-status-confirmed {
  background: var(--success-light);
  color: var(--df-brand);
}

.settle-status-note {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}

.settle-history {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin-top: var(--sp-sm);
  padding-top: var(--sp-sm);
  border-top: 2px dashed var(--df-hair);
}

/* .balance-bar-bg / .balance-bar-fill were removed here: nothing in js/,
   index.html or admin.html has referenced either class for the whole of this
   repo's history, so the rules only cost bytes. They also carried the third
   of the three layout-property transitions the detector flags. */

.balance-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}

.owes-badge {
  font-size: var(--fs-xs);
  padding: var(--space-xs) var(--space-lg);
  border-radius: var(--radius-pill);
  font-weight: 400;
}

.owes-pos,
.owes-neg {
  background: none;
  color: var(--df-ink);
  padding: 0;
  font-variant-numeric: tabular-nums;
}

.owes-zero {
  background: var(--df-panel);
  color: var(--df-ink-soft);
}

/* ==================== Settings Tab ==================== */
/* .settings-section / its h4 outlive the Settings panel's own restructure:
   the profile modal's account danger zone (index.html) still uses them, and
   that modal is a different, still-unconverted surface. The panel's own
   layout is the "Settings panel layout" block below. */
.settings-section {
  margin-bottom: 1.5rem;
}

.settings-section h4 {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--df-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

/* ==================== Settings panel layout ====================
   Issue #680 split the panel into sub-tabs — General, AI, Currency &
   Expenses, Sharing, Data (AI split out of General as a #680 follow-up) —
   with only one visible at a time (showSettingsSubtab(), js/settings.js),
   instead of the four zones that
   used to render as one long stacked scroll (see docs/architecture-notes.md
   for the full history). The stub (this trip's own identity + code) now
   renders inline at the top of the General sub-panel; the two-column
   "settings column beside a sticky stub rail" layout that used to live here
   at 1024px+ retired along with it — a rail can't also be one of four
   sub-tabs.

   Before the zones (which this in turn replaced): one flat column of three
   group titles over eleven equally-weighted sections, every container
   stretching to whatever width .app-main happened to give it. Above 1024px
   .app-main deliberately drops its 680px cap so an itinerary stop row can
   use the width (see the Desktop layout block above .stat-grid) — but
   nothing on this panel had a second axis to spend it on, so a three-option
   radio group measured 1140px at a 1440px viewport and 1620px at 1920px.
   The trip code, the one value here anybody ever transcribes to another
   person, was the fourth unstyled line of the first card; Delete Trip, the
   most destructive control in the app, was the largest and most saturated
   object on the screen at a full-bleed 1140px. Issue #873 gave this panel's
   own max-width: 1180px to the base .panel rule as var(--panel-measure).
   Issue #941 made full-bleed the *default* for the .panel layer and kept
   a 1180px interim cap on .set-panel itself (shared by #panel-people and
   #panel-settings), on the assumption neither panel had a real second
   axis yet — but both already did (.set-blocks and .set-stub-body's own
   auto-fit grids below, .people-top-grid further down), just not checked
   closely enough when #941 was scoped. Issue #943 deletes the interim cap
   outright: those grids' own containers now carry their own measures
   directly (see each one's comment), so the panel needs no cap of its
   own. */

/* Blocks pair up wherever two fit. auto-fit rather than a fixed column count
   because this same grid runs at several different widths — the full phone
   column, the 680px cap, and the desktop panel above 1024px — and the
   answer at each is just "as many 280px columns as fit".
   Issue #943 — max-width added. auto-fit's minmax(280px, 1fr) caps a
   column's *floor*, not its ceiling: with only 1-2 real blocks in a given
   sub-tab (AI has one; Sharing has two) and no ceiling, auto-fit collapses
   unused tracks away entirely and stretches the ones that remain to fill
   whatever the container measures — a lone AI block would take the full
   panel width on a wide monitor, a plain radio-group card blown up to
   1500px+. 900px keeps two or three 280px+ columns close to their natural
   size regardless of how much wider the panel around them gets; any
   remaining width just sits outside the grid, not inside a stretched
   block. */
.set-blocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-2xl);
  align-items: start;
  max-width: 900px;
}

/* A list of people, or a row of per-member actions, is the one shape here
   that genuinely wants the whole column. */
.set-block-wide {
  grid-column: 1 / -1;
}

/* Quiet, because it labels rather than announces — the tier above it does
   the announcing. Matches .settings-section-title exactly, which is what the
   shared join-approval and visibility controls emit as their own heading
   (js/members.js, js/settings.js), so a block heading reads the same however
   it was authored. */
.set-block-title,
.set-block .settings-section-title {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--df-ink-soft);
  margin: 0 0 var(--sp-xs);
}

/* Marks the seam between the People tab's roster/permissions zone and its
   Ratings zone (design critique 2026-08-22 — layout: the two used to meet
   as a heading with more top margin, which read as one panel accidentally
   bordering another rather than a considered move to a different
   register). --df-hair, not the loud 2px ink keyline every card already
   carries — a full band border here would compete with the member cards
   sitting right above it. */
.set-panel-divider {
  border: none;
  border-top: 2px solid var(--df-hair);
  margin: var(--sp-2xl) 0 0;
}

.set-block-hint {
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--df-ink-soft);
  margin: 0 0 var(--sp-md);
  max-width: 58ch;
}

/* The stub's field names are captions (#6716, the One Label Rule): the block
   title is the stub's one label. */
.set-label {
  display: block;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--df-ink-soft);
  margin-bottom: var(--sp-xs);
}

/* A control and the value it resolves to, on one line — the home-currency
   picker and the code it currently means. */
.set-field-row {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
}
.set-field-row select,
.set-field-row input {
  flex: 1 1 180px;
  min-width: 0;
}
.set-field-suffix {
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--df-ink);
  white-space: nowrap;
}

/* Actions sit at their natural width. Every button on this panel used to
   carry an inline width:100%, which at 1140px turned a two-word label into a
   bar — and made the destructive ones the loudest things on the screen. */
.set-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
  margin-top: var(--sp-sm);
}
.set-actions .btn-secondary,
.set-actions .btn-primary {
  width: auto;
  margin-top: 0;
  padding-left: var(--sp-lg);
  padding-right: var(--sp-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xs);
}

/* One column narrow enough that two labels can't share a row: they span
   instead, which is the shared .btn-secondary's original full-bleed shape,
   kept only where the row genuinely cannot hold them side by side. */
@media (max-width: 480px) {
  .set-actions .btn-secondary,
  .set-actions .btn-primary {
    flex: 1 1 100%;
  }
}

/* ── Destinations badge list (issue #610) ─────────────────────────
   A row of chips instead of a single value, since tripData.destinations is
   the normal multi-city case, not an edge case. Wraps rather than scrolls —
   a five-city trip has to fit at 390px with no horizontal page scroll
   (npm run verify-mobile is what actually catches that; jsdom has no
   layout engine). */
.set-dest-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
  margin-bottom: var(--sp-md);
}

.set-dest-empty {
  font-size: var(--fs-sm);
  color: var(--df-ink-soft);
  margin: 0 0 var(--sp-md);
}

.set-dest-chip {
  display: inline-flex;
  align-items: center;
  /* --space-md, not the tighter --space-sm most chips use: three
     ::before-expanded icon buttons sit side by side below, and their
     horizontal hit-zones need this much real gap between glyphs or two
     buttons touch and the topmost-in-DOM one (paint order, no z-index)
     silently steals clicks meant for its neighbor — caught by a click on
     "move earlier" landing on the disabled "move later" button instead. */
  gap: var(--sp-sm);
  padding: var(--sp-xs) var(--sp-xs) var(--sp-xs) var(--sp-xs);
  background: var(--df-hair);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  max-width: 100%;
}

.set-trip-name-status {
  display: block;
  min-height: 1.2em;
  margin-top: var(--sp-xs);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}
.set-trip-name-status.is-error { color: var(--danger); }

.set-dest-chip-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: var(--df-ink);
  color: var(--df-panel);
  font-size: var(--fs-xs);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.set-dest-chip-label {
  padding: 0 var(--sp-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Visually a small in-chip glyph, but the hit region still reaches
   --tap-min via the same ::before-expansion convention as .modal-close. */
.set-dest-chip-btn {
  flex-shrink: 0;
  position: relative;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--df-ink-soft);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--fs-xs);
}

/* Full --tap-min vertically (nothing above/below competes for it), but
   only 28px horizontally: three of these sit in a row with just
   --space-md between glyphs, and a full 44px width here would overlap
   the neighboring button's own zone — see the .set-dest-chip gap comment.
   28px + the --space-md gap on each side meet exactly at the midpoint
   between two button centers, so a click still resolves to whichever
   button it's actually nearer. */
.set-dest-chip-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(28px, 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}

.set-dest-chip-btn:hover:not(:disabled) {
  color: var(--df-ink);
}

.set-dest-chip-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.set-dest-chip-remove:hover:not(:disabled) {
  color: var(--danger-text);
}

/* Issue #1415 — per-leg date rows under the destination chips. */
.set-dest-leg { margin-bottom: var(--sp-sm); }
.set-dest-leg-name { font-weight: 600; margin-bottom: var(--sp-xs); }
.set-dest-leg-note { font-size: var(--fs-xs); color: var(--df-ink-soft); margin-bottom: var(--sp-xs); }
.set-dest-leg-range { font-size: var(--fs-sm); color: var(--df-ink-soft); }
.set-dest-leg-inputs { display: flex; gap: var(--sp-sm); align-items: center; }
.set-dest-leg-inputs input { flex: 1; min-width: 0; }
.set-dest-add {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  flex-wrap: wrap;
}
.set-dest-add input,
.set-dest-add select {
  flex: 1 1 160px;
  min-width: 0;
}
.set-dest-add .btn-small {
  flex-shrink: 0;
  width: auto;
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
}

/* ── The stub ──────────────────────────────────────────────────
   The trip's own ticket. Everything above the tear says what the trip is;
   everything below it is the half you hand to someone else. It is the one
   object on this panel that lifts off the ground (Press Large), because it
   is a thing rather than a panel — every other block is drawn straight onto
   the page and separated by rhythm, not by a container. */
/* Issue #943 — max-width added. Before this the stub had none, relying on
   .set-panel's now-deleted 1180px interim cap to keep it from stretching;
   full-bleed, its auto-fit .set-stub-body grid (below) behaves the same as
   .set-blocks' did (see that rule's #943 comment) — few enough fields that
   it can end up as one or two columns blown up to fill the whole panel
   rather than staying close to its own ~190px-per-field intent. Same 900px
   as .set-blocks, for the same reason: this is the trip's own ticket, not
   a full-width form. */
.set-stub {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  margin-bottom: clamp(40px, 6vw, 64px);
  overflow: hidden;
  max-width: 900px;
}

.set-stub-body {
  display: grid;
  /* Issue #2497 — explicit Name | Dates, Destinations full width below
     (the old fluid grid left Dates alone in a ~199px cell and the date inputs
     unreadably narrow). Dates sit before Destinations because a leg's
     "Outside the trip dates" warning is judged against them. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: var(--sp-lg);
  padding: var(--sp-lg) var(--sp-lg) var(--sp-lg);
}
@media (max-width: 680px) {
  .set-stub-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The start/end pair: two flex:1 inputs and a dash (CLAUDE.md date-range
   convention); no per-input font or height overrides. */
.set-stub-date-pair {
  display: flex;
  gap: var(--sp-xs);
  align-items: center;
}
.set-stub-date-pair input {
  flex: 1;
  min-width: 0;
}
.set-stub-date-dash {
  color: var(--df-ink-soft);
  font-size: var(--fs-sm);
}

/* Issue #636 — the destinations field carries an add-row (text input +
   country select + button), not just a value, so it can't share a ~190px
   auto-fit column with Trip name the way the plain value fields do; it
   always takes the stub's full width.
   Correction (issue #943): the line this replaced claimed .set-stub-body
   "collapses to a single 1fr column at 1024px+" as if that made this rule
   a no-op on desktop — untrue at this panel's actual desktop width (only
   true, if anywhere, of the pre-#680 sticky-rail layout this stub used to
   sit in, retired when the stub moved inline into General). grid-column:
   1 / -1 is live at every width the stub actually renders at. */
.set-stub-field-wide {
  grid-column: 1 / -1;
}

.set-stub-value {
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--df-ink);
  line-height: 1.35;
}

/* The perforation. 2px dashed is the stub's own rule in this system — the
   line a ticket is torn along — and it is the only dashed edge on the panel
   for exactly that reason. */
.set-stub-tear {
  border-top: 2px dashed var(--df-ink);
  padding: var(--sp-lg) var(--sp-lg) var(--sp-lg);
}

/* The screen's one shout. Nine characters at display scale:
   the only value on this panel that gets read aloud or typed into another
   device, and the whole reason most people open Settings at all. It is also
   the copy control — see index.html on why the value is the button. */
.set-stub-code {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--sp-sm) var(--sp-md);
  margin: 0 0 var(--sp-lg) calc(var(--sp-md) * -1);
  background: none;
  border: 2px solid transparent;
  border-radius: var(--df-radius-stub);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background var(--dur-feedback) var(--df-ease), border-color var(--dur-feedback) var(--df-ease);
}
.set-stub-code:hover {
  background: var(--df-chip-fill);
  border-color: var(--df-ink);
}

.set-stub-code-value {
  font-family: var(--df-sans);
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--df-ink);
  overflow-wrap: anywhere;
}

.set-stub-code-icon {
  font-size: var(--fs-lg);
  color: var(--df-ink-soft);
  margin-left: auto;
  flex-shrink: 0;
}
.set-stub-code:hover .set-stub-code-icon,
.set-stub-code.set-stub-code-copied .set-stub-code-icon {
  color: var(--df-brand);
}

.set-stub-invite {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xs);
}


/* ── Danger ────────────────────────────────────────────────────
   Fenced rather than enlarged. Alert Red on the keyline and the heading —
   never Stamp Coral, which is branded and must not read as danger
   (DESIGN.md); these two buttons were --vn-coral before, one of them a
   full-bleed coral slab. */
.set-danger {
  border: 2px solid var(--error);
  border-radius: var(--df-radius-card);
  background: var(--df-panel);
  padding: var(--sp-lg);
}
.set-danger-title {
  color: var(--error-text);
}
.set-danger-notice {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  border: 2px solid var(--df-hair);
  border-radius: var(--df-radius-stub);
  padding: var(--sp-md) var(--sp-md);
  margin-bottom: var(--sp-md);
}
/* --error-text, not --error: this is a label, and --error itself measures
   ~3.98:1 as text. The keyline keeps --error, which clears the 3:1
   non-text floor. */
.set-danger-btn {
  color: var(--error-text);
  border-color: var(--error);
}

@media (prefers-reduced-motion: reduce) {
  .set-stub-code {
    transition: none;
  }
}

/* Fields on this panel take the converted skin — 2px ink keyline, stub
   radius, Cut Stock fill — the same way .df-modal-content skins the fields
   inside a converted modal. The shared base rule is still the retired
   system's 0.5px hairline and is left alone: it's what every unconverted
   screen still renders with, and editing it would half-convert all of them
   (DESIGN.md's whole-screen rule). Height is NOT set here — the shared rule
   owns it, including the 44px mobile floor. */
.set-panel input:not([type=checkbox]):not([type=radio]),
.set-panel select,
.set-panel textarea {
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: var(--df-panel);
  color: var(--df-ink);
}

.set-field-prefix {
  font-size: var(--fs-sm);
  color: var(--df-ink);
  white-space: nowrap;
}

/* A note that follows the control it describes, rather than introducing it. */
.set-block-note {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin: var(--sp-sm) 0 0;
}

/* Complete People-tab layout redesign (design canvas, 2026-08-23/24) —
   the roster and Access & Permissions used to stack as two full-width
   .set-block-wide blocks, leaving the desktop panel mostly empty air
   beside a list of member cards. A viewport media query, not
   #member-budget-list's own container-query pattern above — that pattern
   needs a wrapper distinct from the element being queried (a container
   can't condition its own layout on its own inline size, only a
   descendant's), and there's no such wrapper here worth adding. Matching
   the ≥1024px sidebar breakpoint exactly (not an earlier value) is what
   keeps this correct: app-main is capped at 680px below that breakpoint
   regardless of window width, so this grid never actually reaches 700px+
   until the same moment the sidebar appears — a lower breakpoint would
   flip the columns while the panel itself was still the narrow mobile
   column.
   Issue #943 — the roster track was a bare 1fr, which grew with the panel.
   That was fine capped at 1180px (#941's now-deleted interim measure, see
   .set-panel's own comment); full-bleed, an uncapped 1fr here stretches
   every .member-item row (flex, justify-content: space-between) across
   1000px+ of empty middle between the avatar/name and the row's actions —
   the exact stretched-row problem #941/#943 both exist to fix, just
   re-earned inside this grid instead of at the panel edge. minmax(0, 720px)
   caps the roster track directly, matching the ledger fix in .exp-panel
   (#943's own comment there has the full reasoning): capping the track,
   not a max-width on its contents, is what keeps Access & Permissions
   sitting right next to the roster instead of stranded near the panel's
   far edge — any leftover width sits outside the whole 2-column pair, not
   between its two columns. */
.people-top-grid {
  display: grid;
  /* #3859 — minmax(0, 1fr), not 1fr (= minmax(auto, 1fr)): the Pending rows'
     nowrap sub-line would otherwise stretch the track past the card. */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-2xl);
  align-items: start;
}
/* #3980 — from 1280px Access and Permissions is a draggable rail like
   Itinerary's Ideas column (js/pane-resizer.js owns --people-pane-width). The
   roster track fills (replaces #943's 720px cap): the 6px handle column is the
   only gutter. 1024–1279px stays one column. minmax(0, 1fr) keeps the #3859
   guarantee that the Pending rows' nowrap sub-line can't widen the track. */
@media (min-width: 1280px) {
  .people-top-grid {
    grid-template-columns: minmax(0, 1fr) 6px minmax(260px, var(--people-pane-width));
    column-gap: 0;
  }
  .people-top-grid > #people-roster-card { grid-column: 1; }
  .people-top-grid > .pane-resizer { grid-column: 2; }
  .people-top-grid > #people-access-permissions-card {
    grid-column: 3;
    position: sticky;
    top: var(--rail-top);
    max-height: calc(100vh - var(--rail-top) - var(--space-3xl));
    overflow-y: auto;
  }
}

/* Quiet counts under the panel title — "6 companions · 2 join requests" —
   so the roster's size is legible before scanning it. Set by
   renderMemberList() (js/members.js). */
.people-stat-line {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--df-ink-soft);
  margin: var(--space-lg) 0 var(--space-3xl);
}

/* Design critique 2026-08-23 (layout) — the People tab's Access &
   Permissions block was the one un-carded thing on a panel that otherwise
   cards everything (the roster rows above and the rating
   cards below): a bare heading and two flush-left rows floating on the
   ground, reading as unfinished rather than as a considered flat moment.
   .set-block itself stays bare everywhere else (Settings' own sub-tabs
   rely on that flat look — see .set-summary-row's own comment), so this is
   its own class rather than the shared one — shared now by the roster
   wrapper beside it too, so the pair reads as two cards of equal weight
   rather than a card next to a bare list. Same recipe as
   .member-item/.rating-card on this same panel: df-panel
   fill, 2px ink keyline, card radius, Press shadow. */
.people-card {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  padding: 0.9rem 1rem;
}

/* The People tab's own two headings ("People", "Ratings (Be Honest! 😏)")
   were both riding .section-head h3's quiet default (13px label-tier uppercase,
   a label voice, not a heading one) — the same inversion #panel-expenses
   was fixed for below. Elevated to match, now that the panel underneath
   them carries real card weight. */

/* ── Access & Permissions summary rows (issue #642 P2) ──────────────────
   Setting name · current value · chevron. A non-editable row is a plain
   div (no button semantics, nothing to activate); an editable one is a
   real <button> spanning the full row — native keyboard/Enter/Space
   activation and a single --tap-min-sized target, not a separate icon. */
.set-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--sp-md) 0;
  border-bottom: 2px solid var(--df-hair);
  font-family: inherit;
  font-size: var(--fs-sm);
  color: var(--df-ink);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  text-align: left;
}
.set-summary-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.set-summary-row-editable {
  cursor: pointer;
}
.set-summary-row-editable:hover {
  color: var(--df-brand);
}
.set-summary-row-label {
  font-weight: 600;
  flex-shrink: 0;
}
.set-summary-row-value {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  color: var(--df-ink-soft);
  font-size: var(--fs-xs);
  text-align: right;
  overflow-wrap: anywhere;
}
.set-summary-row-value i {
  font-size: var(--fs-sm);
  flex-shrink: 0;
}

/* A second thought inside a block — the Discover toggle under trip
   visibility. A dashed rule rather than a solid one: it divides within an
   idea, where the zone rules divide between them. */
.set-subblock {
  margin-top: var(--sp-lg);
  padding-top: var(--sp-lg);
  border-top: 2px dashed var(--df-hair);
}

.set-toggle-row {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}
/* #4389 (P15): bold lead line, sub-line, switch on the right. */
.set-toggle-row-switch { justify-content: space-between; }
.set-toggle-name { display: block; font-weight: 600; }
.set-toggle-sub { display: block; font-size: var(--fs-xs); color: var(--df-ink-soft); }

/* ── Per-member budget allocation (issue #104, relocated by #642 P1) ──
   Who / what they're allocated. One row per member, two cells, wrapping to a
   stack when the column can't hold them side by side. Role/removal actions
   used to live in a third cell here too, before #642 P1 folded them into
   each Travel Companions row's own "⋯" menu instead (js/members.js). */
/* A container query, not a viewport one: this block renders at four very
   different widths (the phone column, the 680px cap, the ~700px column left
   beside the stub, and the full 1180px), and what decides whether the two
   cells fit on one line is the block's own width, not the window's. */
.set-block-wide {
  container-type: inline-size;
}

.set-role-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-md) 0;
  border-bottom: 2px solid var(--df-hair);
}
.set-role-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* The two columns are shared across every row via subgrid rather than
   recomputed per row — a per-row `auto` sized each member's budget cell to
   that member's own input, so the field landed at a different x on every
   line and the list stopped reading as columns. Where subgrid is
   unsupported the rows keep the single-column stack above, which is the
   phone layout and still correct. */
@container (min-width: 620px) {
  #member-budget-list {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) auto;
  }
  .set-role-row {
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
  }
}

.set-role-who {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-xs);
  min-width: 0;
}
.set-role-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--df-ink);
  overflow-wrap: anywhere;
}

.set-role-budget {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  flex-shrink: 0;
}
.set-role-budget input {
  width: 88px;
}

/* Pending join requests sit under the companions list they belong to, in
   their own stable container (#pending-requests) — see js/members.js on why
   that container has to exist rather than being appended into the list. */
.set-panel .pending-section {
  margin-top: var(--sp-lg);
}

/* Issue #2722 (People W1) — the Members card. Rows are flat inside the one
   .people-card (Budget card style, #2686 D33), not a card each: avatar ·
   name/handle · tags · actions, hairline between rows. */
.member-list {
  display: flex;
  flex-direction: column;
}
.people-card-head { display: flex; align-items: flex-start; justify-content: space-between; }
.people-card-head .people-card-eyebrow { margin-top: var(--space-sm); }
.people-help-btn { background: transparent; color: var(--df-ink); border: 2px solid var(--df-ink); border-radius: 50%; min-width: var(--tap-min); min-height: var(--tap-min); margin: -0.4rem -0.4rem 0 0; }
.perm-role-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-lg) var(--space-xl);
  align-items: start;
  margin: 0 0 var(--space-md);
  padding: var(--space-lg);
  border: 2px dashed var(--df-ink-soft);
  border-radius: var(--radius-lg, 14px);
}
.people-card .set-summary-row { border-bottom: 2px dashed var(--df-ink-soft); }
.people-card .set-summary-row:last-child { border-bottom: 2px dashed var(--df-ink-soft); padding-bottom: var(--sp-md); }
.people-card .set-summary-row-value { color: var(--df-ink); font-weight: 600; }
.perm-role-grid[hidden] { display: none; }
.perm-role-grid dt, .perm-role-grid dd { margin: 0; }
.perm-role-grid dd { font-size: var(--fs-xs); line-height: 1.4; }
.people-card-eyebrow {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}
#members-subtab-toggle { margin-bottom: var(--space-md); border-radius: var(--radius-pill); overflow: hidden; }
.member-section-head {
  display: flex;
  justify-content: space-between;
  padding: var(--space-md) 0 var(--space-xs);
  border-bottom: 2px solid var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.member-section-head:not(:first-child) { margin-top: var(--space-xl); }
.member-section-needs { color: var(--df-ink); }
/* #6811: the Going head is a button; the count and chevron sit together on the right. */
button.member-going-head { width: 100%; min-height: var(--tap-min); align-items: center; background: none; border-width: 0 0 2px; border-style: solid; border-color: var(--df-ink); color: inherit; cursor: pointer; text-align: left; }
.member-going-n { display: inline-flex; align-items: center; gap: var(--space-sm); }
.member-going-n .ti { font-size: var(--fs-lg); }
#going-rows[hidden] { display: none; }
.member-item {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  min-height: calc(var(--tap-min) + var(--space-xl));
  padding: var(--space-md) 0;
  /* #3629 — no rule between rows (screens 01, 02, 05). */
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
}
.member-info { flex: 1; }
.member-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--df-ink);
  background: var(--df-ground); /* apricot, as drawn (#3629) */
  color: var(--df-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 600;
}
.member-avatar-dashed { border-style: dashed; background: none; }
.member-avatar-action { border-color: var(--vn-trail-green); color: var(--vn-trail-green); font-size: var(--fs-md); }
.member-invite-row { width: 100%; cursor: pointer; }
.member-invite-label { color: var(--vn-trail-green); font-weight: 600; }
.member-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-xs); }
.member-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  border: 1.6px solid currentColor;
  border-radius: var(--radius-pill);
  padding: 1px 8px;
  color: var(--df-ink);
}
.member-tag-host { color: var(--vn-trail-green); }
.member-tag-cohost { color: var(--df-ink); }
.member-tag-navigator { color: var(--vn-trail-green); }
.member-tag-you { color: var(--df-ink-soft); }
.member-tag-placeholder { border-style: dashed; color: var(--df-ink-soft); }
/* #4857 — an unclaimed seat reads as a held place: dashed rule, no fill. */
.member-item-unclaimed { border-left: 3px dashed var(--df-ink-soft); padding-left: var(--space-sm); }
.member-item-unclaimed .member-username { color: var(--df-ink); }
.person-sheet-seat-balance { font-weight: 600; margin: 0 0 var(--space-sm); }
.person-sheet-seat-balance-block { margin-bottom: var(--space-md); }
.member-tag-invited { color: var(--info); }
.member-tag-expired { color: var(--df-ink-soft); } /* #7103: expired is a past state, not an error. */
.member-leave-btn { color: var(--danger-text); border-color: var(--danger); }
.member-empty { padding: var(--space-lg) 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.member-error { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-md); padding: var(--space-lg) 0; }
.member-error-title { font-weight: 600; }
/* Inline ✓ / ✕ (M3-R3): each a full --tap-min target. */
.pending-item-actions { display: flex; gap: var(--space-sm); flex: none; }
.member-decision-btn {
  width: var(--tap-min);
  height: var(--tap-min);
  min-width: var(--tap-min);
  border: 2px solid var(--df-ink);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-md);
  cursor: pointer;
  background: var(--df-panel);
  color: var(--df-ink);
}
.member-invite-action { min-height: var(--tap-min); min-width: var(--tap-min); }
.member-decision-yes { background: var(--vn-trail-green); color: var(--surface-2); box-shadow: 2px 2px 0 var(--df-ink); }

.member-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--df-ink);
}

/* min-width: 0 lets this flex child actually shrink below its content size —
   without it a long nickname/username (e.g. a real display name with no
   spaces) pushes the row wider instead of wrapping, overflowing the card and
   crowding out the "⋯"/add-friend buttons at narrow widths. overflow-wrap
   below is the same fix .set-role-name already uses for this exact problem
   on the Budget tab's member rows — wrap the text, never hide it. */
.member-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.member-nick { font-size: var(--fs-sm); font-weight: 600; color: var(--df-ink); overflow-wrap: anywhere; }
.member-username { font-size: var(--fs-xs); color: var(--df-ink-soft); overflow-wrap: anywhere; }
/* #3632 — a Pending row's "how and when" line stays on one line and ends in an
   ellipsis beside the ✓/✕ pair (screen 02); min-width lets the flex child shrink. */
.pending-item .member-info { min-width: 0; }
/* #4428 — from 1280px the roster track fills the space beside the draggable
   rail (#3980), so a Going row's tags pinned to the far edge sat ~650px from
   the name they label. There the name stops growing, the tags follow it, and
   only the chevron is pushed to the edge. Below 1280px the row keeps the
   approved boards' tags-right layout (screens 01, 03, 05). */
@media (min-width: 1280px) {
  #people-roster-card .member-item:not(.pending-item) > .member-info { flex: 0 1 auto; }
  #people-roster-card .member-item:not(.pending-item) > .member-tags { justify-content: flex-start; }
  #people-roster-card .member-item:not(.pending-item) > .member-open-btn { margin-left: auto; }
}
.member-pending-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ── Approval stamp (design critique 2026-08-22 — delight) ───────────────
   The People tab had zero Departure Fever signature objects — every other
   accent on it is keylines/shadows/pills, the abstract half of the system
   only. Approving a join request is this app's own arrival-stamp moment
   (the same material the landing hero's .lp-stampword and the /discover
   stub's .dtl-stamp use for "this destination, struck"), scaled down from
   a hero line to a list row. playApproveStamp() (js/members.js) swaps a
   pending row's Approve/Reject buttons for this element and adds
   .is-struck before the list re-renders without that row. The resting
   transform lives in the base rule, not the keyframes, so an interrupted
   or reduced-motion render still lands correctly placed. */
.member-approve-stamp {
  display: inline-block;
  padding: 0.08em 0.36em 0.16em;
  border: 0.08em solid currentColor;
  border-radius: 0.22em;
  box-shadow: inset 0 0 0 0.032em currentColor;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vn-coral);
  transform: rotate(-2.6deg);
  transform-origin: 40% 60%;
}
@media (prefers-reduced-motion: no-preference) {
  .member-approve-stamp.is-struck { animation: member-approve-strike var(--dur-strike) var(--ease-slam) both; }
}
@keyframes member-approve-strike {
  0%   { opacity: 0; transform: rotate(-11deg) scale(1.85); }
  55%  { opacity: 1; transform: rotate(-2.6deg) scale(0.95); }
  78%  { transform: rotate(-2.6deg) scale(1.025); }
  100% { transform: rotate(-2.6deg) scale(1); }
}

/* 28px visible circle, same as before — but the tappable area is expanded
   to --tap-min with an invisible ::before rather than growing the box
   itself, the same idiom .member-menu-btn/.stop-menu-btn already use
   (design critique 2026-08-22: this was 28x28px real hit area, under the
   44px floor, on both People-tab call sites). */
.btn-icon-sm {
  position: relative;
  width: 28px; height: 28px; border-radius: var(--df-radius-stub); border: 2px solid var(--df-ink);
  background: var(--df-panel); display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--df-ink-soft); font-size: var(--fs-sm); flex-shrink: 0;
}
.btn-icon-sm::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}
.btn-icon-sm:hover { border-color: var(--vn-trail-green); color: var(--vn-trail-green); }
.btn-icon-sm.sent { background: var(--vn-trail-green); border-color: var(--vn-trail-green); color: var(--surface-2); }
.btn-icon-sm.sent:hover { border-color: var(--danger-solid); background: var(--danger-solid); color: var(--on-danger); }

.pending-section { margin-top: var(--space-xl); }

.settings-section-title { font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--df-ink-soft); margin-bottom: var(--sp-md); }

/* ── Standard "X" close/delete button — coral tint at rest so it's clearly
   visible (and reads as "delete") against any card background, in both
   light and dark mode, without needing a hover to notice it. Previously a
   hardcoded white circle, which was nearly invisible against the white
   (--surface-2) card background used in light mode.
   Use with .x-close-btn-corner to pin to the top-right of a card/box. ── */
.x-close-btn {
  background: var(--danger-light);
  border: 2px solid var(--danger);
  color: var(--danger-text);
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--df-press);
  transition: background var(--dur-feedback) var(--df-ease), color var(--dur-feedback) var(--df-ease), border-color var(--dur-feedback) var(--df-ease), box-shadow var(--dur-feedback) var(--df-ease), transform var(--dur-feedback) var(--df-ease);
  position: relative;
}
.x-close-btn:hover { transform: translate(2px, 2px); box-shadow: var(--df-press-hover); }
.x-close-btn:active { transform: translate(4px, 4px); box-shadow: var(--df-press-active); }
/* Same expanded-hit-zone trick as .stop-menu-btn — the visible circle stays
   26px (it sits inline next to other controls at that size throughout the
   app), the tappable region reaches --tap-min. */
.x-close-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}
.x-close-btn i { color: var(--danger-text); }
.x-close-btn:hover {
  background: var(--danger-solid);
  border-color: var(--danger-solid);
  /* #7103: deleting is destructive, so the danger fill and its paired foreground. */
  color: var(--on-danger);
}
.x-close-btn:hover i { color: var(--on-danger); }
/* Centers the button exactly on the box's top-right border (half in, half
   out) rather than inset inside it - the standard corner-delete position
   used throughout the app. */
.x-close-btn-corner {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
  z-index: 2;
}


.itin-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--df-ink-soft);
  font-size: var(--fs-sm);
}

/* ==================== Rating Section ==================== */
/* Issue #3865 — one Ratings card (boards 14-16): the status, then each person
   separated by 2px ink rules. */
.rating-board {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}
.rating-card { padding: var(--space-md) 0; }
.rating-card + .rating-card { border-top: var(--edge-hairline); }
.rating-card:last-child { padding-bottom: 0; }

@media (min-width: 1024px) {
  #rating-list-section { max-width: 640px; }
}

/* Issue #2726 — ratings status strip (locked / open countdown / closed) */
.rating-status {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.rating-status p { margin: 2px 0 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.rating-progress { flex: 1 1 100%; width: 100%; height: 8px; }
/* Issue #3626 — one Ratings card: title, countdown block, progress */
.rating-status-card { display: block; }
.rating-status-card h3 {
  margin: 0 0 var(--space-lg);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.rating-status-card > p { display: flex; align-items: center; gap: var(--space-sm); margin: 0; }
/* Screen 15: one peach panel holds the DAYS LEFT block, the headline and the progress bar */
.rating-countdown {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
  padding: var(--space-md);
  background: var(--df-ground);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
}
.rating-countdown > div:last-child { flex: 1; min-width: 0; }
.rating-countdown strong { display: block; font-size: var(--fs-md); line-height: 1.2; text-wrap: balance; }
.rating-countdown p { margin: var(--space-xs) 0 0; }
.rating-countdown-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  min-width: 4.5rem;
}
.rating-countdown-num {
  font-family: var(--df-display);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: var(--df-ink);
}
.rating-countdown-cap {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--df-ink);
}
.rating-progress {
  appearance: none;
  border: 2px solid var(--df-ink);
  border-radius: 999px;
  background: var(--df-panel);
  overflow: hidden;
}
.rating-progress::-webkit-progress-bar { background: var(--df-panel); }
.rating-progress::-webkit-progress-value { background: var(--df-brand); border-radius: 999px; }
.rating-progress::-moz-progress-bar { background: var(--df-brand); }
.rating-note-count {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}
.rating-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: 0.6rem;
}

.rating-card-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--df-ink);
  flex: 1;
}

/* Issue #3627 — avatar circle, "5.0 avg · 1" and the labelled note (screens 15, 16) */
.rating-avatar { width: 36px; height: 36px; }
.rating-note-label {
  display: block;
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin: 0 0 var(--space-xs);
}
.rating-static-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap-min);
  font-size: var(--fs-xl);
  color: var(--df-hair);
}
.rating-static-star.active { color: var(--df-ink); } /* #7103: rated stars are ink, not amber (amber means routed); unrated ones a faint hair tint. */

.rating-you-tag {
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--df-ink-soft);
}

.rating-avg-badge {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--df-ink);
  white-space: nowrap;
}

.rating-my-input { padding-bottom: var(--space-xs); }

.rating-my-input-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-xs);
}

.rating-my-summary {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
}

.rating-my-summary-note {
  font-size: var(--fs-xs);
  color: var(--df-ink);
}

.rating-my-summary-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.rating-my-summary-label {
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--df-ink-soft);
  flex: 1;
}

.rating-stars {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: 0.5rem;
}

.rating-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  font-size: var(--fs-xl);
  cursor: pointer;
  color: var(--df-hair);
  transition: color var(--dur-feedback) var(--ease-out), transform var(--dur-feedback) var(--ease-out);
}

.rating-star:hover,
.rating-star.active {
  color: var(--df-ink);
  transform: scale(1.15);
}

.rating-comment {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: var(--df-ground);
  resize: none;
  min-height: 52px;
  margin-bottom: 0.5rem;
  font-family: inherit;
}

/* Compact green pill, muted until the stars or note change (board 15) */
.rating-save-btn {
  min-height: var(--tap-min);
  padding: 0 var(--space-xl);
  border: 2px solid var(--df-ink);
  border-radius: 999px;
  background: var(--df-brand);
  color: var(--df-pin-white);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--dur-feedback) var(--ease-out);
}
.rating-save-btn.is-idle { opacity: 0.55; }

.rating-others-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rating-other-item {
  background: var(--df-panel);
  border-radius: var(--df-radius-stub);
  padding: var(--space-md) var(--space-lg);
}

.rating-other-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.rating-other-name {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--df-ink);
}

.rating-other-stars {
  font-size: var(--fs-sm);
  color: var(--df-ink);
  letter-spacing: 1px;
}

.rating-other-comment {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  font-style: italic;
  margin-top: var(--space-xs);
}

.rating-other-date {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin-top: var(--space-xs);
}

.rating-others-empty {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  padding: var(--space-2xs) 0;
}

/* ==================== Receipt Scan Area ==================== */
.scan-area {
  border: 2px dashed var(--df-hair);
  border-radius: var(--df-radius-card);
  padding: var(--space-4xl) var(--space-3xl);
  text-align: center;
  margin-bottom: var(--space-xl);
  background: var(--df-panel);
  transition: border-color var(--dur-state) var(--df-ease);
}

.scan-area > i {
  font-size: var(--fs-2xl);
  color: var(--df-ink-soft);
}

.scan-area p {
  font-size: var(--fs-sm);
  color: var(--df-ink-soft);
  margin: var(--space-xs) 0 var(--space-lg);
}

.scan-btns {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* Issue #630 — receipt scan moves from a hero block above every field
   (.scan-area, still used elsewhere) to a quiet row inside the "More
   details" disclosure — it's the entry path for a minority of expenses,
   not the majority default.
   Issue #675 — Take Photo/Upload sit on their own line below the heading
   (was one wrapping flex row) — a column layout instead of a row. */
.exp-scan-row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  padding: var(--sp-sm) 0;
  margin-bottom: var(--sp-sm);
  border-bottom: 1px solid var(--df-hair);
  color: var(--df-ink-soft);
  font-size: var(--fs-xs);
}
.exp-scan-row-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}
/* #2231 — no idle caption above the scan button (it repeated the button's
   own label); the row only shows while a scan or upload reports progress. */
.exp-scan-row-header:has(#exp-scan-status:empty) { display: none; }
.exp-scan-row-header > i {
  font-size: var(--fs-md);
  flex-shrink: 0;
}
.exp-scan-row .scan-btns {
  gap: var(--sp-sm);
}

/* #3294 — the receipt box: the Bookings upload box (.bk-add-drop) or, once a
   photo is saved, its thumbnail row, with the Scan switch under a dashed line.
   Drawn by syncReceiptButtonUI(), js/expenses.js. */
.exp-receipt-box {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 2px dashed var(--df-ink);
  border-radius: var(--radius-card);
  background: var(--df-ground);
  color: var(--df-ink);
}
.exp-receipt-box .bk-add-drop { border: 0; border-radius: 0; background: none; width: 100%; font: inherit; }
.exp-receipt-saved {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm);
}
.exp-receipt-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: var(--radius-stub); flex-shrink: 0; }
.exp-receipt-saved-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.exp-receipt-saved-text .bk-add-drop-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-receipt-remove {
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  background: none;
  border: 0;
  color: var(--df-ink-soft);
  cursor: pointer;
}
.exp-scan-switch-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-xs) var(--sp-sm);
  border-top: 2px dashed var(--df-hair);
  font-size: var(--fs-xs);
}
.exp-scan-switch-label { flex: 1; font-weight: 600; }
.exp-scan-switch {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  min-height: var(--tap-min);
  background: none;
  border: 0;
  cursor: pointer;
}
.exp-scan-switch::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 100%; height: 28px;
  transform: translateY(-50%);
  border-radius: 14px;
  background: var(--df-hair);
  transition: background var(--dur-state) var(--ease-out);
}
.exp-scan-switch.is-on::before { background: var(--df-brand); }
.exp-scan-switch-knob {
  position: absolute;
  left: 3px; top: 50%;
  width: 22px; height: 22px;
  margin-top: -12px;
  border-radius: 50%;
  background: var(--df-ground);
  transition: transform var(--dur-state) var(--ease-move);
}
.exp-scan-switch.is-on .exp-scan-switch-knob { transform: translateX(24px); }
.exp-scan-switch:disabled { opacity: 0.5; cursor: not-allowed; }

/* Issue #630 — the Day field, compact instead of full-width: a native
   <select> already opens its own list on click, so this is a sizing/
   pill-shape change only, not a new interaction. */
.exp-day-chip-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
}
.exp-day-chip-sel {
  width: auto;
  min-width: 100px;
  height: var(--tap-min);
  border-radius: var(--radius-pill);
  padding: var(--sp-xs) var(--sp-md);
  border: 2px solid var(--df-ink);
  background: var(--df-panel);
  font-size: var(--fs-xs);
  font-family: inherit;
}
/* Issue #630 follow-up — var(--fs-xs) reads below 16px, iOS auto-zoom risk
   on focus. Kept as the compact desktop chip size; mobile gets its own
   override same as the shared input/select/textarea rule does, rather than
   raising the desktop size unconditionally. Same condition as the shared
   rule (#4432: narrow viewport or touch pointer). */
@media (max-width: 680px), (pointer: coarse) {
  .exp-day-chip-sel {
    font-size: var(--fs-md);
  }
}

/* Issue #630 — the primary action stays reachable without scrolling past
   the "More details" disclosure on a short viewport. #4498 — sticky at every
   width: above 680px the modal still scrolls on a tablet or a short laptop
   window, and sticky is a no-op when it doesn't. Only the bottom-sheet bleed
   (background, negative margins) stays phone-only; .exp-form-sheet sets the
   desktop equivalents. */
/* Issue #1720 — the pinned footer overlays the bottom of the scroll area, so
   a chip scrolled/focused to the bottom edge sat underneath it and swallowed
   the click. scroll-padding-bottom is the footer's height (tap target + its
   own vertical padding + the divider), so scrollIntoView()/focus/Playwright
   scrolling stop with the target clear of it. */
.modal-content:has(.exp-modal-sticky-footer) {
  scroll-padding-bottom: calc(var(--tap-min) + 2 * var(--sp-sm) + 1px);
}
.exp-modal-sticky-footer {
  position: sticky;
  bottom: 0;
}
@media (max-width: 680px) {
  .exp-modal-sticky-footer {
    background: var(--df-panel-2, var(--df-panel));
    padding: var(--sp-sm) 0;
    margin: var(--sp-sm) calc(-1 * var(--sp-md)) calc(-1 * var(--sp-md));
    padding-left: var(--sp-md);
    padding-right: var(--sp-md);
    border-top: 1px solid var(--df-hair);
  }
}

/* ==================== Split Mode Toggle ==================== */
.split-toggle {
  display: flex;
  gap: 0;
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  overflow: hidden;
  width: 100%;
}

.split-btn {
  flex: 1;
  min-height: var(--tap-min);
  padding: var(--sp-sm) var(--sp-md);
  border: none;
  background: var(--df-panel);
  color: var(--df-ink-soft);
  font-size: var(--fs-sm);
  font-family: inherit;
  cursor: pointer;
  transition: background var(--dur-feedback) var(--df-ease), color var(--dur-feedback) var(--df-ease);
}

.split-btn:first-child {
  border-right: 2px solid var(--df-ink);
}

/* Issue #675 — the Equal-split panel (All/Select-members toggle + the
   member roster) sits flush under the outer Equal/Itemized .split-toggle,
   sharing its border and only rounding the bottom corners, no gap between
   them — one continuous box instead of two stacked, visually unrelated
   toggle bars. .split-toggle-top squares off that outer bar's own bottom
   corners to match, or its pill rounding would poke out past the panel's
   flat top edge right where they're supposed to look joined. */
.split-toggle-top {
  border-radius: var(--df-radius-stub) var(--df-radius-stub) 0 0;
}
.split-equal-panel {
  border: 2px solid var(--df-ink);
  border-top: none;
  border-radius: 0 0 var(--df-radius-stub) var(--df-radius-stub);
  padding: var(--space-lg);
  background: var(--df-panel);
}

/* Issue #670 — the All/Select-members toggle nests inside .split-equal-panel
   at otherwise identical weight to the outer Equal/Itemized toggle; this
   modifier reads it as clearly subordinate (smaller type, tighter padding)
   without dropping under --tap-min. */
.split-toggle-sub .split-btn {
  font-size: var(--fs-xs);
  padding: var(--sp-sm) var(--sp-md);
}

/* Issue #1458 — unequal split rows: name, input, and (shares mode) the
   derived amount. Inputs keep the shared 16px mobile input rule. */
.unequal-panel { margin-top: var(--space-md); display: flex; flex-direction: column; gap: var(--space-sm); }
.unequal-rows { display: flex; flex-direction: column; gap: var(--space-sm); }
.unequal-row { display: flex; align-items: center; gap: var(--space-md); }
.unequal-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.unequal-row input { width: 7.5rem; min-height: var(--tap-min); }
.unequal-derived { min-width: 5rem; text-align: right; color: var(--text-muted, inherit); font-size: var(--fs-xs); }
.unequal-remainder { margin: 0; font-size: var(--fs-xs); }
.unequal-remainder.is-off { color: var(--danger); font-weight: 600; }

.split-btn.active {
  background: var(--selected-bg);
  color: var(--on-selected);
  font-weight: 600;
}

.scan-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--tap-min);
  padding: var(--space-md) var(--space-3xl);
  border-radius: var(--radius-pill);
  border: 2px solid var(--df-ink);
  background: var(--df-panel);
  color: var(--df-ink);
  font-size: var(--fs-sm);
  font-family: inherit;
  cursor: pointer;
  --press-bw: 2px;
  transition: background var(--dur-feedback) var(--df-ease), border-color var(--dur-feedback) var(--df-ease), transform var(--dur-feedback) var(--df-ease);
}

.scan-btn:hover {
  border-color: var(--vn-trail-green);
  color: var(--vn-trail-green);
  transform: translate(2px, 2px);
}
.scan-btn:active {
  transform: translate(4px, 4px);
}

.scan-btn i {
  font-size: var(--fs-sm);
}

.vnd-note {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin-top: var(--space-xs);
}

/* ==================== Expense Items ==================== */
/* gap/margin-top are large enough that a .x-close-btn-corner button (which
   protrudes ~13px above its row's top border) never overlaps the row above
   it or the header row. */
.items-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
  margin-top: var(--sp-lg);
  margin-bottom: var(--sp-sm);
}

/* Header row above .items-list — columns match .item-row-top's grid exactly
   (7% No. / 68% Item / 25% Price) so the two stay visually aligned. */
.items-header-row {
  display: grid;
  grid-template-columns: 7% 68% 25%;
  gap: var(--sp-xs);
  padding: 0 var(--sp-lg) var(--sp-sm);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--df-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.items-col-price { text-align: right; }

.item-row {
  position: relative;
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  padding: var(--sp-md) var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

/* Issue #1210 item 1 — a scanned receipt the server flagged for a check. */
.scan-review-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  background: var(--info-light);
  color: var(--df-ink);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
}
.scan-review-banner .scan-review-text { flex: 1; min-width: 0; }
.scan-review-banner .btn-small { flex-shrink: 0; min-height: var(--tap-min); }
.item-row.item-row-check { border-color: var(--info); box-shadow: inset 4px 0 0 var(--info); }

.item-row-top {
  display: grid;
  grid-template-columns: 7% 68% 25%;
  gap: var(--sp-xs);
  align-items: center;
}

.item-no {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--df-ink-soft);
}

.item-name-input {
  /* No own font-size (issue #446) — see .checklist-reassign-select above. */
  padding: var(--sp-xs) var(--sp-sm);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: inherit;
  min-width: 0;
}

.item-amount-input {
  width: 100%;
  padding: var(--sp-xs) var(--sp-sm);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: inherit;
  min-width: 0;
}

.item-name-static {
  font-size: var(--fs-sm);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-amount-static {
  font-size: var(--fs-sm);
  color: var(--df-ink-soft);
  white-space: nowrap;
  text-align: right;
}

/* Issue #630 — the Add/Edit Expense form's itemized rows stopped using
   .assignee-btn: .pax-btn (below, "Split mode") is now the single person-
   selection primitive across Paid by, Equal split AND itemized rows — one
   height, one type scale, one selected treatment, so the two states can't
   invert each other the way .pax-btn's teal-light "selected" and
   .assignee-btn's solid-teal "selected" used to. A dense itemized row
   tightens via gap/horizontal padding only (.pax-btn-compact below) —
   never by shrinking under --tap-min again, which is what made these
   ~19px tall in the first place.
   .assignee-btn is gone too (#6014): its last caller, the stay thumbs-up, is
   the shared vote row now (.vote-row, below). */
.item-assignees {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-xs);
}


.item-share-note {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
}

.items-member-totals {
  background: var(--df-panel);
  border-radius: var(--df-radius-stub);
  padding: var(--sp-md) var(--sp-md);
  margin-top: var(--sp-md);
}

.member-total-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-sm);
  padding: var(--space-xs) 0;
}

.btn-small {
  min-height: var(--tap-min);
  font-size: var(--fs-xs);
  padding: var(--space-sm) var(--space-xl);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  transition: background var(--dur-feedback) var(--ease-out);
}

.btn-small:hover {
  background: var(--surface-1);
}

.btn-small.sent { background: var(--vn-trail-green); border-color: var(--vn-trail-green); color: var(--surface-2); }
.btn-small.sent:hover { background: var(--danger-solid); border-color: var(--danger-solid); color: var(--on-danger); }

/* "Belanja" treat-expense (issue #72) */
.belanja-btn { background: var(--vn-trail-green); border-color: var(--vn-trail-green); color: var(--surface-2); }
.belanja-btn:hover { background: var(--vn-coral); border-color: var(--vn-coral); } /* #7103: kept; treating applies the TREAT stamp. */

/* One-off purple accent, used only for the Transfer Host action —
   not part of the three-hue brand palette, so it's a dedicated class
   with its own light-dark() pair rather than a new --vn-* token. */
.btn-transfer-host { color: light-dark(#7c3aed, #a78bfa); border-color: light-dark(#c4b5fd, #5b3fa0); }

/* ==================== Empty State ==================== */
.empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--df-ink-soft);
  font-size: var(--fs-sm);
}

.empty i {
  font-size: var(--fs-display-32);
  display: block;
  margin-bottom: var(--space-md);
  opacity: 0.4;
}

/* ==================== Tabs Subtabs ==================== */
/* The Settings sub-tab strip is gone (#6376); Expenses' category row left this bar earlier. Expenses'
   category row left it: a genuine sub-tab bar has few enough destinations to
   sit on one line, and Expenses had eight, which is why it needed the
   horizontal scroll and the fade-to-edge cue in the first place. Eight
   filters that all fit is a better answer than eight that scroll, so that row
   is now .exp-filters — wrapping outlined pills. The scroll machinery
   (.subtabs-scroll, its ::after fade, and updateSubtabsScrollFade()) went
   with it; nothing else ever used it. */
.subtabs {
  display: flex;
  gap: var(--space-xs);
  border-bottom: 2px solid var(--df-hair);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.subtab {
  flex-shrink: 0;
  white-space: nowrap;
  min-height: var(--tap-min);
  padding: var(--space-sm) var(--space-xl);
  font-size: var(--fs-xs);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--df-ink-soft);
  border-bottom: 2px solid transparent;
  font-weight: 400;
  transition: color var(--dur-feedback) var(--df-ease), border-color var(--dur-feedback) var(--df-ease);
}

.subtab.active {
  /* #6634: the shared selected ink fill, not green text and underline. */
  background: var(--selected-bg);
  color: var(--on-selected);
  border-bottom-color: transparent;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

/* ==================== Responsive ==================== */
@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .modal-content {
    padding: 1.5rem;
  }

  #addExpenseModal .modal-header {
    top: -1.5rem;
    margin: -1.5rem -1.5rem 1.5rem;
    padding: 1.5rem 1.5rem 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Dropped entirely, not just capped at 90px. On the trip view the trip is
     the subject of the page and its name was truncating to "Japan…" while
     the signed-in username — the one thing the user already knows — kept a
     pill roughly three times wider. The avatar still identifies the account
     and the caret still says the pill opens a menu; the name is back in the
     dropdown the moment it opens. Frees ~90px for the title beside it. */
  .home-profile-name {
    display: none;
  }
}

#my-trips-screen {
  display: none;
}

#my-trips-screen .btn-large {
  font-size: var(--fs-sm);
  padding: var(--space-2xl) var(--space-3xl);
}

/* No max-height/overflow here on purpose — .home-body (below) is the one
   scroll region for this screen. This element used to duplicate that with
   its own inner `overflow-y: auto` sized off `100vh` (ignoring mobile browser
   chrome, unlike .home-screen's deliberate `dvh`), producing a scroller
   nested inside a scroller that trapped touch scrolling. */
#my-trips-list {
  padding-top: var(--space-2xl);
}


/* #4041 — in the trip view, below 1024px, the account name (191px, against
   58px avatar-only) shares the single-row bar with the trip name and left it
   0 characters at 600px, 4 at 700, 12 at 768. Hiding it frees ~190px. The
   account shows as avatar + caret, as it already does at 480px and below.
   .app-scoped so the My Trips top bar is unchanged; from 1024px it is back. */
@media (max-width: 1023px) {
  .app .home-profile-name {
    display: none;
  }
}

/* #4237 — the trip view's bar is one row at every width, the same --topbar-h as
   My Trips, so opening a trip never changes its height. Destination and dates
   live in .trip-subheader at the top of the trip content, not in the bar. On a
   phone the bar has room for only the first few characters of the name, so the
   sub-header repeats the full name there (#3719: a 40+ character name must stay
   readable); from 581px the bar's own ellipsised title is enough. */
.trip-subheader {
  padding: 0 1.5rem var(--space-md);
}

.trip-subheader .header-sub {
  color: var(--df-ink-soft);
  white-space: normal;
}

.trip-subheader-name {
  display: none;
  font-family: var(--df-sans);
  font-weight: 600;
  font-size: var(--fs-md);
  line-height: 1.3;
  color: var(--df-ink);
  overflow-wrap: anywhere;
}

@media (max-width: 580px) {
  .trip-subheader-name {
    display: block;
  }
}

/* #4660 — the phase-aware boarding-pass header: every trip tab's one shout
   (DESIGN.md, Trip view chrome). The trip name is the title above the dates
   and one phase line (#6080: the destination stamp is gone). Full height is at most 120px at 390px; .is-compact (set on
   scroll, and always on Recap) is one row. */
.trip-header { display: block; }
.trip-header-name {
  font-family: var(--df-sans);
  font-weight: 600;
  font-size: var(--fs-md);
  line-height: 1.2;
  color: var(--df-ink);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.trip-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--space-md);
  row-gap: 0;
}
.trip-header-dates {
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  color: var(--df-ink);
  background: none;
  border: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
}
/* #6016 - only dates that open something look tappable. #6089: and only those
   need the 44px target; plain text left a 44px-tall row under the top bar. */
.trip-header-dates[role="button"] { cursor: pointer; position: relative; }
/* The 44px target is an invisible hit area, so the row itself stays one line tall. */
.trip-header-dates[role="button"]::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: max(var(--tap-min), 100%);
  transform: translateY(-50%);
}
/* #6089 - a row with neither dates nor a phase line takes no space. */
.trip-header-row:not(:has(.trip-header-dates:not([hidden]), .trip-header-phase:not(:empty))) { display: none; }
.trip-header-phase {
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--df-ink-soft);
}
/* #4885 — at >=1024px the top bar's h1 already shows the trip name, so the
   header copy goes visually hidden (kept for the outline, not display:none). */
@media (min-width: 1024px) {
  .trip-header .trip-header-name {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}
/* #6644 QA - the trip view's working area is a Cut Stock sheet (content-box clip on
   .app-main), and the header was its first row with no top padding, so its first
   line sat on the sheet's top edge on every tab. 16px puts it inside the sheet.
   At >=1024px the name is visually hidden, so a header whose dates row is gone
   too (Itinerary, or no dates and no phase) paints nothing and takes no inset. */
.app-main > .trip-header { padding-top: var(--space-3xl); }
@media (min-width: 1024px) {
  .app-main > .trip-header.is-itinerary,
  .app-main > .trip-header:not(:has(.trip-header-dates:not([hidden]), .trip-header-phase:not(:empty))) { padding-top: 0; }
}
/* #6187 - Itinerary (List, Calendar, Map) shows no dates or phase line; the whole row
   goes so it leaves no gap. Other tabs keep it. */
.trip-header.is-itinerary .trip-header-row { display: none; }
.trip-header.is-compact .trip-header-name,
.trip-header.is-recap .trip-header-name { display: none; }
.trip-header.is-compact .trip-header-row,
.trip-header.is-recap .trip-header-row { flex-wrap: nowrap; overflow: hidden; }
.trip-header.is-compact .trip-header-dates,
.trip-header.is-recap .trip-header-dates { white-space: nowrap; }


/* ==================== Receipt Progress Bar ==================== */
.progress-track {
  width: 100%;
  height: 4px;
  background: var(--df-hair);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 40%;
  background: var(--vn-trail-green);
  border-radius: 2px;
  animation: progress-slide 1.2s ease-in-out infinite;
}

@keyframes progress-slide {
  0%   { transform: translateX(-150%); }
  50%  { transform: translateX(100%); }
  100% { transform: translateX(250%); }
}

/* Issue #1015 harden pass — the generic failed-status line (tripPassCheckoutStatus). */
.status-error {
  color: var(--error);
  font-weight: 600;
}

/* A flat stop row, used by the itinerary proposals' read-only preview. The
   AI planner's own rows are the Ledger (css/features/itinerary-agent.css, #6343/#6350). */
.agent-diff-row {
  padding: var(--space-md) 0;
  border-bottom: 2px solid var(--df-hair);
  overflow-wrap: anywhere;
}
.agent-diff-row:last-child { border-bottom: none; }

.stop-note-verified { font-weight: 400; }
.stop-note-unverified { font-weight: 600; }

/* ==================== Itinerary Choice Cards ==================== */
.choice-cards {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.choice-card {
  flex: 1;
  min-width: 140px;
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur-feedback) var(--ease-out), background var(--dur-feedback) var(--ease-out);
}

.choice-card:hover {
  border-color: var(--vn-trail-green);
  background: var(--vn-trail-green-light);
}

.choice-card-icon {
  font-size: var(--fs-2xl);
  color: var(--vn-trail-green);
  display: block;
  margin-bottom: var(--space-md);
}

.choice-card-title {
  font-weight: 600;
  font-size: var(--fs-sm);
  margin-bottom: var(--space-xs);
}

.choice-card-desc {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  line-height: 1.4;
}

/* Issue #242 — "Browse destination templates"/"Let AI help me plan" render
   disabled with their reason inline (not hidden) until destination + dates
   are confirmed; see renderItinChoiceGating() in js/itinerary.js. */
.choice-card-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Issue #911 — the pre-itinerary planning hub (.planning-hub/-header/-cards/
   -destination-line, formerly here) was deleted along with
   renderPlanningHub() — destination/dates moved into the trip header
   instead. Despite the shared class-name prefix, everything below this
   point (.planning-hub-vote-link, .planning-hub-poll-*) belongs to the
   #312 decision board MODAL, which survives — kept. */
.planning-hub-vote-link {
  display: block;
  background: none;
  border: none;
  color: var(--vn-trail-green);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: var(--space-xs) 0 0;
  text-align: left;
}

.planning-hub-poll-option {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-md) 0;
  border-bottom: 2px solid var(--df-hair);
}

.planning-hub-poll-option:last-child {
  border-bottom: none;
}

/* Issue #312 Phase 2 — "Where to go" modal's suggestion list. */
.where-to-go-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 2px solid var(--df-hair);
  font-size: var(--fs-sm);
}

.where-to-go-suggestion:last-child {
  border-bottom: none;
}

.where-to-go-suggested-by {
  color: var(--df-ink-soft);
  font-size: var(--fs-xs);
  flex-shrink: 0;
}

.where-to-go-empty {
  color: var(--df-ink-soft);
  font-size: var(--fs-sm);
  text-align: center;
  padding: var(--space-lg) 0;
}

.where-to-go-note {
  color: var(--df-ink-soft);
  font-size: var(--fs-xs);
  margin-bottom: var(--space-sm);
}

/* Issue #312 UX round 2 — section headings inside the Where to go modal
   ("Current Destination" / "Suggested"). */
.where-to-go-section-label {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
}

/* One row of the ordered "Current Destination" list. */
.where-to-go-destination {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 2px solid var(--df-hair);
  font-size: var(--fs-sm);
}

.where-to-go-destination:last-child {
  border-bottom: none;
}

.where-to-go-destination-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: var(--vn-trail-green-light);
  color: var(--vn-trail-green);
  font-size: var(--fs-xs);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.where-to-go-destination-label {
  flex: 1;
  min-width: 0;
}

.where-to-go-icon-btn {
  flex-shrink: 0;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--df-ink-soft);
  cursor: pointer;
  font-family: inherit;
  border-radius: var(--df-radius-stub);
}

.where-to-go-icon-btn:hover:not(:disabled) {
  background: var(--df-hair);
  color: var(--df-ink);
}

.where-to-go-icon-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* One vote row (#6014, DESIGN.md Components -> Vote row; boards docs/design/votes/).
   Route Amber is the bar mark only; the Leading tag is Amber Ink text. */
.vote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-width: 0;
}
.vote-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vote-row-name { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-sm); font-weight: 600; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.vote-row-lead {
  flex: none;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vn-amber-text);
  border: 1.5px solid currentColor;
  border-radius: 3px;
  padding: 0 4px;
  line-height: 15px;
}
.vote-row-detail { font-size: var(--fs-xs); color: var(--df-ink-soft); overflow-wrap: anywhere; }
.vote-row-by { font-size: var(--fs-xs); font-weight: 400; color: var(--df-ink-soft); }
/* A suggestion that just landed (#7470): the row holds a brand wash for a beat, then settles. */
.vote-row.is-landed { animation: vote-row-landed var(--dur-highlight) var(--ease-out) both; }
@keyframes vote-row-landed { from { background: color-mix(in srgb, var(--df-amber) 40%, transparent); } to { background: transparent; } }
.vote-row-who { display: flex; align-items: center; gap: var(--space-sm); font-size: var(--fs-xs); color: var(--df-ink); }
.vote-row-side { flex: 0 0 auto; display: flex; align-items: center; gap: var(--space-sm); }
.vote-row-btn, .vote-row-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  min-width: 76px;
  padding: 0 var(--space-lg);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
}
.vote-row-btn { cursor: pointer; }
.vote-row-btn.is-on { background: var(--df-brand); border-color: var(--df-brand); color: var(--df-brand-fg); }
.vote-row-count { border-color: var(--df-hair); color: var(--df-ink-soft); background: transparent; }
.vote-row.is-unavailable .vote-row-name-text { text-decoration: line-through; color: var(--df-ink-soft); }
.vote-row.is-unavailable { opacity: 0.85; }
.accommodation-option-row.unavailable { opacity: 1; }
.accommodation-option-info .vote-row { align-items: flex-start; }

/* ==================== Itinerary Builder ==================== */
.builder-day {
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  padding: var(--space-xl) var(--space-2xl);
  margin-bottom: var(--space-xl);
}

.builder-day-header {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--vn-trail-green);
  margin-bottom: var(--space-md);
}

.builder-stop-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--fs-sm);
  padding: var(--space-xs) 0;
  border-bottom: 2px solid var(--df-hair);
  flex-wrap: wrap;
}

.builder-stop-time {
  color: var(--df-ink-soft);
  min-width: 48px;
  font-variant-numeric: tabular-nums;
}

.builder-stop-dest {
  font-weight: 600;
  flex: 1;
}

.builder-stop-addr {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  width: 100%;
  padding-left: 56px;
}

.builder-stop-edit {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--df-ink-soft);
  font-size: var(--fs-sm);
  padding: 0 var(--space-xs);
  line-height: 1;
}

.builder-stop-del {
  /* Issue #758 — background/color used to be force-pinned here, fighting a
     specificity war that no longer exists (originally literal white/black,
     #433 W1-5); no other rule targets .builder-stop-del's background/color,
     so removing the pin is a no-op today. */
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  box-shadow: var(--df-press);
  color: var(--df-ink);
  cursor: pointer;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  line-height: 1;
  flex-shrink: 0;
  /* Anchors the ::before tap-expansion below. */
  position: relative;
}

/* Issue #758 — 20x20 fails both --tap-min (44px) and WCAG 2.2 AA's 24x24
   floor outright. Same expansion as .modal-close::before: the glyph stays
   20px, only the hit area grows. */
.builder-stop-del::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}

.builder-stop-edit:hover { color: var(--vn-trail-green); }
.builder-stop-del:hover { background: var(--danger-light); border-color: var(--danger); color: var(--danger-text); }

.builder-add-form {
  display: flex;
  flex-direction: column;
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  background: var(--df-ground);
  border-radius: var(--df-radius-stub);
}

.builder-add-form input {
  /* No own font-size (issue #446) — see .checklist-reassign-select above. */
  font-family: inherit;
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  padding: var(--space-md) var(--space-lg);
  background: var(--df-panel);
  color: inherit;
}

/* ==================== Home / My Trips Screen ==================== */

/* Outer shell: a full-viewport-height column of [topbar, main] on mobile so
   the three zones inside .home-main always fit exactly; on desktop this
   relaxes into a normal flowing page — see the Desktop layout block above
   .stat-grid for the >=1024px behavior. */
/* ==================== MY TRIPS — Departure Fever ====================
   Converted whole from the retired Field Journal look (soft blurred shadows,
   near-white cards on #f5f5f5, system type, 16px radii). DESIGN.md's
   migration note is why this is one commit covering shape, type and shadow
   together: a panel carrying both a blurred card shadow and a hard ink
   offset reads as a bug, not a transition.

   What is deliberately NOT converted here: .home-topbar, .home-profile* and
   .notification-* above. Those are shared verbatim with the in-trip app
   shell (index.html:1734), so converting them from this screen would convert
   half of another screen — exactly what the whole-screen rule forbids. They
   already sit on --topbar-bg, which IS the system's Field Green, so the
   chrome is on-vocabulary on colour today and the seam is only in the
   dropdown panels' geometry. They convert with the app shell, not here. */
.home-screen {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh; /* respects mobile browser chrome */
  overflow: hidden;
  /* The ground is a shape: a real 6px halftone dot screen over two broad
     radial ink washes (print ground: .df-ground-print group above). It must
     stay continuous — see the --df-halftone note in :root for why nothing
     over it may carry a backdrop-filter. */
  color: var(--df-ink);
  font-family: var(--df-sans);
}

/* The page-wide focus ring for this system: 3px at 3px offset, no glow
   anywhere. Scoped to the screen rather than raising the app-wide 2px rule,
   which belongs to the unconverted surfaces until they convert too. */
.home-screen a:focus-visible,
.home-screen button:focus-visible,
.home-screen [tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 3px solid var(--df-brand);
  outline-offset: 3px;
}

/* Top bar — spans the full page width (unlike .home-main/.app-main below,
   which stay column-width), holding branding on the left and the account
   menu on the right. Reused as-is by the in-trip app (see .app in the App
   Layout section) so both screens share identical top-bar chrome; on the
   My Trips screen there's nothing to its left/right that could overlap it,
   but the in-trip .tabs sidebar is position:fixed from the top of the
   viewport, so it needs a z-index bump to guarantee it paints above that
   fixed sidebar rather than leaving it to DOM-order luck. */
.home-topbar {
  position: relative;
  z-index: 45;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  box-sizing: border-box;
  height: var(--topbar-h);
  background: var(--topbar-bg);
}

/* min-height: on the trip page this is the only route back to My Trips (the
   sidebar has no Home item), and it measured 37px. Harmless on the My Trips
   screen, where the same frame is inert branding. */
.home-topbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  min-height: var(--tap-min);
  min-width: 0; /* lets the trip name/subtitle below ellipsis instead of overflowing */
}

/* The trip view's copy of the frame is a real <button> (see index.html) —
   only that instance needs the resets, since the My Trips one is still an
   inert <div>. text-align:left because a button centers its content by
   default, which would un-align the title from the logo beside it. */
/* flex-shrink:0 — at 580px and below the trip bar's wrapper is display:contents
   (#3719), so this button is a direct flex item of the bar and, unprotected,
   shrank to --tap-min while its lockup stayed 122px wide, painting the
   wordmark across the title beside it (#4030). */
.home-topbar-brand-btn {
  flex-shrink: 0;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

/* Wraps title+subtitle so long trip names truncate instead of pushing the
   account menu off-screen; harmless for the My Trips screen's static short
   "Lancong" text, which never needs to shrink. */
.home-topbar-brand-text {
  min-width: 0;
  overflow: hidden;
}

.home-topbar-title {
  font-family: var(--df-sans);
  font-weight: 600;
  font-size: var(--fs-md);
  line-height: 1.3;
  color: var(--topbar-fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Account menu: a profile pill that opens a small dropdown (Create Account
   for guests + Log out) instead of spelling both out as separate buttons. */
.home-profile {
  position: relative;
  min-width: 0; /* lets .home-profile-name actually ellipsis instead of overflowing */
}

.home-profile-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 0;
  max-width: 100%;
  min-height: var(--tap-min);
  border-radius: var(--radius-pill);
  padding: var(--space-xs) var(--space-lg) var(--space-xs) var(--space-xs);
  font-size: var(--fs-xs);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.home-profile-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: var(--fs-xs);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-profile-name {
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-profile-caret {
  font-size: var(--fs-xs);
  flex-shrink: 0;
}

/* Departure Fever geometry (font already inherited the body face from .home-screen/
   .app — this is the "half-converted" seam the My Trips comment flagged:
   only shape was still Field Journal). A dropdown reads as a small torn-off
   stub of the same stock the page is cut from, so it takes the stub radius
   and the card-scale press shadow rather than the pill/12px controls take. */
.home-profile-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  min-height: var(--tap-min);
  background: none;
  border: none;
  border-radius: var(--df-radius-stub);
  padding: var(--space-md) var(--space-lg);
  font-size: var(--fs-sm);
  font-family: inherit;
  color: var(--df-ink);
  cursor: pointer;
  text-align: left;
  text-decoration: none; /* the Admin menu entry (issue #182) is an <a>, not a <button> */
  box-sizing: border-box;
}
.home-profile-item:hover { background: var(--df-hair); }
.home-profile-item-danger { color: var(--danger-text); }
.home-profile-item-danger:hover { background: var(--danger-light); }

/* Issue #1000 — System/Light/Dark theme control, styled like a smaller
   .itin-view-toggle (same segmented-pill idiom, --df-brand/-brand-fg being
   the dropdown's own alias of the --vn-trail-green/--surface-2 pair that toggle
   uses directly) rather than a --home-profile-item row, since it isn't a
   navigation action. Stacked (label above, full-width pill below) rather
   than a single row — the dropdown's own min-width (190px) has no room for
   a "Theme" label plus three 44px tap targets side by side. */
.theme-toggle-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg) var(--space-md);
  border-bottom: 2px solid var(--df-hair);
  margin-bottom: var(--space-xs);
}
.theme-toggle-label {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}
.theme-toggle {
  display: flex;
  gap: var(--space-2xs);
  background: var(--df-chip-fill);
  border-radius: var(--radius-pill);
  padding: var(--space-2xs);
}
/* flex:1 rather than a fixed width — three equal shares of the dropdown's
   190px floor (minus its own padding and this row's) come out around 50px
   each, comfortably above --tap-min without risking overflow on a
   narrower future dropdown. */
.theme-toggle-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  background: none;
  border: none;
  border-radius: var(--radius-pill);
  color: var(--df-ink-soft);
  font-size: var(--fs-md);
  cursor: pointer;
}
.theme-toggle-btn:hover { background: var(--df-chip-fill-hover); }
.theme-toggle-btn.sel {
  background: var(--selected-bg);
  color: var(--on-selected);
}

/* Notification bell - same trigger/dropdown/open-class shape as
   .home-profile above, just an icon button instead of an avatar pill. */
.notification-bell { position: relative; }

.notification-bell-trigger {
  position: relative;
  width: var(--tap-min);
  height: var(--tap-min);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: var(--fs-md);
  cursor: pointer;
  flex-shrink: 0;
}

.notification-bell-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 var(--space-xs);
  border-radius: var(--radius-pill);
  background: var(--info);
  /* --info (#6853): a count of unread things is a neutral notice, not a stamp.
     --surface-2 flips with it: white on #35566E light, #242424 on #9EBCD2 dark. */
  color: var(--surface-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 16px;
  text-align: center;
}

/* renderNotificationBells() (js/notifications.js) adds this only on the
   transition from no unread notifications to some — a new thing arrived,
   worth a beat of attention — never on a count simply ticking upward while
   already visible, which would nag on every poll. */
@keyframes notification-badge-pop {
  from { transform: scale(0.4); }
}
.notification-bell-badge-pop {
  animation: notification-badge-pop var(--dur-feedback) var(--ease-out);
}

/*
  .home-main holds the mobile-width three-zone body:
    ② .home-body    — fills remaining space, scrolls internally
    ③ .home-footer  — pinned between 680px and 1024px; flows with the list on phones (#4667)
  On desktop this becomes a normal flowing column under the (now full-width)
  top bar — see the Desktop layout block above .stat-grid.
*/
.home-main {
  flex: 1;
  min-height: 0; /* lets this flex child shrink & scroll inside .home-screen */
  display: flex;
  flex-direction: column;
  width: 100%;
  /* Matches .app-main's documented 680px in-app cap (DESIGN.md) — this used
     to stop at 480px, leaving the screen a narrow ribbon on a tablet between
     that and the 1024px desktop breakpoint below. */
  max-width: 680px;
  margin: 0 auto;
  overflow: hidden;
}

/* Intermediate step so the 1024px jump to a grid isn't the first time the
   list changes shape — a tablet-width viewport already has the room. */
@media (min-width: 680px) {
  #my-trips-list .home-trip-section-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Wider than the flat look needed — see the ≥1024px block for why the
       hard offset shadow sets the gutter floor. */
    gap: var(--space-5xl) var(--space-4xl);
  }

  #my-trips-list .home-trip-card {
    margin-bottom: 0;
  }
}

/* ② Scrollable body.
   One rule, not the two stacked declarations this used to carry — the second
   fully overrode the first's `background`, so any edit to the first was
   silently dead.

   The scroll-hint fade is a translucent ink now rather than
   rgba(0,0,0,0.06), which was a black fade on a near-black ground in dark
   mode: the "more content below" cue existed in light mode only. It is also
   only the bottom fade — the old rule painted an opaque --surface-1 band
   across the top, which on this screen's halftone ground would blank the
   dots inside the band and leave them crisp immediately below it, the same
   ghost-band artefact DESIGN.md bans backdrop-filter for. */
.home-body {
  flex: 1;
  min-height: 0;          /* critical: lets flex child shrink & scroll */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--space-4xl) var(--space-4xl) var(--space-xl);
  background: linear-gradient(rgba(16, 26, 20, 0), var(--df-hair))
              bottom / 100% 24px no-repeat;
  background-attachment: scroll;
}

/* The stub-metadata / eyebrow voice: label tier, uppercase, wide tracking —
   the way anything printed onto a ticket is printed. Never used for a
   sentence. */
.home-section-label {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.3;
  color: var(--df-ink-soft);
  margin-bottom: var(--space-xl);
}

/* ── The one shout ──
   DESIGN.md allows exactly one loud element per screen, and on this one it is
   the screen's own name — until now an `sr-only` h1 with a duplicate `h2`
   section label immediately under it. Promoting it removes that duplication
   and gives the page an anchor above the card grid; the count eyebrow beside
   it is derived from the list already fetched (loadMyTrips), so it costs no
   request and states nothing the user's own data doesn't. */
.home-masthead {
  margin-bottom: var(--space-4xl);
}

.home-title {
  font-family: var(--df-display);
  /* #4412: boards H10-H13 draw this heading at 34px (phone) to 44px (desktop),
     line-height 1 — an exception to the Headline tier, recorded in DESIGN.md. */
  font-size: clamp(2.125rem, 5.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--df-ink);
  margin: 0;
}

.home-trip-section { margin-bottom: var(--space-4xl); }
.home-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}
.home-section-head .home-section-label { margin-bottom: 0; }
.home-section-new,
.home-section-toggle {
  min-height: var(--tap-min);
  padding: 0 var(--space-xl);
  background: none;
  border: 0;
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.3;
  color: var(--df-brand);
  cursor: pointer;
}
.home-section-toggle { display: block; margin-top: var(--space-md); }
/* #4101 (H10/H13) — "View all" sits right-aligned in the header row, beside
   "+ New trip", which is an outlined pill rather than plain green text. */
.home-section-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-left: auto;
}
.home-section-head .home-section-toggle { margin-top: 0; padding: 0; }
/* #4408 (H11) — the phone puts "View all" under the cards; 681px+ keeps the header row.
   #4811: the stamp panel has no copy under its card, so its "See all" stays in the header. */
.home-section-toggle-foot { display: none; }
@media (max-width: 680px) {
  .home-section-head .home-section-toggle:not(.home-stamps-see-all) { display: none; }
  .home-section-toggle-foot { display: block; padding: 0; }
}
.home-section-new {
  border: 2px solid var(--df-ink);
  border-radius: 999px;
  background: var(--df-panel);
  box-shadow: var(--df-press-hover);
  color: var(--df-ink);
  text-transform: none;
  letter-spacing: 0;
}
.home-trip-card[hidden] { display: none; }
/* The ID-scoped display:grid on the section list outranks the UA [hidden] rule; Archived starts hidden (#4052). */
#my-trips-list .home-trip-section-list[hidden] { display: none; }
/* #3488 (D65) — Upcoming beside an Ongoing hero: small cards, three across on desktop. */
.home-trip-section-compact .home-trip-card { min-height: 0; }
/* #4051 (D158/D164) — small cards (compact Upcoming, Past, Archived): two
   across from 680px, three from 1280px. 1024–1279px stays two: the main
   column is only two thirds of the page there (H13). Titles wrap to two lines;
   destination and meta keep their single-line ellipsis. */
@media (min-width: 680px) {
  #my-trips-list .home-trip-section-compact .home-trip-section-list,
  #my-trips-list .home-trip-section[data-section="past"] .home-trip-section-list,
  #my-trips-list .home-trip-section[data-section="archived"] .home-trip-section-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1280px) {
  #my-trips-list .home-trip-section-compact .home-trip-section-list,
  #my-trips-list .home-trip-section[data-section="past"] .home-trip-section-list,
  #my-trips-list .home-trip-section[data-section="archived"] .home-trip-section-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* Issue #4479 — small cards: location and dates are one truncated line each
   (H10/H13); hero cards keep their wrapping. The full text stays in the DOM. */
.home-trip-card:not(.home-trip-card-hero) .home-trip-meta {
  flex-wrap: nowrap;
  min-width: 0;
}
.home-trip-card:not(.home-trip-card-hero) .home-trip-meta > span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-trip-section-compact .home-trip-name,
.home-trip-section[data-section="past"] .home-trip-name,
.home-trip-section[data-section="archived"] .home-trip-name {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow-wrap: anywhere;
}

.home-count {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--df-brand);
  margin: var(--space-md) 0 0;
  min-height: 1.3em; /* holds its line while loading, so the grid never jumps */
}

/* Board H12 (#4114): a solid panel card with the hard offset shadow, like the
   other cards on the page. */
.home-empty {
  text-align: center;
  color: var(--df-ink-soft);
  font-size: var(--fs-md);
  padding: var(--space-5xl) var(--space-4xl);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}
.home-empty i {
  font-size: var(--fs-display-32);
  color: var(--df-brand);
  margin-bottom: var(--space-lg);
  display: block;
}
.home-empty-title {
  font-family: var(--df-sans);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--df-ink);
  margin-bottom: var(--space-xs);
}

.home-empty .btn-primary {
  box-shadow: 3px 3px 0 var(--df-ink);
}

/* Issue #298 — Create/Join actions inline in the empty state itself, not
   just a pointer down at the always-visible footer cards. */
.home-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

/* Alert Red, never Stamp Coral — coral is branded and must not read as
   danger. The keyline takes --error (which clears the 3:1 a non-text
   component needs); the message text takes the darkened text-safe step. */
.home-error {
  text-align: center;
  padding: var(--space-5xl) var(--space-4xl);
  background: var(--df-panel);
  border: 2px solid var(--error);
  border-radius: var(--df-radius-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
}
.home-error i { font-size: var(--fs-display-32); color: var(--error); }
.home-error div { color: var(--df-ink); font-size: var(--fs-sm); }
/* Retry ships as a .btn-secondary, which is the retired system's control: a
   pale grey fill with a soft edge and a 10px radius. Left alone it was the
   one unconverted object left on the screen, sitting inside a converted
   panel — precisely the half-converted seam DESIGN.md's whole-screen rule
   exists to prevent. Scoped here rather than rewriting .btn-secondary app-
   wide, which belongs to the surfaces that have not converted yet. */
.home-error button {
  min-width: 140px;
  min-height: var(--tap-min);
  padding: 0 22px;
  background: var(--df-panel);
  color: var(--df-ink);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  box-shadow: var(--df-press);
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--dur-feedback) var(--df-ease),
              box-shadow var(--dur-feedback) var(--df-ease);
}
.home-error button:hover {
  transform: translate(2px, 2px);
  box-shadow: var(--df-press-hover);
}
.home-error button:active {
  transform: translate(4px, 4px);
  box-shadow: var(--df-press-active);
}
.home-error button:disabled {
  opacity: 0.55;
  transform: none;
  box-shadow: var(--df-press);
  cursor: default;
}

/* ── Trip cards: the ticket stub ──
   A trip card is a boarding-pass stub, which is why DESIGN.md's `stub`
   component fits it without any DOM change: Cut Stock, a 2px ink keyline, a
   12px radius, a hard offset shadow, and — the part that makes it a stub
   rather than a card — a 2px dashed rule across it where the ticket was
   torn. The existing markup already splits exactly there: .home-trip-card-open
   is the passenger half, the action row the counterfoil below the
   perforation.

   The card fill was --surface-1 on a --surface-1 ground: a 1.0:1 fill behind
   a 1.21:1 border, so the boundary of the screen's primary control failed
   WCAG 1.4.11 (3:1) and effectively wasn't drawn at all. Cut Stock on the
   apricot ground plus the 2px ink keyline is 13.9:1 on the keyline. */
.home-trip-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  box-shadow: var(--df-press);
  margin-bottom: var(--space-4xl);
  overflow: hidden; /* keeps children's own padding/hover fill inside the rounded corners */
  /* Depth is hard offset ink, so the press IS the feedback and there is no
     colour-only hover: the stub moves into its own shadow. Transitions run
     the feedback tier — this is glanced at mid-tap, not lingered on. */
  transition: transform var(--dur-feedback) var(--df-ease),
              box-shadow var(--dur-feedback) var(--df-ease);
}
.home-trip-card:hover {
  transform: translate(2px, 2px);
  box-shadow: var(--df-press-hover);
}
.home-trip-card:active,
.home-trip-card:has(.home-trip-card-open:active) {
  transform: translate(4px, 4px);
  box-shadow: var(--df-press-active);
}

/* The stub you were last holding sits proudest on the pile — a deeper offset,
   not a coloured wash. The old rgba(15,110,86,0.04) fill was the *previous*
   brand teal (#0F6E56, not the current #10702A) and, being a literal rgba,
   never flipped for dark mode: at 4% over #1a1a1a it was invisible, so the
   active card lost its only fill signal after dark. */
.home-trip-card-active {
  box-shadow: var(--df-press-large);
}
.home-trip-card-active:hover {
  box-shadow: var(--df-press-hover);
}

/* Issue #1560 — hero card: the first Ongoing/Upcoming stub, ~3x a compact
   card. Content sits at the foot so the photo (when it lands) owns the top.
   No travelling entrance of its own: it rides the existing .home-trips-trace
   fade, which already resolves to its finished state under
   prefers-reduced-motion. */
.home-trip-card-hero { min-height: 0; }
.home-trip-card-hero .home-trip-card-open {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-md);
}
.home-trip-action {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--df-brand);
}
.home-hero-kicker {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--df-ink-soft);
}
.home-create-new { align-self: flex-start; min-width: var(--tap-min); }
/* Issue #5814 — empty Upcoming: the head has no actions, so hold it at the
   normal 44px (keeps the masthead gap) and centre a content-sized button. */
.home-trip-section-empty-create .home-section-head { min-height: var(--tap-min); margin-bottom: var(--space-2xl); }
.home-trip-section-empty-create .home-trip-section-list { justify-items: center; }
.home-trip-section-empty-create .home-create-new {
  grid-column: 1 / -1;
  justify-self: center;
  align-self: center;
  width: auto;
  min-height: var(--tap-min);
  padding-inline: var(--space-4xl);
}
@media (min-width: 680px) {
  #my-trips-list .home-trip-card-hero { grid-column: 1 / -1; }
}

/* A skeleton is not pressable — it must not offer the stub's press. */
.home-trip-card-skeleton { cursor: default; }
/* The skeleton's action row: the counterfoil below the tear. */
.home-trip-card-skeleton-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: var(--space-xl) var(--space-4xl);
  border-top: 2px dashed var(--df-hair);
}
.home-trip-card-skeleton:hover,
.home-trip-card-skeleton:active {
  transform: none;
  box-shadow: var(--df-press);
}

/* The card's main action — everything except Invite below. A real <button>
   (not the whole card as a <div onclick>) so it's reachable by keyboard and
   announced to a screen reader; Invite is a sibling button rather than
   nested inside this one, since a <button> may not contain another. */
.home-trip-card-open {
  display: block;
  width: 100%;
  /* Grid rows stretch cards to equal height (≥680px), so the passenger half
     has to absorb the slack — otherwise the tear rule and the counterfoil
     float in the middle of a tall stub instead of sitting at its foot. */
  flex: 1;
  background: none;
  border: none;
  appearance: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  /* The stub's body padding, with the extra foot DESIGN.md gives a print —
     optical, so the tear rule below doesn't crowd the metadata above it. */
  padding: var(--space-3xl) var(--space-3xl) var(--space-4xl);
  user-select: none;
}
/* No opacity dip — the stub's own press (above) is the feedback, and two
   overlapping acknowledgements of one tap read as a flicker. */
.home-trip-card-open:disabled { opacity: 0.55; cursor: default; }
/* #4444 — the card is overflow:hidden, so the global outside ring is clipped on
   the controls that span its full width. Ring them inset instead. */
.home-trip-card-open:focus-visible { outline: 3px solid var(--df-brand); outline-offset: -3px; box-shadow: none; }

.home-trip-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

/* Title tier — DESIGN.md names "stub names" as one of its call sites
   verbatim. Sentence case, not uppercase: the shout stops at headline tier. */
.home-trip-name {
  font-family: var(--df-title);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--df-ink);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-trip-arrow {
  color: var(--df-ink-soft);
  font-size: var(--fs-md);
  flex-shrink: 0;
}

/* The kicker pill: outlined only — a 2px currentColor keyline, transparent
   fill, label tier. The outline is what carries it, not the fill.
   Deliberately NOT the filled green pill this used to be: green is the
   system's one signal for "you can press this", and a status badge that
   isn't pressable spends it on decoration (the Pressable Green Rule).
   currentColor means it also just works on a photo stub, where the
   surrounding ink flips to the print's own foreground. */
.trip-card-current {
  background: transparent;
  color: inherit;
  border: 2px solid currentColor;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px var(--space-md) 2px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Issue #553 §8 — "Pending-request count on the My Trips card, host/co-host
   only." Filled amber, unlike .trip-card-current's outline-only kicker
   above: this one IS actionable (tap the card, go approve someone), so it
   earns the same amber-light/amber-text notice pairing used for
   pending-status callouts throughout this file. */
.home-trip-pending-badge {
  background: var(--info-light);
  color: var(--info);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 3px var(--space-md) 2px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

/* City + country, in the app's own words rather than only feeding a photo
   search — the card used to fetch this and throw it away (see
   applyDestinationPhoto below), so two trips to different cities with
   similar names were indistinguishable without the photo loading. */
.home-trip-destination {
  display: block;
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 400;
  line-height: 1.3;
  color: var(--df-ink-soft);
  margin-bottom: var(--space-xl);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-trip-destination i {
  font-size: var(--fs-xs);
  margin-right: var(--space-xs);
  vertical-align: middle;
}

/* Stub metadata takes the label voice: uppercase, wide
   tracking — printed onto the stub the way a gate and a seat number are.
   Uppercase label text is wide, so this wraps to two rows on a narrow card by
   design rather than being shrunk below the label tier. */
.home-trip-meta {
  display: flex;
  gap: var(--space-sm) var(--space-xl);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.3;
  color: var(--df-ink-soft);
  flex-wrap: wrap;
}
.home-trip-meta i {
  font-size: var(--fs-xs);
  margin-right: var(--space-xs);
  vertical-align: -2px;
}
/* Issue #1562 — hero prep checklist; same stub voice as the settle line. */
.home-trip-prep {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.home-trip-prep-item {
  display: block;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.3;
  color: var(--df-ink-soft);
}
.home-trip-prep-item i {
  font-size: var(--fs-xs);
  margin-right: var(--space-xs);
  vertical-align: -2px;
}
/* Issue #1563 — Past card's open-balance line; same stub voice as the meta row. */
.home-trip-settle {
  display: block;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.3;
  color: var(--df-ink-soft);
}
.home-trip-settle i {
  font-size: var(--fs-xs);
  margin-right: var(--space-xs);
  vertical-align: -2px;
}

/* Issue #3401 — finished-trip states on My Trips cards. */
.home-trip-stamp {
  display: inline-block;
  align-self: flex-start;
  margin-top: var(--space-xs);
  padding: 2px var(--space-sm);
  border: 2px solid currentColor;
  border-radius: var(--df-radius-chip, 4px);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.3;
}
.home-trip-stamp-cancelled { color: var(--df-coral); transform: rotate(-2deg); }
.home-trip-stamp-recap { color: var(--df-ink); background: transparent; }
/* On a compact card the stamp sits on the crew pile's line: centre it on the
   stickers and keep a real gap, instead of butting up against the last one. */
.home-trip-card:not(.home-trip-card-hero) .crew-pile { vertical-align: middle; }
.home-trip-card:not(.home-trip-card-hero) .crew-pile ~ .home-trip-stamp {
  vertical-align: middle;
  margin-top: var(--sp-sm);
  margin-left: var(--sp-md);
}
.home-trip-state-note {
  display: block;
  margin-top: var(--space-xs);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}
.home-trip-card-cancelled .home-trip-card-open { opacity: 0.65; }
.home-trip-wrapup {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-top: 2px dashed var(--df-ink);
  font-size: var(--fs-xs);
  color: var(--df-ink);
}
.home-trip-wrapup-text { flex: 1 1 11rem; font-size: var(--fs-xs); font-weight: 400; line-height: 1.4; }
.home-trip-wrapup-waiting {
  justify-content: flex-start;
  background: var(--info-light);
  color: var(--df-ink);
  font-weight: 600;
}

/* ── Destination photo (Pexels, best-effort — see applyDestinationPhoto in
   js/utils.js). Painted as a ::before layer rather than directly on the card
   so the gradient overlay can sit between the photo and the card's own
   content without the content needing its own background. Direct children
   get position:relative/z-index:1 so they (.home-trip-card-open and
   the action row) paint above the photo regardless of DOM order. The
   card itself (name, destination, dates) always renders first — this class
   + its ::before only get added once the trip list is already on screen and
   the photo has actually finished downloading (applyDestinationPhoto), then
   fades in via the -visible modifier rather than popping in. */
/* #6723 (#6636 slice 5, D169 over D121) — a photo card shows the photograph
   and sets its words on the Cut Stock band under it: no scrim, no lamplight
   text, so legibility never depends on which photo came back (the stock band
   is 13.9:1 ink on panel, whatever the picture). The photo is a strip across
   the top, 2px keyline between it and the band.

   #3320 — the strip's height is reserved by .home-trip-card-photo-slot the
   moment a card asks for a photo (_watchTripCardPhoto), so the photo landing
   fades in over its ground and moves nothing. The slot is dropped again only
   if no photo ever comes back.
   test/home-card-contrast.test.js pins "no scrim, words on the band". */
.home-trip-card-photo-slot,
.home-trip-card-photo {
  --card-photo-h: 132px;
  padding-top: var(--card-photo-h);
}
.home-trip-card-hero.home-trip-card-photo-slot,
.home-trip-card-hero.home-trip-card-photo { --card-photo-h: 168px; }
@media (min-width: 680px) {
  .home-trip-card-photo-slot,
  .home-trip-card-photo { --card-photo-h: 148px; }
  .home-trip-card-hero.home-trip-card-photo-slot,
  .home-trip-card-hero.home-trip-card-photo { --card-photo-h: 208px; }
}
.home-trip-card-photo-slot::before,
.home-trip-card-photo::before,
.home-trip-card-photo::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--card-photo-h);
  border-bottom: 2px solid var(--df-ink);
  pointer-events: none;
}
.home-trip-card-photo-slot::before,
.home-trip-card-photo::before { background: var(--df-ground); }
.home-trip-card-photo::after {
  background-image: var(--trip-card-photo);
  background-size: cover;
  background-position: var(--trip-card-photo-position, center);
  opacity: 0;
  transition: opacity var(--dur-view) var(--ease-out);
}
.home-trip-card-photo.home-trip-card-photo-visible::after { opacity: 1; }
/* #7546 — the open button's hit area reaches up over the photo strip, so a tap
   on the photo opens the trip. The card is the containing block (the button is
   static); the strip is transparent and the card's own photo layers are
   pointer-events:none, so the click lands here. Later siblings (wrap-up footer,
   the draft's delete button) are positioned after it and stay clickable. */
button.home-trip-card-open::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--card-photo-h, 0px);
}

/* ── Invite — was a permanent "TRIP CODE / ABC123XYZ" row on every card
   forever, a third of the card's height for a job that's actually done once
   per trip. Demoted to a compact copy-to-clipboard action; the code itself
   is still readable in-trip (Settings tab, #settingsTripCode) once someone
   has joined, so nothing that needed the code at rest is lost.

   It is now the stub's counterfoil: it spans the full width and is separated
   from the passenger half by a 2px dashed rule — the perforation the ticket
   tears along, which is DESIGN.md's literal reproduction rather than a scale
   step. That tear is why it lost its side margins and its own rounded box; a
   stub is one piece of card with a line across it, not two stacked
   components. */
/* Was three literal rgba(15,110,86,…) values — the *previous* brand teal
   (#0F6E56), not the current #10702A — which additionally never flipped for
   dark mode, so the confirmation was invisible after dark. --vn-trail-green-light
   already ships a correct dark step. The !important flags went with them:
   they existed only to out-rank the old invite hover, which a class
   ordered after it does not need. */
.home-trip-code-copied,
.home-trip-code-copied:hover {
  background: var(--vn-trail-green-light);
  color: var(--vn-trail-green);
}

/* shareTripInvite() (js/auth.js) swaps the button's whole innerHTML to a check
   icon + "Copied!" — that <i> is a freshly-inserted element each call, so it
   plays this animation on its own with no JS retrigger needed (unlike the
   .panel-enter remove/reflow/add pattern, which exists because that element
   persists across renders). One small pop, not a bounce — same reasoning as
   --ease-out above: this is glanced at mid-tap, not a moment to linger on. */
@keyframes home-invite-check-pop {
  from { opacity: 0; transform: scale(0.5); }
}
.home-trip-code-copied i {
  animation: home-invite-check-pop var(--dur-feedback) var(--ease-out);
}

/* ── Home entrance — trip cards land with a short cascade on a genuine
   arrival at My Trips (login, session restore, returning from a trip or
   Discover). This is the screen the app opens on, reopened far more often
   than the itinerary tab, so — unlike itin-trace (css ~4940) — it stays
   fast and uses plain fade+rise rather than the route-trace's spine-drawing
   language; a bigger production here would read as page-load choreography
   on a screen visited many times a session, not as a rehearsed moment.
   Armed only by showMyTrips(), consumed once by loadMyTrips()'s next
   render — the background refreshes loadMyTrips() also serves (accepting
   an invite, deleting a trip while sitting on this screen) must not replay
   it. See _homeTripsTraceArmed in js/auth.js, same arm/consume split as
   _itinTraceArmed. Stagger caps at the 6th card — a long trip list arrives
   as two waves, not a card-by-card recital. */
@keyframes home-card-enter {
  from { opacity: 0; transform: translateY(8px); }
}
.home-trips-trace .home-trip-card,
.home-trips-trace .home-empty {
  animation: home-card-enter var(--dur-state) var(--ease-out) both;
  animation-delay: calc(var(--trace-i, 0) * var(--trace-tick));
}

/* #6243 — first load: each real card crossfades over its skeleton slot (opacity
   only, no travel), so the list is never empty or hidden. */
@keyframes home-card-crossfade {
  from { opacity: 0; }
}
.home-trips-crossfade { position: relative; }
/* The legal footer sits below the list; while the list loads it would be pushed down the
   moment the cards land, so it waits (hidden, still laid out) rather than shifting (#6243). */
.home-main:has(#my-trips-list[aria-busy="true"]) .home-footer { visibility: hidden; }
.home-trips-ghost {
  position: absolute; inset: 0 0 auto 0; pointer-events: none;
  animation: home-ghost-out var(--dur-state) var(--ease-out) both;
}
@keyframes home-ghost-out { to { opacity: 0; } }
.home-trips-crossfade .home-trip-card,
.home-trips-crossfade .home-empty {
  animation: home-card-crossfade var(--dur-state) var(--ease-out) both;
}
/* A late section (requests, Where to go, Stamps) crossfades inside its reserved space. */
.home-mount-fade > * {
  animation: home-card-crossfade var(--dur-state) var(--ease-out) both;
}
.home-city-card-skeleton { overflow: hidden; }
/* ③ Footer — the legal links alone (#4109): a plain row, no box or panel at
   any width. */
.home-footer {
  flex-shrink: 0;
  padding: var(--space-3xl) var(--space-4xl) var(--space-4xl);
}

/* #4667 phone home */
/* On phones the legal links are no longer pinned (they took ~140px of a 844px
   screen): the whole column scrolls and the footer ends the list, with the
   home-indicator inset below it. Desktop already flows (>=1024px). */
@media (max-width: 680px) {
  .home-main {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .home-body {
    flex: none;
    overflow: visible;
    background: none; /* no inner scroll region left to hint at */
  }
  .home-footer {
    padding-bottom: calc(var(--space-4xl) + env(safe-area-inset-bottom));
  }
}
/* end #4667 phone home */

.home-footer .home-section-label {
  margin-bottom: var(--space-xl);
}

/* Issue #35 — footer legal notice */
.home-legal-notice {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-top: var(--space-3xl);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--df-ink-soft);
}
.home-legal-notice a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  color: var(--df-ink-soft);
  text-decoration: underline;
}
.home-legal-notice span { margin: 0 var(--space-sm); }

.home-action-cards {
  display: flex;
  gap: var(--space-xl);
}

/* These are stubs you press, so they take the stub's geometry and DESIGN.md's
   press states: hover translates 2px into a halved offset, active seats the
   object fully into the page. No colour-only hover — the press is the
   feedback.

   The three used to hover to three different hues (indigo / teal / coral),
   which spends the palette's colour *assignments* on decoration: green means
   pressable, coral means stamped, amber means routed. They also read as three
   co-equal actions when they are not. So the roles split the way the system's
   buttons do — New Trip is the primary and carries the green fill, the other
   two are secondary Cut Stock — which is both on-vocabulary and an honest
   hierarchy. (The indigo hover lived in css/discover.css and was removed
   there; see the note at .home-action-discover.) */
.home-action-card {
  flex: 1;
  min-height: var(--tap-min);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  box-shadow: var(--df-press);
  padding: var(--space-xl) var(--space-md);
  text-align: center;
  appearance: none;
  font-family: var(--df-sans);
  color: var(--df-ink);
  cursor: pointer;
  transition: transform var(--dur-feedback) var(--df-ease),
              box-shadow var(--dur-feedback) var(--df-ease);
  user-select: none;
}
.home-action-card:hover {
  transform: translate(2px, 2px);
  box-shadow: var(--df-press-hover);
}
.home-action-card:active {
  transform: translate(4px, 4px);
  box-shadow: var(--df-press-active);
}

/* The one primary. --df-brand-fg, never a literal white: --vn-trail-green is a deep
   green in light mode and a bright mint after dark, where white on it is
   1.31:1 (issue #432). */
.home-action-create {
  background: var(--vn-trail-green);
  color: var(--df-brand-fg);
}
.home-action-create .home-action-icon,
.home-action-create .home-action-label,
.home-action-create .home-action-desc { color: inherit; }

.home-action-icon  { font-size: var(--fs-xl); margin-bottom: var(--space-sm); display: block; }
/* Bricolage at 800 is a wider face than the system stack this replaced, and
   three of these share one row — so the label holds at --fs-md rather than
   taking the title tier's 17px, which pushed "Discover" onto two lines
   inside a ~67px column at 320px. */
.home-action-label {
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2xs);
  color: var(--df-ink);
}
.home-action-desc  { font-size: var(--fs-xs); color: var(--df-ink-soft); }

/* Below this, three cards sharing one row leave too little width for the
   description line to read as a line — it wraps to three lines of 12px
   text instead. Icon + label alone still say what each card does. Raised
   from 380px with the conversion: the body face at --fs-sm is a touch wider than
   the system stack it replaced, so "Explore shared trips" started wrapping
   before the old threshold rather than at it. */
@media (max-width: 420px) {
  .home-action-desc { display: none; }
}

/* Desktop: the mobile 3-zone phone-frame layout relaxes into a normal
   flowing page — .home-screen/.home-main stop being height-constrained,
   and the content column widens to match .app's (see the Desktop layout
   block above .stat-grid), now centered since there's no sidebar. */
@media (min-width: 1024px) {
  .home-screen {
    height: auto;
    /* ...but never shorter than the viewport. Dropping the height constraint
       lets a short list end mid-window, and with a painted ground rather than
       the old flat --surface-1 that leaves a visible band of the document's
       own background under the page. */
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }

  .home-main {
    flex: none;
    /* #3982 (D164): no fixed cap. Both columns are centred together by side
       space that shrinks with the viewport and stops at 220px: 92px at
       1024px, 220px at 1280px, then the columns grow. */
    max-width: none;
    height: auto;
    overflow: visible;
    padding-block: 1.5rem;
    padding-inline: var(--screen-side-pad);
  }

  /* #3982 (D155): trips 2fr, Browse/stamps 1fr. The side column is not
     sticky. min-width: 0 lets the card grids shrink inside their track. */
  #my-trips-list .home-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }
  #my-trips-list .home-col-main,
  #my-trips-list .home-col-side { min-width: 0; }

  .home-body {
    background: none; /* no inner scroll region left to hint at */
    /* #4412: H10/H13 put the heading 24px under the bar, which is .home-main's
       padding alone. */
    padding-top: 0;
  }

  /* #4412: 20px from the heading to the first section label. The 5px plus the
     15px a 44px section head centres its label by gives H10's 20px. */
  .home-masthead {
    margin-bottom: 5px;
  }
  #my-trips-list {
    padding-top: 0;
  }

  /* The hard offset shadow lives outside the stub's own box, so the grid gap
     has to clear it or the next column sits on top of its neighbour's
     shadow — the one place this system needs more gutter than the flat
     look did. */
  #my-trips-list .home-trip-section-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-5xl) var(--space-4xl);
  }

  #my-trips-list .home-trip-card {
    margin-bottom: 0;
  }

  .home-footer {
    margin-top: var(--space-5xl);
  }
}

@media (min-width: 1280px) {
  #my-trips-list .home-grid { gap: 40px; }
}

/* ==================== Day-Box Itinerary ==================== */
/* The day pager (#5949, "Sticky Day Pager"): navigation, not a filter. It sticks
   under the fixed top bar, so the offset is the bar's own token and a re-valued
   --topbar-h (Floating Pass) carries it along. --itin-pager-h is the pager's
   measured height (js/itinerary.js _itinSyncPager()) so a jump lands the day
   header just below it; the rem fallback only covers the first paint. */
#itin-date-strip {
  position: sticky;
  top: var(--topbar-h);
  z-index: 20;
  margin: 0 0 var(--space-md);
  padding: var(--space-sm) 0 var(--space-xs);
  /* The trip ground (apricot, 2026-11-24), so the pager reads as part of the
     page, not a band across it. Opaque because it is sticky and the list
     scrolls under it. */
  background: var(--df-ground);
  border-bottom: 2px solid var(--df-ink);
  /* Once stuck the pager must not move at all (#6164): keep the browser's scroll
     anchoring from nudging it as the list above/below it changes. */
  overflow-anchor: none;
}
#itinerary-content .day-box {
  scroll-margin-top: calc(var(--topbar-h) + var(--itin-pager-h, 8.5rem) + var(--space-md));
  /* #6990 - a day off screen skips style, layout and paint until it nears the
     viewport. 'auto' on the size remembers each day's real height once seen, so
     only the first pass uses the 800px estimate (a day of about six stops). */
  content-visibility: auto;
  contain-intrinsic-size: auto 800px;
}
.itin-pager-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.itin-pager-day {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.itin-pager-eyebrow {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--df-ink-soft);
}
.itin-pager-title {
  max-width: 100%;
  font-family: var(--df-sans);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.2;
  color: var(--df-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.itin-pager-arrow {
  flex-shrink: 0;
  width: var(--tap-min);
  height: var(--tap-min);
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: var(--df-panel);
  color: var(--df-ink);
  font-size: var(--fs-md);
  cursor: pointer;
  font-family: inherit;
}
.itin-pager-arrow:hover:not(:disabled) { background: var(--df-hair); }
.itin-pager-arrow:disabled { opacity: 0.35; cursor: default; }

/* One equal-width segment per trip day, no labels, so a 30-day trip fits at
   390px. The container is the tap row; each segment's ::before grows its hit
   box to 44px tall and is capped at the segment's own width (the pitch), so two
   neighbours' zones never overlap. */
.itin-pager-segs {
  display: grid;
  grid-template-columns: repeat(var(--pager-days, 1), minmax(0, 1fr));
  gap: 2px;
  align-items: center;
  min-height: var(--tap-min);
}
.itin-pager-seg {
  position: relative;
  height: 14px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: var(--df-amber);
  opacity: var(--seg-o, 1);
  cursor: pointer;
}
.itin-pager-seg::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: var(--tap-min);
  transform: translate(-50%, -50%);
}
.itin-pager-seg.is-empty {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--df-amber);
  opacity: 1;
}
/* The day you are on: ink, taller, and full strength whatever its stop count. */
.itin-pager-seg.is-current {
  height: 20px;
  background: var(--df-ink);
  box-shadow: none;
  opacity: 1;
}
.itin-pager-seg.is-today::after {
  content: '';
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--df-ink);
}

.itin-pager-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

/* Issue #447 — was a hard-coded 24x24, 45% of --tap-min. Grown rather than
   given .stop-menu-btn's ::before expansion: the two buttons sit --space-2xs
   apart, so two 44px zones centered 26px apart would overlap by 18px and a tap
   on "zoom out" would land on "zoom in" (the same collision .discover-like-btn
   documents). The calendar's zoom pair is the only user left (#5949). */
.itin-timeline-zoom-btn {
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: var(--df-panel);
  color: var(--df-ink-soft);
  font-size: var(--fs-sm);
  cursor: pointer;
  font-family: inherit;
}
.itin-timeline-zoom-btn:hover { background: var(--df-hair); }
.itin-timeline-zoom-btn:disabled { opacity: 0.35; cursor: default; }

/* ==================== Itinerary calendar view (issue #159) ==================
   Multi-day time grid — days as columns, hours as rows. Sticky day headers
   (top) + sticky hour gutter (left) via position:sticky inside one scrolling
   grid, matching every itinerary drag control's Pointer Events pattern
   (initTimelineRangeDrag/onDayMapResizeStart) rather than SortableJS — that
   library is for list reordering, not 2-D time positioning. Column width is
   fixed (sized to fit one page — see _calColWidth() in js/itinerary.js — set
   inline on .itin-cal-grid's grid-template-columns), not part of what zoom
   (vertical only) affects. Issue #452: a page renders exactly as many
   columns as it has real days, never padded to fill the box — see
   _calendarPages() in js/itinerary.js for how a page's days are chosen
   (trip-leg boundaries, then container width). */
/* Zoom control row (see zoomCalendar()/resetCalendarZoom() in js/itinerary.js)
   — reuses the .itin-timeline-zoom-btn for the -/+ buttons. */
.itin-cal-zoom-row {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  justify-content: flex-end;
  margin-bottom: var(--space-sm);
}
/* Page navigation is the shared day pager (#itin-date-strip, #6404); the zoom row
   only carries - / Fit / +. */
.itin-cal-zoom-fit-btn { min-height: var(--tap-min); min-width: var(--tap-min); }
/* #6404 - the zoom is one pill: beside the pager from 1024px, beside the phone view
   switch below it (the toolbar copy, filled by renderDateStrip()). */
.itin-cal-zoom {
  display: inline-flex;
  flex: none;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--df-panel);
}
.itin-cal-zoom .itin-timeline-zoom-btn,
.itin-cal-zoom .itin-cal-zoom-fit-btn { border: 0; border-radius: 0; }
.itin-cal-zoom .itin-cal-zoom-fit-btn + .itin-timeline-zoom-btn,
.itin-cal-zoom .itin-timeline-zoom-btn + .itin-cal-zoom-fit-btn { border-left: 2px solid var(--df-ink); }
.itin-cal-zoom-slot { display: contents; }
.itin-cal-zoom-toolbar { margin-left: auto; }
.itin-pager-zoom { display: none; }
@media (min-width: 1024px) {
  .itin-cal-zoom-toolbar { display: none; }
  .itin-pager-zoom { display: inline-flex; }
}
.itin-cal-zoom-fit-btn {
  height: var(--tap-min);
  padding: 0 var(--space-lg);
  font-size: var(--fs-xs);
  font-weight: 600;
  font-family: inherit;
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: var(--df-panel);
  color: var(--df-ink-soft);
  cursor: pointer;
}
.itin-cal-zoom-fit-btn:hover { background: var(--df-hair); }
.itin-cal-zoom-fit-btn.active {
  background: var(--selected-bg);
  color: var(--on-selected);
}

.itin-calendar {
  --cal-gutter-w: 48px; /* keep in sync with CAL_GUTTER_WIDTH in js/itinerary.js */
  --cal-hour-h: 56px; /* keep in sync with CAL_HOUR_HEIGHT in js/itinerary.js */
  /* The grid only ever renders one page (up to CAL_WEEK_COLS days — often
     fewer, at a trip-leg boundary or a narrow container, issues #452/#445) at
     a time — see renderItineraryCalendar() in js/itinerary.js — and _calColWidth()
     shrinks each column to fit whatever width #itinerary-content actually
     has (down to CAL_MIN_COL_WIDTH), so in the common case there's nothing
     to scroll horizontally at all; prev/next re-renders a different slice
     instead. But CAL_MIN_COL_WIDTH is a real floor, not just a cosmetic
     minimum — once the Ideas sidebar (see .itin-layout's desktop
     grid-template-columns) is expanded on a narrower desktop width, seven
     columns at that floor can genuinely no longer fit, and clipping that
     instead of scrolling to it left part of the week impossible to see.
     overflow-x:auto only ever shows a scrollbar in that genuine overflow
     case — it's a no-op the rest of the time, same as hidden was. Vertical
     scroll (tall hour ranges) stays free either way — hence overflow-y, not
     a blanket `overflow: auto` shorthand that would look identical here.
     An earlier version rendered every week in one continuous grid and used
     CSS scroll-snap + JS-driven scrollLeft to page between them; that
     turned out to be fragile in ways only a real browser exposed (a
     gutter-offset math error, then Chrome cancelling a smooth scrollTo()
     mid-animation because mandatory snap kept re-evaluating and springing
     it back to page 1) — paginating by re-render sidesteps that class of
     bugs entirely; this scrollbar is purely a fallback for the one real
     page's own content not fitting, not a substitute for that pagination. */
  overflow-x: auto;
  overflow-y: auto;
  /* Keep in sync with _calAvailableBoxHeight() in js/itinerary.js — that
     function computes the "Fit" zoom level's target height without
     measuring the live DOM, so it has to assume this exact box size. */
  max-height: min(70vh, 640px);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  background: var(--df-panel);
}
.itin-cal-grid {
  display: grid;
  grid-template-rows: auto auto 1fr;
  width: max-content;
  min-width: 100%;
}
.itin-cal-corner,
.itin-cal-daycol-header {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--df-panel);
  border-bottom: 2px solid var(--df-hair);
}
.itin-cal-corner { left: 0; z-index: 4; }
.itin-cal-daycol-header {
  /* Fixed, not padding-derived — keep in sync with CAL_HEADER_ROW_HEIGHT in
     js/itinerary.js, which assumes this exact height for the "Fit" zoom
     calculation. .itin-cal-corner (no explicit height) stretches to match
     via the grid's default align-items:stretch. Issue #952 grew it 32 → 44px
     for the two-line date header (calDayHeaderLabelHtml()); grow both
     together or not at all. Issue #154 Phase 3's plan badge lives inside
     this row too — gap only, height/centering untouched. */
  min-height: 56px;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  align-content: center;
  gap: var(--space-2xs) var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--df-ink);
  border-left: 2px solid var(--df-hair);
}
/* Lets the plan badge keep its fixed size at 72px (CAL_MIN_COL_WIDTH) by
   giving the day label somewhere to shrink to first. */
.itin-cal-daycol-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Issue #952 — a dated column stacks the date over "Sat (Day 2)". Each
   line ellipsises on its own at the 72px column floor. */
.itin-cal-daycol-label-dated {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.itin-cal-daycol-date,
.itin-cal-daycol-sub {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.itin-cal-daycol-date {
  font-family: var(--df-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--df-ink);
}
.itin-cal-daycol-sub {
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--df-ink-soft);
}
/* Today (#6404): an ink stamp on the header, a faint ink wash down the column.
   Ink, not coral or amber (#6853): those mean stamped and routed only. */
.itin-cal-today-stamp {
  margin-left: auto;
  padding: 1px var(--space-xs);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-print);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: rotate(-4deg);
}
.itin-cal-daycol-header.is-today,
.itin-cal-allday-cell.is-today,
.itin-cal-daycol-body.is-today { background: color-mix(in srgb, var(--df-ink) 6%, var(--df-panel)); }
/* S6: the named Main / Sub-Trip toggle, on a column of 120px or more. */
.itin-cal-side-toggle {
  display: inline-flex;
  flex: none;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.itin-cal-side-seg {
  position: relative;
  min-height: 24px;
  padding: 0 var(--space-sm);
  border: 0;
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
}
.itin-cal-side-seg::before { content: ''; position: absolute; inset: -10px 0; }
.itin-cal-side-seg.is-on { background: var(--df-ink); color: var(--df-panel); cursor: default; opacity: 1; }
/* Issue #154 Phase 3 — compact clickable A/B flip control. A bare letter,
   not planLabel()'s "Main Trip"/"Sub-Trip" text (used only for title/aria-label):
   the header has no room for it, especially at the 72px column floor. */
/* Visible box stays 16px to fit the header row and the 72px column floor
   (CAL_MIN_COL_WIDTH) — the
   ::before pseudo expands the actual tappable area instead, same technique
   as .stop-menu-btn. Capped at 24px (the WCAG AA floor, not the fuller
   --tap-min) since the column is only 72px wide and adjacent-day badges
   sit close enough that a larger zone would start overlapping them. */
.itin-cal-side-badge {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  padding: 0;
  line-height: 1;
  border-radius: 4px;
  border: 1px solid currentColor;
  background: transparent;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
}
.itin-cal-side-badge::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(24px, 100%);
  height: max(24px, 100%);
  transform: translate(-50%, -50%);
}
.itin-cal-side-badge.trip-main { color: var(--trip-main-accent); background: var(--trip-main-bg); }
.itin-cal-side-badge.trip-sub { color: var(--vn-sky-text); background: var(--vn-sky-light); }
.itin-cal-allday-label,
.itin-cal-hours {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--df-panel);
}
.itin-cal-allday-label {
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--df-ink-soft);
  padding: var(--space-xs) var(--space-sm);
  border-bottom: 2px solid var(--df-hair);
  display: flex;
  align-items: center;
}
.itin-cal-allday-cell {
  /* Fixed, not min-height — keep in sync with CAL_ALLDAY_ROW_HEIGHT in
     js/itinerary.js (same "Fit" calculation reasoning as the header row
     above). Scrolls internally rather than growing the row when a day has
     more untimed stops than fit — matches how e.g. Google Calendar handles
     an overflowing all-day band instead of pushing the whole grid down. */
  height: 40px;
  box-sizing: border-box;
  overflow-y: auto;
  padding: var(--space-xs);
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: var(--space-xs);
  border-bottom: 2px solid var(--df-hair);
  border-left: 2px solid var(--df-hair);
}
.itin-cal-chip {
  position: relative; /* anchors the ::before plan stripe below */
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-xs);
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-pill);
  /* #7110 - the board draws the Any time chip as a Cut Stock pill: panel fill, 2px ink keyline, ink label,
     the glyph in its category hue (green means pressable only). */
  --cal-hue: var(--df-ink-soft);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  color: var(--df-ink);
  white-space: nowrap;
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.itin-cal-chip > .ti:first-child { color: var(--cal-hue); }
.itin-cal-chip.cat-food { --cal-hue: var(--vn-pandan); }
.itin-cal-chip.cat-transport { --cal-hue: var(--vn-sky); }
.itin-cal-chip.cat-shopping { --cal-hue: var(--vn-batik); }
.itin-cal-chip.cat-hotel { --cal-hue: var(--vn-indigo); }
.itin-cal-chip.cat-activity { --cal-hue: var(--vn-green); }
.itin-cal-chip.cat-attraction { --cal-hue: var(--vn-purple); }
.itin-cal-chip.editable { cursor: grab; touch-action: none; }
.itin-cal-chip.dragging { cursor: grabbing; opacity: 0.6; }
.itin-cal-hours {
  position: relative;
  width: var(--cal-gutter-w);
}
.itin-cal-hour-label {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  text-align: right;
  padding: var(--space-2xs) var(--space-sm) 0 0;
  box-sizing: border-box;
  /* 1px, not the system's usual 2px keyline — this repeats once per hour
     row (up to ~24 times per column), and the full keyline weight reads as
     visual noise across a grid this dense. Same exception as
     .itin-cal-hourline below. */
  border-top: 1px solid var(--df-hair);
}
.itin-cal-hour-label:first-child { border-top: none; }
.itin-cal-daycol-body {
  position: relative;
  border-left: 2px solid var(--df-hair);
}

/* Precise drop preview — shows exactly where a dragged block/chip/idea will
   land (real duration-derived height, snapped time), not just which day
   column it's currently over. Replaces the old whole-column tint, which
   told the user which day but never what time (see _calShowDropGhost() /
   _calHideDropGhost() in js/itinerary.js — one shared ghost node reused
   across every calendar drag source, since only one drag runs at a time). */
.itin-cal-drop-ghost {
  position: absolute;
  left: 2px;
  right: 2px;
  box-sizing: border-box;
  border: 2px dashed var(--vn-trail-green);
  border-radius: 4px;
  background: var(--vn-trail-green-light);
  color: var(--vn-trail-green);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-2xs) var(--space-sm);
  font-size: var(--fs-xs);
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
  z-index: 40;
}

/* Highlights the Ideas sidebar itself while a scheduled stop/chip is
   dragged over it — dropping there unschedules it (see the dropOnIdeas
   branches in js/itinerary.js's calendar drag handlers). */
#itin-ideas-sidebar.cal-drop-target {
  outline: 2px dashed var(--info);
  outline-offset: -2px;
  background: var(--info-light);
}

.itin-cal-hourline {
  position: absolute;
  left: 0;
  right: 0;
  /* 1px hairline, not the 2px keyline — see .itin-cal-hour-label above. */
  border-top: 1px solid var(--df-hair);
  pointer-events: none;
}

/* Issue #218, #6404 - the travel leg between two consecutive calendar blocks is the
   dashed route: a Route Amber line from one block's bottom to the next block's top,
   the icon and time beside it. Never interactive - the blocks either side own
   drag/double-click. */
.itin-cal-leg {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 1;
}
.itin-cal-leg::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  border-left: 3px dashed var(--df-amber);
}
.itin-cal-leg-label {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  box-sizing: border-box;
  /* #3448 - overflow impossible by construction: never wider than the column,
     the text (not the icon) is what gives way. */
  min-width: 0;
  max-width: calc(100% - 28px);
  color: var(--df-ink-soft);
  font-size: var(--fs-xs);
  line-height: 16px;
  white-space: nowrap;
  overflow: hidden;
}
.itin-cal-leg-label > i { flex: 0 0 auto; }
.itin-cal-leg-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* #3448 - a gap shorter than the label: drawing it would overlap the stops. Clipped,
   not display:none, so the leg stays readable to assistive tech. */
.itin-cal-leg-tight .itin-cal-leg-label {
  position: absolute;
  width: 1px;
  height: 1px;
  max-width: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.itin-cal-block {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1px;
  /* Issue #545 follow-up (design critique) — was 4px, not on DESIGN.md's
     radius scale (pill/12/14/3px) at all; 3px (the print/stamp radius) is
     the nearest fit for a small flat block. Border bumped 1.5px -> 2px for
     the same reason — the .cat-* rules below only ever override the colour,
     never the width/style. */
  border-radius: var(--df-radius-print);
  /* #6404 - the print style: category fill, 2px ink keyline, hard offset shadow;
     the icon carries the category hue (--cal-hue). */
  --cal-hue: var(--vn-trail-green);
  border: 2px solid var(--df-ink);
  border-bottom-style: solid;
  background: var(--vn-trail-green-light);
  box-shadow: 3px 3px 0 var(--df-ink);
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--fs-xs);
  line-height: 1.3; /* accessibility floor (#445) — was 1.25 */
  overflow: hidden;
  cursor: pointer;
  z-index: 1;
}
/* Estimated (category-default fallback) duration — dashed bottom edge, so
   the user can always tell which numbers are theirs (issue #159 design
   decision #2). */
.itin-cal-block.estimated { border-bottom-style: dashed; }
.itin-cal-block.editable .itin-cal-block-draghandle { cursor: grab; touch-action: none; }
.itin-cal-block.dragging { opacity: 0.55; z-index: 50; box-shadow: var(--df-press-large); }
.itin-cal-block.resizing { box-shadow: 0 0 0 2px var(--vn-trail-green); }

/* ── #6405 Calendar: a click opens a stop in the Lifted card ─────────────────
   #itin-cal-stop-card holds the same card List uses (renderStopCard(), #6208).
   .in-rail: top of the right rail, above Ideas (the rail is a flex column then, see
   .stamps-in-rail). .in-place: lifted over the grid on the block it came from, the
   grid dimmed behind it; openCalStop() sets left/top/width and keeps it on screen. */
.itin-cal-stop-card[hidden] { display: none; }
.itin-cal-stop-card {
  position: relative;
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  box-shadow: var(--df-press);
  background: var(--df-panel);
  overflow-y: auto;
  min-width: 0;
}
.itin-cal-stop-card.in-rail { flex: 0 0 auto; max-height: 70vh; max-height: 70dvh; }
.itin-cal-stop-card.in-place {
  position: fixed;
  z-index: 60;
  box-shadow: var(--df-press-lift);
}
/* The card's own summary row already carries the chevron; the close button sits
   over its corner, clear of the "⋯" and chevron. */
.itin-cal-stop-card-close {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  z-index: 2;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--df-ink);
  cursor: pointer;
}
/* Room for the close button beside the row's own menu and chevron. */
.itin-cal-stop-card .stop-summary-row { padding-inline-end: calc(var(--tap-min) + var(--space-xs)); }
.itin-cal-stop-card .itin-stop-card { border: 0; box-shadow: none; margin: 0; }
/* The opened block stays raised; in place the rest of the grid dims behind the card. */
.itin-cal-block.is-open, .itin-cal-chip.is-open { z-index: 40; box-shadow: var(--df-press-large); transform: translateY(-2px); }
.itin-calendar.has-open-card .itin-cal-block:not(.is-open),
.itin-calendar.has-open-card .itin-cal-chip:not(.is-open) { opacity: 0.45; }
.itin-cal-block:focus-visible, .itin-cal-chip:focus-visible { outline: 3px solid var(--df-ink); outline-offset: 2px; }

/* S4: the dragged block tilts (transform is set by startCalBlockMove()); its time tag follows the pointer. */
.itin-cal-time-tag {
  position: fixed;
  z-index: 70;
  pointer-events: none;
  padding: var(--space-2xs) var(--space-sm);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-print);
  background: var(--df-ink);
  color: var(--df-panel);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
}
/* S10: an idea dragged in leaves a faded row (.itin-stop-card.dragging) and a tilted copy follows. */
.itin-cal-idea-float {
  position: fixed;
  z-index: 70;
  pointer-events: none;
  max-width: 220px;
  padding: var(--space-sm) var(--space-lg);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  background: var(--df-panel);
  box-shadow: var(--df-press-lift);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: rotate(-3deg);
}
.itin-cal-drop-ghost.is-slot {
  border: 2px dashed var(--df-ink);
  background: var(--df-ground);
  color: var(--df-ink);
  font-weight: 600;
}


/* Issue #154 Phase 3 — plan stripe on a calendar block/chip. A ::before,
   deliberately NOT an inset box-shadow like .itin-stop-card.plan-* uses:
   .dragging/.resizing above already own box-shadow, and box-shadow is
   REPLACED rather than merged by a later-winning rule, so an inset-shadow
   stripe would vanish mid-drag and mid-resize. A pseudo-element is a
   separate box that composes with anything, including states nobody's
   written yet. Stripe only, no background wash — unlike a list-view stop
   card, a calendar block already carries its category as fill + border
   (.itin-cal-block.cat-* below), which must survive untouched. */
.itin-cal-block.trip-main::before,
.itin-cal-block.trip-sub::before,
.itin-cal-chip.trip-main::before,
.itin-cal-chip.trip-sub::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 4px 0 0 4px;
  pointer-events: none;
}
.itin-cal-block.trip-main::before, .itin-cal-chip.trip-main::before { background: var(--trip-main-accent); }
.itin-cal-block.trip-sub::before, .itin-cal-chip.trip-sub::before { background: var(--vn-sky); }
/* Icon + title share one row (rather than each being its own display:block
   line) so the title always has a single, predictable row to truncate
   into — see the .size-compact/.size-micro bands below for what happens
   when the block is too short to also fit the time underneath. */
.itin-cal-block-main {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
  overflow: hidden;
}
.itin-cal-block-icon { flex: none; color: var(--cal-hue); }
.itin-cal-block-title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  color: var(--df-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.itin-cal-block-time {
  flex: none;
  color: var(--df-ink-soft);
  font-size: var(--fs-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Size bands (applied via JS from the rendered pixel height, see
   _calBlockSizeClasses()/_applyCalBlockSizeClasses() in js/itinerary.js) —
   dropping the time line, then the icon, then tightening padding, keeps the
   title itself visible no matter how short the block is resized to, instead
   of overflow:hidden silently clipping it out along with everything else. */
.itin-cal-block.size-compact { padding: var(--space-2xs) var(--space-xs); gap: 0; }
.itin-cal-block.size-compact .itin-cal-block-time { display: none; }
.itin-cal-block.size-micro { padding: 1px var(--space-xs); font-size: var(--fs-xs); }
.itin-cal-block.size-micro .itin-cal-block-icon { display: none; }
.itin-cal-block-draghandle {
  position: absolute;
  /* Leaves a 6px strip free at both the top and bottom edges for the two
     resize handles below — otherwise this (the move handle) would sit on
     top of them and swallow every resize-start pointerdown. */
  inset: 6px 0 6px 0;
  cursor: grab;
  touch-action: none;
}
.itin-cal-block-resizer,
.itin-cal-block-resizer-top {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  cursor: ns-resize;
  touch-action: none;
  z-index: 1;
}
.itin-cal-block-resizer { bottom: 0; }
.itin-cal-block-resizer-top { top: 0; }
.itin-cal-block-resizer:hover,
.itin-cal-block-resizer-top:hover { background: rgba(0,0,0,0.08); }

/* Alternative half of a shared slot (issue #59 + #159 design decision #7) —
   dashed/tinted, distinct from a genuine confirmed-vs-confirmed clash. */
.itin-cal-block-alt {
  border-style: dashed;
  background: var(--df-panel);
  opacity: 0.9;
}
.itin-cal-block-alt.editable { cursor: grab; touch-action: none; }
.itin-cal-swap-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: var(--vn-trail-green);
  color: var(--surface-2);
  font-size: var(--fs-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

/* Dedicated "drop here to demote" strip (issue #159 design decision #8) —
   hidden by default, revealed only along a confirmed block's bottom edge
   while ANY stop is mid-drag (see _revealCalAltStrips() in js/itinerary.js),
   never overlapping the resizer or drag handle above it. */
.itin-cal-alt-strip {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  background: var(--info-light);
  color: var(--info);
  border-top: 1px dashed var(--info);
  font-size: var(--fs-xs);
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.itin-cal-alt-strip.hover {
  background: var(--vn-coral);
  color: var(--surface-2);
}

/* Category accents on calendar blocks — same palette as .cat-pill above. */
.itin-cal-block.cat-food { --cal-hue: var(--vn-pandan); background: var(--vn-pandan-light); }
/* Sky, not teal. DESIGN.md's own Category Compass note recorded this drift
   ("uses Sky for its pill badge but Trail Green for its itinerary calendar
   block — worth reconciling to one hue the next time that component is
   touched"); this is that time. It also fixed a real collision: at block
   size Trail Green #10702A and the old Moss Green #166534 were indistinguishable, so
   a flight and an onsen read as the same category. */
.itin-cal-block.cat-transport { --cal-hue: var(--vn-sky); background: var(--vn-sky-light); }
.itin-cal-block.cat-shopping { --cal-hue: var(--vn-batik); background: var(--vn-batik-light); }
.itin-cal-block.cat-hotel { --cal-hue: var(--vn-indigo); background: var(--vn-indigo-light); }
.itin-cal-block.cat-activity { --cal-hue: var(--vn-green); background: var(--vn-green-light); }
.itin-cal-block.cat-other { --cal-hue: var(--df-ink-soft); background: var(--df-panel); }
.itin-cal-block.cat-attraction { --cal-hue: var(--vn-purple); background: var(--vn-purple-light); }
/* #6853 design-check: at 12% the six category tints wash out to near-grey (food,
   transport and activity read the same grey-green; shopping, hotel and attraction the
   same pinkish grey), so a 4px spine in the full hue carries the category. It is a
   background-image, not a border or box-shadow: the keyline stays ink, the drag and
   resize states own box-shadow, and ::before is the trip-side stripe, which the spine
   steps past (--cal-spine-x). Placed after the .cat-* rules because their `background`
   shorthand would reset it. */
.itin-cal-grid .itin-cal-block {
  --cal-spine-x: 0px;
  background-image: linear-gradient(to right, transparent var(--cal-spine-x), var(--cal-hue) var(--cal-spine-x), var(--cal-hue) calc(var(--cal-spine-x) + 4px), transparent calc(var(--cal-spine-x) + 4px));
  padding-left: var(--sp-md);
}
.itin-cal-grid .itin-cal-block.trip-main, .itin-cal-grid .itin-cal-block.trip-sub { --cal-spine-x: 3px; padding-left: calc(var(--sp-md) + 3px); }
.itin-cal-grid .itin-cal-block.size-compact, .itin-cal-grid .itin-cal-block.size-micro { padding-left: var(--sp-sm); }
.itin-cal-grid .itin-cal-block.size-compact:is(.trip-main, .trip-sub), .itin-cal-grid .itin-cal-block.size-micro:is(.trip-main, .trip-sub) { padding-left: calc(var(--sp-sm) + 3px); }

/* #6404 - finished stops fade as List fades them; the now line; the empty day;
   the read-only note. None of these travel, so nothing here needs an entry in the
   prefers-reduced-motion block. */
.itin-cal-block.is-done { opacity: 0.6; }
.itin-cal-now {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 2px solid var(--df-ink);
  z-index: 6;
  pointer-events: none;
}
.itin-cal-now::before {
  content: '';
  position: absolute;
  left: -5px;
  top: -6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--df-ink);
}
.itin-cal-now-label {
  position: absolute;
  right: 2px;
  top: -9px;
  padding: 0 var(--space-xs);
  border-radius: var(--radius-pill);
  background: var(--df-ink);
  color: var(--df-panel);
  font-size: var(--fs-xs);
  font-weight: 800;
  line-height: 16px;
}
.itin-cal-empty {
  position: absolute;
  left: var(--space-sm);
  right: var(--space-sm);
  top: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xl) var(--space-md);
  border: 2px dashed var(--df-ink);
  border-radius: var(--df-radius-card);
  background: var(--df-panel);
  text-align: center;
  z-index: 2;
}
.itin-cal-empty > i { font-size: var(--fs-lg); color: var(--df-ink-soft); }
.itin-cal-empty-text {
  font-family: var(--df-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--df-ink);
}
.itin-cal-empty-sub { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.itin-cal-empty-btn {
  min-height: var(--tap-min);
  padding: 0 var(--space-lg);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
  box-shadow: var(--df-press);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
}
.itin-cal-empty-btn.is-primary { background: var(--vn-green); color: var(--df-panel); }
.itin-cal-readonly {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: var(--df-hair);
  color: var(--df-ink);
  font-size: var(--fs-xs);
  font-weight: 600;
}

/* Calendar's use of the shared day pager (#6404): the run of bars the page shows
   lights together, and the bars break where a trip leg starts. */
#itin-date-strip.is-calendar .itin-pager-eyebrow:empty { display: none; }
.itin-pager-seg.in-page {
  height: 20px;
  background: var(--df-ink);
  box-shadow: none;
  opacity: 1;
}
.itin-pager-seg.leg-start { margin-left: 6px; }

/* Itinerary layout: day list + Ideas sidebar, as a CSS Grid (not flex) so
   the Ideas sidebar can be pinned level with the day list's own top edge
   rather than the top of the whole layout. Mobile default (single column)
   stacks the filter row, then the day list, then Ideas (and the Stamps
   button inside it) so nothing sits above Day 1 (#4678); the desktop
   override below switches to two columns and, critically, leaves the
   filter row's cell empty in the Ideas column — that's what pushes Ideas
   down to start level with the day list instead of the filter row. */
.itin-layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "daylist"
    "ideas";
  gap: var(--space-2xl);
}

#itinerary-content {
  grid-area: daylist;
  display: flex;
  flex-direction: column;
  /* One day is a bigger break than one stop, so the gap between day boxes
     has to clearly beat the space *inside* one — at the old 14px it was
     barely more than a stop row's own 12px padding, which is what made a
     multi-day list read as a single undifferentiated stack of rows. */
  gap: var(--space-5xl);
  /* Grid items default to min-width:auto, so a "1fr" track (see the desktop
     .itin-layout override below) refuses to shrink below its content's
     intrinsic width unless told otherwise — and the calendar view's grid
     (.itin-cal-grid, width:max-content, sized to *all* real+dummy day
     columns at once, not just the current page) has a very large intrinsic
     width by design, so without this the whole layout blew out to fit the
     entire un-paginated calendar instead of clipping/scrolling it inside a
     properly page-width box (issue #159 follow-up). */
  min-width: 0;
}

#itin-ideas-sidebar {
  grid-area: ideas;
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  overflow: hidden;
  background: var(--df-panel);
}

/* Issue #311 — hidden until the trip has a destination (see
   renderIdeasSidebar()). :has() lets the parent grid drop the "ideas" row
   entirely rather than leaving a collapsed-to-zero track with a stray gap
   next to it, same technique the .collapsed rule below already uses. */
.itin-layout:has(#itin-ideas-sidebar.itin-ideas-hidden) {
  grid-template-areas:
    "daylist";
}
#itin-ideas-sidebar.itin-ideas-hidden {
  display: none;
}

/* The header row is a plain container, NOT a button — see the markup comment
   in renderIdeasSidebar(). The collapse toggle is .ideas-sidebar-toggle
   inside it, so the Generate button can be a real sibling <button> instead of
   an illegal nested one. */
.ideas-sidebar-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  /* Issue #447 — the whole row is one collapse toggle, measured 508x33. */
  min-height: var(--tap-min);
  /* Was --vn-amber with white text: two problems at once. Amber is the
     "food" hue in the Category Compass, so the panel meaning "unscheduled"
     was painted the colour that means "a meal" — on the largest coloured
     surface in the tab. And white on #BA7517 measured 3.72:1 (title) and
     2.58:1 (count badge), both failing WCAG AA, at the exact value DESIGN.md
     flags as text-unsafe. Neutral surface keeps the panel legible and gives
     the category hues back their monopoly on meaning. */
  background: var(--df-panel);
  color: var(--df-ink);
  border-bottom: 2px solid var(--df-hair);
  /* No vertical padding: .ideas-sidebar-toggle's own min-height is what sets
     the row height, so the header stays at exactly --tap-min instead of
     --tap-min plus its own padding. */
  padding: 0 var(--space-2xl);
}

/* Takes the whole row minus the Generate button, so the click target is the
   full header the way it was when the header itself was the button. */
.ideas-sidebar-toggle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--tap-min);
  cursor: pointer;
}

.ideas-sidebar-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--df-sans);
  font-size: var(--fs-md);
  font-weight: 600;
}

/* Drawn from the same Tabler set as every other icon in this panel, replacing
   a 💡 emoji — an emoji renders in its own vendor palette at its own optical
   weight, so it never sat in the same family as the ti-* glyphs 40px below it
   in the very same list. Quiet by design: the header names the panel, the
   Generate button beside it is the row's one accent. */
.ideas-sidebar-bulb {
  font-size: var(--fs-md);
  color: var(--df-ink-soft);
}

.ideas-sidebar-count::before { content: '· '; }
.ideas-sidebar-count {
  font-size: var(--fs-md);
  font-family: var(--df-sans);
  /* Follows the header off amber: a white wash only reads as a badge on a
     saturated fill, and on the neutral header it measured 2.58:1. */
  color: var(--df-ink-soft);
}
.ideas-sidebar-sub {
  margin: 0;
  padding: var(--space-xs) var(--space-lg) 0;
  font-size: var(--fs-xs);
  line-height: 1.4;
  color: var(--df-ink-soft);
}
/* #7181 - inline add row under the toolbar. Inputs take the shared input rule
   (16px, 44px tall on touch); only layout lives here. */
.ideas-inline-add {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  padding: var(--sp-md) var(--sp-lg) 0;
}
.ideas-inline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-sm);
}
.ideas-inline-more {
  margin-right: auto;
  min-height: var(--tap-min);
  background: none;
  border: 0;
  padding: 0;
  color: var(--df-ink-soft);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
.ideas-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg) 0;
}

/* Issue #418 — #377 removed the History button that used to sit between
   Generate Ideas and this chevron, leaving it as the lone second icon next
   to Generate and reading as an orphaned leftover control. It isn't one —
   it's the open/closed indicator for the collapse toggle, and it predates
   both Idea Pool and History. Muted so it reads as a quiet state indicator
   rather than a second equal-weight action; it now also sits *inside*
   .ideas-sidebar-toggle, directly after the title it discloses, instead of
   at the far right where it read as a sibling of the Generate button. */
.ideas-sidebar-chevron {
  flex-shrink: 0;
  font-size: var(--fs-sm);
  color: var(--df-ink-soft);
}

.ideas-sidebar-body {
  display: flex;
  flex-direction: column;
}

/* Ideas render as distinct bordered/shadowed cards with gaps between them
   (rather than the flat divided-row list #itinerary-content's own stops
   use) so each one reads as a separate, pick-up-able block you drag onto a
   day — reinforced by a lift on hover/while-dragging. Scoped to
   #itin-ideas-sidebar so the regular day-box stop rows are untouched. */
#itin-ideas-sidebar .day-box-stops {
  gap: var(--space-md);
  padding: var(--space-lg);
}

#itin-ideas-sidebar .itin-stop-card {
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: var(--df-panel);
  box-shadow: var(--df-press);
  transition: box-shadow var(--dur-feedback) var(--ease-out), transform var(--dur-feedback) var(--ease-out);
}
/* Overrides the base .itin-stop-card:last-child rule, which drops the
   border-bottom for the last row of a connected list — not applicable here
   since every idea is already its own fully-bordered card. */
#itin-ideas-sidebar .itin-stop-card:last-child {
  border: 2px solid var(--df-ink);
}
#itin-ideas-sidebar .itin-stop-card:hover {
  box-shadow: var(--df-press-hover);
  transform: translateY(-1px);
}
#itin-ideas-sidebar .itin-stop-card .stop-draghandle.sortable-chosen,
#itin-ideas-sidebar .stop-summary-row:has(.sortable-chosen) {
  cursor: grabbing;
}
#itin-ideas-sidebar .itin-stop-card:has(.sortable-drag) {
  box-shadow: var(--df-press-hover);
  transform: rotate(-1deg);
}

/* ── Ideas panel: motion ───────────────────────────────────────────────
   The holding pen fills and empties — a suggestion is struck onto the board
   (css/features/idea-pool.css), then it either files into this list or is
   flicked away. These three cover the panel frame itself: it opening, its
   count changing, and a kept idea arriving here taped down. Each is a
   one-shot armed by a real interaction in js/itinerary.js / js/features/
   idea-pool.js and consumed on the next render — never replayed by the
   re-render a stop edit triggers. All answered in the prefers-reduced-motion
   block at the end of this file. */

/* Body unfold — the panel opens from its header edge on a genuine expand
   toggle (_ideasJustToggled). clip-path is composited, so no layout thrash,
   and a height tween is impossible here anyway (content-driven height). The
   hidden start lives only in the keyframe: with the animation gone the body
   is simply shown. */
@keyframes ideas-sidebar-unfold {
  from { opacity: 0; clip-path: inset(0 0 100% 0); }
  to   { opacity: 1; clip-path: inset(0 0 0 0); }
}
.ideas-sidebar-body-reveal {
  animation: ideas-sidebar-unfold var(--dur-view) var(--ease-out);
}

/* Count badge — pops when the number of parked ideas actually changes (kept,
   added, dragged onto a day, deleted). Same curve as .notification-bell-badge-pop. */
@keyframes ideas-count-pop {
  from { transform: scale(0.4); }
}
.ideas-sidebar-count-pop {
  animation: ideas-count-pop var(--dur-feedback) var(--ease-out);
}

/* A kept suggestion lands in this list taped down: the card settles from a
   slight lift while its tape strip (the ::before at ~line 9530) wipes across
   from the left. The wipe keyframe ends on the strip's own resting transform,
   so `both` through the 80ms lead-in resolves to the normal taped look. */
@keyframes idea-card-land {
  from { opacity: 0; transform: translateY(-8px); }
}
@keyframes idea-card-tape-wipe {
  from { transform: rotate(-3deg) scaleX(0); }
  to   { transform: rotate(-3deg) scaleX(1); }
}
.itin-stop-card.idea-card.idea-card-landed {
  animation: idea-card-land var(--dur-state) var(--ease-out);
}
.itin-stop-card.idea-card.idea-card-landed::before {
  transform-origin: left center;
  animation: idea-card-tape-wipe var(--dur-state) var(--ease-out) var(--delay-beat) both;
}

/* ── Ideas: filters + user-defined groups (issue #734 Parts B, C) ───── */
.ideas-filter-row {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
  padding: var(--space-xs) var(--space-lg) 0;
}
.ideas-chip-row {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: var(--space-xs);
}
.ideas-chip {
  min-height: var(--tap-min);
  max-width: 100%;
  padding: 0 var(--space-lg);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ideas-chip:hover { background: var(--vn-trail-green-light); }
.ideas-chip.is-active {
  background: var(--df-ink);
  color: var(--df-panel);
}
.ideas-filter-clear {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-md);
  background: var(--df-panel);
  color: var(--df-ink);
  cursor: pointer;
}
.ideas-filter-clear:hover { background: var(--vn-trail-green-light); }

/* A group subheading inside the single #itin-ideas-sidebar .day-box-stops
   container — a plain divider row, not its own drop target (drag-between-groups
   is deliberately out of scope; groups are set via the modal / "⋯" menu). */
.ideas-group-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  padding-bottom: var(--space-2xs);
  border-bottom: 2px solid var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--df-ink-soft);
}
.ideas-group-header:first-child { margin-top: 0; }
.ideas-group-name { flex: 1; min-width: 0; }
.ideas-group-count {
  flex-shrink: 0;
  color: var(--df-ink);
  background: var(--vn-trail-green-light);
  border-radius: var(--radius-pill);
  padding: 0 var(--space-sm);
}
.ideas-group-rename {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  border: none;
  background: none;
  color: var(--df-ink-soft);
  cursor: pointer;
}
.ideas-group-rename:hover { color: var(--vn-trail-green); }

/* Inline idea-group picker / rename field (#6269). Inputs take the shared
   16px/44px rule; only layout is set here. */
.idea-group-editor {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin: var(--space-xs) 0 var(--space-sm);
  padding: var(--space-sm);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-md);
  background: var(--df-panel);
}
.ideas-group-header.idea-group-editor {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  text-transform: none;
  letter-spacing: normal;
}
.idea-group-new { display: flex; gap: var(--space-xs); align-items: center; }
.idea-group-input { flex: 1; min-width: 0; }
.idea-group-save,
.idea-group-cancel {
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  padding: 0 var(--space-lg);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-ink);
  color: var(--df-panel);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
}
.idea-group-cancel { background: var(--df-panel); color: var(--df-ink); }
.idea-group-save:disabled { opacity: 0.6; cursor: default; }

/* The idea's group, shown on its expanded card. */
.stop-idea-group {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--df-ink-soft);
  margin: var(--space-sm) 0;
}

/* ── Idea "About" disclosure (issue #734 Part E) ───────────────────── */
.idea-about { margin-top: var(--space-sm); }
.idea-about-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--tap-min);
  border: none;
  background: none;
  color: var(--vn-trail-green);
  font: inherit;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.idea-about-credit { margin-left: var(--space-xs); display: inline-flex; align-items: center; min-height: var(--tap-min); }
/* #6325: 44px tap floor for the small controls inside an idea card. */
.idea-card .idea-hearted-by, .idea-card .memory-add-btn { min-height: var(--tap-min); }
.idea-about-body {
  margin-top: var(--space-2xs);
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--df-ink);
}

/* ── Add-from-ideas picker (issue #734 Part F) ─────────────────────── */
.idea-picker-open-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
  border: none;
  background: none;
  color: var(--vn-trail-green);
  font: inherit;
  font-size: var(--fs-xs);
  cursor: pointer;
  padding: 0;
  min-height: var(--tap-min);
}
.idea-picker-open-btn:hover { text-decoration: underline; }

.idea-picker-section-label {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--df-ink-soft);
  margin: var(--space-md) 0 var(--space-xs);
}
.idea-picker-section-label:first-child { margin-top: 0; }
.idea-picker-group {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin: var(--space-sm) 0 var(--space-2xs);
}
.idea-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-xs);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-md);
  background: var(--df-panel);
  color: var(--df-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
/* A suggestion is a COPY (dashed, matching .idea-suggestion-card); an own idea
   MOVES (solid). The two must not look identical (PRD §7). */
.idea-picker-row:hover { background: var(--vn-trail-green-light); }
.idea-picker-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idea-picker-tag {
  flex-shrink: 0;
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}

/* ── Itinerary route trace ────────────────────────────────────────────
   The one authored sequence on the trip screen. Entering the Itinerary, the
   day list assembles the way the day itself runs: the day box arrives, then
   its stops land in chronological order, and the spine between two
   consecutive stops (.stop-connector::before — the mark that turns the time
   column into an axis) draws downward into the next one. It is the route
   being traced, not a list fading in, and it is the reason the itinerary is
   the tab this app opens on.

   Bounded on purpose:
   - Only a genuine entry replays it — opening the trip, arriving on the tab
     from another tab, or switching back from Calendar view. NOT a re-render
     after an edit, a drag, a filter, or the FX-rate refresh, all of which
     call renderItinerary() too. See _itinTraceArmed in js/itinerary.js.
   - Only day boxes in the viewport at arrival animate (#6988), only the
     first two of those trace their stops, and the day cascade caps
     at four boxes — a 14-day trip must not spend 3 seconds introducing
     itself, and everything past the second box is below the fold anyway.
   - Longest path is ~470ms end to end (6 stop steps × --trace-tick + 240ms).

   `both` fill is what holds a row invisible through its own delay, so
   applyItinTrace() always schedules the class removal in the same call that
   adds it — the list must never be able to end up permanently hidden. */
@keyframes itin-trace-box {
  from { opacity: 0; transform: translateY(10px); }
}

@keyframes itin-trace-row {
  from { opacity: 0; transform: translateY(6px); }
}

@keyframes itin-trace-spine {
  from { transform: scaleY(0); }
}

.itin-trace .day-box.itin-trace-day {
  animation: itin-trace-box var(--dur-view) var(--ease-out) both;
  animation-delay: calc(var(--trace-i, 0) * var(--trace-tick));
}

.itin-trace .itin-trace-rows .itin-stop-card {
  animation: itin-trace-row var(--dur-state) var(--ease-out) both;
  animation-delay: calc(var(--trace-i, 0) * var(--trace-tick));
}

/* Custom properties inherit into pseudo-elements, so the connector element
   carries the index and its ::before spine reads it. transform-origin:top is
   the whole point — the spine grows down from the stop above toward the one
   below, in the direction the day is read. */
.itin-trace .itin-trace-day .day-box-stops::before {
  transform-origin: top;
  animation: itin-trace-spine var(--dur-view) var(--ease-out) both;
  animation-delay: calc(var(--trace-i, 0) * var(--trace-tick));
}
.itin-trace .itin-trace-rows .stop-connector {
  animation: itin-trace-row var(--dur-state) var(--ease-out) both;
  animation-delay: calc(var(--trace-i, 0) * var(--trace-tick));
}

/* Calendar view has no spine and no chronological row order to trace — the
   grid is one object, so it arrives as one. */
.itin-trace-simple {
  animation: itin-trace-box var(--dur-view) var(--ease-out) both;
}

/* Route Ledger (#5905): a day is no longer a boxed card. The border, shadow
   and panel fill are gone; its stops hang off the one dashed route line
   (.day-box-stops::before, see "Route Ledger" below). */
.day-box {
  background: transparent;
}

/* The tab's one shout: "today" is the only non-arbitrary reason a single
   day box should outrank its neighbours (design critique, issue #545
   follow-up). Route Amber because the itinerary IS a numbered route and
   amber is the route's own colour — a green rail would collide with the
   Pressable Green Rule the same way the old header fill did. */
.day-box-today { /* the .day-box-today-stamp in the title is the signal now */ }
.day-box-today-stamp {
  display: inline-block;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--df-ink);
  border: 2px solid currentColor;
  /* 3px — DESIGN.md's print/stamp radius; the app-side token set has no
     variable for it since this is the only stamp-family mark in-app. */
  border-radius: 3px;
  padding: 1px var(--space-sm) 0;
  transform: rotate(-2.6deg);
  margin-left: var(--space-sm);
  vertical-align: middle;
}

.day-box-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  /* Route Ledger (#5907): a pin, a title block, and at most a weather chip and
     one ⋯ button — nothing that can push the title onto a second line. */
  background: transparent;
  color: var(--df-ink);
  padding: var(--space-xl) var(--space-lg) var(--space-md);
}

/* The day's edge is carried by the pin, not a box. Route Amber fill, 2px ink
   keyline, the number in Bricolage 800, Route Amber Ink on top. */
.day-box-pin {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--df-amber);
  border: 2px solid var(--df-ink);
  color: var(--df-amber-fg);
  font-family: var(--df-display);
  font-weight: 800;
  font-size: var(--fs-sm);
  line-height: 1;
}

.day-box-headtext {
  flex: 1 1 auto;
  min-width: 0;
}

.day-box-title {
  font-family: var(--df-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  /* Never wraps because of a control: the title block takes what the pin and
     the right-hand controls leave, and truncates past that. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-box-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  line-height: 1.4;
  color: var(--text-muted);
}
.day-box-caption-sep { white-space: pre; }

/* The ⋯ menu trigger. 44px square, glyph stays small. */
.day-box-menu-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  color: var(--df-ink);
  font-size: var(--fs-lg);
  cursor: pointer;
}
.day-box-menu-btn:hover,
.day-box-menu-btn[aria-expanded="true"] { background: var(--df-chip-fill-hover); }

/* Issue #951 — a day whose "Day N" now exceeds the trip's own date range
   (after a shrink, or a stop added past the trip's end). Plain fact, not a
   warning — no icon, no color, no tap target — sitting below the whole
   header row rather than beside the title, so it never competes with the
   already-crowded button cluster on the right. */
.day-box-outside-range {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

/* Issue #952 Phase 4b — the day's destination, directly under the header.
   Read-only it's a stub destination, so it takes the label
   voice (DESIGN.md: "stub destinations"); a pin, not a colour, marks it —
   green stays for things you press. A one-word place name longer than the
   box wraps rather than being cut mid-word. */
.day-box-dest,
.day-box-dest-field {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-2xl) 0;
  color: var(--text-muted);
}
.day-stay-chip-slot:empty { display: none; }
.day-stay-chip-slot { padding: 0 var(--space-md) var(--space-sm); }
.day-stay-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--tap-min);
  padding: 0 var(--space-md);
  border: 1px dashed var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.4;
  cursor: pointer;
}
.day-stay-chip-deciding { border-style: solid; color: var(--text); }
.day-stay-chip:hover { color: var(--text); }

.day-box-dest {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
/* The host's control is the same stub, made editable — not the shared
   input/select look (the retired Field Journal grey: 0.5px #e0e0e0 border,
   #f5f5f5 fill, which also failed WCAG 1.4.11's 3:1 field-boundary
   contrast). Departure Fever's field vocabulary instead: a 2px ink keyline
   on the stub's 12px radius, transparent so the card shows through, sized
   to its content rather than the full row. Font-size and height are NOT
   overridden here: those stay on the shared rule (16px / --tap-min under
   680px, so no iOS zoom), per CLAUDE.md's one-shared-rule convention. */
.day-box-dest-field {
  position: relative;
  min-height: var(--tap-min);
  padding-block: 0;
  cursor: pointer;
}
.day-box-dest-text {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600; /* a control, not a label: sentence case, no label voice (DESIGN.md) */
  text-transform: none;
  color: var(--df-ink);
  overflow-wrap: anywhere;
}
.day-box-dest-change { text-decoration: underline; text-underline-offset: 2px; }
/* An untagged day: ghosted, secondary ink. */
.day-box-dest-field-unset .day-box-dest-text { color: var(--text-muted); }
/* The native select is the picker, laid transparently over the line so a tap
   anywhere on it opens it. Font-size and height stay on the shared input
   rule (16px / --tap-min on phones), per the one-shared-rule convention. */
.day-box-dest-field .day-dest-select {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  text-transform: none;
}
.day-box-dest-field:focus-within .day-box-dest-text {
  outline: 2px solid var(--df-ink);
  outline-offset: 2px;
}

/* The day destination sheet (#dayDestModal). */
.day-dest-sheet-sub {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}
/* The browser's default placeholder grey measured 4.34:1 (light) / 3.74:1
   (dark) here; the secondary-text tier clears 4.5:1 in both themes. */
#dayDestName::placeholder {
  color: var(--text-muted);
  opacity: 1;
}
.day-dest-sheet-hint {
  margin-top: var(--space-sm);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.day-dest-sheet-submit {
  width: 100%;
  margin-top: var(--space-xl);
}

/* "Where is Day N?" (#6225): one full-width, tap-sized row per place. */
.day-fill-place-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.day-fill-place-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  min-height: var(--tap-min);
  padding: 0 var(--space-lg);
  background: var(--surface-2);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-md);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

/* Issue #366: now a <button> (was a plain <span>) since it absorbed the
   dropped .day-expense-strip's click-to-toggle-currency behavior — needs the
   usual button resets on top of its existing pill look. */
.day-box-spend {
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.4;
  background: var(--df-chip-fill);
  border-radius: var(--radius-pill);
  padding: var(--space-2xs) var(--space-md);
  border: none;
  color: inherit;
  font-family: var(--df-sans);
  cursor: pointer;
  transition: background var(--dur-feedback) var(--ease-out);
  position: relative;
}
/* Issue #447 — measured 117x19, and it is a currency toggle, not a label.
   Expanded rather than grown: it sits in .day-box-header-right, where a
   min-height would add ~25px to every day header. The chip is always wider
   than --tap-min, so max(…, 100%) grows it vertically only and never reaches
   sideways into the weather chip's or Sub-Trip's hit zone. */
.day-box-spend::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}
.day-box-spend:hover { background: var(--df-chip-fill-hover); }
/* #6967 - the swap glyph says "this switches currency"; no tooltip sentence needed. */
.day-box-spend-swap { margin-left: var(--sp-xs); font-size: inherit; vertical-align: -0.1em; }

/* Groups the weather chip / Sub-Trip trigger / spend chip into one flex item so
   .day-box-header's justify-content:space-between only ever splits the row
   into "title" vs "everything else" — without this a 3rd bare flex sibling
   would land dead-center of the header instead of beside the spend chip. */
.day-box-header-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Issue #154 — "Sub-Trip" trigger. .day-box-header is a neutral --df-panel
   field now (not a solid teal fill), so this is a plain ghost chip — no
   on-brand light-on-dark treatment needed. */
.day-box-split-btn {
  background: var(--df-chip-fill);
  border: none;
  border-radius: var(--radius-pill);
  padding: var(--space-2xs) var(--space-lg);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  font-family: var(--df-sans);
  white-space: nowrap;
  transition: background var(--dur-feedback) var(--ease-out);
  position: relative;
}
/* Issue #447 — measured 55x21. Same vertical-only expansion as .day-box-spend
   above, and for the same reason: this is the dense day header, and the
   button is already wider than --tap-min. */
.day-box-split-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}
.day-box-split-btn:hover { background: var(--df-chip-fill-hover); }

/* Issue #952 Phase 3 — "Remove day" sits in the dense day header beside
   "Split Day", so it borrows that pill and its expanded hit area. Quiet on
   purpose: it only ever removes an empty last day. */
.day-box-remove-day-btn {
  background: var(--df-chip-fill);
  border: none;
  border-radius: var(--radius-pill);
  padding: var(--space-2xs) var(--space-lg);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background var(--dur-feedback) var(--ease-out);
  position: relative;
}
.day-box-remove-day-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}
.day-box-remove-day-btn:hover { background: var(--df-chip-fill-hover); }

/* Issue #952 Phase 3 — "+ Add day" closes the day list on a dateless trip:
   a dashed "next day" slot the width of a day box, not a loud button — the
   blank day boxes are the surface. */
.itin-add-day-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  min-height: var(--tap-min);
  margin-top: var(--space-md);
  padding: var(--space-lg);
  background: transparent;
  border: 2px dashed var(--df-hair);
  border-radius: var(--df-radius-card);
  color: var(--df-ink);
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur-feedback) var(--ease-out);
}
.itin-add-day-btn:hover { border-color: var(--df-ink); }

/* Issue #206 — icon-only, same expanded-tappable-area trick as .stop-menu-btn
   (visible glyph stays small, hit region doesn't) since the day header is a
   dense row. Same ghost-chip fill as its two neighbours above, now that the
   header sits on --df-panel rather than a solid teal fill. */
.day-box-history-btn {
  background: var(--df-chip-fill);
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  cursor: pointer;
  font-size: var(--fs-xs);
  position: relative;
  flex-shrink: 0;
}
.day-box-history-btn:hover { background: var(--df-chip-fill-hover); }
.day-box-history-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}

.day-box-stops {
  display: flex;
  flex-direction: column;
}

.day-box-empty {
  padding: var(--space-xl) var(--space-2xl);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  text-align: center;
}

/* Issue #952 Phase 5 — "Autofill with <city> ideas", under the empty-day
   hint. A secondary sticker (Cut Stock fill, 2px ink keyline, pill), not
   green: the filled "Add stop" below stays the day's one primary action.
   Dense scale per DESIGN.md's migration posture — the offset steps down to
   2px and presses into it. */
.day-box-autofill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin: 0 auto var(--space-xl);
  min-height: var(--tap-min);
  padding: 0 var(--space-4xl);
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--df-ink);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  --press-o: 2px;
  --press-bw: 2px;
  cursor: pointer;
  transition: transform var(--dur-feedback) var(--ease-out);
}
.day-box-autofill-btn:hover { transform: translate(1px, 1px); }
.day-box-autofill-btn:active { transform: translate(2px, 2px); }
.day-box-autofill-btn:disabled { opacity: 0.6; cursor: progress; transform: none; }

.day-box-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  /* Issue #447 — measured 37px, the shortest primary action on the tab. */
  min-height: var(--tap-min);
  padding: var(--space-lg);
  border: none;
  border-top: 2px dashed var(--df-hair);
  background: var(--df-panel);
  color: var(--vn-trail-green);
  font-size: var(--fs-xs);
  font-weight: 400;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--dur-feedback) var(--ease-out);
}
.day-box-add-btn:hover { background: var(--vn-trail-green-light); }

/* "Add idea" swaps to this drop zone for the duration of a drag that
   started on an idea card itself (see onStopDragStart() in itinerary.js) —
   dropping the card here deletes it (onIdeaDropOnDeleteZone()). Hidden by
   default; toggled via inline style, not re-rendered, so it survives
   mid-drag DOM churn. */
.ideas-delete-zone {
  color: var(--error);
  border-top: 1px dashed var(--error);
  background: var(--error-light);
  cursor: default;
}

/* Calendar view's Ideas→delete drag (startCalIdeaDrag() in itinerary.js) is
   a manual pointer drag, not SortableJS, so it doesn't get Sortable's own
   drop-target styling for free — this is that same "about to drop here"
   feedback, toggled directly via classList during the drag. */
.itin-delete-zone.hover {
  background: var(--error);
  color: var(--df-pin-white);
  border-top-color: var(--error);
}

/* Issue #73: "Add stop" + the day-route trigger share one row instead of two
   full-width rows — see renderDayActionsRow() in itinerary.js. The row
   itself (not the individual buttons) is the direct .day-box child, so it's
   what carries `grid-area: add` in the desktop override below. */
.day-box-actions-row {
  display: flex;
}
.day-box-actions-row .day-box-add-btn,
.day-box-actions-row .day-box-route-btn,
.day-box-actions-row .day-box-redo-btn,
.day-box-actions-row .day-box-fill-btn,
.day-box-actions-row .day-box-split-btn {
  flex: 1;
  width: auto;
}
.day-box-actions-row > :not(:first-child) {
  border-left: 2px dashed var(--df-hair);
}

.day-box-route-btn,
.day-box-fill-btn,
.day-box-redo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border: none;
  border-top: 2px dashed var(--df-hair);
  background: var(--df-panel);
  color: var(--df-ink-soft);
  font-size: var(--fs-xs);
  font-weight: 400;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--dur-feedback) var(--ease-out);
}
.day-box-route-btn:hover,
.day-box-fill-btn:hover,
.day-box-redo-btn:hover { background: var(--vn-trail-green-light); color: var(--vn-trail-green); }

/* Issue #154 — "Split this day" / "Remove split". Deliberately its own
   class, not reusing .day-box-route-btn: unlike the day-route toggle, this
   must stay visible on mobile (see the .day-box-route-btn { display:none }
   override in the desktop-map media query below — that one is specific to
   the route panel that gets replaced by a persistent side panel on desktop). */
.day-box-split-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border: none;
  border-top: 2px dashed var(--df-hair);
  background: var(--df-panel);
  color: var(--df-ink-soft);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  font-family: var(--df-sans);
  transition: background var(--dur-feedback) var(--ease-out);
}
.day-box-split-btn:hover { background: var(--vn-trail-green-light); color: var(--vn-trail-green); }

.day-box-actions-row .day-box-add-btn,
.day-box-actions-row .day-box-route-btn,
.day-box-actions-row .day-box-redo-btn,
.day-box-actions-row .day-box-fill-btn,
.day-box-actions-row .day-box-split-btn {
  flex: 1;
  width: auto;
}
.day-box-actions-row > :not(:first-child) {
  border-left: 2px dashed var(--df-hair);
}

/* Route Ledger (#5908): the footer is one row at the end of the route — an
   Add stop pill with a dashed ink border, then two 44px icon buttons (day
   route, day photo). Earlier history (#447, #903): the pill keeps the tinted
   teal ghost so it still out-ranks the icons without outweighing the stops.
   Scoped to the actions row on purpose — .day-box-add-btn is reused for the
   Ideas sidebar's "Add idea" (#ideas-add-btn) and its drag-to-delete zone
   (.ideas-delete-zone), neither of which should pick up this tint either. */
.day-box-actions-row {
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
}
.day-box-actions-row .day-box-add-btn {
  flex: 1;
  width: auto;
  border: 2px dashed var(--df-ink);
  border-radius: 999px;
  padding: 0 var(--space-lg);
  background: var(--vn-trail-green-light);
  color: var(--vn-trail-green);
  font-weight: 600;
}
.day-box-actions-row .day-box-add-btn:hover { background: var(--vn-trail-green-mid); color: var(--surface-2); }
.day-box-actions-row > :not(:first-child) { border-left: none; }
.day-box-icon-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-min);
  height: var(--tap-min);
  min-height: var(--tap-min);
  padding: 0;
  border: 2px solid var(--df-ink);
  border-radius: 50%;
  background: var(--df-panel);
  color: var(--df-ink);
  font-size: var(--fs-md, 20px);
  cursor: pointer;
  text-decoration: none;
}
/* #6580: the map button is also .day-box-route-btn, whose row rule
   (`.day-box-actions-row .day-box-route-btn { flex: 1; width: auto }`, and the
   row's `border-left` reset) out-specifies the class above — it stretched into
   a wide oval. Pin every icon button in the row back to a 44px circle. */
.day-box-actions-row .day-box-icon-btn {
  flex: none;
  width: var(--tap-min);
  min-width: var(--tap-min);
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid var(--df-ink);
}
.day-box-icon-btn:hover { background: var(--vn-trail-green-light); color: var(--vn-trail-green); }
/* #6199 — "Fill with a popular day" sits on its own line under Add stop. */
.day-box-actions-row { flex-wrap: wrap; }
.day-box-actions-row .day-box-fill-btn {
  order: 1;
  flex: 1 1 100%;
  min-height: var(--tap-min);
  padding: 0 var(--space-lg);
  border: 2px dashed var(--df-ink);
  border-radius: 999px;
  background: var(--df-panel);
  color: var(--df-ink);
  font-weight: 600;
}
.day-box-actions-row .day-box-fill-btn:hover { background: var(--vn-trail-green-light); color: var(--vn-trail-green); }
.day-box-icon-btn:focus-visible { outline: 2px solid var(--df-brand); outline-offset: 2px; }

/* ── Day route map (collapsible, link-out) — the toggle button itself now
   lives in .day-box-actions-row above; this section is just the expandable
   body + (on desktop) the persistent side panel. ── */
.day-map-section { border-top: 2px solid var(--df-hair); }

/* "Day route" → "Delete" drop zone: swapped in (via the .delete-armed
   class — see onStopDragStart() in itinerary.js) only while a card is being
   dragged out of THIS day box's own stop list, so it's always right next to
   where the drag started. Same delete flow/styling as the Ideas shelf's own
   zone (.ideas-delete-zone) — both share .itin-delete-zone. */
.day-map-delete-zone {
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  text-align: center;
  min-height: 60px;
  padding: var(--space-2xl);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--error);
  background: var(--error-light);
}
.day-map-section.delete-armed .day-map-delete-zone { display: flex; }

/* Route Ledger (#5910): the per-day route panel and its resizer are gone; the
   desktop map is one sticky card in the right rail (see .itin-day-map-card in
   css/features/itinerary-map.css and the .has-day-map layout below). */
:root {
  /* The narrowest a stop column may get before the day route panel has to
     yield. Below this a stop name is not abbreviated, it is destroyed — the
     measured failure this floor exists to stop was "Senso-ji Temple"
     rendering into 10px of a 100px requirement.
     380, not a round 280: a stop row is [category pill][name][menu][caret],
     and the pill is deliberately flex-shrink:0 with an 84px label cap
     (issue #451 — the pill leads the row and must not be what collapses),
     so the name block absorbs every shortfall on its own. Measured, the row
     spends ~120px on the pill, ~64px on the two trailing buttons and ~48px
     on padding and gaps before the name gets anything. 380 leaves the name
     ~148px — enough for a real place name rather than an initial. */
  --day-stops-min: 380px;
  /* Issue #803 — the Ideas column's own width, dragged via #ideas-col-resizer
     the same way --day-map-width is dragged via .day-map-resizer. 340px is
     today's old fixed ceiling, kept as the default so a user who never drags
     sees an unchanged layout. IDEAS_COL_WIDTH_MIN/MAX (js/itinerary.js) is
     the clamp the drag itself enforces; the minmax() at this var's one call
     site below is a floor only, not a second clamp. */
  --ideas-col-width: 340px;
  /* Issue #3975 — one width var per trip tab's draggable right pane, the same
     340px default and 260–620px drag clamp (PANE_COL_WIDTH_*, js/pane-resizer.js)
     as --ideas-col-width. Each tab remembers its own. */
  --bookings-pane-width: 340px;
  --expenses-pane-width: 340px;
  --budget-pane-width: 340px;
  --people-pane-width: 340px;
  --checklist-pane-width: 340px;
}

/* Issue #803 — same reasoning, one breakpoint over: below 1280px the Ideas
   sidebar isn't a grid column at all (it's a stacked block, see .itin-layout
   below), so its resize handle plays no role either. */
#ideas-col-resizer { display: none; }
/* Issue #3975 — the shared handle (js/pane-resizer.js), same rule. */
.pane-resizer { display: none; }

/* ⚠️ Two independent fixed tracks used to stack here — Ideas at 510px and the
   day route panel at 360px — each reasonable alone, neither reserving room
   for the other. Both turned on at 1024px, but together they need roughly
   1400px of viewport before a stop name has any width left. In between, the
   `1fr` day-list track (whose automatic minimum is defeated by the
   deliberate `min-width: 0` on #itinerary-content) collapsed toward zero:
   at 1440px every one of twelve stop names was clipped, the worst to 10px of
   the 100px it needed, and at 1024px the day box itself overflowed its
   column (scrollWidth 477 against clientWidth 166) and clipped stop names
   away entirely.

   The fix is a priority order, expressed as two breakpoints rather than one:
   stop names outrank the day route panel, which outranks the Ideas sidebar.
   So the panel arrives first (1024px, day list full width), the sidebar
   column second (--bp-ideas-col, 1280px), and every flexible track now
   carries an explicit floor so neither can starve what it sits beside.
   A `1fr` track is not a floor. Any future desktop panel here arrives as a
   minmax(), not a bare length. */
/* The Ideas sidebar becomes a real column here, not at 1024px. Keep this
   number in sync with BP_IDEAS_COLUMN in js/itinerary.js, which makes the
   same structural decision for the sidebar's collapsed-by-default state. */
@media (min-width: 1280px) {
  .itin-layout {
    /* minmax() on every track, not `1fr 510px`. The day list keeps a floor
       wide enough for the day route panel plus a readable stop column; Ideas
       is allowed to give width back rather than holding a fixed column
       hostage. The Ideas floor is 220px, not 260px (#4883): at exactly 1280px
       .app-main's content box is 980px (220px nav + 2 x 40px padding), and
       the day-list floor (746px) + resizer (6px) + a 260px floor came to
       1012px, so the grid overflowed by 32px and .app-main's overflow-x:clip
       cut off the rail's right border and shadow. 746 + 6 + 220 = 972 fits. 340px (--ideas-col-width's default) is ample for an idea
       card — the old 510px was measured filling 167px of an 1833px-tall
       layout while stop names beside it were clipped to a single character.
       Issue #803 — the middle "." / "resizer" column carries #ideas-col-resizer,
       the drag handle for --ideas-col-width; 260px here is a floor
       independent of IDEAS_COL_WIDTH_MIN (js/itinerary.js) — the var is
       already clamped there, this is a backstop for a var CSS can't trust. */
    grid-template-columns:
      minmax(var(--day-stops-min), 1fr)
      6px
      minmax(220px, var(--ideas-col-width));
    grid-template-areas:
      "daylist resizer  ideas";
    /* Grid items stretch to fill their row by default, which would inflate
       Ideas to the day list's full height. align-items:start sizes it back
       to its own content height (its original size) while grid-template-areas
       above still keeps it starting on the same row line as the day list. */
    align-items: start;
    /* Issue #803 — the base rule's single `gap` (below the .itin-layout
       declaration up top) would otherwise apply as column-gap on *both*
       sides of the new 6px resizer column, doubling what used to be one
       14px gutter into 34px and eating into the day list's own floor for no
       visual gain. The 6px resizer column is the gutter here, the same way
       .day-box:has(.day-map-section-has-route) uses its own resizer column
       as the only spacing between stops and the map, with no separate gap
       at all.
       row-gap keeps the filter row's own breathing room untouched. */
    column-gap: 0;
  }
  .itin-layout:not(.has-day-map) #itin-ideas-sidebar {
    position: sticky;
    top: var(--rail-top);
    max-height: calc(100vh - var(--rail-top) - var(--space-3xl));
    overflow-y: auto;
  }
  /* #6375 - with no day map the rail is display:contents, so the Stamps button (moved to the rail's
     foot by syncStampsPlacement()) needs a real column to sit under Ideas: the rail takes the Ideas
     cell, and the sticky/scroll slice moves from the aside onto it. */
  .itin-layout.stamps-in-rail:not(.has-day-map) #itin-right-rail {
    grid-area: ideas;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    position: sticky;
    top: var(--rail-top);
    max-height: calc(100vh - var(--rail-top) - var(--space-3xl));
    min-width: 0;
  }
  .itin-layout.stamps-in-rail:not(.has-day-map) #itin-ideas-sidebar {
    position: static;
    max-height: none;
    flex: 1 1 auto;
    min-height: 0;
  }
  /* Issue #803 — spans the same sticky viewport slice as the sidebar it
     resizes, not the day list's full (often much taller) height, so the
     drag handle only ever covers the visible panel. */
  #ideas-col-resizer {
    grid-area: resizer;
  }
  #ideas-col-resizer,
  .pane-resizer {
    display: block;
    position: sticky;
    top: var(--rail-top);
    height: calc(100vh - var(--rail-top) - var(--space-3xl));
    cursor: col-resize;
    /* Without this a touch drag on a >=1280px tablet is taken as a scroll
       and the pointer stream is cancelled mid-drag. */
    touch-action: none;
  }
  #ideas-col-resizer::after,
  .pane-resizer::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 2px;
    width: 2px;
    border-radius: 1px;
    background: var(--df-hair);
    transition: background var(--dur-feedback) var(--ease-out);
  }
  #ideas-col-resizer:hover::after,
  #ideas-col-resizer.dragging::after,
  .pane-resizer:hover::after,
  .pane-resizer.dragging::after {
    background: var(--vn-trail-green);
  }
  /* Widen the tappable/draggable zone to --tap-min without widening the
     visible 2px line — same convention as .stop-menu-btn (this file). */
  #ideas-col-resizer::before,
  .pane-resizer::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: max(var(--tap-min), 100%);
    transform: translateX(-50%);
  }

  /* Issue #311 — hidden (see the base-layout rule above), the column
     itself needs to go too, or the day list gets stranded in a narrower 1fr
     track with a bare empty gap beside it. grid-template-areas must be
     overridden here too, not just grid-template-columns — the desktop base
     rule above declares a 3-column "daylist resizer ideas" area, and leaving
     that in place implicitly adds back the missing columns (auto-sized) the
     moment grid-template-columns lists fewer, since the areas imply more
     columns than the explicit track list provides. Those implicit columns
     still pick up .itin-layout's gap, reproducing the exact stray-gap bug
     this technique exists to avoid — caught in code review since jsdom has
     no layout engine to catch it in tests. #ideas-col-resizer itself is
     display:none'd below rather than left an orphaned resizer grid item with
     nothing declaring its area. */
  .itin-layout:has(#itin-ideas-sidebar.itin-ideas-hidden) {
    grid-template-columns: 1fr;
    grid-template-areas:
      "daylist";
  }
  .itin-layout:has(#itin-ideas-sidebar.itin-ideas-hidden) #ideas-col-resizer,
  .itin-layout:has(#itin-ideas-sidebar.collapsed) #ideas-col-resizer {
    display: none;
  }

  /* Collapsing Ideas (toggleIdeasExpanded()) shrinks the grid column itself
     down to a thin strip, instead of just hiding the body while the header
     keeps holding the full width column hostage — that's the whole point of
     collapsing at this breakpoint: give the Day box/calendar back the space.
     :has() lets the parent grid react to the child's .collapsed class.
     grid-template-areas is redeclared here too, same reason as the
     itin-ideas-hidden override just above — the resizer column drops out
     entirely (and #ideas-col-resizer is display:none'd above) rather than
     leaving a draggable handle beside a 44px strip there's nothing left to
     widen. */
  .itin-layout:not(.has-day-map):has(#itin-ideas-sidebar.collapsed) {
    grid-template-columns: 1fr 44px;
    grid-template-areas:
      "daylist ideas";
  }
  .itin-layout:not(.has-day-map) #itin-ideas-sidebar.collapsed {
    /* Overrides .itin-layout's align-items:start above — with the body
       gone, the header is all that's left, and stretching it the full row
       height reads as a proper vertical tab strip rather than a stray small
       button floating at the top. */
    align-self: stretch;
  }
  .itin-layout:not(.has-day-map) #itin-ideas-sidebar.collapsed .ideas-sidebar-header {
    flex-direction: column;
    height: 100%;
    padding: var(--space-2xl) var(--space-sm);
    gap: var(--space-lg);
  }
  /* Stacked, and still the full height of the strip, so the whole vertical
     tab stays one click target the way it was before the toggle became its
     own element. */
  .itin-layout:not(.has-day-map) #itin-ideas-sidebar.collapsed .ideas-sidebar-toggle {
    flex-direction: column;
    justify-content: flex-start;
    align-self: stretch;
    gap: var(--space-lg);
  }
  /* Collapsed, the title is just the bulb icon (see renderIdeasSidebar() —
     "Ideas" text only renders while expanded), so it stays upright rather
     than sideways like the old rotated text did: nothing left to rotate, and
     an upright glyph reads better in a narrow vertical strip anyway. */
  .itin-layout:not(.has-day-map) #itin-ideas-sidebar.collapsed .ideas-sidebar-bulb {
    font-size: var(--fs-lg);
    color: var(--df-ink);
  }
  /* The one place the label and count genuinely do not fit: a 44px-wide
     vertical strip. Everywhere else the collapsed panel is a full-width bar
     and keeps them (renderIdeasSidebar() now always emits both). */
  .itin-layout:not(.has-day-map) #itin-ideas-sidebar.collapsed .ideas-sidebar-label,
  .itin-layout:not(.has-day-map) #itin-ideas-sidebar.collapsed .ideas-sidebar-count {
    display: none;
  }
  /* The chevron keeps meaning "expand"/"collapse" from the JS's up/down
     class names (shared with the mobile vertical-collapse layout below
     1024px) — a single 90deg rotation reorients both to the horizontal axis
     this breakpoint actually collapses on: chevron-up (expanded, click to
     collapse) becomes right-pointing, chevron-down (collapsed, click to
     expand) becomes left-pointing, since they start from opposite tips. */
  .itin-layout:not(.has-day-map) .ideas-sidebar-chevron {
    transform: rotate(90deg);
    transition: transform var(--dur-feedback) var(--ease-out);
  }
}

@media (min-width: 1024px) {
  /* min-width: 0 is load-bearing, not defensive: a `1fr` track's automatic
     minimum is min-content, and one long stop name ("Meiji Jingu Shrine and
     the Inner Garden walk through Yoyogi Park to Harajuku") once widened the
     list track enough to push the right column past a clipping parent. */
  .day-box-stops        { min-width: 0; }
}

/* ── Route Ledger (#5910): the right rail ──────────────────────────────────
   At >=1024px, in List view with the Map feature on, js/features/itinerary-map/
   day-map-card.js adds .has-day-map to .itin-layout: the list takes the left
   column at full width, and #itin-right-rail (the sticky map card, then the
   Ideas aside under it) takes the right one. Without the class — Map feature
   off, Calendar or Map view, or under 1024px — the rail is display:contents
   and the aside is the grid item it always was.
   Per DESIGN.md Layout (#4427) the rail still sits below the view switch,
   timeline and filters: it starts on the day list's row, not the filter row's. */
#itin-right-rail { display: contents; }

@media (min-width: 1024px) {
  .itin-layout.has-day-map,
  .itin-layout.has-day-map:has(#itin-ideas-sidebar.itin-ideas-hidden),
  .itin-layout.has-day-map:has(#itin-ideas-sidebar.collapsed) {
    /* The list's floor keeps a stop name readable; the rail may give width back
       down to 260px (380 + 6 + 260 = 646 fits the 724px content box at 1024). */
    grid-template-columns:
      minmax(var(--day-stops-min), 1fr)
      6px
      minmax(260px, var(--ideas-col-width));
    grid-template-areas:
      "daylist resizer rail";
    align-items: start;
    column-gap: 0;
  }
  .itin-layout.has-day-map #itin-right-rail {
    grid-area: rail;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    position: sticky;
    /* Clear of the sticky day pager (#6164): its bottom rule is at --topbar-h + --itin-pager-h, and the
       card's hard shadow needs the gap too. */
    top: calc(var(--topbar-h) + var(--itin-pager-h, 8.5rem) + var(--space-3xl));
    max-height: calc(100vh - var(--topbar-h) - var(--itin-pager-h, 8.5rem) - 2 * var(--space-3xl));
    max-height: calc(100dvh - var(--topbar-h) - var(--itin-pager-h, 8.5rem) - 2 * var(--space-3xl));
    min-width: 0;
  }
  /* The map card keeps its height; Ideas takes whatever is left and scrolls. */
  .itin-layout.has-day-map #itin-ideas-sidebar {
    grid-area: auto;
    position: static;
    max-height: none;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
  .itin-layout.has-day-map #itin-ideas-sidebar.collapsed { flex: 0 0 auto; align-self: auto; }
  /* The Ideas resizer now sizes the rail, so it shows from 1024px whenever the
     card does. Same drag handle and look as the >=1280px one above. */
  .itin-layout.has-day-map #ideas-col-resizer,
  .itin-layout.has-day-map:has(#itin-ideas-sidebar.itin-ideas-hidden) #ideas-col-resizer,
  .itin-layout.has-day-map:has(#itin-ideas-sidebar.collapsed) #ideas-col-resizer {
    grid-area: resizer;
    display: block;
    position: sticky;
    top: var(--rail-top);
    height: calc(100vh - var(--rail-top) - var(--space-3xl));
    cursor: col-resize;
    touch-action: none;
  }
  .itin-layout.has-day-map #ideas-col-resizer::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 2px;
    width: 2px;
    border-radius: 1px;
    background: var(--df-hair);
    transition: background var(--dur-feedback) var(--ease-out);
  }
  .itin-layout.has-day-map #ideas-col-resizer:hover::after,
  .itin-layout.has-day-map #ideas-col-resizer.dragging::after {
    background: var(--vn-trail-green);
  }
  .itin-layout.has-day-map #ideas-col-resizer::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: max(var(--tap-min), 100%);
    transform: translateX(-50%);
  }
  /* The card shows the route, so the day's map icon (a link-out to maps) has
     nothing left to do. Without the card (feature off) it stays. */
  .itin-layout.has-day-map .day-box-route-btn { display: none; }
  /* A card dragged out of a day is dropped on the card's own zone, not the
     per-day one down the list. */
  .itin-layout.has-day-map .day-map-section { display: none; }
}

/* ── Itinerary lock / unlock panels ──
   Was inline `style="…"` on both banners in index.html. Lifted here so the
   confirm button's fill can take the documented var(--surface-2) foreground
   instead of a literal white — on a --vn-trail-green fill that literal measured
   1.31:1 after dark. `display` stays inline because updateLockUI() writes
   it directly. ── */
.itin-lock-panel { margin-top: var(--space-5xl); }

/* Was a soft pastel fill (--vn-trail-green-light / --vn-green-light) with no
   keyline and no shadow — the one card on this tab still in the retired
   Field Journal language while every day-box and stub around it carries a
   2px ink keyline and a hard offset shadow. Brought onto the same card
   language here: neutral --df-panel body (a full pastel fill would also
   read as a giant instance of "this is pressable", which only the button
   inside actually is), differentiated by a --day-box-today-style accent
   stripe instead — the same "colour on the edge, not the field" move this
   file already uses for "today". */
.itin-lock-card {
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  background: var(--df-panel);
  padding: var(--space-3xl);
  text-align: center;
  border-left-width: var(--space-xs);
}
.itin-lock-card-open { border-left-color: var(--vn-trail-green); }
.itin-lock-card-locked { border-left-color: var(--vn-green); }

.itin-lock-copy {
  font-size: var(--fs-sm);
  color: var(--df-ink);
  margin-bottom: 0.75rem;
  font-weight: 400;
}
.itin-lock-copy i { color: var(--vn-trail-green); }
.itin-lock-title {
  font-family: var(--df-display);
  font-size: var(--fs-md);
  color: var(--df-ink);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.itin-lock-title i { color: var(--vn-green); }

/* No .itin-lock-btn here on purpose: the Confirm & Lock button takes
   .btn-primary (issue #482's call, and the right one) — that class already
   carries min-height: var(--tap-min) and color: var(--surface-2), which is
   what this rule existed to provide, and it is the convention every other
   primary action in the app already follows. The panel around it still
   needs its own classes, below, because it was entirely inline-styled.
   Scoped here to #confirm-itinerary-wrap rather than a redeclaration of
   .btn-primary itself — that class is the whole app's default button and a
   wholesale pill/keyline conversion of it is a separate, much larger change
   than this tab's own redesign; every other .btn-primary this tab actually
   uses already gets the DF treatment for free via .df-modal-content. */
#confirm-itinerary-wrap .btn-primary {
  width: auto;
  border-radius: var(--radius-pill);
  border: 2px solid var(--df-ink);
  --press-bw: 2px;
  transition: transform var(--dur-feedback) var(--ease-out);
}
#confirm-itinerary-wrap .btn-primary:hover {
  background: var(--vn-trail-green-mid);
  transform: translate(2px, 2px);
}
#confirm-itinerary-wrap .btn-primary:active {
  transform: translate(4px, 4px);
}

.itin-lock-unlock-btn {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--df-panel);
  border: 2px solid var(--vn-green);
  color: var(--vn-green);
  border-radius: var(--radius-pill);
  min-height: var(--tap-min);
  padding: var(--space-sm) var(--space-2xl);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  --press-o: 4px;
  --press-c: var(--vn-green);
  --press-bw: 2px;
  transition: transform var(--dur-feedback) var(--ease-out);
}
.itin-lock-unlock-btn:hover {
  transform: translate(2px, 2px);
}
.itin-lock-unlock-btn:active {
  transform: translate(4px, 4px);
}

/* ── Stop Cards ──
   Collapsed by default: one summary row (Time - Location - Edit - X). Tap
   the row to expand and reveal address/notes/photos/comments below it. ── */
.itin-stop-card {
  border-bottom: 2px solid var(--df-hair);
  /* Named container so the @container rule below (issue #547) can gate the
     address subtitle AND the expanded body's .stop-addr-place off the same
     measurement — the actual row width, not the viewport. .stop-name-block
     alone isn't a shared ancestor of both (.stop-addr-place lives in
     .stop-expanded-body, a sibling of .stop-summary-row), which is why an
     earlier version of this fix (issue #545 follow-up) could only correct
     the inline subtitle and left .stop-addr-place's unconditional
     `display: none` below stranding the address nowhere at all once the
     inline copy hid itself. */
  container-type: inline-size;
  container-name: stop-row;
}
.itin-stop-card:last-child { border-bottom: none; }

/* Issue #154 — Main Trip/Sub-Trip wash + left stripe (the List view's day rows
   drop both for a node ring, #7794). A shared stop (the common case,
   and every stop on an unsplit day) gets neither — that absence IS the "this
   row is the same for everyone" signal, not just a default. inset box-shadow
   rather than border-left so this never affects layout/box sizing. */
.itin-stop-card.trip-main { background: var(--trip-main-bg); box-shadow: inset 3px 0 0 var(--trip-main-accent); }
.itin-stop-card.trip-sub { background: var(--vn-sky-light); box-shadow: inset 3px 0 0 var(--vn-sky); }

/* Issue #449 — the expanded card had no containment at all, so its last
   section (ALTERNATIVES) read as though it owned the stop rendered below it.
   Each card publishes its own category hue as --stop-cat (class emitted by
   renderStopCard()); only the expanded state spends it, on a left rail. A
   variable rather than seven copies of the .expanded rule, and separate from
   the .cat-* pill classes on purpose: those carry a background+color sized
   for a pill and would paint the entire row. */
.itin-stop-card.stop-cat-food       { --stop-cat: var(--vn-pandan); }
.itin-stop-card.stop-cat-transport  { --stop-cat: var(--vn-sky); }
.itin-stop-card.stop-cat-shopping   { --stop-cat: var(--vn-batik); }
.itin-stop-card.stop-cat-hotel      { --stop-cat: var(--vn-indigo); }
.itin-stop-card.stop-cat-activity   { --stop-cat: var(--vn-green); }
.itin-stop-card.stop-cat-attraction { --stop-cat: var(--vn-purple); }
/* "Other" has no hue in the Category Compass and must not borrow one — the
   rail still marks the card's extent, just without claiming a category.
   --text-muted, not --border-strong: real-browser measurement (npm run
   verify-mobile) put --border-strong at 1.41:1 against the --surface-1 tint
   in light mode and 1.96:1 in dark — invisible, which makes the containment
   this rail exists to provide decorative for every "other" stop. The rail IS
   the signal, so WCAG 2.2 SC 1.4.11's 3:1 floor for a meaningful non-text
   element applies; --text-muted clears it at 4.68:1 / 5.74:1 and is still a
   neutral. Pinned by a computed test in test/itinerary-expanded-card.test.js
   so the next token swap can't quietly reintroduce an invisible one. */
.itin-stop-card.stop-cat-other      { --stop-cat: var(--df-ink-soft); }

/* Opened stop = Cut Stock card (#6209, supersedes the #449 category rail:
   the card's own keyline is what contains ALTERNATIVES). */
.itin-stop-card.expanded:not(.booking-stub) {
  /* #6209: an opened stop lifts into a Cut Stock card on the working ground —
     2px ink keyline, 14px radius, Press Large shadow. Tokens only, so dark
     mode follows --df-*. The card's own edge is what closes it off from the
     next stop (#449). */
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: 14px;
  margin-bottom: 5px;
}
/* Main Trip/Sub-Trip keep their plan wash and stripe inside the card. */
.itin-stop-card.expanded.trip-main:not(.booking-stub) {
  box-shadow: inset 3px 0 0 var(--trip-main-accent);
}
.itin-stop-card.expanded.trip-sub:not(.booking-stub) {
  box-shadow: inset 3px 0 0 var(--vn-sky);
}
/* Hairline between the summary row and the details. */
.itin-stop-card.expanded:not(.booking-stub) .stop-expanded-body {
  border-top: var(--edge-hairline);
}
/* The summary row is clipped by the card's radius. */
.itin-stop-card.expanded:not(.booking-stub) .stop-summary-row {
  border-radius: 12px 12px 0 0;
}

/* The card hairline between connected rows is dropped (see below); an opened
   card keeps its full keyline, so the connector still draws beneath it. */

/* The panel tint would leave the summary row with no hover feedback, so its
   hover flips to --df-ground, which works in both themes. */
.itin-stop-card.expanded .stop-summary-row:hover { background: var(--df-ground); }

/* Day header split badge + flip control. Wraps on narrow screens — this row
   now carries 4 elements (Current View / Edit Plan Setting / Remove X /
   Switch to Y), too many to guarantee one line on a phone-width day box. */
.day-split-flip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-2xl);
  font-size: var(--fs-xs);
  border-bottom: 2px solid var(--df-hair);
}
.day-split-badge {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--df-ink-soft);
  font-weight: 600;
}
.day-split-flip-row.trip-main .day-split-badge { color: var(--trip-main-accent); }
.day-split-flip-row.trip-sub .day-split-badge { color: var(--vn-sky-text); }
.day-split-flip-btn.trip-main { color: var(--trip-main-accent); border-color: var(--trip-main-accent); }
.day-split-flip-btn.trip-sub { color: var(--vn-sky-text); border-color: var(--vn-sky); }

/* Issue #154 Phase 2 — self-declared roster controls in the flip row. */
.day-split-roster-declare { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }
.day-split-declare-btn.trip-main.active { background: var(--trip-main-accent); color: var(--df-pin-white); border-color: var(--trip-main-accent); }
.day-split-declare-btn.trip-sub.active { background: var(--vn-sky); color: var(--df-pin-white); border-color: var(--vn-sky); }
.day-split-roster-tally { color: var(--df-ink-soft); font-size: var(--fs-xs); }

.stop-summary-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  /* 12px rather than 10px so a stop row stays visibly taller than the
     connector gap between stops — the content has to outweigh the link. */
  padding: var(--space-xl);
  cursor: pointer;
}
.stop-summary-row:hover { background: var(--df-hair); }

/* The transport leg card is a <button> (keyboard-reachable, opens the Bookings
   form); strip the native button chrome so it keeps the stop-row look. */
button.itin-transport-inline-btn {
  width: 100%;
  min-height: var(--tap-min);
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}
button.itin-transport-inline-btn:hover { background: var(--df-hair); }
button.itin-transport-inline-btn:focus-visible { outline: 2px solid var(--df-ink-soft); outline-offset: -2px; }

/* The day's spine — the vertical axis .stop-connector's tick lines up with.
   It used to be the 62px time-badge column. Issue #451 removed that badge:
   it was the loudest element on every row and identical on all of them, so
   the eye had nowhere to land, while the category — DESIGN.md's designated
   meaning-carrier — was a 27x15 icon-only pill. The category pill now leads
   the row with its label, and the spine is its icon column instead, so the
   tick still threads through a real vertical axis rather than empty space. */
:root { --stop-spine: 22px; }

/* The label half of a category pill — now only the Discover card's (#2478
   made the itinerary stop card's pill icon-only, a 30px circle, see
   .itin-stop-card .cat-pill).
   Capped because "Accommodation" at full width would push a long place name
   off a 390px row; it truncates rather than wraps, since the hue and icon
   already carry the meaning if the word clips. */
.cat-pill-label {
  max-width: 84px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The quiet second line: time, then who is talking. Everything here is
   deliberately --fs-xs/muted — this is the row's supporting evidence, not its
   headline (the place name is). */
.stop-meta-line {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.4;
  color: var(--df-ink-soft);
  min-width: 0;
  /* #6580: at phone width the row wraps as whole items instead of squeezing
     each one — the duration used to break "1h 30m" over two lines while the
     area truncated. Every item but the area is flex:none + nowrap. */
  flex-wrap: wrap;
  row-gap: 0;
}
.stop-meta-line > * { flex: none; white-space: nowrap; }
.stop-meta-line > .stop-area,
.stop-meta-line > .stop-comment-signal { flex: 0 1 auto; min-width: 0; }
.stop-meta-time { white-space: nowrap; }
.stop-meta-sep { color: var(--df-ink-soft); }

/* "No time yet" is real planning state, not an empty cell — it stays visible
   but drops to the muted weight so a scheduled row still reads louder. */
.stop-no-time {
  font-style: italic;
  opacity: 0.85;
}

/* Issue #451's sharper half: a three-person trip rendered identically to a
   solo one. This is the only thing on a collapsed row that says anyone else
   is here, so it gets the one non-muted colour on the meta line — still
   quieter than the place name, but not invisible. */
.stop-comment-signal {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  color: var(--vn-trail-green);
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Issue #638 — same shape as .stop-comment-signal above, purely
   informational (tapping the row already expands the card via
   .stop-summary-row's own handler). position:relative + ::before below
   still meets the --tap-min 44px minimum CLAUDE.md requires of any small
   interactive/near-interactive glyph, even with no onclick of its own —
   insurance against it ever gaining one. */
.itin-stop-fixed .stop-drag-grip { display: none; }
.itin-cal-block.itin-stop-fixed, .itin-cal-chip.itin-stop-fixed { cursor: pointer; }
.itin-cal-block-lock { font-size: var(--fs-xs); margin-right: 2px; }
.stop-open-booking { min-height: var(--tap-min); }
.stop-booking-signal {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  color: var(--vn-indigo);
  font-weight: 600;
  white-space: nowrap;
  position: relative;
}
.stop-booking-signal::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}

/* Issue #693 Part A — same non-interactive shape as .stop-booking-signal
   above (tapping the row already expands the card). --vn-indigo is the
   Category Compass's real hotel hue (.cat-hotel), unlike .stop-booking-signal's
   own use of it, which is generic to any tagged booking — reused here on
   purpose since this chip specifically IS about accommodation. */
.stop-accommodation-signal {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  color: var(--vn-indigo);
  font-weight: 600;
  white-space: nowrap;
  position: relative;
}
.stop-accommodation-signal::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}

/* Wraps the grip + type pill + place name, kept separate from the time
   badge so dragging to reorder never touches time. Deliberately NOT the
   drag surface itself (see .stop-drag-grip) — it used to be, and
   touch-action:none on a flex:1 element covering the photo/category/name
   meant the largest touch region on the row didn't scroll. */
.stop-draghandle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* The actual SortableJS handle (issue #545 follow-up) — an explicit grip
   column instead of the whole row, so touch-action:none is scoped to
   something a thumb only lands on deliberately. Only rendered on an
   editable card (renderStopCard's `draggable` gate). */
.stop-drag-grip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  min-height: var(--tap-min);
  touch-action: none;
  color: var(--df-ink-soft);
  cursor: grab;
  position: relative;
}
/* Same expanded-hit-box idiom as .stop-menu-btn — the glyph stays a slim
   20px column, the tappable/grabbable region doesn't. */
.stop-drag-grip::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}
.stop-drag-grip.sortable-drag,
.stop-drag-grip.sortable-chosen { cursor: grabbing; }
/* Issue #159 — Ideas sidebar cards dragged into the calendar grid (Pointer
   Events, see startCalIdeaDrag() in js/itinerary.js) rather than SortableJS,
   which only wires the day-list view's own drop targets. */
.itin-stop-card.dragging { opacity: 0.5; }

/* Issue #226: direct A-to-B Google Maps directions link-out between two
   consecutive stops (replaces the old walk/ride time estimate). Still a real
   44px tappable target — min-height is deliberately unchanged, one-handed
   in-trip use depends on it — but it no longer *reads* as a row peer to the
   stops it joins. It used to carry a full-bleed hover fill, its own
   hairline, and fs-sm/500 text at 44px tall against a 46px stop row: the
   link between two places weighed exactly as much as the places, so a
   five-stop day squinted down to ten identical bands with no primary. Now
   the 44px is whitespace with a quiet mark in it, and the spine tick below
   spends that height saying "these two stops are consecutive" instead. */
.stop-connector {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0 var(--space-xl) 0 calc(var(--space-xl) + var(--stop-spine) + var(--space-md));
  min-height: 28px;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.4;
  color: var(--df-ink-soft);
  text-decoration: none;
  transition: color var(--dur-feedback) var(--ease-out);
}
.stop-connector .ti { font-size: 14px; line-height: 1; flex: none; }
/* Visual height ~28px, tap height 44px: a centred transparent hit box. */
.stop-connector::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: max(44px, 100%);
  transform: translateY(-50%);
}
.stop-connector:hover,
.stop-connector:focus-visible { color: var(--vn-trail-green); }

/* Exactly one separator between any two stops: the leg's own space when there
   is one, the card hairline when there isn't. */
.itin-stop-card:has(+ .stop-connector) { border-bottom: none; }
/* An opened card (#6209) keeps its full keyline above a connector. */
.itin-stop-card.expanded:not(.booking-stub):has(+ .stop-connector) { border-bottom: 2px solid var(--df-ink); }
/* The opened card's 2px keyline shifts its padding box; keep the node on the line. */
#itinerary-content .day-box-stops > .itin-stop-card.expanded:not(.booking-stub)::before { left: calc(var(--lg-x) - 9px); top: 13px; }

/* ── Route Ledger (#5905) ─────────────────────────────────────────────
   One continuous Route Amber dashed line (DESIGN.md "The Dashed Route": 3px,
   9px on, 9px off) per day, drawn once on .day-box-stops::before, with each
   stop a node on it (its own ::before, so a dragged card takes its node along
   and the line is never cut). Columns, left to right: time, node gutter, body.
   Scoped to #itinerary-content > .day-box so the Ideas sidebar (which reuses
   .day-box-stops/.itin-stop-card) and the alternatives nested inside an
   expanded stop keep their own look. */
#itinerary-content .day-box {
  --lg-pad: var(--space-lg);
  --lg-time: 3.75rem;
  --lg-gut: 28px;
  --lg-x: calc(var(--lg-pad) + var(--lg-time) + (var(--lg-gut) / 2));
}
#itinerary-content .day-box-stops {
  position: relative;
}
#itinerary-content .day-box-stops::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--lg-x) - 1.5px);
  width: 3px;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--vn-amber) 0,
    var(--vn-amber) 9px,
    transparent 9px,
    transparent 18px
  );
  pointer-events: none;
}
#itinerary-content .day-box-stops:not(:has(> .itin-stop-card))::before { display: none; }

#itinerary-content .day-box-stops > .itin-stop-card {
  position: relative;
  border-bottom: none;
}
#itinerary-content .day-box-stops > .itin-stop-card.expanded:not(.booking-stub) {
  border-bottom: 2px solid var(--df-ink);
}
/* The node: Cut Stock circle, 2px ink keyline, sat on the line. */
#itinerary-content .day-box-stops > .itin-stop-card::before {
  content: '';
  position: absolute;
  z-index: 1;
  top: 15px;
  left: calc(var(--lg-x) - 7px);
  width: 14px;
  height: 14px;
  box-sizing: border-box;
  border: 2px solid var(--df-ink);
  border-radius: 50%;
  background: var(--df-panel);
  pointer-events: none;
}
#itinerary-content .day-box-stops > .itin-transport-inline-card::before {
  border-color: var(--vn-sky);
  background: var(--vn-sky);
}
/* #7794: on a split day the card-wide wash and left stripe (#154) painted over
   the day line and cut it into pieces. In the list the side is carried by the
   node's ring instead, so the line stays whole. An opened card keeps its own
   look, as every opened card does. */
#itinerary-content .day-box-stops > .itin-stop-card.trip-main:not(.expanded):not(.booking-stub),
#itinerary-content .day-box-stops > .itin-stop-card.trip-sub:not(.expanded):not(.booking-stub) {
  background: transparent;
  box-shadow: none;
}
#itinerary-content .day-box-stops > .itin-stop-card.trip-main::before { border: 3px solid var(--trip-main-accent); }
#itinerary-content .day-box-stops > .itin-stop-card.trip-sub::before { border: 3px solid var(--vn-sky); }
/* A hit-box node (drag preview) must not leave the line behind: the ghost
   keeps its own node, so the line stays continuous through the gap. */

#itinerary-content .day-box-stops > .itin-stop-card .stop-summary-row {
  align-items: flex-start;
  gap: 0;
  padding: var(--space-md) var(--lg-pad) var(--space-md) var(--lg-pad);
}
.stop-time-col {
  flex: 0 0 var(--lg-time, 3.75rem);
  width: var(--lg-time, 3.75rem);
  margin-right: var(--lg-gut, 28px);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--df-ink);
  padding-top: 2px;
}
.stop-time-col.stop-no-time { color: var(--df-ink-soft); font-weight: 400; font-style: normal; opacity: 1; }
/* An alternative nested in an expanded stop is not a point on the route. */
.stop-expanded-body .stop-time-col,
#itin-ideas-sidebar .stop-time-col { display: none; }

#itinerary-content .day-box-stops > .itin-stop-card .stop-draghandle { align-items: flex-start; }
#itinerary-content .day-box-stops > .itin-stop-card .stop-name-compact { font-weight: 600; }
/* Phone: no photo thumb in the collapsed row (the photo stays in the expanded
   body). The category is an icon-only .stop-cat-icon before the place name (#5937). */
@media (max-width: 1023px) {
  #itinerary-content .day-box-stops > .itin-stop-card .stop-summary-row .stop-photo-thumb,
  #itinerary-content .day-box-stops > .itin-stop-card .stop-summary-row .stop-photo-thumb-wrap { display: none; }
}

.stop-cat-icon { flex: none; display: inline-flex; align-items: center; font-size: 16px; line-height: 1; color: var(--stop-cat-text, var(--df-ink-soft)); }
.stop-area { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stop-spend-caption { white-space: nowrap; }
.itin-stop-card.stop-cat-food       { --stop-cat-text: var(--vn-pandan); }
.itin-stop-card.stop-cat-transport  { --stop-cat-text: var(--vn-sky-text); }
.itin-stop-card.stop-cat-shopping   { --stop-cat-text: var(--vn-batik); }
.itin-stop-card.stop-cat-hotel      { --stop-cat-text: var(--vn-indigo-text); }
.itin-stop-card.stop-cat-activity   { --stop-cat-text: var(--vn-green); }
.itin-stop-card.stop-cat-attraction { --stop-cat-text: var(--vn-purple-text); }
.itin-stop-card.stop-cat-other      { --stop-cat-text: var(--df-ink-soft); }

/* Route Ledger (#5906): the slim leg sits beside the day line, in the body
   column; the day line itself is drawn by .day-box-stops::before. */
#itinerary-content .day-box-stops > .stop-connector {
  padding-left: calc(var(--lg-pad) + var(--lg-time) + var(--lg-gut));
  padding-top: 2px;
  padding-bottom: 2px;
}

/* Issue #400 Phase 1.5 — same 56px-square idiom as .idea-suggestion-photo
   (css/features/idea-pool.css), so the app has one photo thumbnail look,
   not two. A real <img>, not that card's background-image div — loading="lazy"
   only applies to <img>. onerror (see renderStopCard()) removes it outright
   on a miss/cap-exceeded 404/503, so there's never a broken-image icon. */
.stop-photo-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--df-radius-stub);
  object-fit: cover;
  background: var(--df-panel);
}

/* Wider banner variant for the expanded body — tappable to open the
   attributed lightbox (viewPlacePhoto()). Design canvas gap-close: reuses
   the exact Instant Print material .dtl-print established (css/discover.css)
   — cream stock, two strips of tape, a slight tilt — rather than a plain
   full-bleed rectangle, so the app has one photographic-print idiom, not
   two. Deliberately compact and left-aligned (not full width) the way the
   canvas's own .banner was: a wide tilted rectangle would risk pushing past
   .stop-expanded-inner's padding, which is why the frame is capped and that
   ancestor already carries overflow:hidden as a clean clip, never a scrollbar. */
.stop-photo-banner-frame:has(.stop-photo-banner) {
  position: relative;
  display: inline-block;
  max-width: min(280px, 100%);
  margin: 0 0 var(--space-md);
  padding: 8px 8px 22px;
  background: var(--df-instant-stock);
  border-radius: var(--df-radius-print);
  /* No border — matching .dtl-print/.invite-print (css/discover.css), the
     shipped Instant Print's own edge is background + shadow only. The
     design canvas draft this was built from had one; the real signature
     never did, so it was dropped here to match. */
  /* The one sanctioned blurred shadow (--df-press-lift) — a print lifted off
     the page, not a flat sticker. Doesn't flip with theme; see its :root def. */
  box-shadow: var(--df-press-lift);
  transform: rotate(-1.4deg);
}
/* Tape corners — pinned amber, not theme-aware, same reasoning as the print
   stock above: a strip of tape doesn't change color at midnight. 42% alpha
   is DESIGN.md's own documented figure for the Instant Print signature
   ("Route Amber at 42% alpha") and matches --dtl-tape (css/discover.css) —
   not reused directly since that token is scoped to .dtl, not global. */
.stop-photo-banner-frame:has(.stop-photo-banner)::before,
.stop-photo-banner-frame:has(.stop-photo-banner)::after {
  content: '';
  position: absolute;
  top: -7px;
  width: 42px;
  height: 15px;
  background: rgba(186, 117, 23, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.stop-photo-banner-frame:has(.stop-photo-banner)::before { left: -8px; transform: rotate(-4deg); }
.stop-photo-banner-frame:has(.stop-photo-banner)::after { right: -8px; transform: rotate(3.4deg); }

.stop-photo-banner {
  display: block;
  width: 100%;
  max-width: 264px;
  max-height: 180px;
  object-fit: cover;
  border-radius: 1px;
  cursor: zoom-in;
}

/* #7635 — a curated photo's author and licence. In the banner it sits on the
   print's stock (light in both themes), and goes when a failed photo takes the
   frame with it. */
.photo-credit { font-size: var(--fs-xs); line-height: 1.4; overflow-wrap: anywhere; }
.photo-credit a { color: inherit; text-decoration: underline; }
.stop-photo-banner-frame .photo-credit { display: block; margin-top: var(--sp-xs); color: var(--df-instant-stock-ink); }
.stop-photo-banner-frame:not(:has(.stop-photo-banner)) .photo-credit { display: none; }
.dtl-prints-credit { text-align: right; }

.stop-name-compact {
  flex: 1;
  min-width: 0;
  /* Issue #453 — this IS the tab's primary content, so it takes DESIGN.md's
     documented Body size (--fs-sm, 14px, BodyDense). */
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.3;
  color: var(--df-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Wraps the name (+ an idea card's address subtitle, see below) — takes over
   .stop-name-compact's old flex:1/min-width:0 role as the direct flex item
   inside .stop-draghandle, now that the name isn't always its only child. */
.stop-name-block {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.stop-name-line { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
/* Icon + name share one line; the name keeps ellipsising beside the icon. */
.stop-name-line:has(.stop-cat-icon) { display: flex; flex-direction: row; align-items: baseline; gap: var(--space-sm, 6px); }
.stop-name-line:has(.stop-cat-icon) > .stop-name-compact { flex: 1 1 auto; }

/* Ideas cards show their address directly under the name at every width —
   there's no day/time to preview an idea by, so the address is the next most
   useful thing to surface without a tap. A scheduled stop only gets it from
   the desktop breakpoint up, where there's spare row width; see the rules
   below and in the @media (min-width: 1024px) block above. */
.stop-name-subtitle {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Issue #901 — first line of a stop's note, shown on the collapsed row so a
   group doesn't have to expand the card to see a meeting point or other
   detail someone just typed. Unlike .stop-name-subtitle above, this is NOT
   gated behind the 1024px breakpoint: the whole point is "visible without
   reopening the row", at any width. */
.stop-note-preview {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.4;
  color: var(--df-ink-soft);
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A scheduled stop now carries its address in the markup too (not just an
   idea, which is why the isIdea branch in renderStopCard() went away), but
   below the desktop breakpoint there is no room for it: at 390px the place
   name is already down to 162px of a 341px row and truncating, so a second
   line would be competing for space the name itself doesn't have. It stays
   an expand-only detail there, exactly as before. */
.itin-stop-card:not(.idea-card) .stop-name-subtitle { display: none; }

/* Density at the desktop breakpoint, where .app-main drops its 680px cap and
   a stop row runs ~680px wide (more on a wide monitor) to hold one short
   place name — roughly 70% of the row sat empty while that same name
   truncates on a phone. The address rides on the name's own line rather than
   waiting for an expand: it's the one field that answers "where is this"
   without a tap, and the row already has the width for it.
   This block has to live *after* the base display:none above, not up in the
   earlier @media (min-width: 1024px) block with the rest of the itinerary's
   desktop layout — the two selectors are specificity-identical and a media
   query adds none, so source order is the only thing deciding between them. */
@media (min-width: 1024px) {
  .itin-stop-card:not(.idea-card) .stop-name-subtitle {
    display: block;
    /* The address is what gives ground when the row runs out: it shrinks and
       truncates while the name keeps its intrinsic width. A percentage cap on
       the name instead would have truncated the row's primary content with
       whitespace still sitting to its right. */
    flex: 1 1 auto;
    min-width: 0;
  }
  /* Gated on a subtitle actually being present — an address-less stop keeps
     the original single-item column rather than becoming a row with one
     child that then shares its width with nothing. */
  .itin-stop-card:not(.idea-card) .stop-name-line:has(.stop-name-subtitle) {
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-lg);
  }
  /* ⚠️ The shrink factor is doing the work here, and `1` was wrong.
     flex-shrink is weighted by flex-basis, so `0 1 auto` on the name against
     `1 1 auto` on the address made the two give ground in PROPORTION to
     their content width — the opposite of what the comment above intends.
     Measured at 1440px: the name rendered into 55px of the 100px
     "Senso-ji Temple" needs while the secondary address kept 130px of its
     own. A near-zero factor makes the name the last thing to yield: the
     address absorbs essentially the whole shortfall, and the name only
     starts truncating once the address has nothing left to give. Not `0`,
     which would let a genuinely long name overflow the row instead of
     ellipsising as a last resort. */
  .itin-stop-card:not(.idea-card) .stop-name-line:has(.stop-name-subtitle) .stop-name-compact {
    flex: 0 0.04 auto;
  }
  /* Same string as the inline one above, so the expanded body stands down
     here instead of printing the address twice. Only the place address —
     .stop-addr is shared with the expense and history lines. This is the
     default for the >=1024px case; the @container rule below (issue #547)
     flips it back to shown whenever the row is too narrow for the inline
     copy, so the address is never hidden in both places at once. */
  .itin-stop-card:not(.idea-card) .stop-addr-place { display: none; }
}

/* Issue #545 follow-up (design critique) found the flex-shrink weighting
   above absorbing the address down to an 8-11px sliver — an ellipsis and
   nothing else — rather than actually yielding, while the place name (the
   row's one primary string) still truncated too. Issue #547 then found that
   fix's own gate (viewport width) was the same wrong proxy the original bug
   used: PR #544 gave the day list an explicit floor (--day-stops-min:
   380px) so the map panel and Ideas sidebar can legitimately squeeze a
   >=1024px row down to a width the phone layout already treats as "no
   room". A container query measuring the CARD's own width (not the
   viewport's, and not just .stop-name-block's — see .itin-stop-card's
   container-type above for why it has to be the whole card) hides the
   address outright once there isn't room to show it as more than a stub, so
   the name gets the width back instead — and un-hides .stop-addr-place in
   the same breath, since that's the only remaining place the address can be
   read. 534px, not the 340px this superseded: converts the old
   .stop-name-block-relative threshold to the full row via the constant
   ~194px both rules measured between the two (photo thumb, drag handle,
   category pill, menu/caret buttons and padding — everything the row
   spends before the name block gets anything, see --day-stops-min above).
   Re-verify with a real browser at 1280/1440 with the map panel dragged
   wide and the Ideas sidebar open if that gap ever changes. */
@container stop-row (max-width: 534px) {
  .itin-stop-card:not(.idea-card) .stop-name-subtitle {
    display: none;
  }
  .itin-stop-card:not(.idea-card) .stop-name-line:has(.stop-name-subtitle) .stop-name-compact {
    flex: 1 1 auto;
  }
  .itin-stop-card:not(.idea-card) .stop-addr-place {
    display: flex;
  }
}

/* Ideas read as a compact preview card (icon + title + address) rather than
   a line item — dropping the day/time column (never applicable to an idea)
   frees the row for a bit more breathing room and a proper circular icon
   badge in place of the small text-pill category tag Stops use. */
.itin-stop-card.idea-card .stop-summary-row {
  padding: var(--space-xl) var(--space-2xl);
  gap: var(--space-lg);
}
.itin-stop-card .cat-pill {
  width: 30px;
  height: 30px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  font-size: var(--fs-md);
  flex-shrink: 0;
}

/* Design canvas gap-close — an idea is parked, never pinned to a route the
   way a scheduled stop is, so its card carries a strip of tape and its
   thumbnail sits very slightly askew: the same "taped down" grammar as
   .stop-photo-banner-frame above and .dtl-print (css/discover.css)
   elsewhere in the app. #itin-ideas-sidebar's own padding (var(--space-lg),
   see .day-box-stops there) gives this room even though .day-box carries
   overflow:hidden — the -7px offset stays well inside it. Scoped to
   .idea-card only — .stop-photo-thumb itself stays the one shared look
   everywhere else it's reused (accommodation rows, the idea-suggestion
   carousel), per issue #400 Phase 1.5's "one photo thumbnail look" rule. */
.itin-stop-card.idea-card {
  position: relative;
}
.itin-stop-card.idea-card::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 22px;
  width: 44px;
  height: 14px;
  /* 42% alpha — DESIGN.md's own documented figure for the Instant Print
     signature's tape ("Route Amber at 42% alpha"), same as the banner
     frame above. */
  background: rgba(186, 117, 23, 0.42);
  border-left: 1px dashed rgba(16, 26, 20, 0.3);
  border-right: 1px dashed rgba(16, 26, 20, 0.3);
  transform: rotate(-3deg);
  pointer-events: none;
}
.itin-stop-card.idea-card .stop-photo-thumb {
  transform: rotate(-2deg);
  box-shadow: 0 1px 0 rgba(9, 20, 13, 0.1), 0 6px 10px -8px rgba(9, 20, 13, 0.6);
}

.stop-expand-caret {
  flex-shrink: 0;
  font-size: var(--fs-sm);
  color: var(--df-ink-soft);
  transition: transform var(--dur-state) var(--ease-move);
}
.itin-stop-card.expanded .stop-expand-caret { transform: rotate(180deg); }

/* Expanding a stop is the itinerary's primary interaction, and as a
   display:none→block flip it moved every row below it in a single frame with
   nothing to say where the new content came from. The 0fr→1fr grid row is the
   content-height-agnostic way to transition it: no measured pixel height to
   go stale when comments load in afterwards, and nothing animating on `height`
   itself. The global `* { box-sizing: border-box }` at the top of this file is
   what lets the inner box's padding collapse to nothing inside a 0fr track;
   min-height:0 defeats the grid item's automatic min-content floor. */
.stop-expanded-body {
  display: grid;
  /* minmax(0, …) rather than a bare 0fr/1fr, and this is not stylistic: an
     fr track's automatic minimum is its content's min-content size, and
     padding contributes to that no matter what overflow or min-height the
     item carries. A bare 0fr therefore collapsed to 12px, not 0 — the inner
     box's own padding-bottom — leaving every collapsed stop in the list
     carrying a sliver of dead space. Measured in Chrome; jsdom has no layout
     engine and reports nothing here either way. */
  grid-template-rows: minmax(0, 0fr);
  transition: grid-template-rows var(--dur-state) var(--ease-move);
}
.itin-stop-card.expanded .stop-expanded-body { grid-template-rows: minmax(0, 1fr); }

/* visibility, not just the clip, is load-bearing: display:none used to keep
   a collapsed stop's address, notes, photos and comments out of the
   accessibility tree and out of the Tab order. A 0-height overflow:hidden box
   would leave every one of them focusable and readable — so the state that
   replaces display:none has to do that job too. The delay only applies on the
   way out, so the content stays visible for the length of the collapse and
   disappears the moment it finishes. */
.stop-expanded-inner {
  min-height: 0;
  overflow: hidden;
  visibility: hidden;
  padding: 0 var(--space-xl) var(--space-xl) var(--space-xl);
  transition: visibility 0s var(--ease-out) var(--dur-state);
}
.itin-stop-card.expanded .stop-expanded-inner {
  visibility: visible;
  transition-delay: 0s;
}
/* #6983: the comments placeholder inside a collapsed card can't be seen, but its
   infinite shimmer still forced a style recalc per frame (95% main-thread busy
   while scrolling a 60-stop trip). Nothing animates until the card opens. */
.itin-stop-card:not(.expanded) .stop-expanded-inner .skeleton::after {
  animation: none;
}

.stop-addr {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Per-stop estimate within/exceed (issue #410) — overrides .stop-addr's
   default muted color; exceed reuses the same coral this app already uses
   for every other "over" state (Budget tab's overbudget band, the balance
   card's owed/owes coloring). */
.stop-estimate-within { color: var(--vn-green-text, var(--vn-green)); }
.stop-estimate-exceed { color: var(--info); font-weight: 600; }

/* Issue #638 — the "Booking says 20:00 [Match booking]" drift line, same
   coral-for-attention convention as .stop-estimate-exceed above. */
.stop-booking-drift { color: var(--info); }

/* Issue #631 P4 — the Bookings tab card's "Recorded"/"Not in budget" line.
   A direct child of .itin-stop-card, sibling to .stop-summary-row rather
   than nested in .stop-expanded-inner, so it's visible without expanding
   the card — matches .stop-expanded-inner's own horizontal padding for
   alignment with the summary row's icon/text above it. Both states are a
   real <button> (js/bookings.js's _bookingMoneyLineHtml()) — the "Recorded"
   state used to be a plain onclick div, unreachable by keyboard — so the
   button reset lives on the shared class both states carry. */
.booking-money-line {
  padding: 0 var(--space-xl) var(--space-sm);
  font-size: var(--fs-xs);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: inherit;
  min-height: var(--tap-min);
}
.booking-money-line-missing {
  color: var(--info);
}

.stop-link {
  font-size: var(--fs-xs);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.stop-link a { color: var(--vn-trail-green); overflow-wrap: anywhere; }

/* #2039 — community diet labels + report control on a food stop. */
.stop-community-diet { font-size: var(--fs-xs, 14px); margin-bottom: var(--space-xs); display: flex; flex-direction: column; gap: var(--space-xs); }
.community-diet-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.community-diet-line { color: var(--df-ink); font-family: var(--df-sans); }
.community-diet-line a { color: var(--df-brand); font-weight: 600; position: relative; }
/* The link text is small; its tappable area is 44px (--tap-min), centred on it. */
.community-diet-line a::before { content: ""; position: absolute; left: 50%; top: 50%; width: max(var(--tap-min), 100%); height: max(var(--tap-min), 100%); transform: translate(-50%, -50%); }
.community-diet-open { width: 100%; min-height: var(--tap-min); display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: 0 var(--space-md, 16px); border: 2px solid var(--df-ink); border-radius: 999px; background: var(--df-panel); color: var(--df-ink); font: 600 var(--fs-xs, 14px)/1.3 var(--df-sans); cursor: pointer; }
/* Board C (#6345) puts the open panel and the summary on an amber tint, so they read as their own panel on the card. */
.community-diet-summary, .community-diet-control.open { border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub); background: var(--df-ground); padding: var(--space-sm) var(--space-md, 12px); }
.community-diet-summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); font: 400 var(--fs-xs, 14px)/1.5 var(--df-sans); color: var(--df-ink); }
.community-diet-summary-head { display: block; }
.community-diet-row + .community-diet-row { margin-top: var(--space-sm); }
.community-diet-q { font: 600 15px/1.3 var(--df-sans); margin-bottom: var(--space-xs); }
.community-diet-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.community-diet-chip { min-height: var(--tap-min); min-width: var(--tap-min); padding: 0 14px; border: 2px solid var(--df-ink); border-radius: 999px; background: transparent; color: var(--df-ink); font: 600 13px/1.3 var(--df-sans); cursor: pointer; }
.community-diet-chip.on { background: var(--df-ink); color: var(--df-ground); }
.community-diet-undo { min-height: var(--tap-min); padding: 0 6px; border: 0; background: transparent; color: var(--df-ink-soft); font: 600 13px/1.3 var(--df-sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.community-diet-why { margin-top: var(--space-xs); }
.community-diet-why-label { display: block; margin-bottom: var(--space-xs); color: var(--df-ink-soft); font: 700 11px/1.3 var(--df-sans); letter-spacing: .1em; text-transform: uppercase; }
.community-diet-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-top: var(--space-sm); }
.community-diet-note { color: var(--df-ink-soft); font-size: var(--fs-xs); }

/* Issue #159 — only shown when durationMin was explicitly set (not the
   calendar view's category-default fallback), matching .stop-addr's styling */
.stop-duration {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Issue #206 — quiet "who added/changed this" line, same look as .stop-addr/.stop-duration */
.stop-attribution {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  opacity: 0.75;
}

/* #6211: the opened stop's tab strip (Bookings / Comments / Alternatives). */
.stop-tabs { margin-top: var(--space-md); }
.stop-tablist {
  display: flex;
  gap: var(--space-xs);
  border-bottom: 2px solid var(--df-ink);
  overflow-x: auto;
}
.stop-tab {
  min-height: var(--tap-min);
  padding: 0 var(--space-md);
  background: transparent;
  border: 0;
  border-bottom: 4px solid transparent;
  margin-bottom: -2px;
  color: var(--df-ink-soft);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.stop-tab[aria-selected="true"] { color: var(--df-ink); border-bottom-color: var(--stop-cat, var(--df-ink)); }
.stop-tab-count { font-weight: 800; }
.stop-tabpanel { padding-top: var(--space-sm); }
.stop-tabpanel[hidden] { display: none; }
.stop-tab-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--space-xs) var(--space-sm);
  margin-bottom: var(--space-xs);
  background: var(--df-ground);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-sm, 8px);
  color: var(--df-ink);
  font-family: var(--df-sans);
  text-align: left;
  cursor: pointer;
}
.stop-tab-row-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.stop-tab-row-title { font-size: var(--fs-xs); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stop-tab-row-sub { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.stop-tab-row-chev { color: var(--df-ink-soft); }
.stop-tab-action {
  min-height: var(--tap-min);
  padding: 0 var(--space-md);
  background: transparent;
  border: 2px solid currentColor;
  border-radius: 999px;
  color: inherit;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
}

/* Issue #59 — alternative places, nested under their confirmed stop's card */
.stop-alternatives {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 2px dashed var(--df-hair);
}
.stop-alternatives-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}
.stop-alternatives .itin-stop-card {
  margin-bottom: var(--space-sm);
  opacity: 0.85;
}

.stop-note {
  font-size: var(--fs-xs);
  color: var(--df-ink);
  line-height: 1.4;
  margin: var(--space-sm) 0;
  padding-left: var(--space-md);
  border-left: 3px solid var(--vn-amber); /* Route Amber rule (#6210) */
}

/* #6212: opened stop layout. One column below 640px of card width (photo beside
   the chips and note, stacked under ~360px); two columns from 640px (#6325) (details left, tab
   strip and pane right). min-width:0 on every grid child keeps a long address
   or tab row from forcing the card wider than its column. */
.stop-open-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
.stop-open-main, .stop-open-side { min-width: 0; }
.stop-open-head { display: flex; align-items: flex-start; gap: var(--space-md); }
.stop-open-photo { flex: 0 0 auto; max-width: 45%; }
.stop-open-photo:empty { display: none; }
.stop-open-facts { flex: 1 1 0; min-width: 0; }
/* Clear of the header rule above: the chips are the first thing under it. */
.stop-open-facts .stop-facts:first-child { margin-top: var(--space-sm); }
.stop-open-side .stop-tabs { margin-top: 0; }
@container stop-row (max-width: 360px) {
  .stop-open-head { flex-direction: column; }
  .stop-open-photo { max-width: 100%; }
}
/* #6325: the split follows the card's own width (stop-row container), not the
   viewport — the Ideas side column is narrow even on a 1440px screen. */
@container stop-row (min-width: 640px) {
  .stop-open-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--space-xl); align-items: start; }
}

/* #6210: fact chips under the photo print. */
.stop-facts { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin: var(--space-sm) 0; }
.stop-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 2px var(--space-sm);
  border: 2px solid var(--df-ink);
  border-radius: 999px;
  background: var(--df-ground);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.stop-chip.stop-estimate-within { color: var(--vn-green-text, var(--vn-green)); }
.stop-chip.stop-estimate-exceed { color: var(--info); }
.stop-place { margin: var(--space-sm) 0; }
.stop-place-links { display: flex; flex-wrap: wrap; gap: var(--space-md); column-gap: var(--sp-md); font-size: var(--fs-xs); font-weight: 600; }
.stop-place-links a { color: var(--vn-trail-green); text-decoration: underline; min-height: var(--tap-min); display: inline-flex; align-items: center; }
.stop-place-links .stop-link { margin: 0; }

/* #7641: curated opening hours, today's line unfolding into the week. */
.stop-hours { font-size: var(--fs-xs); line-height: 1.5; color: var(--df-ink); }
.stop-hours summary {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  min-height: var(--tap-min);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.stop-hours summary::-webkit-details-marker { display: none; }
.stop-hours summary span { flex: 1; min-width: 0; }
.stop-hours-caret { color: var(--df-ink-soft); }
.stop-hours[open] .stop-hours-caret { transform: rotate(180deg); }
.stop-hours ul { list-style: none; margin: 0 0 var(--sp-xs); padding: 0; }
.stop-hours-row {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-md);
  padding: var(--sp-xs) var(--sp-sm);
  border: 2px solid transparent;
  border-radius: var(--radius-print);
}
.stop-hours-row span:last-child { text-align: right; }
.stop-hours-row.is-closed { color: var(--df-ink-soft); }
.stop-hours-row.is-today { background: var(--df-ground); border-color: var(--df-ink); font-weight: 800; }

/* ── Bookings (Hotel Stays / Flights) — core section headers, above the
   day-by-day itinerary content. Issue #73: each section is collapsible (see
   toggleHotelSection()/toggleFlightSection() in js/bookings.js) — it's a
   <button>, not a <div>, hence the width/border/background reset. ── */
.booking-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  border: none;
  background: none;
  padding: 0;
  min-height: var(--tap-min);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--df-ink-soft);
  margin: var(--space-2xl) 0 var(--space-sm);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.booking-section-header:hover { color: var(--df-ink); }
.booking-section-count {
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--df-ink-soft);
}
.booking-section-caret {
  margin-left: auto;
  font-size: var(--fs-sm);
  transition: transform var(--dur-feedback) var(--ease-out);
}
.booking-section-caret.collapsed { transform: rotate(-90deg); }

/* Expansion only. Collapsing stays an instantaneous `style.display = 'none'`
   in applyHotelSectionExpanded()/applyTransportSectionExpanded()
   (js/bookings.js) — that state is asserted synchronously by the bookings
   tests, and a display flip cannot be transitioned anyway. Exit faster than
   entrance is the rule here regardless, and instant is faster. */
@keyframes booking-section-enter {
  from { opacity: 0; transform: translateY(-6px); }
}
.booking-section-enter {
  animation: booking-section-enter var(--dur-state) var(--ease-out) both;
}
.booking-empty {
  font-size: var(--fs-sm);
  color: var(--df-ink-soft);
  padding: var(--space-md) 0;
}

/* Issue #825 — the 12Go affiliate link-out card in the Add Transport sheet.
   Deliberately plain (no icon/photo — D1 has no image to show, #823 §5.5),
   and no "best price"/"deals" framing per #823 §5.4/§5.9's disclosure rule. */
.affiliate-offer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  border: 2px solid var(--df-hair);
  border-radius: var(--df-radius-card);
  background: var(--df-panel);
}
.affiliate-offer-title {
  font-weight: 600;
  font-size: var(--fs-xs);
}

/* Issue #824 — the sandboxed Klook widget's container. margin-top, not
   margin-bottom on the sidebar above it: #itin-ideas-klook-widget is a
   sibling of #itin-ideas-sidebar (js/itinerary.js's own render function
   controls this element independently — see the comment there), and the
   sidebar's own bottom margin/border already exists regardless of whether
   this section is showing. */
.affiliate-widget-section {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border: 2px solid var(--df-hair);
  border-radius: var(--df-radius-card);
  background: var(--df-panel);
}
.affiliate-sponsored-tag {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, inherit);
  margin-right: var(--space-xs, 4px);
}
.affiliate-widget-label {
  font-weight: 600;
  font-size: var(--fs-xs);
  margin-bottom: var(--space-sm);
}
/* #1099 — commission disclosure line (affiliateDisclosureHtml(), js/utils.js),
   on every affiliate widget, the 12Go card and the checklist shop menu.
   Muted like the accommodation sheet's copy of the same sentence. */
.affiliate-disclosure {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin: 0 0 var(--space-sm);
}
.cl-row-menu-list .affiliate-disclosure {
  width: 200px;
  margin: 0;
  padding: var(--space-xs) var(--space-md) var(--space-sm);
  border-top: 1px solid var(--df-hair);
}

/* Issue [critique pass] — was .settle-status-confirmed (--vn-trail-green, the
   brand's own Pressable Green under a legacy variable name — DESIGN.md:
   "Don't use green for anything that isn't pressable"). This span is a
   fact, not a control, so it gets a neutral ink badge instead; the shared
   .settle-status-confirmed class itself is untouched (js/expenses.js's
   "Settled" badge and accommodations.js's pre-booking "Confirmed" thread
   status are their own call, outside this pass's scope). */
.booking-badge-booked {
  background: var(--df-panel);
  color: var(--df-ink);
  border: 1px solid var(--df-hair);
}

/* The break block: calm, no box. First run is a welcome, not an alarm. */
.bk-break {
  padding: var(--sp-sm) 0;
}
.bk-break-head {
  font-family: var(--df-display);
  font-weight: 800;
  font-size: var(--fs-lg);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--df-ink);
}
.bk-break-sub {
  font-size: var(--fs-sm);
  color: var(--df-ink-soft);
  margin-top: var(--sp-sm);
}
.bk-break-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin-top: var(--sp-md);
}
/* ── Boarding-pass stub (issue [critique pass]) ───────────────────
   Applied only on the Bookings tab's own copy of a card (renderTransportBookingCard()/
   renderAccommodationBooked()/renderNewBookingCard()'s `opts.stub`) — the
   Itinerary tab's identical planning-surface card stays the flat list row
   it already was. A confirmed booking's job here is to PROVE itself; DESIGN.md
   hands this tab the boarding-pass-stub vocabulary (components.stub,
   --df-radius-stub, the torn-ticket dashed rule) for exactly that and it
   went unused until this pass. Each card becomes its own physical object —
   own keyline, own hard-offset shadow, own category-hued tab bleeding off
   the top edge (reusing --stop-cat, the same custom property
   renderStopCard() already publishes via its stop-cat-* class, itinerary.js) —
   instead of a hairline-separated row in a flat list. */
.itin-stop-card.booking-stub {
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  box-shadow: var(--df-press);
  margin-bottom: var(--space-2xl);
  position: relative;
}
/* border-bottom repeated explicitly, not left to cascade order against
   .itin-stop-card:last-child's border-bottom:none (equal specificity,
   0 classes apart) — a stub keeps its own full border on every side even
   as the trip's last booking, unlike a flat-list row's hairline. */
.itin-stop-card.booking-stub:last-child { margin-bottom: 0; border-bottom: 2px solid var(--df-ink); }
.booking-stub::before {
  content: '';
  position: absolute;
  top: -8px;
  left: var(--space-xl);
  width: 36px;
  height: 8px;
  background: var(--stop-cat, var(--df-ink-soft));
  border-radius: var(--df-radius-print) var(--df-radius-print) 0 0;
}
/* The torn-ticket internal rule (DESIGN.md Shapes) — same technique
   .wizard-recap-row already borrows it for (see that rule's own comment) —
   marks where a stub's tearable detail section begins, in place of the flat
   list's plain hairline. Lives on .stop-expanded-body itself (the grid
   container the collapse animation sizes, not .stop-expanded-inner, which
   clips to zero height inside it) — a real perforation is always there,
   folded or not, which is exactly right here: the line stays visible on a
   collapsed stub too, not just an expanded one. */
.booking-stub .stop-expanded-body {
  border-top: 2px dashed var(--df-hair);
}
/* .itin-stop-card.expanded:not(.trip-main):not(.trip-sub) (above, issue #449)
   sets its own box-shadow — an inset left rail — which would otherwise WIN
   over .booking-stub's hard-offset shadow the instant a stub expands (four
   class-level selectors there vs two here). A stub is never a Main Trip/Sub-Trip row
   (bookings.js/accommodations.js never emit those classes), so repeating
   the same :not() pair here is safe and makes this unambiguously the more
   specific rule regardless of source order — the card keeps its own
   press-offset shadow expanded or not; the category-hued tab is signal
   enough without also borrowing the itinerary rail. */
.itin-stop-card.expanded.booking-stub:not(.trip-main):not(.trip-sub) {
  background: var(--df-panel);
  box-shadow: var(--df-press);
}
/* A confirmation number is what someone reads off this card at a check-in
   counter or a gate — sized and set to actually be read at a glance, not
   filed alongside every other --fs-xs metadata line. */
.booking-stub-confno {
  font-family: var(--df-sans);
  font-weight: 600;
  font-size: var(--fs-md);
  letter-spacing: 0.03em;
  color: var(--df-ink);
}

/* Issue #799/#822 decision 8 — one section per TripDestination leg above
   its own accommodation cards; .settings-section-title already gives the
   label the right small-caps treatment, this just adds breathing room
   between sections and above each section's card stack. */
.accommodation-leg-section {
  margin-bottom: var(--sp-md);
}
.accommodation-leg-section .settings-section-title {
  margin-bottom: var(--sp-xs);
}

/* Issue #705 — booking-confirmation dropzone in the Add-a-booking sheet.
   Own copy rather than sharing the old accommodation dropzone, per this codebase's
   per-file/feature duplication convention (see CLAUDE.md). */
.booking-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-4xl) var(--space-lg);
  border: 2px dashed var(--df-ink);
  border-radius: var(--df-radius-card);
  font-size: var(--fs-sm);
  color: var(--df-ink-soft);
  text-align: center;
  cursor: pointer;
}
.booking-dropzone i { font-size: var(--fs-xl); }
.booking-dropzone.dragover {
  border-color: var(--vn-trail-green);
  background: var(--vn-trail-green-light);
  color: var(--vn-trail-green);
}
.booking-dropzone.has-file {
  border-style: solid;
  border-color: var(--vn-trail-green);
  color: var(--vn-trail-green);
}
.booking-dropzone.parsing {
  border-color: var(--vn-indigo);
  color: var(--vn-indigo);
  pointer-events: none;
}

/* Issue #874 — the Bookings tab itself as a drop target, extending
   .booking-dropzone's own dragover vocabulary rather than duplicating it.
   The overlay stays hidden until an actual drag enters the panel
   (#panel-bookings.dragover, toggled by js/bookings.js's
   onBookingsTabDragOver/Leave) — a permanently visible dropzone would
   compete with the route the tab exists to show. */
#panel-bookings { position: relative; }
.bookings-tab-drop-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 5;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  background: var(--vn-trail-green-light);
  border: 2px dashed var(--vn-trail-green);
  border-radius: var(--df-radius-card);
  color: var(--vn-trail-green);
  font-size: var(--fs-md);
  font-weight: 600;
  text-align: center;
  pointer-events: none;
}
.bookings-tab-drop-overlay i { font-size: var(--fs-xl); }
#panel-bookings.dragover .bookings-tab-drop-overlay { display: flex; }

/* Issue #473 PR4b — fixed-anatomy comparison row: every suggested option
   renders the same slots (thumb / name+meta / price / votes / actions) in
   the same position, "—" standing in for an absent price, so comparing
   options is a scan down one column instead of a reparse of prose per row. */
.accommodation-option-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 2px solid var(--df-hair);
}
.accommodation-option-row:last-child { border-bottom: none; }
/* Issue #473 PR4b — "not available for booking" (PRD: "keeps it visible
   with its reason") stays in the same fixed-anatomy row, just dimmed and
   with its vote/confirm actions removed rather than disabled — there's
   nothing left to vote on or confirm. */
.accommodation-option-row.unavailable { opacity: 0.6; }
.accommodation-option-info { min-width: 0; }
@media (max-width: 680px) {
  .accommodation-option-row { grid-template-columns: 44px 1fr; }
  .accommodation-option-row .stop-photo-thumb { width: 44px; height: 44px; }
}

/* Issue #705 — same marker, own copy for the Add-a-booking sheet (per this
   codebase's per-file/feature duplication convention). */
.booking-autofill-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--vn-indigo);
  margin-left: var(--space-sm);
}
.booking-autofill-tag i { font-size: inherit; }

/* Confirm is the one animated beat in the suggest-first flow (issue #473
   PR4b brief) — a single indigo pulse on the card that just picked a
   winner, category-accurate (Dusk Indigo = accommodation everywhere else in
   the app). Resolves to the settled state below, never a mid-flight one. */
/* #6989 — the wash lives on an overlay and only its opacity animates, so the
   pulse runs on the compositor (box-shadow/background repaint on the main thread). */
@keyframes accommodation-confirm-pulse {
  0% { opacity: 1; }
  100% { opacity: 0; }
}
.accommodation-confirm-pulse { position: relative; }
.accommodation-confirm-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 2px var(--vn-indigo);
  background: var(--vn-indigo-light);
  opacity: 0;
  animation: accommodation-confirm-pulse var(--dur-view) var(--ease-out) both;
}

/* #6582 — a stop just added holds an amber wash and keyline, then lets it go.
   itinShowNewStop() (js/itinerary.js) adds the class and removes it after
   ITIN_JUST_ADDED_MS, which matches this duration. Under reduced motion the
   wash simply sits there, static, until that removal. */
@keyframes itin-stop-just-added {
  /* No end frame: the overlay fades back to its resting opacity 0, leaving
     whatever the card already wears (a split day's Main Trip/Sub-Trip tint
     included). #6989: the wash is an overlay, so only opacity animates. */
  0%, 55% { opacity: 1; }
}
.itin-stop-card.itin-stop-just-added { position: relative; }
.itin-stop-card.itin-stop-just-added::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 2px var(--info);
  background-color: var(--info-light);
  opacity: 0;
  animation: itin-stop-just-added var(--dur-highlight) var(--ease-out);
}

/* Booker handoff — shown on the Bookings tab when the signed-in member has
   just been assigned to book a confirmed accommodation (#5366). Same family
   as the email-intake banner: panel fill, 2px ink keyline, card radius. The
   button keeps its natural width (.ui-btn is inline-flex) and the text wraps. */
.accommodation-booker-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-lg);
}
.accommodation-booker-banner i.ti-briefcase {
  font-size: var(--fs-xl);
  color: var(--df-ink);
  flex-shrink: 0;
}
.accommodation-booker-banner-text { flex: 1; min-width: 12rem; font-size: var(--fs-xs); }
.accommodation-booker-banner .ui-btn { flex-shrink: 0; }
/* Confirmed-stay card: the two booker actions sit side by side, wrap only when they don't fit. */
.accommodation-booker-actions { display: flex; gap: var(--space-md); flex-wrap: wrap; margin-top: var(--space-md); }
.accommodation-note-italic { font-style: italic; }

/* Issue [audit 2026-08-24] — the Bookings tab's cards (.itin-stop-card,
   and now the .bk-* route) already carry the Departure Fever geometry
   (--df-ink keylines, --df-press hard-offset shadows, --df-radius-card),
   but its buttons and body type were still on the retired Field Journal
   system (--radius-sm hairline buttons, the system-font stack) — exactly
   the half-converted state DESIGN.md's migration posture forbids ("a panel
   carrying both a soft blurred card shadow and a hard ink offset reads as
   a bug, not a transition"). Scoped to #panel-bookings only: the shared
   .btn-primary/.btn-secondary base classes and the page ground stay legacy
   until a dedicated app-wide conversion pass — that's a bigger unit of
   work than one tab and isn't taken on here. */
#panel-bookings,
#panel-bookings input,
#panel-bookings select,
#panel-bookings textarea,
#panel-bookings button {
  font-family: var(--df-sans);
}
#panel-bookings .btn-secondary {
  background: var(--df-panel);
  color: var(--df-ink);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  --press-bw: 2px;
  transition: transform var(--dur-feedback) var(--ease-out);
}
#panel-bookings .btn-secondary:hover {
  background: var(--df-panel);
  transform: translate(2px, 2px);
}
#panel-bookings .btn-secondary:active {
  transform: translate(4px, 4px);
}

/* Issues #873 / #941 — the panel stays full-bleed (its left edge must match
   every other tab's); only the card content inside an opened row gets a
   measure, sized for a card instead of a paragraph. */
.bk-detail-body .itin-stop-card.booking-stub {
  max-width: 640px;
}

/* Audit 2026-09-02 — an expanded booking card's "View link" / "View
   document" / "View receipt" rows are ~78x15 anchors stacked 4px apart:
   under the 44px floor, and their 24px hit circles overlap each other
   (WCAG 2.5.8). Scoped to the Bookings tab's expanded card body only — the
   Itinerary tab's identical planning-surface card stays the flat, dense list
   row it's meant to be. Growing the anchor's own box (not a ::before) is
   what keeps the stacked rows from colliding. */
#panel-bookings .stop-expanded-inner .stop-addr a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
}

/* Sits inline on the stop-summary row, right after the destination text. */
.stop-edit-btn {
  position: relative;
  background: none;
  border: 2px solid var(--vn-trail-green);
  color: var(--vn-trail-green);
  border-radius: var(--radius-pill);
  padding: var(--space-xs) var(--space-md);
  font-size: var(--fs-xs);
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.stop-edit-btn:hover { background: var(--vn-trail-green-light); }
/* Same expanded-hit-zone trick as .stop-menu-btn below — this sits with
   enough breathing room next to a card's delete button and chevron
   (unlike the tightly packed .assignee-btn row) that the full --tap-min
   zone doesn't start overlapping a neighbor. */
.stop-edit-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}

/* Visible box stays small and dense to match .stop-edit-btn/.stop-expand-caret
   in the same row — the ::before pseudo-element below expands the actual
   tappable area to the WCAG 2.2 AA floor without inflating row height or
   nudging neighboring controls (was ~20x22px, well under even the 24x24
   minimum, let alone --tap-min). */
/* .member-menu-btn (js/members.js, issue #642 P1) shares every rule below
   with .stop-menu-btn — same generic dense-row "⋯" trigger, nothing
   stop-specific about the styling. Combined selectors, not a duplicated
   block: each feature still owns a distinct class name so its own
   close*Menu() can never remove or restyle the other's popover (see the
   comment above toggleMemberMenu() in members.js). */
/* .booking-menu-btn (js/bookings.js, issue [critique pass]) joins the same
   combined group — a THIRD "⋯" trigger, same reasoning as .member-menu-btn's
   own comment: nothing card-specific about the styling, own class name so
   closeBookingCardMenu() can never cross-wire with the other two. Replaces
   the summary row's old adjacent Edit+Delete buttons, whose --tap-min hit
   zones (each individually correct) overlapped once packed next to each
   other and the expand chevron. */
.stop-menu-btn,
.idea-delete-btn,
.member-menu-btn,
.booking-menu-btn {
  background: none;
  border: 1px solid var(--df-hair);
  color: var(--df-ink-soft);
  border-radius: var(--df-radius-stub);
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--fs-xs);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}
.stop-menu-btn:hover,
.idea-delete-btn:hover,
.member-menu-btn:hover,
.booking-menu-btn:hover { background: var(--df-hair); }
.stop-menu-btn::before,
.idea-delete-btn::before,
.member-menu-btn::before,
.booking-menu-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}

/* position:fixed with top/right set inline (see positionStopMenu()/
   positionMemberMenu() in itinerary.js/members.js) rather than
   absolute-inside-the-button — the popover is appended to <body> so it's
   never clipped by an ancestor's overflow:hidden (a .day-box's own rounded
   corners for the stop menu; potentially a scrollable Settings panel for
   the member menu). */
.stop-menu-popover,
.member-menu-popover,
.booking-menu-popover {
  position: fixed;
  min-width: 160px;
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  z-index: 1000;
  overflow: hidden;
}
.stop-menu-item,
.member-menu-item,
.booking-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--space-md) var(--space-lg);
  font-size: var(--fs-sm);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--df-ink);
  font-family: inherit;
}
.stop-menu-item:hover,
.member-menu-item:hover,
.booking-menu-item:hover { background: var(--vn-trail-green-light); }
.stop-menu-item-danger,
.member-menu-item-danger,
.booking-menu-item-danger { color: var(--danger-text); }
.stop-menu-item-danger:hover,
.member-menu-item-danger:hover,
.booking-menu-item-danger:hover { background: rgba(153,60,29,0.1); }

/* ── "(!)" disclosure popover (issue #642 P3) — see toggleInfoPopover()
   (js/ui.js) for why this is body-appended/fixed-positioned like the two
   menu popovers above, rather than absolute-inside-the-trigger. */
.set-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--df-hair);
  background: var(--df-ground);
  color: var(--df-ink-soft);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
}
.set-info-btn:hover { background: var(--df-hair); }
.set-info-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}
.set-info-popover {
  position: fixed;
  max-width: 260px;
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  z-index: 1000;
  padding: var(--sp-sm) var(--sp-md);
  font-size: var(--fs-xs);
  color: var(--df-ink);
}

/* ── Share permission radios ── */
.share-radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.share-radio-label {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--fs-sm);
  color: var(--df-ink);
  cursor: pointer;
}

.share-radio-label input[type=radio] {
  width: auto;
  margin: 0;
  accent-color: var(--vn-trail-green);
}

/* Sharing tab controls (#4132): the glyph stays small and a ::before widens the
   tappable area to --tap-min, same pattern as the P16 radio (#3873).
   #4133: the radios and the consent / link-to-trip checkboxes draw the boards'
   switch (same look as .dp-switch in css/discover.css) on the real input, so
   keyboard, label association and role stay native. */
.share-radio-label input[type=radio],
.set-toggle-row input[type=checkbox],
.sharing-mask-label input[type=checkbox],
.dp-toggle input[type=checkbox] {
  appearance: none;
  position: relative;
  flex: none;
  width: 52px;
  height: 30px;
  margin: 0;
  border: 2px solid var(--df-ink);
  border-radius: 999px;
  background: var(--df-panel);
  cursor: pointer;
}
.share-radio-label input[type=radio]::after,
.set-toggle-row input[type=checkbox]::after,
.sharing-mask-label input[type=checkbox]::after,
.dp-toggle input[type=checkbox]::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--df-ink);
  transition: transform var(--dur-state) var(--ease-move), background-color var(--dur-state) var(--ease-out);
}
/* Settle (#5872): the track fills over the same tier the knob slides on. */
.share-radio-label input[type=radio],
.set-toggle-row input[type=checkbox],
.sharing-mask-label input[type=checkbox],
.dp-toggle input[type=checkbox] { transition: background-color var(--dur-state) var(--ease-out); }
.share-radio-label input[type=radio]:checked,
.set-toggle-row input[type=checkbox]:checked,
.sharing-mask-label input[type=checkbox]:checked,
.dp-toggle input[type=checkbox]:checked { background: var(--topbar-bg); }
.share-radio-label input[type=radio]:checked::after,
.set-toggle-row input[type=checkbox]:checked::after,
.sharing-mask-label input[type=checkbox]:checked::after,
.dp-toggle input[type=checkbox]:checked::after { transform: translateX(22px); background: var(--topbar-fg); }
.dp-toggle input[type=checkbox]:disabled { opacity: 0.55; cursor: not-allowed; }
.share-radio-label input[type=radio]:focus-visible,
.set-toggle-row input[type=checkbox]:focus-visible,
.sharing-mask-label input[type=checkbox]:focus-visible,
.dp-toggle input[type=checkbox]:focus-visible { outline: 2px solid var(--df-brand); outline-offset: 2px; }
.share-radio-label input[type=radio]::before,
.set-toggle-row input[type=checkbox]::before,
.sharing-mask-label input[type=checkbox]::before,
.dp-toggle input[type=checkbox]::before {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: max(var(--tap-min), 100%); height: max(var(--tap-min), 100%);
}
@media (prefers-reduced-motion: reduce) {
  .share-radio-label input[type=radio]::after,
  .set-toggle-row input[type=checkbox]::after,
  .sharing-mask-label input[type=checkbox]::after,
  .dp-toggle input[type=checkbox]::after { transition: none; }
}

/* ── Memory section ── */
.memory-section {
  margin-top: var(--space-lg);
  border-top: 2px dashed var(--df-hair);
  padding-top: var(--space-md);
}

.memory-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

/* Issue #1015 Phase 3 — "3 photos left" beside the Photo button. Muted, not
   an alert: it is information until the cap is hit, and the 402 modal owns
   the blocking moment. Empty until the free cap is close, so it takes no space. */
/* #1030 critique — up from --fs-xs (11px): these hints carry a sentence and a
   decision, not a timestamp, so they take the helper-text tier. */
.memory-quota-hint {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* Issue #1030 — the same muted hint for the AI caps: directly above Generate in
   the agent modal (.ai-quota-hint, css/features/itinerary-agent.css places it)
   and directly above Take Photo/Upload in the expense form, so each hint reads
   before the action it describes. Unlike the photo hint these sit on their own
   line, so when empty they take no space at all. */
.quota-hint {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.quota-hint:empty {
  display: none;
}

.receipt-quota-hint {
  margin-bottom: var(--space-sm);
  text-align: center;
}

/* The hint stays in the flex row even when empty (flex:1 inline) — that is what
   keeps the Photo button right-aligned; hiding it would pull the button left. */
.memory-quota-buy {
  background: none;
  border: none;
  padding: 0 0 0 var(--space-xs);
  font: inherit;
  color: var(--vn-trail-green);
  text-decoration: underline;
  cursor: pointer;
  min-height: var(--tap-min);
}

.memory-add-btn {
  background: none;
  border: 2px solid var(--vn-trail-green);
  color: var(--vn-trail-green);
  border-radius: var(--radius-pill);
  padding: var(--space-xs) var(--space-md);
  font-size: var(--fs-xs);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.memory-add-btn:hover {
  background: var(--vn-trail-green-light);
}

.memory-photos {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  margin-top: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.memory-photo-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

/* Rounded on the image itself (not the wrap's overflow) so the corner
   delete button can protrude outside the thumbnail without being clipped. */
.memory-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  border-radius: var(--df-radius-stub);
  display: block;
}

.memory-photo-del {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
  background: var(--df-panel) !important;
  color: var(--df-ink) !important;
  border: 2px solid var(--df-ink);
  box-shadow: var(--df-press);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: var(--fs-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 2;
}

/* Issue #1361 — the shared Report flag (js/report.js). A small glyph whose
   tappable area is expanded to --tap-min with ::before, like .stop-menu-btn. */
.report-btn {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  padding: var(--space-2xs);
  color: var(--df-ink-soft, var(--text-muted));
  font-size: var(--fs-sm);
  line-height: 1;
}
.report-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}
.report-btn:hover, .report-btn:focus-visible { color: var(--error); }
.report-btn-inline { margin-left: var(--space-xs); vertical-align: middle; font-size: var(--fs-xs); }
.memory-photo-report {
  position: absolute;
  bottom: 2px;
  right: 2px;
  z-index: 2;
  background: var(--df-panel);
  border-radius: 50%;
  font-size: var(--fs-xs);
}

/* ── Comments (merges what used to be separate review + suggestion features) ── */
.comments-section {
  margin-top: var(--space-lg);
  border-top: 2px dashed var(--df-hair);
  padding-top: var(--space-md);
}

.comments-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--vn-trail-green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-sm);
}

.comments-list { margin-bottom: var(--space-sm); }

.comments-empty {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  padding: var(--space-xs) 0;
}

.comment-item {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-sm);
  font-size: var(--fs-xs);
}

.comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--vn-trail-green);
  margin-bottom: var(--space-xs);
  font-size: var(--fs-xs);
}

.comment-text {
  color: var(--df-ink);
  line-height: 1.4;
  word-break: break-word;
}

.comment-del {
  background: none;
  border: none;
  color: var(--df-ink-soft);
  cursor: pointer;
  font-size: var(--fs-xs);
  line-height: 1;
  padding: var(--space-2xs);
}
.comment-del:hover { color: var(--danger-text); }
/* #1369 — keeps the report flag beside the delete ×, not centered between
   name and × by the row's space-between. */
.comment-meta .report-btn { margin-left: auto; }

.comment-add-row {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-end;
}

.comment-add-row textarea {
  /* No own font-size (issue #446) — see .checklist-reassign-select above; this
     one was confirmed live at 12px on a real 390px viewport, an active
     iOS auto-zoom trigger since the comment box lives inside an expanded
     stop, not caught by an at-rest scan. */
  flex: 1;
  min-height: 32px;
  max-height: 100px;
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  padding: var(--space-sm) var(--space-md);
  font-family: inherit;
  resize: vertical;
}

.comment-send-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--df-radius-stub);
  background: var(--vn-trail-green);
  color: var(--surface-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.comment-send-btn:hover { background: var(--vn-trail-green-mid, var(--vn-trail-green)); }
/* #6212: 44px hit area on the 32px button (the --tap-min ::before pattern). */
.comment-send-btn { position: relative; }
.comment-send-btn::before { content: ''; position: absolute; top: 50%; left: 50%; width: max(var(--tap-min), 100%); height: max(var(--tap-min), 100%); transform: translate(-50%, -50%); }

.suggestion-loading {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  padding: var(--space-xs) 0;
}

/* ==================== Reduced motion ====================
   Kept last so it wins on source order against every rule above at equal
   specificity. css/skeleton.css and css/landing.css each already carry their
   own block for their own effects; this one covers the app shell and the
   trip screen.

   Not a blanket `* { animation: none }`: the existing 0.12–0.15s color,
   border and background transitions throughout this file are state feedback
   on a control the user is touching, they involve no movement, and taking
   them away costs clarity without buying any relief. What goes is
   everything that travels — the route trace, the panel slide, the marker,
   the toast rise, the sheet — plus the two rotations. Every one of them
   resolves to its finished state, never to a hidden one. */
@media (prefers-reduced-motion: reduce) {
  /* #1884 — boot mark renders fully drawn and static (the inline block in
     index.html carries its own copy so it holds before this file loads). */
  #boot-screen { animation: none; opacity: 1; }
  #boot-screen .rm-trace { animation: none; stroke-dashoffset: 0; }
  #boot-screen .rm-dot { animation: none; opacity: 1; transform: none; }
  .itin-trace .day-box,
  .itin-trace .itin-stop-card,
  .itin-trace .day-box-stops::before,
  .itin-trace .stop-connector,
  .itin-trace-simple,
  .panel.panel-enter,
  .screen-arrive,
  .booking-section-enter,
  .modal.active,
  .modal.active .modal-content,
  .progress-fill,
  .home-trips-trace .home-trip-card,
  .home-trips-trace .home-empty,
  .home-trips-ghost,
  .home-trips-crossfade .home-trip-card,
  .home-trips-crossfade .home-empty,
  .home-mount-fade > *,
  .home-trip-code-copied i,
  .notification-bell-badge-pop,
  .accommodation-confirm-pulse::after,
  .ideas-sidebar-generate-btn.loading .ti-sparkles,
  /* Ideas panel — the body is shown, the badge sits at full size, and a
     just-kept card rests in place with its tape strip on. Only the travel goes. */
  .ideas-sidebar-body-reveal,
  .ideas-sidebar-count-pop,
  .itin-stop-card.idea-card.idea-card-landed,
  .itin-stop-card.idea-card.idea-card-landed::before,
  /* The Recap animations (css/recap.css) are already guarded behind
     no-preference, so this is belt and braces: HOME stays struck and every
     bar stays at its real value. */
  .recap-home.is-struck,
  .recap-cats .cat-bar-fill {
    animation: none;
  }
  /* #6582 — a just-added stop holds its wash, static, until the JS removes it. */
  .itin-stop-card.itin-stop-just-added::after {
    animation: none;
    opacity: 1;
  }
  /* #6985 — an exit resolves to the finished (closed) state: nothing is held on screen. */
  .modal.is-leaving,
  .panel.panel-leaving {
    display: none;
  }
  /* #6243 — a trip photo and its text colour appear at once, no fade. */
  .home-trip-card-photo,
  .home-trip-card-photo::after {
    transition: none;
  }

  /* An indeterminate "scanning" shimmer has no real percentage to resolve
     to, so a static 40% bar would misleadingly read as "stuck" — filling
     it to 100% instead says "active" without implying travel or a
     specific, fake progress value. */
  .progress-fill {
    width: 100%;
    transform: none;
  }

  .tabs::after,
  .tab i,
  .stop-expanded-body,
  .stop-expand-caret,
  .booking-section-caret,
  .exp-chevron,
  .exp-card-details,
  .treat-stamp.is-striking,
  .exp-disclosure-body,
  .form-more-chevron,
  .form-more-details,
  /* The determinate progress fill. Its scaleX IS the value — it must
     survive — so only the travel between values is dropped; the bar still
     arrives at the correct length, it just does not slide there. (They were
     `transition: width` and were never answered in this block at all; the
     transform swap is what made the omission worth fixing.) */
  .wizard-progress-segment-fill,
  /* Issue #993 — the map stop-list overlay's own collapse/expand
     (css/features/itinerary-map.css). Removing the transition still ends at
     the correct row size for whichever state .collapsed is in — never
     stuck mid-collapse — same as every other disclosure in this list. */
  .map-stop-list-body,
  .map-stop-list-toggle i,
  /* Issue #1140 — the consent switch knob. Without the transition it still
     lands on the correct side for its state. */
  .consent-switch::after {
    transition: none;
  }

  /* #2315 — the treat stamp lands already struck (its finished state), and
     the disclosure's grid-template-rows still ends at 0fr/1fr, just unslid. */
  .treat-stamp.is-striking {
    animation: none;
  }

  /* The marker still moves — it has to, it is the state — but it arrives
     instead of travelling. */
  .tab.active i { transform: none; }

  /* Departure Fever's press: the object moves INTO its own shadow, which is
     travel, however short. It resolves to its FINISHED state — seated, with
     the offset gone — never to a hidden or half-pressed one, so the control
     still visibly acknowledges the tap without anything sliding. The resting
     offset itself is not motion and is deliberately left alone.

     Issue #545 extended this same press mechanic across the trip page's own
     controls (.app-/.df-modal-content-scoped buttons, .scan-btn,
     .settle-action-btn, .x-close-btn) — same rule applies. The expense rows
     left this list when they stopped being cards: an entry inside .exp-sheet
     has no offset shadow and does not travel on hover, so there is no
     motion here left to answer. */
  .home-trip-card,
  .home-action-card,
  .home-error button,
  .app .btn-primary,
  .app .btn-secondary,
  .df-modal-content .btn-primary,
  .df-modal-content .btn-secondary,
  .df-modal-content .modal-close,
  .scan-btn,
  .settle-action-btn,
  .x-close-btn,
  /* Issue #911 follow-up — the itinerary toolbar's own Departure Fever
     press (Create Itinerary/Proposals/Decide/member-count), same mechanic. */
  .itin-toolbar .itin-action-btn,
  .itin-toolbar .itin-toolbar-pill,
  .app .btn-primary::before, .app .btn-secondary::before,
  .df-modal-content .btn-primary::before, .df-modal-content .btn-secondary::before,
  #confirm-itinerary-wrap .btn-primary::before, #panel-bookings .btn-secondary::before,
  .scan-btn::before, .settle-action-btn::before {
    transition: none;
  }
  /* #7190: these press by their ::before shadow, which already rests at the finished offset; the control itself does not travel. */
  .scan-btn:hover, .settle-action-btn:hover, .scan-btn:active, .settle-action-btn:active {
    transform: none;
  }
  /* #7190: these press by their ::before shadow, which already rests at the finished offset; the control itself does not travel. */
  .app .btn-primary:hover, .app .btn-secondary:hover,
  .df-modal-content .btn-primary:hover, .df-modal-content .btn-secondary:hover,
  .app .btn-primary:active, .app .btn-secondary:active,
  .df-modal-content .btn-primary:active, .df-modal-content .btn-secondary:active {
    transform: none;
  }
  .home-trip-card:hover,
  .home-action-card:hover,
  .home-error button:hover,
  .df-modal-content .modal-close:hover,
  .x-close-btn:hover,
  .itin-toolbar .itin-action-btn:hover,
  .itin-toolbar .itin-toolbar-pill:hover {
    transform: none;
    box-shadow: var(--df-press-hover);
  }
  .home-trip-card:active,
  .home-trip-card:has(.home-trip-card-open:active),
  .home-action-card:active,
  .home-error button:active,
  .x-close-btn:active,
  .itin-toolbar .itin-action-btn:active,
  .itin-toolbar .itin-toolbar-pill:active {
    transform: none;
    box-shadow: var(--df-press-active);
  }

  /* translateX(-50%) is this element's centering, not its motion, so it
     survives; only the 8px rise is dropped. */
  .toast-msg,
  .toast-msg.toast-in {
    transform: translateX(-50%);
    transition: opacity var(--dur-feedback) var(--ease-out);
  }
}

/* Issue #1561 — home Trip requests section. #4100: row dressed as the
   H10/H13 boards — keyline, hard press shadow, title-face name, filled
   brand pill to accept and a bold outlined pill to decline. */
.home-request-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-md); padding: var(--space-lg); margin-bottom: var(--space-lg);
  background: var(--df-panel); border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
}
.home-request-text { min-width: 0; flex: 1 1 12rem; }
.home-request-name {
  font-family: var(--df-sans); font-size: var(--fs-lg); font-weight: 600;
  line-height: 1.15; letter-spacing: -0.02em; color: var(--df-ink);
}
.home-request-sub { font-size: var(--fs-xs); font-weight: 400; line-height: 1.4; color: var(--df-ink-soft); }
.home-request-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.home-request-actions .btn-small {
  min-height: var(--tap-min); padding: 0 var(--space-lg); border-radius: 999px;
  font-weight: 600; border: 2px solid var(--df-ink); background: transparent;
  color: var(--df-ink); cursor: pointer;
}
.home-request-actions .home-request-accept {
  background: var(--df-brand); color: var(--df-brand-fg); border-color: var(--df-brand);
}

/* ── Where you want to go (#1565) ──
   Six photo cards. #6723: the photo is a strip across the top and the name
   sits on the Cut Stock band under it, ink on panel with no scrim, so the
   label never depends on the photo. The strip's height is always reserved. */
.home-city-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl);
}
@media (min-width: 680px) {
  .home-city-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.home-city-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  --city-photo-h: 72px;
  min-height: max(var(--tap-min), 112px);
  padding: calc(var(--city-photo-h) + var(--space-lg)) var(--space-xl) var(--space-lg);
  text-align: left;
  font: inherit;
  color: var(--df-ink);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  box-shadow: var(--df-press);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--dur-feedback) var(--df-ease),
              box-shadow var(--dur-feedback) var(--df-ease);
}
.home-city-card:hover { transform: translate(2px, 2px); box-shadow: var(--df-press-hover); }
.home-city-name {
  position: relative;
  z-index: 1;
  font-family: var(--df-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.home-city-country {
  position: relative;
  z-index: 1;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--df-ink-soft);
}
.home-city-card::before,
.home-city-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--city-photo-h);
  border-bottom: 2px solid var(--df-ink);
  pointer-events: none;
}
.home-city-card::before { background: var(--df-ground); }
.home-city-card::after {
  background-image: var(--home-city-photo);
  background-size: cover;
  background-position: var(--home-city-photo-position, center);
  opacity: 0;
  transition: opacity var(--dur-view) var(--ease-out);
}
.home-city-card-photo-visible::after { opacity: 1; }

/* #3983 (D161): in the desktop side column the same six cards are 2-up tiles.
   placeHomeSideMounts() (js/auth.js) moves the mount into .home-col-side from
   1024px; below that the cards above are untouched. */
.home-col-side .home-city-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
}
.home-col-side .home-city-card {
  --city-photo-h: 56px;
  min-height: max(var(--tap-min), 96px);
  padding: calc(var(--city-photo-h) + var(--space-md)) var(--space-lg) var(--space-md);
}
.home-col-side .home-city-name { overflow-wrap: anywhere; }

/* #4102: the side column is ~260px at 1024px, so the section heading and its
   "Browse all" link have to share one row. The link gives up its wide
   padding (its tap height stays), and neither is allowed to wrap. */
.home-col-side .home-section-head { gap: var(--space-md); }
.home-col-side .home-city-section { margin-bottom: var(--space-2xl); }
.home-col-side .home-section-head .home-section-label { white-space: nowrap; }
/* #4478: the 44px "Browse all" link would otherwise make the head 44px tall
   and centre its label ~15px lower than "Ongoing", whose head has no link. The
   negative block margin takes the link's slack out of the layout; its tap
   height stays 44px. */
.home-col-side .home-section-head .home-section-toggle {
  margin-block: calc((var(--tap-min) - 1.3em) / -2);
  padding-inline: var(--space-sm);
  margin-inline-end: calc(var(--space-sm) * -1);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Placed after the main block above on purpose: same specificity, so it has to
   come later to win. The press travels; the photo fade is state feedback and
   stays. */
@media (prefers-reduced-motion: reduce) {
  .home-city-card { transition: none; }
  .home-city-card:hover { transform: none; box-shadow: var(--df-press-hover); }
  /* Issue #952 Phase 5 — the autofill button keeps its shadow change as
     motionless feedback; only the 1–2px press travel goes. */
  .day-box-autofill-btn:hover,
  .day-box-autofill-btn:active { transform: none; }
}

/* #1666/#1919 — the stamp strike resolves to its finished (struck) state. */
@media (prefers-reduced-motion: reduce) {
  .stamp-card-struck.just-stamped,
  /* #2668 — the detail strike is static (no animation); it already sits finished. */
  .stamps-complete.just-stamped,
  /* #5769 — arrival: route and total sit finished. */
  .stamps-route.stamps-arrive .stamps-route-done,
  .stamps-route.stamps-arrive .stamps-route-pin,
  .stamp-word.stamps-total-word.stamps-arrive { animation: none; }
  .stamps-trip-btn:hover { background: none; }
  .stamp-stop-highlight { outline-offset: 2px; }
}

/* #2021 — per-viewer food and rhythm notes on a stop. Informational only: no
   positive badge exists. The avatar button gets its tap area from ::before
   (--tap-min) while the glyph stays small. Its own class, not .member-avatar:
   sharing that name turned the People roster's avatars into these 20px dots
   (#3629). */
.stop-notes { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-2xs); }
.stop-note-chip {
  display: inline-flex; align-items: center; gap: var(--space-2xs);
  padding: 2px var(--space-xs); border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 600;
  background: var(--surface-2, rgba(0, 0, 0, 0.05)); color: var(--text-muted, inherit);
}
.stop-note-not_halal, .stop-note-not_vegetarian { color: var(--info); }
.member-avatar-wrap { position: relative; display: inline-flex; }
.stop-note-avatar {
  position: relative; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  font-size: var(--fs-xs); font-weight: 600; background: var(--vn-indigo); color: var(--df-pin-white); cursor: default;
}
.stop-note-avatar img { width: 100%; height: 100%; object-fit: cover; }
.stop-note-avatar::before { content: ''; position: absolute; top: 50%; left: 50%; width: max(44px, 100%); height: max(44px, 100%); transform: translate(-50%, -50%); }
.member-needs-card {
  display: none; position: absolute; z-index: 20; top: 100%; left: 0; margin-top: var(--space-2xs);
  min-width: 140px; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-md, 8px);
  background: var(--surface, var(--df-pin-white)); color: var(--text, inherit); border: 1px solid var(--border, rgba(0, 0, 0, 0.12));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); font-weight: 400; white-space: nowrap; flex-direction: column;
}
.member-avatar-wrap:hover .member-needs-card,
.member-avatar-wrap:focus-within .member-needs-card { display: flex; }
.member-needs-name { font-weight: 600; }
.member-needs-list { color: var(--text-muted, inherit); }
.itin-food-footer { margin: var(--space-md) 0 0; font-size: var(--fs-xs); color: var(--text-muted, inherit); }

/* Issue #2086 — the join QR. Dark on light in every theme (System/Light/Dark):
   the white ground is part of the code, not a themed surface, and a dark-mode
   inversion would not scan. */
.invite-qr-box {
  display: flex;
  justify-content: center;
  margin: var(--space-md) 0;
}
.invite-qr-box:empty {
  display: none;
}
.invite-qr-svg {
  width: 160px;
  height: 160px;
  background: var(--df-pin-white);
  border-radius: var(--radius-sm);
}

/* ==================== Expenses zero state (#3203) ==================== */
.exp-tab-add-long { display: none; }
@media (min-width: 1024px) {
  .exp-tab-add-short { display: none; }
  .exp-tab-add-long { display: inline; }
}
/* The ledger card at zero: muted icon, one line, two buttons side by side. */
.exp-empty-ledger {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-lg) var(--sp-md);
  border: 2px solid var(--df-ink);
  border-radius: 14px;
  background: var(--df-panel);
  text-align: center;
}
.exp-empty-ledger-icon { font-size: var(--fs-icon-36); color: var(--df-ink-soft); }
.exp-empty-ledger p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--df-ink); }
.exp-empty-actions { display: flex; gap: var(--sp-sm); width: 100%; }
.exp-empty-actions .ui-btn { flex: 1 1 0; min-height: var(--tap-min); gap: 8px; justify-content: center; }
.exp-empty-fund-btn { width: 100%; min-height: var(--tap-min); justify-content: center; }

/* #3297 — shared fund intro sheet (side panel from 1024px) and the How row. */
.fund-intro-lead { margin: 0 0 var(--sp-md); font-size: 16px; line-height: 1.5; }
.fund-intro-strip { display: flex; align-items: center; gap: var(--sp-sm); padding: var(--sp-md); border-radius: 14px; background: var(--df-ink); color: var(--df-panel); }
.fund-intro-initials { font-family: var(--df-sans); font-size: 12px; }
.fund-intro-holds { display: flex; flex-direction: column; font-family: var(--df-sans); font-size: var(--fs-xs); letter-spacing: .06em; color: var(--vn-trail-green-lit); }
.fund-intro-holds b { font-size: 18px; color: var(--df-panel); }
.fund-intro-steps { margin: var(--sp-md) 0; padding: var(--sp-md) var(--sp-md) var(--sp-md) 32px; border: 2px solid var(--df-ink); border-radius: 14px; display: flex; flex-direction: column; gap: var(--sp-sm); font-size: var(--fs-md); line-height: 1.45; }
.fund-intro-footer { display: flex; flex-direction: column; gap: var(--sp-sm); }
.fund-intro-footer .ui-btn { min-height: var(--tap-min); justify-content: center; }
.fund-intro-member-note { padding: var(--sp-md); border: 2px solid var(--df-ink); border-radius: 14px; font-weight: 600; text-align: center; }
@media (min-width: 1024px) {
  .fund-intro-modal.active { justify-content: flex-end; align-items: stretch; }
  .fund-intro-modal .modal-content { width: 440px; max-width: 440px; height: 100%; max-height: none; border-radius: 0; }
}
.emails-to-sort-row { display: flex; align-items: center; gap: var(--space-md); width: 100%; min-height: 56px; margin-bottom: var(--space-lg); padding: var(--space-md) var(--space-lg); border: 2px solid var(--df-ink); border-radius: 14px; background: var(--df-panel); color: var(--df-ink); text-align: left; cursor: pointer; }
.emails-to-sort-count { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--vn-trail-green-lit); color: var(--df-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.emails-to-sort-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.emails-to-sort-title { font-weight: 600; }
.emails-to-sort-senders { font-family: var(--df-sans); font-size: var(--fs-xs); letter-spacing: .04em; color: var(--df-ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fund-how-row { display: flex; align-items: center; gap: var(--sp-sm); width: 100%; min-height: 56px; margin-top: var(--sp-md); padding: var(--sp-sm) var(--sp-md); border: 2px solid var(--df-ink); border-radius: 14px; background: var(--df-panel); color: var(--df-ink); text-align: left; cursor: pointer; }
/* #5781 — ink is cream in dark mode, so the glyph takes the panel colour there. */
.fund-how-q { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--df-ink); color: light-dark(var(--vn-trail-green-lit), var(--df-panel)); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.fund-how-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.fund-how-title { font-weight: 600; }
.fund-how-sub { font-family: var(--df-sans); font-size: var(--fs-xs); letter-spacing: .04em; color: var(--df-ink-soft); }
/* #3386 — FundT1, the Top up stub: an ink strip on the foot of the fund card. */
.fund-top-up { display: flex; align-items: center; gap: var(--sp-sm); width: 100%; min-height: 56px; padding: var(--sp-sm) var(--sp-md); border: 0; border-top: 2px solid var(--df-ink); background: var(--df-ink); color: var(--df-panel); text-align: left; cursor: pointer; }
.fund-top-up-plus { flex: none; width: 36px; height: 36px; border-radius: 50%; background: light-dark(var(--vn-trail-green-lit), var(--topbar-bg)); color: var(--df-ink); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; line-height: 1; }
.fund-top-up-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.fund-top-up-title { font-weight: 600; }

/* #2241 — Balances groups and the Settle up / Mark received sheet. */
.settle-group + .settle-others,
.settle-group + .settle-start-fund { margin-top: var(--sp-md); }

/* #2424 — Balances as one card from the Expenses board kit. */
.xk-bal-switch { display: flex; justify-content: flex-end; margin-bottom: var(--sp-sm); }
.xk-bal-switch[hidden] { display: none; }
.settle-mine .settle-group-title { margin: 0 0 var(--sp-sm); }
.settle-mine .settle-row {
  min-height: 44px;
  padding: var(--sp-sm) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.settle-mine .settle-row + .settle-row { border-top: var(--edge-hairline); }
.settle-mine .settle-row-line { align-items: center; flex-wrap: nowrap; }
.settle-mine .settle-sentence { line-height: 1.3; }
.settle-mine .settle-amount { font-family: var(--df-sans); font-size: var(--fs-md); font-weight: 400; letter-spacing: 0; color: var(--df-ink); }
.settle-row .settle-amount.xk-row-amount { font-weight: 600; } /* #6935: bold figure, board M1 */
.settle-row-meta.xk-row-meta { font-size: var(--fs-xs); }
.settle-row-meta-end.xk-row-meta .settle-status { color: var(--df-brand); font-weight: 400; }
.settle-mine .settle-group-cta { width: 100%; margin-top: var(--sp-md); }
.settle-mine .settle-group + .settle-group { border-top: var(--edge-hairline); }
/* Same row as "Per person" on the Balances board; the older
   `.settle-others > summary` rule below outranks .xk-disclosure's type. */
.settle-others > summary.xk-disclosure { list-style: none; margin: 0; font-size: var(--fs-md); font-weight: 600; color: var(--df-ink); }
.settle-others > summary.xk-disclosure::-webkit-details-marker { display: none; }
.settle-others[open] > summary .settle-others-chev { transform: rotate(180deg); }
/* Per person: a disclosure row with no shadow. */
.exp-disclosures { box-shadow: none; }
.exp-disclosure-head.xk-disclosure { border: 0; border-radius: 0; min-height: 48px; padding: 0 var(--sp-lg); }
.exp-disclosure-head.xk-disclosure .exp-disclosure-title { font-family: inherit; font-size: inherit; letter-spacing: 0; }
.settle-mine .settle-group { padding: var(--sp-md) var(--sp-lg); }
.settle-mine .settle-group + .settle-group { border-top: var(--edge-hairline); }
.settle-mine .settle-row { padding: var(--sp-sm) 0; }
.settle-mine .settle-group-cta { width: 100%; justify-content: center; }
.settle-row-who { min-width: 0; }
.settle-row-amt { text-align: right; }
.settle-row-meta { margin-top: 2px; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.settle-row-meta .settle-status { background: none; padding: 0; color: inherit; border: 0; }
.settle-row-meta-end .settle-status { color: var(--df-brand); font-weight: 600; }
.settle-group-title {
  margin: 0 0 var(--sp-sm);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--df-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.settle-group-cta { margin-top: var(--sp-md); }
/* #6933 (board M1): the viewer's one open transfer as a keyline card. */
.settle-balance {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  padding: var(--sp-md);
  margin-bottom: var(--sp-lg);
}
.settle-balance .settle-group-title { margin: 0; color: var(--df-ink-soft); }
.settle-balance-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-md); margin: var(--sp-sm) 0 0; }
.settle-balance-amount { font-family: var(--df-display); font-size: var(--fs-figure-26); font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--df-ink); }
.settle-balance .settle-group-cta { width: 100%; margin-top: var(--sp-md); }
.settle-others { margin-top: var(--sp-md); }
.settle-others > summary {
  cursor: pointer;
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--df-ink-soft);
}
.settle-others .settle-sheet { margin-top: var(--sp-sm); }
.settle-start-fund { margin-top: var(--sp-md); }

/* #2425 — Settle up sheet, from the approved board (#2231): the xk- sheet
   chrome, one bordered payee list with dashed dividers, only the chosen row's
   header ink, its expansion on cream. The native radio stays in the DOM
   (visually hidden) for keyboard and screen-reader use. */
.settle-scrim { align-items: flex-end; padding: 0; }
.settle-sheet-chrome { padding: 0; gap: 0; box-shadow: none; overflow: hidden; }
@media (max-width: 680px) {
  .settle-sheet-chrome { height: calc(100vh - 24px); height: calc(100dvh - 24px); max-height: none; }
}
@media (min-width: 681px) {
  .settle-scrim { align-items: center; padding: 1rem; }
  .settle-sheet-chrome { border: 2px solid var(--df-ink); border-radius: 18px; max-height: 90dvh; }
}
.settle-sheet-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.settle-sheet-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 16px; display: flex; flex-direction: column; gap: 16px; }
.settle-sheet-foot { padding: 12px 16px 16px; border-top: 2px solid var(--df-ink); background: var(--df-panel); }

.settle-payees { border: 2px solid var(--df-ink); border-radius: var(--radius-stub); overflow: hidden; background: var(--df-panel); }
.settle-payee-block { border-bottom: 1.5px dashed var(--df-hair); }
.settle-payee-block:last-child { border-bottom: 0; }
.settle-payee {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  background: var(--df-panel);
  color: var(--df-ink);
  font-size: 16px;
  cursor: pointer;
}
.settle-payee.selected { background: var(--df-ink); color: var(--df-panel); }
.settle-payee input[type="radio"] {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.settle-dot {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid currentColor;
  background: transparent;
  box-sizing: border-box;
}
.settle-payee.selected .settle-dot { background: var(--vn-trail-green-lit); border-color: var(--df-panel); }
/* The ring takes the row's own text colour so it shows on the chosen (ink)
   row and on cream, in both themes; teal on ink was ~2.9:1 light, ~1.2:1 dark. */
.settle-payee input[type="radio"]:focus-visible + .settle-dot { outline: 2px solid currentColor; outline-offset: 2px; }
.settle-payee-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.settle-payee-amt { font-weight: 400; }
/* #7107 — per-transfer state in the sheets, and the read-only "pays" line under a payer. */
.settle-sheet-status { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-xs); }
.settle-payee-paid { flex: none; display: inline-flex; margin-inline: var(--sp-xs); }
.everyone-xfer { display: block; font-family: var(--df-sans); font-size: var(--fs-xs); color: var(--df-ink-soft); }
.settle-payee-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px 16px;
  background: var(--df-panel);
  color: var(--df-ink);
  font-size: 14px;
}
.settle-method { display: flex; gap: 12px; align-items: center; }
.settle-method + .settle-method { margin-top: 4px; }
.settle-method-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.settle-method-id { overflow-wrap: anywhere; }
.settle-method-qr { flex: none; width: 96px; height: 96px; object-fit: contain; border: 2px solid var(--df-ink); border-radius: 3px; background: var(--df-panel); }
.settle-copy-btn { min-height: var(--tap-min); padding: 0 12px; font-size: var(--fs-sm); font-weight: 600; background: var(--df-ground); }
.settle-tiles { display: flex; gap: 8px; }
.settle-tile {
  flex: 1 1 0;
  min-width: 0;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  padding: 8px 4px;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-stub);
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.settle-tile .ti { font-size: var(--fs-lg); }
/* Three tiles share a phone-width row (#5593): a label wraps rather than clip. */
.settle-tile-label { max-width: 100%; text-align: center; text-wrap: balance; overflow-wrap: anywhere; }
.settle-tile.is-on { background: var(--df-ink); color: var(--df-panel); }
.settle-tile-thumb { flex: none; width: 32px; height: 32px; object-fit: cover; border-radius: 4px; }
.settle-evidence { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--df-ink); text-decoration: none; font-weight: 600; }
.settle-evidence--cash { gap: 8px; }
.settle-evidence-thumb { width: 48px; height: 48px; }
.settle-tile-change { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.settle-fx-link {
  align-self: flex-start;
  min-height: var(--tap-min);
  padding: 0;
  border: 0;
  background: none;
  color: var(--df-ink);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.settle-sheet-fx { display: flex; gap: var(--sp-sm); flex-wrap: wrap; align-items: center; }
.settle-sheet-fx input { width: 90px; }
.settle-sheet-note { font-size: 14px; margin: 0; }
.settle-sheet-submit { width: 100%; min-height: 52px; font-size: 16px; }
.settle-sheet-submit:disabled, .settle-sheet-submit[aria-disabled="true"] { background: var(--df-hair); color: var(--df-ink-soft); box-shadow: none; cursor: not-allowed; }
.settle-sheet-hint { margin: 8px 0 0; font-size: var(--fs-sm); color: var(--df-ink-soft); text-align: center; }
/* #5587 — a failed submit. Founder ruling on PR #5631: boxed, above the button. */
.settle-sheet-error { margin: 0 0 12px; padding: 12px 12px; border: 2px solid var(--error); border-radius: 12px; font-size: var(--fs-sm); line-height: 1.4; font-weight: 600; color: var(--error-text); }

/* #2296 — Fund board: Contributions head, pencil edit, one Close and refund. */
.fund-meta-text { flex: 1; min-width: 0; }
.fund-section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm); }
.fund-section-title {
  margin: 0;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--df-ink-soft);
}
.fund-row-name { min-width: 0; overflow-wrap: anywhere; color: var(--df-ink); }
.fund-row-amount { font-variant-numeric: tabular-nums; color: var(--df-ink); font-weight: 600; }
.fund-edit-btn {
  position: relative;
  background: none;
  border: none;
  padding: var(--sp-xs);
  color: var(--df-ink-soft);
  cursor: pointer;
}
.fund-edit-btn::before { content: ""; position: absolute; inset: 50% auto auto 50%; width: max(var(--tap-min), 100%); height: max(var(--tap-min), 100%); transform: translate(-50%, -50%); }
.fund-close-btn { align-self: flex-start; }
/* #4606 — the fund card's footer: Close and refund as a quiet text control. */
.fund-card-foot { display: flex; flex-direction: column; gap: var(--sp-sm); padding: var(--sp-xs) var(--sp-md) var(--sp-sm); }
.fund-card-foot.fund-actions { flex-direction: row; padding-top: var(--sp-sm); }
.fund-card-foot .fund-close-btn { color: var(--df-ink-soft); }

/* #2308 (#2192 step 5) — "You're in" arrival moment. The trip name lands as a
   Stamp Word (DESIGN.md: coral ink, double keyline, Trail-Green ghost second
   pass) over the trip that is already opening. Inline and non-blocking. */
.arrival-moment {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  pointer-events: none;
}
.arrival-stamp {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  font-family: var(--df-sans);
  font-size: var(--fs-xl, 1.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.04em;
  padding: 0.04em 0.2em 0.09em;
  color: var(--vn-coral);
  /* Over live trip content, so the ground is opaque; the die stays the stamp. */
  background: var(--surface-2, var(--bg));
  border: 0.055em solid currentColor;
  border-radius: 0.14em;
  box-shadow: inset 0 0 0 0.022em currentColor;
  text-shadow: 0.028em 0.036em 0 var(--vn-green, currentColor);
  transform: rotate(-2.6deg);
  /* #6352 — the invite screen's one Strike: slams in from -11deg at 1.85x. */
  animation: arrival-strike var(--dur-strike) var(--ease-slam) both;
}
@keyframes arrival-strike {
  from { transform: rotate(-11deg) scale(1.85); opacity: 0; }
  to   { transform: rotate(-2.6deg) scale(1); opacity: 1; }
}
/* Finished state, never hidden: the stamp shows already landed. */
@media (prefers-reduced-motion: reduce) {
  .arrival-stamp { animation: none; }
}

/* #2309 (#2192 step 4) — "What brings you here?" intent step, laid over My Trips
   right after sign-up. Three large choices plus Skip, all >= --tap-min. */
.intent-step {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  /* Same scrim as .modal — `--bg` was never defined, so this layer used to be
     transparent and My Trips showed straight through the step. */
  background: rgba(16, 26, 20, 0.45);
  overflow-y: auto;
}
.intent-step-card {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md, 12px);
  padding: 24px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(16, 26, 20, 0.18);
  animation: intent-rise var(--dur-view) var(--ease-out) both;
}
.intent-step-title { margin: 0 0 var(--space-sm); font-size: var(--fs-xl, 1.5rem); outline: none; }
.intent-choice {
  display: flex;
  align-items: center;
  gap: var(--space-md, 12px);
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--space-md, 12px) var(--space-lg);
  text-align: left;
  color: inherit;
  background: var(--surface-2, var(--bg));
  border: 1px solid var(--border, currentColor);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color var(--dur-feedback) var(--ease-out);
}
.intent-choice:hover, .intent-choice:focus-visible { border-color: var(--df-ink); }
.intent-choice .ti { font-size: var(--fs-xl); flex: none; color: var(--df-ink); }
.intent-choice-text { display: flex; flex-direction: column; gap: 2px; }
.intent-skip {
  min-height: var(--tap-min);
  align-self: center;
  background: none;
  border: 0;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}
@keyframes intent-rise {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
/* Finished state, never hidden. */
@media (prefers-reduced-motion: reduce) {
  .intent-step-card { animation: none; }
}

/* Issue #2310 — sign-in motion resolves to its finished state, never hidden. */
@media (prefers-reduced-motion: reduce) {
  .lp-nav-brand img.route-mark-draw,
  .lp-nav-brand img.route-mark-land,
  .auth-form-swap,
  .field-error-in,
  .form-error:not([hidden]) { animation: none; }
}

/* ==========================================================================
   Expenses board kit (#2316, part of #2231)
   The approved boards' visual language as shared classes, `xk-` prefixed so
   it never collides with the legacy Expenses classes it replaces. Tokens
   only (dark mode flips through --df-*); no screen uses these yet, the
   per-screen issues apply them. Static motionless states only: nothing here
   travels, so the prefers-reduced-motion block has nothing to answer.
   ========================================================================== */

/* Eyebrow */
.xk-eyebrow {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--df-ink);
}
.xk-eyebrow--green { color: var(--df-brand); }
.xk-eyebrow--ink { color: var(--df-ink); }

/* Display figures */
.xk-figure {
  font-family: var(--df-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--df-ink);
}
.xk-figure--total { font-size: var(--fs-figure-40); }
.xk-figure--fund { font-size: var(--fs-display-32); }
.xk-figure--sheet { font-size: var(--fs-figure-26); text-transform: uppercase; }
.xk-figure--compact { font-size: 18px; }

/* Day band */
.xk-day-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: var(--df-ink);
  color: var(--df-panel);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Ledger row */
.xk-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  background: var(--df-panel);
  border-bottom: 1.5px dashed var(--df-hair);
  color: var(--df-ink);
  text-decoration: none;
}
.xk-row-spine {
  flex: none;
  width: 5px;
  align-self: stretch;
  border-radius: 3px;
  background: var(--xk-spine, var(--df-ink-soft));
}
.xk-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.xk-row-title { font-family: var(--df-sans); font-size: var(--fs-md); font-weight: 600; }
.xk-row-meta {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--df-ink-soft);
}
.xk-row-amount { font-family: var(--df-sans); font-size: var(--fs-md); font-weight: 400; }

/* Segmented control (Entries/Balances/Fund, Split between, Not-equal modes) */
.xk-seg {
  display: flex;
  padding: 4px;
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
}
.xk-seg-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.xk-seg-btn[aria-checked="true"],
.xk-seg-btn[aria-selected="true"],
.xk-seg-btn[aria-pressed="true"],
.xk-seg-btn.is-on {
  background: var(--df-ink);
  color: var(--df-panel);
}

/* Field */
.xk-field-label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--df-sans);
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--df-ink);
}
.xk-field {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-stub);
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: var(--df-sans);
}

/* Icon tile (category picker) */
.xk-tile {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 52px;
  height: 48px;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
  color: var(--xk-tile-ink, var(--df-ink));
  cursor: pointer;
}
.xk-tile[aria-checked="true"],
.xk-tile.is-on {
  background: var(--xk-tile-fill, var(--selected-bg));
  color: var(--on-selected);
}

/* Dashed tile (Scan receipt) */
.xk-dashed {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  border: 2px dashed var(--df-ink);
  border-radius: var(--radius-stub);
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  cursor: pointer;
}

/* Pill buttons */
.xk-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-height: 48px;
  padding: 0 24px;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.xk-pill--primary {
  background: var(--df-brand);
  color: var(--df-brand-fg);
  box-shadow: 3px 3px 0 var(--df-ink);
}
.xk-pill--primary:active { box-shadow: var(--df-press-active); }
.xk-pill:disabled { opacity: 0.55; cursor: default; }
.xk-pill--coral {
  border-color: var(--vn-coral-text);
  color: var(--vn-coral-text);
}

/* Expenses-only: the "It's on me" / Undo treat button keeps the coral outline. */
.ui-btn.exp-btn-coral { border-color: var(--vn-coral-text); color: var(--vn-coral-text); }

/* Disclosure row */
.xk-disclosure {
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-stub);
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

/* TREAT stamp (a known exception to DESIGN.md's One Shout rule) */
.xk-treat {
  display: inline-block;
  padding: 0 8px;
  border: 3px solid var(--vn-coral-text);
  border-radius: 0.14em;
  color: var(--vn-coral-text);
  font-family: var(--df-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  transform: rotate(-8deg);
}

/* Sheet chrome */
.xk-scrim { background: var(--df-scrim-soft); }
.xk-sheet {
  display: flex;
  flex-direction: column;
  background: var(--df-ground);
  border-top: 2px solid var(--df-ink);
  border-radius: 18px 18px 0 0;
  color: var(--df-ink);
}
.xk-sheet-handle {
  align-self: center;
  width: 40px;
  height: 4px;
  margin: 8px 0 0;
  border-radius: var(--radius-pill);
  background: var(--df-ink);
}
.xk-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
}
.xk-sheet-title {
  margin: 0;
  font-family: var(--df-display);
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.xk-sheet-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
  color: var(--df-ink);
  cursor: pointer;
}

/* Progress bar (fund left vs in) */
.xk-progress {
  height: 10px;
  overflow: hidden;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-ground);
}
.xk-progress-fill {
  height: 100%;
  width: var(--xk-progress, 0%);
  background: var(--df-brand);
}

/* ==========================================================================
   Expenses 21 (#2317): Entries, summary card, empty state and desktop, from
   the approved boards (#2231). Applies the xk- kit; tokens only. These sit
   last so they win over the earlier .exp-* rules they replace.
   ========================================================================== */

/* Summary card: 40px green-eyebrow total, 4px shadow, no rule between columns */
.exp-stub-head { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; }
.exp-stub-head .stat-value { font-family: var(--df-display); font-size: var(--fs-figure-40); font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--df-ink); white-space: nowrap; }
/* #4159 — a long figure ("VND 405,000.00") steps down instead of wrapping. */
.exp-stub-head .stat-value.stat-value-long { font-size: var(--fs-display-32); }
/* #4424 — the rail drags down to 260px, where even the 32px step clips
   "VND 405,000.00". The stub measures its own width: narrow, the figure takes
   the next board size down (40/32/26px) and may wrap as a last resort. The
   340px default sits above the threshold and is unchanged. */
.exp-stub { container-type: inline-size; }
@container (max-width: 300px) {
  .exp-stub-head .stat-value { font-size: var(--fs-display-32); white-space: normal; overflow-wrap: anywhere; }
  .exp-stub-head .stat-value.stat-value-long { font-size: var(--fs-figure-26); }
}
.exp-stub-field + .exp-stub-field { border-left: 0; }
.exp-stub-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 2px 8px 2px 16px; }
.exp-stub-field { padding: 0; }
.exp-stub-field .stat-label { font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink); }
.exp-stub-field + .exp-stub-field .stat-label { color: var(--df-brand); }
.exp-stub-line { font-size: 14px; }
.exp-stub-amt, .exp-stub-amt.settle-amount-owe, .exp-stub-amt.settle-amount-owed { font-weight: 400; color: var(--df-ink); }
.exp-stub-square { flex: 1 1 0; min-width: 0; min-height: var(--tap-min); display: flex; align-items: center; gap: 8px; padding: 0; }
/* #5594 — one line under the trip total, Group | Personal beside it. */
button.exp-stub-open { flex: 1 1 auto; width: auto; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0; border: 0; white-space: nowrap; font-size: 14px; }
button.exp-stub-open .stat-label { font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink); }
button.exp-stub-open .stat-label.exp-stub-label-get { color: var(--df-brand); }
button.exp-stub-open .ti-chevron-right { font-size: 14px; }
.exp-stub-line-text { font-weight: 400; }
.exp-stub-line-text b, b.exp-stub-line-text { font-weight: 600; }
.exp-mode-seg--inline { margin: 0 0 0 auto; flex: none; padding: 2px; }
.exp-mode-seg--inline .ui-seg-btn { padding: 0 12px; font-size: 14px; }
@media (max-width: 1023px) {
  .exp-mode-seg:not(.exp-mode-seg--inline) { display: none; }
  .exp-panel[data-exp-view="entries"] .exp-zone-standing { margin-bottom: 0; }
  /* Spacing as drawn on EntriesOneLine.png, with 44px targets kept. */
  .exp-panel[data-exp-view="entries"] .exp-stub-head { padding-bottom: 12px; }
  .exp-panel[data-exp-view="entries"] .exp-zone-standing .exp-view-switch-wrap { margin: 12px 0 8px; }
  .exp-panel[data-exp-view="entries"] .exp-filters { margin-bottom: 12px; }
}
.exp-stub-desk { display: none; }
.exp-stub-compact { display: none; }
@media (max-width: 1023px) {
  .exp-panel[data-exp-view="balances"] .exp-stub-compact,
  .exp-panel[data-exp-view="fund"] .exp-stub-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    font-weight: 400;
  }
}

/* Desktop Pot view: the same one-line Trip total, as in FundW4 (#5616). */
@media (min-width: 1024px) {
  .exp-panel[data-exp-view="fund"] .exp-stub-head,
  .exp-panel[data-exp-view="fund"] .exp-stub-fields { display: none; }
  .exp-panel[data-exp-view="fund"] .exp-stub-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    font-weight: 400;
  }
}

/* Phone: the "All entries · N entries" heading gives way to the chips */
.exp-ledger-head { display: none; }
.exp-ledger-head .exp-count { display: none; }

/* Chips first, then a borderless fund line */
.exp-fund-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--tap-min);
  margin-bottom: var(--sp-sm);
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 14px;
}
.exp-fund-line:hover { border-color: transparent; }
.exp-fund-line-text { display: inline-flex; align-items: center; gap: 8px; }
.exp-fund-line-text i { color: var(--df-brand); font-size: 18px; }
.exp-fund-line b { font-weight: 600; }

/* Day band, ledger rows */
.exp-sheet { border-radius: 12px; box-shadow: none; }
.exp-day-rule { justify-content: space-between; align-items: center; flex-wrap: nowrap; gap: var(--sp-md); padding: 8px 16px; border-bottom: 0; }
.exp-day-rule-label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.1em; color: var(--df-panel); }
.exp-day-rule-total { font-size: var(--fs-xs); font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--df-panel); }
.exp-day-rule-total { margin-left: 0; }
.exp-entry + .exp-entry { border-top: 0; }
.exp-entry + .exp-day-rule { border-top: 0; }
.exp-entry { border-bottom: 1.5px dashed var(--df-hair); }
.exp-entry .exp-card-toggle { gap: 12px; padding: 12px 16px 12px 12px; }
.exp-entry.cmp-food { --xk-spine: var(--vn-pandan); }
.exp-entry.cmp-transport { --xk-spine: var(--vn-sky); }
.exp-entry.cmp-shopping { --xk-spine: var(--vn-batik); }
.exp-entry.cmp-hotel { --xk-spine: var(--vn-indigo); }
.exp-entry.cmp-activity { --xk-spine: var(--vn-green); }
.exp-entry .exp-card-toggle { border-left: 0; }
.exp-entry-meta { margin-top: 0; }
.expense-amount.xk-row-amount { font-weight: 400; }
/* the category word: spoken everywhere, seen on desktop only */
.exp-entry-cat { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Desktop >=1024px: summary card is total + label-tier counts; the Balances column
   already shows To pay / To receive. */
@media (min-width: 1024px) {
  .exp-stub-fields { display: none; }
  .exp-stub-desk { display: block; margin-top: 4px; }
  .exp-entry-cat { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}

/* ==========================================================================
   Expenses 23 (#2319): detail sheet from the Row board. Kit classes plus
   these; tokens only. Last in the file so they win over the #2235 sheet rules.
   ========================================================================== */
.exp-detail-scrim { background: var(--df-scrim-60); align-items: flex-end; padding: 0; }
@media (min-width: 681px) { .exp-detail-scrim { align-items: center; padding: 1rem; } }
.exp-detail-sheet { padding: 12px 16px 16px; gap: 0; box-shadow: none; border-radius: 18px 18px 0 0; }
@media (min-width: 681px) { .exp-detail-sheet { border-radius: 18px; border: 2px solid var(--df-ink); } }
#expense-detail-body { display: flex; flex-direction: column; gap: 16px; }
.exp-sheet-head { display: flex; align-items: flex-start; gap: 12px; margin: 0; }
.exp-sheet-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  box-sizing: border-box;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--xk-spine, var(--df-ink-soft));
  color: var(--df-amber-fg);
  font-size: 22px;
}
.exp-sheet-icon.cmp-food { --xk-spine: var(--vn-pandan); }
.exp-sheet-icon.cmp-transport { --xk-spine: var(--vn-sky); }
.exp-sheet-icon.cmp-shopping { --xk-spine: var(--vn-batik); }
.exp-sheet-icon.cmp-hotel { --xk-spine: var(--vn-indigo); }
.exp-sheet-icon.cmp-activity { --xk-spine: var(--vn-green); }
.exp-sheet-headtext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.exp-sheet-title { margin: 0; font-family: var(--df-sans); font-size: 18px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.exp-sheet-meta { font-family: var(--df-sans); font-size: var(--fs-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--df-ink-soft); }
.exp-sheet-figure { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 4px 12px; }
.exp-sheet-amount { font-size: var(--fs-figure-40); font-weight: 800; display: block; white-space: nowrap; max-width: 100%; }
.exp-sheet-paid { margin: 0; font-size: 14px; color: var(--df-ink); text-align: right; }
.exp-sheet-label { margin: 0; font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.1em; color: var(--df-ink); }
.exp-sheet-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); column-gap: 24px; margin-top: 4px; }
.exp-sheet-split li { font-size: var(--fs-md); padding: 8px 0; border-bottom: 1.5px dashed var(--df-hair); gap: 12px; min-width: 0; }
.exp-sheet-split li span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-sheet-split li span:last-child { font-weight: 600; white-space: nowrap; flex: none; }
.exp-receipt-link { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: var(--fs-md); font-weight: 600; color: var(--df-ink); text-decoration: none; }
.exp-receipt-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  box-sizing: border-box;
  border: 2px solid var(--df-ink);
  border-radius: 3px;
  background: var(--df-panel);
  color: var(--df-ink-soft);
  font-size: var(--fs-lg);
}
/* Issue 3389 — the email receipt on the expense detail (board M5): a bordered plain-text block, plain text only. */
.exp-receipt-text { margin: 4px 0 0; padding: 16px; max-height: 240px; overflow: auto; border: 2px solid var(--df-ink); border-radius: 12px; background: var(--df-panel); color: var(--df-ink); font: 400 13px/1.5 var(--df-sans); white-space: pre-wrap; overflow-wrap: anywhere; }
.exp-receipt-actions { display: flex; gap: 12px; margin-top: 12px; }
.exp-receipt-actions .exp-sheet-act { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap-min); text-decoration: none; }
.exp-sheet-actions { display: flex; gap: 8px; margin: 0; position: relative; }
.exp-sheet-act { flex: 1; padding: 0 12px; font-size: var(--fs-md); }
.exp-sheet-more { flex: none; position: static; }
.exp-sheet-more-btn { width: 48px; padding: 0; }
.exp-sheet-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  min-width: 180px;
  display: flex;
  flex-direction: column;
  padding: 4px;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-stub);
  background: var(--df-panel);
}
.exp-sheet-menu[hidden] { display: none; }
.exp-sheet-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap-min);
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.exp-sheet-menu-item.exp-delete-link { color: var(--danger-text); }

/* ==========================================================================
   Expenses 25 (#2321): Shared fund view from the Fund board (#2231). Kit
   classes plus these; tokens only. Last in the file so it wins over the
   earlier .fund-* rules (#2244/#2296) it replaces.
   ========================================================================== */
.fund-block { display: flex; flex-direction: column; gap: 12px; margin-bottom: var(--sp-md); }
.fund-card { margin-bottom: 0; padding: 0; gap: 0; border-radius: 12px; box-shadow: none; overflow: hidden; }
.fund-card--form { padding: 16px; gap: var(--sp-sm); }
/* The amount never breaks across lines (the desktop column is ~300px wide);
   Reassign drops under it instead. */
.fund-card-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 16px 16px; }
.fund-left { flex: 1 1 14rem; gap: 2px; min-width: 0; }
.fund-left-label { font-size: var(--fs-xs); letter-spacing: 0.1em; color: var(--df-ink); }
.fund-left-amount { font-size: var(--fs-display-32); letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
/* #4609: "left" is a small, lighter unit on the figure's baseline (FundT1). */
.fund-left-unit { font-family: var(--df-sans); font-size: 16px; font-weight: 400; letter-spacing: 0; color: var(--df-ink-soft); }
.fund-meta-text {
  flex: none;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0;
  text-transform: none;
  color: var(--df-ink-soft);
}
.fund-card > .fund-form { padding: 0 16px 12px; }
.fund-progress { margin: 0 16px 16px; background: var(--df-ground); height: 16px; padding: 2px; box-sizing: border-box; }
.fund-section-head { padding-top: 2px; }
.fund-section-title { margin: 0; }
.fund-pill {
  min-height: var(--tap-min);
  padding: 0 16px;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.fund-pill--add { background: var(--df-brand); color: var(--df-brand-fg); }
.fund-pill--coral { border-color: var(--danger-text); color: var(--danger-text); }
.fund-card--list .fund-list { gap: 0; }
.fund-row {
  box-sizing: border-box;
  min-height: var(--tap-min);
  padding: 12px 16px;
  border-bottom: 1.5px dashed var(--df-hair);
  font-size: var(--fs-md);
  color: var(--df-ink);
}
.fund-list > .fund-row:last-child { border-bottom: 0; }
.fund-row-amount { font-weight: 400; }
.fund-row-end { gap: 4px; }
.fund-edit-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; padding: 0; color: var(--df-ink); }
.fund-empty { padding: 16px; font-size: var(--fs-md); color: var(--df-ink-soft); }
.fund-entries-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: var(--tap-min);
  padding: 0;
  border: 0;
  background: none;
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-md);
  cursor: pointer;
}
.fund-another { align-self: flex-start; font-weight: 600; }
.fund-field { width: auto; flex: 1; min-width: 120px; }
.fund-block .fund-actions .fund-field { flex: none; }
.fund-block .fund-section { border-top: 0; padding-top: 0; }

/* Issue #2311 — welcome card entrance and dismiss resolve to the finished state. */
@media (prefers-reduced-motion: reduce) {
  .onboarding-card--enter,
  .onboarding-card--enter .onboarding-card-points li,
  .onboarding-card--leave { animation: none; }
}

/* ── Bookings list (Bookings redesign M1, #2349) ──────────────────
   Three groups, one plain row per stay, leg or item, one status word at the
   right. No buttons on a row: every action lives in the sheet a row opens. */
.bk-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
}
@media (max-width: 1023px) {
  /* #6746 — the bar is gone below 1024px: its wrapper dissolves and the Add
     booking button is the floating pill (shared rule below with .exp-tab-add). */
  .bk-head { display: contents; }
  #panel-bookings { padding-bottom: 6rem; }
}
.bk-summary { display: flex; margin-bottom: var(--sp-md); }
.bk-group { margin-bottom: var(--sp-lg); }
/* Day heading: DESIGN.md Title tier (Fraunces 700, sentence case), not the 11px Label tier (#6198). */
.bk-group-title {
  font-family: var(--df-sans);
  font-weight: 600;
  font-size: var(--fs-lg);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--df-ink);
  margin: 0 0 var(--sp-sm);
}
.bk-rows { list-style: none; margin: 0; padding: 0; }
/* The row itself is the shared .ui-row; Bookings only adds the hairline between rows and its density (14px title, 12px detail). */
.bk-row { border-bottom: 1px solid var(--df-hair); font-size: var(--fs-sm); }
.bk-row-icon { flex-shrink: 0; font-size: var(--fs-lg); color: var(--df-ink-soft); }
.bk-row-title { font-size: var(--fs-sm); }
.bk-row-sub { font-size: var(--fs-xs); }
.bk-row-cost { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.bk-row-cost.is-none { color: var(--df-ink-soft); font-weight: 600; }
.bk-row-addcost { background: none; border: 0; padding: 0 var(--sp-md) var(--sp-sm); min-height: var(--tap-min); color: var(--df-ink); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.bk-row-warn { font-size: var(--fs-xs); color: var(--info); }
/* A status is a coloured word, never a pill; the word itself carries it (D49+). */
.bk-row-status {
  flex-shrink: 0;
  font-size: var(--fs-xs);
  font-weight: 400;
  white-space: nowrap;
}
.bk-row-status.is-open { color: var(--df-ink); }
.bk-row-status.is-deciding { color: var(--vn-indigo); }
.bk-row-status.is-booking { color: var(--info); }
.bk-row-status.is-waiting { color: var(--df-ink-soft); }
.bk-skeleton-row { padding: var(--sp-md) var(--sp-md); }

/* Bookings Today view (#2363) */
.bk-today-heading { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-sm); margin: 0 0 var(--sp-md); font-size: var(--fs-2xl); font-weight: 600; color: var(--df-ink); }
.bk-today-meta { font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft); }
.bk-today-cards { list-style: none; margin: 0 0 var(--sp-md); padding: 0; display: flex; flex-direction: column; gap: var(--sp-sm); }
.bk-today-card, .bk-later-card { border: 2px solid var(--df-ink); border-radius: var(--radius-lg, 12px); background: var(--df-panel); overflow: hidden; }
.bk-later-card { box-shadow: 3px 3px 0 var(--df-ink); }
.bk-later-card.is-open, .bk-today-card.is-open { border-style: dashed; box-shadow: none; }
.bk-today-still { margin-bottom: var(--sp-md); }
.bk-today-time { font-family: var(--df-sans); font-size: var(--fs-xs); color: var(--df-ink-soft); }
.bk-today-card-actions { display: flex; gap: var(--sp-sm); padding: 0 var(--sp-md) var(--sp-md); }
.bk-today-card-actions .ui-btn { min-height: var(--tap-min); min-width: var(--tap-min); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.bk-today-card-actions .ui-btn--primary { flex: 1; }
.bk-today-strip, .bk-today-earlier {
  display: block; width: 100%; min-height: var(--tap-min); margin: 0 0 var(--sp-md); padding: 0 var(--sp-md);
  border: 2px dashed var(--df-ink); border-radius: var(--radius-lg, 12px); background: transparent;
  color: var(--df-ink); font-family: inherit; font-size: var(--fs-sm); font-weight: 600; text-align: left; cursor: pointer;
}
.bk-today-strip { display: flex; align-items: center; justify-content: space-between; }
.bk-today-earlier { border: 0; border-bottom: 1px solid var(--df-hair); border-radius: 0; color: var(--df-ink-soft); margin: 0; }

/* Issue #2408 — Trip Settings → Preferences reuses the wizard's chips around
   real inputs: the input is visually hidden but stays focusable, and the chip
   reads :checked / :focus-visible / :disabled off it. */
.wizard-chip-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.wizard-chip { position: relative; gap: var(--space-sm); }
.wizard-chip:has(> .wizard-chip-input:checked) {
  background: var(--selected-bg);
  border-color: var(--selected-bg);
  color: var(--on-selected);
  font-weight: 600;
}
.wizard-chip:has(> .wizard-chip-input:focus-visible) { outline: 3px solid var(--vn-trail-green); outline-offset: 2px; }
.wizard-chip:has(> .wizard-chip-input:disabled) { cursor: default; opacity: 0.7; }
.wizard-chip:has(> .wizard-chip-input:disabled):hover,
.wizard-chip:has(> .wizard-chip-input:disabled):active { transform: none; box-shadow: var(--df-press); }
.wizard-chip-grid--inline { flex-direction: row; flex-wrap: wrap; }
.wizard-chip-grid--inline .wizard-chip { width: auto; }
.trip-pref-group { border: 0; padding: 0; margin: 0 0 var(--space-xl); min-width: 0; }
.trip-pref-summary { margin: 0 0 var(--space-lg); display: grid; gap: var(--space-sm); }
.trip-pref-summary > div { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-md); }
.trip-pref-summary dt { min-width: 7rem; font-weight: 600; color: var(--df-ink); }
.trip-pref-summary dd { margin: 0; flex: 1 1 12rem; color: var(--df-ink-soft); overflow-wrap: anywhere; }
.trip-pref-section { margin: 0 0 var(--space-xl); padding-top: var(--space-md); border-top: 1px solid var(--border); }
.trip-pref-section-title { margin: 0 0 var(--space-md); font-size: var(--fs-md); font-weight: 600; color: var(--df-ink); }
.trip-pref-section .set-block-hint { max-width: none; }
.trip-pref-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
@media (max-width: 680px) { .trip-pref-pair { grid-template-columns: 1fr; } }
.trip-pref-interest-row { margin: 0 0 var(--space-md); }
.trip-pref-row-title { margin: 0 0 var(--space-xs); font-size: var(--fs-xs); color: var(--df-ink-soft); }
.trip-pref-places { margin: 0 0 var(--space-md); padding-left: var(--space-lg); color: var(--df-ink-soft); }
.trip-prefs-saved { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); }
.trip-prefs-saved[hidden] { display: none; }
.trip-pref-legend { padding: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--df-ink); }

/* Trip Preferences (#2409): Save stays in reach on a long form; the sharing
   block is its own card because, unlike the form, it saves on change. */
.trip-prefs-actions { position: sticky; bottom: 0; z-index: 2; align-items: center; padding: var(--space-md) 0; background: var(--surface-2); }
.trip-prefs-actions .pf-unsaved { margin: 0; }
.trip-sharing-card { border: 1px dashed var(--border-strong); }
.trip-sharing-auto { margin: 0 0 var(--space-md); font-size: var(--fs-xs); font-weight: 600; color: var(--df-ink-soft); }
/* #6386 — "What I share with the group" is a drill-in now: no dashed card, one radio per row. */
#set-drill-share .trip-sharing-card { border: 0; padding: 0; box-shadow: none; background: none; }
#set-drill-share .pf-check { display: flex; align-items: center; gap: var(--space-sm); min-height: var(--tap-min); font-size: var(--fs-sm); color: var(--df-ink); cursor: pointer; }
#set-drill-share .pf-check input { width: 20px; height: 20px; min-height: 0; margin: 0; flex: none; accent-color: var(--df-pin-deep-green); }


/* Deciding a stay in Bookings (E4-2, #2358): options reuse the
   .accommodation-option-row anatomy; these are the vote control and the rows
   around the list. 44px targets; status is always in words, not colour alone. */
.bk-stay-deciding { display: flex; flex-direction: column; gap: var(--sp-sm); }
.bk-vote-closed { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.bk-stay-add {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  width: 100%;
  min-height: var(--tap-min);
  padding: 0;
  border: none;
  border-top: 2px solid var(--df-hair);
  background: none;
  color: var(--df-ink);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}
/* DeskDecide (#2791): name, price a night, vote at the right. The name wraps. */
.bk-opt-row { display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-xs); padding: var(--sp-sm) 0; border-bottom: var(--edge-hairline); }
.bk-opt-row:last-child { border-bottom: none; }
.bk-opt-remove { min-height: var(--tap-min); padding: 0; border: none; background: none; color: var(--df-ink-soft); font: inherit; font-size: var(--fs-xs); text-decoration: underline; cursor: pointer; }
/* Phone sheet head (Deciding / PMember, #2792); from 1024px the pane names the stay */
.bk-stay-eyebrow { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--df-ink-soft); }
.bk-stay-nights { margin-top: var(--sp-xs); color: var(--df-ink-soft); }
.bk-stay-dates { display: none; }
@media (min-width: 1024px) { .bk-stay-head { display: none; } .bk-stay-dates { display: block; } }
.bk-stay-pick { align-self: stretch; }
.bk-stay-host-actions { display: flex; flex-wrap: wrap; gap: var(--sp-sm); padding: var(--sp-sm) 0; } /* the picked stay still uses this */
.bk-stay-picker { margin: 0; color: var(--df-ink-soft); font-size: var(--fs-sm); }
.bk-stay-picked { display: flex; flex-direction: column; gap: var(--sp-sm); }
.bk-stay-picked-name { margin: 0; font-size: var(--fs-md); }

/* ==========================================================================
   Expenses 22A (#2421, part of #2318): the Add/Edit expense sheets on the
   xk- kit. Apricot ground, cream fields, sentence-case labels, a dashed scan
   tile and a cream footer bar. Tokens only; nothing here travels, so the
   prefers-reduced-motion block has nothing to answer.
   ========================================================================== */
.exp-form-sheet.xk-sheet { display: block; background: var(--df-ground); }
/* #5783 — block layout ignores the handle's align-self, so centre it with margins. */
.exp-form-sheet .xk-sheet-handle { margin: 8px auto 0; }
.exp-form-sheet .xk-sheet-head { padding-left: 0; padding-right: 0; padding-top: 8px; }
.exp-form-sheet .xk-sheet-close { flex: none; min-width: 44px; }

/* Cream fields at the kit's 48px; the ID rules above would otherwise win */
#addExpenseModal .ui-field-control,
#edit-expense-modal .ui-field-control {
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-stub);
  background-color: var(--df-panel);
  color: var(--df-ink);
  font-family: var(--df-sans);
}
.exp-form-sheet .ui-field-label { margin-bottom: 8px; }
.exp-form-sheet .exp-form-section-legend.ui-field-label { margin-bottom: 8px; }

/* Currency + Amount: two separate fields side by side */
.exp-form-sheet .exp-amount-wrap { gap: 12px; align-items: flex-start; }
.exp-form-sheet .exp-currency-picker { flex: none; width: 100px; min-width: 100px; }
.exp-form-sheet .exp-amount-col { flex: 1; min-width: 0; }
.exp-form-sheet .exp-currency-sel,
.exp-form-sheet .exp-amount-inp {
  width: 100%;
  border-radius: var(--radius-stub) !important;
  border-width: 2px !important;
}
/* #5785 — the base rule drops the right border for the old joined control; these are two separate fields. */
.exp-form-sheet .exp-currency-sel { border-right: 2px solid var(--df-ink) !important; }
#addExpenseModal .exp-amount-inp,
#edit-expense-modal .exp-amount-inp { font-size: 18px; font-weight: 400; }

/* Scan: one full-width dashed tile, no hairline under it */
.exp-form-sheet .exp-scan-row { border-bottom: 0; padding-bottom: 0; }
.exp-form-sheet .exp-scan-row .scan-btns { display: flex; flex-direction: column; gap: var(--sp-sm); }

/* Footer: cream bar, 2px ink top rule, a 52px primary pill. #2537 — the sheet
   padding is one token (--exp-sheet-pad, 2rem, 1.5rem at <=480px) and the
   footer's negative margins and sticky offset reuse it, so the bar runs flush
   to the sheet's left/right/bottom edges and cannot drift from the padding. */
.exp-form-sheet {
  --exp-sheet-pad: 2rem;
  padding: var(--exp-sheet-pad);
  padding-top: 0; /* #3302 — the title sits where the board puts it */
}
@media (max-width: 480px) {
  .exp-form-sheet { --exp-sheet-pad: 1.5rem; }
}
.exp-form-sheet .exp-modal-sticky-footer {
  background: var(--df-panel);
  border-top: 2px solid var(--df-ink);
  bottom: calc(-1 * var(--exp-sheet-pad));
  padding: var(--sp-sm) var(--exp-sheet-pad) calc(var(--sp-sm) + env(safe-area-inset-bottom));
  margin: var(--sp-sm) calc(-1 * var(--exp-sheet-pad)) calc(-1 * var(--exp-sheet-pad));
}
.exp-form-sheet .exp-footer-pill { width: 100%; min-height: 52px; }

/* #6748 - Add/Edit stop on the same sheet: sentence-case labels like .xk-field-label,
   and the footer's one primary takes the row (the Delete icon, edit only, sits beside it). */
.stop-form-sheet .form-label {
  font-family: var(--df-sans);
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--df-ink);
  margin-bottom: 6px;
}
.stop-form-sheet .stop-modal-footer { display: flex; align-items: center; gap: var(--space-md); }
.stop-form-sheet .stop-modal-footer .exp-footer-pill { flex: 1 1 0; width: auto; min-width: 0; margin-top: 0; }

/* ==========================================================================
   Expenses 22B (#2422, part of #2318): category tiles, Split between,
   Not equal? and More details on the Add/Edit expense sheets. Tokens only;
   nothing here travels, so the prefers-reduced-motion block has nothing to
   answer (the legacy chip/chevron transitions are already covered there).
   ========================================================================== */
/* Category: xk-tile, selected = solid category fill with an ink icon */
.exp-form-sheet .exp-cat-chip-row { gap: 8px; padding-bottom: 2px; }
.exp-form-sheet .exp-cat-chip.xk-tile {
  flex: 1 1 0;
  width: auto;
  min-width: var(--tap-min);
  max-width: 52px;
  height: 48px;
  min-height: var(--tap-min);
  padding: 0;
  border: 2px solid var(--df-ink);
  background: var(--df-panel);
}
.exp-form-sheet .exp-cat-chip.xk-tile.sel { color: var(--df-panel); border-color: var(--df-ink); } /* #6853: ink on the category fills was 2.1-2.8:1 */
.exp-form-sheet .exp-cat-chip.xk-tile.sel i { color: inherit; }
.exp-form-sheet .exp-cat-chip.xk-tile.sel.cat-food { background: var(--vn-pandan); }
.exp-form-sheet .exp-cat-chip.xk-tile.sel.cat-transport { background: var(--vn-sky); }
.exp-form-sheet .exp-cat-chip.xk-tile.sel.cat-shopping { background: var(--vn-batik); }
.exp-form-sheet .exp-cat-chip.xk-tile.sel.cat-hotel { background: var(--vn-indigo); }
.exp-form-sheet .exp-cat-chip.xk-tile.sel.cat-activity { background: var(--vn-green); }
.exp-form-sheet .exp-cat-chip.xk-tile.sel.cat-other { background: var(--selected-bg); color: var(--on-selected); }

/* Split between: ink-selected segments; member pills show their state */
.exp-form-sheet .ui-seg-btn { flex: 1; }
/* Issue 3302 — drawn like Everyone | Choose people: the legacy .split-btn divider
   rules (border-right / border-left) must not leak into the kit switch. */
.exp-form-sheet .ui-seg .ui-seg-btn:first-child { border-right: 0; }
.exp-form-sheet .ui-seg .ui-seg-btn + .ui-seg-btn { border-left: 0; }
.exp-form-sheet .split-summary strong { color: var(--df-ink); font-weight: 600; }
/* Issue 5714 — Body tier (DESIGN.md, 0.9375rem): 15px on the board, as "Not equal?" is. */
.exp-form-sheet .split-summary-row .split-summary { font-size: var(--fs-md); color: var(--df-ink); }
.exp-form-sheet .pax-toggle .pax-btn.sel {
  background: var(--df-ink);
  border-color: var(--df-ink);
  color: var(--on-selected);
}
.exp-form-sheet .split-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  margin-top: var(--sp-sm);
}
.exp-form-sheet .split-summary-row .split-summary { margin: 0; flex: 1; min-width: 0; }
.exp-form-sheet .split-notequal-link {
  margin-left: auto;
  color: var(--df-brand);
  font-size: var(--fs-md);
  font-weight: 600;
  text-decoration: underline;
}
.exp-form-sheet .split-modes { margin-top: var(--sp-sm); }

/* AI-scan toggle sits under the scan tile */

/* More details: kit disclosure row under a 2px ink top rule */
.exp-form-sheet .form-more-toggle.xk-disclosure {
  margin-top: var(--sp-sm);
  padding: 0;
  border: 0;
  border-top: 2px solid var(--df-ink);
  border-radius: 0;
  background: transparent;
  color: var(--df-ink);
}
.exp-form-sheet .exp-day-chip-wrap { display: block; }
.exp-form-sheet .exp-day-chip-sel { width: 100%; height: 48px; border-radius: var(--radius-stub); }

/* ── Destinations: read-first stub + editor ─────────────────── */
.set-dest-summary { font-size: var(--fs-xs); color: var(--df-ink-soft); margin-bottom: var(--sp-xs); }
.set-dest-read-list { list-style: none; margin: 0 0 var(--sp-sm); padding: 0; display: flex; flex-direction: column; gap: var(--sp-xs); }
.set-dest-read-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-xs); font-size: var(--fs-sm); }
.set-dest-read-row .set-dest-leg-range { font-size: var(--fs-xs); }
.set-dest-edit-btn { min-height: var(--tap-min); margin-bottom: var(--sp-sm); }
.set-dest-leg { padding-bottom: var(--sp-sm); border-bottom: 1px solid var(--df-hair); }
.set-dest-leg-head { display: flex; align-items: center; gap: var(--sp-xs); margin-bottom: var(--sp-xs); }
.set-dest-leg-head .set-dest-leg-name { flex: 1; min-width: 0; margin-bottom: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-dest-leg-reorder { display: flex; gap: var(--sp-xs); }
.set-dest-btn { min-width: var(--tap-min); min-height: var(--tap-min); display: flex; align-items: center; justify-content: center; background: var(--df-hair); border: none; border-radius: var(--radius-pill); color: var(--df-ink); cursor: pointer; }
.set-dest-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.set-dest-remove { margin-top: var(--sp-sm); color: var(--danger-text); font-size: var(--fs-xs); }
.set-dest-editor-actions { display: flex; gap: var(--sp-xs); margin: var(--sp-sm) 0; }
.set-dest-editor-actions .btn-small { min-height: var(--tap-min); }

/* Bookings partner entry (M9, issue 2366) — one reserved place, with its disclosure. */
.bk-partner { margin-top: var(--sp-md); }
.bk-partner .ui-btn { min-height: var(--tap-min); }
.bk-partner-note { margin: var(--sp-sm) 0 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }

/* ==========================================================================
   Expenses 22C (issue 2423): the Stop field is a button that opens a picker sheet.
   Tokens only; nothing travels, so the reduced-motion block has nothing to add.
   ========================================================================== */
.exp-link-field { position: relative; }
.exp-link-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 48px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.exp-link-btn-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exp-link-btn-empty { color: var(--df-ink-soft, var(--df-ink-soft)); }
.exp-link-clear {
  position: absolute;
  top: 2px;
  right: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-min);
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--df-ink);
  cursor: pointer;
}
.exp-link-clear[hidden] { display: none; }
.exp-link-sheet { max-height: 85vh; max-height: 85dvh; overflow: hidden; }
.exp-link-search { padding: 0 16px 8px; }
.exp-link-count { margin: 8px 0 0; font-size: var(--fs-sm); color: var(--df-ink); }
.exp-link-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px 16px; }
.exp-link-group {
  margin: 16px 0 8px;
  font-family: var(--df-sans);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--df-ink);
}
.exp-link-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  min-height: var(--tap-min);
  margin-bottom: 8px;
  padding: 8px 12px;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-stub);
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: var(--df-sans);
  text-align: left;
  cursor: pointer;
}
.exp-link-opt.is-on { background: var(--selected-bg); color: var(--on-selected); }
.exp-link-empty { margin: 16px 0; color: var(--df-ink); }

/* Expenses: former inline styles in js/expenses.js. Same values, now classes. */
.unequal-mismatch[hidden] { display: none; }
.exp-item-adjust { margin-top: var(--sp-xs); }
.exp-item-adjust-dates { display: flex; align-items: center; gap: var(--sp-sm); margin-top: var(--sp-xs); }
.exp-scan-progress { font-size: var(--fs-sm); color: var(--df-brand); }
.exp-item-taxable { display: flex; align-items: center; gap: var(--sp-sm); font-size: var(--fs-xs); color: var(--df-ink-soft); margin-top: var(--sp-xs); }
.exp-items-footer { display: flex; gap: var(--sp-sm); align-items: center; margin-top: var(--sp-sm); }
.exp-items-total-note { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.btn-small.exp-show-all-btn { width: auto; min-height: var(--tap-min); margin: 0 auto; display: flex; background: none; border: 0; box-shadow: none; font-size: var(--fs-sm); font-weight: 600; color: var(--df-ink); text-decoration: underline; }
/* Issue 3303: the zone above "Per person" used the 40–64px zone gap, ~4× the card gaps. */
.exp-zone:has(+ .exp-zone-breakdown) { margin-bottom: var(--sp-md); }
.exp-sheet-details > summary { justify-content: space-between; }
.exp-sheet-details[open] > summary .exp-sheet-details-chev { transform: rotate(180deg); }
.exp-modal-empty { padding: 1rem 0; }
.exp-muted { color: var(--df-ink-soft); }
.exp-coral { color: var(--info); }
.exp-trail-green { color: var(--df-brand); }
.exp-strong { font-weight: 600; }
.exp-share-heading { font-weight: 600; font-size: var(--fs-sm); margin-bottom: var(--sp-sm); }
.exp-share-hint { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.btn-small.exp-add-item-btn { margin-top: var(--sp-md); }
.balance-name-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-xs); }
.balance-badges { display: flex; gap: var(--space-xs); flex-wrap: wrap; }
.settle-currency-picker { margin-top: var(--sp-sm); display: flex; gap: var(--sp-sm); flex-wrap: wrap; align-items: center; }
.settle-rate-label { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.settle-rate-input { width: 90px; }
.empty.exp-settled-empty { padding: 0.75rem 0; font-size: var(--fs-sm); }

/* Issue 2699 — Settle up: pay in any currency picker */
.settle-fx-picker { display: flex; flex-direction: column; gap: var(--sp-sm); }
.settle-fx-chips { display: flex; gap: var(--sp-xs); flex-wrap: wrap; }
.settle-fx-chip, .settle-fx-option {
  min-height: var(--tap-min);
  padding: 0 var(--sp-sm);
  border: 1px solid var(--df-hair);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.settle-fx-chip.is-on, .settle-fx-option.is-on { border-color: currentColor; font-weight: 600; }
.settle-fx-results { list-style: none; margin: 0; padding: 0; max-height: 200px; overflow-y: auto; }
.settle-fx-option { width: 100%; border-radius: var(--radius-stub); text-align: left; border-color: transparent; }
.settle-fx-empty { padding: var(--sp-sm); font-size: 14px; }

/* ── People W2: person sheet + "no longer on this trip" screen ── */
.member-item-tap { cursor: pointer; }
.member-open-btn {
  background: none; border: 0; color: var(--df-ink-soft); cursor: pointer; flex-shrink: 0;
  min-width: var(--tap-min); min-height: var(--tap-min); display: inline-flex; align-items: center; justify-content: center;
}
.person-sheet-title { display: flex; align-items: center; gap: var(--space-md); }
.person-sheet-status { color: var(--df-ink-soft); font-size: var(--fs-xs); margin: 0 0 var(--space-lg); }
.person-sheet-caps { margin: 0 0 var(--space-lg); padding-left: 0; list-style: none; }
.person-sheet-caps li { position: relative; margin: var(--space-xs) 0; padding-left: 18px; list-style: none; }
.person-sheet-caps li::before { content: ''; position: absolute; left: 4px; top: 0.55em; width: 7px; height: 7px; border-radius: 50%; background: var(--vn-trail-green); }
.person-sheet-actions { display: flex; flex-direction: column; gap: var(--space-sm); }
.person-sheet-action { width: 100%; min-height: var(--tap-min); text-align: left; }
/* Two classes: .btn-secondary (one class, defined earlier) would otherwise win the colour. --error-text is the 4.5:1 text red in both themes. */
.btn-secondary.person-sheet-danger { color: var(--error-text); }
.person-sheet-quiet { background: none; border: 0; cursor: pointer; font: inherit; color: var(--df-ink); padding: var(--space-md) 0; }
.person-sheet-note { color: var(--df-ink-soft); font-size: var(--fs-xs); margin: var(--space-xs) 0 var(--space-sm); }
/* ── People W3: invite sheet, member share sheet, placeholder seat link ── */
.invite-card {
  background: var(--df-ground); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card);
  padding: var(--space-lg); margin-bottom: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-md);
}
.invite-card-label {
  font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.invite-seat-link { padding: var(--space-sm) 0; border-top: 1px dashed var(--df-ink-soft); }
.invite-seat-link-label { display: block; font-weight: 600; margin-bottom: var(--space-xs); }
.invite-card-line { display: flex; align-items: center; gap: var(--space-md); }
.invite-link-text {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer; color: inherit; text-align: left; min-height: var(--tap-min);
  flex: 1; min-width: 0; font-family: var(--df-sans); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.invite-copy-btn { flex-shrink: 0; min-height: var(--tap-min); min-width: var(--tap-min); }
.invite-copy-btn.invite-copy-text { padding: 0 var(--space-xl); font-weight: 600; }
/* Beats the global .btn-primary width:100%, which squeezed .invite-link-text to zero at 390px (#3628). */
.invite-card-line .invite-copy-btn { width: auto; flex: none; margin-top: 0; min-height: var(--tap-min); min-width: var(--tap-min); }
.invite-card-meta {
  display: flex; flex-wrap: wrap; gap: var(--space-lg); font-family: var(--df-sans); font-size: var(--fs-xs);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--df-ink-soft);
}
.invite-card-body { margin: 0; }
.invite-expired { color: var(--error); }
.invite-note { margin: 0; color: var(--df-ink-soft); font-size: var(--fs-xs); }
.invite-card .invite-qr-box { justify-content: flex-start; margin: 0; }
.invite-new-link-btn {
  align-self: flex-start; min-height: var(--tap-min); padding: var(--space-sm) 16px;
  font-weight: 600;
}
.invite-card .invite-qr-svg { border: 2px solid var(--df-ink); border-radius: var(--radius-md); }
.invite-renew-btn { align-self: flex-start; min-height: var(--tap-min); }
.invite-code-block { display: flex; flex-direction: column; gap: var(--space-xs); margin-bottom: var(--space-lg); }
.invite-code {
  align-self: flex-start; background: none; border: 0; padding: 0; min-height: var(--tap-min); cursor: pointer; color: var(--df-ink);
  font-family: var(--df-display); font-size: var(--fs-2xl); font-weight: 800; line-height: 1; letter-spacing: 0.04em;
}
.invite-more { border-top: 2px solid var(--df-ink); padding: var(--space-md) 0; }
.invite-more > summary { cursor: pointer; min-height: var(--tap-min); display: flex; align-items: center; font-weight: 600; }
.invite-friends { display: flex; flex-direction: column; gap: var(--space-sm); }
.invite-friend-row { display: flex; align-items: center; gap: var(--space-md); }
.invite-friend-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.invite-friend-who > span { color: var(--df-ink-soft); font-size: var(--fs-xs); }
.invite-friend-btn { width: auto; padding: var(--space-sm) var(--space-xl); min-height: var(--tap-min); flex-shrink: 0; }
.invite-seat-notes { margin: 0 0 var(--space-md); padding-left: var(--space-lg); color: var(--df-ink-soft); font-size: var(--fs-xs); }
.invite-more input[type="text"] { width: 100%; margin: var(--space-xs) 0 var(--space-md); }
.no-longer-member {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-xl);
  padding: var(--space-xl); text-align: left;
  /* W-N2: dotted ground (the shared print ground, above) */
}

/* ── Check List W2 (R2.6–R2.9): category cards, rows, Who's ready, avatars ── */
.cl-cat {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  margin-bottom: var(--space-xl);
  overflow: hidden;
}
.cl-cat-head:focus-visible { outline: 3px solid var(--df-brand); outline-offset: -3px; }
.cl-cat-head {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--space-md) var(--space-2xl);
  background: none;
  border: 0;
  color: var(--df-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.cl-cat:has(.cl-cat-menu[open]) { overflow: visible; }
.cl-cat-headrow { display: flex; align-items: center; }
.cl-cat-headrow .cl-cat-head { flex: 1; min-width: 0; width: auto; }
.cl-cat-menu { position: relative; flex: none; }
.cl-cat-more {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--tap-min); min-height: var(--tap-min);
  color: var(--df-ink); cursor: pointer; list-style: none;
}
.cl-cat-more::-webkit-details-marker { display: none; }
.cl-cat-more:focus-visible { outline: 3px solid var(--df-brand); outline-offset: -3px; }
.cl-cat-menu-list {
  position: absolute; right: 0; top: 100%; z-index: 5; min-width: 140px;
  display: flex; flex-direction: column;
  background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: 8px;
}
.cl-cat-menu-list button {
  min-height: var(--tap-min); padding: 0 var(--space-xl); background: none; border: 0;
  color: var(--df-ink); font: inherit; text-align: left; cursor: pointer;
}
.cl-cat-menu-danger { color: var(--error-text) !important; }
.cl-new-cat-btn { margin-bottom: var(--space-xl); }
.cl-new-cat { margin-bottom: var(--space-xl); }
.cl-new-cat-row { display: flex; align-items: center; gap: var(--space-md); }
.cl-new-cat-row input { flex: 1; min-width: 0; }
.checklist-price-logged { color: var(--df-brand); font-size: var(--fs-xs); white-space: nowrap; }
.cl-cat-name {
  flex: 1;
  min-width: 0;
  font-family: var(--df-display);
  font-weight: 600;
  font-size: var(--fs-md, 1.125rem);
}
.cl-cat-count {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.cl-cat-count-done { color: var(--df-brand); }
.cl-entry-note { margin: var(--space-md) 0 0; font-size: var(--fs-sm); color: var(--df-ink-soft, var(--text-muted)); }
.cl-entry-info { vertical-align: middle; }
.cl-cat-body { border-top: 2px solid var(--df-ink); padding: 0 var(--space-2xl) var(--space-md); }
.cl-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: var(--space-md) 0;
}
.cl-row + .cl-row { border-top: 2px dashed var(--df-hair); }
.cl-check {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-min);
  height: var(--tap-min);
  min-width: var(--tap-min);
  padding: 0;
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: 8px;
  color: var(--df-brand-fg);
  cursor: pointer;
}
.cl-check.cl-check-done { background: var(--df-brand); }
.cl-check.cl-check-static { border-style: dashed; cursor: default; }
.cl-check:focus-visible,
.cl-info:focus-visible,
.cl-cat-head:focus-visible,
.cl-ready-member:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 2px; }
.cl-row-main { flex: 1; min-width: 0; }
.cl-row-title { display: flex; align-items: center; gap: var(--space-sm); min-height: var(--tap-min); }
.cl-row-done .cl-name { text-decoration: line-through; color: var(--df-ink-soft); }
.cl-info {
  flex: none;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  background: none;
  border: 0;
  color: var(--df-brand);
  font-size: var(--fs-lg);
  cursor: pointer;
}
.cl-row-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}
.cl-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 52px;
  height: 20px;
  flex: none;
  border: 2px solid var(--df-ink);
  border-radius: 10px;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  color: var(--df-ink);
}
.cl-stop-tag,
.stop-checklist-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--vn-indigo);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.cl-stop-tag-today { color: var(--df-ink); }
.cl-stop-tag::before,
.stop-checklist-badge::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}
.cl-info-panel {
  margin-top: var(--space-sm);
  padding: var(--space-md);
  background: var(--df-chip-fill);
  border-radius: 8px;
  font-size: var(--fs-xs);
}
.cl-row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-sm); }
/* #6897 — rows the app made from a booking or stay: a source line that opens the
   booking, the one line saying what moved, and the cancelled state. */
.cl-auto-line { display: block; font-size: var(--fs-xs); color: var(--df-ink-soft); }
button.cl-auto-line { text-align: left; }
.cl-auto-changed { font-size: var(--fs-xs); font-weight: 600; color: var(--df-brand); }
.cl-auto-cancelled { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.cl-row-cancelled .cl-name { text-decoration: line-through; color: var(--df-ink-soft); }
/* #3820 — the row ⋯ sits in the row's top-right slot, level with the title, and
   its list opens right-anchored inside the card. An open menu lifts the card's
   overflow clip (as the category ⋯ does) so the last row's list isn't cut off. */
.cl-row { position: relative; }
.cl-row-menu { position: absolute; top: var(--space-md); right: 0; }
.cl-row:has(.cl-row-menu) .cl-row-title { padding-right: var(--tap-min); }
/* #3917 — a ⋯-only actions row keeps its box (the absolute ⋯ lives in it) but drops the gap. */
.cl-row-actions:not(:has(> :not(.cl-row-menu))) { margin-top: 0; }
.cl-cat:has(.cl-row-menu[open]) { overflow: visible; }
.cl-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid var(--df-ink);
  border-radius: 50%;
  overflow: hidden;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--df-ink);
  background: var(--df-chip-fill);
}
button.cl-avatar { cursor: pointer; overflow: visible; }
button.cl-avatar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}
.cl-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.cl-avatar-c0 { background: color-mix(in srgb, var(--vn-green) 30%, var(--df-panel)); }
.cl-avatar-c1 { background: color-mix(in srgb, var(--vn-coral) 30%, var(--df-panel)); }
.cl-avatar-c2 { background: color-mix(in srgb, var(--vn-amber) 30%, var(--df-panel)); }
.cl-avatar-c3 { background: color-mix(in srgb, var(--vn-indigo) 30%, var(--df-panel)); }
.cl-avatar-c4 { background: color-mix(in srgb, var(--vn-purple) 30%, var(--df-panel)); }
.cl-avatar-c5 { background: color-mix(in srgb, var(--vn-sky) 30%, var(--df-panel)); }
.cl-ready-body { border-top: 2px solid var(--df-ink); padding: var(--space-md) var(--space-2xl); }
.cl-ready-member {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  min-height: var(--tap-min);
  background: none;
  border: 0;
  color: var(--df-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.cl-ready-name { flex: 1; min-width: 0; font-weight: 600; }
.cl-ready-items { margin: 0 0 var(--space-md) calc(24px + var(--space-md)); padding-left: var(--space-xl); font-size: var(--fs-xs); color: var(--df-ink-soft); }
.cl-ready-note { margin: var(--space-md) 0 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }

/* Check List W4 — add card and item sheet. Same tokens as the filter menu. */
.checklist-sheet select { width: 100%; min-height: var(--tap-min); }
.checklist-sheet-row { display: grid; grid-template-columns: 1fr; gap: var(--space-md); }
.checklist-sheet-row .form-group { min-width: 0; }
.checklist-sheet-inline { display: flex; gap: var(--space-md); }
.checklist-sheet-inline input { flex: 1; min-width: 0; }
.checklist-sheet-hint { margin: var(--space-sm) 0 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.checklist-sheet-actions {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 2px solid var(--df-ink);
}
/* #3918 — width: auto over the global .btn-* 100%, which became the flex basis and pushed Save off
   the sheet; margin 0 drops .btn-primary's 1rem top margin, which stretched Delete to 60px tall. */
.checklist-sheet-actions { align-items: center; }
.checklist-sheet-actions button { min-height: var(--tap-min); width: auto; margin: 0; padding: 0 var(--space-xl); }
/* Screen 06 — fields are cut peach with a heavier keyline, and Delete is a small solid Alert Red pill (#3822). */
.checklist-sheet input[type="text"],
.checklist-sheet select {
  background: var(--df-ground);
  border: 2px solid var(--df-ink);
}
.checklist-sheet-actions .btn-secondary.btn-danger {
  flex: 0 0 auto;
  min-height: var(--tap-min);
  padding: 0 var(--space-xl);
  font-size: var(--fs-xs);
  background: var(--error-solid);
  border-color: var(--error-solid);
  color: white;
}

/* Check List W3 — row/suggestion actions replace the legacy
   .stop-edit-btn/.x-close-btn/.settle-link-btn/.btn-small on this tab, and the
   read-only notice for an ended or cancelled trip (R2.11). */
.cl-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  padding: 0 var(--space-lg);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: var(--df-panel);
  color: var(--df-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.cl-action-primary { background: var(--df-brand); color: var(--df-panel); }
.cl-action-icon { padding: 0; }
#checklist-add-btn { background: var(--df-brand); color: var(--df-panel); }
.cl-add-long { display: none; }
@media (min-width: 1024px) {
  .cl-add-short { display: none; }
  .cl-add-long { display: inline; }
}
.cl-action:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 2px; }

/* ── Check List G2 (R4.3–R4.4): the Suggestions card ── */
.cl-ideas-head { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-md) var(--space-2xl) 0; }
.cl-ideas-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cl-ideas-refresh { flex: none; border-color: transparent; background: none; }
.cl-ideas-refresh:disabled { opacity: 0.5; cursor: default; }
.cl-ideas-body { padding: 0 var(--space-2xl) var(--space-2xl); }
.cl-ideas-group {
  margin: var(--space-lg) 0 var(--space-sm);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.cl-ideas-chips { display: flex; flex-wrap: wrap; gap: var(--space-md); }
.cl-idea {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--tap-min);
  padding: 0 var(--space-lg);
  border: 2px dashed var(--df-ink);
  border-radius: 999px;
  background: none;
  color: var(--df-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.cl-idea-on { border-style: solid; background: var(--df-brand); border-color: var(--df-ink); color: var(--df-brand-fg); }
.cl-idea:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 2px; }
/* #7708 — country packs: the country tag on a chip, a rule's disclaimer under
   its ⓘ, and the "Good to know" card. The tag takes the chip's own colour, so it
   reads on both the plain and the picked chip. */
.cl-idea-country {
  flex: none;
  padding: 0 var(--sp-sm);
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 400;
}
.cl-disclaimer { display: block; color: var(--df-ink-soft); }
.cl-info-panel p { margin: 0; }
.cl-info-panel p + p { margin-top: var(--sp-xs); }
.cl-tips .cl-cat-name { overflow-wrap: anywhere; }
.cl-tips-dismiss { flex: none; margin-right: var(--sp-sm); border-color: transparent; background: none; }
.cl-ideas-note { margin: var(--space-lg) 0 0; color: var(--df-ink-soft); font-size: var(--fs-xs); }
.cl-ideas-prompt {
  margin: var(--space-lg) 0 var(--space-md);
  padding: var(--space-lg);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: var(--df-panel);
}
.cl-ideas-prompt-title { display: block; font-weight: 600; margin-bottom: var(--space-xs); }
.cl-ideas-prompt-sub { margin: 0 0 var(--space-md); color: var(--df-ink-soft); font-size: var(--fs-xs); }
.cl-ideas-prompt-row { display: flex; align-items: center; gap: var(--space-md); }
.cl-ideas-prompt-row select {
  flex: 1;
  min-width: 0;
  background: var(--df-ground);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  box-shadow: 2px 2px 0 var(--df-ink);
}
.cl-ideas-tray {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 2px dashed var(--df-hair);
}
.cl-ideas-putin { display: flex; flex-direction: column; gap: var(--space-xs); flex: 1; min-width: 10rem; font-weight: 600; }
.cl-row-new { background: var(--info-light); }

/* Issue 2908 (slice 6b of 2858) — "Take this trip with you" card, after a web join on
   Android. A bottom card over the trip; both buttons meet --tap-min. */
.take-trip-card {
  position: fixed;
  left: var(--space-md, 12px);
  right: var(--space-md, 12px);
  bottom: calc(var(--space-md, 12px) + env(safe-area-inset-bottom, 0px));
  z-index: 1400;
  padding: var(--space-md, 12px);
  background: var(--surface-2, var(--bg));
  border: 1px solid var(--border, currentColor);
  border-radius: 12px;
  box-shadow: 0 6px 24px color-mix(in srgb, currentColor 20%, transparent);
}
.take-trip-title { font-weight: 600; margin-bottom: 4px; }
.take-trip-text { margin: 0 0 var(--space-sm, 8px); font-size: var(--fs-sm); }
.take-trip-actions { display: flex; gap: var(--space-sm, 8px); }
.take-trip-btn {
  flex: 1;
  min-height: var(--tap-min);
  border-radius: 8px;
  border: 2px solid var(--df-ink);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.take-trip-btn-primary { border: 2px solid var(--action); color: var(--action); font-weight: 600; }

/* ===================================================================
   Expenses 39: desktop Entries heading, Per person in the xk row
   style, and the "held by" fund line, per Desktop.png. Last in the file so
   they win over the earlier desktop rules.
   ========================================================================== */
.exp-fund-holder { display: none; font-weight: 400; }
@media (min-width: 1024px) { .exp-fund-holder { display: inline; } }
@media (min-width: 1024px) {
  /* Per person sits under the ledger at the ledger's own width. */
  .exp-zone-breakdown { grid-column: 1; }
  .exp-disclosures { grid-template-columns: minmax(0, 1fr); }
  .exp-disclosure { box-shadow: none; border-radius: 12px; }
  .exp-disclosure-inner > * { margin: 0; }
  .exp-disclosure .balance-card {
    margin: 0;
    padding: 12px 16px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .exp-disclosure .money-list { border: 0; border-radius: 0; }
  .exp-disclosure .balance-name { margin-bottom: 4px; font-size: var(--fs-md); font-weight: 600; }
  .exp-disclosure .owes-badge {
    padding: 0;
    border-radius: 0;
    background: none;
    font-family: var(--df-sans);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
}

/* Expense detail sheet: round close in the head, and the folded
   "Details of this expense" under a treated expense's true shares. */
.exp-sheet-head .xk-sheet-close { flex: none; margin-left: auto; }
.exp-sheet-details { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.exp-sheet-details > summary { cursor: pointer; min-height: var(--tap-min); display: flex; align-items: center; }

/* ==========================================================================
   Expenses zero state, design-check pass (issue 3203): FundA, FundA2, FundW1.
   ========================================================================== */
/* Nothing logged: only the empty ledger card, no filters or breakdown. */
.exp-panel[data-exp-empty="true"] .exp-zone-breakdown,
.exp-panel[data-exp-empty="true"] .exp-mode-seg,
.exp-panel[data-exp-empty="true"] .exp-filters,
.exp-panel[data-exp-empty="true"] .exp-ledger-head,
.exp-panel[data-exp-empty="true"] .exp-stub-desk { display: none; }
.exp-stub-square { grid-column: 1 / -1; }
.exp-empty-actions .ui-btn { white-space: nowrap; padding-left: var(--sp-sm); padding-right: var(--sp-sm); }
.empty.exp-settled-empty {
  padding: var(--sp-md) var(--sp-lg);
  border: 2px solid var(--df-ink);
  border-radius: 12px;
  background: var(--df-panel);
  text-align: left;
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}
@media (max-width: 1023px) {
  .exp-panel[data-exp-empty="true"] .exp-zone-standing { margin-bottom: var(--sp-md); }
  /* #4157 — the Trip total first, then the switch (the boards' order). */
  .exp-zone-standing { display: flex; flex-direction: column; }
  .exp-zone-standing .exp-view-switch-wrap { margin: var(--sp-md) 0; }
  /* #4609 — the switch's own margin is the gap; the pot section adds none (FundT1). */
  .exp-pot-section:not(:empty) { margin-top: 0; }
  /* #4157 — Add floats at the bottom right above the tab bar, brand fill and
     hard shadow. Right edge follows the 680px column like the Bookings pill. */
  .exp-tab-add,
  .itin-add-pill,
  .bk-add-btn,
  .cl-add-pill {
    position: fixed;
    right: max(var(--sp-md), env(safe-area-inset-right), calc((100% - 680px) / 2 + var(--sp-md)));
    bottom: calc(76px + env(safe-area-inset-bottom) + var(--sp-md));
    z-index: 30;
    background: var(--df-brand);
    color: var(--df-brand-fg);
    border: 2px solid var(--df-ink);
    box-shadow: var(--df-press);
  }
  /* #4682 — the empty ledger shows its own Add; one Add action at a time. */
  .exp-panel[data-exp-empty="true"] .exp-tab-add { display: none; }
  .exp-tab-add-short { display: none; }
  .exp-tab-add-long { display: inline; }
  .exp-panel { padding-bottom: 6rem; }
  /* #6747 - Check List's Add is the same pill ("Add item"); the panel reserves 6rem so it never covers a row. */
  #panel-checklist { padding-bottom: 6rem; }
}
@media (min-width: 1280px) {
  /* FundW1: the tab header heads the ledger column, over the ledger card. */
  .exp-panel.active .exp-tab-head { grid-column: 1; grid-row: 1; }
  .exp-zone-ledger { grid-row: 2; }
  /* The rail spans every row under the header; min-content rows keep its extra height in the last one. */
  .exp-panel.active { grid-template-rows: min-content min-content 1fr; }
}
/* Issue 3294 — the Scan switch knob slides 24px; with reduced motion it jumps to its finished position. */
@media (prefers-reduced-motion: reduce) {
  .exp-scan-switch-knob, .exp-scan-switch::before { transition: none; }
}

/* 3299 — Shared fund view: fund card (spent bar, Collected dots, folded
   "Who's paid in") and the "Paid from the fund" card. */
.fund-spent-line { padding: 0 16px; font-family: inherit; font-size: var(--fs-xs, 14px); letter-spacing: 0; text-transform: none; }
.fund-progress .xk-progress-fill { background: var(--df-ink); border-radius: var(--radius-pill); }
.fund-collected { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm); margin: var(--sp-sm) 16px 0; padding-top: var(--sp-sm); border-top: 2px dashed var(--df-ink); }
.fund-collected-text { font-family: var(--df-sans); font-size: 12px; letter-spacing: .04em; }
.fund-dots { display: flex; flex-wrap: wrap; gap: 8px; }
.fund-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--df-ink); background: transparent; }
.fund-dot--paid { background: var(--vn-green); border-color: var(--vn-green); }
.fund-paid-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: var(--tap-min); margin-top: var(--sp-sm); padding: 0 16px; border: 0; background: transparent; color: var(--df-ink); font-family: var(--df-sans); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.fund-to-collect { color: var(--df-ink); }
.fund-paid-state { font-family: var(--df-sans); font-size: var(--fs-xs); letter-spacing: 0; text-transform: none; color: var(--df-ink-soft); }
.fund-paid-state--yes { color: var(--vn-green); }
.fund-paid-state--claim, .fund-to-collect { color: var(--df-ink); }
.fund-all-in { color: var(--vn-green); }
.fund-pill--primary { background: var(--df-brand); color: var(--df-brand-fg); }
.fund-fine-print { margin: 0; padding: 12px 16px 16px; font-size: var(--fs-xs, 14px); color: var(--df-ink-soft); }
.fund-paid { display: flex; flex-direction: column; gap: 12px; margin-bottom: var(--sp-md); }
/* #4609: FundT1 — header and rows share one outer card; the rows sit in an inner card. */
.fund-paid.fund-card { padding: 16px 16px 16px; overflow: visible; }
.fund-paid .fund-section-head { padding-top: 0; }
.fund-paid-list { border: 2px solid var(--df-ink); border-radius: 12px; background: var(--df-panel); overflow: hidden; }
.fund-paid-empty { padding: 16px 16px; color: var(--df-ink-soft); }
.fund-paid-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm); width: 100%; min-height: var(--tap-min); padding: 8px 16px; border: 0; border-bottom: 1.5px dashed var(--df-ink); background: transparent; color: var(--df-ink); font: inherit; text-align: left; cursor: pointer; }
.fund-paid-main { display: flex; flex-direction: column; min-width: 0; }
.fund-paid-title { font-weight: 600; overflow-wrap: anywhere; }
.fund-paid-meta { font-family: var(--df-sans); font-size: var(--fs-xs); letter-spacing: .06em; color: var(--df-ink-soft); }
.fund-paid-more { font-weight: 600; }
.fund-paid-list > .fund-paid-row:last-child { border-bottom: 0; }

/* Who holds it? (issue 3298) setup sheet reuses the Settle sheet's radio list (ink row, teal dot). */
.fund-setup-modal .form-label { display: block; margin: var(--sp-md) 0 var(--sp-xs); }

/* #3383 — setup sheet: the pot strip under "Ask each person for" */
.fund-setup-strip { margin-top: var(--sp-md); }
.fund-setup-strip-note { margin-top: var(--sp-sm); font-size: var(--fs-sm); color: var(--df-ink-soft); }

/* Issue #3439 — the Discover card photo fade resolves to its finished state. */
/* #3590 — phone: the summary card, the Group | Personal switch and the fund
   card sit at the board's 16px rhythm, not the desktop 32px block + 40px zone
   ladder. Also keeps each currency figure whole (joinCurrencyFigures()). */
@media (max-width: 680px) {
  .exp-zone-standing { margin-bottom: var(--sp-lg); }
  .exp-zone-standing .exp-block + .exp-block { margin-top: var(--sp-lg); }
  .exp-zone-standing .exp-block > .stat-grid:last-child { margin-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .discover-card-img-fade { opacity: 1; transition: none; }
}

/* #3478 — Confirm all and its F3 review step */
.fund-confirm-all { padding: 12px 16px 0; }
.fund-confirm-all .ui-btn { min-height: var(--tap-min); width: 100%; justify-content: center; }
.fund-confirm-all-row { width: 100%; min-height: var(--tap-min); background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.fund-check { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 2px solid var(--df-ink); border-radius: 6px; font-size: 14px; }
.fund-check--on { background: var(--df-brand); border-color: var(--df-brand); color: var(--df-brand-fg); }

/* #3385 — a member's "Your part" card (FundG) */
.fund-your-part { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 16px 16px; }
.fund-your-part p { margin: 0; }
/* #5586 — I've paid spans the card, as on FundG. */
.fund-your-part .fund-pill--primary { align-self: stretch; justify-content: center; text-align: center; }

/* #4099, #5235 — the account area of the top bar, shared by every screen that
   is not the trip view (My Trips, Discover, Stamps, Profile/Settings, Pending
   approval, Shared trip, Invite, Public profile). Below 1024px it is one round
   avatar: the @name stays in the DOM for the button's accessible name but is
   visually hidden, and the caret goes. From 1024px the @name sits beside the
   avatar. The Route Mark lockup stays (DESIGN.md: every nav bar). Scoped to
   these screens so the trip view's bar keeps its pill. */
:is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen) .home-profile-trigger {
  background: none;
  padding: 0;
  border-color: transparent;
  justify-content: center;
  min-width: var(--tap-min); /* #4407: the 40px disc plus border was 42px wide */
}
/* #4407: fixed apricot in both themes. --df-ground is near-black in dark mode,
   which dropped the green initial to ~3:1 and let the disc vanish on the bar. */
:is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen) .home-profile-avatar {
  width: 40px;
  height: 40px;
  background: var(--df-pin-apricot);
  color: var(--df-pin-deep-green);
  font-size: var(--fs-md);
}
:is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen) .home-profile-name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
:is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen) .home-profile-caret {
  display: none;
}
@media (min-width: 1024px) {
  :is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen) .home-profile-trigger {
    padding-inline-end: var(--space-md);
  }
  :is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen) .home-profile-name {
    position: static;
    width: auto;
    height: auto;
    max-width: 130px;
    clip: auto;
    color: var(--topbar-fg);
  }
}

/* #4506 — back to the 10-16 fund boards (FundF/FundT1/FundW4): Collected, the
   folded "Who's paid in" and the Top up band live inside the one fund card.
   Reassign stays beside the figure (the one ruled deviation), at every width (#5585). */
.fund-card-top { flex-wrap: nowrap; align-items: center; }
/* #5585 — the figure gives way ("left" drops under it), never the button: Reassign stays beside it at 360px. */
.fund-card-top > .fund-left { flex: 1 1 0; }
.fund-card-top > .fund-left .fund-left-amount { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.3em; white-space: nowrap; }
.fund-card-top > .fund-pill { flex: none; }
.fund-left .fund-spent-line, .fund-card > .fund-spent-line { margin: 0 0 12px; }
.fund-card > .fund-collected { margin-bottom: 0; }
.fund-card > .fund-top-up { margin-top: var(--sp-sm); }

/* #4660 — the trip header's scroll collapse is instant (no transition), so
   reduced motion already resolves to the finished state; stated here so the
   rule is explicit. The stamp is static in-app: it never animates. */
/* Issue #5035 — the empty-itinerary chooser (AI / template / build it myself).
   While it shows, #panel-itinerary carries .itin-choosing and everything but
   the chooser (and the people chip) steps aside. No motion, so there is
   no reduced-motion rule to add. */
#panel-itinerary.itin-choosing .itin-toolbar > .itin-create-actions,
#panel-itinerary.itin-choosing .itin-toolbar > .itin-view-toggle,
#panel-itinerary.itin-choosing .itin-toolbar > #itin-proposals-btn,
#panel-itinerary.itin-choosing #itin-more-btn,
#panel-itinerary.itin-choosing #itin-more-menu,
#panel-itinerary.itin-choosing #itin-date-strip,
#panel-itinerary.itin-choosing #ideas-col-resizer,
#panel-itinerary.itin-choosing #itin-ideas-sidebar,
#panel-itinerary.itin-choosing #stamps-trip-btn,
#panel-itinerary.itin-choosing #itin-day-map-card,
#panel-itinerary.itin-choosing .itin-layout ~ * { display: none !important; }
#panel-itinerary.itin-choosing .itin-layout { display: block; }

/* Built to the boards "Web · phone width" (row cards, the whole card is the
   button) and, from 1024px, "Web · desktop" (three standing cards with their
   own buttons). The lead card is ink-filled with a brand-green offset; the
   others carry the usual ink offset. */
.itin-chooser { display: flex; flex-direction: column; padding: var(--space-4xl) 0 var(--space-3xl); color: var(--df-ink); }
.itin-chooser-eyebrow { font-family: var(--df-sans); font-size: var(--fs-xs); line-height: 1.3; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft); }
.itin-chooser-title { font-family: var(--df-sans); font-weight: 600; font-size: var(--fs-2xl); line-height: 34px; letter-spacing: -0.5px; margin: var(--space-sm) 0; color: var(--df-ink); }
.itin-chooser-sub { margin: 0; color: var(--df-ink-soft); font-size: 16px; line-height: 24px; }
.itin-chooser-cards { display: grid; grid-template-columns: 1fr; gap: var(--space-2xl); margin-top: 24px; }
.itin-chooser-card {
  position: relative;
  display: flex; flex-direction: column; gap: var(--space-lg);
  padding: var(--space-3xl);
  background: var(--df-panel); color: var(--df-ink);
  border: 2px solid var(--df-ink); border-radius: var(--df-radius-card);
  box-shadow: var(--df-press);
}
.itin-chooser-card.is-lead { background: var(--df-ink); color: var(--df-panel); box-shadow: 4px 4px 0 var(--vn-trail-green); }
.itin-chooser-card.is-disabled { background: none; border-style: dashed; border-color: var(--df-ink-soft); box-shadow: none; color: var(--df-ink-soft); }
.itin-chooser-card:has(.itin-chooser-hit:focus-visible) { outline: 3px solid var(--vn-trail-green); outline-offset: 3px; }
.itin-chooser-card:has(.itin-chooser-hit:active) { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--df-ink); }
.itin-chooser-card.is-lead:has(.itin-chooser-hit:active) { box-shadow: 2px 2px 0 var(--vn-trail-green); }
/* The whole card is the button at phone width (stretched over it). */
.itin-chooser-hit { position: absolute; inset: 0; z-index: 1; width: 100%; padding: 0; background: none; border: 0; border-radius: inherit; cursor: pointer; }
.itin-chooser-hit:focus-visible { outline: none; }
.itin-chooser-card-head { display: flex; align-items: center; gap: var(--space-2xl); }
.itin-chooser-tile {
  flex: none; width: 48px; height: 48px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--df-ink); border-radius: 12px; color: var(--df-ink);
  font-size: var(--fs-xl);
}
.itin-chooser-card[data-card="template"] .itin-chooser-tile { background: var(--vn-sky-light); }
.itin-chooser-card[data-card="build"] .itin-chooser-tile { background: var(--df-panel); } /* #7103: neutral, not amber. */
/* Mint is the same in both themes, so the glyph on it stays Green-Black. */
.itin-chooser-card.is-lead .itin-chooser-tile { background: var(--vn-trail-green-lit); border-color: var(--vn-trail-green-lit); color: var(--df-pin-ink); font-size: var(--fs-2xl); }
.itin-chooser-card.is-disabled .itin-chooser-tile { background: none; border-style: dashed; border-color: var(--df-ink-soft); color: var(--df-ink-soft); }
.itin-chooser-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2xs); }
.itin-chooser-card-title { font-family: var(--df-display); font-size: 18px; line-height: 24px; font-weight: 800; }
.itin-chooser-card-desc { font-size: 14px; line-height: 20px; color: var(--df-ink-soft); }
.itin-chooser-card.is-lead .itin-chooser-card-desc { color: var(--df-ground); }
.itin-chooser-long { display: none; }
.itin-chooser-chev { flex: none; font-size: var(--fs-lg); }
/* Phone width: only a disabled card's own buttons show, as pills under its text. */
.itin-chooser-card-actions { display: none; }
.itin-chooser-card.is-disabled .itin-chooser-card-actions { display: flex; flex-wrap: wrap; gap: var(--space-md); padding-left: 62px; }
.itin-chooser-pill {
  min-height: var(--tap-min); padding: 0 var(--space-2xl);
  font-family: var(--df-sans); font-weight: 600; font-size: 14px;
  background: var(--df-panel); color: var(--df-ink);
  border: 2px solid var(--df-ink); border-radius: var(--radius-pill); cursor: pointer;
}
.itin-chooser-btn {
  min-height: 48px; padding: 0 var(--space-4xl);
  font-family: var(--df-sans); font-weight: 800; font-size: 16px;
  background: var(--df-ground); color: var(--df-ink);
  border: 2px solid var(--df-ink); border-radius: var(--radius-pill); cursor: pointer;
}
.itin-chooser-card.is-lead .itin-chooser-btn { background: var(--vn-trail-green-lit); border-color: var(--vn-trail-green-lit); color: var(--df-pin-ink); }
/* The lead card flips to Lamplight in dark theme, where mint is unreadable
   (1.16:1); use the light theme's teal there. */
.itin-chooser-card.is-lead .itin-chooser-link { color: light-dark(var(--vn-trail-green-lit), #10702A); }
.itin-chooser-link {
  align-self: center; min-height: var(--tap-min); padding: 0 var(--space-md);
  background: none; border: 0; cursor: pointer;
  font-family: var(--df-sans); font-size: 14px; font-weight: 600; color: var(--vn-trail-green-lit); text-decoration: underline;
}
.itin-chooser-upload {
  align-self: center; margin-top: var(--space-4xl);
  min-height: var(--tap-min); padding: 0 var(--space-md);
  display: inline-flex; align-items: center; gap: var(--space-sm);
  background: none; border: 0; cursor: pointer;
  font-family: var(--df-sans); font-size: 14px; font-weight: 600; color: var(--vn-trail-green); text-decoration: underline;
}
.itin-chooser-upload .ti { font-size: 16px; }
@media (min-width: 1024px) {
  .itin-chooser { align-items: center; max-width: 1040px; margin: 0 auto; padding: 56px 0 48px; text-align: center; }
  .itin-chooser-title { font-size: var(--fs-display-32); line-height: 46px; margin: var(--space-md) 0 0; }
  .itin-chooser-sub { margin-top: var(--space-md); font-size: 18px; line-height: 26px; }
  .itin-chooser-cards { width: 100%; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; text-align: left; }
  .itin-chooser-card { padding: 24px; gap: var(--space-2xl); box-shadow: var(--df-press-large); }
  .itin-chooser-card.is-lead { box-shadow: 5px 5px 0 var(--vn-trail-green); }
  .itin-chooser-card.is-disabled { box-shadow: none; }
  .itin-chooser-hit, .itin-chooser-chev, .itin-chooser-short { display: none; }
  .itin-chooser-long { display: inline; }
  .itin-chooser-card-head { flex-direction: column; align-items: flex-start; gap: var(--space-2xl); flex: 1; }
  .itin-chooser-tile { width: 56px; height: 56px; font-size: 28px; }
  .itin-chooser-card.is-lead .itin-chooser-tile { font-size: var(--fs-2xl); }
  .itin-chooser-card-text { gap: var(--space-2xl); flex: 1; }
  .itin-chooser-card-title { font-size: 22px; line-height: 28px; }
  .itin-chooser-card-desc { font-size: var(--fs-md); line-height: 22px; }
  /* Every card ends on the same line: the AI card's "or Surprise me" row is
     held open on the others too, as the board draws it. */
  .itin-chooser-card-actions,
  .itin-chooser-card.is-disabled .itin-chooser-card-actions { display: flex; flex-direction: column; gap: var(--space-sm); padding-left: 0; min-height: calc(48px + var(--tap-min) + var(--space-sm)); }
  .itin-chooser-card.is-disabled .itin-chooser-card-actions { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .itin-chooser-upload { margin-top: var(--space-5xl); font-size: var(--fs-md); }
  .itin-chooser-upload .ti { font-size: 18px; }
}

/* #5493 — Create Trip Q1 as the wall: the search above a wall of Discover
   trips as prints. Prints use Instant Stock, pinned in both themes, so photos
   and prints stay bright after dark; the field's focus ring is Trail Green,
   which is Mint Flash with dark text on it at night (--df-brand-fg). */
.wizard-wall-layout { display: grid; gap: var(--space-xl); align-content: start; }
.wizard-wall-head { display: grid; gap: var(--space-lg); align-content: start; position: relative; z-index: 2; }
.wizard-wall-title {
  margin: 0;
  font-family: var(--df-display);
  font-size: clamp(2rem, 9vw, 3.25rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.wizard-wall-search { position: relative; }
.wizard-wall-field {
  display: flex; align-items: center; gap: var(--space-md);
  min-height: var(--tap-min); padding: 0 var(--space-xl);
  background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub);
}
.wizard-wall-field:focus-within { outline: 3px solid var(--df-brand); outline-offset: 2px; }
.df-modal-content .wizard-wall-field input[type="text"] {
  flex: 1; min-width: 0; min-height: var(--tap-min);
  border: 0; background: transparent; box-shadow: none; outline: none; padding: 0;
  font-family: var(--df-sans); font-size: 16px; color: var(--df-ink);
  height: auto; border-radius: 0; appearance: none; }
.wizard-wall-suggestions {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 3;
  background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub);
  box-shadow: var(--df-press); overflow: hidden;
}
.wizard-wall-suggestions[hidden] { display: none; }
.wizard-wall-option {
  display: flex; align-items: center; gap: var(--space-md);
  min-height: var(--tap-min); padding: var(--space-md) var(--space-lg);
  border-top: 2px dashed var(--df-hair); cursor: pointer; color: var(--df-ink);
}
.wizard-wall-option:first-child { border-top: 0; }
.wizard-wall-option.active { background: var(--df-chip-fill-hover); }
.wizard-wall-option-text { display: grid; min-width: 0; flex: 1; }
.wizard-wall-option-text b { font-weight: 600; }
.wizard-wall-option-text small { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.wizard-wall-count { flex: none; font-size: var(--fs-xs); font-weight: 600; color: var(--df-brand); }
.wizard-wall-chips { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.wizard-wall-chips .wizard-chip { width: auto; box-shadow: none; background: transparent; border-style: dashed; border-radius: 999px; gap: var(--space-sm); }
.wizard-wall-note { margin: 0; font-size: var(--fs-sm); color: var(--df-ink-soft); }
/* AW14 — below 1024px the head dissolves into the layout grid so the order is the
   board's: title, search, prints, then the quiet chips under the prints (the wall
   was pushed below the fold by the chips). From 1024px the head is the left column. */
@media (max-width: 1023.98px) {
  .wizard-wall-head { display: contents; }
  .wizard-wall-title { order: 1; }
  .wizard-wall-search { order: 2; z-index: 2; }
  .wizard-wall { order: 3; }
  .wizard-wall-chips { order: 4; }
  .wizard-wall-note { order: 5; }
}
/* AW2 — the active row carries a return-key chip. */
.wizard-wall-key { display: none; flex: none; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1.5px solid var(--df-ink); border-radius: 6px; font-size: var(--fs-sm); color: var(--df-ink); }
.wizard-wall-option.active .wizard-wall-key { display: inline-flex; }
.wizard-wall-link { background: none; border: 0; padding: 0; min-height: var(--tap-min); font: inherit; font-weight: 600; color: var(--df-brand); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.wizard-wall { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 14px; padding: 8px 2px 24px; transition: opacity var(--dur-state) var(--df-ease); }
.wizard-wall.is-covered { opacity: 0.35; }
.wizard-print {
  position: relative; display: block; padding: 6px 6px 0; text-align: left; cursor: pointer;
  background: var(--df-instant-stock); color: var(--df-instant-stock-ink);
  border: 0; border-radius: 3px; box-shadow: 0 1px 0 var(--df-hair), 3px 4px 0 var(--df-hair);
  font: inherit;
}
.wizard-print:nth-child(4n+1) { transform: rotate(-2.4deg); }
.wizard-print:nth-child(4n+2) { transform: rotate(1.8deg); }
.wizard-print:nth-child(4n+3) { transform: rotate(-1.2deg); }
.wizard-print:nth-child(4n) { transform: rotate(3deg); }
.wizard-print:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 3px; }
.wizard-print-tape { position: absolute; top: -7px; left: 50%; width: 44px; height: 14px; background: var(--df-amber); opacity: 0.55; transform: translateX(-50%) rotate(-3deg); }
.wizard-print-photo {
  display: block; aspect-ratio: 4 / 4.4; overflow: hidden; border-radius: 1px;
  background: repeating-linear-gradient(-45deg, rgba(95, 107, 99, 0.12) 0 6px, transparent 6px 12px), var(--df-instant-stock); /* blank print stock */
}
.wizard-print-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wizard-print-cap { display: flex; flex-direction: column; gap: 2px; padding: 6px 2px 9px; }
.wizard-print-cap b { font-family: var(--df-sans); font-size: var(--fs-sm); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; color: var(--df-amber-fg); }
.wizard-print-cap span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

/* 1024px up: the search stands left of a four-wide wall, as the board draws it. */
@media (min-width: 1024px) {
  .wizard-wall-layout { grid-template-columns: 330px minmax(0, 1fr); gap: 44px; padding: 30px 92px 0; }
  .wizard-wall { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 18px; padding-top: 12px; }
  /* The search stands beside the wall here, so its list covers no print: no dim (#5721). */
  .wizard-wall.is-covered { opacity: 1; }
}

/* Issue 5494 — a print opens a panel: a bottom sheet under 1024px (the A1b sheet),
   a side panel from 1024px up. The trip card inside is pinned dark in both
   themes (photos stay bright); the primary button is Trail Green, Mint Flash
   with dark text at night (--df-brand / --df-brand-fg). */
.wizard-wall-panel[hidden] { display: none; }
.wizard-wall-panel-scrim { position: fixed; inset: 0; z-index: 20; background: rgba(23, 33, 27, 0.45); animation: wizard-panel-fade var(--dur-state) var(--df-ease) both; }
.wizard-wall-panel-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21;
  display: grid; gap: var(--space-lg); max-height: 88dvh; overflow-y: auto;
  padding: var(--space-lg) var(--space-xl) calc(var(--space-xl) + env(safe-area-inset-bottom, 0px));
  background: var(--df-panel); color: var(--df-ink);
  border-radius: 32px 32px 0 0; border-top: 2px solid var(--df-ink);
  animation: wizard-panel-rise var(--dur-view) var(--df-ease) both;
}
.wizard-wall-panel-handle { justify-self: center; width: 48px; height: 6px; border-radius: 3px; background: var(--df-ink); opacity: 0.35; }
.wizard-wall-panel-card { position: relative; overflow: hidden; border-radius: var(--df-radius-stub); background: rgb(27 37 32); color: white; border: 2px solid var(--df-ink); box-shadow: var(--df-press); }
.wizard-wall-panel-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.wizard-wall-panel-card-text { position: relative; display: grid; gap: var(--space-sm); padding: var(--space-2xl) var(--space-xl) var(--space-xl); background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.55)); }
.wizard-wall-panel-card-text small { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }
.wizard-wall-panel-card-text h3 { margin: 0; font-family: var(--df-sans); font-size: 1.875rem; font-weight: 600; line-height: 1.1; }
.wizard-wall-panel-place { justify-self: start; padding: 3px 10px; border: 2px solid rgb(255 177 153); border-radius: 4px; color: rgb(255 177 153); font-size: var(--fs-md); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.wizard-wall-panel-stats { position: relative; display: flex; gap: var(--space-2xl); padding: var(--space-lg) var(--space-xl); background: rgba(0, 0, 0, 0.45); }
.wizard-wall-panel-stats span { display: block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8; }
.wizard-wall-panel-stats b { font-size: var(--fs-md); font-weight: 600; }
.wizard-wall-panel-primary, .wizard-wall-panel-secondary {
  display: flex; align-items: center; justify-content: center; gap: var(--space-md);
  min-height: 60px; padding: 0 var(--space-xl); border: 2px solid var(--df-ink); border-radius: 999px;
  font-family: var(--df-sans); font-size: var(--fs-lg); font-weight: 600; cursor: pointer; box-shadow: var(--df-press);
}
.wizard-wall-panel-primary { background: var(--df-brand); color: var(--df-brand-fg); }
.wizard-wall-panel-secondary { background: var(--df-panel); color: var(--df-ink); }
.wizard-wall-panel-primary:focus-visible, .wizard-wall-panel-secondary:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 3px; }
.wizard-wall-panel .wizard-wall-link { justify-self: center; }
@keyframes wizard-panel-rise { from { transform: translateY(100%); } to { transform: none; } }
@keyframes wizard-panel-slide { from { transform: translateX(100%); } to { transform: none; } }
@keyframes wizard-panel-fade { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 1024px) {
  .wizard-wall-panel-scrim { background: transparent; }
  .wizard-wall-panel-sheet {
    left: auto; top: 72px; width: 380px; max-height: none;
    padding: var(--space-2xl) var(--space-xl); align-content: start;
    border-radius: 0; border-top: 0; border-left: 2px solid var(--df-ink);
    animation-name: wizard-panel-slide;
  }
  .wizard-wall-panel-handle { display: none; }
}

/* #5495 — the photo split. From the first pick on, the first stop's photo fills
   the left of the wizard (the top of it below 1024px) with every stop stamped on
   it. Photos and prints stay bright in both themes, so the band and its stamps
   use pinned colours, not theme tokens. #5723: the picked photo flies in from the wall (js/wizard-wall.js, Web Animations; the CSS below is only the flight layer). */
.wizard-band {
  position: relative; z-index: 1; overflow: hidden;
  height: 150px; margin: -2rem -2rem var(--space-lg);
  background: var(--df-pin-night-panel); color: var(--df-pin-lamplight);
  border-bottom: 2px solid var(--df-ink);
}
.wizard-band.is-tall { height: 230px; }
/* #5723 - the flight: a temporary layer holding the clone; the real band's photo waits under it. */
.wizard-flight-layer { position: fixed; inset: 0; z-index: 10000; pointer-events: none; }
.wizard-flier { position: fixed; overflow: hidden; background: var(--df-pin-stock-shade); }
.wizard-flier img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wizard-band.is-flying .wizard-band-photo { visibility: hidden; }
/* #5724 - the fold: the flier carries the card's scrim so it lands looking like the card; the card ghost on Back leaves its own photo to the flier. */
.wizard-flier-shade { position: absolute; inset: 0; background: rgba(16, 26, 20, 0.64); opacity: 0; }
.wizard-flight-layer .home-trip-card.is-folding::before { opacity: 0; }
.wizard-wall-panel-card.is-pressed { transform: scale(0.98); }
.wizard-band-photo { position: absolute; inset: 0; }
.wizard-band-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wizard-band:not(.is-blank)::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(12, 20, 16, 0.5), rgba(12, 20, 16, 0.12) 40%, rgba(12, 20, 16, 0.72)); }
.wizard-band.is-blank { background: repeating-linear-gradient(-45deg, rgba(95, 107, 99, 0.14) 0 8px, transparent 8px 16px), var(--df-pin-stock-shade); color: var(--df-pin-ink); }
.wizard-band-brand { position: absolute; z-index: 2; top: var(--space-lg); left: var(--space-xl); font-family: var(--df-display); font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.02em; }
.wizard-band-over {
  position: absolute; z-index: 2; left: var(--space-xl); right: var(--space-xl); bottom: var(--space-lg);
  display: grid; gap: var(--space-sm); justify-items: start; padding: 0; text-align: left;
  background: none; border: 0; color: inherit; font: inherit; cursor: pointer;
}
.wizard-band-over:focus-visible { outline: 3px solid var(--df-pin-lamplight); outline-offset: 4px; }
.wizard-band.is-blank .wizard-band-over:focus-visible { outline-color: var(--df-pin-ink); }
.wizard-band-eyebrow { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.wizard-band-legs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.wizard-stamp {
  display: inline-block; padding: 1px 8px 2px; border: 3px solid currentColor; border-radius: 5px;
  box-shadow: inset 0 0 0 1px currentColor; transform: rotate(-1.4deg);
  font-family: var(--df-display); font-size: var(--fs-lg); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; text-transform: uppercase;
  background: rgba(12, 20, 16, 0.35);
}
.wizard-stamp.is-first { color: #ffb08f; font-size: var(--fs-2xl); transform: rotate(-2.6deg); }
.wizard-stamp:nth-child(3) { transform: rotate(1.8deg); }
.wizard-stamp.is-more { border-style: dashed; box-shadow: none; font-size: var(--fs-sm); background: none; }
.wizard-stamp-plus { font-family: var(--df-display); font-size: var(--fs-lg); font-weight: 800; }
.wizard-band.is-blank .wizard-stamp { background: none; }
.wizard-band.is-blank .wizard-stamp.is-first { color: #993c1d; }

/* The stops, numbered with amber route pins (the list under "Anywhere else?" and the stamps' sheet). */
.wizard-stop-list { display: grid; background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: 12px; overflow: hidden; }
.wizard-stop-row { display: flex; align-items: center; gap: var(--space-md); min-height: 56px; padding: var(--space-sm) var(--space-lg); }
.wizard-stop-row + .wizard-stop-row { border-top: 2px dashed var(--df-hair); }
.wizard-stop-pin { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--df-ink); border-radius: 50%; background: var(--df-amber); color: var(--df-amber-fg); font-family: var(--df-sans); font-size: var(--fs-sm); font-weight: 600; }
.wizard-stop-text { display: grid; flex: 1; min-width: 0; }
.wizard-stop-text b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wizard-stop-text small { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.wizard-stop-remove { min-width: var(--tap-min); min-height: var(--tap-min); padding: 0 var(--space-sm); background: none; border: 0; font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--df-brand); cursor: pointer; }
.wizard-stop-remove:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 2px; }

/* More places: same-country cities first, then "Somewhere else". */
.wizard-more { display: grid; gap: var(--space-md); margin: var(--space-lg) 0; }
.wizard-more-label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft); }
.wizard-more-prints { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: var(--space-md); }
.wizard-more-print {
  display: block; min-height: var(--tap-min); padding: 5px 5px 0; text-align: left; cursor: pointer; font: inherit;
  background: var(--df-instant-stock); color: var(--df-instant-stock-ink); border: 0; border-radius: 3px;
  box-shadow: 0 1px 0 var(--df-hair), 3px 4px 0 var(--df-hair);
}
.wizard-more-print:nth-child(odd) { transform: rotate(-1.4deg); }
.wizard-more-print:nth-child(even) { transform: rotate(1.2deg); }
.wizard-more-print:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 3px; }
.wizard-more-print .wizard-print-photo { aspect-ratio: 1; }
.wizard-more-search { display: grid; place-items: center; font-size: var(--fs-xl); }
.wizard-more-cap { display: block; padding: 5px 1px 7px; font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 600; color: var(--df-amber-fg); }

/* Phones and tablets (#5497): the actions are one footer pinned to the bottom of
   the wizard, whatever the question's height, and stay put while a tall question
   scrolls. Back is the quiet one, Continue the solid brand pill, and "Create trip
   now" an underlined link beneath. From 1024px the footer is transparent
   (display: contents) and the nav/escape hatch lay out as they always did. */
.wizard-footer { display: contents; }
@media (max-width: 1023px) {
  #createTripModal .modal-content { display: flex; flex-direction: column; }
  #createTripModal .modal-content .wizard-footer {
    display: grid; gap: var(--space-xs); margin: auto calc(-1 * 2rem) calc(-1 * 2rem);
    padding: var(--space-md) 2rem var(--space-lg); position: sticky; bottom: calc(-1 * 2rem); z-index: 3;
    background: var(--df-panel); border-top: 2px solid var(--df-ink);
  }
  #createTripModal .wizard-footer .wizard-nav { margin: 0; align-items: center; }
  #createTripModal .wizard-footer .wizard-nav button { min-height: var(--tap-min); font-size: var(--fs-sm); font-weight: 600; justify-content: center; text-align: center; }
  #createTripModal .wizard-footer #wizard-back-btn { flex: none; padding-inline: var(--space-xl); }
  #createTripModal .wizard-footer #wizard-next-btn { background: var(--df-brand); color: var(--df-brand-fg); border: 2px solid var(--df-ink); box-shadow: var(--df-press); }
  #createTripModal .wizard-footer .wizard-escape-hatch { margin: 0; }
  #createTripModal .wizard-footer .wizard-create-now { border: 0; background: none; color: var(--df-brand); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
  #createTripModal .wizard-footer #create-trip-btn { width: 100%; min-height: var(--tap-min); }
}
/* #6581 — the band and the pinned footer bleed to the page edge by the modal's
   padding, which drops to 1.5rem at 480px and below (.modal-content, Responsive);
   a 2rem bleed there scrolled the page sideways by 8px. */
@media (max-width: 480px) {
  #createTripModal .wizard-band { margin-inline: -1.5rem; }
  #createTripModal .modal-content .wizard-footer {
    margin-inline: -1.5rem; margin-bottom: -1.5rem; bottom: -1.5rem; padding-inline: 1.5rem;
  }
}

/* Phone back arrow (#5649, A4/A5/A7): Back is a round icon-only button at the top left,
   over the photo band when there is one, not a footer button. The footer keeps Continue /
   Create trip / "Create trip now". The dots sit to its right, the close button at the far right. */
@media (max-width: 1023px) {
  #createTripModal .wizard-footer #wizard-back-btn {
    position: fixed; top: calc(var(--topbar-h) + var(--space-lg)); left: var(--space-lg); z-index: 6;
    width: var(--tap-min); height: var(--tap-min); min-height: var(--tap-min); padding: 0;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
    background: var(--df-panel); border: 2px solid var(--df-ink); color: var(--df-ink);
  }
  #createTripModal .modal-content.has-band .wizard-footer #wizard-back-btn {
    background: rgba(12, 20, 16, 0.45); border-color: var(--df-brand-fg); color: var(--df-brand-fg);
  }
  #createTripModal .wizard-footer .wizard-back-icon { display: inline-block; font-size: var(--fs-lg); }
  #createTripModal .wizard-footer .wizard-back-text {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  #createTripModal .modal-content .wizard-progress-bar { margin-left: calc(var(--tap-min) + var(--space-sm)); min-height: var(--tap-min); }
  #createTripModal .modal-content .wizard-progress-segments { margin-left: auto; }
  #createTripModal .wizard-progress-label { display: none; }
  #createTripModal .wizard-band-brand { display: none; } /* A4/A5 draw no wordmark on phones; the arrow owns that corner */
}

/* Phone shell (#5695, A4/A5/A6): Back is a chevron, not the desktop footer's arrow, and on
   a step with a photo band the progress dots sit at the band's top right in cream. */
.wizard-back-chevron { display: none; }
@media (max-width: 1023px) {
  #createTripModal .wizard-footer .wizard-back-icon { display: none; }
  #createTripModal .wizard-footer .wizard-back-chevron { display: inline-block; font-size: var(--fs-lg); }
  #createTripModal .modal-content.has-band .wizard-progress-bar {
    position: fixed; top: calc(var(--topbar-h) + var(--space-lg)); right: var(--space-lg); left: auto; z-index: 6;
    margin: 0; justify-content: flex-end;
  }
  #createTripModal .modal-content.has-band .wizard-progress-segments { margin-left: 0; }
  /* #6581 — the last dot sits --space-lg from the edge, so its centred 44px tap area
     reached 7px past it and scrolled the wizard sideways; anchor that one to the edge. */
  #createTripModal .modal-content.has-band .wizard-progress-segment:last-child::before {
    left: auto; right: calc(-1 * var(--space-lg)); transform: translateY(-50%);
  }
  #createTripModal .modal-content.has-band .wizard-progress-segment-track { border-color: var(--df-pin-lamplight); }
  #createTripModal .modal-content.has-band .wizard-progress-segment-fill,
  #createTripModal .modal-content.has-band .wizard-progress-segment.active .wizard-progress-segment-fill { background: var(--df-pin-lamplight); }
}

/* Recap footer on desktop (#5540): one row under a rule — a round icon-only Back,
   the change-it hint, and the Create pill. The hint and the icon exist only here;
   phones keep the pinned stacked footer above. */
.wizard-footer-hint, .wizard-back-icon { display: none; }
@media (min-width: 1024px) {
  #createTripModal .wizard-footer.is-recap {
    display: flex; align-items: center; gap: var(--space-lg);
    margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 2px solid var(--df-ink);
  }
  #createTripModal .wizard-footer.is-recap .wizard-nav { margin: 0; flex: none; }
  #createTripModal .wizard-footer.is-recap #wizard-back-btn {
    flex: none; width: var(--tap-min); height: var(--tap-min); min-height: var(--tap-min); padding: 0;
    border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  }
  #createTripModal .wizard-footer.is-recap .wizard-back-icon { display: inline-block; font-size: var(--fs-lg); }
  #createTripModal .wizard-footer.is-recap .wizard-back-text {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  #createTripModal .wizard-footer.is-recap .wizard-footer-hint {
    display: block; flex: 1; margin: 0; font-size: var(--fs-sm); color: var(--df-ink-soft);
  }
  #createTripModal .wizard-footer.is-recap #create-trip-btn {
    flex: none; width: auto; min-height: 64px; padding-inline: 2.75rem; font-size: var(--fs-lg); font-weight: 600; border-radius: 999px;
    background: var(--df-brand); color: var(--df-brand-fg); border: 2px solid var(--df-ink); box-shadow: var(--df-press);
  }
}

/* Type scale on desktop (#5573, AW1/AW7/AW8): the question is the board's ~40px
   Fraunces headline and the hint/sub-line under it reads at body size. */
@media (min-width: 1024px) {
  #createTripModal .wizard-question { font-size: 2.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 2.25rem; }
  #createTripModal .modal-content.is-dates .wizard-question { margin-bottom: 1rem; }
  /* Photo-less screens (recap, AW10): a ~1044px column centred under the bar. */
  #createTripModal .modal-content:not(.has-band) > :not(.wizard-topbar) { width: 100%; max-width: 1044px; margin-inline: auto; }
  #createTripModal .form-hint { margin-top: var(--space-xl); font-size: var(--fs-md); line-height: 1.5; max-width: 34rem; color: var(--df-ink-soft); }
}

/* Every question's footer on desktop (#5573, AW1/AW7): pinned to the bottom of the
   wizard under a rule — a round icon-only Back, "Create trip now" as a green
   underlined link, and Continue (typed-input screens only) as the solid pill with
   the offset shadow. The recap's own row above is more specific and wins. */
@media (min-width: 1024px) {
  #createTripModal .modal-content { display: flex; flex-direction: column; }
  #createTripModal .modal-content .wizard-footer {
    display: flex; align-items: center; gap: var(--space-lg);
    margin-top: auto; padding-top: 1rem; border-top: 2px solid var(--df-ink);
    position: sticky; bottom: 0; background: var(--df-ground);
  }
  #createTripModal .modal-content .wizard-footer.is-recap { padding-top: 0.5rem; }
  #createTripModal .wizard-footer .wizard-nav { display: contents; }
  #createTripModal .wizard-footer #wizard-back-btn {
    order: 0; flex: none; width: var(--tap-min); height: var(--tap-min); min-height: var(--tap-min); padding: 0;
    border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 2px solid var(--df-ink); color: var(--df-ink);
  }
  #createTripModal .wizard-footer .wizard-back-icon { display: inline-block; font-size: var(--fs-lg); }
  #createTripModal .wizard-footer .wizard-back-text {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  #createTripModal .wizard-footer .wizard-escape-hatch { order: 1; flex: 1; margin: 0; text-align: left; }
  #createTripModal .wizard-footer .wizard-create-now {
    border: 0; background: none; padding-inline: 0; font-size: var(--fs-sm); font-weight: 600;
    color: var(--df-brand); text-decoration: underline; text-underline-offset: 3px;
  }
  #createTripModal .wizard-footer #wizard-next-btn {
    order: 2; flex: none; min-height: 56px; padding-inline: var(--space-3xl, 2.5rem); border-radius: 999px;
    font-size: var(--fs-lg); font-weight: 600; background: var(--df-brand); color: var(--df-brand-fg);
    border: 2px solid var(--df-ink); box-shadow: var(--df-press);
  }
}

/* 1024px up: the photo is the left column, the question stays on the right. */
@media (min-width: 1024px) {
  /* #5573: the question is a ~640px column 62px off the photo (AW7), not the whole pane. */
  /* #5726: the band and the column grow with the screen from one pair of tokens, so the padding can't drift from the band. */
  #createTripModal .modal-content { --wz-band-w: clamp(430px, 38vw, 760px); --wz-col-w: clamp(640px, 45vw, 860px); }
  #createTripModal .modal-content.has-band { padding-left: calc(var(--wz-band-w) + 62px); padding-right: max(62px, calc(100vw - var(--wz-band-w) - 62px - var(--wz-col-w))); }
  #createTripModal .modal-content .wizard-progress-bar { margin-bottom: 3.25rem; }
  #createTripModal .modal-content:not(.has-band) .wizard-progress-bar { margin-top: 3rem; margin-bottom: 1.75rem; }
  .has-band > .wizard-band { position: fixed; top: var(--topbar-h); bottom: 0; left: 0; width: clamp(430px, 38vw, 760px); height: auto; margin: 0; border-bottom: 0; border-right: 2px solid var(--df-ink); }
  .wizard-band-brand { top: var(--space-2xl); left: var(--space-2xl); }
  .wizard-band-over { left: var(--space-2xl); right: var(--space-2xl); bottom: 34px; }
  .wizard-stamp { font-size: var(--fs-xl); }
  .wizard-stamp.is-first { font-size: 2.625rem; }
  .wizard-stamp.is-more { font-size: var(--fs-md); }
  .wizard-band-eyebrow { font-size: var(--fs-xs); }
}

/* #5726 - desktop steps with a photo band use the screen: question + footer centre vertically as one group
   (flexible spacers either side; they collapse to 0 when a step is taller than the pane, which then scrolls
   with the sticky footer as before), and type/spacing scale with the viewport. Recap (no band) is untouched. */
@media (min-width: 1024px) {
  #createTripModal .modal-content.has-band::before,
  #createTripModal .modal-content.has-band::after { content: ""; flex: 1 1 0; min-height: 0; }
  #createTripModal .modal-content.has-band .wizard-footer { margin-top: clamp(1.5rem, 4vh, 3.5rem); }
  #createTripModal .modal-content.has-band .wizard-progress-bar { margin-bottom: clamp(2rem, 5vh, 4rem); }
  #createTripModal .modal-content.has-band:not(.is-dates) .wizard-question { margin-bottom: clamp(2.25rem, 4.5vh, 3.75rem); }
  #createTripModal .modal-content.has-band .wizard-question { font-size: clamp(2.5rem, 2.2vw + 1rem, 3.25rem); }
  #createTripModal .modal-content.has-band .wizard-chip { font-size: clamp(var(--fs-sm), 0.45vw + 0.55rem, var(--fs-lg)); }
  #createTripModal .modal-content.has-band .wizard-tag { min-height: clamp(130px, 15vh, 190px); }
  #createTripModal .modal-content.has-band .wizard-cal-cell { font-size: clamp(var(--fs-sm), 0.4vw + 0.6rem, var(--fs-lg)); }
}

@media (prefers-reduced-motion: reduce) {
  /* #5723 - no flight: the swap is instant and the band's own photo is simply there. */
  .wizard-flight-layer { display: none; }
  /* #5757 - pages 3-5 entrances (column rise, tag drop, slider fill, dot step) are all JS-gated
     on prefersReducedMotion(); nothing starts hidden, so the finished state is the static one. */
  .wizard-band.is-flying .wizard-band-photo { visibility: visible; }
  /* Issue 5494 — the panel is simply there: its animations resolve to the finished state. */
  .wizard-wall-panel-scrim, .wizard-wall-panel-sheet { animation: none; }
  /* #5493 — the wall's cover fade resolves to its finished state at once. */
  .wizard-wall { transition: none; }
  .trip-header, .trip-header * { transition: none; animation: none; }
  /* #5386 range calendar: the fill resolves straight to its finished state. */
  .wizard-cal-cell { transition: none; }
  /* #5722 hover/press feedback resolves to its finished state with no transition (above). */
  .wizard-past-card, .wizard-cal-picker { animation: none; }
  /* #5497 — tags and the slider fill land on their finished state at once. */
  .wizard-tag, .wizard-slider input[type=range]::-webkit-slider-thumb { transition: none; }
}

/* Issue #4664 — an empty future day collapsed to one line. The stops
   container stays inside it so the row is still a drop target. */
.day-box-collapsed {
  padding: 0;
  /* #6567 — folded day rows below the fold skip layout and paint. */
  content-visibility: auto;
  contain-intrinsic-size: auto 52px;
}

.day-collapsed-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: 100%;
  min-height: var(--tap-min);
  padding: 0 var(--space-2xl);
  background: none;
  border: 0;
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--df-ink-soft);
  text-align: left;
  cursor: pointer;
}
/* #7187 — the first frame after a tap: the row reads as opening before the day is
   built (itinOpenDay() defers the build past this paint). A state, not a motion. */
.day-collapsed-row.is-opening { color: var(--df-ink); }
.day-collapsed-row.is-opening .ti-chevron-down { transform: rotate(180deg); }

/* #5013 - gap under the Preview button (its 4px hard shadow painted over the first heading), and amounts that never split from their currency. */
#mergePreviewResult { margin-top: var(--space-md); }
.merge-amount { white-space: nowrap; }

/* #5490 — the Create Trip wizard is a full-screen page at /new, not a dialog. */
#createTripModal.modal { padding: 0; align-items: stretch; justify-content: stretch; }
#createTripModal .modal-content {
  width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none;
  border-radius: 0; border-inline: 0; box-shadow: none; margin: 0;
}

/* #5544 — the Create Trip shell follows AW10/AW5: dotted apricot ground, dot progress,
   and (recap and other photo-less screens, desktop) a green "New trip" bar. Scoped to
   #createTripModal because the itinerary wizard shares the .wizard-progress-* classes. */
#createTripModal .modal-content {
  position: relative; overflow-y: auto;
}
/* #5693 — the bar is the shared .home-topbar (height, padding, lockup and title tier come from it), fixed
   to the top of the full-screen page at every width and on every step; the content clears it. */
#createTripModal .wizard-topbar { position: fixed; top: 0; left: 0; right: 0; }
#createTripModal .wizard-topbar-close {
  flex-shrink: 0; width: var(--tap-min); height: var(--tap-min); padding: 0; display: inline-flex; align-items: center; justify-content: center;
  background: var(--df-pin-apricot); border: 2px solid var(--df-pin-keyline); border-radius: 50%; color: var(--df-pin-deep-green); font-size: var(--fs-xl); cursor: pointer;
  box-shadow: 2px 2px 0 rgba(6, 40, 17, 0.45);
  transition: transform var(--dur-feedback) var(--ease-out), box-shadow var(--dur-feedback) var(--ease-out);
}
#createTripModal .wizard-topbar-close:hover { transform: translate(2px, 2px); box-shadow: 0 0 0 rgba(6, 40, 17, 0.45); }
#createTripModal .wizard-topbar-close:focus-visible { outline: 3px solid var(--df-pin-apricot); outline-offset: 3px; }
#createTripModal .modal-content, #createTripModal .modal-content:not(.has-band) { padding-top: calc(var(--topbar-h) + var(--space-lg)); }
#createTripModal .wizard-band-brand { display: none; } /* the bar carries the lockup */
/* #5931 — the band starts at the pass's lower edge, not under it, and keeps its height: in the phone's column it shrank to its 2px
   border, which lifted the first question up under the pass. */
#createTripModal .wizard-band { flex-shrink: 0; margin-top: calc(-1 * var(--space-lg) - 2px); }
#createTripModal .wizard-progress-bar { margin: 0 var(--tap-min) var(--space-lg) 0; }
#createTripModal .wizard-progress-segments { gap: 7px; align-items: center; margin: 0 0 0; justify-content: flex-start; }
#createTripModal .wizard-progress-segment { flex: none; width: 10px; height: 10px; }
#createTripModal .wizard-progress-segment.active { width: 30px; }
#createTripModal .wizard-progress-segment::before { width: max(var(--tap-min), 100%); left: 50%; right: auto; transform: translate(-50%, -50%); }
#createTripModal .wizard-progress-segment-track { height: 10px; border-radius: 999px; background: transparent; border: 2px solid var(--df-ink); box-sizing: border-box; }
#createTripModal .wizard-progress-segment-fill { background: var(--df-ink); }
#createTripModal .wizard-progress-segment.active .wizard-progress-segment-fill { background: var(--df-ink); transform: none; }
#createTripModal .wizard-progress-bar { display: flex; align-items: center; gap: var(--space-md); }
#createTripModal .wizard-progress-label { margin: 0; font-size: var(--fs-xs); letter-spacing: 0.1em; }

/* Issue 5500 — the unfinished Create Trip wizard, waiting on My Trips as a dashed
   draft card. Same stub as a trip card, but dashed and without the press
   shadow so it reads as "not a trip yet". No motion of its own. */
.home-trip-card-draft {
  border-style: dashed;
  box-shadow: none;
}
.home-trip-card-draft:hover,
.home-trip-card-draft:active,
.home-trip-card-draft:has(.home-trip-card-open:active) {
  transform: none;
  box-shadow: none;
}
.home-draft-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--error-text);
  cursor: pointer;
}
.home-draft-dates { display: grid; gap: 2px; text-align: left; }
.home-draft-delete:focus-visible {
  outline: 2px solid var(--df-ink);
  outline-offset: 2px;
}

/* #5497 — Create Trip Who: four luggage tags on amber string. A tag is a plain
   button; the selected one is the brand fill (Mint Flash with dark text at night
   through --df-brand / --df-brand-fg). Resting tilt is static; only the press moves. */
.wizard-tags { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg) var(--space-md); padding: 18px 2px var(--space-sm); }
.wizard-tag {
  position: relative; display: grid; align-content: start; justify-items: start; gap: var(--space-sm);
  min-height: 104px; padding: 26px var(--space-md) var(--space-md); font: inherit; text-align: left; cursor: pointer;
  color: var(--df-ink); background: var(--df-panel); border: 2px solid var(--df-ink);
  border-radius: 6px 6px 14px 14px; box-shadow: var(--df-press);
  transition: transform var(--dur-feedback) var(--df-ease), box-shadow var(--dur-feedback) var(--df-ease), background var(--dur-feedback) var(--df-ease);
}
.wizard-tag:nth-child(odd) { transform: rotate(-2deg); }
.wizard-tag:nth-child(even) { transform: rotate(1.6deg); }
.wizard-tag::before { content: ""; position: absolute; top: 8px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; border: 2px solid var(--df-ink); background: var(--ground, var(--surface-1)); }
.wizard-tag::after { content: ""; position: absolute; top: -14px; left: 50%; width: 2px; height: 22px; background: var(--df-amber); }
.wizard-tag:hover { box-shadow: var(--df-press-hover); }
.wizard-tag:active { box-shadow: var(--df-press-active); transform: translate(3px, 3px); }
.wizard-tag:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 3px; }
.wizard-tag.selected { background: var(--selected-bg); color: var(--on-selected); }
.wizard-tag b { font: 600 1.0625rem/1.15 var(--df-sans); letter-spacing: -0.02em; }
.wizard-tag kbd { position: absolute; right: var(--space-sm); bottom: var(--space-xs); font: 600 0.6875rem/1 var(--df-sans); opacity: 0.6; }
.wizard-tag-faces { display: flex; }
.wizard-tag-faces i { width: 20px; height: 20px; margin-right: -6px; border-radius: 50%; border: 2px solid currentColor; background: var(--df-amber); }
.wizard-tag-faces i:nth-child(2) { background: var(--df-coral); }
.wizard-tag-faces i:nth-child(3) { background: var(--df-brand); }
.wizard-tag-faces i:nth-child(4) { background: var(--df-panel); }
@media (max-width: 680px) { .wizard-tags { grid-template-columns: 1fr 1fr; } }
@media (pointer: coarse) { .wizard-tag kbd { display: none; } }

/* #5497 — Budget: the figure, then a slider with three named detents. */
.wizard-budget-figure { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-sm); margin: var(--space-md) 0 var(--space-xs); }
.wizard-budget-amount { font: 800 2rem/1 var(--df-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--df-ink); }
.wizard-budget-per { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.wizard-slider { position: relative; padding: 0 14px; margin: 0 0 var(--space-lg); }
.wizard-slider input[type=range] {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: var(--tap-min); margin: 0; padding: 0;
  background: none !important; border: 0 !important; border-radius: 0; box-shadow: none !important; cursor: pointer; font-size: 16px;
}
.wizard-slider input[type=range]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 9px; border: 2px solid var(--df-ink);
  background: linear-gradient(to right, var(--df-brand) var(--wizard-slider-fill, 50%), var(--df-panel) var(--wizard-slider-fill, 50%));
}
.wizard-slider input[type=range]::-moz-range-track { height: 8px; border-radius: 9px; border: 2px solid var(--df-ink); background: var(--df-panel); }
.wizard-slider input[type=range]::-moz-range-progress { height: 8px; border-radius: 9px; background: var(--df-brand); }
.wizard-slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 28px; height: 28px; margin-top: -12px; border-radius: 50%;
  background: var(--df-panel); border: 2px solid var(--df-ink); box-shadow: 2px 2px 0 var(--df-ink);
}
.wizard-slider input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--df-panel); border: 2px solid var(--df-ink); box-shadow: 2px 2px 0 var(--df-ink); }
.wizard-slider input[type=range]:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 4px; border-radius: 9px; }
.wizard-slider-detents { position: relative; height: 1.25rem; }
.wizard-slider-detents span { position: absolute; transform: translateX(-50%); font: 700 0.625rem/1.2 var(--df-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--df-ink-soft); white-space: nowrap; }
.wizard-slider-detents span:first-child { transform: translateX(-30%); }
.wizard-slider-detents span:last-child { transform: translateX(-70%); }

/* ── Create Trip wizard recap: the real My Trips card (#5498) ─────────────
   The card is _homeTripCardHtml()'s own markup, so photo, scrim, title face
   and stamp come from the .home-trip-card rules above; only what is specific
   to the recap lives here. Photos and the lamplight text stay bright in dark
   (they sit on a scrim, not on the theme surface). */
.wizard-recap-layout { display: grid; gap: var(--space-xl); align-items: start; }
@media (min-width: 1024px) {
  .wizard-recap-layout { grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); }
}
.wizard-recap-card .home-trip-card { margin-bottom: 0; cursor: default; }
.wizard-recap-card .home-trip-card:hover,
.wizard-recap-card .home-trip-card:active { transform: none; box-shadow: var(--df-press); }
/* #5541 — board AW10: the recap card is a dark band with lamplight type, photo
   or not (the photo only ever adds a scrim over this fill), and its title,
   stamp and field values run the big tier. Recap mode only: the Home card keeps
   its own sizes. Fixed hexes, not --df-ink, which flips to lamplight in dark. */
.home-trip-card-recap { background: var(--df-pin-ink); color: var(--df-pin-lamplight); }
.home-trip-card-recap .home-trip-card-open,
.home-trip-card-recap .home-hero-kicker,
.home-trip-card-recap .home-trip-name { color: var(--df-pin-lamplight); }
.home-trip-card-recap .home-trip-name { font-family: var(--df-title); font-weight: 700; font-size: var(--fs-display-32); line-height: 1.1; white-space: normal; overflow: visible; }
.home-trip-card-recap .home-trip-stamp-place { color: #ff9b7a; font-size: var(--fs-2xl); font-weight: 800; padding: var(--space-xs) var(--space-md); border-width: 3px; transform: rotate(-3deg); }
.home-trip-card-recap .home-trip-field-label { font-size: var(--fs-xs); }
.home-trip-card-recap .home-trip-field-value { font-size: var(--fs-md); }
.home-trip-card-static { display: flex; flex-direction: column; gap: var(--space-md); padding: var(--space-xl); }
.home-trip-stamp-place { color: var(--df-coral); transform: rotate(-2deg); font-size: var(--fs-md); padding: var(--space-xs) var(--space-md); }
.home-trip-fields { display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-xl); margin-top: var(--space-md); }
.home-trip-field {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: var(--tap-min); min-width: var(--tap-min);
  padding: var(--space-xs) 0; background: none; border: 0; color: inherit;
  font: inherit; text-align: left; cursor: pointer;
}
.home-trip-field-label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.85; }
/* #6967 - the value reads as an editable field on its own (dotted underline), so no
   "click the dates, people or budget" sentence is needed; hover/focus solidify it. */
.home-trip-field-value { font-size: var(--fs-sm); font-weight: 600; text-decoration: underline dotted; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.home-trip-field:hover .home-trip-field-value,
.home-trip-field:focus-visible .home-trip-field-value { text-decoration-style: solid; }
.home-trip-field:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: var(--df-radius-chip, 4px); }
/* #5573 — AW10 desktop sizes: the card is a ~300px band with its fields pinned to
   the foot, a bigger stamp, and the "Call it" chips are 17px pills. */
@media (min-width: 1024px) {
  /* #5636 — the board's card is a compact ~720px block with the Call it column close beside it, not stretched to the content width. */
  .wizard-recap-layout { grid-template-columns: minmax(0, 720px) minmax(260px, 300px); justify-content: start; gap: 2.5rem; }
  .home-trip-card-recap .home-trip-card-static { min-height: 300px; box-sizing: border-box; padding: 1.75rem 1.75rem 1.5rem; }
  .home-trip-card-recap .home-trip-fields { margin-top: auto; }
  .home-trip-card-recap .home-trip-name { font-size: 2.5rem; }
  .home-trip-card-recap .home-trip-stamp-place { font-size: var(--fs-2xl); line-height: 1; padding: var(--space-sm) calc(var(--space-lg) + 1.5px); }
  .home-trip-card-recap .home-trip-field-label { font-size: var(--fs-xs); }
  .home-trip-card-recap .home-trip-field-value { font-size: var(--fs-md); }
  .wizard-recap-chips .wizard-chip { min-height: 52px; padding: var(--sp-sm) 1.25rem; font-size: var(--fs-md); }
  #createTripModal .wizard-recap-names-label { font-size: var(--fs-xs); margin-bottom: var(--space-lg); }
  #createTripModal .wizard-recap-hint { font-size: var(--fs-md); line-height: 1.5; }
}
.wizard-recap-names-label { margin: 0 0 var(--space-sm); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft); }
/* #5542 — AW10: "Call it" chips are content-width pills with the ink press shadow; selected is solid green + white check; "My own" is dashed. */
.wizard-chip-grid.wizard-recap-chips { align-items: flex-start; }
.wizard-recap-chips .wizard-chip { width: auto; border-radius: 999px; padding: var(--space-md) var(--space-xl); }
.wizard-recap-chips .wizard-chip.selected { background: var(--selected-bg); border-color: var(--df-ink); color: var(--on-selected); font-weight: 600; }
/* #7312 — the dashed "My own" chip (AW10/A7) reveals #tripName, which sits under the chips. */
.wizard-recap-chips .wizard-chip.wizard-chip-own { border-style: dashed; box-shadow: none; background: transparent; }
.wizard-recap-chips .wizard-chip.wizard-chip-own.selected { background: var(--selected-bg); }
.wizard-recap-names #tripName { margin-top: var(--sp-lg); }
.wizard-recap-hint { margin: var(--space-md) 0 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }
/* #5698 — A7 shows the tap hint on phones; AW10 keeps "title changes" (the click hint is the desktop footer's). */
.wizard-recap-hint-phone { display: none; }
@media (max-width: 1023px) {
  .wizard-recap-hint-desk { display: none; }
  .wizard-recap-hint-phone { display: inline; }
}
/* #5697 — board A7 on phones: a 24px headline, a ~280px card with its fields at the foot,
   the "Call it" chips two to a row (wrapping, 52px pills), a 16px hint, and a taller Create
   pill with an 18px label. Phones only; from 1024px the AW10 rules above own the screen. */
@media (max-width: 1023px) {
  .wizard-question:has(+ .wizard-recap-layout) { font-size: var(--fs-xl); font-weight: 800; line-height: 1.1; margin-bottom: var(--space-xl); }
  .home-trip-card-recap .home-trip-card-static { min-height: 278px; box-sizing: border-box; padding: 1.25rem 1.3125rem 1.125rem; }
  .home-trip-card-recap .home-trip-fields { margin-top: auto; }
  .wizard-chip-grid.wizard-recap-chips { flex-direction: row; flex-wrap: wrap; gap: var(--space-xl); }
  .wizard-recap-chips .wizard-chip { min-height: 52px; padding: var(--sp-sm) 1.25rem; font-size: var(--fs-md); font-weight: 600; }
  .wizard-recap-names-label { margin-top: var(--space-xl); }
  .wizard-recap-hint { font-size: var(--fs-md); line-height: 1.4; }
  #createTripModal .wizard-footer.is-recap #create-trip-btn {
    min-height: 56px; font-size: var(--fs-lg); font-weight: 600; border-radius: 999px;
    background: var(--df-brand); color: var(--df-brand-fg); border: 2px solid var(--df-ink); box-shadow: var(--df-press);
  }
}
/* #5699 — phone text sizes per boards A1/A4/A5/A6: the question is a 24px Fraunces headline
   (the recap's #5697 size), chips and body read at 16-18px, the When month header is left
   with both arrows on the right, and the footer labels are 18px / 16px. Phones and touch
   tablets only (<1024px); the AW rules own wider screens. */
@media (max-width: 1023px) {
  #createTripModal .wizard-question { font-size: var(--fs-xl); line-height: 1.1; margin-bottom: var(--space-xl); }
  #createTripModal .wizard-chip { font-size: var(--fs-md); }
  #createTripModal .wizard-question.wizard-wall-title { font-size: 2.125rem; line-height: 0.95; margin-bottom: 0; }
  #createTripModal .wizard-wall-field { min-height: 56px; gap: var(--space-lg); }
  #createTripModal .wizard-wall-field .ti-search { font-size: var(--fs-lg); }
  .df-modal-content #createTripModal .wizard-wall-field input[type="text"], #createTripModal .wizard-wall-field input[type="text"] { font-size: var(--fs-lg); }
  #createTripModal .wizard-wall-chips .wizard-chip { min-height: 52px; font-weight: 600; }
  #createTripModal .wizard-wall-note { font-size: var(--fs-sm); line-height: 1.5; }
  #createTripModal .wizard-dates-undecided .wizard-chip { font-size: var(--fs-md); padding: var(--space-md) var(--space-xl); }
  #createTripModal .wizard-cal-head .wizard-cal-title { order: 0; justify-content: flex-start; font-size: var(--fs-xl); flex: 1; width: auto; }
  #createTripModal .wizard-cal-head .is-prev { order: 1; }
  #createTripModal .wizard-cal-head .is-next { order: 2; }
  #createTripModal .wizard-cal-dow { font-size: var(--fs-xs); }
  #createTripModal .wizard-cal-cell { font-size: var(--fs-md); }
  #createTripModal .wizard-tag { min-height: 130px; padding-top: 30px; }
  #createTripModal .wizard-tag b { font-family: var(--df-sans); font-size: var(--fs-lg); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
  #createTripModal .wizard-tag-faces i { width: 26px; height: 26px; }
  #createTripModal .wizard-tags + .form-hint { font-size: var(--fs-md); line-height: 1.4; margin-top: var(--space-lg); }
  #createTripModal .wizard-footer #wizard-next-btn { font-size: var(--fs-lg); min-height: 56px; border-radius: 999px; }
  #createTripModal .wizard-footer .wizard-create-now { font-size: var(--fs-md); }
}
.wizard-recap-status { margin-top: var(--space-lg); padding: var(--space-md) var(--space-lg); display: flex; flex-direction: column; gap: 2px; border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub); background: var(--df-panel); color: var(--df-ink); }
.wizard-recap-status.is-error { border-color: var(--danger); }
.wizard-recap-status.is-error strong { color: var(--danger-text); }
.wizard-recap-retry { background: none; border: 0; padding: 0; min-height: var(--tap-min); font: inherit; font-weight: 600; color: var(--df-brand); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#create-trip-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Issue #5499 — one-line note after a template copy; gone on the first edit. */
.itin-copy-note { margin: 0 0 var(--space-lg); padding: var(--space-md) var(--space-lg); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub); background: var(--df-panel); color: var(--df-ink); font-size: var(--fs-xs); }
@keyframes trip-header-arrive { from { opacity: 0; transform: translateY(12px) scale(0.96); } to { opacity: 1; transform: none; } }
.trip-header.is-arriving { transform-origin: top center; animation: trip-header-arrive var(--dur-view) var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) {
  .trip-header.is-arriving { animation: none; opacity: 1; transform: none; }
}

/* Create Trip wizard (#5575): AW4 country pills + search row + sub-line, AW7 tags without number badges. */
.wizard-question-sub { margin: calc(-1 * var(--space-lg)) 0 var(--space-lg); max-width: 34rem; font-size: var(--fs-md); line-height: 1.5; color: var(--df-ink-soft); }
.wizard-chip-grid.wizard-country-chips { flex-direction: row; flex-wrap: wrap; gap: var(--space-md); }
.wizard-country-chips .wizard-chip { width: auto; border-radius: 999px; padding: var(--space-md) var(--space-xl); font-weight: 600; }
.wizard-country-chips .wizard-chip.selected { background: var(--selected-bg); color: var(--on-selected); border-color: var(--df-ink); }
.wizard-search-row { display: flex; align-items: center; gap: var(--space-md); width: 100%; max-width: 34rem; min-height: 56px; padding: 0 var(--space-xl); font: inherit; font-size: var(--fs-md); text-align: left; color: var(--df-ink-soft); background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub); cursor: pointer; }
.wizard-search-row:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 2px; }
#createTripModal #wizard-next-btn:disabled { background: var(--df-brand); opacity: 0.45; box-shadow: none; cursor: default; }
.wizard-tag kbd { display: none; }
@media (min-width: 1024px) {
  #createTripModal .wizard-footer #wizard-next-btn { margin-left: auto; }
  .wizard-country-chips .wizard-chip { font-size: var(--fs-md); min-height: 52px; }
}

/* #5727 — where:city: page 1's search without the wall. */
.wizard-wall-search-only .wizard-wall-head { max-width: 560px; }
.wizard-wall-search-only .geonames-credit { margin-top: var(--space-lg); }

/* ── Route Ledger: the Now line and the folds (#5909) ────────────────────
   The coral Now line sits across the route on today's box; the done stops
   fill their node amber and fade. Nothing here travels: the line is moved by
   the DOM, not tweened, so there is no motion to answer. */
.route-now {
  display: flex;
  align-items: center;
  height: 22px;
  padding: 0 var(--lg-pad, var(--space-lg));
  pointer-events: none;
}
/* #6580: the line is a flex item after the label, not an absolute rule drawn
   across the row — that struck the label's text through (its ground is not
   opaque enough to hide it). */
.route-now::after {
  content: '';
  flex: 1 1 auto;
  min-width: 0;
  border-top: 2px solid var(--df-ink);
}
.route-now-label {
  flex: none;
  padding: 0 var(--space-xs);
  border-radius: 999px;
  border: 1.5px solid var(--df-ink);
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-xs, 0.75rem);
  font-weight: 600;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stop-in-min {
  display: block;
  font-size: var(--fs-xs, 0.75rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--df-ink);
  white-space: nowrap;
}
#itinerary-content .day-box-stops > .itin-stop-card.stop-done::before { background: var(--vn-amber); }
#itinerary-content .itin-stop-card.stop-done .stop-summary-row { opacity: 0.6; }
.stop-connector-go .stop-go {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 600;
  color: var(--vn-green);
}

/* One open day (#6390). The open day's body arrives with a fade and a short
   slide: opacity and transform only, so the animation never re-lays the list out
   frame by frame (#6568: the old 0fr to 1fr height animation did, which cost
   layout on every frame and counted as layout shift). The class is removed by JS
   after --dur-view, so a plain re-render of the open day never replays it. */
.day-box-body { display: grid; grid-template-rows: 1fr; }
.day-box-body-inner { min-height: 0; }
.day-box-unfolding > .day-box-body {
  animation: day-unfold var(--dur-view) var(--ease-out) both;
}
@keyframes day-unfold {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.day-next-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: 100%;
  min-height: var(--tap-min);
  padding: 0 var(--space-2xl);
  background: none;
  border: 0;
  border-top: 2px dashed var(--df-hair);
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--df-ink);
  text-align: left;
  cursor: pointer;
}
.itin-pager-all {
  /* Small in the sticky pager; the tappable area is widened to --tap-min below. */
  position: relative;
  display: block;
  margin-left: auto;
  min-height: 24px;
  padding: 0 var(--space-md);
  background: none;
  border: 0;
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--df-ink-soft);
  text-decoration: underline;
  cursor: pointer;
}
.itin-pager-all::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: max(var(--tap-min), 100%); transform: translateY(-50%); }
.itin-pager-all[aria-pressed="true"] { color: var(--df-ink); }
@media (prefers-reduced-motion: reduce) {
  /* #6390 - the day switches instantly and ends open. */
  .day-box-unfolding > .day-box-body { animation: none; }
}

/* ── Floating Pass (#5926 slice 2, #5928) ────────────────────────────────
   The top bar on the eight screens outside the trip view (My Trips, Discover,
   Stamps, Profile/Settings, Shared trip, Pending approval, Invite, Public
   profile). A Field Green pass inset from the viewport, with a pinned
   Green-Black keyline and the Press shadow; its controls are apricot stickers
   (DESIGN.md Navigation, Buttons "On a green field"). No blur, gradient or
   backdrop-filter. The trip view and the wizard keep today's bar until slices
   4 and 5; --topbar-h is re-valued here only, so they still read the old one. */
:is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) {
  --pass-inset: 12px;
  --pass-h: 64px;
  --pass-pad: 8px 8px 8px 16px;
  --topbar-h: calc(var(--pass-inset) + var(--pass-h));
  --rail-top: calc(var(--topbar-h) + var(--space-3xl)); /* sticky rails sit 16px under the pass */
}
@media (max-width: 680px) {
  :is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) {
    --pass-inset: 10px;
    --pass-h: 60px;
    --pass-pad: 6px 6px 6px 12px;
  }
}
:is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar {
  margin: var(--pass-inset) var(--pass-inset) 0;
  padding: var(--pass-pad);
  height: var(--pass-h);
  min-height: 0;
  border: 2px solid var(--df-pin-ink);
  border-radius: var(--df-radius-card);
  box-shadow: var(--df-press);
}
/* The phone search row (<=680px) stays as today until slice 3: the bar grows to hold it. */
@media (max-width: 680px) {
  :is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar:has(> .gs-trigger) {
    height: auto;
    min-height: var(--pass-h);
  }
}
@media (min-width: 681px) {
  :is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar:has(> .gs-trigger) { height: var(--pass-h); }
  /* The 300px pill is back from 681px (it was an icon for 681-1023px, #4123). */
  :is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar .gs-trigger {
    flex: 0 1 300px;
    justify-content: flex-start;
    min-width: 0;
    margin: 0 var(--space-lg) 0 auto;
    padding: 0 var(--space-lg);
  }
  :is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar .gs-trigger-text {
    position: static;
    width: auto;
    height: auto;
    clip: auto;
  }
}

/* Title: Bricolage 600 in apricot after a 2px divider; the divider and title hide on phones (#6645).
   Where it carries a trip name (the trip view and a shared trip) it keeps Fraunces 700 at 19px. */
:is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar-title {
  font-family: var(--df-sans);
  font-weight: 600;
  font-size: var(--fs-lg);
  line-height: 1.2;
  color: var(--df-pin-apricot);
}
#app #tripTitle, #shared-trip-screen #shared-trip-topbar-title { font-family: var(--df-title); font-weight: 700; }
:is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 26px;
  padding-inline-start: var(--space-lg);
  border-inline-start: 2px solid rgba(255, 227, 196, 0.35);
}
:is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar-brand-text .header-sub {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 227, 196, 0.75);
}
@media (max-width: 680px) {
  :is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar-brand-text { display: none; }
}

/* Sticker controls: apricot fill, 2px #062811 keyline, 2px deep-green offset, press on hover. */
:is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar :is(.notification-bell-trigger, .home-profile-trigger, .gs-trigger, .discover-back-btn, .discover-signin-btn) {
  background: var(--df-pin-apricot);
  border: 2px solid var(--df-pin-keyline);
  color: var(--df-pin-deep-green);
  box-shadow: 2px 2px 0 rgba(6, 40, 17, 0.45);
  transition: transform var(--dur-feedback) var(--ease-out), box-shadow var(--dur-feedback) var(--ease-out);
}
:is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar :is(.notification-bell-trigger, .home-profile-trigger, .gs-trigger, .discover-back-btn, .discover-signin-btn):hover {
  background: var(--df-pin-apricot);
  border-color: var(--df-pin-keyline);
  color: var(--df-pin-deep-green);
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 rgba(6, 40, 17, 0.45);
}
:is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar :is(.discover-back-btn, .discover-signin-btn) {
  border-radius: var(--radius-pill, 999px);
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  padding-inline: var(--space-lg);
  gap: var(--space-sm);
  font: 600 var(--fs-sm) var(--df-sans);
}
:is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar .notification-bell-trigger { border-radius: 50%; }
:is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar .home-profile-trigger {
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  padding: 4px;
  gap: var(--space-md);
  border-radius: var(--radius-pill, 999px);
  font-weight: 600;
}
:is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar .home-profile-avatar {
  width: 32px;
  height: 32px;
  background: var(--vn-amber);
  color: var(--df-amber-fg);
  font-size: var(--fs-sm);
}
@media (min-width: 1024px) {
  :is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar .home-profile-trigger { padding-inline-end: var(--space-lg); }
  :is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar .home-profile-name { color: var(--df-pin-deep-green); }
}
@media (prefers-reduced-motion: reduce) {
  :is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar :is(.notification-bell-trigger, .home-profile-trigger, .gs-trigger, .discover-back-btn, .discover-signin-btn):hover {
    transform: none;
    box-shadow: 2px 2px 0 rgba(6, 40, 17, 0.45);
  }
}
/* The dropdowns hang off their trigger, which sits inside the pass's padding and keyline;
   push them past the pass's bottom edge (padding + 2px keyline + 8px gap). */
:is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar :is(.home-profile-dropdown, .notification-dropdown) { top: calc(100% + 18px); }
@media (max-width: 680px) {
  :is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar :is(.home-profile-dropdown, .notification-dropdown) { top: calc(100% + 16px); }
}
/* Until slice 3 (#5929) puts the phone search on the bar's row, the bar is 56px taller than the
   triggers' row suggests: drop the menus past it. Delete with the phone search row. */
@media (max-width: 680px) {
  :is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar:has(> .gs-trigger) :is(.home-profile-dropdown, .notification-dropdown) { top: calc(100% + 72px); }
}

/* ── Floating Pass on the trip view (#5926 slice 4, #5930) ───────────────────
   The trip view's bar is position: fixed (.app .home-topbar) and the whole page scrolls, so the
   inset margin shows the page scrolling underneath. #app joins the pass block above; this is what
   only the trip view has: the Trip Pass sticker, the phase line, and the menus. */
#app .home-topbar { z-index: 45; }
#app .home-topbar .trip-pass-header-badge {
  background: var(--df-pin-apricot);
  border: 2px solid var(--df-pin-keyline);
  color: var(--df-pin-deep-green);
  box-shadow: 2px 2px 0 rgba(6, 40, 17, 0.45);
  transition: transform var(--dur-feedback) var(--ease-out), box-shadow var(--dur-feedback) var(--ease-out);
}
#app .home-topbar .trip-pass-header-badge:hover {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 rgba(6, 40, 17, 0.45);
}
#app .home-topbar .trip-pass-header-badge {
  border-radius: var(--radius-pill, 999px);
  font: 700 var(--fs-sm) var(--df-sans);
}
/* A pass in hand: the tier word is bold. Nothing on the pass is Trail Green (it turns mint after
   dark), so the suggested-tier chip is Route Amber with its pinned ink. */
#app .home-topbar .trip-pass-header-badge.is-active { background: var(--df-pin-apricot); color: var(--df-pin-deep-green); }
#app .home-topbar .trip-pass-badge-suggest { background: var(--info); color: var(--df-panel); }
/* The phase line: label tier, 75% apricot, above the trip name (tripPhaseLine(), the trip header's
   own helper, so the two always agree). Below 1024px the trip header shows the same line, so the
   bar drops it; an empty line (undated trip) takes no room. */
#app .home-topbar-phase:empty { display: none; }
@media (max-width: 1023px) {
  #app .home-topbar-phase { display: none; }
}
#app .home-topbar-brand-text { min-height: 0; }
@media (prefers-reduced-motion: reduce) {
  #app .home-topbar .trip-pass-header-badge:hover {
    transform: none;
    box-shadow: 2px 2px 0 rgba(6, 40, 17, 0.45);
  }
}


/* ── Two-tier Pass (#5999, epic #6000) ───────────────────────────────────
   At >=1024px the trip tabs are the Floating Pass's second row, under a 2px
   dashed apricot tear line at 35%. .tabs is fixed directly under the top row
   and wears the pass's own chrome (Field Green, keyline, Press shadow) with its
   top edge square, so the two read as one piece; --topbar-h grows by the row so
   .app-main, --rail-top and the dropdowns clear it. Below 1024px nothing here
   applies: the bottom bar stays. Active = the pass's apricot sticker, never
   Trail Green on the pass (DESIGN.md, Navigation). */
@media (min-width: 1024px) {
  #app {
    --pass-tabs-h: 62px; /* board: tear line to pass bottom is 62px (2px line, 44px tab, even padding, 2px keyline) */
    --topbar-h: calc(var(--pass-inset) + var(--pass-h) + var(--pass-tabs-h));
  }
  #app .home-topbar {
    border-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: none; /* the row below carries the Press shadow for the whole pass */
  }
  #app .tabs {
    position: fixed;
    top: calc(var(--pass-inset) + var(--pass-h));
    left: var(--pass-inset);
    right: var(--pass-inset);
    bottom: auto;
    width: auto;
    max-width: none;
    margin: 0;
    height: var(--pass-tabs-h);
    z-index: 44; /* under .home-topbar (45) so its dropdowns open over the row */
    box-sizing: border-box;
    padding: 8px 8px 8px 16px;
    background: var(--topbar-bg);
    border: 2px solid var(--df-pin-ink);
    border-top: 0;
    border-radius: 0 0 var(--df-radius-card) var(--df-radius-card);
    box-shadow: var(--df-press);
  }
  /* The tear line, inset 16px so it floats inside the pass like the board. */
  #app .tabs::before {
    content: '';
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    border-top: 2px dashed rgba(255, 227, 196, 0.35);
    pointer-events: none;
  }
  #app .tab {
    height: var(--tap-min);
    min-height: var(--tap-min);
    margin-top: 2px; /* clears the tear line */
    font: 400 14px/1.3 var(--df-sans);
    color: var(--df-pin-apricot);
    background: none;
    border: 2px solid transparent;
    box-shadow: none;
  }
  #app .tab:hover { background: rgba(255, 227, 196, 0.12); }
  /* #6634 — the active tab is the shared selected ink fill. The pass is
     pinned Field Green in both themes, so the ink is pinned too (Green-Black,
     not --selected-bg, which turns Lamplight after dark), with apricot text
     (14:1) and an apricot keyline so the pill's edge holds on the green. */
  #app .tab.active,
  #app .tab.active:hover {
    background: var(--df-pin-ink);
    border-color: var(--df-pin-apricot);
    color: var(--df-pin-apricot);
    font-weight: 600;
    box-shadow: 2px 2px 0 rgba(6, 40, 17, 0.45);
  }
  #app .tab:focus-visible { outline: 2px solid var(--df-pin-apricot); outline-offset: 2px; }
  #app .tab.active:focus-visible { outline-color: var(--df-pin-white); }
  #app .tab i { font-size: 18px; }
  #app .tab.active i { transform: none; }
  /* Settings pinned to the right end, a faint apricot outline while inactive. */
  #app #tab-settings {
    margin-left: auto;
    border-color: rgba(255, 227, 196, 0.35);
  }
  #app #tab-settings.active { border-color: var(--df-pin-keyline); }
  /* #6089 - [ Itinerary | calendar | map ] reads as one joined control while
     Itinerary is open. The highlighted segment is the current view: the
     Itinerary tab on list, otherwise the calendar or map icon. */
  #app .tab-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    box-sizing: border-box;
    width: var(--tap-min);
    height: var(--tap-min);
    min-width: var(--tap-min);
    margin-top: 2px;
    margin-left: calc(-1 * var(--space-xs) - 2px); /* cancels the bar gap and shares the edge with the segment before it */
    padding: 0;
    color: var(--df-pin-apricot);
    background: none;
    border: 2px solid rgba(255, 227, 196, 0.35);
    border-radius: 0;
    cursor: pointer;
  }
  #app .tab-view-btn[hidden] { display: none; }
  /* Flag off: the map icon is not rendered, so the calendar icon ends the control. */
  #app .tab-view-btn.feature-itinerary-map { display: none; }
  #app #itinTabMapBtn,
  #app #itinTabCalendarBtn:has(+ #itinTabMapBtn[hidden]) { border-radius: 0 var(--radius-pill, 999px) var(--radius-pill, 999px) 0; }
  #app .tab-view-btn:hover { background: rgba(255, 227, 196, 0.12); }
  #app .tab-view-btn i { font-size: 18px; }
  #app .tab-view-btn.active {
    background: var(--df-pin-apricot);
    border-color: var(--df-pin-keyline);
    color: var(--df-pin-deep-green);
    position: relative;
    box-shadow: 2px 2px 0 rgba(6, 40, 17, 0.45);
  }
  #app .tab-view-btn:focus-visible { outline: 2px solid var(--df-pin-apricot); outline-offset: 2px; }
  #app .tab-view-btn.active:focus-visible { outline-color: var(--df-pin-white); }
  #app .tabs-itin-ext #tab-itinerary {
    border-radius: var(--radius-pill, 999px) 0 0 var(--radius-pill, 999px);
    border-color: rgba(255, 227, 196, 0.35);
  }
  /* On Calendar or Map the Itinerary tab is still the open tab (aria-selected)
     but the highlight belongs to the icon. */
  #app .tabs-itin-ext #tab-itinerary:not(.tab-seg-on) {
    background: none;
    color: var(--df-pin-apricot);
    box-shadow: none;
  }
  /* #6106 - one weight in every state: Bricolage widens as it gets heavier, so
     a 400 here against the active tab's 600 changed the button's width between
     views and shifted the icons beside it. */
  #app .tabs-itin-ext #tab-itinerary { font-weight: 600; }
  #app .tabs-itin-ext #tab-itinerary.tab-seg-on { border-color: var(--df-pin-keyline); }
}

/* ── The Votes sticker and sheet (#6015, epic #6011; DESIGN.md Navigation → the Votes sticker;
   boards docs/design/votes/). Outlined like inactive Settings, never filled like the active tab
   and never Trail Green; only the "for you" badge is filled. --------------------------------- */
.home-topbar-actions { display: flex; align-items: center; gap: var(--space-lg); }
.votes-sticker[hidden] { display: none; }
.votes-sticker {
  display: none; /* each slot turns on at its own width, below */
  align-items: center;
  gap: 6px;
  min-height: var(--tap-min);
  padding: 0 14px;
  font: 600 14px/1.3 var(--df-sans);
  color: var(--df-pin-apricot);
  background: none;
  border: 2px solid rgba(255, 227, 196, 0.35);
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--dur-feedback) var(--ease-out), transform var(--dur-feedback) var(--ease-out);
}
.votes-sticker:hover { background: rgba(255, 227, 196, 0.12); }
.votes-sticker:active { transform: translateY(1px); }
.votes-sticker:focus-visible { outline: 2px solid var(--df-pin-apricot); outline-offset: 2px; }
.votes-sticker i { font-size: 18px; }
.votes-sticker-badge {
  padding: 0 7px;
  font: 700 11px/18px var(--df-sans);
  color: var(--df-pin-deep-green);
  background: var(--df-pin-apricot);
  border: 1.5px solid var(--df-pin-keyline);
  border-radius: var(--radius-pill);
}
/* Phone: the top bar, before the bell and the avatar. Shortened to icon, count and "for you". */
@media (max-width: 1023.98px) {
  #app .votes-sticker-bar:not([hidden]) { display: inline-flex; padding: 0 7px; gap: 4px; }
  #app .votes-sticker-bar .votes-sticker-badge { padding: 0 5px; }
  /* The trip bar is tight at 390px (lockup, sticker, bell, avatar): trim the gaps while the sticker shows. */
  #app .home-topbar-actions:has(.votes-sticker-bar:not([hidden])) { gap: var(--space-sm); }
}
/* Phones: logo, sticker, Trip Pass, bell and avatar share one row, so the sticker is a round button with one
   number on its corner (#7701): the votes waiting for you (filled), else the open votes (outlined). The
   aria-label keeps the full wording. The account arrow goes too. */
@media (max-width: 680px) {
  #app .home-topbar .home-profile-caret { display: none; }
  #app .votes-sticker-bar:not([hidden]) { position: relative; justify-content: center; width: var(--tap-min); padding: 0; }
  #app .votes-sticker-bar .votes-sticker-badge-words,
  #app .votes-sticker-bar:has(.votes-sticker-badge) .votes-sticker-count { display: none; }
  #app .votes-sticker-bar :is(.votes-sticker-badge, .votes-sticker-count) { position: absolute; top: -6px; right: -6px; box-sizing: border-box; min-width: 20px; text-align: center; }
  #app .votes-sticker-bar .votes-sticker-count { padding: 0 4px; font: 700 11px/18px var(--df-sans); background: var(--topbar-bg); border: 1.5px solid var(--df-pin-apricot); border-radius: var(--radius-pill); }
}
/* >=1024px: the Floating Pass tab row, left of Settings. It takes over Settings' margin-left: auto,
   and Settings gives it up while the sticker shows, so the pair sits at the row's end. */
@media (min-width: 1024px) {
  #app .votes-sticker-pass:not([hidden]) { display: inline-flex; margin-left: auto; margin-top: 2px; }
  #app .votes-sticker-pass:not([hidden]) + #tab-settings { margin-left: 8px; }
}

/* The sheet: a 520px modal above 680px (the shared modal rules make it a bottom sheet below).
   Drawn to docs/design/votes/ P2, P3, D1: Noon Apricot ground, Cut Stock cards with a ruled
   header, full-bleed rows, green links for the secondary actions. */
.votes-modal-content { max-width: 520px; padding: 0; background: var(--df-ground); position: relative; }
.votes-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-md); margin: 0; padding: 20px 20px 14px; border-bottom: 2px solid var(--df-ink); }
.votes-head-text h2 { margin: 0; font: 700 24px/1.1 var(--df-title); color: var(--df-ink); }
.votes-sub { margin: 4px 0 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }
#votesBody { display: flex; flex-direction: column; gap: var(--space-lg); padding: 16px 16px 20px; }
@media (max-width: 680px) {
  .votes-modal-content::before { content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--df-hair); }
  .votes-head { padding-top: 24px; }
}
.votes-group { margin: var(--space-sm) 0 calc(var(--space-sm) * -1); font: 800 11px/1.2 var(--df-sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--df-ink-soft); }
.votes-note { margin: 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.votes-card {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  overflow: hidden;
  scroll-margin-top: var(--space-lg);
}
.votes-card-head { padding: 12px 14px 10px; border-bottom: var(--edge-hairline); }
.votes-card-title { display: flex; align-items: center; gap: var(--space-md); flex-wrap: wrap; }
.votes-card-title h3 { margin: 0; font: 700 18px/1.2 var(--df-title); }
.votes-card-meta { margin-top: 2px; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.votes-state { font-weight: 600; color: var(--df-ink); }
.votes-state.is-finalized { color: var(--df-brand); }
.itin-chooser-status { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.votes-pill {
  flex: none;
  padding: 0 8px;
  font: 700 11px/20px var(--df-sans);
  color: var(--df-ink-soft);
  border: 1.5px solid var(--df-hair);
  border-radius: var(--radius-pill);
}
.votes-pill.is-you { color: var(--df-brand-fg); background: var(--df-brand); border-color: var(--df-brand); }
.votes-row { padding: 12px 14px; }
.votes-row + .votes-row { border-top: 1px solid var(--df-hair); }
.votes-row > .planning-hub-poll-option, .votes-row > .bk-opt-row { display: block; width: 100%; margin: 0; padding: 0; border: 0; }
.votes-row .vote-row { width: 100%; }
.votes-own-remove { margin-top: 2px; }
.votes-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0;
  background: none;
  border: 0;
  color: var(--df-brand);
  font: 700 14px/1.3 var(--df-sans);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  list-style: none;
}
.votes-link::-webkit-details-marker { display: none; }
.votes-card-add { padding: 0 14px; border-top: 1px solid var(--df-hair); }
.votes-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-xl); padding: 8px 14px; border-top: 1px solid var(--df-hair); }
.votes-host-btn {
  min-height: var(--tap-min);
  padding: 0 18px;
  background: var(--df-brand);
  color: var(--df-brand-fg);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  font: 700 14px/1.3 var(--df-sans);
  cursor: pointer;
}
.votes-host-options[open] { flex-basis: 100%; }
.votes-host-options-body { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding-bottom: var(--space-sm); }
.votes-host-hint { margin: 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.votes-host-opt { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); width: 100%; min-height: var(--tap-min); font-size: var(--fs-xs); }
.votes-host-opt label { display: inline-flex; align-items: center; gap: var(--space-sm); min-height: var(--tap-min); min-width: var(--tap-min); cursor: pointer; }
.votes-decided { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-sm); font-size: var(--fs-xs); }
.votes-decided li { display: flex; align-items: center; gap: var(--space-lg); padding: 12px 14px; border: 2px dashed var(--df-hair); border-radius: var(--df-radius-card); }
.votes-decided-label { color: var(--df-ink-soft); }
.votes-decided-value { font-weight: 600; }
.votes-decided-by { margin-left: auto; color: var(--df-ink-soft); }
@media (prefers-reduced-motion: reduce) {
  /* The sticker only fades its hover tint and nudges 1px; resolved here to the finished state. */
  .votes-sticker { transition: none; }
  .votes-sticker:active { transform: none; }
  /* #6183: the Ideas drawer's slide-over resolves to its finished state. */
  .modal.ideas-drawer.active .modal-content { animation: none; }
}
/* Host options' select control: a native 13px checkbox is no tap target, so the input itself is --tap-min
   and draws its own 20px box. */
.votes-host-opt input { appearance: none; -webkit-appearance: none; display: inline-grid; place-content: center; width: var(--tap-min); height: var(--tap-min); margin: 0 -8px 0 -12px; flex: 0 0 var(--tap-min); cursor: pointer; }
.votes-host-opt input::before { content: ''; width: 20px; height: 20px; border: 2px solid var(--df-ink); border-radius: 5px; background: var(--df-panel); }
.votes-host-opt input[type="radio"]::before { border-radius: 50%; }
.votes-host-opt input:checked::before { background: var(--df-brand); box-shadow: inset 0 0 0 3px var(--df-panel); }
.votes-host-opt input:focus-visible { outline: 2px solid var(--df-ink); outline-offset: -4px; border-radius: 8px; }

/* #6106 - the Itinerary tab at >=1024px: the gap under the Floating Pass. Every row
   above the timeline either carries content or takes no height. .app-main's 24px
   breathing room becomes 10px, #panel-itinerary's 16px top padding goes, the header
   row's tail shortens, and the toolbar's 10px bottom margin moves onto the items
   that render in it, so an empty toolbar (nothing but the phone switch, hidden here)
   reserves nothing. Phones are untouched. */
@media (min-width: 1024px) {
  .app-main:has(> #panel-itinerary.active) { padding-top: calc(var(--topbar-h) + var(--space-lg)); }
  .app-main:has(> #panel-itinerary.active) .trip-header { padding-bottom: var(--space-xs); }
  #panel-itinerary { padding-top: 0; }
  #panel-itinerary .itin-toolbar { margin-bottom: 0; }
  #panel-itinerary .itin-toolbar > .itin-action-btn,
  #panel-itinerary .itin-create-actions > * { margin-bottom: var(--space-lg); }
}

/* ── #6183: Ideas placement ─────────────────────────────────────────────────
   >=1024px with the day-map card: the right rail gets a Map | Ideas switch and
   shows one panel at a time at the rail's full height. Below that (and 1024-1279px
   without the card) Ideas leaves the bottom of the list and opens from the toolbar
   pill (.itin-ideas-pill) in #ideasDrawer. >=1280px without the card is untouched. */
.itin-rail-tabs { display: none; }
@media (min-width: 1024px) {
  .itin-layout.has-day-map .itin-rail-tabs:not([hidden]) { display: flex; gap: var(--space-sm); flex: none; }
  .itin-layout.has-day-map:not(.rail-tab-ideas) #itin-ideas-sidebar { display: none; }
  .itin-layout.has-day-map.rail-tab-ideas .itin-day-map-card { display: none; }
  /* Always open here: the tab is the switch, so the panel's own collapse chevron has no job. */
  .itin-layout.has-day-map .ideas-sidebar-chevron { display: none; }
  .itin-layout.has-day-map .ideas-sidebar-toggle { cursor: default; }
}
.itin-rail-tab {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: var(--tap-min);
  padding: 0 var(--space-lg);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
}
.itin-rail-tab[aria-selected="true"] { background: var(--df-ink); color: var(--df-panel); box-shadow: var(--df-press); }
.itin-rail-tab:focus-visible { outline: 2px solid var(--vn-trail-green); outline-offset: 2px; }
.itin-rail-tab-count { font-weight: 800; }
.itin-rail-tab-count:not([hidden])::before { content: '('; }
.itin-rail-tab-count:not([hidden])::after { content: ')'; }

/* Drawer mode: Ideas is not in the grid at all, so the list ends with its last day. */
.itin-layout.ideas-in-drawer { grid-template-areas: "daylist"; }
.itin-layout.ideas-in-drawer #itin-ideas-sidebar { display: none; }
.itin-toolbar .itin-toolbar-pill.itin-ideas-pill { margin-left: 0; }

.ideas-drawer-content { padding: 0; display: flex; flex-direction: column; }
.ideas-drawer-content .modal-header { padding: var(--space-lg) var(--space-2xl); margin: 0; flex: none; }
#ideas-drawer-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 var(--space-lg) var(--space-lg); }
#ideas-drawer-body #itin-ideas-sidebar { display: block; box-shadow: none; }
#ideas-drawer-body .ideas-sidebar-chevron { display: none; }
#ideas-drawer-body .ideas-sidebar-toggle { cursor: default; }
@keyframes ideas-drawer-in { from { opacity: 0; transform: translateX(32px); } }
@media (min-width: 681px) {
  .modal.ideas-drawer { justify-content: flex-end; align-items: stretch; padding: 0; }
  .modal.ideas-drawer .ideas-drawer-content {
    max-width: 440px;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    border-width: 0 0 0 2px;
  }
  .modal.ideas-drawer.active .modal-content { animation: ideas-drawer-in var(--dur-view) var(--ease-out) both; }
}
@media (max-width: 680px) {
  .ideas-drawer-content { max-height: 85vh; max-height: 85dvh; }
}

/* #6213 — Edit Stop: picked address line under the place name. */
.stop-picked-address { margin: var(--space-xs) 0 0; font-size: var(--fs-sm); color: var(--df-ink-soft, var(--text-muted)); }
.stop-picked-address[hidden] { display: none; }
.stop-picked-address-change { background: none; border: 0; padding: 0 var(--space-xs); min-height: var(--tap-min); color: var(--df-ink); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* #6214 - Add/Edit Stop: Advanced details disclosure (board B1). A keylined row:
   title with the held values under it, chevron on the right. Wide: fields two to
   a row, Link and the estimate full width; narrow (bottom sheet): one column. */
.stop-advanced { margin: 0 0 1rem; border: 2px solid var(--df-ink); border-radius: 12px; background: var(--df-ground, var(--bg)); }
.stop-advanced-summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; cursor: pointer; list-style: none; color: var(--df-ink); }
.stop-advanced-summary::-webkit-details-marker { display: none; }
.stop-advanced-summary:focus-visible { outline: 2px solid var(--df-ink); outline-offset: 2px; }
.stop-advanced-main { flex: 1; display: grid; }
.stop-advanced-title { font-weight: 600; font-size: 14px; line-height: 1.3; }
.stop-advanced-values { font-size: 12px; line-height: 1.4; color: var(--df-ink-soft, var(--text-muted)); }
.stop-advanced-values[hidden] { display: none; }
.stop-advanced-chev { transition: transform var(--dur-state) var(--ease-move); }
.stop-advanced[open] > .stop-advanced-summary { border-bottom: 2px dashed var(--df-ink); }
.stop-advanced[open] .stop-advanced-chev { transform: rotate(180deg); }
.stop-advanced-grid { display: grid; grid-template-columns: 1fr; column-gap: var(--space-sm); padding: 12px 12px 0; }
@media (min-width: 681px) {
  .stop-advanced-grid { grid-template-columns: 1fr 1fr; }
  .stop-advanced-grid .stop-advanced-full { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .stop-advanced-chev { transition: none; } }

/* ── Trip entry: "The print lifts" (#6240) ───────────────────────────────
   Opening a trip from a My Trips card. js/trip-entry.js names the card's photo
   and title, and the trip header's, with the same view-transition-name only for
   the duration of the transition (names must be unique on the page). */
.home-trip-card.trip-entry-press,
.home-trip-card.trip-entry-press:hover,
.discover-card.trip-entry-press,
.discover-card.trip-entry-press:hover {
  transform: translate(4px, 4px);
  box-shadow: var(--df-press-active);
}
/* Option D (no View Transitions): a marching Route Amber dash on the card's foot. */
.home-trip-card.trip-entry-loading::after,
.discover-card.trip-entry-loading::after {
  content: '';
  position: absolute;
  bottom: 0;
  height: 4px;
  /* #6989 — the dashes are static on a pseudo 20px wider than the card (the
     card clips it); the march is a translateX of one period, on the compositor. */
  left: -20px; right: 0;
  background: repeating-linear-gradient(90deg, var(--vn-amber) 0 10px, transparent 10px 20px);
  animation: trip-entry-march var(--dur-view) linear infinite;
  pointer-events: none;
}
@keyframes trip-entry-march { to { transform: translateX(20px); } }
#app.trip-rise { animation: trip-entry-rise var(--dur-view) var(--ease-out) both; }
@keyframes trip-entry-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* While the fetch runs the trip screen is the header (drawn from the card) over a skeleton. */
#app.trip-entering .panel { display: none; }
#app.trip-entering #panel-itinerary { display: block; }
#app.trip-entering #panel-itinerary > :not(#itin-list-cal-body),
#app.trip-entering #itin-list-cal-body > :not(.itin-layout),
#app.trip-entering .itin-layout > :not(#itinerary-content) { display: none; }
#tripHeader.has-entry-photo {
  background-image: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)), var(--trip-entry-photo);
  background-size: cover;
  background-position: var(--trip-entry-photo-position, center);
}
.trip-entry-skeleton-day { display: flex; flex-direction: column; gap: var(--space-md); }

.trip-chrome-in { animation: trip-chrome-in var(--dur-state) var(--ease-out) both; }
@keyframes trip-chrome-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* The lift: photo + title grow into the header; My Trips scales away beneath. */
::view-transition-group(trip-lift-photo),
::view-transition-group(trip-lift-title) {
  animation-duration: var(--dur-lift);
  animation-timing-function: var(--ease-out);
}
html.trip-lifting-wide::view-transition-group(trip-lift-photo),
html.trip-lifting-wide::view-transition-group(trip-lift-title) { animation-duration: var(--dur-lift-wide); }
html.trip-lifting::view-transition-old(root) { animation: trip-lift-away var(--dur-lift) var(--ease-out) both; }
html.trip-lifting::view-transition-new(root) { animation: trip-lift-in var(--dur-state) var(--ease-out) both; }
@keyframes trip-lift-away { to { opacity: 0; transform: scale(0.96); } }
@keyframes trip-lift-in { from { opacity: 0; } to { opacity: 1; } }
::view-transition-old(trip-lift-photo), ::view-transition-new(trip-lift-photo) { height: 100%; object-fit: cover; }

@media (prefers-reduced-motion: reduce) {
  /* No lift: the swap is instant and resolves to the finished screen. */
  .home-trip-card.trip-entry-loading::after,
  .discover-card.trip-entry-loading::after,
  .trip-chrome-in,
  #app.trip-rise { animation: none; }
  html.trip-lifting::view-transition-group(*),
  html.trip-lifting::view-transition-old(*),
  html.trip-lifting::view-transition-new(*) { animation: none; }
}

/* ── Discover post entry: "The post opens out of its card" (#6290) ────────
   js/discover-post-lift.js names the tapped card's photo and name, and the post
   hero's, with the same view-transition-name only while a transition runs. The
   open reuses the trip lift's tokens; Back is --dur-view. */
::view-transition-group(dpost-lift-photo),
::view-transition-group(dpost-lift-title) {
  animation-duration: var(--dur-lift);
  animation-timing-function: var(--ease-out);
}
html.dpost-lifting-wide::view-transition-group(dpost-lift-photo),
html.dpost-lifting-wide::view-transition-group(dpost-lift-title) { animation-duration: var(--dur-lift-wide); }
html.dpost-dropping::view-transition-group(dpost-lift-photo),
html.dpost-dropping::view-transition-group(dpost-lift-title) { animation-duration: var(--dur-view); }
html.dpost-lifting::view-transition-old(root) { animation: trip-lift-away var(--dur-lift) var(--ease-out) both; }
html.dpost-lifting::view-transition-new(root) { animation: trip-lift-in var(--dur-state) var(--ease-out) both; }
html.dpost-dropping::view-transition-old(root) { animation: trip-lift-in var(--dur-feedback) var(--ease-out) reverse both; }
html.dpost-dropping::view-transition-new(root) { animation: dpost-feed-rise var(--dur-view) var(--ease-out) both; }
@keyframes dpost-feed-rise { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
::view-transition-old(dpost-lift-photo), ::view-transition-new(dpost-lift-photo) { height: 100%; object-fit: cover; }

/* The body below the hero: the place line and skeleton rise 12px from 160ms; the filled body fades in once. */
.dpost-body-in .dpost-place-entering,
.dpost-body-in .dpost-pad-entering { animation: dpost-body-rise var(--dur-state) var(--ease-out) var(--dur-feedback) both; }
@keyframes dpost-body-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.dpost-pad-fill { animation: trip-lift-in var(--dur-feedback) var(--ease-out) both; }
.dpost-lift-under { position: absolute; inset: 10px 10px 34px; width: calc(100% - 20px); height: calc(100% - 44px); object-fit: cover; }
.dpost-print > .dpost-lift-under { z-index: 0; }
.dpost-slide-fading { animation: trip-lift-in var(--dur-state) var(--ease-out) both; position: relative; z-index: 1; }
#shared-trip-screen.dpost-rise,
#discover-screen.dpost-rise { animation: trip-entry-rise var(--dur-view) var(--ease-out) both; }

@media (prefers-reduced-motion: reduce) {
  /* No lift and no fade: both directions swap straight to the finished state. */
  .dpost-body-in .dpost-place-entering,
  .dpost-body-in .dpost-pad-entering,
  .dpost-pad-fill,
  .dpost-slide-fading,
  #shared-trip-screen.dpost-rise,
  #discover-screen.dpost-rise { animation: none; }
  html.dpost-lifting::view-transition-group(*),
  html.dpost-lifting::view-transition-old(*),
  html.dpost-lifting::view-transition-new(*),
  html.dpost-dropping::view-transition-group(*),
  html.dpost-dropping::view-transition-old(*),
  html.dpost-dropping::view-transition-new(*) { animation: none; }
}

/* ── Top bar menus: Pass tier (#6245) ────────────────────────────────────────
   The account menu and the notifications panel hang off the Floating Pass, so they
   are cut from it: a Field Green band (--topbar-bg, pinned in both themes, never
   Trail Green), a ticket join (a half-circle notch in each side edge and a dashed
   tear line), and a Cut Stock body that flips to Night Stock. One renderer fills
   every bar (js/topbar-menus.js). Motion is Arrive + Trace + Settle and nothing
   else: opacity and transform only, tokens only. */
.topbar-menus { display: contents; }

.home-profile-dropdown,
.notification-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 300px;
  max-width: calc(100vw - 20px);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  box-shadow: var(--df-press-large);
  z-index: 50;
}
.notification-dropdown { width: 340px; }
.home-profile-dropdown.open, .notification-dropdown.open,
.home-profile-dropdown.closing, .notification-dropdown.closing { display: block; }
.home-profile-dropdown.closing, .notification-dropdown.closing { pointer-events: none; }
/* Phones: the bell isn't flush with the screen edge, so a panel anchored to it runs off screen.
   The bell stops being the containing block and the panel spans the bar. Must follow the base rules
   above; the id list outweighs the per-screen `top` offsets, which measure from the bell. */
@media (max-width: 480px) {
  .home-topbar .notification-bell { position: static; }
  :is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar .notification-dropdown { top: calc(100% + var(--space-md)); left: 8px; right: 8px; width: auto; max-width: none; }
}

.tb-band {
  background: var(--topbar-bg);
  color: var(--df-pin-apricot);
  border-radius: 12px 12px 0 0;
  padding: var(--space-lg) var(--space-xl) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.tb-eyebrow {
  font: 700 var(--fs-xs)/1 var(--df-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--df-pin-apricot);
}
.tb-band-id { display: flex; align-items: center; gap: var(--space-lg); min-width: 0; }
.tb-band-avatar {
  width: 50px; height: 50px; flex: none;
  border-radius: 50%;
  border: 2px solid var(--df-pin-keyline);
  background: var(--df-pin-apricot);
  color: var(--df-pin-deep-green);
  display: flex; align-items: center; justify-content: center;
  font: 600 var(--fs-lg)/1 var(--df-sans);
  overflow: hidden;
}
.tb-band-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tb-band-who { display: flex; flex-direction: column; gap: var(--space-xs); min-width: 0; }
.tb-band-name {
  font: 700 var(--fs-lg)/1.15 var(--df-title);
  color: var(--df-pin-apricot);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.home-profile-dropdown-meta {
  font: 400 var(--fs-xs)/1.3 var(--df-sans);
  color: var(--topbar-fg-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tb-figures { display: flex; gap: var(--space-xl); padding-top: var(--space-xs); }
.tb-figures[hidden] { display: none; }
.tb-figure { display: flex; flex-direction: column; gap: var(--space-xs); }
.tb-figure-off { display: none !important; }
.tb-figure-n { font: 800 26px/1 var(--df-display); font-variant-numeric: tabular-nums; color: var(--df-pin-apricot); }
.tb-figure-l { font: 700 var(--fs-xs)/1 var(--df-sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--topbar-fg-muted); }

/* The ticket join. The notches are half-circles cut into each side edge (page ground
   inside, 2px ink keyline); the dashed tear draws left to right on arrival. */
.tb-tear {
  position: relative;
  height: 20px;
  margin: -10px -2px;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(circle at 0 50%, var(--df-ground) 0 8px, var(--df-ink) 8.5px 10px, transparent 10.5px) left / 50% 100% no-repeat,
    radial-gradient(circle at 100% 50%, var(--df-ground) 0 8px, var(--df-ink) 8.5px 10px, transparent 10.5px) right / 50% 100% no-repeat;
}
.tb-tear::before {
  content: '';
  position: absolute; left: 16px; right: 16px; top: 9px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--df-ink) 0 6px, transparent 6px 11px);
  transform-origin: left center;
}

.tb-menu-body { padding: var(--space-xl) var(--space-md) var(--space-md); }
.tb-seg-pair { display: grid; grid-template-columns: 3fr 2fr; gap: var(--space-md); padding: 0 var(--space-md); }
.tb-divider { border: 0; border-top: 2px dashed var(--df-hair); margin: var(--space-md) var(--space-md); }
.tb-logout, .tb-logout:hover { color: var(--df-ink-soft); }
.tb-logout:hover { background: var(--df-hair); }

/* Segmented controls: the Trail Green thumb Settles to the chosen segment. Scoped to the
   menu; the Profile page's own .theme-toggle keeps its filled-button look. */
.tb-seg-pair .theme-toggle-row { border: 0; margin: 0; padding: 0; gap: var(--space-sm); min-width: 0; }
.tb-seg-pair .theme-toggle { --seg-n: 3; position: relative; gap: 0; }
.tb-seg-pair .theme-toggle-row:nth-child(2) .theme-toggle { --seg-n: 2; }
.tb-seg-pair .theme-toggle::before {
  content: '';
  position: absolute;
  top: var(--space-2xs); bottom: var(--space-2xs); left: var(--space-2xs);
  width: calc((100% - 2 * var(--space-2xs)) / var(--seg-n));
  border-radius: var(--radius-pill);
  background: var(--selected-bg);
  transform: translateX(calc(var(--seg-i, 0) * 100%));
  transition: transform var(--dur-state) var(--ease-move);
}
.tb-seg-pair .theme-toggle-btn { position: relative; z-index: 1; font-size: var(--fs-sm); font-weight: 600; }
.tb-seg-pair .theme-toggle-btn.sel { background: none; color: var(--on-selected); }
.tb-seg-pair .theme-toggle-btn:hover:not(.sel) { background: none; color: var(--df-ink); }

/* Notifications: the band holds the unread count as a figure and Mark all read as a sticker. */
.notification-dropdown-header { padding-bottom: var(--space-xl); }
.notification-band-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); min-height: var(--tap-min); }
.notification-band-count { display: inline-flex; align-items: baseline; gap: var(--space-sm); }
.notification-band-figure { font: 800 40px/1 var(--df-display); font-variant-numeric: tabular-nums; color: var(--df-pin-apricot); }
.notification-band-new { font: 400 var(--fs-sm)/1 var(--df-sans); color: var(--topbar-fg-muted); }
.notification-mark-all {
  min-height: var(--tap-min);
  padding: 0 var(--space-xl);
  border: 2px solid var(--df-pin-keyline);
  border-radius: var(--radius-pill);
  background: var(--df-pin-apricot);
  color: var(--df-pin-deep-green);
  font: 600 var(--fs-sm)/1 var(--df-sans);
  box-shadow: 2px 2px 0 var(--df-pin-keyline);
  cursor: pointer;
}
.notification-mark-all[hidden] { display: none; }
.notification-mark-all:active { transform: translate(2px, 2px); box-shadow: none; }

.notification-list { max-height: 320px; overflow-y: auto; padding: var(--space-xl) var(--space-lg) var(--space-lg); display: flex; flex-direction: column; gap: var(--space-md); }
.notification-empty { padding: var(--space-xl) var(--space-lg); text-align: center; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.notification-list > .notification-item[aria-hidden] { padding: var(--space-lg); border: 2px solid var(--df-hair); border-radius: 10px; }

/* A stub: a 46px side cut off by a dashed perforation holds the type icon. */
.notif-stub {
  position: relative;
  display: grid;
  grid-template-columns: minmax(46px, auto) minmax(0, 1fr);
  width: 100%;
  min-height: var(--tap-min);
  padding: 0;
  border: 2px solid var(--df-ink);
  border-radius: 10px;
  background: var(--df-panel);
  color: var(--df-ink-soft);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  flex: none;
  transition: transform var(--dur-feedback) var(--ease-out), box-shadow var(--dur-feedback) var(--ease-out);
}
.notif-stub:hover { background: var(--df-hair); }
.notif-stub.unread { box-shadow: 2px 2px 0 var(--df-ink); color: var(--df-ink); }
.notif-stub-icon { display: flex; align-items: center; justify-content: center; border-right: 2px dashed var(--df-ink-soft); font-size: var(--fs-md); color: var(--df-ink); }
.notif-stub-avatar { min-width: 56px; }
.notif-stub-initials { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--df-ink); background: var(--df-pin-apricot); color: var(--df-pin-ink); font-size: var(--fs-xs); font-weight: 700; }
.notif-stub-body { display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-md) var(--space-xl) var(--space-md) var(--space-lg); min-width: 0; }
.notification-message { font-size: var(--fs-xs); line-height: 1.35; color: inherit; }
.notif-stub.unread .notification-message { font-weight: 600; }
.notification-time { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.notif-stub-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--info); }
.notif-stub-dot-out { animation: tb-dot-out var(--dur-feedback) var(--ease-out) calc(var(--dot-i, 0) * var(--trace-tick)) both; }
.notification-bell-badge-out { animation: tb-badge-out var(--dur-feedback) var(--ease-out) both; pointer-events: none; }

/* The trigger stays pressed while its menu is open. */
:is(#my-trips-screen, #discover-screen, #stamps-screen, #friends-screen, #profile-screen, #pending-approval-screen, #shared-trip-screen, #invite-screen, #user-profile-screen, #app, #createTripModal) .home-topbar :is(.notification-bell-trigger, .home-profile-trigger)[aria-expanded="true"] {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 rgba(6, 40, 17, 0.45);
}

/* Arrive + Trace on a real open: the panel fades in, the band drops, the tear draws, the
   rows follow a --trace-tick apart (capped at 7 steps, the last starting <=288ms in). Rows
   stay clickable while arriving. The class is removed on a timer by menuPanelOpen(). */
.home-profile-dropdown.arriving, .notification-dropdown.arriving { animation: tb-panel-in var(--dur-feedback) var(--ease-out) both; }
.arriving .tb-band { animation: tb-band-drop var(--dur-view) var(--ease-out) both; }
.arriving .tb-tear::before { animation: tb-tear-draw var(--dur-state) var(--ease-out) var(--delay-beat) both; }
.arriving .tb-menu-body > :is(.tb-seg-pair, .home-profile-item),
.arriving .notif-stub, .arriving .notification-empty { animation: tb-row-in var(--dur-view) var(--ease-out) calc(var(--delay-beat) + var(--i, 0) * var(--trace-tick)) both; }
.arriving .tb-menu-body > :nth-child(1) { --i: 0; }
.arriving .tb-menu-body > :nth-child(3) { --i: 1; }
.arriving .tb-menu-body > :nth-child(4) { --i: 2; }
.arriving .tb-menu-body > :nth-child(5) { --i: 3; }
.arriving .tb-menu-body > :nth-child(6) { --i: 4; }
.arriving .tb-menu-body > :nth-child(7) { --i: 5; }
.arriving .tb-menu-body > :nth-child(n+8) { --i: 6; }
/* One quick reverse on close: no stagger. */
.home-profile-dropdown.closing, .notification-dropdown.closing { animation: tb-panel-out var(--dur-feedback) var(--ease-out) both; }

@keyframes tb-panel-in { from { opacity: 0; } }
@keyframes tb-panel-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes tb-band-drop { from { opacity: 0; transform: translateY(-10px); } }
@keyframes tb-tear-draw { from { transform: scaleX(0); } }
@keyframes tb-row-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes tb-dot-out { to { transform: scale(0); } }
@keyframes tb-badge-out { to { opacity: 0; transform: scale(0); } }

@media (prefers-reduced-motion: reduce) {
  /* Finished and visible, never hidden: no travel, stagger, tear-draw or settle. */
  .home-profile-dropdown.arriving, .notification-dropdown.arriving,
  .arriving .tb-band, .arriving .tb-tear::before,
  .arriving .tb-menu-body > :is(.tb-seg-pair, .home-profile-item),
  .arriving .notif-stub, .arriving .notification-empty,
  .home-profile-dropdown.closing, .notification-dropdown.closing,
  .notif-stub-dot-out, .notification-bell-badge-out { animation: none; }
  .notif-stub-dot-out, .notification-bell-badge-out { display: none; }
  .tb-seg-pair .theme-toggle::before, .notif-stub { transition: none; }
}

/* #6324: the trash icon beside an idea's ⋯ (.idea-delete-btn) shares
   .stop-menu-btn's rules above; this is the day count in its Add to a day list. */
.stop-menu-item-sub { font-size: var(--fs-xs); opacity: .7; margin-left: 6px; }

/* ── Ideas panel: hearts + sort tabs (#6265) ── */
.itin-stop-card.idea-card { position: relative; }
.itin-stop-card.idea-card > .idea-heart { position: absolute; left: var(--space-sm); top: var(--space-sm); z-index: 1; }
.itin-stop-card.idea-card > .stop-summary-row { padding-left: 64px; }
.itin-stop-card.idea-card > .idea-hearted-by { padding-left: 64px; }
/* #6325: opened, these rows are part of the lifted card's header (above the ink
   rule), aligned under the name with the same 64px as the summary row; the
   heart sits inside the keyline and clear of the Main/Sub-Trip stripe. */
.itin-stop-card.idea-card.expanded > .idea-heart { left: var(--space-md); }
.itin-stop-card.idea-card.expanded > .stop-summary-row,
.itin-stop-card.idea-card.expanded > .idea-hearted-by { padding-left: 72px; }
.itin-stop-card.idea-card.expanded > .idea-hearted-by { padding-bottom: var(--space-md); }
/* #6324: the trash beside the ⋯ leaves the name ~70px in the 360px rail, so an
   idea's name wraps to two lines (as the board's "Dotonbori at night" does)
   instead of ellipsising after a few letters. */
.itin-stop-card.idea-card .stop-name-compact {
  white-space: normal; overflow-wrap: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.idea-heart {
  width: 48px; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; border: 1.5px solid var(--border, currentColor); border-radius: 12px; background: transparent; color: inherit;
  font-family: var(--df-sans); line-height: 1; cursor: pointer;
}
.idea-heart-static { cursor: default; border-style: dashed; }
.idea-heart.is-on { background: var(--surface-2, rgba(0,0,0,.06)); }
.idea-heart-glyph { font-size: var(--fs-lg); }
.idea-heart-count { font-size: var(--fs-xs); }
.idea-hearted-by { display: flex; align-items: center; gap: 2px; padding: 0 var(--space-md) var(--space-sm); cursor: pointer; }
.idea-hearted-by .member-avatar { width: 22px; height: 22px; font-size: var(--fs-xs); }
.idea-hearted-more { font-size: var(--fs-xs); margin-left: 4px; }
.ideas-sort-tabs { display: flex; gap: 6px; margin-bottom: var(--space-sm); flex-wrap: wrap; }
.ideas-sort-tab {
  min-height: var(--tap-min); padding: 0 var(--space-md); border: 1.5px solid var(--border, currentColor); border-radius: 999px;
  background: transparent; color: inherit; font: inherit; font-family: var(--df-sans); cursor: pointer;
}
.ideas-sort-tab.is-active { background: var(--surface-2, rgba(0,0,0,.06)); font-weight: 600; }
@keyframes idea-heart-pop { 50% { transform: scale(1.25); } }
.itin-stop-card.idea-heart-pop .idea-heart-glyph { display: inline-block; animation: idea-heart-pop var(--dur-feedback) var(--ease-out); }
@media (prefers-reduced-motion: reduce) {
  .itin-stop-card.idea-heart-pop .idea-heart-glyph { animation: none; }
}

/* #6266 - "Book activities" card: the tour widgets, at the end of the day list. */
.itin-book-activities { margin-top: var(--space-lg); padding: var(--space-lg); background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: 12px; }
.itin-book-activities[hidden] { display: none; }
.itin-book-activities-title { margin: 0 0 var(--space-sm); font-family: var(--df-sans); font-size: var(--fs-md); }

/* ==================== Settings index + drill-in (#6376, #6353) ====================
   The #5987 index with a drill-in frame beside it (>=1024px) or pushed in place
   of it (below). Built to docs/design/trip-settings/screens/01, 02, 03, 13, 14.
   Same cut-stock card, 2px ink keyline and hard press shadow as .set-stub. */
.set-page-head { margin: 0 0 var(--sp-lg); }
.set-page-sub { margin: 0 0 var(--sp-xs); font-size: var(--fs-xs); color: var(--df-ink-soft); }
.set-page-sub:empty { display: none; }
.set-page-title { margin: 0; font-family: var(--df-display); font-size: var(--fs-display-32); font-weight: 800; line-height: 1.05; color: var(--df-ink); }

.set-shell { display: block; }
.set-index { display: flex; flex-direction: column; gap: var(--sp-lg); min-width: 0; }
.set-shell[data-view="drill"] .set-index { display: none; }
.set-index-label {
  margin: 0 0 var(--sp-sm) var(--sp-xs);
  font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--df-ink-soft);
}
.set-index-card {
  background: var(--df-panel); border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  overflow: hidden;
}
.set-row {
  display: flex; align-items: center; gap: var(--sp-md);
  width: 100%; min-height: var(--tap-min); padding: var(--sp-sm) var(--sp-lg);
  background: none; border: 0; border-radius: 0; text-align: left; cursor: pointer;
  font: inherit; color: var(--df-ink); box-shadow: none;
}
.set-index-card > * + * { border-top: var(--edge-hairline); }
/* The open drill row reads as selected: the shared ink fill, not a one-off outline. */
.set-index-card .ui-row[aria-current="true"] { background: var(--selected-bg); color: var(--on-selected); }
.set-index-card .ui-row[aria-current="true"] .ui-row-meta, .set-index-card .ui-row[aria-current="true"] .ui-row-trail, .set-index-card .ui-row[aria-current="true"] .set-row-value, .set-index-card .ui-row[aria-current="true"] .set-row-chev { color: inherit; }
.set-row-icon {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px;
  border: 2px solid var(--df-ink); border-radius: 10px; background: var(--df-panel); font-size: var(--fs-md);
}
.set-row-icon.is-green { background: color-mix(in srgb, var(--df-brand) 18%, var(--df-panel)); }
.set-row-icon.is-amber { background: var(--df-panel); } /* #7103: neutral well; the class name stays for its callers. */
.set-row-icon.is-blue { background: color-mix(in srgb, var(--vn-indigo) 20%, var(--df-panel)); }
.set-row-icon.is-violet { background: color-mix(in srgb, var(--vn-purple) 20%, var(--df-panel)); }
.set-row-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.set-row-name { font-family: var(--df-sans); font-weight: 600; font-size: var(--fs-sm); }
.set-row-sub { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.set-row-value { flex: none; max-width: 55%; text-align: right; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.set-row-chev { flex: none; font-size: var(--fs-md); color: var(--df-ink); }
.set-row-toggle { flex: none; }
.set-row-switch.is-offline .set-row-toggle { opacity: 0.5; }
.set-index-actions { display: flex; gap: var(--sp-sm); padding: var(--sp-md); }
.set-index-btn { flex: 1 1 0; justify-content: center; white-space: nowrap; }
.set-row-value-only { cursor: default; }
.set-row-value-only .set-row-value { max-width: 65%; }
.set-index-note {
  display: flex; align-items: center; gap: var(--sp-sm); margin: 0;
  padding: var(--sp-md); border: 2px dashed var(--df-ink-soft); border-radius: var(--df-radius-stub);
  font-size: var(--fs-xs); color: var(--df-ink-soft);
}
.set-index-note i { flex: none; font-size: var(--fs-md); }
.set-index-foot { display: flex; }
.set-index-host-note { margin: 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }

.set-offline {
  display: flex; align-items: flex-start; gap: var(--sp-sm);
  margin: 0 0 var(--sp-lg); padding: var(--sp-md);
  background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub);
  font-size: var(--fs-xs); color: var(--df-ink);
}
.set-offline[hidden] { display: none; }
.set-offline i { flex: none; font-size: var(--fs-md); }
.set-offline-inline { margin: 0 0 var(--sp-lg); align-items: center; }

.set-drill { min-width: 0; }
.set-drill[hidden] { display: none; }
.set-back {
  display: inline-flex; align-items: center; gap: var(--sp-xs);
  min-height: var(--tap-min); margin: 0 0 var(--sp-lg); padding: 0 var(--sp-md) 0 var(--sp-md);
  background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: 999px;
  box-shadow: var(--df-press); font: inherit; font-weight: 600; color: var(--df-ink); cursor: pointer;
}
.set-drill-head { margin: 0 0 var(--sp-lg); }
.set-drill-eyebrow {
  margin: 0 0 var(--sp-xs); font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--df-ink-soft);
}
.set-drill-title { margin: 0; font-family: var(--df-sans); font-size: var(--fs-2xl); font-weight: 600; line-height: 1.1; color: var(--df-ink); }
.set-drill-title:focus { outline: none; }
.set-drill-pane[hidden] { display: none; }

.set-savebar {
  position: sticky; bottom: calc(var(--sp-md) + env(safe-area-inset-bottom, 0px)); z-index: 5;
  display: flex; align-items: center; gap: var(--sp-md); margin-top: var(--sp-lg);
  padding: var(--sp-sm) var(--sp-md);
  background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub);
}
.set-savebar[hidden] { display: none; }
.set-savebar-msg { flex: 1 1 auto; font-weight: 600; font-size: var(--fs-xs); }
.set-savebar-msg::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: var(--sp-xs); border-radius: 50%; background: var(--info); border: 1.5px solid var(--df-ink); }
.set-savebar.is-offline .set-savebar-msg { color: var(--df-ink-soft); font-weight: 400; }
.set-savebar.is-offline .set-savebar-msg::before { display: none; }
.set-savebar-save:disabled { opacity: 0.5; cursor: not-allowed; }

@media (min-width: 1024px) {
  .set-shell { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: var(--sp-2xl); align-items: start; }
  .set-shell[data-view="drill"] .set-index { display: flex; }
  .set-back { display: none; }
  .set-drill-frame {
    background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub);
    padding: var(--sp-lg) var(--sp-lg) 0; overflow: hidden;
  }
  .set-drill-body { padding-bottom: var(--sp-lg); }
  .set-drill-frame .set-savebar {
    position: static; margin: 0 calc(var(--sp-lg) * -1); border: 0; border-top: var(--edge-hairline);
    border-radius: 0; box-shadow: none; padding: var(--sp-md) var(--sp-lg); background: var(--df-ground);
  }
}

/* #6376 — the index's switches: the shared switch, keylined and green-on like the board. */
.set-row-toggle.consent-switch { border: 2px solid var(--df-ink); box-sizing: border-box; background: var(--df-panel); }
.set-row-toggle.consent-switch:checked { background: var(--df-brand); }
.set-row-toggle.consent-switch::after { top: 2px; left: 2px; }
.set-index-btn i { margin-right: var(--sp-xs); }

/* ── Decision forms and Trip Preferences index (#6351, boards in docs/design/decision-board-preferences/) ── */
.vf-block { width: 100%; margin-top: var(--space-sm); }
.vf-cancel { box-shadow: none; border-color: var(--df-hair); color: var(--df-ink-soft); }
.vf-hint { margin: var(--space-xs) 0 var(--space-md); font: 400 13px/1.45 var(--df-sans); color: var(--df-ink-soft); }
.vf-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
@media (max-width: 380px) { .vf-pair { grid-template-columns: 1fr; } }
.vf-opts { display: grid; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.vf-opt { display: grid; gap: 2px; text-align: left; min-height: var(--tap-min); padding: 10px 14px; border: 2px solid var(--df-ink); border-radius: var(--radius-md, 12px); background: var(--df-panel); color: var(--df-ink); font-family: var(--df-sans); cursor: pointer; }
.vf-opt b { font-size: var(--fs-md); }
.vf-opt small { font-size: var(--fs-sm); color: var(--df-ink-soft); }
.vf-opt:hover, .vf-opt:focus-visible { background: var(--df-ink); color: var(--df-ground); }
.vf-opt:hover small, .vf-opt:focus-visible small { color: inherit; opacity: 0.85; }
.tp-index { display: grid; gap: var(--space-xl); max-width: 640px; }
.tp-group-title { margin: 0 0 var(--space-sm); font: 800 11px/1.3 var(--df-sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft); }
.tp-rows { display: grid; border: 2px solid var(--df-ink); border-radius: var(--radius-md, 12px); overflow: hidden; background: var(--df-panel); }
.tp-row { display: flex; align-items: center; gap: var(--space-md); width: 100%; min-height: 56px; padding: 8px 14px; border: 0; border-bottom: 2px solid var(--df-ink); background: none; color: var(--df-ink); font-family: var(--df-sans); text-align: left; }
.tp-row:last-child { border-bottom: 0; }
button.tp-row { cursor: pointer; }
button.tp-row:hover, button.tp-row:focus-visible { background: var(--df-ground); }
.tp-row-text { flex: 1; min-width: 0; }
.tp-row-title { display: block; font-weight: 600; font-size: var(--fs-md); }
.tp-row-value { display: block; font-size: var(--fs-sm); color: var(--df-ink-soft); overflow-wrap: anywhere; }
.tp-row-chev { font-weight: 800; color: var(--df-ink-soft); }
.tp-places { padding: 10px 14px; }
.tp-places ul { margin: 4px 0 8px 18px; }

/* #6351's small vote sheets (suggest, deadline, finalize, trip prefs) take the
   title face from the shared .df-modal-content rule since #6645, at 700 like
   every other sheet title. */

/* #6351 design-check: each Preferences row is its own card, a question's options are two-line with a tick. */
.tp-rows { gap: var(--space-sm); border: 0; border-radius: 0; overflow: visible; background: none; }
.tp-row { border: 2px solid var(--df-ink); border-radius: var(--radius-md, 12px); background: var(--df-panel); }
.tp-row:last-child { border-bottom: 2px solid var(--df-ink); }
.tp-places { border: 2px solid var(--df-ink); border-radius: var(--radius-md, 12px); background: var(--df-panel); }
#tripPrefModal .wizard-chip > span strong { display: block; }
#tripPrefModal .wizard-chip > span small { display: block; font-size: var(--fs-sm); opacity: 0.85; }
#tripPrefModal .wizard-chip:has(input[type="radio"]:checked) > span { position: relative; padding-right: 28px; }
#tripPrefModal .wizard-chip:has(input[type="radio"]:checked) > span::after { content: "\2713"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font-weight: 800; }

/* #6351 board A7: Finalize is select-then-confirm. */
.vf-opt.is-picked { background: var(--df-ink); color: var(--df-ground); }
.vf-opt.is-picked small { color: inherit; opacity: 0.85; }

/* #6352 — invite page (css/discover.css, .inv-*): every travelling step resolves to
   its finished state, never a hidden one. The waiting ring stays as a static ring. */
@media (prefers-reduced-motion: reduce) {
  .inv-arriving .inv-hero-col,
  .inv-arriving .inv-foil-col,
  .inv-arriving #invite-error > .inv-dead,
  .inv-arriving #invite-error > .inv-btn,
  .inv-settle .inv-errline,
  .inv-settle .inv-wait,
  .inv-settle .inv-q,
  .inv-settle .inv-sub,
  .inv-ring { animation: none; }
  .inv-btn { transition: none; }
}

/* #6422: the stay step slide resolves to its finished state. */
@media (prefers-reduced-motion: reduce) {
  .bk-step { animation: none; }
  .bk-soldout-stamp { animation: none; }
}

/* ── #6379 — "Name, dates & stops" drill-in (js/settings-basics.js) ── */
.set-basics { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-lg); }
.set-basics:disabled { opacity: 0.6; }
.set-basics-field { display: flex; flex-direction: column; gap: var(--sp-xs); min-width: 0; }
.set-basics-field > input[type="text"] { width: 100%; }
.set-basics-msg, .set-basics-leg-msg { margin: 0; min-height: 1.2em; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.set-basics-msg:empty, .set-basics-leg-msg:empty { min-height: 0; }
.set-basics-msg.is-error, .set-basics-leg-msg.is-error { color: var(--danger); font-weight: 600; }
.set-basics-leg-msg.is-warn { color: var(--df-ink); }
.set-basics-leg-new { margin: 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }

/* ── #6380 — "Trip status" drill-in: status line, wrap-up actions, danger zone ── */
.set-status { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-lg); }
.set-status:disabled { opacity: 0.6; }
.set-status-line { display: flex; justify-content: space-between; gap: var(--sp-md); margin: 0 0 var(--sp-md); }
.set-status-line strong { font-weight: 600; text-align: right; }
#set-drill-status .set-danger { border-style: dashed; }
#set-drill-status .set-danger .set-danger-btn { color: var(--error-text); border-color: var(--error); }
#set-drill-status .set-danger-title { font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; }
#set-drill-status .set-status-block .set-block-hint { margin-top: var(--sp-md); }

/* #6381 — "Currency, rate & tax" drill-in (docs/design/trip-settings/, 01/03 Money). Edited fields wear the amber offset until saved. */
.set-money { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-lg); }
.set-money:disabled { opacity: 0.6; }
.set-money-field { display: flex; flex-direction: column; gap: var(--sp-xs); min-width: 0; }
.set-money-field[hidden] { display: none; }
.set-money-box {
  display: flex; align-items: center; gap: var(--sp-sm); min-height: var(--tap-min); padding: 0 var(--sp-md);
  background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub);
}
#set-money-fields .set-money-box > input, #set-money-fields .set-money-box select {
  flex: 1 1 auto; min-width: 0; min-height: var(--tap-min); height: auto; align-self: stretch; margin-block: -2px;
  border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 0;
}
.set-money-control { display: flex; flex: 1 1 auto; align-items: center; justify-content: space-between; gap: var(--sp-sm); min-width: 0; }
.set-money-box .set-field-suffix { color: var(--df-ink-soft); font-size: var(--fs-xs); white-space: nowrap; }
.set-money-box.is-edited { box-shadow: inset 0 0 0 2px var(--info); }
.set-rate-choice.is-edited { box-shadow: 3px 3px 0 var(--info); }
.set-rate-group { display: flex; flex-direction: column; gap: var(--sp-sm); }
.set-rate-choice {
  display: flex; align-items: center; gap: var(--sp-md); min-height: var(--tap-min); padding: var(--sp-sm) var(--sp-md);
  background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub); cursor: pointer;
}
.set-rate-choice:has(input:checked) { box-shadow: var(--df-press); }
.set-rate-choice.is-edited:has(input:checked) { box-shadow: var(--df-press), 3px 3px 0 var(--info); }
.set-rate-choice > span { display: flex; flex-direction: column; gap: 2px; }
.set-rate-choice small { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.set-rate-choice input[type="radio"] { flex: none; width: 20px; height: 20px; min-height: 0; margin: 0; accent-color: var(--df-ink); }
#trip-reopen-destination-row:empty { display: none; }


/* #6382 — "Trip Pass & AI" drill-in (docs/design/trip-settings/, 11 Trip Pass). Two framed cards; Buy is the primary button, Your purchases a quiet one. */
#set-drill-pass { display: flex; flex-direction: column; gap: var(--space-2xl); }
#set-drill-pass[hidden] { display: none; }
.set-pass-card {
  margin: 0; padding: var(--sp-md); background: var(--df-panel);
  border: 2px solid var(--df-ink); border-radius: var(--df-radius-card);
}
.set-pass-card > .set-block-title { font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 var(--sp-md); }
.set-pass-summary { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-sm); font-size: var(--fs-xs); color: var(--df-ink-soft); }
.set-pass-pill {
  padding: 2px var(--sp-md); border: 2px solid var(--df-ink); border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--df-ink);
}
.set-pass-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-md); margin-top: var(--sp-md); }
.set-pass-actions .btn-primary {
  display: inline-flex; align-items: center; gap: var(--sp-xs); width: auto; margin: 0; min-height: var(--tap-min);
  padding: 0 var(--sp-md); border-radius: var(--radius-pill); border: 2px solid var(--df-ink); box-shadow: 3px 3px 0 var(--df-ink); font-weight: 600;
}
.set-pass-actions .btn-primary:disabled { opacity: 0.5; cursor: default; }
.set-pass-radios { margin: 0 0 var(--sp-md); padding: 0; border: 0; min-width: 0; }
.set-pass-radios:disabled { opacity: 0.6; }
#set-drill-pass .set-rate-choice input[type="radio"] { accent-color: var(--df-brand); }
#set-drill-pass .set-rate-choice:has(input:checked) { box-shadow: var(--df-press); }
#set-drill-pass .set-rate-choice.is-edited:has(input:checked) { box-shadow: var(--df-press), 3px 3px 0 var(--info); }
.set-pass-keyrow { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md); min-height: 32px; font-size: var(--fs-xs); color: var(--df-ink); }
.set-pass-keyrow strong { font-weight: 600; text-align: right; }
.set-pass-keyrow .set-pass-quiet { min-height: 0; padding: 0 0 0 var(--sp-xs); font-size: inherit; color: var(--df-brand); }
#ai-key-mode-member-status { font-size: var(--fs-xs); color: var(--df-ink-soft); }
#ai-key-mode-member-status > div { display: flex; justify-content: space-between; gap: var(--space-lg); padding: 2px 0; }


/* #6383 — "Who can see this trip" drill-in (docs/design/trip-settings/, 06 Who Can See). Radio cards; the budget-guide switch sits below as a disabled-looking card until Public. */
#set-drill-visibility { display: flex; flex-direction: column; gap: var(--space-2xl); }
#set-drill-visibility[hidden] { display: none; }
#set-drill-visibility .set-vis-radios { margin: 0 0 var(--sp-md); padding: 0; border: 0; min-width: 0; }
.set-vis-radios:disabled { opacity: 0.6; }
#set-drill-visibility .set-rate-choice input[type="radio"] { accent-color: var(--df-brand); }
.set-vis-switch {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md); min-height: var(--tap-min);
  padding: var(--sp-sm) var(--sp-md); background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub); cursor: pointer;
}
.set-vis-switch > span { display: flex; flex-direction: column; gap: 2px; }
.set-vis-switch small { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.set-vis-switch.is-disabled { cursor: default; opacity: 0.6; }
.set-vis-actions { margin-top: var(--sp-md); }
.set-vis-note { margin: var(--sp-md) 0 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }

/* #6384 — "Discover" drill-in (docs/design/trip-settings/, Sharing rows; follows the app's discover.tsx): the member's post as a small print card, or a dashed empty one. */
#set-drill-discover { display: flex; flex-direction: column; gap: var(--space-2xl); }
#set-drill-discover[hidden] { display: none; }
.set-disc-card {
  display: flex; flex-direction: column; gap: var(--sp-xs); padding: var(--sp-md);
  background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub);
}
.set-disc-card > span, .set-disc-card > small { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.set-disc-empty { align-items: center; text-align: center; border-style: dashed; border-color: var(--df-ink-soft); }
.set-disc-actions { margin: 0; }

/* #6387: the Trip preferences drill-in is one form: each question a card, the edited ones offset in amber like the money drill-in. */
.tp-form { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: var(--space-xl); max-width: 640px; }
.tp-form:disabled { opacity: 0.6; }
.tp-qs { display: grid; gap: var(--space-sm); }
.tp-q { display: grid; gap: var(--space-xs); padding: 12px 14px; border: 2px solid var(--df-ink); border-radius: var(--radius-md, 12px); background: var(--df-panel); }
.tp-q.is-edited { box-shadow: inset 0 0 0 2px var(--info); }
.tp-q-title { margin: 0; font: 700 15px/1.3 var(--df-sans); color: var(--df-ink); }
.tp-q textarea { width: 100%; }
#set-drill-prefs .wizard-chip > span strong { display: block; }
#set-drill-prefs .wizard-chip > span small { display: block; font-size: var(--fs-sm); opacity: 0.85; }

/* ── #6411 (epic #6356, S4–S8) — Day history: the route ledger ──
   Rows hang off a dashed Route Amber rule; the pin colour follows the verb.
   ≥1024px: list left, opened edit in a pane right. Below: the opened edit lifts
   in place under its row. The stamp's finished state is the base rule; the
   Strike only plays under no-preference (see .member-approve-stamp). */
.day-history-modal { max-width: 520px; }
@media (min-width: 1024px) { .day-history-modal.has-open { max-width: 920px; width: 92vw; } }
/* The rule under the header runs edge to edge: undo .modal-content's 2rem padding. */
.dh-header { align-items: flex-start; border-bottom: 2px solid var(--df-ink); margin: 0 -2rem var(--space-md); padding: 0 2rem var(--space-lg); }
.day-history-modal .modal-header h2 { font-family: var(--df-title); font-weight: 700; font-size: var(--fs-xl); letter-spacing: 0; }
.dh-header-text { flex: 1; min-width: 0; }
.dh-eyebrow { font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--df-ink-soft); }
.dh-body { max-height: 70vh; max-height: 70dvh; overflow-y: auto; }
.dh-layout { display: block; }
.dh-pane { display: none; }
@media (min-width: 1024px) {
  .dh-layout.has-open { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: var(--space-xl); }
  /* S5: the pane is a full-height amber column, flush with the header rule and the sheet edges. */
  .day-history-modal.has-open .dh-header { margin-bottom: 0; }
  .day-history-modal.has-open .dh-body { margin: 0 -2rem -2rem; }
  .dh-layout.has-open { gap: 0; }
  .dh-layout.has-open .dh-list { padding: var(--space-md) 2rem 2rem; }
  .dh-pane { display: block; background: var(--df-ground); border-left: 2px solid var(--df-ink); padding: var(--space-md) 2rem 2rem; }
  .dh-inline { display: none; }
}
.dh-group { margin-top: var(--space-xl); }
.dh-list > .dh-group:first-child { margin-top: 0; }
.dh-pane-label, .dh-group { font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--df-ink-soft); margin: var(--space-md) 0 var(--space-sm); }
.dh-list { position: relative; }
.dh-item { position: relative; }
.dh-item::before { content: ''; position: absolute; left: 15px; top: 0; bottom: 0; border-left: 2px dashed var(--vn-amber); }
.dh-row { position: relative; display: flex; align-items: center; gap: var(--space-md); width: 100%; min-height: var(--tap-min); padding: var(--space-sm) 0; background: none; border: 0; color: var(--df-ink); font: inherit; text-align: left; cursor: pointer; }
.dh-row:focus-visible { outline: 2px solid var(--df-ink); outline-offset: 2px; }
.dh-text { flex: 1; min-width: 0; font-size: var(--fs-sm); }
.dh-text strong { font-weight: 600; }
.dh-time { font-size: var(--fs-xs); color: var(--df-ink-soft); font-variant-numeric: tabular-nums; }
.dh-chev { color: var(--df-ink-soft); transition: transform var(--dur-feedback) var(--ease-move); }
.dh-pin { position: relative; z-index: 1; flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--df-ink); background: var(--df-panel); color: var(--df-ink); font-size: var(--fs-sm); }
.dh-pin-add { background: var(--vn-green); border-color: var(--df-ink); color: var(--df-panel); }
.dh-pin-delete { background: var(--danger-solid); border-color: var(--df-ink); color: var(--on-danger); }
.dh-pin-split { background: var(--vn-sky); border-color: var(--df-ink); color: var(--df-panel); }
.dh-pin-move { background: var(--trip-main-accent); border-color: var(--df-ink); color: var(--df-panel); }
.dh-pin-empty { width: 48px; height: 48px; border: 2px dashed var(--vn-amber); background: none; color: var(--vn-amber); font-size: var(--fs-lg); }
.dh-empty-icon { color: var(--df-ink-soft); font-size: var(--fs-lg); }
.dh-empty-title { font-family: var(--df-sans); font-weight: 600; font-size: var(--fs-md); color: var(--df-ink); margin: 0; }
.dh-empty p { margin: 0; max-width: 30ch; }
.dh-inline { margin: var(--space-xs) 6px var(--space-md) 44px; padding: var(--space-lg); background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub); }
.dh-opened { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-sm); }
.dh-opened-who { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.dh-opened-who strong { color: var(--df-ink); }
.dh-print { width: 100%; background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub); padding: var(--space-sm); transform: rotate(-0.8deg); }
.dh-print-band { position: relative; min-height: 84px; border: 2px solid var(--df-ink); border-radius: 6px; overflow: hidden; display: flex; align-items: flex-start; justify-content: flex-end; padding: var(--space-sm); }
.dh-print-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dh-print-title { font-family: var(--df-sans); font-weight: 600; font-size: var(--fs-md); margin-top: var(--space-sm); }
.dh-print-meta, .dh-print-note { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.dh-stamp { position: relative; display: inline-block; padding: 0.1em 0.4em; border: 2px solid currentColor; border-radius: 4px; background: var(--df-panel); font-family: var(--df-sans); font-size: var(--fs-sm); font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; border-width: 3px; box-shadow: inset 0 0 0 2px var(--df-panel), inset 0 0 0 3px currentColor; padding: 0.15em 0.5em; transform: rotate(-4deg); }
.dh-stamp-deleted { color: var(--vn-coral); }
.dh-stamp-back { color: var(--vn-green); }
.dh-print.is-restored .dh-print-title { text-decoration: none; }
@media (prefers-reduced-motion: no-preference) {
  .dh-stamp-back.is-struck { animation: dh-strike var(--dur-strike) var(--ease-slam) both; }
}
@keyframes dh-strike {
  0%   { opacity: 0; transform: rotate(-12deg) scale(1.8); }
  55%  { opacity: 1; transform: rotate(-4deg) scale(0.95); }
  100% { transform: rotate(-4deg) scale(1); }
}
.dh-nocopy { font-size: var(--fs-sm); }
.dh-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-xs); }
.dh-actions:empty { display: none; }
.dh-btn { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: var(--tap-min); padding: 0 var(--space-lg); border: 2px solid var(--df-ink); border-radius: 999px; background: var(--df-panel); color: var(--df-ink); font-family: var(--df-sans); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; box-shadow: var(--df-press); transition: transform var(--dur-feedback) var(--ease-out), box-shadow var(--dur-feedback) var(--ease-out); }
.dh-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.dh-btn:disabled { opacity: 0.6; cursor: default; }
.dh-btn:focus-visible { outline: 2px solid var(--df-ink); outline-offset: 2px; }
.dh-btn-primary { background: var(--vn-green); color: var(--df-panel); }
.dh-empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-md); padding: var(--space-2xl) var(--space-lg); text-align: center; color: var(--df-ink-soft); }
.dh-row-skel { position: relative; display: flex; align-items: center; gap: var(--space-md); padding: var(--space-sm) 0; }

/* ── #6410 (epic #6356, S1–S3) — Split day sheet: the fork ──
   Trunk chips → Splits pill → two lanes (the side names are the lane heads)
   → Joins pill → trunk. Who goes where is one two-way switch per person.
   The join-back-up page reuses the fork with a radio per lane. Pills,
   switches and buttons keep 44px targets; the fork's Arrive plays only under
   no-preference, so reduced motion shows the finished lanes. */
.split-sheet { max-width: 520px; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.ss-header { align-items: flex-start; gap: var(--space-sm); margin: 0; padding: 1.25rem 1.5rem 1rem; border-bottom: 2px solid var(--df-ink); }
.ss-header-text { flex: 1; min-width: 0; }
.ss-eyebrow { font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--df-ink-soft); }
.split-sheet .modal-header h2 { font-family: var(--df-title); font-weight: 700; font-size: var(--fs-xl); letter-spacing: 0; }
.ss-back { flex: none; min-width: var(--tap-min); min-height: var(--tap-min); margin: -4px 0 0 -12px; border: 0; background: none; color: var(--df-ink); font-size: var(--fs-lg); cursor: pointer; border-radius: 999px; }
.ss-back:focus-visible { outline: 2px solid var(--df-ink); outline-offset: 2px; }
/* The shared .xk-sheet-handle, drawn on the board's bottom sheets: phones only, decorative. */
.ss-handle, .dh-handle { background: var(--df-hair); }
.ss-handle { display: none; }
@media (max-width: 680px) { .ss-handle { display: block; margin-top: 10px; } .split-sheet .ss-header { padding-top: 0.75rem; } }
.ss-body { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: var(--space-md); }
.ss-foot { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; padding: 0.875rem 1.5rem 1.125rem; border-top: 2px solid var(--df-ink); }
.ss-lede { margin: 0; font-size: var(--fs-sm); color: var(--df-ink); }
.ss-notice { display: flex; gap: var(--space-sm); align-items: flex-start; border: 2px dashed var(--df-ink); border-radius: var(--df-radius-stub); padding: var(--space-md); background: var(--df-ground); font-size: var(--fs-xs); }
.ss-notice.cor { border-color: var(--info); color: var(--info); background: var(--info-light); }
.ss-notice i { font-size: var(--fs-md); flex: none; }

.ss-fork { display: flex; flex-direction: column; align-items: stretch; }
.ss-trunk { display: flex; flex-direction: column; align-items: center; gap: var(--space-xs); }
.ss-trunk:empty { display: none; }
.ss-chipstop { display: inline-flex; align-items: center; gap: var(--space-sm); max-width: 100%; background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: 999px; padding: 4px 12px 4px 5px; font-size: var(--fs-xs); }
.ss-chipstop .t { background: var(--vn-amber); color: var(--df-ink); border-radius: 999px; padding: 1px 8px; font-weight: 600; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.ss-chipstop .shd { color: var(--df-ink-soft); font-size: var(--fs-xs); }
.ss-vdash { width: 0; height: 12px; border-left: 2px dashed var(--vn-amber); margin: 0 auto; }
.ss-node { display: flex; justify-content: center; }
.ss-tpill { position: relative; display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 36px; padding: 0 var(--space-md); border: 2px solid var(--df-ink); border-radius: 999px; background: var(--df-ground); box-shadow: 2px 2px 0 var(--df-ink); font-weight: 600; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; cursor: pointer; }
.ss-tpill .k { font-weight: 600; color: var(--df-ink-soft); }
/* The real input sits invisibly over the whole pill (offsets reach past its 2px border, which the box it is
   positioned against excludes), 44px tall against the 36px pill, so the target is native (a tap, the keyboard and the picker all reach it) while the pill reads as text.
   16px keeps iOS from zooming on focus. The selector out-specifies .df-modal-content's input rule. */
.split-sheet .ss-tpill input.ss-time-over[type="time"]:not([type="radio"]):not([type="checkbox"]) { position: absolute; top: -6px; bottom: -6px; left: -2px; right: -2px; width: auto; height: auto; min-height: 0; padding: 0; border: 0; border-radius: 999px; background: transparent; box-shadow: none; opacity: 0; font-size: 16px; cursor: pointer; z-index: 1; }
.ss-tclear { position: relative; z-index: 2; flex: none; width: 20px; height: 20px; margin-right: -4px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--df-ink-soft); font-size: var(--fs-xs); display: inline-grid; place-items: center; cursor: pointer; }
/* Visibly small, 44px to hit: the target reaches past the glyph (css/CLAUDE.md). */
.ss-tclear::before { content: ''; position: absolute; left: 50%; top: 50%; width: max(44px, 100%); height: max(44px, 100%); transform: translate(-50%, -50%); }
.ss-tclear:focus-visible { outline: 2px solid var(--df-ink); outline-offset: 1px; }
.ss-tpill:focus-within { outline: 2px solid var(--df-ink); outline-offset: 2px; }
.ss-y { display: block; width: 100%; height: 22px; overflow: visible; }
.ss-y path { fill: none; stroke-width: 2; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.ss-y path.m { stroke: var(--trip-main-accent); }
.ss-y path.s { stroke: var(--vn-sky); }
.ss-lanes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.ss-lane { position: relative; min-width: 0; border: 2px solid var(--trip-main-accent); background: var(--trip-main-bg); border-radius: var(--df-radius-stub); padding: var(--space-sm); }
.ss-lane.sub { border-color: var(--vn-sky); background: var(--vn-sky-light); }
.ss-lname { display: flex; align-items: center; gap: var(--space-xs); border-bottom: 2px solid var(--trip-main-accent); padding-bottom: var(--space-xs); margin-bottom: var(--space-xs); min-height: 30px; }
.ss-lane.sub .ss-lname { border-color: var(--vn-sky); }
.ss-lname > i { color: var(--df-ink-soft); flex: none; }
.split-sheet .ss-lname input[type="text"].ss-lname-input:not([type="radio"]):not([type="checkbox"]) { flex: 1; min-width: 0; width: auto; height: var(--tap-min); min-height: var(--tap-min); margin: -7px 0; border: 0; background: none; padding: 0; font-family: var(--df-sans); font-weight: 600; font-size: var(--fs-md); color: var(--df-ink); box-shadow: none; border-radius: 0; }
.ss-lname input.ss-lname-input::placeholder { color: var(--trip-main-accent); opacity: 1; }
.ss-lane.sub .ss-lname input.ss-lname-input::placeholder { color: var(--vn-sky-text); }
.ss-lname input.ss-lname-input:focus-visible { outline: 2px solid var(--df-ink); outline-offset: 2px; border-radius: 4px; }
.ss-lstop { display: flex; gap: var(--space-xs); align-items: baseline; font-size: var(--fs-xs); line-height: 1.3; padding: 4px 0 4px 10px; margin-left: 3px; border-left: 2px dashed var(--trip-main-accent); }
.ss-lane.sub .ss-lstop { border-color: var(--vn-sky); }
.ss-lstop .t { flex: none; font-weight: 600; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.ss-lstop.copy { opacity: 0.7; }
.ss-lempty { font-size: var(--fs-xs); color: var(--vn-sky-text); padding: 6px 0 4px 10px; margin-left: 3px; border-left: 2px dashed var(--vn-sky); }
.ss-lane.main .ss-lempty { color: var(--df-ink-soft); border-color: var(--trip-main-accent); }
.ss-lfoot { display: flex; align-items: center; gap: var(--space-xs); margin-top: var(--space-sm); font-size: var(--fs-xs); color: var(--df-ink-soft); }
.ss-stack { display: flex; }
.ss-stack .ss-av { margin-left: -7px; }
.ss-stack .ss-av:first-child { margin-left: 0; }
.ss-av { flex: none; width: 30px; height: 30px; border-radius: 999px; border: 2px solid var(--df-ink); display: inline-grid; place-items: center; color: var(--df-panel); font-weight: 700; font-size: var(--fs-xs); }
.ss-av.s { width: 24px; height: 24px; font-size: var(--fs-xs); }
.split-sheet { --ss-indigo: var(--vn-indigo); --ss-purple: var(--vn-purple); }
.ss-av-1 { background: var(--vn-trail-green); }
.ss-av-2 { background: var(--vn-coral); }
.ss-av-3 { background: var(--ss-indigo); }
.ss-av-4 { background: var(--vn-amber-text); }
.ss-av-5 { background: var(--ss-purple); }
.ss-av-6 { background: var(--vn-sky-text); }
/* Join back up: the kept lane is ruled heavier, the other's stops struck. */
.ss-lane.keep { border-color: var(--df-ink); border-width: 3px; }
.ss-lane.drop { opacity: 0.85; }
.ss-struck { text-decoration: line-through; text-decoration-color: var(--danger); text-decoration-thickness: 2px; }
.ss-flag { position: absolute; top: -12px; right: 10px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border: 2px solid var(--df-ink); border-radius: 999px; padding: 1px 8px; background: var(--vn-green); color: var(--df-panel); }
.ss-flag.dl { background: var(--danger-solid); color: var(--on-danger); }
.ss-radio { display: flex; align-items: center; gap: var(--space-sm); width: 100%; min-height: var(--tap-min); margin: -7px 0; border: 0; background: none; padding: 0; text-align: left; color: var(--df-ink); cursor: pointer; }
.ss-radio .dot { flex: none; width: 22px; height: 22px; border-radius: 999px; border: 2px solid var(--df-ink); background: var(--df-panel); display: grid; place-items: center; }
.ss-radio.on .dot::after { content: ''; width: 10px; height: 10px; border-radius: 999px; background: var(--df-ink); }
.ss-radio .nm { font-family: var(--df-sans); font-weight: 600; font-size: var(--fs-md); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-radio:focus-visible { outline: 2px solid var(--df-ink); outline-offset: 2px; border-radius: 6px; }

.ss-switch { display: flex; align-items: center; gap: var(--space-md); min-height: var(--tap-min); border: 0; background: none; padding: 0; text-align: left; font: inherit; font-size: var(--fs-sm); color: var(--df-ink); cursor: pointer; }
.ss-switch .tg { flex: none; position: relative; width: 44px; height: 26px; border-radius: 999px; border: 2px solid var(--df-ink); background: var(--df-panel); transition: background var(--dur-state) var(--ease-out); }
.ss-switch .tg::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 999px; background: var(--df-ink); transition: transform var(--dur-state) var(--ease-move); }
.ss-switch .tg.on { background: var(--vn-green); }
.ss-switch .tg.on::after { transform: translateX(18px); background: var(--df-panel); }
.ss-switch:focus-visible { outline: 2px solid var(--df-ink); outline-offset: 2px; border-radius: 6px; }

.ss-who { display: flex; flex-direction: column; gap: var(--space-xs); }
.ss-secl { font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--df-ink-soft); }
.ss-hint { margin: 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.ss-prow { display: flex; align-items: center; gap: var(--space-md); min-height: 52px; border-bottom: 2px dashed var(--df-hair); }
.ss-prow:last-child { border-bottom: 0; }
.ss-prow .pn { flex: 1; min-width: 0; font-weight: 600; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-prow .you { margin-left: 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--df-ink-soft); }
.ss-seg { flex: none; display: inline-flex; border: 2px solid var(--df-ink); border-radius: 999px; overflow: hidden; background: var(--df-panel); }
.ss-seg button { min-height: var(--tap-min); max-width: 110px; padding: 0 var(--space-md); border: 0; background: none; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: var(--df-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.ss-seg button + button { border-left: 2px solid var(--df-ink); }
.ss-seg button.m.on { background: var(--trip-main-accent); color: var(--df-panel); }
.ss-seg button.s.on { background: var(--vn-sky); color: var(--df-panel); }
.ss-seg button:focus-visible { outline: 2px solid var(--df-ink); outline-offset: -4px; }
.ss-tally { display: flex; flex-wrap: wrap; gap: var(--space-md); font-size: var(--fs-xs); color: var(--df-ink-soft); }
.ss-tally b { color: var(--df-ink); }
.ss-tally .dot { display: inline-block; width: 9px; height: 9px; border-radius: 99px; margin-right: 4px; }
.ss-tally .dot.m { background: var(--trip-main-accent); }
.ss-tally .dot.s { background: var(--vn-sky); }

.ss-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: var(--tap-min); padding: 0 var(--space-xl); border: 2px solid var(--df-ink); border-radius: 999px; background: var(--df-panel); color: var(--df-ink); font-family: var(--df-sans); font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; cursor: pointer; box-shadow: var(--df-press); transition: transform var(--dur-feedback) var(--ease-out), box-shadow var(--dur-feedback) var(--ease-out); }
.ss-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.ss-btn:disabled { opacity: 0.6; cursor: default; }
.ss-btn:focus-visible { outline: 2px solid var(--df-ink); outline-offset: 2px; }
.ss-btn.quiet { border-color: transparent; background: none; box-shadow: none; }
.ss-btn.dangtxt { color: var(--danger-text); }
.ss-btn.pri { background: var(--vn-green); color: var(--df-panel); }
.ss-btn.dang { background: var(--danger-solid); color: var(--on-danger); }
.ss-btn.full { flex: 1; }
.ss-btn.ss-push { margin-left: auto; }

@media (prefers-reduced-motion: no-preference) {
  .ss-fork.is-arriving .ss-lane.main { animation: ss-lane-l var(--dur-view) var(--ease-out) both; }
  .ss-fork.is-arriving .ss-lane.sub { animation: ss-lane-r var(--dur-view) var(--ease-out) var(--delay-beat) both; }
}
@keyframes ss-lane-l { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@keyframes ss-lane-r { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

/* #6544/#6411 — the Day history sheet draws the same handle on phones (board S4–S8). */
.dh-handle { display: none; }
@media (max-width: 680px) { .day-history-modal .dh-handle { display: block; margin: -1.25rem auto 0.75rem; } }

/* #6612 — banner while the open trip is a saved offline copy. */
.offline-copy-notice { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; padding: 10px 16px; text-align: center; font-size: 14px; background: var(--df-ink); color: var(--df-panel); }

/* #6745 - floating Add stop pill (DESIGN.md, Floating add pill). Below 1024px it takes
   the .exp-tab-add recipe (fixed, brand fill, keyline, Press shadow, above the tab bar)
   by sharing that rule; the panel reserves 6rem so it never covers the last day. From
   1024px the per-day Add stop rows serve. */
.itin-add-pill { display: none; }
@media (max-width: 1023px) {
  .itin-add-pill { display: inline-flex; }
  .itin-add-pill[hidden] { display: none; }
  #panel-itinerary { padding-bottom: 6rem; }
}

/* ===== Top-level bottom bar (#6754, slice 1 of #6579; direction A "Same bar") =====
   The trip tab bar look (.tabs: Cut Stock, a 2px ink keyline on top, an icon over a 12px label,
   the current tab in the selected ink fill, the travelling marker) for My Trips, Stamps, Discover
   and Profile. Below 1024px only: from 1024px the account menu is the navigation. Centred at the
   trip bar 680px max-width on tablets. js/top-level-bar.js shows it from the address. */
.tl-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  max-width: 680px;
  margin: 0 auto;
  background: var(--df-panel);
  border-top: 2px solid var(--df-ink);
  padding: 8px max(12px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-right));
}
.tl-bar[hidden] { display: none; }
.tl-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--selected-bg);
  opacity: var(--tab-ind-op, 0);
  transform: translateX(var(--tab-ind-x, 0px));
  transition: transform var(--dur-state) var(--ease-move);
  pointer-events: none;
}
.tl-tab {
  flex: 1 1 0;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border: none;
  border-radius: var(--df-radius-stub);
  background: none;
  color: var(--df-ink-soft);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
}
.tl-tab i { font-size: var(--fs-xl); transition: transform var(--dur-state) var(--ease-out); }
.tl-tab.active { background: var(--selected-bg); color: var(--on-selected); font-weight: 600; }
.tl-tab.active i { transform: translateY(-1px) scale(1.06); }
.tl-tab:focus-visible { outline: 2px solid var(--df-ink); outline-offset: 2px; }
/* The pages that carry the bar clear it (bar + safe area), so nothing scrolls under it. */
@media (max-width: 1023px) {
  body.has-tl-bar #my-trips-screen,
  body.has-tl-bar #discover-screen,
  body.has-tl-bar #stamps-screen,
  body.has-tl-bar #profile-screen { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
}
@media (min-width: 1024px) { .tl-bar, .tl-bar[hidden] { display: none; } }
/* #6755: hidden while a text field has focus on a phone (js/top-level-bar.js sets .tl-kbd-open). */
.tl-bar { transition: transform var(--dur-state) var(--ease-move); }
body.tl-kbd-open .tl-bar { transform: translateY(100%); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .tl-bar, .tl-bar::after, .tl-tab i { transition: none; } .tl-tab.active i { transform: none; } }

/* Left the trip (#6805, board D5): a collapsed section under the roster. */
.former-members { margin-top: var(--space-xl); border-top: 2px dashed var(--df-hair); }
.former-members[hidden] { display: none; }
.former-head {
  display: flex; align-items: center; gap: var(--space-md); width: 100%; min-height: var(--tap-min);
  padding: var(--space-lg) 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.former-title { flex: 1; font-family: var(--df-title); font-weight: 700; font-size: var(--fs-lg); line-height: 1.15; }
.former-count {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 var(--space-sm); border-radius: 999px;
  background: var(--df-panel); color: var(--df-ink); border: 2px solid var(--df-ink);
  font-size: var(--fs-xs); font-weight: 700;
}
.former-chev { font-size: var(--fs-lg); }
.former-list[hidden] { display: none; }
.former-row { border-top: 2px dashed var(--df-hair); }

/* ===== Stub notice (#6855, slice 1 of #6363; direction A "Stub notices") =====
   A ticket stub that carries a short notice: label, name and a small line above a dashed
   perforation, the outcome below it. Shared by Verify email, Reset password and "No longer on
   this trip" (docs/design/small-surfaces/). A container, not a control: 2px keyline, no shadow.
   Desktop: a centred column on the ground with no card around it, as Route In is. */
.stub-notice-col {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.stub-notice {
  position: relative;
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  color: var(--df-ink);
}
.stub-notice-top { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; }
.stub-notice-label { font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 600; color: var(--df-ink-soft); letter-spacing: 0.08em; }
.stub-notice-top b { font-family: var(--df-title); font-weight: 600; font-size: var(--fs-xl); line-height: 1.15; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.stub-notice-top small { font-size: var(--fs-sm); color: var(--df-ink-soft); }
.stub-notice-perf { position: relative; height: 0; margin: 0 12px; border-top: 2px dashed var(--df-ink); }
.stub-notice-perf::before,
.stub-notice-perf::after {
  content: '';
  position: absolute;
  top: -10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--df-ground);
  border: 2px solid var(--df-ink);
}
.stub-notice-perf::before { left: -23px; clip-path: inset(0 0 0 50%); }
.stub-notice-perf::after { right: -23px; clip-path: inset(0 50% 0 0); }
.stub-notice-bottom { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-size: var(--fs-sm); font-weight: 600; }
.stub-notice.void .stub-notice-top b { color: var(--df-ink-soft); }
.stub-notice-soft { color: var(--df-ink-soft); font-weight: 400; }
.stub-notice-pill { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border: 2px solid currentColor; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; line-height: 1.6; white-space: nowrap; }
.stub-notice-pill.ok { color: var(--df-brand); }
.stub-notice-pill.err { color: var(--danger-text); }
/* The in-flight state: Route Amber marching along the stub. */
.stub-notice-route {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
/* #6989 — static dashes on a pseudo 16px wider than the track; the march is a
   translateX of one period, on the compositor. */
.stub-notice-route::before {
  content: '';
  position: absolute;
  inset: 0 0 0 -16px;
  background: repeating-linear-gradient(90deg, var(--df-amber) 0 8px, transparent 8px 16px);
  animation: stub-notice-march 1.2s linear infinite;
}
@keyframes stub-notice-march { to { transform: translateX(16px); } }
.stub-notice-title { margin: 8px 0 0; font-family: var(--df-title); font-weight: 600; font-size: var(--fs-2xl); line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
.stub-notice-body { margin: 0; font-size: var(--fs-md); line-height: 1.5; color: var(--df-ink-soft); }
.stub-notice-mark { width: 48px; height: 48px; color: var(--df-ink); flex: none; }
.stub-notice-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.stub-notice-quiet { min-height: var(--tap-min); border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--df-ink); cursor: pointer; }
@media (max-width: 680px) {
  .stub-notice-col { min-height: calc(100dvh - 140px); }
  .stub-notice-mark { margin-top: auto; }
  .stub-notice-actions { margin-top: auto; padding-top: 16px; }
}
/* Reduced motion: the line holds still, still drawn. */
@media (prefers-reduced-motion: reduce) { .stub-notice-route::before { animation: none; } }
/* A notice screen drops the auth card and the tagline: the stub is the card (desktop: a centred column on the ground). */
#auth-panel.stub-notice-mode .landing-subtitle,
#auth-panel.stub-notice-mode .ap-lockup { display: none; }
#auth-panel.stub-notice-mode .ap-card { padding: 0; background: none; border: none; border-radius: 0; margin-top: 24px; }
#auth-panel .stub-notice-title { margin: 8px 0 0; text-align: left; font-family: var(--df-title); font-size: var(--fs-2xl); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; }

/* #6856 (slice 2 of #6363): Reset password and the forgot form take the stub-notice layout. */
.stub-notice-back { display: none; width: var(--tap-min); height: var(--tap-min); padding: 0; align-items: center; justify-content: center; border: 2px solid var(--df-ink); border-radius: 50%; background: transparent; color: var(--df-ink); font-size: var(--fs-lg); cursor: pointer; }
@media (max-width: 680px) {
  .stub-notice-back { display: inline-flex; }
  .stub-notice-col .stub-notice-actions .stub-notice-quiet:not(:only-child) { margin-top: 0; }
  #reset-password-fields .stub-notice-actions .stub-notice-quiet { display: none; }
}
.ap-pw-wrap { position: relative; }
.ap-pw-wrap input { padding-right: 52px; }
/* Edge draws its own reveal button; ours is the only eye (#7695). Own rule: other engines drop an unknown selector. */
.ap-pw-wrap input::-ms-reveal { display: none; }
.ap-pw-eye { position: absolute; top: 0; bottom: 0; right: 0; margin: auto 0; width: var(--tap-min); height: max(100%, var(--tap-min)); display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--df-ink-soft); font-size: var(--fs-xl); cursor: pointer; }
#auth-reset-password-form .ap-field-hint { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; }
.stub-notice-col .form-group { margin: 0; }
#auth-panel .stub-notice-col .form-label { text-transform: none; letter-spacing: 0; font-size: var(--fs-md); font-weight: 600; color: var(--df-ink); }
/* #6856: the board's field. White fill, 12px radius, a green ring on focus, a rust ring and an alert icon on error. */
#auth-panel .stub-notice-col input[type] { min-height: 50px; border-radius: 12px; background: light-dark(var(--df-pin-field), rgba(255, 238, 218, 0.06)); }
#auth-panel .stub-notice-col input:focus { outline: none; border-color: var(--df-brand); box-shadow: 0 0 0 3px light-dark(#dcefdf, rgba(16, 112, 42, 0.35)); }
#auth-panel .stub-notice-col input[aria-invalid="true"],
#auth-panel .stub-notice-col input[aria-invalid="true"]:focus { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-light); outline: none; }
#auth-panel .stub-notice-col .ap-field-error { color: var(--danger-text); font-size: var(--fs-sm); }
#auth-panel .stub-notice-col .ap-field-error.is-visible { display: flex; gap: 6px; align-items: center; }
#auth-panel .stub-notice-col .ap-field-error.is-visible::before { content: "\ea06"; font-family: "tabler-icons"; font-weight: 400; font-size: var(--fs-md); }

/* #6857 (slice 3 of #6363): No longer on this trip, W-N1 to W-N3. The stub's lower half is torn off, in ink. */
.nlm-col { max-width: 460px; }
.stub-notice.torn { border-bottom-style: dashed; border-radius: var(--df-radius-card) var(--df-radius-card) 4px 4px; }
.stub-notice.torn .stub-notice-bottom { font-weight: 400; }
.nlm-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 12px; border: 2px solid #8A5610; border-radius: 12px; background: light-dark(#f8e2c2, rgba(186, 117, 23, 0.2)); font-size: var(--fs-sm); line-height: 1.4; }
.nlm-note i { margin-top: 2px; }
@media (min-width: 681px) {
  .nlm-col .stub-notice-actions { margin-top: 8px; align-items: flex-start; }
  .nlm-col .stub-notice-actions .btn-primary { width: auto; }
}
@media (max-width: 680px) {
  #no-longer-member-stub { margin-top: auto; }
  .nlm-col .stub-notice-actions { margin-top: auto; }
}
/* ── Shared button + chip kit (#6765, #6757 slice 5) ──
   The web half of the one button and one chip every tab migrates to (app/components/Button.tsx,
   FilterChip.tsx are the phone half). Prefix `ui-`; markup from uiButton()/uiChip() in js/ui.js.
   Reads role tokens and the --sp-* steps only. Pressable edge weight (#6636): 2px ink keyline plus a
   hard offset shadow that presses on hover/active. Selected is the One Selected Look (#6634). */
.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  padding: 0 var(--sp-xl);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-control);
  background: var(--df-panel);
  color: var(--df-ink);
  box-shadow: var(--df-press);
  font: inherit;
  font-family: var(--df-sans);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-feedback) var(--ease-out), box-shadow var(--dur-feedback) var(--ease-out), color var(--dur-feedback) var(--ease-out);
}
.ui-btn:hover { transform: translate(2px, 2px); box-shadow: var(--df-press-hover); }
.ui-btn:active { transform: translate(4px, 4px); box-shadow: var(--df-press-active); }
.ui-btn:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 3px; box-shadow: var(--df-press); }
.ui-btn--primary { background: var(--df-brand); color: var(--df-brand-fg); }
.ui-btn--secondary { background: var(--df-panel); color: var(--df-ink); }
.ui-btn--danger { background: var(--error-solid); color: var(--df-brand-fg); }
.ui-btn--ghost { background: transparent; border-color: transparent; box-shadow: none; }
.ui-btn--ghost:hover { transform: none; box-shadow: none; color: var(--df-brand); }
.ui-btn--ghost:active { transform: none; box-shadow: none; }
.ui-btn--ghost:focus-visible { box-shadow: none; }
.ui-btn--lg { min-height: 56px; padding: 0 var(--sp-xl); box-shadow: var(--df-press-large); }
.ui-btn--lg:hover { box-shadow: 3px 3px 0 var(--df-ink); }
.ui-btn--lg:active { box-shadow: var(--df-press-active); }
.ui-btn--lg:focus-visible { box-shadow: var(--df-press-large); }
/* Printed disabled (#7084, DESIGN.md Printed states): no shadow, no press, a dashed soft-ink keyline,
   soft-ink text on the panel stock; never opacity. In flight (aria-busy) is excluded: the guard sets
   `disabled` too, but a busy button stays seated and keeps its own fill. */
.ui-btn:is([disabled], [aria-disabled="true"]):not([aria-busy="true"]) {
  background: var(--df-panel); color: var(--df-ink-soft); border: 2px dashed var(--df-ink-soft);
  cursor: not-allowed; transform: none; box-shadow: none;
}
.ui-btn--ghost:is([disabled], [aria-disabled="true"]):not([aria-busy="true"]) { background: transparent; border-color: transparent; }
/* In flight: seated (Press Active), label kept, three route dots after 300ms. */
.ui-btn[aria-busy="true"] { transform: translate(4px, 4px); box-shadow: none; cursor: progress; position: relative; }
.ui-btn--ghost[aria-busy="true"] { transform: none; }
.ui-btn[aria-busy="true"]::after {
  content: ""; width: 4px; height: 4px; border-radius: 50%; flex: none; margin-left: var(--sp-xs, 4px);
  background: var(--df-ink); color: var(--df-ink);
  box-shadow: 8px 0 0 currentColor, 16px 0 0 currentColor; margin-right: 16px;
  opacity: 0; animation: ui-btn-route 1s steps(1, end) 300ms infinite;
}
.ui-btn--primary[aria-busy="true"]::after, .ui-btn--danger[aria-busy="true"]::after { background: var(--df-amber); color: var(--df-amber); }
@keyframes ui-btn-route { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.ui-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  min-height: var(--tap-min);
  padding: 0 var(--sp-lg);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
  color: var(--df-ink);
  font: inherit;
  font-family: var(--df-sans);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color var(--dur-feedback) var(--ease-out), color var(--dur-feedback) var(--ease-out);
}
.ui-chip:hover { background: var(--edge-tone); }
.ui-chip:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 3px; box-shadow: none; }
.ui-chip[aria-pressed="true"], .ui-chip.is-selected { background: var(--selected-bg); border-color: var(--selected-bg); color: var(--on-selected); }
.ui-chip[disabled], .ui-chip[aria-disabled="true"] { border: 2px dashed var(--df-ink-soft); color: var(--df-ink-soft); background: var(--df-panel); cursor: not-allowed; }
.ui-chip[disabled]:hover, .ui-chip[aria-disabled="true"]:hover { background: var(--df-panel); }
.ui-chip[aria-pressed="true"]:hover, .ui-chip.is-selected:hover { background: var(--selected-bg); }

@media (prefers-reduced-motion: reduce) {
  .ui-btn, .ui-chip { transition: none; }
  .ui-btn[aria-busy="true"]::after { animation: none; opacity: 1; }
}
/* ── Shared segmented control + field kit (#6766, #6757 slice 6) ──
   The web half of the one segmented control and one field every tab migrates to (app/components/
   Segmented.tsx and Field.tsx are the phone half). Prefix `ui-`; markup from uiSegmented()/uiField()
   in js/ui.js. Role tokens and the --sp-* steps only. Segmented is a container (2px ink keyline, no
   shadow); selected is the One Selected Look (#6634). The field input takes its size from the shared
   input rule (16px / 44px on phones and touch, #4432; the shared date rule), never its own. */
.ui-seg {
  display: flex;
  gap: var(--sp-xs);
  padding: var(--sp-xs);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
}
.ui-seg-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  min-height: var(--tap-min);
  padding: 0 var(--sp-md);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--df-ink);
  font: inherit;
  font-family: var(--df-sans);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-feedback) var(--ease-out), color var(--dur-feedback) var(--ease-out);
}
.ui-seg-btn:hover { background: var(--edge-tone); }
.ui-seg-btn:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 3px; }
.ui-seg-btn[aria-checked="true"], .ui-seg-btn[aria-pressed="true"], .ui-seg-btn.is-selected { background: var(--selected-bg); color: var(--on-selected); }
.ui-seg-btn[aria-checked="true"]:hover, .ui-seg-btn[aria-pressed="true"]:hover, .ui-seg-btn.is-selected:hover { background: var(--selected-bg); }
/* Printed disabled (#7085): no opacity. The whole control is a dashed soft-ink container; one option is
   soft-ink text struck through. A disabled selected segment keeps its place on the tone fill. */
.ui-seg[aria-disabled="true"] { border: 2px dashed var(--df-ink-soft); }
.ui-seg-btn[disabled], .ui-seg-btn[aria-disabled="true"] { color: var(--df-ink-soft); cursor: not-allowed; text-decoration: line-through; text-decoration-thickness: 1.5px; }
.ui-seg[aria-disabled="true"] .ui-seg-btn { text-decoration: none; }
.ui-seg[aria-disabled="true"] .ui-seg-btn[aria-checked="true"] { background: var(--edge-tone); }
.ui-seg-btn[disabled]:hover, .ui-seg-btn[aria-disabled="true"]:hover { background: transparent; }
/* A selected option that is itself disabled sits on the tone fill, not the ink one: struck soft-ink on ink fails contrast (#7085). */
.ui-seg-btn[disabled][aria-checked="true"], .ui-seg-btn[disabled][aria-checked="true"]:hover { background: var(--edge-tone); }
.ui-seg[aria-disabled="true"] .ui-seg-btn[aria-checked="true"]:hover { background: var(--edge-tone); }

.ui-field { display: flex; flex-direction: column; gap: var(--sp-xs); }
.ui-field-label { font-family: var(--df-sans); font-weight: 600; color: var(--df-ink); }
.ui-field-control {
  box-sizing: border-box;
  width: 100%;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-stub); /* a field is cut, not pressed: it does not take the pill */
  background: var(--df-panel);
  color: var(--df-ink);
}
.ui-field-control:focus { outline: 3px solid var(--df-brand); outline-offset: 3px; border-color: var(--df-ink); box-shadow: none; }
.ui-field-control[aria-invalid="true"] { border-color: var(--error-solid); }
.ui-field-control[disabled] { border: 2px dashed var(--df-ink-soft); background: var(--edge-tone); color: var(--df-ink-soft); -webkit-text-fill-color: var(--df-ink-soft); opacity: 1; cursor: not-allowed; box-shadow: none; }
.ui-field-hint { margin: 0; color: var(--df-ink-soft); }
.ui-field-error { margin: 0; color: var(--error-text); font-weight: 600; }

/* The read-only value (#7085): caption label over a value, or a keylined list of label/value rows. */
.ui-value { display: flex; flex-direction: column; gap: var(--sp-xs); }
.ui-value-label { font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 400; line-height: 1.3; color: var(--df-ink-soft); }
.ui-value-text { font-family: var(--df-sans); font-weight: 600; color: var(--df-ink); overflow-wrap: anywhere; }
.ui-value-rows { margin: 0; padding: 0; border: 2px solid var(--df-ink); border-radius: var(--radius-stub); background: var(--df-panel); }
.ui-value-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-md); padding: var(--sp-md); }
.ui-value-row + .ui-value-row { border-top: var(--edge-hairline); }
.ui-value-row dt { margin: 0; font-family: var(--df-sans); color: var(--df-ink-soft); }
.ui-value-row dd { margin: 0; font-family: var(--df-sans); font-weight: 600; color: var(--df-ink); text-align: right; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  .ui-seg-btn { transition: none; }
}
/* ── Shared row + sheet kit (#6767, #6757 slice 7) ──
   The web half of the one list row and one sheet every tab migrates to (app/components/Row.tsx and
   Sheet.tsx are the phone half). Prefix `ui-`; markup from uiRow()/uiList()/uiSheet() in js/ui.js.
   Role tokens and the --sp-* steps only. A list is a container (2px ink keyline, no shadow); rows
   inside it are split by the grouping weight (--edge-hairline), never on a page ground. A sheet is a
   container too, on the existing openModal()/closeModal() helpers, so scroll lock, focus trap, Escape
   and the bottom sheet below 680px come from them. */
.ui-list {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  background: var(--df-panel);
  overflow: hidden;
}
.ui-list-item + .ui-list-item { border-top: var(--edge-hairline); }
.ui-row {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  min-height: var(--tap-min);
  padding: var(--sp-sm) var(--sp-lg);
  border: 0;
  background: transparent;
  color: var(--df-ink);
  font: inherit;
  font-family: var(--df-sans);
  text-align: left;
  text-decoration: none;
}
.ui-row-lead, .ui-row-trail { flex: none; display: inline-flex; align-items: center; gap: var(--sp-sm); }
.ui-row-trail { color: var(--df-ink-soft); }
.ui-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-xs); }
.ui-row-title { font-weight: 600; overflow-wrap: anywhere; }
.ui-row-meta { color: var(--df-ink-soft); overflow-wrap: anywhere; }
button.ui-row, a.ui-row {
  width: 100%;
  cursor: pointer;
  transition: background-color var(--dur-feedback) var(--ease-out), color var(--dur-feedback) var(--ease-out);
}
button.ui-row:hover, a.ui-row:hover { background: var(--edge-tone); }
.ui-row:focus-visible { outline: 3px solid var(--df-brand); outline-offset: -3px; }
.ui-row[aria-pressed="true"] { background: var(--selected-bg); color: var(--on-selected); }
.ui-row[aria-pressed="true"] .ui-row-meta, .ui-row[aria-pressed="true"] .ui-row-trail { color: inherit; }
.ui-row[aria-pressed="true"]:hover { background: var(--selected-bg); }
/* Printed disabled (#7086): no opacity. The lead turns dashed, the title soft ink; the reason is the meta. */
.ui-row[disabled], .ui-row[aria-disabled="true"] { color: var(--df-ink-soft); cursor: not-allowed; }
.ui-row[disabled] .ui-row-title, .ui-row[aria-disabled="true"] .ui-row-title { color: var(--df-ink-soft); }
.ui-row[disabled] .ui-row-lead, .ui-row[aria-disabled="true"] .ui-row-lead { border: 2px dashed var(--df-ink-soft); border-radius: var(--radius-stub); color: var(--df-ink-soft); background: transparent; }
.ui-row[disabled]:hover, .ui-row[aria-disabled="true"]:hover { background: transparent; }
/* A row frozen by a cancelled trip or a pending view (#7087, board A7) is static, not disabled: ink title,
   solid icon tile, no chevron that promises an action. */
.ui-row[data-cancelled-static] { cursor: default; }
.ui-row[data-cancelled-static] .ui-row-title { color: var(--df-ink); }
.ui-row[data-cancelled-static] .ui-row-lead { border: 0; border-radius: var(--radius-stub); color: var(--df-ink); background: var(--df-chip-fill); }
[data-cancelled-static] .stop-expand-caret, [data-cancelled-static] .set-row-chev { display: none; }

/* Failed row (#7086, A6): Danger keyline round the lead, "Didn't save" in Danger Ink, a 44px Retry. */
.ui-row-lead--error { min-width: var(--tap-min); min-height: var(--tap-min); justify-content: center; border: 2px solid var(--error-solid); border-radius: var(--radius-stub); color: var(--error-text); }
.ui-row-meta--error { color: var(--error-text); font-weight: 600; }
.ui-row-retry { display: inline-flex; align-items: center; gap: var(--sp-xs); min-height: var(--tap-min); min-width: var(--tap-min); padding: 0 var(--sp-sm); border: 0; background: transparent; color: var(--error-text); font: inherit; font-family: var(--df-sans); font-weight: 600; cursor: pointer; }
.ui-row-retry:hover { background: var(--edge-tone); }
.ui-row-retry:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 3px; }

/* Empty stub (#7086, A4): replaces a list. Dashed soft-ink keyline, stub radius, a 40px tone disc. */
.ui-empty { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-sm); padding: var(--sp-lg); border: 2px dashed var(--df-ink-soft); border-radius: var(--radius-stub); text-align: left; }
.ui-empty-disc { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--edge-tone); color: var(--df-ink); font-size: var(--fs-lg); }
.ui-empty-title { margin: 0; font-family: var(--df-sans); font-size: var(--fs-sm); font-weight: 600; color: var(--df-ink); }
.ui-empty-caption { margin: 0; color: var(--df-ink-soft); max-width: 32ch; }
/* A0/A4: the action keeps its own width and sits under the text; two actions wrap to a second row rather than squeeze. */
.ui-empty-action { display: flex; flex-wrap: wrap; gap: var(--sp-sm); margin-top: var(--sp-xs); }
.ui-empty-action .ui-btn { min-height: var(--tap-min); justify-content: center; white-space: nowrap; }
/* One Add action at a time: while a stub's action shows, the tab's floating add pill hides. */
#panel-expenses:has(.ui-empty-action) .exp-tab-add,
#panel-bookings:has(.ui-empty-action) .bk-add-btn,
#panel-checklist:has(.ui-empty-action) .cl-add-pill,
#panel-itinerary:has(.ui-empty-action) .itin-add-pill { display: none; }

/* Read-only lock note (#7087, A7/A8): a dashed soft-ink stub, a lock in ink. Never Danger. */
.ui-lock-note { display: flex; align-items: flex-start; gap: var(--sp-md); padding: var(--sp-md); border: 2px dashed var(--df-ink-soft); border-radius: var(--radius-stub); color: var(--df-ink); }
.ui-lock-note-icon { flex: none; font-size: var(--fs-lg); color: var(--df-ink); }
.ui-lock-note-text { flex: 1; min-width: 0; }
.ui-lock-note-title { margin: 0; font-family: var(--df-sans); font-size: var(--fs-sm); font-weight: 600; color: var(--df-ink); }
.ui-lock-note-caption { margin: var(--sp-xs) 0 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.trip-lock-host:empty { display: none; }
.trip-lock-host { margin: 0 0 var(--sp-md); }

/* Failure notice (#7086, A3/A5): a Danger keyline, a Danger Ink title, a soft-ink caption, optional retry. */
.ui-notice { display: flex; align-items: flex-start; gap: var(--sp-md); padding: var(--sp-md); border: 2px solid var(--error-solid); border-radius: var(--radius-stub); background: var(--df-panel); }
.ui-notice-icon { flex: none; font-size: var(--fs-lg); color: var(--error-text); }
.ui-notice-text { flex: 1; min-width: 0; }
.ui-notice-title { margin: 0; font-family: var(--df-sans); font-weight: 600; color: var(--error-text); }
.ui-notice-caption { margin: var(--sp-xs) 0 0; color: var(--df-ink-soft); overflow-wrap: anywhere; }
.ui-notice-action { flex: none; align-self: center; }
.ui-sheet-notice { margin: var(--sp-md) 0; scroll-margin-block-end: 96px; } /* scrollIntoView clears the sticky footer under it */
/* A5: the tab-load notice stacks its action under the text, and the tab keeps only its title above it. */
.ui-notice--stacked { flex-wrap: wrap; }
.ui-notice--stacked .ui-notice-text { flex: 1 1 calc(100% - 40px); }
.ui-notice--stacked .ui-notice-action { flex: 1 1 100%; align-self: flex-start; padding-left: calc(var(--fs-lg) + var(--sp-md)); }
#panel-bookings.tab-load-failed :is(#bookings-summary, #bookings-decide, .pane-resizer, .bk-add-btn),
#panel-expenses.tab-load-failed > :not(.exp-tab-head, .tab-load-notice),
#panel-expenses.tab-load-failed .exp-tab-add { display: none; }
/* The load-failed notice spans the whole panel grid: at 1280 it is otherwise auto-placed into the narrow rail column (#7086). */
@media (min-width: 1280px) { #panel-expenses.tab-load-failed .tab-load-notice { grid-column: 1 / -1; grid-row: 2; } }
/* The tab title stays over the failure notice, even when the Today layout would hide the phone title (#7086). */
@media (max-width: 1023.98px) { #panel-bookings.tab-load-failed .bk-title-phone { display: block; } }
.ui-sheet-loading { display: flex; flex-direction: column; gap: var(--sp-md); }

/* The sheet host is the existing .modal; the panel is .modal-content.ui-sheet, so openModal() finds it. */
.modal-content.ui-sheet {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
  max-width: 520px;
  padding: var(--sp-lg) var(--sp-xl) var(--sp-xl);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  background: var(--df-panel);
  color: var(--df-ink);
  box-shadow: none; /* a sheet is a container: keyline only */
}
.ui-sheet-head { display: flex; align-items: center; gap: var(--sp-md); }
.ui-sheet-titles { flex: 1; min-width: 0; }
.ui-sheet-eyebrow { margin: 0 0 var(--sp-xs); font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--df-ink-soft); }
.ui-sheet-title { flex: 1; margin: 0; font-family: var(--df-title); font-size: var(--fs-xl); font-weight: 700; line-height: 1.15; color: var(--df-ink); }
.ui-sheet-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--df-ink);
  font: inherit;
  cursor: pointer;
  transition: background-color var(--dur-feedback) var(--ease-out);
}
.ui-sheet-close:hover { background: var(--edge-tone); }
.ui-sheet-close:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 3px; }
/* #7352: the slow-down and paused sheets (js/human-check.js). */
.human-check-msg { margin: 0; font-family: var(--df-sans); color: var(--df-ink); }
.ai-paused-clock { display: flex; align-items: center; gap: var(--sp-md); padding: var(--sp-md); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); }
.ai-paused-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--tap-min); height: var(--tap-min); border-radius: var(--radius-pill); background: var(--edge-tone); }
.ai-paused-at { margin: 0; font-family: var(--df-sans); font-weight: 600; }
.ai-paused-left { margin: 0; font-family: var(--df-sans); color: var(--df-ink-soft); }
.ai-paused-note { color: var(--df-ink-soft); }
.ai-paused-mistake { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap-min); font-family: var(--df-sans); font-weight: 600; color: var(--df-brand); text-decoration: none; }
.ui-sheet-body { display: flex; flex-direction: column; gap: var(--sp-md); }
.ui-sheet-foot { display: flex; flex-direction: column; gap: var(--sp-sm); padding-top: var(--sp-lg); border-top: var(--edge-hairline); }
@media (max-width: 680px) {
  .modal-content.ui-sheet { max-width: 100%; border-radius: var(--df-radius-card) var(--df-radius-card) 0 0; }
  /* The grab bar: a bottom sheet reads as one when it shows where it came from. */
  .modal-content.ui-sheet::before {
    content: "";
    align-self: center;
    width: var(--sp-3xl);
    height: var(--sp-xs);
    margin-bottom: calc(var(--sp-sm) * -1);
    border-radius: var(--radius-pill);
    background: var(--edge-tone);
  }
}
@media (prefers-reduced-motion: reduce) {
  button.ui-row, a.ui-row, .ui-sheet-close { transition: none; }
}
/* #6821 — struck glyph in a trip tab: the <i> keeps the .tab i sizing, the inline SVG fills it. */
.struck-glyph { display: inline-flex; line-height: 1; }
.struck-glyph svg { display: block; width: 1em; height: 1em; }

/* #6857 W-N2: the board's green Lancong bar sits across the top; the stub and title keep their place below it. */
.nlm-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; height: 56px; padding: 0 var(--space-xl); background: var(--topbar-bg); border-bottom: 2px solid var(--df-ink); }
.nlm-bar { gap: 10px; color: #FFE3C4; font-family: var(--df-display); font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.02em; }
.nlm-bar svg { flex: none; width: 26px; height: 26px; }
.nlm-col .stub-notice-body { color: var(--df-ink); }

/* #6858 (slice 4 of #6363): Report sheet, W-R1 to W-R5. Bottom sheet on phones comes from .modal; 440px dialog on desktop. */
.report-sheet { max-width: 440px; display: flex; flex-direction: column; gap: var(--space-lg); }
.report-sheet .modal-header { margin-bottom: 0; }
.report-sheet .form-group { margin: 0; }
.report-single-target { margin: 0; font-size: var(--fs-sm); color: var(--df-ink-soft); }
.rs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rs-banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 2px solid #8A5610; border-radius: 12px; background: light-dark(#f8e2c2, rgba(186, 117, 23, 0.2)); font-size: var(--fs-sm); line-height: 1.4; }
.rs-banner i { margin-top: 1px; }
.rs-banner-err { border-color: var(--danger); background: var(--danger-light); color: var(--danger-text); }
.rs-actions { display: flex; flex-direction: column; gap: 4px; }
.rs-actions .btn-primary { width: 100%; }
@media (min-width: 681px) {
  .rs-actions { flex-direction: row-reverse; justify-content: flex-start; align-items: center; gap: var(--space-sm); }
  .rs-actions .btn-primary { width: auto; }
}
.report-sheet .modal-header { gap: 12px; }
.report-sheet .modal-header > i { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border: 2px solid var(--df-ink); border-radius: 50%; background: light-dark(#ffe3c4, #2a2118); color: var(--df-ink) !important; }
.report-sheet .modal-header h2 { font-family: var(--df-title); }
.report-sheet .form-label { text-transform: none; letter-spacing: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--df-ink); margin-bottom: 8px; }
.report-sheet textarea { background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: 12px; }
.report-sheet .btn-primary { box-shadow: var(--df-press); min-height: 52px; border-radius: 999px; }
.rs-chips .ui-chip { box-shadow: 2px 2px 0 var(--df-ink); }
.rs-chips .ui-chip[aria-pressed="true"] { background: var(--df-ink); border-color: var(--df-ink); color: var(--df-panel); }
/* Crew stickers (#6838, DESIGN.md Components -> People: crew stickers; boards
   docs/design/group-identity/). A die-cut pill, 2px ink keyline, panel stock.
   Not pressable, so no offset shadow. Tilt is set inline from trip order. */
.crew-row { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-sm); min-width: 0; }
.crew-row-rest { display: none; }
.crew-row.is-open .crew-row-rest { display: contents; }
.crew-sticker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: 0 var(--sp-sm) 0 0;
  border: 2px solid var(--df-ink);
  border-radius: 999px;
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-weight: 600;
  font-size: var(--fs-sm);
  line-height: 18px;
  white-space: nowrap;
}
.crew-sticker-disc { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: 0 0 22px; margin: 2px; }
.crew-sticker-initial { display: inline-flex; align-items: center; justify-content: center; background: var(--edge-tone); font-size: 12px; }
.crew-sticker.is-you { outline: 2px solid var(--df-ink); outline-offset: 2px; }
.crew-sticker.is-notyet { border-style: dashed; background: transparent; color: var(--df-ink-soft); transform: none; }
.crew-sticker-paid {
  position: absolute; top: calc(-1 * var(--sp-sm)); right: calc(-1 * var(--sp-xs));
  padding: 0 var(--sp-xs); border: 2px solid var(--df-coral); border-radius: 3px;
  color: var(--df-coral); background: var(--df-panel);
  font-size: var(--fs-xs); font-weight: 800; line-height: 14px; letter-spacing: 0.06em;
  transform: rotate(8deg);
}
.crew-sticker-tag {
  margin-left: 0; padding: 0 var(--sp-xs); border: 2px solid var(--df-ink); border-radius: 4px;
  background: var(--df-panel); font-size: 12px; line-height: 14px;
}
.crew-sticker-more { padding: 0 var(--sp-sm); cursor: pointer; }
.crew-sticker-more::before { content: ''; position: absolute; left: 50%; top: 50%; width: max(44px, 100%); height: var(--tap-min); transform: translate(-50%, -50%); }
.vote-row-who { flex-wrap: wrap; }
.vote-row-notyet { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-sm); margin-top: var(--sp-sm); }
.vote-row-nobody { font-size: var(--fs-sm); color: var(--df-ink-soft); }
.vote-row-notyet-label { font-size: var(--fs-xs); color: var(--df-ink-soft); }
@media (prefers-reduced-motion: reduce) { .crew-sticker { transition: none; } }

/* #6840 — Settle up: payer sticker -> payee sticker, balances carry the owes tag. */
.settle-flow { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--sp-sm); min-width: 0; }
.settle-flow-arrow { color: var(--df-ink-soft); }
.balance-name .crew-sticker { margin-right: var(--sp-xs); }
.crew-sticker-paid.is-striking { animation: crew-paid-strike var(--dur-strike) var(--ease-slam) both; }
@keyframes crew-paid-strike {
  from { transform: rotate(-4deg) scale(1.85); opacity: 0; }
  to   { transform: rotate(8deg) scale(1); opacity: 1; }
}
/* Reduced motion: the stamp appears at rest, already landed. */
@media (prefers-reduced-motion: reduce) { .crew-sticker-paid.is-striking { animation: none; } }

/* #6858 follow-up: take the board's sheet and dialog chrome exactly (W-R1 to W-R5). */
.report-sheet { gap: 14px; }
.report-sheet .modal-header > i { width: 48px; height: 48px; }
.report-sheet .modal-header h2 { font-size: var(--fs-xl); font-weight: 700; line-height: 1.15; }
.report-sheet .modal-close { width: 44px; height: 44px; box-shadow: 2px 2px 0 var(--df-ink); }
.report-sheet .modal-close:focus { outline: none; }
.report-sheet .btn-primary { min-height: 48px; box-shadow: 3px 3px 0 var(--df-ink); }
.report-sheet .btn-primary:disabled { opacity: 0.45; box-shadow: none; }
.rs-actions .stub-notice-quiet { min-height: 48px; }
.report-sheet .rs-banner-err { order: 99; }
@media (max-width: 680px) {
  .report-sheet { border: 2px solid var(--df-ink); border-bottom: 0; border-radius: 22px 22px 0 0; padding: 10px 18px 28px; }
  .report-sheet::before { content: ""; display: block; flex: none; width: 42px; height: 5px; border-radius: 9px; background: light-dark(rgba(16, 26, 20, 0.22), rgba(255, 238, 218, 0.25)); margin: 0 auto 2px; }
  .report-sheet.rs-nocancel .rs-actions .stub-notice-quiet, .report-sheet.rs-failed .rs-actions .stub-notice-quiet { display: none; }
}
@media (min-width: 681px) {
  .report-sheet { width: 440px; border: 2px solid var(--df-ink); border-radius: 18px; padding: 20px 22px 22px; }
  .rs-actions { flex-direction: row; justify-content: flex-end; }
  .rs-actions .btn-primary { order: 2; }
}

.report-sheet textarea { min-height: 84px; height: 84px; resize: none; }
.report-sheet textarea { font-size: 16px; line-height: 1.45; padding: 10px 12px; }
.report-sheet .btn-primary, .rs-actions .stub-notice-quiet { font-size: 16px; font-weight: 600; }
.report-sheet .form-group { display: flex; flex-direction: column; }
.report-sheet .rs-chips .ui-chip { font-size: 14px; font-weight: 600; }

/* #6860 (slice 6 of #6363): guest prompt and guest sign-out, W-G1, W-G2, W-S1, W-S2. Same sheet and dialog chrome as the
   report sheet (.report-sheet); these two add a body line and an action stack. */
.gsx-sheet .gsx-body { margin: 0; font-size: var(--fs-md); line-height: 1.45; color: var(--df-ink-soft); }
.gsx-sheet .gsx-body strong { color: var(--df-ink); }
.gsx-sheet.gsx-danger .modal-header > i { border-color: var(--danger); background: var(--danger-light); color: var(--danger-text) !important; }
.gsx-actions .btn-primary, .gsx-actions .btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; font-size: 16px; font-weight: 600; box-shadow: 3px 3px 0 var(--df-ink); }
.gsx-actions .btn-secondary { background: var(--df-panel); color: var(--df-ink); border: 2px solid var(--df-ink); }
.gsx-actions .btn-secondary.gsx-danger-btn { background: var(--df-panel); color: var(--danger-text); border-color: var(--danger); box-shadow: 3px 3px 0 var(--danger); }
@media (min-width: 681px) {
  .gsx-actions { flex-direction: row-reverse; justify-content: flex-start; align-items: center; gap: 10px; }
  .gsx-actions .btn-primary, .gsx-actions .btn-secondary { width: auto; }
}
.gsx-actions .btn-primary, .gsx-actions .btn-secondary { white-space: nowrap; }
@media (min-width: 681px) {
  .gsx-actions .btn-primary, .gsx-actions .btn-secondary { padding: 0 14px; font-size: 14px; }
  .gsx-actions .stub-notice-quiet { font-size: 14px; }
}
@media (min-width: 681px) { .gsx-actions .btn-primary { order: 0; } }
@media (min-width: 681px) { .gsx-sheet .modal-header h2 { font-size: var(--fs-lg); } }

/* #6847 — the viewer's crew sticker lands with the arrival stamp: the same Strike,
   a beat behind it, so the screen still has one loud moment. */
.arrival-stack { display: flex; flex-direction: column; align-items: center; gap: var(--sp-md); max-width: 100%; }
.arrival-sticker .crew-sticker { animation: arrival-strike var(--dur-strike) var(--ease-slam) var(--dur-feedback) both; }
@media (prefers-reduced-motion: reduce) {
  .arrival-sticker .crew-sticker { animation: none; }
  .vote-row.is-landed { animation: none; }
}

/* Settings index rows sit on the shared .ui-row: the value stays on one line and the
   title gives way first (#6770). */
.set-index-card .ui-row-trail .set-row-value { max-width: none; white-space: nowrap; }
/* Offline locks a row with a padlock; it is not dimmed (the approved 13/14 boards). */
.set-index-card .ui-row[disabled] { opacity: 1; cursor: default; }

/* #6842 — crew stickers on the My Trips card (a pile, no overlap #7546) and the
   People rows (a sticker leads the row; the row is the control). */
.crew-pile { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-xs) var(--sp-sm); min-width: 0; margin-top: var(--sp-sm); }
/* #7546 — no overlap: a sticker carries a name, and the next one hid its end. */
.crew-pile .crew-sticker-more { padding: 0 var(--sp-sm); cursor: inherit; }
.crew-pile .crew-sticker-more::before { content: none; }
.member-item > .crew-sticker { flex: none; margin-right: var(--sp-sm); }

/* #6845 — The Kopitiam Chit (DESIGN.md -> Signature; boards docs/design/group-identity/,
   "R2 applied"). Instant Stock paper in BOTH themes, like a photo print, so the
   chit pins color-scheme: light and Info Ink's light value. Words and figures in
   Info Ink, dotted leaders, a ruled total, a zigzag tear at the foot, tilt <= 1.5deg.
   No new typeface; never a tax ID, merchant name, address or receipt number. */
.kopitiam-chit {
  --chit-ink: var(--info); /* Info Ink; light-dark() resolves light under color-scheme: light */
  color-scheme: light;
  position: relative;
  background: var(--df-instant-stock);
  color: var(--chit-ink);
  padding: var(--sp-md) var(--sp-lg) calc(var(--sp-lg) + var(--sp-sm));
  font-family: var(--df-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.45;
  transform: rotate(var(--chit-tilt, 0deg));
  box-shadow: 0 1px 0 color-mix(in srgb, var(--chit-ink) 18%, transparent);
  -webkit-mask: linear-gradient(black 0 0) top / 100% calc(100% - 8px) no-repeat, conic-gradient(from -45deg at bottom, transparent, black 1deg 89deg, transparent 90deg) bottom / 12px 8px repeat-x;
          mask: linear-gradient(black 0 0) top / 100% calc(100% - 8px) no-repeat, conic-gradient(from -45deg at bottom, transparent, black 1deg 89deg, transparent 90deg) bottom / 12px 8px repeat-x;
}
.kopitiam-chit-hd, .kopitiam-chit-tot { display: flex; justify-content: space-between; gap: var(--sp-md); font-weight: 800; }
.kopitiam-chit-hd { padding-bottom: var(--sp-xs); margin-bottom: var(--sp-sm); border-bottom: 1.5px solid var(--chit-ink); letter-spacing: 0.04em; font-size: var(--fs-xs); font-weight: 700; }
.kopitiam-chit-tot { margin-top: var(--sp-sm); padding-top: var(--sp-xs); border-top: 1.5px solid var(--chit-ink); font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.chit-dots { display: none; }
.kopitiam-chit .chit-dots, .kopitiam-chit--day .chit-dots { display: block; flex: 1 1 auto; min-width: var(--sp-md); align-self: center; border-bottom: 1.5px dotted color-mix(in srgb, var(--chit-ink) 55%, transparent); }
.kopitiam-chit .settle-row-line { gap: var(--sp-sm); }
.kopitiam-chit :where(.settle-sentence, .settle-amount, .settle-row-meta, .settle-history, .settle-group-title, .exp-strong, .money-dir, .settle-flow-arrow, .settle-others > summary) { color: var(--chit-ink); }
.kopitiam-chit .settle-mine .settle-group, .kopitiam-chit .settle-mine { padding: 0; background: none; border: 0; box-shadow: none; }
.kopitiam-chit .settle-mine .settle-row + .settle-row, .kopitiam-chit .settle-mine .settle-group + .settle-group { border-top: 0; }
.kopitiam-chit .settle-others { margin-top: var(--sp-sm); }
.kopitiam-chit .settle-action-btn, .kopitiam-chit .settle-link-btn { color: var(--chit-ink); }
/* A settled line is struck through, the way a cashier crosses it off. */
.kopitiam-chit .settle-row.is-settled .settle-sentence, .kopitiam-chit .settle-row.is-settled .settle-row-amt .settle-amount { position: relative; opacity: 0.6; }
.kopitiam-chit .settle-row.is-settled .settle-sentence::after, .kopitiam-chit .settle-row.is-settled .settle-row-amt .settle-amount::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px solid var(--chit-ink); pointer-events: none; }
.kopitiam-chit .settle-others > summary.xk-disclosure { color: var(--chit-ink); border: 0; border-top: 1.5px dotted var(--chit-ink); border-radius: 0; box-shadow: none; background: none; padding-inline: 0; }
/* The circled PAID: the screen's one Strike when the last transfer is paid. */
.kopitiam-chit.has-paid { padding-bottom: calc(var(--sp-3xl) + var(--sp-xl)); }
.kopitiam-chit-paid {
  position: absolute; right: var(--sp-lg); bottom: var(--sp-lg);
  display: grid; place-items: center; width: var(--sp-3xl); height: var(--sp-3xl);
  border: 2px solid var(--chit-ink); border-radius: 50%;
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.05em; opacity: 0.85;
  transform: rotate(-14deg);
}
.kopitiam-chit-paid.is-striking { animation: chit-paid-strike var(--dur-strike) var(--ease-slam) both; }
@keyframes chit-paid-strike {
  from { transform: rotate(-4deg) scale(1.85); opacity: 0; }
  to   { transform: rotate(-14deg) scale(1); opacity: 0.85; }
}
@media (prefers-reduced-motion: reduce) { .kopitiam-chit-paid.is-striking { animation: none; } }
.settle-ctas { display: flex; flex-direction: column; gap: var(--sp-sm); margin-top: var(--sp-lg); }
.settle-ctas .settle-group-cta { width: 100%; margin-top: 0; justify-content: center; }
/* The Expenses day total: the same chit, small. */
.kopitiam-chit--day {
  margin-left: auto; padding: var(--sp-xs) var(--sp-md) calc(var(--sp-xs) + var(--sp-sm));
  min-width: calc(var(--sp-4xl) * 2 + var(--sp-md)); font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0; text-transform: none; text-align: left;
}
.kopitiam-chit-ln { display: flex; gap: var(--sp-xs); align-items: baseline; font-variant-numeric: tabular-nums; }
.kopitiam-chit-ln .chit-fig { flex: none; font-weight: 800; }

/* #6934 (board M1) - "Everyone": one list, a direction column, a right-aligned amount. */
.everyone-list { display: block; }
.everyone-row + .everyone-row { border-top: var(--edge-hairline); }
.everyone-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--sp-md); padding: var(--sp-md) 0; min-height: var(--tap-min); list-style: none; cursor: default; }
summary.everyone-line { cursor: pointer; }
summary.everyone-line::-webkit-details-marker { display: none; }
.everyone-dir { font-size: var(--fs-sm); color: var(--df-ink-soft); text-align: left; line-height: 1.4; }
.everyone-amt { font-family: var(--df-display); font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; min-width: 6ch; line-height: 1.4; }
.everyone-detail { padding: 0 0 var(--sp-md); }

/* #6966 - the autosave tick (flashSaved(), js/ui.js): beside the control that saved, then gone. */
.saved-tick { display: inline-flex; align-items: center; gap: var(--sp-xs); margin-inline: var(--sp-sm); font-size: var(--fs-xs); font-weight: 600; color: var(--df-ink); white-space: nowrap; animation: saved-tick-in var(--dur-feedback) var(--ease-out) both; transition: opacity var(--dur-state) var(--ease-out); }
.saved-tick.is-leaving { opacity: 0; }
.saved-tick--error { white-space: normal; color: var(--error-text); }
@keyframes saved-tick-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .saved-tick { animation: none; transition: none; } }

/* #6970: rules shown in the control's state */
.sharing-seg-btn .sharing-lock-reason, .set-lock-reason { display: block; font-size: var(--fs-xs); font-weight: 400; }
.set-readonly-value { display: flex; gap: var(--sp-sm); align-items: flex-start; }
.set-readonly-value small { display: block; color: var(--df-ink-soft); }

/* Password rule checklist (#6980): one look for register, reset and change-password. */
.pw-checklist { list-style: none; margin: var(--sp-xs, 4px) 0 0; padding: 0; font-size: var(--fs-xs, 12px); color: var(--df-ink-soft); }
.pw-checklist li::before { content: "○"; display: inline-block; width: 1.25em; }
.pw-checklist li.pw-ok { color: var(--success-text, var(--df-ink)); }
.pw-checklist li.pw-ok::before { content: "✓"; }

/* #7190 — the hard Press shadow as pseudo-elements (pattern: features/stamps.css).
   ::before is the ink shadow, ::after repaints the face on top (background and
   border inherited, so danger/hover colours follow); only transform animates.
   --press-bw is the control's own border width, so the pair covers its border box. */
:where(.app .btn-primary, .app .btn-secondary, .df-modal-content .btn-primary, .df-modal-content .btn-secondary, #confirm-itinerary-wrap .btn-primary, #panel-bookings .btn-secondary) {
  --press-bw: 0px;
  position: relative;
  isolation: isolate;
}
.app .btn-primary::before, .app .btn-secondary::before, .df-modal-content .btn-primary::before, .df-modal-content .btn-secondary::before, #confirm-itinerary-wrap .btn-primary::before, #panel-bookings .btn-secondary::before, .app .btn-primary::after, .app .btn-secondary::after, .df-modal-content .btn-primary::after, .df-modal-content .btn-secondary::after, #confirm-itinerary-wrap .btn-primary::after, #panel-bookings .btn-secondary::after {
  content: '';
  position: absolute;
  inset: calc(-1 * var(--press-bw, 0px));
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}
.app .btn-primary::before, .app .btn-secondary::before, .df-modal-content .btn-primary::before, .df-modal-content .btn-secondary::before, #confirm-itinerary-wrap .btn-primary::before, #panel-bookings .btn-secondary::before {
  background: var(--df-ink);
  transform: translate(4px, 4px);
  transition: transform var(--dur-feedback) var(--df-ease);
}
.app .btn-primary::after, .app .btn-secondary::after, .df-modal-content .btn-primary::after, .df-modal-content .btn-secondary::after, #confirm-itinerary-wrap .btn-primary::after, #panel-bookings .btn-secondary::after {
  border: inherit;
  background: inherit;
  transition: background var(--dur-feedback) var(--df-ease);
}
.app .btn-primary:hover::before, .app .btn-secondary:hover::before, .df-modal-content .btn-primary:hover::before, .df-modal-content .btn-secondary:hover::before, #confirm-itinerary-wrap .btn-primary:hover::before, #panel-bookings .btn-secondary:hover::before { transform: translate(2px, 2px); }
.app .btn-primary:active::before, .app .btn-secondary:active::before, .df-modal-content .btn-primary:active::before, .df-modal-content .btn-secondary:active::before, #confirm-itinerary-wrap .btn-primary:active::before, #panel-bookings .btn-secondary:active::before { transform: translate(0, 0); }
.app .btn-primary:disabled::before, .app .btn-secondary:disabled::before, .df-modal-content .btn-primary:disabled::before, .df-modal-content .btn-secondary:disabled::before, #confirm-itinerary-wrap .btn-primary:disabled::before, #panel-bookings .btn-secondary:disabled::before { transform: translate(4px, 4px); }

/* #7190 — slice 4: the hard Press shadow as pseudo-elements (pattern: the shared button block above). */
:where(.scan-btn, .settle-action-btn, .stop-modal-delete-btn) {
  --press-bw: 0px;
  position: relative;
  isolation: isolate;
}
.scan-btn::before, .settle-action-btn::before, .stop-modal-delete-btn::before, .scan-btn::after, .settle-action-btn::after, .stop-modal-delete-btn::after {
  content: '';
  position: absolute;
  inset: calc(-1 * var(--press-bw, 0px));
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}
.scan-btn::before, .settle-action-btn::before, .stop-modal-delete-btn::before {
  background: var(--df-ink);
  transform: translate(4px, 4px);
  transition: transform var(--dur-feedback) var(--df-ease);
}
.scan-btn::after, .settle-action-btn::after, .stop-modal-delete-btn::after {
  border: inherit;
  background: inherit;
  transition: background var(--dur-feedback) var(--df-ease), border-color var(--dur-feedback) var(--df-ease);
}
.scan-btn:hover::before, .settle-action-btn:hover::before, .stop-modal-delete-btn:hover::before { transform: translate(2px, 2px); }
.scan-btn:active::before, .settle-action-btn:active::before, .stop-modal-delete-btn:active::before { transform: translate(0, 0); }

/* #7190 — slice 5: Press shadow pseudo-elements with a per-control offset (--press-o) and colour (--press-c). */
:where(.itin-lock-unlock-btn, .day-box-autofill-btn) {
  --press-bw: 0px;
  position: relative;
  isolation: isolate;
}
.itin-lock-unlock-btn::before, .day-box-autofill-btn::before, .itin-lock-unlock-btn::after, .day-box-autofill-btn::after {
  content: '';
  position: absolute;
  inset: calc(-1 * var(--press-bw, 0px));
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}
.itin-lock-unlock-btn::before, .day-box-autofill-btn::before {
  background: var(--press-c, var(--df-ink));
  transform: translate(var(--press-o), var(--press-o));
  transition: transform var(--dur-feedback) var(--ease-out);
}
.itin-lock-unlock-btn::after, .day-box-autofill-btn::after {
  border: inherit;
  background: inherit;
}
.itin-lock-unlock-btn:hover::before, .day-box-autofill-btn:hover::before { transform: translate(calc(var(--press-o) / 2), calc(var(--press-o) / 2)); }
.itin-lock-unlock-btn:active::before, .day-box-autofill-btn:active::before { transform: translate(0, 0); }
.day-box-autofill-btn:disabled::before { transform: translate(var(--press-o), var(--press-o)); }

/* /css/struck-glyphs.css */
/* GENERATED FILE — do not hand-edit. Source: design/icons/*.svg. Run `npm run generate-icons` to regenerate (#6820). */
/* A glyph as a CSS mask, painted in currentColor: <i class="ti struck-food"> (#6822). */
.struck-activity,
.struck-attraction,
.struck-bookings,
.struck-budget,
.struck-checklist,
.struck-expenses,
.struck-food,
.struck-hotel,
.struck-itinerary,
.struck-other,
.struck-people,
.struck-recap,
.struck-settings,
.struck-shopping,
.struck-transport {
  display: inline-block; width: 1em; height: 1em; vertical-align: -0.125em;
  background-color: currentColor; font-size: inherit;
}
.struck-activity { -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M1%2021.5%209.5%207l8.5%2014.5Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M13%2021.5%2018%2012.6l5%208.9Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M9.2%201.5h1.6V7H9.2Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M10.8%201.5h5l-1.6%201.7%201.6%201.7h-5Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M1%2021.5%209.5%207l8.5%2014.5Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M13%2021.5%2018%2012.6l5%208.9Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M9.2%201.5h1.6V7H9.2Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M10.8%201.5h5l-1.6%201.7%201.6%201.7h-5Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.struck-attraction { -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M2%208.4%2012%202.4l10%206Z%20M10.3%205.8h3.4v1.5h-3.4Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M3.5%209.8h17v2H3.5Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M5%2012.6h2.6v6.6H5Z%20M10.7%2012.6h2.6v6.6h-2.6Z%20M16.4%2012.6H19v6.6h-2.6Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M2%2019.9h20v2.2H2Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M2%208.4%2012%202.4l10%206Z%20M10.3%205.8h3.4v1.5h-3.4Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M3.5%209.8h17v2H3.5Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M5%2012.6h2.6v6.6H5Z%20M10.7%2012.6h2.6v6.6h-2.6Z%20M16.4%2012.6H19v6.6h-2.6Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M2%2019.9h20v2.2H2Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.struck-bookings { -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M2%205h20v4.4a2.6%202.6%200%200%200%200%205.2V19H2v-4.4a2.6%202.6%200%200%200%200-5.2Z%20M14.4%206.6h2.2v2.6h-2.2Z%20M14.4%2010.7h2.2v2.6h-2.2Z%20M14.4%2014.8h2.2v2.6h-2.2Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M2%205h20v4.4a2.6%202.6%200%200%200%200%205.2V19H2v-4.4a2.6%202.6%200%200%200%200-5.2Z%20M14.4%206.6h2.2v2.6h-2.2Z%20M14.4%2010.7h2.2v2.6h-2.2Z%20M14.4%2014.8h2.2v2.6h-2.2Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.struck-budget { -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M2%206.5h19v14.5H2Z%20M14.5%2011h7v5.4h-7Z%20M16.2%2012.6h2.2v2.2h-2.2Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M4.5%202.6h11.6l1.8%203.2H4.5Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M2%206.5h19v14.5H2Z%20M14.5%2011h7v5.4h-7Z%20M16.2%2012.6h2.2v2.2h-2.2Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M4.5%202.6h11.6l1.8%203.2H4.5Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.struck-checklist { -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M2%203h6.6v6.6H2Z%20M3.3%206.5l1.2-1.2%201%201%202-2%201.2%201.2-3.2%203.2Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M2%209.9h6.6v6.6H2Z%20M3.3%2013.4l1.2-1.2%201%201%202-2%201.2%201.2-3.2%203.2Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M2%2016.8h6.6v6.6H2Z%20M4%2018.8h2.6v2.6H4Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M11%204.8h11v3H11Z%20M11%2011.7h11v3H11Z%20M11%2018.6h11v3H11Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M2%203h6.6v6.6H2Z%20M3.3%206.5l1.2-1.2%201%201%202-2%201.2%201.2-3.2%203.2Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M2%209.9h6.6v6.6H2Z%20M3.3%2013.4l1.2-1.2%201%201%202-2%201.2%201.2-3.2%203.2Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M2%2016.8h6.6v6.6H2Z%20M4%2018.8h2.6v2.6H4Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M11%204.8h11v3H11Z%20M11%2011.7h11v3H11Z%20M11%2018.6h11v3H11Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.struck-expenses { -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M4.5%202h15v20l-2.5-1.6-2.5%201.6-2.5-1.6-2.5%201.6-2.5-1.6-2.5%201.6Z%20M7.5%206h9v2.4h-9Z%20M7.5%2010.2h9v2.4h-9Z%20M7.5%2014.4h5v2.4h-5Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M4.5%202h15v20l-2.5-1.6-2.5%201.6-2.5-1.6-2.5%201.6-2.5-1.6-2.5%201.6Z%20M7.5%206h9v2.4h-9Z%20M7.5%2010.2h9v2.4h-9Z%20M7.5%2014.4h5v2.4h-5Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.struck-food { -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M3.6%202h2v5.4h1.3V2h2v5.4h1.3V2h2v7.8a3.6%203.6%200%200%201-2.6%203.5V22H6.2v-8.7a3.6%203.6%200%200%201-2.6-3.5Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M14.6%202c3.4%201.2%205.6%204.8%205.6%209.6v2.6h-2.4V22h-3.2Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M3.6%202h2v5.4h1.3V2h2v5.4h1.3V2h2v7.8a3.6%203.6%200%200%201-2.6%203.5V22H6.2v-8.7a3.6%203.6%200%200%201-2.6-3.5Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M14.6%202c3.4%201.2%205.6%204.8%205.6%209.6v2.6h-2.4V22h-3.2Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.struck-hotel { -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M2%204h3v17H2Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M5%2013h17v4.4H5Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M19.2%2017.4H22V21h-2.8Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M6.3%209.2h4.8a1%201%200%200%201%201%201v2H6.3Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M13.2%209.2h6.6a2.2%202.2%200%200%201%202.2%202.2V12h-8.8Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M2%204h3v17H2Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M5%2013h17v4.4H5Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M19.2%2017.4H22V21h-2.8Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M6.3%209.2h4.8a1%201%200%200%201%201%201v2H6.3Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M13.2%209.2h6.6a2.2%202.2%200%200%201%202.2%202.2V12h-8.8Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.struck-itinerary { -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M3%205h18v16H3Z%20M5.6%2010.2h12.8v8.2H5.6Z%20M8%2012.4h4.2v4H8Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M6.6%202h2.8v4.6H6.6Z%20M14.6%202h2.8v4.6h-2.8Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M3%205h18v16H3Z%20M5.6%2010.2h12.8v8.2H5.6Z%20M8%2012.4h4.2v4H8Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M6.6%202h2.8v4.6H6.6Z%20M14.6%202h2.8v4.6h-2.8Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.struck-other { -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M2%204h20v4.2H2Z%20M10.4%204h3.2v4.2h-3.2Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M3.4%209.4h17.2V21H3.4Z%20M10.4%209.4h3.2v3.6h-3.2Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M2%204h20v4.2H2Z%20M10.4%204h3.2v4.2h-3.2Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M3.4%209.4h17.2V21H3.4Z%20M10.4%209.4h3.2v3.6h-3.2Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.struck-people { -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M4.499999999999999%207.6a3.7%203.7%200%201%200%207.4%200a3.7%203.7%200%201%200%20-7.4%200Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M1.5%2021.5v-2.2c0-3.6%203-6%206.7-6s6.7%202.4%206.7%206v2.2Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M16.5%208.4a3%203%200%201%200%206%200a3%203%200%201%200%20-6%200Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M17%2021.5v-6.4c0-1.4%201.1-2.5%202.5-2.5h.2c1.7%200%202.8%201.1%202.8%202.8v6.1Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M4.499999999999999%207.6a3.7%203.7%200%201%200%207.4%200a3.7%203.7%200%201%200%20-7.4%200Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M1.5%2021.5v-2.2c0-3.6%203-6%206.7-6s6.7%202.4%206.7%206v2.2Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M16.5%208.4a3%203%200%201%200%206%200a3%203%200%201%200%20-6%200Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M17%2021.5v-6.4c0-1.4%201.1-2.5%202.5-2.5h.2c1.7%200%202.8%201.1%202.8%202.8v6.1Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.struck-recap { -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M3%202h2.8v20H3Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M5.8%203h15l-2.8%204.8%202.8%204.8h-15Z%20M8.6%207.6l1.3-1.3%201.6%201.6%203.1-3.1%201.3%201.3-4.4%204.4Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M3%202h2.8v20H3Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M5.8%203h15l-2.8%204.8%202.8%204.8h-15Z%20M8.6%207.6l1.3-1.3%201.6%201.6%203.1-3.1%201.3%201.3-4.4%204.4Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.struck-settings { -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M9.63%204.05L9.92%201.20L14.08%201.20L14.37%204.05L15.95%204.70L18.17%202.89L21.11%205.83L19.30%208.05L19.95%209.63L22.80%209.92L22.80%2014.08L19.95%2014.37L19.30%2015.95L21.11%2018.17L18.17%2021.11L15.95%2019.30L14.37%2019.95L14.08%2022.80L9.92%2022.80L9.63%2019.95L8.05%2019.30L5.83%2021.11L2.89%2018.17L4.70%2015.95L4.05%2014.37L1.20%2014.08L1.20%209.92L4.05%209.63L4.70%208.05L2.89%205.83L5.83%202.89L8.05%204.70ZM8.6%2012a3.4%203.4%200%201%200%206.8%200a3.4%203.4%200%201%200-6.8%200Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M9.63%204.05L9.92%201.20L14.08%201.20L14.37%204.05L15.95%204.70L18.17%202.89L21.11%205.83L19.30%208.05L19.95%209.63L22.80%209.92L22.80%2014.08L19.95%2014.37L19.30%2015.95L21.11%2018.17L18.17%2021.11L15.95%2019.30L14.37%2019.95L14.08%2022.80L9.92%2022.80L9.63%2019.95L8.05%2019.30L5.83%2021.11L2.89%2018.17L4.70%2015.95L4.05%2014.37L1.20%2014.08L1.20%209.92L4.05%209.63L4.70%208.05L2.89%205.83L5.83%202.89L8.05%204.70ZM8.6%2012a3.4%203.4%200%201%200%206.8%200a3.4%203.4%200%201%200-6.8%200Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.struck-shopping { -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M3.4%208h17.2l-1.3%2014H4.7Z%20M7%2011h2.4v2.6H7Z%20M14.6%2011H17v2.6h-2.4Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M7%208V6.6a5%205%200%200%201%2010%200V8h-2.6V6.6a2.4%202.4%200%200%200-4.8%200V8Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M3.4%208h17.2l-1.3%2014H4.7Z%20M7%2011h2.4v2.6H7Z%20M14.6%2011H17v2.6h-2.4Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M7%208V6.6a5%205%200%200%201%2010%200V8h-2.6V6.6a2.4%202.4%200%200%200-4.8%200V8Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.struck-transport { -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M4%202.6h16v15.6H4Z%20M6.4%205h11.2v5.8H6.4Z%20M6.6%2013.4h2.6v2.2H6.6Z%20M14.8%2013.4h2.6v2.2h-2.6Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M5.4%2018.2h3.6v3.4H5.4Z%20M15%2018.2h3.6v3.4H15Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M4%202.6h16v15.6H4Z%20M6.4%205h11.2v5.8H6.4Z%20M6.6%2013.4h2.6v2.2H6.6Z%20M14.8%2013.4h2.6v2.2h-2.6Z%27%2F%3E%3Cpath%20fill-rule%3D%27evenodd%27%20d%3D%27M5.4%2018.2h3.6v3.4H5.4Z%20M15%2018.2h3.6v3.4H15Z%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }

/* /css/skeleton.css */
/* =========================================================
   SKELETON LOADING PRIMITIVES (issue #157)
   =========================================================
   A small reusable set of loading placeholders used across js/* render
   functions while network data is in flight. Composed from three shapes
   (.skeleton-rect / .skeleton-circle / .skeleton-line) built on one base
   (.skeleton) that owns the shimmer animation, so every placeholder in the
   app animates identically and can be re-themed from one place.

   Usage: pair with the JS helpers in js/skeleton.js (skeletonLine/
   skeletonRect/skeletonCircle build the markup; beginSkeletonLoading/
   endSkeletonLoading manage role="status"/aria-busy on the container).
   Don't hand-roll a new shimmer animation elsewhere — extend this file. */

/* Issue #1000 — this was the original home of the [data-theme] selector
   pattern (#157), added ahead of anything actually setting the attribute.
   Folded into light-dark() now, same as the rest of the app; --surface-1
   isn't reused for the dark value because the skeleton wants to stay a
   touch lighter than the page surface for visibility. */
:root {
  --skeleton-base: light-dark(var(--surface-1), #2a2a2a);
  --skeleton-shine: light-dark(rgba(255,255,255,0.6), rgba(255,255,255,0.06));
  --skeleton-duration: 1.4s;
}

.skeleton {
  position: relative;
  display: block;
  background: var(--skeleton-base);
  overflow: hidden;
}

/* transform-only animation (no layout/paint of geometry) to keep this cheap
   on low-power devices — see prefers-reduced-motion override below. */
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--skeleton-shine), transparent);
  animation: skeleton-shimmer var(--skeleton-duration) ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  100% { transform: translateX(100%); }
}

.skeleton-rect { border-radius: var(--radius-sm); }
.skeleton-circle { border-radius: 50%; }
.skeleton-line { height: 10px; border-radius: var(--radius-xs); }

.skeleton-row {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.skeleton-lines {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

@media (prefers-reduced-motion: reduce) {
  .skeleton::after { animation: none; }
}

/* /css/landing.css */
/* =========================================================
   LANDING PAGE (issue #184)
   =========================================================
   The pre-auth marketing view. Its job is not to explain Lancong — it is to
   make you want to go somewhere, then hand you the button.

   The design brief: departure fever. The page is built out of the physical
   debris of actually going — rubber passport stamps, taped-down instant
   prints, boarding-pass stubs, a dashed route line — printed the way a cheap
   travel zine is printed, in flat riso inks that sit slightly out of
   register. Nothing here is centred and reverent; things are taped down at an
   angle because that is how a suitcase looks after a trip.

   THE SIGNATURE is .lp-stampword: the hero headline reads "Let's go to —"
   and the destination lands under it as a rubber stamp, rotated and
   over-printed, cycling through places. It is the product's actual question
   ("where?") made kinetic, and it is the ONE loud thing. Everything around it
   is deliberately disciplined — quiet body copy, one type scale, no second
   marquee competing for the same job.

   The page's own component rules stay scoped under #landing-page so they
   can't leak into the auth gate (#auth-panel) that shares #auth-screen with
   it — the two are converted, not merged, per DESIGN.md's "convert a screen
   whole" migration note. What IS shared, deliberately, is the --lp-* token
   block on bare .landing-screen below: both surfaces read the identical
   ground/stock/ink/type values, which is what lets a visitor cross from one
   to the other (landingStart('register') et al.) without the colours
   disagreeing. Every ink a CONTROL is painted in is in turn an alias of
   css/style.css's own --vn-* and --surface-* tokens, not a colour re-picked
   here — the poster owns ground/stock/type/geometry, the product owns the
   brand. See the Brand section of the token block below before changing any
   of it, and see the "Auth gate" section further down for #auth-panel's own
   component set.

   ⚠️ Never write a token pair as `--vn-*` immediately followed by a slash
   inside a comment. That spells a comment terminator, and it silently ends
   the comment early: the parser then discards everything up to and including
   the next {…} block. That exact typo shipped with the first version of this
   file and cost the page its `padding: 0` for months — every "full-bleed"
   band was quietly inset 16px, and the sticky nav floated 32px down from the
   top of the viewport. Nothing warns you; the rest of the file parses fine.

   Mobile-first; the wide layout starts at the app's own 1024px breakpoint.
*/

/* ---------- Tokens ---------- */
/* Declared on bare .landing-screen (#auth-screen's only class, see
   css/style.css) so both states it can be in — the marketing page
   (.lp-mode) and the auth gate beneath it — read the identical values. The
   auth gate used to be exempt from this block entirely, sitting on the
   retired Field Journal look (system font stack, 10px radii, a blurred
   focus glow) while the page one tap away from it was fully converted.
   DESIGN.md is explicit that this system is normative everywhere with no
   exceptions and names the auth gate as the outstanding surface — see the
   "Auth gate" component section below for that conversion. Only the ground
   painting and these tokens are shared; #auth-panel keeps its own component
   rules separate from #landing-page's, per the migration note's "convert a
   screen whole" rule — the two are converted, not merged. */
.landing-screen {
  /* Noon / Night market. A saturated apricot by day, not a neutral paper
     stock — the ground itself should read as sunlight, which is the whole
     argument against the cream this page used to sit on. */
  --lp-ground: var(--df-ground);
  --lp-panel: var(--df-panel);      /* the stock a card or a stub is cut from */
  --lp-ink: var(--df-ink);        /* green-black by day / Lamplight by night */
  --lp-ink-soft: var(--df-ink-soft);   /* 5.9:1 on --lp-ground in light mode */

  /* Instant-film stock, and the only pair that does NOT invert with the
     theme. A photo print is white at midnight too — keeping it light is what
     makes the prints the brightest thing on the night version of the page,
     which is right for photographs of somewhere sunny. Anything set on the
     stock therefore has to stay dark in both themes. */
  --lp-stock: var(--df-instant-stock);
  --lp-stock-ink: var(--df-instant-stock-ink);

  /* ---------- Brand ---------- */
  /* Every ink below is the app's OWN --vn-* token, aliased rather than
     re-picked, so this page cannot drift off-brand and follows the palette if
     it ever moves. The page still owns its ground, stock, type and geometry —
     that is what keeps it a poster rather than app chrome — but the colour a
     control is painted in belongs to the product, not to the poster.
     ⚠️ --vn-trail-green is a DEEP GREEN in light mode and a BRIGHT MINT in dark
     (issue #432). Anything filled with --lp-brand must therefore take
     --lp-brand-fg as its foreground, never a literal white — that is the
     exact bug #432 fixed across 13 rules in the app. */
  --lp-brand: var(--vn-trail-green);
  --lp-brand-fg: var(--surface-2);

  /* The pinned brand green, mirroring --topbar-bg. The app's top bar is the
     literal #10702A in both themes because a full-bleed field of the
     dark-mode mint would be unreadable; the footer poster is this page's
     equivalent field, so it follows the same rule and pins its foreground
     with it. Also the one green safe to set on --lp-stock, which never
     darkens. */
  --lp-brand-field: var(--topbar-bg);
  --lp-brand-field-fg: var(--topbar-fg);

  /* The two supporting brand inks. Coral is the stamp: a rubber stamp is a
     red-orange before it is anything else, and coral is the palette's own
     terracotta rather than a hue invented for this page. Amber is the route
     and the tape. Green is reserved for things you can press. */
  --lp-coral: var(--vn-coral);
  --lp-amber: var(--vn-amber);
  /* ⚠️ --lp-amber is 1.9:1 on --lp-ground: a fill and a mark, never text.
     Copy set ON an amber fill takes --lp-amber-fg, pinned dark because the
     token lightens in dark mode (4.8:1 light, 8.4:1 dark). */
  --lp-amber-fg: var(--df-amber-fg);

  /* The out-of-register second pass — the green landing a hair off the coral,
     which is what a two-ink riso job actually does. */
  --lp-ghost: var(--df-ghost);
  --lp-hair: var(--df-hair);
  --lp-tape: var(--df-tape);

  /* An inverted band: one hard cut in the middle of the page so the scroll
     has a floor to it. Flips with the theme rather than being pinned dark.
     A deep step of the brand green rather than a neutral black — the page
     then has three green fields (nav mark, this band, the footer poster) with
     the apricot ground and the coral stamp between them, instead of one black
     slab reading as a different design. */
  --lp-invert-bg: var(--df-invert-bg);
  --lp-invert-fg: var(--df-invert-fg);
  --lp-invert-soft: var(--df-invert-soft);

  --lp-focus: var(--lp-brand);

  /* The text-safe danger ink for the poster's forms: the same values as the
     app's --error-text (#6634 crimson; it was an alert red, #c62828/#ff6b6b,
     too close to Stamp Coral). 7.3:1 on --lp-panel by day, ~7:1 after dark;
     keylines stay on --error, which clears the 3:1 a UI component needs. */
  --lp-error-ink: var(--error-text);

  --lp-max: 1120px;
  --lp-gutter: clamp(20px, 5vw, 56px);

  /* Bricolage carries the shout: a grotesque with genuinely odd joints, so a
     headline set in it reads as drawn rather than as a system font at 800.
     Bricolage is the one sans face underneath it too. */
  --lp-display: var(--df-display);
  --lp-sans: var(--df-sans);

  --lp-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* The landing page's own motion lengths and stagger unit (#6986); the app tiers are too short for a page that reveals on scroll. */
  --lp-dur-slow: 900ms;
  --lp-dur-long: 700ms;
  --lp-dur-hero: 620ms;
  --lp-stagger: 70ms;
  /* Overshoot-then-settle lives in css/style.css as --ease-slam. */

  /* Ground: print (.df-ground-print group in css/style.css) — the shared
     tokens, not a hand-written copy. Landing/sign-in/contact washes are
     therefore the standard strength (#5978); --lp-ground is the same colour.
     Dark-mode note kept from #1000: every token here carries both themes via
     light-dark(); --lp-brand-field/-fg, --lp-amber-fg, --lp-stock and
     --lp-stock-ink are pinned by design and stay plain values. */
  color: var(--lp-ink);
}

/* .landing-screen centers one narrow column in its auth-gate state; in
   landing mode #auth-screen is instead a normal, full-width scrolling
   document. Only these two blocks differ between the states — everything
   else (tokens, ground) is shared above. */
.landing-screen.lp-mode {
  display: block;
  padding: 0;
  min-height: 100vh;
}
.landing-screen:not(.lp-mode) {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: clamp(32px, 7vw, 64px) var(--lp-gutter) clamp(48px, 8vw, 88px);
}

#landing-page,
#contact-page {
  font-family: var(--lp-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--lp-ink);
  overflow-x: clip;
}

#landing-page :focus-visible,
#contact-page :focus-visible,
#auth-panel :focus-visible {
  outline: 3px solid var(--lp-focus);
  outline-offset: 3px;
  border-radius: 2px;
}
/* The band's ground flips with the theme, and no single accent clears both
   sides of that flip — so the ring takes the band's own foreground, which is
   guaranteed to contrast with whatever the band is currently painted in. */
.lp-invert :focus-visible { --lp-focus: var(--lp-invert-fg); }

/* =========================================================
   AUTH GATE (#auth-panel)
   =========================================================
   The account gate a visitor lands on one tap after the landing page's own
   CTAs — "Start a trip" here is landingStart('register'), which routes
   straight past the button group below into #auth-register-form. DESIGN.md
   is explicit that Departure Fever is normative everywhere with no
   exceptions and names this surface as the one still on the retired Field
   Journal look (system font stack, 10px radii, a blurred focus glow, near-
   white cards). Converted whole, per the migration note: shape, type and
   shadow change together, and the --lp-* tokens above already make this
   colour-compatible with the poster one tap away.

   Structure: one persistent .ap-card shell around every child #auth-*-form
   / #auth-main-buttons / #auth-retry-btn — js/auth.js only ever toggles
   which child's display is 'block'/'none' (_hideAllAuthForms and friends),
   so the card itself must never remount between Log In / Register / Guest,
   or that toggle has nothing stable to sit inside. */

#auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

/* The Route Mark horizontal lockup (assets/brand/), full-colour on the light
   apricot ground and all-apricot on the dark one (Coral Dot Rule: no coral dot
   on green or dark). Height is --logo-hero (#3717) and the width follows the
   artwork's ratio; the h1 is the lockup, each <img> carries the name "Lancong"
   (the hidden one is display:none, so only one is ever announced). The
   light/dark swap is .rm-light/.rm-dark in landing.css. */
.ap-lockup {
  margin: 0;
  display: flex;
  justify-content: center;
}

.ap-lockup-img {
  height: var(--logo-hero);
  width: auto;
}

#auth-panel .landing-subtitle {
  margin: 10px 0 28px;
  max-width: 34ch;
  font-family: var(--df-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  text-align: center;
  color: var(--lp-ink-soft);
}

/* DESIGN.md's Card component. One instance, persistent — see the structure
   note above. */
.ap-card {
  width: 100%;
  padding: 26px 22px 28px;
  background: var(--lp-panel);
  border: 2px solid var(--lp-ink);
  border-radius: 14px;
}

#auth-panel h3 {
  margin: 0 0 20px;
  font-family: var(--lp-display);
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--lp-ink);
}

/* ---------- Buttons ---------- */
/* .btn-large/.btn-create/.btn-join/.btn-primary/.btn-secondary are shared,
   app-wide classes (modals, My Trips action cards, every form's submit/
   cancel pair) — everything here is scoped to #auth-panel specifically so
   this conversion cannot leak into any other screen that also uses them. */

#auth-panel .btn-large,
#auth-panel .btn-primary,
#auth-panel .btn-secondary {
  min-height: var(--tap-min);
  padding: 0 22px;
  border: 2px solid var(--lp-ink);
  border-radius: 999px;
  font-family: var(--lp-sans);
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 4px 4px 0 var(--lp-ink);
  transition:
    transform var(--dur-feedback) var(--lp-ease),
    box-shadow var(--dur-feedback) var(--lp-ease);
}
#auth-panel .btn-large:hover,
#auth-panel .btn-primary:hover,
#auth-panel .btn-secondary:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--lp-ink);
}
#auth-panel .btn-large:active,
#auth-panel .btn-primary:active,
#auth-panel .btn-secondary:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--lp-ink);
}
#auth-panel .btn-primary:disabled,
#auth-panel .btn-secondary:disabled,
#auth-panel .btn-large:disabled {
  cursor: default;
  opacity: 0.55;
  transform: none;
  box-shadow: 4px 4px 0 var(--lp-ink);
}

/* Primary: Trail Green, --lp-brand-fg on top rather than a literal white —
   The Mint Flip Rule (issue #432). */
#auth-panel .btn-primary,
#auth-panel .btn-create {
  background: var(--lp-brand);
  color: var(--lp-brand-fg);
}
#auth-panel .btn-primary:hover,
#auth-panel .btn-create:hover { background: var(--lp-brand); }

/* Secondary: Cut Stock, ink text — same keyline and offset as primary. */
#auth-panel .btn-secondary,
#auth-panel .btn-join {
  background: var(--lp-panel);
  color: var(--lp-ink);
}

/* Sign in with Google (#2182) — Google's branding guidelines: neutral fill,
   1px stroke, unaltered four-colour G. Colours are Google's own, so they are
   fixed values (light-dark() only picks between Google's two themes). The
   panel's offset shadow and pill shape are kept; the guidelines allow a
   custom shape. */
#auth-panel .btn-google {
  gap: 10px;
  background: light-dark(#ffffff, #131314);
  color: light-dark(#1f1f1f, #e3e3e3);
  border: 1px solid light-dark(#747775, #8e918f);
}
#auth-panel .btn-google .google-g { flex: 0 0 18px; }
#auth-panel .btn-google:focus-visible {
  outline: 2px solid var(--lp-ink);
  outline-offset: 3px;
}

/* Continue as Guest — the one button that isn't fully committing yet, which
   is also the only place on this screen a dashed edge is honest: it reads
   as provisional the way a taped, not-yet-stamped ticket does (The
   Crooked-On-Purpose Rule's spirit, applied to a border instead of a tilt). */
#auth-panel .ap-btn-ghost {
  background: transparent;
  border: 2px dashed var(--lp-ink-soft);
  color: var(--lp-ink-soft);
  box-shadow: none;
}
#auth-panel .ap-btn-ghost:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--lp-ink);
  color: var(--lp-ink);
}
#auth-panel .ap-btn-ghost:active { transform: none; }

.auth-back-link {
  margin-top: 18px;
  background: none;
  border: none;
  color: var(--lp-ink-soft);
  font-family: var(--lp-sans);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: var(--tap-min);
  padding: 0 var(--space-sm);
}
.auth-back-link:hover { color: var(--lp-brand); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Fields ---------- */
/* DESIGN.md Inputs spec: Cut Stock fill, 2px keyline, 12px radius (cut, not
   pressed — no pill), 44px floor, no glow anywhere. font-size is
   deliberately left to the shared app-wide input rule (css/style.css) —
   14px desktop / 16px below 680px — rather than pinned here, so the auth
   gate keeps the same iOS-zoom fix as every other form in the app. */
#auth-panel .form-group { margin-bottom: 20px; }

#auth-panel .form-label {
  font-family: var(--lp-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lp-ink-soft);
  margin-bottom: var(--space-md);
}

#auth-panel input[type="text"],
#auth-panel input[type="email"],
#auth-panel input[type="password"],
#auth-panel select {
  height: 44px;
  border: 2px solid var(--lp-ink);
  border-radius: 12px;
  background: var(--lp-panel);
  color: var(--lp-ink);
}
#auth-panel input::placeholder { color: var(--lp-ink-soft); opacity: 1; }

/* No glow anywhere in this system (The Hard Shadow Rule's sibling for
   fields) — a 3px solid ring at a 3px offset instead of the app-wide
   shared rule's box-shadow blur. */
#auth-panel input:focus,
#auth-panel select:focus {
  outline: 3px solid var(--lp-brand);
  outline-offset: 3px;
  border-color: var(--lp-brand);
  box-shadow: none;
}

/* A field currently failing validation — Alert Red keyline, never Stamp
   Coral, which is branded and must not read as danger (DESIGN.md's Inputs
   error spec). */
#auth-panel input[aria-invalid="true"] {
  border-color: var(--error);
}
#auth-panel input[aria-invalid="true"]:focus {
  outline-color: var(--error);
  border-color: var(--error);
}

.ap-field-hint {
  margin: var(--space-sm) 0 0;
  font-family: var(--df-sans);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--lp-ink-soft);
}

.ap-field-error {
  display: none;
  margin: var(--space-sm) 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
  font-weight: 600;
  color: var(--lp-error-ink);
}
.ap-field-error.is-visible { display: block; }

/* Invite deferred-claim banner (issue #674 PR3) — a sibling of every
   #auth-*-form inside the one persistent .ap-card (see the structure note
   at the top of this section), so it sits above whichever form
   showLoginForm()/showRegisterForm() (js/auth.js) reveals rather than
   living inside either one. */
.auth-invite-banner {
  margin: 0 0 20px;
  padding: var(--space-md) var(--space-lg);
  background: color-mix(in srgb, var(--lp-brand) 12%, var(--lp-panel));
  border: 2px solid var(--lp-ink);
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  color: var(--lp-ink);
}

/* "Where are you from?" searchable country combobox — a real listbox, not
   a native <select> (see the markup comment in index.html for why). */
.reg-country-group { position: relative; }
.reg-country-listbox {
  position: absolute;
  left: 0; right: 0; top: 100%;
  z-index: 20;
  margin: var(--space-sm) 0 0;
  padding: var(--space-sm) 0;
  max-height: 260px;
  overflow-y: auto;
  list-style: none;
  background: var(--lp-panel);
  border: 2px solid var(--lp-ink);
  border-radius: 12px;
}
.reg-country-option {
  display: flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: var(--space-sm) var(--space-lg);
  color: var(--lp-ink);
  cursor: pointer;
}
.reg-country-option.active,
.reg-country-option:hover { background: var(--lp-brand); color: var(--lp-panel); }
.reg-country-empty {
  padding: var(--space-sm) var(--space-lg);
  color: var(--lp-ink-soft);
}

/* ---------- Desktop ---------- */
/* A real wide-viewport treatment — the card was previously the identical
   320px column at every width. Widens the card and its type rather than
   introducing a second layout; a four-field form doesn't earn a multi-
   column composition. */
@media (min-width: 1024px) {
  #auth-panel { max-width: 440px; }

  #auth-panel .landing-subtitle { margin-bottom: 34px; }

  .ap-card { padding: 34px 32px 36px; }

  #auth-panel h3 { font-size: 1.25rem; margin-bottom: 24px; }
}

/* ---------- Shared primitives ---------- */

/* The stencil voice: eyebrows, stub metadata, footer meta. Tracked out and
   uppercase, the way anything printed onto a ticket is. */
.lp-footer-links,
.ct-label {
  font-family: var(--lp-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Buttons are stickers: a flat block of ink with a hard offset shadow, which
   presses into the page when you push it. No gradients, no blur — the whole
   page is printed in flat inks. */
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap-min);
  padding: 0 22px;
  border: 2px solid var(--lp-ink);
  border-radius: 999px;
  background: var(--lp-panel);
  color: var(--lp-ink);
  font-family: var(--lp-sans);
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 4px 4px 0 var(--lp-ink);
  transition:
    transform var(--dur-feedback) var(--lp-ease),
    box-shadow var(--dur-feedback) var(--lp-ease),
    background var(--dur-feedback) var(--lp-ease),
    color var(--dur-feedback) var(--lp-ease);
}
.lp-btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--lp-ink); }
.lp-btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--lp-ink); }

.lp-btn-lg {
  min-height: 56px;
  padding: 0 30px;
  font-size: 1.0625rem;
  box-shadow: 5px 5px 0 var(--lp-ink);
}
.lp-btn-lg:hover { box-shadow: 3px 3px 0 var(--lp-ink); }
.lp-btn-lg:active { box-shadow: 0 0 0 var(--lp-ink); }

/* The brand green, and --lp-brand-fg on top of it rather than a literal
   white — see the #432 warning in the token block. */
.lp-btn-primary { background: var(--lp-brand); color: var(--lp-brand-fg); }
.lp-btn-secondary { background: var(--lp-panel); color: var(--lp-ink); }

/* Inside the inverted band the ink that draws the border and the shadow is
   the band's foreground, not the page's. */
.lp-invert .lp-btn {
  border-color: var(--lp-invert-fg);
  box-shadow: 4px 4px 0 var(--lp-invert-fg);
}
.lp-invert .lp-btn:hover { box-shadow: 2px 2px 0 var(--lp-invert-fg); }
.lp-invert .lp-btn:active { box-shadow: 0 0 0 var(--lp-invert-fg); }

.lp-btn-quiet {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  font-weight: 700;
}
.lp-btn-quiet:hover { background: transparent; box-shadow: none; transform: none; color: var(--lp-brand); }
.lp-btn-quiet:active { transform: none; box-shadow: none; }

.lp-textlink {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--lp-ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--lp-brand);
  text-underline-offset: 5px;
  cursor: pointer;
}
.lp-textlink:hover { color: var(--lp-brand); }

/* ---------- Nav ---------- */

/* The bar is the app's own top bar, not a tint of the poster behind it: the
   same pinned --topbar-bg green, carrying pale pills the way that bar carries
   its logo and profile pills. A visitor therefore meets the product's chrome
   before they have logged into it, and the landing → app transition has no
   seam at the top of the window.

   Opaque, and with no backdrop-filter. The old bar was a 90% tint of
   --lp-ground over a ground that carries a halftone screen and two radial
   washes, so at the top of the page it read as a ghost band: the dots blurred
   inside it and crisp immediately below, with the washes discontinuous at its
   edges. A solid field cannot do that, and it is also the only way the bar is
   unmistakable against BOTH the apricot ground and the cream panel band it
   sticks over. No keyline either — chrome does not need the poster's 2px ink
   vocabulary to separate from anything, and the app's own bar has none. */
.lp-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--lp-brand-field);
  color: var(--lp-brand-field-fg);
}

/* White on green: --lp-brand is a deep green in light mode and would vanish
   into the bar. Same reasoning as the footer poster. */
.lp-nav :focus-visible { --lp-focus: var(--lp-brand-field-fg); }

.lp-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--lp-max);
  margin: 0 auto;
  padding: 10px var(--lp-gutter);
}

.lp-nav-brand {
  display: flex;
  align-items: center;
}

/* The Route Mark: the all-apricot horizontal lockup, the only treatment that
   goes on green (brand/logo/README.md — the coral dot never sits on green).
   --logo-nav tall (44px, ~122px wide, over the lockup's 120px minimum; #3717),
   the same height as the bar's 44px controls. Width follows from height, so
   it is never stretched. */
.lp-nav-brand img {
  display: block;
  width: auto;
  height: var(--logo-nav);
}

.lp-nav-actions { display: flex; align-items: center; gap: 8px; }

/* On the green field the two controls swap roles with the rest of the page:
   the quiet one is pale text at the app's own --topbar-fg-muted weight
   (4.98:1 on this green), and the CTA is the pale pill. */
.lp-nav .lp-btn-quiet {
  color: color-mix(in srgb, var(--lp-brand-field-fg) 85%, transparent);
}
.lp-nav .lp-btn-quiet:hover { color: var(--lp-brand-field-fg); }

.lp-nav .lp-btn-primary {
  border-color: var(--lp-brand-field-fg);
  background: var(--lp-brand-field-fg);
  color: var(--lp-brand-field);
  box-shadow: 3px 3px 0 rgba(6, 40, 17, 0.45);
}
.lp-nav .lp-btn-primary:hover { box-shadow: 1px 1px 0 rgba(6, 40, 17, 0.45); }
.lp-nav .lp-btn-primary:active { box-shadow: 0 0 0 rgba(6, 40, 17, 0.45); }

/* The nav's own CTA is redundant beside the hero's on a small screen, where
   both are on the first viewport anyway. */
.lp-nav-cta { display: none; }

/* ---------- Hero ---------- */

.lp-hero {
  display: grid;
  gap: clamp(48px, 8vw, 64px);
  max-width: var(--lp-max);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 76px) var(--lp-gutter) clamp(56px, 9vw, 104px);
}

.lp-eyebrow {
  display: block;
  font-family: var(--lp-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  max-width: 34ch;
  color: var(--lp-ink-soft);
  line-height: 1.7;
}

.lp-hero-title {
  margin: 20px 0 0;
  font-family: var(--lp-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 10vw, 4.5rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

/* The destination sits on its own line, always. A stamp that shared a line
   with "Let's go to" would re-wrap the whole headline every time the word
   changed length — the cycle has to be able to run without the page moving
   underneath it. */
.lp-stamp-slot {
  display: block;
  margin-top: 0.14em;
  padding-left: 0.14em;   /* the rotation swings the left edge outward */
}

/* ★ THE SIGNATURE — a rubber stamp, struck slightly crooked and printed
   twice: the double keyline is the stamp's die, the text-shadow is the
   second ink pass landing out of register. */
.lp-stampword {
  display: inline-block;
  padding: 0.04em 0.2em 0.09em;
  border: 0.055em solid currentColor;
  border-radius: 0.14em;
  box-shadow: inset 0 0 0 0.022em currentColor;
  color: var(--lp-coral);
  text-shadow: 0.028em 0.036em 0 var(--lp-ghost);
  transform: rotate(-2.6deg);
  transform-origin: 30% 60%;
}

.lp-hero-sub {
  margin: 26px 0 0;
  max-width: 44ch;
  font-size: 1.0625rem;
  color: var(--lp-ink-soft);
}

.lp-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.lp-hero-note {
  margin: 22px 0 0;
  font-size: 0.875rem;
  color: var(--lp-ink-soft);
}
/* Inline inside a sentence, so it cannot be a 44px-tall box without wrecking
   the line. Expand the tappable area instead, per the --tap-min note in
   CLAUDE.md — the glyphs stay on the baseline, the hit box does not. */
.lp-hero-note .lp-textlink {
  position: relative;
  font-size: inherit;
  min-height: 0;
}
.lp-hero-note .lp-textlink::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}

/* ---------- Prints ---------- */
/* Every photograph on this page is an instant print: a stock border wider at
   the foot than at the head, taped down at an angle. No captions — a print
   stuck to a wall does not carry a label, and the picture is doing the
   arguing on its own. */

.lp-print {
  position: relative;
  display: block;
  padding: 10px 10px 34px;
  background: var(--lp-stock);
  border-radius: 3px;
  box-shadow:
    0 1px 0 rgba(9, 20, 13, 0.1),
    0 22px 40px -26px rgba(9, 20, 13, 0.75);
}

/* Tape. Two torn strips holding the print to the page — the reason anything
   on this page is allowed to sit at an angle. */
.lp-print::before,
.lp-print::after {
  content: '';
  position: absolute;
  top: -13px;
  width: 74px;
  height: 26px;
  background: var(--lp-tape);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.lp-print::before { left: 9%; transform: rotate(-4deg); }
.lp-print::after { right: 9%; transform: rotate(3.4deg); }

.lp-print-window {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 1px;
  background: color-mix(in srgb, var(--lp-ink) 12%, var(--lp-stock));
}

.lp-print-window img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The hero print's frame is reserved from first paint (#6571): the photos
   arrive from an API call seconds after the page, and revealing the figure
   then moved the whole hero (CLS 0.3). js/landing.js sets .lp-hero-no-photo
   only once the fetch has settled with nothing to show; the hero is then a
   single centred column of copy — a deliberate state, not a broken one.
   .lp-hero-has-photo still marks the opposite outcome. */
.lp-hero-photo { display: block; }
.lp-hero-no-photo .lp-hero-photo { display: none; }

.lp-hero-photo {
  position: relative;
  justify-self: center;
  width: min(100%, 440px);
  margin: 0;
  transform: rotate(-2deg);
}

/* Two more prints under the top one, just their edges showing. A stack, not
   a single specimen — you took more than one photo. */
.lp-hero-photo .lp-stack-a,
.lp-hero-photo .lp-stack-b {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: var(--lp-stock);
  box-shadow: 0 10px 24px -18px rgba(9, 20, 13, 0.8);
}
.lp-hero-photo .lp-stack-a { transform: rotate(4.5deg) translate(6px, 4px); }
.lp-hero-photo .lp-stack-b { transform: rotate(-6deg) translate(-8px, 8px); }
.lp-hero-photo .lp-print { position: relative; }

.lp-hero-bg {
  display: block;
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: color-mix(in srgb, var(--lp-ink) 12%, var(--lp-stock));
}

.lp-hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--lp-dur-slow) var(--lp-ease);
}
.lp-hero-bg img.is-active { opacity: 1; }

/* No photograph credit or caption on the stock's bottom margin — a print
   taped to a wall does not explain itself. Credits were removed deliberately
   (#1423); the blank margin is the instant-print look, not a missing line. */

/* ---------- Bands and sections ---------- */

.lp-section {
  max-width: var(--lp-max);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) var(--lp-gutter);
}

/* A full-bleed band of flat ink. .lp-band is the wrapper; the section inside
   keeps the page's measure. */
.lp-band {
  border-block: 2px solid var(--lp-ink);
}
.lp-band-panel { background: var(--lp-panel); }

.lp-invert {
  background: var(--lp-invert-bg);
  color: var(--lp-invert-fg);
  border-block-color: var(--lp-invert-bg);
}
.lp-invert .lp-section-sub,
.lp-invert .lp-step p,
.lp-invert .lp-eyebrow { color: var(--lp-invert-soft); }

.lp-section-head { max-width: 52ch; margin-bottom: clamp(34px, 5vw, 54px); }


.lp-section-title {
  margin: 0;
  font-family: var(--lp-display);
  font-weight: 800;
  font-size: clamp(2rem, 5.4vw, 3.125rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lp-section-sub {
  margin: 16px 0 0;
  font-size: 1rem;
  color: var(--lp-ink-soft);
}

.lp-section-foot { margin-top: 38px; }

/* ---------- The wall of prints ---------- */

/* Breaks the page's measure and runs the full width of the viewport, because
   a wall of photos does not stop where the body copy stops. */
.lp-wall { max-width: none; padding-inline: 0; }

.lp-wall-head {
  max-width: var(--lp-max);
  margin-inline: auto;
  padding-inline: var(--lp-gutter);
}

.lp-wall-row {
  /* Reserve the tallest print (3:4 window + the stock border) plus the
     row's vertical padding while the photos load, so the sections below
     don't move when they land (#6571). */
  min-height: calc(clamp(210px, 58vw, 258px) * 4 / 3 + 44px + 60px);
  display: flex;
  align-items: center;
  gap: clamp(22px, 4vw, 52px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  /* Vertical: room for the tape, the rotation and the focus ring, which the
     scroll container would otherwise clip. Horizontal: line the first print
     up with the page's measure while still letting the row run off the right
     edge — 100% here is the viewport width, since .lp-wall is full-bleed. */
  padding-block: 30px;
  padding-inline: max(
    var(--lp-gutter),
    calc((100% - var(--lp-max)) / 2 + var(--lp-gutter))
  );
  margin-block: -30px;
  scrollbar-width: thin;
}

.lp-photo-card {
  position: relative;
  flex: 0 0 auto;
  width: clamp(210px, 58vw, 258px);
  margin: 0;
  scroll-snap-align: center;
  transition: transform var(--dur-state) var(--lp-ease);
}

/* A wall is a rhythm of formats and angles, not a row of identical tiles.
   Cycling four tilts and four ratios by position gives that rhythm without
   needing dimensions the LandingPhoto row does not store. */
.lp-photo-card:nth-child(4n + 1) { transform: rotate(-2.4deg); }
.lp-photo-card:nth-child(4n + 2) { transform: rotate(1.8deg) translateY(-14px); }
.lp-photo-card:nth-child(4n + 3) { transform: rotate(-1.2deg) translateY(10px); }
.lp-photo-card:nth-child(4n + 4) { transform: rotate(3deg); }

.lp-photo-card:nth-child(4n + 1) .lp-print-window { aspect-ratio: 4 / 5; }
.lp-photo-card:nth-child(4n + 2) .lp-print-window { aspect-ratio: 1 / 1; }
.lp-photo-card:nth-child(4n + 3) .lp-print-window { aspect-ratio: 5 / 4; }
.lp-photo-card:nth-child(4n + 4) .lp-print-window { aspect-ratio: 3 / 4; }

/* Straightening a crooked print is what you actually do when you look at one
   on a wall. */
.lp-photo-card:hover,
.lp-photo-card:focus-within { transform: rotate(0deg) scale(1.03); }

/* ---------- What it does ---------- */

.lp-cards {
  display: grid;
  gap: 18px;
}

.lp-card {
  position: relative;
  padding: 24px 22px 26px;
  background: var(--lp-panel);
  border: 2px solid var(--lp-ink);
  border-radius: 14px;
}

/* Each card is over-printed with a different ink, cycled by position — a
   sheet of stickers comes off the press in colour order. */
.lp-card:nth-child(3n + 1) { --lp-card-ink: var(--lp-brand); }
.lp-card:nth-child(3n + 2) { --lp-card-ink: var(--lp-coral); }
.lp-card:nth-child(3n + 3) { --lp-card-ink: var(--lp-amber); }

.lp-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 22px;
  width: 46px;
  height: 8px;
  border-radius: 0 0 6px 6px;
  background: var(--lp-card-ink);
}

.lp-card h3 {
  margin: 0;
  font-family: var(--lp-display);
  font-size: 1.1875rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--lp-ink);
}

.lp-card p {
  margin: 10px 0 0;
  font-size: 0.9375rem;
  color: var(--lp-ink-soft);
}

/* ---------- Three steps, as a route ---------- */

.lp-steps {
  position: relative;
  display: grid;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-step {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: start;
  gap: 4px 18px;
}

/* The pin. Numbered because the content genuinely is a sequence — you cannot
   share a code before there is a trip to share. */
.lp-step-num {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid var(--lp-invert-fg);
  border-radius: 50%;
  /* A waypoint takes the colour of the route it sits on, so the pin is amber
     like the dashes rather than green. Green stays reserved for controls —
     and a green pin would in any case near-vanish into this band's own
     green-black ground in light mode. */
  background: var(--lp-amber);
  color: var(--lp-amber-fg);
  font-family: var(--lp-display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.lp-step h3 {
  margin: 4px 0 0;
  font-family: var(--lp-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lp-step p {
  margin: 8px 0 0;
  max-width: 46ch;
  font-size: 0.9375rem;
  color: var(--lp-invert-soft);
}

/* The route between the pins: a dashed line, the one on every map that shows
   a journey rather than a road. Vertical while the steps stack. */
.lp-steps::before {
  content: '';
  position: absolute;
  top: 26px;
  bottom: 26px;
  left: 25px;
  width: 3px;
  background: repeating-linear-gradient(
    to bottom,
    var(--lp-amber) 0 9px,
    transparent 9px 18px
  );
}

/* ---------- Discover stubs ---------- */

/* The shelf is the feed's grid card (.discover-card, css/discover.css). Only the
   layout is landing's: two columns on a phone, up to three on wider screens, and
   no report/share on a public shelf (H03 shows the counts alone). */
.lp-discover-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 6px 2px 10px;
}
@media (min-width: 900px) {
  .lp-discover-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.lp-discover-row .discover-report-btn,
.lp-discover-row .discover-share-btn { display: none; }

/* ---------- FAQ ---------- */

.lp-faq {
  display: grid;
  gap: 12px;
}

.lp-faq-item {
  background: var(--lp-panel);
  border: 2px solid var(--lp-ink);
  border-radius: 12px;
  overflow: hidden;
}

.lp-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--tap-min);
  padding: 16px 18px;
  font-family: var(--lp-display);
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  cursor: pointer;
  list-style: none;
}
.lp-faq-item summary::-webkit-details-marker { display: none; }

.lp-faq-item summary::after {
  content: '';
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background:
    linear-gradient(var(--lp-brand-fg), var(--lp-brand-fg)) 50% 50% / 11px 2.5px no-repeat,
    linear-gradient(var(--lp-brand-fg), var(--lp-brand-fg)) 50% 50% / 2.5px 11px no-repeat,
    var(--lp-brand);
  transition: transform var(--dur-state) var(--lp-ease);
}
.lp-faq-item[open] summary::after { transform: rotate(135deg); }

.lp-faq-item p {
  margin: 0;
  padding: 0 18px 18px;
  max-width: 62ch;
  font-size: 0.9375rem;
  color: var(--lp-ink-soft);
}
.lp-faq-item p a { color: var(--lp-brand); text-underline-offset: 3px; }

/* ---------- Footer ---------- */

/* The last thing on the page is a poster, not a section: one full-bleed
   field of brand green with the instruction set as large as it will go. It
   uses --lp-brand-field rather than --lp-brand for the same reason the app
   pins --topbar-bg — a full-bleed field of the dark-mode mint would be
   unreadable — which also means the page opens and closes on the same green
   the app's own top bar is painted in. */
.lp-footer {
  max-width: none;
  padding: clamp(64px, 10vw, 116px) var(--lp-gutter) 36px;
  background: var(--lp-brand-field);
  border-top: 2px solid var(--lp-ink);
  color: var(--lp-brand-field-fg);
}

.lp-footer-cta {
  max-width: var(--lp-max);
  margin: 0 auto;
  text-align: center;
}

.lp-footer-cta h2 {
  margin: 0 0 8px;
  font-family: var(--lp-display);
  font-weight: 800;
  font-size: clamp(4rem, 22vw, 11rem);
  line-height: 0.82;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.lp-footer-cta p {
  margin: 0 auto 30px;
  max-width: 34ch;
  font-size: 1.0625rem;
}

.lp-footer .lp-btn {
  /* A pale pill carrying the green, the way the app's top bar holds its
     white logo/profile pills against the same field. */
  border-color: var(--lp-brand-field-fg);
  background: var(--lp-brand-field-fg);
  color: var(--lp-brand-field);
  box-shadow: 5px 5px 0 rgba(6, 40, 17, 0.45);
}
.lp-footer .lp-btn:hover { box-shadow: 3px 3px 0 rgba(6, 40, 17, 0.45); }
.lp-footer .lp-btn:active { box-shadow: 0 0 0 rgba(6, 40, 17, 0.45); }
.lp-footer :focus-visible { --lp-focus: var(--lp-brand-field-fg); }

.lp-footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--lp-max);
  margin: clamp(56px, 9vw, 92px) auto 0;
  padding-top: 20px;
  border-top: 2px solid color-mix(in srgb, var(--lp-brand-field-fg) 45%, transparent);
}

/* The wordmark artwork (#3717), all apricot on the Field Green footer, in
   place of "LANCONG" set in the label face: DESIGN.md allows no other typeface
   for the wordmark. Width follows from height, so it never stretches. */
.lp-footer-brand {
  display: block;
  width: auto;
  height: var(--logo-footer);
  flex-shrink: 0;
}

.lp-footer-links { display: flex; align-items: center; gap: 12px; }
.lp-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  color: inherit;
  text-underline-offset: 3px;
}
.lp-footer-links a:hover { text-decoration-thickness: 2px; }

/* Business identity line (#35) — the Consumer Protection (Electronic Trade
   Transactions) Regulations 2024 require an online business to display its
   name, registration number and contact details, and Lancong sells trip
   passes. Deliberately a full-width third row rather than a third flex item:
   .lp-footer-meta is a space-between row, so without the 100% basis this
   would sit between the brand and the links and pull them apart. */
.lp-footer-entity {
  flex-basis: 100%;
  font-size: 0.7rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--lp-brand-field-fg) 80%, var(--lp-brand-field));
}
/* The contact link is the one part of this line a visitor acts on, so it takes
   the footer's full pale colour (white on Field Green, well past 4.5:1) rather
   than the browser's default blue (1.51:1) and is underlined like the links. */
.lp-footer-entity a {
  color: var(--lp-brand-field-fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Contact page (issue #1006) ---------- */

/* /contact, sharing #auth-screen and every token above with the landing page
   (js/contact.js explains why it lives there). One shout — the headline —
   then a quiet list of stubs. A channel you can press (mailto:, tel:, a web
   link) is a boarding-pass stub that presses into the page like .lp-dcard; a
   channel with no link is informational and, per DESIGN.md, does not move. */
#contact-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.ct-main { flex: 1 0 auto; width: 100%; }
.ct-head { margin-bottom: clamp(28px, 4vw, 44px); }
.ct-head .lp-section-title { font-size: 40px; }
@media (min-width: 900px) { .ct-head .lp-section-title { font-size: 64px; text-wrap: nowrap; } }
.ct-head .lp-section-sub { max-width: 52ch; color: var(--lp-ink); line-height: 1.5; }

/* #6862 (slice 8 of #6363), W-C1 to W-C4: the channels are one keylined list, not separate cards. */
.ct-cards { min-width: 0; }
.ct-list { background: var(--lp-panel); border: 2px solid var(--lp-ink); border-radius: 14px; overflow: hidden; }
.ct-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--lp-hair, rgba(16, 26, 20, 0.14));
  background: transparent;
  color: var(--lp-ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.ct-row:last-child { border-bottom: 0; }
a.ct-row:hover, button.ct-row:hover { background: color-mix(in srgb, var(--lp-ink) 6%, transparent); }
.ct-row-static, .ct-row-skeleton { cursor: default; }
.ct-ri {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 2px solid var(--lp-ink);
  border-radius: 999px;
  background: var(--lp-ground, transparent);
  font-size: 20px;
  color: var(--lp-ink);
}
.ct-ri-skeleton { border-color: var(--lp-hair, rgba(16, 26, 20, 0.14)); background: var(--lp-hair, rgba(16, 26, 20, 0.08)); }
.ct-body { display: flex; flex-direction: column; flex: 1; gap: 2px; min-width: 0; line-height: 1.3; }
.ct-label { color: var(--lp-ink-soft); font-size: 12px; letter-spacing: 0.08em; }
.ct-value { font-size: var(--fs-md, 16px); font-weight: 600; overflow-wrap: anywhere; }
.ct-desc { font-size: 14px; color: var(--lp-ink-soft); }
.ct-chev { flex: none; font-size: 18px; color: var(--lp-ink-soft); }
.ct-row-skeleton .ct-body { gap: 8px; }
.ct-row-skeleton .skeleton { animation: none; background: color-mix(in srgb, var(--lp-ink) 14%, transparent); }

/* Empty and error states: prose, not rows. */
.ct-state { max-width: 52ch; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.ct-state p { margin: 0; color: var(--lp-ink-soft); }
.ct-state a { color: var(--lp-ink); text-decoration-color: var(--lp-brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ct-banner { display: flex; gap: 10px; align-items: flex-start; align-self: stretch; padding: 10px 12px; border: 2px solid var(--df-coral); border-radius: 12px; background: light-dark(#fbe0d8, rgba(226, 106, 69, 0.18)); color: var(--df-coral); font-size: 14px; line-height: 1.4; }
.ct-banner i { margin-top: 1px; }
.ct-fallback { align-self: stretch; padding: 16px; border: 2px solid var(--lp-ink); border-radius: 14px; background: var(--lp-panel); }
.ct-fallback-lead { font-size: 14px; color: var(--lp-ink-soft); line-height: 1.45; }
.ct-fallback-mail { display: block; margin: 2px 0 6px; font-size: 18px; font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Desktop: the shout and intro on the left, the list on the right. */
@media (min-width: 900px) {
  .ct-main { display: grid; grid-template-columns: 1fr minmax(0, 520px); gap: 64px; align-items: start; }
  .ct-head { margin-bottom: 0; }
}

/* W-C1 to W-C4: the top bar is the landing world's lp-nav on the page ground: Route Mark and name, a dashed hairline, a Back pill. */
.ct-nav { display: flex; align-items: center; justify-content: space-between; height: 76px; padding: 0 var(--lp-gutter); border-bottom: 2px dashed var(--lp-hair); }
.ct-nav-brand { display: flex; align-items: center; gap: 10px; color: var(--lp-ink); font-family: var(--lp-display); font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.ct-nav-brand svg { flex: none; width: 32px; height: 32px; }
.ct-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 2px solid var(--lp-ink); border-radius: 999px; background: var(--lp-panel); color: var(--lp-ink); font: inherit; font-weight: 600; box-shadow: 3px 3px 0 var(--lp-ink); cursor: pointer; }
.ct-back:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--lp-ink); }
.ct-legal { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; font-size: 14px; color: var(--lp-ink-soft); }
.ct-legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Entrances ---------- */
/* .is-visible is added by initLandingReveal()'s IntersectionObserver
   (js/landing.js), which falls back to marking everything visible when there
   is no observer — so no rule here may leave content hidden by default in a
   way JS is required to undo. Guarding the whole block on
   prefers-reduced-motion: no-preference means the hidden start state simply
   never exists for a reader who opted out. */
@media (prefers-reduced-motion: no-preference) {
  .lp-reveal,
  .lp-pop {
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity var(--dur-view) var(--lp-ease),
      transform var(--dur-view) var(--lp-ease);
  }
  /* .lp-pop lands rather than arrives — it is a sticker being pressed down. */
  .lp-pop { transition-timing-function: var(--ease-slam); }
  .lp-reveal.is-visible,
  .lp-pop.is-visible {
    opacity: 1;
    transform: none;
  }

  /* A print's resting tilt is layout, not motion, so it fades in where the
     text cards travel — a transform entrance would have to fight the tilt
     each card already carries. The transform transition stays for hover. */
  .lp-photo-card {
    opacity: 0;
    transition:
      opacity var(--dur-view) var(--lp-ease) var(--dur-state),
      transform var(--dur-state) var(--lp-ease);
  }
  .lp-photo-card.is-visible { opacity: 1; }

  /* The steps are revealed by their <ol>'s own .lp-timeline observation, not
     individually — one observer entry for a group that reads as one run. */
  .lp-timeline .lp-step {
    opacity: 0;
    transform: translateX(-14px);
    transition:
      opacity var(--dur-view) var(--lp-ease),
      transform var(--dur-view) var(--lp-ease);
  }
  .lp-timeline.is-visible .lp-step { opacity: 1; transform: none; }

  /* The route draws itself before the pins arrive on it — it maps to the real
     act it is named after, which is what earns it the motion. */
  .lp-timeline::before { scale: 1 0; transform-origin: top center; transition: scale var(--lp-dur-long) var(--lp-ease); }
  .lp-timeline.is-visible::before { scale: 1 1; }

  /* Staggered so each run reads top-down rather than arriving as one block. */
  .lp-card:nth-child(2), .lp-step:nth-child(2) { transition-delay: calc(var(--lp-stagger) * 1); }
  .lp-card:nth-child(3), .lp-step:nth-child(3) { transition-delay: calc(var(--lp-stagger) * 2); }
  .lp-card:nth-child(4) { transition-delay: calc(var(--lp-stagger) * 3); }
  .lp-card:nth-child(5) { transition-delay: calc(var(--lp-stagger) * 4); }
  .lp-card:nth-child(6) { transition-delay: calc(var(--lp-stagger) * 5); }

  /* Page load: the hero settles in one short sequence rather than five
     unrelated ones. */
  .lp-hero-copy > * { animation: lp-rise var(--dur-view) var(--lp-ease) both; }
  .lp-hero-copy > *:nth-child(2) { animation-delay: calc(var(--lp-stagger) * 1); }
  .lp-hero-copy > *:nth-child(3) { animation-delay: calc(var(--lp-stagger) * 2); }
  .lp-hero-copy > *:nth-child(4) { animation-delay: calc(var(--lp-stagger) * 3); }
  .lp-hero-copy > *:nth-child(5) { animation-delay: calc(var(--lp-stagger) * 4); }
  .lp-hero-photo { animation: lp-drop var(--lp-dur-hero) var(--lp-ease) var(--dur-state) both; }

  /* ★ The stamp coming down. js/landing.js adds .is-struck for one animation
     on load and on every swap; the resting transform in .lp-stampword is what
     it lands on, so an interrupted or unsupported animation still leaves the
     word correctly placed. */
  .lp-stampword.is-struck { animation: lp-strike var(--dur-strike) var(--ease-slam) both; }
}

@keyframes lp-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes lp-drop {
  from { opacity: 0; transform: rotate(-9deg) translateY(-26px); }
  to { opacity: 1; transform: rotate(-2deg); }
}

@keyframes lp-strike {
  0% { opacity: 0; transform: rotate(-11deg) scale(1.85); }
  55% { opacity: 1; transform: rotate(-2.6deg) scale(0.95); }
  78% { transform: rotate(-2.6deg) scale(1.025); }
  100% { transform: rotate(-2.6deg) scale(1); }
}

/* Every travelling effect above resolves here to its FINISHED state, never a
   hidden one — same rule the app-wide block in css/style.css follows. Note
   .lp-photo-card is deliberately absent from the transform reset: its tilt is
   layout, not motion, and zeroing it here would flatten the wall. */
@media (prefers-reduced-motion: reduce) {
  .lp-reveal,
  .lp-pop,
  .lp-timeline .lp-step,
  .lp-hero-copy > *,
  .lp-hero-photo {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
  .lp-hero-photo { transform: rotate(-2deg); }
  .lp-photo-card { opacity: 1; transition: none; }
  .lp-photo-card:hover, .lp-photo-card:focus-within { transform: none; }
  .lp-timeline::before { scale: 1 1; }
  .lp-stampword { animation: none; }
  .lp-hero-bg img { transition: none; }
  .lp-btn { transition: none; }
}

/* ---------- Narrow ---------- */

/* The fanned prints under the hero shot need gutter to fan into, and at phone
   width there is only 20px of it — the back sheet's corner used to be absorbed
   by the stray 16px of page padding this file spent months accidentally
   carrying (see the ⚠️ at the top). With the page genuinely full-bleed the fan
   has to tuck in on its own. */
@media (max-width: 680px) {
  /* The fan's reach scales with the print's own width, so the print gives back
     a little of the column and the angles ease off — together that keeps the
     back sheet's corner inside a 20px gutter instead of 5px outside it. */
  .lp-hero-photo { width: min(100% - 26px, 440px); }
  .lp-hero-photo .lp-stack-a { transform: rotate(3deg) translate(4px, 3px); }
  .lp-hero-photo .lp-stack-b { transform: rotate(-3.5deg) translate(-4px, 5px); }
}

/* ---------- Wide ---------- */

@media (min-width: 700px) {
  .lp-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .lp-nav-cta { display: inline-flex; }

  .lp-hero {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: clamp(48px, 6vw, 88px);
  }
  /* With no photo the copy is the whole hero, so it becomes a centred poster
     rather than a column of text against an empty half-page. */
  .lp-hero.lp-hero-no-photo {
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
    text-align: center;
  }
  .lp-hero.lp-hero-no-photo .lp-eyebrow,
  .lp-hero.lp-hero-no-photo .lp-hero-sub { margin-inline: auto; }
  .lp-hero.lp-hero-no-photo .lp-hero-ctas { justify-content: center; }
  /* The rotation swings the stamp's left edge out; on a centred line the
     optical centre needs the compensating pad removed. */
  .lp-hero.lp-hero-no-photo .lp-stamp-slot { padding-left: 0; }

  .lp-cards { grid-template-columns: repeat(3, 1fr); gap: 22px; }

  /* Three pins along one horizontal route, which is what a journey drawn on a
     map actually looks like. */
  .lp-steps { grid-template-columns: repeat(3, 1fr); gap: 34px; }
  .lp-step { grid-template-columns: 1fr; gap: 0; }
  .lp-step-num { grid-row: auto; margin-bottom: 18px; }
  /* Ends ON the last pin rather than running past it: with three equal
     columns and a 34px gap, one column width in from the right edge is
     (100% - 68px)/3, and the pin's centre is 26px inside that. */
  .lp-steps::before {
    top: 25px;
    bottom: auto;
    left: 26px;
    right: calc((100% - 68px) / 3 - 26px);
    width: auto;
    height: 3px;
    background: repeating-linear-gradient(
      to right,
      var(--lp-amber) 0 9px,
      transparent 9px 18px
    );
  }
}

@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .lp-timeline::before { scale: 0 1; transform-origin: left center; }
  .lp-timeline.is-visible::before { scale: 1 1; }
}

/* Route Mark light/dark pair: the full-colour symbol on a light ground, the
   all-apricot one on a dark ground (Coral Dot Rule). Both <img>s are in the
   markup; data-theme (always resolved to light/dark by index.html's boot
   script and setThemePreference()) decides which shows. */
.rm-dark { display: none; }
:root[data-theme="dark"] .rm-light { display: none; }
:root[data-theme="dark"] .rm-dark { display: block; }

/* Issue #2310 (#2192) — sign-in motion (the
   classes are added by js/auth.js). Tokens only.
   The Route Mark draws in along its length (a left-to-right reveal, under 1s)
   and the dot, at the right end, lands last. Never blocks input. */
@keyframes route-mark-draw {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
.lp-nav-brand img.route-mark-draw {
  animation: route-mark-draw var(--dur-view) var(--ease-out) both;
}
@keyframes route-mark-land {
  50% { transform: scale(1.06); }
}
.lp-nav-brand img.route-mark-land {
  transform-origin: left center;
  animation: route-mark-land var(--dur-state) var(--ease-out);
}
@keyframes auth-form-swap-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.auth-form-swap { animation: auth-form-swap-in var(--dur-view) var(--ease-out) both; }
/* Validation message eases in; colour stays Alert Red (--error-text), never coral. */
@keyframes field-error-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.field-error-in, .ap-field-error.field-error-in { animation: field-error-in var(--dur-feedback) var(--ease-out) both; }

/* Phone: the legal links sit under the list, as W-C2 draws them. */
@media (max-width: 899px) {
  .ct-main { display: flex; flex-direction: column; }
  .ct-head { display: contents; }
  .ct-head .lp-section-title { order: 1; }
  #contact-intro { order: 2; margin-bottom: 20px; }
  .ct-cards { order: 3; }
  .ct-legal { order: 4; }
}

/* #6571 step 6: these screens are hidden by default in discover.css and the stamps sheet, which now load only once the app does. Repeated
   here (same selector, same position in the cascade as before) so the landing page does not lay them out, and fetch
   the icon fonts for their markup, while the app's scripts are still coming. */
#discover-screen, #shared-trip-screen, #user-profile-screen, #profile-screen, #invite-screen, #pending-approval-screen,
#stamps-screen, #friends-screen {
  display: none;
}

/* /css/discover.css */
/* =========================================================
   DISCOVER FEED (issue #30)
   Converted to Departure Fever (DESIGN.md names Discover explicitly among
   the surfaces the system is normative on) — converted whole, per the
   migration posture rule, not patched piecemeal. Shares this file with
   #shared-trip-screen/#user-profile-screen (/discover/:code, /u/:username) and
   #profile-screen (/profile, #1591), so
   those public pages pick up the same conversion for free.
   ========================================================= */

/* ── Screen shell ──────────────────────────────────────── */
#discover-screen, #shared-trip-screen, #user-profile-screen, #profile-screen, #invite-screen, #pending-approval-screen {
  display: none;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  /* Same halftone/wash ground as .home-screen and .app.active. */
  /* Ground: print (.df-ground-print group in css/style.css). */
  color: var(--df-ink);
  font-family: var(--df-sans);
}

/* #4105 — board 04 draws the asked-to-join screen on the wash alone, like the
   trip view (.app.active, #3946): it is in the .df-ground-working group in
   css/style.css, not the print group. */

/* Pinned Field Green, same bar the marketing nav and the in-app tab bar use
   (DESIGN.md: "a visitor meets the product's chrome before logging in and
   the landing → app transition has no seam") — not --vn-trail-green, which flips to
   mint at night and would be unreadable as a full-bleed plane. */
.discover-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-3xl);
  height: 60px;
  background: var(--topbar-bg);
  flex-shrink: 0;
}

/* Quiet icon control on a green field (DESIGN.md: "the quiet button becomes
   pale text at 85% opacity"). Kept at its natural ~24px glyph size but with
   the same ::before hit-area trick as .discover-like-btn below so the actual
   tap target still clears --tap-min without inflating the bar's height. */
.discover-back-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--topbar-fg);
  font-size: var(--fs-lg);
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-feedback) var(--df-ease);
}
.discover-back-btn:hover { background: rgba(255,255,255,0.14); }
.discover-back-btn:active { background: rgba(255,255,255,0.22); }

/* #4690 — the Route Mark lockup beside the back arrow, same --logo-nav size as
   the trip shell's. The title takes the remaining width and truncates. */
.discover-topbar-brand-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  flex: none;
  min-height: var(--tap-min);
  min-width: var(--tap-min);
}
#user-profile-screen .discover-topbar-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.discover-topbar-title {
  font-family: var(--df-sans);
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--topbar-fg);
}

/* ── Scrollable body ───────────────────────────────────── */
.discover-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--space-3xl);
  position: relative;
}

/* ── Grid (#3043, D122) ─────────────────────────────────
   One grid card everywhere: two-up on a phone, five-up on desktop (M4-R2).
   The photo is a fixed 4:3 box, so rows align and the loading skeleton is the
   exact same shape. List view (D123) is the same markup as one row per post. */
.discover-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2xl);
  align-items: start;
}
.discover-grid.discover-grid-list { grid-template-columns: minmax(0, 1fr); }
/* Issue #3442 (OP-7): a long feed skips layout and paint for cards below the
   fold. contain-intrinsic-size is the card's box (4:3 photo + body + actions
   in the grid, one row in the list); `auto` remembers the real size once seen. */
.discover-grid > .discover-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
}
.discover-grid.discover-grid-list > .discover-card { contain-intrinsic-size: auto 190px; }

/* Grid / list switch, beside Saved. */
.discover-view-toggle {
  margin-left: auto;
  display: inline-flex;
  flex-shrink: 0;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
  padding: 3px;
}
.discover-view-btn {
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: var(--radius-pill);
  color: var(--df-ink);
  font-size: var(--fs-md);
  cursor: pointer;
}
.discover-view-btn.active { background: var(--df-ink); color: var(--df-panel); }

/* ── Card: the stub ────────────────────────────────────────
   Same geometry and press states as .home-trip-card (My Trips) — Cut Stock,
   2px ink keyline, 12px radius, hard offset shadow, the stub pressing into
   its own shadow on tap. A photo-led social card is still a pressable stub
   here, not the inert "card" component (that one doesn't move). */
.discover-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  box-shadow: var(--df-press);
  overflow: hidden;
  transition: transform var(--dur-feedback) var(--df-ease),
              box-shadow var(--dur-feedback) var(--df-ease);
}
.discover-card:hover {
  transform: translate(2px, 2px);
  box-shadow: var(--df-press-hover);
}
/* :active covers the ad card (a single <a> — the whole pressable element);
   :has() covers a trip card, where the actual pressable element is the
   nested .discover-card-open button. */
.discover-card:active,
.discover-card:has(.discover-card-open:active) {
  transform: translate(4px, 4px);
  box-shadow: var(--df-press-active);
}
/* A loading skeleton is not pressable — it must not offer the stub's press. */
.discover-card-skeleton:hover,
.discover-card-skeleton:active {
  transform: none;
  box-shadow: var(--df-press);
}

/* The card's main action — everything except the like/save row below. A
   real <button> (not the whole card as a <div onclick>), same convention as
   .home-trip-card-open: reachable by keyboard, announced to a screen reader.
   Like/save are sibling buttons rather than nested inside, since a <button>
   may not contain another. */
.discover-card-open {
  display: block;
  width: 100%;
  background: none;
  border: none;
  appearance: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

.discover-card-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--vn-trail-green-light);
  overflow: hidden;
}
.discover-card-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
/* Issue #3439 (OP-5): the box above is reserved by aspect-ratio, so the photo
   can fade in over its teal ground without moving anything. */
.discover-card-img-fade {
  opacity: 0;
  transition: opacity var(--dur-state) var(--ease-out);
}
.discover-card-img-fade.is-loaded { opacity: 1; }

/* The type tag (D125/D133, #6723): one corner, every card. A stock pill with
   its own 2px keyline, ink on Cut Stock, so it reads over a white sky or a
   black photo alike. */
.discover-card-tag {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  max-width: calc(100% - 2 * var(--space-md));
  padding: 3px var(--space-md);
  background: var(--df-panel);
  color: var(--df-ink);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* No cover photo: a deliberate typographic mark, not an emoji standing in
   for a flag. Windows Chrome ships no flag glyphs at all, so the country code
   is set as type on purpose: every visitor sees the same mark. */
.discover-card-img-placeholder {
  width: 100%;
  height: 100%;
  background: var(--vn-trail-green-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.discover-card-cc {
  font-family: var(--df-sans);
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--vn-trail-green);
}

.discover-card-body {
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: 0;
}

/* Titles are Fraunces (D131); one line in the grid, two in the list row. */
.discover-card-name {
  font-family: var(--df-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--df-ink);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discover-card-places {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  min-width: 0;
}
.discover-card-places span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.discover-card-host {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--df-ink);
  min-width: 0;
}
.discover-card-host span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.discover-card-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.discover-card-avatar-init {
  background: var(--vn-trail-green);
  color: var(--df-brand-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 600;
}

/* ── Feed headline (F01/F08, #4908) ─────────────────────── */
/* The screen's one shout (DESIGN.md Display tier). On desktop it sits beside
   the search with Filter and the view toggle under it (F08). */
.discover-feed-head { margin-bottom: var(--space-2xl); }
.discover-feed-head .discover-search-row { margin-bottom: 0; }
.discover-feed-headline {
  margin: 0 0 var(--space-xl);
  font-family: var(--df-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 10vw, 4.5rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: var(--df-ink);
  overflow-wrap: anywhere;
}
@media (min-width: 900px) {
  #discover-screen .discover-feed-head {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: var(--space-3xl);
    align-items: start;
  }
  #discover-screen .discover-feed-headline { margin: 0; }
}

/* ── Search bar (issue #77) ─────────────────────────────── */
.discover-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

/* Scoped to this one field rather than the shared global input rule (which
   doesn't even cover type="search" — this control was silently on raw
   browser UA styling before). Deliberately not touching the app-wide input
   rule: that's shared infrastructure well outside Discover's own surface. */
.discover-search-input {
  flex: 1 1 100%;
  width: 100%;
  margin-bottom: 0;
  height: var(--tap-min);
  padding: 0 var(--space-2xl);
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  color: var(--df-ink);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  box-sizing: border-box;
}
.discover-search-input::placeholder { color: var(--df-ink-soft); }
.discover-search-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--vn-trail-green), 0 0 0 5px var(--df-panel);
}

/* ── Saved filter toggle (issue #193, /discover/saved) ────── */
.discover-saved-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
  min-height: var(--tap-min);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  padding: 0 var(--space-2xl);
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--df-ink);
  cursor: pointer;
  box-shadow: var(--df-press);
  transition: transform var(--dur-feedback) var(--df-ease),
              box-shadow var(--dur-feedback) var(--df-ease);
}
.discover-saved-toggle:hover {
  transform: translate(2px, 2px);
  box-shadow: var(--df-press-hover);
}
.discover-saved-toggle:active {
  transform: translate(4px, 4px);
  box-shadow: var(--df-press-active);
}
.discover-saved-toggle.active {
  background: var(--selected-bg);
  border-color: var(--selected-bg);
  color: var(--on-selected);
}

/* #4943 — active sort name between Filter and the layout toggle (boards F01-F08) */
.discover-sort-label {
  flex-shrink: 0;
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  color: var(--df-ink-soft);
  white-space: nowrap;
}
/* At 390px "Top viewed" (71px) pushes the layout toggle onto a third row; wrap
   it onto two lines inside the ~56px left between Filter and the toggle. */
@media (max-width: 480px) {
  .discover-sort-label {
    white-space: normal;
    max-width: 55px;
    line-height: 1.15;
  }
}

/* ── Like/save actions (issue #76) ─────────────────────────── */
.discover-card-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin: 0 var(--space-xl) var(--space-lg);
  padding-top: var(--space-md);
  border-top: 2px dashed var(--df-hair);
}
/* Counts sit bottom-right (F01); report and share stay left, quiet. */
.discover-card-counts {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}
.discover-comment-count {
  /* #5142 — a 44px link to the post's comments, like its like/save neighbours. */
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-2xs);
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  color: var(--df-ink);
  font-variant-numeric: tabular-nums;
}

/* Visible box stays small to fit the card footer — the ::before pseudo
   expands the actual tappable area without inflating the row, same
   technique as .stop-menu-btn (css/style.css). The buttons themselves are
   --tap-min (#4888); the row's gap is small and it wraps, so four 44px
   targets plus the counts fit a 390px card without clipping. */
.discover-like-btn, .discover-save-btn, .discover-share-btn, .discover-report-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-2xs);
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  justify-content: center;
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  color: var(--df-ink-soft);
  position: relative;
}
.discover-like-btn::before, .discover-save-btn::before, .discover-share-btn::before, .discover-report-btn::before, .discover-comment-count::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(var(--tap-min), 100%);
  height: max(var(--tap-min), 100%);
  transform: translate(-50%, -50%);
}

/* #5015 — below ~220px the five-control row has no room for gaps; the 44px
   targets already space the glyphs. */
@container (max-width: 219px) {
  .discover-card-actions { gap: 0; }
  .discover-card-counts { gap: 0; }
}
/* Below ~180px three counts like "1.2k" outgrow the row: at 360px (a ~153px
   card) the comment count clipped at the card edge. Tighten each count's own
   padding first; on the narrowest cards narrow the row's side margins too.
   The 44px targets stay. */
@container (max-width: 179px) {
  .discover-like-btn, .discover-save-btn, .discover-comment-count { padding-inline: 0; gap: var(--space-2xs); }
}
@container (max-width: 160px) {
  .discover-card-actions { margin-inline: var(--space-xs); }
}

/* #5137 — like, save and comment read ink with 18px glyphs, as the boards
   draw them (F01/F03/F08). Report and share stay quiet (--df-ink-soft above). */
.discover-like-btn, .discover-save-btn { color: var(--df-ink); }
.discover-like-btn .ti, .discover-save-btn .ti { font-size: var(--fs-lg); }
.discover-comment-count .ti { font-size: var(--fs-lg); }
.discover-share-btn, .discover-report-btn { color: var(--df-ink-soft); }

.discover-like-btn.active { color: var(--df-ink); }
.discover-save-btn.active { color: var(--df-ink); }
.discover-like-count { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.discover-save-count { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }

/* ── Sponsored placements (issue #79) ──────────────────────── */
.discover-ad-card {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.discover-ad-card > .discover-card-img { height: auto; aspect-ratio: 4 / 3; }

.discover-ad-tag {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--df-ink-soft);
  margin-bottom: var(--space-2xs);
}

/* ── The one card labelled AD (issue #7376, boards F15) ─────────────────────
   Same shape as a trip card. The AD pill takes the type tag's corner and look, so it is never mistaken for a trip. */
.discover-ad-card[hidden] { display: none; }
.discover-ad-photo-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--vn-amber), var(--df-ink-soft));
}
.discover-ad-badge {
  position: absolute;
  top: var(--sp-md);
  left: var(--sp-md);
  padding: var(--sp-xs) var(--sp-md);
  background: var(--df-panel);
  color: var(--df-ink);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
}
/* The card is a link where a trip card is a button: no link underline on its words. */
.discover-ad-open { text-decoration: none; }
.discover-ad-line {
  margin-top: var(--sp-xs);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}
.discover-ad-meta {
  padding: 0 var(--sp-sm) var(--sp-sm);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}
.discover-ad-link {
  min-height: var(--tap-min);
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.discover-ad-why { margin: 0; padding: 0 var(--sp-md) var(--sp-md); font-size: var(--fs-xs); color: var(--df-ink-soft); }
/* On a page of its own prose (a city page, Stamps) the card is one grid cell wide, not the page. */
.ad-slot-standalone { max-width: 320px; margin-top: var(--sp-2xl); }
/* Discover's grid tiles, and an AD card on its own, draw their title in the title face (boards F15). */
#discover-screen .discover-grid .discover-card-name,
.ad-slot-standalone .discover-card-name { font-family: var(--df-title); font-weight: 700; }

/* ── Guest wall ─────────────────────────────────────────── */
#discover-guest-wall, #shared-trip-cta, #user-profile-cta {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4xl) var(--space-3xl);
  margin-top: var(--space-2xl);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  text-align: center;
  gap: var(--space-md);
}

/* Shared by all three guest walls (#discover-guest-wall, #shared-trip-cta,
   #user-profile-cta) — a drawn Tabler glyph, never an emoji. The three used
   to print ✈️/🗺️/🗺️, which render at a different weight, size and baseline
   on every platform and are read aloud as "airplane"/"world map" by a screen
   reader on top of a title that already says it; the glyph is decorative and
   marked aria-hidden in the markup instead. Same reasoning already written
   down for PLACE_TYPES (js/state.js) and the feed card's country-code
   placeholder above. Discover's wall takes ti-telescope, the icon My Trips'
   own Discover action card uses; the two sign-up CTAs take the Route Mark
   (assets/brand/, --logo-hero so the full symbol, light/dark swap via
   .rm-light/.rm-dark in landing.css).

   Ink, not green: this glyph isn't pressable, and green in this system is
   the one signal for something that is (the button below it). Matches
   .dtl-empty's icon, so the two states a visitor can meet on this same
   screen agree. */
.discover-guest-wall-icon {
  font-size: var(--fs-display-32);
  line-height: 1;
  color: var(--df-ink-soft);
  margin-bottom: var(--space-xs);
}

/* #2562 — the profile sign-up card. Sign Up is the green pill (Trail Green,
   --df-brand-fg on top: Mint Flip Rule); Log In is a quiet text link. A cold
   visitor from a shared link is a sign-up, not a log-in. */
.user-profile-cta-signup {
  width: 100%;
  min-height: var(--tap-min);
  padding: 0 var(--space-xl);
  border: 0;
  border-radius: 999px;
  background: var(--df-brand);
  color: var(--df-brand-fg);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.user-profile-cta-login {
  min-height: var(--tap-min);
  padding: 0 var(--space-md);
  border: 0;
  background: none;
  color: var(--df-ink-soft);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* On a phone the card rides the bottom edge so the call to action is
   reachable without scrolling past every trip. */
@media (max-width: 680px) {
  #user-profile-cta {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: var(--space-md);
    margin-top: var(--space-lg);
    gap: var(--space-xs);
  }
  #user-profile-cta .discover-guest-wall-icon,
  #user-profile-cta .discover-guest-wall-sub { display: none; }
}

.discover-guest-wall-mark {
  width: var(--logo-hero);
  height: var(--logo-hero);
}

.discover-guest-wall-title {
  font-family: var(--df-sans);
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--df-ink);
}

.discover-guest-wall-sub {
  font-size: var(--fs-sm);
  color: var(--df-ink-soft);
  margin-bottom: var(--space-xs);
}

/* ── Pending approval screen (issue #628) ─────────────────── */
.pending-approval-status {
  font-size: var(--fs-sm);
  color: var(--df-ink);
  margin: var(--space-xl) 0;
}

/* #3863 — screen 04 of the People boards. The body keeps the board's width
   at 1280px instead of stretching into a strip. */
#pending-approval-body { max-width: 480px; margin: 0 auto; }
.pending-approval-sub {
  font-family: var(--df-sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pending-approval-card {
  gap: var(--space-xs);
  padding: var(--space-xl);
}
.pending-approval-name {
  font-family: var(--df-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--df-ink);
  margin-bottom: var(--space-xs);
}
.pending-approval-place,
.pending-approval-meta {
  font-size: var(--fs-sm);
  color: var(--df-ink-soft);
}
.pending-approval-cancel {
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--space-lg);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--df-ink);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: 999px;
  cursor: pointer;
  transition: transform var(--dur-feedback) var(--df-ease);
}
.pending-approval-cancel:hover { transform: translate(2px, 2px); }
.pending-approval-cancel:active { transform: translate(4px, 4px); }
.pending-approval-cancel:disabled { opacity: 0.6; cursor: default; }

/* ── Empty / loading states ────────────────────────────── */
/* #discover-loading shares .discover-grid's masonry columns (set in the
   HTML class list) so its skeleton cards line up with the real feed one
   layout swap later — see renderDiscoverLoadingSkeleton() in discover.js. */
#discover-loading { display: none; }
.discover-card-skeleton-photo { aspect-ratio: 4 / 3; overflow: hidden; }
.discover-card-skeleton-photo > .skeleton { display: block; }
.discover-row-skeleton { display: flex; gap: var(--space-xl); padding: var(--space-xl); }
.discover-row-skeleton .skeleton-rect { flex-shrink: 0; border-radius: var(--df-radius-stub); }
.discover-row-skeleton-lines { flex: 1; min-width: 0; padding-top: var(--space-xs); }

/* ── List row (#3043, D123) ─────────────────────────────
   Photo left with its tag, then title (two lines), places and host, with the
   controls bottom-right. Same markup as the grid card. */
.discover-grid-list .discover-card { display: grid; grid-template-columns: 1fr; }
.discover-grid-list .discover-card-open {
  /* The action row shares this cell (#5136); without an explicit grid-area
     the open button auto-places into a second row under it. */
  grid-area: 1 / 1;
  display: flex;
  gap: var(--space-xl);
  padding: var(--space-xl) var(--space-xl) 0;
}
.discover-grid-list .discover-card-photo {
  flex: 0 0 112px;
  width: 112px;
  aspect-ratio: 4 / 5;
  border-radius: var(--df-radius-stub);
  align-self: flex-start;
}
.discover-grid-list .discover-card-body {
  padding: 0;
  padding-bottom: calc(var(--tap-min) + var(--space-lg)); /* room for the action row (#5136) */
  flex: 1;
  justify-content: flex-start;
}
.discover-grid-list .discover-card-name {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.discover-grid-list .discover-card-tag { top: var(--space-sm); left: var(--space-sm); font-size: var(--fs-xs); padding: 2px var(--space-sm); }
.discover-grid-list .discover-card-actions {
  /* #5136 — F03: the row sits in the text column, beside the photo. It shares
     the open button's grid cell and is pushed right past padding + photo + gap. */
  grid-area: 1 / 1;
  align-self: end;
  margin: 0 var(--space-xl) var(--space-lg);
  margin-left: calc(var(--space-xl) + 112px + var(--space-xl));
}
/* The text column needs ~252px for five 44px controls with 4-digit counts on
   one line; a 390px phone gives it ~206px, where the row wrapped onto the host
   line. Narrower than that, the row runs full width under the photo instead. */
@container (max-width: 399px) {
  .discover-grid-list .discover-card-open { padding-bottom: var(--space-md); }
  .discover-grid-list .discover-card-body { padding-bottom: 0; }
  .discover-grid-list .discover-card-actions { grid-area: auto; align-self: auto; margin-left: var(--space-xl); }
}

#discover-empty {
  display: none;
  text-align: center;
  padding: var(--space-5xl) var(--space-3xl);
  color: var(--df-ink-soft);
  font-size: var(--fs-sm);
}

#shared-trip-error, #user-profile-error, #invite-error {
  display: none;
  text-align: center;
  padding: var(--space-5xl) var(--space-3xl);
  color: var(--df-ink-soft);
  font-size: var(--fs-sm);
}

/* #2561 — the profile's two dead ends take .dtl-empty's icon-then-message shape. */
#user-profile-error i {
  display: block;
  font-size: var(--fs-display-32);
  color: var(--df-ink-soft);
}
#user-profile-error p {
  max-width: 34ch;
  margin: var(--space-xl) auto var(--space-xl);
  line-height: 1.6;
}
#user-profile-error .up-error-action { min-height: var(--tap-min); }

#shared-trip-loading, #user-profile-loading, #invite-loading {
  display: none;
  padding: var(--space-4xl);
}

/* ── Invite page: the boarding pass (#6352, /i/:token) ─────
   Board: docs/design/invite-screen/boards.html (direction A). The trip is a
   photo card (the same shape as My Trips and the app's R2); under it — beside
   it from 1024px — a perforated counterfoil holds who invited you, the name
   field and the one primary button. Nothing is borrowed from /discover/:code
   (.dtl-*) any more. Motion is tokens only; every travelling effect resolves
   to its finished state in style.css's prefers-reduced-motion block. */
#invite-screen .discover-body { padding: var(--space-3xl) var(--space-2xl) var(--space-5xl); }
@media (min-width: 1024px) {
  #invite-screen .discover-body { padding: 44px clamp(40px, calc((100% - 1000px) / 2), 220px) 56px; }
}

.inv-layout { display: grid; gap: var(--space-2xl); max-width: 520px; margin: 0 auto; }
.inv-hero-col, .inv-foil-col { min-width: 0; }
@media (min-width: 1024px) {
  .inv-layout { grid-template-columns: minmax(0, 1fr) 440px; gap: 36px; max-width: none; align-items: start; }
}

/* The photo card. Field Green is both the no-photo ground and what shows if the
   cover fails to load; the scrim keeps the Lamplight text legible on any photo. */
.inv-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 220px;
  overflow: hidden;
  /* Field Green by day; the pinned deep green by night, so Lamplight text keeps its contrast. */
  background: light-dark(var(--vn-trail-green), var(--df-pin-deep-green));
  color: var(--df-pin-lamplight);
  border: 2px solid var(--df-ink);
  border-radius: 16px;
}
.inv-hero-short { min-height: 120px; }
.inv-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.inv-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(8, 20, 12, 0.78));
  pointer-events: none;
}
.inv-hero-nophoto::after { display: none; }
.inv-hero-mark { display: none; position: absolute; top: 14px; right: 14px; width: 64px; height: 64px; }
.inv-hero-nophoto .inv-hero-mark { display: block; }
.inv-hero-short .inv-hero-mark { width: 40px; height: 40px; }
.inv-hero-txt { position: relative; z-index: 1; padding: var(--space-2xl); display: flex; flex-direction: column; align-items: flex-start; }
.inv-kind {
  margin-bottom: var(--space-md);
  padding: 3px 10px 2px;
  border: 2px solid currentColor;
  border-radius: var(--radius-pill);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.3;
}
.inv-hero-name {
  margin: 0;
  font-family: var(--df-title);
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.inv-hero-short .inv-hero-name { font-size: var(--fs-xl); }
.inv-hero-line { margin-top: var(--space-xs); font-size: var(--fs-sm); }
.inv-hero-short .inv-hero-line { font-size: var(--fs-xs); }
@media (min-width: 1024px) {
  .inv-hero { min-height: 520px; }
  .inv-hero-short { min-height: 220px; }
  .inv-hero-txt { padding: 28px; }
  .inv-hero-name { font-size: 2.75rem; }
  .inv-hero-short .inv-hero-name { font-size: var(--fs-2xl); }
  .inv-hero-line { font-size: var(--fs-md); }
}

/* The counterfoil. The perforation's notches are ground-coloured half discs. */
.inv-foil {
  position: relative;
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: 16px;
}
.inv-foil-top { padding: var(--space-xl) var(--space-xl) var(--space-lg); }
.inv-foil-bot { display: flex; flex-direction: column; gap: var(--space-lg); padding: var(--space-xl); }
.inv-perf { position: relative; height: 0; margin: 0 12px; border-top: 2px dashed var(--df-ink); }
.inv-perf::before, .inv-perf::after {
  content: '';
  position: absolute;
  top: -10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--df-ground);
  border: 2px solid var(--df-ink);
}
.inv-perf::before { left: -23px; clip-path: inset(0 0 0 50%); }
.inv-perf::after { right: -23px; clip-path: inset(0 50% 0 0); }
@media (min-width: 1024px) {
  .inv-foil-top { padding: 22px 22px 18px; }
  .inv-foil-bot { padding: 22px; }
}

.inv-who { display: flex; align-items: center; gap: var(--space-lg); font-size: var(--fs-sm); }
.inv-who b { font-weight: 600; }
.inv-av {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 2px solid var(--df-ink);
  border-radius: 50%;
  background: color-mix(in srgb, var(--vn-trail-green) 18%, var(--df-panel));
  color: var(--df-ink);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.inv-seatline { font-size: var(--fs-sm); }
.inv-seatline b { font-weight: 600; }
.inv-q { margin: 0; font-family: var(--df-sans); font-size: var(--fs-xl); font-weight: 600; line-height: 1.2; }
.inv-sub { margin: var(--space-sm) 0 0; font-size: var(--fs-xs); line-height: 1.45; color: var(--df-ink-soft); }
.inv-account-modal .inv-sub { margin: 0 0 var(--space-lg); }
.inv-account-modal { display: flex; flex-direction: column; gap: var(--space-md); }

/* Account row: Not you? is its own 44px control, not a link inside a sentence. */
.inv-ident {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-lg);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: var(--df-panel);
  font-size: var(--fs-xs);
  line-height: 1.35;
}
.inv-ident-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.inv-ident-t small { display: block; color: var(--df-ink-soft); font-size: var(--fs-xs); }
.inv-ident-sw {
  min-height: var(--tap-min);
  padding: 0 var(--space-xl);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.inv-ident-sw:hover { background: var(--df-ground); }

.inv-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-lg) var(--space-xl);
  border: 2px dashed var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: color-mix(in srgb, var(--df-panel) 70%, transparent);
  font-size: var(--fs-xs);
  line-height: 1.45;
}
.inv-note i { flex: none; margin-top: 1px; font-size: var(--fs-lg); }
.inv-note-ok { border-style: solid; background: color-mix(in srgb, var(--vn-trail-green) 12%, var(--df-panel)); }
.inv-note-ok i { color: var(--vn-trail-green); }

/* The name field. Size and height come from the shared input rule (inputs stay
   16px / 44px on phones, #4432) — only the look is set here. */
.inv-field { display: block; }
.inv-flabel { display: block; margin-bottom: var(--space-sm); font-size: var(--fs-xs); font-weight: 600; }
.inv-input-wrap { position: relative; }
.inv-input {
  width: 100%;
  box-sizing: border-box;
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: var(--df-sans);
}
.inv-input:focus { outline: none; box-shadow: 0 0 0 3px var(--vn-trail-green), 0 0 0 5px var(--df-panel); }
.inv-input[readonly] { padding-right: 44px; background: color-mix(in srgb, var(--df-ink) 5%, var(--df-panel)); cursor: default; }
.inv-input-lock { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--df-ink-soft); pointer-events: none; }
.inv-input-wrap.is-error .inv-input { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.inv-errline { display: flex; gap: var(--space-sm); margin-top: var(--space-md); color: var(--danger-text); font-size: var(--fs-xs); font-weight: 600; line-height: 1.4; }
.inv-errline i { flex: none; margin-top: 1px; }

.inv-limits { color: var(--df-ink-soft); font-size: var(--fs-xs); line-height: 1.4; text-align: center; }

/* Buttons. One primary per state; everything else is a secondary or a quiet
   link. The press moves the button into its hard shadow, --dur-feedback. */
.inv-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  width: 100%;
  min-height: 52px;
  padding: 0 var(--space-4xl);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--vn-trail-green);
  color: var(--df-brand-fg);
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--dur-feedback) var(--ease-out);
}
.inv-btn:hover { transform: translate(2px, 2px); }
.inv-btn:active { transform: translate(4px, 4px); }
.inv-btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.inv-btn-sec { background: var(--df-panel); color: var(--df-ink); }
.inv-quiet {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--tap-min);
  padding: 0;
  border: 0;
  background: none;
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: color-mix(in srgb, var(--df-ink) 35%, transparent);
  text-underline-offset: 3px;
  cursor: pointer;
}
.inv-btn:focus-visible, .inv-quiet:focus-visible, .inv-ident-sw:focus-visible { outline: 3px solid var(--vn-trail-green); outline-offset: 3px; }
.inv-account-modal .inv-btn, .inv-account-modal .inv-quiet { margin: 0; }

/* Waiting for the host: the ring is the screen's one loop. */
.inv-wait { display: flex; align-items: center; gap: var(--space-lg); }
.inv-wait-t { font-family: var(--df-sans); font-size: var(--fs-lg); font-weight: 600; line-height: 1.2; }
.inv-ring {
  flex: none;
  width: 40px;
  height: 40px;
  border: 2px solid var(--df-ink);
  border-top-color: var(--vn-trail-green);
  border-radius: 50%;
  animation: inv-spin 900ms linear infinite;
}
@keyframes inv-spin { to { transform: rotate(360deg); } }

/* Dead link: a torn ticket with the reason struck on it — at rest, never struck
   in motion. The container (#invite-error) is shown by js/invite.js. */
#invite-error { max-width: 520px; margin: 0 auto; padding: 0; text-align: left; }
#invite-error > .inv-btn, #invite-error > .inv-quiet { margin-top: var(--space-lg); }
.inv-dead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-3xl) var(--space-2xl);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: 16px;
  text-align: center;
}
.inv-dead-torn {
  display: grid;
  place-items: center;
  width: 100%;
  height: 90px;
  border: 2px dashed var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: repeating-linear-gradient(-45deg, transparent 0 8px, color-mix(in srgb, var(--df-ink) 5%, transparent) 8px 16px);
}
.inv-dead-torn i { font-size: var(--fs-display-32); color: var(--df-ink-soft); }
.inv-dead-title { margin: 0; font-family: var(--df-sans); font-size: var(--fs-xl); font-weight: 600; line-height: 1.15; }
.inv-dead-text { margin: 0; max-width: 30ch; font-size: var(--fs-xs); line-height: 1.5; color: var(--df-ink-soft); }
.inv-stamp {
  display: inline-block;
  padding: 0.05em 0.22em 0.09em;
  border: 3px solid var(--df-coral);
  border-radius: 0.14em;
  box-shadow: inset 0 0 0 0.022em var(--df-coral);
  color: var(--df-coral);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.inv-stamp-dead { font-size: var(--fs-xl); transform: rotate(-6deg); }

/* Motion. Arrive: only on a real arrival at /i/:token (js/invite.js adds
   .inv-arriving once per openInvitePage()). Settle: the new content settles in
   place. The reduced-motion block in style.css resolves all of this to the
   finished state. */
.inv-arriving .inv-hero-col, .inv-arriving #invite-error > .inv-dead { animation: inv-arrive var(--dur-view) var(--ease-out) both; }
.inv-arriving .inv-foil-col, .inv-arriving #invite-error > .inv-btn { animation: inv-arrive var(--dur-view) var(--ease-out) var(--delay-beat) both; }
@keyframes inv-arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.inv-settle .inv-errline, .inv-settle .inv-wait, .inv-settle .inv-q, .inv-settle .inv-sub { animation: inv-settle var(--dur-state) var(--ease-out) both; }
@keyframes inv-settle { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ── Action card (home footer) ────────────────────────────
   The indigo hover fill and indigo icon that used to live here were removed
   when My Trips converted to Departure Fever (css/style.css, .home-action-card).
   Three footer buttons hovering to three different hues spent the palette's
   colour *assignments* — green means pressable, coral means stamped, amber
   means routed, indigo codes the hotel category — on decoration, and read as
   three co-equal actions when New Trip is the primary. The three now share
   the system's press feedback, with the green fill on New Trip alone.
   Nothing replaces these rules; this file simply stops overriding a
   converted screen. */

/* ── Trip details ──────────────────────────────────────────
   renderDiscoverDetail() (js/discover.js) backs the public /discover/:code
   page (js/shared-trip.js) — what both a shared link and a tap on a Discover
   card open as of #659, replacing the separate Discover detail modal this
   comment used to describe. This was the last Field-Journal seam left on a
   converted screen: a fully converted feed that opened a soft-shadowed,
   system-font panel on top of itself, which the migration posture calls out
   by name as worse than either look alone.

   The composition is a ticket someone kept. A stub carries the trip name and
   the destination struck across it as a rubber stamp — the ONE shout on this
   screen, the same die and the same landing as the landing hero's
   .lp-stampword — with the trip's facts printed below a torn perforation and
   a small stack of taped instant prints beside them. The itinerary below is
   DESIGN.md's dashed route made literal: each day is an amber waypoint pin
   on a dashed amber line, because "a numbered sequence renders as a journey
   drawn on a map" is exactly what a day-by-day itinerary is.

   Photographs are the point. Every Places-picked stop resolves a real Google
   Places photo through /api/geo/places-photo (see discoverStopPhotoSrc() in
   js/discover.js), so this screen shows the trip rather than tabulating it. */

.dtl {
  /* Instant Stock and its fine-print ink. Pinned in BOTH themes on purpose,
     the same way css/landing.css pins --lp-stock: a photographic print is
     white at midnight too, which is what makes the prints the brightest
     objects on the night page — correct, for photographs of somewhere sunny.
     Anything set on this stock therefore stays dark in both themes. */
  --dtl-stock: var(--df-instant-stock);
  --dtl-stock-ink: var(--df-instant-stock-ink);
  --dtl-tape: var(--df-tape);
  /* The second ink pass landing out of register behind the stamp. */
  --dtl-ghost: var(--df-ghost);
  /* Route Amber Ink — pinned dark because --vn-amber itself LIGHTENS after
     dark, so a token that followed the theme would put pale ink on a pale
     fill. This is the value DESIGN.md names for copy set on an amber fill. */
  --dtl-pin-ink: var(--df-amber-fg);
  --dtl-pin-size: 30px;
  /* DESIGN.md's Lift, proportioned down for a row-sized print. The sanctioned
     blurred shadow is written for a hero print; its 40px blur at -26px spread
     simply washes out under a 64px thumbnail, so the same two layers are kept
     at thumbnail scale rather than swapping in a different depth model. */
  --dtl-lift-sm: var(--df-press-lift-sm);

  /* Queried below instead of the viewport — the ~900px /discover/:code page
     (this renderer's one remaining call site since #659 retired the narrower
     ~536px modal it used to also back) still varies its own width by
     surrounding layout, and a viewport media query can't see that. */
  container-type: inline-size;
  container-name: dtl;

  font-family: var(--df-sans);
  color: var(--df-ink);
}

/* ── The stub ──────────────────────────────────────────── */
.dtl-stub {
  position: relative;
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  padding: var(--space-4xl);
  margin-bottom: var(--space-5xl);
  /* A taped print sits at an angle; clipping it to the stub is what keeps
     the tilt from pushing a horizontal scrollbar into the modal. */
  overflow: hidden;
}

.dtl-name {
  font-family: var(--df-title);
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--df-ink);
}

/* Its own line, always — the same load-bearing rule as the landing hero's
   stamp. Sharing a line with the name would re-wrap the whole masthead
   around a word whose length nobody controls. */
.dtl-stampline {
  margin-top: var(--space-2xl);
  padding-left: var(--space-md);
}

.dtl-stamp {
  display: inline-block;
  max-width: 100%;
  padding: 0.04em 0.2em 0.09em;
  border: 0.055em solid currentColor;
  border-radius: 0.14em;
  box-shadow: inset 0 0 0 0.022em currentColor;
  font-family: var(--df-display);
  font-size: clamp(var(--fs-2xl), 8vw, var(--fs-display-46));
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--vn-coral);
  text-shadow: 0.028em 0.036em 0 var(--dtl-ghost);
  /* The resting transform lives here, NOT in the keyframes — an interrupted
     or unsupported animation still has to leave the word correctly struck. */
  transform: rotate(-2.6deg);
  transform-origin: 30% 60%;
}

/* ── The print stack ───────────────────────────────────── */
/* Fanned rather than laid out in a row: this is a handful of photos dropped
   on a table, and the overlap is what makes it read as a stack instead of a
   gallery. Draws nothing of its own, so a trip whose photos all 404 (the
   onerror in discoverDetailPrints() removes the whole print) collapses to an
   empty box rather than three broken frames. */
.dtl-prints {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-start;
  /* Capped and pushed to the trailing edge rather than centred and full
     width. The stamp is the one shout on this screen; a photo stack running
     the stub's whole width outweighs it, and two things shouting is DESIGN.md's
     definition of half the energy, not double. Tucked into the stub's bottom
     corner it reads as what it is — the photos someone kept with the ticket. */
  max-width: 232px;
  margin-left: auto;
  margin-top: var(--space-4xl);
  padding-top: var(--space-md);
}

.dtl-print {
  position: relative;
  flex: 0 1 34%;
  min-width: 68px;
  max-width: 92px;
  margin: 0;
  padding: 6px 6px 20px;
  background: var(--dtl-stock);
  border-radius: var(--df-radius-print);
  box-shadow: var(--df-press-lift);
  transition: transform var(--dur-state) var(--df-ease);
}
/* Tilt cycled by position, and each print overlaps the one before it. The
   angle is not decoration: two torn strips of tape hold it there. */
.dtl-print:nth-child(1) { transform: rotate(-3.4deg); }
.dtl-print:nth-child(2) { transform: rotate(2.2deg); }
.dtl-print:nth-child(3) { transform: rotate(-1.4deg); }
.dtl-print + .dtl-print { margin-left: -26px; }

/* Tape. */
.dtl-print::before,
.dtl-print::after {
  content: '';
  position: absolute;
  top: -6px;
  width: 38px;
  height: 13px;
  background: var(--dtl-tape);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.dtl-print::before { left: 8%; transform: rotate(-4deg); }
.dtl-print::after { right: 8%; transform: rotate(3.4deg); }

.dtl-print img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--df-radius-print);
  background: color-mix(in srgb, var(--df-ink) 12%, var(--dtl-stock));
}
/* Format is rhythm — the same aspect-ratio cycle the landing wall runs, cut
   to three because that is how many prints this stack holds. */
.dtl-print:nth-child(2) img { aspect-ratio: 1 / 1; }
.dtl-print:nth-child(3) img { aspect-ratio: 5 / 4; }

/* What you actually do when you look at a crooked photo on a wall: you
   straighten it. Raising z-index is what makes the fanned stack browsable
   rather than only decorative. */
.dtl-print:hover {
  transform: rotate(0deg) scale(1.05);
  z-index: 2;
}

/* ── The torn perforation and the ticket's facts ────────── */
.dtl-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg) var(--space-4xl);
  /* Bleeds to the stub's full width, then re-adds its padding, so the tear
     runs edge to edge the way a real perforation does. */
  margin: var(--space-4xl) calc(-1 * var(--space-4xl)) 0;
  padding: var(--space-2xl) var(--space-4xl) 0;
  border-top: 2px dashed var(--df-ink);
}

.dtl-fact { min-width: 0; }

.dtl-fact dt {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--df-ink-soft);
}

.dtl-fact dd {
  margin: var(--space-xs) 0 0;
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--df-ink);
}

/* ── Sections ──────────────────────────────────────────── */
.discover-detail-section {
  margin-bottom: var(--space-5xl);
}

.discover-detail-section-title {
  margin: 0 0 var(--space-2xl);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--df-ink-soft);
}

/* ── The route ─────────────────────────────────────────── */
.dtl-days {
  list-style: none;
  margin: 0;
  padding: 0;
}

.discover-detail-day {
  position: relative;
  display: grid;
  grid-template-columns: var(--dtl-pin-size) minmax(0, 1fr);
  gap: var(--space-xl);
  padding-bottom: var(--space-4xl);
}
.discover-detail-day:last-child { padding-bottom: 0; }

/* The dashed route, running from under this pin to the next one. It
   terminates ON the last pin rather than past it — a route ends at its final
   waypoint. */
.discover-detail-day::before {
  content: '';
  position: absolute;
  top: var(--dtl-pin-size);
  bottom: 0;
  left: calc(var(--dtl-pin-size) / 2 - 1.5px);
  width: 3px;
  background: repeating-linear-gradient(
    to bottom,
    var(--vn-amber) 0 9px,
    transparent 9px 18px
  );
}
.discover-detail-day:last-child::before { display: none; }

/* Amber, not green: a waypoint takes the colour of the route it sits on, and
   green in this system means "you can press this". */
.dtl-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--dtl-pin-size);
  height: var(--dtl-pin-size);
  border: 2px solid var(--df-ink);
  border-radius: 50%;
  background: var(--vn-amber);
  color: var(--dtl-pin-ink);
  font-family: var(--df-display);
  font-size: var(--fs-sm);
  font-weight: 800;
  line-height: 1;
}
.dtl-pin i { font-size: var(--fs-sm); }

.dtl-day-body { min-width: 0; }

.discover-detail-day-label {
  font-family: var(--df-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: var(--dtl-pin-size);
  color: var(--df-ink);
}

/* Issue #154 Phase 3 — sub-heading for a plan section within a day the host
   opted into publicVisible. Screen-only surface, so color is fine here
   (unlike the PDF export, which is label-text-only for grayscale printing). */
.discover-detail-side-label {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: var(--space-xl) 0 var(--space-xs);
  padding-left: var(--space-md);
  border-left: 3px solid transparent;
}
.discover-detail-side-label.trip-main { color: var(--trip-main-accent); border-left-color: var(--trip-main-accent); }
.discover-detail-side-label.trip-sub { color: var(--vn-sky-text); border-left-color: var(--vn-sky); }
.discover-detail-side-label.plan-shared { color: var(--df-ink-soft); border-left-color: var(--df-hair); }

/* ── A stop ────────────────────────────────────────────── */
.discover-detail-stop {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xl);
  padding: var(--space-lg) 0;
  border-bottom: 2px solid var(--df-hair);
}
.discover-detail-stop:last-child { border-bottom: none; }

.dtl-stop-main {
  flex: 1;
  min-width: 0;
}

.dtl-stop-head {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.dtl-stop-name {
  flex: 1;
  /* Not min-width: 0 — that lets the name shrink to a sliver beside the time
     on a narrow row. A floor here makes the TIME wrap to its own line
     instead, which is the right thing to give up first. */
  min-width: 9ch;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--df-ink);
}

/* Label voice: a time printed on a ticket, not a sentence. Stays on the
   trailing edge whether it shares the name's line or wraps below it. */
.discover-detail-stop-time {
  flex-shrink: 0;
  margin-left: auto;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  font-variant-numeric: tabular-nums;
}

.discover-detail-stop-note {
  margin-top: var(--space-xs);
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--df-ink-soft);
}

/* A print, straight — this one is tucked into a list, not taped to a wall,
   and DESIGN.md's Crooked-On-Purpose Rule straightens anything with no
   material reason to tilt. */
.dtl-stop-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  object-fit: cover;
  padding: 3px 3px 8px;
  background: var(--dtl-stock);
  border-radius: var(--df-radius-print);
  box-shadow: var(--dtl-lift-sm);
}

/* ── The ledger ────────────────────────────────────────── */
.discover-detail-expenses {
  background: var(--df-ground);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  overflow: hidden;
}

.discover-detail-expense-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-xl);
  padding: var(--space-md) var(--space-2xl);
  font-size: var(--fs-sm);
  border-bottom: 2px solid var(--df-hair);
}
.discover-detail-expense-row:last-child { border-bottom: none; }

.discover-detail-expense-total {
  font-family: var(--df-display);
  font-size: var(--fs-md);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--df-ink);
  background: var(--df-panel);
  border-top: 2px solid var(--df-ink);
}

.discover-expense-cat-group { border-bottom: 2px solid var(--df-hair); }
.discover-expense-cat-group:last-of-type { border-bottom: none; }

.discover-expense-cat-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-xl);
  padding: var(--space-md) var(--space-2xl);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--df-ink-soft);
  background: var(--df-panel);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.discover-expense-cat-subtotal { font-weight: 400; font-variant-numeric: tabular-nums; }

.discover-expense-item {
  padding-left: var(--space-5xl);
  color: var(--df-ink-soft);
}
.discover-expense-desc { font-size: var(--fs-xs); }
.discover-expense-amt { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.discover-expense-amt.masked { color: var(--df-ink-soft); font-style: italic; }

/* The category glyph carries its own hue by reusing the shared .cat-* class,
   which is the single source of truth for category colour — but that class
   is written for a pill, so its tint background is dropped here and only the
   `color` half is kept. Tabler glyphs throughout: the emoji this ledger used
   to print rendered at a different weight and size on every platform, and on
   Windows Chrome several of them did not render at all — the same gap the
   feed card's country-code placeholder is already written around. */
.dtl-ledger-cat {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 0;
}
.dtl-ledger-cat i {
  background: none;
  padding: 0;
  font-size: var(--fs-md);
  line-height: 1;
}

/* ── Actions ───────────────────────────────────────────── */
.discover-detail-actions {
  display: flex;
  gap: var(--space-xl);
  margin-top: var(--space-4xl);
  padding-top: var(--space-4xl);
  border-top: 2px dashed var(--df-ink);
}

/* ── Nothing shared yet ────────────────────────────────── */
.dtl-empty {
  padding: var(--space-5xl) var(--space-2xl);
  text-align: center;
  color: var(--df-ink-soft);
}
.dtl-empty i {
  font-size: var(--fs-display-32);
  color: var(--df-ink-soft);
}
.dtl-empty p {
  max-width: 34ch;
  margin: var(--space-xl) auto 0;
  font-size: var(--fs-sm);
  line-height: 1.6;
}

/* ── Motion ────────────────────────────────────────────── */
/* One authored moment on this screen: the destination lands as a struck
   stamp when the details open. Guarded behind no-preference so a reader who
   opted out never has a hidden start state that JS would have to undo — the
   resting transform in .dtl-stamp is what it lands on either way. */
@media (prefers-reduced-motion: no-preference) {
  .dtl-stamp.is-struck { animation: dtl-strike var(--dur-strike) var(--ease-slam) both; }
}

@keyframes dtl-strike {
  0%   { opacity: 0; transform: rotate(-11deg) scale(1.85); }
  55%  { opacity: 1; transform: rotate(-2.6deg) scale(0.95); }
  78%  { transform: rotate(-2.6deg) scale(1.025); }
  100% { transform: rotate(-2.6deg) scale(1); }
}

/* Everything that travels resolves to its FINISHED state, never a hidden
   one. A print's resting tilt is layout, not motion — it stays, which is why
   the hover here lands back on each print's own resting angle rather than on
   `none`, which would flatten the stack. */
@media (prefers-reduced-motion: reduce) {
  .dtl-print { transition: none; }
  .dtl-print:nth-child(1):hover { transform: rotate(-3.4deg); }
  .dtl-print:nth-child(2):hover { transform: rotate(2.2deg); }
  .dtl-print:nth-child(3):hover { transform: rotate(-1.4deg); }
}

/* ── Wider than a phone ──────────────────────────────────
   The stub folds into two columns: the ticket (name + struck destination) on
   the left, the print stack squared up beside it rather than stranded below
   with a field of empty stock between them. Facts always take their own row
   under the perforation — including when there are no prints at all, which
   is why they span rather than flow. */
@container dtl (min-width: 460px) {
  .dtl-stub {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: var(--space-4xl);
    align-items: start;
  }
  .dtl-name { font-size: var(--fs-2xl); }
  .dtl-prints {
    /* Proportional, not a flat cap: a flat 280px left the trip name a 173px
       column and broke it over three lines at the narrower widths the
       retired Discover modal used to render at (#659), while the same value
       is right on the ~860px /discover/:code page this now always renders
       at. cqw keeps the ticket half of the masthead readable regardless. */
    max-width: min(280px, 44cqw);
    margin-top: var(--space-md);
  }
  .dtl-print { min-width: 84px; max-width: 124px; }
  .dtl-facts { grid-column: 1 / -1; }
  .dtl-stop-thumb { width: 76px; height: 76px; }
}

/* ── Desktop tweaks ─────────────────────────────────────── */
@media (min-width: 680px) {
  .discover-grid:not(.discover-grid-list) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* The 900px column is made with padding, not max-width (#2181).
     .discover-body is the scroll container, so capping its own width put the
     scrollbar at the column edge, mid-screen on a wide window. It now spans
     the full width and pads its content in to the same 900px box (border-box,
     so 900px still includes the 16px gutter; below ~932px the gutter wins).
     Staying full width also keeps it out of #196's trap: a flex item with
     `margin: auto` and no explicit width shrinks to its content's natural
     width, which collapsed a short /u/:username row to ~300px. */
  .discover-body {
    width: 100%;
    padding-inline: max(var(--space-3xl), calc((100% - 900px) / 2 + var(--space-3xl)));
  }
}

/* F08 (#4910): the feed is full width and steps 3 → 4 → 5 columns with the
   window, so a card never gets narrower than the two-up phone card. Scoped to
   #discover-screen: the other screens sharing .discover-body keep the 900px
   column. The scroll container stays full width, so the scrollbar stays at the
   window edge (#2181). The loading skeleton shares these columns. */
@media (min-width: 1024px) {
  .discover-grid:not(.discover-grid-list) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 680px) {
  #discover-screen .discover-body { padding-inline: var(--space-3xl); }
}
@media (min-width: 900px) and (max-width: 1023px) {
  #discover-screen .discover-grid:not(.discover-grid-list) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* #5291 (slice 2 of #5289) — desktop frame: the feed sits on Home's side
   margin, four across at 1280+ and three from 1024 (the loading skeleton
   shares the grid). Cards take the 14px / 5px-shadow shell; the trip count
   on a city tile only exists here. */
@media (min-width: 1024px) {
  #discover-screen .discover-body { padding-inline: var(--screen-side-pad); }
  #discover-screen .discover-grid:not(.discover-grid-list) { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  #discover-screen .discover-card {
    border-radius: var(--df-radius-card);
    box-shadow: var(--df-press-large);
  }
  #discover-screen .discover-card:hover { box-shadow: var(--df-press-hover); }
  #discover-screen .discover-card:active,
  #discover-screen .discover-card:has(.discover-card-open:active) { box-shadow: var(--df-press-active); }
  #discover-screen .discover-card-skeleton:hover,
  #discover-screen .discover-card-skeleton:active { box-shadow: var(--df-press-large); }
  /* Title: up to two lines, then an ellipsis. */
  #discover-screen .discover-grid:not(.discover-grid-list) .discover-card-name {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    min-height: 2.4em; /* reserve both lines so the place and author rows align across a row of cards */
  }
  /* One action row: like / save / comment on the left, report and share on the right. */
  #discover-screen .discover-grid:not(.discover-grid-list) .discover-card-actions { flex-wrap: nowrap; gap: 0; }
  #discover-screen .discover-grid:not(.discover-grid-list) .discover-card-counts { order: -1; margin-left: 0; gap: 0; }
  #discover-screen .discover-grid:not(.discover-grid-list) .discover-report-btn { order: 1; margin-left: auto; }
  #discover-screen .discover-grid:not(.discover-grid-list) .discover-share-btn { order: 2; }

  /* Browse by city: five tiles in one row, name / country / trips on the stock band under the photo. */
  #discover-screen .discover-city-cards {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-xl);
    overflow: visible;
    padding: 0 0 var(--space-xs);
  }
  #discover-screen .discover-city-card {
    width: auto;
    --city-photo-h: 72px;
    min-height: 108px;
    border-radius: var(--df-radius-card);
    box-shadow: var(--df-press-large);
  }
  /* The row is capped at five: the board shows one line, and the fast page does the same. */
  #discover-screen .discover-city-card:nth-child(n + 6) { display: none; }
  #discover-screen .discover-city-card[aria-pressed="true"] { box-shadow: var(--df-press-hover); }
  #discover-screen .discover-city-card-name { font-size: var(--fs-lg); }
  #discover-screen .discover-city-card-meta { display: flex; align-items: baseline; gap: var(--space-sm); }
  #discover-screen .discover-city-card-trips { display: inline; }
}
@media (min-width: 1280px) {
  #discover-screen .discover-grid:not(.discover-grid-list) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* #5294 (slice 5 of #5289) — desktop list view: one stub row per post, for
   comparing trips by what their authors wrote. Stub shell (2px keyline, 12px
   radius, 4px hard shadow), 18px between rows. The extra lines (words, month
   chip, Save button) exist only here; below 1024px the phone list is untouched. */
.discover-card-words, .discover-card-month, .discover-row-save { display: none; }
@media (min-width: 1024px) {
  #discover-screen .discover-grid.discover-grid-list { gap: 18px; }
  #discover-screen .discover-grid-list .discover-card {
    border-radius: var(--df-radius-stub);
    box-shadow: var(--df-press);
  }
  #discover-screen .discover-grid-list .discover-card:hover { box-shadow: var(--df-press-hover); }
  #discover-screen .discover-grid-list .discover-card:active,
  #discover-screen .discover-grid-list .discover-card:has(.discover-card-open:active) { box-shadow: var(--df-press-active); }
  #discover-screen .discover-grid-list .discover-card-open { padding: 14px 14px 14px; }
  #discover-screen .discover-grid-list .discover-card-photo {
    flex: 0 0 220px;
    width: 220px;
    aspect-ratio: 4 / 3;
    border: 2px solid var(--df-ink);
  }
  #discover-screen .discover-grid-list .discover-card-body {
    padding: 0 232px 0 0; /* clear the like/save/comment + Save column */
    gap: var(--space-sm);
    justify-content: flex-start;
    min-height: 100%;
  }
  #discover-screen .discover-grid-list .discover-card-name { font-family: var(--df-title); font-weight: 700; font-size: var(--fs-xl, 1.5rem); }
  #discover-screen .discover-grid-list .discover-card-words {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    font-size: var(--fs-sm);
    line-height: 1.5;
    color: var(--df-ink-soft);
  }
  #discover-screen .discover-grid-list .discover-card-month {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 2px var(--space-lg);
    border: 2px solid var(--df-ink);
    border-radius: 999px;
    background: var(--df-ground);
    font-size: var(--fs-xs);
    font-weight: 600;
    overflow: visible;
  }
  /* Actions: report/share and the counts on the top line, Save under them, all right-aligned. */
  #discover-screen .discover-grid-list .discover-card-actions {
    grid-area: 1 / 1;
    justify-self: end;
    align-self: stretch;
    display: grid;
    grid-template-columns: repeat(3, auto);
    grid-template-rows: auto 1fr;
    justify-content: end;
    align-content: stretch;
    margin: 14px 18px 14px 0;
    padding: 0;
    border-top: 0;
    pointer-events: none;
  }
  #discover-screen .discover-grid-list .discover-card-actions > * { pointer-events: auto; }
  #discover-screen .discover-grid-list .discover-report-btn { grid-column: 1; grid-row: 1; }
  #discover-screen .discover-grid-list .discover-share-btn { grid-column: 2; grid-row: 1; }
  #discover-screen .discover-grid-list .discover-card-counts { grid-column: 3; grid-row: 1; margin-left: 0; }
  #discover-screen .discover-grid-list .discover-row-save {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: end;
    align-self: end;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    min-height: var(--tap-min);
    padding: 0 var(--space-3xl);
    border: 2px solid var(--df-ink);
    border-radius: 999px;
    background: var(--df-panel);
    color: var(--df-ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--df-press);
  }
  #discover-screen .discover-grid-list .discover-row-save:hover { box-shadow: var(--df-press-hover); }
  #discover-screen .discover-grid-list .discover-row-save:active { box-shadow: none; transform: translate(2px, 2px); }
  #discover-screen .discover-grid-list .discover-row-save.active { background: var(--df-ground); }
  /* The loading skeleton takes the row's shape. */
  #discover-screen .discover-row-skeleton { padding: 14px; }
  #discover-screen .discover-row-skeleton .skeleton-rect { width: 220px !important; height: 165px !important; }
}

/* ── Own profile page (#1591, /profile) ────────────────── */
.profile-page-form {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: var(--sp-lg);
}

/* ── Own profile page: Departure Fever form contents (#1801) ──────────
   The frame (#1591) was converted first; this converts everything inside
   it in one go, per DESIGN.md's whole-screen rule. #profile-screen sits
   outside .app, so the .app-scoped button skins in landing.css don't reach
   it — everything is scoped here instead of editing the shared base rules,
   which still serve unconverted modals. Font size and height of fields stay
   on the shared rule (16px / --tap-min under 680px, no iOS zoom). */
.discover-topbar-title { margin: 0; }
/* #4829 — right cluster of Discover's .home-topbar; [hidden] must win over the flex. */
.discover-account { display: flex; align-items: center; gap: var(--sp-md); }
.discover-account[hidden], .discover-signin-btn[hidden] { display: none; }
/* #5235 — Share/Report on a shared trip sit in the right cluster beside the account. */
.topbar-actions { display: flex; align-items: center; gap: var(--sp-xs); margin-inline-start: auto; }
.topbar-actions + .discover-account { margin-inline-start: 0; }
.discover-signin-btn {
  min-height: var(--tap-min);
  padding: 0 var(--sp-md);
  border: 1px solid var(--topbar-fg);
  border-radius: var(--radius-pill, 999px);
  background: none;
  color: var(--topbar-fg);
  font: 600 var(--fs-sm) var(--df-sans);
  cursor: pointer;
}
.discover-topbar-spacer { width: 44px; flex: none; }
/* #2177 — section titles are DESIGN.md's Title style (Fraunces 700, sentence
   case, D131), so they stop reading as one more stacked field label. */
#profile-screen .pf-section-title {
  margin: 0 0 var(--sp-xs);
  font-family: var(--df-sans);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.2;
  color: var(--df-ink);
}
#profile-screen .form-label {
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--df-ink-soft);
}
#profile-screen .pf-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* Fields: Cut Stock fill, 2px ink keyline, 12px stub radius, no glow. */
#profile-screen input[type="text"],
#profile-screen input[type="email"],
#profile-screen input[type="password"],
#profile-screen input[type="tel"],
#profile-screen input[type="file"],
#profile-screen select,
#profile-screen textarea {
  background: var(--df-panel);
  color: var(--df-ink);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
}
#profile-screen input::placeholder,
#profile-screen textarea::placeholder {
  color: var(--df-ink-soft);
  opacity: 1;
}
#profile-screen input:focus,
#profile-screen select:focus,
#profile-screen textarea:focus {
  outline: 3px solid var(--df-brand);
  outline-offset: 3px;
  border-color: var(--df-ink);
  box-shadow: none;
}
#profile-screen button:focus-visible,
#profile-screen a:focus-visible,
#profile-screen [role="radio"]:focus-visible {
  outline: 3px solid var(--df-brand);
  outline-offset: 3px;
  box-shadow: none;
}
#profile-screen input[type="checkbox"] { accent-color: var(--df-brand); }

/* Layout helpers that used to be inline styles. */
#profile-screen .pf-submit { width: 100%; margin-top: 0; margin-bottom: var(--sp-sm); }
#profile-screen .pf-submit-last { margin-bottom: var(--sp-lg); }

/* #2177 — each section is a Cut Stock card. */
#profile-screen .profile-page-form > section {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  padding: var(--sp-xl);
  margin-bottom: var(--sp-xl);
}
#profile-screen .profile-page-form > section .pf-submit-last { margin-bottom: 0; }

/* Save is quiet at rest and turns primary only while its section holds
   unsaved edits; an edge marker on the card says which one. */
#profile-screen .pf-save { background: var(--df-panel); color: var(--df-ink); }
#profile-screen .pf-dirty .pf-save { background: var(--df-brand); color: var(--df-brand-fg); }
#profile-screen .profile-page-form > section.pf-dirty { border-left-width: 8px; border-left-color: var(--df-brand); }

/* Identity header: avatar as an instant print, then who trip-mates see. */
.pf-identity { display: flex; align-items: center; gap: var(--sp-md); margin-bottom: var(--sp-md); }
.pf-identity-print {
  position: relative; padding: 0; font: inherit; color: inherit; cursor: pointer;
  flex: none; width: 88px; height: 88px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-print);
  box-shadow: var(--df-press-hover);
}
.pf-identity-edit {
  position: absolute; right: 0; bottom: 0; min-width: 28px; min-height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--df-ink); color: var(--df-panel); font-size: var(--fs-xs);
}
.pf-avatar-panel { margin: calc(-1 * var(--sp-sm)) 0 var(--sp-md); }
.pf-avatar-panel[hidden] { display: none; }
.pf-avatar-panel .ui-btn { margin-bottom: var(--sp-sm); }
.pf-avatar-feedback { display: flex; align-items: center; gap: var(--sp-sm); }
.pf-avatar-feedback:has(.pf-inline-status:empty):not(:has(.pf-avatar-undo:not([hidden]))) { display: none; }
.pf-avatar-feedback { margin: calc(-1 * var(--sp-sm)) 0 var(--sp-md); }
.pf-avatar-undo[hidden] { display: none; }
.pf-identity-print img { width: 100%; height: 100%; object-fit: cover; }
.pf-identity-initial { font-family: var(--df-display); font-weight: 800; font-size: var(--fs-display-32); color: var(--df-ink-soft); }
.pf-identity-text { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.pf-identity-name { font-family: var(--df-sans); font-weight: 600; font-size: var(--fs-2xl); line-height: 1.15; overflow-wrap: anywhere; }
.pf-identity-handle { font-family: var(--df-sans); font-size: var(--fs-xs); color: var(--df-ink-soft); }
.pf-identity-link {
  position: relative; background: none; border: 0; padding: 0; margin-top: var(--sp-xs);
  font: inherit; font-size: var(--fs-xs); font-weight: 600; color: var(--df-ink);
  text-decoration: underline; cursor: pointer;
}
.pf-identity-link::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: max(var(--tap-min), 100%); transform: translateY(-50%); }
.pf-hidden-file { display: none; }
.pf-avatar-presets { display: flex; flex-wrap: wrap; gap: var(--sp-sm); margin-bottom: var(--sp-sm); }
.pf-hint { margin: 0 0 var(--sp-sm); font-size: var(--fs-xs); color: var(--df-ink-soft); }
.pf-empty { margin: 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.pf-list { margin-bottom: var(--sp-md); }
.pf-stack { margin-bottom: var(--sp-xs); }
.pf-row { display: flex; gap: var(--sp-sm); }
.pf-result { font-size: var(--fs-xs); margin-bottom: var(--sp-xs); }
.pf-email-status { margin-top: var(--sp-xs); font-size: var(--fs-xs); }
.pf-resend { margin-left: var(--sp-sm); }
.pf-status { font-weight: 600; }
/* #1804 — unsaved-changes note per section, and the "Saved" note beside the
   two controls that save instantly. */
.pf-unsaved { margin: 0 0 var(--sp-sm); font-size: var(--fs-xs); font-weight: 600; color: var(--info); }
.pf-unsaved:empty { display: none; }
.pf-inline-status { display: block; min-height: 1.25em; font-size: var(--fs-xs); font-weight: 600; color: var(--df-ink); }
.pf-inline-status:empty { display: none; }
.pf-inline-status.pf-inline-error { color: var(--error-text); }
.pf-status-ok { color: var(--df-ink); }
.pf-identity-scope { margin: var(--sp-xs) 0 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.pf-status-warn { color: var(--error-text); }
#profile-screen .pf-check {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-xs);
}
/* #1788 — Travel preferences: the two needs lists, greyed out until consent. */
#profile-screen .pf-fieldset { border: 0; padding: 0; margin: var(--sp-sm) 0 var(--sp-md); min-width: 0; }
/* #2381 — interest chips and daily-rhythm cards. The native input stays the
   accessible control, visually hidden; the face beside it carries the look. */
#profile-screen .pf-chip-grid { display: flex; flex-wrap: wrap; gap: var(--sp-xs); }
#profile-screen .pf-rhythm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-xs); }
#profile-screen .pf-rhythm-card { position: relative; display: flex; margin: 0; }
#profile-screen .pf-rhythm-card input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;
}
#profile-screen .pf-rhythm-face {
  display: flex; align-items: center; min-height: var(--tap-min); padding: 0 var(--sp-sm);
  border: 2px solid var(--df-ink); background: var(--df-panel); color: var(--df-ink);
  font-size: var(--fs-xs); font-weight: 600;
  transition: background var(--dur-feedback) var(--ease-out), border-color var(--dur-feedback) var(--ease-out);
}
#profile-screen .pf-rhythm-face { flex-direction: column; align-items: flex-start; justify-content: center; width: 100%; padding: var(--sp-xs) var(--sp-sm); border-radius: 12px; }
#profile-screen .pf-rhythm-hint { font-weight: 400; color: var(--df-ink-soft); }
#profile-screen .pf-rhythm-card input:checked + .pf-rhythm-face { background: var(--selected-bg); border-color: var(--selected-bg); color: var(--on-selected); }
#profile-screen .pf-rhythm-card input:checked + .pf-rhythm-face .pf-rhythm-hint { color: var(--on-selected); }
#profile-screen .pf-rhythm-card input:focus-visible + .pf-rhythm-face { outline: 3px solid var(--df-brand); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  #profile-screen .pf-rhythm-face { transition: none; }
}
#profile-screen .pf-consent { margin-top: var(--sp-md); font-weight: 600; }
#profile-screen .pf-fieldset label:has(input:disabled) { color: var(--df-ink-soft); }
#profile-screen .pf-fieldset input[type="text"] { width: 100%; margin-top: var(--sp-xs); }
#profile-screen .byo-ai-key-buy { margin-top: var(--sp-sm); font-size: var(--fs-xs); }
.pf-buy-row { margin-top: var(--sp-xs); }

/* Payment-method rows and the saved-key card: a stub, not a hairline row. */
.pf-method {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  padding: var(--sp-sm) 0;
  border-bottom: 2px dashed var(--df-hair);
}
.pf-method-body { font-size: var(--fs-sm); }
.pf-method-id { color: var(--df-ink-soft); font-size: var(--fs-xs); }
.pf-method-qr { width: 60px; height: 60px; object-fit: contain; margin-top: var(--sp-xs); border-radius: var(--radius-stub); }
.pf-method-visible {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin-top: var(--sp-xs);
}
.pf-key-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  padding: var(--sp-sm) var(--sp-md);
}
.pf-key-title { font-weight: 600; font-size: var(--fs-sm); }
.pf-key-meta { font-size: var(--fs-xs); color: var(--df-ink-soft); }

/* Cookie-preference switches (shared .consent-* rules): keyline them here. */
#profile-screen .consent-switch { box-shadow: inset 0 0 0 2px var(--df-ink); background: var(--df-panel); }
#profile-screen .consent-switch:checked { background: var(--df-brand); }
#profile-screen .consent-subrows { border-left: 2px solid var(--df-ink); }

/* Danger zone: the same keylined stub as everything else. At rest the page button is quiet (Alert Red
   text + 2px keyline, no fill, #2380); the solid Alert Red fill (#1805) stays on the modal confirm. */
#profile-screen .settings-section { margin-top: 0; }
#profile-screen .pf-danger-btn {
  width: 100%;
  background: transparent;
  border: 2px solid var(--error-text);
  color: var(--error-text);
}
#profile-screen .pf-danger-btn:hover { background: var(--df-panel); filter: none; }

/* #1803 — controls are locked until the first profile load settles. */
.profile-page-form.pf-loading input,
.profile-page-form.pf-loading select,
.profile-page-form.pf-loading textarea { opacity: 0.55; }

/* #2025 — one screen, two pages: Profile and Settings. A section carries
   data-pf-page and shows only on the page that matches the screen's. */
#profile-screen[data-pf-page="profile"] [data-pf-page="settings"],
#profile-screen[data-pf-page="settings"] [data-pf-page="profile"],
#profile-screen[data-pf-page="preview"] [data-pf-page="profile"],
#profile-screen[data-pf-page="preview"] [data-pf-page="settings"],
#profile-screen:not([data-pf-page="preview"]) [data-pf-page="preview"] { display: none; }

/* #2178 — Settings jump strip: sticky under the top bar on phones, a left rail
   beside the form at >=1024px. */
.pf-jump { position: sticky; top: 0; z-index: 2; display: flex; gap: var(--sp-xs); overflow-x: auto; padding: var(--sp-xs) 0; margin-bottom: var(--sp-md); background: var(--df-ground); }
.pf-jump a { flex: none; display: inline-flex; align-items: center; min-height: var(--tap-min); min-width: var(--tap-min); justify-content: center; padding: 0 var(--sp-sm); border: 2px solid var(--df-ink); border-radius: 999px; color: inherit; text-decoration: none; font-size: var(--fs-sm); }
.pf-jump a:hover, .pf-jump a:focus-visible { border-color: currentColor; }
.pf-jump a[aria-current="true"] { background: var(--df-ink); color: var(--df-ground); }
/* #5513 — a section opened by key (scrollIntoView block:start) must land below the sticky strip (padding + tap-min + padding), not under it. */
@media (max-width: 1023px) {
  #profile-screen [id^="profile-"][id$="-group"], #profile-screen [id^="settings-"][id$="-group"], #profile-screen #cookie-preferences-section { scroll-margin-top: calc(var(--tap-min) + 2 * var(--sp-xs) + var(--sp-xs)); }
}
.pf-page-title { display: none; }
@media (min-width: 1024px) {
  /* #5250 — approved Settings: a 13rem nav column, then the cards (780px). Side margin follows Home through --screen-side-pad. */
  #profile-screen[data-pf-page="settings"] .discover-body { padding-inline: var(--screen-side-pad); }
  #profile-screen[data-pf-page="settings"] .profile-page-form { display: grid; grid-template-columns: 13rem minmax(0, 1fr); column-gap: var(--sp-md); max-width: calc(13rem + var(--sp-md) + 780px); }
  #profile-screen[data-pf-page="settings"] .profile-page-form > * { grid-column: 2; }
  #profile-screen[data-pf-page="settings"] .pf-page-title { display: block; grid-column: 1 / -1; margin: 0 0 var(--sp-md); font-family: var(--df-display); font-weight: 800; font-size: clamp(2rem, 3.4vw, 3rem); line-height: 0.92; letter-spacing: -0.035em; text-transform: uppercase; color: var(--df-ink); }
  /* Plain text list; the current area is the one solid brand pill. */
  #profile-screen[data-pf-page="settings"] .pf-jump { grid-column: 1; grid-row: 2 / span 40; align-self: start; top: var(--sp-sm); margin: 0; padding: 0; background: transparent; flex-direction: column; overflow: visible; gap: var(--sp-xs); }
  #profile-screen[data-pf-page="settings"] .pf-jump a { border-color: transparent; background: transparent; font-weight: 600; }
  #profile-screen[data-pf-page="settings"] .pf-jump a:hover, #profile-screen[data-pf-page="settings"] .pf-jump a:focus-visible { border-color: var(--df-ink); }
  #profile-screen[data-pf-page="settings"] .pf-jump a[aria-current="true"] { background: var(--selected-bg); border-color: var(--selected-bg); color: var(--on-selected); }
}

/* #2179 — inline field errors (DESIGN.md Inputs → Error), live password rules, per-toggle help. */
#profile-screen .pf-input-error { border-color: var(--error); box-shadow: inset 3px 0 0 var(--error); }
#profile-screen .pf-field-error { color: var(--error-text); font-size: var(--fs-xs); margin-top: var(--sp-xs); }
#profile-screen .pf-field-error:empty { display: none; }
#profile-screen .avatar-preset-btn, #profile-screen .discover-back-btn { font-family: inherit; }
#profile-screen .consent-toggles { margin-bottom: var(--sp-md); }
#profile-screen .consent-row-desc { color: var(--df-ink-soft); }
/* #2516 — selects stack with a gap; the last select clears the Save button. */
#profile-defaults-group .form-label:not(:first-of-type) { margin-top: var(--sp-md); }
#profile-defaults-group select { margin-bottom: var(--sp-xs); }
#profile-screen .pf-check-help { margin: calc(-1 * var(--sp-xs)) 0 var(--sp-xs); padding-left: 1.75rem; font-size: var(--fs-xs); color: var(--df-ink-soft); }

/* #2181 — profile polish. "Not verified" is pending, not an error: amber, not Alert Red. */
.pf-status-pending { color: var(--info); }
/* A text field whose checkbox is off reads as off, not as a live keyline. */
#profile-screen .pf-fieldset input[type="text"]:disabled { border-color: var(--border); background: transparent; color: var(--df-ink-soft); opacity: 0.6; cursor: not-allowed; }
/* Delete-account modal: classes instead of inline styles. */
#deleteAccountModal .modal-content-sm { max-width: 420px; }
#deleteAccountModal .modal-header-icon-danger { color: var(--error-text); font-size: var(--fs-lg); }
#deleteAccountModal .delete-account-lede { font-size: var(--fs-sm); color: var(--df-ink-soft); margin-bottom: 1rem; }
#deleteAccountModal #delete-account-confirm-btn { width: 100%; }

/* Settings polish (#2387): first-load skeleton replaces the greyed fields, and
   the avatar presets collapse to the chosen one once there is one. */
.pf-skeleton[hidden] { display: none; }
.pf-skeleton-card { display: flex; flex-direction: column; gap: var(--sp-md); background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); padding: var(--sp-md); margin-bottom: var(--sp-md); }
#profile-screen .profile-page-form.pf-loading > section,
#profile-screen .profile-page-form.pf-loading > .pf-identity,
#profile-screen .profile-page-form.pf-loading > .pf-avatar-panel,
#profile-screen .profile-page-form.pf-loading > .pf-avatar-feedback { display: none; }

/* #2512 — the identity header is the page's one shout: bigger print, a
   travel-record strip under it, Settings as an icon in the top bar. */
/* #2603 — it now sits in .home-topbar's right cluster, so no auto margin; the
   bar's own --tap-min button on the Field Green plane. */
.pf-topbar-settings { flex: none; }
/* #4833 — Settings' labelled way back: icon plus words, so it doesn't depend on knowing the logo is a link. */
#profile-screen .pf-topbar-back { border-radius: var(--df-radius-card, 999px); padding: 0 var(--sp-sm); gap: var(--sp-xs); font-size: var(--fs-sm); }
#profile-screen .pf-topbar-back i { font-size: var(--fs-lg); }
#profile-screen .pf-identity { flex-direction: column; align-items: stretch; gap: var(--sp-md); }
.pf-identity-main { display: flex; align-items: center; gap: var(--sp-md); }
#profile-screen .pf-identity-print { width: 112px; height: 112px; }
#profile-screen .pf-identity-initial { font-size: var(--fs-display-46); }
#profile-screen .pf-identity-name { font-size: var(--fs-2xl); }
.pf-identity-verify { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-xs); font-size: var(--fs-xs); }
.pf-identity-resend {
  position: relative; background: none; border: 0; padding: 0;
  font: inherit; font-weight: 600; color: var(--df-ink); text-decoration: underline; cursor: pointer;
}
.pf-identity-resend::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: max(var(--tap-min), 100%); transform: translateY(-50%); }
.pf-record { display: flex; gap: var(--sp-sm); }
.pf-record:empty { display: none; }
.pf-record-stat {
  flex: 1; min-height: var(--tap-min); display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: var(--sp-sm) var(--sp-xs);
  background: var(--df-panel); color: var(--df-ink); font: inherit; cursor: pointer;
  border: 2px solid var(--df-ink); border-radius: var(--df-radius-card);
}
.pf-record-stat:hover, .pf-record-stat:focus-visible { box-shadow: var(--df-press-hover); }
.pf-record-num { font-family: var(--df-display); font-weight: 800; font-size: var(--fs-2xl); line-height: 1.1; }
.pf-record-label { font-size: var(--fs-xs); color: var(--df-ink-soft); }

/* ── Public profile body (/u/:username) ───────────────────────
   Departure Fever, converted whole (#2557). The person's name is the page's
   one shout: Bricolage, uppercase, never the 13px muted handle. Everything
   else is a quiet stub on the same 2px keyline + hard offset as
   .discover-card. */
#user-profile-body { padding-bottom: var(--space-4xl); }

.up-passport {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
  padding: var(--space-3xl);
  margin-bottom: var(--space-3xl);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
}
/* The avatar is an instant print held by a strip of tape. Blur belongs to
   the instant print alone (DESIGN.md), so this is the one soft shadow. */
.up-avatar {
  position: relative;
  flex: none;
  padding: 6px 6px 18px;
  background: var(--df-instant-stock);
  border-radius: var(--df-radius-print);
  box-shadow: 0 2px 6px rgba(16, 26, 20, 0.28);
  transform: rotate(-3deg);
}
.up-avatar::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  width: 36px;
  height: 14px;
  transform: translateX(-50%) rotate(2deg);
  background: color-mix(in srgb, var(--vn-amber) 70%, transparent);
}
.up-avatar-img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
}
.up-avatar-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--df-ground);
  font-family: var(--df-display);
  font-size: var(--fs-display-32);
  font-weight: 800;
  color: #101a14;
}
.up-passport-text { min-width: 0; flex: 1; }
.up-passport-text :where(p) { margin: 0; }
.up-name {
  font-family: var(--df-display);
  font-size: clamp(var(--fs-xl), 6vw, var(--fs-display-46));
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--df-ink);
  overflow-wrap: anywhere;
}
/* #4687 — the handle stands in for the name: show it as stored, not shouted. */
.up-name-handle { text-transform: none; }
/* #4687 — the owner's stat lines stay on one line at 390px; they scroll
   sideways rather than wrap or truncate a number. */
.up-stats { white-space: nowrap; overflow-x: auto; }
/* #6715 - the One Label Rule: the header's eyebrow is its one label, so the stat line under it is a caption. */
.up-eyebrow.up-stats { font-weight: 400; text-transform: none; letter-spacing: 0; }
.up-eyebrow {
  margin-top: var(--space-sm);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.4;
  color: var(--df-ink-soft);
}
.up-handle {
  margin-top: var(--space-2xs);
  font-size: var(--fs-sm);
  color: var(--df-ink-soft);
  overflow-wrap: anywhere;
}
.up-bio {
  margin-top: var(--space-md);
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--df-ink);
  overflow-wrap: anywhere;
}
.up-report { align-self: flex-start; }

.up-section { margin-bottom: var(--space-3xl); }
.up-section-title {
  margin: 0 0 var(--space-xl);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--df-ink-soft);
}
.up-empty { margin: 0; font-size: var(--fs-sm); color: var(--df-ink-soft); }
.up-empty-state { padding: var(--space-2xl) var(--space-md); }
.up-empty-state i { font-size: var(--fs-2xl, var(--fs-display-32)); }

.up-stub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  width: 100%;
  min-height: var(--tap-min);
  margin-bottom: var(--space-xl);
  padding: var(--space-xl) var(--space-2xl);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  box-shadow: var(--df-press);
  color: var(--df-ink);
  font: inherit;
  text-align: left;
}
a.up-stub, button.up-stub {
  cursor: pointer;
  text-decoration: none;
  appearance: none;
  transition: transform var(--dur-feedback) var(--df-ease),
              box-shadow var(--dur-feedback) var(--df-ease);
}
a.up-stub:hover, button.up-stub:hover { transform: translate(2px, 2px); box-shadow: var(--df-press-hover); }
a.up-stub:active, button.up-stub:active { transform: translate(4px, 4px); box-shadow: var(--df-press-active); }
.up-stub:focus-visible { outline: 3px solid var(--df-ink); outline-offset: 3px; }
.up-stub-static { box-shadow: none; }
.up-stub-main { display: flex; flex-direction: column; gap: var(--space-2xs); min-width: 0; flex: 1; }
.up-stub-title { font-size: var(--fs-md); font-weight: 600; overflow-wrap: anywhere; }
.up-stub-sub { font-size: var(--fs-sm); color: var(--df-ink-soft); overflow-wrap: anywhere; }
.up-stub-meta {
  flex: none;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--df-ink-soft);
}
.up-stamp-row .up-stub-meta { align-self: flex-start; }
.up-stamp-art { flex: none; width: 40px; height: 40px; object-fit: contain; }

/* Block / Unblock: quiet, so they never outweigh the profile's positive
   content (DESIGN.md "Quiet" control: no border, no shadow). */
.up-actions { margin-top: var(--space-3xl); font-size: var(--fs-sm); color: var(--df-ink-soft); }
.up-quiet {
  min-height: var(--tap-min);
  padding: 0 var(--space-md);
  background: none;
  border: none;
  box-shadow: none;
  font: inherit;
  font-weight: 600;
  color: var(--df-ink-soft);
  cursor: pointer;
}
.up-quiet:hover { color: var(--df-brand); }

@media (max-width: 480px) {
  .up-passport { gap: var(--space-xl); padding: var(--space-2xl); }
  .up-avatar-img { width: 60px; height: 60px; }
}

/* ── Publish flow, post editor and "On Discover" settings (#3040, boards P01-P07, P15) ── */
.dp-modal { max-width: 480px; padding: 0; overflow: hidden; } /* ground: .df-ground-working group in style.css (#5979) */
/* Buttons wear the ink keyline and hard offset shadow the boards draw (#4391, G3); .btn-primary/.btn-secondary alone are the grey legacy pair. */
.dp-modal .btn-primary, .dp-modal .btn-secondary { margin-top: 0; padding: var(--space-lg); border: 2px solid var(--df-ink); border-radius: var(--radius-pill); font-family: var(--df-sans); font-weight: 600; transition: transform var(--dur-feedback) var(--df-ease); }
.dp-modal .btn-primary { background: var(--vn-trail-green); color: var(--df-panel); }
.dp-modal .btn-secondary { background: var(--df-panel); color: var(--df-ink); }
.dp-modal .btn-primary:hover, .dp-modal .btn-secondary:hover { transform: translate(2px, 2px); }
.dp-modal .btn-primary:hover { background: var(--vn-trail-green-mid); }
.dp-modal .btn-secondary:hover { background: var(--df-panel); }
.dp-modal .btn-primary:active, .dp-modal .btn-secondary:active { transform: translate(4px, 4px); }
/* P02: the blocked button is beige with a grey keyline, not pale green. */
.dp-modal .btn-primary:disabled { background: var(--df-panel); color: var(--df-ink-soft); border-color: var(--df-hair); opacity: 1; transform: none; }
.dp-modal .btn-secondary:disabled { transform: none; }
@media (prefers-reduced-motion: reduce) { .dp-modal .btn-primary, .dp-modal .btn-secondary, .dp-modal .btn-primary::before, .dp-modal .btn-secondary::before { transition: none; } }
.dp-head { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-md) var(--space-lg); background: var(--topbar-bg); color: var(--topbar-fg); }
.dp-head-dark { background: var(--df-ink); }
.dp-title { margin: 0; flex: 1; text-align: center; font-family: var(--df-sans); font-size: var(--fs-md); color: inherit; padding-right: var(--tap-min); }
.dp-back { min-width: var(--tap-min); min-height: var(--tap-min); background: none; border: 0; color: inherit; font-size: var(--fs-lg); cursor: pointer; }
.dp-body { display: flex; flex-direction: column; gap: var(--space-lg); padding: var(--space-lg); max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); overflow-y: auto; }
.dp-intro, .dp-note { margin: 0; font-size: var(--fs-xs); color: var(--text-muted); }
.dp-note-center { text-align: center; }
.dp-card { border: 2px solid var(--df-ink); border-radius: var(--radius-md); background: var(--df-panel); padding: var(--space-md) var(--space-lg); }
.dp-check { display: flex; gap: var(--space-md); padding: var(--space-md) 0; }
.dp-check + .dp-check { border-top: 1px dashed var(--border); }
.dp-check-icon { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid currentColor; display: inline-flex; align-items: center; justify-content: center; }
.dp-ok { color: var(--df-ink); }
.dp-no { color: var(--danger-text); }
.dp-check-title { font-weight: 600; }
.dp-check-sub { font-size: var(--fs-xs); color: var(--text-muted); }
.dp-link { background: none; border: 0; padding: 0; min-height: var(--tap-min); min-width: var(--tap-min); color: var(--vn-trail-green); font-weight: 600; text-decoration: underline; cursor: pointer; text-align: left; }
.dp-wide { width: 100%; }
.dp-banner { border: 2px solid var(--info); border-radius: var(--radius-md); padding: var(--space-lg); background: var(--df-panel); }
.dp-banner p { margin: 0 0 var(--space-md); font-weight: 600; }
.dp-two { display: flex; gap: var(--space-md); }
.dp-two > * { flex: 1; }
/* P10-2: Cancel on the conversion sheet is plain text; focus draws the ink keyline, not the browser's green box. */
.dp-two .dp-link { text-decoration: none; color: var(--df-ink); text-align: center; }
.dp-two .dp-link:focus-visible { outline: 2px solid var(--df-ink); outline-offset: 2px; box-shadow: none; }
.dp-status { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-lg); border-bottom: 2px solid var(--border); }
.dp-status .dp-link { margin-left: auto; }
.dp-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); padding: var(--space-md) var(--space-lg); border-top: 2px solid var(--border); }
.dp-foot .btn-primary { flex: 1; }
/* P05-4: Preview as public and Save post share one height and baseline. */
.dp-foot .btn-secondary, .dp-foot .btn-primary { margin-top: 0; width: auto; min-height: var(--tap-min); }
.dp-foot .btn-secondary { flex: 1; }
.dp-check-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-xs); }
.dp-check-inline .dp-link { min-height: 0; }
/* P03: the real post page, inert, inside the sheet (#3654). */
.dp-preview-page { border: 2px solid var(--df-ink); border-radius: var(--radius-md); overflow: hidden; }
/* The preview is inert, so the like/save hit areas can't collide with a neighbour: full --tap-min (#4392). */
.dp-preview-page .discover-like-btn, .dp-preview-page .discover-save-btn { min-height: var(--tap-min); min-width: var(--tap-min); justify-content: center; }
.dp-preview-page .discover-like-btn::before, .dp-preview-page .discover-save-btn::before { width: max(var(--tap-min), 100%); height: max(var(--tap-min), 100%); }
.dp-big { margin: 0; font-family: var(--df-title); font-size: var(--fs-xl, 32px); line-height: 1.15; }
.dp-place { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--fs-xs); font-weight: 600; }
.dp-facts { font-family: var(--df-sans); font-size: var(--fs-xs); border-top: 1px dashed var(--border); margin-top: var(--space-md); padding-top: var(--space-md); }
.dp-published-card { position: relative; display: flex; gap: var(--space-lg); padding-bottom: var(--space-xl); }
.dp-thumb { position: relative; flex: none; width: 96px; height: 96px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.dp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dp-tag { position: absolute; top: 6px; left: 6px; padding: 1px 8px; border: 2px solid var(--df-ink); border-radius: 999px; background: var(--vn-amber); color: var(--df-amber-fg); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; }
.dp-thumb-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--text-muted); font-size: var(--fs-lg, 24px); }
.dp-author { display: flex; align-items: center; gap: var(--space-sm); margin-top: var(--space-xs, 4px); }
.dp-counts { display: flex; gap: var(--space-lg); margin-top: var(--space-xs, 4px); color: var(--text-muted); }
.dp-counts i { margin-right: 4px; }
.dp-card-name { font-weight: 600; }
.dp-stamp { position: absolute; right: 8px; bottom: -14px; padding: 2px 10px; border: 3px solid var(--vn-coral); letter-spacing: 0.02em; font-size: var(--fs-md); border-radius: var(--radius-xs); color: var(--vn-coral); background: var(--df-panel); font-weight: 800; text-transform: uppercase; transform: rotate(-3deg); }
.dp-label { font-family: var(--df-sans); font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.dp-photos { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.dp-ph { position: relative; width: 76px; height: 76px; border-radius: var(--radius-sm); border: 2px solid var(--df-ink); overflow: hidden; }
.dp-ph img { width: 100%; height: 100%; object-fit: cover; }
.dp-ph-n { position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--df-ink); color: var(--surface-2); font-size: var(--fs-xs); display: inline-flex; align-items: center; justify-content: center; }
.dp-ph-x { position: absolute; right: 0; bottom: 0; min-width: var(--tap-min); min-height: var(--tap-min); display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; color: #fff; cursor: pointer; }
.dp-ph-sort { overflow: visible; border: 0; }
.dp-ph-sort img { border: 2px solid var(--df-ink); border-radius: var(--radius-sm); }
.dp-ph-mv { position: absolute; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; background: var(--df-ink); color: var(--surface-2); border: 0; border-radius: 50%; cursor: pointer; font-size: var(--fs-xs); }
.dp-ph-mv::before { content: ''; position: absolute; left: 50%; top: 50%; width: max(var(--tap-min), 100%); height: max(var(--tap-min), 100%); transform: translate(-50%, -50%); }
.dp-ph-mv-l { left: 4px; bottom: 4px; }
.dp-ph-mv-r { right: 4px; top: 4px; }
.dp-ph-trip { background: none; color: inherit; font-size: var(--fs-xl); }
.dp-ph-add { display: flex; align-items: center; justify-content: center; min-width: var(--tap-min); min-height: var(--tap-min); border-style: dashed; padding: 4px; text-align: center; font-size: var(--fs-xs); font-weight: 600; line-height: 1.2; cursor: pointer; }
.dp-input, .dp-modal .dp-input { width: 100%; }
.dp-modal .dp-input { border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub); background: var(--df-panel); color: var(--df-ink); }
.dp-links { display: flex; gap: var(--space-xl); }
.dp-toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); min-height: var(--tap-min); padding: var(--space-sm) 0; }
.dp-toggle + .dp-toggle { border-top: 1px dashed var(--border); }
.dp-toggle-name { display: block; font-weight: 600; }
.dp-toggle-sub { display: block; font-size: var(--fs-xs); color: var(--text-muted); }
.dp-warn { border: 2px solid var(--error-text); border-radius: var(--radius-md); padding: var(--space-lg); margin-top: var(--space-md); background: var(--surface-2); }
.dp-warn p { margin: 0; }
.dp-warn { background: light-dark(var(--error-light), color-mix(in srgb, var(--error-text) 18%, var(--surface-2))); }
.dp-warn-actions { margin-top: var(--space-md); }
.dp-warn-actions > .btn-secondary, .dp-warn-actions > .btn-primary { min-height: var(--tap-min); height: auto; }

/* #3041 — share a day / stop / moment, conversion sheet, Edit post (P08–P11, P14) */
.dp-opt { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); width: 100%; min-height: var(--tap-min); padding: var(--space-md) 0; background: none; border: 0; text-align: left; color: inherit; cursor: pointer; }
.dp-opt + .dp-opt { border-top: 1px dashed var(--border); }
.dp-switch { flex: none; position: relative; width: 52px; height: 30px; border: 2px solid var(--df-ink); border-radius: 999px; background: var(--df-panel); }
.dp-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--df-ink); transition: transform var(--dur-feedback) var(--ease-out); }
.dp-switch-on { background: var(--topbar-bg); }
.dp-switch-on::after { transform: translateX(22px); background: var(--topbar-fg); }
.dp-chips { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.dp-chip { min-height: var(--tap-min); padding: 0 var(--space-lg); border: 2px solid var(--df-ink); border-radius: 999px; background: var(--df-panel); font-weight: 600; cursor: pointer; }
.dp-chip-on { background: var(--df-ink); color: var(--surface-2); }
.dp-stoprow { display: flex; align-items: center; gap: var(--space-md); width: 100%; min-height: var(--tap-min); padding: var(--space-sm) 0; background: none; border: 0; border-bottom: 1px dashed var(--border); text-align: left; color: inherit; cursor: pointer; }
.dp-stoprow-off { opacity: 0.55; cursor: not-allowed; }
.dp-stopthumb { flex: none; width: 64px; height: 64px; border: 2px solid var(--df-ink); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.dp-stopthumb img { width: 100%; height: 100%; object-fit: cover; }
.dp-ph-file { display: block; padding: 28px 4px 0; font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-tagline { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }
.dp-tag-pill { display: inline-flex; align-items: center; gap: var(--space-xs); padding: 2px var(--space-md); border: 2px solid var(--df-ink); border-radius: 999px; font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 600; }
.dp-sheet { display: flex; flex-direction: column; gap: var(--space-md); padding: var(--space-xl) var(--space-lg); }
.dp-sheet p { margin: 0; }
.dp-conv-row + .dp-conv-row { border-top: 1px dashed var(--border); margin-top: var(--space-sm); padding-top: var(--space-sm); }
.dp-seg { display: flex; border: 2px solid var(--df-ink); border-radius: 999px; overflow: hidden; }
.dp-seg-btn { flex: 1; min-height: var(--tap-min); border: 0; background: var(--df-panel); font-weight: 600; color: inherit; cursor: pointer; }
.dp-seg-on { background: var(--df-ink); color: var(--surface-2); }
.dp-seg-btn:disabled { cursor: default; }
@media (prefers-reduced-motion: reduce) { .dp-switch::after { transition: none; } }

/* #3052 (Discover B16, D104) — "Start my trip from this": S09 choice, S10 tick stops, S08 trip + day. */
.discover-start-choice, .discover-copy-to-trip-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); width: 100%; min-height: var(--tap-min); margin-bottom: var(--space-md); padding: var(--space-md) var(--space-lg); border: 2px solid var(--df-ink); border-radius: var(--radius-md); background: var(--surface-2); color: inherit; text-align: left; cursor: pointer; }
.discover-copy-to-trip-row.selected { background: var(--df-ink); color: var(--surface-2); }
.discover-start-choice-sub { display: block; font-size: var(--fs-xs); opacity: 0.75; }
.discover-pick-day-label { margin: var(--space-lg) 0 var(--space-xs); font-family: var(--df-sans); font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; }
.discover-pick-stop { display: flex; align-items: center; gap: var(--space-md); min-height: var(--tap-min); padding: var(--space-sm) 0; border-bottom: 1px dashed var(--border); cursor: pointer; }
.discover-pick-stop input { flex: none; width: 24px; height: 24px; }
.discover-pick-stop-thumb { flex: none; width: 64px; height: 64px; border: 2px solid var(--df-ink); border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-2); }
.discover-pick-stop-thumb-empty { display: block; background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--border) 6px 8px); }
.discover-pick-stop-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.discover-pick-stop-name { font-weight: 600; }
.discover-pick-stop.is-masked { opacity: 0.55; cursor: not-allowed; }
#discover-pick-stops-next, #discover-copy-to-trip-confirm { width: 100%; margin-top: var(--space-lg); }
.discover-copy-to-trip-label { margin: var(--space-lg) 0 var(--space-sm); font-family: var(--df-sans); font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; }
.discover-copy-to-trip-days { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.discover-copy-to-trip-days .wizard-chip { min-height: var(--tap-min); }
.discover-copy-to-trip-note { margin: var(--space-md) 0 0; font-size: var(--fs-xs); color: var(--text-muted); }
.discover-copy-to-trip-dupes { margin-top: var(--space-md); padding: var(--space-md); border: 2px dashed var(--df-ink); border-radius: var(--radius-sm); font-size: var(--fs-xs); }
.discover-copy-to-trip-dupes p { margin: 0 0 var(--space-sm); }

/* #3053 (Discover W4) — S01 signed-out sheet and S03 Copied (D58). */
.discover-start-auth-btn { width: 100%; margin-top: var(--space-md); }
/* Stock stays warm paper in both themes, like .dtl; the copied card sits outside .dtl, so it carries its own copy. */
.discover-copied-print { --dtl-stock: var(--df-instant-stock); position: relative; margin: var(--space-lg) auto var(--space-xl); max-width: 320px; padding: 10px 10px 28px; background: var(--dtl-stock); border: 2px solid var(--df-ink); box-shadow: 0 6px 0 var(--df-ink); transform: rotate(-2deg); animation: discover-copied-land var(--dur-view) var(--ease-out) both; }
.discover-copied-print::before { content: ''; position: absolute; top: -12px; left: 50%; width: 90px; height: 24px; transform: translateX(-50%) rotate(2deg); background: color-mix(in srgb, var(--vn-amber-mid) 80%, transparent); }
.discover-copied-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.discover-copied-photo-empty { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--border) 6px 8px); }
.discover-copied-stamp { position: absolute; left: -8px; bottom: -10px; padding: 2px 12px; border: 3px solid var(--vn-coral); border-radius: var(--radius-xs); background: var(--dtl-stock); color: var(--vn-coral); font-size: var(--fs-lg, 28px); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; transform: rotate(-4deg); animation: discover-copied-strike var(--dur-view) var(--ease-out) var(--dur-view) both; }
.discover-copied-title { margin: var(--space-lg) 0 var(--space-sm); font-family: var(--df-sans); font-size: var(--fs-xl); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
.discover-copied-sub { margin: 0 0 var(--space-lg); }
.discover-copied-counter { margin-bottom: var(--space-lg); padding: var(--space-md); border: 2px solid var(--df-ink); border-radius: var(--radius-md); }
.discover-copied-counter span { display: block; padding-bottom: var(--space-sm); border-bottom: 2px dashed var(--df-ink); font-family: var(--df-sans); font-weight: 400; }
.discover-copied-counter p { margin: var(--space-sm) 0 0; font-size: var(--fs-xs); color: var(--text-muted); }
.discover-copied-invite, .discover-copied-see { width: 100%; min-height: var(--tap-min); }
@keyframes discover-copied-land { from { opacity: 0; transform: translateY(-24px) rotate(-6deg); } to { opacity: 1; transform: rotate(-2deg); } }
@keyframes discover-copied-strike { from { opacity: 0; transform: scale(1.6) rotate(-4deg); } to { opacity: 1; transform: scale(1) rotate(-4deg); } }
/* Reduced motion: the print and stamp rest in their finished state, never hidden. */
@media (prefers-reduced-motion: reduce) {
  .discover-copied-print, .discover-copied-stamp { animation: none; opacity: 1; }
}

/* ── Feed head + footer (#3045) ───────────────────────────── */
.discover-city-row { margin-bottom: var(--space-2xl); }
.discover-city-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.discover-city-label {
  margin: 0;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--df-ink-soft);
}
.discover-city-all {
  min-height: var(--tap-min);
  padding: 0 var(--space-sm);
  margin-inline-end: calc(var(--space-sm) * -1);
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--vn-green);
  background: none;
  border: 0;
  cursor: pointer;
}
.discover-city-cards {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  padding: 0 2px var(--space-xs);
}
/* #6723: same shape as the home city cards: the photo is a strip across the
   top, the words sit on the Cut Stock band under it (ink on panel, no scrim). */
.discover-city-card {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  width: 132px;
  --city-photo-h: 56px;
  min-height: max(var(--tap-min), 96px);
  padding: calc(var(--city-photo-h) + var(--space-md)) var(--space-lg) var(--space-md);
  text-align: left;
  font: inherit;
  color: var(--df-ink);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  overflow: hidden;
  cursor: pointer;
}
.discover-city-card[aria-pressed="true"] { box-shadow: var(--df-press); }
.discover-city-card-name {
  position: relative;
  z-index: 1;
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.discover-city-card-country {
  position: relative;
  z-index: 1;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--df-ink-soft);
}
.discover-city-card-meta { display: contents; }
.discover-city-card-trips {
  display: none;
  position: relative;
  z-index: 1;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}
.discover-city-card::before,
.discover-city-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--city-photo-h);
  border-bottom: 2px solid var(--df-ink);
  pointer-events: none;
}
.discover-city-card::before { background: var(--df-ground); }
.discover-city-card::after {
  background-image: var(--discover-city-photo);
  background-size: cover;
  background-position: var(--discover-city-photo-position, center);
  opacity: 0;
  transition: opacity var(--dur-view) var(--ease-out);
}
.discover-city-card-photo-visible::after { opacity: 1; }
.discover-filter-chip {
  flex-shrink: 0;
  min-height: var(--tap-min);
  padding: 0 var(--space-2xl);
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  color: var(--df-ink);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.discover-filter-chip.selected {
  background: var(--df-ink);
  color: var(--df-panel);
}
.discover-filter-count {
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: var(--radius-pill);
  background: var(--df-ink);
  color: var(--df-panel);
  font-size: var(--fs-xs);
}
#discover-filter-body { padding: var(--space-2xl); }
.discover-filter-group { margin-bottom: var(--space-3xl); }
.discover-filter-title { font-weight: 600; margin-bottom: var(--space-md); }
.discover-filter-chips { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.discover-filter-note { color: var(--df-ink-soft); font-size: var(--fs-xs); }
.discover-filter-actions {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-2xl);
}
.discover-feed-end, .discover-feed-loading {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--df-ink-soft);
  font-size: var(--fs-sm);
}
#discover-empty .btn-secondary { margin-top: var(--space-xl); }
/* F05/F06 — the empty and offline states are one drawn card. */
.discover-empty-card {
  text-align: left;
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  padding: var(--space-3xl);
}
.discover-empty-card i { display: block; font-size: var(--fs-display-32); color: var(--df-ink); margin-bottom: var(--space-lg); }
.discover-empty-card h3 { font-family: var(--df-sans); font-size: var(--fs-xl); color: var(--df-ink); margin: 0 0 var(--space-md); }
.discover-empty-card p { margin: 0 0 var(--space-xl); }
.discover-empty-card .btn-primary { min-height: var(--tap-min); }

/* Share sheet (issue #3056, V06) */
#shareSheetModal .share-label { font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin: var(--space-md, 12px) 0 var(--space-sm, 8px); }
#shareSheetModal .share-friends { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--space-md, 12px); }
#shareSheetModal .share-friend { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap-min, 44px); padding: 0 14px 0 8px; border: 2px solid var(--text-primary); border-radius: 999px; background: transparent; color: inherit; font-weight: 600; font-size: 14px; font-family: inherit; cursor: pointer; }
#shareSheetModal .share-friend.on { background: var(--text-primary); color: var(--surface-2); }
#shareSheetModal .share-friend-av { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: var(--text-primary); color: var(--surface-2); font-weight: 600; font-size: var(--fs-xs); }
#shareSheetModal .share-friend.on .share-friend-av { background: var(--surface-2); color: var(--text-primary); }
#shareSheetModal .share-targets { display: flex; flex-wrap: wrap; gap: 8px; }
#shareSheetModal .share-target { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap-min, 44px); min-width: var(--tap-min, 44px); padding: 0 14px; border: 2px solid var(--text-primary); border-radius: 999px; background: transparent; color: inherit; font-weight: 600; font-size: 14px; font-family: inherit; text-decoration: none; cursor: pointer; }

/* ── Discover post page (#3051, T01–T12) ───────────────────────
   Fills #shared-trip-screen. Titles are Fraunces via --df-display; cards take
   the Press shadow; the action bar is sticky at the foot of the scroll area. */
.dpost {
  /* The route rows (.dtl-days, .dtl-pin) and the struck stamp take these from
     .dtl; the post page is not inside one, so it carries its own copy. */
  --dtl-stock: var(--df-instant-stock);
  --dtl-stock-ink: var(--df-instant-stock-ink);
  --dtl-ghost: var(--df-ghost);
  --dtl-pin-ink: var(--df-amber-fg);
  --dtl-pin-size: 30px;
  display: flex; flex-direction: column; min-height: 100%;
}
.dpost-pad { display: flex; flex-direction: column; gap: var(--space-lg); padding: var(--space-2xl) var(--space-3xl) var(--space-4xl); }
.dpost-hero { position: relative; background: var(--df-ink); color: #fff; }
.dpost-gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 1 / 1; max-height: 70vh; }
.dpost-gallery::-webkit-scrollbar { display: none; }
.dpost-slide { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; display: block; }
.dpost-slide-empty { overflow: hidden; }
.dpost-hero::after { content: ''; position: absolute; inset: 40% 0 0; background: linear-gradient(to bottom, transparent, rgba(9, 20, 13, 0.92)); pointer-events: none; }
.dpost-hero-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: var(--space-3xl); }
.dpost-title { margin: 0; font-family: var(--df-title); font-size: var(--fs-xl, 1.5rem); font-weight: 700; line-height: 1.15; color: #fff; text-wrap: balance; }
.dpost-place { display: flex; align-items: center; gap: var(--space-xs); margin-top: var(--space-xs); font-size: var(--fs-xs); font-weight: 400; letter-spacing: 0.01em; color: #fff; }
.dpost-counter, .dpost-tag { position: absolute; top: var(--space-md); z-index: 1; padding: 3px var(--space-md); border-radius: var(--radius-pill); font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 400; letter-spacing: 0.08em; }
.dpost-counter { right: var(--space-md); background: rgba(9, 20, 13, 0.7); color: #fff; }
.dpost-tag { left: var(--space-md); background: var(--vn-amber-mid); color: var(--df-ink); border: 2px solid var(--df-ink); text-transform: uppercase; }
.dpost-author { display: flex; align-items: center; gap: var(--space-md); }
.dpost-avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.dpost-avatar-init { display: inline-flex; align-items: center; justify-content: center; background: var(--df-ink); color: var(--df-ground); font-weight: 800; }
.dpost-avatar-sm { width: 24px; height: 24px; font-size: var(--fs-xs); }
.dpost-author-text { flex: 1; min-width: 0; }
.dpost-author-name { font-weight: 600; }
.dpost-author-sub { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.dpost-stamp { position: absolute; right: var(--space-md); bottom: var(--space-md); z-index: 1; padding: 2px var(--space-md); border: 2px solid var(--vn-coral); border-radius: var(--radius-xs); background: var(--df-panel); color: var(--vn-coral); font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; transform: rotate(-3deg); }
.dpost-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm) var(--space-md); padding-top: var(--space-md); border-top: 2px dashed var(--df-ink-soft); }
.dpost-facts { display: inline-flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-md); font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--df-ink-soft); }
.dpost-counts { display: inline-flex; align-items: center; gap: var(--space-sm); font-variant-numeric: tabular-nums; }
.dpost-count-static { display: inline-flex; align-items: center; gap: var(--space-xs); font-size: var(--fs-xs); font-weight: 600; }
.dpost-words { margin: 0; max-width: 65ch; font-size: var(--fs-sm, 1rem); line-height: 1.6; white-space: pre-line; }
.dpost-card { display: flex; align-items: center; gap: var(--space-md); width: 100%; min-height: var(--tap-min); padding: var(--space-lg); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub, 12px); background: var(--df-ground); color: var(--df-ink); text-align: left; text-decoration: none; font: inherit; cursor: pointer; }
.dpost-card-raised { box-shadow: var(--df-press); }
.dpost-card-raised:hover { box-shadow: var(--df-press-hover); }
.dpost-card-raised:active { box-shadow: var(--df-press-active); }
.dpost-card-icon { font-size: 1.4em; }
.dpost-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dpost-card-sub { font-size: var(--fs-xs); color: var(--df-ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dpost-thread { list-style: none; margin: var(--space-md) 0 0; padding: 0; }
.dpost-thread[hidden] { display: none; }
.dpost-comment { padding: var(--space-md) 0; border-bottom: 1px dashed var(--df-ink-soft); }
.dpost-comment-body { margin-top: 2px; line-height: 1.5; }
.dpost-comment-reply { margin: var(--space-sm) 0 0 var(--space-2xl); padding-left: var(--space-md); border-left: 3px solid var(--df-ink-soft); }
.dpost-comment-main.is-hidden { opacity: 0.55; }
.dpost-comment-sub { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.dpost-comment-actions { display: flex; gap: var(--space-md); }
.dpost-comment-act { min-height: var(--tap-min); padding: 0 var(--space-xs); border: 0; background: none; color: var(--df-ink-soft); font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.dpost-composer { display: flex; align-items: center; gap: var(--space-md); margin-top: var(--space-md); }
.dpost-composer input { flex: 1; min-width: 0; }
.dpost-comment-badge { padding: 1px var(--space-sm); border: 2px solid var(--df-ink); border-radius: var(--radius-pill); font-family: var(--df-sans); font-size: var(--fs-xs); text-transform: none; }
.dpost-action { position: sticky; bottom: 0; margin-top: auto; padding: var(--space-lg) var(--space-3xl) calc(var(--space-lg) + env(safe-area-inset-bottom)); background: var(--df-ground); border-top: 2px solid var(--df-ink-soft); }
.dpost-action-btn { width: 100%; min-height: var(--tap-min); }

/* The itinerary (T02) reuses the route rows .dtl-days / .dtl-pin. */
.dpost-stub { padding: var(--space-2xl); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub, 12px); background: var(--df-ground); }
.dpost-city-link { position: relative; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.dpost-city-link::before { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); min-width: var(--tap-min); min-height: var(--tap-min); width: 100%; height: max(var(--tap-min), 100%); }
.dpost-stub-place { display: flex; align-items: center; gap: var(--space-xs); margin-top: var(--space-md); font-size: var(--fs-xs); font-weight: 600; }
.dpost-stub-name { margin-top: var(--space-md); font-family: var(--df-title); font-size: var(--fs-lg, 1.25rem); font-weight: 700; line-height: 1.2; }
.dpost-stub-host { display: flex; align-items: center; gap: var(--space-sm); margin-top: var(--space-md); font-size: var(--fs-xs); font-weight: 600; }
.dpost-stub-foot { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 2px dashed var(--df-ink); font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 600; font-variant-numeric: tabular-nums; }
.dpost-stub-counts { display: inline-flex; gap: var(--space-lg); }
.dpost-stub-counts i { margin-right: 4px; }
.dpost-days { margin-top: var(--space-lg); }
.dpost-switch { display: flex; padding: 3px; margin: var(--space-sm) 0 var(--space-md); border: 2px solid var(--df-ink); border-radius: var(--radius-pill); background: var(--df-ground); }
.dpost-switch-btn { flex: 1; min-height: var(--tap-min); border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--df-ink); font: inherit; font-weight: 600; cursor: pointer; }
.dpost-switch-btn.is-active { background: var(--df-ink); color: var(--df-ground); }
.dpost-section[hidden] { display: none; }
.dpost-stop-row { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-sm) 0; }
.dpost-stop-tile { flex: none; width: 64px; height: 64px; border: 2px solid var(--df-ink); border-radius: var(--radius-md); object-fit: cover; background: var(--df-ground); }
.dpost-stop-tile-empty, .dpost-stop-tile-masked { display: block; background: repeating-linear-gradient(135deg, var(--df-ground) 0 6px, color-mix(in srgb, var(--df-ink) 16%, transparent) 6px 8px); }
.dpost-stop-tile-masked { border-color: var(--df-ink-soft); }
.dpost-stop-main { min-width: 0; flex: 1; }
.dpost-stop-time { flex: none; margin-left: auto; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; color: var(--df-ink-soft); }
.dpost-stop-name { display: flex; align-items: center; gap: var(--space-sm); font-weight: 600; }
.dpost-stop-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.dpost-stop-note { margin-top: 2px; font-size: var(--fs-xs); line-height: 1.5; color: var(--df-ink-soft); }
.dpost-stop-row.is-masked .dpost-stop-name { color: var(--df-ink-soft); }

/* T04 gone / T05 offline: one centred card. */
.dpost-state { display: flex; align-items: center; justify-content: center; min-height: 100%; padding: var(--space-3xl); }
.dpost-state-card { display: flex; flex-direction: column; gap: var(--space-md); width: 100%; max-width: 420px; padding: var(--space-3xl); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub, 12px); background: var(--df-ground); }
.dpost-state-title { margin: 0; font-family: var(--df-sans); font-size: var(--fs-xl, 1.5rem); font-weight: 600; line-height: 1.15; }
.dpost-state-text { margin: 0 0 var(--space-md); color: var(--df-ink-soft); line-height: 1.5; }

@media (min-width: 900px) {
  .dpost { max-width: 720px; margin: 0 auto; }
  .dpost-gallery { aspect-ratio: 16 / 10; }
}

/* ── City page (issue #3059, C01–C03) ─────────────────────────────────────
   Fills #shared-trip-screen like the post page. City name in the display face,
   an About card on the Press shadow, and a row of uncollected stamps. */
.dcity { display: flex; flex-direction: column; min-height: 100%; }
.dcity-pad { display: flex; flex-direction: column; gap: var(--space-lg); width: 100%; max-width: 720px; margin: 0 auto; padding: var(--space-2xl) var(--space-3xl) var(--space-4xl); }
.dcity-name { margin: 0; font-family: var(--df-display, var(--df-sans)); font-size: var(--fs-2xl, 2rem); font-weight: 800; line-height: 1.05; text-transform: uppercase; color: var(--df-ink); text-wrap: balance; }
.dcity-country { margin: calc(var(--space-sm) * -1) 0 0; font-size: var(--fs-xs); font-weight: 400; color: var(--df-ink); }
.dcity-about { padding: var(--space-3xl); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub, 12px); background: var(--df-ground); }
.dcity-about-title { margin: 0 0 var(--space-md); font-family: var(--df-sans); font-size: var(--fs-lg, 1.25rem); font-weight: 600; }
.dcity-about-text { margin: 0 0 var(--space-xl); font-size: var(--fs-sm, 1rem); line-height: 1.6; }
.dcity-credit { margin: 0; font-size: var(--fs-xs); color: var(--df-ink-soft, var(--df-ink)); }
.dcity-more { font-weight: 600; color: var(--vn-trail-green); text-decoration: underline; display: inline-block; min-height: var(--tap-min); line-height: var(--tap-min); }
.dcity-stamps-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-md); }
.dcity-stamps-title { margin: 0; font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.dcity-stamps-all { display: inline-flex; align-items: center; min-height: var(--tap-min); font-family: var(--df-sans); font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--vn-trail-green); text-decoration: none; }
.dcity-stamp-row { display: flex; gap: var(--space-xl); margin: 0; padding: var(--sp-sm) 0 var(--space-md) var(--sp-sm); list-style: none; overflow-x: auto; scrollbar-width: none; }
.dcity-stamp-row::-webkit-scrollbar { display: none; }
.dcity-stamp { position: relative; flex: 0 0 76px; display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); }
.dcity-stamp-art { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border: 2px dashed var(--df-stamp-ink, #9a3b1b); border-radius: 50%; color: var(--df-stamp-ink, #9a3b1b); font-size: var(--fs-2xl); }
.dcity-stamp-art:not(.dcity-stamp-pin) { background: var(--df-stamp-ink, #9a3b1b); -webkit-mask: var(--stamp-art) center / 60% no-repeat; mask: var(--stamp-art) center / 60% no-repeat; border: 0; }
.dcity-stamp-label { max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-xs); font-weight: 600; }
@media (min-width: 900px) { .dcity-name { font-size: var(--fs-display-32, 2.75rem); } }

/* #3307 — Settings → Purchases */
.pf-purchase-chip {
  display: inline-block; margin-left: var(--space-sm); padding: 0 var(--space-sm);
  border-radius: 999px; font-size: var(--fs-xs); border: 2px solid var(--df-hair); color: var(--df-ink-soft);
}
.pf-purchase-refunded, .pf-purchase-dispute_lost { color: var(--df-ink); }
.pf-purchase .btn-small { flex-shrink: 0; min-height: var(--tap-min); }

/* #3319 — the profile's Posts grid is the feed grid; only the gap to the next section is its own. */
.up-posts-grid { margin-bottom: var(--space-xl); }

/* #3460 — P07 "Our take and stop notes" and the stamp on the post page */
.dp-takerow { display: flex; gap: var(--space-md); padding: var(--space-sm) 0; }
.dp-takerow + .dp-takerow { border-top: 1px dashed var(--border); }
.dp-takerow .dp-stopthumb { display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; color: var(--text-muted); }
.dp-takemain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-xs); }
.dp-stamps { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.dp-stamp-opt { min-height: var(--tap-min); min-width: var(--tap-min); padding: 0 var(--space-md); border: 2px solid var(--df-ink); border-radius: var(--radius-sm); background: none; color: inherit; font-weight: 600; cursor: pointer; }
.dp-stamp-opt.is-on { background: var(--df-ink); color: var(--surface-2); }
.dpost-stop-stamp { display: inline-block; margin-top: 2px; padding: 1px 8px; border: 2px solid currentColor; border-radius: var(--radius-xs); font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--vn-coral); }

/* #3492 — "More posts about this trip" under the post page's comments card. */
.dpost-more { margin-top: var(--space-xl); }
.dpost-more-title { margin: 0 0 var(--space-md); font-size: var(--fs-md); }

/* Photo-consent sheet (D154, board P17, #3906): cream Cut Stock ground with the
   board's top radius and ink keyline on the phone sheet too, pill buttons with
   the shared hard offset shadow, "Not now" outlined, "Allow my photos" green.
   No x close, so both buttons are the only way out. */
.photo-consent-sheet .modal-content {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: 20px 20px 0 0;
  color: var(--df-ink);
  padding: 20px 16px 22px;
}
@media (min-width: 681px) {
  .photo-consent-sheet .modal-content { border-radius: var(--df-radius-card); padding: 2.25rem; }
}
.photo-consent-sheet .modal-content:focus { outline: none; }
.photo-consent-sheet .modal-header { margin-bottom: 14px; }
.photo-consent-sheet .modal-header h2 {
  font-family: var(--df-title);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.photo-consent-sheet .modal-content p { font-size: var(--fs-md); color: var(--df-ink); margin-bottom: 14px; }
.photo-consent-sheet .modal-content p.photo-consent-note { font-size: var(--fs-sm); color: var(--text-muted); }
.photo-consent-sheet .photo-consent-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.photo-consent-sheet .photo-consent-actions .btn {
  flex: 1;
  width: auto;
  margin: 0;
  padding: 0 22px;
  font-family: var(--df-sans);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  font-size: var(--fs-md);
  font-weight: 600;
  min-height: var(--tap-min);
  transition: transform var(--dur-feedback) var(--ease-out);
}
.photo-consent-sheet .photo-consent-actions .btn-secondary { background: var(--df-panel); color: var(--df-ink); }
.photo-consent-sheet .photo-consent-actions .btn-primary { background: var(--df-brand); color: var(--df-brand-fg); }
.photo-consent-sheet .photo-consent-actions .btn:active { transform: translate(4px, 4px); }
@media (prefers-reduced-motion: reduce) {
  .photo-consent-sheet .photo-consent-actions .btn, .photo-consent-sheet .photo-consent-actions .btn::before { transition: none; }
  .photo-consent-sheet .photo-consent-actions .btn:active { transform: none; }
}

/* #4396 — category dot before the stop name in "Which stop?" (P14-2), hues as the itinerary rail */
.dp-catdot { display: inline-block; width: 8px; height: 8px; margin-right: var(--space-sm); border-radius: 50%; background: var(--df-ink-soft); vertical-align: middle; }
.dp-catdot.stop-cat-food { background: var(--vn-pandan); }
.dp-catdot.stop-cat-transport { background: var(--vn-sky); }
.dp-catdot.stop-cat-shopping { background: var(--vn-batik); }
.dp-catdot.stop-cat-hotel { background: var(--vn-indigo); }
.dp-catdot.stop-cat-activity { background: var(--vn-green); }
.dp-catdot.stop-cat-attraction { background: var(--vn-purple); }
/* P11-2: the Link-to-trip toggle is drawn in its own bordered card */
.dp-toggle.dp-card { margin-top: var(--space-lg); }
/* P07 stop rows (#4390): day badge, category dot, time, struck stamp */
.dp-takemeta { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--fs-xs); color: var(--text-muted); }
.dp-daybadge { padding: 0 var(--space-xs); border: 1.5px solid var(--df-ink); border-radius: var(--radius-xs); font-weight: 600; color: var(--df-ink); }
.dp-takemeta .dp-catdot { margin-right: 0; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.dp-stamp-struck { align-self: flex-start; min-height: var(--tap-min); padding: 0 var(--space-md); border: 2px solid var(--vn-coral); border-radius: var(--radius-xs); background: none; color: var(--vn-coral); font-weight: 800; text-transform: uppercase; transform: rotate(-3deg); cursor: pointer; }

/* #4623 — Map view on a post's itinerary: day and category chips, numbered pins. */
.dpost-map-chips { display: flex; gap: var(--space-xs); overflow-x: auto; padding: var(--space-xs) 0; }
.dpost-map-chip { flex: none; display: inline-flex; align-items: center; gap: var(--space-xs); min-height: var(--tap-min); min-width: var(--tap-min); padding: 0 var(--space-md); border: 2px solid var(--df-ink); border-radius: var(--radius-pill); background: var(--df-ground); color: var(--df-ink); font: inherit; font-weight: 600; cursor: pointer; }
.dpost-map-chip.is-active { background: var(--df-ink); color: var(--df-ground); }
.dpost-map-chip:disabled { opacity: 0.45; cursor: default; }
.dpost-map-canvas { height: 360px; margin: var(--space-sm) 0; border: 1px solid var(--df-hair); border-radius: var(--df-radius-stub); overflow: hidden; }
/* MapLibre's zoom buttons default to 29px — below --tap-min (#4890). */
.dpost-map-canvas .maplibregl-ctrl-group button { min-width: var(--tap-min); min-height: var(--tap-min); }
/* Issue #4891 — the credit strip carries its own tokens: MapLibre's default strip is
   translucent white, which left the inherited light text unreadable in dark mode. */
.dpost-map-canvas .maplibregl-ctrl-attrib { background: var(--df-panel); color: var(--df-ink); }
.dpost-map-canvas .maplibregl-ctrl-attrib a { color: var(--df-ink); text-decoration: underline; }
.dpost-map-canvas .maplibregl-ctrl-attrib.maplibregl-compact { background: var(--df-panel); }
/* Issue #4991 — the "i" toggle is MapLibre's fixed black 24px SVG on a translucent white/black
   wash: black on --df-panel in dark mode, and 24px is under --tap-min. Paint the glyph as a mask in
   --df-ink and grow the button, with the strip making room for it. */
.dpost-map-canvas .maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-button.maplibregl-ctrl-attrib-button { width: var(--tap-min); height: var(--tap-min); border-radius: 0; background-color: var(--df-ink); background-image: none; -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E") center / 24px 24px no-repeat; mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E") center / 24px 24px no-repeat; }
.dpost-map-canvas .maplibregl-ctrl-attrib.maplibregl-compact { min-height: var(--tap-min); padding-right: var(--tap-min); }
.dpost-map-canvas .maplibregl-ctrl-attrib.maplibregl-compact-show { padding-right: var(--tap-min); }
.dpost-map-message, .dpost-map-note { margin: var(--space-xs) 0; color: var(--df-ink-soft); font-size: var(--fs-xs); }
.dpost-map-pin { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: var(--fs-xs); color: #fff; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); cursor: pointer; }
.dpost-map-popup .maplibregl-popup-content { position: relative; padding: var(--space-md); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); background: var(--df-ground); color: var(--df-ink); font-family: var(--df-sans); box-shadow: none; }
.dpost-map-popup .maplibregl-popup-tip { display: none; }
.dpost-map-card { padding-right: var(--tap-min); }
.dpost-map-card-close { position: absolute; top: 0; right: 0; width: var(--tap-min); height: var(--tap-min); display: grid; place-items: center; border: 0; background: none; color: var(--df-ink); font-size: 18px; cursor: pointer; }
.dpost-map-card-cat, .dpost-map-card-note { margin: var(--space-xs) 0; font-size: var(--fs-xs); }
.dpost-map-card-btn { min-height: var(--tap-min); }
.dpost-map-unlocated { margin-top: var(--space-sm); }
.dpost-map-unlocated-title { font-weight: 600; }
.dpost-map-unlocated ul { margin: var(--space-xs) 0 0; padding-left: var(--space-lg); }
.dpost-map-unlocated-day { color: var(--df-ink-soft); }
.dpost-stop-row.is-found { outline: 2px solid var(--df-ink); outline-offset: 2px; }
@media (max-width: 680px) { .dpost-map-canvas { height: 300px; } }

/* Hotels, budget guide and checklist on a Discover post (#4631) */
.dpost-sec { margin-top: var(--space-3xl); }
.dpost-sec-title { margin: 0 0 var(--space-lg); font-family: var(--df-sans); font-size: var(--fs-md); color: var(--df-ink); }
.dpost-sec-group { margin-bottom: var(--space-xl); }
.dpost-sec-group-title { margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--df-ink); }
.dpost-sec-sub { font-size: var(--fs-xs); color: var(--df-ink-soft); margin-top: var(--space-xs); }
.dpost-sec-caption { margin: var(--space-md) 0 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.dpost-opt-list, .dpost-budget-list, .dpost-check-list { list-style: none; margin: var(--space-md) 0 0; padding: 0; }
.dpost-opt { padding: var(--space-md) 0; border-top: 1px dashed var(--df-rule, var(--border)); display: flex; flex-direction: column; gap: var(--space-xs); }
.dpost-opt-name { font-weight: 600; color: var(--df-ink); }
.dpost-opt-link { display: inline-flex; align-items: center; min-height: var(--tap-min); text-decoration: underline; }
.dpost-price { font-variant-numeric: tabular-nums; }
.dpost-price-none, .dpost-price-unit { color: var(--df-ink-soft); font-size: var(--fs-xs); }
.dpost-opt-notes { margin: 0; font-size: var(--fs-xs); color: var(--df-ink-soft); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dpost-opt-notes.is-open { display: block; -webkit-line-clamp: unset; line-clamp: unset; }
.dpost-more-btn { align-self: flex-start; min-height: var(--tap-min); min-width: var(--tap-min); background: none; border: 0; padding: 0 var(--space-sm); font: inherit; font-size: var(--fs-xs); text-decoration: underline; color: var(--df-ink); cursor: pointer; }
.dpost-budget-total { font-size: var(--fs-md); font-weight: 600; }
.dpost-budget-row { display: flex; justify-content: space-between; padding: var(--space-sm) 0; border-top: 1px dashed var(--df-rule, var(--border)); }
.dpost-check-list li { padding: var(--space-xs) 0; }

/* ── Profile page: passport layout (#5247, #5244 Option A · Passport) ──────
   The passport card is the screen's one shout: a Field Green strip, the photo
   as a taped instant print, the name at headline tier and a dashed-rule stats
   row. Everything else is a quiet Cut Stock card on the same keyline. Chips and
   pills use ink keylines, never --vn-green. The 480px .profile-page-form
   column now serves Settings only. */
@media (min-width: 1024px) {
  #profile-screen[data-pf-page="profile"] .discover-body { padding-inline: var(--screen-side-pad); }
}
.pf-passport { display: grid; gap: var(--sp-xl); padding-bottom: var(--sp-lg); }
@media (min-width: 1024px) {
  .pf-passport { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 32px; align-items: start; }
}
.pf-pp-main, .pf-pp-rail { display: flex; flex-direction: column; gap: var(--sp-xl); min-width: 0; }
.pf-pp-card {
  background: var(--df-panel); color: var(--df-ink);
  border: 2px solid var(--df-ink); border-radius: var(--df-radius-card);
  padding: var(--sp-xl);
}
.pf-pp-card[hidden] { display: none; }
.pf-pp-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm); margin-bottom: var(--sp-sm); }
.pf-pp-title { margin: 0; font-family: var(--df-sans); font-weight: 600; font-size: var(--fs-lg); line-height: 1.2; }
.pf-pp-title + .pf-hint { margin-top: var(--sp-xs); }
.pf-pp-link {
  position: relative; display: inline-flex; align-items: center; gap: var(--sp-xs);
  min-height: var(--tap-min); padding: 0; background: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--df-ink); text-decoration: underline;
}
.pf-pp-edit .pf-row { gap: var(--sp-sm); }
.pf-pp-edit .pf-row .pf-submit { flex: 1; width: auto; }
#profile-travel-editor .pf-row { gap: var(--sp-sm); flex-wrap: wrap; }
#profile-travel-editor .pf-row .pf-submit { flex: 1 1 160px; width: auto; }

.pf-passport-card { padding: 0; overflow: hidden; }
.pf-passport-strip {
  background: var(--topbar-bg); color: var(--topbar-fg);
  padding: var(--sp-sm) var(--sp-md);
  font-family: var(--df-sans); font-weight: 700; font-size: var(--fs-xs);
  letter-spacing: 0.12em; text-transform: uppercase;
}
#profile-screen .pf-passport-card .pf-identity {
  flex-direction: row; align-items: flex-start; gap: var(--sp-lg);
  margin: 0; padding: var(--sp-lg) var(--sp-md) var(--sp-md);
}
@media (max-width: 680px) {
  #profile-screen .pf-passport-card .pf-identity { flex-direction: column; align-items: stretch; }
}
/* The photo is an instant print, taped on. */
#profile-screen .pf-passport-card .pf-identity-print {
  position: relative; flex: none; width: 144px; height: auto; overflow: visible;
  display: block; padding: var(--sp-sm) var(--sp-sm) var(--sp-xl); background: #fff;
  border: 0; border-radius: var(--df-radius-print);
  box-shadow: var(--df-press-hover), 0 14px 22px -14px rgba(9, 20, 13, 0.6);
  transform: rotate(-3deg); margin: var(--sp-xs) var(--sp-xs) 0;
}
#profile-screen .pf-passport-card .pf-identity-print::before {
  content: ''; position: absolute; top: -12px; left: 50%; width: 56px; height: 20px;
  transform: translateX(-50%) rotate(2deg); background: #d9b383; opacity: 0.92;
}
#profile-screen .pf-passport-card .pf-identity-print img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
#profile-screen .pf-passport-card .pf-identity-initial {
  display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1;
  background: #46534b; color: #fff; font-size: var(--fs-display-46);
}
#profile-screen .pf-passport-card .pf-identity-handle {
  font-weight: 400; font-size: var(--fs-xs); letter-spacing: 0; text-transform: none; color: var(--df-ink-soft);
}
#profile-screen .pf-passport-card .pf-identity-name {
  font-family: var(--df-display); font-weight: 800; font-size: var(--fs-display-32); line-height: 1.05;
  text-transform: uppercase; margin-top: var(--sp-xs);
}
.pf-identity-bio { margin: var(--sp-xs) 0 0; font-size: var(--fs-sm); line-height: 1.5; overflow-wrap: anywhere; }
.pf-identity-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-md); margin-top: var(--sp-md); }
.pf-edit-btn { width: auto; min-height: var(--tap-min); display: inline-flex; align-items: center; gap: var(--sp-xs); }
#profile-screen .pf-passport-card .pf-identity-link { margin-top: 0; display: inline-flex; align-items: center; gap: var(--sp-xs); text-decoration: none; }

/* Stats: a dashed rule above, dashed rules between. */
#profile-screen .pf-passport-card .pf-record { gap: 0; border-top: 2px dashed var(--df-ink); }
#profile-screen .pf-passport-card .pf-record-stat {
  flex: 1; align-items: flex-start; gap: var(--sp-xs); padding: var(--sp-md) var(--sp-md);
  background: none; border: 0; border-radius: 0; box-shadow: none; text-align: left;
}
#profile-screen .pf-passport-card .pf-record-stat + .pf-record-stat { border-left: 2px dashed var(--df-ink); }
#profile-screen .pf-passport-card button.pf-record-stat:hover,
#profile-screen .pf-passport-card button.pf-record-stat:focus-visible { background: var(--df-ground); box-shadow: none; }
.pf-record-label { font-weight: 400; font-size: var(--fs-xs); letter-spacing: 0; text-transform: none; }
#profile-screen .pf-passport-card .pf-record-num { font-size: var(--fs-display-32); }

/* Recent stamps. */
.pf-stamp-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--sp-sm); }
.pf-stamp-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-xs);
  min-height: 92px; padding: var(--sp-sm); font: inherit; color: var(--df-ink); cursor: pointer;
  background: var(--df-ground); border: 2px dashed var(--df-ink); border-radius: var(--df-radius-card);
}
.pf-stamp-tile:hover, .pf-stamp-tile:focus-visible { box-shadow: var(--df-press-hover); }
.pf-stamp-mark {
  max-width: 100%; padding: 2px var(--sp-xs); transform: rotate(-2deg);
  border: 2px solid var(--df-coral); border-radius: var(--df-radius-print); color: var(--df-coral);
  font-family: var(--df-display); font-weight: 800; font-size: var(--fs-md); text-transform: uppercase; overflow-wrap: anywhere;
}
.pf-stamp-meta { font-size: var(--fs-xs); color: var(--df-ink-soft); }

/* How you like to travel. */
.pf-only-you {
  display: inline-flex; align-items: center; gap: var(--sp-xs); flex: none;
  padding: 2px var(--sp-sm); border: 2px solid var(--df-ink); border-radius: 999px;
  font-weight: 700; font-size: var(--fs-xs); letter-spacing: 0.1em; text-transform: uppercase;
}
.pf-travel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--sp-md); padding: var(--sp-md) 0; border-top: 2px dashed var(--df-ink); }
.pf-travel-into { padding: var(--sp-md) 0; border-top: 2px dashed var(--df-ink); margin-bottom: var(--sp-md); }
.pf-travel-cell { display: flex; flex-direction: column; gap: var(--sp-xs); }
.pf-travel-label { display: block; font-weight: 400; font-size: var(--fs-xs); letter-spacing: 0; text-transform: none; color: var(--df-ink-soft); }
.pf-travel-value { font-weight: 600; }
.pf-travel-unset { color: var(--df-ink-soft); font-weight: 400; }
.pf-travel-chips { display: flex; flex-wrap: wrap; gap: var(--sp-xs); margin: var(--sp-xs) 0 0; padding: 0; list-style: none; }
.pf-travel-chips li { padding: var(--sp-xs) var(--sp-md); border: 2px solid var(--df-ink); border-radius: 999px; font-weight: 600; font-size: var(--fs-xs); }
#profile-travel-summary[hidden] { display: none; }

/* Right rail. */
.pf-faces { display: flex; margin-bottom: var(--sp-md); }
.pf-face {
  width: 40px; height: 40px; margin-left: calc(-1 * var(--sp-xs)); display: inline-flex; align-items: center; justify-content: center;
  background: var(--df-ground); border: 2px solid var(--df-ink); border-radius: 50%;
  font-weight: 700; font-size: var(--fs-xs);
}
.pf-face:first-child { margin-left: 0; }
.pf-face-more { background: var(--df-ink); color: var(--df-panel); }
.pf-friends-count { font-family: var(--df-display); font-weight: 800; font-size: var(--fs-lg); }
.pf-friend-requests {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm); width: 100%;
  min-height: var(--tap-min); margin-bottom: var(--sp-sm); padding: var(--sp-md);
  font: inherit; font-weight: 600; color: var(--df-ink); text-align: left; cursor: pointer;
  background: none; border: 2px dashed var(--df-ink); border-radius: var(--df-radius-card);
}
.pf-friend-requests:hover, .pf-friend-requests:focus-visible { background: var(--df-ground); }
.pf-pp-nav {
  display: flex; align-items: center; gap: var(--sp-md); width: 100%; padding: var(--sp-md);
  font: inherit; text-align: left; cursor: pointer;
}
.pf-pp-nav:hover, .pf-pp-nav:focus-visible { box-shadow: var(--df-press-hover); }
.pf-pp-nav > .ti:first-child { font-size: 22px; }
.pf-pp-nav > .ti:last-child { margin-left: auto; }
.pf-pp-nav-text { display: flex; flex-direction: column; min-width: 0; }
.pf-pp-nav .pf-pp-title { font-size: var(--fs-md); }
.pf-pp-nav-sub { font-size: var(--fs-xs); color: var(--df-ink-soft); }

/* Settings in the top bar: icon plus word, as on the approved screen. */
#profile-screen .pf-topbar-settings { gap: var(--sp-xs); padding: 0 var(--sp-sm); font-size: var(--fs-sm); font-weight: 600; }

/* Edit profile modal (#5248) — a bottom sheet below 680px via .modal. One
   Save; the photo is staged until then. */
.pf-edit-modal { max-height: 90vh; max-height: 90dvh; overflow-y: auto; }
.pf-edit-modal .pf-unsaved { display: none; }
.pf-edit-photo-row { display: flex; align-items: center; gap: var(--sp-md); margin-bottom: var(--sp-md); }
.pf-edit-print { flex: none; width: 96px; height: 104px; }
.pf-edit-photo-actions { min-width: 0; }
.pf-edit-photo-actions .pf-hint { margin: var(--sp-xs) 0 0; }
.pf-edit-photo-btn { min-height: var(--tap-min); }
.pf-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-sm); }
.pf-counter { font-size: var(--fs-xs); color: var(--df-ink-soft); font-variant-numeric: tabular-nums; }
.pf-counter.pf-counter-over { color: var(--error-text); font-weight: 600; }
.pf-readonly-field { position: relative; }
.pf-readonly-field input[readonly] { width: 100%; padding-right: 44px; border-style: dashed; background: transparent; color: var(--df-ink-soft); cursor: default; }
.pf-readonly-field i { position: absolute; right: var(--sp-sm); top: 50%; transform: translateY(-50%); color: var(--df-ink-soft); pointer-events: none; }
.pf-saved-status { margin: var(--sp-xs) 0 0; }

/* #5249: What others see switches + the preview. On = Trail Green with --df-brand-fg knob (Mint Flip Rule); 44px target via ::before. */
.pf-switch-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm); padding: var(--sp-sm) 0; border-top: 2px dashed var(--df-ink-soft); }
.pf-switch-row:first-child { border-top: 0; }
.pf-switch-text { display: flex; flex-direction: column; min-width: 0; }
.pf-switch-label { font-weight: 600; }
.pf-switch-desc { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.pf-switch { position: relative; flex-shrink: 0; width: 52px; height: 30px; padding: 0; border: 2px solid var(--df-ink); border-radius: 15px; background: var(--df-panel); cursor: pointer; transition: background var(--dur-state) var(--ease-out); }
.pf-switch::before { content: ''; position: absolute; inset: 50% auto auto 50%; width: max(var(--tap-min), 100%); height: max(var(--tap-min), 100%); transform: translate(-50%, -50%); }
.pf-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--df-ink); transition: transform var(--dur-state) var(--ease-out), background var(--dur-state) var(--ease-out); }
.pf-switch[aria-checked="true"] { background: var(--df-brand); }
.pf-switch[aria-checked="true"]::after { transform: translateX(22px); background: var(--df-brand-fg); }
/* #5874 Press: the thumb leans into the touch (transform only), then Settles to its seat. */
.pf-switch:active::after { transform: scaleX(1.25); }
.pf-switch[aria-checked="true"]:active::after { transform: translateX(22px) scaleX(1.25); }
.pf-switch:focus-visible { outline: 2px solid var(--df-brand); outline-offset: 2px; }
.pf-switch:disabled { opacity: 0.6; cursor: progress; }
.pf-seg-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm); margin-bottom: var(--sp-sm); }
.pf-seg-label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--df-ink-soft); }
.pf-prev-frame { border: 2px dashed var(--df-ink); border-radius: var(--df-radius-stub); padding: var(--sp-sm); margin-bottom: var(--sp-sm); min-height: 120px; }
/* #5282: the full-screen "What others see" page. The card is the public page: tilted print avatar with tape, handle · countries, bio, then stamp-style tiles. */
.pf-others-page { display: flex; flex-direction: column; gap: var(--sp-md); max-width: 640px; padding-bottom: var(--sp-lg); }
.pf-others-title { display: flex; align-items: center; gap: var(--sp-sm); }
.pf-others-back { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap-min); min-height: var(--tap-min); padding: 0; background: none; border: 0; color: var(--df-ink); font-size: var(--fs-xl); cursor: pointer; }
.pf-others-h { margin: 0; font-family: var(--df-sans); font-weight: 600; font-size: var(--fs-2xl); line-height: 1.15; }
.pf-others-page .pf-seg-row { margin: 0; }
.pf-others-page .pf-prev-frame { margin: 0; }
.pf-switch-heading { margin: 0 0 var(--sp-xs); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--df-ink-soft); }
.pf-others-foot { margin: 0; }
.pf-prev-card { border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub); background: var(--df-panel); padding: var(--sp-md); display: flex; flex-direction: column; gap: var(--sp-sm); }
.pf-prev-head { display: flex; align-items: center; gap: var(--sp-md); }
.pf-prev-print { position: relative; flex: none; width: 76px; height: 82px; display: flex; align-items: center; justify-content: center; overflow: visible; transform: rotate(-3deg); background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-print); box-shadow: var(--df-press-hover); }
.pf-prev-print img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.pf-prev-tape { position: absolute; top: -8px; left: 50%; width: 34px; height: 14px; transform: translateX(-50%) rotate(4deg); background: color-mix(in srgb, var(--df-ink-soft) 35%, transparent); }
.pf-prev-initial { font-family: var(--df-display); font-weight: 800; font-size: var(--fs-2xl); color: var(--df-ink-soft); }
.pf-prev-who { min-width: 0; }
.pf-prev-name { font-family: var(--df-title); font-weight: 700; font-size: var(--fs-xl); line-height: 1.15; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.pf-prev-handle { margin-top: var(--sp-xs); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--df-ink-soft); }
.pf-prev-bio { margin: 0; }
.pf-prev-rule { border-top: 2px dashed var(--df-ink-soft); }
.pf-prev-tiles { display: flex; flex-wrap: wrap; gap: var(--sp-xs); }
.pf-prev-tile { max-width: 100%; padding: 2px var(--sp-xs); transform: rotate(var(--pf-tilt, -2deg)); border: 2px solid var(--df-coral); border-radius: var(--df-radius-print); color: var(--df-coral); font-family: var(--df-display); font-weight: 800; font-size: var(--fs-sm); text-transform: uppercase; overflow-wrap: anywhere; }
.pf-prev-note { margin: 0; font-size: var(--fs-xs); color: var(--df-ink-soft); display: flex; align-items: center; gap: var(--sp-xs); }

/* #5250 — Settings sections: Account row, collapsed password form, App rows, Sign out. */
.pf-email-row { display: flex; align-items: center; gap: var(--sp-sm); flex-wrap: wrap; }
.pf-email-row input { flex: 1 1 14rem; min-width: 0; }
.pf-account-row { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-sm); align-items: end; }
#profile-screen .profile-page-form > section.pf-pw-collapsed { display: none; }
.pf-app-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm); flex-wrap: wrap; padding: var(--sp-sm) 0; border-top: 2px dashed var(--df-ink-soft); }
.pf-app-row:first-of-type { border-top: 0; }
.pf-app-label { display: flex; flex-direction: column; font-weight: 600; }
.pf-app-label .pf-hint { font-weight: 400; margin: 0; }
#profile-screen .pf-app-row .theme-toggle { flex: none; border: 2px solid var(--df-ink); background: var(--df-panel); }
#profile-screen .pf-app-row .theme-toggle-btn { flex: none; padding: 0 var(--sp-md); font: inherit; font-weight: 600; color: var(--df-ink); }
#profile-screen .pf-app-row .theme-toggle-btn.sel { background: var(--selected-bg); color: var(--on-selected); }
.pf-signout-btn { margin-bottom: var(--sp-md); }

/* #5250 — Settings, from the design-check: two-up selects, compact green Save, plain Account row, buttons keep their width in switch rows. */
.pf-two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-sm); }
.pf-two-col .form-label { margin-top: 0; }
@media (max-width: 680px) { .pf-two-col { grid-template-columns: 1fr; } }
.pf-account-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pf-account-row .ui-btn { width: auto; justify-self: start; }
.pf-save-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-sm); }
.pf-save-row .pf-hint { margin: 0; }
#profile-screen .pf-save-row .pf-save-primary { width: auto; margin: 0; background: var(--df-brand); color: var(--df-brand-fg); }
#profile-screen .consent-row .ui-btn { width: auto; flex: none; margin: 0; }
#profile-screen .profile-page-form > section .pf-hint { margin-bottom: var(--sp-md); }

/* #5293 (slice 3 of #5289) — the boarding-pass search. Everything here is the
   desktop frame: below 1024px the ticket, the lede, Popular now and the sort
   button stay hidden and the header, search and filter sheet are unchanged. */
.discover-ticket,
.discover-feed-lede,
.discover-popular,
.discover-sort-wrap { display: none; }

@media (min-width: 1024px) {
  #discover-screen .discover-feed-head { display: block; margin-bottom: var(--space-3xl); }
  #discover-screen .discover-feed-headline { margin: 0 0 var(--space-md); font-size: 4rem; }
  .discover-feed-lede {
    display: block;
    margin: var(--space-xl) 0 var(--space-3xl);
    font-family: var(--df-sans);
    font-size: var(--fs-md);
    color: var(--df-ink-soft);
  }

  .discover-ticket {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) auto;
    align-items: stretch;
    background: var(--df-panel);
    border: 2px solid var(--df-ink);
    border-radius: var(--df-radius-card);
    margin-bottom: var(--space-2xl);
  }
  .discover-ticket-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    padding: var(--space-lg) var(--space-2xl);
    border-right: 2px dashed var(--df-ink);
  }
  .discover-ticket-eyebrow {
    font-family: var(--df-sans);
    font-weight: 700;
    font-size: var(--fs-xs);
    line-height: 1.3;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--df-ink-soft);
  }
  .discover-ticket-where-box { display: flex; align-items: center; gap: var(--space-md); min-height: var(--tap-min); }
  .discover-ticket-where-box i { font-size: var(--fs-lg); color: var(--df-ink); }
  .discover-ticket-where-box input {
    flex: 1;
    min-width: 0;
    height: var(--tap-min);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    font-family: var(--df-sans);
    font-size: var(--fs-md);
    color: var(--df-ink);
  }
  .discover-ticket-where-box input::placeholder { color: var(--df-ink-soft); }
  .discover-ticket-where-box input:focus { outline: none; box-shadow: none; }
  .discover-ticket-where:focus-within { box-shadow: inset 0 0 0 3px var(--df-brand); border-radius: calc(var(--df-radius-card) - 2px) 0 0 calc(var(--df-radius-card) - 2px); }

  .discover-ticket-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    min-height: var(--tap-min);
    padding: 0;
    border: 0;
    background: none;
    color: var(--df-ink);
    font-family: var(--df-sans);
    font-size: var(--fs-md);
    text-align: left;
    cursor: pointer;
  }
  .discover-ticket-field:focus-visible,
  .discover-sort-btn:focus-visible,
  .discover-popular-link:focus-visible,
  .discover-ticket-opt:focus-visible,
  .discover-ticket-search:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 2px; }
  .discover-ticket-val { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .discover-ticket-go { display: flex; align-items: center; padding: var(--space-lg) var(--space-2xl); }
  .discover-ticket-search {
    min-height: 56px;
    padding: 0 var(--space-5xl, 40px);
    background: var(--df-brand);
    color: var(--df-brand-fg);
    border: 2px solid var(--df-ink);
    border-radius: var(--radius-pill);
    font-family: var(--df-sans);
    font-size: var(--fs-lg);
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--dur-feedback) var(--ease-out);
  }
  .discover-ticket-search:hover { transform: translate(2px, 2px); }
  .discover-ticket-search:active { transform: translate(4px, 4px); }

  .discover-ticket-pop {
    position: absolute;
    z-index: 20;
    top: calc(100% + var(--space-md));
    left: 0;
    min-width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs, 4px);
    padding: var(--space-md);
    background: var(--df-panel);
    border: 2px solid var(--df-ink);
    border-radius: var(--df-radius-stub);
  }
  .discover-ticket-pop[hidden] { display: none; }
  .discover-ticket-opt {
    min-height: var(--tap-min);
    padding: 0 var(--space-xl);
    border: 0;
    border-radius: var(--radius-pill);
    background: none;
    color: var(--df-ink);
    font-family: var(--df-sans);
    font-size: var(--fs-sm);
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
  }
  .discover-ticket-opt:hover { background: color-mix(in srgb, var(--df-ink) 8%, transparent); }
  .discover-ticket-opt.selected { background: var(--df-ink); color: var(--df-panel); font-weight: 600; }

  /* The control row under the ticket: Popular now left, sort / Saved / layout right. */
  #discover-screen .discover-search-row { flex-wrap: nowrap; margin-bottom: 0; }
  #discover-screen .discover-search-input,
  #discover-screen #discover-filter-btn,
  #discover-screen .discover-sort-label { display: none; }
  #discover-screen .discover-view-toggle { margin-left: 0; }
  .discover-popular { display: flex; align-items: center; gap: var(--space-md); font-family: var(--df-sans); font-size: var(--fs-xs); color: var(--df-ink-soft); }
  .discover-popular[style*="display: none"] { display: none; }
  #discover-popular-links { display: inline-flex; flex-wrap: wrap; gap: 0 var(--space-lg); }
  .discover-popular-link {
    min-height: var(--tap-min);
    padding: 0 2px;
    border: 0;
    background: none;
    color: var(--df-ink);
    font-family: var(--df-sans);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
  }
  .discover-sort-wrap { display: block; position: relative; flex-shrink: 0; margin-left: auto; }
  #discover-screen .discover-search-row .discover-saved-toggle { border-color: transparent; background: none; box-shadow: none; transform: none; }
  #discover-screen .discover-search-row .discover-saved-toggle.active { background: var(--df-ink); border-color: var(--df-ink); color: var(--on-selected); }
  .discover-sort-wrap[style*="display: none"] { display: none; }
  .discover-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    min-height: var(--tap-min);
    padding: 0 var(--space-xl);
    border: 0;
    background: none;
    color: var(--df-ink);
    font-family: var(--df-sans);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
  }
  .discover-sort-pop { left: auto; right: 0; min-width: 160px; }
}

/* #5296 (slice 7 of #5289) — the post page from 1024px: two columns (7:5) on
   Home's margin. Left, the cover as an instant print (wider foot, two tape strips,
   a slight tilt, the Lift shadow) with arrows and a thumbnail strip; right, the
   place eyebrow, the title at Headline tier, the author, Like / Save / Report, the
   author's words, the boarding-pass stub and the comments card. More cards run
   full width below. Below 1024px the arrows, thumbnails, month, labels, Report
   button, stub and city link are display:none and the phone page is unchanged. */
.dpost-back, .dpost-arrow, .dpost-thumbs, .dpost-place-month, .dpost-act-label, .dpost-report, .dpost-pass, .dpost-city-more { display: none; }
.dpost-page .dpost-pad { padding-bottom: var(--space-lg); }
.dpost-more-wrap { padding: 0 var(--space-3xl) var(--space-4xl); }
.dpost-more-wrap .dpost-more { margin-top: var(--space-xl); }
@media (min-width: 1024px) {
  #shared-trip-screen:has(.dpost-page) #shared-trip-report-btn { visibility: hidden !important; }
  #shared-trip-screen .discover-body:has(.dpost-page) { padding: var(--space-3xl) var(--screen-side-pad) 0; }
  #shared-trip-screen .dpost-page {
    --dpost-tape: light-dark(rgba(186, 117, 23, 0.42), rgba(232, 163, 61, 0.28));
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-rows: auto auto auto 1fr auto;
    column-gap: 56px;
    align-content: start;
    max-width: none;
    margin: 0;
    padding: 0;
  }
  .dpost-page .dpost-back {
    grid-column: 1 / -1; grid-row: 1; justify-self: start; display: inline-flex; align-items: center; gap: var(--space-sm);
    min-height: var(--tap-min); margin-bottom: var(--space-md); padding: 0; border: 0; background: none;
    color: var(--df-ink); font: inherit; font-weight: 600; cursor: pointer;
  }
  .dpost-page .dpost-hero { display: contents; }
  .dpost-page .dpost-hero::after, .dpost-page .dpost-stamp { display: none; }

  /* Left: the print and its thumbnails. */
  .dpost-page .dpost-left { grid-column: 1; grid-row: 2 / 5; min-width: 0; padding-top: var(--space-md); }
  .dpost-page .dpost-print {
    position: relative;
    padding: 10px 10px 34px;
    background: var(--df-instant-stock);
    border-radius: var(--df-radius-print);
    box-shadow: var(--df-press-lift);
    transform: rotate(-1.2deg);
  }
  .dpost-page .dpost-print::before, .dpost-page .dpost-print::after {
    content: ''; position: absolute; top: -10px; z-index: 2; width: 92px; height: 26px;
    background: var(--dpost-tape); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  }
  .dpost-page .dpost-print::before { left: 5%; transform: rotate(-4deg); }
  .dpost-page .dpost-print::after { right: 5%; transform: rotate(3.4deg); }
  .dpost-page .dpost-gallery { aspect-ratio: 4 / 3; max-height: none; background: var(--df-ink); }
  .dpost-page .dpost-counter { top: 22px; right: 22px; }
  .dpost-page .dpost-tag { top: 22px; left: 22px; }
  .dpost-page .dpost-arrow {
    position: absolute; top: 50%; z-index: 2; display: inline-flex; align-items: center; justify-content: center;
    width: var(--tap-min); height: var(--tap-min); margin-top: -30px; padding: 0;
    border: 2px solid var(--df-ink); border-radius: 50%; background: var(--df-instant-stock); color: var(--df-ink);
    box-shadow: var(--df-press); font-size: 18px; cursor: pointer;
  }
  .dpost-page .dpost-arrow:hover { box-shadow: var(--df-press-hover); }
  .dpost-page .dpost-arrow:active { box-shadow: none; transform: translate(2px, 2px); }
  .dpost-page .dpost-arrow-prev { left: 28px; }
  .dpost-page .dpost-arrow-next { right: 28px; }
  .dpost-page .dpost-thumbs { display: flex; flex-wrap: wrap; gap: var(--space-lg); margin-top: var(--space-3xl); }
  .dpost-page .dpost-thumb {
    flex: none; width: 76px; height: 56px; min-height: var(--tap-min); padding: 0; overflow: hidden;
    border: 2px solid var(--df-ink); border-radius: 4px; background: var(--df-ink); cursor: pointer;
  }
  .dpost-page .dpost-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .dpost-page .dpost-thumb.is-active { outline: 3px solid var(--vn-green); outline-offset: 1px; }

  /* Right: the eyebrow, the title, then the pad. */
  .dpost-page .dpost-hero-text { position: static; grid-column: 2; grid-row: 2; display: flex; flex-direction: column; padding: var(--space-md) 0 0; color: var(--df-ink); }
  .dpost-page .dpost-title {
    font-family: var(--df-display); font-size: clamp(2rem, 5.4vw, 3.125rem); font-weight: 800;
    line-height: 0.98; letter-spacing: -0.03em; text-transform: uppercase; color: var(--df-ink);
  }
  .dpost-page .dpost-place {
    order: -1; margin: 0 0 var(--space-lg); color: var(--df-ink); flex-wrap: wrap;
    font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  }
  .dpost-page .dpost-place > i { display: none; }
  .dpost-page .dpost-place-month { display: inline; }
  .dpost-page .dpost-place-month:not(:first-child)::before { content: '\00a0·\00a0'; }
  .dpost-page .dpost-pad { grid-column: 2; grid-row: 3; padding: var(--space-2xl) 0 0; gap: var(--space-xl); min-width: 0; }
  .dpost-page .dpost-author { order: 1; }
  .dpost-page .dpost-foot { order: 2; justify-content: flex-start; gap: var(--space-lg); padding: 0; border-top: 0; }
  .dpost-page .dpost-facts, .dpost-page .dpost-count-static, .dpost-page .dpost-card-raised { display: none; }
  .dpost-page .dpost-counts { gap: var(--space-lg); }
  .dpost-page .dpost-counts .discover-like-btn, .dpost-page .dpost-counts .discover-save-btn {
    gap: var(--space-sm); min-height: var(--tap-min); padding: 0 var(--space-2xl);
    border: 2px solid var(--df-ink); border-radius: 999px; background: var(--df-panel); color: var(--df-ink);
    box-shadow: var(--df-press); font-weight: 400;
  }
  .dpost-page .dpost-counts .discover-like-btn:hover, .dpost-page .dpost-counts .discover-save-btn:hover { box-shadow: var(--df-press-hover); }
  .dpost-page .dpost-counts .discover-like-btn:active, .dpost-page .dpost-counts .discover-save-btn:active { box-shadow: none; transform: translate(2px, 2px); }
  .dpost-page .dpost-counts .active { background: var(--df-ground); }
  .dpost-page .dpost-act-label { display: inline; }
  .dpost-page .dpost-act-label::after { content: '\00a0·'; }
  .dpost-page .dpost-report {
    display: inline-flex; align-items: center; gap: var(--space-sm); min-height: var(--tap-min); padding: 0 var(--space-md);
    border: 0; background: none; color: var(--df-ink); font: inherit; font-weight: 600; cursor: pointer;
  }
  .dpost-page .dpost-words { order: 3; max-width: none; font-size: var(--fs-sm, 1rem); line-height: 1.7; }

  /* The boarding-pass stub. */
  .dpost-page .dpost-pass {
    order: 4; display: block; position: relative; overflow: hidden;
    border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub); background: var(--df-panel);
  }
  .dpost-page .dpost-pass-top { padding: var(--space-2xl) var(--space-2xl) var(--space-xl); }
  .dpost-page .dpost-pass-label { display: block; font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--df-ink-soft); }
  .dpost-page .dpost-pass-name { margin: var(--space-md) 0 var(--space-2xl); font-family: var(--df-title); font-size: var(--fs-xl, 1.5rem); font-weight: 700; line-height: 1.15; color: var(--df-ink); }
  .dpost-page .dpost-pass-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-lg); }
  .dpost-page .dpost-pass-num { display: block; margin-top: var(--space-xs); font-family: var(--df-display); font-size: var(--fs-2xl); font-weight: 800; line-height: 1; color: var(--df-ink); }
  .dpost-page .dpost-pass-tear { position: relative; height: 0; border-top: 2px dashed var(--df-ink); }
  .dpost-page .dpost-pass-tear::before, .dpost-page .dpost-pass-tear::after {
    content: ''; position: absolute; top: -11px; width: 20px; height: 20px; box-sizing: border-box;
    border: 2px solid var(--df-ink); border-radius: 50%; background: var(--df-ground);
  }
  .dpost-page .dpost-pass-tear::before { left: -11px; }
  .dpost-page .dpost-pass-tear::after { right: -11px; }
  .dpost-page .dpost-pass-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); padding: var(--space-xl) var(--space-2xl); }
  .dpost-page .dpost-pass-cities { min-width: 0; font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft); }
  .dpost-page .dpost-pass-go {
    flex: none; width: auto; margin: 0; min-height: var(--tap-min); padding: 0 var(--space-2xl);
    border: 2px solid var(--df-ink); border-radius: 999px; background: var(--vn-trail-green); color: var(--df-panel);
    box-shadow: var(--df-press); font-family: var(--df-sans); font-weight: 600; cursor: pointer;
  }
  .dpost-page .dpost-pass-go:hover { background: var(--vn-trail-green-mid); box-shadow: var(--df-press-hover); }
  .dpost-page .dpost-pass-go:active { box-shadow: none; transform: translate(2px, 2px); }

  /* A stop post's "From the trip" sits where the stub does; the comments card follows. */
  .dpost-page .dpost-card { background: var(--df-panel); box-shadow: var(--df-press); }
  .dpost-page .dpost-card:hover { box-shadow: var(--df-press-hover); }
  .dpost-page .dpost-card[href] { order: 4; }
  .dpost-page #dpost-comments-slot { order: 5; }
  .dpost-page .dpost-city-more {
    order: 6; display: inline-flex; align-items: center; align-self: flex-start; min-height: var(--tap-min);
    font-weight: 600; color: var(--vn-green); text-decoration: underline; text-underline-offset: 3px;
  }
  .dpost-page .dpost-action { position: static; grid-column: 2; grid-row: 4; align-self: start; margin: 0; padding: var(--space-2xl) 0 0; background: none; border-top: 0; }
  .dpost-page .dpost-action-btn { width: auto; padding: 0 var(--space-3xl); }

  /* Below: more cards, full width, four across. */
  .dpost-page .dpost-more-wrap { grid-column: 1 / -1; grid-row: 5; padding: 0 0 var(--space-4xl); }
  .dpost-page .dpost-more-wrap .dpost-more { margin-top: 72px; }
  .dpost-page .dpost-more-title { font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--df-ink-soft); }
  .dpost-page .dpost-more-wrap .discover-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .dpost-page .dpost-more-wrap .discover-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* #5297 (slice 8 of #5289) — the itinerary from 1024px: the route down the left, one
   sticky rail on the right (the map card, Start my trip from this, then Where to stay,
   Budget guide and Before you go). The header becomes the stamp, the trip and Save /
   Share. Below 1024px the rail is display:contents and the desktop-only pieces are
   hidden, so the phone page is unchanged. */
.dpost-rail { display: contents; }
.dpost-rail-start, .dpost-stub-actions, .dpost-stub-stops, .dpost-map-label { display: none; }
@media (min-width: 1024px) {
  #shared-trip-screen .discover-body:has(.dpost-itin) { padding: var(--space-3xl) var(--screen-side-pad) var(--space-4xl); }
  .dpost-itin { display: block; min-height: 0; max-width: none; margin: 0; }
  .dpost-itin .dpost-pad {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 400px); column-gap: 48px; align-items: start;
    padding: 0; gap: 0 48px;
  }
  .dpost-itin .dpost-action, .dpost-itin #dpost-map-toggle { display: none; }
  .dpost-itin #dpost-route[hidden], .dpost-itin #dpost-map-panel[hidden] { display: block; }

  /* Header: the stamp word, the trip, Save and Share. */
  .dpost-itin .dpost-stub {
    grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: var(--space-4xl);
    align-items: center; margin-bottom: var(--space-4xl); padding: var(--space-3xl) var(--space-4xl); background: var(--df-panel);
  }
  .dpost-itin .dpost-stub .dtl-stampline { grid-column: 1; grid-row: 1 / span 4; margin: 0; padding: 0; }
  .dpost-itin .dpost-stub .dtl-stamp { font-size: clamp(var(--fs-2xl), 4.4vw, var(--fs-display-46)); }
  .dpost-itin .dpost-stub-place { grid-column: 2; margin: 0; font-size: var(--fs-xs); letter-spacing: 0.1em; text-transform: uppercase; }
  .dpost-itin .dpost-stub-place > i { display: none; }
  .dpost-itin .dpost-stub-name { grid-column: 2; margin-top: var(--space-xs); font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.02em; }
  .dpost-itin .dpost-stub-host { grid-column: 2; margin-top: var(--space-sm); display: inline-flex; width: fit-content; }
  .dpost-itin .dpost-stub-foot { grid-column: 2; grid-row: 4; justify-content: flex-start; gap: var(--space-xl); margin-top: var(--space-xs); padding-top: 0; border-top: 0; font-weight: 400; color: var(--df-ink-soft); }
  .dpost-itin .dpost-stub-stops { display: inline; }
  .dpost-itin .dpost-stub-days, .dpost-itin .dpost-stub-counts { font-size: var(--fs-xs); }
  .dpost-itin .dpost-stub-actions { grid-column: 3; grid-row: 1 / span 4; display: flex; align-items: center; gap: var(--space-xl); }
  .dpost-itin .dpost-stub-save, .dpost-itin .dpost-stub-share {
    display: inline-flex; align-items: center; gap: var(--space-sm); min-height: var(--tap-min); padding: 0 var(--space-2xl);
    border: 2px solid var(--df-ink); border-radius: 999px; background: var(--df-panel); color: var(--df-ink);
    font: inherit; font-weight: 600; cursor: pointer;
  }
  .dpost-itin .dpost-stub-save { box-shadow: var(--df-press); }
  .dpost-itin .dpost-stub-share { border-color: transparent; background: none; }
  .dpost-itin .dpost-stub-save.active { background: var(--df-ink); color: var(--df-ground); }

  /* Left: the route. */
  .dpost-itin #dpost-route { grid-column: 1; grid-row: 2; min-width: 0; }
  .dpost-itin .dpost-days { margin-top: 0; }
  .dpost-itin #dpost-comments-slot { grid-column: 1 / -1; grid-row: 3; margin-top: var(--space-4xl); }
  .dpost-itin .discover-detail-day { --dtl-pin-size: 46px; padding-bottom: var(--space-4xl); }
  .dpost-itin .discover-detail-day-label { font-size: var(--fs-xl, 1.75rem); font-weight: 800; }
  .dpost-itin .dpost-stop-row { align-items: flex-start; gap: var(--space-xl); padding: var(--space-lg) 0; border-bottom: 2px dashed color-mix(in srgb, var(--df-ink) 22%, transparent); }
  .dpost-itin .dpost-section > .dpost-stop-row:last-child { border-bottom: 0; }
  .dpost-itin .dpost-stop-tile { width: 72px; height: 72px; border-radius: 2px; }
  .dpost-itin .dpost-stop-note { font-size: var(--fs-xs); }
  .dpost-itin .dpost-stop-dot { width: 10px; height: 10px; }

  /* Right: the sticky rail. */
  .dpost-itin .dpost-rail {
    grid-column: 2; grid-row: 2; display: flex; flex-direction: column; gap: var(--space-2xl); min-width: 0;
    position: sticky; top: var(--space-xl); align-self: start;
    max-height: calc(100dvh - 2 * var(--space-xl)); overflow-y: auto; padding: 2px 6px 8px 2px; margin: -2px -6px -8px -2px;
  }
  .dpost-itin .dpost-rail > * { flex: none; }
  .dpost-itin .dpost-rail-start { display: block; }
  .dpost-itin .dpost-rail-start .dpost-action-btn { width: 100%; min-height: 56px; border-radius: 999px; font-size: var(--fs-sm); }
  .dpost-itin .dpost-rail .dpost-sec {
    margin: 0; padding: var(--space-2xl); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub, 12px);
    background: var(--df-panel);
  }
  .dpost-itin .dpost-rail .dpost-sec-title {
    margin: 0 0 var(--space-lg); font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase; color: var(--df-ink-soft);
  }

  /* The map card: label and the day picker over the canvas. */
  .dpost-itin .dpost-map {
    position: relative; overflow: hidden; border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub, 12px);
    background: var(--df-panel);
  }
  .dpost-itin #dpost-map-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: var(--space-md) var(--space-lg); }
  .dpost-itin .dpost-map-label { display: inline; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft); }
  .dpost-itin .dpost-map-chips[aria-label="Day"] {
    padding: 3px; gap: 0; border: 2px solid var(--df-ink); border-radius: 999px; background: var(--df-ground); overflow: visible;
  }
  .dpost-itin .dpost-map-chips[aria-label="Category"] { display: none; }
  .dpost-itin .dpost-map-chips[aria-label="Day"] .dpost-map-chip { border: 0; border-radius: 999px; background: transparent; font-weight: 800; }
  .dpost-itin .dpost-map-chips[aria-label="Day"] .dpost-map-chip.is-active { background: var(--vn-green); color: #fff; }
  .dpost-itin .dpost-map-chip-pre { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .dpost-itin #dpost-map-controls > .dpost-map-note { flex-basis: 100%; margin: 0; }
  .dpost-itin .dpost-map-canvas { height: 320px; margin: 0; border: 0; border-top: 2px solid var(--df-ink); border-radius: 0; }
  .dpost-itin .dpost-map-message, .dpost-itin #dpost-map-unlocated { padding: 0 var(--space-lg) var(--space-md); }
}

/* ── Public-page moments (#5873) ───────────────────────────
   One Strike per page, each played once on a real arrival: JS adds
   .is-struck after the first render and removes it again (a block, an
   unblock or any other re-render must not replay it). Hidden start states
   live behind no-preference, so a reader who opted out sees the finished
   state and the page never depends on JS to un-hide anything. */
@media (prefers-reduced-motion: no-preference) {
  .dcity-name.is-struck { transform-origin: left center; animation: dcity-strike var(--dur-strike) var(--ease-slam) both; }
  .up-avatar.is-struck { animation: up-print-strike var(--dur-strike) var(--ease-slam) both; }
}
@keyframes dcity-strike {
  0%   { opacity: 0; transform: scale(1.5); }
  55%  { opacity: 1; transform: scale(0.96); }
  78%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}
/* The avatar print is set down at its own resting tilt (-3deg). */
@keyframes up-print-strike {
  0%   { opacity: 0; transform: rotate(-9deg) scale(1.5); }
  55%  { opacity: 1; transform: rotate(-3deg) scale(0.95); }
  78%  { transform: rotate(-3deg) scale(1.025); }
  100% { transform: rotate(-3deg) scale(1); }
}

/* ── Friends page (#6499, epic #6359, direction A "Crew roster"; boards docs/design/friends/) ──
   #friends-screen is a top-level screen like #stamps-screen: same shell, ground set in style.css.
   Cards are Cut Stock with the ink keyline and Press shadow; roster and request rows are
   dashed-rule rows inside one card. The "FRIENDS" shout is the screen's one loud element. */
#friends-screen {
  display: none;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  color: var(--df-ink);
  font-family: var(--df-sans);
}
@media (min-width: 1024px) {
  /* S18 / A1: the boards run the page at its 1200px cap with a slim margin, not the 880px column the other screens share. */
  #friends-screen .discover-body { padding-inline: 64px; }
}
.friends-page { width: 100%; max-width: 1200px; margin-inline: auto; display: flex; flex-direction: column; gap: var(--space-lg); padding-bottom: var(--space-4xl, 48px); }
.friends-back {
  align-self: flex-start; display: inline-flex; align-items: center; gap: var(--space-xs);
  min-height: var(--tap-min); padding: 0 var(--space-lg) 0 var(--space-md);
  background: var(--df-panel); color: var(--df-ink); border: 2px solid var(--df-ink); border-radius: 999px;
  box-shadow: var(--df-press); font: inherit; font-weight: 600; cursor: pointer;
}
.friends-back:hover { box-shadow: var(--df-press-hover); transform: translate(2px, 2px); }
.friends-back:active { box-shadow: var(--df-press-active); transform: translate(4px, 4px); }
.friends-back:focus-visible, .friends-row:focus-visible, .friends-link-btn:focus-visible, .friends-foot-link:focus-visible { outline: 2px solid var(--df-ink); outline-offset: 2px; }
.friends-head { display: flex; align-items: baseline; gap: var(--space-md); }
.friends-shout { margin: 0; font-family: var(--df-display); font-weight: 800; font-size: clamp(40px, 9vw, 56px); line-height: 0.95; letter-spacing: -0.04em; text-transform: uppercase; }
.friends-count { font-family: var(--df-display); font-weight: 800; font-size: var(--fs-lg); color: var(--df-ink-soft); font-variant-numeric: tabular-nums; }

.friends-cols { display: flex; flex-direction: column; gap: var(--space-xl); }
.friends-col { display: flex; flex-direction: column; gap: var(--space-xl); min-width: 0; }
@media (min-width: 1024px) {
  .friends-cols { display: grid; grid-template-columns: 392px minmax(0, 1fr); align-items: start; gap: 32px; }
}
/* Phone: the search field leads, then the requests (A3). Desktop keeps requests above Find people. */
.friends-requests-card { order: 2; }
.friends-find-card { order: 1; }
@media (min-width: 1024px) {
  .friends-requests-card { order: 0; }
  .friends-find-card { order: 1; }
}

.friends-card {
  background: var(--df-panel); color: var(--df-ink);
  border: 2px solid var(--df-ink); border-radius: var(--df-radius-card);
  box-shadow: var(--df-press-large); overflow: hidden;
}
.friends-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: var(--space-lg) var(--space-xl); }
.friends-card-title { margin: 0; font-family: var(--df-title); font-weight: 600; font-size: var(--fs-lg); line-height: 1.15; letter-spacing: -0.02em; }
.friends-card > .friends-card-title { padding: var(--space-lg) var(--space-xl) var(--space-sm); }
/* The Friend requests header is one button: title left, count and chevron right (#6807). */
.friends-card > .friends-requests-h { padding: 0; }
.friends-requests-head { width: 100%; min-height: var(--tap-min); background: none; border: 0; border-radius: inherit; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.friends-requests-meta { display: inline-flex; align-items: center; gap: var(--space-sm); }
.friends-requests-chev { font-size: var(--fs-md); color: var(--df-ink-soft); }
.friends-requests-head[aria-expanded="false"] .friends-requests-chev { transform: rotate(-90deg); }
.friends-card-count { font-weight: 700; font-size: var(--fs-xs); color: var(--df-ink-soft); font-variant-numeric: tabular-nums; }
.friends-badge {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px;
  background: var(--df-amber); color: var(--df-amber-fg); border: 2px solid var(--df-ink);
  font-weight: 700; font-size: var(--fs-xs); font-variant-numeric: tabular-nums;
}

.friends-avatar {
  flex: none; display: inline-grid; place-items: center; overflow: hidden;
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--df-ink);
  background: var(--df-ground); color: var(--df-ink); font-weight: 700; font-size: var(--fs-xs);
}
.friends-avatar-sm { width: 32px; height: 32px; font-size: var(--fs-xs); }
.friends-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.friends-who-text { display: flex; flex-direction: column; min-width: 0; flex: 1; text-align: left; }
.friends-who-text b { font-weight: 600; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friends-who-text > span { color: var(--df-ink-soft); font-size: var(--fs-xs); overflow-wrap: anywhere; }

.friends-row {
  display: flex; align-items: center; gap: var(--space-md); width: 100%; min-height: var(--tap-min);
  padding: var(--space-md) var(--space-xl); background: none; border: 0; border-top: 1.5px dashed var(--df-hair);
  color: inherit; font: inherit; text-align: left;
}
.friends-card > .friends-row:first-child { border-top: 0; }
.friends-roster-row { cursor: pointer; }
.friends-roster-row:hover { background: var(--df-chip-fill); }
.friends-roster-row .friends-who-text b { font-size: var(--fs-md); }
.friends-roster-row > .ti { color: var(--df-ink-soft); font-size: 18px; }
.friends-who { display: flex; align-items: center; gap: var(--space-md); flex: 1; min-width: 0; padding: 0; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }

.friends-request { padding: var(--space-lg) var(--space-xl); border-top: 1.5px dashed var(--df-hair); display: flex; flex-direction: column; gap: var(--space-md); }
.friends-request-who { display: flex; align-items: center; gap: var(--space-md); }
.friends-request-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.friends-request-actions .btn-primary, .friends-request-actions .btn-secondary { min-height: var(--tap-min); width: 100%; justify-content: center; }
.friends-waiting { background: var(--df-chip-fill); border-top: 2px solid var(--df-ink); padding: var(--space-md) var(--space-xl); }
.friends-waiting-label { font-weight: 700; font-size: var(--fs-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft); margin-bottom: var(--space-sm); }
.friends-waiting-row { display: flex; align-items: center; gap: var(--space-sm); min-height: var(--tap-min); }
.friends-waiting-who { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.friends-waiting-who span { color: var(--df-ink-soft); }
.friends-link-btn { min-height: var(--tap-min); padding: 0 var(--space-sm); background: none; border: 0; color: var(--df-ink); font: inherit; font-weight: 600; cursor: pointer; }

.friends-search { display: flex; align-items: center; gap: var(--space-sm); margin: 0 var(--space-xl); padding: 0 var(--space-md); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub); background: var(--df-panel); min-height: var(--tap-min); }
.friends-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; box-shadow: none; padding: 0; color: inherit; font-family: inherit; }
.friends-search:focus-within { border-color: var(--df-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--df-brand) 25%, transparent); }
/* The browser x is blue; draw a grey one from two gradients (S1). */
.friends-search input::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px; cursor: pointer;
  background: linear-gradient(45deg, transparent 46%, var(--df-ink-soft) 46% 54%, transparent 54%), linear-gradient(-45deg, transparent 46%, var(--df-ink-soft) 46% 54%, transparent 54%);
}
/* The Invite sheet's friend search sits inside the sheet, not a page card (#6809). */
.invite-friends-search { margin: 0 0 var(--space-sm); }
/* The sheet's own input rules would draw a second box inside the first, so the field keeps only the wrapper's edge. */
.friends-search.invite-friends-search input[type="search"] { border: 0; box-shadow: none; background: none; min-height: var(--tap-min); padding: 0; border-radius: 0; }
.friends-search.invite-friends-search input[type="search"]:focus { border: 0; box-shadow: none; outline: 0; }
.friends-find-card { padding-bottom: var(--space-xl); }
.friends-find-hint { margin: var(--space-md) var(--space-xl) 0; color: var(--df-ink-soft); font-size: var(--fs-xs); }
.friends-find-hint[hidden] { display: none; }
/* The results are their own card under Find people (S17) and under the field on phones (S1). */
#friends-search-results { order: 2; background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); box-shadow: var(--df-press-large); overflow: hidden; }
#friends-search-results:empty { display: none; }
.friends-results-note { padding: var(--space-md) var(--space-xl); color: var(--df-ink-soft); font-size: var(--fs-xs); }
.friends-exact-text { color: var(--df-ink) !important; }
.friends-exact-icon { flex: none; font-size: var(--fs-lg); color: var(--df-ink); }
/* S2 (#7021): the no-results card, centred, Fraunces title, a primary pill. */
.friends-nofound { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 16px; text-align: center; }
.friends-nofound-title { margin: 0; font-family: var(--df-title); font-size: var(--fs-xl); text-wrap: balance; line-height: 1.2; }
.friends-nofound-hint { margin: 0; color: var(--df-ink-soft); font-size: var(--fs-sm); line-height: 1.45; }
.friends-nofound-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 999px; font-size: var(--fs-md); box-shadow: var(--df-press); }
/* Phone: the search field stands alone (A3); the card chrome and title return from 1024px (A1). */
@media (max-width: 1023px) {
  .friends-find-card { background: none; border: 0; box-shadow: none; overflow: visible; padding-bottom: 0; }
  .friends-find-title, .friends-find-hint { display: none; }
  .friends-search { margin: 0; box-shadow: var(--df-press); }
  #friends-search-results:empty { display: none; }
  /* A typed query: the results take the place of the requests and the roster (S1). Desktop keeps the roster (S17). */
  .friends-cols.is-searching .friends-requests-card, .friends-cols.is-searching .friends-col-right { display: none; }
}
.friends-tag { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: var(--fs-xs); color: var(--df-brand); padding: 4px 8px; border: 2px solid var(--df-brand); border-radius: 999px; }
.friends-tag .ti { font-size: var(--fs-sm); }
.friends-sent { min-height: var(--tap-min); padding: 0 var(--space-md); background: none; border: 2px solid var(--df-ink); border-radius: 999px; color: var(--df-ink); font: inherit; font-weight: 600; cursor: pointer; }
.friends-add { min-height: var(--tap-min); min-width: 64px; }

.friends-empty { padding: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-md); align-items: flex-start; }
.friends-empty > .friends-card-title { padding: 0; font-size: var(--fs-xl); text-wrap: balance; }
/* The empty cards draw the same dashed, tilted, striped print tile as the app (S4, S14, S16, S18). */
.friends-empty-art {
  display: grid; place-items: center; width: 110px; height: 128px; transform: rotate(-4deg); color: var(--df-ink-soft); font-size: var(--fs-2xl);
  border: 2px dashed var(--df-ink); border-radius: var(--df-radius-stub);
  background: repeating-linear-gradient(-45deg, var(--df-chip-fill) 0 8px, transparent 8px 16px);
}
/* The skeleton row fills its flex row, or its two bars collapse and only the circle shows (S11). */
.friends-row > .skeleton-row { flex: 1; min-width: 0; }
.friends-card .skeleton { background: color-mix(in srgb, var(--df-ink) 14%, var(--df-panel)); }
.friends-empty p { margin: 0; color: var(--df-ink-soft); }
/* S18: the desktop board says the request lands "on the left"; the phone copy says "here". */
.friends-copy-wide { display: none; }
@media (min-width: 1024px) {
  .friends-copy-narrow { display: none; }
  .friends-copy-wide { display: inline; }
}
.friends-cta { min-height: var(--tap-min); }
.friends-foot { margin: var(--space-md) 0 0; text-align: center; }
.friends-foot-link { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: var(--tap-min); color: var(--df-ink); font-weight: 600; text-decoration: underline; }
.friends-blocked-note { margin: 0; color: var(--df-ink-soft); }
.friends-unblock { min-height: var(--tap-min); }
@media (prefers-reduced-motion: reduce) {
  .friends-back:hover, .friends-back:active { transform: none; }
}
/* #6499 design-check: Accept and Decline are one matched pair of pills (A1/A3). */
.friends-request-actions .btn-primary, .friends-request-actions .btn-secondary,
.friends-unblock {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  height: var(--tap-min); padding: 0 var(--space-lg); border: 2px solid var(--df-ink); border-radius: 999px;
  box-shadow: var(--df-press); font-family: var(--df-sans); font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
.friends-request-actions .btn-secondary, .friends-unblock { background: var(--df-panel); color: var(--df-ink); }
/* #6499 design-check: matched Accept/Decline, and the Add / Send / Sent pills (S1, S3, S17). */
.friends-request-actions > button { margin: 0; width: 100%; align-self: stretch; }
.friends-add {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  height: var(--tap-min); padding: 0 var(--space-lg); border: 2px solid var(--df-ink); border-radius: 999px;
  background: var(--df-brand); color: var(--df-brand-fg); box-shadow: var(--df-press);
  font-family: var(--df-sans); font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
.friends-exact .friends-add { background: var(--df-panel); color: var(--df-ink); }
.friends-sent {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  background: color-mix(in srgb, var(--df-brand) 14%, var(--df-panel)); color: var(--df-brand); border-color: var(--df-brand);
  font-family: var(--df-sans);
}
.friends-exact { border-top: 2px dashed var(--df-ink); background: var(--df-chip-fill); }
/* #6499 design-check: row buttons never stretch, and the empty / error / guest cards are centred pills (S4, S12, S14, S15, S18). */
.friends-row > .btn-secondary, .friends-unblock { width: auto; flex: none; margin: 0; }
.friends-empty { align-items: center; text-align: center; min-height: 180px; justify-content: center; }
@media (min-width: 1024px) {
  .friends-col-right > .friends-empty { min-height: 23rem; }
  .friends-col-right > .friends-empty p { max-width: 20rem; } /* the board wraps the copy in a narrow block, three lines */
  .friends-page { gap: 16px; }
} /* S18: the empty roster card is a tall panel (368px on the board) */
.friends-empty .friends-cta {
  display: inline-flex; align-items: center; justify-content: center; width: auto; height: var(--tap-min); padding: 0 var(--space-xl);
  background: var(--df-panel); color: var(--df-ink); border: 2px solid var(--df-ink); border-radius: 999px; box-shadow: var(--df-press);
  font-family: var(--df-sans); font-weight: 600; cursor: pointer;
}
.friends-empty .btn-primary.friends-cta { background: var(--df-brand); color: var(--df-brand-fg); }

/* ===== Trips together (#6500, epic #6359, direction A "Crew roster"; A2, A5, S5-S10) ===== */
.ft-layout { display: flex; flex-direction: column; gap: var(--space-xl); min-width: 0; }
.ft-main { display: flex; flex-direction: column; gap: var(--space-lg); min-width: 0; }
@media (min-width: 1024px) {
  .ft-layout { display: grid; grid-template-columns: 392px minmax(0, 1fr); align-items: start; gap: 32px; }
}

/* Header: the friend as a taped Instant Print. A card on desktop (A2); open on the ground on phone (A5). */
.ft-head { display: flex; align-items: center; gap: var(--space-xl); padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-xs); }
@media (min-width: 1024px) {
  .ft-head { background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); box-shadow: var(--df-press-large); padding: var(--space-xl); }
}
.ft-print {
  position: relative; flex: none; width: 100px; padding: 6px 6px 24px; transform: rotate(-4deg);
  background: var(--df-instant-stock); border-radius: var(--df-radius-print); box-shadow: var(--df-press-lift);
}
.ft-print::before {
  content: ''; position: absolute; top: -8px; left: 50%; width: 44px; height: 14px; transform: translateX(-50%) rotate(-2deg);
  background: light-dark(rgba(186, 117, 23, 0.42), rgba(232, 163, 61, 0.28)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.ft-print img, .ft-print-initials { display: grid; place-items: center; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--df-radius-print); }
.ft-print-initials { background: var(--df-ink-soft); color: var(--df-instant-stock); font-family: var(--df-display); font-weight: 800; font-size: var(--fs-2xl); }
.ft-head-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ft-eyebrow { margin: 0; font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft); }
.ft-name { margin: 0; font-family: var(--df-title); font-weight: 700; font-size: var(--fs-2xl); line-height: 1.1; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.ft-sub { margin: 0; color: var(--df-ink-soft); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.ft-actions { display: flex; align-items: center; gap: var(--space-sm); margin-top: var(--space-sm); flex-wrap: wrap; }
.ft-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: var(--tap-min); padding: 0 var(--space-lg);
  background: var(--df-panel); color: var(--df-ink); border: 2px solid var(--df-ink); border-radius: 999px; box-shadow: var(--df-press);
  font-family: var(--df-sans); font-size: var(--fs-md); font-weight: 600; cursor: pointer;
}
.ft-pill:hover:not(:disabled) { box-shadow: var(--df-press-hover); transform: translate(2px, 2px); }
.ft-pill:active:not(:disabled) { box-shadow: var(--df-press-active); transform: translate(4px, 4px); }
.ft-pill:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.ft-pill:focus-visible, .ft-filter:focus-visible, .ft-open:focus-visible, .ft-link:focus-visible, .ft-menu-item:focus-visible { outline: 2px solid var(--df-ink); outline-offset: 2px; }
.ft-more { padding: 0; width: var(--tap-min); }

/* The ... menu: a small popover on desktop, a bottom sheet on phone (S5). */
.ft-menu-wrap { position: relative; }
.ft-menu[hidden], .ft-menu-scrim[hidden] { display: none; }
.ft-menu-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(9, 20, 13, 0.45); }
.ft-menu {
  position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: var(--space-xs);
  padding: var(--space-md) var(--space-xl) calc(var(--space-xl) + env(safe-area-inset-bottom, 0px));
  background: var(--df-panel); border-radius: 20px 20px 0 0; border: 2px solid var(--df-ink); border-bottom: 0;
}
.ft-menu-grab { align-self: center; width: 44px; height: 5px; border-radius: 999px; background: var(--df-hair); margin-bottom: var(--space-sm); }
.ft-menu-title { margin: 0 0 var(--space-xs); font-family: var(--df-title); font-weight: 700; font-size: var(--fs-xl); }
.ft-menu-item {
  display: flex; align-items: center; gap: var(--space-md); width: 100%; min-height: var(--tap-min); padding: var(--space-sm) 0;
  background: none; border: 0; border-top: 1.5px dashed var(--df-hair); color: var(--df-ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
.ft-menu-title + .ft-menu-item { border-top: 0; }
.ft-menu-danger { color: var(--danger-text); }
.ft-menu-cancel { margin-top: var(--space-md); width: 100%; }
@media (min-width: 1024px) {
  .ft-menu-scrim { background: transparent; }
  .ft-menu {
    position: absolute; left: auto; right: auto; top: calc(100% + 8px); bottom: auto; width: 240px; padding: var(--space-sm) var(--space-lg);
    border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); box-shadow: var(--df-press);
  }
  .ft-menu-grab, .ft-menu-title, .ft-menu-cancel { display: none; }
  .ft-menu .ft-menu-item:nth-of-type(1) { border-top: 0; }
}

/* Filters and search. */
.ft-tools { display: flex; flex-direction: column; gap: var(--space-md); }
.ft-filters { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.ft-filter {
  display: inline-flex; align-items: center; gap: var(--space-xs); min-height: var(--tap-min); padding: 0 var(--space-lg);
  background: var(--df-panel); color: var(--df-ink); border: 2px solid var(--df-ink); border-radius: 999px;
  font-family: var(--df-sans); font-size: var(--fs-md); font-weight: 600; cursor: pointer;
}
.ft-filter-n { color: var(--df-ink-soft); font-variant-numeric: tabular-nums; }
.ft-filter.is-on { background: var(--df-ink); color: var(--df-panel); }
.ft-filter.is-on .ft-filter-n { color: inherit; opacity: 0.75; }
.ft-search {
  display: flex; align-items: center; gap: var(--space-sm); padding: 0 var(--space-md); min-height: var(--tap-min);
  background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub);
}
.ft-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; box-shadow: none; padding: 0; color: inherit; font-family: inherit; }
.ft-search:focus-within { box-shadow: var(--df-press-hover); }
@media (max-width: 1023px) { .ft-search-few { display: none; } }
@media (min-width: 1024px) {
  .ft-tools { flex-direction: row; align-items: center; justify-content: space-between; }
  .ft-search { flex: 1; max-width: 380px; }
}

/* Ticket stubs: facts above a perforation, your note on the torn-off end. */
.ft-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); align-items: start; }
@media (min-width: 1024px) { .ft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ft-stub { background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); box-shadow: var(--df-press-large); }
.ft-stub-top { position: relative; display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-lg) 76px var(--space-lg) var(--space-lg); }
.ft-stub-meta { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }
.ft-chip {
  display: inline-block; padding: 1px var(--space-sm); border: 2px solid var(--df-ink); border-radius: var(--df-radius-print);
  font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.ft-chip-active { background: var(--df-brand); color: var(--df-brand-fg); }
.ft-chip-upcoming { background: var(--info); color: var(--df-panel); }
.ft-chip-past { background: none; color: var(--df-ink); }
.ft-dates { color: var(--df-ink-soft); font-size: var(--fs-sm); }
.ft-trip { margin: 0; font-family: var(--df-title); font-weight: 700; font-size: var(--fs-xl); line-height: 1.15; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.ft-dest { margin: 0; color: var(--df-ink-soft); font-size: var(--fs-sm); }
.ft-open {
  position: absolute; top: var(--space-lg); right: var(--space-lg); display: grid; place-items: center; width: var(--tap-min); height: var(--tap-min);
  background: var(--df-panel); color: var(--df-ink); border: 2px solid var(--df-ink); border-radius: 50%; box-shadow: var(--df-press); cursor: pointer; font-size: var(--fs-lg);
}
.ft-open:hover { box-shadow: var(--df-press-hover); transform: translate(2px, 2px); }
.ft-perf { position: relative; border-top: 2px dashed var(--df-ink); }
.ft-perf::before, .ft-perf::after {
  content: ''; position: absolute; top: -11px; width: 20px; height: 20px; box-sizing: border-box; border: 2px solid var(--df-ink); border-radius: 50%; background: var(--df-ground);
}
.ft-perf::before { left: -12px; clip-path: inset(0 0 0 50%); }
.ft-perf::after { right: -12px; clip-path: inset(0 50% 0 0); }
.ft-note { display: flex; flex-direction: column; gap: var(--space-sm); padding: var(--space-md) var(--space-lg) var(--space-lg); }
.ft-note-label { display: flex; align-items: center; gap: var(--space-xs); margin: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--df-ink-soft); }
.ft-note-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ft-note-field { width: 100%; min-height: 80px; resize: vertical; border: 2px solid var(--df-brand); border-radius: var(--df-radius-stub); background: var(--df-panel); color: inherit; font-family: inherit; padding: var(--space-md); }
.ft-note-actions { display: flex; align-items: center; gap: var(--space-lg); }
.ft-save { background: var(--df-brand); color: var(--df-brand-fg); }
.ft-link {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: var(--tap-min); min-width: var(--tap-min); padding: 0; background: none; border: 0; color: var(--df-ink);
  font: inherit; font-weight: 600; text-decoration: underline; text-decoration-color: var(--df-hair); text-underline-offset: 4px; text-decoration-thickness: 2px; cursor: pointer;
}
.ft-empty-art {
  display: grid; place-items: center; width: 150px; height: 88px; transform: rotate(-3deg); color: var(--df-ink-soft); font-size: 28px;
  border: 2px dashed var(--df-ink); border-radius: var(--df-radius-stub);
  background: repeating-linear-gradient(-45deg, var(--df-chip-fill) 0 8px, transparent 8px 16px);
}
@media (prefers-reduced-motion: reduce) {
  .ft-pill:hover:not(:disabled), .ft-pill:active:not(:disabled), .ft-open:hover { transform: none; }
}
.ft-add-note { align-self: flex-start; justify-content: flex-start; }
/* #6500 design-check: stubs never squeeze below a readable width; the menu rows are 16px with 20px icons (S5). */
@media (min-width: 1024px) { .ft-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.ft-menu-item { font-size: var(--fs-md); }
.ft-menu-item .ti { font-size: var(--fs-lg); }
.ft-menu-item { border-top-width: 2px; border-top-color: color-mix(in srgb, var(--df-ink) 22%, transparent); }
.ft-empty .friends-card-title { font-family: var(--df-title); font-weight: 700; font-size: var(--fs-xl); text-wrap: balance; text-align: center; }
.ft-link.ft-plain { text-decoration: none; }
.ft-note-field { resize: none; }

/* #6799 (delta B1-B5): year dividers in Past, the left line, the restricted stub (D1, D2, D6). */
.ft-year + .ft-year { margin-top: calc(var(--space-3xl) * 1.5); }
.ft-year-h { display: flex; align-items: baseline; gap: var(--space-sm); margin: 0 0 var(--space-3xl); padding-bottom: var(--space-sm); border-bottom: 2px dashed var(--df-ink); }
.ft-year-y { font-family: var(--df-display); font-weight: 800; font-size: var(--fs-lg); line-height: 1; }
.ft-year-n { color: var(--df-ink-soft); font-size: var(--fs-sm); font-weight: 600; }
.ft-left { display: flex; align-items: center; gap: var(--space-xs); margin: 0; color: var(--df-ink-soft); font-size: var(--fs-sm); font-weight: 600; }
.ft-stub-restricted { background: color-mix(in srgb, var(--df-ink) 8%, transparent); border-style: dashed; box-shadow: none; }
.ft-stub-restricted .ft-stub-top { padding-right: var(--space-lg); }
.ft-stub-restricted .ft-left-you { color: var(--df-ink-soft); }


/* #7190 — the hard Press shadow as pseudo-elements (pattern: features/stamps.css).
   ::before is the ink shadow, ::after repaints the control's face on top
   (background inherited), both at z-index -1 inside the control's own stacking
   context; the control moves into the shadow and the shadow counter-moves, so
   only transform animates. A face must be opaque or the shadow shows through. */
.pending-approval-cancel, .inv-btn, .photo-consent-sheet .photo-consent-actions .btn, .discover-ticket-search, .dp-modal .btn-primary, .dp-modal .btn-secondary {
  --press-x: 4px;
  position: relative;
  isolation: isolate;
}
.pending-approval-cancel::before, .inv-btn::before, .photo-consent-sheet .photo-consent-actions .btn::before, .discover-ticket-search::before, .dp-modal .btn-primary::before, .dp-modal .btn-secondary::before, .pending-approval-cancel::after, .inv-btn::after, .photo-consent-sheet .photo-consent-actions .btn::after, .discover-ticket-search::after, .dp-modal .btn-primary::after, .dp-modal .btn-secondary::after {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}
.pending-approval-cancel::before, .inv-btn::before, .photo-consent-sheet .photo-consent-actions .btn::before, .discover-ticket-search::before, .dp-modal .btn-primary::before, .dp-modal .btn-secondary::before {
  background: var(--df-ink);
  transform: translate(var(--press-x), var(--press-x));
  transition: transform var(--dur-feedback) var(--df-ease);
}
.pending-approval-cancel::after, .inv-btn::after, .photo-consent-sheet .photo-consent-actions .btn::after, .discover-ticket-search::after, .dp-modal .btn-primary::after, .dp-modal .btn-secondary::after {
  border: 2px solid var(--df-ink);
  background: inherit;
}
.pending-approval-cancel:hover::before, .inv-btn:hover::before, .photo-consent-sheet .photo-consent-actions .btn:hover::before, .discover-ticket-search:hover::before, .dp-modal .btn-primary:hover::before, .dp-modal .btn-secondary:hover::before { transform: translate(2px, 2px); }
.pending-approval-cancel:active::before, .inv-btn:active::before, .photo-consent-sheet .photo-consent-actions .btn:active::before, .discover-ticket-search:active::before, .dp-modal .btn-primary:active::before, .dp-modal .btn-secondary:active::before { transform: translate(0, 0); }
.inv-btn:disabled::before, .dp-modal .btn-secondary:disabled::before { transform: translate(var(--press-x), var(--press-x)); }
/* the blocked dp-modal primary is a flat beige button with a hairline: no shadow, no repainted face */
.dp-modal .btn-primary:disabled::before, .dp-modal .btn-primary:disabled::after { content: none; }

/* /css/global-search.css */
/* Global search (#3048, Discover W10; D89, D109). Tokens only — no new colours. */

/* ── Triggers ─────────────────────────────────────────── */
/* The box: a pill under the header row on phone, top right on desktop. */
.gs-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  order: 3;
  flex: 1 0 100%;
  min-height: 48px;
  margin-top: var(--space-md);
  padding: 0 var(--space-lg);
  border: 1.5px solid var(--df-ink);
  border-radius: 999px;
  background: var(--df-panel);
  color: var(--df-ink-soft);
  font: inherit;
  font-size: var(--fs-md);
  text-align: left;
  cursor: pointer;
}
.gs-trigger:hover { color: var(--df-ink); }
.gs-trigger-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The "/" key hint (#5932): decorative, for keyboards only, so phones never show it. */
.gs-key { display: none; }
.home-topbar:has(> .gs-trigger) { flex-wrap: wrap; }
/* #4405: the bar is pinned to --topbar-h (#4237), so the wrapped search row spilled out
   of it. A bar that carries the pill grows to hold both rows; the trip bar has no pill
   and stays at the token. */
.home-topbar:has(> .gs-trigger) {
  height: auto;
  min-height: var(--topbar-h);
}

@media (min-width: 681px) {
  .gs-trigger {
    order: 1;
    flex: 0 1 280px;
    margin: 0 var(--space-lg) 0 auto;
  }
  .gs-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 1.5em;
    margin-left: auto;
    padding: 0 var(--space-xs);
    border: 1px solid currentColor;
    border-radius: var(--space-xs);
    font: inherit;
    font-size: var(--fs-xs);
    line-height: 1.4;
    opacity: 0.7;
  }
  .home-topbar:has(> .gs-trigger) { flex-wrap: nowrap; height: var(--topbar-h); }
  /* The pill follows the icon group in the DOM (Tab order matches the phone's second row,
     #4405); from here it sits before the group visually. */
  .home-topbar:has(> .gs-trigger) > div:not(.home-topbar-brand) { order: 2; }
}

/* ── Overlay ──────────────────────────────────────────── */
.gs {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  justify-content: center;
  background: rgba(9, 20, 13, 0.5);
}
.gs[hidden] { display: none; }
.gs-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  background: var(--df-ground);
  color: var(--df-ink);
}

/* G01/G02: the green header band holds a cream pill and a bold Cancel. */
.gs-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background: var(--topbar-bg);
}
.gs-bar-icon {
  position: absolute;
  left: calc(var(--space-lg) + var(--space-lg));
  font-size: var(--fs-lg);
  color: var(--df-ink);
  pointer-events: none;
}
.gs-input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0 44px 0 46px;
  font-size: var(--fs-md); /* 16px: no iOS zoom on focus */
  border: 2px solid var(--df-ink);
  border-radius: 999px;
  background: var(--df-panel);
  color: var(--df-ink);
  box-shadow: 0 0 0 3px var(--df-panel);
}
.gs-input:focus { outline: none; }
.gs-input:focus-visible { box-shadow: 0 0 0 3px var(--df-panel), 0 0 0 5px var(--df-brand); }
.gs-icon-btn, .gs-cancel, .gs-clear-all {
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  border: 0;
  background: transparent;
  color: var(--df-ink);
  font: inherit;
  cursor: pointer;
}
.gs-bar .gs-icon-btn { position: absolute; right: calc(var(--tap-min) + var(--space-lg) + var(--space-lg) + 8px); }
.gs-cancel { padding: 0; font-weight: 600; color: var(--df-ground); }

.gs-card { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.gs-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
  overscroll-behavior: contain;
}
.gs-hint { display: none; }
@media (min-width: 681px) {
  .gs-hint {
    display: block;
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--df-hair);
    color: var(--df-ink-soft);
    font-size: var(--fs-xs);
  }
}

/* ── Groups and rows ──────────────────────────────────── */
.gs-group { margin-bottom: var(--space-xl, 20px); }
/* Section labels are label-tier caps, as on the boards. */
.gs-group-label {
  margin: 0 0 var(--space-md);
  font-family: var(--df-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--df-ink-soft);
}
.gs-group-head { display: flex; align-items: baseline; justify-content: space-between; }
.gs-clear-all {
  padding: 0 var(--space-md);
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--df-brand);
}
.gs-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 1;
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--space-sm, 6px) var(--space-md);
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--df-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.gs-row-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.gs-row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-row-sub { color: var(--df-ink-soft); font-size: 14px; }
.gs-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.gs-avatar-init { display: inline-flex; align-items: center; justify-content: center; background: var(--df-chip-fill-hover); font-weight: 600; }
.gs-see-all {
  justify-content: center;
  min-height: 56px;
  margin-top: var(--space-lg);
  border: 2px solid var(--df-ink);
  border-radius: 999px;
  font-weight: 600;
}
.gs-see-all .gs-row-text { flex: 0 1 auto; }
.gs-see-all .ti-search, .gs-see-all .ti-arrow-right { display: none; }
.gs-row:hover, .gs-row.gs-active, .gs-post .discover-card-open.gs-active { background: var(--df-chip-fill); }
.gs-active { outline: 2px solid var(--df-brand); outline-offset: -2px; }
/* Popular cities scroll sideways; the matching city card is full width. */
.gs-group > .gs-city-card { width: 100%; min-height: 150px; }
.gs-posts { margin: 0; padding: 0; }

.gs-empty { padding: var(--space-lg) 0; }
.gs-empty-title { margin: 0; font-weight: 600; font-size: var(--fs-lg); }
.gs-empty-sub { margin: var(--space-sm, 6px) 0 0; color: var(--df-ink-soft); }

.gs-skeleton-row { display: flex; align-items: center; gap: var(--space-lg); padding: var(--space-md) 0; }
.gs-skeleton-lines { display: flex; flex-direction: column; gap: var(--space-sm, 6px); flex: 1; }

@media (prefers-reduced-motion: reduce) {
  .gs-row, .gs-trigger { transition: none; }
}

/* The approved results screens (G02, G05) carry no City/Posts headings; the
   group keeps its label for a screen reader. */
.gs-group-quiet > .gs-group-label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* One clear control: ours. */
.gs-input::-webkit-search-cancel-button { display: none; }
.gs-post-actions { margin-inline: 0; }
.gs-empty-title { font-family: var(--df-sans); font-size: var(--fs-xl); }
.gs-empty-sub { color: var(--df-ink); font-size: var(--fs-md); }

/* G05/H02 (D109): on desktop the pill replaces the header's own box, top right,
   and the results drop down beneath it as a card. No dimming, the page stays. */
@media (min-width: 681px) {
  .gs { background: transparent; align-items: flex-start; justify-content: flex-start; }
  .gs-panel { position: absolute; top: 0; left: var(--gs-card-l, calc(100vw - 710px)); width: 560px; height: auto; background: transparent; }
  .gs-bar {
    position: fixed; top: var(--gs-t, 10px); left: var(--gs-l, calc(100vw - 500px));
    width: var(--gs-w, 340px); height: var(--gs-h, 48px);
    padding: 0; background: transparent;
  }
  .gs-bar .gs-input { min-height: 100%; height: 100%; }
  .gs-bar .gs-cancel { display: none; }
  .gs-bar-icon { left: 16px; }
  .gs-bar .gs-icon-btn { right: 8px; }
  .gs-open .gs-trigger { visibility: hidden; }
  .gs-body {
    max-height: calc(100dvh - 120px);
    border-radius: 16px 16px 0 0;
  }
  /* G05: one outline and one offset shadow around the results and the hint. */
  .gs-card {
    flex: none;
    margin-top: calc(var(--gs-t, 10px) + var(--gs-h, 48px) + 8px);
    border: 1.5px solid var(--df-ink);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--df-press-large);
  }
  .gs-hint {
    background: var(--df-panel);
    border-radius: 0 0 16px 16px;
    text-align: center;
    font-family: var(--df-sans);
  }
  .discover-grid.gs-posts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* The report dialog opens from a result, over the overlay. */
body:has(.gs:not([hidden])) #reportModal { z-index: 9100; }

/* The box on the city page (/discover/city/:slug): first thing in the column,
   top right on desktop. */
.dcity-pad > .gs-trigger { order: 0; flex: 0 0 auto; margin: 0; width: 100%; }
@media (min-width: 681px) {
  .dcity-pad > .gs-trigger { width: 280px; align-self: flex-end; }
}

/* ── Empty state: luggage tags and a wall of prints (#6245, board C) ───────────────
   Recent searches are tags (a 2px ink keyline, squared left end with a punched hole,
   rounded right end). Popular cities are a 3 x 2 wall of instant prints (DESIGN.md,
   Signature: The Instant Print): Instant Stock, a border wider at the foot, 3px radius,
   the Lift shadow, a small tilt that hover and focus straighten. */
.gs-tags { display: flex; flex-wrap: wrap; gap: var(--space-md); }
.gs-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 2px solid var(--df-ink);
  border-radius: 3px 999px 999px 3px;
  background: var(--df-panel);
}
.gs-tag::before {
  content: '';
  position: absolute; left: 9px; top: 50%;
  width: 7px; height: 7px; margin-top: -3.5px;
  border: 2px solid var(--df-ink); border-radius: 50%;
  background: var(--df-ground);
}
.gs-tag-term {
  min-height: calc(var(--tap-min) - 4px);
  padding: 0 var(--space-md) 0 28px;
  background: none; border: 0; border-radius: inherit;
  font: 600 var(--fs-sm)/1 var(--df-sans); color: var(--df-ink);
  cursor: pointer; text-align: left; min-width: 0;
}
.gs-tag-term .gs-row-title { display: block; max-width: 14em; }
.gs-tag .gs-tag-x { width: calc(var(--tap-min) - 4px); min-height: calc(var(--tap-min) - 4px); padding: 0; margin-left: -4px; }
.gs-tag-term.gs-active, .gs-tag-term:hover { background: var(--df-chip-fill); }

.gs-prints { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xl) var(--space-lg); padding: 4px 4px 8px; }
.gs-print {
  --tilt: 0deg;
  position: relative;
  display: block;
  width: 100%;
  padding: 8px 8px 44px;
  border: 0;
  border-radius: var(--df-radius-print);
  background: var(--df-instant-stock);
  box-shadow: var(--df-press-lift);
  color: var(--df-pin-ink);
  text-align: left;
  cursor: pointer;
  transform: rotate(var(--tilt));
  transition: transform var(--dur-state) var(--ease-out);
}
.gs-print:nth-child(6n+1) { --tilt: -1.6deg; }
.gs-print:nth-child(6n+2) { --tilt: 1deg; }
.gs-print:nth-child(6n+3) { --tilt: -0.8deg; }
.gs-print:nth-child(6n+4) { --tilt: 1.4deg; }
.gs-print:nth-child(6n+5) { --tilt: -1.2deg; }
.gs-print:nth-child(6n+6) { --tilt: 0.6deg; }
.gs-print:hover, .gs-print:focus-visible, .gs-print.gs-active { transform: rotate(0deg) scale(1.03); outline: none; }
.gs-print.gs-active { outline: 2px solid var(--df-brand); outline-offset: 2px; background: var(--df-instant-stock); }
.gs-print-photo {
  position: relative; display: block; aspect-ratio: 1;
  background: var(--df-pin-stock-shade); /* the flat tint until a photo lands, or for good without one */
  overflow: hidden;
}
.gs-print-photo::before {
  content: ''; position: absolute; inset: 0;
  background: var(--home-city-photo, none) var(--home-city-photo-position, center) / cover no-repeat;
  opacity: 0;
  transition: opacity var(--dur-state) var(--ease-out);
}
.gs-print.home-city-card-photo-visible .gs-print-photo::before { opacity: 1; }
.gs-print-name {
  position: absolute; left: 8px; right: 8px; bottom: 22px;
  font: 600 var(--fs-xs)/1.1 var(--df-sans);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gs-print-trips {
  position: absolute; left: 8px; right: 8px; bottom: 7px;
  font: 600 var(--fs-xs)/1 var(--df-sans); color: var(--df-instant-stock-ink);
}

/* Arrive + Trace on a real open: the panel drops 10px from the bar, then the tags and
   prints follow on the capped Trace. Each print settles to its own resting tilt. */
.gs-arriving .gs-card { animation: tb-band-drop var(--dur-view) var(--ease-out) both; }
.gs-arriving .gs-tag { animation: tb-row-in var(--dur-view) var(--ease-out) calc(var(--delay-beat) + var(--i, 0) * var(--trace-tick)) both; }
.gs-arriving .gs-print { animation: gs-print-in var(--dur-view) var(--ease-out) calc(var(--delay-beat) + var(--i, 0) * var(--trace-tick)) both; }
@keyframes gs-print-in { from { opacity: 0; transform: translateY(8px) rotate(var(--tilt)); } to { opacity: 1; transform: rotate(var(--tilt)); } }
/* One quick reverse on close, no stagger. */
.gs-closing .gs-card { animation: tb-panel-out var(--dur-feedback) var(--ease-out) both; }
.gs-closing { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  /* The finished, visible state: no travel, stagger or tilt-settle (the tilt is the resting angle). */
  .gs-arriving .gs-card, .gs-arriving .gs-tag, .gs-arriving .gs-print, .gs-closing .gs-card { animation: none; }
  .gs-print { transition: none; }
  .gs-print:hover, .gs-print:focus-visible, .gs-print.gs-active { transform: rotate(0deg); }
  .gs-print-photo::before { transition: none; }
}

/* applyDestinationPhoto() puts .home-city-card-photo on the element it is given, and that class paints a
   dimmed full-card photo over it. A print wants the photo in its own window only. */
.gs-print.home-city-card-photo::before { content: none; }

/* /css/recap.css */
/* Recap — the post-trip state (issue #892 / PRD Phase 3 #933 item 1).
   js/recap.js fills #recap-content. Uses the same "departure fever" card
   idiom as the Expenses / People panels (--df-panel on a 2px --df-ink
   keyline, hard offset --df-press shadow, label-tier section heads) so Recap
   reads as one more tab, not a bolt-on. #panel-recap is a plain capped
   .panel — never .panel-wide.

   Order: the return-ticket stub, then the "Before you put it away" checklist
   (a right rail on desktop), then the record. */

#recap-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4xl);
  padding-bottom: var(--space-5xl);
}

/* Section heading: the title tier (D131 — below headline, Fraunces). */
.recap-section-title {
  margin: 0;
  font-family: var(--df-sans);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--df-ink);
}

/* ── Cards ── */
.recap-card {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card, 14px);
  padding: var(--space-4xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.recap-card-h {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.3;
  color: var(--df-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.recap-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
}
.recap-card-day {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--df-ink);
}
.recap-prints-more {
  align-self: center;
  margin-left: var(--space-md);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--df-ink-soft);
}

.recap-subhead {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--df-ink-soft);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: var(--space-md);
}

.recap-empty {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  max-width: 62ch;
  font-family: var(--df-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--df-ink-soft);
}

.recap-cta {
  /* .btn-primary/.btn-secondary both declare width:100% for their usual
     home in a narrow modal or form. align-self:flex-start alone can't
     override that — align-self only governs cross-axis sizing when the
     item's own width is auto, and 100% is not auto — so without this
     override every CTA on the tab rendered as a full-card-width slab
     despite declaring shrink-to-fit intent right above it. */
  width: auto;
  max-width: 100%;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--tap-min);
}
.recap-cta-quiet { font-weight: 400; }

/* ── Spend ── */
.recap-total {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}
.recap-total-label {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.recap-total-line {
  font-family: var(--df-display, sans-serif);
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--df-ink);
}

.recap-cat-group + .recap-cat-group { margin-top: var(--space-xl); }
.recap-cat-group-h {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin-bottom: var(--space-sm);
}

.recap-people-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.recap-person-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-md) 0;
  border-top: 2px dashed var(--df-hair);
  font-size: var(--fs-xs);
}
.recap-person-row:first-child { border-top: none; }
.recap-person-me { font-weight: 600; }
.recap-person-you { color: var(--df-ink-soft); font-weight: 400; }
.recap-person-amt { font-family: var(--df-sans); font-weight: 600; }

/* ── What actually happened (#933 item 2) — same dashed-row rhythm as
   .recap-people-list above, plus a leading category icon since a stop has
   no natural numeric column to right-align against. */
.recap-actual-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-lg);
}
.recap-actual-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-top: 2px dashed var(--df-hair);
  font-size: var(--fs-xs);
}
.recap-actual-row:first-child { border-top: none; }
.recap-actual-icon { color: var(--df-ink-soft); font-size: var(--fs-md); flex: none; }
.recap-actual-body { display: flex; flex-direction: column; }
.recap-actual-dest { font-weight: 600; }
.recap-actual-when { color: var(--df-ink-soft); font-size: var(--fs-xs); }

/* ── Planned vs. actual diff (#933 item 3) — groups reuse .recap-actual-list's
   row shape, .recap-subhead's label style; only the group spacing and the
   count badge are new here. */
.recap-diff-group + .recap-diff-group { margin-top: var(--space-xl); }
.recap-diff-count {
  display: inline-block;
  background: var(--df-hair);
  color: var(--df-ink-soft);
  border-radius: 999px;
  padding: 0 var(--space-sm);
  font-size: var(--fs-xs);
  font-weight: 400;
  margin-left: var(--space-2xs);
}

/* ── Photo strip ──
   DESIGN.md's Instant Print, in front of the record itself — the same
   idiom css/discover.css's .dtl-prints already puts in front of a public
   trip (real photos, tape, the Lift shadow). Recap previously carried none
   at all despite being the one surface whose whole job is handing the trip
   back. Local --recap-stock/--recap-tape alias the same values .dtl/.lp
   already declare in their own scopes — the brand belongs to the product,
   every surface aliases it locally rather than sharing one global token
   (DESIGN.md: "Do alias the app's tokens for every control ink"). */
#recap-content {
  --recap-stock: #fdf6ea;   /* Instant Stock — pinned in both themes: a print is white at midnight too */
  --recap-tape: light-dark(rgba(186, 117, 23, 0.42), rgba(232, 163, 61, 0.28));
}

.recap-prints {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start; /* the board hangs the prints from the left; with the map off the strip must not float right */
  gap: 0;
  max-width: 320px;
}
.recap-print {
  position: relative;
  flex: 0 1 34%;
  min-width: 68px;
  max-width: 92px;
  margin: 0;
  padding: 6px 6px 20px;
  background: var(--recap-stock);
  border-radius: var(--df-radius-print, 3px);
  box-shadow: var(--df-press-lift, 0 1px 0 rgba(9, 20, 13, 0.1), 0 22px 40px -26px rgba(9, 20, 13, 0.75));
  transition: transform var(--dur-state) var(--df-ease, var(--ease-out));
}
.recap-print:nth-child(1) { transform: rotate(-3.4deg); }
.recap-print:nth-child(2) { transform: rotate(2.2deg); }
.recap-print:nth-child(3) { transform: rotate(-1.4deg); }
.recap-print:nth-child(4) { transform: rotate(2.8deg); }
.recap-print + .recap-print { margin-left: -26px; }

.recap-print::before,
.recap-print::after {
  content: '';
  position: absolute;
  top: -6px;
  width: 38px;
  height: 13px;
  background: var(--recap-tape);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.recap-print::before { left: 8%; transform: rotate(-4deg); }
.recap-print::after { right: 8%; transform: rotate(3.4deg); }

.recap-print img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 1px;
  background: color-mix(in srgb, var(--df-ink) 12%, var(--recap-stock));
}
.recap-print:nth-child(2) img { aspect-ratio: 1 / 1; }
.recap-print:nth-child(3) img { aspect-ratio: 5 / 4; }

/* What you actually do when you look at a crooked photo on a wall. */
.recap-print:hover {
  transform: rotate(0deg) scale(1.05);
  z-index: 2;
}
@media (prefers-reduced-motion: reduce) {
  .recap-print { transition: none; }
}

/* ── The return-ticket stub (#5355, Option B) ──
   Recap's first block: a boarding pass (12px stub radius, Press offset). The
   main part carries the label, the Dashed Route (amber pins numbered from 1,
   3px dashed amber line, ending on a "Home" pin) and, below the tear, the
   ticket fields. HOME is struck on the torn-off end in the Stamp Word die.
   Phone: route on top, fields in a 2x2 grid with HOME below the tear.
   Desktop (>=1024px): route left, HOME on a right-hand torn end. */
.recap-stub {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub, 12px);
}
.recap-stub-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
  padding: var(--space-2xl);
  min-width: 0;
}
.recap-stub-label,
.recap-num-l {
  margin: 0;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--df-ink-soft);
}

.recap-route {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-lg) 0;
  margin: 0;
  padding: 0;
}
.recap-route-stop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
}
/* The dashed connector belongs to the stop after it and reaches back to the
   previous pin, so a wrap never strands a dash at the end of a line. */
.recap-route-dash + .recap-route-stop { margin-left: 56px; }
.recap-route-dash + .recap-route-stop::before {
  content: '';
  position: absolute;
  top: 19px;
  right: calc(50% + 24px);
  width: 40px;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--df-amber) 0 9px, transparent 9px 18px);
}
.recap-route-pin {
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--df-ink);
  border-radius: 50%;
  background: var(--df-amber);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}
.recap-route-name {
  max-width: 14ch;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--df-ink);
  overflow-wrap: anywhere;
}

/* #6249 — label row: phone reads "Return ticket · <dates>", desktop the name
   left and the date range right. */
.recap-stub-label { display: flex; justify-content: space-between; gap: var(--space-lg); }
.recap-stub-label-l { min-width: 0; overflow-wrap: anywhere; }
.recap-stub-label-name, .recap-stub-label-r { display: none; }
.recap-route-dash { display: none; }

/* The tear: a dashed rule between the route and the fields. */
.recap-stub-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl) var(--space-2xl);
  margin: 0;
  padding: 0;
}
.recap-route + .recap-stub-fields {
  padding-top: var(--space-2xl);
  border-top: 2px dashed var(--df-ink-soft);
}
.recap-num {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
}
.recap-num-n {
  margin: 0;
  font-family: var(--df-display, sans-serif);
  font-size: var(--fs-xl);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--df-ink);
}
.recap-num-of { color: var(--df-ink-soft); font-size: 0.7em; }

.recap-stub-told {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: var(--space-xs);
  margin: 0;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
}

/* The torn-off end. */
.recap-stub-end {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-2xl) var(--space-2xl);
  border-top: 2px dashed var(--df-ink);
}

/* ★ THE ONE SHOUT — HOME in the Stamp Word die (coral, double keyline, a
   Trail-Green ghost second pass), struck by hand at -2.6deg. The resting
   transform lives HERE, so an interrupted or reduced-motion render still
   leaves it correctly struck. */
.recap-home {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--df-display, sans-serif);
  font-size: 44px;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: var(--vn-coral);
  border: 0.055em solid currentColor;
  box-shadow: inset 0 0 0 0.022em currentColor;
  border-radius: 0.14em;
  padding: 0.06em 0.2em 0.09em;
  text-shadow: 0.028em 0.036em 0 color-mix(in srgb, var(--vn-trail-green) 35%, transparent);
  transform: rotate(-2.6deg);
}
.recap-home-date {
  margin-top: 0.15em;
  font-family: var(--df-sans);
  font-size: max(var(--fs-xs), 0.17em); /* #6715: scales with the stamp, never under the 12px floor */
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-shadow: none;
}

/* Phone: the main part dissolves into the stub's grid so the 2x2 fields and
   HOME share one row below the tear, which then runs the full width. */
@media (max-width: 1023px) {
  .recap-stub { grid-template-columns: 1fr auto; padding: var(--space-2xl) var(--space-2xl) var(--space-xl); row-gap: var(--space-2xl); }
  .recap-stub-main { display: contents; }
  .recap-stub-label,
  .recap-route,
  .recap-stub-told { grid-column: 1 / -1; }
  .recap-stub-fields,
  .recap-stub-end { border-top: 2px dashed var(--df-ink-soft); padding-top: var(--space-xl); }
  .recap-stub-end { padding-inline: 0 0; padding-bottom: 0; }
  .recap-stub-fields { padding-bottom: 0; }
  .recap-stub-end .recap-home { font-size: 40px; margin-left: var(--space-lg); }
}
@media (min-width: 1024px) {
  .recap-stub { grid-template-columns: 1fr 280px; }
  .recap-stub-main { padding: var(--space-4xl); }
  .recap-stub-fields { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
  .recap-route-name { max-width: 18ch; }
  .recap-stub-label-name, .recap-stub-label-r { display: inline; }
  .recap-stub-label-short { display: none; }
  .recap-stub-label-r { white-space: nowrap; }
  /* #6249 — the dashes flex so the pins span the whole main half: first pin at
     the left edge, Home at the right, equal dashes between. */
  .recap-route { flex-wrap: nowrap; align-items: flex-start; }
  .recap-route-dash + .recap-route-stop { margin-left: 0; }
  .recap-route-dash + .recap-route-stop::before { display: none; }
  .recap-route-stop:first-child { align-items: flex-start; }
  .recap-route-stop:first-child .recap-route-name { text-align: left; }
  .recap-route-stop:last-child { align-items: flex-end; }
  .recap-route-stop:last-child .recap-route-name { text-align: right; }
  .recap-route-dash {
    display: block;
    flex: 1 1 24px;
    min-width: 24px;
    height: 3px;
    margin: 19px 8px 0;
    background: repeating-linear-gradient(90deg, var(--df-amber) 0 9px, transparent 9px 18px);
  }
  .recap-stub-end { border-top: 0; border-left: 2px dashed var(--df-ink); padding: var(--space-2xl); }
  .recap-home { font-size: 64px; }
}

/* The spend bars fill in as the breakdown scrolls into view. Driven by scroll
   position, so it is complete whenever fully on screen and a re-render
   changes nothing. Firefox and prefers-reduced-motion get the static,
   finished bars. */
#recap-content {
  --recap-replay-inset: 6%;
  --recap-scrub-ease: cubic-bezier(0.33, 1, 0.68, 1);
}
@media (max-width: 1023px) {
  #recap-content { --recap-replay-inset: calc(92px + env(safe-area-inset-bottom, 0px) + 3%); }
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .recap-cats,
    .recap-cat-group {
      view-timeline: --recap-replay block;
      view-timeline-inset: auto var(--recap-replay-inset);
    }
    .recap-cats .cat-bar-fill {
      transform-origin: 0 50%;
      animation: recap-fill var(--recap-scrub-ease) backwards;
      animation-timeline: --recap-replay;
      animation-range: entry calc(var(--k, 0) * 9%) entry calc(46% + var(--k, 0) * 9%);
    }
    .recap-cats .cat-bar-row:nth-child(2 of .cat-bar-row) { --k: 1; }
    .recap-cats .cat-bar-row:nth-child(3 of .cat-bar-row) { --k: 2; }
    .recap-cats .cat-bar-row:nth-child(4 of .cat-bar-row) { --k: 3; }
    .recap-cats .cat-bar-row:nth-child(5 of .cat-bar-row) { --k: 4; }
    .recap-cats .cat-bar-row:nth-child(6 of .cat-bar-row) { --k: 5; }
    .recap-cats .cat-bar-row:nth-child(n + 7 of .cat-bar-row) { --k: 6; }
  }
}
@keyframes recap-fill {
  from { scale: 0 1; }
}
@media print {
  .recap-cats .cat-bar-fill { scale: 1 1; }
}

/* HOME coming down, once, for the viewer who just confirmed "We're home"
   (js/recap.js adds .is-struck and removes it again). Same overshoot-then-
   settle curve as the landing stamp; the resting transform above is the
   finished state, so reduced motion needs no override. */
@media (prefers-reduced-motion: no-preference) {
  .recap-home.is-struck {
    animation: recap-strike var(--dur-strike) var(--ease-slam) var(--dur-feedback) both;
  }
}
@keyframes recap-strike {
  0%   { opacity: 0; transform: rotate(-11deg) scale(1.85); }
  55%  { opacity: 1; transform: rotate(-2.6deg) scale(0.95); }
  78%  { transform: rotate(-2.6deg) scale(1.025); }
  100% { transform: rotate(-2.6deg) scale(1); }
}

/* ── "Before you put it away" (#5356) ──
   Phone: full width under the stub. Desktop (>=1024px): the right rail (1fr)
   beside the record (2fr). The rail comes first in the DOM, so on a phone it
   sits under the stub without any reordering. Ink fill on the progress bar;
   Share / Export / the stamp are quiet actions, not checklist items. */
.recap-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-4xl);
}
.recap-record {
  display: flex;
  flex-direction: column;
  gap: var(--space-4xl);
  min-width: 0;
}
@media (min-width: 1024px) {
  .recap-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
  }
  .recap-record { grid-column: 1; grid-row: 1; }
  .recap-check { grid-column: 2; grid-row: 1; }
  .recap-companions { grid-column: 2; grid-row: 2; }
}

.recap-check {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  padding: var(--space-2xl);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card, 14px);
  min-width: 0;
}
.recap-check-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-lg);
}
.recap-check-h,
.recap-check-count {
  margin: 0;
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--df-ink-soft);
}
.recap-check-count { letter-spacing: 0.04em; text-transform: none; font-size: var(--fs-xs); font-weight: 400; white-space: nowrap; }
.recap-check-bar {
  height: 8px;
  border: 2px solid var(--df-ink);
  border-radius: 999px;
  background: var(--df-panel);
  overflow: hidden;
}
.recap-check-bar > span { display: block; height: 100%; background: var(--df-ink); }

.recap-check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.recap-check-item {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-xl) 0;
  border-top: 2px dashed var(--df-hair);
}
.recap-check-item:first-child { border-top: none; padding-top: 0; }
.recap-check-item:last-child { padding-bottom: 0; }
.recap-check-mark {
  flex: none;
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--df-ink);
  border-radius: 50%;
  font-size: 14px;
}
.recap-check-mark.is-done { background: var(--df-ink); color: var(--df-panel); }
.recap-check-body { display: flex; flex-direction: column; gap: var(--space-sm); min-width: 0; }
.recap-check-title { margin: 0; font-family: var(--df-sans); font-size: var(--fs-sm); font-weight: 600; color: var(--df-ink); }
.recap-check-item.is-done .recap-check-title { text-decoration: line-through; color: var(--df-ink-soft); }
.recap-check-detail { margin: 0; font-size: var(--fs-xs); line-height: 1.5; color: var(--df-ink-soft); }
.recap-check-item.is-closed .recap-check-mark { border-style: dashed; border-color: var(--df-ink-soft); }

.recap-check-foot {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding-top: var(--space-xl);
  border-top: 2px dashed var(--df-hair);
}
.recap-check > .recap-check-foot:first-child { border-top: none; padding-top: 0; }
.recap-check-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-xl); }
.recap-check-note {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}
.recap-quiet {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--tap-min);
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--vn-green);
  cursor: pointer;
}
.recap-quiet:hover { text-decoration: underline; }
.recap-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ================================================================
   #app.trip-past — planning call-to-actions recede on a finished trip.
   The record and the settle-up lead (the Recap tab); planning stays
   reachable (a late log is still valid) but stops shouting. Issue #892.
   ================================================================ */

/* The itinerary's loud filled-green "Add stop" reverts to the quiet
   link-weight treatment its Ideas-shelf twin already uses. */
#app.trip-past .day-box-actions-row .day-box-add-btn {
  background: var(--df-panel);
  color: var(--vn-trail-green);
  font-weight: 400;
  border-top-color: var(--df-hair);
}
#app.trip-past .day-box-actions-row .day-box-add-btn:hover {
  background: var(--vn-trail-green-light);
}

/* The Ideas shelf "Add idea" button steps back a little further. */
#app.trip-past #ideas-add-btn { opacity: 0.72; }
#app.trip-past #ideas-add-btn:hover { opacity: 1; }

/* ================================================================
   Issue #2199 (#1199 Part 0) — the cancelled notice above every tab, written
   by renderTripWrapUp() (js/trip-wrap-up.js). Issue #3397 — the wrap-up
   prompt moved onto the Recap tab as a ticket stub (wrapUpRecapHtml()).
   Static — no entrance motion, so nothing to answer in the
   prefers-reduced-motion block.
   ================================================================ */
.trip-wrapup {
  margin: var(--space-lg) var(--space-lg) 0;
  padding: var(--space-lg) var(--space-xl);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: var(--df-panel);
}
.trip-wrapup-text {
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}
.trip-wrapup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}
.trip-wrapup-actions button { min-height: var(--tap-min); }

/* The ticket stub (#4663, ink system): Cut Stock, 2px ink keyline, Press
   Large. Main part, a dashed tear line with a notch at each end, then the
   actions. Stacked on a phone, side by side from 680px. */
.trip-wrapup-stub {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: var(--space-lg);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
  background: var(--df-panel);
  overflow: hidden;
}
.trip-wrapup-stub-main { padding: var(--space-xl) var(--space-xl) var(--space-lg); }
.trip-wrapup-word {
  margin: 0 0 var(--space-xs);
  font-size: var(--fs-lg, 1.75rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.trip-wrapup-figures {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-xl);
  margin: var(--space-md) 0 0;
}
.trip-wrapup-figure {
  display: flex;
  flex-direction: column;
  font-family: var(--df-sans);
}
.trip-wrapup-figure strong {
  font-family: var(--df-display, sans-serif);
  font-size: var(--fs-xl);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.trip-wrapup-figure span {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--df-ink-soft);
}
.trip-wrapup-stub-tear {
  position: relative;
  border-top: 2px dashed var(--df-ink);
}
.trip-wrapup-stub-tear::before,
.trip-wrapup-stub-tear::after {
  content: '';
  position: absolute;
  top: -11px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg, var(--df-panel));
  border: 2px solid var(--df-ink);
}
.trip-wrapup-stub-tear::before { left: -12px; }
.trip-wrapup-stub-tear::after { right: -12px; }
.trip-wrapup-stub-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-xl) var(--space-xl);
}
.trip-wrapup-stub-actions .btn-primary,
.trip-wrapup-stub-actions .btn-secondary { min-height: var(--tap-min); }
/* "Didn't happen": the quiet control. */
.trip-wrapup-link {
  min-height: var(--tap-min);
  background: none;
  border: 0;
  color: var(--df-ink-soft);
  font: inherit;
  font-size: var(--fs-xs);
  text-decoration: underline;
  cursor: pointer;
}
.trip-wrapup-nudge .btn-secondary { min-height: var(--tap-min); }
.trip-wrapup-nudge-hint {
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  text-align: center;
}
.trip-wrapup-cohost {
  margin: calc(var(--space-sm) * -1) var(--space-lg) var(--space-lg);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}
@media (min-width: 680px) {
  .trip-wrapup-stub { flex-direction: row; align-items: stretch; }
  .trip-wrapup-stub-main { flex: 1; }
  .trip-wrapup-stub-tear { border-top: 0; border-left: 2px dashed var(--df-ink); }
  .trip-wrapup-stub-tear::before,
  .trip-wrapup-stub-tear::after { left: -11px; right: auto; }
  .trip-wrapup-stub-tear::before { top: -12px; }
  .trip-wrapup-stub-tear::after { top: auto; bottom: -12px; }
  .trip-wrapup-stub-actions { justify-content: center; min-width: 240px; }
}

/* A cancelled trip is read-only except money (the server refuses the rest
   with TRIP_CANCELLED); canEditItinerary() already hides most editing, and
   the planning entry points that don't consult it step out here. */
/* Board A7 (#7260): rows are static and every entry point that changes the trip goes. The rows are also
   frozen by freezeCancelledRows() (js/trip-wrap-up.js): no handler, out of the tab order, announced disabled. */
#app.trip-cancelled #confirm-itinerary-wrap,
#app.trip-cancelled #bookings-decide,
#app.trip-cancelled .day-stay-chip-slot,
#app.trip-cancelled #panel-bookings .bk-break-actions,
#app.trip-cancelled #panel-bookings [onclick*="openBookingPlanDialog"],
#app.trip-cancelled #panel-bookings [onclick*="openBookingKindPicker"],
#app.trip-cancelled #panel-checklist .cl-add-pill {
  display: none !important;
}
#app.trip-cancelled [data-cancelled-static] { cursor: default; pointer-events: none; }
#app.trip-cancelled [data-cancelled-static]:hover { background: transparent; }
#app.trip-cancelled [data-cancelled-static] .bk-row-arrow,
#app.trip-cancelled [data-cancelled-static] .ti-chevron-right { display: none; }
#app.trip-cancelled .itin-add-pill,
#app.trip-cancelled .bk-add-btn,
#app.trip-cancelled .cl-add-pill,
#app.trip-cancelled #itin-create-actions,
#app.trip-cancelled .day-box-add-btn,
#app.trip-cancelled #ideas-add-btn {
  display: none;
}

/* A pending member looking around (#7261, board A8): the same read-only treatment as a cancelled trip, on every
   tab, with nothing to do. Tabs the server sends nothing for show the note alone; Settings shows values. */
#app.trip-pending #confirm-itinerary-wrap,
#app.trip-pending #bookings-decide,
#app.trip-pending .day-stay-chip-slot,
#app.trip-pending .itin-add-pill,
#app.trip-pending .bk-add-btn,
#app.trip-pending .cl-add-pill,
#app.trip-pending #itin-create-actions,
#app.trip-pending .day-box-add-btn,
#app.trip-pending #ideas-add-btn,
#app.trip-pending .itin-ideas-pill,
#app.trip-pending .itin-more-btn,
#app.trip-pending .exp-tab-add {
  display: none !important;
}
#app.trip-pending [data-cancelled-static] { cursor: default; pointer-events: none; }
#app.trip-pending [data-cancelled-static]:hover { background: transparent; }
#app.trip-pending [data-cancelled-static] .ti-chevron-right { display: none; }
#app.trip-pending #panel-bookings .trip-lock-host ~ *,
#app.trip-pending #panel-expenses .trip-lock-host ~ *,
#app.trip-pending #panel-budget .trip-lock-host ~ *,
#app.trip-pending #panel-people .trip-lock-host ~ *,
#app.trip-pending #panel-checklist .trip-lock-host ~ *,
#app.trip-pending #panel-settings .trip-lock-host ~ * {
  display: none !important;
}
.trip-pending-empty { margin: var(--sp-md) 0 0; color: var(--color-ink-soft); font-size: var(--fs-sm); }
.trip-pending-values { margin-top: var(--sp-lg); display: flex; flex-direction: column; gap: var(--sp-lg); }

/* "Before you tell everyone" sheet (#3398). Shell is core; the journey's
   sections are styled in css/features/trip-journey.css. */
.wrapup-sheet { max-width: 460px; }
.wrapup-sheet-label { font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); margin: 0 0 var(--space-sm); }
.wrapup-sheet-hint { color: var(--text-secondary); font-size: var(--fs-xs); margin: 0 0 var(--space-md); }
.wrapup-sheet-people { list-style: none; margin: 0 0 var(--space-sm); padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.wrapup-sheet-person { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--fs-xs); }
.wrapup-sheet-avatar { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2, var(--border)); font-size: var(--fs-xs); font-weight: 600; }
.wrapup-sheet-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wrapup-sheet-footer { display: flex; gap: var(--space-sm); justify-content: flex-end; }
.wrapup-sheet-footer button { min-height: var(--tap-min); }

/* ── The segmented record (#5357) ──
   Days · Money · Plan vs. actual: one real tablist. Selected segment is Trail
   Green with --surface-2 (= --lp-brand-fg) on top, never a literal white
   (DESIGN.md, The Mint Flip Rule). 44px targets. Panels stack their cards
   with the same gap the record used before. */
.recap-segments {
  display: flex;
  align-self: flex-start;
  max-width: 100%;
  padding: 3px;
  border: 2px solid var(--df-ink);
  border-radius: 999px;
  background: var(--df-panel);
}
.recap-seg {
  flex: 1 1 0;
  min-height: var(--tap-min);
  padding: 0 var(--space-lg);
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap; /* "Plan vs. actual" stays on one line, as drawn */
  cursor: pointer;
}
.recap-seg.is-selected {
  background: var(--selected-bg);
  color: var(--on-selected);
}
.recap-segpanel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4xl);
}
.recap-segpanel[hidden] { display: none; }

/* Days: one row per day. The pin is the route-pin idiom from the stub. */
.recap-day-list { list-style: none; display: flex; flex-direction: column; }
.recap-day-row {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-md) 0;
  border-top: 2px dashed var(--df-hair);
}
.recap-day-row:first-child { border-top: none; }
.recap-day-pin {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--df-ink);
  background: var(--df-amber);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}
.recap-day-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.recap-day-title { font-size: var(--fs-xs); font-weight: 600; overflow-wrap: anywhere; }
.recap-day-meta { color: var(--df-ink-soft); font-size: var(--fs-xs); }
.recap-day-photos {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--df-ink-soft);
  font-size: var(--fs-xs);
  font-weight: 600;
}

/* Money: the Budget card pattern (.budget-card). The total is figure tier at
   26px, not 32/40 — the stub's HOME is the shout. */
.recap-card-money {
  border-radius: 14px;
  padding: 22px;
  gap: 12px;
}
.recap-card-money .recap-total-line {
  font-size: var(--fs-2xl);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* Days rows that pick the map's day (#5358). The button is the whole row, so
   the target is the row's height; the picked one carries "On the map". */
.recap-day-select {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  width: 100%;
  min-height: var(--tap-min);
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.recap-day-select[aria-pressed="true"] .recap-day-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.recap-day-onmap {
  flex: none;
  padding: 2px var(--space-sm);
  border: 2px solid var(--df-ink);
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 600;
}
.recap-day-onmap[hidden] { display: none; }

/* Your companions (#6802, Friends delta C1-C7): the card under "Before you put it away". */
.recap-companions {
  display: flex; flex-direction: column; min-width: 0;
  /* A container: the 2px keyline, no Press shadow (#6636, The Hard Shadow Rule). */
  background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card, 14px);
  overflow: hidden;
}
.recap-companions-h { margin: 0; padding: var(--space-2xl) var(--space-3xl); border-bottom: 2px dashed var(--df-hair); font-family: var(--df-title); font-weight: 700; font-size: var(--fs-lg); line-height: 1.15; }
.recap-companions-lead { margin: 0; padding: var(--space-2xl) var(--space-3xl); border-bottom: 2px dashed var(--df-hair); font-size: var(--fs-sm); color: var(--df-ink-soft); }
.recap-companions-list { list-style: none; margin: 0; padding: 0; }
.recap-companion { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-lg) var(--space-3xl); border-top: 2px dashed var(--df-hair); }
.recap-companion:first-child { border-top: 0; }
.recap-companion:nth-child(odd) .friends-avatar { background: var(--df-panel); }
.recap-companion-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.recap-companion-who b { font-size: var(--fs-md); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recap-companion-who span { font-size: var(--fs-sm); color: var(--df-ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recap-companion-pair { display: inline-flex; gap: var(--space-sm); flex: none; }
.recap-companion-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); flex: none;
  min-width: var(--tap-min); height: var(--tap-min); padding: 0; border: 2px solid var(--df-ink); border-radius: 999px;
  background: var(--df-panel); color: var(--df-ink); font-family: var(--df-sans); font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
.recap-companion-add, .recap-companion-accept { background: var(--df-brand); color: var(--df-brand-fg); box-shadow: var(--df-press); }
.recap-companion-sent {
  padding: 0 var(--space-md);
  background: color-mix(in srgb, var(--df-brand) 14%, var(--df-panel)); color: var(--df-brand); border-color: var(--df-brand);
}
.recap-companion-friends { display: inline-flex; align-items: center; gap: var(--space-xs); flex: none; padding: 2px var(--space-sm); border: 2px solid var(--df-brand); border-radius: 999px; color: var(--df-brand); font-size: var(--fs-xs); font-weight: 600; }

/* Recap's own ground (#6802, founder ruling 2026-11-16): the print ground (peach, halftone) shows behind
   Recap's cards, as on the D3 board. `.app.active.is-recap-tab` joins the print-ground rule in style.css;
   here the working area stops painting Cut Stock over it. */
.app.is-recap-tab .app-main { background: transparent; }

/* Crew line-up (#6847): the joined members as crew stickers under the return
   ticket, on the Recap ground. Not pressable, so no offset shadow. */
.recap-crew { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.recap-crew-count {
  margin: 0;
  font-family: var(--df-display);
  font-weight: 600;
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}

/* /css/bookings-sheet.css */
/* Bookings redesign M10 (#2348) — sheet under 1024px, right panel from 1024px.
   The sheet reuses .modal/.modal-content; this only turns the dialog into a
   bottom sheet across the whole phone-and-tablet range (the shared modal does
   that only below 680px). */
@media (max-width: 1023px) {
  .bk-sheet { align-items: flex-end; padding: 0; }
  .bk-sheet .bk-sheet-content {
    max-width: 100%;
    border-radius: var(--df-radius-card) var(--df-radius-card) 0 0;
    --sheet-y: 26px;
  }
  /* #4144 — the floating Add is the boards' large pill (LayoutB, OnTrip): about
     104x52, brand fill, hard shadow, button-label text. the shared pill rule in style.css clears the tab bar
     and the safe-area inset (style.css). */
  .bk-head .bk-add-btn {
    min-height: 52px;
    min-width: 104px;
    padding: 0 var(--sp-lg);
    border-radius: 999px;
    background: var(--df-brand);
    box-shadow: var(--df-press);
    font-size: var(--fs-md);
    font-weight: 600;
  }
  /* #5763 — hidden while the first-run card shows; the card's own buttons add. */
  .bk-head.bk-head-first-run .bk-add-btn { display: none !important; }
}

.bk-detail-body { min-width: 0; }

.bk-panel-title {
  font-size: var(--fs-lg);
  font-weight: 600;
  margin-bottom: var(--sp-md);
}
.bk-panel-title:focus { outline: none; }

/* Selected row: a bar, not colour alone — aria-current carries the meaning. */
[data-bookings-row][aria-current="true"] {
  box-shadow: inset 3px 0 0 var(--trip-main-accent, currentColor);
}

/* Desktop layout (#2649, D52/D53/D62): the list is the flexible column, the To
   decide pane a fixed ~360px one on the right, sticky. Below 1024px the pane is
   a block above the chips (order: -1) that folds. It is created by
   renderBookingsTab() and absent after the trip (.bk-layout-solo). */
.bk-title { display: none; margin: 0 auto 0 0; font-size: var(--fs-lg); font-weight: 600; }
.bk-title-phone { margin: 0 0 var(--sp-md); font-size: var(--fs-2xl); font-weight: 600; color: var(--df-ink); }
.bk-is-today .bk-title-phone { display: none; }
.bk-layout { display: flex; flex-direction: column; }
.bk-list-col { min-width: 0; }
.bk-decide { order: -1; margin-bottom: var(--sp-md); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); background: var(--df-panel); }
.bk-decide-title { margin: 0; font-size: var(--fs-md); font-weight: 600; }
.bk-decide-toggle {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  width: 100%;
  min-height: var(--tap-min);
  padding: 0 var(--sp-md);
  border: 0;
  background: transparent;
  color: var(--df-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.bk-decide-toggle:hover { background: var(--df-chip-fill); }
.bk-decide-count { font-variant-numeric: tabular-nums; color: var(--df-ink-soft); font-weight: 600; }
.bk-decide-chevron { margin-left: auto; font-size: var(--fs-lg); }
.bk-decide-toggle[aria-expanded="false"] .bk-decide-chevron { transform: rotate(-90deg); }
/* #4142 (LayoutB): on a phone the title leads, then To decide with a tinted
   header and the count in the "Nothing yet" colour. Plan a booking is a quiet
   row at the foot of the pane (#5026); from 1024px it is the framed button. */
@media (max-width: 1023.98px) {
  .bk-list-col { display: contents; }
  .bk-title-phone { order: 0; }
  #bookings-email-intake-banner { order: 0; }
  .bk-decide { order: 1; overflow: hidden; margin-bottom: calc(52px + var(--sp-lg)); } /* #5221: the floating Add clears what follows To decide */
  .bk-head { order: 2; }
  .bk-summary { order: 3; }
  #bookings-list-status { order: 4; }
  #bookings-list { order: 5; padding-bottom: calc(52px + var(--sp-lg)); } /* #4600: the last row clears the floating Add */
  /* #6051: during the trip the emails are one row under Today, so the clearance moves to it. */
  .bk-is-today #bookings-email-intake-banner { order: 6; padding-bottom: calc(52px + var(--sp-lg)); }
  .bk-is-today #bookings-email-intake-banner:empty { padding-bottom: 0; }
  .bk-is-today #bookings-list { padding-bottom: var(--sp-sm); }
  .bk-decide-toggle { background: var(--df-chip-fill); }
  .bk-decide-count { color: var(--df-ink); }
  .bk-decide-plan .ui-btn { background: transparent; border-color: transparent; box-shadow: none; color: var(--df-brand); font-weight: 600; padding: 0; justify-content: flex-start; }
  .bk-decide-plan .ui-btn:hover, .bk-decide-plan .ui-btn:active { transform: none; box-shadow: none; text-decoration: underline; }
}
.bk-decide-body { padding: 0 0 var(--sp-sm); }
.bk-decide-empty { margin: 0; padding: var(--sp-sm) var(--sp-md); color: var(--df-ink-soft); }
.bk-decide-actions { display: flex; flex-direction: column; gap: var(--sp-sm); padding: var(--sp-sm) var(--sp-md) 0; }
.bk-decide-actions .ui-btn { min-height: var(--tap-min); }
@media (min-width: 1024px) {
  .bk-title-phone { display: none; }
  .bk-title { display: block; font-family: var(--df-display); font-weight: 800; font-size: var(--fs-figure-40); letter-spacing: -0.02em; }
  /* Desktop header (D49): the big title at the left, a compact Add pill at the
     right. .btn-primary is width:100%, so the pill sets its own width. */
  .bk-head { margin-bottom: var(--sp-lg)); }
  .bk-decide { padding-top: var(--sp-md); }
  .bk-decide-title { padding: 0 var(--sp-md) var(--sp-sm); }
}
/* #4423 — 1024–1279px stays one column, but the header (title and Add booking)
   leads and To decide follows it, as at every other width. The list column is
   flattened so To decide can be ordered against the header, as on the phone. */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .bk-list-col { display: contents; }
  #bookings-email-intake-banner { order: 0; }
  .bk-head { order: 0; }
  .bk-decide { order: 1; }
  .bk-summary { order: 2; }
  #bookings-list-status { order: 3; }
  #bookings-list { order: 4; }
}
/* #3977 — from 1280px the To decide pane is a draggable rail, like Itinerary's
   Ideas column (js/pane-resizer.js owns --bookings-pane-width). 1024–1279px stays
   one column with the pane above the list. top/max-height clear the fixed top bar.
   #4427 — the list column is flattened so the header (emails banner, title and
   Add booking) takes rows 1–2 and the handle and rail start on row 3, level with
   the category chips: the first block under the title, as on every rail tab. The
   last row is the flexible one, so the rail's extra height lands there. */
@media (min-width: 1280px) {
  .bk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 22px minmax(260px, var(--bookings-pane-width)); grid-template-rows: min-content min-content min-content min-content 1fr; column-gap: 0; align-items: start; }
  .bk-layout.bk-layout-solo { grid-template-columns: minmax(0, 1fr); }
  .bk-layout.bk-layout-solo > .pane-resizer { display: none; }
  .bk-list-col { display: contents; }
  #bookings-email-intake-banner { grid-column: 1; grid-row: 1; }
  .bk-head { grid-column: 1; grid-row: 2; }
  /* #7087: the lock note sits under the title in the list column, not in the 22px gutter. */
  .bk-layout .trip-lock-host { grid-column: 1; grid-row: 3; }
  .bk-summary { grid-column: 1; grid-row: 4; }
  #bookings-list-status, #bookings-list { grid-column: 1; grid-row: 5; }
  .bk-layout > .pane-resizer { grid-column: 2; grid-row: 3 / -1; }
  /* #5763 — the 22px gutter is the boards' gap; the line sits in its middle. */
  .bk-layout > .pane-resizer::after { left: calc(50% - 1px); }
  .bk-decide {
    grid-column: 3;
    grid-row: 3 / -1;
    order: 0;
    margin-bottom: 0;
    position: sticky;
    top: var(--rail-top);
    max-height: calc(100vh - var(--rail-top) - var(--sp-lg));
    overflow-y: auto;
  }
}

/* Add sheet (A1, #2352): upload first, then one Type it in row. */
.bk-add-upload { width: 100%; min-height: var(--tap-min); justify-content: center; margin-bottom: var(--sp-sm); }
/* DeskAdd board (D54, #2374): an ink-dashed apricot drop, then two ink cards. */
.bk-add-drop { display: flex; flex-direction: column; align-items: center; gap: var(--sp-xs); padding: var(--sp-xl) var(--sp-sm); border: 2px dashed var(--df-ink); border-radius: var(--df-radius-card); background: var(--df-ground); color: var(--df-ink); cursor: pointer; text-align: center; }
.bk-add-drop i { font-size: var(--fs-xl); color: var(--df-brand); }
.bk-add-drop-title { font-weight: 600; }
.bk-add-drop-sub { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.bk-add-forward { display: flex; align-items: center; gap: var(--sp-sm); margin-bottom: var(--sp-sm); padding: var(--sp-md) var(--sp-md); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); background: var(--df-panel); }
.bk-add-forward.bk-add-forward-guest { display: block; padding: 0; border: 0; background: none; box-shadow: none; }
.bk-add-card-icon { flex: none; font-size: var(--fs-lg); color: var(--df-brand); }
.bk-add-forward-text { flex: 1; min-width: 0; }
.bk-add-forward-title { margin: 0 0 2px; font-weight: 600; color: var(--df-ink); }
.bk-add-forward-label { margin: 0 0 2px; font-weight: 600; color: var(--df-ink); }
.bk-add-forward-title + .bk-add-forward-label { font-weight: 400; color: var(--df-ink-soft); }
.bk-add-type-label { margin: 0 0 var(--sp-xs); font-size: var(--fs-xs); color: var(--df-ink-soft); }
.bk-add-forward-address { display: block; font-family: var(--df-sans); font-size: var(--fs-xs); overflow-wrap: anywhere; color: var(--df-ink); user-select: all; }
.bk-add-forward-address-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bk-add-forward-short { display: flex; min-width: 0; font-family: var(--df-sans); font-size: var(--fs-xs); color: var(--df-ink); white-space: nowrap; }
.bk-add-forward-short-head { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bk-add-forward-short-tail { flex: none; }
.bk-add-forward-copy { flex: none; padding: 0 var(--sp-md); }
.bk-add-forward-copy, .bk-add-forward-guest-btn { min-height: var(--tap-min); min-width: var(--tap-min); }
.bk-add-forward-sub { display: block; font-size: var(--fs-sm); color: var(--df-ink-soft); }
.bk-add-forward-note { margin-top: var(--sp-sm); }
.bk-add-forward-actions { display: flex; gap: var(--sp-xs); flex-wrap: wrap; }
.bk-add-forward-actions .btn-primary, .bk-add-forward-actions .btn-secondary { min-height: var(--tap-min); }
.bk-add-note { margin-bottom: var(--sp-sm); }
.bk-add-typeitin { display: flex; align-items: center; gap: var(--sp-sm); width: 100%; min-height: var(--tap-min); padding: var(--sp-md) var(--sp-md); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); background: var(--df-panel); box-shadow: var(--df-press); color: var(--df-ink); text-align: left; font: inherit; cursor: pointer; }
.bk-add-typeitin:hover { background: var(--df-chip-fill); }
.bk-add-typeitin-text { display: flex; flex-direction: column; }
.bk-add-typeitin-text span { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.bk-form-kinds { display: flex; flex-wrap: wrap; gap: var(--sp-xs); }
.bk-form-kind { min-height: var(--tap-min); display: inline-flex; align-items: center; gap: var(--sp-xs); }
#addBookingModal div.form-hint, #addBookingModal p.form-hint { font-size: var(--fs-xs); }
.bk-form-kind[aria-pressed="true"] { border-color: var(--df-brand); font-weight: 600; }

/* The opened booking (#2355, M5): proof first, then place, cost and who booked.
   Targets are 44px; nothing here relies on colour alone. */
.bk-opened { display: flex; flex-direction: column; gap: var(--sp-sm); }
.bk-opened-sub { margin: 0; color: var(--df-ink-soft); }
.bk-ticket-badge {
  align-self: flex-start;
  padding: var(--sp-xs) var(--sp-sm);
  border-radius: 999px;
  /* Not pressable, so not green-filled (DESIGN.md: green fill means pressable). */
  background: var(--df-chip-fill);
  color: var(--df-ink);
  border: 1px solid var(--df-ink-soft);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.bk-ticket-ends { display: flex; align-items: flex-start; gap: var(--sp-sm); }
.bk-ticket-end { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-xs); }
.bk-ticket-end-to { text-align: right; }
.bk-ticket-time { font-size: var(--fs-xl, 1.75rem); font-weight: 800; line-height: 1; }
.bk-ticket-place { color: var(--df-ink-soft); font-size: var(--fs-xs); overflow-wrap: anywhere; }
.bk-ticket-arrow { margin-top: var(--sp-xs); }

.bk-proof {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  padding: var(--sp-md);
  border: 2px dashed var(--df-ink);
  border-radius: var(--df-radius-card);
}
.bk-proof-optional { margin: 0; max-width: 65ch; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.bk-proof-label { margin: 0; font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--df-ink-soft); }
.bk-proof-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xs);
  min-height: var(--tap-min);
  padding: 0 var(--sp-md);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  background: var(--df-panel);
  color: var(--df-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.bk-details { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }

.bk-facts { list-style: none; margin: 0; padding: 0; }
.bk-fact {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--sp-sm) 0;
  border: 0;
  border-bottom: 1px solid var(--df-hair);
  background: none;
  color: var(--df-ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
}
.bk-fact-link { cursor: pointer; }
.bk-fact-icon { flex: none; color: var(--df-ink-soft); }
.bk-fact-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.bk-fact-action { font-weight: 600; text-decoration: underline; }
.bk-fact-btn { min-height: var(--tap-min); border: 0; background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }

.bk-opened-actions { position: relative; display: flex; flex-wrap: wrap; gap: var(--sp-sm); }
.bk-opened-links > .bk-opened-secondary { min-height: var(--tap-min); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.bk-opened-edit { flex: 1; min-height: var(--tap-min); }
.bk-opened-more { min-width: var(--tap-min); min-height: var(--tap-min); }
.bk-opened-menu {
  flex-basis: 100%;
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  background: var(--df-panel);
  overflow: hidden;
}
.bk-opened-menu[hidden] { display: none; }
.bk-menu-item {
  display: block;
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--sp-sm) var(--sp-md);
  border: 0;
  background: none;
  color: var(--df-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.bk-menu-item:hover { background: var(--df-hair); }
.bk-menu-item-danger { color: var(--danger-text); }

/* D3 proof viewer (#2356): full screen on phones, a large dialog from 1024px. */
.bk-proof-modal .bk-proof-viewer {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 960px;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  border-radius: 0;
  gap: var(--sp-sm);
  padding: var(--sp-md);
  background: var(--df-ink);
  color: var(--df-brand-fg);
}
/* #6059 (PProof): a dark viewer, the file on a white stage, Share as the main action. */
.bk-proof-head { display: flex; align-items: center; gap: var(--sp-sm); }
/* Specificity above .modal-content .modal-close, which paints a light circle and pushes it right. */
.bk-proof-modal .bk-proof-viewer .bk-proof-back { position: static; flex: none; margin-left: 0; min-width: var(--tap-min); min-height: var(--tap-min); border: 2px solid var(--df-brand-fg); border-radius: 50%; background: none; box-shadow: none; color: var(--df-brand-fg); }
.bk-proof-modal .bk-proof-viewer .bk-proof-back i { color: var(--df-brand-fg); }
.bk-proof-titles { min-width: 0; }
.bk-proof-titles h2 { margin: 0; color: var(--df-brand-fg); font-size: var(--fs-md); overflow-wrap: anywhere; }
.bk-proof-meta { margin: 0; font-size: var(--fs-sm); color: color-mix(in srgb, var(--df-brand-fg) 72%, transparent); }
.bk-proof-stage { flex: 1; min-height: 0; overflow: auto; display: flex; justify-content: center; background: var(--df-panel); border-radius: var(--df-radius-card); }
.bk-proof-file { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
.bk-proof-actions { display: flex; gap: var(--sp-sm); }
.bk-proof-actions .bk-proof-link { flex: 1; justify-content: center; }
.bk-proof-actions .bk-proof-share { border-color: var(--df-brand); background: var(--df-brand); color: var(--df-brand-fg); }
.bk-proof-actions .bk-proof-download { border-color: var(--df-brand-fg); background: none; color: var(--df-brand-fg); }
@media (min-width: 1024px) {
  .bk-proof-modal .bk-proof-viewer { height: 90vh; height: 90dvh; border-radius: var(--df-radius-card); }
}

/* A shared journey in To decide (#2748, D55): travellers in words, never colour alone. */
.bk-journey-meta { color: var(--df-ink-soft); margin-bottom: var(--sp-sm); }
.bk-journey-people { list-style: none; margin: 0; padding: 0; }
.bk-journey-person { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-sm); padding: var(--sp-sm) 0; border-bottom: 1px solid var(--df-hair); }
/* Name over state, as on Who3 (#2374); a host's Remind sits at the right. */
.bk-journey-who { display: flex; flex-direction: column; min-width: 0; }
.bk-journey-name { font-weight: 600; overflow-wrap: anywhere; }
.bk-journey-state { font-size: var(--fs-xs); color: var(--df-ink); }
.bk-journey-person.pending .bk-journey-state { color: var(--df-ink-soft); }
.bk-journey-actions { display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-xs); margin-top: var(--sp-md); }
/* One primary per opened line (#3243); the viewer's other answer and the host's
   override are text links, 44px tall to stay tappable. */
.bk-journey-link { align-self: center; min-height: var(--tap-min); padding: 0 var(--sp-sm); background: none; border: 0; font: inherit; font-size: var(--fs-xs); color: var(--df-ink-soft); text-decoration: underline; cursor: pointer; }
.bk-journey-btn { min-height: var(--tap-min); }
.bk-journey-remind { flex: none; padding: 0 var(--sp-md); font-size: var(--fs-xs); }

/* Day list and category chips (#2648, D50/D51). The chips are the Expenses
   .exp-filter classes; this only lets them sit beside the other summary chip.
   A day folds with the hidden attribute: no animation, so nothing to answer in
   the reduced-motion block. */
.bk-summary { flex-wrap: wrap; align-items: center; gap: var(--sp-sm); }
.bk-summary .bk-filters { margin-bottom: 0; max-width: 100%; }
/* #4143 — LayoutB fills the selected chip with ink and light text. Scoped to
   .bk-filters because .exp-filters is shared with Expenses, which keeps its green. */
.exp-filters.bk-filters .exp-filter.active { background: var(--df-ink); border-color: var(--df-ink); color: var(--df-panel); }
.exp-filters.bk-filters .exp-filter.active i { color: inherit; }
.bk-back-row { flex-basis: 100%; }
.bk-back-link { display: inline-flex; align-items: center; gap: var(--sp-xs); min-height: var(--tap-min); padding: 0; border: 0; background: none; color: var(--df-brand); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.exp-filter-name { display: none; }
@media (min-width: 1024px) { .exp-filters.bk-filters .exp-filter-name { display: inline; margin: 0 var(--sp-xs) 0 var(--sp-sm); } }
.bk-day { margin-bottom: var(--sp-md); }
.bk-day-heading { margin: 0; }
/* Board heading (D50/D51): small label-tier caps under a heavy rule, count and fold
   chevron at the right. */
.bk-day-label { font-family: var(--df-sans); font-size: var(--fs-sm); letter-spacing: 0.1em; text-transform: uppercase; }
.bk-day-toggle {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  width: 100%;
  min-height: var(--tap-min);
  padding: 0 var(--sp-md);
  border: 0;
  border-top: 2px solid var(--df-ink);
  background: transparent;
  color: var(--df-ink);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.bk-day-toggle:hover { background: var(--df-chip-fill); }
.bk-day-label { flex: 1; min-width: 0; }
.bk-day-count { font-variant-numeric: tabular-nums; color: var(--df-ink-soft); font-weight: 600; }
.bk-day-chevron { font-size: var(--fs-lg); }
.bk-day-toggle[aria-expanded="false"] .bk-day-chevron { transform: rotate(-90deg); }

/* Opening in place (#2650, D53): from 1024px a booked row opens under itself and
   every To decide line is a disclosure with an arrow at its right end. Folding is
   the hidden state of the content, with no animation, so nothing to answer in the
   reduced-motion block. */
.bk-row-arrow { flex: none; margin-left: var(--sp-sm); font-size: var(--fs-lg); }
.bk-row[aria-expanded="true"] .bk-row-arrow { transform: rotate(90deg); }
.bk-inline { padding: var(--sp-sm) var(--sp-md) var(--sp-md); border-bottom: 1px solid var(--df-hair); }
li.is-expanded > .bk-row { background: var(--df-chip-fill); }

/* Plan a booking (#2749) */
.bk-decide-plan { padding: var(--sp-sm) var(--sp-md) 0; }
.bk-decide-plan .ui-btn { min-height: var(--tap-min); }
.bk-plan { display: flex; flex-direction: column; gap: var(--sp-sm); padding: var(--sp-sm) var(--sp-md) var(--sp-md); }
.bk-plan-kinds, .bk-plan-how { display: flex; flex-wrap: wrap; gap: var(--sp-xs); }
.bk-plan .ui-btn { min-height: var(--tap-min); }
/* Selected kind and mode fill in ink (Who2): not colour on the border alone. */
.bk-plan .ui-btn[aria-pressed="true"] { background: var(--df-ink); border-color: var(--df-ink); color: var(--df-panel); font-weight: 600; }
.bk-plan-kind { gap: var(--sp-xs); padding: 0 var(--sp-sm); }
.bk-plan input.form-input[type="text"] { background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--radius-pill); color: var(--df-ink); min-height: var(--tap-min); }
.bk-plan select.form-input { background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--radius-pill); color: var(--df-ink); min-height: var(--tap-min); }
.bk-plan-actions .ui-btn--primary { width: 100%; }
.bk-plan-who { display: flex; flex-direction: column; gap: var(--sp-xs); }
.bk-plan-ticks { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-xs); }
.bk-plan-tick { position: relative; display: flex; align-items: center; gap: var(--sp-sm); min-height: var(--tap-min); width: 100%; cursor: pointer; }
.bk-plan-tick-input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.bk-plan-tick-box { flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--df-ink); border-radius: 6px; background: var(--df-panel); color: transparent; font-size: 16px; }
.bk-plan-tick-input:checked + .bk-plan-tick-box { background: var(--df-ink); color: var(--df-panel); }
.bk-plan-tick-input:focus-visible + .bk-plan-tick-box { outline: 2px solid var(--df-brand); outline-offset: 2px; }
.bk-plan-groups { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-xs); }
.bk-plan-group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-xs); }
.bk-plan-link { min-height: var(--tap-min); display: inline-flex; align-items: center; }
a.bk-plan-link { color: var(--df-brand); text-decoration: underline; font-weight: 600; }
a.bk-plan-link:focus-visible { outline: 2px solid var(--df-brand); outline-offset: 2px; }
button.bk-plan-link { background: none; border: 0; padding: 0; font: inherit; color: var(--df-brand); text-decoration: underline; cursor: pointer; text-align: left; }
button.bk-plan-link:focus-visible { outline: 2px solid var(--df-brand); outline-offset: 2px; }
.bk-plan-readonly { display: flex; flex-direction: column; gap: var(--sp-xs); padding: var(--sp-sm); background: var(--df-ground); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); }
.bk-plan-readonly-note { color: var(--df-ink-soft); font-size: var(--fs-sm); }

/* Plan line (#2750): a guest's row carries one explanatory line under it (D63). */
.bk-plan-lines .bk-journey-person { flex-wrap: wrap; }
.bk-plan-summary { margin: 0 0 var(--sp-sm); padding: var(--sp-sm) var(--sp-sm); border: 1px solid var(--df-hair); border-radius: var(--df-radius-card); color: var(--df-ink-soft); }
.bk-plan-guest-note { flex-basis: 100%; color: var(--df-ink-soft); font-size: var(--fs-sm); }
.bk-plan-booker { margin: 0 0 var(--sp-sm); color: var(--df-ink-soft); font-size: var(--fs-sm); }

/* Opened booking, lighter on desktop (#3612, DeskBooked): one primary button, the
   rest text links; facts on one line; the card as wide as its content. Phone keeps
   the sheet with its full-width buttons. Links keep a 44px hit area via ::before. */
@media (min-width: 1024px) {
  /* The opened booking is its own card under the row (#4147, DeskBooked): ink border,
     no shadow (a container, #6727), indented from the list's left edge, filling the column. */
  .bk-inline { padding: var(--sp-sm) var(--sp-md) var(--sp-md) 2rem; border-bottom: 0; }
  .bk-inline > .bk-detail-body { padding: var(--sp-md) var(--sp-md); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); background: var(--df-panel); }
  .bk-opened { gap: var(--sp-sm); }
  .bk-proof-secondary,
  .bk-opened-secondary {
    position: relative;
    flex: none;
    min-height: 0;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--df-ink);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
  }
  .bk-opened-links > .bk-opened-secondary { min-height: 0; display: inline-block; text-decoration: underline; }
  .bk-proof-secondary::before,
  .bk-opened-secondary::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(var(--tap-min), 100%);
    height: var(--tap-min);
    transform: translate(-50%, -50%);
  }
  .bk-proof-secondary { align-self: flex-start; }
  /* Confirmation block (#4149, DeskBooked / DeskBookedEmpty): a stored file has no box and
     no label, just a filled button with its caption beside it; the empty state keeps a
     dashed box with a bold sentence-case heading, the button and the link on one line. */
  .bk-proof { display: flex; flex-flow: row wrap; align-items: center; column-gap: var(--sp-sm); row-gap: var(--sp-xs); padding: 0; border: 0; border-radius: 0; }
  .bk-proof > * { flex: none; }
  .bk-proof .bk-details { flex-basis: 100%; }
  .bk-proof-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .bk-proof-link:not(.bk-proof-secondary) { align-self: auto; border-color: var(--df-brand); background: var(--df-brand); color: var(--df-brand-fg); }
  .bk-proof-caption { margin: 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }
  .bk-proof-empty { padding: var(--sp-md); border: 1px dashed var(--df-hair); border-radius: var(--df-radius-card); }
  .bk-proof-empty .bk-proof-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; flex-basis: 100%; font-size: inherit; font-weight: 800; letter-spacing: 0; text-transform: none; color: var(--df-ink); }
  .bk-proof-empty .bk-proof-optional { flex-basis: 100%; }
  .bk-facts { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--sp-sm); }
  .bk-facts { padding-top: var(--sp-md); border-top: 1px solid var(--df-hair); }
  .bk-facts > li { display: flex; }
  .bk-facts > li + li::before { content: "·"; margin-right: var(--sp-md); color: var(--df-ink-soft); }
  .bk-facts .bk-fact { width: auto; min-height: 0; padding: 0; border: 0; }
  .bk-fact-action { margin-left: var(--sp-xs); }
  .bk-opened-actions { gap: var(--sp-md); align-items: center; }
  .bk-opened-menu { flex-basis: auto; }
}
.bk-plan-day, .bk-plan-help { margin: 0 0 var(--sp-sm); color: var(--df-ink-soft); font-size: var(--fs-sm); }

/* #5368 — time zone as text + Change, and its searchable picker */
.bk-tz-row { display: flex; align-items: center; gap: var(--sp-sm); min-height: var(--tap-min); }
.bk-tz-text { flex: 1; min-width: 0; font-weight: 400; color: var(--df-ink); }
.bk-tz-text.bk-tz-empty { font-weight: 400; color: var(--df-ink-soft); }
.bk-tz-change {
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  padding: 0 var(--sp-sm);
  border: 0;
  background: none;
  color: var(--df-brand);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.bk-tz-picker .ui-sheet-body { gap: var(--sp-sm); min-height: 0; }
/* Spacing that used to be inline style= in js/bookings.js (#6768). */
.bk-detail-action { margin-top: var(--sp-sm); }
.bk-skeleton-meta { margin-top: var(--sp-sm); }
.bk-share-row { display: flex; align-items: center; gap: var(--sp-sm); margin-bottom: var(--sp-xs); }
.bk-share-name { flex: 1; }
/* #5515: one cream fill at every width, like the other booking fields */
.bk-tz-picker #bookingTzSearch { background: var(--df-panel); }
.bk-tz-list { overflow-y: auto; min-height: 0; flex: 1; max-height: 55vh; max-height: 55dvh; }
.bk-tz-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  width: 100%;
  min-height: var(--tap-min);
  padding: 0 var(--sp-sm);
  border: 0;
  border-bottom: 1px solid var(--df-ink-soft);
  background: none;
  color: var(--df-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.bk-tz-dest { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.bk-tz-group { padding: var(--sp-sm) var(--sp-sm) var(--sp-sm); font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--df-ink-soft); }
.bk-tz-none { padding: var(--sp-md) var(--sp-sm); color: var(--df-ink-soft); }

/* Cancelled group (#5424, PRD #5400 D9): collapsed under the list, rows struck
   through and muted. The group header is the same disclosure as a day heading. */
.bk-cancelled { margin-top: var(--sp-md); }
.bk-row-cancelled .bk-row-title, .bk-row-cancelled .bk-row-icon { color: var(--df-ink-soft); }
.bk-row-cancelled .bk-row-title s { text-decoration-thickness: 2px; }
.bk-cancelled-body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-sm); }
.bk-cancelled-body .ui-btn { min-height: var(--tap-min); }
.bk-cancelled-note { margin: 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.exp-refund-note { color: var(--info); }

/* #5760 — Bookings follows the boards. Scoped to .bk- / Bookings ids so the shared
   modal rules stay untouched. */
/* Phone sheets are cream, the token the Emailed in sheet gets from .df-modal-content */
#addBookingModal .modal-content { background: var(--df-panel); }
/* Opened sheet title carries the row's category icon (Detail.png) */
.bk-sheet-icon { flex: none; font-size: var(--fs-lg); color: var(--df-brand); }
.bk-sheet-icon[hidden] { display: none; }
/* Links are green: --df-brand is --vn-trail-green (#10702A light, #66BD80 dark), above 4.5:1 on --df-panel.
   Underlined and bold, so colour is never the only cue. */
.bk-fact-action { color: var(--df-brand); }
@media (min-width: 1024px) {
  .bk-opened-secondary { color: var(--df-brand); }
  /* Opened row (DeskBooked): apricot tint and a green bar at the left. aria-expanded
     still carries the state; the bar and tint are extra. */
  li.is-expanded > .bk-row {
    background: var(--df-ground);
    box-shadow: inset 4px 0 0 var(--df-brand);
  }
}

/* #5764 — room between the emailed-item file note and "Fill in from the file". */
#addBookingModal #bookingEmailProofNote { margin-bottom: var(--sp-sm); }

/* A plan's Edit and Delete, host and co-host only (#6050). */
.bk-plan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-sm); }
.bk-plan-more { position: relative; flex: none; }
.bk-plan-more-btn { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap-min); min-height: var(--tap-min); margin: calc(-1 * var(--sp-sm)) calc(-1 * var(--sp-sm)) 0 0; cursor: pointer; list-style: none; color: var(--df-ink-soft); }
.bk-plan-more-btn::-webkit-details-marker { display: none; }
.bk-plan-more-menu { position: absolute; right: 0; top: 100%; z-index: 2; display: flex; flex-direction: column; min-width: 140px; background: var(--df-instant-stock); border: 1px solid var(--df-ink); border-radius: 12px; overflow: hidden; }
.bk-plan-more-menu button { min-height: var(--tap-min); padding: 0 var(--sp-md); border: 0; background: none; color: var(--df-ink); font: inherit; text-align: left; cursor: pointer; }
.bk-plan-more-menu .bk-plan-more-danger { color: var(--danger-text); }

/* Host options sheet (#6057, PHostMenu): labelled rows with their current value. */
.bk-stay-host-btn { align-self: stretch; display: flex; align-items: center; justify-content: space-between; min-height: var(--tap-min); padding: 0 var(--sp-md); background: none; border: 2px solid var(--df-ink); border-radius: var(--radius-pill); color: var(--df-ink); font: inherit; font-weight: 600; cursor: pointer; }
/* Sits under the title: the body gap less one step. */
.bk-ho-sub { margin: calc(-1 * var(--sp-sm)) 0 0; color: var(--df-ink-soft); font-size: var(--fs-sm); }
.bk-ho-body { display: flex; flex-direction: column; }
.bk-ho-row { display: flex; align-items: center; gap: var(--sp-xs); width: 100%; min-height: var(--tap-min); padding: var(--sp-sm) 0; background: none; border: 0; border-bottom: 1px solid var(--df-ink-soft); color: var(--df-ink); font: inherit; font-size: var(--fs-md); text-align: left; cursor: pointer; }
.bk-ho-label { flex: 1; }
.bk-ho-value { color: var(--df-ink-soft); text-align: right; }
.bk-ho-value.bk-ho-open { color: var(--df-brand); font-weight: 400; }
.bk-ho-chev { transition: transform var(--dur-feedback) var(--ease-out); }
.bk-ho-row[aria-expanded="true"] .bk-ho-chev { transform: rotate(90deg); }
.bk-ho-removes { display: flex; flex-direction: column; padding: var(--sp-sm) 0; }
.bk-ho-remove { min-height: var(--tap-min); padding: 0 var(--sp-md); background: none; border: 0; border-bottom: 1px solid var(--df-ink-soft); color: var(--df-ink); font: inherit; text-align: left; cursor: pointer; }
.bk-ho-danger { align-self: flex-start; min-height: var(--tap-min); margin-top: var(--sp-sm); padding: 0; background: none; border: 0; color: var(--danger-text); font: inherit; font-weight: 600; cursor: pointer; }
.bk-ho-note { margin: var(--sp-sm) 0 0; color: var(--df-ink-soft); font-size: var(--fs-sm); }

/* "Looks right?" (#6056, Who5/Who5b/Who7): the file beside a short check form. */
.bk-plan-label { display: block; margin: 0 0 var(--sp-xs); color: var(--df-ink-soft); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.bk-lr-hint { margin: 0 0 var(--sp-sm); color: var(--df-ink-soft); font-size: var(--fs-sm); }
.bk-lr-file { margin: 0 0 var(--sp-md); }
.bk-lr-label { margin: 0 0 var(--sp-xs); color: var(--df-ink-soft); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.bk-lr-frame { height: 40vh; min-height: 220px; border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); background: var(--df-panel); overflow: hidden; }
.bk-lr-frame img, .bk-lr-frame iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
@media (min-width: 1024px) {
  #addBookingModal .modal-content.bk-looks-right { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--sp-md); align-content: start; max-width: 920px; }
  .bk-looks-right > .modal-header { grid-column: 1 / -1; }
  .bk-looks-right > .bk-lr-file { grid-column: 1; grid-row: 2 / span 40; margin: 0; }
  .bk-looks-right > .bk-lr-file .bk-lr-frame { height: 100%; min-height: 420px; }
  .bk-looks-right > *:not(.modal-header):not(.bk-lr-file) { grid-column: 2; }
}

/* In "Looks right?" the file box and the kind chips are settled (the file is beside the form; the plan fixed the kind), and the host's plan is a card. */
.bk-looks-right #bookingDropzoneGroup { display: none; }
.bk-looks-right #bookingKindGroup { display: none; }
.bk-looks-right .bk-plan-summary { padding: var(--sp-sm); background: var(--vn-amber-light); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); color: var(--df-ink); font-weight: 600; }

/* The ticket's Check in online row (#6058, PTicket). */
.bk-ticket-checkin { display: flex; align-items: center; gap: var(--sp-sm); width: 100%; min-height: var(--tap-min); padding: var(--sp-sm) var(--sp-sm); background: none; border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); color: var(--df-ink); font: inherit; text-align: left; cursor: pointer; }
.bk-ticket-checkin-box { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border: 2px solid var(--df-ink); border-radius: 6px; color: transparent; }
.bk-ticket-checkin[aria-checked="true"] .bk-ticket-checkin-box { background: var(--df-brand); border-color: var(--df-brand); color: var(--df-brand-fg); }
.bk-ticket-checkin-label { flex: 1; font-weight: 600; }
.bk-ticket-checkin-where { color: var(--df-brand); font-size: var(--fs-sm); font-weight: 600; }
.bk-ticket-time-unset { font-size: var(--fs-sm); font-weight: 600; color: var(--df-ink-soft); }

/* "Looks right?" for a transport plan: the board's short form (#6110, Who5, Who7). */
.bk-lr-caption { margin: var(--sp-xs) 0 0; color: var(--df-ink-soft); font-size: var(--fs-sm); }
.bk-lr-caption[hidden] { display: none; }
.bk-lr-transport #booking-travel-mode-picker { display: flex; flex-wrap: nowrap; gap: 0; border: 2px solid var(--df-ink); border-radius: var(--radius-pill); background: var(--df-panel); overflow: hidden; }
.bk-lr-transport #booking-travel-mode-picker .pax-btn { flex: 1; min-height: var(--tap-min); justify-content: center; border-color: transparent; border-radius: 0; box-shadow: none; background: transparent; }
.bk-lr-transport #booking-travel-mode-picker .pax-btn.sel { background: var(--df-ink); color: var(--on-selected); }
.bk-lr-transport #booking-travel-mode-picker .pax-btn i { display: none; }
.bk-lr-transport #bookingTravelFields { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--sp-sm); }
.bk-lr-transport #bookingTravelFields > .form-group:first-child { grid-column: 1 / -1; }

/* Plan a booking: explained ways to book, a needs line, and kinds behind More (#6104). */
.bk-plan-how .ui-seg { flex: 1 1 100%; }
/* The ways to book as picture cards (#6973): a specimen of what each makes, no paragraph. */
.bk-plan-how .ui-seg.bk-plan-cards { gap: var(--sp-sm); padding: 0; border: 0; border-radius: 0; background: none; }
.bk-plan-cards .bk-plan-card { flex: 1 1 0; min-width: 0; flex-direction: column; gap: var(--sp-sm); padding: var(--sp-md) var(--sp-sm); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); background: var(--df-panel); white-space: normal; }
.bk-plan-cards .bk-plan-card[aria-checked="true"] { background: var(--selected-bg); color: var(--on-selected); }
/* One row at 390px: a single ticket glyph leads, then the dashed tickets (one, or one each). */
.bk-plan-card-pic { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: var(--sp-xs); min-height: 32px; }
.bk-plan-card-pic > .ti { font-size: var(--fs-md); }
.bk-plan-card-ticket { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1.5px dashed currentColor; border-radius: 6px; }
.bk-plan-card-ini { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--edge-tone); color: var(--df-ink); font-size: var(--fs-xs); font-weight: 600; }
/* On the ink-filled selected card the initials invert, or they vanish into the fill. */
.bk-plan-cards .bk-plan-card[aria-checked="true"] .bk-plan-card-ini { background: var(--on-selected); color: var(--selected-bg); }
.bk-plan-card-more { font-size: var(--fs-xs); font-weight: 600; }
.bk-plan-card-label { font-size: var(--fs-sm); }
.bk-plan-needs { margin: var(--sp-sm) 0 0; color: var(--df-ink-soft); font-size: var(--fs-sm); font-weight: 600; }
.bk-plan-needs[hidden] { display: none; }
.bk-plan-more { background: none; }

/* After the trip: one route into Expenses for the bookings with no cost (#6103). */
.bk-nocost-route { margin: var(--sp-sm) 0 0; color: var(--df-ink-soft); font-size: var(--fs-sm); }
.bk-nocost-link { min-height: var(--tap-min); padding: 0; background: none; border: 0; color: var(--df-ink); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* To decide groups and the folded summary (#6102). */
.bk-decide-group { margin: var(--sp-sm) 0 var(--sp-xs); padding: 0 var(--sp-md); color: var(--df-ink-soft); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.bk-decide-split { margin-left: var(--sp-sm); color: var(--df-ink-soft); font-size: var(--fs-sm); font-weight: 600; }

/* ── #6422 Stay steps: a stay's forms as a step of the surface already open ──
   The step replaces the pane or sheet content; Back returns. Inputs inherit the
   shared 16px / 44px rule, so nothing here sets a font-size or input height. */
.bk-step { display: flex; flex-direction: column; gap: var(--sp-sm); animation: bk-step-in var(--dur-view) var(--ease-out) both; }
@keyframes bk-step-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.bk-step-back { align-self: flex-start; display: inline-flex; align-items: center; gap: var(--sp-xs); min-height: var(--tap-min); min-width: var(--tap-min); padding: 0; border: none; background: none; color: var(--df-ink); font: inherit; font-weight: 600; cursor: pointer; }
.bk-step-title { margin: 0; font-family: var(--df-sans); font-size: var(--fs-md); color: var(--df-ink); }
.bk-step-title:focus { outline: none; }
.bk-step-title:focus-visible { outline: 2px solid var(--df-ink); outline-offset: 4px; }
.bk-step-field { display: flex; flex-direction: column; gap: var(--sp-xs); }
.bk-step-dates { display: flex; gap: var(--sp-xs); }
.bk-step-dates input { flex: 1; min-width: 0; }
.bk-step-help, .bk-step-fixed { margin: 0; color: var(--df-ink-soft); font-size: var(--fs-xs); }
.bk-step-fixed { font-size: var(--fs-sm); color: var(--df-ink); }
.bk-step-price { display: flex; align-items: center; gap: var(--sp-xs); }
.bk-step-price input { flex: 1; min-width: 0; }
.bk-step-currency { font-weight: 600; color: var(--df-ink); }
.bk-step-link { align-self: flex-start; min-height: var(--tap-min); padding: 0; border: none; background: none; color: var(--df-ink); font: inherit; text-decoration: underline; cursor: pointer; }
.bk-step-actions .ui-btn--primary { width: 100%; }

/* ── #6423 Stay steps S4 to S7: host pick, who books, the booker's stub, sold out ── */
.bk-step-eyebrow { margin-bottom: calc(-1 * var(--sp-sm)); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--df-brand); }
.bk-pick-list { display: flex; flex-direction: column; }
.bk-pick-row, .bk-booker-row { border: 2px solid transparent; border-bottom-color: var(--df-hair); border-radius: var(--df-radius-card); }
.bk-pick-row[aria-checked="true"], .bk-booker-row.is-chosen { border-color: var(--df-ink); background: var(--df-panel); }
.bk-booker-row.is-chosen { border-color: var(--df-brand); }
.bk-pick-sub { font-size: var(--fs-xs); }
.bk-pick-votes { font-size: var(--fs-xs); font-weight: 600; color: var(--df-ink-soft); white-space: nowrap; }
.bk-pick-dot { flex: none; width: 24px; height: 24px; border: 2px solid var(--df-ink); border-radius: 50%; background: var(--df-panel); }
.bk-pick-row[aria-checked="true"] .bk-pick-dot { background: var(--df-ink); box-shadow: inset 0 0 0 5px var(--df-panel); }
.bk-booker-photo { flex: none; width: 44px; height: 44px; display: flex; }
.bk-booker-photo .member-avatar { width: 44px; height: 44px; font-size: var(--fs-sm); }
.bk-booker-row.is-chosen .bk-booker-photo .member-avatar { box-shadow: 0 0 0 3px var(--df-brand); }
.bk-booker-tick { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--df-brand); color: var(--df-brand-fg); }
.bk-booker-row.is-guest { opacity: 0.55; cursor: not-allowed; }
.bk-reason-chips { display: flex; flex-wrap: wrap; gap: var(--sp-xs); }
.bk-reason-chip { min-height: var(--tap-min); padding: 0 var(--sp-sm); border: 2px solid var(--df-ink); border-radius: var(--radius-pill); background: var(--df-panel); color: var(--df-ink); font: inherit; font-weight: 600; cursor: pointer; }
.bk-reason-chip[aria-pressed="true"] { background: var(--df-ink); color: var(--df-panel); }
.bk-soldout-preview { border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); background: var(--df-panel); }
.bk-soldout-struck, .bk-soldout-next { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm); padding: var(--sp-sm); }
.bk-soldout-struck { border-bottom: 1px solid var(--df-hair); }
.bk-soldout-name { font-weight: 600; text-decoration: line-through; color: var(--df-ink-soft); }
.bk-soldout-stamp { flex: none; padding: 2px var(--sp-sm); border: 2px solid var(--df-coral); border-radius: 4px; color: var(--df-coral); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; transform: rotate(-6deg); animation: bk-stamp-in var(--dur-state) var(--ease-out) both; }
@keyframes bk-stamp-in { from { opacity: 0; transform: rotate(-6deg) scale(1.6); } to { opacity: 1; transform: rotate(-6deg); } }
.bk-step-keep { align-self: center; text-decoration: none; font-weight: 600; }
.bk-step-actions { display: flex; flex-direction: column; gap: var(--sp-xs); }
.bk-stub { border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); background: var(--df-panel); }
.bk-stub-top { display: flex; flex-direction: column; gap: var(--sp-xs); padding: var(--sp-sm); }
.bk-stub-top .bk-stay-picked-name { font-family: var(--df-sans); }
.bk-stub-line { color: var(--df-ink-soft); font-size: var(--fs-sm); }
.bk-stub-tear { margin: 0 var(--sp-sm); border-top: 2px dashed var(--df-hair); }
.bk-stub-bottom { display: flex; justify-content: space-between; gap: var(--sp-sm); padding: var(--sp-sm); font-weight: 600; }
.bk-stub-voted { color: var(--df-ink-soft); }

/* ── #6424 S8 Booking details: the shared Add a booking form in its stay shape ── */
.bk-step-drop { display: flex; align-items: center; gap: var(--sp-sm); width: 100%; min-height: var(--tap-min); padding: var(--sp-sm) var(--sp-md); border: 2px dashed var(--df-ink); border-radius: var(--df-radius-card); background: transparent; color: var(--df-ink); font: inherit; text-align: left; cursor: pointer; }
.bk-step-drop > i { flex: none; font-size: var(--fs-xl); color: var(--df-brand); }
.bk-step-drop-text { display: flex; flex-direction: column; min-width: 0; }
.bk-step-drop-text strong { overflow-wrap: anywhere; }
.bk-step-drop-text span { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.bk-step-drop.dragover { background: var(--df-panel); border-style: solid; }
.bk-step-drop.has-file { border-style: solid; }
.bk-step-drop.parsing { opacity: 0.7; pointer-events: none; }
.bk-step-currency-select { flex: none; width: auto; min-width: 5.5em; font-weight: 600; }
.bk-step-split .bk-split-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm); padding: var(--sp-sm) var(--sp-sm); border-radius: var(--df-radius-card); background: var(--df-panel); }
.bk-step-split .split-summary { margin: 0; }
/* Save stays in view while the form scrolls, in the sheet and in the pane alike. */
.bk-step-actions--pinned { position: sticky; bottom: 0; z-index: 1; margin-inline: calc(-1 * var(--sp-sm)); padding: var(--sp-sm); background: var(--df-panel); border-top: 1px solid var(--df-hair); }

/* /css/expense-catch-up.css */
/* Issue #7365 (F16): "Add <name> to earlier expenses?" - the Expenses-tab card and its sheet. Tokens only. */
.cu-card { display: flex; align-items: center; gap: var(--sp-md); flex-wrap: wrap; margin: var(--sp-md) 0; padding: var(--sp-md) var(--sp-lg); background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--radius-card); color: var(--df-ink); }
.cu-card-icon { font-size: 22px; flex: none; }
.cu-card-text { flex: 1 1 14rem; min-width: 0; }
.cu-card-title { margin: 0; font-family: var(--df-sans); font-weight: 600; font-size: var(--fs-md); }
.cu-card-caption { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--df-ink-soft); }
.cu-card-actions { display: flex; gap: var(--sp-sm); flex-wrap: wrap; }
.cu-card-actions .ui-btn { min-height: var(--tap-min); }

.cu-list { list-style: none; margin: 0; padding: 0; border: 2px solid var(--df-ink); border-radius: var(--radius-card); overflow: hidden; background: var(--df-panel); }
.cu-row + .cu-row { border-top: var(--edge-hairline); }
.cu-row-label { display: flex; align-items: center; gap: var(--sp-md); min-height: var(--tap-min); padding: var(--sp-sm) var(--sp-md); cursor: pointer; }
.cu-row.is-disabled .cu-row-label { cursor: default; opacity: 0.62; }
.cu-box { flex: none; width: 24px; height: 24px; min-height: 0; margin: 0; accent-color: var(--df-brand); }
.cu-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cu-row-title { font-weight: 600; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.cu-row-sub { font-size: var(--fs-sm); color: var(--df-ink-soft); }
.cu-row-amt { flex: none; font-weight: 600; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.cu-empty { margin: 0; color: var(--df-ink-soft); font-size: var(--fs-md); }

/* The ticket: list on the cut stock, the share on an ink stub with a perforated edge (boards F16). */
.cu-eyebrow { margin: 0 0 2px; font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft); }
.cu-sheet .ui-sheet-close { border: 2px solid var(--df-ink); }
.cu-sheet .ui-sheet-foot { border-top: 0; padding: 0; gap: var(--sp-md); }
.cu-stub { position: relative; padding: var(--sp-lg); background: var(--df-ink); color: var(--df-panel); }
.cu-stub::before { content: ''; position: absolute; top: -7px; left: 0; right: 0; height: 14px; background: radial-gradient(circle at 7px 7px, var(--df-ink) 6px, transparent 6.5px) 0 0 / 18px 14px repeat-x; }
.cu-stub-label { margin: 0; font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.cu-stub-amount { margin: var(--sp-sm) 0 0; font-family: var(--df-display); font-weight: 800; font-size: var(--fs-figure-26, 32px); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cu-sheet .ui-btn--lg { width: 100%; }
.cu-sheet .ui-sheet-foot .ui-btn--ghost { color: var(--df-panel); }
@media (max-width: 1023px) {
  /* Phone: the stub is a full-bleed foot under the list. */
  .cu-sheet .ui-sheet-foot { margin: var(--sp-lg) calc(var(--sp-lg) * -1) calc(var(--sp-lg) * -1); padding: var(--sp-lg); background: var(--df-ink); }
  .cu-sheet .ui-sheet-foot .cu-stub { padding: 0; }
  .cu-sheet .ui-sheet-foot .cu-stub::before { top: calc(var(--sp-lg) * -1 - 7px); left: calc(var(--sp-lg) * -1); right: calc(var(--sp-lg) * -1); }
}
@media (min-width: 1024px) {
  /* Desktop: two panels. The list on the left, the stub on the right with its perforated edge. */
  .cu-sheet { max-width: 900px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto 1fr; column-gap: 0; padding: 0; overflow: hidden; }
  .cu-sheet > .cu-eyebrow, .cu-sheet > .ui-sheet-head, .cu-sheet > .ui-sheet-body { grid-column: 1; padding-inline: var(--sp-lg); }
  .cu-sheet > .cu-eyebrow { padding-top: var(--sp-lg); grid-row: 1; }
  .cu-sheet > .ui-sheet-head { grid-row: 2; }
  .cu-sheet > .ui-sheet-body { grid-row: 3; padding-bottom: var(--sp-lg); }
  .cu-sheet > .ui-sheet-foot { grid-column: 2; grid-row: 1 / span 4; display: flex; flex-direction: column; justify-content: space-between; padding: var(--sp-lg); background: var(--df-ink); color: var(--df-panel); }
  .cu-sheet > .ui-sheet-foot .cu-stub { padding: 0; }
  .cu-sheet > .ui-sheet-foot .cu-stub::before { top: 0; bottom: 0; left: -23px; right: auto; width: 14px; height: auto; background: radial-gradient(circle at 7px 7px, var(--df-ink) 6px, transparent 6.5px) 0 0 / 14px 18px repeat-y; }
  .cu-sheet > .ui-sheet-foot .cu-stub { flex: 1; }
}

/* /css/features/itinerary-agent.css */
/* Itinerary Agent — feature-flagged UI (see js/features/itinerary-agent/) */

/* Hidden by default; itinerary-agent.js only reveals these once it confirms
   the backend has FEATURE_ITINERARY_AGENT=true. Safe to leave this markup in
   index.html indefinitely even while the feature is off. */
.feature-itinerary-agent {
  display: none;
}

.agent-history-entry {
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  background: var(--df-panel);
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-md);
}

.agent-history-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.agent-history-kind {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--space-2xs) var(--space-sm);
  border-radius: var(--radius-pill);
  background: var(--vn-trail-green-light);
  color: var(--vn-trail-green);
}

/* Issue #5408 — the partial-plan notice above the preview's days, same
   amber-light/amber-text pairing as .agent-diff-empty. */
.agent-partial-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-md);
  margin-bottom: var(--space-lg);
  background: var(--info-light);
  color: var(--info);
  border-radius: var(--df-radius-stub);
  font-size: var(--fs-xs);
}
.agent-partial-notice > i { flex-shrink: 0; margin-top: 2px; }
.agent-partial-notice-body p { margin: 0; }
.agent-partial-notice-body p + p { margin-top: var(--space-sm); }
/* .btn-primary is full-width with a 1rem top margin app-wide; here it sizes
   to its label, like the History row's buttons. */
.agent-partial-notice .agent-partial-topup {
  width: auto;
  min-height: var(--tap-min);
  margin-top: var(--space-md);
}

.agent-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* The label buttons (Preview/Use this/Propose/Save) size to their text, but
   the icon-only delete button was shrinking to a bare tap-min sliver next to
   them, reading as a size mismatch in what's otherwise a row of pills.
   "Use this" also carries .btn-primary for its color — that app-wide rule
   is width:100%/margin-top:1rem (meant for a full-width standalone button),
   which forced it onto its own full-width line here. Reset both so every
   button in the row sizes the same way, to its own content. */
.agent-history-actions .btn-small {
  justify-content: center;
  min-width: var(--tap-min);
  width: auto;
  margin-top: 0;
}

.agent-history-empty {
  font-size: var(--fs-sm);
  color: var(--df-ink-soft);
  text-align: center;
  padding: 24px var(--space-md);
}

/* Read-only full-itinerary preview popup (agent-history-preview-modal) */
.agent-history-preview-day {
  margin-bottom: var(--space-xl);
}

.agent-history-preview-day-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--vn-trail-green);
  margin-bottom: var(--space-xs);
}

/* Issue #1210 item 4 — the first look while a draft is still being written. */

/* ── #5829 - the questions as a ticket stack inside the Itinerary tab ───────
   Built to docs/design/plan-with-ai/boards.html, section 4. Done = ink number
   block, open = amber block with an amber offset, to come = dashed edge. The
   page-level tokens (--df-*) carry dark mode. No motion, so no
   prefers-reduced-motion rule is needed. */
.plan-stack { display: flex; flex-direction: column; gap: var(--space-xl); padding: var(--space-2xl) 0 var(--space-3xl); color: var(--df-ink); }
.plan-head { display: flex; align-items: center; gap: var(--space-md); flex-wrap: wrap; }
.plan-head h2 { flex: 1; margin: 0; font: 600 var(--fs-xl)/1.2 var(--df-sans); letter-spacing: -0.01em; }
.plan-link, .plan-change {
  min-height: var(--tap-min); padding: 0 var(--space-md); background: none; border: 0; cursor: pointer;
  font: 600 var(--fs-md)/1 var(--df-sans); color: var(--df-brand); text-decoration: underline; text-underline-offset: 3px;
}
.plan-change { color: var(--df-ink); flex: none; }
.plan-from { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-md); font-size: var(--fs-sm); color: var(--df-ink-soft); }
.plan-from .label, .plan-known .label, .plan-subq .label { font: 700 var(--fs-xs)/1.3 var(--df-sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft); }
.plan-from-link { min-height: var(--tap-min); padding: 0 var(--space-xs); background: none; border: 0; cursor: pointer; color: var(--df-ink); font: inherit; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.plan-from b { font-weight: 600; }

.plan-stub {
  position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr);
  background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--df-ink);
}
.plan-stub .num { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 10px 6px; border-right: 2px dashed var(--df-ink); border-radius: 10px 0 0 10px; }
.plan-stub .num b { font: 600 var(--fs-xl)/1 var(--df-sans); }
.plan-stub .num .label { font: 700 var(--fs-xs)/1.2 var(--df-sans); text-align: center; text-transform: uppercase; letter-spacing: 0.06em; color: var(--df-ink-soft); }
.plan-stub .bd { display: flex; align-items: center; gap: var(--space-md); min-height: 60px; padding: var(--space-lg) var(--space-xl); min-width: 0; }
.plan-stub .v { flex: 1; min-width: 0; font-size: var(--fs-md); line-height: 1.4; }
.plan-stub .v small { display: block; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.plan-stub .v b { font-weight: 600; }
.plan-stub.is-done .num { background: var(--df-ink); color: var(--df-panel); }
.plan-stub.is-done .num .label { color: var(--df-panel); opacity: 0.8; }
.plan-stub.is-open { box-shadow: 5px 5px 0 var(--df-ink); }
.plan-stub.is-open .num { background: var(--selected-bg); color: var(--on-selected); }
.plan-stub.is-open .num .label { color: #101a14; }
.plan-stub.is-open .bd { display: block; padding: var(--space-xl) var(--space-2xl) var(--space-2xl); }
.plan-stub.is-todo { box-shadow: none; border-style: dashed; }
.plan-stub.is-todo .v { color: var(--df-ink-soft); }
.plan-qtitle { font: 600 var(--fs-lg)/1.2 var(--df-sans); letter-spacing: -0.01em; margin-bottom: var(--space-md); }
.plan-stub .wizard-chip-grid { gap: var(--space-md); margin: var(--space-md) 0; }
.plan-stub .wizard-chip { min-height: var(--tap-min); font: 600 var(--fs-md)/1.2 var(--df-sans); }
.plan-stub .wizard-chip:not(.agent-option) { width: auto; border-radius: 999px; padding: 0 var(--space-xl); }
.plan-stub .wizard-chip.selected { background: var(--selected-bg); border-color: var(--df-ink); color: var(--on-selected); }
.plan-stub .wizard-chip:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 3px; }
.plan-stub .wizard-chip-grid:has(> .wizard-chip:not(.agent-option)) { flex-direction: row; flex-wrap: wrap; }
.plan-stub .set-block-hint { margin: var(--space-sm) 0; font-size: var(--fs-sm); color: var(--df-ink-soft); }
.plan-subq { margin-top: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-sm); }
.plan-subq textarea, .plan-stub textarea { width: 100%; min-height: 64px; box-sizing: border-box; }
.plan-foot { display: flex; justify-content: flex-end; margin-top: var(--space-lg); }
.plan-foot .btn-secondary, .plan-gobar .btn-primary { min-height: var(--tap-min); }
.plan-gobar { display: flex; align-items: center; gap: var(--space-xl); flex-wrap: wrap; margin-top: var(--space-md); }
.plan-gobar .btn-primary { padding-inline: var(--space-4xl); border-radius: 999px; border: 2px solid var(--df-ink); background: var(--df-brand); color: var(--df-brand-fg); box-shadow: var(--df-press); font: 800 1rem/1 var(--df-sans); }
.plan-note { flex: 1 1 220px; max-width: 40ch; font-size: var(--fs-sm); line-height: 1.45; color: var(--df-ink-soft); }
/* Phone: "Plan my N days" stays on screen, pinned above the tab bar. */
@media (max-width: 680px) {
  .plan-stack { padding-bottom: calc(var(--space-3xl) + 72px); }
  .plan-stub { grid-template-columns: 64px minmax(0, 1fr); }
  .plan-stub .num .label { display: none; }
  .plan-adjust .num .label { display: block; } /* AA3: the ticket keeps "Ask AI" on a phone */
  .plan-gobar { position: sticky; bottom: calc(var(--tab-bar-h, 64px) + var(--space-md)); z-index: 5; margin-top: 0; }
  .plan-gobar .btn-primary { width: 100%; }
  .plan-note { display: none; }
}

/* "What the AI already knows": counts only, in the right rail above Ideas. */
.plan-known { background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: 12px; padding: var(--space-lg) var(--space-xl); margin-bottom: var(--space-xl); }
.plan-known .label { margin-bottom: var(--space-sm); }
.plan-known .row { display: flex; justify-content: space-between; gap: var(--space-md); font-size: var(--fs-sm); padding: var(--space-sm) 0; border-bottom: 2px dashed var(--df-hair); }
.plan-known .row:last-child { border-bottom: 0; }
.plan-known .row span:first-child { color: var(--df-ink-soft); }
.plan-known .row b { font-weight: 600; text-align: right; }
/* While the stack shows, the view switch and the right rail stay (the chooser hides them). */
@media (max-width: 1023px) { /* #6089: >=1024px the switch lives in the tab bar */
  #panel-itinerary.itin-choosing.itin-planning .itin-toolbar > .itin-view-toggle { display: flex !important; }
}
#panel-itinerary.itin-choosing.itin-planning .itin-layout:not(.ideas-in-drawer) #itin-ideas-sidebar { display: block !important; }
#panel-itinerary.itin-choosing.itin-planning .itin-layout { display: grid; }
/* #5935 - the day map never shows over the chooser or the stack. */
#panel-itinerary.itin-choosing.itin-planning #itin-day-map-card { display: none !important; }
@media (max-width: 1023px) {
  #panel-itinerary.itin-choosing.itin-planning #itin-ideas-sidebar { display: none !important; }
}

.agent-option { justify-content: space-between; gap: var(--space-md); padding: var(--space-lg) var(--space-xl); border-radius: 14px; }
.agent-option-text { display: grid; gap: 2px; min-width: 0; }
.agent-option-text b { font: 700 var(--fs-lg)/1.2 var(--df-sans); }
.agent-option-text small { font: 400 var(--fs-md)/1.35 var(--df-sans); opacity: 0.8; }
.agent-option-check { visibility: hidden; flex: none; }
.agent-option.selected .agent-option-check { visibility: visible; }

/* ── #5831/#6343 - generating and the draft, inside the Itinerary tab ───────
   Built to docs/design/plan-with-ai/boards.html, section 6 "After Generate",
   direction A (Ledger preview, founder 2026-11-12). The first look and the
   draft share the timeline's Route Ledger construction (css/style.css,
   .day-box-pin and #itinerary-content .day-box-stops): an amber day pin, the
   date as the title, a time column, a dashed amber route with Cut Stock nodes.
   The draft adds a photo and a 44px link button in fixed right-hand columns.
   No motion, so no prefers-reduced-motion rule is needed. */
.plan-run-note { margin: 0; font-size: var(--fs-md); color: var(--df-ink-soft); }
.plan-error {
  margin: 0; padding: var(--space-lg) var(--space-xl); border: 2px solid var(--df-ink); border-radius: 12px;
  background: var(--danger-light); color: var(--df-ink); font-size: var(--fs-md);
}
.plan-info {
  display: flex; align-items: center; gap: var(--space-sm); margin: 0;
  padding: var(--space-sm) var(--space-lg); border: 2px solid var(--df-ink); border-radius: 10px;
  background: var(--vn-green-light); color: var(--df-ink); font-size: var(--fs-sm);
}
.plan-ghosts { display: grid; gap: var(--space-md); padding-top: var(--space-lg); }
.plan-prefs-note .set-block-hint { margin: 0; font-size: var(--fs-sm); color: var(--df-ink-soft); }

/* The Ledger: one day head per day, then its stops. */
.plan-ledger { --pl-time: 3.75rem; --pl-gut: 28px; --pl-photo: 56px; display: flex; flex-direction: column; }
.plan-day-head { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-xl) 0 var(--space-xs); }
.plan-day-pin {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; box-sizing: border-box;
  background: var(--df-amber); border: 2px solid var(--df-ink); color: var(--df-amber-fg);
  font: 800 var(--fs-sm)/1 var(--df-display);
}
.plan-day-headtext { min-width: 0; }
.plan-day-title { margin: 0; font: 600 var(--fs-md)/1.25 var(--df-sans); letter-spacing: -0.02em; }
.plan-day-cap { font-size: var(--fs-sm); line-height: 1.35; color: var(--df-ink-soft); }
.plan-day.is-missing .plan-day-pin { background: var(--df-panel); border-style: dashed; color: var(--df-ink-soft); }
.plan-day.is-missing .plan-day-title { color: var(--df-ink-soft); }

.plan-rows { position: relative; list-style: none; margin: 0; padding: 0; }
.plan-rows::before {
  content: ''; position: absolute; top: 0; bottom: 0; width: 3px; pointer-events: none;
  left: calc(var(--pl-time) + var(--pl-gut) / 2 - 1.5px);
  background-image: repeating-linear-gradient(to bottom, var(--vn-amber) 0, var(--vn-amber) 9px, transparent 9px, transparent 18px);
}
.plan-row {
  position: relative; display: grid; align-items: start; padding: var(--space-md) 0;
  grid-template-columns: var(--pl-time) var(--pl-gut) minmax(0, 1fr) calc(var(--pl-photo) + var(--space-md)) calc(var(--tap-min) + var(--space-md));
}
.plan-ledger.is-first-look .plan-row { grid-template-columns: var(--pl-time) var(--pl-gut) minmax(0, 1fr); }
/* The node: Cut Stock circle, 2px ink keyline, sat on the route. */
.plan-row::before {
  content: ''; position: absolute; z-index: 1; top: calc(var(--space-md) + 4px);
  left: calc(var(--pl-time) + var(--pl-gut) / 2 - 7px); width: 14px; height: 14px; box-sizing: border-box;
  border: 2px solid var(--df-ink); border-radius: 50%; background: var(--df-panel);
}
.plan-row-time { grid-column: 1; font: 600 var(--fs-xs)/1.4 var(--df-sans); font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 1px; }
.plan-row-time.is-empty { color: var(--df-ink-soft); font-weight: 400; }
.plan-row-body { grid-column: 3; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.plan-row-name { display: flex; align-items: center; gap: var(--space-xs); font: 600 var(--fs-md)/1.35 var(--df-sans); overflow-wrap: anywhere; }
.plan-row-name i { flex: none; font-size: 16px; line-height: 1; color: var(--plan-cat, var(--df-ink-soft)); }
.plan-row-meta, .plan-row-note, .plan-row-suggestion { font-size: var(--fs-sm); line-height: 1.4; }
.plan-row-meta { color: var(--df-ink-soft); }
.plan-row-suggestion { font-weight: 600; color: var(--info); }
.plan-row-photo { grid-column: 4; justify-self: end; }
.plan-row-photo img {
  display: block; width: var(--pl-photo); height: var(--pl-photo); object-fit: cover;
  border: 2px solid var(--df-ink); border-radius: 3px; background: var(--df-panel);
}
.plan-row-linkcell { grid-column: 5; justify-self: end; padding-top: calc((var(--pl-photo) - var(--tap-min)) / 2); }
.plan-row-link {
  display: grid; place-items: center; width: var(--tap-min); height: var(--tap-min); box-sizing: border-box;
  border: 2px solid var(--df-ink); border-radius: 50%; background: var(--df-panel); color: var(--df-ink);
  font-size: var(--fs-lg); text-decoration: none;
}
.plan-row-link:hover { background: var(--df-ink); color: var(--df-panel); }
.plan-row-link:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 2px; }
.plan-row.plan-cat-food       { --plan-cat: var(--vn-pandan); }
.plan-row.plan-cat-transport  { --plan-cat: var(--vn-sky-text); }
.plan-row.plan-cat-shopping   { --plan-cat: var(--vn-batik); }
.plan-row.plan-cat-hotel      { --plan-cat: var(--vn-indigo-text); }
.plan-row.plan-cat-activity   { --plan-cat: var(--vn-green); }
.plan-row.plan-cat-attraction { --plan-cat: var(--vn-purple-text); }

/* While the draft shows, its own answers rail stands where Ideas was and the
   draft takes the tab's full width (the panel class is set by
   _syncItinChooserClass(), js/itinerary.js). */
#panel-itinerary.itin-choosing.itin-planning.itin-plan-draft .itin-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "daylist"; }
#panel-itinerary.itin-choosing.itin-planning.itin-plan-draft .itin-layout:not(.ideas-in-drawer) #itin-ideas-sidebar,
#panel-itinerary.itin-choosing.itin-planning.itin-plan-draft #itin-right-rail,
#panel-itinerary.itin-choosing.itin-planning.itin-plan-draft #ideas-col-resizer { display: none !important; }

/* The draft: heading, Estimated spend, the answers, the days, the bar. A rail
   with the answers once the tab is wide enough; one line otherwise. */
.plan-draft { container: plan-draft / inline-size; }
.plan-draft-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3xl); align-items: start; }
.plan-draft-main { display: flex; flex-direction: column; gap: var(--space-lg); min-width: 0; }
.plan-draft-head { align-items: flex-start; }
.plan-draft-title { flex: 1; min-width: 0; }
.plan-draft-title h2 { margin: 0; font: 600 var(--fs-xl)/1.2 var(--df-sans); letter-spacing: -0.01em; }
.plan-draft-cap { font-size: var(--fs-sm); color: var(--df-ink-soft); }
.plan-change-answers { display: none; }
.plan-spend {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-xs) var(--space-md); margin: 0;
  padding: var(--space-sm) var(--space-lg); border: 2px dashed var(--df-ink); border-radius: 12px; font-size: var(--fs-sm);
}
.plan-spend .label, .plan-answers .label { font: 700 var(--fs-xs)/1.3 var(--df-sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft); }
.plan-spend b { font-weight: 600; }
.plan-answers-line {
  display: flex; align-items: center; gap: var(--space-sm); min-height: var(--tap-min);
  font-size: var(--fs-sm); color: var(--df-ink-soft); border-bottom: 2px solid var(--df-hair);
}
.plan-answers-line > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-answers-line .plan-link { padding-inline: 0; font-size: var(--fs-sm); }
.plan-answers { display: none; background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: 12px; padding: var(--space-lg) var(--space-xl); }
.plan-answers .row { display: flex; justify-content: space-between; gap: var(--space-md); font-size: var(--fs-sm); padding: var(--space-sm) 0; border-bottom: 2px dashed var(--df-hair); }
.plan-answers .row span:first-child { color: var(--df-ink-soft); }
.plan-answers .row b { font-weight: 600; text-align: right; }
.plan-answers .plan-answers-change { width: 100%; margin: var(--space-md) 0 0; min-height: var(--tap-min); border-radius: 999px; }
@container plan-draft (min-width: 820px) {
  .plan-draft-cols { grid-template-columns: minmax(0, 1fr) 260px; }
  .plan-answers { display: block; position: sticky; top: var(--space-lg); }
  .plan-answers-line { display: none; }
  .plan-change-answers { display: inline-flex; align-items: center; }
}

/* The draft bar floats on Cut Stock, 16px off the window edge, so its press
   shadows are never clipped. It is the last thing in the column, so at the
   end of the list it sits below the last stop instead of over it. */
.plan-draftbar {
  position: sticky; bottom: var(--space-lg); z-index: 5;
  display: flex; align-items: center; gap: var(--space-md) var(--space-lg); flex-wrap: wrap;
  margin-top: var(--space-md); padding: var(--space-md) var(--space-lg);
  background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: 14px;
}
.plan-apply { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-xs); }
.plan-apply-hint { margin: 0; font-size: var(--fs-sm); line-height: 1.4; color: var(--df-ink-soft); max-width: 46ch; }
.plan-apply-solo { flex: 1 1 260px; }
.plan-draftbar .plan-seg { display: inline-flex; flex-wrap: nowrap; gap: 0; align-self: flex-start; border: 2px solid var(--df-ink); border-radius: 999px; overflow: hidden; background: var(--df-panel); }
.plan-draftbar .plan-seg .pax-btn {
  border: 0; border-radius: 0; max-width: none; margin: 0; padding: 0 var(--space-lg);
  background: transparent; color: var(--df-ink); font: 600 var(--fs-sm)/1 var(--df-sans);
}
.plan-draftbar .plan-seg .pax-btn + .pax-btn { border-left: 2px solid var(--df-ink); }
.plan-draftbar .plan-seg .pax-btn.sel { background: var(--df-ink); color: var(--df-panel); }
.plan-draftbar-btns { display: flex; align-items: center; gap: var(--space-md); margin-left: auto; }
.plan-draftbar-btns .btn-primary, .plan-draftbar-btns .btn-secondary {
  width: auto; margin: 0; min-height: var(--tap-min); padding-inline: var(--space-2xl); border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); white-space: nowrap;
}
/* Phone: a narrower time column and 44px photos; the bar sits above the trip
   tab bar, Add to my plan full width with Try again and Discard under it. */
@media (max-width: 680px) {
  .plan-ledger { --pl-time: 3.1rem; --pl-gut: 22px; --pl-photo: 44px; }
  .plan-row { grid-template-columns: var(--pl-time) var(--pl-gut) minmax(0, 1fr) calc(var(--pl-photo) + var(--space-sm)) calc(var(--tap-min) + var(--space-sm)); }
  .plan-draftbar { bottom: calc(var(--tab-bar-h, 64px) + var(--space-md)); flex-direction: column; align-items: stretch; padding: var(--space-md); }
  .plan-apply, .plan-apply-solo { flex: none; }
  .plan-apply-solo { display: none; }
  .plan-draftbar .plan-seg { display: flex; align-self: stretch; }
  .plan-draftbar .plan-seg .pax-btn { flex: 1; }
  .plan-draftbar-btns { flex-wrap: wrap; margin-left: 0; }
  .plan-draftbar-btns .btn-primary { order: -1; flex: 1 1 100%; min-height: 52px; font-size: var(--fs-md); }
  .plan-draftbar-btns .btn-secondary { order: 0; }
  .plan-draftbar-btns .plan-link { order: 1; margin-left: auto; }
}

/* #6343 - the draft's buttons and partial notice in the board's construction:
   Cut Stock or Pressable Green, 2px ink keyline, the press shadow. */
.plan-draft .btn-secondary, .plan-draft .plan-answers-change {
  background: var(--df-panel); color: var(--df-ink); border: 2px solid var(--df-ink); box-shadow: var(--df-press);
  font: 600 var(--fs-md)/1 var(--df-sans);
}
.plan-draft .plan-draftbar .btn-primary, .plan-draft .agent-partial-topup {
  background: var(--df-brand); color: var(--df-brand-fg); border: 2px solid var(--df-ink); box-shadow: var(--df-press);
  font: 600 var(--fs-md)/1 var(--df-sans); border-radius: 999px;
}
.plan-draft .agent-partial-notice {
  margin: 0; padding: var(--space-md) var(--space-lg); border: 2px solid var(--df-ink); border-radius: 12px;
  background: var(--info-light); color: var(--df-ink); font-size: var(--fs-sm);
}
.plan-draft .agent-partial-notice > i { color: var(--info); font-size: var(--fs-lg); }
.plan-draft .agent-partial-topup { display: inline-flex; align-items: center; gap: var(--space-xs); padding-inline: var(--space-xl); }

/* ── #6350 - Adjust, Surprise me and Past plans, inside the Itinerary tab ───
   Built to docs/design/plan-with-ai/boards.html, section 7, direction A
   (founder, 2026-11-12). The Adjust ticket is the stack's own open stub, set
   inside its day; its result, Surprise me's draft and a past plan reuse the
   draft's Ledger. Change marks are text first (New / Edited / Removed), the
   colour is reinforcement. No motion, so no prefers-reduced-motion rule. */
.plan-eyebrow { display: block; font: 700 var(--fs-xs)/1.3 var(--df-sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft); }
.plan-eyebrow.is-soft { color: var(--df-ink-soft); }

/* The ticket in a day: the open stub, between the day head and its stops. */
.day-box .plan-adjust { margin: var(--space-md) 0 var(--space-lg); color: var(--df-ink); }
.plan-adjust .plan-qtitle { margin-bottom: var(--space-xs); }
.plan-adjust .set-block-hint { margin: 0 0 var(--space-md); }
.plan-adjust-text { display: block; width: 100%; min-height: 76px; box-sizing: border-box; resize: vertical; }
.plan-adjust .plan-adjust-chips { flex-direction: row; flex-wrap: wrap; }
.plan-adjust-foot { align-items: center; gap: var(--space-md); flex-wrap: wrap; }
.plan-adjust-foot .ai-quota-hint { flex: 1 1 180px; margin: 0; font-size: var(--fs-sm); color: var(--df-ink-soft); }
.plan-adjust-foot .btn-primary {
  width: auto; margin: 0; min-height: var(--tap-min); padding-inline: var(--space-2xl); border-radius: 999px;
  display: inline-flex; align-items: center; gap: var(--space-xs); white-space: nowrap;
}
.plan-adjust-foot .btn-primary:disabled { opacity: 0.45; box-shadow: none; cursor: not-allowed; }
.plan-adjust .progress-track { margin: var(--space-md) 0 var(--space-sm); }

/* A notice inside the ticket or above a result: coral for a failure, amber for
   a wait (rate limit), green for information. */
.plan-notice {
  display: flex; gap: var(--space-md); align-items: flex-start; margin: 0 0 var(--space-md);
  padding: var(--space-md) var(--space-lg); border: 2px solid var(--df-ink); border-radius: 12px;
  background: var(--info-light); font-size: var(--fs-sm); line-height: 1.45;
}
.plan-notice > i { flex: none; font-size: var(--fs-lg); color: var(--info); margin-top: 1px; }
.plan-notice p { margin: 0 0 var(--space-sm); }
.plan-notice p:last-child { margin-bottom: 0; }
.plan-notice .btn-secondary { width: auto; margin: 0; min-height: var(--tap-min); border-radius: 999px; padding-inline: var(--space-xl); display: inline-flex; align-items: center; gap: var(--space-xs); }
.plan-notice.is-wait { background: var(--df-panel); }
.plan-notice.is-wait > i { color: var(--df-ink-soft); }
.plan-notice.is-info { background: var(--vn-green-light); }
.plan-notice.is-info > i { color: var(--vn-green); }

/* "You asked: …" over an Adjust result. */
.plan-asked {
  display: flex; align-items: center; gap: var(--space-xs) var(--space-md); flex-wrap: wrap;
  padding: var(--space-xs) var(--space-lg); border: 2px dashed var(--df-ink); border-radius: 12px; font-size: var(--fs-sm);
}
.plan-asked .label { font: 700 var(--fs-xs)/1.3 var(--df-sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft); }
.plan-asked-q { flex: 1 1 200px; min-width: 0; font: 600 var(--fs-md)/1.35 var(--df-sans); }
.plan-asked .plan-link { padding-inline: 0; }

/* Change marks: a label-tier tag after the stop's name. */
.plan-mark {
  display: inline-block; flex: none; margin-left: var(--space-xs); padding: 0 var(--space-sm);
  border: 2px solid var(--df-ink); border-radius: 999px; white-space: nowrap;
  font: 700 var(--fs-xs)/1.6 var(--df-sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--df-ink);
}
.plan-mark-new { background: var(--vn-green-light); }
.plan-mark-edit { background: var(--info-light); }
.plan-mark-gone { background: var(--danger-light); }
.plan-legend { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }
.plan-legend .plan-mark { margin-left: 0; }
.plan-legend-cap { margin-left: var(--space-sm); font-size: var(--fs-sm); color: var(--df-ink-soft); }
.plan-row.is-new { background: linear-gradient(90deg, var(--vn-green-light), transparent 70%); border-radius: 10px; }
.plan-row.is-new::before { background: var(--vn-green); }
.plan-row.is-edit::before { background: var(--info); }
.plan-row.is-gone::before { border-style: dashed; background: transparent; }
.plan-row.is-gone .plan-row-nm, .plan-row.is-gone .plan-row-time { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--df-ink-soft); }
.plan-row.is-gone .plan-row-photo img { opacity: 0.4; filter: grayscale(1); }
.plan-row-was { font-weight: 600; color: var(--info); }
/* A day the change didn't touch: its head only. */
.plan-day-fold { display: flex; align-items: center; gap: var(--space-md); }
.plan-day-fold .plan-day-head { flex: 1; min-width: 0; padding-block: var(--space-md) 0; }
.plan-day.is-folded .plan-day-pin { background: var(--df-panel); color: var(--df-ink-soft); }
.plan-unchanged { flex: none; font: 600 var(--fs-xs)/1.6 var(--df-sans); color: var(--df-ink-soft); border: 2px dashed var(--df-hair); border-radius: 999px; padding: 0 var(--space-md); margin-top: var(--space-md); }

/* Surprise me: what it picked, and the "nothing asked" line on every width. */
.plan-picked {
  display: flex; gap: var(--space-lg); align-items: center; padding: var(--space-md) var(--space-lg);
  border: 2px solid var(--df-ink); border-radius: 12px; background: var(--df-panel); font-size: var(--fs-sm); line-height: 1.4;
}
.plan-picked p { margin: 0; }
.plan-picked-stamp {
  flex: none; display: inline-block; transform: rotate(-2.6deg); padding: 0.04em 0.2em 0.09em;
  border: 2px solid var(--vn-coral-text); border-radius: 0.14em; color: var(--vn-coral-text);
  font: 800 1.125rem/1 var(--df-display); letter-spacing: -0.03em; text-transform: uppercase;
}
@container plan-draft (min-width: 820px) {
  .plan-answers-line.plan-answers-line-always { display: flex; }
}
.plan-answers-line-always > span { white-space: normal; }

/* Past plans: one list of done stubs. The stub's text is the open button;
   save and ⋯ are 44px icon buttons. */
.plan-past-filter { display: inline-flex; align-self: flex-start; flex-wrap: nowrap; gap: 0; border: 2px solid var(--df-ink); border-radius: 999px; overflow: hidden; background: var(--df-panel); }
.plan-past-filter .pax-btn { border: 0; border-radius: 0; max-width: none; margin: 0; min-height: var(--tap-min); padding: 0 var(--space-lg); background: transparent; color: var(--df-ink); font: 600 var(--fs-sm)/1 var(--df-sans); }
.plan-past-filter .pax-btn + .pax-btn { border-left: 2px solid var(--df-ink); }
.plan-past-filter .pax-btn.sel { background: var(--df-ink); color: var(--df-panel); }
.plan-past-list { display: flex; flex-direction: column; gap: var(--space-lg); max-width: 760px; }
.plan-past-stub.is-done .num { background: var(--df-panel); color: var(--df-ink); }
.plan-past-stub.is-done .num .label { color: var(--df-ink-soft); opacity: 1; }
.plan-past-stub.is-saved .num { background: var(--df-ink); color: var(--df-panel); }
.plan-past-stub.is-saved .num .label { color: var(--df-panel); opacity: 0.8; }
.plan-past-stub .bd { padding-block: var(--space-sm); padding-right: var(--space-sm); gap: 0; }
.plan-past-open {
  flex: 1; min-width: 0; min-height: var(--tap-min); display: flex; align-items: center; text-align: left;
  padding: 0; background: none; border: 0; cursor: pointer; color: var(--df-ink); font: inherit;
}
.plan-past-open:focus-visible, .plan-icon-btn:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 2px; border-radius: 8px; }
.plan-past-open .plan-mark { margin-left: var(--space-xs); }
.plan-icon-btn {
  flex: none; display: grid; place-items: center; width: var(--tap-min); height: var(--tap-min);
  border: 0; border-radius: 50%; background: none; color: var(--df-ink); font-size: var(--fs-lg); cursor: pointer;
}
.plan-icon-btn.is-on { color: var(--df-brand); }
.plan-icon-btn:hover { background: var(--df-hair); }
.plan-past-menu {
  grid-column: 1 / -1; display: flex; gap: var(--space-md); flex-wrap: wrap; justify-content: flex-end;
  padding: var(--space-md) var(--space-lg); border-top: 2px dashed var(--df-ink);
}
.plan-past-menu .btn-secondary { width: auto; margin: 0; min-height: var(--tap-min); border-radius: 999px; padding-inline: var(--space-xl); display: inline-flex; align-items: center; gap: var(--space-xs); }
.plan-past-menu .plan-danger { color: var(--error-text); }
.plan-empty {
  max-width: 560px; text-align: center; padding: var(--space-4xl) var(--space-xl);
  border: 2px dashed var(--df-ink); border-radius: 14px; background: var(--df-panel);
}
.plan-empty i { display: block; font-size: var(--fs-2xl); color: var(--df-ink-soft); margin-bottom: var(--space-sm); }
.plan-empty b { display: block; font: 600 var(--fs-lg)/1.25 var(--df-sans); }
.plan-empty p { max-width: 34ch; margin: var(--space-sm) auto var(--space-lg); font-size: var(--fs-sm); line-height: 1.45; color: var(--df-ink-soft); }
.plan-empty .btn-secondary { width: auto; margin: 0; min-height: var(--tap-min); border-radius: 999px; padding-inline: var(--space-2xl); }
@media (max-width: 680px) {
  .plan-past-stub { grid-template-columns: 64px minmax(0, 1fr); }
  .plan-past-stub .num .label { display: block; }
  .plan-past-list { max-width: none; }
}

/* /css/features/weather-forecast.css */
/* Weather Forecast — feature-flagged UI (see js/features/weather-forecast/) */

/* Hidden by default; weather-forecast.js only reveals a given day's chip once
   the backend has FEATURE_WEATHER_FORECAST=true, the itinerary is locked, and
   that day falls within 3 days of today. Safe to leave this markup in
   index.html indefinitely even while the feature is off. */
.feature-weather {
  display: none;
}

/* Sits inside .day-box-header, alongside .day-box-spend/.day-box-split-btn/
   .day-box-history-btn — same --on-brand-fill treatment and inherited
   foreground as those three (see css/style.css), not a literal white. A
   literal white/rgba(255,255,255,…) pair on that header's --vn-trail-green fill is
   the Mint Flip Rule bug (issue #432): --vn-trail-green is a bright mint after
   dark, where literal white measured 1.31:1. This file isn't scanned by
   test/brand-field-contrast.test.js (style.css only), which is exactly how
   this one went unnoticed while its siblings were fixed. */
/* #6863, W-W1: a 2px pill in the header's foreground colour, no shadow (it is not pressable), a 16px glyph,
   then "high / low" in tabular figures. */
.weather-chip:not(.feature-weather) { display: inline-flex; }
.weather-chip {
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 8px 0 4px;
  border: 2px solid currentColor;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: inherit;
  white-space: nowrap;
}
.weather-chip .weather-glyph { flex: none; font-size: 16px; width: 16px; height: 16px; }

/* /css/features/idea-pool.css */
/* Generate Ideas — feature-flagged UI (see js/features/idea-pool/, issue #174) */

/* Unlike css/features/itinerary-agent.css's `.feature-itinerary-agent`
   convention, there's no single hidden-by-default class here: every element
   this feature touches is rebuilt fresh on each renderIdeasSidebar() call
   (js/itinerary.js), so a class-based reveal wouldn't survive the next
   render — the JS itself gates on window.__FEATURES__?.ideaPool before ever
   emitting this markup. This file is purely the strip's visual styling. */

/* The Ideas header's one accent, and the panel's only AI action. It carried
   `background: rgba(255,255,255,0.22); color: #fff` from the era when this
   header was a solid amber bar — after #447 turned the header neutral that
   is a white pill with a white glyph on a near-white surface, i.e. no
   affordance at all. A Trail Green Mist fill with a Trail Green glyph reads
   as a button on the neutral header and inverts to solid on hover. */
.ideas-sidebar-generate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  flex-shrink: 0;
  min-height: var(--tap-min);
  padding: 0 var(--space-xl);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--vn-trail-green-light);
  color: var(--vn-trail-green);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  position: relative;
  transition: background var(--dur-feedback) var(--ease-out),
              color var(--dur-feedback) var(--ease-out);
}
.ideas-sidebar-generate-btn:hover {
  background: var(--vn-trail-green);
  color: var(--surface-2);
}
.ideas-sidebar-generate-btn:disabled {
  cursor: default;
  opacity: 0.7;
}
/* Issue #784 — a slow ambient "still working" signal on the header glyph
   itself, cheaper and calmer than layering anything onto the skeleton card
   below it. Answered in the prefers-reduced-motion block at the end of
   style.css (resolves to the glyph's normal, finished scale/opacity, never
   a hidden one). */
@keyframes idea-sparkle-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.15); }
}
.ideas-sidebar-generate-btn.loading .ti-sparkles {
  animation: idea-sparkle-pulse 1.4s var(--ease-out) infinite;
}

/* "Add your own" — the quiet sibling of Suggest places. Keeps its id so the
   drag-to-delete swap (js/itinerary.js) still finds it. */
.ideas-add-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--tap-min);
  padding: 0 var(--space-xl);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
}
.ideas-add-btn:hover { background: var(--vn-trail-green-light); }

/* Pill used for the recovery actions inside the suggestion empty/error lines. */
.ideas-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--tap-min);
  padding: 0 var(--space-xl);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
}
.ideas-pill-btn:hover { background: var(--vn-trail-green-light); }

.idea-suggestions-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
}

/* Issue #734 Part A — a dashed border (vs the solid border on the user's own
   .idea-card stops) marks a suggestion as "not yours yet / a copy". The
   distinction has to survive into the Part F picker, where both appear side by
   side. */
.idea-suggestion-card {
  display: flex;
  gap: var(--space-md);
  border: 2px dashed var(--df-ink);
  border-radius: var(--df-radius-card);
  background: var(--df-panel);
  box-shadow: var(--df-press);
  overflow: hidden;
}

/* A real <img>, not a background-image div: it gets lazy loading, and
   `onerror="this.remove()"` (the convention renderStopCard()'s thumbnails
   already use) so a dead photo URL collapses the column instead of leaving a
   permanent 56px grey bar. The old inline `url('...')` also interpolated a
   URL that escHtml() does not escape apostrophes in. */
.idea-suggestion-photo {
  flex-shrink: 0;
  width: 56px;
  align-self: stretch;
  object-fit: cover;
  background: var(--df-panel);
}

.idea-suggestion-body {
  flex: 1;
  min-width: 0;
  padding: var(--space-md) var(--space-lg) var(--space-md) 0;
}
.idea-suggestion-photo + .idea-suggestion-body { padding-left: 0; }
.idea-suggestion-card:not(:has(.idea-suggestion-photo)) .idea-suggestion-body { padding-left: var(--space-lg); }

/* Badge + text column, the same shape a saved idea card uses one row below
   (.itin-stop-card.idea-card .stop-summary-row) — so the name and its city
   line share a left edge instead of the city starting back under the icon. */
.idea-suggestion-head {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

/* Matches the 30px circular category badge every saved idea card in this same
   panel already uses (.itin-stop-card.idea-card .cat-pill, css/style.css) —
   the suggestion card used to show a bare monochrome ti-* glyph instead, so
   the Category Compass hue was missing on exactly the card that introduces a
   place, then appeared on the card it turned into once kept. */
.idea-suggestion-head .cat-pill {
  width: 30px;
  height: 30px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  font-size: var(--fs-md);
  flex-shrink: 0;
}

.idea-suggestion-headtext {
  min-width: 0;
}

.idea-suggestion-name {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.3;
}

.idea-suggestion-city {
  display: block;
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin-top: 1px;
}

.idea-suggestion-blurb {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin-top: var(--space-xs);
  line-height: 1.35;
}

.idea-suggestion-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-xs);
  color: var(--vn-trail-green);
  margin-top: var(--space-xs);
}

.idea-suggestion-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

/* Built from js/skeleton.js's shared shapes now (skeletonSuggestionCard())
   rather than a hand-rolled background-position shimmer that
   painted a flat 64px bar, animated a paint property instead of a transform,
   and — being its own @keyframes — was never answered in style.css's
   prefers-reduced-motion block. css/skeleton.css already covers all three. */
.idea-suggestion-skeleton {
  display: block;
  padding: var(--space-md) var(--space-lg);
}
.idea-suggestion-skeleton .skeleton-row { align-items: flex-start; }

.idea-suggestions-empty {
  padding: var(--space-xl) var(--space-2xl);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  text-align: center;
}

/* /css/features/template-grounding.css */
/* Template grounding — AI generation grounding, share-as-template, and the
   "Suggest a stop" helper (issue #135, see js/features/template-grounding/).
   No hidden-by-default class here — unlike css/features/itinerary-agent.css's
   .feature-itinerary-agent convention, every element this feature touches is
   rebuilt fresh on each render and gates on window.__FEATURES__?.templateGrounding
   inline at that point (same reasoning as css/features/idea-pool.css). The
   suggestion cards themselves reuse idea-pool.css's .idea-suggestion-* classes
   directly rather than duplicating them — this file is just the category picker. */

.suggest-stop-categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding: var(--space-lg) 0 var(--space-xs);
}

.suggest-stop-categories .btn-small {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

/* /css/features/itinerary-proposals.css */
/* Itinerary Proposals — feature-flagged UI (see js/features/itinerary-proposals/) */

/* Hidden by default; itinerary-proposals.js only reveals this once it
   confirms the backend has FEATURE_ITINERARY_PROPOSALS=true. Safe to leave
   this markup in index.html indefinitely even while the feature is off.
   Content styling (.agent-history-entry, .agent-diff-row, etc.) is reused
   verbatim from css/features/itinerary-agent.css — those classes are
   generic, not itinerary-agent-specific, and that stylesheet is always
   loaded regardless of which feature flags are on. */
.feature-itinerary-proposals {
  display: none;
}

/* ── Sandbox editor (issue #353) ─────────────────────────────────────── */

.proposal-seed-choices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.proposal-clone-picker {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.proposal-clone-option {
  width: 100%;
  justify-content: flex-start;
}

.proposal-entry-note {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin-bottom: var(--space-sm);
}

.proposal-list-group-label {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--df-ink-soft);
  margin: var(--space-lg) 0 var(--space-sm);
}

.proposal-editor-title-input {
  /* No own font-size (issue #446) — see css/style.css's shared input rule
     and its @media (max-width: 680px) 16px bump; an override here beat
     that bump and re-triggered the iOS Safari auto-zoom-on-focus bug. */
  width: 100%;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.proposal-editor-note-input {
  width: 100%;
  height: 50px;
  margin-bottom: var(--space-md);
}

.proposal-editor-summary {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
  margin-bottom: var(--space-sm);
}

.proposal-editor-stops {
  max-height: 40vh;
  overflow-y: auto;
  margin-bottom: var(--space-md);
}

.proposal-editor-stop-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--fs-sm);
  padding: var(--space-xs) 0;
  border-bottom: 2px solid var(--df-hair);
  flex-wrap: wrap;
}

.proposal-editor-stop-drag {
  cursor: grab;
  color: var(--df-ink-soft);
  touch-action: none;
}

.proposal-editor-stop-day {
  color: var(--df-ink-soft);
  font-size: var(--fs-xs);
  min-width: 48px;
}

.proposal-editor-stop-time {
  color: var(--df-ink-soft);
  min-width: 48px;
  font-variant-numeric: tabular-nums;
}

.proposal-editor-stop-dest {
  font-weight: 600;
  flex: 1;
}

.proposal-editor-stop-edit {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--df-ink-soft);
  font-size: var(--fs-sm);
  padding: 0 var(--space-xs);
  line-height: 1;
}

.proposal-editor-stop-edit:hover {
  color: var(--vn-trail-green);
}

.proposal-editor-stop-del {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  color: var(--df-ink-soft);
  cursor: pointer;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  line-height: 1;
  flex-shrink: 0;
}

.proposal-editor-stop-del:hover {
  background: var(--danger-light);
  border-color: var(--danger);
  color: var(--danger-text);
}

.proposal-editor-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  background: var(--df-ground);
  border-radius: var(--df-radius-stub);
}

.proposal-editor-day-input,
.proposal-editor-field {
  width: 100%;
}

.proposal-editor-time-row {
  display: flex;
  gap: var(--space-sm);
}

.proposal-editor-time-row select {
  flex: 1;
}

.proposal-editor-form-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.proposal-editor-form-actions button {
  flex: 1;
}

.proposal-editor-add-btn {
  margin-top: var(--space-md);
}

.proposal-editor-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.proposal-editor-actions button {
  flex: 1;
}

/* /css/features/byo-ai-key.css */
/* BYO AI Key — feature-flagged UI (see js/features/byo-ai-key/) */

/* Hidden by default; byo-ai-key.js only reveals these once it confirms the
   backend has FEATURE_BYO_AI_KEY=true. Safe to leave this markup in
   index.html indefinitely even while the feature is off. */
.feature-byo-ai-key {
  display: none;
}

/* /css/features/places.css */
/* Places Autocomplete (issue #400 Phase 1) — no .feature-places gate here:
   the widget attaches to always-visible core inputs and only ever builds
   this dropdown when window.__FEATURES__.placesAutocomplete is on (see
   js/features/places/places-autocomplete.js), so there's no static markup
   to hide by default the way other feature CSS files hide one. */

.places-ac-dropdown {
  position: fixed;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  /* Hard offset, not blurred — DESIGN.md's Hard Shadow Rule bans a blur
     radius on any control; the instant print is the one sanctioned
     exception, and this is a dropdown, not a photo. */
  box-shadow: var(--df-press);
  z-index: 1000;
  max-height: 260px;
  overflow-y: auto;
}

.places-ac-option {
  padding: var(--space-md) var(--space-lg);
  min-height: var(--tap-min);
  font-size: var(--fs-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.places-ac-option:hover,
.places-ac-option.active {
  background: var(--vn-trail-green-light);
}

.places-ac-primary {
  color: var(--df-ink);
}

/* #7643 - marks a curated place among the suggestions. */
.places-ac-tag {
  display: inline-block;
  margin-left: var(--sp-xs);
  padding: 0 var(--sp-xs);
  border: 1px solid var(--df-ink);
  border-radius: var(--radius-stub);
  font-size: var(--fs-xs);
  color: var(--df-ink);
}

.places-ac-secondary {
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}

/* Issue #1093 — Google attribution, required wherever Places content shows
   without a Google map. Google's text-attribution spec: "Google Maps" in
   Roboto, 12–16px, #5E5E5E (white on a dark background). Sticky so it stays
   visible when the list scrolls past max-height. */
.places-ac-attribution {
  position: sticky;
  bottom: 0;
  padding: var(--space-xs) var(--space-lg);
  background: var(--df-panel);
  border-top: 1px solid var(--border);
  font-family: Roboto, Arial, sans-serif;
  font-size: 12px;
  color: light-dark(#5E5E5E, #FFFFFF);
  text-align: right;
  cursor: default;
  user-select: none;
}

/* /css/features/itinerary-map.css */
/* Itinerary Map — feature-flagged UI (issue #732 Part B, see
   js/features/itinerary-map/; moved from its own trip tab into a view of
   the Itinerary tab by issue #993). Hidden by default; itinerary-map.js only
   reveals the #itin-phone-views-map-btn / #itinTabMapBtn toggle button once
   FEATURE_ITINERARY_MAP is on — see
   itineraryMapEnabled() there. Safe to leave this markup in index.html
   indefinitely even while the feature is off, same convention as
   css/features/weather-forecast.css's .feature-weather. */
.feature-itinerary-map {
  display: none;
}

/* #6205 - the map's controls float on the canvas, top-right directly under the
   attribution (itinerary-map.js _mapPlaceControls() sets `top` from the
   attribution's measured height; 36px is the fallback). A sibling of #map-canvas,
   like the stop list, so wheel/drag/click on them never reaches MapLibre. z-index
   1000 = the map controls' tier (pins 600 < stop list 620 < popups 700 < this),
   so the Legend panel is never under a pin or the stop list. */
.map-controls {
  position: absolute;
  top: 36px;
  right: var(--space-md);
  z-index: 1000;
  width: min(300px, calc(100% - 2 * var(--space-md)));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-sm);
  /* The group never grows past the canvas: when the day pager is taller than
     it, it clips rather than covering the stop list sheet. */
  max-height: calc(100% - 36px - var(--space-md));
  pointer-events: none;
}

.map-controls > * {
  pointer-events: auto;
}

/* Phones (#6205): keep the group inside the top half of the canvas, above the
   stop list's bottom sheet, and cap the Legend so it stays inside the canvas. */
@media (max-width: 680px) {
  .map-controls {
    width: min(220px, calc(100% - 2 * var(--space-md) - 60px));
  }
  .map-legend-panel {
    max-height: 240px;
  }
}

/* The List view's day-map card borrows this canvas but has its own chrome. */
.itin-day-map-card .map-controls {
  display: none;
}

.map-toolbar {
  margin-bottom: var(--space-md);
}

.map-pager {
  min-width: 0;
}

.map-controls-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-xs);
}

.map-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--tap-min);
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--fs-xs);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  cursor: pointer;
  background: var(--df-panel);
  color: var(--df-ink-soft);
  font-family: inherit;
  transition: background var(--dur-feedback) var(--ease-out), color var(--dur-feedback) var(--ease-out), border-color var(--dur-feedback) var(--ease-out);
}

.map-chip.sel {
  background: var(--df-ink);
  border-color: var(--df-ink);
  color: var(--df-panel);
}

.map-day-route-btn {
  min-height: var(--tap-min);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-pill);
  border: 2px solid var(--df-ink);
  background: var(--df-panel);
  color: var(--df-ink);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
}

.map-day-route-btn[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

/* Issue #4366 — the drawn day route's distance, and the Approximate flag when
   the server joined the stops with straight lines. Static text, no motion. */
.map-route-note {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-xs);
  color: var(--df-ink);
}

.map-route-approx {
  padding: 0 var(--space-xs);
  border: 1px solid var(--df-hair);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
}

/* ==================== Legend (issue #1004) ====================
   Part of the floating .map-controls group, top-right (#6205; it used to sit
   in a toolbar above the canvas). The stop list docks left (desktop) or along
   the bottom (phones), so the top-right corner under the attribution is the one
   place left. The panel opens downward and leftward from its toggle, inside the
   canvas, in the same 1000 tier as the group. */
.map-legend {
  position: relative;
}

.map-legend-toggle,
.map-chip,
.map-day-route-btn {
  box-shadow: var(--df-press);
}

.map-legend-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--tap-min);
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--fs-xs);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  cursor: pointer;
  background: var(--df-panel);
  color: var(--df-ink);
  font-family: inherit;
  font-weight: 600;
}

.map-legend-panel {
  position: absolute;
  z-index: 30;
  /* Opens downward over the canvas, right-aligned with its button (#6180). */
  top: calc(100% + var(--space-xs));
  right: 0;
  width: max-content;
  max-width: min(260px, calc(100vw - 2 * var(--space-md)));
  max-height: 50vh;
  overflow-y: auto;
  padding: var(--space-sm) var(--space-md);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
}

.map-legend-section + .map-legend-section {
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1.5px solid var(--df-hair);
}

.map-legend-heading {
  margin-bottom: var(--space-xs);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--df-ink-soft);
}

.map-legend-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-xs);
  color: var(--df-ink);
}

.map-legend-item i {
  width: 1.25em;
  text-align: center;
  color: var(--df-ink-soft);
}

.map-legend-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs);
}

.map-legend-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: #fff;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.55);
}

.map-legend-note {
  margin: var(--space-xs) 0 0;
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}

/* vh first, dvh override right after — same fallback order as every other
   viewport-sized surface in this app (css/style.css). A fixed, generous
   height rather than a computed "100dvh minus chrome" figure: the chip
   rows above it can wrap to a second line on a narrow phone, and a precise
   subtraction would drift out of sync with that. */
.map-canvas-wrap {
  position: relative;
  width: 100%;
  height: 60vh;
  height: 60dvh;
  min-height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--df-panel);
  /* MapLibre's markers/controls carry z-indexes up to 1000; box them in. */
  isolation: isolate;
}

@media (min-width: 681px) {
  .map-canvas-wrap {
    height: 70vh;
    height: 70dvh;
  }
}

.map-canvas {
  width: 100%;
  height: 100%;
}

/* MapLibre's zoom buttons default to 29px — below --tap-min. */
.map-canvas .maplibregl-ctrl-group button {
  min-width: var(--tap-min);
  min-height: var(--tap-min);
}

.map-canvas .maplibregl-ctrl-attrib {
  font-size: var(--fs-xs);
}

/* Controls and popups sit above the stop-list overlay (z-index 620 below),
   same ordering Leaflet's panes gave: pins < overlay < popup < controls. */
.map-canvas .maplibregl-popup {
  z-index: 700;
}

.map-canvas .maplibregl-ctrl-top-left,
.map-canvas .maplibregl-ctrl-top-right {
  z-index: 1000;
}

.map-skeleton-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  /* #6205 - never swallow the wheel/drag meant for the map under it. */
  pointer-events: none;
}

/* A stop's pin. Built as a DOM element wrapped by a maplibregl.Marker (not an image marker) so both its
   fill (group — day, or an idea's ideaGroup) and its glyph (category) read
   straight off the existing --vn-* and PLACE_TYPES tokens (js side reads
   getComputedStyle, never a new palette) with no extra asset request.
   Issue #1004 swapped which channel carries which: colour used to be
   category alone, with nothing encoding which stops shared a day/group —
   see js/features/itinerary-map/itinerary-map.js's mapGroupColor()/
   mapCategoryIconClass(). */
.map-pin-wrap {
  /* maplibre-gl.css (loaded async from the CDN) is what makes this element
     absolutely positioned and so shrink-wrapped; until it applies, or if it
     ever fails to, a block-level wrapper stretches to its container and the
     pin inside reads as a rectangle (#2174). Own the size here so the
     marker is 28px square whatever the library stylesheet's state. */
  width: 28px;
  height: 28px;
}

.map-pin {
  box-sizing: border-box;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--df-panel);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.map-pin-icon {
  font-size: var(--fs-sm);
  color: #fff;
  /* Group hues span light-mode-dark to dark-mode-light swings (light-dark()
     tokens, css/style.css) — a plain white glyph would lose contrast against
     the lighter end of that range, so a dark outline via text-shadow keeps
     it legible against every hue/theme combination rather than picking a
     per-hue icon color. */
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.55);
}

/* Quick Ideas (day = null, parentId = null) — outlined, not filled, so a
   pin reads as "not yet on a day" at a glance next to a scheduled stop's
   solid fill (issue #732 Part B's own layer spec) — now carrying the group
   hue on its border/glyph instead of the fill (#1004), since the fill
   channel there is reserved for "hollow vs. solid" rather than colour. */
.map-pin-idea {
  background: var(--df-panel) !important;
  border-width: 3px;
}

.map-pin-idea .map-pin-icon {
  text-shadow: none;
}

/* Printed day number — only rendered at all once a trip has more days than
   the group colour ramp has hues (renderItineraryMap()'s dayBadge flag),
   so a repeated hue is never mistaken for the same day. Absent from every
   pin on a normal-length trip, keeping the common case uncluttered. */
.map-pin-day-badge {
  position: absolute;
  right: -5px;
  bottom: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 2px;
  border-radius: 999px;
  background: var(--df-panel);
  border: 1.5px solid var(--df-ink);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 15px;
  text-align: center;
  color: var(--df-ink);
}

.map-popup .maplibregl-popup-content {
  padding: var(--space-md);
  background: var(--df-panel);
  color: var(--df-ink);
  font-size: var(--fs-xs);
}

.map-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--df-panel); }
.map-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--df-panel); }
.map-popup.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--df-panel); }
.map-popup.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--df-panel); }
.map-popup .maplibregl-popup-close-button { color: var(--df-ink); min-width: var(--tap-min); min-height: var(--tap-min); }

.map-popup-title {
  font-weight: 600;
  margin-bottom: var(--space-2xs);
}

.map-popup-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.map-popup-actions a,
.map-popup-actions button {
  font-size: var(--fs-xs);
}

/* ==================== Stop-list overlay (issue #993) ====================
   Always floats over the map canvas — never a split layout, at any width
   (Decision 2 of #993). Populated by renderMapStopList() (js/features/
   itinerary-map/itinerary-map.js). Empty and unstyled (no border/shadow of
   its own to show) when its innerHTML is blank — see that function's own
   "no empty card" rule. */
.map-stop-list {
  position: absolute;
  /* Issue #1002: .map-canvas (the MapLibre container) is position:relative
     with no z-index of its own, which per CSS2.1 stacking rules means it
     does NOT form a stacking context — MapLibre's internal layers/controls
     (marker 600 as it was under Leaflet, popup 700 and controls 1000 set
     above) compare directly against this sibling instead of staying
     boxed inside .map-canvas. A low z-index here (the old value was 10) lost
     to the tile pane outright, so the overlay was hidden under the map the
     whole time and only showed through the transparent gaps a zoom
     animation's tile fade-in briefly leaves.
     620 sits above the marker pane (600, so pins never paint over the card)
     but below the tooltip/popup panes (650/700) and the 1000 controls, so an
     open popup or the zoom control stays visible above the overlay rather
     than getting buried under it. */
  z-index: 620;
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Desktop/wide default: docked to the left edge, below the top-left zoom
     control. The attribution and the .map-controls group are top-right. */
  /* #6205: starts below the zoom buttons (two --tap-min buttons + the control's
     10px margin) instead of centring, so a long list can never grow up under
     them. */
  top: calc(2 * var(--tap-min) + 10px + var(--space-md));
  left: var(--space-md);
  width: min(320px, calc(100% - 2 * var(--space-md)));
  max-height: calc(100% - (2 * var(--tap-min) + 10px + var(--space-md)) - var(--space-md));
}

.map-stop-list:empty {
  display: none;
}

.map-stop-list-header {
  flex-shrink: 0;
  border-bottom: 2px solid var(--df-ink);
}

.map-stop-list-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: var(--tap-min);
  padding: var(--space-sm) var(--space-md);
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--df-ink);
  cursor: pointer;
}

.map-stop-list-toggle i {
  transition: transform var(--dur-state) var(--ease-out);
}

/* Collapsed: shrinks to the compact header bar alone — max-height:0 (not
   display:none) so the collapse itself can travel via the shared motion
   tokens (see .map-stop-list-body's own transition below); the inner
   wrapper's min-height:0 clips it and visibility:hidden takes it out of the tab order while
   collapsed, so a keyboard user can't Tab into an invisible row. The
   chevron flips to point back down at what expanding it would reveal. */
.map-stop-list.collapsed .map-stop-list-body {
  grid-template-rows: 0fr;
  /* Not just visually clipped — genuinely out of the tab order while
     collapsed, or a keyboard user could Tab into an invisible row. */
  visibility: hidden;
}
.map-stop-list.collapsed .map-stop-list-toggle i {
  transform: rotate(-90deg);
}

.map-stop-list-body {
  /* #6989 — collapse/expand travels via the grid-template-rows 0fr/1fr
     disclosure the other panels use (not max-height), still on the shared
     motion tokens; resolved to its finished state under reduced motion in
     style.css's own reduced-motion block. min-height:0 lets the panel's
     max-height shrink it, and the scroll lives on the inner wrapper. */
  display: grid;
  grid-template-rows: 1fr;
  min-height: 0;
  transition: grid-template-rows var(--dur-state) var(--ease-out);
}
.map-stop-list-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.map-stop-list-group + .map-stop-list-group {
  border-top: 1.5px solid var(--df-hair);
}

.map-stop-list-day-header {
  position: sticky;
  top: 0;
  padding: var(--space-xs) var(--space-md);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--df-ink-soft);
  background: var(--df-panel);
}

.map-stop-list-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--tap-min);
  padding: var(--space-xs) var(--space-md);
  cursor: pointer;
  transition: background var(--dur-feedback) var(--ease-out);
}

.map-stop-list-row:hover,
.map-stop-list-row:focus-visible {
  background: var(--surface-2);
}
.map-stop-list-row:focus-visible {
  outline: 2px solid var(--vn-trail-green);
  outline-offset: -2px;
}

.map-stop-list-row.highlighted {
  background: var(--vn-trail-green-light, var(--surface-2));
}

/* Not tappable — no marker to pan to yet (issue #762's lazy backfill, or a
   permanent Nominatim miss). */
.map-stop-list-row-unlocated {
  cursor: default;
  opacity: 0.6;
}

.map-stop-list-order {
  flex-shrink: 0;
  min-width: 1.25em;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--df-ink-soft);
  text-align: right;
}

.map-stop-list-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid;
}

/* Issue #1004 — the row's own category glyph, next to its (now group-
   coloured) dot above: the same colour/icon split as the pin it points at,
   so the list and the canvas never disagree about what a stop is. */
.map-stop-list-cat-icon {
  flex-shrink: 0;
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}

.map-stop-list-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-xs);
}

.map-stop-list-time,
.map-stop-list-hint {
  flex-shrink: 0;
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}

/* Issue #7251 — place a stop's pin by hand. */
.map-stop-list-set {
  flex-shrink: 0;
  min-height: var(--tap-min);
  padding: 0 var(--sp-sm);
  border: 0;
  background: none;
  color: var(--df-ink);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}
.pin-picker-msg {
  margin: 0 0 var(--sp-sm);
  font-size: var(--fs-sm);
  color: var(--df-ink-soft);
}
.pin-picker-map {
  width: 100%;
  height: min(52dvh, 420px);
  border-radius: var(--df-radius-print);
  overflow: hidden;
  background: var(--df-panel);
}
.pin-picker-pin {
  font-size: var(--fs-figure-26);
  line-height: 1;
  color: var(--df-ink);
  cursor: grab;
}

/* Mobile: a floating bottom sheet instead of a docked side card — full
   width, pinned to the bottom edge of the canvas, rounded top corners only.
   The bottom edge is otherwise clear (attribution lives top-right, same as
   desktop — see the .map-stop-list rule above), so this doesn't need its
   own carve-out to avoid covering it. */
@media (max-width: 680px) {
  .map-stop-list {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    transform: none;
    width: 100%;
    max-height: min(50%, 360px);
    border-radius: var(--df-radius-card) var(--df-radius-card) 0 0;
    border-bottom: none;
  }
}

/* prefers-reduced-motion is handled entirely in JS for the map canvas itself
   (itinerary-map.js reads prefersReducedMotion() before choosing
   fitBounds/easeTo's own animate option, and before scrollIntoView()'s own
   behavior when a stop-list row is highlighted) — MapLibre's pan/zoom
   transitions are canvas animations, not something this
   stylesheet can target. The stop-list overlay's own collapse/expand is a
   travelling effect this stylesheet DOES own, so it's answered in
   style.css's shared reduced-motion block instead of duplicating one here —
   see the comment there for why that block, not this file, is the single
   source for every other travelling effect in the app. */

/* ── Route Ledger (#5910): the sticky day-map card ──────────────────────────
   The first thing in the List view's right rail at >=1024px (index.html
   #itin-right-rail; shown by js/features/itinerary-map/day-map-card.js, which
   sets [hidden] and .itin-layout.has-day-map). It borrows the Map view's one
   #map-canvas, so the canvas rules above size it here too. */
.itin-day-map-card {
  position: relative;
  /* Its own stacking context (#6164): the map's panes carry z-indexes up to 700,
     which without this paint over the sticky day pager (z-index 20). */
  z-index: 1;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  flex: none;
  min-width: 0;
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  background: var(--df-panel);
  overflow: hidden;
}
.itin-day-map-card[hidden] { display: none; }

.idm-body {
  position: relative;
  height: clamp(280px, 42vh, 420px);
}
.idm-canvas-host,
.idm-canvas-host .map-canvas { width: 100%; height: 100%; }
.idm-canvas-hidden { visibility: hidden; }
.idm-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}
.idm-empty[hidden] { display: none; }

/* The drag-to-delete zone covers the map while a stop is being dragged. */
.idm-delete-zone { display: none; position: absolute; inset: 0; z-index: 10; }
.itin-day-map-card.delete-armed .idm-delete-zone { display: flex; }

.idm-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-top: 2px solid var(--df-hair);
}
.idm-summary { font-size: var(--fs-xs); color: var(--df-ink-soft); white-space: nowrap; }
.idm-open {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  flex: none;
  width: auto;
  min-height: var(--tap-min);
  text-decoration: none;
  font-size: var(--fs-xs);
}
.idm-open[hidden] { display: none; }

/* The amber numbered pin on the route. Dark ink on amber: amber is
   text-unsafe with white (DESIGN.md). */
.map-pin-num {
  background: var(--vn-amber);
  color: var(--df-ink);
  font-size: var(--fs-xs);
  font-weight: 800;
  line-height: 1;
}

/* /css/features/email-intake.css */
/* Email Intake — feature-flagged UI (see js/features/email-intake/, issue #790) */

/* Hidden by default — needed for the ONE piece of this feature's markup that
   lives in always-loaded core index.html (the "Forward from email" tile in
   #bookingKindPickerModal), present before the flag is even known, same
   convention as .feature-weather/.feature-itinerary-agent. Everything ELSE
   this feature renders is built entirely by email-intake.js at runtime (the
   banner, the review sheet), which only happens once that script has
   loaded — itself gated on the flag — so nothing else needs this class. */
.feature-email-intake {
  display: none;
}

.email-intake-banner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.email-intake-banner-text {
  flex: 1;
  min-width: 0;
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
}

/* The button keeps its label-sized width; only the text may wrap. */
.email-intake-banner .ui-btn {
  flex: none;
}

.email-intake-label {
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: var(--space-lg) 0 var(--space-sm);
}

.email-intake-my-inbox,
.email-intake-shared-section {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.email-intake-send-name {
  display: flex;
  flex-direction: column;
  min-width: 96px;
  color: var(--text-primary);
}

.email-intake-send-sub {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.email-intake-address {
  font-family: var(--df-sans);
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  overflow-wrap: anywhere;
  flex: 1;
}

.email-intake-help {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.email-intake-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  padding: var(--space-md) 0;
  border-top: 1px solid var(--border);
}
.email-intake-item > .ei-note, .email-intake-item > .ei-booking-row { flex-basis: 100%; }
/* #6645: face and weight come from the shared .df-modal-content sheet-title rule (Fraunces 700). */
.modal-header .email-intake-title { font-size: var(--fs-xl, 28px); line-height: 1.1; margin: 0; flex: 1; }
.ei-more-menu { position: relative; }
.ei-more-btn { list-style: none; display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap-min); min-height: var(--tap-min); cursor: pointer; color: var(--text-muted); font-size: var(--fs-lg); }
.ei-more-btn::-webkit-details-marker { display: none; }
.ei-more-pop { position: absolute; right: 0; top: 100%; z-index: 2; background: var(--df-panel); border: 1.5px solid var(--df-ink); border-radius: var(--radius-md); padding: var(--space-xs); }
.ei-more-item { min-height: var(--tap-min); padding: 0 var(--space-md); background: none; border: 0; font: inherit; color: var(--df-ink); cursor: pointer; white-space: nowrap; }
.ei-more-item.is-danger { color: var(--danger-text); }
.ei-copy-link { background: none; border: 0; padding: 0; min-height: var(--tap-min); min-width: var(--tap-min); font: inherit; font-weight: 600; color: var(--df-brand); text-decoration: underline; cursor: pointer; }
.ei-send-row { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: var(--tap-min); padding: 0; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.email-intake-my-inbox .email-intake-address, .email-intake-shared-section .email-intake-address { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-size: var(--fs-xs); }
.email-intake-shared-section { border-top: 1px solid var(--border); }

.email-intake-item-head {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  overflow-wrap: anywhere;
}

/* Wraps, never an ellipsis: the sender-not-checked warning must be readable in full (#6053). */
.email-intake-item-from {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
/* After the base rule on purpose: same specificity, so the later one wins (#5758). */
.email-intake-item-from.email-intake-item-from-warn { color: var(--info); }
.email-intake-shared-actions { display: flex; flex-basis: 100%; gap: var(--space-md); }

.email-intake-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: flex-end;
}

/* Label-sized pills from the Bookings tab's .ui-btn family (DESIGN.md ->
   Buttons); the old .btn-primary was width:100% and split the row (#5371). */
.email-intake-item-actions .ui-btn {
  flex: none;
}

.email-intake-my-inbox .btn-secondary,
.email-intake-shared-section .btn-secondary,
.email-intake-shared-section .btn-small {
  min-height: var(--tap-min);
  min-width: var(--tap-min);
}

.email-intake-empty {
  color: var(--text-muted);
  font-size: var(--fs-xs);
  padding: var(--space-md) 0;
}

/* #3388 — the Expense kind in the review step */
.eie-summary { display: flex; flex-direction: column; gap: 2px; padding: var(--space-md); margin-bottom: var(--space-md); border: 1px solid var(--border); border-radius: var(--radius-md, 8px); }
.eie-summary-from, .eie-summary-file { font-size: var(--fs-sm); color: var(--text-muted); }
.eie-switch { margin-bottom: var(--space-md); }
.eie-people { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-sm); }
.eie-more { margin: var(--space-md) 0; }
.eie-more summary { min-height: var(--tap-min); display: flex; align-items: center; cursor: pointer; }
.eie-attach-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.eie-attach-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); min-height: var(--tap-min); padding: var(--space-sm) var(--space-md); text-align: left; background: none; border: 1px solid var(--border); border-radius: var(--radius-md, 8px); color: inherit; cursor: pointer; }
.eie-attach-row[aria-checked="true"] { border-color: var(--df-brand); }
.eie-attach-main { display: flex; flex-direction: column; font-size: var(--fs-sm); color: var(--text-muted); }
.eie-attach-main b { font-size: var(--fs-md); color: var(--text); font-weight: 600; }
.eie-footer { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-lg, 16px); }

/* ---- Import states (#5424; boards in design/bookings/2026-11/email-intake/) ----
   Cards sit above the Bookings list: a 2px keyline panel, one icon, the words,
   the action. Colour only tints; every state also says its name in words. */
.ei-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-md);
  box-shadow: var(--df-press);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.ei-card-added { background: var(--vn-trail-green-light, var(--df-panel)); align-items: center; }
.ei-card-cost { align-items: center; }
.ei-card-blocked .ei-card-icon, .ei-card-cancel .ei-card-icon { color: var(--danger-text); }
.ei-card-icon { flex: none; font-size: 22px; line-height: 1.2; }
.ei-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2xs); overflow-wrap: anywhere; font-family: var(--df-sans); }
.ei-card-title { font-size: var(--fs-sm); }
.ei-card-sub { font-size: var(--fs-xs); color: var(--text-muted); }
.ei-card-action { flex: none; min-height: var(--tap-min); }
.ei-card-actions { display: flex; flex-wrap: wrap; gap: var(--space-md); margin-top: var(--space-sm); }
.ei-card-actions .ui-btn { flex: none; min-height: var(--tap-min); }
.ei-dismiss {
  flex: none; min-width: var(--tap-min); min-height: var(--tap-min);
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--text-muted); cursor: pointer; margin: calc(var(--space-sm) * -1) calc(var(--space-sm) * -1) 0 0;
}
.ei-note { font-size: var(--fs-xs); color: var(--text-muted); margin: var(--space-xs) 0 0; }
.ei-quiet { background: transparent; border-color: transparent; box-shadow: none; color: var(--df-brand); text-decoration: underline; }
.ei-link-btn {
  background: none; border: 0; padding: 0 var(--space-sm); min-height: var(--tap-min); cursor: pointer;
  color: var(--df-brand); font: inherit; font-weight: 600; text-decoration: underline;
}
.ei-verified { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--df-brand); border: 1.5px solid var(--df-brand); border-radius: 999px; padding: 2px 10px; }
.ei-from-email { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 600; color: var(--df-brand); border: 1.5px solid var(--df-brand); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }

/* The change card: a WAS / NOW table, old struck through, new on a tint. */
.ei-was-now { width: 100%; border-collapse: collapse; margin: var(--space-md) 0 var(--space-sm); border: 2px solid var(--df-ink); border-radius: var(--radius-md); background: var(--df-panel); font-size: var(--fs-xs); overflow: hidden; }
.ei-was-now th, .ei-was-now td { padding: var(--space-sm) var(--space-md); text-align: left; }
.ei-was-now thead th { font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.ei-was-now tbody tr { border-top: 1px solid var(--border); }
.ei-diff-label { font-weight: 400; color: var(--text-muted); }
.ei-diff-old { color: var(--text-muted); }
.ei-diff-new b { display: inline-block; padding: 2px var(--space-sm); border-radius: var(--radius-sm); background: var(--info-light); }

/* A waiting row's state word (Reading…, Needs a look, Couldn't read). */
.ei-status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 400; }
.ei-status-look { color: var(--info); }
.ei-status-failed { color: var(--danger-text); }
.ei-status-reading { color: var(--text-muted); }

/* Needs a look: field table. A field is marked with a word, never colour alone. */
.eil-table { border: 2px solid var(--df-ink); border-radius: var(--radius-md); overflow: hidden; margin: var(--space-md) 0; }
.eil-row { display: grid; grid-template-columns: minmax(84px, 1fr) minmax(0, 2fr) auto; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); border-top: 1px solid var(--border); min-height: var(--tap-min); }
.eil-row:first-child { border-top: 0; }
.eil-label { font-size: var(--fs-xs); color: var(--text-muted); }
.eil-value { font-weight: 600; overflow-wrap: anywhere; }
.eil-word { font-size: var(--fs-xs); font-weight: 600; text-align: right; }
.eil-found .eil-word, .eil-file .eil-word { color: var(--df-brand); }
.eil-check { background: var(--df-hair, transparent); box-shadow: inset 4px 0 0 var(--df-ink); }
.eil-check .eil-word { color: var(--df-ink); }
.eil-missing { background: var(--info-light); box-shadow: inset 4px 0 0 var(--info); }
.eil-missing .eil-word { color: var(--info); }
.eil-absent .eil-word { color: var(--text-muted); }
.eil-field input, .eil-field select { width: 100%; }
.eil-money { display: flex; gap: var(--space-xs); }
.eil-money input:first-child { width: 5.5em; flex: none; }
@media (max-width: 680px) {
  .eil-row { grid-template-columns: 1fr auto; }
  .eil-field { grid-column: 1 / -1; grid-row: 2; }
}

/* Settings: Addresses you forward from. */
.senders-list { display: flex; flex-direction: column; }
.senders-row { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-md) 0; border-bottom: 1px solid var(--border); }
.senders-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.senders-sub { font-size: var(--fs-xs); color: var(--text-muted); }
.senders-add { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 2px dashed var(--border); }
.senders-add-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.senders-add-row input { flex: 1; min-width: 12em; }
.senders-code { margin-top: var(--space-md); }
/* Six boxes, one digit each (#5514, board 11). */
.senders-code-boxes { display: flex; gap: var(--space-sm); margin: var(--space-sm) 0 var(--space-md); }
.senders-code .senders-code-box { flex: 1 1 0; min-width: 0; max-width: 56px; aspect-ratio: 1; padding: 0; text-align: center; font-weight: 600; border: 2px solid var(--df-ink); border-radius: var(--radius-md); }

/* Boxed state cards (#5514): a label strip over a Fraunces title, as boards 05, 06, 08, 09, 10 draw them. */
.ei-card-strip { display: block; padding: 0; overflow: hidden; }
.ei-card-label { padding: var(--space-sm) var(--space-lg); border-bottom: 1.5px solid var(--df-ink); background: var(--info-light); color: var(--vn-amber-text); font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.ei-card-blocked .ei-card-label, .ei-card-cancel .ei-card-label { background: var(--danger-light); color: var(--danger-text); }
.ei-card-body { padding: var(--space-lg); font-family: var(--df-sans); overflow-wrap: anywhere; }
.ei-card-heading { margin: 0 0 var(--space-xs); font-family: var(--df-sans); font-size: var(--fs-lg, 22px); font-weight: 600; line-height: 1.2; }
.ei-card-heading-aside { font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 400; color: var(--text-muted); }
.ei-card-body .ei-card-sub { margin: 0; }
.ei-booking-row { display: flex; align-items: center; gap: var(--space-md); margin: var(--space-md) 0 var(--space-sm); padding: var(--space-md); border: 2px solid var(--df-ink); border-radius: var(--radius-md); background: var(--df-panel); }
.ei-booking-row > i { flex: none; font-size: var(--fs-lg); color: var(--df-brand); }
.ei-booking-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ei-booking-row-main span { font-size: var(--fs-xs); color: var(--text-muted); }

/* The free-reads meter: ten segments, all filled when the cap is reached. */
.ei-meter { display: flex; gap: 4px; margin: var(--space-md) 0; }
/* #6454: meters are ink (Green-Black), never brand green: green is for things you press. */
.ei-meter-seg { flex: 1; height: 12px; border-radius: 3px; background: var(--df-ink); border: 1.5px solid var(--df-ink); }

/* The Emailed in group: one row per waiting email, its state as a word. */
.ei-emailed-in { margin: 0 0 var(--space-lg); border-top: 2px solid var(--df-ink); }
/* One summary row during the trip, under Today (#6051). */
.ei-trip-summary { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); width: 100%; min-height: var(--tap-min); padding: 0 var(--space-md); background: none; border: 1.5px solid var(--df-ink); border-radius: var(--radius-md); color: var(--df-ink); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.ei-emailed-in-head { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: var(--tap-min); padding: 0; background: none; border: 0; cursor: pointer; font: inherit; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.ei-email-row { border-top: 1px solid var(--border); }
.ei-email-row-btn { display: flex; align-items: center; gap: var(--space-md); width: 100%; min-height: var(--tap-min); padding: var(--space-md) 0; background: none; border: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.ei-email-row-icon { flex: none; font-size: var(--fs-lg); color: var(--df-brand); }
.ei-email-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.ei-email-row-sub { font-size: var(--fs-xs); color: var(--text-muted); }
.ei-email-row-reading { display: flex; flex-direction: column; gap: var(--space-sm); padding: var(--space-sm) 0 0 calc(20px + var(--space-md)); }
.ei-email-row .ei-note { padding: 0 0 var(--space-md) calc(20px + var(--space-md)); }
.ei-status-other { color: var(--info); }
.ei-status-cap { color: var(--info); }
.ei-status-plain { color: var(--text-muted); }

@media (max-width: 680px) {
  .ei-card { flex-wrap: wrap; }
  .ei-card-added .ei-card-main, .ei-card-cost .ei-card-main { flex-basis: calc(100% - 80px); }
}

/* /css/features/trip-pass.css */
/* Trip Pass purchase surface — feature-flagged UI (see js/features/trip-pass/) */

.feature-trip-pass,
.trip-pass-header-badge.feature-trip-pass {
  display: none;
}
/* The badge's own display:inline-flex (below) ties .feature-trip-pass on
   specificity and comes later, so without the compound selector above the
   badge showed with the flag off (#1722). */

/* Issue #1015 Phase 2 follow-up — the trip-header entry point (the other
   is the Settings card, css/style.css's .set-block/.set-summary-row
   pattern). Pill-shaped, in the header's icon row, teal to read as an action,
   not a status readout. */
.trip-pass-header-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--tap-min);
  font-size: var(--fs-xs);
  font-weight: 500;
  background: var(--surface-2);
  color: var(--vn-trail-green);
  border: 2px solid var(--vn-trail-green);
  border-radius: var(--radius-pill);
  padding: var(--space-xs) var(--space-lg);
  cursor: pointer;
}

/* Issue #936 — the trip HAS a pass: a status readout ("Trip Pass Standard"),
   not an invitation to buy, so it fills in. Colour is reinforced by the tier
   word itself, never the only signal. */
.trip-pass-header-badge.is-active {
  background: var(--vn-trail-green);
  color: var(--surface-2);
}

/* Issue #1015 Phase 2(b) — a long trip with no pass: the outline badge stays an
   invitation, with the suggested tier as a small filled chip. The tier word (and
   the aria-label) carry the meaning; the fill is only emphasis. */
.trip-pass-badge-suggest {
  font-weight: 600;
  background: var(--vn-trail-green);
  color: var(--surface-2);
  border-radius: var(--radius-pill);
  padding: 0 var(--space-sm);
}

.trip-pass-badge-tier {
  font-weight: 600;
}

/* #6455 S14 — waiting for the pass to land: dashed, cream, with a spinner, and not a
   button to buy with (openTripPassBadgeAction() ignores it). */
.trip-pass-header-badge.is-confirming {
  background: var(--df-panel);
  color: var(--df-brand);
  border: 2px dashed var(--df-ink);
  cursor: default;
}
.trip-pass-badge-confirm { font-weight: 600; }

/* A narrow header keeps the icon and the tier and drops the words "Trip Pass"
   (the accessible name still carries them). */
@media (max-width: 680px) {
  /* #5754 — every state drops the words "Trip Pass" on a phone: the plain
     badge was wide enough to cover the logo. The plain/suggested badge is
     then the ticket icon alone, kept to a square tap target. */
  .trip-pass-header-badge .trip-pass-badge-prefix {
    display: none;
  }

  .trip-pass-header-badge {
    min-width: var(--tap-min);
    justify-content: center;
    padding-inline: var(--space-sm);
  }

  /* A narrow header has no room for the chip; the accessible name and the tier
     picker's own preselection still carry the suggestion. */
  .trip-pass-header-badge.is-suggested .trip-pass-badge-suggest {
    display: none;
  }
}

/* #6453 (#6360, docs/design/trip-pass/) — the ticket and the tier picker. Tokens
   only: faces come through --df-title / --df-display / --df-sans, never a name. */
.tp-modal { max-width: 440px; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.tp-head { align-items: flex-start; margin-bottom: var(--space-lg); }
.tp-head-text { flex: 1; min-width: 0; }
.tp-eyebrow {
  margin: 0 0 var(--space-xs); font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700;
  line-height: 1.3; letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft);
}
.tp-modal .tp-head h2 { font-family: var(--df-title); font-weight: 700; font-size: var(--fs-xl); line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
.tp-lead { margin: 0 0 var(--space-lg); font-size: var(--fs-sm); line-height: 1.6; color: var(--df-ink-soft); }
.tp-lead[hidden], .tp-every[hidden], .tp-caption[hidden], .tp-options[hidden], .tp-notice[hidden] { display: none; }
.tp-every {
  margin: 0 0 var(--space-lg); padding: var(--space-lg); font-size: var(--fs-sm); line-height: 1.6;
  border: 2px dashed var(--df-ink); border-radius: 12px; color: var(--df-ink);
}
.tp-every strong { font-weight: 600; }
.tp-caption { margin: var(--space-lg) 0 0; font-size: var(--fs-xs); line-height: 1.4; color: var(--df-ink-soft); }
.tp-options { display: flex; flex-direction: column; gap: var(--space-lg); }
#tripPassHeldTicket:not(:empty) { margin-bottom: var(--space-lg); }

/* The stub: 12px radius, 2px ink keyline, the Press shadow, a 2px dashed tear before the price. */
.tp-ticket-wrap { position: relative; }
.tp-ticket {
  position: relative; display: grid; grid-template-columns: 1fr 30%; min-height: 78px;
  background: var(--df-panel); color: var(--df-ink); border: 2px solid var(--df-ink); border-radius: 12px;
  box-shadow: var(--df-press); overflow: hidden; cursor: pointer;
}
.tp-ticket-main { display: flex; flex-direction: column; gap: 2px; padding: var(--space-lg); min-width: 0; }
.tp-ticket-name { display: flex; align-items: center; gap: var(--space-md); }
.tp-ticket-title { font-family: var(--df-sans); font-weight: 600; font-size: var(--fs-lg); line-height: 1.15; letter-spacing: -0.02em; }
.tp-ticket-days { font-family: var(--df-sans); font-size: var(--fs-xs); line-height: 1.4; color: var(--df-ink-soft); }
.tp-ticket-ai { font-family: var(--df-sans); font-size: var(--fs-sm); line-height: 1.3; }
.tp-ticket-ai strong { font-weight: 600; }
.tp-ticket-bonus { color: var(--df-ink-soft); }
.tp-ticket-price {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-xs);
  padding: var(--space-md); border-left: 2px dashed var(--df-ink);
}
/* The notches: a circle at each end of the tear, half of it clipped by the stub's own edge. */
.tp-ticket-price::before, .tp-ticket-price::after {
  content: ''; position: absolute; left: -10px; width: 18px; height: 18px; box-sizing: border-box;
  background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: 50%;
}
.tp-ticket-price::before { top: -11px; }
.tp-ticket-price::after { bottom: -11px; }
.tp-ticket-amount { font-family: var(--df-display); font-weight: 800; font-size: var(--fs-figure-26); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tp-ticket-unit { font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; line-height: 1.3; letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft); }

/* The radio is the native input, kept for keyboard and screen readers; the ring is drawn. */
.tp-ticket input[type="radio"] { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tp-radio {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  border: 2px solid var(--df-ink); border-radius: 50%; color: transparent; font-size: 14px;
}
/* Selected: a Trail Green keyline and a filled check radio. Never colour alone. */
.tp-ticket:has(input:checked), .tp-ticket.is-selected { border-color: var(--df-brand); }
.tp-ticket:has(input:checked) .tp-radio, .tp-ticket.is-selected .tp-radio { background: var(--df-brand); border-color: var(--df-brand); color: var(--df-panel); }
.tp-ticket:has(input:focus-visible) { outline: 2px solid var(--df-ink); outline-offset: 3px; }
/* Held: dashed, no shadow. */
.tp-ticket.is-held { border-style: dashed; box-shadow: none; cursor: default; }
.tp-held-word { font-family: var(--df-sans); font-size: var(--fs-sm); font-weight: 600; }

/* The coral stamp, struck at -2.6deg; one per screen. Coral is the stamp only. */
.tp-stamp {
  position: absolute; top: -12px; left: 108px; z-index: 1; padding: 2px var(--space-md);
  font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; line-height: 1.3; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--vn-coral); background: var(--df-panel); border: 2px solid var(--vn-coral); border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--df-panel), inset 0 0 0 2px var(--vn-coral);
  transform: rotate(-2.6deg); pointer-events: none; white-space: nowrap;
}
.tp-ticket-wrap--held .tp-stamp { top: 50%; left: auto; right: 4%; transform: translateY(-50%) rotate(-2.6deg); font-size: var(--fs-md); padding: var(--space-xs) var(--space-md); }

/* Notices are Cut Stock with an ink keyline, dashed while waiting; only a real error is Alert Red. */
.tp-notice {
  display: flex; gap: var(--space-md); align-items: flex-start; margin: 0 0 var(--space-lg); padding: var(--space-lg);
  background: var(--df-panel); color: var(--df-ink); border: 2px solid var(--df-ink); border-radius: 12px;
  font-size: var(--fs-sm); line-height: 1.5;
}
.tp-notice i { flex: none; font-size: var(--fs-lg); line-height: 1.3; }
.tp-notice strong { display: block; font-weight: 600; }
.tp-notice--wait { border-style: dashed; }
.tp-notice--error { border-color: var(--error); }
.tp-notice--error i, .tp-notice--error strong { color: var(--error); }

/* S13 hand-off: the chosen ticket stays, everything else steps back. */
.tp-modal.is-handoff .tp-every,
.tp-modal.is-handoff .tp-caption,
.tp-modal.is-handoff .tp-head .modal-close,
.tp-modal.is-handoff .tp-cancel,
.tp-modal.is-handoff .tp-ticket-wrap:not(:has(input:checked)) { display: none; }
.tp-modal.is-handoff .tp-ticket { opacity: 0.55; box-shadow: none; pointer-events: none; }
.tp-modal.is-handoff .tp-notice { margin: var(--space-lg) 0 0; }

.tp-actions { display: flex; flex-direction: column; gap: var(--space-md); margin-top: auto; padding-top: var(--space-xl); }
.tp-actions .btn-primary { min-height: var(--tap-min); width: 100%; margin: 0; }
.tp-actions .btn-primary:disabled { opacity: 0.55; }
.tp-actions .btn-secondary { min-height: var(--tap-min); width: 100%; margin: 0; }
.tp-cancel { background: none; border-color: transparent; box-shadow: none; }
@media (max-width: 680px) {
  .tp-modal:not(.is-taken) .tp-cancel { display: none; }
}
@media (min-width: 681px) {
  .tp-actions { flex-direction: row-reverse; justify-content: flex-start; }
  .tp-actions .btn-primary, .tp-actions .btn-secondary { width: auto; padding-inline: var(--space-2xl); }
}

/* Settings' Trip Pass details (S3): the held ticket, then the usage as rows. */
#trip-pass-card-body .tp-ticket-wrap { margin-bottom: var(--space-lg); }
.tp-usage { margin: 0 0 var(--space-lg); padding: 0 var(--space-lg); border: 2px solid var(--df-ink); border-radius: 12px; background: var(--df-panel); }
.tp-usage-row { display: flex; justify-content: space-between; gap: var(--space-lg); padding: var(--space-lg) 0; font-size: var(--fs-sm); border-bottom: 2px dashed var(--df-hair); }
.tp-usage-row:last-child { border-bottom: 0; }
.tp-usage-row dt { margin: 0; }
.tp-usage-row dd { margin: 0; font-weight: 600; text-align: right; }

/* The hand-off spinner only turns while motion is allowed; with reduced motion it
   resolves to the still glyph (a finished state, never a hidden one). */
@media (prefers-reduced-motion: no-preference) {
  .tp-spin { animation: tp-spin 900ms linear infinite; }
}
@keyframes tp-spin { to { transform: rotate(360deg); } }

/* #6454 (#6360 S4-S12) — the one paywall. It reuses the picker's frame (.tp-modal),
   ticket, notice and usage rows; what is its own is the meter, the divider, the own-key
   row and the stacked actions. Meters are ink: used segments Green-Black, the rest Cut Stock. */
.ent-modal { max-width: 440px; }
.ent-meter-wrap { margin: 0 0 var(--space-lg); }
.ent-meter-wrap[hidden], .ent-or[hidden], .ent-byok-card[hidden], #entitlementModalTicket[hidden] { display: none; }
.ent-meter { display: flex; gap: 6px; }
.ent-meter-seg { flex: 1; height: 12px; border-radius: 4px; background: var(--df-panel); border: 2px solid var(--df-ink); }
.ent-meter-seg.is-used { background: var(--df-ink); }
.ent-meter-caption { display: flex; justify-content: space-between; gap: var(--space-md); margin-top: var(--space-sm); font-size: var(--fs-xs); line-height: 1.4; color: var(--df-ink-soft); }
#entitlementModalTicket { margin: 0 0 var(--space-lg); }
.ent-byok-card { margin: 0 0 var(--space-lg); }
.ent-actions { gap: var(--space-md); flex: 1; margin-top: 0; }
.ent-actions .ent-hand { margin-top: auto; }
.ent-actions .ent-other, .ent-actions .ent-hand { background: none; border-color: transparent; box-shadow: none; }
.ent-or { display: flex; align-items: center; gap: var(--space-md); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft); }
.ent-or::before, .ent-or::after { content: ''; flex: 1; border-top: 2px dashed var(--df-hair); }
.ent-key-row {
  display: flex; align-items: center; gap: var(--space-lg); width: 100%; min-height: var(--tap-min); padding: var(--space-lg);
  text-align: left; font-family: var(--df-sans); color: var(--df-ink); background: var(--df-panel);
  border: 2px solid var(--df-ink); border-radius: 12px; box-shadow: var(--df-press); cursor: pointer;
}
.ent-key-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 2px solid var(--df-ink); border-radius: 50%; font-size: var(--fs-lg); }
.ent-key-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ent-key-text strong { font-weight: 600; font-size: var(--fs-sm); }
.ent-key-text span { font-size: var(--fs-xs); line-height: 1.4; color: var(--df-ink-soft); }
.ent-key-row > .ti-chevron-right { flex: none; font-size: var(--fs-lg); }
.ent-key-row:focus-visible { outline: 2px solid var(--df-ink); outline-offset: 3px; }
/* The hand-off keeps the buyer's eyes on the notice and the button. */
.ent-modal.is-handoff .ent-other, .ent-modal.is-handoff .ent-or, .ent-modal.is-handoff .ent-key-row,
.ent-modal.is-handoff .ent-hand, .ent-modal.is-handoff .modal-close { display: none; }
.ent-modal.is-handoff .tp-ticket { box-shadow: none; }
.ent-modal #entitlementModalNoPathNote { margin-bottom: 0; }
.ent-actions .btn-primary, .ent-actions .btn-secondary { min-height: var(--tap-min); width: 100%; }
@media (min-width: 681px) {
  /* Desktop dialog: the pay button leads, the rest stack under it (S4 desktop keeps one column). */
  .ent-actions { flex-direction: column; }
  .ent-actions .btn-primary, .ent-actions .btn-secondary { width: 100%; padding-inline: var(--space-2xl); }
}

/* #6455 S14/S16 — the notice above the tabs after a payment. The "adding your pass"
   notice is for phones (a desktop gets a toast); the slow notice shows everywhere. */
.tp-confirm { margin: 0 0 var(--space-lg); padding-inline: var(--space-lg); }
.tp-confirm .tp-notice { margin-bottom: var(--space-lg); }
.tp-confirm:has(.tp-confirm-actions) .tp-notice { margin-bottom: var(--space-md); }
@media (min-width: 681px) { .tp-confirm--phone { display: none; } }
.tp-confirm-actions { display: flex; align-items: center; gap: var(--space-xl); }

/* #6455 S15 — the success sheet reuses the picker's frame: one button, no Cancel. */

/* #6455 S14 — the Floating Pass bar styles the sticker at #app specificity (style.css), so the
   dashed, flat Confirming state is restated there. It is waiting, not a button: no press shadow. */
#app .home-topbar .trip-pass-header-badge.is-confirming {
  background: var(--df-panel);
  color: var(--df-brand);
  border: 2px dashed var(--df-ink);
  box-shadow: none;
}
#app .home-topbar .trip-pass-header-badge.is-confirming:hover { transform: none; box-shadow: none; }

/* #6455 S16 buttons: Check again is a pill at its own width, Contact support one line. */
.tp-confirm-actions .btn-secondary { min-height: var(--tap-min); margin: 0; width: auto; flex: none; padding-inline: var(--space-2xl); }
.tp-confirm-link { display: inline-flex; align-items: center; min-height: var(--tap-min); font-weight: 600; color: var(--df-ink); white-space: nowrap; }

/* #6455 S15 — the class sits on the outer #tripPassTiersModal. One full-width button, no Cancel
   or close icon; the ticket and the rows under it get a gap. */
#tripPassTiersModal.is-success .tp-cancel,
#tripPassTiersModal.is-success .tp-head .modal-close { display: none; }
#tripPassTiersModal.is-success .tp-actions .btn-primary { width: 100%; }
#tripPassHeldTicket .tp-ticket-wrap + .tp-usage { margin-top: var(--space-lg); }

/* #7338 (PRD #7328) — the pass sheet: ticket, perks, promo block and the ink stub. Boards F01 / F02
   (docs/design/launch-pricing/screens/). Tokens only. The stub is ink in both themes, as drawn. */
.tp-body { display: flex; flex-direction: column; gap: var(--sp-lg); }
.tp-ticket-kicker { margin: 0; }
.tp-ticket-was { font-family: var(--df-sans); font-size: var(--fs-sm); color: var(--df-ink-soft); text-decoration: line-through; }
.tp-perks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-sm) var(--sp-lg); font-size: var(--fs-sm); line-height: 1.3; }
.tp-perks li { display: flex; align-items: center; gap: var(--sp-sm); }
.tp-perks i { color: var(--df-brand); flex: none; }
.tp-summary { border: 2px solid var(--df-ink); border-radius: 12px; background: var(--df-panel); overflow: hidden; }
.tp-sum-row { display: flex; justify-content: space-between; gap: var(--sp-lg); padding: var(--sp-md) var(--sp-lg); font-size: var(--fs-sm); border-bottom: 2px solid var(--df-hair); }
.tp-sum-main small { display: block; color: var(--df-ink-soft); font-size: var(--fs-xs); }
.tp-sum-total { display: flex; justify-content: space-between; align-items: baseline; padding: var(--sp-lg); background: var(--df-ground); font-weight: 600; }
.tp-sum-total strong { font-family: var(--df-display); font-weight: 800; font-size: var(--fs-figure-26); letter-spacing: -0.03em; }
.tp-promo { margin-top: var(--sp-lg); }
.tp-promo[hidden], .tp-stub[hidden], #tripPassSplit[hidden], .tp-body[hidden], .tp-eyebrow[hidden] { display: none; }
.tp-stub-label { margin: 0 0 var(--sp-sm); }
.tp-promo-row, .tp-promo-add { display: flex; align-items: center; gap: var(--sp-md); min-height: var(--tap-min); }
.tp-promo-code { flex: 1; display: flex; align-items: center; gap: var(--sp-sm); font-weight: 600; letter-spacing: 0.02em; }
.tp-promo-code i { color: var(--df-brand); }
.tp-promo-input { flex: 1; min-width: 0; }
.tp-link { background: none; border: 0; padding: 0 var(--sp-sm); min-height: var(--tap-min); min-width: var(--tap-min); font: inherit; font-weight: 600; color: var(--df-brand); cursor: pointer; }
.tp-promo-msg { margin: var(--sp-xs) 0 0; font-size: var(--fs-sm); color: var(--error); }
.tp-stub { margin-top: var(--sp-lg); padding: var(--sp-lg); border-radius: 12px; background: var(--df-pin-ink); color: var(--df-pin-lamplight); }
.tp-stub .tp-stub-label { color: var(--df-pin-apricot); }
.tp-split { display: flex; flex-wrap: wrap; gap: var(--sp-sm); }
.tp-chip { flex: 1 1 0; min-height: var(--tap-min); padding: var(--sp-sm) var(--sp-md); border: 2px solid var(--df-pin-lamplight); border-radius: var(--radius-pill); background: transparent; color: var(--df-pin-lamplight); font: inherit; font-weight: 600; cursor: pointer; }
.tp-chip.is-on { background: var(--df-pin-apricot); color: var(--df-pin-ink); border-color: var(--df-pin-apricot); }
.tp-chip--sm { flex: 0 0 auto; }
.tp-people { display: flex; flex-wrap: wrap; gap: var(--sp-sm); margin-top: var(--sp-md); }
.tp-each { display: flex; justify-content: space-between; align-items: baseline; margin: var(--sp-md) 0; font-size: var(--fs-xs); color: var(--df-pin-apricot); }
.tp-each-amt { font-family: var(--df-display); font-weight: 800; font-size: var(--fs-figure-26); color: var(--df-pin-lamplight); letter-spacing: -0.03em; }
.tp-stub .tp-actions { padding-top: 0; margin-top: 0; }
.tp-stub .tp-cancel { color: var(--df-pin-lamplight); }
.tp-modal.is-handoff .tp-promo, .tp-modal.is-handoff #tripPassSplit, .tp-modal.is-handoff .tp-perks { display: none; }
.tp-modal.is-handoff .tp-stub { margin-top: var(--sp-md); }
.tp-body .tp-ticket-title { font-family: var(--df-title); font-weight: 600; font-size: var(--fs-xl); letter-spacing: -0.02em; }
.tp-body .tp-ticket-unit { white-space: nowrap; }
.tp-stub .btn-secondary.tp-cancel { background: transparent; border-color: transparent; color: var(--df-pin-lamplight); }

/* #7338 — board F01/F02 layout: the cream sheet above a full-bleed ink stub with a scalloped edge, and on a
   desktop the two columns (sheet left, stub right). The handle is phones only. */
.tp-main { padding: var(--sp-xl) var(--sp-xl) var(--sp-lg); flex: 1 1 auto; min-width: 0; }
.tp-handle { display: none; }
@media (max-width: 680px) {
  .tp-handle { display: block; margin: 0 auto var(--sp-md); background: var(--df-hair); }
  .tp-main { padding-top: var(--sp-sm); }
}
.tp-stub { position: relative; margin: 0; border: 0; border-radius: 0; padding: var(--sp-xl); padding-top: calc(var(--sp-xl) + 8px); }
.tp-stub::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 8px;
  background: radial-gradient(circle at 8px 0, var(--df-panel) 5px, transparent 5.5px) 0 0 / 16px 8px repeat-x;
}
/* The apricot Press shadow recolours the shared ::before (#7190), so the button wears one hard shadow, not two. */
.tp-actions .btn-primary::before { background: var(--df-pin-apricot); }
.tp-roster { display: none; margin-top: var(--sp-md); }
.tp-roster.is-choosing { display: block; }
.tp-person { display: flex; align-items: center; gap: var(--sp-md); width: 100%; min-height: var(--tap-min); padding: 0; background: none; border: 0; border-bottom: 2px solid var(--df-pin-night-panel); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tp-person:disabled { cursor: default; opacity: 1; }
.tp-person-name { flex: 1; font-weight: 600; }
.tp-person-amt { color: var(--df-pin-apricot); font-variant-numeric: tabular-nums; }
.tp-box { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border: 2px solid var(--df-pin-lamplight); border-radius: 6px; color: var(--df-pin-ink); font-size: var(--fs-sm); }
.tp-person[aria-checked="true"] .tp-box { background: var(--df-pin-apricot); border-color: var(--df-pin-apricot); }
@media (min-width: 681px) {
  .tp-modal { flex-direction: row; max-width: 880px; width: 100%; }
  .tp-main { padding: var(--sp-xl); }
  .tp-stub { flex: 0 0 40%; padding: var(--sp-xl); padding-left: calc(var(--sp-xl) + 8px); display: flex; flex-direction: column; justify-content: space-between; }
  .tp-stub::before {
    left: 0; right: auto; top: 0; bottom: 0; width: 8px; height: auto;
    background: radial-gradient(circle at 0 8px, var(--df-panel) 5px, transparent 5.5px) 0 0 / 8px 16px repeat-y;
  }
  .tp-roster { display: block; }
  .tp-perks { grid-template-columns: repeat(auto-fit, minmax(max-content, 1fr)); }
}
@media (min-width: 681px) {
  .tp-stub .tp-actions { flex-direction: column; }
  .tp-stub .tp-actions .btn-primary { width: 100%; }
  .tp-modal:not(.is-taken) .tp-stub .tp-cancel { display: none; }
}

/* F02b — another member is paying: their initials and name above a pay button that waits, dashed. */
.tp-hold { display: flex; align-items: center; gap: var(--sp-md); margin: var(--sp-lg) 0 0; color: var(--df-pin-lamplight); }
.tp-hold-av { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--df-pin-apricot); color: var(--df-pin-ink); font-size: var(--fs-xs); font-weight: 600; }
.tp-actions .btn-primary.is-held, .tp-actions .btn-primary.is-held:disabled { background: transparent; color: var(--df-pin-apricot); border: 2px dashed var(--df-pin-apricot); box-shadow: none; opacity: 0.7; }
.tp-actions .btn-primary.is-held::before { display: none; }

/* #7340 (F03): the ticket is grey on a free trip and green once the trip has a pass; the sheet it opens. */
#app .home-topbar .trip-pass-header-badge:not(.is-active):not(.is-confirming) { color: color-mix(in srgb, var(--df-pin-ink) 48%, var(--df-pin-apricot)); }
#app .home-topbar .trip-pass-header-badge.is-active { color: var(--df-pin-deep-green); }
#app .home-topbar .trip-pass-header-badge.is-active .ti-ticket { color: var(--df-pin-deep-green); }
/* The sheet a green ticket opens: a solid ticket with the Press shadow, a green Paid stamp tilted over its
   top-left edge, the perks, and the pass's expense. It hugs its content (boards F03-3). */
.tp-held-sheet .tp-eyebrow { margin: 0 0 var(--sp-xs); }
.tp-ticket--solo { grid-template-columns: 1fr; cursor: default; }
.tp-ticket--solo .tp-ticket-title { font-family: var(--df-title); font-weight: 600; font-size: var(--fs-xl); letter-spacing: -0.02em; }
.tp-ticket-wrap--paid { margin-top: var(--sp-md); }
.tp-stamp--paid { left: var(--sp-lg); color: var(--df-brand); border-color: var(--df-brand); box-shadow: inset 0 0 0 1px var(--df-panel), inset 0 0 0 2px var(--df-brand); }
.tp-held-bought { margin: var(--sp-md) 0; font-size: var(--fs-sm); color: var(--df-ink-soft); }
.tp-held-sheet .tp-perks { font-size: var(--fs-sm); }
.tp-held-sheet .tp-perks li { white-space: nowrap; }
@media (min-width: 681px) { .tp-held-sheet .tp-perks { grid-template-columns: repeat(auto-fit, minmax(max-content, 1fr)); font-size: var(--fs-md); } }
.tp-held-expense { display: flex; align-items: center; gap: var(--sp-md); padding: var(--sp-md) var(--sp-lg); border: 2px solid var(--df-ink); border-radius: 12px; background: var(--df-panel); }
.tp-held-expense-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--tap-min); height: var(--tap-min); border-radius: 50%; background: var(--df-pin-stock-shade); color: var(--df-pin-ink); }
.tp-held-expense-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: var(--fs-sm); }
.tp-held-expense-text span { color: var(--df-ink-soft); }
.tp-held-expense-amt { flex: none; font-family: var(--df-display); font-weight: 800; font-variant-numeric: tabular-nums; }

/* #7349: the free-AI-plans counter above Plan my days and its "what counts" sheet. */
.plan-counter-slot { display: flex; justify-content: center; margin-top: var(--sp-md); }
.plan-counter-slot:empty { display: none; }
.plan-counter { display: inline-flex; align-items: center; gap: var(--sp-sm); min-height: var(--tap-min); padding: 0 var(--sp-lg); border: 2px solid var(--df-ink); border-radius: var(--radius-pill); background: transparent; color: var(--df-ink); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.plan-counter:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 3px; }
.plan-counter .ti-sparkles { color: var(--df-brand); }
.ai-plans-meter { display: flex; flex-direction: column; gap: var(--sp-md); padding: var(--sp-lg); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); }
.ai-plans-dots { display: flex; flex-wrap: wrap; gap: var(--sp-xs); }
.ai-plans-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px dashed var(--df-ink-soft); }
.ai-plans-dot.is-left { border: 2px solid var(--df-ink); background: var(--df-ink); }
.ai-plans-figure { display: flex; align-items: center; gap: var(--sp-md); }
.ai-plans-figure > b { font-family: var(--df-title); font-size: var(--fs-2xl); line-height: 1; }
.ai-plans-figure span { display: flex; flex-direction: column; }
.ai-plans-figure small { color: var(--df-ink-soft); font-size: var(--fs-xs); }
/* Sentence case: the sheet's eyebrow is its one label (DESIGN.md, The One Label Rule), as #7253 did for sub-headings. */
.ai-plans-head { margin: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--df-ink-soft); }
.ai-plans-list { list-style: none; margin: 0; padding: 0; border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); }
.ai-plans-row { display: flex; align-items: center; gap: var(--sp-md); padding: var(--sp-md) var(--sp-lg); font-weight: 600; }
.ai-plans-row + .ai-plans-row { border-top: var(--edge-hairline); }
.ai-plans-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--tap-min); height: var(--tap-min); border-radius: 50%; background: var(--edge-tone); }

/* #7355: the free-scans chip beside "Scan or forward a receipt". */
.exp-receipt-head { position: relative; }
.exp-scan-chip-slot { position: absolute; inset-block: 0; inset-inline-end: calc(var(--sp-xl) + var(--sp-lg)); display: flex; align-items: center; }
.exp-scan-chip-slot:empty { display: none; }
.exp-receipt-head:has(.exp-scan-chip-slot:not(:empty)) .form-more-toggle { padding-inline-end: calc(var(--sp-3xl) * 2); }
.exp-scan-chip { display: inline-flex; align-items: center; min-height: var(--tap-min); padding: 0 var(--sp-md); border: 2px solid var(--df-ink); border-radius: var(--radius-pill); background: var(--df-ink); color: var(--df-ground); font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.exp-scan-chip.is-out { background: transparent; border-color: var(--danger); color: var(--danger-text, var(--danger)); }
.exp-scan-chip.is-pass { background: var(--df-brand); border-color: var(--df-brand); color: var(--df-brand-fg); cursor: default; }
.exp-scan-chip:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 3px; }

/* #7358: destinations on a pass trip — the add / remove sheets and the date window note. */
.pass-dest-card { display: flex; align-items: center; gap: var(--sp-md); padding: var(--sp-md) var(--sp-lg); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); }
.pass-dest-pin { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--tap-min); height: var(--tap-min); border-radius: 50%; background: var(--edge-tone); }
.pass-dest-note { margin: var(--sp-md) 0 0; font-size: var(--fs-sm); color: var(--df-ink-soft); }

/* #7362 (F08): letting a pending member in past the member cap. */
.tp-cap-card, .tp-cap-row { display: flex; align-items: center; gap: var(--sp-md); width: 100%; padding: var(--sp-md) var(--sp-lg); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); background: transparent; color: var(--df-ink); font: inherit; text-align: start; }
.tp-cap-card { margin-bottom: var(--sp-md); }
.tp-cap-row { margin-top: var(--sp-md); min-height: var(--tap-min); cursor: pointer; }
.tp-cap-row:focus-visible { outline: 3px solid var(--df-brand); outline-offset: 3px; }
.tp-cap-card span:not(.tp-cap-av), .tp-cap-row span:not(.tp-cap-ico) { display: flex; flex-direction: column; flex: 1; }
.tp-cap-card small, .tp-cap-row small { color: var(--df-ink-soft); font-size: var(--fs-xs); }
.tp-cap-av { flex: none; display: grid; place-items: center; width: var(--tap-min); height: var(--tap-min); border-radius: 50%; border: 2px solid var(--df-ink); background: var(--edge-tone); font-size: var(--fs-sm); font-weight: 600; }
.tp-cap-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--tap-min); height: var(--tap-min); border-radius: 50%; background: var(--edge-tone); }
.tp-cap-wait, .tp-cap-sub, .tp-cap-empty { margin: var(--sp-md) 0 0; font-size: var(--fs-sm); color: var(--df-ink-soft); }
.tp-cap-list { list-style: none; margin: var(--sp-md) 0 0; padding: 0; border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); }
.tp-cap-person { display: flex; align-items: center; gap: var(--sp-md); padding: var(--sp-md) var(--sp-lg); }
.tp-cap-person + .tp-cap-person { border-top: var(--edge-hairline); }
.tp-cap-pname { flex: 1; font-weight: 600; }
.tp-cap-remove { min-height: var(--tap-min); }
.tp-sum-rule { margin: var(--sp-md) 0 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }

/* /css/features/ad-free.css */
/* Issue #7383 (launch pricing PRD #7328, boards F11): the ad-free offer sheet and Settings → Ads.
   The ticket reuses .tp-ticket* from trip-pass.css; the ink panel reuses the pass stub's tokens. */

/* ── Settings → Ads ─────────────────────────────────────────── */
.adfree-card {
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  overflow: hidden;
}
.adfree-row {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--sp-md) var(--sp-lg);
  border: 0;
  background: none;
  color: var(--df-ink);
  font: inherit;
  text-align: left;
}
button.adfree-row { cursor: pointer; }
.adfree-add { border-top: 1.5px solid var(--df-hair); }
.adfree-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-min);
  height: var(--tap-min);
  border-radius: 50%;
  background: var(--df-ground);
  font-size: var(--fs-lg);
}
.adfree-icon-plain { background: none; color: var(--df-brand); }
.adfree-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.adfree-title { font-family: var(--df-sans); font-weight: 600; font-size: var(--fs-md); }
.adfree-meta { font-family: var(--df-sans); font-size: var(--fs-sm); color: var(--df-ink-soft); }
.adfree-price { flex: none; font-family: var(--df-sans); font-weight: 600; }

/* ── The offer sheet ────────────────────────────────────────── */
.adfree-ticket .tp-ticket-title { font-family: var(--df-title); font-size: var(--fs-xl); }
.adfree-scope { margin: var(--sp-md) 0 0; font-size: var(--fs-sm); color: var(--df-ink-soft); }
.adfree-get { margin-top: var(--sp-lg); }
.adfree-get-label { margin: 0 0 var(--sp-sm); }
.adfree-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-sm); font-size: var(--fs-sm); }
.adfree-checks li { display: flex; align-items: center; gap: var(--sp-sm); }
.adfree-checks i { color: var(--df-brand); flex: none; }
.adfree-pay { width: 100%; min-height: var(--tap-min); }
.adfree-foot { margin: var(--sp-sm) 0 0; font-size: var(--fs-xs); text-align: center; color: var(--df-ink-soft); }

/* Below 1024px the pay footer is an ink stub with a scalloped top edge (board F11-web). */
@media (max-width: 1023.98px) {
  /* The sheet states its own padding so the stub can bleed to both sides and the bottom edge. */
  .modal-content.adfree-sheet { padding: var(--sp-xl) var(--sp-xl) 0; }
  .adfree-sheet .ui-sheet-foot {
    position: relative; background: var(--df-pin-ink); border-top: 0; margin: 0 calc(-1 * var(--sp-xl));
    padding: calc(var(--sp-lg) + 8px) var(--sp-xl) calc(var(--sp-xl) + env(safe-area-inset-bottom, 0px));
  }
  .adfree-sheet .ui-sheet-foot::before {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 8px;
    background: radial-gradient(circle at 8px 0, var(--df-panel) 5px, transparent 5.5px) 0 0 / 16px 8px repeat-x;
  }
  .adfree-sheet .adfree-foot { color: var(--df-pin-apricot); }
}
/* On the ink the pill's keyline and press shadow are light, or they vanish into it. */
.adfree-sheet .adfree-pay {
  border-color: var(--df-pin-lamplight);
  --df-press: 4px 4px 0 var(--df-pin-lamplight);
  --df-press-hover: 2px 2px 0 var(--df-pin-lamplight);
  --df-press-active: 0 0 0 var(--df-pin-lamplight);
}

/* From 1024px the sheet is two panes: the ticket on the left, what you get and the pay button on an ink panel. */
@media (min-width: 1024px) {
  .modal-content.adfree-sheet {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-rows: auto 1fr auto;
    width: min(960px, calc(100vw - 2 * var(--sp-2xl)));
    max-width: none;
    padding: 0;
    gap: 0; /* the shared sheet's gap would split the ink pane in two */
  }
  .adfree-sheet .ui-sheet-head { grid-column: 1; grid-row: 1; padding: var(--sp-xl) var(--sp-xl) 0; }
  .adfree-sheet .ui-sheet-body { display: contents; }
  .adfree-sheet .adfree-ticket { grid-column: 1; grid-row: 2; align-self: start; margin: var(--sp-lg) var(--sp-xl) 0; }
  .adfree-sheet .adfree-scope { grid-column: 1; grid-row: 3; margin: var(--sp-md) var(--sp-xl) var(--sp-xl); }
  .adfree-sheet .adfree-get,
  .adfree-sheet .ui-sheet-foot { grid-column: 2; background: var(--df-pin-ink); color: var(--df-pin-lamplight); }
  .adfree-sheet .adfree-get { grid-row: 1 / 3; margin: 0; padding: var(--sp-xl) var(--sp-xl) 0; }
  .adfree-sheet .ui-sheet-foot { grid-row: 3; padding: var(--sp-lg) var(--sp-xl) var(--sp-xl); border-top: 0; }
  /* The scalloped edge down the ink pane's left side. */
  .adfree-sheet .adfree-get,
  .adfree-sheet .ui-sheet-foot { position: relative; }
  .adfree-sheet .adfree-get::before,
  .adfree-sheet .ui-sheet-foot::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 8px;
    background: radial-gradient(circle at 0 8px, var(--df-panel) 5px, transparent 5.5px) 0 0 / 8px 16px repeat-y;
  }
  .adfree-sheet .adfree-get-label { color: var(--df-pin-apricot); }
  .adfree-sheet .adfree-checks i { color: var(--df-pin-lamplight); }
  .adfree-sheet .adfree-foot { color: var(--df-pin-apricot); }
}

/* /css/features/referrals.css */
/* Referral code (#7368, boards F13-web-*). The Profile card and the register field carry `hidden` in the markup;
   js/referral.js and js/auth.js reveal them only while FEATURE_REFERRALS is on. */
.rf-field[hidden], #profile-referral-card[hidden] { display: none; }

.rf-eyebrow { margin: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--df-ink-soft); }
.rf-terms, .rf-empty { margin: 0; font-size: var(--fs-sm); color: var(--df-ink-soft); }
.rf-code-card { border: var(--keyline, 2px) solid var(--df-ink); border-radius: var(--radius-card); padding: var(--sp-lg); display: flex; flex-direction: column; gap: var(--sp-md); background: var(--df-stock, transparent); }
.rf-code-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-md); }
.rf-code { font-family: var(--df-display); font-weight: 800; font-size: var(--fs-figure-26); letter-spacing: 0.14em; }
/* The /r/:code sign-up sheet (board F13-2): Email, Username, Password and the code. Country and date of birth are
   optional, so the short sheet leaves them out. */
.rf-signup > h3,
.rf-signup .reg-country-group,
.rf-signup .form-group:has(#reg-dob),
.rf-signup #reg-email-hint,
.rf-signup > .btn-secondary { display: none; }
/* !important: the row carries an inline display. */
.rf-signup label:has(#reg-keep-signed-in) { display: none !important; }
.rf-signup-foot, .rf-signup-foot > .ui-btn { display: block; width: 100%; }
.rf-signup input.ui-field-control { border: 2px solid var(--df-ink); background: var(--df-panel); color: var(--df-ink); }
#referralSignupSheet .ui-sheet-foot { position: sticky; bottom: calc(-1 * var(--sp-xl)); margin-bottom: calc(-1 * var(--sp-xl)); padding-bottom: var(--sp-xl); background: var(--df-panel); }

.rf-copy { min-height: var(--tap-min); min-width: var(--tap-min); }
.rf-share { width: 100%; min-height: var(--tap-min); margin-top: var(--sp-md); }
.rf-rewards-head { display: flex; align-items: center; gap: var(--sp-sm); margin: var(--sp-lg) 0 var(--sp-sm); }
.rf-info { position: relative; width: 28px; height: 28px; border-radius: 50%; border: var(--keyline, 2px) solid var(--df-ink); background: transparent; font-weight: 800; cursor: pointer; }
.rf-info::before { content: ''; position: absolute; left: 50%; top: 50%; width: max(var(--tap-min), 100%); height: max(var(--tap-min), 100%); transform: translate(-50%, -50%); }
.rf-rewards { list-style: none; margin: 0; padding: 0; border: var(--keyline, 2px) solid var(--df-ink); border-radius: var(--radius-card); }
.rf-reward { display: flex; align-items: center; gap: var(--sp-md); padding: var(--sp-md) var(--sp-lg); }
.rf-reward + .rf-reward { border-top: 1px solid var(--df-hair, rgba(0, 0, 0, 0.12)); }
.rf-reward small { display: block; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.rf-how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-md); }
.rf-how li { display: flex; align-items: flex-start; gap: var(--sp-md); }
.rf-how-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--df-ink); color: var(--df-stock, #fff); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-xs); font-weight: 600; }
.reg-referral-from { display: flex; align-items: center; gap: var(--sp-sm); margin: var(--sp-sm) 0 0; font-family: var(--df-sans); font-size: var(--fs-sm); color: var(--df-ink-soft); }
.reg-referral-from[hidden] { display: none; }
.rf-signup .reg-referral-from .ti { color: var(--df-brand); }

/* /css/features/usage.css */
/* #7373 (F14): Settings > Your usage. One keylined card of rows; Receipt scans opens a sheet of trips. */
.us-card, .us-trips { margin: 0; padding: 0; list-style: none; border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); background: var(--df-panel); color: var(--df-ink); overflow: hidden; }
.us-row, .us-trip { display: flex; align-items: center; gap: var(--sp-sm); width: 100%; min-height: var(--tap-min); padding: var(--sp-sm); border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.us-row + .us-row, .us-trip + .us-trip { border-top: 1px solid var(--df-hair); }
button.us-row { cursor: pointer; }
.us-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--df-chip-fill); font-size: var(--fs-lg); }
.us-ico-pass { background: none; color: var(--df-brand); }
.us-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.us-text small { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.us-end { flex: none; font-weight: 800; }
.us-chev { flex: none; }
.us-terms { margin: 0 0 var(--sp-sm); font-size: var(--fs-sm); color: var(--df-ink-soft); }
.us-done { width: 100%; min-height: var(--tap-min); border-radius: 999px; }
.us-trips { overflow: visible; }
#profile-usage-group[hidden] { display: none; }

/* /css/features/onboarding-card.css */
/* Onboarding v1 — first-run welcome card (see js/features/onboarding-card/, issue #298) */

/* Hidden by default — the "How Lancong works" account-menu item lives in
   always-loaded core index.html (present before the flag is even known),
   same convention as .feature-email-intake's booking-kind-picker tile. The
   card body itself needs no such class: it only ever exists as markup
   onboarding-card.js writes into an empty mount div, which is naturally
   invisible until that script (itself gated on the flag) fills it. */
.feature-onboarding-card {
  display: none;
}

.onboarding-card {
  position: relative;
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: 14px;
  box-shadow: var(--df-press);
  color: var(--df-ink);
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-lg);
}

.onboarding-card-dismiss {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  border: none;
  background: none;
  color: var(--df-ink-soft, var(--text-secondary));
  font-size: var(--fs-md);
  cursor: pointer;
  border-radius: 50%;
}
.onboarding-card-dismiss:hover {
  background: var(--df-ground, transparent);
}

.onboarding-card-title {
  font-family: var(--df-sans);
  font-size: var(--fs-md);
  font-weight: 600;
  margin: 0 0 var(--space-md);
  padding-right: calc(var(--tap-min) + var(--space-sm)); /* clears the dismiss button */
}

.onboarding-card-points {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: onboarding-pin;
}

/* DESIGN.md's numbered sequence: a dashed Route Amber line (3px, 9px on / 9px
   off) running down between circular amber pins. */
.onboarding-card-points li {
  position: relative;
  counter-increment: onboarding-pin;
  padding: 0 0 var(--space-sm) 40px;
}
.onboarding-card-points li::before {
  content: counter(onboarding-pin);
  position: absolute;
  left: 0;
  top: var(--space-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--df-amber);
  color: var(--df-amber-fg);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 800;
}
.onboarding-card-points li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 13px;
  top: calc(var(--space-xs) + 28px);
  bottom: 0;
  width: 3px;
  background: repeating-linear-gradient(to bottom, var(--df-amber) 0 9px, transparent 9px 18px);
}

.onboarding-card-point {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: var(--space-xs) 0;
  min-height: var(--tap-min);
  font-family: var(--df-sans);
  color: var(--df-ink);
  font-size: var(--fs-sm);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color var(--dur-feedback) var(--ease-out);
}
.onboarding-card-point:hover {
  text-decoration-color: currentColor;
}

.onboarding-card-point-text {
  display: block;
  padding: var(--space-xs) 0;
  font-family: var(--df-sans);
  color: var(--df-ink);
  font-size: var(--fs-sm);
}

.onboarding-card-point-lead {
  font-weight: 600;
}

/* Issue #2311 — the journey's entrance and dismiss.
   onboarding-card.js adds --enter on a real
   arrival only and schedules its removal in the same call (`both` fill holds
   a delayed point invisible). Motion tokens only; the stagger is half a
   --dur-feedback per point. The reduced-motion answer lives at the end of
   style.css and resolves to the finished state. */
@keyframes onboarding-card-in {
  from { opacity: 0; transform: translateY(10px); }
}
@keyframes onboarding-point-in {
  from { opacity: 0; transform: translateY(6px); }
}
@keyframes onboarding-card-out {
  to { opacity: 0; transform: translateY(-6px); }
}

.onboarding-card--enter {
  animation: onboarding-card-in var(--dur-view) var(--ease-out) both;
}
.onboarding-card--enter .onboarding-card-points li {
  animation: onboarding-point-in var(--dur-state) var(--ease-out) both;
  animation-delay: calc(var(--ob-i, 0) * var(--dur-feedback) / 2);
}
.onboarding-card--leave {
  animation: onboarding-card-out var(--dur-state) var(--ease-out) both;
  pointer-events: none;
}

/* /css/features/stamps.css */
/* Stamps — read-only /stamps page (see js/features/stamps/, issue #1665) */

/* Hidden by default — the account-menu items live in always-loaded core
   index.html, before the flag is known (same convention as
   .feature-onboarding-card). stamps.js removes the class once the flag is
   confirmed. */
.feature-stamps {
  display: none;
}

/* Same top-level screen shell as #profile-screen (css/discover.css) — the
   topbar and body reuse .discover-topbar/.discover-body. */
#stamps-screen {
  display: none;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  /* Ground: print (.df-ground-print group in css/style.css). */
  color: var(--df-ink);
  font-family: var(--df-sans);
}

.stamps-page {
  width: 100%;
}

.stamps-total {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

/* The Stamp Word (DESIGN.md): Stamp Coral, double-keyline die, struck crooked.
   The page total is the one loud element on /stamps. */
.stamp-word {
  display: inline-block;
  padding: 0.04em 0.2em 0.09em;
  border: 0.055em solid currentColor;
  border-radius: 0.14em;
  box-shadow: inset 0 0 0 0.022em currentColor;
  color: var(--vn-coral-text);
  font-family: var(--df-display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  line-height: 1.1;
  transform: rotate(-2.6deg);
  transform-origin: 30% 60%;
}
.stamps-total-word { font-size: clamp(2rem, 5.4vw, 3.125rem); line-height: 0.98; letter-spacing: -0.03em; }
/* Label (DESIGN.md Label tier) naming what the page total counts. */
.stamps-total-label {
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
/* Board completion: a small coral stamp strike (same die language as the tile strike),
   resting well below the page total's shout. */
.stamps-complete {
  padding: 0.2em 0.55em;
  border: 2px solid currentColor;
  border-radius: 0.3em;
  box-shadow: inset 0 0 0 1px currentColor;
  transform: rotate(-2.6deg);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--vn-coral-text);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.stamps-section {
  margin-bottom: var(--space-3xl);
}

.stamps-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}
.stamps-board-id { flex: 1 1 auto; min-width: 0; }
.stamps-section-head > .stamps-complete { flex: none; }

/* Kicker (DESIGN.md Label tier): progress and theme under the board name (country first). */
.stamps-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-sm);
  margin-top: var(--space-xs);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.stamps-kicker > * + *::before { content: "\00b7"; margin-right: var(--space-sm); }

.stamps-trip-tag {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: var(--fs-xs);
  color: var(--text-secondary, var(--text-muted));
}
/* #6645 — a stamp board's name is one of Fraunces's named jobs (DESIGN.md). */
.stamps-section-title {
  font-family: var(--df-title);
  font-size: var(--fs-xl, var(--fs-lg));
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.stamps-count {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stamps-section.retired { margin-bottom: var(--space-2xl); }
.stamps-section.focused .stamps-section-head { box-shadow: -4px 0 0 var(--df-ink); padding-left: var(--space-md); }
.stamps-section.retired .stamps-section-head { margin-bottom: var(--space-lg); }
.stamps-location-note {
  margin: 0 0 var(--space-lg);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

/* #1982 — compact tiles (image + name), three to a row at 390px. */
.stamps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  align-items: stretch;
  gap: var(--space-md);
  list-style: none;
  padding: 0;
  margin: 0;
}

.stamp-card {
  position: relative;
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  box-shadow: var(--df-press);
  min-width: 0;
}
/* The tile is the control: one full-size button, uniform height. */
.stamp-card-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-xs);
  width: 100%;
  height: 100%;
  min-height: max(var(--tap-min), 124px);
  padding: var(--space-md) var(--space-xs) var(--space-sm);
  border: 0;
  border-radius: inherit;
  background: none;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
  min-width: 0;
}

/* #3218 — uncollected = an empty die: the artwork as an ink mask inside a dashed keyline, waiting to be struck. */
.stamp-card-art {
  width: 56px;
  height: 56px;
  flex: none;
  align-self: center;
  box-sizing: border-box;
  border: 2px dashed var(--df-ink-soft);
  border-radius: 0.14em;
}
.stamp-card-art::before,
.stamp-detail-icon.silhouette-art::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: var(--df-ink-soft);
  -webkit-mask: var(--stamp-art) center / 70% no-repeat;
  mask: var(--stamp-art) center / 70% no-repeat;
}
/* No artwork: a block of the same size, so the pin and badge never sit on the label. */
.stamp-card-art-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex: none;
  align-self: center;
  font-size: var(--fs-2xl);
  color: var(--df-ink-soft);
  border: 2px dashed var(--df-ink-soft);
  border-radius: 0.14em;
  box-sizing: border-box;
}

.stamp-card-home {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.2;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.stamp-card-label {
  font-weight: 600;
  font-size: var(--fs-xs);
  line-height: 1.25;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.stamp-card-new {
  position: absolute;
  top: var(--space-sm);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
}

/* #7792 (design B) — corner chits: glyph-only stickers over the tile's top-left corner. */
.stamp-chits {
  position: absolute;
  top: calc(-1 * var(--sp-sm));
  left: calc(-1 * var(--sp-sm));
  display: flex;
  pointer-events: none;
}
.stamp-chit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  box-sizing: border-box;
  border: 2px solid var(--df-ink);
  border-radius: 50%;
  background: var(--df-panel);
  color: var(--df-ink);
  font-size: var(--fs-sm);
}
.stamp-chit + .stamp-chit { margin-left: -6px; }
.stamp-chits.is-muted .stamp-chit { color: var(--df-ink-soft); border-color: var(--df-ink-soft); }
.stamp-chits.is-small .stamp-chit { width: 20px; height: 20px; font-size: var(--fs-xs); }
.home-stamp { position: relative; }
.stamp-legend { display: flex; flex-wrap: wrap; gap: var(--sp-lg); margin: var(--sp-sm) 0 var(--sp-sm); }
.stamp-legend-item { display: inline-flex; align-items: center; gap: var(--sp-xs); font-size: var(--fs-xs); color: var(--df-ink); }
.stamp-legend .stamp-chit { width: 22px; height: 22px; font-size: var(--fs-xs); }
.stamp-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-xs); margin: 0; }
.stamp-detail-hero .stamp-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  margin: 0;
  padding: var(--sp-xs) var(--sp-sm);
  border: 2px solid var(--df-ink);
  border-radius: 999px;
  color: var(--df-ink);
}

/* #2671 — the button fills the card inside its 2px border, so the global ring
   (2px at 2px offset) collapsed onto it. Ring the card instead: the system's
   3px at 3px offset. */
.stamp-card-btn:focus-visible {
  outline: none;
  box-shadow: none;
}
.stamp-card:has(.stamp-card-btn:focus-visible) {
  outline: 3px solid var(--vn-trail-green);
  outline-offset: 3px;
}

.stamp-card-new {
  right: var(--space-sm);
  padding: 1px 6px;
  border-radius: var(--df-radius-print);
  border: 2px solid var(--info);
  color: var(--info);
  font-family: var(--df-sans);
  font-weight: 700;
  text-transform: uppercase;
}

.stamps-empty,
.stamps-error {
  text-align: center;
  color: var(--text-muted);
  padding: var(--space-3xl) var(--space-lg);
}

.stamps-error-reason { margin: var(--space-xs) 0 0; }

.stamps-retry {
  min-height: var(--tap-min);
  margin-top: var(--space-md);
}

/* Pill buttons — the page's own copy of the app's pill vocabulary (hard
   offset, moves into its shadow on press); #stamps-screen sits outside .app,
   so the .app .btn-* rules don't reach it. */
.stamps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  padding: 0 var(--space-lg);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
  color: var(--df-ink);
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--dur-feedback) var(--df-ease);
}
.stamps-btn:hover { transform: translate(2px, 2px); }
.stamps-btn:active { transform: translate(4px, 4px); }
.stamps-btn:disabled { transform: none; opacity: 0.55; cursor: default; }
.stamps-btn-primary { background: var(--vn-trail-green); color: var(--df-brand-fg); }

/* #1666 — collecting. The collected card is the user's photo as a stamped
   object: the silhouette drops to a corner mark, the date sits on the photo. */
.stamp-collect-btn {
  min-height: var(--tap-min);
  align-self: flex-start;
}

.stamp-card-status:empty { display: none; }
.stamp-card-status {
  font-weight: 600;
  color: var(--text-muted);
}

.stamp-card-photo {
  position: relative;
  display: block;
  align-self: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  /* Instant Print: Instant Stock, foot-heavy border, Lift, taped down. */
  --stamp-tape: light-dark(rgba(186, 117, 23, 0.42), rgba(232, 163, 61, 0.28));
  box-sizing: border-box;
  background: var(--df-instant-stock);
  padding: 4px 4px 12px;
  border-radius: var(--df-radius-print);
  box-shadow: var(--df-press-lift);
  transform: rotate(var(--stamp-tilt));
  margin-top: 0;
}
/* Crooked-On-Purpose: tape holds each print at its own angle, cycled so a
   row reads as a wall. The strike keyframes read the same properties. */
.stamp-card { --stamp-tilt: -2.4deg; --stamp-strike-tilt: -2.6deg; }
.stamp-card:nth-child(4n+2) { --stamp-tilt: 1.8deg; --stamp-strike-tilt: -4deg; }
.stamp-card:nth-child(4n+3) { --stamp-tilt: -1.2deg; --stamp-strike-tilt: -1.8deg; }
.stamp-card:nth-child(4n+4) { --stamp-tilt: 3deg; --stamp-strike-tilt: -3.4deg; }
.stamp-card-photo::before,
.stamp-card-photo::after {
  content: '';
  position: absolute;
  top: -4px;
  width: 20px;
  height: 8px;
  background: var(--stamp-tape);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.stamp-card-photo::before { left: 8%; transform: rotate(-4deg); }
.stamp-card-photo::after { right: 8%; transform: rotate(3.4deg); }

.stamp-card-photo > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--df-radius-print);
}

/* The struck stamp: the artwork inked in coral, overlapping the print. */
.stamp-card-passport {
  position: relative;
  display: block;
  width: 72px;
  flex: none;
  padding-top: 4px;
}
.stamp-card-struck {
  position: absolute;
  z-index: 1;
  top: -6px;
  right: -14px;
  width: 44px;
  height: 44px;
  background: var(--vn-coral);
  -webkit-mask: var(--stamp-art) center / contain no-repeat;
  mask: var(--stamp-art) center / contain no-repeat;
  transform: rotate(var(--stamp-strike-tilt));
  pointer-events: none;
}

/* Prints carry no captions: the date is a label under the print, whose foot stays blank. */
.stamp-card-date {
  margin-top: var(--space-sm);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
}

.stamp-card-struck.just-stamped { animation: stamp-strike var(--dur-view) var(--ease-out) both; }
.stamps-complete.just-stamped { animation: stamp-strike-word var(--dur-view) var(--ease-out) both; }

/* Press-in with a slight overshoot; lands on each element's resting rotation. */
@keyframes stamp-strike {
  0% { transform: rotate(calc(var(--stamp-strike-tilt) - 6deg)) scale(1.7); opacity: 0; }
  60% { transform: rotate(var(--stamp-strike-tilt)) scale(0.92); opacity: 1; }
  100% { transform: rotate(var(--stamp-strike-tilt)) scale(1); opacity: 1; }
}
@keyframes stamp-strike-word {
  0% { transform: rotate(-9deg) scale(1.7); opacity: 0; }
  60% { transform: rotate(-2.6deg) scale(0.92); opacity: 1; }
  100% { transform: rotate(-2.6deg) scale(1); opacity: 1; }
}

/* #5769 — arrival: the route draws in and lands on the pin; the total strikes once. Armed in JS on a real
   arrival only (_stampsArrivalArmed); hidden start states exist only under no-preference. */
@media (prefers-reduced-motion: no-preference) {
  .stamps-route.stamps-arrive .stamps-route-done {
    transform-origin: left center;
    animation: stamps-route-draw var(--dur-view) var(--ease-out) both;
  }
  .stamps-route.stamps-arrive .stamps-route-pin {
    animation: stamps-route-land var(--dur-state) var(--ease-out) var(--dur-view) both;
  }
  .stamp-word.stamps-total-word.stamps-arrive { animation: stamp-strike-word var(--dur-view) var(--ease-out) both; }
}
@keyframes stamps-route-draw {
  from { transform: translateY(-1.5px) scaleX(0); }
  to { transform: translateY(-1.5px) scaleX(1); }
}
@keyframes stamps-route-land {
  from { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* #1669 — location notice and postmark states. Outlined = not verified. */
.stamp-card-notice {
  margin: 6px 0 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.stamp-card-attempts {
  margin: 6px 0 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
/* Non-interactive mark: square keyline, never a pill, no pointer. */
.stamp-postmark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  margin-bottom: var(--space-sm);
  padding: 2px 6px;
  border-radius: var(--df-radius-print);
  font-size: var(--fs-sm);
  cursor: default;
  user-select: none;
}
/* A postmark is a stamp: Stamp Coral die, double keyline (border + inset ring). */
.stamp-postmark.verified {
  background: var(--vn-coral-light);
  color: var(--vn-coral-text);
  border: 2px solid var(--vn-coral);
  box-shadow: inset 0 0 0 2px var(--vn-coral-light), inset 0 0 0 3px var(--vn-coral);
  border-radius: var(--df-radius-print);
  font-family: var(--df-sans);
  font-weight: 600;
  transform: rotate(-1.5deg);
}
.stamp-postmark.unverified {
  border: 1px dashed currentColor;
  color: var(--text-muted);
}

/* #1672 — one-off opt-in to show stamps on the public profile. */
.stamps-share-prompt {
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  background: var(--df-panel);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  font-size: var(--fs-sm);
}
.stamps-share-prompt p { margin: 0 0 var(--space-md); }
.stamps-share-slot { min-height: 11rem; margin-top: var(--space-lg); margin-bottom: var(--space-lg); }
.stamps-share-slot .stamps-share-prompt { margin-bottom: 0; }
@media (min-width: 681px) { .stamps-share-slot { min-height: 8rem; } }
.stamps-share-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* #1672 — public profile Stamps section (js/user-profile.js). */
.profile-stamps-note { font-size: var(--fs-xs); color: var(--text-muted); }

/* #1813 — in-trip strip on the Itinerary tab + "new" dot on the menu entry. */
/* #3558 — the Stamps button (replaced the #1813 strip) and its pop-out; #6266 moved it from the Ideas column to the trip toolbar. */
.stamps-trip-btn-slot:empty { display: none; }
.stamps-trip-btn-slot { flex: 1 1 100%; min-width: 0; border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub); overflow: hidden; }
.stamps-trip-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--space-sm) var(--space-md);
  border: 0;
  background: transparent;
  color: var(--df-ink);
  font: inherit;
  font-size: var(--fs-sm);
  text-align: left;
  cursor: pointer;
}
.stamps-trip-btn:hover { background: var(--df-ground); }
.stamps-trip-btn-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.stamps-trip-btn-label { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stamps-trip-btn-short { display: none; }
.stamps-trip-btn-count { font-family: var(--df-sans); font-weight: 400; }
.stamps-meter { display: flex; gap: 2px; }
.stamps-meter-seg { flex: 1; height: 5px; border-radius: var(--df-radius-stub); background: var(--border); }
.stamps-meter-seg.on { background: var(--df-coral, var(--df-ink)); }
.stamps-box { max-width: 720px; }
#stamps-trip-body { overflow-y: auto; max-height: 70vh; max-height: 70dvh; }
.stamps-box-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-md); }
.stamps-box-head .stamps-meter { flex: 1; min-width: 120px; }
.stamps-box-count { font-family: var(--df-sans); font-weight: 400; font-size: var(--fs-md); }
.stamps-box-boards, .stamps-box-boards-one { flex-basis: 100%; margin: 0; padding: 0; list-style: none; font-size: var(--fs-xs); color: var(--text-muted); }
.stamps-box-group h3 { margin: var(--space-md) 0 var(--space-sm); font-size: var(--fs-sm); }
.stamps-box-group .stamps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--space-sm); list-style: none; margin: 0; padding: 0; }
.stamps-box-group .stamp-card { position: relative; }
.stamps-box-day { position: absolute; top: 4px; right: 4px; padding: 0 4px; border-radius: var(--df-radius-stub); background: var(--df-panel); font-family: var(--df-sans); font-size: var(--fs-xs); pointer-events: none; }
.stamps-box-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-top: var(--space-md); }
.stamps-box-app { font-size: var(--fs-xs); color: var(--text-muted); }
.stamp-detail-addday { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.stamp-detail-onplan a { font-weight: 600; }
.stamp-stop-highlight { outline: 3px solid var(--df-coral, var(--df-ink)); outline-offset: 2px; }
@media (max-width: 680px) {
  .stamps-trip-btn-long { display: none; }
  .stamps-trip-btn-short { display: inline; }
}
@media (min-width: 681px) {
  .stamps-trip-btn-slot { flex: 0 1 18rem; }
}
/* #6375 - at >=1024px the button is moved to the foot of #itin-right-rail (syncStampsPlacement(),
   js/itinerary.js). There the rail is a column, so the toolbar sizing (flex-basis 100% / 18rem) would
   read as a height: full rail width, natural height instead. */
#itin-right-rail > .stamps-trip-btn-slot { flex: none; width: 100%; }
#itin-right-rail > .stamps-trip-btn-slot .stamps-trip-btn-long { display: inline; }
#itin-right-rail > .stamps-trip-btn-slot .stamps-trip-btn-short { display: none; }
.stamps-menu-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--vn-trail-green);
  vertical-align: middle;
}
.stamps-menu-dot[hidden] { display: none; }

/* #5356 — the Recap checklist footer's "Stamp earned" line. */
.recap-stamp-earned { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); margin: 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.recap-stamp-die { padding: var(--space-2xs) var(--space-md); border: 2px solid var(--vn-coral); border-radius: var(--df-radius-print); box-shadow: inset 0 0 0 1px var(--vn-coral); color: var(--vn-coral); font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; transform: rotate(-2.6deg); overflow-wrap: anywhere; }
.recap-stamp-more { font-weight: 600; color: var(--df-ink); }

/* #1921 — collected-card controls: quiet Re-shoot / Remove, inline confirm and
   the persistent rejection line. */
.stamp-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.stamp-card-actions[hidden], .stamp-remove-confirm[hidden], .stamp-card-rejection[hidden] { display: none; }
.stamp-remove-confirm-btn, .stamp-remove-cancel-btn { min-height: var(--tap-min); }
.stamp-remove-copy { margin: 6px 0 0; font-size: var(--fs-sm); color: var(--text-muted); }
.stamp-card-rejection {
  margin: 6px 0 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
}

/* #1922 — skeleton grid. */
/* The un-inked first-run total: a dashed die, not coral, not tilted. */
.stamps-total-unstamped {
  display: inline-block;
  padding: 0.04em 0.2em 0.09em;
  border: 3px dashed var(--df-ink-soft);
  border-radius: 0.14em;
  color: var(--df-ink-soft);
  font-family: var(--df-display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
/* No boards: a blank passport page. */
.stamps-empty-page {
  max-width: 560px; margin: 0 auto;
  text-align: left;
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  background: var(--df-panel);
  padding: var(--space-lg);
}
.stamps-empty-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); max-width: 260px; margin: 0 auto var(--space-lg); }
.stamps-empty-grid span { aspect-ratio: 1; border: 2px dashed var(--df-ink-soft); border-radius: var(--df-radius-print, 12px); }
.stamps-empty-kicker, .stamp-detail-label, .stamp-pill { margin: 0 0 var(--space-xs); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.stamps-empty-title { margin: 0 0 var(--space-sm); font-family: var(--df-sans); font-size: var(--fs-xl, var(--fs-lg)); font-weight: 600; color: var(--df-ink); }
.stamps-empty-page p { margin-top: 0; }
.stamps-empty .stamps-btn { margin-top: var(--space-md); }
/* The page's ground is Noon Apricot, so the placeholders are an ink tint, not the
   generic near-white --skeleton-base (#5867). Scoped: other screens keep theirs. */
#stamps-screen .skeleton {
  --skeleton-base: color-mix(in srgb, var(--df-ink) 9%, transparent);
  --skeleton-shine: color-mix(in srgb, var(--df-ink) 6%, transparent);
  border-radius: var(--df-radius-print, 12px);
}
.stamps-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

/* #1939 — stamp detail pop-out. Chrome comes from .modal / .df-modal-content
   (bottom sheet below 680px); only the contents are styled here. */
.stamp-detail { max-width: 520px; width: 100%; }
/* #7768 - design A "Stamp first": the header and the foot stay put, the middle scrolls.
   #stampAddTripModal shares .stamp-detail, so these are scoped to the detail dialog. */
#stampDetailModal .stamp-detail { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
#stampDetailModal .modal-header { flex: none; margin: 0; padding: var(--sp-xl) var(--sp-xl) 0; }
#stampDetailModal .modal-header h2 { min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-2xl); }
#stampDetailModal .modal-close { width: 36px; height: 36px; margin-left: 0; }
/* Favourite: on is the same round button filled with ink. */
#stampDetailModal .modal-close.stamp-fav-btn.on { background: var(--color-ink); }
#stampDetailModal .modal-close.stamp-fav-btn.on i { color: var(--df-panel); }
#stamp-detail-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.stamp-detail-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: var(--sp-xl); padding: var(--sp-xl); }
.stamp-detail-scroll > * { flex: none; }
.stamp-detail-hero { display: flex; flex-direction: column; align-items: center; gap: var(--sp-md); text-align: center; }
.stamp-detail-photo { width: 100%; max-width: 300px; margin-bottom: var(--sp-sm); }
.stamp-detail-print {
  position: relative;
  /* #2668 Instant Print: stock border, deeper foot, Lift, tape, tilt. */
  --stamp-tape: light-dark(rgba(186, 117, 23, 0.42), rgba(232, 163, 61, 0.28));
  box-sizing: border-box;
  background: var(--df-instant-stock);
  padding: 8px 8px 28px;
  border-radius: var(--df-radius-print);
  box-shadow: var(--df-press-lift);
  transform: rotate(-1.6deg);
}
.stamp-detail-print::before,
.stamp-detail-print::after {
  content: '';
  position: absolute;
  top: -6px;
  width: 36px;
  height: 12px;
  background: var(--stamp-tape);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.stamp-detail-print::before { left: 10%; transform: rotate(-4deg); }
.stamp-detail-print::after { right: 10%; transform: rotate(3.4deg); }
.stamp-detail-print > img { display: block; width: 100%; height: auto; border-radius: var(--df-radius-print); }
.stamp-detail-struck {
  position: absolute;
  z-index: 1;
  right: -14px;
  bottom: 28px;
  width: 88px;
  height: 88px;
  background: var(--vn-coral);
  -webkit-mask: var(--stamp-art) center / contain no-repeat;
  mask: var(--stamp-art) center / contain no-repeat;
  transform: rotate(-3deg);
  pointer-events: none;
}
/* The postmark sits on the print's deep bottom margin. */
/* The print stock never inverts, so its postmark keeps the day inks. */
.stamp-detail-print:has(.stamp-postmark) { padding-bottom: 48px; }
.stamp-detail-print .stamp-postmark { position: absolute; left: 8px; bottom: 8px; color-scheme: light; }
.stamp-detail-icon.silhouette-art { display: block; box-sizing: border-box; }
.stamp-detail-mark { width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; }
/* #7768 - the stamp's double keyline: an ink frame, a stock gap, a second ink frame on the day ground. */
.stamp-detail-mark.big { box-sizing: border-box; width: 200px; height: 200px; padding: var(--sp-xs); border: 2px solid var(--color-ink); }
.stamp-detail-mark.big > * { box-sizing: border-box; width: 100%; height: 100%; border: 2px solid var(--color-ink); background: var(--df-ground); }
.stamp-detail-status-line { margin: 0; font-size: var(--fs-xs); color: var(--color-ink-soft); }
.stamp-detail-status-line b { color: var(--color-ink); }
.stamp-detail-others { margin: 0; font-size: var(--fs-xs); color: var(--color-ink-soft); overflow-wrap: anywhere; }
.stamp-detail-hint { margin: 0; font-size: var(--fs-lg); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.stamp-detail-sec { border-top: 1px solid var(--df-hair); padding-top: var(--sp-lg); }
.stamp-detail-sec .stamp-detail-label { margin-bottom: var(--sp-sm); font-family: var(--df-sans); }
.stamp-detail-sec summary.stamp-detail-label { display: flex; align-items: center; gap: var(--sp-xs); min-height: var(--tap-min); margin: 0; list-style: none; cursor: pointer; }
summary.stamp-detail-label::-webkit-details-marker { display: none; }
details[open] > summary.stamp-detail-label i { transform: rotate(90deg); }
details.stamp-detail-sec { padding-top: var(--sp-sm); }
.stamp-detail-criteria { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; margin: 0; }
.stamp-detail-map { width: 100%; height: 200px; border-radius: var(--radius-stub); border: 2px solid var(--color-ink); margin-bottom: var(--sp-sm); }
.stamp-detail-coords { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--color-ink); margin: 0 0 var(--sp-sm); }
/* The foot: one keylined strip on the day ground, never scrolled away. */
.stamp-detail-action { flex: none; max-height: 50%; overflow-y: auto; display: flex; flex-direction: column; gap: var(--sp-sm); align-items: flex-start; padding: var(--sp-lg) var(--sp-xl) var(--sp-xl); border-top: 2px solid var(--color-ink); background: var(--df-ground); }
.stamp-detail-action.is-empty { padding: 0 var(--sp-xl); border-top: 0; background: transparent; }
.stamp-detail-action .stamp-card-actions { margin: 0; }
.stamp-detail-action .stamp-card-attempts, .stamp-detail-action .stamp-card-notice, .stamp-detail-action .stamp-card-rejection { margin: 0; }
.stamp-quiet-btn { display: inline-flex; align-items: center; gap: var(--sp-xs); min-height: var(--tap-min); min-width: var(--tap-min); padding: 0 var(--sp-md); border: 0; background: transparent; font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.stamp-quiet-btn:disabled { opacity: 0.5; cursor: default; }
.stamp-reshoot-btn { color: var(--action); }
/* Remove reads as destructive before its confirm step: Alert Red, never Stamp Coral. */
.stamp-remove-btn { color: var(--error-text); }

/* #2605 — "Add to trip" picker */
.stamp-addtrip-sub { display: block; font-size: var(--fs-xs); color: var(--text-muted); opacity: 0.8; }
.stamp-addtrip-divider { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; margin: var(--space-md) 0 var(--space-xs); }
.stamp-addtrip-row { text-align: left; }
/* Add-to-trip picker rows (trip, day and "No day yet"): full-width tap targets. */
.stamp-addtrip-row, .stamp-addtrip-day { min-height: var(--tap-min); width: 100%; margin-bottom: 6px; }
.stamp-addtrip-row { justify-content: space-between; }
/* Tiles carry the hard press shadow, so they press in like the other clickable stubs. */
.stamp-card:hover { transform: translate(2px, 2px); box-shadow: var(--df-press-hover); }
.stamp-card:active { transform: translate(4px, 4px); box-shadow: var(--df-press-active); }
/* #2608 — the one filter bar: search, theme chips, status chips. */
.stamps-filter { display: flex; flex-direction: column; gap: var(--space-sm); margin-bottom: var(--space-xl); }
/* #2942 — type="search" isn't covered by the shared input rules, so this field
   was raw browser UA styling (13px, inset grey border, no radius, 2.4:1
   placeholder in dark). Scoped to this field, like .discover-search-input. */
.stamps-search {
  width: 100%;
  min-height: var(--tap-min);
  box-sizing: border-box;
  padding: 0 var(--space-lg);
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  color: var(--df-ink);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
}
.stamps-search::placeholder { color: var(--df-ink-soft); opacity: 1; }
.stamps-search:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--vn-trail-green), 0 0 0 5px var(--df-panel);
}
@media (max-width: 680px) {
  .stamp-detail-mark.big { width: 160px; height: 160px; }
  .stamps-search { font-size: var(--fs-md); }
}
.stamps-chip-row { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.stamps-seg-group { display: inline-flex; flex-wrap: wrap; gap: var(--space-sm); }
.stamps-theme-select {
  width: 100%;
  min-height: var(--tap-min);
  box-sizing: border-box;
  padding: 0 var(--space-lg);
  font-family: var(--df-sans);
  color: var(--df-ink);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
}
.stamps-chip {
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  padding: 0 var(--space-md);
  border: 2px solid var(--df-ink);
  border-radius: 999px;
  background: var(--df-panel); /* #7190: opaque, so the shadow pseudo behind it never shows through */
  color: var(--df-ink);
  font: inherit;
  cursor: pointer;
  transition: transform var(--dur-feedback) var(--df-ease);
}
.stamps-chip:hover { transform: translate(2px, 2px); }
.stamps-chip:active { transform: translate(4px, 4px); }
.stamps-chip.active { background: var(--df-ink); color: var(--df-ground); }
.stamps-theme-tag { color: inherit; }

/* #7190 — the hard Press shadow as pseudo-elements, so the control and its
   shadow both move by transform alone (compositor), never by a box-shadow
   repaint. ::before is the ink shadow, ::after repaints the control's own face
   (background inherited, so state colours follow) on top of it; both sit at
   z-index -1 inside the control's own stacking context, under its content.
   The control moves into the shadow and the shadow counter-moves, so the
   shadow stays put exactly as the old 4px -> 2px -> 0 box-shadow did. */
.stamps-btn, .stamps-chip {
  --press-x: 4px;
  position: relative;
  isolation: isolate;
}
.stamps-btn::before, .stamps-btn::after, .stamps-chip::before, .stamps-chip::after {
  content: '';
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}
.stamps-btn::before, .stamps-chip::before {
  background: var(--df-ink);
  transform: translate(var(--press-x), var(--press-x));
  transition: transform var(--dur-feedback) var(--df-ease);
}
.stamps-btn::after, .stamps-chip::after {
  border: 2px solid var(--df-ink);
  background: inherit;
}
.stamps-btn:hover::before, .stamps-chip:hover::before { transform: translate(2px, 2px); }
.stamps-btn:active::before, .stamps-chip:active::before { transform: translate(0, 0); }
.stamps-btn:disabled::before { transform: translate(var(--press-x), var(--press-x)); }

/* #2581 — favourites: tile corner mark, pop-out toggle, filter chip, strip line */
.stamp-card-fav {
  /* #5847 — pinned to the top-right corner of the print (art tile or passport), on a small panel so it reads over a photo. */
  position: absolute;
  z-index: 2;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  color: var(--df-ink);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: 50%;
  display: inline-flex;
  pointer-events: none;
}
.stamp-card-art,
.stamp-card-art-fallback { position: relative; }
/* The struck mark also sits top-right of a photo print: drop it below the star. */
.stamp-card-passport.has-fav .stamp-card-struck { top: 14px; }

/* #2667 — app handoff on an uncollected stamp when the web can't collect.
   #7768 - lead and button on the left, the QR on the right (desktop only). */
.stamp-app-handoff { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--sp-lg); row-gap: var(--sp-md); align-items: center; justify-items: start; }
.stamp-app-handoff > *, .stamp-app-handoff-row > * { grid-column: 1; }
.stamp-app-handoff-row { display: contents; }
.stamp-app-handoff .stamp-app-qr { display: none; grid-column: 2; grid-row: 1 / span 2; }
.stamp-app-qr .invite-qr-svg { width: 84px; height: 84px; display: block; }
@media (min-width: 681px) { .stamp-app-handoff .stamp-app-qr { display: block; } }
.stamp-app-lead { margin: 0; font-weight: 600; color: var(--color-ink); }
.stamp-app-handoff .stamp-card-notice { margin: 0; }
.stamp-app-box { display: flex; gap: var(--sp-md); align-items: flex-start; padding: var(--sp-md) var(--sp-lg); border: 2px solid var(--color-ink); border-radius: 12px; background: var(--df-panel); }
.stamp-app-box p { display: flex; flex-direction: column; gap: var(--sp-xs); }
.stamp-app-box span { font-weight: 400; color: var(--color-ink-soft); }
.stamp-app-handoff .stamps-btn-primary { min-height: var(--tap-min); }

/* #3488 (D94) — home "Stamp collection": tally and a 4-per-row grid of stamps. */
.home-stamps-card { padding: var(--space-xl); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub); background: var(--df-panel); box-shadow: var(--df-press); cursor: pointer; min-height: var(--tap-min); }
.home-stamps-tally { font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; line-height: 1.3; letter-spacing: 0.1em; text-transform: uppercase; color: var(--vn-coral-text); margin-bottom: var(--space-md); }
.home-stamps-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-md); list-style: none; margin: 0; padding: 0; }
.home-stamp { display: flex; flex-direction: column; align-items: center; gap: var(--space-xs); min-width: 0; }
.home-stamp-disc { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; border: 2px dashed var(--vn-coral); color: var(--vn-coral); }
.home-stamp.got .home-stamp-disc { background: var(--vn-coral); border: 2px solid var(--vn-coral); color: var(--df-panel); }
.home-stamp-disc img { width: 100%; height: 100%; object-fit: cover; }
.home-stamp-label { font-size: var(--fs-xs); font-weight: 400; line-height: 1.4; text-align: center; max-width: 100%; overflow-wrap: break-word; hyphens: auto; }
/* #3987 (D163) — nothing collected: a prompt card. */
.home-stamps-prompt { display: flex; flex-direction: column; align-items: center; gap: var(--space-md); text-align: center; cursor: default; }
.home-stamps-prompt-text { margin: 0; font-family: var(--df-sans); font-weight: 600; font-size: var(--fs-md); max-width: 12ch; }
.home-stamps-prompt-btn { width: auto; min-height: var(--tap-min); min-width: var(--tap-min); padding: 0 var(--space-xl); border: 2px solid var(--df-ink); border-radius: 999px; background: var(--df-panel); color: var(--df-ink); box-shadow: 3px 3px 0 var(--df-ink); font-family: var(--df-sans); font-weight: 600; cursor: pointer; }

/* #3559 — "Stamp here" chip under a stop's meta line, and its Calendar glyph. */
.stop-stamp-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  align-self: flex-start;
  max-width: 100%;
  min-height: var(--tap-min);
  margin-top: var(--space-xs);
  padding: 0 var(--space-sm);
  border: 1px solid var(--vn-coral-text);
  border-radius: 999px;
  background: transparent;
  color: var(--vn-coral-text);
  font: inherit;
  font-size: var(--fs-xs);
  text-align: left;
  cursor: pointer;
}
.stop-stamp-chip b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stop-stamp-chip.collected { border-style: dashed; color: var(--df-ink-soft); border-color: var(--df-ink-soft); }
.itin-cal-stamp-glyph {
  flex: none;
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--vn-coral-text);
  font-size: var(--fs-xs);
  cursor: pointer;
}
.itin-cal-stamp-glyph::before { content: ''; position: absolute; top: 50%; left: 50%; width: max(var(--tap-min), 100%); height: max(var(--tap-min), 100%); transform: translate(-50%, -50%); }
.itin-cal-stamp-glyph.collected { color: var(--df-ink-soft); }

/* ── #5267 — Option A · Passport (design/stamps/2026-11/screens/A-Desktop*.png) ── */
/* Desktop: Home's side margin (--screen-side-pad, style.css); the collection takes the full content width (#6233). */
@media (min-width: 1024px) {
  #stamps-screen .discover-body { padding-inline: var(--screen-side-pad); }
}

/* Profile opt-in (#5269), below the boards at every width. */
.stamps-share-prompt {
  margin: 0;
  padding: var(--space-lg);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-stub);
}
.stamps-share-title { margin: 0 0 var(--space-sm); font-family: var(--df-title); font-weight: 700; font-size: var(--fs-lg); letter-spacing: 0; text-transform: none; color: var(--df-ink); }
/* The opt-in is a dashed stub, not a solid card. */
.stamps-share-prompt { border-style: dashed; box-shadow: none; margin: 0; }
.stamps-share-slot { margin: 0 0 var(--space-lg); }

/* Total: the screen's one shout, with its sentence beside it. */
.stamps-total-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-lg); }
.stamps-total-sub { margin: 0; max-width: 24ch; font-size: var(--fs-sm); color: var(--text-muted); }

/* Filter row: search, segmented control, Favourites pill, Theme select on one row when there is room. */
.stamps-filter { flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.stamps-search { flex: 1 1 120px; width: auto; min-width: 0; }
.stamps-theme-select { width: auto; flex: 0 1 auto; }
.stamps-chip-row { display: contents; }
.stamps-seg-group {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0;
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
  background: var(--df-panel);
  overflow: hidden;
}
.stamps-seg-group .stamps-chip { border: 0; border-radius: 0; box-shadow: none; background: transparent; transform: none; }
.stamps-seg-group .stamps-chip::before, .stamps-seg-group .stamps-chip::after { content: none; }
.stamps-seg-group .stamps-chip + .stamps-chip { border-left: 2px solid var(--df-ink); }
.stamps-chip {
  padding: 0 var(--space-sm);
  font-family: var(--df-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.stamps-chip.active { background: var(--selected-bg); color: var(--on-selected); }
.stamps-fav-chip { background: var(--df-panel); }

/* Board page: Cut Stock, 2px ink keyline, 14px radius, Press Large. */
.stamps-section {
  margin-bottom: var(--space-xl);
  padding: var(--space-lg) var(--space-xl) var(--space-xl);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
}
.stamps-section.retired { margin-bottom: var(--space-xl); }
.stamps-section-head { align-items: flex-start; margin-bottom: var(--space-md); }
.stamps-kicker { margin: 0 0 var(--space-xs); }
.stamps-count { font-family: var(--df-sans); font-size: var(--fs-sm); font-weight: 400; color: var(--text-muted); flex: none; }
.stamps-count b { font-size: var(--fs-lg); color: var(--df-ink); }
/* "Other boards" (#7714): a label and a dashed rule between the trip countries and the rest. */
.stamps-other-boards { display: flex; align-items: center; gap: var(--sp-md); margin: var(--sp-xl) 0 var(--sp-md); font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft); }
.stamps-other-boards::after { content: ''; flex: 1; border-top: 2px dashed var(--df-hair); }
.stamps-trip-tag { display: inline; margin: 0; font-size: inherit; color: inherit; }

/* Dashed Route progress: amber dashes to an amber pin at --pct, a faint dotted track beyond. */
.stamps-route { position: relative; height: 14px; margin-bottom: var(--space-lg); }
.stamps-route::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 50%;
  border-top: 2px dotted var(--df-ink-soft);
  opacity: 0.55;
}
.stamps-route-done {
  position: absolute; left: 0; top: 50%;
  width: var(--pct);
  border-top: 3px dashed var(--vn-amber);
  transform: translateY(-1.5px);
}
.stamps-route-pin {
  position: absolute; top: 50%; left: var(--pct);
  width: 12px; height: 12px; box-sizing: border-box;
  border: 2px solid var(--df-ink);
  border-radius: 50%;
  background: var(--vn-amber);
  transform: translate(-50%, -50%);
}

/* Tiles: no card chrome. Collected art is struck in coral and tilted on a six-step cycle; uncollected stays a dashed, untilted die. */
#stamps-screen .stamps-grid { gap: var(--space-lg) var(--space-md); }
#stamps-screen .stamp-card { background: none; border: 0; box-shadow: none; --stamp-tilt: -2.6deg; --stamp-strike-tilt: -2.6deg; }
#stamps-screen .stamp-card:nth-child(6n+2) { --stamp-tilt: 1.8deg; }
#stamps-screen .stamp-card:nth-child(6n+3) { --stamp-tilt: -1.2deg; }
#stamps-screen .stamp-card:nth-child(6n+4) { --stamp-tilt: 3deg; }
#stamps-screen .stamp-card:nth-child(6n+5) { --stamp-tilt: -3.4deg; }
#stamps-screen .stamp-card:nth-child(6n+6) { --stamp-tilt: 2.2deg; }
#stamps-screen .stamp-card:hover, #stamps-screen .stamp-card:active { transform: none; box-shadow: none; }
#stamps-screen .stamp-card-btn { padding-inline: 0; }
.stamp-card-art.is-struck,
.stamp-card-art-fallback.is-struck {
  border: 2px solid var(--vn-coral);
  box-shadow: inset 0 0 0 3px var(--df-panel), inset 0 0 0 4px var(--vn-coral);
  color: var(--vn-coral);
  transform: rotate(var(--stamp-tilt, -2.6deg));
}
.stamp-card-art.is-struck::before { background: var(--vn-coral); }
.stamp-card-label { font-weight: 600; }

/* Complete board: a denser grid, the COMPLETE stamp in the head. Photo prints stay (#1815). */
.stamps-section.is-complete .stamps-grid { gap: var(--space-sm); }
.stamps-section.is-complete .stamp-card-btn { min-height: var(--tap-min); padding: 0; }
.stamps-section.is-complete .stamp-card-art,
.stamps-section.is-complete .stamp-card-art-fallback { width: 40px; height: 40px; }
.stamps-section.is-complete .stamp-card-label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* #6149 — snap to collect on web (behind FEATURE_STAMPS_WEB_COLLECT). */
.stamps-snap { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-md); margin: var(--space-lg) 0; }
.stamps-snap-panel { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-md); width: 100%; }
.stamps-snap-panel:empty { display: none; }
.stamps-snap-banner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md); padding: var(--space-md); border: 2px solid var(--df-ink); border-radius: var(--radius-sm); background: var(--df-panel); font-weight: 600; }
.stamps-snap-title { margin: 0 0 var(--space-sm); font-size: var(--fs-sm); }
.stamps-snap-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-sm); }
.stamps-snap-suggestion { display: flex; align-items: center; gap: var(--space-md); width: 100%; min-height: var(--tap-min); padding: var(--space-sm) var(--space-md); border: 2px solid var(--df-ink); border-radius: var(--radius-sm); background: var(--df-panel); color: var(--df-ink); font: inherit; text-align: left; cursor: pointer; }
.stamps-snap-suggestion:disabled { opacity: 0.55; cursor: default; }
.stamps-snap-art { flex: none; width: 44px; height: 44px; background: var(--df-ink); -webkit-mask: var(--stamp-art) center / contain no-repeat; mask: var(--stamp-art) center / contain no-repeat; }
.stamps-snap-suggestion-text { display: flex; flex-direction: column; }
.stamps-snap-suggestion-label { font-weight: 600; }
.stamps-snap-suggestion-board, .stamps-snap-note { font-size: var(--fs-xs); opacity: 0.75; }
.stamps-snap-looking, .stamps-snap-none, .stamps-snap-have, .stamps-snap-note { margin: 0; }

/* #6367 — the slot under the results: "Show more boards", or the next page's skeleton while it loads. */
.stamps-more { margin-top: var(--space-md); display: flex; flex-direction: column; align-items: center; gap: var(--space-xs); }
.stamps-more:empty { display: none; }
.stamps-more .stamps-skeleton-grid { width: 100%; }
.stamps-more-error { margin: 0; color: var(--text-muted); }

/* #7371 (F10): Snap energy. A bar of 10; the Trip Pass bar is the green card (50, +25). */
.stamps-energy-slot { width: 100%; }
.stamps-energy-slot:empty { display: none; }
.stamps-energy { display: flex; align-items: center; gap: var(--sp-sm); width: 100%; padding: var(--sp-sm); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); background: var(--df-panel); color: var(--df-ink); box-shadow: var(--df-press); }
.stamps-energy-bolt { font-size: var(--fs-xl); flex: none; }
.stamps-energy-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-xs); }
.stamps-energy-head { display: flex; align-items: baseline; gap: var(--sp-sm); }
.stamps-energy-title { font-family: var(--df-title); font-size: var(--fs-md); flex: 1; }
.stamps-energy-count { font-weight: 800; }
.stamps-energy-count b { font-size: var(--fs-lg); }
.stamps-energy-bar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; }
.stamps-energy-seg { height: 10px; border: 2px solid var(--df-ink); border-radius: var(--df-radius-print); }
.stamps-energy-seg.on { background: var(--df-ink); }
.stamps-energy-refill { margin: 0; font-size: var(--fs-xs); color: var(--df-ink-soft); }
.stamps-energy-get { position: relative; padding: 0; border: 0; background: none; color: var(--df-brand); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.stamps-energy-get::before { content: ''; position: absolute; inset: 50% auto auto 50%; width: max(var(--tap-min), 100%); height: var(--tap-min); transform: translate(-50%, -50%); }
.stamps-energy-pass { background: var(--df-brand); color: var(--df-brand-fg); }
.stamps-energy-pass .stamps-energy-seg { border-color: var(--df-brand-fg); }
.stamps-energy-pass .stamps-energy-seg.on { background: var(--df-brand-fg); }
.stamps-energy-pass .stamps-energy-refill { color: inherit; opacity: 0.85; }
.stamps-energy-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--df-panel); color: var(--df-ink); font-size: var(--fs-xl); }
.stamps-energy-sheet { display: flex; flex-direction: column; gap: var(--sp-sm); }
.stamps-energy-hand { width: 100%; min-height: var(--tap-min); border-radius: 999px; }

/* #7696, #7714 - one box per country (Passport page). The header row is the fold control; the box
   wears the resting offset because that row is pressable. */
.stamps-country {
  margin-bottom: var(--sp-lg);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
  box-shadow: var(--df-press-large);
}
.stamps-country-head { margin: 0; }
.stamps-country-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  width: 100%;
  min-height: 96px;
  padding: var(--sp-lg) var(--sp-xl);
  border: 0;
  border-radius: var(--df-radius-card);
  background: none;
  color: var(--df-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.stamps-country-btn:focus-visible { outline-offset: -6px; }
.stamps-country-btn:is([aria-expanded="true"], .is-closing) { border-bottom: 2px solid var(--df-ink); border-radius: var(--df-radius-card) var(--df-radius-card) 0 0; }
/* The country code, struck in coral. */
.stamps-country-code {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border: 3px solid var(--vn-coral);
  border-radius: 50%;
  color: var(--vn-coral-text);
  font-family: var(--df-sans);
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: 0.04em;
  transform: rotate(-8deg);
}
.stamps-country-id { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-xs); }
.stamps-country-name { overflow-wrap: anywhere; font-family: var(--df-title); font-size: var(--fs-2xl); font-weight: 700; line-height: 1.15; }
.stamps-country-meta { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--df-sans); font-size: var(--fs-sm); font-weight: 400; color: var(--df-ink-soft); }
/* #7797 - .is-closing holds the open header until the panel has finished shutting. */
.stamps-country-btn:is([aria-expanded="true"], .is-closing) .stamps-country-meta-folded,
.stamps-country-btn[aria-expanded="false"]:not(.is-closing) .stamps-country-meta-open { display: none; }
.stamps-country-count { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-sm); font-family: var(--df-sans); font-size: var(--fs-sm); font-weight: 400; color: var(--df-ink-soft); font-variant-numeric: tabular-nums; }
.stamps-country-count:empty { display: none; }
.stamps-country-count b { font-size: var(--fs-2xl); font-weight: 800; line-height: 1; color: var(--df-ink); }
.stamps-country-bar { display: block; width: 180px; height: 10px; overflow: hidden; border: 2px solid var(--df-ink); border-radius: 999px; background: var(--df-ground); }
.stamps-country-bar > span { display: block; height: 100%; background: var(--vn-amber); }
.stamps-country-chevron { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--tap-min); height: var(--tap-min); border: 2px solid var(--df-ink); border-radius: 999px; font-size: var(--fs-lg); }
.stamps-country-btn[aria-expanded="false"] .stamps-country-chevron > i { transform: rotate(-90deg); }
@media (prefers-reduced-motion: no-preference) {
  .stamps-country-chevron > i { transition: transform var(--dur-feedback) var(--ease-out); }
}

/* Inside the box a board is a section, not a card: a dashed perforation parts it from the next. */
.stamps-country-boards { padding: var(--sp-sm) var(--sp-xl) var(--sp-xl); }
.stamps-country .stamps-section { margin: 0; padding: var(--sp-lg) 0 var(--sp-sm); background: none; border: 0; border-radius: 0; }
.stamps-country .stamps-section + .stamps-section { margin-top: var(--sp-lg); border-top: 2px dashed var(--df-hair); }

@media (max-width: 680px) {
  /* The phone board: name and tally on one line; under them the bar while open, the board count while folded. */
  .stamps-country-btn { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-content: center; gap: var(--sp-xs) var(--sp-md); min-height: 76px; padding: var(--sp-md); }
  .stamps-country-id, .stamps-country-count { display: contents; }
  .stamps-country-code { grid-area: 1 / 1 / 3 / 2; width: 46px; height: 46px; font-size: var(--fs-md); }
  .stamps-country-name { grid-area: 1 / 2; align-self: end; font-size: var(--fs-xl); }
  .stamps-country-count > [aria-hidden="true"]:first-child { grid-area: 1 / 3; align-self: end; font-family: var(--df-sans); font-size: var(--fs-sm); color: var(--df-ink-soft); font-variant-numeric: tabular-nums; }
  .stamps-country-count b { font-size: var(--fs-lg); }
  .stamps-country-word, .stamps-country-meta-folded { display: none; }
  .stamps-country-bar { grid-area: 2 / 2 / 3 / 4; width: 100%; height: 8px; }
  .stamps-country-meta { grid-area: 2 / 2 / 3 / 4; }
  .stamps-country-btn:is([aria-expanded="true"], .is-closing) .stamps-country-meta,
  .stamps-country-btn[aria-expanded="false"]:not(.is-closing) .stamps-country-bar { display: none; }
  .stamps-country-chevron { grid-area: 1 / 4 / 3 / 5; width: var(--sp-xl); border: 0; }
  .stamps-country-boards { padding: var(--sp-xs) var(--sp-md) var(--sp-lg); }
}

/* #7762 - the Places / Collections switch: a Cut Stock pill under the total. */
.stamps-view-switch {
  display: flex;
  gap: var(--sp-xs);
  padding: var(--sp-xs);
  margin-bottom: var(--sp-md);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--radius-pill);
}
.stamps-view-btn {
  flex: 1;
  min-height: var(--tap-min);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}
.stamps-view-btn.active { background: var(--selected-bg); color: var(--on-selected); }

/* One box per collection (#7791). A box that folds is pressable, so it carries the shadow. */
.stamps-coll-cards, .stamps-matches { list-style: none; margin: 0 0 var(--sp-lg); padding: 0; display: flex; flex-direction: column; gap: var(--sp-md); }
.stamps-coll { min-width: 0; background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); scroll-margin-top: var(--sp-xl); }
.stamps-coll.is-pressable { box-shadow: var(--df-press); }
.stamps-coll-head { margin: 0; font: inherit; }
.stamps-coll-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  padding: var(--sp-md);
  text-align: left;
  font-family: var(--df-sans);
  color: var(--df-ink);
  background: none;
  border: 0;
  border-radius: var(--df-radius-card);
}
button.stamps-coll-card { cursor: pointer; }
button.stamps-coll-card:focus-visible { outline-offset: -6px; }
.stamps-coll-card:is([aria-expanded="true"], .is-closing) { border-bottom: 2px solid var(--df-ink); border-radius: var(--df-radius-card) var(--df-radius-card) 0 0; }
.stamps-coll-card:is([aria-expanded="true"], .is-closing) .stamps-coll-samples { display: none; }
.stamps-coll-chevron { flex: none; align-self: center; display: inline-flex; }
.stamps-coll-card[aria-expanded="false"] .stamps-coll-chevron > i { transform: rotate(-90deg); }
@media (prefers-reduced-motion: no-preference) {
  .stamps-coll-chevron > i { transition: transform var(--dur-feedback) var(--ease-out); }
}
.stamps-coll-panel { padding: var(--sp-md); }
.stamps-coll-card.is-static + .stamps-coll-panel { padding-top: 0; }
.stamps-coll-card .stamps-complete { align-self: flex-start; }
.stamps-coll-card .stamps-route { width: 100%; margin: 0; }
.stamps-coll-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-sm); }
.stamps-coll-top .stamps-kicker { flex: 1; min-width: 0; margin: 0; }
.stamps-coll-count { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stamps-coll-name { margin: 0; font-family: var(--df-title); font-size: var(--fs-xl, var(--fs-lg)); font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.stamps-coll-samples { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-sm); }
.stamps-coll-more { font-size: var(--fs-sm); color: var(--df-ink-soft); }
.stamps-match-open {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  min-height: var(--tap-min);
  min-width: var(--tap-min);
  padding: 0;
  border: 0;
  background: none;
  color: var(--df-ink);
  font-family: var(--df-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}

/* A small stamp: dashed die until collected, then struck. */
.stamps-mini {
  flex: none;
  position: relative;
  width: var(--tap-min);
  height: var(--tap-min);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--df-ink-soft);
  border-radius: var(--df-radius-stub);
  color: var(--df-ink-soft);
}
.stamps-mini:not(.is-fallback)::before {
  content: '';
  position: absolute;
  inset: var(--sp-xs);
  background: currentColor;
  -webkit-mask: var(--stamp-art) center / contain no-repeat;
  mask: var(--stamp-art) center / contain no-repeat;
}
.stamps-mini.is-struck { border: 3px double var(--vn-coral); color: var(--vn-coral); }

/* #7761 - search: the count line and the "On collections" rows. */
.stamps-search-count { margin: 0 0 var(--sp-sm); font-size: var(--fs-sm); color: var(--df-ink-soft); }
.stamps-search-count:empty { display: none; }
.stamps-match-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-md);
  background: var(--df-panel);
  border: 2px solid var(--df-ink);
  border-radius: var(--df-radius-card);
}
.stamps-match-stamp {
  flex: 1;
  min-width: 0;
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  color: var(--df-ink);
  font-family: var(--df-sans);
  cursor: pointer;
}
.stamps-match-id { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.stamps-match-name { font-family: var(--df-title); font-size: var(--fs-lg); }
.stamps-match-from { font-size: var(--fs-xs); color: var(--df-ink-soft); }
.stamps-match-from mark { background: transparent; color: inherit; border-bottom: 2px solid var(--vn-coral); }

/* #7765 - inside an open collection: its own search, "Not collected first" and folding region groups. */
.stamps-board-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-sm); margin-bottom: var(--sp-lg); }
.stamps-board-search { flex: 1 1 200px; }
.stamps-region { margin-bottom: var(--sp-md); background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-card); box-shadow: var(--df-press-large); }
.stamps-region-head { margin: 0; }
.stamps-region-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--sp-sm) var(--sp-md);
  border: 0;
  border-radius: var(--df-radius-card);
  background: none;
  color: var(--df-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.stamps-region-btn:focus-visible { outline-offset: -6px; }
.stamps-region-name { flex: 1; min-width: 0; font-family: var(--df-title); font-size: var(--fs-xl); font-weight: 700; overflow-wrap: anywhere; }
.stamps-region-bar { flex: none; width: 56px; height: 8px; }
.stamps-region-count { flex: none; font-family: var(--df-sans); font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.stamps-region-chevron { flex: none; display: inline-flex; }
.stamps-region-btn[aria-expanded="false"] .stamps-region-chevron > i { transform: rotate(-90deg); }
@media (prefers-reduced-motion: no-preference) {
  .stamps-region-chevron > i { transition: transform var(--dur-feedback) var(--ease-out); }
}
.stamps-region-body { padding: var(--sp-sm) var(--sp-md) var(--sp-md); }

/* /css/features/trip-journey.css */
/* Issue #2205 (#1199 Part 1) — the journey section on Recap
   (js/features/trip-journey/trip-journey.js). Static: no entrance motion,
   so nothing to answer in style.css's prefers-reduced-motion block.
   The one exception is the public page's route (#5873, end of file), whose
   hidden start state sits behind prefers-reduced-motion: no-preference. */

.journey-timeline,
.journey-days,
.journey-stops {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* The quiet button (DESIGN.md → Buttons). .btn-link had no base rule, so
   every Recap/Journey one painted as a grey native button. */
.recap-section .btn-link,
.route-day .btn-link,
.journey-section .btn-link,
.group-photo-slot .btn-link,
.group-photo-add {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--tap-min);
  max-width: 100%;
  padding: 0 var(--space-sm);
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--vn-trail-green);
  font-family: var(--df-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  text-align: left;
}

.journey-timeline {
  border-left: 2px solid var(--df-hair);
  margin-left: var(--space-md);
  padding-left: var(--space-xl);
}
.journey-moment {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs) var(--space-md);
  padding: var(--space-sm) 0;
  font-family: var(--df-sans);
  font-size: 14px;
  line-height: 1.6;
}
.journey-moment .ti { color: var(--vn-trail-green); }
.journey-moment-when {
  color: var(--df-ink-soft);
  font-family: var(--df-sans);
  font-size: 12px;
  line-height: 1.3;
}

.journey-days { margin-top: var(--space-xl); }
.journey-day { padding: var(--space-lg) 0; border-top: 2px solid var(--df-hair); }
.journey-day-quiet {
  padding: var(--space-md) 0;
  color: var(--df-ink-soft);
  font-family: var(--df-sans);
  font-size: 14px;
  line-height: 1.6;
}
.journey-day-title { margin: 0 0 var(--space-md); font-size: var(--fs-sm); }

.journey-group-photo {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--df-radius-stub);
  margin-bottom: var(--space-md);
}

.journey-stops li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-xs) 0;
}
.journey-stop-name { display: inline-flex; align-items: center; gap: var(--space-xs); }
.journey-stop-photos { display: flex; gap: var(--space-xs); }

/* #2395 — the journey map: numbered pins in the order the group went. */
.journey-map { margin: var(--space-md) 0; }
.journey-map-canvas {
  height: 280px;
  border-radius: var(--df-radius-stub);
  overflow: hidden;
  border: 1px solid var(--df-hair);
}
.journey-map-pin {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--df-amber-fg);
  background: var(--df-amber);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}
.journey-map-pin-unplanned { background: var(--df-ink-soft); }

/* #2394 — a stamp collected at a stop. */
.journey-stamp-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-xs);
  color: var(--df-ink-soft);
}

/* #2393 — an unplanned stop: how the trip detoured. */
.journey-unplanned-meta { color: var(--df-ink-soft); font-size: var(--fs-xs); }
.journey-unplanned-tag {
  border: 1px solid var(--df-hair);
  border-radius: 999px;
  padding: 0 var(--space-sm);
}
.journey-stop-photo {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--df-radius-stub);
}

.journey-home {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  font-weight: 600;
}
.journey-error { color: var(--df-ink-soft); font-size: var(--fs-xs); }

/* Issue #2206 — the daily group photo slot on today's day card. */
.group-photo-slot { margin: var(--space-md) var(--space-lg); }
.group-photo-slot-empty .group-photo-add { min-height: var(--tap-min); width: 100%; }
.group-photo-img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--df-radius-stub);
}
.group-photo-slot figcaption { margin-top: var(--space-xs); text-align: right; }
.group-photo-remove,
.journey-day .group-photo-add { min-height: var(--tap-min); }

/* Issue #2207 — the journey cover and the host's picker. */
.journey-cover {
  margin: 0 0 var(--space-md);
  border-radius: var(--df-radius-stub);
  overflow: hidden;
}
.journey-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.journey-cover-single img { max-height: 420px; }
.journey-cover-collage { display: grid; gap: 2px; grid-template-columns: 1fr 1fr; aspect-ratio: 4 / 3; }
.journey-cover-collage-3 img:first-child { grid-row: span 2; }
.journey-cover-text {
  border: 2px solid var(--df-hair);
  padding: var(--space-xl);
}
.journey-cover-title {
  margin: 0;
  font-family: var(--df-title);
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.journey-cover-choose { min-height: var(--tap-min); }

.journey-cover-picker { margin: var(--space-md) 0 var(--space-lg); }
.journey-cover-picker-hint { margin: 0 0 var(--space-sm); font-size: var(--fs-xs); color: var(--df-ink-soft); }
.journey-cover-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: var(--space-sm); }
.journey-cover-tile {
  position: relative;
  padding: 0;
  border: 2px solid var(--df-hair);
  border-radius: var(--df-radius-stub);
  overflow: hidden;
  aspect-ratio: 1;
  min-height: var(--tap-min);
  background: none;
  cursor: pointer;
}
.journey-cover-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.journey-cover-tile.is-picked { border-color: var(--vn-trail-green); }
.journey-cover-tile-n {
  position: absolute;
  top: 4px;
  left: 4px;
  min-width: 20px;
  border-radius: 999px;
  background: var(--vn-trail-green);
  color: var(--df-panel);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-align: center;
}
.journey-cover-picker-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-md); }

/* Issue #2208 — the photo-sharing consent ask / status. */
.journey-consent { margin: 0 0 var(--space-lg); font-size: var(--fs-xs); }
.journey-consent-ask {
  border: 2px solid var(--df-hair);
  border-radius: var(--df-radius-stub);
  padding: var(--space-lg) var(--space-xl);
}
.journey-consent-ask p { margin: 0 0 var(--space-xs); }
.journey-consent-note { color: var(--df-ink-soft); }
.journey-consent-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-md); }
.journey-consent-actions button,
.journey-consent-status .btn-link { min-height: var(--tap-min); }
.journey-consent-status { color: var(--df-ink-soft); }

/* Issue #2209 — "Share our journey" and its sheet. */
.journey-share-btn { min-height: var(--tap-min); margin: 0 0 var(--space-md); }
.journey-share-panel {
  border: 2px solid var(--df-hair);
  border-radius: var(--df-radius-stub);
  padding: var(--space-lg) var(--space-xl);
  margin: 0 0 var(--space-lg);
  font-size: var(--fs-xs);
}
.journey-share-panel p { margin: 0 0 var(--space-sm); }
.journey-share-notice { display: flex; gap: var(--space-xs); align-items: baseline; }
.journey-share-withheld { color: var(--df-ink-soft); }
.journey-share-withheld .btn-link { min-height: var(--tap-min); }
.journey-share-money { display: flex; gap: var(--space-sm); align-items: center; min-height: var(--tap-min); }
.journey-share-go { min-height: var(--tap-min); margin-top: var(--space-sm); }

/* Issue #2210 — the public journey page, /j/:shareId. */
#journey-public-screen { min-height: 100vh; min-height: 100dvh; }
.journey-public { max-width: 640px; margin: 0 auto; padding: var(--space-xl) 16px 48px; }
.journey-public-title { font-size: var(--fs-xl); margin: var(--space-lg) 0 var(--space-xs); }
.journey-public-sub { color: var(--df-ink-soft); margin: 0 0 var(--space-xl); }
.journey-public-counts { margin: var(--space-xl) 0; font-weight: 600; }
.journey-public-cta { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap-min); text-decoration: none; }

/* Issue #2210 — managing public journey links in Recap. */
.journey-links { margin: 0 0 var(--space-lg); font-size: var(--fs-xs); }
.journey-link-label { display: block; font-weight: 600; margin: 0 0 var(--space-xs); }
.journey-link-row { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }
.journey-link-row input { flex: 1 1 200px; min-width: 0; }
.journey-link-row button,
.journey-link-create,
.journey-link-others .btn-link { min-height: var(--tap-min); }
.journey-link-note { color: var(--df-ink-soft); margin: var(--space-xs) 0 0; }
.journey-link-others ul { list-style: none; margin: 0; padding: 0; }
.journey-link-others li { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); }

/* #2704 — "Before you tell everyone" sheet */
.group-photo-gap-hint { color: var(--text-secondary); font-size: var(--fs-xs); margin: 0 0 var(--space-md); }
.group-photo-gaps { list-style: none; margin: 0 0 var(--space-lg); padding: 0; }
.group-photo-gaps li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); min-height: var(--tap-min); }

/* #4077 — Route of the Day: a day's planned stops and dashed route. */
.route-day { margin: var(--space-md) 0; }
.route-day-layers { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-sm); }
.route-day-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--tap-min);
  padding: 0 var(--space-md);
  border: 2px solid var(--df-ink);
  border-radius: 999px;
  background: transparent;
  color: var(--df-ink);
  font: inherit;
  cursor: pointer;
}
/* The pressed state is the tick in the box, not a filled pill (#6251). */
.route-day-check {
  width: 16px;
  height: 16px;
  flex: none;
  display: grid;
  place-items: center;
  border: 2px solid var(--df-ink);
  border-radius: 4px;
}
.route-day-toggle[aria-pressed="true"] .route-day-check::after {
  content: '';
  width: 8px;
  height: 4px;
  margin-top: -2px;
  border-left: 2px solid var(--df-ink);
  border-bottom: 2px solid var(--df-ink);
  transform: rotate(-45deg);
}
.route-day-canvas {
  height: 280px;
  border-radius: var(--df-radius-stub);
  overflow: hidden;
  border: 2px solid var(--df-ink);
}
.route-day-canvas[hidden] { display: none; }
/* A day with nothing located: no map, no toggles, just the one line. */
.route-day.is-empty .route-day-layers { display: none; }
/* Line swatches: dashed amber = planned, solid ink = recorded. */
.route-day-swatch { width: 16px; height: 0; flex: none; }
.route-day-swatch-planned { border-top: 3px dashed var(--df-amber); }
.route-day-swatch-actual { border-top: 4px solid var(--df-ink); }
.route-day-summary { margin: var(--space-sm) 0 0; color: var(--df-ink-soft); }
/* #4200 — the empty state when the day has no recorded line. */
.route-day-norecord { display: block; margin-top: var(--space-xs); }
.route-day-delete { display: block; margin-top: var(--space-xs); min-height: var(--tap-min); }
.route-day-approx {
  margin-left: var(--space-xs);
  padding: 0 var(--space-xs);
  border: 1px solid var(--df-hair);
  border-radius: 999px;
  font-size: var(--fs-xs);
}
/* The board's numbered amber pin; ink-filled once the stop is visited. */
.route-day-pin {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--df-amber-fg);
  background: var(--df-amber);
  border: 2px solid var(--df-ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}
.route-day-pin-visited { color: var(--df-amber); background: var(--df-ink); }

/* Route of the Day (#4085): the trimmed public line, drawn as an SVG. */
.journey-route-svg { display: block; width: 100%; max-width: 420px; margin: 0 0 var(--space-md); background: var(--df-hair); border-radius: var(--radius-md, 12px); }
.journey-route-line { stroke: var(--vn-trail-green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.journey-route-planned { stroke: var(--df-ink-soft); stroke-width: 2; stroke-dasharray: 4 4; stroke-linecap: round; stroke-linejoin: round; }

/* #5873 — the public journey's route Traces once on arrival: each day's line
   draws itself (pathLength="1" makes the dash maths unit-free). Presentation
   only; the markup and allow-list are unchanged. The planned route keeps its
   dashes and stays put. Reduced motion never enters this block, so the line
   simply sits drawn. */
@media (prefers-reduced-motion: no-preference) {
  .journey-public .journey-route-line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: journey-route-trace var(--dur-strike) var(--ease-out) both;
  }
}
@keyframes journey-route-trace { to { stroke-dashoffset: 0; } }

/* #6464 — the public journey page, direction A "Return ticket"
   (docs/design/public-journey/). Scoped to #journey-public-screen because the
   .journey-* classes are shared with the Recap owner view. Print ground comes
   from style.css; fonts and colours are tokens only. */
#journey-public-screen { --jp-pad: 16px; }
#journey-public-screen .jp-bar {
  position: sticky; top: 10px; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg);
  min-height: 64px; margin: 10px 10px 0; padding: 8px 14px;
  background: var(--topbar-bg); border: 2px solid var(--df-ink); border-radius: 16px;
}
#journey-public-screen .jp-bar-lockup { display: inline-flex; min-height: var(--tap-min); align-items: center; }
#journey-public-screen .jp-bar-lockup img { display: block; height: var(--logo-nav); width: auto; }
#journey-public-screen .jp-sticker {
  display: inline-flex; align-items: center; min-height: var(--tap-min); padding: 0 18px;
  border: 2px solid var(--df-pin-keyline); border-radius: 999px;
  background: #ffe3c4; color: var(--df-pin-deep-green);
  font: 700 var(--fs-sm)/1 var(--df-sans); text-decoration: none; box-shadow: 2px 2px 0 var(--df-pin-keyline);
}
#journey-public-screen .journey-public { max-width: none; padding: 0; margin: 0; }
#journey-public-screen .jp-page { display: block; padding: var(--space-4xl) var(--jp-pad) 28px; }
#journey-public-screen .jp-side, #journey-public-screen .jp-main { display: flex; flex-direction: column; gap: var(--space-4xl); min-width: 0; }
#journey-public-screen .jp-page > * + * { margin-top: var(--space-4xl); }

#journey-public-screen .jp-eyebrow { margin: 0; font: 700 var(--fs-xs)/1.3 var(--df-sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink-soft); }
#journey-public-screen .journey-public-title { margin: var(--space-md) 0 var(--space-lg); font-family: var(--df-title); font-weight: 700; font-size: 32px; line-height: 1.08; color: var(--df-ink); }
#journey-public-screen .journey-public-sub { display: flex; align-items: center; gap: var(--space-lg); margin: 0; font-size: var(--fs-md); color: var(--df-ink); }
#journey-public-screen .jp-disc {
  box-sizing: border-box; width: 32px; height: 32px; flex: none; display: inline-grid; place-items: center;
  border: 2px solid var(--df-ink); border-radius: 50%; background: color-mix(in srgb, var(--vn-trail-green) 18%, var(--df-panel));
  font: 700 var(--fs-sm)/1 var(--df-sans); color: var(--df-ink);
}
#journey-public-screen .jp-disc-empty { background: transparent; border-style: dashed; }
#journey-public-screen .jp-discs { display: inline-flex; margin-left: auto; }
#journey-public-screen .jp-discs .jp-disc + .jp-disc { margin-left: -6px; }

/* Text cover (S2): the Field Green card with the destination stamped. */
#journey-public-screen .jp-title-text {
  padding: var(--space-4xl); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub);
  background: var(--topbar-bg); color: #ffe3c4;
}
#journey-public-screen .jp-title-text .jp-eyebrow,
#journey-public-screen .jp-title-text .journey-public-sub { color: #cfe8d4; }
#journey-public-screen .jp-title-text .journey-public-title { color: #fff7ec; }
#journey-public-screen .jp-stamp {
  display: inline-block; margin: var(--space-md) 0 var(--space-xl);
  padding: 2px 12px 4px; border: 3px solid #ffe3c4; border-radius: 6px;
  font: 800 44px/1 var(--df-display); letter-spacing: -0.02em; text-transform: uppercase; transform: rotate(-2deg);
}

/* The ticket: Recap's pins and fields, with the board's own sub-lines. */
#journey-public-screen .jp-ticket {
  position: relative; background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub);
  padding: var(--space-4xl) var(--space-4xl) var(--space-3xl);
}
#journey-public-screen .jp-ticket-label { margin: 0 0 var(--space-3xl); font: 700 var(--fs-xs)/1.3 var(--df-sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--df-ink); }
#journey-public-screen .jp-ticket .recap-route { justify-content: center; flex-wrap: nowrap; }
#journey-public-screen .jp-ticket .recap-route-stop, #journey-public-screen .jp-ticket .recap-route-stop:first-child, #journey-public-screen .jp-ticket .recap-route-stop:last-child { align-items: center; }
#journey-public-screen .jp-ticket .recap-route-name { text-align: center; }
#journey-public-screen .jp-ticket .recap-route-name { font: 500 var(--fs-md)/1.2 var(--df-sans); letter-spacing: 0; text-transform: none; max-width: none; }
#journey-public-screen .jp-pin-sub { font: 400 var(--fs-sm)/1.2 var(--df-sans); color: var(--df-ink-soft); text-align: center; }
#journey-public-screen .jp-ticket-foot {
  position: relative; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: var(--space-lg);
  margin: var(--space-3xl) calc(-1 * var(--space-4xl)) 0; padding: var(--space-3xl) var(--space-4xl) 0;
  border-top: 2px dashed var(--df-ink);
}
/* The tear notches. */
#journey-public-screen .jp-ticket-foot::before,
#journey-public-screen .jp-ticket-foot::after {
  content: ''; position: absolute; top: -13px; width: 24px; height: 24px; box-sizing: border-box;
  border: 2px solid var(--df-ink); border-radius: 50%; background: var(--df-ground);
}
#journey-public-screen .jp-ticket-foot::before { left: -14px; clip-path: inset(0 0 0 50%); }
#journey-public-screen .jp-ticket-foot::after { right: -14px; clip-path: inset(0 50% 0 0); }
#journey-public-screen .jp-ticket-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 0; padding-top: 0; }
#journey-public-screen .jp-ticket .recap-route-dash {
  display: block; flex: 1 1 20px; min-width: 16px; height: 3px; margin: 19px 6px 0;
  background: repeating-linear-gradient(90deg, var(--df-amber) 0 9px, transparent 9px 18px);
}
#journey-public-screen .jp-ticket .recap-route-dash + .recap-route-stop { margin-left: 0; }
#journey-public-screen .jp-ticket .recap-route-dash + .recap-route-stop::before { display: none; }
#journey-public-screen .jp-ticket .recap-route-name, #journey-public-screen .jp-pin-sub { white-space: nowrap; }
#journey-public-screen .jp-ticket .recap-route { justify-content: space-between; }
#journey-public-screen .jp-ticket .recap-home { font-size: 40px; }

/* Cards: the story, the call to action and each day. */
#journey-public-screen .jp-card, #journey-public-screen .jp-cta-card {
  background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub);
  padding: var(--space-4xl);
}
#journey-public-screen .jp-card-title { margin: 0; font: 600 var(--fs-lg)/1.2 var(--df-sans); color: var(--df-ink); }
#journey-public-screen .jp-story-head { display: flex; align-items: flex-start; gap: var(--space-lg); margin-bottom: var(--space-xl); }
#journey-public-screen .journey-timeline { list-style: none; margin: 0; padding: 0; }
#journey-public-screen .journey-moment { position: relative; display: flex; gap: var(--space-xl); align-items: flex-start; padding: 0 0 var(--space-xl); min-height: 44px; }
#journey-public-screen .jp-moment:not(:last-child)::after {
  content: ''; position: absolute; left: 15px; top: 34px; bottom: 0; width: 3px;
  background: repeating-linear-gradient(180deg, var(--df-amber) 0 6px, transparent 6px 12px);
}
#journey-public-screen .jp-moment-dot {
  box-sizing: border-box; width: 32px; height: 32px; flex: none; display: grid; place-items: center;
  border: 2px solid var(--df-ink); border-radius: 50%; background: transparent; color: var(--df-ink);
}
#journey-public-screen .jp-moment-start .jp-moment-dot, #journey-public-screen .jp-moment-lock .jp-moment-dot { background: var(--df-amber); }
#journey-public-screen .journey-moment .ti { color: var(--df-ink); }
#journey-public-screen .journey-moment-text { display: flex; flex-direction: column; font-size: var(--fs-md); color: var(--df-ink); }
#journey-public-screen .jp-moment-sub { font-size: var(--fs-sm); color: var(--df-ink-soft); }
#journey-public-screen .jp-cta-card { display: none; }

/* Instant prints (DESIGN.md, Signature: The Instant Print). */
#journey-public-screen .jp-print {
  position: relative; align-self: start; display: block; box-sizing: border-box; padding: 10px 10px 34px;
  background: var(--df-instant-stock); border-radius: 3px; box-shadow: var(--df-press-lift);
  transform: rotate(-1.6deg);
}
#journey-public-screen .jp-print::before, #journey-public-screen .jp-print::after {
  content: ''; position: absolute; top: -9px; width: 54px; height: 20px;
  background: color-mix(in srgb, var(--df-amber) 42%, transparent);
}
#journey-public-screen .jp-print::before { left: 14%; transform: rotate(-4deg); }
#journey-public-screen .jp-print::after { right: 14%; transform: rotate(3.4deg); }
#journey-public-screen .jp-print img { display: block; width: 100%; height: auto; max-height: none; aspect-ratio: 4 / 5; object-fit: cover; }
#journey-public-screen .jp-print-group { transform: rotate(1.2deg); }
#journey-public-screen .jp-print-group img { aspect-ratio: 5 / 4; }
#journey-public-screen .journey-cover { margin: 0; background: none; border-radius: 0; aspect-ratio: auto; }
#journey-public-screen .journey-cover-single { padding: var(--space-xl) var(--space-xl) var(--space-4xl); }
#journey-public-screen .jp-print-stack { box-shadow: var(--df-press-lift), 6px 8px 0 -2px var(--df-instant-stock), 6px 8px 14px rgba(9, 20, 13, 0.25); }
#journey-public-screen .journey-cover-collage { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4xl) var(--space-3xl); padding: var(--space-lg) var(--space-xl) var(--space-4xl); }
#journey-public-screen .journey-cover-collage .jp-print:nth-child(even) { transform: rotate(1.4deg); margin-top: var(--space-4xl); }
#journey-public-screen .journey-cover-collage-3 .jp-print:first-child { grid-row: span 2; }
#journey-public-screen .journey-cover-collage-1 { grid-template-columns: 1fr; }

/* Day cards. */
#journey-public-screen .journey-days { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4xl); }
#journey-public-screen .journey-day { padding: var(--space-4xl); border-top: 2px solid var(--df-ink); }
#journey-public-screen .jp-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-lg); margin-bottom: var(--space-3xl); }
#journey-public-screen .journey-day-title { margin: 0; font: 600 var(--fs-2xl)/1.1 var(--df-sans); color: var(--df-ink); }
#journey-public-screen .jp-day-count { font: 400 var(--fs-xs)/1 var(--df-sans); letter-spacing: 0; text-transform: none; color: var(--df-ink-soft); }
#journey-public-screen .jp-day-media { display: flex; flex-direction: column-reverse; gap: var(--space-4xl); margin-bottom: var(--space-xl); }
#journey-public-screen .jp-route { min-width: 0; }
#journey-public-screen .journey-route-svg {
  max-width: none; margin: 0; box-sizing: border-box; border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub);
  /* No halftone here: the dot screen belongs to the print ground alone (#5984). */
  background-color: color-mix(in srgb, var(--df-amber) 10%, var(--df-panel));
}
#journey-public-screen .journey-route-line { stroke: var(--df-ink); stroke-width: 4; }
#journey-public-screen .journey-route-planned { stroke: var(--df-amber); stroke-width: 4; stroke-dasharray: 9 7; }
#journey-public-screen .jp-legend { display: flex; align-items: center; gap: var(--space-md); margin: var(--space-lg) 0 0; font-size: var(--fs-sm); color: var(--df-ink-soft); }
#journey-public-screen .jp-legend-line { width: 26px; border-top: 4px solid var(--df-ink); }
#journey-public-screen .jp-legend-plan { width: 18px; margin-left: var(--space-xl); border-top: 4px dashed var(--df-amber); }
#journey-public-screen .journey-stops { list-style: none; margin: 0; padding: 0; }
#journey-public-screen .journey-visited {
  display: flex; align-items: center; gap: var(--space-xl); min-height: 56px; padding: var(--space-xl) 0;
  border-top: 2px dashed var(--df-hair);
}
#journey-public-screen .jp-pin {
  box-sizing: border-box; width: 32px; height: 32px; flex: none; display: grid; place-items: center;
  border: 2px solid var(--df-ink); border-radius: 50%; background: var(--df-amber); color: var(--df-amber-fg);
  font: 600 var(--fs-sm)/1 var(--df-sans);
}
#journey-public-screen .journey-stop-name { flex: 1; min-width: 0; font: 600 var(--fs-md)/1.25 var(--df-sans); color: var(--df-ink); overflow-wrap: anywhere; }
#journey-public-screen .journey-stop-name.is-unnamed { color: var(--df-ink-soft); font-weight: 400; }
#journey-public-screen .journey-stop-photos { display: flex; gap: var(--space-md); margin-left: auto; }
#journey-public-screen .journey-stop-photo {
  box-sizing: content-box; width: 52px; height: 52px; object-fit: cover; padding: 4px 4px 10px;
  background: var(--df-instant-stock); border-radius: 2px; box-shadow: 0 2px 6px rgba(9, 20, 13, 0.25); transform: rotate(1.4deg);
}
#journey-public-screen .journey-public-counts { margin: 0; text-align: center; font: 700 var(--fs-lg)/1.2 var(--df-sans); color: var(--df-ink); }

/* The footer poster: full bleed Field Green. */
#journey-public-screen .jp-poster {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-xl); text-align: center;
  padding: 48px var(--jp-pad); background: var(--topbar-bg); color: #fff7ec; border-top: 2px solid var(--df-ink);
}
#journey-public-screen .jp-poster-eyebrow { margin: 0; font: 700 var(--fs-sm)/1 var(--df-sans); letter-spacing: 0.12em; text-transform: uppercase; color: #cfe8d4; }
#journey-public-screen .jp-poster-title { margin: 0; font: 800 var(--fs-display-32)/1.05 var(--df-display); text-transform: uppercase; letter-spacing: -0.02em; }
#journey-public-screen .jp-poster-sub { margin: 0; max-width: 28ch; font-size: var(--fs-md); color: #cfe8d4; }
#journey-public-screen .jp-poster-login { min-height: var(--tap-min); display: inline-flex; align-items: center; color: #ffe3c4; font: 700 var(--fs-md)/1 var(--df-sans); border-bottom: 3px solid #cfe8d4; text-decoration: none; }
#journey-public-screen .jp-cta-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-md); box-sizing: border-box; width: 100%;
  min-height: 52px; padding: 0 22px; border: 2px solid var(--df-pin-keyline); border-radius: 999px;
  background: #ffe3c4; color: var(--df-pin-deep-green); font: 700 var(--fs-lg)/1 var(--df-sans); text-decoration: none;
  box-shadow: 3px 3px 0 var(--df-pin-keyline);
}
#journey-public-screen .jp-foot { margin: 0; padding: var(--space-4xl) var(--jp-pad); font-size: var(--fs-sm); color: var(--df-ink-soft); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-lg); }
#journey-public-screen .jp-foot-text { margin: 0; }
#journey-public-screen .jp-report-btn { min-height: var(--tap-min); margin-left: auto; padding: 0; background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
#journey-public-screen .jp-report-form { flex: 1 0 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--space-md); padding-left: max(0px, calc(100% - 420px)); }
#journey-public-screen .jp-report-form[hidden] { display: none; }
#journey-public-screen .jp-report-status { margin: 0; min-height: 1.2em; flex: 1 0 100%; }
/* #6859 (slice 5 of #6363): the report form takes the report sheet's chips and lines, W-R1 and W-R4.
   Inline in the footer on desktop; a bottom sheet over a scrim on phones. */
#journey-public-screen .jp-report-form { gap: 14px; color: var(--df-ink); }
#journey-public-screen .jp-report-head { display: none; align-items: center; gap: 12px; }
#journey-public-screen .jp-report-head h3 { margin: 0; flex: 1; font-family: var(--df-title); font-size: 22px; font-weight: 700; line-height: 1.15; }
#journey-public-screen .jp-report-glyph { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px; border: 2px solid var(--df-ink); border-radius: 50%; background: light-dark(#ffe3c4, #2a2118); }
#journey-public-screen .jp-report-x { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border: 2px solid var(--df-ink); border-radius: 50%; background: var(--df-panel); color: var(--df-ink); box-shadow: 2px 2px 0 var(--df-ink); cursor: pointer; }
#journey-public-screen .jp-report-target { margin: 0; font-size: var(--fs-sm); color: var(--df-ink-soft); }
#journey-public-screen .jp-report-field { display: flex; flex-direction: column; }
#journey-public-screen .jp-report-form .form-label { text-transform: none; letter-spacing: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--df-ink); margin-bottom: 8px; }
#journey-public-screen .jp-report-form textarea { background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: 12px; min-height: 84px; height: 84px; resize: none; font-size: 16px; line-height: 1.45; padding: 10px 12px; }
#journey-public-screen .jp-report-form .rs-banner[hidden] { display: none; }
#journey-public-screen .jp-report-form .rs-chips .ui-chip { box-shadow: 2px 2px 0 var(--df-ink); font-size: 14px; font-weight: 600; }
#journey-public-screen .jp-report-form .rs-chips .ui-chip[aria-pressed="true"] { background: var(--df-ink); border-color: var(--df-ink); color: var(--df-panel); }
#journey-public-screen .jp-report-form .btn-primary { min-height: 48px; font-size: 16px; font-weight: 600; box-shadow: 3px 3px 0 var(--df-ink); }
#journey-public-screen .jp-report-form .btn-primary:disabled { opacity: 0.45; box-shadow: none; }
#journey-public-screen .jp-report-form .rs-actions .stub-notice-quiet { min-height: 48px; font-size: 16px; font-weight: 600; }
#journey-public-screen .jp-report-form .rs-banner-err { order: 99; }
#journey-public-screen .jp-report-scrim[hidden] { display: none; }
@media (max-width: 680px) {
  #journey-public-screen .jp-report-scrim { position: fixed; inset: 0; z-index: 40; background: var(--df-scrim-soft); }
  #journey-public-screen .jp-report-form { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; padding: 10px 18px 28px; max-height: 90dvh; overflow-y: auto; background: var(--df-panel); border: 2px solid var(--df-ink); border-bottom: 0; border-radius: 22px 22px 0 0; }
  #journey-public-screen .jp-report-form::before { content: ""; display: block; flex: none; width: 42px; height: 5px; border-radius: 9px; margin: 0 auto 2px; background: light-dark(rgba(16, 26, 20, 0.22), rgba(255, 238, 218, 0.25)); }
  #journey-public-screen .jp-report-head { display: flex; }
  #journey-public-screen .jp-report-form.jp-report-failed .rs-actions .stub-notice-quiet, #journey-public-screen .jp-report-form.jp-report-offline .rs-actions .stub-notice-quiet { display: none; }
}
@media (min-width: 681px) {
  #journey-public-screen .jp-report-form .rs-actions { flex-direction: row; justify-content: flex-end; align-items: center; }
  #journey-public-screen .jp-report-form .rs-actions .btn-primary { order: 2; }
}

/* #6465 — the three non-content states: loading (S3), gone (S4) and
   couldn't load (S5). */
#journey-public-screen .jp-skel-title { display: flex; flex-direction: column; gap: var(--space-xl); }
#journey-public-screen .jp-page-loading .skeleton { background: color-mix(in srgb, var(--df-ink) 10%, transparent); border-radius: 12px; }
#journey-public-screen .jp-page-loading .skeleton-line { border-radius: 999px; }
#journey-public-screen .jp-page-loading .skeleton-circle { border-radius: 50%; }
#journey-public-screen .jp-ticket-skel .skeleton { background: color-mix(in srgb, var(--df-ink) 8%, transparent); }
#journey-public-screen .jp-skel-pins { display: flex; justify-content: space-between; margin-top: var(--space-3xl); }
#journey-public-screen .jp-skel-foot { display: block; }
#journey-public-screen .jp-skel-days { display: flex; flex-direction: column; gap: var(--space-4xl); }
@media (max-width: 1023px) {
  #journey-public-screen .jp-skel-title { order: 1; }
  #journey-public-screen .jp-skel-cover { order: 2; }
  #journey-public-screen .jp-skel-days { display: none; }
}

#journey-public-screen .jp-state { display: flex; flex-direction: column; gap: var(--space-4xl); padding: var(--space-4xl) var(--jp-pad); max-width: 520px; margin: 0 auto; }
#journey-public-screen .jp-state-card { background: var(--df-panel); border: 2px solid var(--df-ink); border-radius: var(--df-radius-stub); padding: var(--space-4xl); text-align: center; }
#journey-public-screen .jp-state-art {
  display: flex; align-items: center; justify-content: center; min-height: 110px; margin-bottom: var(--space-3xl);
  border: 2px dashed var(--df-ink); border-radius: var(--df-radius-stub);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--df-ink) 6%, transparent) 0 14px, transparent 14px 28px);
}
#journey-public-screen .jp-state-art .ti { font-size: 44px; color: var(--df-amber); }
#journey-public-screen .jp-void {
  display: inline-block; padding: 2px 12px; border: 3px solid var(--df-coral); border-radius: 6px; color: var(--df-coral);
  font: 800 var(--fs-xl)/1.1 var(--df-display); text-transform: uppercase; transform: rotate(-4deg);
}
#journey-public-screen .jp-state-title { margin: 0; font: 600 var(--fs-xl)/1.15 var(--df-sans); color: var(--df-ink); }
#journey-public-screen .jp-state-text { margin: var(--space-lg) auto 0; max-width: 34ch; font-size: var(--fs-md); color: var(--df-ink-soft); }
#journey-public-screen .jp-state-actions { display: flex; flex-direction: column; align-items: center; gap: var(--space-3xl); }
#journey-public-screen .jp-state-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-md); box-sizing: border-box; width: 100%;
  min-height: 52px; padding: 0 22px; border: 2px solid var(--df-ink); border-radius: 999px; cursor: pointer;
  background: var(--topbar-bg); color: #fff7ec; font: 700 var(--fs-lg)/1 var(--df-sans); text-decoration: none; box-shadow: var(--df-press);
}
#journey-public-screen .jp-state-btn:disabled { opacity: 0.6; cursor: default; }
#journey-public-screen .jp-state-link { min-height: var(--tap-min); display: inline-flex; align-items: center; color: var(--df-ink); font: 700 var(--fs-md)/1 var(--df-sans); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
@media (min-width: 1024px) {
  #journey-public-screen .jp-state { padding-top: 80px; max-width: 560px; }
  #journey-public-screen .jp-state-actions { flex-direction: row; justify-content: center; }
  #journey-public-screen .jp-state-btn { width: auto; }
}

/* Desktop: a 400px column (title, ticket, story, call to action) beside the
   cover and the days. The poster is replaced by the green card. */
/* Phone order: title, cover, ticket, story, days. The two columns dissolve
   into one flow so the cover can sit between the title and the ticket. */
@media (max-width: 1023px) {
  #journey-public-screen .jp-page { display: flex; flex-direction: column; gap: var(--space-4xl); }
  #journey-public-screen .jp-page > * + * { margin-top: 0; }
  #journey-public-screen .jp-side, #journey-public-screen .jp-main { display: contents; }
  #journey-public-screen .jp-title { order: 1; }
  #journey-public-screen .journey-cover { order: 2; }
  #journey-public-screen .jp-ticket { order: 3; }
  #journey-public-screen .jp-story { order: 4; }
  #journey-public-screen .journey-days { order: 5; }
  #journey-public-screen .journey-public-counts { order: 6; }
}
@media (min-width: 1024px) {
  #journey-public-screen { --jp-pad: 40px; }
  #journey-public-screen .journey-public-title { font-size: 40px; }
  #journey-public-screen .jp-ticket-fields { grid-template-columns: repeat(auto-fit, minmax(0, auto)); gap: var(--space-xl) var(--space-3xl); justify-content: start; }
  #journey-public-screen .jp-page { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 48px; align-items: start; max-width: 1280px; margin: 0 auto; }
  #journey-public-screen .jp-page > * + * { margin-top: 0; }
  #journey-public-screen .jp-cta-card { display: block; background: #0d4a21; border-color: var(--df-pin-keyline); color: #fff7ec; }
  #journey-public-screen .jp-cta-card .jp-card-title { color: #fff7ec; }
  #journey-public-screen .jp-cta-card p { margin: var(--space-md) 0 var(--space-3xl); color: #cfe8d4; }
  #journey-public-screen .jp-poster { display: none; }
  #journey-public-screen .jp-day.has-route .jp-day-media { flex-direction: row; align-items: flex-start; }
  #journey-public-screen .jp-day.has-route .jp-route { flex: 1; }
  #journey-public-screen .jp-day.has-route .jp-print-group { flex: 0 0 34%; }
  #journey-public-screen .jp-foot { max-width: 1280px; margin: 0 auto; }
  #journey-public-screen .jp-story-head .jp-discs { display: none; }
}

/* /css/features/itinerary-photos.css */
/* Issue #3042 — day photo grids and the "Photo for <stop>"
   sheet (js/itinerary-photos.js). Static: no entrance motion, so nothing to
   answer in style.css's prefers-reduced-motion block. Colours are the --df-*
   tokens so the dark theme follows. */
.day-photos { margin: 4px 16px 16px; }
.day-photos-hint { margin: 0 0 4px; font-family: var(--df-sans); font-size: var(--fs-xs); line-height: 1.4; color: var(--df-ink-soft); }
.day-photos-head { font-family: var(--df-sans); font-size: var(--fs-xs); font-weight: 700; line-height: 1.3; letter-spacing: .1em; text-transform: uppercase; color: var(--df-ink-soft); margin: 12px 0 10px; }
.day-photos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.day-photo-tile { position: relative; aspect-ratio: 1; border: 2px solid var(--df-ink); border-radius: var(--radius-sm); }
.day-photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: calc(var(--radius-sm) - 2px); }
.day-photos-head { display: flex; align-items: center; justify-content: space-between; }
.day-photos-chip { margin-inline-start: auto; }
.day-photos-chip:empty { display: none; }
.day-photos-chip .exp-scan-chip { text-transform: none; letter-spacing: 0; }
.day-photo-counter { display: flex; justify-content: flex-end; margin-bottom: var(--sp-md); }
.day-photo-counter:empty { display: none; }
.photo-remove-thumb { flex: none; width: 56px; height: 56px; object-fit: cover; border: 2px solid var(--df-ink); border-radius: var(--df-radius-print); }
.photo-remove-row .tp-cap-pname { display: flex; flex-direction: column; }
.photo-remove-row small { color: var(--df-ink-soft); font-size: var(--fs-xs); font-weight: 400; }
.day-photos-add { min-height: var(--tap-min); padding: 0 10px; border: 0; background: none; color: var(--df-brand); font-family: var(--df-sans); font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; cursor: pointer; }
.day-photo-stops { display: flex; flex-direction: column; gap: 8px; }
.day-photo-stops { border: 0; margin: 0 0 14px; padding: 0; }
.day-photo-stops-label { padding: 0; margin-bottom: 8px; font: 600 var(--fs-xs)/1 var(--df-sans); letter-spacing: .1em; color: var(--df-ink-soft); }
.day-photo-stop { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: var(--tap-min); padding: 0 14px; border: 2px solid var(--df-ink); border-radius: var(--radius-sm); background: var(--df-panel); color: var(--df-ink); cursor: pointer; }
/* The radio stays a real, focusable input; the card is its visible face. */
.day-photo-stop input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.day-photo-stop:has(input:checked) { background: var(--df-ink); color: var(--df-panel); }
.day-photo-stop:has(input:focus-visible) { outline: 2px solid var(--df-brand); outline-offset: 2px; }
.day-photo-stop-name { font-family: var(--df-sans); font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; }
.day-photo-stop-time { font-family: var(--df-sans); font-size: var(--fs-sm); line-height: 1.3; color: var(--df-ink-soft); white-space: nowrap; }
.day-photo-stop:has(input:checked) .day-photo-stop-time { color: inherit; }
/* Board P13/P16/P17: the close on the photo sheets is a 44px circle with a 2px ink border. */
#stopPhotoModal .modal-close,
#dayPhotoStopModal .modal-close,
.photo-consent-sheet .modal-close { width: var(--tap-min); height: var(--tap-min); border: 2px solid var(--df-ink); background: var(--df-panel); }
.day-photo-preview { margin-bottom: 14px; }
.day-photo-preview img { width: 96px; height: 96px; object-fit: cover; display: block; border: 2px solid var(--df-ink); border-radius: var(--radius-sm); }
.stop-photo-thumb[onclick] { cursor: pointer; }
.stop-photo-sheet { background: var(--df-panel); color: var(--df-ink); }
.stop-photo-sheet .stop-photo-title { font-family: var(--df-display); font-size: var(--fs-xl); font-weight: 600; margin: 0; }
.stop-photo-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stop-photo-choice { padding: 0; border: 2px solid var(--df-ink); border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; background: none; cursor: pointer; }
.stop-photo-choice.selected { border-color: var(--df-brand); box-shadow: 0 0 0 1px var(--df-brand); }
.stop-photo-choice img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stop-photo-actions { display: flex; gap: 10px; }
.stop-photo-actions > button { flex: 1; min-height: var(--tap-min); padding: 0 12px; }
.stop-photo-actions > button:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }

