/* ═══════════════════════════════════════════════════════════════════════
 * THE WINDOW LANGUAGE — Session 227 (his brief, 2 November 2026):
 * "I want to see consistency in the design across all the pop-ups."
 * One shape for every pop-up, side panel and sheet. The rules are in
 * docs/Project docs/DESIGN_WINDOW_LANGUAGE_S227.md; the first window built
 * in it is Preferences (board 13 in the middle, board 14 at the side).
 *
 *   .wl-overlay          the whole screen: a dimmed calendar (the scrim)
 *   .wl-overlay.wl-side  no scrim; the window docks right, the calendar lives
 *   .wl-overlay.wl-sheet the phone: a sheet from the bottom (rule 9)
 *   .wl-win              the window: head · body · foot
 *   .wl-head             the kind's icon tile, the title, a line of context, ×
 *   .wl-body             the rows; scrolls when it must, the head and foot stay
 *   .wl-foot             buttons in one place: Delete alone left, Cancel then
 *                        the one filled button right (rule 5)
 *
 * Every colour, radius, shadow and font is a token from the design system
 * (/design-system/styles.css), so the brand can recolour it in one place.
 * ═══════════════════════════════════════════════════════════════════════ */

.wl-overlay {
    position: fixed; inset: 0; z-index: 3000;
    display: flex; align-items: center; justify-content: center;
    padding: 16px; background: var(--scrim);
}
.wl-overlay.wl-side {
    justify-content: flex-end; align-items: stretch; padding: 0;
    background: transparent; pointer-events: none;   /* the calendar stays live */
}
.wl-overlay.wl-sheet { align-items: flex-end; padding: 0; }

.wl-win {
    background: var(--surface); color: var(--ink); font-family: var(--font-body);
    border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-3);
    display: flex; flex-direction: column; overflow: hidden;
    max-width: 95vw; max-height: 90vh;
}
.wl-overlay.wl-side .wl-win {
    pointer-events: auto; width: 400px; max-width: 100vw; height: 100%; max-height: none;
    border-radius: 0; border-top: 0; border-bottom: 0; border-right: 0;
    box-shadow: -8px 0 24px -12px oklch(24% 0.02 265 / 0.22);
}
.wl-overlay.wl-sheet .wl-win {
    width: 100%; max-width: none; max-height: 92vh;
    /* S242 (his find, 28 Nov 2026, trip 42 sideways: "half the top of that's
       cut off"): vh counts the screen under the browser's own address bar, so
       a tall window started above the visible top. dvh is what is really seen. */
    max-height: 92dvh;
    border-radius: var(--r-modal) var(--r-modal) 0 0; border-bottom: 0;
}
/* S242 (his ask, 28 Nov 2026: "when we turn the browser sideways, we almost
   want all the menus on the right-hand side where the thumb will be, not
   across the bottom, because it just gives us a really thin letterbox"):
   a phone on its side - the window takes the whole height, the title across
   the top, and its buttons are a column down the right edge: the one verb
   (Save) at the top, Cancel under it, Delete alone at the bottom.
   Guarded by check_sideways_layout.py. */
@media (orientation: landscape) and (max-height: 500px) {
    .wl-overlay.wl-sheet .wl-win:has(> .wl-foot) {
        display: grid; grid-template-columns: minmax(0, 1fr) 140px; grid-template-rows: auto minmax(0, 1fr);
        height: 100dvh; max-height: 100dvh; border-radius: 0; border-top: 0;
    }
    .wl-overlay.wl-sheet .wl-win:has(> .wl-foot) > * { grid-column: 1; min-height: 0; }
    .wl-overlay.wl-sheet .wl-win:has(> .wl-foot) > .wl-head { grid-column: 1 / -1; grid-row: 1; }
    .wl-overlay.wl-sheet .wl-win:has(> .wl-foot) > .wl-foot {
        grid-column: 2; grid-row: 2; flex-direction: column-reverse; align-items: stretch; justify-content: flex-start;
        gap: 10px; padding: 12px 10px calc(12px + env(safe-area-inset-bottom, 0px)) 10px;
        padding-right: calc(10px + env(safe-area-inset-right, 0px));
        border-top: 0; border-left: 1px solid var(--line); overflow-y: auto;
    }
    .wl-overlay.wl-sheet .wl-win:has(> .wl-foot) > .wl-foot .wl-btn { width: 100%; min-height: 48px; justify-content: center; margin: 0; }
    .wl-overlay.wl-sheet .wl-win:has(> .wl-foot) > .wl-foot .wl-helpline { justify-content: center; }
}

/* the title bar */
.wl-head {
    display: flex; align-items: center; gap: 12px; flex: none;
    padding: 12px 14px 12px 16px; border-bottom: 1px solid var(--line);
}
.wl-kind {
    width: 34px; height: 34px; border-radius: var(--r-control); flex: none;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--brand);
}
.wl-kind svg { width: 22px; height: 22px; }
.wl-title {
    flex: 1; min-width: 0; font-size: calc(17px * var(--text-scale, 1)); font-weight: 600; letter-spacing: -0.015em;
    font-family: var(--font-display);   /* a window's title is a big word (S228, 4 Nov) */
    /* S235 (his rule, 16 Nov 2026: no text is ever cut off): a long title
       wraps onto a second line - "What the trip co..." at 320 wide */
    white-space: normal; overflow-wrap: break-word; line-height: 1.2;
}
.wl-title small {
    display: block; font-size: calc(12px * var(--text-scale, 1)); font-weight: 500; color: var(--ink-3); font-family: var(--font-body);
    letter-spacing: 0; white-space: normal;
}
.wl-x {
    width: 40px; height: 40px; flex: none; border: 0; background: none; cursor: pointer;
    border-radius: var(--r-control); color: var(--ink-2);
    display: flex; align-items: center; justify-content: center;
}
.wl-x:hover { background: var(--surface-sunken); }
.wl-x svg { width: 18px; height: 18px; }

/* the body */
.wl-body {
    padding: 16px; overflow: auto; min-height: 0;
    display: flex; flex-direction: column; gap: 4px;
}
.wl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 28px; align-items: start; }
.wl-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wl-h {
    font-size: calc(15px * var(--text-scale, 1)); font-weight: 600; letter-spacing: -0.01em;
    padding: 6px 0 4px; border-bottom: 1px solid var(--line); margin-top: 8px;
}
.wl-col > .wl-h:first-child, .wl-body > .wl-h:first-child { margin-top: 0; }
.wl-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; min-height: 46px;
}
.wl-row.stack { flex-direction: column; align-items: stretch; gap: 6px; padding: 6px 0; }
.wl-label { font-size: calc(14px * var(--text-scale, 1)); font-weight: 500; line-height: calc(18px * var(--text-scale, 1)); flex: 1; min-width: 0; }
/* a wide choice goes under its label and may wrap, so no option is ever clipped */
.wl-row.stack .wl-seg { height: auto; flex-wrap: wrap; align-self: flex-start; }
.wl-row.stack .wl-seg button { height: var(--ctl-h-joined, 36px); }
/* four choices sit as a two-by-two block, so none is left alone on a second line */
.wl-seg.grid2 { display: grid; grid-template-columns: 1fr 1fr; height: auto; width: max-content; max-width: 100%; }
.wl-seg.grid2 button { justify-content: center; }
.wl-seg.grid2 button + button { border-left: 0; }
.wl-seg.grid2 button:nth-child(2n) { border-left: 1px solid var(--line); }
.wl-seg.grid2 button:nth-child(n+3) { border-top: 1px solid var(--line); }
.wl-label small {
    display: block; font-size: calc(12px * var(--text-scale, 1)); line-height: calc(16px * var(--text-scale, 1)); font-weight: 400;
    color: var(--ink-3); margin-top: 2px;
}
/* the little "i" (his ruling, 3 Nov 2026: "keep it minimalistic and have that
   help button"): the explaining lives behind it, shown on hover, on focus,
   or on a tap - never hover-only (his thumb rule) */
.wl-help {
    /* S246 (his A, 3 Dec 2026): 24 drawn on every screen, a 44 catch area round it */
    position: relative;
    width: var(--info-size, 24px); height: var(--info-size, 24px); flex: none; border: 0; padding: 0; margin-left: 2px;
    border-radius: var(--r-round); background: none; color: var(--ink-3); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
}
.wl-help:hover, .wl-help:focus-visible, .wl-help[aria-expanded="true"] { color: var(--accent); background: var(--accent-soft); }
.wl-help svg { width: 16px; height: 16px; }
.wl-help::before { content: ""; position: absolute; inset: -10px; }
.wl-label .wl-lt { display: inline-flex; align-items: center; gap: 2px; }
.wl-tip {
    position: fixed; z-index: 3100; max-width: 280px; padding: 8px 10px; pointer-events: none;
    background: var(--ink); color: var(--paper); font-family: var(--font-body);
    font-size: calc(12.5px * var(--text-scale, 1)); line-height: calc(17px * var(--text-scale, 1)); border-radius: var(--r-control); box-shadow: var(--shadow-3);
    white-space: pre-line;   /* S236: a long "i" may hold short paragraphs */
}
.wl-note { font-size: calc(12px * var(--text-scale, 1)); line-height: calc(16px * var(--text-scale, 1)); color: var(--ink-3); }
/* S233 (two travellers, Stage 2): the Me / Everyone / person switch, a slim row above the calendar */
.whose-calendar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 6px 12px; font-size: calc(13px * var(--text-scale, 1)); color: var(--ink-2); }
.whose-calendar .whose-label { font-weight: 600; }
.whose-calendar .whose-note { color: var(--ink-3); font-size: calc(12px * var(--text-scale, 1)); }
.whose-calendar .wl-seg button { min-height: 32px; }
@media (pointer: coarse) { .whose-calendar .wl-seg button { min-height: 44px; } }
/* the dropdown (his ruling, 12 Nov 2026) */
.whose-drop { position: relative; }
.whose-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 3px 10px 3px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.whose-btn:hover { background: var(--surface-sunken); }
.whose-btn svg { width: 14px; height: 14px; }
.whose-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 999px; background: var(--accent-soft); color: var(--brand); font-size: calc(11px * var(--text-scale, 1)); font-weight: 700; }
.whose-badge svg { width: 13px; height: 13px; }
.whose-menu { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; min-width: 260px; max-height: 60vh; overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 32px rgba(0,0,0,.16); }
.whose-menu[hidden] { display: none; }
.whose-line { display: grid; grid-template-columns: 28px 1fr; column-gap: 8px; align-items: center; width: 100%; min-height: 44px; padding: 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.whose-line:hover { background: var(--surface-sunken); }
.whose-line[aria-selected="true"] { background: var(--accent-soft); }
/* S236 (his rule, 18 Nov 2026: no over-explaining): the menu's one i, at its foot */
.whose-help { display: flex; justify-content: flex-end; padding: 2px 4px 0; }
.whose-line .whose-badge { grid-row: span 2; }
.whose-line .whose-name { font-weight: 600; }
.whose-line small { grid-column: 2; color: var(--ink-3); font-size: calc(11px * var(--text-scale, 1)); }
/* S233: the Whose calendar menu, hung off its button on the trip bar */
.whose-float { position: fixed; }
.tb-btn .whose-badge { min-width: 22px; height: 22px; font-size: calc(10px * var(--text-scale, 1)); }
.tb-rail-item .whose-badge { min-width: 20px; height: 20px; font-size: calc(10px * var(--text-scale, 1)); margin-right: 2px; }
.pp-levelbox { display: flex; flex-direction: column; gap: 4px; } .pp-means { color: var(--ink-3); font-size: calc(12px * var(--text-scale, 1)); }
.pp-level { min-height: 36px; }
@media (pointer: coarse) { .pp-level { min-height: 44px; } }
/* S233 (his ask, 12 Nov 2026): the two buttons are ring-fenced as one pair, "Shared calendar" */
.tb-rail-item[data-tb="whose"], .tb-rail-item[data-tb="people"], .tb-rail-item[data-tb="news"] { border-left: 1px solid var(--line); border-right: 1px solid var(--line); position: relative; }
.tb-rail-item[data-tb="whose"], .tb-rail-item[data-tb="people"].share-solo { border-top: 1px solid var(--line); border-top-left-radius: var(--r-control, 10px); border-top-right-radius: var(--r-control, 10px); margin-top: 0; }
.tb-rail-item[data-tb="people"].share-solo, .tb-rail-item[data-tb="news"] { border-bottom: 1px solid var(--line); border-bottom-left-radius: var(--r-control, 10px); border-bottom-right-radius: var(--r-control, 10px); }
.tb-rail-item[data-tb="people"]:not(.share-solo) { margin-bottom: 0; border-radius: 0; }
.tb-rail-item[data-tb="news"] { margin-top: 0; border-top: 1px solid var(--line); border-top-left-radius: 0; border-top-right-radius: 0; }
.share-label { margin: 14px 0 4px 10px; font-size: calc(10px * var(--text-scale, 1)); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
/* S233 (his ruling C with A, 14 Nov 2026): the folded side panel shows icons only, so the box keeps its outline and drops its words; the gap the words made stays */
.tb-rail-folded .share-label { display: none; }
.tb-rail-folded .tb-rail-item[data-tb="whose"], .tb-rail-folded .tb-rail-item[data-tb="people"].share-solo { margin-top: 14px; }
.tb-rail-item[data-tb="whose"] { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.tb-rail-item[data-tb="people"]:not(.share-solo) { margin-top: 0; border-top: 1px solid var(--line); border-top-left-radius: 0; border-top-right-radius: 0; }
.tb-btn[data-tb="whose"] { border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; margin-right: 0; }
.tb-btn[data-tb="people"] { border: 1px solid var(--line); border-right: 0; border-radius: 0; margin-left: -6px; margin-right: 0; }
.tb-btn[data-tb="news"] { border: 1px solid var(--line); border-radius: 0 10px 10px 0; margin-left: -6px; }
.tb-btn[data-tb="people"].share-solo { border: 1px solid var(--line); border-radius: 10px; margin-left: 0; }
/* S233: the People panel, compact (his ruling: "be conscious of the real estate") */
.pp-name { flex: 1; min-width: 0; white-space: normal; overflow-wrap: break-word; }   /* S235: wraps, never cut off */
.pp-role { font-size: calc(12px * var(--text-scale, 1)); color: var(--ink-3); white-space: nowrap; }
/* HIS FIND (12 Nov 2026): "I've never seen a square box used for any of this app" - the Permissions
   dropdown wears the app's own pill, like the Whose calendar button, with the same small arrow */
.pp-head .pp-level { appearance: none; -webkit-appearance: none; width: auto; max-width: 180px; min-height: 30px; padding: 3px 28px 3px 12px; font: inherit; font-size: calc(12px * var(--text-scale, 1)); font-weight: 600; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; background-color: var(--surface); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.pp-head .pp-level:hover { background-color: var(--surface-sunken); }
.pp-head .pp-level:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pp-trip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pp-line { min-height: 24px; }
.pp-invite { border-style: dashed; }
.pp-invite .wl-link { margin-left: 4px; }
.pp-invitebtn { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 2px; } .pp-invitebtn svg { width: 14px; height: 14px; }
/* S241: the one Invite window - their name, then Coming on the trip / Just watching */
.pp-invite-form { margin: 6px 0 10px; }
.pp-invite-label { font-weight: 600; font-size: calc(13px * var(--text-scale, 1)); margin: 10px 0 4px; display: flex; align-items: center; gap: 4px; }
.pp-invite-choices { display: flex; gap: 8px; }
.pp-invite-form .pp-invite-name { width: 100%; box-sizing: border-box; }
.pp-invite-choice { flex: 1; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 8px; border: 2px solid var(--line); border-radius: 10px; background: var(--surface, #fff); color: var(--ink); font: inherit; font-size: calc(13px * var(--text-scale, 1)); cursor: pointer; }
.pp-invite-choice svg { width: 16px; height: 16px; flex: none; }
.pp-invite-choice:hover { background: var(--surface-sunken); }
.pp-invite-choice[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); font-weight: 600; }
.pp-invite-choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pp-invite-noname { display: inline-block; margin-top: 6px; font-size: calc(12px * var(--text-scale, 1)); }
.pp-invite-fixed { display: flex; align-items: center; gap: 4px; margin: 8px 0; }
.pp-line.warn svg { color: #d97706; }
.pp-line .wl-link.danger { color: #b91c1c; }
.pp-headrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rq-row { border-bottom: 1px solid var(--line); }
.rq-head { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; width: 100%; min-height: 40px; padding: 4px 2px; border: 0; background: none; color: var(--ink); font: inherit; font-size: calc(13px * var(--text-scale, 1)); text-align: left; cursor: pointer; }
.rq-head:hover { background: var(--surface-sunken); }
.rq-what { white-space: normal; overflow-wrap: break-word; min-width: 0; }   /* S235: wraps, never cut off */
.rq-head[aria-expanded="true"] .rq-what { white-space: normal; }
.rq-status { font-size: calc(11px * var(--text-scale, 1)); font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-sunken); color: var(--ink-2); white-space: nowrap; }
.rq-status.open { background: #fef3c7; color: #92400e; } .rq-status.passed { background: #dcfce7; color: #166534; } .rq-status.declined { background: #fee2e2; color: #991b1b; }
.rq-detail { padding: 4px 2px 10px 36px; display: flex; flex-direction: column; gap: 6px; }
.rq-detail[hidden] { display: none; }
.rq-meta { font-size: calc(12px * var(--text-scale, 1)); color: var(--ink-3); }
.rq-comment { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; font-size: calc(13px * var(--text-scale, 1)); align-items: baseline; }
.rq-comment small { color: var(--ink-3); font-size: calc(11px * var(--text-scale, 1)); }
@media (pointer: coarse) { .rq-head { min-height: 48px; } }
/* S233: the People panel */
.pp-card { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; margin: 6px 0; display: flex; flex-direction: column; gap: 2px; }
.pp-head { display: flex; align-items: center; gap: 10px; }
.pp-who { display: flex; flex-direction: column; }
.pp-who small { color: var(--ink-3); font-size: calc(12px * var(--text-scale, 1)); }
.pp-line { display: flex; align-items: center; gap: 8px; font-size: calc(13px * var(--text-scale, 1)); min-height: 28px; }
.pp-line svg { width: 14px; height: 14px; flex: none; color: #15803d; }
.pp-line:not(.ok) svg { color: #d97706; }
.pp-line.quiet { color: var(--ink-3); } .pp-line.quiet svg { color: var(--ink-3); }
.pp-line .wl-link { margin-left: auto; }
.pp-home { display: flex; gap: 8px; } .pp-home input { flex: 1; min-width: 0; }
/* S233: who's going - the one line in view above More when anybody is unticked */
.wl-going-note { font-size: calc(13px * var(--text-scale, 1)); font-weight: 600; color: var(--accent, #1f6f8b); background: var(--accent-soft, #e6f1f5); border-radius: 8px; padding: 8px 10px; margin: 6px 0; }
.pp-dates { flex-wrap: wrap; } .pp-dates input { flex: 1 1 130px; }   /* S233: own dates, two boxes then the buttons */
.pp-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: flex-end; }
.pp-ask { flex-basis: 100%; font-size: calc(13px * var(--text-scale, 1)); }
.pp-link { margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.pp-mean { display: grid; grid-template-columns: 110px 1fr; gap: 8px; font-size: calc(12px * var(--text-scale, 1)); padding: 3px 0; color: var(--ink-2); }
/* S233 (leaving the group): "Who runs the trip after you?" - one big button per
   person, one tap; and the line on the organiser's own card, which wraps */
.pp-pick { display: flex; align-items: center; gap: 10px; width: 100%; justify-content: flex-start; min-height: 44px; margin: 0 0 8px; font-weight: 600; }
.pp-pick.on { border-color: var(--accent); background: var(--accent-soft, #e6f1f5); }
.pp-after span { white-space: normal; min-width: 0; }
/* S233 (the phone look of the People panel): on a touch screen the home's
   "change" and the level pill are a thumb tall (44), as every control is;
   the .pp-head rule above set the pill to 30 and won over the earlier one */
@media (pointer: coarse) {
  .pp-line .wl-link { min-height: 44px; display: inline-flex; align-items: center; padding: 0 8px; }
  .pp-head .pp-level { min-height: 44px; }
}
.whose-people { margin-left: auto; padding-left: 10px; } .whose-people svg { width: 15px; height: 15px; }
/* S233 (Stage 3): the Getting there list */
.getting-there { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; }
.gt-box { border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; background: var(--surface); font-size: calc(12px * var(--text-scale, 1)); }
.gt-box.warn { border-color: #d97706; }
.gt-box summary { display: flex; align-items: center; gap: 6px; min-height: 28px; cursor: pointer; list-style: none; color: var(--ink-2); }
.gt-box summary svg { width: 13px; height: 13px; }
.gt-line { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; padding: 2px 4px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: calc(12px * var(--text-scale, 1)); text-align: left; cursor: pointer; }
.gt-line:hover { background: var(--surface-sunken); }
.gt-line svg { width: 14px; height: 14px; color: #15803d; flex: none; }
.gt-line:not(.ok) svg { color: #d97706; }
@media (pointer: coarse) { .gt-line { min-height: 48px; } .whose-btn { min-height: 44px; } }
.wl-err { font-size: calc(12px * var(--text-scale, 1)); color: var(--error); }
.wl-guest {
    font-size: calc(12.5px * var(--text-scale, 1)); color: var(--ink-2); background: var(--surface-sunken);
    border-radius: var(--r-control); padding: 8px 10px; margin-bottom: 6px;
}
/* the developer heading: a dashed box, only ever drawn on a developer's own computer */
.wl-dev { border: 1px dashed var(--line-strong); border-radius: var(--r-control); padding: 8px 12px 10px; margin-top: 10px; }
.wl-dev .wl-h { border-bottom: 0; padding: 0 0 2px; margin-top: 0; }

/* the controls: a choice between named things is a segmented control,
   yes or no is a toggle, a time is a time box, a list is a select */
.wl-seg {
    display: inline-flex; height: var(--ctl-h-joined, 36px); flex: none; overflow: hidden;
    border: 1px solid var(--line-strong); border-radius: var(--r-control);
}
.wl-seg button {
    border: 0; background: var(--surface); padding: 0 12px; cursor: pointer;
    font: inherit; font-size: calc(13px * var(--text-scale, 1)); font-weight: 500; color: var(--ink-2);
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.wl-seg button + button { border-left: 1px solid var(--line); }
.wl-seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--brand); font-weight: 600; }
/* S247 (rule book section 3): joined buttons are 44 on a phone */
@media (max-width: 640px) { .wl-seg { height: var(--ctl-h-joined, 44px); } }
.wl-tog {
    /* S246 (his A, 3 Dec 2026): the rule book's switch, 44 by 24, like the View box */
    width: var(--switch-w, 44px); height: var(--switch-h, 24px); border-radius: var(--r-round); border: 0; padding: 0; flex: none;
    background: var(--line-strong); position: relative; cursor: pointer;
}
.wl-tog::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
    border-radius: var(--r-round); background: #fff; box-shadow: var(--shadow-1); transition: transform var(--mo-fast) var(--mo-out);
}
.wl-tog[aria-checked="true"] { background: var(--accent); }
.wl-tog[aria-checked="true"]::after { transform: translateX(20px); }
/* a 44 catch area on every screen (the knob does not grow) */
.wl-tog::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px; }
.wl-in {
    /* S246 (his A, 3 Dec 2026): one height with the buttons, the rule book's control height */
    height: var(--ctl-h, 40px); width: 112px; flex: none; padding: 0 10px;
    border: 1px solid var(--line-strong); border-radius: var(--r-control);
    font: inherit; font-size: calc(14px * var(--text-scale, 1)); color: var(--ink); background: var(--surface);
}
.wl-in.time { font-family: var(--font-time); }

/* the buttons */
.wl-foot {
    display: flex; align-items: center; gap: 8px; flex: none;
    padding: 12px 16px; border-top: 1px solid var(--line); background: var(--paper);
}
.wl-foot .sp { flex: 1; }
/* S231: the help line, door B of the help box (windows.js helpLine) */
.wl-helpline {
    display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 4px;
    color: var(--accent); font-size: var(--text-sm); font-weight: var(--w-semibold); text-decoration: none; white-space: nowrap;
}
.wl-helpline:hover .w { text-decoration: underline; }
.wl-helpline svg { width: 16px; height: 16px; }
.wl-touch .wl-helpline .w { display: none; }
.wl-touch .wl-helpline { min-width: 40px; justify-content: center; }
.wl-btn {
    height: 40px; min-width: 40px; padding: 0 14px; cursor: pointer; white-space: nowrap;
    border: 1px solid var(--line-strong); border-radius: var(--r-control);
    background: var(--surface); color: var(--ink);
    display: inline-flex; align-items: center; gap: 8px;
    font: inherit; font-size: calc(14px * var(--text-scale, 1)); font-weight: 500;
}
.wl-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.wl-btn.quiet { border-color: transparent; color: var(--ink-2); }
.wl-btn.danger { border-color: transparent; color: var(--error); }
.wl-btn:disabled { opacity: 0.6; cursor: default; }

/* his thumb rule (S181/S197): every target is thumb-sized on a touch screen */
.wl-win.wl-touch .wl-seg, .wl-win.wl-touch .wl-in { height: 44px; }
.wl-win.wl-touch .wl-seg button { padding: 0 16px; font-size: calc(14px * var(--text-scale, 1)); }
.wl-win.wl-touch .wl-x, .wl-win.wl-touch .wl-btn { height: 44px; min-width: 44px; }
.wl-win.wl-touch .wl-row { min-height: 52px; }
/* S246: the i stays 24 drawn on a phone; its catch area is the 44 above */
/* a wrapped or two-by-two choice must grow on a phone too, or its last row is clipped */
.wl-win.wl-touch .wl-row.stack .wl-seg, .wl-win.wl-touch .wl-seg.grid2 { height: auto; }
.wl-win.wl-touch .wl-row.stack .wl-seg button { height: 44px; }
/* S229 (his ruling, 5 Nov 2026: "make them all 44"): a tick row is 44 tall,
   and the switch keeps its look but catches a thumb 44 tall (an invisible
   pad round it - the knob does not grow) */
.wl-win.wl-touch .wl-check { min-height: 44px; }
.wl-win.wl-touch .wl-tog::before { left: -4px; right: -4px; }

/* ═══════════════════════════════════════════════════════════════════════
 * THE PHONE'S BOTTOM BAR — Session 229 (his ruling A, 5 Nov 2026, then
 * "Yes, add it" for the List page): Calendar · List · + Add · Map · More
 * along the bottom of the phone. tab-bar.js builds it on the calendar
 * (through calendar-toolbar.js) and on the inventory page. 60 tall slots,
 * the page you are on lit, + Add the one filled slot.
 * ═══════════════════════════════════════════════════════════════════════ */
.tb-tabs {
    /* S243 TEXT SIZE: the bar's six slots are a fixed width, and at Larger
       "A$ 10,235.50" ran into "Search". Like a phone's own tab bar, its
       words stay at the standard size whatever Text size says. */
    --text-scale: 1;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;
    display: grid; align-items: center; gap: 2px;
    /* S241 (his ask, 27 Nov 2026: "this add button ... sitting flush with the
       bottom of the screen. I'd like to have a little bit of a margin"): at
       least 8 under the buttons; a phone's own home strip is used when bigger */
    padding: 4px 6px max(8px, env(safe-area-inset-bottom, 0px));
    background: var(--surface, #fff); border-top: 1px solid var(--line);
    font-family: var(--font-body);
}
.tb-tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: 60px; min-width: 44px; padding: 0; border: 0; border-radius: var(--r-control, 8px);
    background: none; color: var(--ink-3, #5b6470); text-decoration: none;
    font: inherit; font-size: calc(12px * var(--text-scale, 1)); font-weight: 500; line-height: 1; cursor: pointer;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.tb-tab svg.lucide, .tb-tab svg { width: 22px; height: 22px; }
/* S246 (his design pick 35 A, built on his "Yes, build both", 3 Dec 2026):
   the page you are on sits in a soft rounded box, the skin's corner */
.tb-tab[aria-current="page"] { color: var(--accent); font-weight: 700; background: var(--accent-soft); border-radius: var(--r-control, 8px); }
.tb-tab[aria-expanded="true"] { color: var(--accent); background: var(--accent-soft); border-radius: var(--r-control, 8px); }   /* S246 pick 35 A: the bar leaves out the page you are on, so the lit slot is the one whose menu or panel is open */
.tb-tab:focus-visible { outline: none; box-shadow: var(--focus-ring, 0 0 0 3px var(--accent-soft)); }
.tb-tabs .tb-tab-add {
    flex-direction: row; gap: 6px; height: 52px; margin: 0 4px; padding: 0 10px;
    border: 0; border-radius: 16px; background: var(--accent); color: var(--on-accent, #fff);
    font-size: calc(15px * var(--text-scale, 1)); font-weight: 700; justify-content: center;
}
.tb-tabs .tb-tab-add svg.lucide, .tb-tabs .tb-tab-add svg { width: 20px; height: 20px; }
/* S229: a slot's word stays on one line ("New trip" on the trips page).
   S248 (his ask, 4 Dec 2026, once Filter took a fifth slot: "New trip ... doesn't
   fit right ... put New trip on two different lines"): the Trips page's pill
   is the one exception, .tb-add-two below. */
.tb-tab-word { white-space: nowrap; }
/* S248: the Trips page's + New trip pill carries its two words one under the
   other beside the plus, a step smaller (13), so neither word touches the
   pill's side on a 390 phone with five slots. min-content makes it two lines
   at every width, so the pill looks the same on every phone. Sideways the
   pill is a square tile under the strip's rule and keeps its one line. */
.tb-tabs .tb-tab-add.tb-add-two { gap: 5px; padding: 0 8px; }
.tb-tabs .tb-tab-add.tb-add-two .tb-tab-word { white-space: normal; width: min-content; text-align: center; line-height: 1.1; font-size: calc(13px * var(--text-scale, 1)); }
body.pv-side .tb-tabs .tb-tab-add.tb-add-two .tb-tab-word, body.tb-side .tb-tabs .tb-tab-add.tb-add-two .tb-tab-word { white-space: nowrap; width: auto; line-height: 1; font-size: inherit; }
/* S247 (4 Dec 2026): on the narrowest phones (320 wide) six slots leave 44 each,
   and "Bookings" needs 49 at the standard size. The bar's words go one step
   smaller and + Add gives up its side room, so every word still sits whole
   on its one line (his rule: nothing cut off, fit the space). */
@media (max-width: 340px) {
    .tb-tab { font-size: 11px; }
    .tb-tabs .tb-tab-add { margin: 0 2px; padding: 0 7px; }
}
/* S229 (his ruling, 5 Nov 2026): on a phone the trips page's top buttons
   move into its bottom bar - the top keeps the name alone */
body.tb-has-tabs .topbar-actions { display: none !important; }
/* S229 (his word, 6 Nov 2026: "The Mark a Problem button ... That's got to
   go"): no floating Mark a problem button on a phone; the flight recorder
   still keeps its log */
body.tb-has-tabs #recorderMarker { display: none !important; }
/* the page ends above the bar (nothing drawn over anything) */
body.tb-has-tabs { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; }
/* S231 (his #12, "pull it closer to the edge"): on a phone the calendar's
   white card starts 4px from the screen's left edge with 2px inside it,
   not 10px and 8px. The hour numbers move 12px left (the narrower hour
   column, canvas-calendar.js STACK_TIME_COL_PX, gives 11px more). */
body.tb-has-tabs .calendar-container { margin-left: -6px; padding-left: 2px; }
/* a small menu rising from the bar (More on the List page): the + Add menu's look */
.tb-pop {
    position: fixed; z-index: 1200; min-width: 200px; max-height: calc(100vh - 96px); overflow-y: auto;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card, 10px);
    box-shadow: var(--shadow-3, 0 12px 32px rgba(0,0,0,0.18)); padding: 5px;
    display: flex; flex-direction: column; gap: 1px;
}
.tb-pop button {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px;
    border: 0; border-radius: 7px; background: none; color: var(--ink);
    font: inherit; font-family: var(--font-body); font-size: calc(14px * var(--text-scale, 1)); font-weight: 600; text-align: left; cursor: pointer;
}
.tb-pop button:hover { background: var(--surface-sunken, #f0ece3); }
.tb-pop button svg { width: 18px; height: 18px; flex: none; }
/* S236 (his find, 18 Nov 2026: "The magnifying option should pop over the
   top of everything else"): every pop-up the toolbar opens (zoom, help, Add,
   More, week, cost, the rail's own) sits ABOVE the windows (.wl-overlay is
   3000). A side window leaves the toolbar free to use, so a pop-up opened
   beside it must never open underneath it. Tips (3100) stay above. One rule
   for all of them; "body" wins over each pop-up's own 1200. */
body .zoom-pop, body .add-menu, body .tb-cost-pop, body .tb-pop, body .vf-pop { z-index: 3050; }
/* the List page on a phone: its doors live in the bar now, and the day rail
   ends where the bar begins */
body.tb-has-tabs .inv-doors { display: none !important; }
body.tb-has-tabs .inv-rail { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }

/* ═══════════════════════════════════════════════════════════════════════
 * THE PHONE'S VIEWS — Session 233 (his rulings, 16 Nov 2026). phone-views.js.
 * Docs: docs/Project docs/DESIGN_PHONE_VIEWS_S233.md
 * ═══════════════════════════════════════════════════════════════════════ */
/* S236 (his ruling, 18 Nov 2026): the Day / 3 days switch is a tap on the
   date heading - this small menu opens by the date (phone-views.js pick).
   The old switch above the bottom bar and the Trip view are gone. */
.pv-pick {
    position: fixed; z-index: 1250; display: flex; flex-direction: column; gap: 2px; padding: 6px;
    min-width: 160px; background: var(--surface, #fff); border: 1px solid var(--line);
    border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.16); font-family: var(--font-body);
}
.pv-pick button {
    display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px;
    border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit;
    font-size: calc(15px * var(--text-scale, 1)); font-weight: 600; text-align: left; cursor: pointer;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.pv-pick button svg { width: 18px; height: 18px; color: var(--ink-2); }
.pv-pick button[aria-checked="true"] { background: var(--accent-soft); color: var(--accent); }
.pv-pick button[aria-checked="true"] svg { color: var(--accent); }
[data-pv-pick] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* S235 (his find, 16 Nov 2026): the messages along the bottom (the simple
   calendar's tip, every toast) sat 84px up - just above the bottom bar,
   which is where the switch is now, so a tap on the switch hit the tip's
   "Got it". With the switch, they sit above it (bar 76 + switch 54 + 8);
   sideways they keep clear of the strip down the right edge. */
body.pv-side .wl-toasts.wl-touch { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); right: calc(72px + 12px + env(safe-area-inset-right, 0px)); }

/* ruling 3: sideways, the bottom bar is a thin strip down the right edge,
   so the 3 days get the whole height */
/* S235 (his find on his phone, 16 Nov 2026: "the add button doesn't look
   that good sideways"): the strip had 4px of room on its left and none on
   its right, so + Add ran into the edge of the screen. Now the same room
   both sides (plus the phone's own edge), and + Add is a tile in the
   middle of the strip. */
body.pv-side .tb-tabs, body.tb-side .tb-tabs {
    top: 0; left: auto; right: 0; bottom: 0; width: calc(72px + env(safe-area-inset-right, 0px));
    grid-template-columns: none !important; grid-auto-flow: row; grid-auto-rows: 1fr; align-content: stretch;
    padding: 4px calc(4px + env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) 4px;
    border-top: 0; border-left: 1px solid var(--line);
}
body.pv-side .tb-tabs .tb-tab, body.tb-side .tb-tabs .tb-tab { height: auto; min-height: 44px; min-width: 0; }
body.pv-side .tb-tabs .tb-tab-add, body.tb-side .tb-tabs .tb-tab-add { flex-direction: column; gap: 2px; justify-self: center; align-self: center;
    width: 56px; height: 56px; min-height: 56px; margin: 0; padding: 0; border-radius: 16px; font-size: calc(12px * var(--text-scale, 1)); }
/* S235 (his ask, 16 Nov 2026: "put the wallet on the menu next to add,
   itinerary and map"): the trip's cost is a slot in the strip and the bottom bar.
   S247 (his ask, 4 Dec 2026): the purse and the one word "Bookings", like
   every other slot, no amount; its taller styles (S243 U2) went with the amount. */
body.tb-has-tabs.pv-side, body.tb-has-tabs.tb-side { padding-bottom: 0 !important; padding-right: calc(72px + env(safe-area-inset-right, 0px)) !important; }
/* S236 (his ruling, 18 Nov 2026: "putting everything in the side panel"):
   a phone on its side gives the calendar the whole height - the trip's name
   row goes, its way back and Undo (and on a shared trip the plan switch and
   the news) sit at the top of the strip (calendar-toolbar.js renderTabs).
   When the phone is too short for one column of thumb-sized slots, the strip
   takes two columns (tab-bar.js fitSide) - never a slot squashed or cut. */
body.pv-side.tb-strip-head .header { height: 0; min-height: 0; padding: 0 !important; margin: 0 !important; border: 0 !important; }
body.pv-side.tb-strip-head .header > .tb-group { display: none !important; }   /* the row's menus (+ Add, More) stay: they open from the strip */
body.tb-side-two .tb-tabs { width: calc(136px + env(safe-area-inset-right, 0px)) !important;
    grid-template-columns: 1fr 1fr !important; grid-auto-flow: row dense !important; column-gap: 2px; }
/* S242 (his list, 28 Nov 2026: "I don't think the add button needs to take
   up its own row"): + Add is a tile in its own cell, like the others */
.tb-tabs .tb-tab[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); border-radius: var(--r-control, 8px); }
/* S242 (his ask, 28 Nov 2026: "press the button, and then the zoom thing pops
   up with the toggles that slide in and out"): the sideways Zoom window -
   the hour size on a slider, and Whole day under it (calendar-toolbar.js) */
.tb-zoom-pop { display: flex; flex-direction: column; gap: 10px; padding: 12px; min-width: 260px; }
.tb-zoom-row { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.tb-zoom-small { font-size: calc(12px * var(--text-scale, 1)); color: var(--ink-2); white-space: nowrap; }
.tb-zoom-range { flex: 1; min-width: 120px; height: 44px; accent-color: var(--accent); }
.tb-zoom-whole { min-height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface);
    color: var(--ink); font: inherit; font-size: calc(15px * var(--text-scale, 1)); font-weight: 600; cursor: pointer; }
.tb-zoom-whole[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
body.tb-has-tabs.tb-side-two { padding-right: calc(136px + env(safe-area-inset-right, 0px)) !important; }
body.tb-side .tb-tabs .tb-tab.tb-news .tb-dot { top: 6px; right: auto; left: calc(50% + 6px); }
/* S242 (his pick A, 27 Nov 2026: "A ... just looks nice and tidy"): a phone on
   its side hides the top bar and its logo, so the same logo (the look's own
   picture, no words) is the first tile of the strip - a press goes to your
   trips, as the logo does everywhere. Only on the strip: upright, the top
   bar's logo is the way home. The picture 30 tall in a thumb-sized tile;
   said with more classes than the look's own size rule (services/skins.py). */
.tb-tabs .tb-tab.tb-home { display: none; }
body.tb-side .tb-tabs .tb-tab.tb-home { display: flex; }
body.tb-side .tb-tabs .tb-tab.tb-home .logo-mark.logo-mark.logo-mark { width: auto; height: 30px; min-width: 30px; top: 0; margin: 0; }


/* ═══════════════════════════════════════════════════════════════════════
 * THE DAY RAIL ON THE PHONE CALENDAR — Session 229 (his ask, 5 Nov 2026:
 * "The same slider we used for the inventory page... for the main page on
 * the mobile planner page"). day-rail.js builds it. Every number below is
 * the inventory's own (.inv-rail in inventory.css): 44 wide, the 4px sliver
 * of the place's colour, 10px numbers, the dark label 54px from the edge.
 * check_phone_look.py compares the two so they never drift apart.
 * ═══════════════════════════════════════════════════════════════════════ */
.dr-rail {
    /* z 40: above the calendar's loading cover (.cal-boot, z 30), below every menu and window */
    position: fixed; right: 0; top: 0; bottom: 0; width: 44px; z-index: 40;
    display: flex; flex-direction: column; margin: 0;
    padding: 6px 0 max(10px, env(safe-area-inset-bottom, 0px)); box-sizing: border-box;
    touch-action: none; user-select: none; -webkit-user-select: none; cursor: ns-resize;
}
.dr-day {
    flex: 1 1 0; min-height: 0; position: relative;
    display: flex; align-items: center; justify-content: flex-end;
    margin: 0; padding: 0 9px 0 0; border: 0; background: none;
    font: inherit; font-family: var(--font-time); font-feature-settings: var(--time-feature);
    font-size: calc(10px * min(var(--text-scale, 1), 1.2)); font-weight: var(--w-semibold); line-height: 1; color: var(--ink-4);   /* text-size: grows to Large and stops (the strip is 26px wide); the SAME rule as the Itinerary's day strip (check_phone_look S3) */
    cursor: inherit;
    pointer-events: none;   /* the rail takes the pointer: one target, not 26 */
}
.dr-day::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 4px; background: var(--pc, var(--line-strong)); }
.dr-day--on { color: var(--accent); }
.dr-day--on .dr-num { background: var(--accent-soft); border-radius: var(--r-control);   /* S247 his pick 7 A, with the Itinerary's rail */ padding: 2px 5px; margin-right: -4px; }
.dr-day--lost { color: transparent; }
.dr-day--lost::after { background: repeating-linear-gradient(to bottom, var(--line-strong) 0 2px, transparent 2px 4px); }
.dr-rail--thin .dr-num { visibility: hidden; }
.dr-rail--thin .dr-day[data-mark="1"] .dr-num { visibility: visible; }
.dr-label {
    position: fixed; right: 54px; z-index: 41; max-width: calc(100vw - 70px);
    background: var(--brand); color: #fff; border-radius: 10px; padding: 8px 12px 9px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18); pointer-events: none;
    opacity: 0; transition: opacity var(--dur-fast, .15s);
}
.dr-label[hidden] { display: none; }
.dr-label--show { opacity: 1; }
.dr-label::after {
    content: ""; position: absolute; right: -6px; top: 50%; margin-top: -6px;
    border: 6px solid transparent; border-right: 0; border-left-color: var(--brand);
}
.dr-label-date {
    font-family: var(--font-display); font-size: 15px; font-weight: var(--w-semibold);   /* text-size: fixed - matches the Itinerary's day label */
    letter-spacing: var(--track-tight); line-height: 1.1; white-space: nowrap;
}
.dr-label-where {
    display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: calc(12px * var(--text-scale, 1)); opacity: .88;
    white-space: normal; overflow-wrap: break-word;   /* S235: wraps, never cut off */
}
.dr-label-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
/* S241 (his pick A, 27 Nov 2026): the phone's upright 3 days wear the day
 * rail too (phone-views.js). The days stop DayRail.ROOM (26px) from the
 * screen's right edge, like the Day cards: the frame already ends 19px
 * short of it, so 7px more. A style rule, never a measurement: the frame is
 * the right width for the very first paint (one paint per load, S239).
 * check_phone_3day_rail.py measures the 26px on a phone. */
body.pv-rail .calendar-grid-container { min-width: 0; width: auto; margin-right: 7px; }

/* ═══════════════════════════════════════════════════════════════════════
 * THE ADD WINDOWS — Session 228 (the language's Stage 3: boards 3-6 and
 * 10-12 of DESIGN_WINDOW_LANGUAGE_S227.md). The building blocks every
 * form shares: the kind tiles, the chip, the place box with its grey
 * guess and "change", the date-with-time row, the found card, the ONE
 * "More" that folds out in place, the colour ring, the leg cards.
 * ═══════════════════════════════════════════════════════════════════════ */
.wl-win.wl-form { width: 520px; }
.wl-overlay.wl-side .wl-win.wl-form { width: 420px; }
.wl-kind.flight   { background: var(--evt-flight-bg);   color: var(--evt-flight-text); }
.wl-kind.transit  { background: var(--evt-transit-bg);  color: var(--evt-transit-text); }
.wl-kind.hotel    { background: var(--evt-hotel-bg);    color: var(--evt-hotel-text); }
.wl-kind.activity { background: var(--evt-activity-bg); color: var(--evt-activity-text); }
.wl-kind.hire     { background: var(--evt-hire-car-bg); color: var(--evt-hire-car-text); }
.wl-kind.warning  { background: var(--warning-bg);      color: var(--warning-text); }

/* a form field: the label above the box (Wroblewski: top-aligned labels) */
.wl-field { display: flex; flex-direction: column; gap: 4px; padding: 5px 0; min-width: 0; }
.wl-field > .wl-label { flex: none; font-size: calc(12.5px * var(--text-scale, 1)); color: var(--ink-2); }
.wl-field .wl-in { width: 100%; }
.wl-field textarea.wl-in { height: auto; min-height: 64px; padding: 8px 10px; resize: vertical; line-height: calc(18px * var(--text-scale, 1)); }
.wl-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.wl-three { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0 10px; align-items: end; }
.wl-in.date { width: 100%; font-family: var(--font-time); }
.wl-in.worked { background: var(--surface-sunken); color: var(--ink-2); border-color: var(--line); }
.wl-in:focus { outline: none; box-shadow: var(--focus-ring); border-color: var(--accent); }
.wl-in:disabled { background: var(--surface-sunken); color: var(--ink-3); }
.wl-money { display: flex; align-items: center; height: 36px; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--surface); overflow: hidden; width: 160px; }
.wl-money span { padding: 0 10px; color: var(--ink-3); font-size: calc(13px * var(--text-scale, 1)); border-right: 1px solid var(--line); height: 100%; display: flex; align-items: center; background: var(--surface-sunken); }
.wl-money input { border: 0; height: 100%; flex: 1; min-width: 0; padding: 0 10px; font: inherit; font-size: calc(14px * var(--text-scale, 1)); font-family: var(--font-time); color: var(--ink); }
.wl-money input:focus { outline: none; }
/* S229: the "No charge" tick beside the cost box; ticked, the box rests */
.wl-money-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
/* S243 (his pick C): Booked and Paid, one line under the cost; wraps on a phone */
.wl-bp-row { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.wl-bp-lb { font-size: calc(13px * var(--text-scale, 1)); font-weight: 600; color: var(--ink-2); }
.wl-bp-row .wl-bp-lb + .wl-seg { margin-right: 8px; }
.wl-bp-part { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
/* S244 (his ruling, 1 Dec 2026): one word per booking - the steps, one under
   another, the picked one lit; its amount and tick open under it */
.wl-steps { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-control); overflow: hidden; }
.wl-steps > .wl-step { display: flex; flex-direction: column; align-items: stretch; gap: 0; border-bottom: 1px solid var(--line); }
.wl-step:last-child { border-bottom: 0; }
/* S245 (his pick 23 B, 2 Dec 2026): the Booking step is a drop-down list; the
   amount box and the Rest paid on arrival tick open under it */
.wl-bp-extra { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.wl-bp-extra > .wl-bp-part { margin-top: 0; }
.wl-bp-extra .wl-money { max-width: 150px; }
/* S243 (his pick A): Payment and booking - the fold's closed line says what is set */
.wl-sumfold > summary { display: flex; align-items: center; gap: 8px; }
.wl-fold-say { margin-left: auto; padding-left: 12px; font-size: calc(13px * var(--text-scale, 1)); font-weight: 500; color: var(--ink-3); text-align: right; overflow-wrap: anywhere; }
.wl-sumfold[open] .wl-fold-say { display: none; }
.wl-pay-who .wl-split.in-fold { margin-top: 0; }
.wl-money.is-off { opacity: .45; }
.wl-money.is-off input { cursor: not-allowed; }
/* S239: WHO PAYS - the Split button beside No charge, and the box it opens:
   one button per person on the booking, wearing their calendar colour */
.wl-split-btn { height: 30px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--surface); color: var(--ink-2); font: inherit; font-size: calc(13px * var(--text-scale, 1)); cursor: pointer; }
.wl-split-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft, var(--surface-sunken)); }
.wl-split { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface-sunken); display: flex; flex-direction: column; gap: 8px; }
.wl-split-lb { font-size: calc(12px * var(--text-scale, 1)); color: var(--ink-3); }
/* S245 (his pick 12 B, 2 Dec 2026): Who's paying is a list of tick boxes, one per line, like Who's going */
.wl-split-who { display: flex; flex-direction: column; }
.wl-split-sum { font-size: calc(13px * var(--text-scale, 1)); color: var(--ink-2); font-family: var(--font-time); }
.wl-split-note { font-size: calc(12px * var(--text-scale, 1)); color: var(--ink-3); margin-top: 4px; }
.pp-dot { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: calc(10px * var(--text-scale, 1)); font-weight: 600; flex: none; }
.cl-row.not-mine { color: var(--ink-3); }
.cl-view { display: flex; align-items: center; gap: 10px; margin-left: auto; }
/* S229: the Connecting flight tick under a saved flight */
.wl-connect-row { padding: 6px 0 2px; }
.wl-connect-row .wl-hint { color: var(--ink-3); font-size: calc(13px * var(--text-scale, 1)); margin: -4px 0 0 26px; }

/* the kind tiles: one icon per kind, everywhere (rule 7) */
/* S228 (his find on the gap window): five kinds must sit on ONE line, never four
   and one orphan under them - the same spirit as his two-by-two ruling. A tile
   is 60 px at its narrowest, so five fit a side panel and six fit the middle. */
.wl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); gap: 6px; }
.wl-tiles.small { grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); }
.wl-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: 58px; padding: 6px 4px; cursor: pointer;
    border: 1px solid var(--line-strong); border-radius: var(--r-control);
    background: var(--surface); color: var(--ink-2); font: inherit; font-size: calc(11.5px * var(--text-scale, 1)); font-weight: 500;
    line-height: calc(13px * var(--text-scale, 1)); text-align: center;
}
.wl-tiles.small .wl-tile { min-height: 50px; font-size: calc(11px * var(--text-scale, 1)); }
.wl-tile svg { width: 20px; height: 20px; }
.wl-tile:hover { background: var(--surface-sunken); }
.wl-tile[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--brand); font-weight: 600; }
.wl-group { font-size: calc(11px * var(--text-scale, 1)); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--ink-3); padding: 8px 0 4px; }

/* the chosen kind as a chip, with "change" */
.wl-chip {
    display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 10px;
    border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--surface);
    font-size: calc(14px * var(--text-scale, 1)); font-weight: 500; align-self: flex-start;
}
.wl-chip svg { width: 18px; height: 18px; }
.wl-link { border: 0; background: none; padding: 4px 6px; cursor: pointer; font: inherit; font-size: calc(12.5px * var(--text-scale, 1)); color: var(--accent); font-weight: 500; border-radius: 6px; }
.wl-link:hover { background: var(--accent-soft); }

/* the place box: the app's guess in grey with "change", or the search */
.wl-place { position: relative; }
.wl-place .wl-guess {
    display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 4px 0 10px;
    border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface-sunken);
    color: var(--ink-2); font-size: calc(14px * var(--text-scale, 1));
}
.wl-place .wl-guess span { flex: 1; min-width: 0; white-space: normal; overflow-wrap: break-word; }   /* S235: wraps, never cut off */
.wl-place .wl-guess svg { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
/* S236 (his ruling 2, 18 Nov 2026): each line of an activity's own schedule
   has a small optional Where box under it, for the map only */
.wl-stop { padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--line, rgba(0,0,0,.06)); }
/* the line's own boxes fill their columns, so no words are cut short
   (his rule; they were fixed at 112px and showed "Walk to the ma") */
.wl-three.wl-stop-line { grid-template-columns: 138px 1fr auto; }
.wl-stop-line > .wl-in { width: 100%; min-width: 0; box-sizing: border-box; }
.wl-stop-where { padding-left: 148px; }
.wl-stop-add { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); }
.wl-stop-add svg { width: 13px; height: 13px; }
@media (max-width: 520px) {
  /* a phone: the time and remove on one row, what happens full width below */
  .wl-three.wl-stop-line { grid-template-columns: 1fr auto; gap: 6px 10px; }
  .wl-stop-line > .wl-in.time { grid-column: 1; grid-row: 1; max-width: 170px; }
  .wl-stop-line > .wl-link { grid-column: 2; grid-row: 1; }
  .wl-stop-line > .wl-in:not(.time) { grid-column: 1 / -1; grid-row: 2; }
  .wl-stop-where { padding-left: 0; }
  .wl-stop-add { min-height: 36px; }
}

/* the found card: what the app worked out, facts only (rule 3).
   S232 - HIS RULING (11 Nov 2026): no SPINE (a thick coloured left edge) -
   "a typical Claude design. I want to be unique." Only linked calendar
   blocks keep one. A warning or refusal colours the whole thin border. */
.wl-found {
    display: flex; gap: 10px; padding: 10px 12px; margin: 6px 0;
    border: 1px solid var(--line); border-radius: var(--r-control);
    background: var(--surface-sunken); font-size: calc(13px * var(--text-scale, 1)); line-height: calc(18px * var(--text-scale, 1)); color: var(--ink);
}
.wl-found.warn     { border-color: var(--warning-edge); background: var(--warning-bg); }
.wl-found.refused  { border-color: var(--error-edge); background: var(--error-bg); }
.wl-found svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--ink-2); }
.wl-found .wl-fl { flex: 1; min-width: 0; }
.wl-found .wl-fl b { font-weight: 600; }
.wl-found .wl-fl small { display: block; color: var(--ink-3); font-size: calc(12px * var(--text-scale, 1)); }
/* S239: an activity that ends the next day says so in the box, darker, so a typo (07:30 for 19:30) is easy to spot */
.wl-found .wl-fl small .wl-nextday { color: var(--ink); font-weight: 700; }
.wl-found .wl-fl .t { font-family: var(--font-time); font-feature-settings: var(--time-feature); }

/* S237 PREFERENCES, LAYOUT B (his ruling, 20 Nov 2026): every setting in a
   fold. A choice is a drop-down list as wide as its words; the folds wear
   the weight of a heading and are thumb-sized on a phone; a Plus row wears
   a small tag */
.wl-in.pick { width: auto; min-width: 112px; max-width: 56%; }
.pf-fold { margin-top: 0; }
.wl-body > .pf-fold:first-of-type { border-top: 0; }
.pf-fold > summary { min-height: 40px; font-size: calc(15px * var(--text-scale, 1)); font-weight: 600; color: var(--ink); }
.wl-win.wl-touch .pf-fold > summary { min-height: 48px; }
.pf-fold.wl-dev { padding: 0 12px; }
.pf-plus {
    font-size: calc(11px * var(--text-scale, 1)); font-weight: 600; line-height: calc(16px * var(--text-scale, 1)); padding: 0 6px; margin-left: 6px;
    border: 1px solid var(--line-strong); border-radius: calc(var(--r-control, 8px) / 2); color: var(--ink-2); white-space: nowrap;   /* S245 his pick 5 B: small square box */
}

/* ONE "More" that folds out in place (his ruling: never pops out) */
.wl-fold { border-top: 1px solid var(--line); margin-top: 8px; }
.wl-fold > summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
    min-height: 40px; font-size: calc(14px * var(--text-scale, 1)); font-weight: 500; color: var(--ink-2);
}
.wl-fold > summary::-webkit-details-marker { display: none; }
.wl-fold > summary svg { width: 16px; height: 16px; transition: transform 0.15s; }
.wl-fold[open] > summary svg { transform: rotate(90deg); }
.wl-fold .wl-fg { padding: 2px 0 8px; }
.wl-fold .wl-fg + .wl-fg { border-top: 1px solid var(--line); }
/* S235 ABOUT THIS PLACE (his ruling, 16 Nov 2026): one fold-away under the
   place, closed, with a one-line summary; smaller folds inside. Every line
   wraps - nothing is cut off at the narrowest width (his rule). */
.wl-about { border: 1px solid var(--line); border-radius: 8px; background: var(--surface-sunken, var(--paper)); margin: 2px 0 4px; min-width: 0; }
.wl-about > summary {
    list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px;
    min-height: 40px; padding: 6px 10px; font-size: calc(14px * var(--text-scale, 1)); font-weight: 600; color: var(--ink);
}
.wl-about > summary::-webkit-details-marker, .wl-about-sub > summary::-webkit-details-marker { display: none; }
.wl-about summary svg { width: 16px; height: 16px; flex: none; transition: transform 0.15s; }
.wl-about[open] > summary > svg, .wl-about-sub[open] > summary > svg { transform: rotate(90deg); }
.wl-about-sumline { font-weight: 400; font-size: calc(13px * var(--text-scale, 1)); color: var(--ink-3); flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.wl-about-body { padding: 0 10px 8px 14px; display: grid; gap: 2px; min-width: 0; }
.wl-about-sub > summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
    min-height: 32px; font-size: calc(13px * var(--text-scale, 1)); font-weight: 600; color: var(--ink-2);
}
.wl-about-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 2px 10px; padding: 3px 0 3px 22px; font-size: calc(13px * var(--text-scale, 1)); }
.wl-about-row .k { color: var(--ink-3); overflow-wrap: anywhere; }
.wl-about-row .v { min-width: 0; overflow-wrap: anywhere; }
.wl-about-row .v small { display: block; font-size: calc(11.5px * var(--text-scale, 1)); color: var(--ink-3); }
.wl-about-row a { color: var(--accent); text-decoration: none; }
.wl-about-more { padding: 0 0 2px 22px; }
.wl-about-sum { padding: 0 0 4px 22px; font-size: calc(13px * var(--text-scale, 1)); color: var(--ink-2); overflow-wrap: anywhere; }
.wl-about-credit { padding-top: 4px; font-size: calc(11.5px * var(--text-scale, 1)); color: var(--ink-3); overflow-wrap: anywhere; }
.wl-about-credit a { color: inherit; }
@media (max-width: 380px) { .wl-about-row { grid-template-columns: 1fr; padding-left: 22px; } }
.wl-check { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: calc(14px * var(--text-scale, 1)); cursor: pointer; }
.wl-check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }

/* the colour row: a dot, the words, "change"; the ring of twelve opens under it */
.wl-dot { width: 16px; height: 16px; border-radius: 8px; flex: none; border: 1px solid oklch(0% 0 0 / 0.15); }
.wl-hues { display: none; flex-wrap: wrap; gap: 8px; padding: 8px 0 4px; align-items: center; }
.wl-hues.open { display: flex; }
.wl-hues button { width: 28px; height: 28px; border-radius: 14px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.wl-hues button[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface) inset; }
.wl-hues button.kind { width: 34px; height: 34px; border-radius: 17px; }

/* YOUR COLOURS (Session 237, idea 6; preferences.js openColours). A list of
   types, two across on a laptop and one on a phone; the tapped type opens
   ONE row of colours under its line. The row never wraps and never scrolls:
   eleven swatches share the width (his rule: colour pickers are horizontal). */
.kc-win { width: 520px; max-width: 95vw; }
.wl-overlay.wl-sheet .kc-win { width: 100%; max-width: 100%; }
.kc-tabs { display: flex; width: 100%; margin-bottom: 8px; }
.kc-tabs button { flex: 1; justify-content: center; }
.kc-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
/* one type to a line only where two would squeeze the names (an upright phone) */
@media (max-width: 559px) { .kc-list { grid-template-columns: 1fr; } }
.kc-type {
    display: flex; align-items: center; gap: 10px; min-height: 40px; min-width: 0;
    border: 0; border-bottom: 1px solid var(--line); background: none; padding: 0 4px;
    font: inherit; font-size: calc(14px * var(--text-scale, 1)); font-weight: 500; color: var(--ink); text-align: left; cursor: pointer;
}
.wl-touch .kc-type { min-height: 44px; }
.wl-win.wl-touch .kc-tabs { height: 46px; }
.kc-type:hover, .kc-type[aria-expanded="true"] { background: var(--surface-2, oklch(0% 0 0 / 0.04)); }
.kc-type .kc-ic { width: 18px; height: 18px; flex: none; color: var(--ink-2); }
.kc-type .kc-name { flex: 1; min-width: 0; overflow-wrap: break-word; }
.kc-dot { width: 20px; height: 20px; border-radius: 10px; flex: none; }
.kc-dot.app, .kc-sw.app { background: var(--surface); border: 2px dashed var(--line-strong); }
.kc-strip { grid-column: 1 / -1; display: flex; gap: 6px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.kc-sw { flex: 1 1 0; min-width: 0; height: 32px; border-radius: var(--r-control, 8px); border: 2px solid transparent; padding: 0; cursor: pointer; }
.wl-touch .kc-sw { height: 44px; gap: 4px; }
.kc-sw[aria-pressed="true"] { border: 2px solid var(--ink); box-shadow: 0 0 0 2px var(--surface) inset; }
.kc-reset:disabled { visibility: hidden; }

/* the swap between Leave at and Arrive by (his idea): the typed one white,
   the worked-out one grey */
.wl-swap {
    width: 36px; height: 36px; border-radius: var(--r-control); border: 1px solid var(--line-strong);
    background: var(--surface); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    color: var(--ink-2); margin-bottom: 5px;
}
.wl-swap svg { width: 18px; height: 18px; }
.wl-swap:hover { background: var(--surface-sunken); }

/* a flight leg: one card per leg, "Add a connecting flight" under the last */
.wl-leg { border: 1px solid var(--line); border-radius: var(--r-control); padding: 6px 12px 8px; margin: 6px 0; }
.wl-leg .wl-leghead { display: flex; align-items: center; justify-content: space-between; font-size: calc(12px * var(--text-scale, 1)); color: var(--ink-3); font-weight: 600; letter-spacing: var(--track-caps); text-transform: uppercase; min-height: 28px; }
.wl-transit { display: flex; align-items: center; gap: 8px; font-size: calc(12.5px * var(--text-scale, 1)); color: var(--ink-3); padding: 0 0 0 12px; }
.wl-transit::before { content: ""; width: 2px; height: 18px; background: var(--evt-transit-edge); border-radius: 1px; }

.wl-win.wl-touch .wl-tile { min-height: 64px; }
.wl-win.wl-touch .wl-swap, .wl-win.wl-touch .wl-money { height: 44px; }
.wl-win.wl-touch .wl-hues button { width: 36px; height: 36px; border-radius: 18px; }

/* THE RING OF TWELVE (board 10, his ruling 3 Nov 2026: "a better way of doing
   the colour swatches instead of a whole load of colours along the bottom"):
   the twelve hues stand in a circle round the kind's own colour, which sits
   in the middle. Press any dot and it becomes the block's colour. */
.wl-hues.open { display: block; position: relative; width: 156px; height: 156px; margin: 10px auto 6px; }
.wl-hues.open button { position: absolute; left: 50%; top: 50%; margin: -14px 0 0 -14px; }
.wl-hues.open button.kind { margin: -19px 0 0 -19px; width: 38px; height: 38px; border-radius: 19px; }
.wl-hues.open button:nth-child(2)  { transform: rotate(0deg)   translate(var(--r, 60px)) rotate(0deg); }
.wl-hues.open button:nth-child(3)  { transform: rotate(30deg)  translate(var(--r, 60px)) rotate(-30deg); }
.wl-hues.open button:nth-child(4)  { transform: rotate(60deg)  translate(var(--r, 60px)) rotate(-60deg); }
.wl-hues.open button:nth-child(5)  { transform: rotate(90deg)  translate(var(--r, 60px)) rotate(-90deg); }
.wl-hues.open button:nth-child(6)  { transform: rotate(120deg) translate(var(--r, 60px)) rotate(-120deg); }
.wl-hues.open button:nth-child(7)  { transform: rotate(150deg) translate(var(--r, 60px)) rotate(-150deg); }
.wl-hues.open button:nth-child(8)  { transform: rotate(180deg) translate(var(--r, 60px)) rotate(-180deg); }
.wl-hues.open button:nth-child(9)  { transform: rotate(210deg) translate(var(--r, 60px)) rotate(-210deg); }
.wl-hues.open button:nth-child(10) { transform: rotate(240deg) translate(var(--r, 60px)) rotate(-240deg); }
.wl-hues.open button:nth-child(11) { transform: rotate(270deg) translate(var(--r, 60px)) rotate(-270deg); }
.wl-hues.open button:nth-child(12) { transform: rotate(300deg) translate(var(--r, 60px)) rotate(-300deg); }
.wl-hues.open button:nth-child(13) { transform: rotate(330deg) translate(var(--r, 60px)) rotate(-330deg); }
.wl-hues.open button:hover { outline: 2px solid var(--ink-4); outline-offset: 2px; }
.wl-win.wl-touch .wl-hues.open { width: 196px; height: 196px; }
.wl-win.wl-touch .wl-hues.open button { margin: -18px 0 0 -18px; }
.wl-win.wl-touch .wl-hues.open button.kind { margin: -22px 0 0 -22px; width: 44px; height: 44px; border-radius: 22px; }
.wl-win.wl-touch .wl-hues.open { --r: 76px; }

/* ═══════════════════════════════════════════════════════════════════════
 * THE TOASTS — board 17 (S228, Stage 4). One shape: a dark bar, bottom-left
 * on a computer, above the thumb bar on a phone; an icon in the kind's
 * colour; three sentences at most; Done and Deleted carry an Undo BUTTON;
 * a warning offers Show; ×. Eight seconds; two on screen at most.
 * ═══════════════════════════════════════════════════════════════════════ */
.wl-toasts {
    position: fixed; left: 16px; bottom: 16px; z-index: 3200;
    display: flex; flex-direction: column; gap: 8px; pointer-events: none;
    max-width: min(560px, calc(100vw - 32px));
}
.wl-toasts.wl-touch { left: 12px; right: 12px; bottom: 84px; max-width: none; }
.wl-toast {
    pointer-events: auto; display: flex; align-items: center; gap: 10px;
    min-height: 48px; padding: 10px 12px; border-radius: var(--r-control, 8px);   /* S245 his pick 10 B: square corners */
    background: var(--ink); color: var(--paper); font-family: var(--font-body);
    font-size: calc(13.5px * var(--text-scale, 1)); line-height: calc(18px * var(--text-scale, 1)); box-shadow: var(--shadow-3);
    opacity: 0; transform: translateY(8px);
}
.wl-toast.show { opacity: 1; transform: none; }
/* S243 (his ruling A, 30 Nov 2026): a tip is not shown while a window, a menu
   or a sheet is open; it comes back when the last one closes (windows.js) */
.wl-toast.toast-tip.toast-tip-away { display: none; }
.wl-toast > svg:first-child, .wl-toast > i:first-child svg { width: 18px; height: 18px; flex: none; }
.wl-toast.done  > svg:first-child, .wl-toast.done  > i svg { color: oklch(78% 0.14 148); }
.wl-toast.refused > svg:first-child, .wl-toast.refused > i svg { color: oklch(72% 0.17 22); }
.wl-toast.warn  > svg:first-child, .wl-toast.warn  > i svg { color: oklch(80% 0.14 78); }
.wl-toast.info  > svg:first-child, .wl-toast.info  > i svg { color: oklch(78% 0.10 250); }
.wl-toast .tx { flex: 1; min-width: 0; }
.wl-toast .ta {
    height: 30px; padding: 0 12px; border: 0; border-radius: 7px; flex: none;
    background: oklch(100% 0 0 / 0.14); color: var(--paper); font: inherit; font-size: calc(13px * var(--text-scale, 1)); font-weight: 600; cursor: pointer;
}
.wl-toast .ta:hover { background: oklch(100% 0 0 / 0.22); }
.wl-toast .tx-x {
    width: 28px; height: 28px; border: 0; background: none; color: var(--paper); opacity: 0.6; cursor: pointer; flex: none;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; padding: 0;
}
.wl-toast .tx-x:hover { opacity: 1; }
.wl-toast .tx-x svg { width: 16px; height: 16px; }
.wl-toasts.wl-touch .wl-toast .ta { height: 40px; padding: 0 16px; }
.wl-toasts.wl-touch .wl-toast .tx-x { width: 40px; height: 40px; }

/* ═══════════════════════════════════════════════════════════════════════
 * WHAT THE TRIP COSTS, AT THE SIDE — board 19 (S228). Your share pinned at
 * the top, the sort, the kinds opening in place, the foot pinned; only the
 * middle scrolls. The cost stands apart, bold, at the right.
 * ═══════════════════════════════════════════════════════════════════════ */
.wl-win.wl-list .wl-body { padding: 0; gap: 0; }
.wl-win.wl-list .wl-kind { background: var(--surface-sunken); color: var(--ink); }
.cl-share { padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 2px; flex: none; }
.cl-share small { font-size: calc(11px * var(--text-scale, 1)); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.cl-share b { font-size: calc(32px * var(--text-scale, 1)); line-height: calc(36px * var(--text-scale, 1)); letter-spacing: -0.02em; font-weight: 600; }
.t { font-family: var(--font-time); font-feature-settings: var(--time-feature); }
.cl-sort { display: flex; align-items: center; gap: 10px; padding: 0 16px 10px; font-size: calc(12px * var(--text-scale, 1)); color: var(--ink-3); flex: none; }
.cl-sort .wl-seg { height: 28px; }
.cl-sort .wl-seg button { font-size: calc(12px * var(--text-scale, 1)); padding: 0 10px; }
/* S235: the money switch (his rulings, 16 Nov 2026) - every line wraps, nothing is cut */
/* S246 (his pick C, 3 Dec 2026): the View and Filter row of Bookings and
   payments - what View has set in plain words, then the two icon buttons,
   lined up with the money boxes above; Filter turns the main colour when on */
.cl-vfbar { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 16px 10px; }
.cl-vfwords { flex: 1 1 auto; min-width: 0; font-size: calc(12.5px * var(--text-scale, 1)); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-iconbtn { flex: none; width: 40px; height: 40px; padding: 0; justify-content: center; }
.cl-iconbtn svg { width: 20px; height: 20px; }
.wl-win.wl-touch .cl-iconbtn { width: 44px; height: 44px; }
.cl-filterbtn.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.cl-money { flex: none; padding: 0 16px 10px; font-size: calc(12px * var(--text-scale, 1)); color: var(--ink-3); display: flex; flex-direction: column; gap: 6px; }
.cl-money:empty { display: none; }
.cl-money-sw { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink-2); font-size: calc(13px * var(--text-scale, 1)); }
.cl-money-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; line-height: 1.4; }
.cl-money-line > span { min-width: 0; overflow-wrap: anywhere; }
.cl-money .cl-pick { width: auto; max-width: 100%; min-width: 0; flex: 1 1 160px; height: 32px; font-size: calc(13px * var(--text-scale, 1)); }
.cl-money .cl-rate-in { width: 90px; height: 30px; font-size: calc(13px * var(--text-scale, 1)); font-family: var(--font-time); }
.cl-link { border: 0; background: none; padding: 4px 0; font: inherit; font-size: calc(12px * var(--text-scale, 1)); color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.wl-win.wl-touch .cl-link { padding: 10px 0; }
.cl-amc { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.cl-amc:has(.cl-also) { padding: 4px 0; }   /* two lines never touch the next row's */
.cl-also { display: block; font-size: calc(11px * var(--text-scale, 1)); font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.cl-also-big { font-size: calc(13px * var(--text-scale, 1)); }
.cl-list { border-top: 1px solid var(--line); }
.cl-kind {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px 0 16px;
    border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--ink);
    font: inherit; font-size: calc(14px * var(--text-scale, 1)); font-weight: 500; cursor: pointer; text-align: left;
}
.cl-kind:hover { background: var(--surface-sunken); }
.cl-kind.open { background: var(--paper); }
.cl-kind .wl-kind { width: 28px; height: 28px; border-radius: 7px; }
.cl-kind .wl-kind svg { width: 16px; height: 16px; }
.cl-kind .lb { flex: 1; }
.cl-kind > svg:last-child, .cl-kind > i:last-child svg { width: 16px; height: 16px; color: var(--ink-3); transition: transform 0.15s; }
.cl-kind.open > svg:last-child, .cl-kind.open > i:last-child svg { transform: rotate(180deg); }
.cl-sub { background: var(--paper); border-bottom: 1px solid var(--line); padding: 4px 0 6px; }
/* S244 (his rulings, 1 Dec 2026): COSTS AND BOOKINGS - the totals strip
   (trip cost = paid + still to pay + not marked yet), two by two when the
   panel is narrow; a line's buttons at its right (never over the words: the
   words wrap) */
.cb-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 14px 16px 10px; flex: none; }
.wl-win.wl-touch .cb-strip, .wl-win .cb-strip.cb-narrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cb-tile { background: var(--surface-sunken); border-radius: var(--r-control); padding: 8px 6px; text-align: center; min-width: 0; }
.cb-tile b { display: block; font-size: calc(16px * var(--text-scale, 1)); line-height: calc(20px * var(--text-scale, 1)); font-weight: 700; overflow-wrap: anywhere; color: var(--ink); }
.cb-tile small { display: block; font-size: calc(11.5px * var(--text-scale, 1)); line-height: 1.25; color: var(--ink-3); }
.cb-tile.cb-owe b { color: var(--warning-text); }
/* the one word per booking: the Itinerary's own pill colours (inventory.css .ds-status) */
.cb-word { display: block; margin-top: 2px; }
.cb-step { display: inline-block; font-size: calc(11px * var(--text-scale, 1)); font-weight: 700; line-height: calc(17px * var(--text-scale, 1));
    padding: 0 7px; border-radius: var(--r-pill); white-space: nowrap; }
.cb-ok   { background: var(--success-bg); color: var(--success); }
.cb-part, .cb-owe { background: var(--warning-bg); color: var(--warning-text); }
/* S244 (his ruling, 1 Dec 2026: "We don't need a dash around To book ... just the words will cover everything"): To book is a plain orange pill */
.cb-book { background: var(--warning-bg); color: var(--warning-text); }
.cb-free, .cb-none { background: var(--surface-sunken); color: var(--ink-3); }
.cb-off  { background: var(--surface-sunken); color: var(--ink-3); text-decoration: line-through; }
/* To do groups: the chevron first, the count and money at the right */
.cb-head { gap: 8px; padding-left: 12px; }
.cb-head > svg:first-child, .cb-head > i:first-child svg { width: 16px; height: 16px; color: var(--ink-3); transition: transform 0.15s; transform: rotate(-90deg); flex: none; }
.cb-head.open > svg:first-child, .cb-head.open > i:first-child svg { transform: none; }
.cb-sum { color: var(--ink-3); font-size: calc(12.5px * var(--text-scale, 1)); white-space: nowrap; }
/* Set: every step, one press each, under the line */
.cb-steps { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 16px 10px 66px; }
.cb-step-btn { height: 28px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--surface);
    font: inherit; font-size: calc(12px * var(--text-scale, 1)); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.cb-step-btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.wl-win.wl-touch .cb-step-btn { height: 40px; padding: 0 12px; }
.wl-win.wl-touch .cb-steps { padding-left: 16px; }
.cl-row.cb-setting { background: var(--accent-soft); }
/* S244 (his pick A, 1 Dec 2026: "One dropdown"): each booking ends with its
   word as a dropdown, in both views; the cost and the dropdown share the right
   end and stack when the panel is narrow, so the name keeps its room */
.cl-row.cb-2l { display: grid; grid-template-columns: auto 40px minmax(0, 1fr) auto auto;
    grid-template-areas: "tk dt lb am pen" "tk dt meta dd pen"; column-gap: 10px; row-gap: 3px; align-items: center; padding-top: 6px; padding-bottom: 6px; }
.cl-row.cb-2l > .cl-pick { grid-area: tk; }
.cl-row.cb-2l > .dt { grid-area: dt; align-self: start; padding-top: 1px; }
.cl-row.cb-2l > .lb { grid-area: lb; }
.cl-row.cb-2l > .am { grid-area: am; margin-left: 0; min-width: 0; align-self: start; }
.cl-row.cb-2l > .cb-meta { grid-area: meta; display: flex; align-items: center; gap: 10px; min-width: 0; }
.cl-row.cb-2l > .cb-meta .ln { width: auto; text-align: left; }
.cl-row.cb-2l > .cb-meta .det { font-size: calc(11px * var(--text-scale, 1)); color: var(--ink-3); overflow-wrap: anywhere; }
.cl-row.cb-2l > .cb-meta .cl-who { width: auto; justify-content: flex-start; }
.cl-row.cb-2l > .cb-dd, .cl-row.cb-2l > .cb-step { grid-area: dd; justify-self: end; }
.cl-row.cb-2l > .pen { grid-area: pen; }
.cb-dd { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 6px 0 8px; border-radius: var(--r-control);
    font: inherit; font-size: calc(11.5px * var(--text-scale, 1)); font-weight: 700; white-space: nowrap; cursor: pointer; border: 1px solid transparent; }
.cb-dd svg { width: 13px; height: 13px; flex: none; }
.cb-dd.cb-ok   { background: var(--success-bg); color: var(--success); }
.cb-dd.cb-part, .cb-dd.cb-owe { background: var(--warning-bg); color: var(--warning-text); }
.cb-dd.cb-book { background: var(--warning-bg); color: var(--warning-text); }   /* S244: no dash (his ruling, 1 Dec 2026) */
.cb-dd.cb-free, .cb-dd.cb-none, .cb-dd.cb-off { background: var(--surface-sunken); color: var(--ink-2); border-color: var(--line); }
.cb-dd:hover, .cb-dd[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--accent-soft); border-color: var(--accent); }
.wl-win.wl-touch .cb-dd { height: 36px; padding: 0 10px; }
.cb-menu { position: fixed; z-index: 2147483000; min-width: 190px; padding: 5px; background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: 10px; box-shadow: var(--shadow-3, 0 6px 18px rgba(0,0,0,.2)); display: flex; flex-direction: column; }
.cb-mi { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; padding: 0 10px; border: 0; border-radius: 7px;
    background: none; font: inherit; font-size: calc(13px * var(--text-scale, 1)); color: var(--ink); text-align: left; cursor: pointer; }
.cb-mi:hover, .cb-mi:focus-visible { background: var(--accent-soft); outline: none; }
.cb-mi.now { color: var(--ink-3); }
.cb-mh { padding: 6px 10px 4px; font-size: calc(11.5px * var(--text-scale, 1)); font-weight: 700; color: var(--ink-3); border-bottom: 1px solid var(--line); margin-bottom: 3px; }
.cl-pickbar .wl-btn svg { width: 14px; height: 14px; margin-left: 2px; vertical-align: -2px; }
.cb-mi small { font-size: calc(11px * var(--text-scale, 1)); color: var(--ink-3); }
@media (pointer: coarse) { .cb-mi { min-height: 44px; } }
/* the numbers that open their part of the list */
button.cb-tile { border: 1px solid transparent; font: inherit; color: inherit; cursor: pointer; width: 100%; }
button.cb-tile:hover { border-color: var(--accent); }
/* S244 (his find, 1 Dec 2026: "the table itself is just one colour"): group
   headers on a darker band, the bookings under them on white - a different
   kind of row looks different (common region), as a window's fold does */
.wl-win.wl-list .cl-kind, .wl-win.wl-list .cl-kind.open { background: var(--surface-sunken); }
.wl-win.wl-list .cl-kind:hover { background: var(--accent-soft); }
.wl-win.wl-list .cl-sub { background: var(--surface); }
.wl-win.wl-list .cl-kind .wl-kind { background: var(--surface); }
.td-row .am { min-width: 0; }
.td-act { display: inline-flex; gap: 4px; flex: none; }
.td-btn { height: 26px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--surface);
    font: inherit; font-size: calc(12px * var(--text-scale, 1)); font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.td-btn.on { border-color: var(--accent); color: var(--accent); }
.td-btn:hover { background: var(--accent-soft); }
.wl-win.wl-touch .td-btn { height: 40px; padding: 0 12px; }
.cl-row { display: flex; align-items: center; gap: 10px; min-height: 30px; padding: 3px 16px; font-size: calc(12.5px * var(--text-scale, 1)); color: var(--ink-2); }
.cl-row .dt { width: 40px; flex: none; color: var(--ink-3); }
.cl-row .lb .det { display: block; font-size: calc(11px * var(--text-scale, 1)); color: var(--ink-3); }
/* S235 (his rule, 16 Nov 2026: no text is ever cut off - "SYD -> S..." at
   320 wide): the line's words wrap onto a second line */
.cl-row .lb { flex: 1; min-width: 0; white-space: normal; overflow-wrap: break-word; line-height: 1.3; }
.cl-row .am { flex: none; min-width: 64px; text-align: right; margin-left: 10px; font-weight: 600; color: var(--ink); }
/* S239 (his ask, 25 Nov 2026: "aligned a bit closer to the cost ... keep all
   the hours aligned"): the length and who pays are fixed columns, so every
   length, every set of initials and every price lines up down the list */
.cl-row .ln { flex: none; width: 58px; text-align: right; white-space: nowrap; color: var(--ink-3); }
.cl-row .cl-who { flex: none; width: 34px; display: flex; justify-content: flex-end; }
.cl-row .cl-who + .am { margin-left: 4px; }
.cl-who .pp-dot { width: 18px; height: 18px; font-size: calc(8.5px * var(--text-scale, 1)); border: 1.5px solid var(--paper); box-sizing: content-box; }
.cl-who .pp-dot + .pp-dot { margin-left: -7px; }
.cl-who button { border: 0; background: none; padding: 0; cursor: pointer; display: flex; }
.cl-list.no-len .ln, .cl-list.no-who .cl-who { display: none; }
/* S241: tick bookings, change who pays on all at once */
.cl-pick { flex: none; width: 15px; height: 15px; margin: 0 -2px 0 0; accent-color: var(--accent); cursor: pointer; }
.cl-row.cl-picked { background: color-mix(in oklab, var(--accent) 9%, var(--surface)); }
.cl-row.cl-picked, .cl-row.cl-picked .lb { color: var(--ink); }
.cl-pickall { display: flex; align-items: center; gap: 10px; padding: 4px 16px; font-size: calc(12px * var(--text-scale, 1)); color: var(--ink-3); cursor: pointer; }
.cl-pickbar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; }
.cl-pickbar .n { flex: 1; font-size: calc(13px * var(--text-scale, 1)); font-weight: 600; color: var(--ink); }
.cl-pickbar.open { flex-direction: column; align-items: stretch; }
.cl-pickbar-go { display: flex; justify-content: flex-end; gap: 8px; }
/* S243: "Flights are never split" in the Who pays bar */
.cl-pick-note { font-size: calc(12px * var(--text-scale, 1)); color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; }
.cl-foot { flex: none; border-top: 1px solid var(--line); background: var(--surface); box-shadow: 0 -8px 16px -12px oklch(24% 0.02 265 / 0.3); }
.cl-tot { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; font-size: calc(14px * var(--text-scale, 1)); font-weight: 600; background: var(--paper); }
.cl-tot .lb { flex: 1; }
.cl-miss { border-top: 1px solid var(--line); }
.cl-miss-line { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; font-size: calc(13px * var(--text-scale, 1)); color: var(--ink-2); }
.cl-miss-line svg, .cl-miss-line i svg { width: 16px; height: 16px; color: var(--warning-text); flex: none; }
.cl-miss-line .lb { flex: 1; }
.cl-miss-list { display: none; padding: 0 0 6px; }
.cl-miss.open .cl-miss-list { display: block; }
.wl-win.wl-touch .cl-kind { min-height: 52px; }
.wl-win.wl-touch .cl-row { min-height: 36px; }
/* S229 (his ask): a booking line opens its own edit window - a double-click,
 * a tap on a phone. It says so: the line lights under the pointer and a small
 * pencil shows at its end (always shown, faint, on a phone, which has no
 * hover). The line just changed is marked once when the list comes back. */
.cl-row.cl-edit { cursor: pointer; position: relative; isolation: isolate; }
.cl-row.cl-edit:hover, .cl-row.cl-edit:focus-visible { background: var(--surface-sunken); outline: none; }
/* S233 (his find, 16 Nov 2026: the pencil did nothing when pressed): the pencil is a real button,
   with a hit area a finger or a mouse can find (28px), the icon still drawn at 14px */
.cl-row .pen { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: -7px -4px -7px -11px; padding: 0; border: 0; border-radius: 999px; background: none; cursor: pointer; color: var(--ink-3); opacity: 0; transition: opacity var(--mo-fast, 0.2s); }
.cl-row .pen:hover { background: var(--surface-sunken); color: var(--accent); }
.cl-row .pen svg { width: 14px; height: 14px; }
.cl-row.cl-edit:hover .pen, .cl-row.cl-edit:focus-visible .pen { opacity: 1; }
.wl-win.wl-touch .cl-row.cl-edit { min-height: 44px; }
/* S244 (his ask, 1 Dec 2026): on the Map a cost line takes the map to its booking (cost-list.js mapable) */
.cl-row.cl-onmap { cursor: pointer; }
.cl-row.cl-onmap:hover, .cl-row.cl-onmap:focus-visible { background: var(--surface-sunken); outline: none; }
.cl-row.cl-shown { background: var(--accent-soft); }
.wl-win.wl-touch .cl-row.cl-onmap { min-height: 44px; }
.wl-win.wl-touch .cl-row .pen { opacity: 0.55; }
/* the mark is a tint BEHIND the words that fades by opacity alone (the
 * motion rule: only transform and opacity ever animate) */
.cl-row.cl-just::after { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--accent-soft); pointer-events: none; animation: cl-just 2.4s var(--mo-out, ease-out) forwards; }
@media (prefers-reduced-motion: reduce) { .cl-row.cl-just::after { animation: none; opacity: 1; } }
@keyframes cl-just { 0%, 40% { opacity: 1; } 100% { opacity: 0; } }

/* ROOM AT THE SIDE (Stage 5, S228): while a window stands at the side, the
   trip page's bar and calendar frame end where the panel begins. The canvas
   watches its frame and re-lays the week out to the new width. */
body.wl-side-open .calendar-container,
body.wl-side-open .header { margin-right: var(--wl-side-w, 420px); }
body.wl-side-open .container.tb-rail-on > .calendar-container { margin-right: var(--wl-side-w, 420px); }

/* DIRECTIONS IN PLACE (S228): the road's turn-by-turn inside the journey's own
   window - the found card says how far and how long, the map sits in a frame,
   each step is a row with the way of travelling in a soft disc, and the way
   out to Google Maps is a quiet link. No second window, no stray scrollbar. */
.wl-dir-wait { display: flex; align-items: center; gap: 8px; min-height: 40px; color: var(--ink-3); font-size: calc(13px * var(--text-scale, 1)); }
.wl-dir-wait svg { width: 18px; height: 18px; }
.wl-map { border: 1px solid var(--line); border-radius: var(--r-control); overflow: hidden; margin: 8px 0; background: var(--surface-sunken); }
.wl-map iframe { display: block; width: 100%; height: 200px; border: 0; }
.wl-steps { display: flex; flex-direction: column; }
.wl-step { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: calc(13px * var(--text-scale, 1)); line-height: 1.35; }
.wl-step:last-child { border-bottom: 0; }
.wl-step-ic { flex: none; width: 28px; height: 28px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--ink-2); }
.wl-step-ic svg { width: 15px; height: 15px; }
.wl-step-ic.drive { background: var(--evt-hire-car-bg, var(--surface-sunken)); }
.wl-step-ic.walk { background: var(--success-bg, var(--surface-sunken)); }
.wl-step-ic.transit { background: var(--evt-transit-bg, var(--accent-soft)); }
.wl-step-body { flex: 1; min-width: 0; }
.wl-step-main { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.wl-step-main div { font-size: calc(12px * var(--text-scale, 1)); color: var(--ink-3); font-weight: 400; }
.wl-step-body small { display: block; color: var(--ink-3); font-size: calc(12px * var(--text-scale, 1)); margin-top: 2px; }
.wl-line { display: inline-block; padding: 1px 6px; border-radius: 4px; font-weight: 700; font-size: calc(11.5px * var(--text-scale, 1)); }
.wl-dir-out { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 2px; text-decoration: none; }
.wl-dir-out svg { width: 14px; height: 14px; }

/* THE BIG LOOK (S228): the route's map in a large middle window of its own */
.wl-map { position: relative; }
.wl-map-big {
    position: absolute; right: 8px; top: 8px; display: inline-flex; align-items: center; gap: 5px;
    height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-control);
    background: var(--surface); color: var(--ink-2); font: inherit; font-size: calc(12px * var(--text-scale, 1)); font-weight: 500; cursor: pointer;
    box-shadow: var(--shadow-1);
}
.wl-map-big:hover { background: var(--surface-sunken); }
.wl-map-big svg { width: 14px; height: 14px; }
.wl-overlay.wl-big-overlay { z-index: 3100; }
.wl-win.wl-big { width: min(92vw, 960px); }
.wl-big .wl-body { padding-top: 0; }
.wl-map-large { margin: 0; }
.wl-map-large iframe { height: min(70vh, 640px); }
.wl-big-foot { justify-content: flex-start; }

/* ═══════════════════════════════════════════════════════════════════════
 * MOTION — Session 228 (his ask, 4 November 2026: "nice, smooth motion
 * wherever we can within the app. Every time something moves, a bit of
 * nice, smooth animation would be good.")
 *
 * ONE rule set for everything that appears, leaves or moves on a page.
 * The net is .claude/skills/trip-test/scripts/check_motion.py.
 *
 *   how long   --mo-fast  200ms  small things: menus, tips, ticks, toasts
 *              --mo-panel 320ms  panels, windows, sheets, the scrim
 *              (his ruling, 4 Nov 2026: calm 200/320 over brisk 160/240)
 *   how        --mo-out   ease-out when something ENTERS (quick start, soft landing)
 *              --mo-in    ease-in  when something LEAVES (eases away, then gone)
 *   what       transform and opacity ONLY. Never width, height, left, top,
 *              right, bottom, margin or a grid track: those reflow the page
 *              and make the calendar jump while they run.
 *   shapes     a side panel slides in from its edge · a middle window fades
 *              and lifts · a menu fades and drops 6px · a sheet rises on the
 *              phone · a toast rises · a tick pops
 *   leaving    JS adds .mo-out, waits for the animation, then removes the
 *              node (WL.motion.leave in windows.js). A list that is re-laid
 *              glides each row from its old place to its new one
 *              (WL.motion.flip): FLIP, a transform, never a layout change.
 *   off        prefers-reduced-motion: reduce sets both durations to 0.
 *
 * The things this reaches (the inventory of 4 Nov 2026):
 *   the window language  .wl-overlay (middle · .wl-side · .wl-sheet) + .wl-win,
 *                        the big look .wl-big-overlay, the tip .wl-tip, the
 *                        ring of twelve .wl-hues.open, the More fold .wl-fold,
 *                        the cost list's rows opening in place .cl-sub,
 *                        the toasts .wl-toast, the Preferences window (same classes)
 *   the toolbar          + Add and ⋯ More menus .add-menu, the list of weeks
 *                        .tb-week-menu, the zoom .zoom-pop, the cost pop
 *                        .tb-cost-pop, the phone drawer .tb-rail.tb-drawer and
 *                        its scrim .tb-scrim (calendar-toolbar.js)
 *   the right-click menu .cc-menu (canvas-calendar.js, the menu shell only)
 *   the tutorial trip    .st-panel, .st-tab, .st-phonebtn, .st-sheet, .st-scrim,
 *                        .st-welcome, .st-bubble, .st-hint, the tick .st-box
 *                        (sample-tour.js)
 *   the Findings box     #findingsPanel.open (trip.html, his laptop only)
 *   the old forms        .modal + .modal-content (trip.html and the trips page;
 *                        they enter smoothly, they still close at once until
 *                        each one moves into the window language)
 *   the trips page       .acct-menu, .more-menu
 * ═══════════════════════════════════════════════════════════════════════ */
:root {
    --mo-fast: 200ms;   /* his ruling 4 Nov 2026: calm, not brisk */
    --mo-panel: 320ms;
    --mo-out: cubic-bezier(0.2, 0.8, 0.2, 1);
    --mo-in: cubic-bezier(0.4, 0, 1, 1);
}
@media (prefers-reduced-motion: reduce) {
    :root { --mo-fast: 0ms; --mo-panel: 0ms; }
}

/* the shapes */
@keyframes mo-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes mo-fade-out { to { opacity: 0; } }
@keyframes mo-drop-in  { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes mo-drop-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes mo-lift-in  { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes mo-lift-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }
@keyframes mo-slide-in-right  { from { transform: translateX(100%); } to { transform: none; } }
@keyframes mo-slide-out-right { to { transform: translateX(100%); } }
@keyframes mo-rise-in  { from { transform: translateY(100%); } to { transform: none; } }
@keyframes mo-rise-out { to { transform: translateY(100%); } }
@keyframes mo-pop      { 0% { transform: scale(0.5); } 70% { transform: scale(1.15); } 100% { transform: none; } }
/* for things that already stand on a transform of their own */
@keyframes mo-centre-in  { from { opacity: 0; transform: translate(-50%, -50%) translateY(12px) scale(0.98); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes mo-centre-out { to { opacity: 0; transform: translate(-50%, -50%) translateY(8px) scale(0.98); } }
@keyframes mo-pill-in    { from { opacity: 0; transform: translateX(-50%) translateY(12px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes mo-pill-out   { to { opacity: 0; transform: translateX(-50%) translateY(12px); } }

/* anything leaving: nothing it covers is clickable while it goes */
.mo-out { pointer-events: none !important; animation: mo-fade-out var(--mo-fast) var(--mo-in) forwards; }

/* ── the window language ─────────────────────────────────────────────── */
.wl-overlay { animation: mo-fade-in var(--mo-panel) var(--mo-out); }
.wl-overlay .wl-win { animation: mo-lift-in var(--mo-panel) var(--mo-out); }
.wl-overlay.wl-side .wl-win { animation: mo-slide-in-right var(--mo-panel) var(--mo-out); }
.wl-overlay.wl-sheet .wl-win { animation: mo-rise-in var(--mo-panel) var(--mo-out); }
.wl-overlay.mo-out { animation: mo-fade-out var(--mo-panel) var(--mo-in) forwards; }
.wl-overlay.mo-out .wl-win { animation: mo-lift-out var(--mo-panel) var(--mo-in) forwards; }
.wl-overlay.wl-side.mo-out .wl-win { animation: mo-slide-out-right var(--mo-panel) var(--mo-in) forwards; }
.wl-overlay.wl-sheet.mo-out .wl-win { animation: mo-rise-out var(--mo-panel) var(--mo-in) forwards; }
.wl-tip { animation: mo-fade-in var(--mo-fast) var(--mo-out); }
.wl-hues.open { animation: mo-lift-in var(--mo-fast) var(--mo-out); }
.wl-fold[open] > .wl-fg { animation: mo-drop-in var(--mo-fast) var(--mo-out); }
.cl-sub.mo-new { animation: mo-drop-in var(--mo-fast) var(--mo-out); }
.wl-toast { transition: opacity var(--mo-fast) var(--mo-in), transform var(--mo-fast) var(--mo-in); }
.wl-toast.show { transition: opacity var(--mo-fast) var(--mo-out), transform var(--mo-fast) var(--mo-out); }

/* ── the toolbar's pop-ups (their look lives in calendar-toolbar.js) ──── */
.add-menu:not([hidden]), .tb-week-menu:not([hidden]), .zoom-pop:not([hidden]), .tb-cost-pop:not([hidden]) {
    animation: mo-drop-in var(--mo-fast) var(--mo-out);
}
.tb-pop { animation: mo-drop-in var(--mo-fast) var(--mo-out); }
.tb-pop.mo-out { animation: mo-drop-out var(--mo-fast) var(--mo-in) forwards; }
.add-menu.mo-out, .tb-week-menu.mo-out, .zoom-pop.mo-out, .tb-cost-pop.mo-out {
    animation: mo-drop-out var(--mo-fast) var(--mo-in) forwards;
}
.tb-scrim:not([hidden]) { animation: mo-fade-in var(--mo-panel) var(--mo-out); }
.tb-scrim.mo-out { animation: mo-fade-out var(--mo-panel) var(--mo-in) forwards; }
.tb-rail.tb-drawer { transition: transform var(--mo-panel) var(--mo-in); }
.tb-rail.tb-drawer.tb-open { transition: transform var(--mo-panel) var(--mo-out); }

/* ── the right-click menu (the shell in canvas-calendar.js) ─────────── */
.cc-menu { animation: mo-drop-in var(--mo-fast) var(--mo-out); }
.cc-menu.mo-out { animation: mo-drop-out var(--mo-fast) var(--mo-in) forwards; }

/* ── S231: "Saving" on a dropped block while its save is out (canvas-calendar.js
   showSaving). A page element over the canvas: its dots pulse by opacity
   alone, so the calendar is never repainted for it. ───────────────────── */
.cc-saving {
    position: fixed; z-index: 1200; pointer-events: none;
    display: inline-flex; align-items: center; gap: 2px;
    padding: 2px 8px; border-radius: 999px;
    background: var(--surface, #fff); color: var(--ink-2, #444);
    border: 1px solid var(--line, #ddd); box-shadow: var(--shadow-1, 0 1px 3px rgba(0,0,0,0.12));
    font-size: calc(11.5px * var(--text-scale, 1)); font-weight: 600; line-height: calc(16px * var(--text-scale, 1));
    animation: mo-fade-in var(--mo-fast) var(--mo-out);
}
.cc-saving::after { content: '…'; animation: cc-saving-dots 1s ease-in-out infinite; }
.cc-saving.mo-out { animation: mo-fade-out var(--mo-fast) var(--mo-in) forwards; }
@media (prefers-reduced-motion: reduce) { .cc-saving::after { animation: none; } }
@keyframes cc-saving-dots { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }

/* ── the tutorial trip: the checklist and its tours (sample-tour.js) ──── */
.st-panel { animation: mo-slide-in-right var(--mo-panel) var(--mo-out); }
.st-panel.mo-out { animation: mo-slide-out-right var(--mo-panel) var(--mo-in) forwards; }
.st-tab { animation: mo-fade-in var(--mo-panel) var(--mo-out); }
.st-phonebtn { animation: mo-pill-in var(--mo-panel) var(--mo-out); }
.st-phonebtn.mo-out { animation: mo-pill-out var(--mo-panel) var(--mo-in) forwards; }
.st-sheet { animation: mo-rise-in var(--mo-panel) var(--mo-out); }
.st-sheet.mo-out { animation: mo-rise-out var(--mo-panel) var(--mo-in) forwards; }
.st-scrim { animation: mo-fade-in var(--mo-panel) var(--mo-out); }
.st-scrim.mo-out { animation: mo-fade-out var(--mo-panel) var(--mo-in) forwards; }
.st-welcome { animation: mo-centre-in var(--mo-panel) var(--mo-out); }
.st-welcome.mo-out { animation: mo-centre-out var(--mo-panel) var(--mo-in) forwards; }
.st-bubble { animation: mo-drop-in var(--mo-fast) var(--mo-out); }
.st-bubble.mo-out { animation: mo-drop-out var(--mo-fast) var(--mo-in) forwards; }
.st-hint { animation: mo-fade-in var(--mo-panel) var(--mo-out); }
.st-item .st-box { transition: background var(--mo-fast) var(--mo-out), border-color var(--mo-fast) var(--mo-out); }
.st-item.mo-ticked .st-box { animation: mo-pop var(--mo-panel) var(--mo-out); }
.st-item { transition: transform var(--mo-panel) var(--mo-out); }   /* the glide when the list re-lays (FLIP) */

/* ── the Findings box (trip.html, his laptop and the benches only) ────── */
#findingsPanel.open { animation: mo-lift-in var(--mo-panel) var(--mo-out); }
#findingsPanel.mo-out { animation: mo-lift-out var(--mo-panel) var(--mo-in) forwards; }

/* ── the old forms, until each moves into the window language ─────────── */
.modal { animation: mo-fade-in var(--mo-panel) var(--mo-out); }
.modal .modal-content { animation: mo-lift-in var(--mo-panel) var(--mo-out); }
.modal.mo-out { animation: mo-fade-out var(--mo-panel) var(--mo-in) forwards; }
.modal.mo-out .modal-content { animation: mo-lift-out var(--mo-panel) var(--mo-in) forwards; }

/* ── the trips page's two menus ───────────────────────────────────────── */
.acct-menu:not([hidden]), .more-menu:not([hidden]) { animation: mo-drop-in var(--mo-fast) var(--mo-out); }
.acct-menu.mo-out, .more-menu.mo-out { animation: mo-drop-out var(--mo-fast) var(--mo-in) forwards; }

/* ═══════════════════════════════════════════════════════════════════════
 * LOADING — Session 231 (9 November 2026). His ask: "I've got a few
 * different messages and a few different types ... just do a complete
 * review and make it more consistent and look pretty good." His picks,
 * all A: the words "Opening your trip…", the Big Trip Planner mark on the
 * loading screen, the busy pill stays dark.
 *
 * ONE ring, in the app's petrol, two sizes. ONE way of writing the words:
 * what the app is doing, ending in the … mark (never three dots). THREE
 * places it can appear, and a rule for which (windows.js WL.wait):
 *
 *   A. .wl-curtain   the loading screen for a WHOLE page: the page's own
 *                    colour, the mark, the ring, one line of words. It
 *                    comes up the moment you click a link or press a form's
 *                    button, so the screen never goes white; the trip page
 *                    wears it (#calBoot) until the calendar has drawn.
 *   B. .wl-pill      the busy pill for short waits in the background (the
 *                    S213 on-hold sign, trip.html): top centre on a
 *                    computer, above the thumb bar on a phone.
 *   C. .wl-wait      inside a window or a list, where the content will
 *                    appear; a working button wears the small ring itself
 *                    (button.wl-busy) and NEVER the curtain as well (his
 *                    Session 135 rule: two loading animations fighting).
 *
 * The ring animates transform only (compositor-safe, Session 135): the
 * S228 rule — never margin, grid track, width, height, left or top.
 * ═══════════════════════════════════════════════════════════════════════ */
.wl-ring {
  display: inline-block; flex: none; width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--surface-sunken, #eef0f2); border-top-color: var(--accent, #2b7f90);
  animation: wl-ring 0.9s linear infinite;
}
.wl-ring.sm { width: 16px; height: 16px; border-width: 2px; }
.wl-ring.on-dark { border-color: rgba(255, 255, 255, 0.3); border-top-color: var(--surface, #fff); }
@keyframes wl-ring { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wl-ring { animation: none; } }

/* A. the loading screen */
.wl-curtain {
  position: fixed; inset: 0; z-index: 100001; background: var(--surface, #fff);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  opacity: 1; transition: opacity 280ms ease;
}
.wl-curtain.off, .wl-curtain.is-done { opacity: 0; pointer-events: none; }
.wl-curtain.is-done .wl-ring, .wl-curtain.is-done .wl-words, .wl-curtain.is-done .wl-mark { display: none; }  /* Session 135: nothing half-animated in the fade */
.wl-curtain[hidden] { display: none; }
.wl-curtain .wl-mark { display: flex; align-items: center; gap: 8px; font-family: var(--font-display, sans-serif); font-weight: 600; font-size: calc(17px * var(--text-scale, 1)); letter-spacing: -0.012em; color: var(--ink, #1e2026); }
.wl-curtain .wl-mark .light { font-weight: 500; color: var(--ink-3, #777); }
.wl-curtain .wl-mark .wl-mark-svg { width: 22px; height: 22px; color: var(--accent, #2b7f90); }
.wl-curtain .wl-words { font-family: var(--font-body, sans-serif); font-size: calc(15px * var(--text-scale, 1)); font-weight: 600; color: var(--ink-2, #3a3d45); letter-spacing: -0.005em; text-align: center; padding: 0 16px; }

/* B. the busy pill */
.wl-pill {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 100000; pointer-events: none;
  display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: var(--ink, #1e2026); color: var(--surface, #fff);
  font-family: var(--font-body, sans-serif); font-size: calc(13px * var(--text-scale, 1)); font-weight: 600; letter-spacing: var(--track-tight, -0.01em);
  box-shadow: var(--shadow-3, 0 12px 32px rgba(0,0,0,0.18));
  opacity: 0; visibility: hidden; transition: opacity var(--mo-fast, 200ms) ease, visibility var(--mo-fast, 200ms) ease;
}
.wl-pill.on { opacity: 1; visibility: visible; }
body.tb-has-tabs .wl-pill { top: auto; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

/* C. inside a window or a list, and a working button */
.wl-wait {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 28px 16px; color: var(--ink-3, #777); font-family: var(--font-body, sans-serif); font-size: calc(14px * var(--text-scale, 1)); text-align: center;
}
.wl-wait small { display: block; font-size: calc(12.5px * var(--text-scale, 1)); color: var(--ink-4, #999); }
/* S233: a Preferences row while the calendar behind is redrawn ("Showing Split day…"),
   beside the row's title so nothing below it moves */
.pf-busy { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; font-size: calc(12.5px * var(--text-scale, 1)); font-weight: 500; color: var(--ink-3, #777); white-space: nowrap; vertical-align: middle; }
.pf-saved { font-size: calc(12.5px * var(--text-scale, 1)); color: var(--ink-3, #777); }   /* S245 his pick 17 A: the quiet Saving… / Saved line in the Preferences foot */
button.wl-busy:has(.wl-ring) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
/* S238 (his find, 23 Nov 2026: "Loading…" kept spinning after 3 of 3 trips loaded): the busy look above
   beat the hidden attribute, so a busy button told to hide stayed on screen. Hidden always wins. */
button.wl-busy[hidden] { display: none; }
button.wl-busy .wl-ring.sm { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
button.wl-busy.quiet .wl-ring.sm, button.wl-busy.cal-tool-btn .wl-ring.sm, button.wl-busy.btn-secondary .wl-ring.sm {
  border-color: var(--surface-sunken, #eef0f2); border-top-color: var(--accent, #2b7f90);
}

/* S233: the request window (calendar-toolbar.js openProposalCard): the
   booking Now beside the time somebody asked for, and what they said */
.rq-ba { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.rq-lab { font-size: calc(11px * var(--text-scale, 1)); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.rq-mini { border-radius: var(--r-block); border: 1.5px solid transparent; padding: 7px 10px; display: flex; flex-direction: column; gap: 1px; font-size: calc(13px * var(--text-scale, 1)); }
.rq-mini b { font-weight: 600; }
.rq-mini span { font-family: var(--font-time); font-variant-numeric: tabular-nums; }
.rq-mini.asked { border: 1.5px dotted var(--ink-4); }
.rq-arrow { color: var(--accent); font-size: calc(18px * var(--text-scale, 1)); padding-bottom: 12px; }
.rq-line { font-size: calc(14px * var(--text-scale, 1)); }
.rq-quiet { font-size: calc(12.5px * var(--text-scale, 1)); color: var(--ink-3); margin-top: 10px; }
.rq-said { display: flex; flex-direction: column; }
.rq-say { background: var(--surface-sunken); border-radius: var(--r-control); padding: 8px 10px; font-size: calc(13.5px * var(--text-scale, 1)); margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.rq-say small { color: var(--ink-3); font-size: calc(12px * var(--text-scale, 1)); }
.rq-three { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: calc(13.5px * var(--text-scale, 1)); font-variant-numeric: tabular-nums; }
.rq-three .k { color: var(--ink-3); }
.rq-step { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rq-step .wl-btn { height: 36px; }
.rq-note { width: 100%; box-sizing: border-box; min-height: 56px; margin-top: 12px; padding: 8px 10px; resize: vertical;
    border: 1px solid var(--line-strong); border-radius: var(--r-control);
    font: inherit; font-size: calc(14px * var(--text-scale, 1)); color: var(--ink); background: var(--surface); }
/* S233: the request window's answers never clip; they wrap if the window is narrow */
.rq-win .wl-foot { flex-wrap: wrap; justify-content: flex-end; }
.rq-win .wl-foot .wl-btn { flex: none; }
.rq-look { align-self: flex-start; margin-top: 10px; padding: 6px 0; border: 0; background: none; cursor: pointer;
    font: inherit; font-size: calc(13.5px * var(--text-scale, 1)); font-weight: 600; color: var(--accent); text-align: left; }
.rq-look:hover { text-decoration: underline; }
@media (pointer: coarse) { .rq-look { min-height: 44px; } }
/* S233: the group vote window (calendar-toolbar.js openTimesWindow).
   The organiser's grid: people down the side, times across. A traveller's
   tick list. Mock-up: docs/mockups/group-vote-window-s233.html */
.tv-win { --tv-yes: var(--success); --tv-yes-soft: color-mix(in oklch, var(--success) 13%, white);
          --tv-no: var(--error); --tv-no-soft: color-mix(in oklch, var(--error) 9%, white); }
.tv-verdict { background: var(--tv-yes-soft); color: color-mix(in oklch, var(--success) 70%, black);
    border-radius: var(--r-control); padding: 9px 12px; font-weight: 600; font-size: calc(14px * var(--text-scale, 1)); }
.tv-grid { display: grid; column-gap: 6px; font-variant-numeric: tabular-nums; margin-top: 12px; }
.tv-grid > * { min-width: 0; }
.tv-th { display: grid; gap: 2px; justify-items: center; text-align: center; padding: 8px 4px; border-radius: 10px 10px 0 0; }
.tv-time { font-family: var(--font-display); font-weight: 700; font-size: calc(18px * var(--text-scale, 1)); line-height: 1.1; font-variant-numeric: tabular-nums; }
.tv-who { display: inline-flex; gap: 4px; align-items: center; font-size: calc(11.5px * var(--text-scale, 1)); color: var(--ink-3); font-style: normal; }
.tv-tag { font-size: calc(10.5px * var(--text-scale, 1)); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.tv-av { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: calc(9.5px * var(--text-scale, 1)); font-weight: 700; font-style: normal; flex: none; }
.tv-av2 { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-sunken); color: var(--ink-2); font-size: calc(11px * var(--text-scale, 1)); font-weight: 700; font-style: normal; flex: none; }
.tv-tally { display: inline-flex; gap: 8px; align-items: center; font-size: calc(12px * var(--text-scale, 1)); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tv-tally .y { color: var(--tv-yes); } .tv-tally .n { color: var(--tv-no); }
.tv-name { display: flex; align-items: center; gap: 7px; padding: 0 2px; font-weight: 500; font-size: calc(14px * var(--text-scale, 1)); border-top: 1px solid var(--line); min-height: 40px; overflow-wrap: break-word; }
.tv-say { display: inline-grid; color: var(--accent); flex: none; }
.tv-say svg { width: 14px; height: 14px; }
.tv-cell { display: grid; place-items: center; border-top: 1px solid var(--line); min-height: 40px; }
.tv-tf { padding: 8px 4px; border-radius: 0 0 10px 10px; }
.tv-th.best, .tv-cell.best, .tv-tf.best { background: var(--accent-soft); }
.tv-mk { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: calc(13px * var(--text-scale, 1)); font-weight: 700; }
.tv-mk.y { background: var(--tv-yes-soft); color: var(--tv-yes); }
.tv-mk.n { background: var(--tv-no-soft); color: var(--tv-no); }
.tv-mk.w { border: 1.5px dotted var(--ink-4); color: var(--ink-4); font-weight: 500; }
.tv-win .wl-btn.tv-pick { width: 100%; height: 34px; padding: 0 8px; font-size: calc(13px * var(--text-scale, 1)); justify-content: center; }
.tv-notes { display: grid; gap: 6px; max-height: 76px; overflow-y: auto; padding-right: 4px; margin-top: 12px; }
.tv-note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: start; font-size: calc(13.5px * var(--text-scale, 1)); }
.tv-note b { font-weight: 600; }
.tv-list { display: grid; gap: 8px; }
.tv-tick { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; width: 100%;
    border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.tv-tick:disabled { cursor: default; }
.tv-box { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; color: transparent; font-weight: 700; font-size: calc(14px * var(--text-scale, 1)); }
.tv-tick[aria-pressed="true"] { border-color: var(--tv-yes); background: var(--tv-yes-soft); }
.tv-tick[aria-pressed="true"] .tv-box { background: var(--tv-yes); border-color: var(--tv-yes); color: #fff; }
.tv-tick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tv-notein { width: 100%; box-sizing: border-box; margin-top: 10px; }
@media (pointer: coarse) { .tv-tick { min-height: 56px; } .tv-win .wl-btn.tv-pick { height: 44px; } }
/* S237 (his ruling, 20 Nov 2026: 'Keep on full screen only'): the Back button
   in the top bar is shown only when the app runs full screen (opened from the
   phone's Home Screen, or after the Full screen button), where there is no
   browser Back. In a browser the logo beside it goes to Your trips and the
   browser has its own Back, so the button is not drawn and the trip's name
   has its room. One rule for every page's Back (every element marked
   data-back: the planner, the Itinerary, the Map). */
@media (display-mode: browser), (display-mode: minimal-ui) { [data-back] { display: none !important; } }
/* S238 (his ask, 23 Nov 2026): a joined string opens as one booking; this line names it */
.wl-string-head { font-size: calc(13px * var(--text-scale, 1)); font-weight: 600; color: var(--ink-2); margin: 0 0 6px; }
/* S243 (his pick B, 29 Nov 2026): Split it evenly / Each pays their own, under the names */
/* S245 (his pick 26 C, 2 Dec 2026): How they pay is a drop-down list under the names */
.wl-howpay-row { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.wl-howpay-row > select.wl-in { width: 100%; max-width: none; min-width: 0; }

/* S243 (his pick A, 30 Nov 2026): GROUP BOOKINGS - the fold's small lines and
   the line under the cost of a booking in a group (add-windows.js groupFold). */
.wl-group-also { font-size: calc(13px * var(--text-scale, 1)); color: var(--ink-3); margin: 6px 0 2px; line-height: 1.4; }
.wl-group-cost { font-size: calc(13px * var(--text-scale, 1)); font-weight: 600; color: var(--accent, #1f6f8b); margin: -4px 0 8px; }
/* S243 (his ask, 30 Nov 2026): Save group, inside the Group bookings fold */
.wl-group-save { margin-top: 10px; }
.wl-group-saved { font-size: calc(13px * var(--text-scale, 1)); font-weight: 600; color: var(--accent, #1f6f8b); margin-top: 8px; }
/* S243 (his pick A, 30 Nov 2026): the linked bookings, a tick each, own cost on the right */
.wl-group-linked { margin-top: 10px; padding-top: 6px; border-top: 1px solid var(--line, #e3e6ee); }
.wl-group-link { display: flex; align-items: center; gap: 8px; }
.wl-group-link-cost { margin-left: auto; font-size: calc(13px * var(--text-scale, 1)); color: var(--ink-3); white-space: nowrap; }

/* ═══ S245 VIEW AND FILTER (view-filter.js; his picks 24 and 29, 2-3 Dec 2026) ═══
 * One panel for both buttons on every page that has them. On a computer it
 * opens beside or under its button; on an upright phone it opens just above
 * the bottom bar, every row a thumb tall (the phone rule, 44 pixels). */
.vf-pop { position: fixed; z-index: 1200; width: 300px; max-width: calc(100vw - 16px);
  max-height: calc(100vh - 24px); display: flex; flex-direction: column;
  background: var(--surface, #fff); color: var(--ink, #14324a);
  border: 1px solid var(--line-strong, #c9d3dc); border-radius: var(--r-card, 8px);
  box-shadow: 0 10px 30px rgba(16, 40, 60, .20); padding: 10px 16px 14px;
  font-size: calc(14px * var(--text-scale, 1)); }
.vf-pop.vf-sheet { left: 8px; right: 8px; width: auto; max-width: none;
  max-height: calc(100vh - 160px); box-shadow: 0 -6px 30px rgba(16, 40, 60, .22);
  font-size: calc(15px * var(--text-scale, 1)); }
.vf-head { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.vf-title { font-weight: 600; font-size: calc(15px * var(--text-scale, 1)); }
.vf-sheet .vf-title { font-size: calc(17px * var(--text-scale, 1)); }
.vf-clear { margin-left: auto; border: 0; background: none; padding: 4px 6px; cursor: pointer; font: inherit;
  font-size: calc(13px * var(--text-scale, 1)); color: var(--accent); font-weight: 500; border-radius: var(--r-control, 6px); }
.vf-clear:hover { background: var(--accent-soft); }
.vf-clear[hidden] { display: none; }
.vf-x { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 1px solid var(--line-strong, #c9d3dc); background: var(--surface, #fff); color: var(--ink-2);
  border-radius: var(--r-control, 8px); cursor: pointer; }
.vf-clear:not([hidden]) + .vf-x { margin-left: 4px; }
.vf-clear[hidden] + .vf-x, .vf-title + .vf-x { margin-left: auto; }
.vf-sum { color: var(--ink-3, #5b6b78); font-size: calc(13px * var(--text-scale, 1)); margin-top: 2px; }
.vf-body { overflow: auto; min-height: 0; }
.vf-lb { margin: 14px 0 6px; font-size: calc(12px * var(--text-scale, 1)); font-weight: 600; color: var(--ink-3, #5b6b78); }
.vf-seg { display: flex; width: 100%; }
.vf-seg button { flex: 1 1 0; justify-content: center; }
.vf-select { width: 100%; max-width: none; }
.vf-steps { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
/* S246 (his ruling, 3 Dec 2026, "Use switches"): the View box's switches -
   words on the left, the switch on the right; filled track when on (pick 2 A) */
.vf-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 34px;
    padding: 0 2px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.vf-sw-words { min-width: 0; }
.vf-sw { position: relative; flex: none; width: 44px; height: 24px; border-radius: var(--r-round, 12px); background: var(--line-strong, #c3ccd3); transition: background 0.15s; }
.vf-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.vf-switch-row[aria-checked="true"] .vf-sw { background: var(--accent); }
.vf-switch-row[aria-checked="true"] .vf-sw::after { transform: translateX(20px); }
.vf-switch-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-control, 8px); }
.vf-sheet .vf-tick { min-height: 44px; }
.vf-sheet .vf-seg, .vf-sheet .vf-select { height: 44px; }
.vf-sheet .vf-seg button { font-size: calc(15px * var(--text-scale, 1)); }
/* the small square count box: on the Filter button, and on More on a phone */
.vf-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: calc(var(--r-control, 8px) / 2); background: var(--accent, #1f6f8b); color: var(--on-accent, #fff);
  font-size: calc(11px * var(--text-scale, 1)); font-weight: 700; line-height: 1; }
.vf-has-count { position: relative; }
/* S246 (his pick A): the Planner Filter button turns the main colour while a filter is on, as on Bookings and payments */
.vf-on { background: var(--accent-soft); color: var(--accent); }
.tb-btn.vf-on { border-color: var(--accent); }
.vf-has-count > .vf-count { position: absolute; top: 2px; right: 2px; pointer-events: none; }
/* "Filter on: To book only - Show everything": a filter that is on always shows */
.vf-line { display: flex; align-items: center; gap: 8px; font-size: calc(13px * var(--text-scale, 1)); font-weight: 600;
  color: var(--accent, #1f6f8b); background: var(--accent-soft, #e6f1f5); border-radius: var(--r-control, 8px);
  padding: 4px 4px 4px 12px; margin: 6px 0; min-height: 36px; }
.vf-line .vf-line-words { min-width: 0; }
.vf-line svg { flex: none; width: 16px; height: 16px; }
@media (pointer: coarse) { .vf-line { min-height: 44px; } .vf-line .vf-clear { min-height: 44px; } }
/* a row or day the filter leaves out (the Itinerary and At a glance) */
.vf-out { display: none !important; }
.vf-none { padding: 16px; color: var(--ink-3, #5b6b78); }
#tbTabs .vf-has-count > .vf-count { top: 4px; right: 4px; }
/* the Planner: the count at the end of a row with words (side menu, More);
   on the corner when the side menu is folded to icons */
.vf-count-row { margin-left: auto; flex: none; }
.tb-rail-item[data-tb="filter"] { position: relative; }
.tb-rail-folded .tb-rail-item > .vf-count-row { position: absolute; top: 2px; right: 2px; margin: 0; }
/* the Planner's "Filter on" line: first in the top bar on a computer ... */
.tb-right > .vf-line { margin: 0 6px 0 0; white-space: nowrap; max-width: 420px; flex: none; }
.tb-right > .vf-line .vf-line-words { overflow: hidden; text-overflow: ellipsis; }
/* ... and just under the top bar on an upright phone */
.vf-line.vf-line-fixed { position: fixed; left: 8px; right: 8px; z-index: 1100; margin: 0;
  box-shadow: 0 4px 14px rgba(16, 40, 60, .16); }
body.vf-line-on .calendar-container { padding-top: calc(var(--vf-line-h, 52px) + 12px); }

/* ═══════════════════════════════════════════════════════════════════════
 * THE CALENDAR VIEW ON A PHONE — Session 247 (his pick C, 4 Dec 2026).
 * phone-calendar.js draws the strip and the month grid; phone-views.js
 * owns the choice (Day, 3 days, Week, Month) and the body classes
 * (pv-cal, pv-cal-month). Sizes and corners come from the rule book
 * (design-system.css): controls --ctl-h tall, the skin's corner, nothing
 * fully round but the person circle, the switch and the "i".
 * ═══════════════════════════════════════════════════════════════════════ */
.pv-strip { flex: none; background: var(--surface); border-bottom: 1px solid var(--line); font-family: var(--font-body); -webkit-user-select: none; user-select: none; }
.pv-strip-top { display: flex; align-items: center; gap: 4px; padding: 0 4px; }
.pv-strip-title {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; min-height: var(--ctl-h); padding: 0 8px;
    border: 0; border-radius: var(--r-control); background: none; color: var(--ink); font: inherit;
    font-size: var(--text-md); line-height: var(--lh-md); font-weight: 700; text-align: left; cursor: pointer;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.pv-strip-title svg { width: 16px; height: 16px; flex: none; color: var(--ink-2); }
/* his round 2: the month's short name rides the calendar button ("DEC") */
.pv-strip-month { display: flex; align-items: center; gap: 4px; text-transform: uppercase; letter-spacing: .3px; min-width: var(--ctl-h); height: var(--ctl-h); padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--text-sm); font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pv-strip-month svg { width: 20px; height: 20px; flex: none; }
.pv-strip-month[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.pv-strip-days { display: flex; padding: 0 2px; touch-action: pan-x; }
.pv-sd {
    flex: 1; min-width: 0; min-height: var(--ctl-h); padding: 2px 0 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    border: 0; border-radius: var(--r-control); background: none; color: var(--ink-2); font: inherit; cursor: pointer;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.pv-sd-w { font-size: var(--text-2xs); line-height: var(--lh-2xs); text-transform: uppercase; letter-spacing: .3px; }
.pv-sd-n { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: var(--text-md); font-weight: 600; color: var(--ink); border-radius: var(--r-control); }
.pv-sd--on .pv-sd-n { background: var(--accent); color: var(--on-accent, #fff); }
.pv-sd--out { opacity: .35; cursor: default; }
/* a date lived twice: "Day 1" and "again" under the two numbers */
.pv-sd-d { font-size: var(--text-2xs); line-height: var(--lh-2xs); color: var(--ink-2); white-space: nowrap; }
.pv-sd-p { width: 22px; height: 4px; border-radius: 2px; background: var(--pc, transparent); }
/* the handle: pull it (or the days) down and the month grid opens */
.pv-strip-handle { height: 12px; display: flex; align-items: center; justify-content: center; }
.pv-strip-handle::after { content: ""; width: 36px; height: 4px; border-radius: 2px; background: var(--line-strong); }
/* the month grid: dropped over the calendar from the strip, or the whole view */
.pv-month { position: fixed; left: 0; right: 0; z-index: 1200; display: flex; flex-direction: column; background: var(--surface); font-family: var(--font-body); padding: 4px 8px 10px; overflow: auto; -webkit-user-select: none; user-select: none; }
.pv-month--drop { border-bottom: 1px solid var(--line); border-radius: 0 0 var(--r-modal) var(--r-modal); box-shadow: 0 12px 32px rgba(0,0,0,.16); }
.pv-month-head { display: flex; align-items: center; justify-content: space-between; min-height: var(--ctl-h); font-size: var(--text-md); font-weight: 700; color: var(--ink); }
.pv-month-head button { width: var(--ctl-h); height: var(--ctl-h); border: 0; border-radius: var(--r-control); background: none; color: var(--ink); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pv-month-head button svg { width: 20px; height: 20px; }
.pv-month-head button:disabled { opacity: .3; cursor: default; }
.pv-mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.pv-month--full .pv-mgrid { flex: 1; grid-auto-rows: minmax(44px, 1fr); }
.pv-mw { text-align: center; font-size: var(--text-2xs); line-height: var(--lh-2xs); color: var(--ink-2); text-transform: uppercase; padding: 2px 0 4px; }
.pv-md {
    min-width: 0; min-height: var(--ctl-h); padding: 4px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; overflow: hidden;
    border: 0; border-radius: var(--r-control); background: none; color: var(--ink); font: inherit; font-size: var(--text-sm); cursor: default;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.pv-md--trip { background: var(--accent-soft); cursor: pointer; }
.pv-md--on { background: var(--accent); color: var(--on-accent, #fff); }
.pv-md--out { color: var(--ink-3); }
.pv-md-n { font-weight: 600; line-height: var(--lh-sm); }
.pv-month--full .pv-md--trip { align-items: stretch; text-align: left; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--pc, var(--line)); }
.pv-month--full .pv-md--on { background: var(--accent-soft); color: var(--ink); border-color: var(--accent); }
/* his round 2: Google's look - a small coloured chip per booking, "+2 more" past three;
   a chip's words are whole words that fit (phone-calendar.js fitChips), never dots */
.pv-md-chips { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-chip { display: block; min-height: 14px; padding: 1px 3px; border-radius: 3px; border-left: 3px solid var(--kc, var(--accent)); background: color-mix(in srgb, var(--kc, var(--accent)) 18%, var(--surface)); color: var(--ink); font-size: var(--text-2xs); line-height: var(--lh-2xs); font-weight: 600; white-space: nowrap; overflow: hidden; }
.pv-chip--bare { padding: 0; min-height: 8px; }
.pv-md-more { font-size: var(--text-2xs); line-height: var(--lh-2xs); color: var(--ink-2); padding-left: 3px; }
/* the month view covers the frame; the canvas keeps painting under it so nothing else changes */
/* the day rail runs down the right edge from under the strip: the strip keeps clear of it (DayRail.ROOM) */
body.pv-rail .pv-strip { padding-right: 26px; }
body.pv-cal-month .calendar-grid-container { visibility: hidden; }
body.pv-cal-month .dr-rail, body.pv-cal-month .dr-label { display: none; }

/* S248 (his pick A + the blue rings, 5 Dec 2026): WHAT THE OTHERS CHANGED
   (static/js/group-news.js). The count on the envelope is the Filter badge
   (.vf-count). Only the person circle is fully round (STYLE_RULES.md). */
.gn-new { display: flex; flex-direction: column; gap: 6px; }
.gn-head { font-size: calc(11px * var(--text-scale, 1)); font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent, #1f6f8b); margin: 2px 0; }
.gn-head.gn-earlier { color: var(--ink-3, #777); margin-top: 8px; }
.gn-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: var(--tap, 44px); padding: 8px 12px;
  border: 0; border-radius: var(--r-control, 8px); background: var(--accent-soft, #e6f1f5); color: inherit;
  font-family: inherit; text-align: left; cursor: pointer; }
.gn-row:hover { filter: brightness(.97); }
.gn-row:focus-visible { outline: 2px solid var(--accent, #1f6f8b); outline-offset: 2px; }
.gn-person { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--person-md, 32px);
  height: var(--person-md, 32px); border-radius: 50%; border: 2px solid var(--accent, #1f6f8b);
  background: var(--surface, #fff); color: var(--accent, #1f6f8b); font-weight: 700; font-size: calc(13px * var(--text-scale, 1)); }
.gn-words { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gn-line { font-weight: 600; font-size: calc(14px * var(--text-scale, 1)); color: var(--ink, #222); line-height: 1.3; }
.gn-sub { font-size: calc(12px * var(--text-scale, 1)); color: var(--ink-3, #666); }
.gn-go { flex: none; font-size: 22px; line-height: 1; color: var(--accent, #1f6f8b); }
.gn-ring { position: absolute; pointer-events: none; z-index: 50; border: 3px solid var(--accent, #2b7f90);
  border-radius: 8px; box-shadow: 0 0 0 4px rgba(43, 127, 144, .18); }
.gn-cardline { display: flex; align-items: center; gap: 8px; margin: 8px 0 2px; padding: 6px 10px; min-height: 36px;
  border-radius: var(--r-control, 8px); background: var(--accent-soft, #e6f1f5); color: var(--accent, #1f6f8b);
  font-weight: 600; font-size: calc(13px * var(--text-scale, 1)); text-decoration: none; }
.gn-cardline svg { width: 16px; height: 16px; flex: none; }
.gn-cardline .vf-count { margin-left: auto; }
