/* ============================================================
   Latch & Lantern :: APPLICATION SHELL

   Ported from reference/dannycaplan-main.html lines 375-3232, MINUS the
   local music player (1332-1740) and local video player (1742-1916):
   Latch & Lantern hosts no media (see the media decision in the build plan), so
   those two engines and their chrome are gone. What survives is the
   sidebar, header, quote banner, card deck, widget engine, modal, the
   section bodies and the settings module.

   Every colour here is a var() from theme.css. The 13 hard-coded
   rgba(255,255,255,...) white overlays are now --overlay-1 / --overlay-2,
   and the two inline #4caf50 buttons in the reference markup are the
   .btn-affirm class below.
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    background: var(--bg-void);
}

/* Keyboard focus fallback. :where() carries zero specificity, so any component
   rule with its own :focus-visible ring still wins. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--toxic);
    outline-offset: 2px;
}

/* Skip link: hidden until it takes focus, then a pill at top-left. */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    background: var(--bg-panel);
    color: var(--toxic);
    border: 1px solid var(--toxic);
    padding: 10px 16px;
    font-family: var(--font-mono);
    font-size: .8rem;
    font-weight: 700;
    text-decoration: none;
}
.skip-link:focus { left: 0; }
.main-area:focus { outline: none; }

body {
    background-color: var(--bg-void);
    /* per-theme background recipe (camo blocks / scanlines / tribal linework) */
    background-image: var(--bg-body-pattern);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 14px;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    padding-left: var(--sidebar-w);
}

/* ---------- Display modes (Settings › You › Display; js/display.js) ----------
   A property of the SCREEN, not of the member (localStorage `displayV1`). The tokens
   here shape the deck on a 1280x800 / 1920x1080 wall frame; the per-mode rules below
   add the same sidebar / readout / quote-banner overrides the @media block at line
   ~4699 applies on a phone, so a frame reads exactly like a bigger phone. CSS nesting
   is unavailable on the target Android WebView 106: rule lists are flat. */
:root { --deck-min: 340px; --deck-gap: 16px; }
html[data-display="frame10"] { font-size: 17px; --deck-min: 380px; --deck-gap: 14px; }
html[data-display="frame15"] { font-size: 18px; --deck-min: 420px; --deck-gap: 20px; }
html[data-display="frame10"] body, html[data-display="frame15"] body { font-size: 15px; }

/* Compact shell — sidebar off-canvas, nav-toggle visible, no readouts. Applied on
   phone AND both frame modes (a frame has no room for a sidebar either). */
html[data-display="phone"] body,
html[data-display="frame10"] body,
html[data-display="frame15"] body { padding-left: 0; padding-top: 62px; }

html[data-display="phone"] .nav-toggle,
html[data-display="frame10"] .nav-toggle,
html[data-display="frame15"] .nav-toggle { display: flex; align-items: center; justify-content: center; }

html[data-display="phone"] .sidebar,
html[data-display="frame10"] .sidebar,
html[data-display="frame15"] .sidebar { transform: translateX(-100%); transition: transform .25s ease; width: 260px; }

html[data-display="phone"] body.nav-open .sidebar,
html[data-display="frame10"] body.nav-open .sidebar,
html[data-display="frame15"] body.nav-open .sidebar { transform: translateX(0); }

html[data-display="phone"] .hub-readouts,
html[data-display="frame10"] .hub-readouts,
html[data-display="frame15"] .hub-readouts { display: none; }

html[data-display="phone"] .hub-title,
html[data-display="frame10"] .hub-title,
html[data-display="frame15"] .hub-title { padding-left: 46px; }

/* Phone-only: full-width compact card, no fixed column count. */
html[data-display="phone"] .main-area { padding: 10px 12px 50px; }
html[data-display="phone"] .grid-deck { grid-template-columns: 1fr; grid-auto-rows: minmax(300px, auto); }
html[data-display="phone"] .section { grid-column: auto !important; grid-row: auto !important; }
html[data-display="phone"] .hub-header-inner { padding: 12px; }
html[data-display="phone"] .hub-title { font-size: 1rem; letter-spacing: 2px; }
html[data-display="phone"] .quote-display-header { padding: 16px 12px 14px; }
html[data-display="phone"] .quote-author-header { text-align: left; }
html[data-display="phone"] .section.expanded { width: 96vw !important; max-height: 88vh !important; padding: 30px 14px 20px !important; }

/* Frame modes keep the sidebar overrides above, the multi-column grid the tokens
   define, and the quote banner (10.1" only hides it; 15.6" has room for it). */
html[data-display="frame10"] .daily-quote-header { display: none; }
html[data-display="frame10"] .main-area,
html[data-display="frame15"] .main-area { padding: 12px 14px 40px; }

/* Frame-only header tightening (round 2, 2026-10-14): on 1280x800 / 1920x1080 the
   62px reserved strip + the default 14px header padding put the deck's first row
   far enough down that only one and a half rows of cards fit. Phone keeps the
   strips above unchanged — a phone-sized card at phone padding already reads
   right; this is purely the wall-frame problem. The grouped selector above wins
   on the body itself; these later rules (same specificity) only fill in the
   bits frame-only needs. */

/* Drop the body's reserved top strip on frame modes; this rule must follow the
   grouped phone/frame rule above so it wins by order. The fixed #nav-toggle now
   overlaps the header's top-left corner — that is intentional; padding-left: 46px
   on .hub-title already reserves the room. */
html[data-display="frame10"] body,
html[data-display="frame15"] body { padding-top: 0; }

/* Sit the toggle just inside the header's left edge — its default top:10/left:10
   puts the corner of the box over the strip / outer border when padding-top is
   gone, so nudge it down 8 and right 12 to clear the stripe and align with the
   title baseline. Phone keeps its default (no second rule = default wins). */
html[data-display="frame10"] .nav-toggle,
html[data-display="frame15"] .nav-toggle { top: 18px; left: 22px; }

/* Tighter header padding and a slightly bigger title: at 800px tall, every row
   matters, and the default 14px/18px header-inner padding reads generous. */
html[data-display="frame10"] .hub-header-inner,
html[data-display="frame15"] .hub-header-inner { padding: 8px 14px; }
html[data-display="frame10"] .hub-title,
html[data-display="frame15"] .hub-title { font-size: 1.35rem; letter-spacing: 2px; }
html[data-display="frame10"] .hub-subline,
html[data-display="frame15"] .hub-subline { font-size: .7rem; }

/* frame15 keeps the quote banner (unlike frame10), but at 1920x1080 the default
   padding leaves a lot of dead air above the deck; tighten it. */
html[data-display="frame15"] .quote-display-header { padding: 10px 14px 8px; }

/* ---------- Today view (js/today.js) ----------
   A wall-frame default view: clock + date, weather, who's around, next-up hero with a
   countdown, a rotating album photo, one column per member, shopping and today's
   events. The view lives in <main.main-area> right before the deck; opening it adds
   `body.today-open`, the rule below hides the deck/header and shows the view.

   CSS nesting is unavailable on the target Android WebView 106, so every selector is
   flat. Tokens only — no colour literals; contrast-check.js verifies the dim text on
   each end of the card gradient. The "today" nav item lives in the registry's regular
   rail; the body class is the switch. */
body.today-open #grid-deck > .section:not(.expanded),
body.today-open .hub-header,
body.today-open .daily-quote-header { display: none; }
body.today-open #today-view { display: grid; }
.today-view { padding: 8px 4px 24px; display: grid; grid-template-columns: 2fr 1.2fr 1fr; gap: var(--deck-gap); }
.today-view[hidden] { display: none; }
.today-view .today-clock { grid-column: 1; grid-row: 1; }
.today-view .today-weather { grid-column: 2; grid-row: 1; }
.today-view .today-around { grid-column: 3; grid-row: 1; }
.today-view .today-hero { grid-column: 1 / span 2; grid-row: 2; }
.today-view .today-photo { grid-column: 3; grid-row: 2; min-height: 220px; overflow: hidden; }
.today-view .today-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.today-view .today-people { grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--deck-gap); }
.today-view .today-shopping { grid-column: 1 / span 1; grid-row: 4; }
.today-view .today-events { grid-column: 2 / span 2; grid-row: 4; }
.today-cell {
    background: linear-gradient(180deg, var(--bg-panel-2), var(--bg-panel));
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 12px 14px;
}
/* The people strip is a grid of cells, not a cell itself (it carries .today-cell for the
   frame's clipping rules only). */
.today-view .today-people { background: transparent; border: none; padding: 0; }
.today-clock-time {
    font-family: var(--font-data);
    font-size: 4.5rem;
    line-height: 1;
    color: var(--text);
}
.today-clock-date { color: var(--text-dim); margin-top: 6px; font-size: 0.95rem; }
.today-hero {
    background: var(--toxic);
    color: var(--on-accent);
    border-color: var(--toxic);
}
.today-hero-title { font-family: var(--font-stencil); font-size: 2.4rem; line-height: 1.1; }
.today-hero-when { font-size: 0.95rem; margin-top: 4px; }
.today-hero-countdown { font-family: var(--font-data); font-size: 4rem; line-height: 1; margin-top: 10px; }
.today-back {
    background: rgba(var(--toxic-rgb), 0.07);
    border: 1px solid var(--toxic-dim);
    color: var(--toxic);
    cursor: pointer;
    font-family: var(--font-stencil);
    font-size: 0.68rem;
    letter-spacing: 1.4px;
    padding: 6px 10px;
    border-radius: 8px;
}
.today-back:hover { background: rgba(var(--toxic-rgb), 0.16); }
.today-weather-now { display: flex; align-items: center; gap: 10px; }
.today-weather-icon { font-size: 1.6rem; }
.today-weather-temp { font-size: 1.4rem; font-weight: 700; line-height: 1.1; }
.today-weather-label { font-size: 0.78rem; color: var(--text-dim); }
.today-weather-strip { display: flex; gap: 4px; margin-top: 8px; }
.today-weather-dn { font-size: 0.7rem; color: var(--text-dim); }
.today-weather-de { font-size: 0.95rem; }
.today-weather-dt { font-size: 0.7rem; font-weight: 600; }
.today-weather-day {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 6px 2px;
    border-radius: 8px;
    background: var(--bg-track);
}
.today-person-head { font-family: var(--font-stencil); font-size: 0.95rem; letter-spacing: 1.4px; font-weight: 400; margin: 0; }
.today-person-meta { font-size: 0.7rem; color: var(--text-dim); margin-bottom: 6px; }
.today-person-list { list-style: none; padding: 0; margin: 0; }
.today-person-list li { padding: 2px 0; font-size: 0.85rem; }
.today-person-list li.done { text-decoration: line-through; color: var(--text-dimmer); }
.today-person-empty { color: var(--text-dim); font-size: 0.85rem; padding: 4px 0; }
.today-person-rides { margin-top: 6px; }
.today-person-list li.today-ride-line { font-size: 0.78rem; color: var(--text-dim); }
.today-cell-btn {
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    padding: 0;
}
.today-cell-btn:focus-visible { outline: 1px solid var(--toxic-dim); outline-offset: 2px; }
.today-photo { position: relative; }
.today-photo img { background: var(--bg-panel); }
.today-photo-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 6px 10px;
    background: var(--bg-panel);
    font-size: 0.78rem;
    color: var(--text-dim);
}
.today-shopping-count { font-family: var(--font-data); font-size: 2.2rem; line-height: 1; }
.today-cell-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; gap: 8px; }
/* Cell titles are <h2> (headings to jump between); the clickable ones hold a .today-cell-btn
   that inherits this look. */
.today-cell-title { font-family: var(--font-stencil); font-size: 0.78rem; letter-spacing: 1.4px; color: var(--text-dim); font-weight: 400; margin: 0; }
.today-around-empty { color: var(--text-dim); font-size: 0.85rem; padding: 4px 0; }
.today-around-caption { font-size: 0.7rem; color: var(--text-dim); margin-top: 4px; }

/* A single-column layout on narrow viewports so a phone still reads the view top-to-bottom.
   Never on a frame: a 1280x800 panel whose WebView reports a devicePixelRatio of 1.5 is
   853 CSS px wide, and the frame layout must not fall into the phone column there. */
@media (max-width: 900px) {
    html:not([data-display="frame10"]):not([data-display="frame15"]) .today-view { grid-template-columns: 1fr; }
    html:not([data-display="frame10"]):not([data-display="frame15"]) .today-view .today-clock,
    html:not([data-display="frame10"]):not([data-display="frame15"]) .today-view .today-weather,
    html:not([data-display="frame10"]):not([data-display="frame15"]) .today-view .today-around,
    html:not([data-display="frame10"]):not([data-display="frame15"]) .today-view .today-hero,
    html:not([data-display="frame10"]):not([data-display="frame15"]) .today-view .today-photo,
    html:not([data-display="frame10"]):not([data-display="frame15"]) .today-view .today-shopping,
    html:not([data-display="frame10"]):not([data-display="frame15"]) .today-view .today-events { grid-column: 1; }
    html:not([data-display="frame10"]):not([data-display="frame15"]) .today-view .today-clock { grid-row: 1; padding-left: 64px; }
    html:not([data-display="frame10"]):not([data-display="frame15"]) .today-view .today-weather { grid-row: 2; }
    html:not([data-display="frame10"]):not([data-display="frame15"]) .today-view .today-around { grid-row: 3; }
    html:not([data-display="frame10"]):not([data-display="frame15"]) .today-view .today-hero { grid-row: 4; }
    html:not([data-display="frame10"]):not([data-display="frame15"]) .today-view .today-photo { grid-row: 5; }
    html:not([data-display="frame10"]):not([data-display="frame15"]) .today-view .today-people { grid-row: 6; }
    html:not([data-display="frame10"]):not([data-display="frame15"]) .today-view .today-shopping { grid-row: 7; }
    html:not([data-display="frame10"]):not([data-display="frame15"]) .today-view .today-events { grid-row: 8; }
}

/* Phone mode forces the same single-column Today at ANY width, as the deck does
   (html[data-display="phone"] above): a phone held sideways is still a phone. */
html[data-display="phone"] .today-view { grid-template-columns: 1fr; }
html[data-display="phone"] .today-view .today-clock,
html[data-display="phone"] .today-view .today-weather,
html[data-display="phone"] .today-view .today-around,
html[data-display="phone"] .today-view .today-hero,
html[data-display="phone"] .today-view .today-photo,
html[data-display="phone"] .today-view .today-shopping,
html[data-display="phone"] .today-view .today-events { grid-column: 1; }
html[data-display="phone"] .today-view .today-clock { grid-row: 1; }
html[data-display="phone"] .today-view .today-weather { grid-row: 2; }
html[data-display="phone"] .today-view .today-around { grid-row: 3; }
html[data-display="phone"] .today-view .today-hero { grid-row: 4; }
html[data-display="phone"] .today-view .today-photo { grid-row: 5; }
html[data-display="phone"] .today-view .today-people { grid-row: 6; }
html[data-display="phone"] .today-view .today-shopping { grid-row: 7; }
html[data-display="phone"] .today-view .today-events { grid-row: 8; }

/* frame10 (1280x800): tighten so the whole view fits without scrolling. */
html[data-display="frame10"] .today-view .today-clock-time { font-size: 3.8rem; }
html[data-display="frame10"] .today-view .today-hero-title { font-size: 2rem; }
html[data-display="frame10"] .today-view .today-hero-countdown { font-size: 3.2rem; }
html[data-display="frame10"] .today-view .today-photo { min-height: 180px; }
html[data-display="frame10"] .today-view .today-shopping-count { font-size: 1.8rem; }

/* frame15 (1920x1080): roomier than auto, larger hero/clock for the bigger wall. */
html[data-display="frame15"] .today-view .today-clock-time { font-size: 5.5rem; }
html[data-display="frame15"] .today-view .today-hero-title { font-size: 3rem; }
html[data-display="frame15"] .today-view .today-hero-countdown { font-size: 5rem; }
html[data-display="frame15"] .today-view .today-photo { min-height: 300px; }

/* A wall frame never scrolls and nobody touches it, so Today must FIT, whatever the
   member count. (2026-10-14: eight members wrapped a 150px-minimum people row on a
   1280x800 frame and pushed Shopping and Events below the bottom edge.)
   - <main> becomes a 100vh column with no vertical padding and the view takes all of
     it (exactly 100vh unless a banner in #fc-banner-host — billing, lock, the demo
     ribbon — sits above it, which it then shares with), with `overflow: hidden`. 100vh, not dvh: WebView 106.
   - The hero rows (clock/weather/around, next up/photo) keep their content height
     (`auto`, and nothing in them may grow with the data — see below). The lists row
     is minmax(0, auto): Shopping and Events are capped lists of one-line items, so
     their height is bounded and they show in full. The people strip is minmax(0, 1fr)
     and takes whatever is left, so a crowded strip squeezes instead of growing.
     (A 1fr/1fr or 2fr/1fr split was measured first: at 1280x800 it cut Shopping
     mid-list with eight members.) When today.js marks the view `data-crowded`, it
     also balances the strip into rows (inline grid-template-columns) and shortens
     every list (peopleLayout) so the rows fit; here the meta line goes and the
     column padding tightens.
   - Every cell clips its own overflow; names and list lines are one line, ellipsised.
   - The photo's min-height sets the next-up row: 180px on frame10 (above), 300px on
     frame15, which is the height the row had before the photo was size-contained.

   People columns: repeat(auto-fit, minmax(N, 1fr)). Usable width W = viewport − <main>
   side padding (2 × 14) − view side padding (2 × 4) = viewport − 36; with C columns
   and the view's --deck-gap G (the editorial look, 2026-10-16: 10px on frame10, 14px on
   frame15 — see below), C fit when C × N + (C − 1) × G ≤ W. N leaves room for a 10px
   scrollbar should one ever appear, and is small enough that C + 1 never fits:
     frame10: W = 1280 − 36 = 1244, G = 10. C = 10: N ≤ (1244 − 10 − 9×10) / 10 = 114.4
              → N = 114 (10 × 114 + 90 = 1230; 11 columns would need 1354).
     frame15: W = 1920 − 36 = 1884, G = 14. C = 14: N ≤ (1884 − 10 − 13×14) / 14 = 120.9
              → N = 120 (14 × 120 + 182 = 1862; 15 columns would need 1996).
   With the glyph rail on (#today-view[data-nav="rail"]) the wall is 80px narrower —
   1200 / 1840 — so W = 1164 / 1804 and the same N and G hold one column fewer:
     frame10: C = 9  (9 × 114 + 80 = 1106 ≤ 1154; 10 columns would need 1230 > 1164).
     frame15: C = 13 (13 × 120 + 168 = 1728 ≤ 1794; 14 columns would need 1862 > 1804).
   Those C are PEOPLE_ONE_ROW / PEOPLE_ONE_ROW_RAIL in js/today.js (10 / 14, 9 / 13), and
   N and G are its FRAME_COL (and RAIL_W the 80) — change them together. today.js uses
   the smaller of C and what the real width holds, so a WebView at devicePixelRatio 1.5
   (853 CSS px) counts 6 a row on frame10, with the rail or without. At N the column's text box
   is N − 2 × 8 padding − 1 hairline = 97 / 103px: a name of ~8 characters, then an
   ellipsis. The chore ring (36px; 28px on a crowded chores-only strip) shares the
   name's line, and the name gives way to it (ellipsis) on the narrowest columns.

   The SPARSE wall (#today-view[data-layout="sparse"], wallLayout in today.js): a hub
   with chores and rides off (or the frame settings' "Everyone's day" unticked) has no
   people strip, so the rows above would be clock row / next-up row / an EMPTY 1fr row /
   the lists row — a huge hole in the middle of the frame (Dan's 10.1" frame,
   2026-10-15). There the grid is three rows, `auto auto minmax(0, 1fr)`, and the photo
   is the hero:
     row 1 (auto)            clock · weather · who's around, exactly as above
     row 2 (auto)  cols 1–2  the photo, spanning rows 2–3  |  col 3  Next up
     row 3 (1fr)             (the photo, continued)        |  col 3  Today's events
   The photo is size-contained (below) and drops its min-height, so it adds nothing to
   any row: row 2 is Next up's content height and row 3 is whatever is left. The view is
   exactly 100vh and every row is auto-or-less, so nothing can push past the bottom edge:
   at 1280x800, 800 − 10 − 34 padding (top, bottom: see the pill below) − 2 × 14 gaps
   = 728px for the three rows, about
   165px for row 1 and 190px for Next up, leaving ~370px for events, which at LIST_CAP
   (four lines and "+N more", ~170px) fits with room; 1920x1080 has more of everything.
   Next up's type steps down a size there because column 3 is the narrow 1fr column.
   today.js marks what a sparse wall lacks once the cells have painted:
     data-no-photo   (photos off, or an empty album)  Next up spans cols 1–2 of row 2 and
                     events spans cols 1–3 of row 3.
     data-no-agenda  (no Next up and no events: calendar and rides off)  the photo spans
                     cols 1–3 and rows 2–3. Row 2 is then empty, so it is 0px tall.
     data-shopping   (Shopping shows on a sparse wall)  column 3 becomes Next up (auto) /
                     Shopping (auto) / Today's events (1fr): four rows, `auto auto auto
                     minmax(0, 1fr)`, the photo spanning rows 2–4 of columns 1–2. At
                     1280x800: 728 − 14 for the extra gap = 714px. Measured worst case
                     (no banner): 195 clock row with the four-day strip, 226 Next up
                     with a two-line ride title and its countdown wrapped in the narrow
                     column, which left 111px for events and clipped its last line and
                     "+N more" at the ordinary caps. So on frame10 this wall caps
                     Shopping at 2 and events at 3 (SPARSE_SHOPPING_CAPS in today.js):
                     161 Shopping, and events' 132 hold three lines and "+N more" with
                     4px to spare. 1920x1080 keeps the ordinary caps. The same
                     marker reshapes the two variants so no 1fr row is ever left empty:
                     with no photo, Shopping takes column 3 beside Next up (row 2) and
                     events the full width below; with no agenda, Shopping fills column
                     3 from row 2 down beside the photo; with neither, Shopping takes
                     the whole lower wall.
   None of these attributes means anything outside a sparse wall, and today.js only
   sets them inside one. A full wall is untouched by every rule here.

   "Open the hub" leaves the clock card on a frame: a small translucent pill in the
   bottom-left corner of the view (absolute; the view is `position: relative`), dim text,
   a hairline and no glow. It sits in a 34px strip of its own under the bottom row of
   cells on EVERY frame wall, full and sparse: the view's bottom padding is 34px, and the
   last row (minmax(0, 1fr) people on a full wall, row 3 on a sparse one) pays for it.
   (Until 2026-10-16 the full wall kept a 10px padding and counted on the cells' own
   bottom padding to hold a 22px pill; with the demo's 70px banner, Shopping's last row
   ended in that padding and the pill sat on its bottom edge at 1280x800.) The pill is
   28px tall, 3px off the edge; its tap target is 44px tall and at least 44 wide (an
   invisible ::after reaching 13px up — into the strip and the bottom cell's padding,
   never its words). The button stays inside the clock cell in the DOM, so the focus
   order is unchanged; the clock cell's `overflow: hidden` does not clip it because its
   containing block is the view, not the cell. With the glyph rail on (nav = 'rail') the
   pill is not drawn at all and the strip goes with it. */
html[data-display="frame10"] body.today-open .main-area,
html[data-display="frame15"] body.today-open .main-area { display: flex; flex-direction: column; height: 100vh; min-height: 0; padding-top: 0; padding-bottom: 0; }
html[data-display="frame10"] body.today-open #today-view,
html[data-display="frame15"] body.today-open #today-view {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 10px 4px 34px;
    grid-template-rows: auto auto minmax(0, 1fr) minmax(0, auto);
}
/* The sparse wall (see the arithmetic above). */
html[data-display="frame10"] body.today-open #today-view[data-layout="sparse"],
html[data-display="frame15"] body.today-open #today-view[data-layout="sparse"] { grid-template-rows: auto auto minmax(0, 1fr); }
html[data-display="frame10"] #today-view[data-layout="sparse"] .today-photo,
html[data-display="frame15"] #today-view[data-layout="sparse"] .today-photo { grid-column: 1 / span 2; grid-row: 2 / span 2; min-height: 0; }
html[data-display="frame10"] #today-view[data-layout="sparse"] .today-hero,
html[data-display="frame15"] #today-view[data-layout="sparse"] .today-hero { grid-column: 3; grid-row: 2; }
html[data-display="frame10"] #today-view[data-layout="sparse"] .today-events,
html[data-display="frame15"] #today-view[data-layout="sparse"] .today-events { grid-column: 3; grid-row: 3; }
html[data-display="frame10"] #today-view[data-layout="sparse"][data-no-photo="true"] .today-hero,
html[data-display="frame15"] #today-view[data-layout="sparse"][data-no-photo="true"] .today-hero { grid-column: 1 / span 2; }
html[data-display="frame10"] #today-view[data-layout="sparse"][data-no-photo="true"] .today-events,
html[data-display="frame15"] #today-view[data-layout="sparse"][data-no-photo="true"] .today-events { grid-column: 1 / -1; }
html[data-display="frame10"] #today-view[data-layout="sparse"][data-no-agenda="true"] .today-photo,
html[data-display="frame15"] #today-view[data-layout="sparse"][data-no-agenda="true"] .today-photo { grid-column: 1 / -1; }
/* A sparse wall with Shopping (data-shopping; see the arithmetic above). More attribute
   selectors than the rules above, so these win wherever both match. */
html[data-display="frame10"] body.today-open #today-view[data-layout="sparse"][data-shopping="true"],
html[data-display="frame15"] body.today-open #today-view[data-layout="sparse"][data-shopping="true"] { grid-template-rows: auto auto auto minmax(0, 1fr); }
html[data-display="frame10"] #today-view[data-layout="sparse"][data-shopping="true"] .today-photo,
html[data-display="frame15"] #today-view[data-layout="sparse"][data-shopping="true"] .today-photo { grid-row: 2 / span 3; }
html[data-display="frame10"] #today-view[data-layout="sparse"][data-shopping="true"] .today-shopping,
html[data-display="frame15"] #today-view[data-layout="sparse"][data-shopping="true"] .today-shopping { grid-column: 3; grid-row: 3; }
html[data-display="frame10"] #today-view[data-layout="sparse"][data-shopping="true"] .today-events,
html[data-display="frame15"] #today-view[data-layout="sparse"][data-shopping="true"] .today-events { grid-row: 4; }
/* …no photo: three rows; Next up and Shopping side by side, events the full width. */
html[data-display="frame10"] body.today-open #today-view[data-layout="sparse"][data-shopping="true"][data-no-photo="true"],
html[data-display="frame15"] body.today-open #today-view[data-layout="sparse"][data-shopping="true"][data-no-photo="true"],
html[data-display="frame10"] body.today-open #today-view[data-layout="sparse"][data-shopping="true"][data-no-agenda="true"],
html[data-display="frame15"] body.today-open #today-view[data-layout="sparse"][data-shopping="true"][data-no-agenda="true"] { grid-template-rows: auto auto minmax(0, 1fr); }
html[data-display="frame10"] #today-view[data-layout="sparse"][data-shopping="true"][data-no-photo="true"] .today-shopping,
html[data-display="frame15"] #today-view[data-layout="sparse"][data-shopping="true"][data-no-photo="true"] .today-shopping { grid-row: 2; }
html[data-display="frame10"] #today-view[data-layout="sparse"][data-shopping="true"][data-no-photo="true"] .today-events,
html[data-display="frame15"] #today-view[data-layout="sparse"][data-shopping="true"][data-no-photo="true"] .today-events { grid-row: 3; }
/* …no agenda: the photo and Shopping share rows 2–3. */
html[data-display="frame10"] #today-view[data-layout="sparse"][data-shopping="true"][data-no-agenda="true"] .today-photo,
html[data-display="frame15"] #today-view[data-layout="sparse"][data-shopping="true"][data-no-agenda="true"] .today-photo { grid-column: 1 / span 2; grid-row: 2 / span 2; }
html[data-display="frame10"] #today-view[data-layout="sparse"][data-shopping="true"][data-no-agenda="true"] .today-shopping,
html[data-display="frame15"] #today-view[data-layout="sparse"][data-shopping="true"][data-no-agenda="true"] .today-shopping { grid-row: 2 / span 2; }
/* …neither: Shopping takes the lower wall. */
html[data-display="frame10"] #today-view[data-layout="sparse"][data-shopping="true"][data-no-photo="true"][data-no-agenda="true"] .today-shopping,
html[data-display="frame15"] #today-view[data-layout="sparse"][data-shopping="true"][data-no-photo="true"][data-no-agenda="true"] .today-shopping { grid-column: 1 / -1; }
html[data-display="frame10"] #today-view[data-layout="sparse"] .today-hero-title { font-size: 1.6rem; }
html[data-display="frame10"] #today-view[data-layout="sparse"] .today-hero-countdown { font-size: 2.4rem; }
html[data-display="frame15"] #today-view[data-layout="sparse"] .today-hero-title { font-size: 2.4rem; }
html[data-display="frame15"] #today-view[data-layout="sparse"] .today-hero-countdown { font-size: 3.6rem; }
/* "Open the hub" as a corner pill on a frame (see above). */
html[data-display="frame10"] body.today-open #today-view,
html[data-display="frame15"] body.today-open #today-view { position: relative; }
html[data-display="frame10"] .today-view .today-clock .today-cell-head,
html[data-display="frame15"] .today-view .today-clock .today-cell-head { margin: 0; }
html[data-display="frame10"] .today-view .today-back,
html[data-display="frame15"] .today-view .today-back {
    position: absolute;
    left: 12px;
    bottom: 3px;
    z-index: 2;
    min-width: 28px;
    min-height: 28px;
    padding: 0 12px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--text-dim);
    font-size: 0.62rem;
    box-shadow: none;
}
/* The translucency is a layer under the label, not `opacity` on the button, so the
   words keep the full --text-dim contrast contrast-check.js measured against the panel. */
html[data-display="frame10"] .today-view .today-back::before,
html[data-display="frame15"] .today-view .today-back::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    border: 1px solid var(--line);
    background: var(--bg-panel);
    opacity: 0.85;
}
/* The tap target: 16px wider than the pill (min 28px, so >= 44) and 16px taller than its
   28px — 13px up, 3px down to the bottom edge. */
html[data-display="frame10"] .today-view .today-back::after,
html[data-display="frame15"] .today-view .today-back::after {
    content: '';
    position: absolute;
    left: -8px;
    right: -8px;
    top: -13px;
    bottom: -3px;
}
html[data-display="frame10"] .today-view .today-back:hover::before,
html[data-display="frame15"] .today-view .today-back:hover::before { opacity: 1; }
html[data-display="frame10"] .today-view .today-back:focus-visible,
html[data-display="frame15"] .today-view .today-back:focus-visible { outline: 1px solid var(--toxic-dim); outline-offset: 2px; }
html[data-display="frame10"] #today-view[data-crowded="true"] .today-person-meta,
html[data-display="frame15"] #today-view[data-crowded="true"] .today-person-meta { display: none; }
html[data-display="frame10"] #today-view[data-crowded="true"] .today-person,
html[data-display="frame15"] #today-view[data-crowded="true"] .today-person { padding-top: 7px; padding-bottom: 7px; }
/* Three or more rows (data-dense, 21+ members on a 10.1" frame): one line a member, and
   a column just tall enough for the name and that line — "+N more" when there is more. */
html[data-display="frame10"] #today-view[data-dense="true"] .today-person,
html[data-display="frame15"] #today-view[data-dense="true"] .today-person { padding-top: 4px; padding-bottom: 4px; }
html[data-display="frame10"] #today-view[data-dense="true"] .today-person-head,
html[data-display="frame15"] #today-view[data-dense="true"] .today-person-head { font-size: 0.85rem; }
html[data-display="frame10"] #today-view[data-dense="true"] .today-person-list li,
html[data-display="frame15"] #today-view[data-dense="true"] .today-person-list li,
html[data-display="frame10"] #today-view[data-dense="true"] .today-person-empty,
html[data-display="frame15"] #today-view[data-dense="true"] .today-person-empty { padding: 0; line-height: 1.2; }
html[data-display="frame10"] .today-view .today-cell,
html[data-display="frame15"] .today-view .today-cell { min-width: 0; overflow: hidden; }
/* The hero rows are `auto`, so nothing in them may grow with the data: "Who's around"
   (one line per person online) and the photo (a portrait photo is taller than it is
   wide) are size-contained — they take the row's height and clip, and the row is set
   by the clock, the weather and next up (the photo still holds its min-height) — and
   a long next-up title stops at two lines. */
html[data-display="frame10"] .today-view .today-around,
html[data-display="frame15"] .today-view .today-around,
html[data-display="frame10"] .today-view .today-photo,
html[data-display="frame15"] .today-view .today-photo { contain: size; }
html[data-display="frame10"] .today-view .today-hero-title,
html[data-display="frame15"] .today-view .today-hero-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
html[data-display="frame10"] .today-view .today-people,
html[data-display="frame15"] .today-view .today-people { grid-auto-rows: minmax(0, 1fr); }
html[data-display="frame10"] .today-view .today-people { grid-template-columns: repeat(auto-fit, minmax(114px, 1fr)); }
html[data-display="frame15"] .today-view .today-people { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
html[data-display="frame10"] .today-view .today-person,
html[data-display="frame15"] .today-view .today-person { padding: 10px 8px; }
html[data-display="frame10"] .today-view .today-person-head,
html[data-display="frame15"] .today-view .today-person-head,
html[data-display="frame10"] .today-view .today-person-meta,
html[data-display="frame15"] .today-view .today-person-meta,
html[data-display="frame10"] .today-view .today-person-list li,
html[data-display="frame15"] .today-view .today-person-list li,
html[data-display="frame10"] .today-view .today-person-empty,
html[data-display="frame15"] .today-view .today-person-empty { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-display="frame10"] .today-view .today-person-list li,
html[data-display="frame15"] .today-view .today-person-list li { padding: 1px 0; line-height: 1.3; }
html[data-display="frame10"] .today-view .today-person-head .today-cell-btn,
html[data-display="frame15"] .today-view .today-person-head .today-cell-btn { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; text-align: left; }

/* ---------- The frame wall's editorial look (2026-10-16, Wall v2 part 1) ----------
   Frames only; a desktop or phone Today is untouched by everything here. Dan's reference
   is a wall that reads like a printed page: a huge clock in the skin's display face, a
   serif-sized headline for what is next, small dense type, hairline rules instead of
   boxed cards. Every size is a rem of the frame's root (17px on frame10, 18px on
   frame15), every colour a token, every face one the skin already loads.
   - The cells lose their card fill, border and radius. A 1px --line rule separates the
     three top cells (a left rule on weather and who's around) and every row below them
     (a top rule on the people strip, Shopping and Today's events, a left rule between
     Shopping and events and between member columns). Next up keeps its accent fill (it
     is the one coloured thing on the wall) and the photo keeps its frame.
   - The view's own gap shrinks (--deck-gap, set on #today-view only so the deck keeps
     its own): 14 → 10px on frame10, 20 → 14px on frame15. The people-strip arithmetic
     above uses these.
   - Cell titles are 0.7rem letter-spaced caps in --text-dim; body lines 0.9rem; numbers
     (countdown, Shopping's count, the temperature, the ring label) in --font-data.
   - The chore ring: today.js builds it (SVG through createElementNS) beside the name in
     place of the "1/2 chores" line, track in --line, arc in the accent.
   - A photo taken on or near this day in an earlier year leads its caption with a
     "{count} years ago" badge (today.js memoryYears); the slideshow shows it too.
   Fit (measured 2026-10-16 with tools in the spec, demo banner of 70px included where
   it applies): see the report of that change; the hero rows are still `auto` and every
   cell still clips. */
html[data-display="frame10"] body.today-open #today-view { --deck-gap: 10px; }
html[data-display="frame15"] body.today-open #today-view { --deck-gap: 14px; }
html[data-display="frame10"] .today-view .today-cell,
html[data-display="frame15"] .today-view .today-cell { background: none; border: 0; border-radius: 0; }
html[data-display="frame10"] .today-view .today-hero,
html[data-display="frame15"] .today-view .today-hero { background: var(--toxic); border: 1px solid var(--toxic); border-radius: var(--radius-card); }
html[data-display="frame10"] .today-view .today-photo,
html[data-display="frame15"] .today-view .today-photo { background: linear-gradient(180deg, var(--bg-panel-2), var(--bg-panel)); border: 1px solid var(--line); border-radius: var(--radius-card); }
html[data-display="frame10"] .today-view .today-weather,
html[data-display="frame15"] .today-view .today-weather,
html[data-display="frame10"] .today-view .today-around,
html[data-display="frame15"] .today-view .today-around { border-left: 1px solid var(--line); }
html[data-display="frame10"] .today-view .today-people,
html[data-display="frame15"] .today-view .today-people,
html[data-display="frame10"] .today-view .today-shopping,
html[data-display="frame15"] .today-view .today-shopping,
html[data-display="frame10"] .today-view .today-events,
html[data-display="frame15"] .today-view .today-events { border-top: 1px solid var(--line); }
html[data-display="frame10"] .today-view .today-events,
html[data-display="frame15"] .today-view .today-events { border-left: 1px solid var(--line); }
html[data-display="frame10"] .today-view .today-person + .today-person,
html[data-display="frame15"] .today-view .today-person + .today-person { border-left: 1px solid var(--line); }
/* Type. */
html[data-display="frame10"] .today-view .today-clock-time,
html[data-display="frame15"] .today-view .today-clock-time { font-family: var(--font-stencil); font-weight: 300; line-height: 0.92; letter-spacing: -0.01em; }
html[data-display="frame10"] .today-view .today-clock-time { font-size: 5.6rem; }
html[data-display="frame15"] .today-view .today-clock-time { font-size: 7.5rem; }
html[data-display="frame10"] .today-view .today-clock-date,
html[data-display="frame15"] .today-view .today-clock-date { font-variant: small-caps; letter-spacing: 0.06em; font-size: 1rem; margin-top: 8px; }
html[data-display="frame10"] .today-view .today-hero-title { font-size: 2.6rem; }
html[data-display="frame15"] .today-view .today-hero-title { font-size: 3.6rem; }
html[data-display="frame10"] .today-view .today-cell-title,
html[data-display="frame15"] .today-view .today-cell-title { font-family: inherit; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--text-dim); }
html[data-display="frame10"] .today-view .today-cell-title .today-cell-btn,
html[data-display="frame15"] .today-view .today-cell-title .today-cell-btn { text-transform: inherit; letter-spacing: inherit; font-weight: inherit; }
html[data-display="frame10"] .today-view .today-hero .today-cell-title,
html[data-display="frame15"] .today-view .today-hero .today-cell-title { color: var(--on-accent); }
html[data-display="frame10"] .today-view .today-person-list li,
html[data-display="frame15"] .today-view .today-person-list li,
html[data-display="frame10"] .today-view .today-person-empty,
html[data-display="frame15"] .today-view .today-person-empty,
html[data-display="frame10"] .today-view .today-around-empty,
html[data-display="frame15"] .today-view .today-around-empty { font-size: 0.9rem; }
html[data-display="frame10"] .today-view .today-person-list li.today-ride-line,
html[data-display="frame15"] .today-view .today-person-list li.today-ride-line { font-size: 0.8rem; }
/* A crowded strip (two rows or more) sets its lines a size down and tighter, so the
   column budget (columnBudget in today.js: cap lines and one "+N more") fits a row. */
html[data-display="frame10"] #today-view[data-crowded="true"] .today-person-list li,
html[data-display="frame15"] #today-view[data-crowded="true"] .today-person-list li { font-size: 0.82rem; line-height: 1.2; }
html[data-display="frame10"] #today-view[data-crowded="true"] .today-person-top,
html[data-display="frame15"] #today-view[data-crowded="true"] .today-person-top { margin-bottom: 2px; }
html[data-display="frame10"] #today-view[data-crowded="true"] .today-person-rides,
html[data-display="frame15"] #today-view[data-crowded="true"] .today-person-rides { margin-top: 0; }
/* …and on a 10.1" frame Shopping's count is set smaller there: its one line is a 24px
   button now (the touch layer), and the 7px that cost came out of the strip and clipped
   a dense 21-member wall's "+N more" lines (measured 2026-10-16); the count gives it back. */
html[data-display="frame10"] #today-view[data-crowded="true"] .today-shopping-count { font-size: 1.35rem; }
/* …and Next up's title keeps to one line there: a two-line title made the hero row 49px
   taller and the strip below it is what pays. */
html[data-display="frame10"] #today-view[data-crowded="true"] .today-hero-title,
html[data-display="frame15"] #today-view[data-crowded="true"] .today-hero-title { -webkit-line-clamp: 1; }
html[data-display="frame10"] .today-view .today-weather-temp,
html[data-display="frame15"] .today-view .today-weather-temp { font-family: var(--font-data); font-weight: 400; font-size: 1.6rem; }
html[data-display="frame10"] .today-view .today-weather-dt,
html[data-display="frame15"] .today-view .today-weather-dt { font-family: var(--font-data); font-weight: 400; }
/* The five-day strip (today in the headline, the next four here), set tighter: no tiles. */
html[data-display="frame10"] .today-view .today-weather-strip,
html[data-display="frame15"] .today-view .today-weather-strip { gap: 0; margin-top: 6px; }
html[data-display="frame10"] .today-view .today-weather-day,
html[data-display="frame15"] .today-view .today-weather-day { background: none; border-radius: 0; padding: 2px 1px; }
html[data-display="frame10"] .today-view .today-weather-day + .today-weather-day,
html[data-display="frame15"] .today-view .today-weather-day + .today-weather-day { border-left: 1px solid var(--line); }
/* Columns: the name and the ring share the top line. */
.today-person-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; margin-bottom: 4px; }
.today-person-top .today-person-head { flex: 1 1 auto; min-width: 0; }
.today-ring { position: relative; flex: 0 0 auto; display: inline-block; }
.today-ring svg { display: block; width: 100%; height: 100%; }
.today-ring-track { stroke: var(--line); }
.today-ring-arc { stroke: var(--toxic); }
.today-ring-label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-data);
    font-size: 0.7rem;
    line-height: 1;
    color: var(--text);
}
.today-memory {
    display: inline-block;
    margin-right: 8px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--toxic);
    color: var(--on-accent);
    font-family: var(--font-data);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    vertical-align: 1px;
}
html[data-display="frame10"] #today-view[data-crowded="true"] .today-ring-label,
html[data-display="frame15"] #today-view[data-crowded="true"] .today-ring-label { font-size: 0.62rem; }

/* ---------- The packed frame wall (2026-10-16, "the default wall"; js/sections/_wall-pack.js) ----------
   Frames only. The wall is a fixed 12 × 6 grid (today.js writes grid-template-columns /
   -rows inline, so no layout rule above — full, sparse or Shopping — can win over it) and
   only the panels with something to show are placed in it, each by an inline grid-column /
   grid-row from the packer, every other cell `hidden`. The rows share the height left
   after the 10px top padding and the 34px bottom strip (the pill, the undo toast):
   (800 − 44 − 5 × 10) / 6 ≈ 117px a row on frame10, (1080 − 44 − 5 × 14) / 6 ≈ 161px on
   frame15. Every cell is size-contained and clips, so nothing a panel holds can grow a row;
   the lists inside measure what fits (today.js fitCount / fittedLines) and say "+N more". */
html[data-display="frame10"] #today-view[data-packed="true"] > .today-cell,
html[data-display="frame15"] #today-view[data-packed="true"] > .today-cell { min-height: 0; min-width: 0; contain: size; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-photo,
html[data-display="frame15"] #today-view[data-packed="true"] .today-photo { min-height: 0; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-hero-title,
html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-title { -webkit-line-clamp: 2; }
/* A title too long for two lines at full size steps down and takes a third (today.js fitHeroTitle). */
html[data-display="frame10"] #today-view[data-packed="true"] .today-hero-title.is-long,
html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-title.is-long { -webkit-line-clamp: 3; }
/* The frame-only cells never show off a frame (today.js keeps them hidden there too). */
.today-feed,
.today-tonight,
.today-note,
.today-homework,
.today-question { display: none; }
html[data-display="frame10"] .today-view .today-feed,
html[data-display="frame15"] .today-view .today-feed,
html[data-display="frame10"] .today-view .today-note,
html[data-display="frame15"] .today-view .today-note,
html[data-display="frame10"] .today-view .today-homework,
html[data-display="frame15"] .today-view .today-homework,
html[data-display="frame10"] .today-view .today-question,
html[data-display="frame15"] .today-view .today-question,
html[data-display="frame10"] .today-view .today-tonight,
html[data-display="frame15"] .today-view .today-tonight { display: block; }
html[data-display="frame10"] .today-view .today-feed[hidden],
html[data-display="frame15"] .today-view .today-feed[hidden],
html[data-display="frame10"] .today-view .today-note[hidden],
html[data-display="frame15"] .today-view .today-note[hidden],
html[data-display="frame10"] .today-view .today-homework[hidden],
html[data-display="frame15"] .today-view .today-homework[hidden],
html[data-display="frame10"] .today-view .today-question[hidden],
html[data-display="frame15"] .today-view .today-question[hidden],
html[data-display="frame10"] .today-view .today-tonight[hidden],
html[data-display="frame15"] .today-view .today-tonight[hidden] { display: none; }
/* A small glyph before a line (Tonight, From the family) and Next up's kind. */
.today-glyph { flex: 0 0 auto; display: inline-flex; color: var(--toxic); }
.today-glyph .ico { width: 1.05em; height: 1.05em; }
.today-hero-glyph { display: none; }
html[data-display="frame10"] .today-view .today-hero-glyph,
html[data-display="frame15"] .today-view .today-hero-glyph { display: block; float: right; margin: 0 0 4px 8px; color: var(--on-accent); }
.today-hero-glyph .ico { width: 1.6rem; height: 1.6rem; }
.today-hero-sub { font-size: 0.9rem; margin-top: 2px; }
.today-hero-sub[hidden] { display: none; }
/* From the family: up to three lines, glyph · words · "— who". */
.today-feed-list,
.today-tonight-list { list-style: none; margin: 6px 0 0; padding: 0; }
.today-feed-item { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-top: 1px solid var(--line); }
.today-feed-item:first-child { border-top: 0; padding-top: 2px; }
.today-feed-item .today-glyph { margin-top: 3px; }
.today-feed-text { min-width: 0; flex: 1 1 auto; }
.today-feed-body { font-size: 0.95rem; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.today-feed-by { font-size: 0.75rem; color: var(--text-dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Tonight: one line each. */
.today-tonight-list li { display: flex; gap: 8px; align-items: center; padding: 3px 0; font-size: 0.95rem; }
.today-tonight-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* On a packed frame wall the Tonight cell is as tall as the packer makes it, and on a
   10.1" frame that is under two and a half lines: the third line ("Feed Marmalade" on the
   demo) was drawn cut in half at the cell's bottom edge. The list now fills what is left
   under the title and wraps into a second column, which the cell's overflow hides, so a
   line that does not fit whole is not shown at all; and the lines are a little tighter,
   so a 10.1" frame shows two of them (measured on the demo at 1280x800 and 1920x1080). */
html[data-display="frame10"] #today-view[data-packed="true"] .today-tonight:not([hidden]),
html[data-display="frame15"] #today-view[data-packed="true"] .today-tonight:not([hidden]) { display: flex; flex-direction: column; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-tonight-list,
html[data-display="frame15"] #today-view[data-packed="true"] .today-tonight-list {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-flow: column wrap;
    align-content: flex-start;
    overflow: hidden;
}
html[data-display="frame10"] #today-view[data-packed="true"] .today-tonight-list li,
html[data-display="frame15"] #today-view[data-packed="true"] .today-tonight-list li { flex: 0 0 auto; width: 100%; padding: 1px 0; line-height: 1.25; }

/* ---------- The frame weather's next hours and its tip (2026-10-16) ----------
   Frames only (today.js adds the parts on a frame alone). The body is a small grid: now,
   what it feels like, the high and low and the place on the left; the next six hours and
   the next four days on the right; the tip across the bottom. */
html[data-display="frame10"] .today-view .today-weather-body,
html[data-display="frame15"] .today-view .today-weather-body {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
    grid-template-areas: "now hours" "feels hours" "hl days" "place days" "tip tip";
    grid-template-rows: auto auto auto 1fr auto;
    column-gap: 16px;
    align-content: start;
}
html[data-display="frame10"] .today-view .today-weather-now,
html[data-display="frame15"] .today-view .today-weather-now { grid-area: now; }
html[data-display="frame10"] .today-view .today-weather-feels,
html[data-display="frame15"] .today-view .today-weather-feels { grid-area: feels; }
html[data-display="frame10"] .today-view .today-weather-hl,
html[data-display="frame15"] .today-view .today-weather-hl { grid-area: hl; }
html[data-display="frame10"] .today-view .today-weather-place,
html[data-display="frame15"] .today-view .today-weather-place { grid-area: place; }
html[data-display="frame10"] .today-view .today-weather-tip,
html[data-display="frame15"] .today-view .today-weather-tip { grid-area: tip; }
html[data-display="frame10"] .today-view .today-hourly,
html[data-display="frame15"] .today-view .today-hourly { grid-area: hours; }
html[data-display="frame10"] .today-view .today-weather-strip,
html[data-display="frame15"] .today-view .today-weather-strip { grid-area: days; align-self: start; }
.today-weather-feels { font-size: 0.78rem; color: var(--text-dim); margin-top: 2px; }
.today-weather-tip { font-size: 0.85rem; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-hourly { list-style: none; margin: 0; padding: 0; display: flex; }
.today-hour { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 2px 1px; }
.today-hour + .today-hour { border-left: 1px solid var(--line); }
.today-hour-time { font-size: 0.66rem; color: var(--text-dim); white-space: nowrap; }
.today-hour-glyph { font-size: 0.95rem; line-height: 1.2; }
.today-hour-temp { font-family: var(--font-data); font-size: 0.75rem; }

/* ---------- The default wall's look (2026-10-16): photo backdrop, glass, greeting, tint ----------
   Frames only, on the packed wall. Two looks (frame.look; Settings › Hub › Picture frames):
   - backdrop (every new hub's; a hub that has never chosen keeps plain): behind the panels, the hero photo's blurred, darkened variant
     (GET /api/photos/:id/file?variant=backdrop — pre-blurred on the server, because WebView
     106 has no backdrop-filter and a CSS blur of a full-size photo is too much for a 1 GB
     frame), crossfading when the photo changes. The panels are glass: a translucent dark
     fill and a hairline from theme.css (--wall-glass, --wall-glass-line), no
     backdrop-filter. The skin's text tokens are re-pointed at the wall's ink inside the view
     (--text, --text-dim, --text-dimmer, --line), so every panel's existing rules read on
     the glass on every skin, light ones included; tools/contrast-check.js scores that ink.
     Next up keeps the skin's accent block and the photo its own crisp image.
   - plain: the v2 editorial wall as it was, with the tint laid over the skin's page.
   The time-of-day tint: today.js sets --wall-warmth (0 at 06:00 … 1 at 20:00, once a
   minute) and two tint layers, --wall-cool and --wall-warm, take 1 − warmth and warmth of
   opacity (calc() on a custom property: WebView 106 has no color-mix()).
   Type: the clock 6.4 / 8.6 rem in the display face, "PM" a step down; the greeting 1.1 rem
   small caps; the quote of the day in italics (the banner's own face, --font-mono; the
   banner is not set in a serif, so neither is this); Next up's title 2.8 / 3.8 rem.
   Motion, all inside prefers-reduced-motion: no-preference — the weather glyph's sway on
   the "now" cell only, the panels fading in on their first paint, the countdown's tick, the
   backdrop's crossfade. A frame runs around the clock on a cheap GPU, so nothing here runs
   forever (2026-10-19): the sway is three cycles (18 s) each time the weather paints, and
   the tint has no transition at all: --wall-warmth moves about 0.2 % a minute, which no one
   can see step, and a 50 s fade re-armed every minute kept two full-screen layers
   animating 50 s of every 60. */
.today-backdrop { display: none; }
.today-greeting { color: var(--text-dim); font-size: 0.9rem; margin-top: 6px; }
.today-quote { display: none; }
html[data-display="frame10"] #today-view[data-packed="true"],
html[data-display="frame15"] #today-view[data-packed="true"] { position: relative; }
html[data-display="frame10"] #today-view[data-packed="true"] > .today-cell,
html[data-display="frame15"] #today-view[data-packed="true"] > .today-cell { z-index: 1; }
html[data-display="frame10"] #today-view[data-packed="true"] > .today-cell[hidden],
html[data-display="frame15"] #today-view[data-packed="true"] > .today-cell[hidden] { display: none; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-backdrop,
html[data-display="frame15"] #today-view[data-packed="true"] .today-backdrop { display: block; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 0; overflow: hidden; pointer-events: none; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-backdrop-img,
html[data-display="frame15"] #today-view[data-packed="true"] .today-backdrop-img { position: absolute; top: -4%; left: -4%; width: 108%; height: 108%; object-fit: cover; opacity: 0; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-backdrop-img.is-on,
html[data-display="frame15"] #today-view[data-packed="true"] .today-backdrop-img.is-on { opacity: 1; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-backdrop-tint,
html[data-display="frame15"] #today-view[data-packed="true"] .today-backdrop-tint { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-backdrop-cool,
html[data-display="frame15"] #today-view[data-packed="true"] .today-backdrop-cool { background: var(--wall-cool); opacity: calc(1 - var(--wall-warmth, 0.5)); }
html[data-display="frame10"] #today-view[data-packed="true"] .today-backdrop-warm,
html[data-display="frame15"] #today-view[data-packed="true"] .today-backdrop-warm { background: var(--wall-warm); opacity: var(--wall-warmth, 0.5); }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"],
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] { background: var(--wall-base); --text: var(--wall-ink); --text-dim: var(--wall-ink-dim); --text-dimmer: var(--wall-ink-dim); --line: var(--wall-glass-line); color: var(--wall-ink); }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] > .today-cell:not(.today-people):not(.today-hero):not(.today-photo),
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] > .today-cell:not(.today-people):not(.today-hero):not(.today-photo) { background: var(--wall-glass); border: 1px solid var(--wall-glass-line); border-radius: var(--radius-card); padding: 14px 16px; }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-people,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-people { background: var(--wall-glass); border: 1px solid var(--wall-glass-line); border-radius: var(--radius-card); }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-weather,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-weather,
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-around,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-around,
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-shopping,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-shopping,
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-events,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-events { border-left: 1px solid var(--wall-glass-line); }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-photo,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-photo { border: 1px solid var(--wall-glass-line); background: var(--wall-glass); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-photo,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-photo { padding: 0; overflow: hidden; }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-photo-caption,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-photo-caption { background: var(--wall-glass-strong); color: var(--wall-ink); }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-hero,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-hero { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3); }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-glyph,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-glyph { color: var(--wall-accent); }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-cell-title,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-cell-title { color: var(--wall-ink-dim); }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-hero .today-cell-title,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-hero .today-cell-title { color: var(--on-accent); }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-ring-arc,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-ring-arc { stroke: var(--wall-accent); }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-weather-panel,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-weather-panel,
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-undo,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-undo { background: var(--wall-glass-solid); border-color: var(--wall-glass-line); }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-back::before,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-back::before { background: var(--wall-glass-strong); border-color: var(--wall-glass-line); }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-rail,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-rail { background: var(--wall-glass-strong); border-right-color: var(--wall-glass-line); }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-rail-item[aria-current="page"],
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-rail-item[aria-current="page"] { color: var(--wall-accent); background: rgba(255, 255, 255, 0.08); }
/* The other accent-coloured words take the wall's accent too: the skin's --toxic is a dark
   ink on a light skin and vanishes on the dark glass (1.0:1 for professional, the default
   skin), and a dark skin's bright accent over a pale photo sits under 4.5:1.
   tools/contrast-check.js scores --wall-accent on the glass and on the undo button, and
   its lint fails a .today-* rule in the skin accent that has no backdrop twin. */
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-undo-btn,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-undo-btn { color: var(--wall-accent); border-color: var(--wall-accent); background: rgba(var(--wall-accent-rgb), 0.1); }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-question-name,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-question-name,
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-streak,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-streak { color: var(--wall-accent); }
/* The plain look: the cells have no fill, so secondary text sits on the page under the
   tint, not on the card gradient the deck's --text-dim / --text-dimmer were tuned for.
   Inside this view both read --wall-text-dim (theme.css), which reaches 4.5:1 there on
   every skin; the deck and the backdrop look are untouched. */
html[data-display="frame10"] #today-view[data-packed="true"][data-look="plain"],
html[data-display="frame15"] #today-view[data-packed="true"][data-look="plain"] { --text-dim: var(--wall-text-dim); --text-dimmer: var(--wall-text-dim); }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="plain"] .today-backdrop-img,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="plain"] .today-backdrop-img { display: none; }
/* ---------- The Frame palette (2026-10-19, frame.palette 'frame'; Settings › Hub › Picture frames › Colours) ----------
   Frames only, on the packed wall, both looks. Every hub's frames get it unless an owner
   picks "Match the hub's theme" ('skin', which leaves the wall exactly as the rules above
   draw it). The wall is a screen read from across a room, so it carries its own designed
   look rather than the skin: theme.css's --fp-* tokens (a deep ink-navy base, glass
   panels, warm off-white ink) re-pointed here over the skin tokens and the wall tokens the
   rules above read, so every existing rule draws in the palette with no twin of its own.
   - One signature hue per panel (--fp-hue, set per cell below) for three things only: the
     cell title, the cell's glyphs, and a 3 px rule along the panel's top (an inset shadow,
     so it follows the corner radius). Body text stays ink; no panel is filled with its
     hue except Next up, the one filled block (coral, dark ink).
   - The plain look keeps its plain base (no photo) but takes the backdrop's panel shape:
     a faint glass fill and hairline, so the rule has an edge to sit on.
   - A colour per member ([data-hue], today.js from js/sections/_member-hue.js): their
     name and chore ring in the people strip, a dot before their name in Who's around.
   - The weather's line icons (today.js weatherMark): .today-wx-<tone>, the cloud of a
     rain, snow, drizzle or storm glyph in slate and what falls from it in its own hue;
     partly cloudy is the sun in amber with its cloud in slate.
   tools/contrast-check.js "frame palette" scores every hue and the dim ink as text on the
   glass and on the plain panel at every warmth, and Next up's ink on its fill. */
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"],
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] { --wall-base: var(--fp-base); --wall-ink: var(--fp-ink); --wall-ink-dim: var(--fp-ink-dim); --wall-glass: var(--fp-glass); --wall-glass-strong: var(--fp-glass-strong); --wall-glass-solid: var(--fp-glass-solid); --wall-glass-line: var(--fp-glass-line); --wall-accent: var(--fp-accent); --wall-accent-rgb: var(--fp-accent-rgb); --wall-cool: var(--fp-cool); --wall-warm: var(--fp-warm); --wall-text-dim: var(--fp-ink-dim); --text: var(--fp-ink); --text-dim: var(--fp-ink-dim); --text-dimmer: var(--fp-ink-dim); --line: var(--fp-glass-line); --line-strong: var(--fp-glass-line); --toxic: var(--fp-accent); --toxic-rgb: var(--fp-accent-rgb); --toxic-dim: var(--fp-accent-dim); --on-accent: var(--fp-next-ink); --bg-panel: var(--fp-base-2); --bg-panel-2: var(--fp-base-2); --bg-deep: var(--fp-base); --bg-track: var(--fp-track); background: var(--fp-base); color: var(--fp-ink); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"][data-look="plain"] > .today-cell:not(.today-people):not(.today-hero):not(.today-photo):not(.today-note),
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"][data-look="plain"] > .today-cell:not(.today-people):not(.today-hero):not(.today-photo):not(.today-note) { background: var(--fp-panel); border: 1px solid var(--fp-glass-line); border-radius: var(--radius-card); padding: 14px 16px; }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"][data-look="plain"] .today-people,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"][data-look="plain"] .today-people { background: var(--fp-panel); border: 1px solid var(--fp-glass-line); border-radius: var(--radius-card); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"][data-look="plain"] .today-photo,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"][data-look="plain"] .today-photo { border: 1px solid var(--fp-glass-line); padding: 0; overflow: hidden; }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"][data-look="plain"] .today-rail,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"][data-look="plain"] .today-rail { background: var(--fp-glass-strong); border-right-color: var(--fp-glass-line); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-weather,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-weather { --fp-hue: var(--fp-weather); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-feed,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-feed { --fp-hue: var(--fp-feed); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-tonight,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-tonight { --fp-hue: var(--fp-tonight); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-shopping,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-shopping { --fp-hue: var(--fp-shopping); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-homework,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-homework { --fp-hue: var(--fp-homework); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-events,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-events { --fp-hue: var(--fp-events); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-question,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-question { --fp-hue: var(--fp-question); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-around,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-around { --fp-hue: var(--fp-around); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-allowance,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-allowance { --fp-hue: var(--fp-allowance); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-poll,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-poll { --fp-hue: var(--fp-poll); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-countdown,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-countdown { --fp-hue: var(--fp-countdown); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-reading,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-reading { --fp-hue: var(--fp-reading); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-watchlist,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-watchlist { --fp-hue: var(--fp-watchlist); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-weather-panel,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-weather-panel { --fp-hue: var(--fp-weather); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] > .today-cell:not(.today-people):not(.today-hero):not(.today-photo):not(.today-note):not(.today-clock),
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] > .today-cell:not(.today-people):not(.today-hero):not(.today-photo):not(.today-note):not(.today-clock) { box-shadow: inset 0 3px 0 0 var(--fp-hue, transparent); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-cell-title,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-cell-title { color: var(--fp-hue, var(--fp-ink-dim)); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-glyph,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-glyph { color: var(--fp-hue, var(--fp-accent)); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-feed .today-feed-item.is-pinned,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-feed .today-feed-item.is-pinned { box-shadow: inset 3px 0 0 var(--fp-feed); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-question-name,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-question-name { color: var(--fp-question); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-hero,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-hero { background: var(--fp-next); border-color: var(--fp-next); color: var(--fp-next-ink); --on-accent: var(--fp-next-ink); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-hero .today-cell-title,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-hero .today-cell-title { color: var(--fp-next-ink); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] [data-hue="0"],
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] [data-hue="0"] { --member: var(--fp-member-0); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] [data-hue="1"],
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] [data-hue="1"] { --member: var(--fp-member-1); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] [data-hue="2"],
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] [data-hue="2"] { --member: var(--fp-member-2); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] [data-hue="3"],
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] [data-hue="3"] { --member: var(--fp-member-3); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] [data-hue="4"],
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] [data-hue="4"] { --member: var(--fp-member-4); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] [data-hue="5"],
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] [data-hue="5"] { --member: var(--fp-member-5); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] [data-hue="6"],
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] [data-hue="6"] { --member: var(--fp-member-6); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] [data-hue="7"],
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] [data-hue="7"] { --member: var(--fp-member-7); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-person .today-person-head,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-person .today-person-head { color: var(--member, var(--fp-ink)); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-person .today-ring-arc,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-person .today-ring-arc { stroke: var(--member, var(--fp-accent)); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-ring-track,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-ring-track { stroke: var(--fp-track); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-around li[data-hue]::before,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-around li[data-hue]::before { content: ''; display: inline-block; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--member); margin-right: 0.5em; vertical-align: 0.08em; }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-wx,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-wx { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-wx .ico,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-wx .ico { width: 1em; height: 1em; stroke-width: 1.75; }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-weather-de.today-wx .ico,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-weather-de.today-wx .ico,
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-hour-glyph.today-wx .ico,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-hour-glyph.today-wx .ico { width: 1.3em; height: 1.3em; }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-sun,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-sun,
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-partly,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-partly { color: var(--fp-wx-sun); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-cloud,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-cloud,
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-partly .ico > :last-child,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-partly .ico > :last-child,
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-rain .ico > :first-child,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-rain .ico > :first-child,
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-snow .ico > :first-child,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-snow .ico > :first-child,
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-thunder .ico > :first-child,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-thunder .ico > :first-child { color: var(--fp-wx-cloud); stroke: var(--fp-wx-cloud); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-rain,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-rain { color: var(--fp-wx-rain); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-snow,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-snow { color: var(--fp-wx-snow); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-thunder,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-thunder { color: var(--fp-wx-thunder); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-fog,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-fog { color: var(--fp-wx-fog); }
html[data-display="frame10"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-none,
html[data-display="frame15"] #today-view[data-packed="true"][data-palette="frame"] .today-wx-none { color: var(--fp-ink-dim); }
html[data-display="frame10"] #today-view[data-packed="true"] .today-shopping[data-rows="1"] .today-shopping-count,
html[data-display="frame15"] #today-view[data-packed="true"] .today-shopping[data-rows="1"] .today-shopping-count { display: inline; font-size: 1.3rem; margin-right: 8px; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-shopping[data-rows="1"] .today-shopping-count + div,
html[data-display="frame15"] #today-view[data-packed="true"] .today-shopping[data-rows="1"] .today-shopping-count + div { display: inline; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-cell.is-tight .today-shopping-count + div,
html[data-display="frame15"] #today-view[data-packed="true"] .today-cell.is-tight .today-shopping-count + div { display: none; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-cell.is-tight .today-cell-title,
html[data-display="frame15"] #today-view[data-packed="true"] .today-cell.is-tight .today-cell-title { margin-bottom: 0; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-cell.is-tight li,
html[data-display="frame15"] #today-view[data-packed="true"] .today-cell.is-tight li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: 0; padding-bottom: 0; }
/* A tight cell ellipsises its lines, but a feed item is a clamped paragraph: let it wrap to its
   own line count instead of running off the cell unclamped (the line-clamp was being defeated). */
html[data-display="frame10"] #today-view[data-packed="true"] .today-cell.is-tight .today-feed-item,
html[data-display="frame15"] #today-view[data-packed="true"] .today-cell.is-tight .today-feed-item { white-space: normal; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-feed-item .today-feed-body,
html[data-display="frame15"] #today-view[data-packed="true"] .today-feed-item .today-feed-body { min-width: 0; overflow-wrap: anywhere; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-person-list li.has-more,
html[data-display="frame15"] #today-view[data-packed="true"] .today-person-list li.has-more { display: flex; gap: 6px; min-width: 0; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-person-list li.has-more .today-line-text,
html[data-display="frame15"] #today-view[data-packed="true"] .today-person-list li.has-more .today-line-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-person-list li.has-more .today-tick,
html[data-display="frame15"] #today-view[data-packed="true"] .today-person-list li.has-more .today-tick { width: auto; min-width: 0; flex: 0 1 auto; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-more-inline,
html[data-display="frame15"] #today-view[data-packed="true"] .today-more-inline { flex: 0 0 auto; color: var(--text-dim); white-space: nowrap; }
html[data-display="frame10"] #today-view[data-packed="true"][data-crowded="true"] .today-person,
html[data-display="frame15"] #today-view[data-packed="true"][data-crowded="true"] .today-person { padding-top: 2px; padding-bottom: 2px; }
html[data-display="frame10"] #today-view[data-packed="true"][data-dense="true"] .today-person-top,
html[data-display="frame15"] #today-view[data-packed="true"][data-dense="true"] .today-person-top { margin-bottom: 0; }

html[data-display="frame10"] #today-view[data-packed="true"] .today-clock,
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock { display: flex; flex-direction: column; min-width: 0; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock-time,
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock-time { white-space: nowrap; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock-ampm,
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock-ampm { font-size: clamp(1rem, 0.34em, 2.2rem); letter-spacing: 0.04em; margin-left: 0.06em; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-greeting,
html[data-display="frame15"] #today-view[data-packed="true"] .today-greeting { font-size: 1.1rem; font-variant: small-caps; letter-spacing: 0.05em; color: var(--text); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-quote,
html[data-display="frame15"] #today-view[data-packed="true"] .today-quote { display: block; margin: auto 0 0; padding-top: 8px; min-height: 0; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-quote[hidden],
html[data-display="frame15"] #today-view[data-packed="true"] .today-quote[hidden] { display: none; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-quote-text,
html[data-display="frame15"] #today-view[data-packed="true"] .today-quote-text { margin: 0; font-family: var(--font-mono); font-style: italic; font-size: 0.92rem; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-quote-by,
html[data-display="frame15"] #today-view[data-packed="true"] .today-quote-by { font-size: 0.72rem; color: var(--text-dim); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-rows="2"] .today-quote-text,
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-rows="2"] .today-quote-text { -webkit-line-clamp: 1; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock-date,
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock-date { margin-top: 10px; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-quote.is-short .today-quote-by,
html[data-display="frame15"] #today-view[data-packed="true"] .today-quote.is-short .today-quote-by { display: none; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-cols="8"],
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-cols="8"],
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-cols="9"],
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-cols="9"],
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-cols="10"],
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-cols="10"],
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-cols="11"],
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-cols="11"],
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-cols="12"],
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-cols="12"] { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 40px; align-content: center; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-cols="8"] .today-greeting,
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-cols="8"] .today-greeting,
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-cols="9"] .today-greeting,
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-cols="9"] .today-greeting,
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-cols="10"] .today-greeting,
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-cols="10"] .today-greeting,
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-cols="11"] .today-greeting,
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-cols="11"] .today-greeting,
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-cols="12"] .today-greeting,
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-cols="12"] .today-greeting { grid-column: 2; grid-row: 1; align-self: end; margin: 0 0 6px; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-cols="8"] .today-quote,
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-cols="8"] .today-quote,
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-cols="9"] .today-quote,
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-cols="9"] .today-quote,
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-cols="10"] .today-quote,
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-cols="10"] .today-quote,
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-cols="11"] .today-quote,
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-cols="11"] .today-quote,
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-cols="12"] .today-quote,
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-cols="12"] .today-quote { grid-column: 2; grid-row: 2; margin: 0; padding: 0; align-self: start; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-rows="4"],
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-rows="4"],
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-rows="5"],
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-rows="5"],
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-rows="6"],
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-rows="6"] { justify-content: center; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-rows="4"] .today-quote,
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-rows="4"] .today-quote,
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-rows="5"] .today-quote,
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-rows="5"] .today-quote,
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock[data-rows="6"] .today-quote,
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock[data-rows="6"] .today-quote { margin-top: 28px; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-weather[data-rows="4"],
html[data-display="frame15"] #today-view[data-packed="true"] .today-weather[data-rows="4"],
html[data-display="frame10"] #today-view[data-packed="true"] .today-weather[data-rows="5"],
html[data-display="frame15"] #today-view[data-packed="true"] .today-weather[data-rows="5"],
html[data-display="frame10"] #today-view[data-packed="true"] .today-weather[data-rows="6"],
html[data-display="frame15"] #today-view[data-packed="true"] .today-weather[data-rows="6"] { display: flex; align-items: center; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-weather[data-rows="4"] .today-weather-body,
html[data-display="frame15"] #today-view[data-packed="true"] .today-weather[data-rows="4"] .today-weather-body,
html[data-display="frame10"] #today-view[data-packed="true"] .today-weather[data-rows="5"] .today-weather-body,
html[data-display="frame15"] #today-view[data-packed="true"] .today-weather[data-rows="5"] .today-weather-body,
html[data-display="frame10"] #today-view[data-packed="true"] .today-weather[data-rows="6"] .today-weather-body,
html[data-display="frame15"] #today-view[data-packed="true"] .today-weather[data-rows="6"] .today-weather-body { zoom: 1.45; height: auto; width: 100%; row-gap: 10px; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-hero,
html[data-display="frame15"] #today-view[data-packed="true"] .today-hero { display: flex; flex-direction: column; position: relative; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-hero .today-hero-glyph,
html[data-display="frame15"] #today-view[data-packed="true"] .today-hero .today-hero-glyph { position: absolute; top: 12px; right: 14px; margin: 0; float: none; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-hero .today-cell-title,
html[data-display="frame15"] #today-view[data-packed="true"] .today-hero .today-cell-title { padding-right: 2.2rem; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-hero-countdown,
html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-countdown { font-size: 1.5rem; margin-top: auto; padding-top: 6px; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-hero-sub,
html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-sub { opacity: 1; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-hero-countdown.is-date,
html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-countdown.is-date { font-family: inherit; font-size: 1.05rem; letter-spacing: 0.02em; opacity: 0.9; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-weather-icon,
html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-icon { display: inline-block; transform-origin: 50% 80%; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-weather-body,
html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-body { height: 100%; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-weather-icon,
html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-icon { font-size: 2rem; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-feed,
html[data-display="frame15"] #today-view[data-packed="true"] .today-feed { display: flex; flex-direction: column; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-feed-item.is-pinned,
html[data-display="frame15"] #today-view[data-packed="true"] .today-feed-item.is-pinned { box-shadow: inset 3px 0 0 var(--toxic); padding-left: 10px; margin-left: -4px; }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-feed-item.is-pinned,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-feed-item.is-pinned { box-shadow: inset 3px 0 0 var(--wall-accent); }
html[data-display="frame10"] #today-view[data-packed="true"] .today-feed-list.is-single,
html[data-display="frame15"] #today-view[data-packed="true"] .today-feed-list.is-single { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; padding-bottom: 8px; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-feed-list.is-single .today-feed-body,
html[data-display="frame15"] #today-view[data-packed="true"] .today-feed-list.is-single .today-feed-body { font-size: 1.3rem; line-height: 1.35; -webkit-line-clamp: 4; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-feed-list.is-single .today-feed-by,
html[data-display="frame15"] #today-view[data-packed="true"] .today-feed-list.is-single .today-feed-by { font-size: 0.85rem; margin-top: 6px; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-clock-time { font-size: 6.4rem; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-hero-title { font-size: 2.8rem; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-hero-title.is-long { font-size: 2.1rem; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-hero-title.is-longer { font-size: 1.7rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-clock-time { font-size: 8.6rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-title { font-size: 3.8rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-title.is-long { font-size: 2.8rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-title.is-longer { font-size: 2.2rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-greeting { font-size: 1.25rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-quote-text { font-size: 1.05rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-countdown { font-size: 2rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-icon { font-size: 2.8rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-temp { font-size: 2.4rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-label,
html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-feels,
html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-hl { font-size: 0.95rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-hour-time,
html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-dn { font-size: 0.82rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-hour-glyph,
html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-de { font-size: 1.4rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-hour-temp,
html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-dt { font-size: 0.95rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-tip { font-size: 1.05rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-cell-title { font-size: 0.78rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-feed-body,
html[data-display="frame15"] #today-view[data-packed="true"] .today-tonight-list li,
html[data-display="frame15"] #today-view[data-packed="true"] .today-person-list li { font-size: 1.1rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-feed-list.is-single .today-feed-body { font-size: 1.7rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-feed-by { font-size: 0.85rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-when,
html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-sub { font-size: 1.15rem; }
html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-countdown.is-date { font-size: 1.3rem; }

/* ---------- The compact step (1024x600 and any short frame) ----------
   A 10.1" AiMOR frame is 1024x600: a row of the 12x6 wall is ~75px there, against ~117px at
   1280x800, so everything sized for the taller wall was cut by its cell. One step down, by
   HEIGHT (not width: a 1280x600 panel needs it too), for the frame presets only. The grid,
   the packer and the panels are untouched; only type, padding and gaps give a little. */
@media (max-height: 700px) {
    html[data-display="frame10"] #today-view[data-packed="true"] > .today-cell:not(.today-people),
    html[data-display="frame15"] #today-view[data-packed="true"] > .today-cell:not(.today-people) { padding: 7px 10px; }
    /* The greeting never squeezes: a squeezed line hides the overflow fitClock measures. */
    html[data-display="frame10"] #today-view[data-packed="true"] .today-greeting,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-greeting { flex: 0 0 auto; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-hour-glyph,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-hour-glyph { font-size: 0.95rem; line-height: 1.1; }
    /* The four-day strip keeps its name and temperatures; the glyph (already shown for the
       hours above it) is what a 75px row can spare. */
    html[data-display="frame10"] #today-view[data-packed="true"] .today-weather-de,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-de { display: none !important; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-weather-day,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-day { padding: 0 1px; gap: 0; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-weather-strip,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-strip { margin-top: 2px; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-cell-title,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-cell-title { margin-bottom: 2px; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-clock-time,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-clock-time { font-size: 4.4rem; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-clock-date,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-clock-date { margin-top: 2px; font-size: 0.85rem; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-greeting,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-greeting { font-size: 0.95rem; margin-top: 2px; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-quote,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-quote { padding-top: 3px; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-quote-text,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-quote-text { font-size: 0.8rem; line-height: 1.3; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-hero-title,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-title { font-size: 2rem; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-hero-title.is-long,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-title.is-long { font-size: 1.5rem; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-hero-title.is-longer,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-title.is-longer { font-size: 1.2rem; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-hero-countdown,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-countdown { font-size: 1.1rem; padding-top: 2px; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-hero-when,
    html[data-display="frame10"] #today-view[data-packed="true"] .today-hero-sub,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-when,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-sub { font-size: 0.85rem; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-weather-icon,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-icon { font-size: 1.5rem; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-weather-temp,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-temp { font-size: 1.5rem; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-weather-body,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-body { row-gap: 2px; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-feed-list.is-single .today-feed-body,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-feed-list.is-single .today-feed-body { font-size: 1.05rem; -webkit-line-clamp: 3; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-feed-body,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-feed-body,
    html[data-display="frame10"] #today-view[data-packed="true"] .today-tonight-list li,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-tonight-list li,
    html[data-display="frame10"] #today-view[data-packed="true"] .today-person-list li,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-person-list li { font-size: 0.85rem; line-height: 1.2; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-shopping-count,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-shopping-count { font-size: 1.1rem; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-note-body,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-note-body { font-size: 0.9rem; line-height: 1.25; }
    /* One-row Shopping: the count and the first lines share a row instead of stacking. */
    html[data-display="frame10"] #today-view[data-packed="true"] .today-shopping[data-rows="1"],
    html[data-display="frame15"] #today-view[data-packed="true"] .today-shopping[data-rows="1"] { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-shopping[data-rows="1"] .today-cell-title,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-shopping[data-rows="1"] .today-cell-title { flex: 0 0 100%; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-shopping[data-rows="1"] .today-person-list,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-shopping[data-rows="1"] .today-person-list { flex: 1 1 0; min-width: 0; margin: 0; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-shopping[data-rows="1"] .today-person-list,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-shopping[data-rows="1"] .today-person-list { display: flex; gap: 8px; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-shopping[data-rows="1"] .today-person-list li,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-shopping[data-rows="1"] .today-person-list li { min-width: 0; flex: 0 1 auto; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-note[data-rows="1"] .today-note-by,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-note[data-rows="1"] .today-note-by { display: none; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-weather-dt,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-dt { font-size: 0.78rem; line-height: 1.15; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-weather-feels,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-feels { display: none; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-note-paper,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-note-paper { padding: 8px 10px; }
}
@media (prefers-reduced-motion: no-preference) {
    html[data-display="frame10"] #today-view[data-packed="true"] .today-backdrop-img,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-backdrop-img { transition: opacity 1.2s ease; }
    html[data-display="frame10"] #today-view[data-packed="true"] > .today-cell:not([hidden]),
    html[data-display="frame15"] #today-view[data-packed="true"] > .today-cell:not([hidden]) { animation: today-panel-in 0.6s ease backwards; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-weather-now .today-weather-icon,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-weather-now .today-weather-icon { animation: today-sway 6s ease-in-out 3; }
    html[data-display="frame10"] #today-view[data-packed="true"] .today-hero-countdown.is-ticking,
    html[data-display="frame15"] #today-view[data-packed="true"] .today-hero-countdown.is-ticking { animation: today-tick 0.6s ease; }
}
/* The backdrop runs to the screen's edges: on a frame with Today open <main> drops its
   side padding and the view takes it instead (2 x 18 = the same 36px the people-strip
   arithmetic above counts, so PEOPLE_ONE_ROW and FRAME_COL hold); the rail's 80px sit at
   the very edge, the view's left padding 80 + 18. A banner keeps its old inset. */
html[data-display="frame10"] body.today-open .main-area,
html[data-display="frame15"] body.today-open .main-area { padding-left: 0; padding-right: 0; }
html[data-display="frame10"] body.today-open .fc-banner-host,
html[data-display="frame15"] body.today-open .fc-banner-host { margin: 0 14px; }
html[data-display="frame10"] body.today-open #today-view[data-packed="true"],
html[data-display="frame15"] body.today-open #today-view[data-packed="true"] { padding-left: 18px; padding-right: 18px; }
html[data-display="frame10"] body.today-open #today-view[data-packed="true"][data-nav="rail"],
html[data-display="frame15"] body.today-open #today-view[data-packed="true"][data-nav="rail"] { padding-left: 98px; }

@keyframes today-panel-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes today-sway {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-4deg); }
    75% { transform: rotate(4deg); }
}
@keyframes today-tick {
    0% { opacity: 0.35; }
    100% { opacity: 1; }
}

/* ---------- The frame wall's optional panels (2026-10-16): a poll, a countdown, two lists ----------
   Frames only, and only once an owner ticks them in Picture frames (today.js keeps them
   hidden everywhere else). A poll option is a 44px button when the wall may vote (not the
   demo, not a locked hub), its own vote marked in the accent. */
.today-poll,
.today-countdown,
.today-reading,
.today-watchlist { display: none; }
html[data-display="frame10"] .today-view .today-poll,
html[data-display="frame15"] .today-view .today-poll,
html[data-display="frame10"] .today-view .today-countdown,
html[data-display="frame15"] .today-view .today-countdown,
html[data-display="frame10"] .today-view .today-reading,
html[data-display="frame15"] .today-view .today-reading,
html[data-display="frame10"] .today-view .today-watchlist,
html[data-display="frame15"] .today-view .today-watchlist { display: block; }
html[data-display="frame10"] .today-view .today-poll[hidden],
html[data-display="frame15"] .today-view .today-poll[hidden],
html[data-display="frame10"] .today-view .today-countdown[hidden],
html[data-display="frame15"] .today-view .today-countdown[hidden],
html[data-display="frame10"] .today-view .today-reading[hidden],
html[data-display="frame15"] .today-view .today-reading[hidden],
html[data-display="frame10"] .today-view .today-watchlist[hidden],
html[data-display="frame15"] .today-view .today-watchlist[hidden] { display: none; }
.today-countdown-days { font-family: var(--font-data); font-size: 1.6rem; line-height: 1.1; margin-top: 4px; }
.today-poll-question { font-size: 1rem; line-height: 1.3; margin: 4px 0 6px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.today-poll-options { display: flex; flex-wrap: wrap; gap: 6px; }
.today-poll-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 0.9rem;
}
button.today-poll-option { cursor: pointer; }
.today-poll-option.is-mine { border-color: var(--toxic); color: var(--toxic); }
html[data-display="frame10"] #today-view[data-look="backdrop"] .today-poll-option.is-mine,
html[data-display="frame15"] #today-view[data-look="backdrop"] .today-poll-option.is-mine { border-color: var(--wall-accent); color: var(--wall-accent); }
.today-poll-count { font-family: var(--font-data); font-size: 0.75rem; color: var(--text-dim); }
.today-poll-as { font-size: 0.72rem; color: var(--text-dim); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-poll-as[hidden] { display: none; }
.today-poll-option:focus-visible { outline: 1px solid var(--toxic-dim); outline-offset: 2px; }

/* ---------- The glyph rail (frame.nav = 'rail'; js/today.js buildRail) ----------
   An owner may swap the corner pill for an 80px rail down the wall's left edge (Settings ›
   Hub › Picture frames › Way into the hub). Frames only. It is absolutely placed inside
   #today-view (position: relative), so it starts under any banner and ends at the view's
   bottom; the view's left padding grows by its 80px, which is where the people-strip
   arithmetic's 1200 / 1840 comes from. The pill is not drawn, but the 34px bottom strip
   stays, as on every frame wall: the undo toast lives in it. z-index 10002 is over a card opened on
   the wall (10000; its scrim 9990) and under the slideshow (10200) and the quiet screen
   (10300), which therefore hide it. While it shows, body.today-rail-on moves an open
   card right by 40px and keeps it 112px narrower than the screen, so the card never
   slides under the rail. Every item is a button at least 44px tall; labels are ONE line
   of 0.6rem caps under the glyph, from rail-only keys (today.rail*) worded in all nine
   locales to fit the 68px inside the item, measured against the widest skin face. The clock under the hub
   glyph is the big clock's own text, 12-hour where the locale is. */
.today-rail { display: none; }
html[data-display="frame10"] body.today-open #today-view[data-nav="rail"],
html[data-display="frame15"] body.today-open #today-view[data-nav="rail"] { padding-left: 84px; }
html[data-display="frame10"] #today-view[data-nav="rail"] .today-back,
html[data-display="frame15"] #today-view[data-nav="rail"] .today-back { display: none; }
html[data-display="frame10"] #today-view[data-nav="rail"] .today-rail,
html[data-display="frame15"] #today-view[data-nav="rail"] .today-rail {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 80px;
    z-index: 10002;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 0;
    border-right: 1px solid var(--line);
    background: var(--bg-panel);
    box-sizing: border-box;
}
html[data-display="frame10"] #today-view[data-nav="rail"] .today-rail[hidden],
html[data-display="frame15"] #today-view[data-nav="rail"] .today-rail[hidden] { display: none; }
.today-rail-top,
.today-rail-bottom { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.today-rail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 56px;
    margin: 0 4px;
    padding: 6px 2px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--text-dim);
    cursor: pointer;
    font: inherit;
}
.today-rail-item[hidden] { display: none; }
.today-rail-item .ico { width: 24px; height: 24px; }
.today-rail-label {
    font-size: 0.6rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.15;
    max-width: 100%;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.today-rail-item[aria-current="page"] { color: var(--toxic); background: rgba(var(--toxic-rgb), 0.1); }
.today-rail-item:focus-visible { outline: 1px solid var(--toxic-dim); outline-offset: -2px; }
.today-rail-clock { font-family: var(--font-data); font-size: 0.7rem; color: var(--text-dim); text-align: center; white-space: nowrap; padding: 6px 0 2px; }
body.today-rail-on .section.expanded {
    left: calc(50% + 40px) !important;
    width: min(90vw, calc(100vw - 112px)) !important;
}

/* ---------- The frame wall as a touchscreen (2026-10-16; js/today.js "the touch layer") ----------
   Frames only. A chore line in a member's column and a Shopping line are buttons that
   look like the lines they replace (one tap ticks or strikes; the struck look comes from
   the line's own `.done`). They are the line's full width but only 24px tall, never 44:
   at 44px a line the caps no longer fit the strip (see the people-strip arithmetic
   above), so the line keeps its height and the target its width. On a crowded strip
   (two rows of members or more) chore lines are plain text — ~17px lines are too small
   to aim at — and the member's name still opens Chores. A done chore is a button only
   when it was done today (today.js tickableToday). Every other target on the wall is
   44px or more.
   The undo toast sits centred on the wall's bottom edge: 46px tall, it fills the 34px
   strip every frame wall keeps (rail or pill) and reaches 12px up into the bottom cells'
   own padding, so it covers no words and no button; the forecast panel is placed
   by today.js over the weather cell's column, from its top to the wall's bottom padding,
   and moves nothing. The wall is `touch-action: none` (it never scrolls), so a swipe on
   the photo or the background arrives as pointer events rather than a browser pan. */
html[data-display="frame10"] body.today-open #today-view,
html[data-display="frame15"] body.today-open #today-view { touch-action: none; }
.today-tick {
    display: block;
    width: 100%;
    min-height: 24px;
    padding: 2px 0;
    margin: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.today-person-list li.done .today-tick { text-decoration: line-through; color: var(--text-dimmer); }
.today-tick:focus-visible { outline: 1px solid var(--toxic-dim); outline-offset: 1px; }
html[data-display="frame10"] .today-view .today-tick,
html[data-display="frame15"] .today-view .today-tick { line-height: 1.3; }
html[data-display="frame10"] .today-view .today-weather[role="button"],
html[data-display="frame15"] .today-view .today-weather[role="button"] { cursor: pointer; }
html[data-display="frame10"] .today-view .today-weather[role="button"]:focus-visible,
html[data-display="frame15"] .today-view .today-weather[role="button"]:focus-visible { outline: 1px solid var(--toxic-dim); outline-offset: -2px; }
html[data-display="frame10"] .today-view .today-photo,
html[data-display="frame15"] .today-view .today-photo { cursor: pointer; }
.today-weather-panel { display: none; }
html[data-display="frame10"] .today-view .today-weather-panel,
html[data-display="frame15"] .today-view .today-weather-panel {
    display: block;
    position: absolute;
    bottom: 34px;
    z-index: 8;
    box-sizing: border-box;
    padding: 12px 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: linear-gradient(180deg, var(--bg-panel-2), var(--bg-panel));
    cursor: pointer;
}
html[data-display="frame10"] .today-view .today-weather-panel[hidden],
html[data-display="frame15"] .today-view .today-weather-panel[hidden] { display: none; }
.today-forecast { list-style: none; margin: 8px 0 0; padding: 0; }
.today-forecast li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2rem minmax(0, 1.2fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
}
.today-forecast li:first-child { border-top: 0; }
.today-forecast-day { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-forecast-icon { font-size: 1.3rem; text-align: center; }
.today-forecast-label { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-forecast-temp { font-family: var(--font-data); }
.today-undo { display: none; }
html[data-display="frame10"] .today-view .today-undo,
html[data-display="frame15"] .today-view .today-undo {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    z-index: 9;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 80%;
    padding: 0 0 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--bg-panel-raised);
    box-shadow: var(--glow-soft);
    font-size: 0.9rem;
}
html[data-display="frame10"] .today-view .today-undo[hidden],
html[data-display="frame15"] .today-view .today-undo[hidden] { display: none; }
.today-undo-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-undo-btn {
    min-height: 44px;
    min-width: 72px;
    padding: 0 16px;
    border: 1px solid var(--toxic-dim);
    border-radius: 999px;
    background: rgba(var(--toxic-rgb), 0.1);
    color: var(--toxic);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

/* ---------- The frame's idle slideshow and quiet hours (js/today.js) ----------
   Frames only (today.js never shows either layer anywhere else). Both are fixed
   full-screen layers inside #today-view, so they vanish with it; the slideshow sits over
   the dock (9995/10001) and under the photo viewer (10500), first-run (11000) and the
   toasts (12000); the quiet screen sits over the slideshow.

   The colours here are deliberately NOT tokens, like the other black scrims in this
   file: the quiet screen is "the screen is off" (#000) on every skin, and a photo shown
   full-bleed is captioned in white over a dark gradient whatever the skin is, because
   the photo, not the skin, is the background. The quiet clock is white at 20% on black,
   i.e. #333: readable across a dark room, never a light in it.

   Two slides crossfade on opacity (1 s, today.js waits SLIDE_FADE_MS before loading the
   next photo into the one that faded out). Each is the photo `contain`ed over a blurred,
   darkened `cover` copy of itself, so a portrait is never cropped. The front photo drifts
   from scale 1 to 1.06 over --slide-seconds (set by today.js from "Each photo for");
   prefers-reduced-motion stops the drift and the fades. A layer that is being taken down
   by a touch fades out over 0.3 s and keeps the pointer until it is hidden, so the
   touch's own pointerup and click never reach the cell underneath. WebView 106: no dvh,
   no :has(), no @container. */
.today-slideshow,
.today-quiet {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: hidden;
    transition: opacity .3s ease;
}
.today-slideshow { z-index: 10200; background: #000; }
.today-quiet { z-index: 10300; background: #000; display: flex; align-items: center; justify-content: center; }
.today-slideshow[hidden],
.today-quiet[hidden] { display: none; }
.today-slideshow.is-leaving,
.today-quiet.is-leaving { opacity: 0; }
.today-slide {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease;
}
.today-slide.is-front { opacity: 1; }
.today-slide-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(28px) brightness(.5);
    transform: scale(1.12);
}
/* The server's backdrop variant (?variant=backdrop, services/photos.ts makeBackdrop) is
   already blurred and darkened (x 0.55, against brightness .5 here), so a slide whose
   blurred layer points at it takes no CSS filter: re-rasterising a 28px blur of a
   full-size photo at every slide change is the cost the wall's backdrop avoids on a 1 GB
   frame. today.js loadSlide decides which src the layer gets; the scale stays. */
.today-slide-blur[src*="variant=backdrop"] { filter: none; }
.today-slide-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: 50% 50%;
}
.today-slide.kb .today-slide-photo { animation: today-kenburns var(--slide-seconds, 20s) linear forwards; }
@keyframes today-kenburns {
    from { transform: scale(1); }
    to { transform: scale(1.06); }
}
.today-slideshow-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 64px 32px 24px;
    background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.62));
    color: rgba(255,255,255,.94);
}
.today-slideshow-time { font-family: var(--font-data); font-size: 3.4rem; line-height: 1; }
.today-slideshow-date { font-size: 1rem; margin-top: 6px; color: rgba(255,255,255,.8); }
.today-slideshow-caption { max-width: 55%; text-align: right; font-size: 1rem; color: rgba(255,255,255,.88); }
html[data-display="frame15"] .today-slideshow-time { font-size: 4.4rem; }
html[data-display="frame15"] .today-slideshow-date,
html[data-display="frame15"] .today-slideshow-caption { font-size: 1.25rem; }
.today-quiet-time { font-family: var(--font-data); font-size: 6rem; line-height: 1; color: rgba(255,255,255,.2); }
@media (prefers-reduced-motion: reduce) {
    .today-slide.kb .today-slide-photo { animation: none; }
    .today-slide,
    .today-slideshow,
    .today-quiet { transition: none; }
}

/* The ☰ toggle is fixed at the top-left, right over the clock. Today has its own way
   out ("Open the hub" closes it and the deck's ☰ comes back), so on a frame the toggle
   steps aside while Today is open; today.js moves focus to #main if it held it. */
html[data-display="frame10"] body.today-open .nav-toggle,
html[data-display="frame15"] body.today-open .nav-toggle { display: none; }

/* On a phone the fixed hamburger still sits over the clock digits; nudge the cell
   right by the toggle's footprint so the time is never half-eaten. */
html[data-display="phone"] .today-view .today-clock { padding-left: 64px; }

/* ---------- Scrollbars ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--modal-fill); border-left: 1px solid var(--line); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--toxic-dim), var(--scroll-thumb-2));
    border: 1px solid var(--modal-fill);
}
::-webkit-scrollbar-thumb:hover { background: var(--toxic); }
::-webkit-scrollbar-corner { background: var(--modal-fill); }
html { scrollbar-color: var(--toxic-dim) var(--modal-fill); scrollbar-width: thin; }

::selection { background: var(--toxic); color: var(--on-accent); }

/* ---------- Shared decorative helpers ---------- */
.hazard-bar {
    height: 6px;
    width: 100%;
    background: var(--hazard-stripe);
    opacity: .85;
}

.stencil {
    font-family: var(--font-stencil);
    text-transform: var(--case-heads, uppercase);
    letter-spacing: 2px;
}

.tag {
    font-family: var(--font-mono);
    font-size: max(.62rem, var(--fs-min));
    letter-spacing: 2px;
    text-transform: var(--case-heads, uppercase);
    color: var(--text-dim);
}

/* ============================================================
   SIDEBAR / NAV
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg-sidebar-pattern);
    border-right: 1px solid var(--line);
    box-shadow: 4px 0 24px rgba(0,0,0,.8);
    z-index: 900;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar::before {
    content: '';
    display: block;
    height: 8px;
    flex: 0 0 8px;
    background: var(--hazard-stripe);
}

.sidebar-logo {
    padding: 16px 14px 14px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, var(--bg-tint) 0%, var(--bg-deep) 100%);
}

.sidebar-logo .logo-glyph {
    font-size: 2.2rem;
    line-height: 1;
    color: var(--toxic);
    text-shadow: 0 0 calc(10px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.25 * var(--glow-k)));
    display: block;
    margin-bottom: 6px;
}

.sidebar-logo .logo-name {
    font-family: var(--font-stencil);
    text-transform: var(--case-heads, uppercase);
    letter-spacing: 2px;
    font-size: .95rem;
    color: var(--text);
    line-height: 1.25;
}

/* ---- the hub switcher: the family name, made a handle when the account is in more
   than one hub (js/hub-switcher.js). The button inherits the name's own type so a
   single-hub family, which never gets the button, and a multi-hub one look alike
   until the caret. */
.sidebar-logo { position: relative; }

.hub-switch {
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    min-height: 0;
    text-align: left;
}

.hub-switch:hover .hub-switch-caret,
.hub-switch[aria-expanded="true"] .hub-switch-caret { color: var(--toxic); }

.hub-switch:focus-visible {
    outline: 2px solid var(--toxic);
    outline-offset: 3px;
}

.hub-switch-caret {
    font-size: .8em;
    color: var(--hazard);
    transition: transform .15s ease;
}

.hub-switch[aria-expanded="true"] .hub-switch-caret { transform: rotate(180deg); }

.hub-menu {
    position: absolute;
    left: 10px;
    right: 10px;
    top: calc(100% - 6px);
    z-index: 40;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: var(--bg-panel-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-control, 6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}

.hub-menu[hidden] { display: none; }

.hub-menu li { margin: 0; }

.hub-menu-link,
.hub-menu-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    min-height: 44px;
    font-family: var(--font-mono);
    font-size: .8rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text);
    text-decoration: none;
}

.hub-menu-link:hover,
.hub-menu-link:focus-visible {
    background: var(--overlay-1);
    color: var(--toxic);
}

/* inset: the menu panel clips an outer ring */
.hub-menu-link:focus-visible {
    outline: 2px solid var(--toxic);
    outline-offset: -2px;
}

.hub-menu-current { color: var(--text-dim); }

.hub-menu-mark { color: var(--toxic); }

.sidebar-logo .logo-name em {
    color: var(--toxic);
    font-style: normal;
}

.sidebar-logo .logo-sub {
    margin-top: 6px;
    font-size: max(.6rem, var(--fs-min));
    letter-spacing: 2px;
    color: var(--hazard);
    text-transform: var(--case-heads, uppercase);
}

.nav-heading {
    padding: 12px 14px 6px;
    font-size: max(.58rem, var(--fs-min));
    letter-spacing: 3px;
    color: var(--text-dim);
    text-transform: var(--case-heads, uppercase);
}

.nav-list {
    list-style: none;
    padding: 0 8px 8px;
    margin: 0;
    flex: 1 1 auto;
}

/* The landmark around the list takes the list's old place in the sidebar's flex column, so
   the footer stays at the bottom. */
.nav-sections {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 2px;
    background: transparent;
    border: 1px solid transparent;
    border-left: 2px solid transparent;
    color: var(--text-dim);
    font-family: var(--font-stencil);
    font-size: max(.68rem, var(--fs-min));
    letter-spacing: 1.4px;
    text-transform: var(--case-heads, uppercase);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: all .18s ease;
}

.nav-item .nav-icon {
    font-size: .95rem;
    width: 18px;
    text-align: center;
    flex: 0 0 18px;
    filter: grayscale(.4);
}

.nav-item:hover,
.nav-item:focus-visible {
    background: rgba(var(--toxic-rgb), .07);
    border-color: rgba(var(--toxic-rgb), .35);
    border-left-color: var(--toxic);
    color: var(--toxic);
    box-shadow: 0 0 calc(9px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.11 * var(--glow-k))) inset;
}

/* Ring inside the sidebar's 8px gutter, so the scrolling sidebar does not clip it. */
.nav-item:focus-visible,
.nav-group-toggle:focus-visible {
    outline: 2px solid var(--toxic);
    outline-offset: 2px;
}

.nav-item:hover .nav-icon { filter: none; }

.nav-item.active {
    background: rgba(var(--toxic-rgb), .12);
    border-left-color: var(--toxic);
    color: var(--selected-ink);
    text-shadow: 0 0 calc(6px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.23 * var(--glow-k)));
}

.sidebar-footer {
    padding: 10px;
    border-top: 1px solid var(--line);
}

/* The holiday skins' ornament spacer (app.html): off unless a skin turns it on in
   css/theme.css, so no other skin's rail moves by a pixel. */
.sidebar-ornament { display: none; }

/* ---- the grouped rail (js/registry.js NAV_GROUPS). A toggle reads like a nav item
   with a caret; the sublist indents its members a step. */
.nav-group { margin: 2px 0 4px; }

.nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-left: 2px solid transparent;
    color: var(--text-dim);
    font-family: var(--font-stencil);
    font-size: max(.64rem, var(--fs-min));
    letter-spacing: 1.6px;
    text-transform: var(--case-heads, uppercase);
    text-align: left;
    cursor: pointer;
    transition: all .18s ease;
}

.nav-group-toggle:hover,
.nav-group-toggle:focus-visible {
    color: var(--toxic);
    border-left-color: var(--toxic);
    background: rgba(var(--toxic-rgb), .05);
}

.nav-group-caret {
    display: inline-block;
    width: 12px;
    text-align: center;
    font-size: .7rem;
    color: var(--hazard);
    transition: transform .15s ease;
}

.nav-group-toggle[aria-expanded="true"] .nav-group-caret { transform: rotate(90deg); }

.nav-group-count {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: max(.58rem, var(--fs-min));
    letter-spacing: 0;
    color: var(--text-dimmer, var(--text-dim));
    opacity: .8;
}

.nav-sublist {
    list-style: none;
    margin: 0;
    padding: 0 0 2px 10px;
}

.nav-sublist .nav-item { font-size: max(.66rem, var(--fs-min)); padding: 7px 10px; }

/* ---- the floating "now playing" dock (js/now-playing.js): bottom-right, above the
   deck, the modal scrim AND the expanded card itself — an open modal's own edge sat
   at z-index 10000 and could clip the dock's title (bottom-right corner, same as the
   dock), so `body.has-expanded` lifts it clear below. Panel-coloured with the card
   shadow, so it reads as a small card that has come loose. */
.now-playing {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9995;
    width: min(340px, calc(100vw - 36px));
    padding: 10px 12px 8px;
    background: linear-gradient(180deg, var(--bg-panel-2) 0%, var(--bg-panel) 100%);
    border: 1px solid var(--toxic-dim);
    border-radius: var(--radius-card, 0);
    box-shadow:
        0 1px 2px rgba(var(--shadow-ink-rgb), .5),
        0 14px 32px rgba(var(--shadow-ink-rgb), .5),
        0 0 calc(12px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.18 * var(--glow-k)));
    color: var(--text);
}

.now-playing.is-paused { border-color: var(--line); }

.np-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.np-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.np-title {
    font: inherit;
    font-family: var(--font-stencil);
    font-size: .8rem;
    letter-spacing: var(--tracking-h2, .5px);
    text-transform: var(--case-heads, uppercase);
    color: var(--toxic);
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 0;
}

.np-title:hover { text-decoration: underline; }

.np-line {
    font-size: max(.72rem, var(--fs-min));
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.np-btn {
    flex: 0 0 auto;
    min-width: 30px;
    min-height: 30px;
    padding: 0 6px;
    background: var(--bg-panel-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-control, 4px);
    color: var(--text);
    cursor: pointer;
    font-size: .85rem;
    line-height: 1;
}

.np-btn:hover { border-color: var(--toxic); color: var(--toxic); }
.np-play { border-color: var(--toxic-dim); color: var(--toxic); }
.np-close { color: var(--text-dim); }

.np-timeline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.np-seek {
    flex: 1 1 auto;
    min-width: 0;
    accent-color: var(--toxic);
    margin: 0;
}

.np-time {
    font-family: var(--font-mono);
    font-size: max(.66rem, var(--fs-min));
    color: var(--text-dim);
    flex: 0 0 auto;
}

.np-live {
    font-family: var(--font-mono);
    font-size: max(.62rem, var(--fs-min));
    letter-spacing: 2px;
    color: var(--danger);
}

/* volume + pop-out, the third row of the dock. Tokens only, so all thirty-four skins
   dress it the same way the buttons above it are dressed. */
.np-extras {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.np-vol-icon {
    flex: 0 0 auto;
    font-size: .7rem;
    opacity: .75;
}

.np-vol {
    flex: 0 0 80px;
    width: 80px;
    max-width: 100%;
    min-width: 0;
    accent-color: var(--toxic);
    margin: 0;
}

.np-pop {
    margin-left: auto;
    font-size: .8rem;
}

/* ---- the pop-out mini player (Document Picture-in-Picture; Chrome/Edge only).
   Its document loads these same sheets and carries the same html[data-theme], so the
   tokens below resolve there exactly as they do here. */
body.np-pip-body {
    margin: 0;
    padding: 0;
    min-height: 0;
    overflow: hidden;
}

.np-pip {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(180deg, var(--bg-panel-2) 0%, var(--bg-panel) 100%);
    color: var(--text);
    font-family: var(--font-mono);
    min-height: 100vh;
    box-sizing: border-box;
}

.np-pip-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.np-pip-title {
    font-family: var(--font-stencil);
    font-size: .85rem;
    letter-spacing: var(--tracking-h2, .5px);
    text-transform: var(--case-heads, uppercase);
    color: var(--toxic);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.np-pip-line {
    font-size: max(.72rem, var(--fs-min));
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.np-pip-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.np-pip-row .np-btn:disabled { opacity: .4; cursor: default; }
.np-pip-row .np-vol { margin-left: auto; }

/* keep the dock clear of the sidebar drawer and the nav toggle on a phone */
@media (max-width: 640px) {
    .now-playing { right: 10px; bottom: 10px; left: 10px; width: auto; }
}

/* A card this member has hidden for themselves (js/layout.js): no slot, no rail entry. */
.grid-deck .section.member-hidden:not(.expanded) { display: none !important; }

/* Settings › Layout › Cards on my deck: one checkbox per hideable card, in deck order. */
#hidden-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 4px 12px;
    margin: 8px 0 4px;
}
.hidden-card-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: .78rem;
    cursor: pointer;
}

/* Settings is a card the sidebar opens, not a card the deck shows. */
.grid-deck .section.deck-hidden:not(.expanded) { display: none !important; }

.nav-status {
    font-size: max(.55rem, var(--fs-min));
    letter-spacing: 2px;
    color: var(--text-dim);
    text-transform: var(--case-heads, uppercase);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-status .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--toxic);
    box-shadow: 0 0 8px var(--toxic);
    animation: pulseDot 2.4s infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: .25; }
}
/* On a frame the sidebar is off-canvas until the ☰ opens it: no pulse nobody can see. */
html[data-display="frame10"] body:not(.nav-open) .nav-status .dot,
html[data-display="frame15"] body:not(.nav-open) .nav-status .dot { animation: none; }

.nav-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 10px;
    background: rgba(var(--danger-rgb), .08);
    border: 1px solid rgba(var(--danger-rgb), .45);
    color: var(--danger);
    font-family: var(--font-stencil);
    font-size: max(.68rem, var(--fs-min));
    letter-spacing: 1.6px;
    text-transform: var(--case-heads, uppercase);
    text-decoration: none;
    transition: all .18s ease;
}

.nav-logout:hover {
    background: rgba(var(--danger-rgb), .2);
    box-shadow: 0 0 14px rgba(var(--danger-rgb), .4);
}

.back-link {
    display: block;
    margin: 8px 0;
    padding: 7px 10px;
    color: var(--text-dim);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: max(.65rem, var(--fs-min));
    letter-spacing: 1.5px;
    text-transform: var(--case-heads, uppercase);
    border: 1px solid var(--line);
    background: var(--modal-fill);
    text-align: center;
    transition: all .18s ease;
}

.back-link:hover {
    color: var(--hazard);
    border-color: var(--hazard);
}

/* Hamburger (mobile only) */
.nav-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1200;
    width: 44px;
    height: 44px;
    background: var(--modal-fill);
    border: 1px solid var(--toxic);
    color: var(--toxic);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 0 calc(9px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.16 * var(--glow-k)));
}

.nav-scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    z-index: 850;
}

body.nav-open .nav-scrim { display: block; }

/* Legacy quick-jump select is retired in favour of the sidebar */
.section-selector { display: none !important; }

/* ============================================================
   MAIN AREA / HEADER
   ============================================================ */
.main-area {
    padding: 18px 20px 60px;
    min-height: 100vh;
}

.hub-header {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--bg-panel-2) 0%, var(--bg-shade-a) 100%);
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
}

.hub-header::before {
    content: '';
    display: block;
    height: 6px;
    background: var(--hazard-stripe);
}

.hub-header-inner {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.hub-title {
    font-family: var(--font-stencil);
    text-transform: var(--case-heads, uppercase);
    letter-spacing: var(--tracking-heads, 4px);
    font-size: 1.35rem;
    color: var(--text);
    line-height: 1.2;
}

.hub-title .bio {
    color: var(--toxic);
    text-shadow: 0 0 calc(12px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.27 * var(--glow-k)));
}

.hub-subline {
    margin-top: 5px;
    font-size: max(.62rem, var(--fs-min));
    letter-spacing: 3px;
    color: var(--text-dim);
    text-transform: var(--case-heads, uppercase);
}

.hub-readouts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.readout {
    padding: 0;
    font-size: max(.58rem, var(--fs-min));
    letter-spacing: 2px;
    text-transform: var(--case-heads, uppercase);
    color: var(--text-dim);
}

.readout b {
    display: block;
    color: var(--toxic);
    font-size: max(.72rem, var(--fs-min));
    letter-spacing: 2px;
    margin-top: 2px;
}

.readout.warn b { color: var(--hazard); }

/* The plain skins' header (professional, onyx, steel - PLAIN_SKINS in js/theme-words.js):
   two chips that state real facts (members, cards) in place of Node / Modules / Status.
   Both groups are in the DOM; the skin picks one. :where() keeps these at the lowest
   specificity so the compact-shell rules that hide every .hub-readouts still win. */
.hub-readouts-plain { display: none; }
:where(html:is([data-theme="professional"], [data-theme="onyx"], [data-theme="steel"])) .hub-readouts-plain { display: flex; }
:where(html:is([data-theme="professional"], [data-theme="onyx"], [data-theme="steel"])) .hub-readouts-themed { display: none; }

/* ============================================================
   DAILY QUOTE :: INCOMING TRANSMISSION BANNER
   ============================================================ */
.daily-quote-header {
    margin-bottom: 16px;
    position: relative;
}

.quote-display-header {
    background:
        linear-gradient(90deg, rgba(var(--toxic-rgb), .07) 0%, rgba(0,0,0,0) 40%),
        var(--bg-panel);
    border: 1px solid var(--line);
    border-left: 4px solid var(--toxic);
    padding: 12px 18px 12px 16px;
    cursor: pointer;
    transition: all .25s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    position: relative;
}

.quote-display-header::before {
    content: var(--label-transmission);
    position: absolute;
    top: -1px;
    left: 12px;
    transform: translateY(-50%);
    background: var(--modal-fill);
    border: 1px solid var(--toxic-dim);
    color: var(--toxic);
    font-family: var(--font-mono);
    font-size: max(.55rem, var(--fs-min));
    letter-spacing: var(--tracking-h2, 2.5px);
    padding: 2px 8px;
}

.quote-display-header::after {
    content: 'CLICK TO DECODE NEXT ▸';
    position: absolute;
    bottom: 3px;
    right: 10px;
    font-size: max(.5rem, var(--fs-min));
    letter-spacing: 2px;
    color: var(--text-dim);
}

/* A plain skin says it plainly (English; another language gets boot.quoteHintPlain via data-hint). */
:where(html:is([data-theme="professional"], [data-theme="onyx"], [data-theme="steel"])) .quote-display-header:not([data-hint])::after {
    content: 'Another quote ▸';
}

/* In another language js/boot.js puts the hint's words in data-hint (en.json /
   es.json `boot.quoteHint`); English keeps the literal above untouched. */
.quote-display-header[data-hint]::after {
    content: attr(data-hint);
}

.quote-display-header:hover {
    border-color: var(--toxic-dim);
    box-shadow: 0 0 calc(13px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.11 * var(--glow-k)));
}

.quote-text-header {
    font-family: var(--font-mono);
    font-size: .92rem;
    color: var(--text);
    line-height: 1.45;
    text-align: left;
    margin: 0;
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.quote-author-header {
    font-family: var(--font-stencil);
    font-size: max(.68rem, var(--fs-min));
    letter-spacing: 2px;
    text-transform: var(--case-heads, uppercase);
    color: var(--hazard);
    text-align: right;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================================
   SECTION GRID (command deck)
   ============================================================ */
/* The deck is laid out on a FINE row grid: one "card row" is
   WIDGET_ROW_UNITS (10) micro-rows tall. The fine grid exists so a MINIMIZED widget
   can occupy a slim title bar (2 units) and so a HALF-HEIGHT widget can take 5 units:
   the title bar plus a couple of lines, with its body scrolling. Every span below is
   in micro-rows, so a whole card row is `span 10` and a double is `span 20`.
   Two unit sizes, one for each kind of screen:
     * desktop (the rule after .grid-deck): 14.4px unit and a 12px gap, so a card row is
       10 * 14.4 + 9 * 12 = 252px, half = 5 * 14.4 + 4 * 12 = 120px, tall = 20 units =
       516px, and the deck is four columns from about 1500px of viewport;
     * wall frames (frame10 / frame15) keep the 18.6px unit and their own --deck-gap /
       --deck-min from the display-mode tokens at the top of the file: a 330px row.
   web/js/layout.js reads both from the computed style (metrics()). */
.grid-deck {
    display: grid;
    position: relative;
    grid-template-columns: repeat(auto-fill, minmax(var(--deck-min), 1fr));
    grid-auto-rows: 18.6px;
    grid-auto-flow: dense;
    gap: var(--deck-gap);
    align-items: stretch;
}

/* The demo host only (js/theme-boot.js sets the attribute, js/demo.js removes it): the deck is
   not painted until the curated setup is on it. visibility keeps its space, so nothing
   below it moves when it appears. */
html[data-demo-pending] #grid-deck { visibility: hidden; }

/* The demo hub only (js/demo.js): the deck fades in over 150 ms when the carousel swaps
   one curated setup for the next. Reduced motion gets the swap with no fade at all. */
@media (prefers-reduced-motion: no-preference) {
    .grid-deck.demo-swap { animation: demo-deck-in 150ms ease-out; }
}
@keyframes demo-deck-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Desktop deck only: not a frame, not a phone. A :where() guard, so it adds no
   specificity and the phone rules (which come later or are more specific) still win.
   The tokens are set on the deck itself, so the Today view, which reads --deck-gap
   from :root, keeps its own spacing. */
:where(html:not([data-display="frame10"]):not([data-display="frame15"]):not([data-display="phone"])) .grid-deck {
    --deck-min: 296px;
    --deck-gap: 12px;
    grid-auto-rows: 14.4px;
}
/* The four-column deck at 1440 (1188px of deck): a 280px column, from 1200px of viewport up.
   Below 1200px the column is the 296px it always was, so every width under 1200 has the
   column count it had (at 280px a 1116 to 1163px viewport gained a third column). Between
   1200 and 1409 both give three columns; four start at about 1410 with 280 (1472 with 296). */
@media (min-width: 1200px) {
    :where(html:not([data-display="frame10"]):not([data-display="frame15"]):not([data-display="phone"])) .grid-deck {
        --deck-min: 280px;
    }
}
@media (max-width: 900px) {
    /* A phone by width alone: its gap stays what it was. */
    :where(html:not([data-display="frame10"]):not([data-display="frame15"]):not([data-display="desktop"])) .grid-deck { --deck-gap: 16px; }
}

/* The default deck, for a member with no saved layout (and for any card a saved layout has
   no span for). Plain rules, no !important: the engine's inline spans win for anyone who
   has arranged their deck. The ORDER is the DOM order in app.html (dashboard, Connected
   Families, chores, messages, calendar, meal planner, photos, kudos, then the rest); here
   only the widths that differ from one column are written, and every default height is
   the card's one row (span 10). Messages used to be two rows tall and one wide; it is now
   one row tall and two wide, next to the chores. */
@media (min-width: 1150px) {
    .section[data-section="songs"]  { grid-column: span 2; grid-row: span 20; }
    .section[data-section="videos"] { grid-column: span 2; grid-row: span 20; }
    .section[data-section="messages"] { grid-column: span 2; }
    .section[data-section="photos"]   { grid-column: span 2; }
    .section[data-section="stocks"]   { grid-row: span 20; }
    .section[data-section="dashboard"] { grid-column: span 2; }
}
/* The dashboard takes three columns once the deck has three: the deck is two columns
   below about 1195px of viewport (3 * 296px + 2 * 12px), and a span of 3 on a two-column
   deck would invent a third, unsized column. */
@media (min-width: 1200px) {
    .section[data-section="dashboard"] { grid-column: span 3; }
}
/* ...and four once it has four. That is only the desktop deck: 280px columns (4 * 280 +
   3 * 12 = 1156px of deck, about 1408px of viewport with the 252px of rail and padding around
   it). Wall frames and the forced phone layout keep their own column and main's span of 3
   (the same exclusion as the 280px column above). Below 1200px nothing here applies, so the
   Dashboard is exactly as it was. */
@media (min-width: 1410px) {
    html:not([data-display="frame10"]):not([data-display="frame15"]):not([data-display="phone"])
        .section[data-section="dashboard"] { grid-column: span 4; }
    /* Stocks is one row like its neighbours on the four-column deck (a 20-row panel left a
       blank gap there); it keeps main's two rows everywhere else. */
    html:not([data-display="frame10"]):not([data-display="frame15"]):not([data-display="phone"])
        .section[data-section="stocks"] { grid-row: span 10; }
    /* What decides the column count is the deck's own width, which a classic scrollbar
       (about 15px) takes from: at a viewport of 1410 to about 1425 the deck is three columns
       and a span of 4 would invent a fourth, narrower one. layout.js writes the real count to
       data-cols on every pass; this only ever takes the span DOWN, never widens it. */
    html:not([data-display="frame10"]):not([data-display="frame15"]):not([data-display="phone"])
        .grid-deck[data-cols="3"] .section[data-section="dashboard"] { grid-column: span 3; }
}

.section {
    position: relative;
    grid-row: span 10;
    background:
        linear-gradient(180deg, var(--bg-panel-2) 0%, var(--bg-panel) 100%);
    /* ---- the card's edge and depth, as tokens so the light skins can retune them
       (theme.css, "elevated cards on a light substrate"). Not a drawn border: a
       hairline edge you barely see, a lit top edge, and a layered diffuse shadow, so
       the card is a raised surface rather than a box with a line round it. */
    --card-edge: rgba(255,255,255,.07);
    --card-gloss: rgba(255,255,255,.06);
    --card-rule: rgba(255,255,255,.08);
    --card-shadow:
        0 1px 2px rgba(0,0,0,.55),
        0 6px 14px rgba(0,0,0,.35),
        0 18px 40px rgba(0,0,0,.4);
    --card-shadow-hover:
        0 2px 4px rgba(0,0,0,.6),
        0 12px 26px rgba(0,0,0,.45),
        0 28px 60px rgba(0,0,0,.5);
    border: 1px solid var(--card-edge);
    padding: 26px 16px 14px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .25s ease, transform .25s ease;
    display: flex;
    flex-direction: column;
    clip-path: var(--card-clip);
    border-radius: var(--radius-card, 0);
    /* Resting depth, so a card sits ON the deck rather than being drawn on it. Two
       layers: a tight contact line and a soft ambient fall. Ink colour is the skin's
       (--shadow-ink-rgb: black on the dark skins, a tinted ink on the light ones, which
       lower the alphas in theme.css). NOTE a skin with a polygon --card-clip clips its
       own shadow away - the five hard skins keep their cut corners and lose the depth. */
    box-shadow: inset 0 1px 0 var(--card-gloss), var(--card-shadow);
}

/* hazard strip along the top edge of every panel */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--hazard-stripe);
    opacity: calc(.7 * var(--stripe-k, 1));
    z-index: 2;
}

/* corner bracket, bottom-left */
.section::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    border-left: 2px solid var(--toxic-dim);
    border-bottom: 2px solid var(--toxic-dim);
    opacity: calc(.55 * var(--deco-k, 1));
    pointer-events: none;
    z-index: 2;
}

.section:hover {
    border-color: rgba(var(--toxic-rgb), .45);
    box-shadow:
        inset 0 1px 0 var(--card-gloss),
        0 0 calc(12px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.14 * var(--glow-k))),
        var(--card-shadow-hover);
    transform: translateY(-3px);
}
/* No lift on hover: the card steps up in border and shadow only. Not while a card is
   settling from a drop (layout.js FLIP): that glide IS a transform. */
.section:not(.widget-settling):hover { transform: none; }

.section:hover::before { opacity: var(--stripe-k, 1); }
.section:hover::after { opacity: var(--deco-k, 1); border-color: var(--toxic); }

/* ---- cut corners without a clip-path (the default skin; biohazard, tribal and camo draw their own in theme.css) ----
   Camo drew its own in theme.css (round 3: webbing strap, clipped for real over the camo). 
   The angled top-right and bottom-left corners used to be a polygon clip-path, which
   also clipped the card's shadow to nothing. Now the border is transparent and PAINTED
   as four 1px gradient lines, with two deck-coloured triangles on top that carry the
   diagonal edge - so the silhouette is the same and the shadow falls outside it. The
   stripe and the bracket are clipped to the same diagonals individually. */
html:not([data-theme]) .section:not(.expanded) {
    --card-line: var(--card-edge);
    border-color: transparent;
    background:
        linear-gradient(225deg, var(--bg-void) 9.9px, var(--card-line) 9.9px, var(--card-line) 10.9px, transparent 11.4px) top right / 16px 16px no-repeat,
        linear-gradient(45deg, var(--bg-void) 9.9px, var(--card-line) 9.9px, var(--card-line) 10.9px, transparent 11.4px) bottom left / 16px 16px no-repeat,
        linear-gradient(var(--card-line), var(--card-line)) top / 100% 1px no-repeat,
        linear-gradient(var(--card-line), var(--card-line)) bottom / 100% 1px no-repeat,
        linear-gradient(var(--card-line), var(--card-line)) left / 1px 100% no-repeat,
        linear-gradient(var(--card-line), var(--card-line)) right / 1px 100% no-repeat,
        linear-gradient(180deg, var(--bg-panel-2) 0%, var(--bg-panel) 100%);
}

html:not([data-theme]) .section:not(.expanded):hover {
    --card-line: rgba(var(--toxic-rgb), .45);
}

html:not([data-theme]) .section:not(.expanded)::before,
html[data-theme="tribal"] .section:not(.expanded)::before {
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

html:not([data-theme]) .section:not(.expanded)::after,
html[data-theme="tribal"] .section:not(.expanded)::after {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.section h2 {
    font-family: var(--font-stencil);
    text-transform: var(--case-heads, uppercase);
    letter-spacing: var(--tracking-h2, 2.5px);
    font-size: .95rem;
    color: var(--toxic);
    margin: 0 0 10px;
    /* right gutter reserves room for the widget chrome cluster: three 24px buttons,
       two 2px gaps and the 9px inset = 85px from the card's edge, less the card's own
       16px padding = 69; 72 leaves a hair. */
    padding: 0 72px 8px 0;
    text-align: left;
    border-bottom: 1px solid var(--card-rule, var(--line));
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    text-shadow: 0 0 calc(7px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.16 * var(--glow-k)));
}

/* Narrow deck (js/layout.js toggles .deck-narrow when a column is under 300px, which is the
   four-column deck at 1440). A title KEEPS its skin's own size, tracking and face: the
   34 skins each set a title that is larger than the subtitle under it, and shrinking them all
   to one flat size (review 6a, S1) put the title at or below its subtitle in every skin. A
   title that does not fit on one line wraps onto a second line instead, and the demo's
   add-on tag drops under the title rather than squeezing it. Hyphenation stays off so a
   word is never broken mid-way. */
.grid-deck.deck-narrow .section:not(.expanded) h2 {
    hyphens: manual;
    flex-wrap: wrap;
    padding-right: 66px;
    gap: 4px 8px;
}
/* The demo's Add-on tag drops under the title, at any width, only when the title and the tag
   do not fit on one line (Dan, 2026-11-16). The header is a plain one-line row (glyph, title,
   tag) and js/title-fit.js owns the "beside or below" decision: when the title cannot be fitted
   beside the tag it puts .addon-below on the header. Below, the title takes the rest of the
   first line (so a skin's glyph stays with it and never ends up alone on a line) and a
   zero-height break (.card-addon-break) sends the tag to its own line. Letting flex-wrap decide
   instead moved the whole title button onto its own line and left the glyph alone (review,
   Portuguese and Polish). A header that fits is untouched. */
.section:not(.expanded) h2.has-addon-tag,
.grid-deck.deck-narrow .section:not(.expanded) h2.has-addon-tag {
    flex-wrap: nowrap;
}
.card-addon-break { display: none; }
.grid-deck:not(.title-measuring) .section:not(.expanded) h2.addon-below {
    flex-wrap: wrap;
    row-gap: 0;
}
.grid-deck:not(.title-measuring) .section:not(.expanded) h2.addon-below .card-open {
    flex: 1 1 0%;
    min-width: 0;
}
.grid-deck:not(.title-measuring) .section:not(.expanded) h2.addon-below .card-addon-break {
    display: block;
    flex: 0 0 100%;
    height: 0;
}
.grid-deck:not(.title-measuring) .section:not(.expanded) h2.addon-below .card-addon-tag {
    margin-top: 4px;
}
/* While the layout is being edited the widget chrome (76px wide, 9px in from the edge) is
   at full strength over the title, so the title stops short of all of it. */
.grid-deck.deck-narrow.is-editing .section:not(.expanded) h2 { padding-right: 88px; }

/* Fit-to-width titles (js/title-fit.js). A title that does not fit one line at its skin's size
   is scaled down just enough, never below the floor that script works out per card, and the
   result arrives as data-title-fit plus --title-fit-size on the title button. The size is set
   here with !important because a few skins (noir, atelier) set their size on the button itself.
   Only a closed card: an opened card keeps its skin's full size. While the script measures it
   puts .title-measuring on the deck for the length of one task: every title on one line at
   its skin's own size (the rule above is switched off by the :not), no transitions, and
   nothing is painted in that state. */
.grid-deck:not(.title-measuring) .section:not(.expanded) h2 .card-open[data-title-fit] {
    font-size: var(--title-fit-size) !important;
}
.grid-deck.title-measuring .section:not(.expanded) h2 .card-open {
    white-space: nowrap;
    flex: none;
}
.grid-deck.title-measuring .section:not(.expanded) h2,
.grid-deck.title-measuring .section:not(.expanded) h2 .card-open {
    transition: none !important;
    animation: none !important;
}

/* The title is a real button (modal.js makeTitleButton) that must read as the old title text. */
.section h2 .card-open {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-shadow: inherit;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    text-align: inherit;
    cursor: pointer;
}

.section h2 .card-open:focus-visible {
    outline: 2px solid var(--toxic);
    outline-offset: 3px;
    border-radius: 2px;
}

.section h2::before {
    content: var(--glyph);
    color: var(--hazard);
    font-size: 1.05rem;
    text-shadow: none;
    flex: 0 0 auto;
}

.section > p {
    font-family: var(--font-mono);
    font-size: max(.7rem, var(--fs-min));
    letter-spacing: 1px;
    color: var(--text-dim);
    text-transform: var(--case-heads, uppercase);
    margin-bottom: 10px;
    line-height: 1.5;
    flex: 0 0 auto;
}

.section ul {
    list-style: none;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.section ul li {
    font-family: var(--font-mono);
    font-size: .78rem;
    color: var(--text);
    padding: 6px 8px;
    border-left: 2px solid var(--toxic-dim);
    background: var(--overlay-1);
    margin-bottom: 5px;
}

.section ul li:hover {
    border-left-color: var(--toxic);
    background: rgba(var(--toxic-rgb), .06);
}

/* Collapsed cards clip their guts; expanding reveals everything */
.section:not(.expanded) {
    height: 100%;
}

.section.updated {
    animation: updatedPulse 2s ease-in-out;
    z-index: 100;
    border-color: var(--hazard) !important;
}

@keyframes updatedPulse {
    0%   { box-shadow: 0 0 12px rgba(var(--hazard-rgb), .35); }
    50%  { box-shadow: 0 0 34px rgba(var(--hazard-rgb), .75); }
    100% { box-shadow: 0 0 12px rgba(var(--hazard-rgb), .35); }
}

.section.moving {
    transition: all .5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================================
   EXPANDED SECTION (modal) - opaque, no blur, in-theme
   ============================================================ */
.section.expanded {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: 90vw !important;
    max-width: 1100px !important;
    height: auto !important;
    max-height: 85vh !important;
    min-height: 50vh !important;
    z-index: 10000 !important;
    background: var(--modal-fill) !important;
    background-image: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid var(--toxic-dim) !important;
    border-radius: var(--radius-modal, 0) !important;
    clip-path: none !important;
    box-shadow:
        0 0 0 1px rgba(0,0,0,.9),
        0 0 calc(30px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.13 * var(--glow-k))),
        0 30px 90px rgba(0,0,0,.95) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 34px 26px 26px !important;
    isolation: isolate !important;
    clip-path: none !important;
    opacity: 1 !important;
    cursor: default !important;
}

.section.expanded::before {
    height: 8px;
    opacity: 1;
}

.section.expanded::after {
    content: var(--label-active);
    position: absolute;
    left: 26px;
    bottom: 8px;
    width: auto;
    height: auto;
    border: none;
    font-family: var(--font-mono);
    font-size: max(.52rem, var(--fs-min));
    letter-spacing: var(--tracking-h2, 2.5px);
    color: rgba(var(--toxic-rgb), .45);
    opacity: 1;
}

.section.expanded:hover {
    transform: translate(-50%, -50%) !important;
    box-shadow:
        0 0 0 1px rgba(0,0,0,.9),
        0 0 calc(34px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.15 * var(--glow-k))),
        0 30px 90px rgba(0,0,0,.95) !important;
}

.section.expanded h2 {
    font-size: 1.25rem;
    letter-spacing: var(--tracking-heads, 4px);
    border-bottom: 2px solid var(--toxic-dim);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.section.expanded > p {
    font-size: .75rem;
}

body.has-expanded {
    overflow: hidden;
}

body.has-expanded::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.82);
    z-index: 9990;
    pointer-events: none;
}

body.has-expanded .section:not(.expanded) {
    filter: grayscale(.6);
}

/* The dock sits over the deck and the scrim year-round (z-index 9995), but
   `.section.expanded` itself is 10000 — above the dock. Lift the dock past it only
   while a card is open, so a playing track's dock is never hidden behind the modal's
   own bottom-right edge; the dock is bottom-right, the modal's close button top-right,
   so the two never compete for the same corner. */
body.has-expanded .now-playing {
    z-index: 10001;
}

.modal-overlay { display: none; }

.close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background: var(--modal-fill);
    color: var(--hazard);
    border: 1px solid var(--hazard);
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-family: var(--font-stencil);
    font-size: 1.15rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .18s ease;
}

.close-btn:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: var(--on-accent);
    box-shadow: 0 0 14px rgba(var(--danger-rgb), .6);
}

/* ------------------------------------------------------------
   PHONE: an opened card is the whole screen (review batch 6, F3, Dan 2026-11-13).
   Keyed on the width, not on html[data-display="phone"] (a phone's browser never sets
   that attribute), and written with !important plus a doubled class so it beats the
   desktop dialog rule above, the phone-display rule at the top of this file and every
   skin's own .section.expanded rule. js/modal.js pushes a history entry for a card opened
   at this width, so the Back gesture closes the card instead of leaving the hub.
   - the close button is 48px (44 is the floor), fixed, so it stays in view while the card
     scrolls, and the title leaves room for it;
   - the menu button is put away while a card is open (it sat over the card's corner);
   - 100vh first, 100dvh after it, for the old WebView / iOS 15 that drop the second;
   - no safe-area insets: app.html has no viewport-fit=cover, so a browser already keeps the page
     out of the notch and env(safe-area-inset-*) was always 0 here. Adding viewport-fit=cover
     would move every fixed element (menu button, header, now-playing dock) under the notch,
     which is a bigger change than this card is worth. ------------------------------------------------------------ */
@media (max-width: 600px) {
    body.has-expanded .nav-toggle { display: none !important; }
    body.has-expanded::after { display: none; }
    html body .section.expanded.section {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: none !important;
        width: 100% !important;
        max-width: none !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: none !important;
        min-height: 0 !important;
        border-radius: 0 !important;
        border-left: 0 !important;
        border-right: 0 !important;
        padding: 14px 16px 24px !important;
    }
    html body .section.expanded.section:hover { transform: none !important; }
    html body .section.expanded h2 { padding-right: 60px !important; }
    .section.expanded .close-btn {
        position: fixed;
        top: 6px;
        right: 8px;
        width: 48px;
        height: 48px;
        font-size: 1.7rem;
        z-index: 10002;
    }
}

/* Dan's rule (2026-10-07): the compact card shows the content and the interactions that
   are the content; management controls (add forms, per-row edit/remove, source pickers)
   carry `.card-manage` and appear only in the expanded view. Judged per widget.
   !important because widget classes (.compact-row and the like) set their own `display`,
   and one shared rule has to win whatever their specificity. Inside the expanded card
   this rule does not match, so the element keeps whatever display its own rules give it,
   and `[hidden]` still works.
   `.card-compact` is the mirror image, for the rare card whose small view is a different
   shape from its expanded one (Family Radio's all-sources list): shown on the deck,
   hidden once the card is expanded. */
.section:not(.expanded) .card-manage { display: none !important; }
.section.expanded .card-compact { display: none !important; }

/* Weather's member rows: every one is rendered, three show on a closed card and the
   "N not sharing" line only on an opened one. The fold lives here rather than in the
   render because onExpand skips a fresh render, and a render-time check would freeze
   whichever state the data arrived in (weather.js, renderMembers). !important because
   each row carries an inline display:flex. */
.section:not(.expanded) .weather-member:nth-child(n+4),
.section:not(.expanded) .weather-not-sharing { display: none !important; }

.section.expanded .song-list { max-height: 300px; }
.section.expanded .clip-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }

/* ============================================================
   GENERIC CONTROLS
   ============================================================ */
button, input, select, textarea {
    font-family: var(--font-mono);
    font-size: .78rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="date"],
input[type="time"],
textarea,
select {
    background: var(--modal-fill);
    border: 1px solid var(--line-strong);
    color: var(--text);
    padding: 8px 10px;
    outline: none;
    border-radius: var(--radius-control, 0);
    transition: border-color .18s ease, box-shadow .18s ease;
}

button { border-radius: var(--radius-control, 0); }

input::placeholder, textarea::placeholder {
    color: var(--text-dimmer);
    letter-spacing: 1px;
    text-transform: var(--case-heads, uppercase);
    font-size: max(.7rem, var(--fs-min));
}

input:focus, textarea:focus, select:focus {
    border-color: var(--toxic-dim);
    box-shadow: 0 0 calc(7px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.13 * var(--glow-k)));
}

input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--toxic);
    outline-offset: 1px;
}

select option {
    background: var(--modal-fill);
    color: var(--text);
}

/* Shared industrial button look */
.upload-btn,
.video-btn,
.recipe-btn,
.add-message-btn,
.add-symbol-btn,
.refresh-tickers-btn,
.view-more-btn,
.project-add-btn,
.project-cancel-btn,
.add-project-btn,
.youtube-add-btn,
.youtube-cancel-btn,
.add-youtube-btn,
.discord-open-btn,
.discord-save-btn,
.discord-send-btn,
.playlist-action-btn,
.add-to-playlist-btn,
.play-btn,
.new-quote-btn {
    background: linear-gradient(180deg, var(--bg-panel-raised) 0%, var(--bg-raised-2) 100%);
    border: 1px solid var(--line);
    border-bottom-color: var(--bg-deep);
    color: var(--text);
    font-family: var(--font-stencil);
    font-size: max(.66rem, var(--fs-min));
    letter-spacing: 1.4px;
    text-transform: var(--case-heads, uppercase);
    padding: 8px 12px;
    cursor: pointer;
    transition: all .18s ease;
    white-space: nowrap;
}

/* .discord-open-btn is an <a>, not a <button> — it needs these two the others get free. */
.discord-open-btn {
    display: inline-block;
    text-decoration: none;
}

.upload-btn:hover,
.video-btn:hover,
.recipe-btn:hover,
.add-message-btn:hover,
.add-symbol-btn:hover,
.refresh-tickers-btn:hover,
.view-more-btn:hover,
.project-add-btn:hover,
.project-cancel-btn:hover,
.add-project-btn:hover,
.youtube-add-btn:hover,
.youtube-cancel-btn:hover,
.add-youtube-btn:hover,
.discord-open-btn:hover,
.discord-save-btn:hover,
.discord-send-btn:hover,
.playlist-action-btn:hover,
.add-to-playlist-btn:hover,
.play-btn:hover,
.new-quote-btn:hover {
    border-color: var(--toxic);
    color: var(--toxic);
    box-shadow: 0 0 calc(9px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.16 * var(--glow-k)));
}

/* Primary / affirmative actions */
.add-message-btn,
.add-symbol-btn,
.project-add-btn,
.youtube-add-btn,
.discord-open-btn,
.discord-send-btn,
.discord-save-btn,
.add-project-btn,
.add-youtube-btn,
.play-btn {
    border-color: var(--toxic-dim);
    color: var(--toxic);
}

/* Secondary / cancel */
.upload-btn.secondary,
.video-btn.secondary,
.recipe-btn.secondary,
.project-cancel-btn,
.youtube-cancel-btn {
    color: var(--text-dim);
    border-color: var(--line);
}

.project-cancel-btn:hover,
.youtube-cancel-btn:hover {
    border-color: var(--danger);
    color: var(--danger);
    box-shadow: 0 0 12px rgba(var(--danger-rgb), .3);
}

/* Destructive */
.youtube-delete-btn,
.remove-ticker-btn {
    background: rgba(var(--danger-rgb), .08);
    border: 1px solid rgba(var(--danger-rgb), .4);
    color: var(--danger);
    font-family: var(--font-mono);
    font-size: max(.7rem, var(--fs-min));
    letter-spacing: 1px;
    padding: 5px 9px;
    cursor: pointer;
    transition: all .18s ease;
}

.youtube-delete-btn:hover,
.remove-ticker-btn:hover {
    background: var(--danger);
    color: var(--on-accent);
    box-shadow: 0 0 12px rgba(var(--danger-rgb), .5);
}

/* Range inputs -> toxic green */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--modal-fill);
    border: 1px solid var(--line-strong);
    outline: none;
    cursor: pointer;
}

input[type="range"]:focus-visible {
    outline: 2px solid var(--toxic);
    outline-offset: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 16px;
    background: var(--toxic);
    border: 1px solid #000;
    cursor: pointer;
    box-shadow: 0 0 calc(6px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.27 * var(--glow-k)));
}

input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 16px;
    background: var(--toxic);
    border: 1px solid #000;
    border-radius: 0;
    cursor: pointer;
    box-shadow: 0 0 calc(6px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.27 * var(--glow-k)));
}

/* ============================================================
   TABS (music library + video library)
   ============================================================ */
.browser-tabs,
.video-library-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 10px;
    flex-wrap: wrap;
    flex: 0 0 auto;
}

.browser-tab,
.video-library-tab {
    background: var(--bg-shade-a);
    border: 1px solid var(--line);
    border-bottom: none;
    color: var(--text-dim);
    font-family: var(--font-stencil);
    font-size: max(.62rem, var(--fs-min));
    letter-spacing: 1.4px;
    text-transform: var(--case-heads, uppercase);
    padding: 7px 11px;
    cursor: pointer;
    transition: all .18s ease;
    position: relative;
    top: 1px;
}

.browser-tab:hover,
.video-library-tab:hover {
    color: var(--toxic);
    background: rgba(var(--toxic-rgb), .06);
}

.browser-tab.active,
.video-library-tab.active {
    background: var(--modal-fill);
    color: var(--toxic);
    border-color: var(--toxic-dim);
    box-shadow: inset 0 2px 0 var(--toxic);
}

/* ============================================================
   PHOTOS
   ============================================================ */
.upload-area {
    border: 1px dashed var(--line);
    background: var(--overlay-2);
    padding: 12px;
    text-align: center;
    margin-bottom: 10px;
    transition: all .18s ease;
}

.upload-area p {
    font-family: var(--font-mono);
    font-size: max(.64rem, var(--fs-min));
    letter-spacing: 1.6px;
    text-transform: var(--case-heads, uppercase);
    color: var(--text-dim);
    margin-bottom: 8px;
}

.upload-area:hover {
    border-color: var(--toxic-dim);
    box-shadow: 0 0 calc(10px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.08 * var(--glow-k))) inset;
}

/* The same job as .upload-area with none of the furniture: no dashed box, no headline,
   just the buttons and whatever the module hangs under them (the circle picker, the
   upload status). Video Clips wears it — the card exists to show clips, and the bordered
   version was spending ~90px on a sentence. Photographs keeps .upload-area: it is the
   one card where the invitation to add something is the point. */
.upload-toolbar {
    flex: 0 0 auto;
    margin-bottom: 2px;
}

.upload-toolbar > .compact-row { margin-bottom: 0; }

.upload-toolbar .circle-picker-wrap { margin-top: 6px; }

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 6px;
    overflow-y: auto;
    align-content: start;
    flex: 1 1 auto;
    min-height: 0;
}

.photo-item {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--modal-fill);
    border: 1px solid var(--line);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: max(.68rem, var(--fs-min));
    transition: all .18s ease;
}

/* ---------------------------------------------------------- controls inside cards
   The widgets added this year build their own add rows and action buttons, and the
   first phone pass measured every one of them at 18-21px tall. A floor for anything a
   finger has to hit: modest on a desktop, where the deck is deliberately dense, and the
   full 44px that a thumb reliably lands on wherever the pointer is coarse. */

.section-body button {
    min-height: 28px;
    padding-left: 8px;
    padding-right: 8px;
}

@media (pointer: coarse) {
    .section-body button,
    .section-body select,
    .section-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
        min-height: 44px;
        font-size: 16px; /* under 16px, iOS zooms the page on focus */
    }

    .section-body input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }
}

/* ============================================================
   COMPACT ROWS
   The "type something and press Add" strip at the top of a card. Left at the generic
   control size it stands as tall as a row of content — on Stocks the add strip was the
   same height as a quote, which makes a four-quote card look like a form. `.compact-row`
   is the one class for all of them: a single flex line whose field takes the slack and
   whose buttons take only what they need.

   The shrink itself is fenced behind a mouse: `@media (hover: hover) and (pointer: fine)`
   is the dense deck, and it is the only place the complaint exists. On a phone the
   coarse-pointer rule above keeps every control at its 44px target and 16px font, and
   this block is simply not in play — so nothing here can shrink a touch target.

   Worn by (add the class in the module's init, next to the row's own class):
     .symbol-lookup  - Stocks & Crypto   (symbol + Add + refresh)
     .pod-search-row - Podcasts          (find a show + search)
     .upload-toolbar - Video Clips       (Add clips + Record)
   ============================================================ */
.compact-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    min-width: 0;
}

.compact-row > input,
.compact-row > select { flex: 1 1 auto; min-width: 0; }

.compact-row > button { flex: 0 0 auto; }

@media (hover: hover) and (pointer: fine) {
    .section-body .compact-row > input,
    .section-body .compact-row > select {
        padding: 4px 8px;
        font-size: max(.72rem, var(--fs-min));
    }

    .section-body .compact-row > input::placeholder {
        font-size: max(.64rem, var(--fs-min));
        letter-spacing: .8px;
    }

    .section-body .compact-row > button {
        min-height: 0;
        padding: 4px 9px;
        font-size: max(.58rem, var(--fs-min));
        letter-spacing: 1px;
    }
}

/* ---------------------------------------------------------- circles
   Who inside a family sees what (docs/CIRCLES.md). Three pieces: the picker that rides
   on a composer, the badge on an item that is not for everyone, and the Settings panel.
   All themed, because unlike the sign-in page these live INSIDE the hub. */

.circle-picker-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: var(--text-dim);
}

.circle-picker-wrap { flex-wrap: wrap; }

.circle-picker-field { display: inline-flex; align-items: center; gap: 6px; }

.circle-picker-label { white-space: nowrap; }

/* The "?" beside the picker (opened card only, via .card-manage). Two classes, so it
   outranks `.section-body button`'s floor and padding and stays a true circle; the coarse-
   pointer 44px is in the TAP TARGETS block at the end of the file. */
.circle-picker-wrap { position: relative; }

.circle-picker-wrap .circle-help {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    font-family: inherit;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1;
    color: var(--text-dim);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
}

.circle-picker-wrap .circle-help[aria-expanded="true"] { color: var(--text); border-color: var(--toxic-dim, var(--line)); }

.circle-picker-wrap .circle-help:focus-visible {
    outline: 2px solid var(--toxic);
    outline-offset: 1px;
}

/* Floats under the picker instead of taking a row, so the composer around it (an Add
   button in the same row, on the calendar and rides) does not reflow when it opens. */
.circle-help-text {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 5;
    width: max-content;
    max-width: min(20rem, calc(100vw - 48px));
    padding: 6px 10px;
    font-size: .78rem;
    line-height: 1.4;
    white-space: normal;
    color: var(--text);
    background: var(--modal-fill);
    border: 1px solid var(--line);
    border-radius: var(--radius-control, 6px);
}

.circle-help-text[hidden] { display: none; }

.circle-picker {
    font-family: inherit;
    font-size: .78rem;
    color: var(--text);
    background: var(--bg-inset, var(--modal-fill));
    border: 1px solid var(--line);
    border-radius: var(--radius-control, 6px);
    padding: 4px 6px;
    max-width: 12rem;
}

.circle-picker:focus-visible {
    outline: 2px solid var(--toxic);
    outline-offset: 1px;
}

.circle-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    border: 1px solid var(--toxic-dim, var(--line));
    color: var(--toxic, var(--text-dim));
    font-family: var(--font-mono);
    font-size: max(.64rem, var(--fs-min));
    letter-spacing: .04em;
    text-transform: uppercase;
    vertical-align: middle;
}

/* On a 72px contact-sheet cell there is no room beside anything: it sits under the
   thumbnail with the caption, not next to it. */
.circle-badge-on-photo {
    display: block;
    margin: 2px 0 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.circle-list { display: flex; flex-direction: column; gap: 8px; }

.circle-row {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control, 6px);
    background: var(--bg-inset, transparent);
}

.circle-row-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

/* inline-flex for At home's house glyph before the name (migration 0049). */
.circle-row-name { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
/* At home's one-line hint. */
.circle-row-glyph { flex: 0 0 auto; }
.circle-row-hint { margin: 2px 0 0; }

.circle-row-count {
    font-family: var(--font-mono);
    font-size: max(.7rem, var(--fs-min));
    color: var(--text-dim);
    white-space: nowrap;
}

.circle-row-members {
    margin-top: 3px;
    font-size: .8rem;
    color: var(--text-dim);
}

.circle-row-actions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }

.circle-editor {
    margin: 6px 0 0;
    padding: 10px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-control, 6px);
}

.circle-editor-row { margin-bottom: 8px; }
.circle-editor-row:last-child { margin-bottom: 0; }

.circle-ticks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-bottom: 10px;
}

.circle-tick {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .85rem;
    /* 44px of touch target on a phone even though the tick itself is small. */
    min-height: 32px;
}

.circle-tick input[disabled] + span { opacity: .6; }

.circle-create {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.circle-create .set-input { flex: 1 1 12rem; min-width: 0; }
.circle-create-hint { margin-top: 6px; }

/* "How circles work" / "How circles and sides work": the button at the head of the panel and
   the dialog it opens (js/sections/_circles-explainer.js). The dialog is drawn on <body>
   above the expanded Settings card (9500) and the dock (9995), next to first-run's 11000;
   tokens only, so it wears whichever skin is on. */
.circle-explain-open-row { margin: 10px 0; }

.circle-explain {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.circle-explain-scrim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .62);
}

.circle-explain-dialog {
    position: relative;
    box-sizing: border-box;
    width: min(620px, 100%);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-top: 3px solid var(--toxic-dim);
    border-radius: var(--radius-card, 4px);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .55);
    color: var(--text);
}

.circle-explain-dialog:focus-visible { outline: 1px solid var(--toxic-dim); outline-offset: 2px; }

.circle-explain-dismiss {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 36px;
    min-height: 36px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}
.circle-explain-dismiss:hover { color: var(--text); }
.circle-explain-dismiss:focus-visible { outline: 2px solid var(--toxic); outline-offset: -2px; }

.circle-explain-title {
    margin: 0;
    padding: 16px 48px 8px 20px;
    font-family: var(--font-stencil);
    font-size: 1.1rem;
    text-transform: var(--case-heads, none);
}

.circle-explain-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0 20px 6px;
    font-size: .85rem;
    line-height: 1.5;
}

.circle-explain-section + .circle-explain-section {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.circle-explain-heading {
    margin: 4px 0 6px;
    font-size: .95rem;
    font-weight: 700;
}

.circle-explain-p { margin: 0 0 8px; color: var(--text-dim); }

.circle-explain-list {
    margin: 0 0 8px;
    padding-left: 20px;
    color: var(--text-dim);
}
.circle-explain-list li + li { margin-top: 5px; }
.circle-explain-rule-lead { margin-bottom: 2px; }
.circle-explain-rule { margin-bottom: 10px; }

.circle-explain-example {
    margin: 10px 0;
    padding: 8px 12px;
    background: var(--overlay-1, transparent);
    border-left: 3px solid var(--toxic-dim);
    border-radius: var(--radius-control, 6px);
}

.circle-explain-watch {
    margin: 10px 0;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--danger);
    border-radius: var(--radius-control, 6px);
}

/* Its own scroll box: a narrow phone scrolls the table, never the page. */
.circle-explain-scroll { overflow-x: auto; }

.circle-explain-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: .8rem;
}
.circle-explain-table th,
.circle-explain-table td {
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}
.circle-explain-table thead th {
    border-bottom: 1px solid var(--line);
    font-weight: 700;
}
.circle-explain-table .circle-explain-q th {
    padding-top: 10px;
    padding-bottom: 0;
    color: var(--text-dim);
    font-size: max(.72rem, var(--fs-min));
    font-weight: 600;
}

.circle-explain-tip { margin: 12px 0 4px; font-weight: 600; }

.circle-explain-foot {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    padding: 10px 20px 14px;
    border-top: 1px solid var(--line);
}

@media (max-width: 480px) {
    .circle-explain { padding: 8px; }
    .circle-explain-dialog { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
    .circle-explain-title { padding-left: 16px; }
    .circle-explain-body { padding: 0 16px 6px; }
    .circle-explain-foot { padding-left: 16px; padding-right: 16px; }
}

/* ---------------------------------------------------------- sides
   Settings › Family › Sides (owner only; js/sections/_sides.js, docs/CIRCLES.md). The
   circles panel's language — the row is the unit — plus the one thing circles do not have:
   the "who can this person see" preview, where the people a member CANNOT see are drawn
   as dashed chips so a wall reads at a glance before anybody trusts it. */

.side-intro {
    margin: 0 0 12px;
    font-size: .86rem;
    line-height: 1.5;
    color: var(--text);
    max-width: 62ch;
}

.side-list { display: flex; flex-direction: column; gap: 8px; }

.side-row {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control, 6px);
    background: var(--bg-inset, transparent);
}

.side-row-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.side-row-name { font-weight: 600; overflow-wrap: anywhere; }

.side-row-count {
    font-family: var(--font-mono);
    font-size: max(.7rem, var(--fs-min));
    color: var(--text-dim);
    white-space: nowrap;
}

.side-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }

.side-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 2px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .78rem;
    line-height: 1.4;
    color: var(--text);
    overflow-wrap: anywhere;
}

/* Someone this person cannot see. Dashed and dim rather than red: a wall is the owner's
   decision working, not an error. --text-dim holds 4.5:1 on every skin. */
.side-chip-hidden {
    border-style: dashed;
    color: var(--text-dim);
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.side-empty { font-size: .8rem; color: var(--text-dim); }

.side-row-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

.side-editor {
    margin-top: 10px;
    padding: 10px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-control, 6px);
}

.side-editor-row { margin-bottom: 8px; }
.side-editor-row:last-child { margin-bottom: 0; }

.side-ticks {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
    margin: 0 0 10px;
    padding: 0;
    border: 0;
    min-width: 0;
}

.side-ticks-legend {
    width: 100%;
    padding: 0;
    margin-bottom: 4px;
    font-size: .78rem;
    color: var(--text-dim);
}

.side-tick {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    min-height: 32px;
}

.side-tick.is-owner span { color: var(--text-dim); }

.side-create { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.side-create .set-input { flex: 1 1 12rem; min-width: 0; }

.side-preview { margin-top: 6px; }
.side-preview-hint { margin-bottom: 8px; }

.side-preview-list {
    border: 1px solid var(--line);
    border-radius: var(--radius-control, 6px);
    overflow: hidden;
}

.side-preview-row + .side-preview-row { border-top: 1px solid var(--line); }

.side-preview-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 40px;
    padding: 6px 12px;
    cursor: pointer;
    list-style: none;
}

.side-preview-summary::-webkit-details-marker { display: none; }

.side-preview-summary::after {
    content: '';
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    margin-left: 4px;
    border-right: 1.5px solid var(--text-dim);
    border-bottom: 1.5px solid var(--text-dim);
    transform: rotate(-45deg);
    transition: transform .18s cubic-bezier(.2, .8, .2, 1);
}

.side-preview-row[open] > .side-preview-summary::after { transform: rotate(45deg); }

.side-preview-summary:hover { background: var(--overlay-1, transparent); }

.side-preview-summary:focus-visible {
    outline: 2px solid var(--toxic);
    outline-offset: -2px;
}

.side-preview-name { font-weight: 600; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }

.side-preview-count {
    font-family: var(--font-mono);
    font-size: max(.7rem, var(--fs-min));
    color: var(--text-dim);
    white-space: nowrap;
}

.side-preview-count.is-walled { color: var(--hazard, var(--text)); }

.side-preview-body { padding: 2px 12px 12px; }

.side-preview-label {
    margin-top: 8px;
    font-size: max(.74rem, var(--fs-min));
    color: var(--text-dim);
}

@media (prefers-reduced-motion: reduce) {
    .side-preview-summary::after { transition: none; }
}

/* ---------------------------------------------------------- kin
   Settings > Kin (the four link states) and the Kin card's mailbox. Same visual
   language as the circles panel above; the row is the unit in both. */

.kin-group { margin-bottom: 12px; }

.kin-row {
    padding: 8px 10px;
    margin-top: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control, 6px);
    background: var(--bg-inset, transparent);
}

.kin-row-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.kin-row-name { font-weight: 600; }

.kin-row-slug {
    font-family: var(--font-mono);
    font-size: max(.7rem, var(--fs-min));
    color: var(--text-dim);
    white-space: nowrap;
}

.kin-row-relation { margin-top: 3px; font-size: .8rem; color: var(--text-dim); }
.kin-row-actions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }

.kin-ask { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.kin-ask .set-input { flex: 1 1 10rem; min-width: 0; }

/* "Lands in: Everyone / <circle>" — which circle this household files that family's
   mail into (migration 0024, docs/KIN.md). One line for the control and one for what it
   means, because the sentence is the part people need. */
.kin-row-landing { margin-top: 8px; }
.kin-landing-wrap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kin-landing-wrap .set-hint { margin: 0; white-space: nowrap; }
.kin-landing { flex: 0 1 12rem; min-width: 0; }

/* The card. The mailbox is a column of received copies, newest first. */
.kin-families { margin-bottom: 4px; }
.kin-item:first-child { border-top: none !important; }

/* The empty state is two short lines (no composer, no mailbox rows) — `.section.expanded`'s
   shared `min-height: 50vh` reserves far more room than that and left a wall of blank
   space under them. Scoped to this card only: every other widget's empty state pairs
   with a fuller add-row that actually wants the height. Same specificity as the shared
   rule (two classes), so source order — this comes later in the file — is what wins. */
.kin-section.expanded {
    min-height: 0 !important;
}

/* Used by the circles panel and available to any settings block that needs them. */
.set-btn-danger { border-color: var(--danger, #b3241f); color: var(--danger, #b3241f); }
.set-msg-bad { color: var(--danger, #b3241f); }

/* ---------------------------------------------------------- the photo viewer
   Full-screen, themed, and parked on <body> so no card can clip it. Every control
   is at least 44px, which is the smallest thing a thumb reliably hits — and the
   smallest thing that works at arm's length on a wall or fridge screen. */

.photo-viewer {
    position: fixed;
    inset: 0;
    /* Above an expanded card (10000): the viewer is usually opened FROM one. */
    z-index: 10500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: rgba(0, 0, 0, .88);
}

.photo-viewer[hidden] { display: none; }

body.photo-viewer-open { overflow: hidden; }

.photo-viewer-stage {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-viewer-img {
    max-width: min(100%, 1600px);
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-card, 6px);
    box-shadow: 0 18px 60px rgba(0, 0, 0, .6);
}

.photo-viewer-bar {
    flex: 0 0 auto;
    max-width: 900px;
    text-align: center;
    color: var(--text, #e6e9ec);
}

.photo-viewer-caption {
    font-size: 1rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.photo-viewer-count {
    margin-top: 4px;
    font-family: var(--font-mono, monospace);
    font-size: .8rem;
    color: var(--text-dim, #9aa4ae);
}

.photo-viewer-btn {
    position: absolute;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--text, #e6e9ec);
    background: rgba(0, 0, 0, .55);
    border: 1px solid var(--line, rgba(255, 255, 255, .25));
    border-radius: var(--radius-control, 8px);
    cursor: pointer;
}

.photo-viewer-btn:hover { border-color: var(--toxic, #9ecb3a); color: var(--toxic, #9ecb3a); }
.photo-viewer-btn[hidden] { display: none; }

.photo-viewer-close { top: 14px; right: 14px; font-size: 1.2rem; }
.photo-viewer-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.photo-viewer-next { right: 14px; top: 50%; transform: translateY(-50%); }

/* Phones: the arrows move off the edges and sit under the photograph, where a thumb
   already is, instead of where a mouse would be. */
@media (max-width: 520px) {
    .photo-viewer-prev { left: 10px; }
    .photo-viewer-next { right: 10px; }
    .photo-viewer-caption { font-size: .92rem; }
}

.photo-item {
    cursor: zoom-in;
}

.photo-item:hover {
    border-color: var(--toxic-dim);
    color: var(--toxic);
    box-shadow: 0 0 calc(9px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.11 * var(--glow-k)));
}

/* Real photo cells (server-backed uploads) */
.photo-cell {
    position: relative;
    overflow: hidden;
}

img.photo-item {
    width: 100%;
    height: 72px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

/* A clip cell carries the same ✕ (clips.js gives it this class) but had no rule of its
   own, so the button fell out of the tile as a bare default button below it. */
.clip-cell { position: relative; }

.photo-cell .photo-delete-btn,
.clip-cell .photo-delete-btn {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    line-height: 18px;
    text-align: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: max(0.7rem, var(--fs-min));
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s ease;
}
.photo-cell:hover .photo-delete-btn,
.photo-cell:focus-within .photo-delete-btn,
.clip-cell:hover .photo-delete-btn,
.clip-cell:focus-within .photo-delete-btn { opacity: 1; }
.photo-cell .photo-delete-btn:hover,
.clip-cell .photo-delete-btn:hover {
    border-color: var(--toxic-dim);
    color: var(--toxic);
}

.photo-cell .photo-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2px 4px;
    font-size: max(0.62rem, var(--fs-min));
    line-height: 1.2;
    color: #fff;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The folded deck card is one tight line per thumbnail, but the expanded modal has the
   width to spare — a full caption there is worth more than an ellipsis. */
.section.expanded .photo-cell .photo-caption {
    white-space: normal;
    text-overflow: clip;
}

/* ---- Family Photos: tiles that fill whatever size the card has been given ----
   Square tiles in an auto-fill grid: the column count follows the card's width (so a card
   a person has made wider or narrower re-flows on its own) and the tile size follows the
   column, so the card is filled with photographs instead of one row of 72px thumbnails over
   dead space. A card that is short scrolls (and the clipping cue says so). The first photo
   is a 2 x 2 hero only where there are three or more columns (a container query on the
   grid, so it is the card's width that decides, not the screen's). Captions are 12px+ and
   shown on the hero and on hover or focus; on every other tile they wait (the viewer, one
   tap away, always has them). Scoped off .clip-grid: Video Clips shares .photo-grid. */
.photo-grid:not(.clip-grid) {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 6.5rem), 1fr));
    grid-auto-flow: dense;
    /* max-content: a short (half-height) card must scroll its square tiles, never squash them */
    grid-auto-rows: max-content;
    container: photo-grid / inline-size;
}
.section.expanded .photo-grid:not(.clip-grid) {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 11.25rem), 1fr));
    gap: 10px;
}
.photo-grid:not(.clip-grid) > .photo-cell {
    min-width: 0;
    border-radius: var(--radius-control, 0);
    background: var(--modal-fill);
}
/* A square by padding, not by aspect-ratio: a grid row is sized from its items' content,
   and a clipped cell with only an aspect-ratio contributes nothing, so the rows collapsed
   and the tiles overlapped. The image is absolute, so this is the cell's whole height. */
.photo-grid:not(.clip-grid) > .photo-cell::before {
    content: "";
    display: block;
    padding-top: 100%;
}
.photo-grid:not(.clip-grid) .photo-cell > img.photo-item {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.photo-grid:not(.clip-grid) .photo-cell > img.photo-item:focus-visible {
    outline: 2px solid var(--toxic);
    outline-offset: -3px;
}
.photo-grid:not(.clip-grid) .photo-caption {
    padding: 22px 8px 7px;
    border: 0;
    background: linear-gradient(transparent, var(--photo-scrim));
    color: var(--photo-scrim-ink);
    font-size: max(.78rem, var(--fs-min));
    line-height: 1.25;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0;
    transition: opacity .15s ease;
    pointer-events: none;   /* a tap on the caption is a tap on the photograph */
}
.photo-grid:not(.clip-grid) .photo-cell:hover .photo-caption,
.photo-grid:not(.clip-grid) .photo-cell:focus-within .photo-caption { opacity: 1; }
@container photo-grid (min-width: 21rem) {
    .photo-cell.photo-hero {
        grid-column: span 2;
        grid-row: span 2;
    }
    .photo-cell.photo-hero .photo-caption {
        opacity: 1;
        font-size: .92rem;
        padding-top: 32px;
    }
}
/* A card a person has made half height is too short for a hero: it would be the whole view.
   Every tile is ordinary there (and the grid scrolls, with the clipping cue). */
.section.widget-half:not(.expanded) .photo-cell.photo-hero {
    grid-column: auto;
    grid-row: auto;
}
.section.widget-half:not(.expanded) .photo-cell.photo-hero .photo-caption { opacity: 0; font-size: max(.78rem, var(--fs-min)); padding-top: 22px; }
.section.widget-half:not(.expanded) .photo-cell.photo-hero:hover .photo-caption,
.section.widget-half:not(.expanded) .photo-cell.photo-hero:focus-within .photo-caption { opacity: 1; }

.photo-status {
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--text-dim);
}

/* ============================================================
   VIDEO CLIPS (js/sections/clips.js)
   The album's sibling: poster tiles in the photo grid, played in
   the photo viewer with a <video> in the image's place.
   ============================================================ */
.clip-shelf {
    text-align: right;
    margin: -4px 0 6px;
}

.clip-grid {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
}

.clip-tile {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0;
    overflow: hidden;
    background: var(--modal-fill);
    border: 1px solid var(--card-edge, var(--line));
    border-radius: var(--radius-control, 4px);
    cursor: pointer;
    min-height: 0;
}

.clip-poster {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.clip-poster-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--text-dim);
}

.clip-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    border-radius: 50%;
    font-size: max(.7rem, var(--fs-min));
    padding-left: 2px;
    pointer-events: none;
}

.clip-tile:hover .clip-play { background: rgba(var(--toxic-rgb), .85); }

/* The glyph is the icon set's play triangle, filled; the scrim behind it is what makes
   it read on a bright poster, a dark one and the film mark of a light skin alike. */
.clip-play .ico { width: 13px; height: 13px; fill: currentColor; stroke-width: 1.5; }

/* The hover preview (clips.js): laid over the poster, which shows through until the
   first frame arrives, and under the glyph and the length. */
.clip-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.clip-length {
    position: absolute;
    right: 4px;
    bottom: 4px;
    padding: 1px 5px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-family: var(--font-mono);
    font-size: max(.62rem, var(--fs-min));
    border-radius: 3px;
    pointer-events: none;
}

.clip-viewer-video {
    width: min(100%, 1200px);
    max-height: 100%;
    background: #000;
}

/* ============================================================
   PODCASTS (js/sections/podcasts.js)
   The shows, the episodes, and the music card's slim transport bar
   (the .ms-trans rules in FAMILY MUSIC are written for `.pod` too), so
   the two players look and behave as one. The card opens on the newest
   episodes across every show; a show's artwork filters to that show.

   One DOM, three shapes, chosen here:
     narrow (1x1, phone)  a sideways strip of artwork over the episodes
     tall (1x2)           the shows as a short list, the episodes fill the rest
     wide (2-wide, 2x2,   shows in a column on the left, episodes on the right;
       opened)            the opened card adds each episode's summary
   `.pod` is an inline-size container: a card's column span reaches CSS
   only as an inline grid-column, so "wide" is measured, not classed.
   Search, results and unfollow are .card-manage and wait for the modal.
   ============================================================ */
.pod {
    container: pod / inline-size;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* the deck card is the shows and the episodes: the strapline goes, the opened view keeps it */
.section[data-section="podcasts"]:not(.expanded) > p { display: none; }

.pod-search-row {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}

.pod-search { flex: 1 1 auto; min-width: 0; }

/* Icon-only: the word "Search" next to a field that already says "Find a show or feed"
   was the second-widest thing in the card. The instruction lives on title/aria-label. */
.pod-search-btn {
    flex: 0 0 auto;
    padding-left: 8px;
    padding-right: 8px;
}

.pod-results {
    list-style: none;
    margin: 0 0 6px;
    padding: 0;
}

/* `.section ul` hands every list in a card `flex: 1 1 auto`, and it outranks a lone
   `.pod-results` — so the empty results list was quietly eating the card's slack and
   standing between the search row and the shows as a hand-sized gap. Two fixes, both
   needed: the empty list takes no box at all, and the sized rule below now carries
   enough specificity to actually beat `.section ul`. */
.pod-results:empty { display: none; }

/* Non-empty results are a contained panel, not a sheet floating over the shows tray:
   an opaque fill and a border so the followed-show tiles below never show through the
   gap between rows, on top of the card's own bounded scroll (see `.section .pod-results`
   below, which pins a real max-height rather than a flex percentage). */
.pod-results:not(:empty) {
    background: var(--modal-fill);
    border: 1px solid var(--line);
    border-radius: var(--radius-control, 0);
    padding: 2px 6px;
}

.pod-search-row { flex: 0 0 auto; }

/* The results are a block in the flow between the search row and the player: they push
   the bar, the shows and the episodes down rather than floating over them.

   Two things squeezed them to a ~15px strip in the opened card, and both are answered
   here. `.section.expanded ul { max-height: none }` (0,2,1) outranked the old
   `.section .pod-results` (0,2,0), so the ceiling was gone; and the list was a flex item
   with `flex-shrink: 1` and `overflow-y: auto`, whose automatic minimum height is 0 - so
   in a body whose shows and episodes already overflow it, the list was the thing that
   shrank to make room. It now never shrinks, and the ceiling carries the specificity to
   survive the opened card: about six results (56px rows), then it scrolls in place. */
.section .section-body > .pod-results {
    flex: 0 0 auto;
    min-height: auto;
    max-height: calc(6 * 56px + 6px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* `.section ul li` gives every list row a mono face, a left rule and a tinted fill; a
   result is a show, laid out like the followed shows' tiles. */
.section .pod-results > li {
    font-family: inherit;
    font-size: inherit;
    background: transparent;
    border-left: 0;
    margin: 0;
}
.section .pod-results > li:hover { background: var(--overlay-1); }
.section .pod-results > li:last-child { border-bottom-color: transparent; }

.section .pod-results > .pod-result {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 6px 4px;
    border-bottom: 1px solid var(--card-rule, var(--line));
}

.section .section-body > .pod-results .pod-art { width: 44px; height: 44px; font-size: 1.1rem; }

.pod-result-body { flex: 1 1 auto; min-width: 0; }
.pod-result-title,
.pod-result-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-result-title { font-size: .9rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.pod-result-meta { font-size: max(.74rem, var(--fs-min)); color: var(--text-dim); margin-top: 2px; }

.section-body .pod-results .pod-follow {
    flex: 0 0 auto;
    min-height: 44px;
    padding-left: 14px;
    padding-right: 14px;
}

.pod-main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ---- the shows: a sideways strip of artwork ---- */
.pod-shows {
    display: flex;
    flex: 0 0 auto;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
    padding: 2px 2px 4px;
}

.pod-show-wrap { position: relative; flex: 0 0 auto; }

.pod-show {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 60px;
    padding: 3px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-control, 6px);
    color: var(--text-dim);
    cursor: pointer;
    min-height: 0;
}

.pod-show:hover { background: var(--overlay-1); color: var(--text); }
.pod-show.is-selected { border-color: var(--toxic); color: var(--toxic); background: rgba(var(--toxic-rgb), .08); }
.pod-show:focus-visible { outline: 2px solid var(--toxic); outline-offset: 1px; }

.pod-art {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: var(--radius-control, 6px);
    background: var(--modal-fill);
    box-shadow: 0 2px 8px rgba(var(--shadow-ink-rgb), .22);
}

.pod-art-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.pod-show-name {
    max-width: 100%;
    font-size: max(.64rem, var(--fs-min));
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.pod-unfollow {
    position: absolute;
    top: 0;
    right: 0;
    font-size: .8rem !important;
}

/* ---- the episodes ---- */
.pod-eps {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pod-head {
    flex: 0 0 auto;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 0 6px 5px;
    border-bottom: 1px solid var(--line);
}

.pod-head[hidden] { display: none; }

.pod-title {
    min-width: 0;
    font-family: var(--font-mono);
    font-size: max(.66rem, var(--fs-min));
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-body .pod .pod-all {
    flex: 0 0 auto;
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--toxic);
    font-family: var(--font-mono);
    font-size: max(.7rem, var(--fs-min));
    letter-spacing: 0;
    text-transform: none;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.pod-episodes {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}

/* The deck's generic list-row tint (`.section ul li`) is for plain lists; these rows
   draw their own, as the setlist's do. */
.pod .pod-episodes > li {
    margin: 0;
    padding: 0;
    border-left: 0;
    border-bottom: 1px solid var(--overlay-1);
    background: transparent;
    font-size: inherit;
}

.pod .pod-episodes > li:hover { background: transparent; }
.pod .pod-episodes > li:last-child { border-bottom-color: transparent; }
.pod .pod-episodes > li.pod-note { border-bottom: 0; }
.pod .pod-episodes > .pod-ep.is-playing { background: rgba(var(--toxic-rgb), .1); border-bottom-color: transparent; }

.section-body .pod .pod-hit {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 0;
    padding: 6px;
    border: 0;
    border-radius: var(--radius-control, 4px);
    background: transparent;
    box-shadow: none;
    color: var(--text);
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
    text-align: left;
    cursor: pointer;
}

.section-body .pod .pod-hit:hover { background: var(--overlay-1); }
.section-body .pod .pod-hit:focus-visible { outline: 2px solid var(--toxic); outline-offset: -2px; }

.pod-ep-ic {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text-dim);
    transition: color .15s ease-out, border-color .15s ease-out, background-color .15s ease-out;
}

.pod-ep-ic .ico { width: 10px; height: 10px; fill: currentColor; }
.pod-hit:hover .pod-ep-ic { border-color: var(--toxic); color: var(--toxic); }
.pod-ep.is-playing .pod-ep-ic { background: var(--toxic); border-color: var(--toxic); color: var(--on-accent); }

.pod-ep-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.pod-ep-title,
.pod-ep-meta {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pod-ep-title { font-size: .82rem; line-height: 1.3; }
.pod-ep.is-playing .pod-ep-title { color: var(--toxic); font-weight: 700; }

.pod-ep-meta {
    font-family: var(--font-data);
    font-size: max(.68rem, var(--fs-min));
    line-height: 1.3;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

.pod-ep-desc {
    display: none;
    margin-top: 3px;
    font-size: .76rem;
    line-height: 1.45;
    color: var(--text-dim);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- the shows as a list: tall, wide and opened ----
   A strip of artwork with a sideways scrollbar is right for a one-row card, where height
   is the scarce thing. Given twice the height, or the width for a column of its own,
   the same shows read as a list — artwork left, name right, one show per line. */
.section.widget-tall:not(.expanded) .pod-shows {
    flex-direction: column;
    /* Does NOT shrink: the episode list below is the flexible one, and with forty
       episodes it would otherwise squeeze the shows down to a single clipped row.
       The cap still applies, so a long list of shows scrolls inside itself. */
    flex: 0 0 auto;
    gap: 2px;
    max-height: 34%;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2px;
}

.section.widget-tall:not(.expanded) .pod-show-wrap { width: 100%; }

.section.widget-tall:not(.expanded) .pod-show {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    gap: 10px;
    /* the unfollow ✕ is absolutely positioned at the wrap's top-right; in a row the
       title would run underneath it, so the row keeps that corner clear */
    padding: 3px 20px 3px 4px;
    text-align: left;
}

.section.widget-tall:not(.expanded) .pod-art { width: 36px; height: 36px; }
.section.widget-tall:not(.expanded) .pod-art-empty { font-size: 1rem; }

.section.widget-tall:not(.expanded) .pod-show-name {
    flex: 1 1 auto;
    min-width: 0;
    max-height: none;
    font-size: .78rem;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@container pod (min-width: 560px) {
    /* side by side: the shows are a column, the episodes take the rest */
    .pod-main {
        display: grid;
        grid-template-columns: minmax(200px, 32%) minmax(0, 1fr);
        column-gap: 18px;
    }

    .section .pod-shows {
        flex-direction: column;
        gap: 2px;
        max-height: none;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 2px;
    }

    .pod-show-wrap { width: 100%; }

    .pod-show {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        width: 100%;
        gap: 12px;
        padding: 4px 20px 4px 4px;
        text-align: left;
    }

    .pod-art { width: 44px; height: 44px; }
    .pod-art-empty { font-size: 1.1rem; }

    .pod-show-name {
        flex: 1 1 auto;
        min-width: 0;
        max-height: 2.6em;
        font-size: .8rem;
        line-height: 1.3;
        white-space: normal;
        text-align: left;
    }

    .pod-ep-title { font-size: .86rem; }
}

/* ---- opened: bigger artwork, each episode's summary, the list runs long ---- */
.section.expanded .pod-ep-desc { display: -webkit-box; }
.section.expanded .pod-episodes { flex: 0 0 auto; overflow: visible; }
.section.expanded .section-body .pod .pod-hit { padding: 9px 8px; align-items: flex-start; }
.section.expanded .pod-ep-ic { width: 32px; height: 32px; margin-top: 1px; }
.section.expanded .pod-ep-ic .ico { width: 12px; height: 12px; }
.section.expanded .pod-ep-title { font-size: .92rem; white-space: normal; }

@container pod (min-width: 560px) {
    .section.expanded .pod-main { align-items: start; }
    .section.expanded .pod-shows { position: sticky; top: 0; }
    .section.expanded .pod-art { width: 56px; height: 56px; }
    .section.expanded .pod-show-name { font-size: .86rem; }
}

@media (pointer: coarse) {
    .section.expanded .section-body .pod .pod-hit { min-height: 44px; }
    .section-body .pod .pod-all { min-height: 32px; }
}

/* ============================================================
   LIBRARY PLAYER + ROWS (clips.js, podcasts.js search results)
   Born as the music card's player; Video Clips still wears these classes
   (.music-row lists) and Podcasts' search results their row text. Family
   Music is the SETLIST block below and Podcasts borrows its transport bar;
   neither uses the rest, bar the rename row.
   ============================================================ */
.music-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.music-shelf {
    font-family: var(--font-mono);
    font-size: max(.68rem, var(--fs-min));
    color: var(--text-dim);
    letter-spacing: .4px;
}

.music-player {
    border: 1px solid var(--line);
    background: var(--overlay-2);
    border-radius: var(--radius-control, 4px);
    padding: 8px;
    margin-bottom: 8px;
}

.music-now {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-height: 1.2em;
    margin-bottom: 6px;
    font-size: .9rem;
    overflow: hidden;
}

.music-now-mark { color: var(--toxic); flex: 0 0 auto; }
.music-now-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-now-line, .music-now-empty { color: var(--text-dim); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.music-audio {
    display: block;
    width: 100%;
    height: 36px;
}

.music-transport {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.music-btn {
    background: var(--bg-panel-raised);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: var(--radius-control, 4px);
    cursor: pointer;
    font-size: .9rem;
    line-height: 1;
}

.music-btn:hover { border-color: var(--toxic); color: var(--toxic); }
.music-btn.is-on { border-color: var(--toxic); color: var(--toxic); background: rgba(var(--toxic-rgb), .12); }

.music-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.music-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 4px;
    border-bottom: 1px solid var(--line);
}

/* Same specificity trap as `.first-run`: `renameRow()` hides the row while its rename
   form stands in for it, so without this the track is on screen twice mid-rename. */
.music-row[hidden] { display: none; }

.music-row:last-child { border-bottom: 0; }
.music-row.is-playing { background: rgba(var(--toxic-rgb), .08); }
.music-row.is-playing .music-title { color: var(--toxic); }

.music-play {
    flex: 0 0 auto;
    width: 30px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
    font-size: .75rem;
    line-height: 1;
}

.music-play:hover { border-color: var(--toxic); color: var(--toxic); }

.music-body {
    flex: 1 1 auto;
    min-width: 0;
    cursor: pointer;
}

.music-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-meta { font-size: max(.74rem, var(--fs-min)); color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

/* A fixed, no-shrink box for the icon rather than "however wide the glyph happens to
   render" — `.music-meta`'s ellipsis already truncates the subtitle, but a glyph-sized
   box left it sitting right up against the truncated text with almost no breathing room. */
.music-edit,
.music-row .fc-del-btn {
    flex: 0 0 20px;
    width: 20px;
    text-align: center;
}

.music-edit {
    background: transparent;
    border: 0;
    color: var(--text-dim);
    cursor: pointer;
    font-size: .95rem;
}

.music-edit:hover { color: var(--toxic); }

.music-rename-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    padding: 6px 4px;
    border-bottom: 1px solid var(--line);
}

.music-rename { flex: 1 1 8rem; min-width: 0; }

/* ============================================================
   FAMILY MUSIC — THE SETLIST (js/sections/music.js)
   The small card IS the songs: a dense numbered list over a slim drawn
   transport bar that drives the card's own <audio>. Add songs, the meter
   and each row's rename/remove are .card-manage and wait for the modal.

   One DOM, four shapes, chosen here and never in JS:
     1x1 / half    title · artist, seven rows at the default size
     2-wide        two columns of rows, plus who added it and the length
     2-tall        one column, plus who added it and the length
     2x2 / opened  a table: # · song · artist · added by · time
   `.ms` is an inline-size container, because a card's column span reaches
   CSS only as an inline grid-column; .widget-tall is the height half.
   ============================================================ */
.ms {
    container: ms / inline-size;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ---- the list ---- */
.ms-list {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}

.ms-row {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--overlay-1);
    border-radius: var(--radius-control, 4px);
    font-family: var(--font-mono);
    color: var(--text);
}

.ms-row[hidden] { display: none; }

/* The deck's generic list-row tint (app.css + polish.css `.section ul li`) is for
   plain lists; the setlist draws its own rows, so it is undone here, by specificity. */
.ms .ms-list > li {
    margin: 0;
    padding: 0;
    border-left: 0;
    background: transparent;
    font-size: inherit;
    line-height: 1.35;
}

.ms .ms-list > li:hover { background: transparent; }
.ms .ms-list > .ms-rename-row { padding: 6px 4px; }
.ms-row:last-child { border-bottom-color: transparent; }

.ms .ms-hit {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    height: 29px;
    min-height: 0;
    padding: 0 6px;
    border: 0;
    border-radius: inherit;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: .84rem;
    text-align: left;
    cursor: pointer;
}

.ms .ms-hit:hover { background: var(--overlay-1); }
.ms .ms-hit:focus-visible { outline: 2px solid var(--toxic); outline-offset: -2px; }

.ms-n {
    flex: 0 0 16px;
    display: flex;
    justify-content: flex-end;
    font-family: var(--font-data);
    font-size: max(.7rem, var(--fs-min));
    color: var(--text-dimmer);
    font-variant-numeric: tabular-nums;
}

.ms-t {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ms-artist { color: var(--text-dim); font-size: .84em; margin-left: 7px; }

.ms-who {
    flex: 0 0 auto;
    display: none;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: var(--text-dim);
    font-size: .8rem;
}

.ms-av {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--overlay-1);
    border: 1px solid var(--line);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: max(.58rem, var(--fs-min));
    font-weight: 700;
    letter-spacing: 0;
}

.ms-whoname { display: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ms-dur {
    flex: 0 0 auto;
    display: none;
    font-family: var(--font-data);
    font-size: max(.72rem, var(--fs-min));
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

.ms-empty { border: 0; }

/* ---- the playing row: equaliser for its number, bold title, a progress line ---- */
.ms-eq {
    display: none;
    align-items: flex-end;
    gap: 2px;
    width: 13px;
    height: 11px;
    color: var(--toxic);
}

.ms-eq i {
    display: block;
    width: 3px;
    height: 100%;
    border-radius: 1px;
    background: currentColor;
    transform-origin: bottom;
    animation: ms-eq .9s ease-in-out infinite alternate;
}

.ms-eq i:nth-child(2) { animation-duration: .7s; animation-delay: -.3s; }
.ms-eq i:nth-child(3) { animation-duration: 1.1s; animation-delay: -.6s; }

@keyframes ms-eq {
    from { transform: scaleY(.25); }
    to { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
    .ms-eq i { animation: none; }
    .ms-eq i:nth-child(1) { transform: scaleY(.55); }
    .ms-eq i:nth-child(2) { transform: scaleY(1); }
    .ms-eq i:nth-child(3) { transform: scaleY(.4); }
}

/* Paused: the bars stop and lie flat, motion preference or not. */
.ms-row.is-paused .ms-eq i { animation: none; transform: scaleY(.25); }

.ms .ms-list > .ms-row.is-playing { background: rgba(var(--toxic-rgb), .1); border-bottom-color: transparent; }
.ms-row.is-playing .ms-num { display: none; }
.ms-row.is-playing .ms-eq { display: inline-flex; }
.ms-row.is-playing .ms-title { color: var(--toxic); font-weight: 700; }

.ms-row.is-playing::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    pointer-events: none;
    background: linear-gradient(90deg, var(--toxic) 0 var(--p, 0%), var(--overlay-2) var(--p, 0%));
}

/* ---- per-row management (opened card only, via .card-manage) ---- */
.ms-acts {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding-right: 4px;
}

.ms .ms-acts .ms-ibtn,
.ms .ms-acts .fc-del-btn {
    width: 30px;
    height: 30px;
    min-height: 0;
    padding: 0;
    color: var(--text-dimmer);
}

.ms .ms-acts .ms-ibtn:hover,
.ms .ms-acts .fc-del-btn:hover { color: var(--toxic); }
.ms .ms-acts .ms-ibtn .ico { width: 14px; height: 14px; }

/* ---- column labels: the table shape only ---- */
.ms-head { display: none; }

/* ---- the transport bar ---- */
.ms-trans {
    order: 1;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 9px;
    border-top: 1px solid var(--line);
}

:is(.ms, .pod) .ms-ibtn {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    min-height: 0;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--radius-control, 4px);
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

:is(.ms, .pod) .ms-ibtn .ico { width: 16px; height: 16px; }
:is(.ms, .pod) .ms-ibtn:hover { color: var(--toxic); background: var(--overlay-1); }
:is(.ms, .pod) .ms-ibtn.is-on { color: var(--toxic); background: rgba(var(--toxic-rgb), .12); }
:is(.ms, .pod) .ms-ibtn:disabled { color: var(--text-disabled); background: transparent; cursor: default; }

:is(.ms, .pod) .ms-pbtn {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    min-height: 0;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--toxic);
    color: var(--on-accent);
    box-shadow: 0 3px 10px rgba(var(--toxic-rgb), .28);
    cursor: pointer;
    transition: transform .15s ease-out, box-shadow .15s ease-out;
}

:is(.ms, .pod) .ms-pbtn .ico { width: 14px; height: 14px; fill: currentColor; }
:is(.ms, .pod) .ms-pbtn:hover { transform: scale(1.06); box-shadow: 0 5px 14px rgba(var(--toxic-rgb), .36); }
:is(.ms, .pod) .ms-pbtn:active { transform: scale(.96); }
:is(.ms, .pod) .ms-pbtn:disabled { background: var(--overlay-2); color: var(--text-disabled); box-shadow: none; transform: none; cursor: default; }

:is(.ms, .pod) .ms-ibtn:focus-visible,
:is(.ms, .pod) .ms-pbtn:focus-visible,
.ms .ms-choose:focus-visible { outline: 2px solid var(--toxic); outline-offset: 2px; }

.ms-now {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-left: 4px;
}

.ms-now-line {
    font-family: var(--font-mono);
    font-size: .78rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1.3em;
}

.ms-now-line b { font-weight: 700; }
.ms-now-line span { color: var(--text-dim); }
.ms-trans.is-idle .ms-now-line span { color: var(--text-dim); }

.ms-clock {
    flex: 0 0 auto;
    min-width: 2.6em;
    text-align: right;
    font-family: var(--font-data);
    font-size: max(.7rem, var(--fs-min));
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

/* The scrubber: a real range input (keyboard, screen readers), drawn as a 3px line.
   Specific enough to beat the coarse-pointer 44px floor for inputs, which would make
   a hairline 44px tall; the thumb is the target and grows under a finger instead. */
.section-body :is(.ms, .pod) .ms-trans input.ms-seek[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    height: 12px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: inherit;
}

.ms-seek:disabled { cursor: default; }
.ms-seek:focus-visible { outline: 2px solid var(--toxic); outline-offset: 2px; border-radius: 3px; }

:is(.ms, .pod) .ms-seek::-webkit-slider-runnable-track {
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--toxic) 0 var(--p, 0%), var(--overlay-2) var(--p, 0%));
    box-shadow: inset 0 0 0 1px var(--line);
}

:is(.ms, .pod) .ms-seek::-moz-range-track {
    height: 3px;
    border-radius: 3px;
    background: var(--overlay-2);
    box-shadow: inset 0 0 0 1px var(--line);
}

:is(.ms, .pod) .ms-seek::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--toxic); }

:is(.ms, .pod) .ms-seek::-webkit-slider-thumb {
    box-shadow: none;
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    margin-top: -3.5px;
    border: 0;
    border-radius: 50%;
    background: var(--toxic);
    transform: scale(0);
    transition: transform .15s ease-out;
}

:is(.ms, .pod) .ms-seek::-moz-range-thumb {
    box-shadow: none;
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 50%;
    background: var(--toxic);
    transform: scale(0);
    transition: transform .15s ease-out;
}

.ms-trans:hover .ms-seek:not(:disabled)::-webkit-slider-thumb,
.ms-seek:focus-visible::-webkit-slider-thumb { transform: scale(1); }
.ms-trans:hover .ms-seek:not(:disabled)::-moz-range-thumb,
.ms-seek:focus-visible::-moz-range-thumb { transform: scale(1); }

/* ---- opened card: drop zone and the count/meter strip ---- */
.ms-drop {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1.5px dashed var(--line);
    border-radius: var(--radius-control, 4px);
    background: var(--overlay-2);
    transition: border-color .15s ease-out, background-color .15s ease-out;
}

.ms-drop.is-over { border-color: var(--toxic); background: rgba(var(--toxic-rgb), .08); }

.ms-drop-ic {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(var(--toxic-rgb), .12);
    color: var(--toxic);
}

.ms-drop-ic .ico { width: 18px; height: 18px; }

.ms-drop-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .8rem;
    line-height: 1.4;
    color: var(--text-dim);
}

.ms-drop-text b { display: block; font-size: .95rem; font-weight: 700; color: var(--text); }

.ms .ms-choose { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ms .ms-choose .ico { width: 15px; height: 15px; }

.ms-bar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: .76rem;
    color: var(--text-dim);
}

.ms-shelf { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.ms-status.is-error { color: var(--danger); }

.ms-rename-row { list-style: none; }

/* ---- larger shapes: who added it and the length join the row ---- */
.section.widget-tall .ms-who,
.section.widget-tall .ms-dur,
.section.expanded .ms-who,
.section.expanded .ms-dur { display: inline-flex; }

@container ms (min-width: 560px) {
    .ms-who, .ms-dur { display: inline-flex; }

    /* two wide, one tall: the list runs in two columns */
    .section:not(.expanded):not(.widget-tall) .ms-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 22px;
        align-content: start;
    }

    .section:not(.expanded):not(.widget-tall) .ms-row:nth-last-child(2) { border-bottom-color: transparent; }

    /* two by two, or opened: a table */
    .section.widget-tall .ms-head,
    .section.expanded .ms-head,
    .section.widget-tall .ms .ms-hit,
    .section.expanded .ms .ms-hit {
        display: grid;
        grid-template-columns: 22px minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 150px) 48px;
        column-gap: 14px;
        align-items: center;
    }

    .section.widget-tall .ms-head,
    .section.expanded .ms-head {
        grid-template-columns: 22px minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 150px) 48px auto;
        padding: 0 6px 7px;
        border-bottom: 1px solid var(--line);
        font-family: var(--font-mono);
        font-size: max(.66rem, var(--fs-min));
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--text-dim);
    }

    .ms-head > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ms-head .ms-n, .ms-head .ms-dur { justify-content: flex-end; text-align: right; }
    .ms-head .ms-acts { width: 64px; padding: 0; }
    .ms-head .ms-n { font-family: inherit; font-size: inherit; color: inherit; }

    .section.widget-tall .ms-t,
    .section.expanded .ms-t { display: contents; }

    .section.widget-tall .ms-title,
    .section.widget-tall .ms-artist,
    .section.expanded .ms-title,
    .section.expanded .ms-artist {
        min-width: 0;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .section.widget-tall .ms-artist,
    .section.expanded .ms-artist { font-size: .8rem; }

    .section.widget-tall .ms-whoname,
    .section.expanded .ms-whoname { display: block; }

    .section.widget-tall .ms-dur,
    .section.expanded .ms-dur { justify-content: flex-end; }

    .section.widget-tall .ms .ms-hit { height: 34px; }
    .section.expanded .ms .ms-hit { height: 38px; font-size: .9rem; }
    .section.expanded .ms-acts { width: 64px; justify-content: flex-end; }
}

/* ---- the deck card's bar: one slim line, the scrubber is its top edge ----
   On the deck the bar was a 44px panel (a 34px button under a rule and 9px of padding),
   which at half height left room for one song (Dan, 2026-10-07). Here it is one 30px
   line: 24px prev/next, a 26px play, the title, the clock and a 24px shuffle, and the
   scrubber stops being a second line inside the title column and becomes the bar's own
   top rule — the same range input, still focusable and still dragged, drawn along the
   edge the border used to be. The opened card keeps the full player panel below. */
.section:not(.expanded) .ms-trans {
    position: relative;
    gap: 2px;
    padding-top: 4px;
    border-top: 0;
}

.section:not(.expanded) :is(.ms, .pod) .ms-trans .ms-ibtn { width: 24px; height: 24px; }
.section:not(.expanded) :is(.ms, .pod) .ms-trans .ms-ibtn .ico { width: 14px; height: 14px; }
.section:not(.expanded) :is(.ms, .pod) .ms-trans .ms-pbtn {
    width: 26px;
    height: 26px;
    margin: 0 1px;
    box-shadow: 0 2px 6px rgba(var(--toxic-rgb), .24);
}
.section:not(.expanded) :is(.ms, .pod) .ms-trans .ms-pbtn .ico { width: 11px; height: 11px; }
.section:not(.expanded) .ms-now { padding-left: 6px; }
.section:not(.expanded) .ms-now-line { font-size: .76rem; min-height: 0; }

.section:not(.expanded) .section-body :is(.ms, .pod) .ms-trans input.ms-seek[type="range"] {
    position: absolute;
    left: 0;
    right: 0;
    top: -6px;
    width: auto;
}

/* Half height: tighter rows and gap, so three songs sit over the bar. Desktop only — a
   phone has no halves, and its rows keep their finger-sized height. */
@media (min-width: 901px) {
    .section.widget-half:not(.expanded) .ms { gap: 3px; }
    .section.widget-half:not(.expanded) .ms .ms-hit { height: 19px; font-size: .8rem; }
}

/* ---- opened: the transport sits on top of the list as a player panel ---- */
.section.expanded .ms-trans {
    order: 0;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control, 4px);
    background: var(--overlay-2);
}

.section.expanded :is(.ms, .pod) .ms-pbtn { width: 40px; height: 40px; }
.section.expanded .ms-now-line { font-size: .88rem; }
.section.expanded .ms-list { flex: 0 0 auto; overflow: visible; }

@container ms (max-width: 440px) {
    .ms-drop { flex-wrap: wrap; }
    .section.expanded .ms-trans { flex-wrap: wrap; row-gap: 6px; justify-content: center; }
    .ms-drop-text { flex: 1 1 0; min-width: 10em; }
    .section.expanded .ms-now { order: -1; flex-basis: 100%; padding-left: 0; }
    .ms .ms-choose { width: 100%; justify-content: center; }
}

/* ---- a finger: compact stays dense but tappable, opened gets the full 44px ---- */
@media (pointer: coarse) {
    .ms .ms-hit { height: 36px; }
    :is(.ms, .pod) .ms-ibtn { width: 36px; height: 36px; }
    :is(.ms, .pod) .ms-pbtn { width: 40px; height: 40px; }
    .section-body :is(.ms, .pod) .ms-trans input.ms-seek[type="range"] { height: 22px; }
    :is(.ms, .pod) .ms-seek::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -5.5px; transform: scale(1); }
    :is(.ms, .pod) .ms-seek::-moz-range-thumb { width: 14px; height: 14px; transform: scale(1); }

    /* the deck card's slim bar under a finger: 34px targets, 36px all told */
    .section:not(.expanded) .ms-trans { padding-top: 2px; }
    .section:not(.expanded) :is(.ms, .pod) .ms-trans .ms-ibtn,
    .section:not(.expanded) :is(.ms, .pod) .ms-trans .ms-pbtn { width: 34px; height: 34px; }
    .section:not(.expanded) :is(.ms, .pod) .ms-trans .ms-pbtn .ico { width: 13px; height: 13px; }
    .section:not(.expanded) .section-body :is(.ms, .pod) .ms-trans input.ms-seek[type="range"] { top: -11px; }

    .section.expanded .ms .ms-hit { height: 44px; }
    .section.expanded :is(.ms, .pod) .ms-ibtn,
    .section.expanded .ms .ms-acts .ms-ibtn,
    .section.expanded .ms .ms-acts .fc-del-btn { width: 44px; height: 44px; }
    .section.expanded :is(.ms, .pod) .ms-pbtn { width: 48px; height: 48px; }
    .section.expanded .ms-acts { width: auto; }
}

/* ============================================================
   MESSAGES — a chat (design A, Dan 2026-10-29)
   The feed reads oldest-to-newest and ends at the composer, which is docked under it.
   Tokens only; every pairing here is checked by tools/contrast-check.js (the "Messages
   chat" pass) on every skin. The card body is a column so the feed takes whatever the
   card leaves over and the composer never scrolls away.
   ============================================================ */
.section[data-section="messages"] .section-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.msg-feed {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    /* Few messages sit at the bottom, next to the composer, as in any chat. */
    display: flex;
    flex-direction: column;
}
.msg-feed.active { display: flex; }
.msg-feed::before { content: ''; margin-top: auto; }
.section:not(.expanded) .msg-trim { display: none; }
/* Older messages are held back above: the top edge fades, the card's own background shows
   through (a mask, so it is right on every skin). Never on an opened card. */
.section:not(.expanded) .msg-feed.msg-more {
    /* Shorter than the deck's bottom cue: the author head sits right at the top edge. */
    -webkit-mask-image: linear-gradient(to top, #000 calc(100% - 1.25rem), rgba(0, 0, 0, .25) 100%);
    mask-image: linear-gradient(to top, #000 calc(100% - 1.25rem), rgba(0, 0, 0, .25) 100%);
}

.msg-day {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 6px;
    color: var(--text-dim);
    font: 600 .7rem var(--font-mono);
    letter-spacing: .02em;
}
.msg-day::before,
.msg-day::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.msg-run {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 8px;
    padding: 5px 2px;
}
.msg-av {
    --member: var(--toxic);
    grid-row: 1 / span 2;
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--member);
    background: color-mix(in srgb, var(--member) 28%, var(--modal-fill));
    color: var(--text);
    font: 700 .78rem/1 var(--font-mono);
}
.msg-head {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    min-width: 0;
}
/* The name is what the row is for: it keeps its full width (an ellipsis only when it is wider than
   the whole row) and the circle tag and the time are what wrap under it on a phone, so a name is
   never squeezed to "Jo...". */
.msg-author {
    flex: 0 0 auto;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font: 700 .86rem var(--font-mono);
}
.msg-time {
    flex: 0 0 auto;
    color: var(--text-dim);
    font: 500 .7rem var(--font-data, var(--font-mono));
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.msg-tag {
    flex: 0 1 auto;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 8px 1px 6px;
    border-radius: 999px;
    border: 1px solid var(--toxic-dim, var(--line));
    background: color-mix(in srgb, var(--toxic) 16%, transparent);
    color: var(--text);
    font: 600 .66rem var(--font-mono);
}
.msg-tag > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-tag .ico { flex: 0 0 auto; }

.msg-lines { grid-column: 2; min-width: 0; }
.msg-line { display: flex; align-items: flex-start; gap: 6px; }
.msg-text {
    flex: 1 1 auto;
    min-width: 0;
    margin: 1px 0 0;
    padding: 0;
    color: var(--text);
    font: 500 .9rem/1.38 var(--font-mono);
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}
/* A very long message must not push the composer off a compact card. */
.section:not(.expanded) .msg-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    overflow: hidden;
}
.msg-manage { display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto; align-self: center; }
.msg-line .fc-pin-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: var(--radius-control, 4px);
    font: 600 .72rem var(--font-mono);
    color: var(--text-dim);
}
.msg-line .fc-pin-btn.is-pinned,
.msg-line .fc-pin-btn:hover,
.msg-pinned .fc-pin-btn:hover { color: var(--toxic); }
.msg-line .fc-pin-btn:focus-visible,
.msg-pinned .fc-pin-btn:focus-visible { outline: 2px solid var(--toxic); outline-offset: 1px; }

/* Pin and ✕: on a pointer device only while the row is hovered or has focus inside it
   (opacity, not display, so the keyboard still reaches them); always there on touch, but
   smaller and quieter. */
@media (hover: hover) {
    .msg-manage { opacity: 0; transition: opacity .12s ease; }
    .msg-line:hover .msg-manage,
    .msg-line:focus-within .msg-manage,
    .msg-pinned:hover .msg-manage,
    .msg-pinned:focus-within .msg-manage { opacity: 1; }
}

/* The pinned message: a slim bar above the feed. */
.msg-pinned {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    padding: 6px 10px;
    border-radius: var(--radius-control, 8px);
    background: color-mix(in srgb, var(--toxic) 10%, transparent);
    color: var(--text);
    font: 500 .76rem/1.3 var(--font-mono);
}
.msg-pinned[hidden] { display: none; }
.msg-pinned > .ico { color: var(--toxic); flex: 0 0 auto; }
.msg-pinned-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-pinned .fc-pin-btn {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 2px 6px;
    font: 600 .72rem var(--font-mono);
    color: var(--text-dim);
}

@media (hover: none) {
    .msg-line .fc-pin-btn,
    .msg-pinned .fc-pin-btn { font-size: max(.66rem, var(--fs-min)); color: var(--text-dimmer); }
}

/* The empty feed: a warm nudge and a few things to start with. */
.msg-empty {
    margin: auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 12px;
    color: var(--text-dim);
    font: 500 .9rem/1.4 var(--font-mono);
}
.msg-empty-icon { font-size: 2.2rem; color: var(--toxic); line-height: 1; }
.msg-empty strong { color: var(--text); font-size: 1rem; }
.section:not(.expanded) .msg-empty-icon { font-size: 1.5rem; }
/* A short compact card keeps the starters in view and drops the explanation. */
.section:not(.expanded) .msg-empty > span:not(.msg-empty-icon) { display: none; }
.msg-starters { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.msg-starter {
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--text);
    border-radius: 999px;
    padding: 5px 11px;
    font: 500 .78rem var(--font-mono);
    cursor: pointer;
}
.msg-starter:hover { border-color: var(--toxic); }
.msg-starter:focus-visible { outline: 2px solid var(--toxic); outline-offset: 2px; }

/* The composer, docked under the feed. */
.msg-composer {
    flex: 0 0 auto;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 10px 8px 14px;
    border: 1px solid var(--line-strong);
    border-radius: calc(var(--radius-control, 10px) + 6px);
    background: var(--modal-fill);
}
.msg-composer:focus-within { border-color: var(--toxic); }
/* Slimmer (the deck look): the field and the send/To bar share one line, so the feed above
   keeps room for two real messages in a one-row card. Desktop and phone alike. */
.msg-composer { flex-direction: row; align-items: center; gap: 8px; padding: 4px 6px 4px 14px; }
.msg-composer .msg-field { flex: 1 1 auto; width: auto; }
.msg-composer .msg-bar { flex: 0 0 auto; margin: 0; }
@media (pointer: fine) {
    .msg-composer .msg-send { width: 34px; height: 34px; min-width: 34px; min-height: 34px; }
}
.msg-composer .msg-field {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 1.35em;
    max-height: 7.5em;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font: 500 .92rem/1.35 var(--font-mono);
    resize: none;
    field-sizing: content;
    overflow-y: auto;
    outline: none;
    box-shadow: none;
    text-transform: none;
    letter-spacing: 0;
}
.msg-composer .msg-field:focus { box-shadow: none; }
.msg-composer .msg-field::placeholder {
    color: var(--text-dimmer);
    text-transform: none;
    letter-spacing: 0;
    font-size: inherit;
}
.msg-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.msg-send {
    flex: 0 0 auto;
    margin-left: auto;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: var(--toxic);
    color: var(--on-accent);
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
.msg-send:hover { filter: brightness(1.08); }
.msg-send:focus-visible { outline: 2px solid var(--toxic); outline-offset: 3px; }
.msg-send.is-empty:not(:hover) {
    background: color-mix(in srgb, var(--text-dim) 30%, var(--modal-fill));
    color: var(--text-dim);
    box-shadow: none;
}
.msg-send:disabled { opacity: .6; cursor: default; }

/* "To: Everyone ▾" — a real <select> laid transparently over the pill. */
.msg-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    padding: 4px 10px 4px 9px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--bg-inset, var(--modal-fill));
    color: var(--text);
    font: 600 .76rem var(--font-mono);
    white-space: nowrap;
    cursor: pointer;
}
.msg-chip-lab { color: var(--text-dim); font-weight: 500; }
.msg-chip-val { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.msg-chip .ico { flex: 0 0 auto; }
.msg-chip.narrow {
    border-color: var(--toxic);
    background: color-mix(in srgb, var(--toxic) 14%, var(--modal-fill));
}
.msg-chip-select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    font-size: 16px; /* under 16px, iOS zooms the page on focus */
}
.msg-chip:focus-within { outline: 2px solid var(--toxic); outline-offset: 1px; }

/* The compact card shows content only (Dan, 2026-11-09): the composer (box, To chip, send)
   is for the opened view, and one plain "Open to leave a message" line opens it. The
   line's look is .fc-open-line (cards2.css, token-driven, hidden once the card is open). */
.section:not(.expanded) .msg-composer { display: none; }
.section.expanded .msg-leave { display: none; }

/* Any compact card: a day divider costs a message's worth of room (about 32px), so the day
   rides on each older run's time instead. The open card keeps the dividers. */
.section:not(.expanded) .msg-day { display: none; }
.section:not(.expanded) .msg-time[data-day]::before { content: attr(data-day) ' \00B7  '; }

/* Half height: no room for the pinned bar or day dividers; the composer goes on one row. */
.section.widget-half:not(.expanded) .msg-pinned,
.section.widget-half:not(.expanded) .msg-day { display: none; }
.section.widget-half:not(.expanded) .msg-composer { flex-direction: row; align-items: center; margin-top: 4px; padding: 4px 6px 4px 12px; }
.section.widget-half:not(.expanded) .msg-composer .msg-field { flex: 1 1 auto; }
.section.widget-half:not(.expanded) .msg-bar { flex: 0 0 auto; }
.section.widget-half:not(.expanded) .msg-text { -webkit-line-clamp: 1; line-clamp: 1; }

@media (max-width: 900px) {
    /* Controls only exist in the opened card; give each a full fingertip there. */
    .section.expanded .msg-line .fc-pin-btn,
    .section.expanded .msg-line .fc-del-btn { min-width: 44px; min-height: 44px; }
    .msg-chip { min-height: 36px; }
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-content {
    margin-top: 6px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
}

.dashboard-section.expanded .dashboard-content {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.dashboard-stat {
    /* Flat: the panel colour and a hairline, no hue gradient and no accent top rule. */
    background: var(--bg-panel);
    border: 1px solid var(--line);
    padding: 12px;
    transition: border-color .18s ease;
}

.dashboard-stat:hover { border-color: var(--line-strong); }

.stat-label {
    font-family: var(--font-mono);
    font-size: max(.6rem, var(--fs-min));
    letter-spacing: 2.2px;
    text-transform: var(--case-heads, uppercase);
    color: var(--text-dim);
    margin-bottom: 6px;
}

.stat-value {
    font-family: var(--font-stencil);
    font-size: 1.5rem;
    letter-spacing: 1px;
    color: var(--toxic);
    text-shadow: 0 0 calc(10px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.18 * var(--glow-k)));
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 6px;
    margin-top: 8px;
}

.stat-item {
    background: var(--overlay-1);
    border: 1px solid var(--line);
    padding: 7px 8px;
    transition: all .18s ease;
}

.stat-item:hover { border-color: var(--toxic-dim); }

.stat-item-label {
    font-family: var(--font-mono);
    font-size: max(.56rem, var(--fs-min));
    letter-spacing: 1.6px;
    text-transform: var(--case-heads, uppercase);
    color: var(--text-dim);
}

.stat-item-value {
    font-family: var(--font-mono);
    font-size: .82rem;
    color: var(--text);
    margin-top: 2px;
}

.security-alert {
    border: 1px solid var(--toxic-dim);
    border-left: 4px solid var(--toxic);
    background: rgba(var(--toxic-rgb), .06);
    color: var(--toxic);
    padding: 8px 10px;
    font-family: var(--font-mono);
    font-size: max(.68rem, var(--fs-min));
    letter-spacing: 1.2px;
    margin-bottom: 8px;
}

.security-alert.warning {
    border-color: var(--hazard);
    border-left-color: var(--hazard);
    background: rgba(var(--hazard-rgb), .08);
    color: var(--hazard);
}

.recent-logins {
    grid-column: 1 / -1;
    border: 1px solid var(--line);
    background: var(--overlay-2);
    padding: 8px;
    max-height: 240px;
    overflow-y: auto;
}

.login-entry {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 6px 8px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: max(.68rem, var(--fs-min));
    transition: background .15s ease;
}

.login-entry:hover { background: rgba(var(--toxic-rgb), .05); }
.login-entry:last-child { border-bottom: none; }
.login-time { color: var(--text-dim); letter-spacing: 1px; }
.login-user { color: var(--toxic); text-transform: var(--case-heads, uppercase); letter-spacing: 1.2px; }
.login-ip { color: var(--hazard); margin-left: auto; letter-spacing: 1px; }

/* ============================================================
   CALENDAR / PROJECTS / QUOTES
   ============================================================ */
.quote-display {
    background: var(--modal-fill);
    border: 1px solid var(--line);
    border-left: 3px solid var(--toxic);
    padding: 12px;
    margin: 12px 0;
}

.quote-text {
    font-family: var(--font-mono);
    font-size: .85rem;
    color: var(--text);
    line-height: 1.5;
}

.quote-author {
    margin-top: 6px;
    font-family: var(--font-stencil);
    font-size: max(.66rem, var(--fs-min));
    letter-spacing: 1.8px;
    text-transform: var(--case-heads, uppercase);
    color: var(--hazard);
    text-align: right;
}

.add-project-form, .add-youtube-form {
    border: 1px solid var(--line);
    border-top: 2px solid var(--toxic-dim);
    background: var(--overlay-1);
    padding: 12px;
    margin: 10px 0;
}

.add-project-form h3, .add-youtube-form h3,
.discord-setup h3 {
    font-family: var(--font-stencil);
    font-size: .78rem;
    letter-spacing: 2px;
    text-transform: var(--case-heads, uppercase);
    color: var(--toxic);
    margin-bottom: 10px;
}

.project-input, .project-textarea,
.youtube-input, .discord-input, .discord-textarea {
    width: 100%;
    margin-bottom: 8px;
    display: block;
}

.project-textarea, .discord-textarea, .recipe-textarea {
    resize: vertical;
    min-height: 60px;
    line-height: 1.5;
}

.project-form-buttons, .youtube-form-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.project-file-upload { margin-bottom: 8px; }

.project-file-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border: 1px dashed var(--line);
    background: var(--overlay-1);
    color: var(--text-dim);
    font-family: var(--font-stencil);
    font-size: max(.64rem, var(--fs-min));
    letter-spacing: 1.4px;
    text-transform: var(--case-heads, uppercase);
    cursor: pointer;
    transition: all .18s ease;
}

.project-file-label:hover {
    border-color: var(--toxic-dim);
    color: var(--toxic);
}

.project-file-input { display: none; }

.project-files-list { margin-top: 6px; }

.project-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-left: 2px solid var(--toxic-dim);
    background: var(--overlay-1);
    font-family: var(--font-mono);
    font-size: max(.7rem, var(--fs-min));
    margin-bottom: 4px;
}

#projects-list li { cursor: default; }

/* ============================================================
   YOUTUBE
   ============================================================ */
.youtube-videos-list {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.youtube-video-item {
    border: 1px solid var(--line);
    border-left: 3px solid var(--danger);
    background: var(--overlay-1);
    padding: 10px;
    margin-bottom: 8px;
}

.youtube-video-item h4 {
    font-family: var(--font-stencil);
    font-size: max(.72rem, var(--fs-min));
    letter-spacing: 1.4px;
    text-transform: var(--case-heads, uppercase);
    color: var(--text);
    margin-bottom: 8px;
}

/* The tile's media box: a fixed 16:9 that holds either the plate (the same-origin still
   and a play glyph) or, after a tap, the one frame and its ×. Swapping one for the other
   never changes the tile's height. */
.youtube-video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--overlay-1);
    border: 1px solid var(--line);
    border-radius: var(--radius-control, 0);
    overflow: hidden;
}

.youtube-video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.section-body .youtube-plate {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--text);
    cursor: pointer;
}
.section-body .youtube-plate:focus-visible { outline: 2px solid var(--toxic); outline-offset: -2px; }

.youtube-still {
    position: absolute;
    inset: 0;
}
.youtube-still > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.youtube-plate-ic {
    position: relative;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-panel-raised);
    color: var(--text);
    box-shadow: 0 2px 12px rgba(var(--shadow-ink-rgb), .45);
    transition: color .15s ease-out, transform .15s ease-out;
}
.youtube-plate-ic .ico { width: 34px; height: 34px; stroke-width: 1.5; }
.section-body .youtube-plate:hover .youtube-plate-ic { color: var(--toxic); transform: scale(1.06); }

.section-body .youtube-close {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    min-height: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--bg-panel-raised);
    box-shadow: none;
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.section-body .youtube-close:hover { color: var(--toxic); border-color: var(--toxic); }
.section-body .youtube-close:focus-visible { outline: 2px solid var(--toxic); outline-offset: 2px; }

.youtube-video-meta {
    margin: 6px 0 0;
    font-size: max(.72rem, var(--fs-min));
    color: var(--text-dim);
}

.youtube-video-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 8px;
}

/* ============================================================
   DISCORD
   ============================================================ */
.discord-widget-container {
    border: 1px solid var(--line);
    background: var(--bg-deep);
    margin-bottom: 10px;
}

.discord-widget-container iframe { display: block; border: 0; }

.discord-setup, .discord-send-form {
    border: 1px solid var(--line);
    border-top: 2px solid var(--toxic-dim);
    background: var(--overlay-1);
    padding: 12px;
    margin-bottom: 10px;
}

.discord-setup h4 {
    font-family: var(--font-stencil);
    font-size: max(.7rem, var(--fs-min));
    letter-spacing: 1.6px;
    text-transform: var(--case-heads, uppercase);
    color: var(--hazard);
    margin-bottom: 6px;
}

.discord-setup p,
.discord-send-form p,
.add-project-form p,
.add-youtube-form p {
    font-family: var(--font-mono);
    font-size: max(.7rem, var(--fs-min));
    line-height: 1.6;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.discord-instructions {
    margin-top: 14px;
    border-left: 3px solid var(--hazard);
    background: rgba(var(--hazard-rgb), .05);
    padding: 10px 12px;
}

.discord-instructions h4 {
    font-family: var(--font-stencil);
    font-size: max(.7rem, var(--fs-min));
    letter-spacing: 1.6px;
    text-transform: var(--case-heads, uppercase);
    color: var(--hazard);
    margin-bottom: 6px;
}

.discord-instructions ol { padding-left: 18px; }
.discord-instructions li { font-size: max(.72rem, var(--fs-min)); line-height: 1.7; color: var(--text-dim); }
.discord-instructions li strong { color: var(--text); }

.discord-status {
    font-family: var(--font-mono);
    font-size: max(.68rem, var(--fs-min));
    letter-spacing: 1.4px;
    text-transform: var(--case-heads, uppercase);
    padding: 0;
}

.discord-status:not(:empty) {
    padding: 8px 10px;
    border-left: 3px solid var(--line);
    background: var(--overlay-1);
    margin-top: 8px;
}

.discord-status.success {
    border-left-color: var(--toxic);
    color: var(--toxic);
    background: rgba(var(--toxic-rgb), .07);
}

.discord-status.error {
    border-left-color: var(--danger);
    color: var(--danger);
    background: rgba(var(--danger-rgb), .08);
}

/* ============================================================
   RECIPES
   ============================================================ */
.recipe-form { flex: 0 0 auto; }
.recipe-input-group { margin-bottom: 8px; }
.recipe-input { width: 100%; }
.recipe-textarea { min-height: 70px; }

.recipe-photo-upload {
    border: 1px dashed var(--line);
    background: var(--overlay-2);
    padding: 14px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: max(.66rem, var(--fs-min));
    letter-spacing: 1.5px;
    text-transform: var(--case-heads, uppercase);
    color: var(--text-dim);
    transition: all .18s ease;
}

.recipe-photo-upload:hover,
.recipe-photo-upload.dragover {
    border-color: var(--toxic);
    color: var(--toxic);
    box-shadow: 0 0 calc(12px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.09 * var(--glow-k))) inset;
}

.uploaded-photo {
    max-width: 100%;
    max-height: 160px;
    margin-top: 8px;
    border: 1px solid var(--toxic-dim);
}

.recipe-photo {
    display: block;
    max-width: 100%;
    max-height: 220px;
    margin-top: 8px;
    border: 1px solid var(--toxic-dim);
    border-radius: 2px;
}

.saved-recipes {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 8px;
}

.recipe-item {
    border: 1px solid var(--line);
    border-left: 3px solid var(--hazard);
    background: var(--overlay-1);
    padding: 9px 11px;
    margin-bottom: 6px;
    transition: all .18s ease;
}

.recipe-item:hover {
    border-left-color: var(--toxic);
    box-shadow: 0 0 calc(9px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.08 * var(--glow-k)));
}

.recipe-item-title {
    font-family: var(--font-stencil);
    font-size: max(.74rem, var(--fs-min));
    letter-spacing: 1.4px;
    text-transform: var(--case-heads, uppercase);
    color: var(--text);
}

.recipe-item-meta {
    font-family: var(--font-mono);
    font-size: max(.6rem, var(--fs-min));
    letter-spacing: 1.4px;
    text-transform: var(--case-heads, uppercase);
    color: var(--text-dim);
    margin: 3px 0;
}

.recipe-item-preview {
    font-family: var(--font-mono);
    font-size: max(.72rem, var(--fs-min));
    color: var(--text-dim);
    line-height: 1.5;
}

/* ============================================================
   STOCKS & CRYPTO — the tape
   Dan picked "Tape" on 2026-10-07 (mockup: showcase/latchandlantern-stocks-mockups.html),
   with Seesaw's diverging bar in the opened view only. One DOM from stocks.js, reshaped
   here per card size; nothing is rebuilt on expand:

     1×1          one 23px line per symbol, grouped Stocks / Crypto, all eight fit
     half height  a two-across ticker whose rows share the card's height (desktop
                  deck only; a phone has no halves)
     1×2 tall     taller lines + the move in dollars + the up/down breadth strip
     2×1 wide     the two groups side by side (a container query, not a class: the
                  layout engine has no `.widget-wide`)
     opened       full rows with the diverging bar on one shared scale, add / remove /
                  refresh (`.card-manage`), the updated time underneath

   Up and down are --toxic and --danger, which sit close on Neon and Camo, so direction
   is ALSO shape everywhere: filled ▲ / outlined ▼, solid bar / hatched bar. No colour
   here that theme.css does not already define.

   Each row is a grid whose areas are named, so a column that a size does not show is
   simply `display: none` and the scale row's axis still lands over the bars.
   ============================================================ */
.stocks-tape {
    container: stocks-tape / inline-size;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* the deck card is the tape: the strapline goes, the opened view keeps it */
.section[data-section="stocks"]:not(.expanded) > p { display: none; }

.symbol-lookup {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
}

.symbol-input { flex: 1 1 auto; min-width: 0; text-transform: uppercase; }
.symbol-input::placeholder { text-transform: none; }

.refresh-tickers-btn {
    flex: 0 0 auto;
    padding-left: 8px;
    padding-right: 8px;
}

.symbol-lookup .add-symbol-btn { flex: 0 0 auto; }

.ticker-list {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}

.tape-group { display: flex; flex-direction: column; }

.tape-label {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 0 6px 2px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: max(.6rem, var(--fs-min));
    line-height: 1.4;
    letter-spacing: 1.2px;
    text-transform: var(--case-heads, uppercase);
    color: var(--text-dim);
}

.ticker-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 5.2em;
    grid-template-areas: "sym px chg";
    align-items: center;
    column-gap: 10px;
    height: 23px;
    padding: 0 6px;
    font-size: .78rem;
    color: var(--text);
}

.tape-group > .ticker-item:nth-child(even) { background: var(--overlay-1); }

.ticker-symbol {
    grid-area: sym;
    font-family: var(--font-stencil);
    font-size: max(.7rem, var(--fs-min));
    letter-spacing: .9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticker-price,
.ticker-abs,
.ticker-change,
.tape-scale,
.tape-foot {
    font-family: var(--font-data);
    font-variant-numeric: tabular-nums;
}

.ticker-price { grid-area: px; text-align: right; white-space: nowrap; }
.ticker-cents { color: var(--text-dim); }
.section:not(.expanded) .ticker-cents { display: none; }

.ticker-abs {
    grid-area: abs;
    display: none;
    text-align: right;
    font-size: max(.7rem, var(--fs-min));
    white-space: nowrap;
    color: var(--text-dim);
}

.ticker-change {
    grid-area: chg;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .28em;
    font-size: max(.74rem, var(--fs-min));
    white-space: nowrap;
}

.ticker-change.up   { color: var(--toxic); }
.ticker-change.down { color: var(--danger); }
.ticker-change.flat { color: var(--text-dim); }

.tape-tri { width: .62em; height: .62em; flex: 0 0 auto; overflow: visible; }

/* the words a screen reader hears instead of a colour */
.tape-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Delayed/stale quote: the price goes dim and carries a small dot. */
.ticker-item.ticker-stale .ticker-price { color: var(--text-dim); }
.ticker-item.ticker-stale .ticker-price::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-left: 5px;
    border-radius: 50%;
    background: var(--text-dim);
    vertical-align: middle;
}

/* ---- the diverging bar and its axis: the opened view only ---- */
.tape-bar,
.tape-scale,
.remove-ticker-btn { display: none; }

.tape-bar { grid-area: bar; position: relative; height: 12px; }

/* the zero line and the baseline */
.tape-bar::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -7px;
    bottom: -7px;
    width: 1px;
    background: var(--line);
}

.tape-bar::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--line);
    opacity: .6;
}

.tape-bar > i { position: absolute; top: 0; bottom: 0; width: 0; z-index: 1; }
.tape-bar > i.up { left: 50%; background: var(--toxic); border-radius: 0 3px 3px 0; }
.tape-bar > i.down {
    right: 50%;
    background: repeating-linear-gradient(135deg, var(--danger) 0 2px, transparent 2px 4px);
    box-shadow: inset 0 0 0 1px var(--danger);
    border-radius: 3px 0 0 3px;
}

.tape-axis {
    grid-area: bar;
    display: flex;
    justify-content: space-between;
}

/* ---- up/down breadth: tall and wide cards ---- */
.tape-breadth { display: none; height: 6px; gap: 2px; flex: 0 0 auto; }
.tape-breadth > i { flex: 1 1 0; border-radius: 3px; }
.tape-breadth > i.up { background: var(--toxic); }
.tape-breadth > i.down {
    background: repeating-linear-gradient(135deg, var(--danger) 0 2px, transparent 2px 4px);
    box-shadow: inset 0 0 0 1px var(--danger);
}

.tape-foot {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex: 0 0 auto;
    font-size: max(.64rem, var(--fs-min));
    letter-spacing: .4px;
    color: var(--text-dim);
}

.tape-foot:has(.tape-updated:empty) { display: none; }

/* ---- 1×2 tall ---- */
.section.widget-tall:not(.expanded) .ticker-item {
    height: 32px;
    font-size: .86rem;
    grid-template-columns: minmax(0, 1fr) auto 4.6em 5.2em;
    grid-template-areas: "sym px abs chg";
}

.section.widget-tall:not(.expanded) .ticker-symbol { font-size: .78rem; }
.section.widget-tall:not(.expanded) .ticker-abs { display: block; }
.section.widget-tall:not(.expanded) .tape-breadth:not(:empty) { display: flex; }

/* ---- 1×1: rows share the height the list is given ----
   The groups dissolve into the list's own column so every row can take a share of the
   slack: 23px is the floor (eight symbols fit a 330px card with the footer), 30px the
   ceiling, so the starter six fill the card instead of stopping two-thirds down it.
   Rows never shrink below the floor; a long list scrolls as before. Narrow cards only —
   the wide shape below lays the two groups out side by side and needs them whole. */
@container stocks-tape (max-width: 559.98px) {
    .section:not(.expanded):not(.widget-tall):not(.widget-half) .ticker-list { gap: 0; }
    .section:not(.expanded):not(.widget-tall):not(.widget-half) .tape-group { display: contents; }
    .section:not(.expanded):not(.widget-tall):not(.widget-half) .tape-label { flex: 0 0 auto; }
    .section:not(.expanded):not(.widget-tall):not(.widget-half) .tape-group + .tape-group > .tape-label { margin-top: 5px; }

    .section:not(.expanded):not(.widget-tall):not(.widget-half) .ticker-item {
        flex: 1 0 23px;
        max-height: 30px;
        height: auto;
    }
}

/* ---- 2×1 wide: the groups side by side ---- */
@container stocks-tape (min-width: 560px) {
    .section:not(.expanded) .ticker-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-content: start;
        gap: 0 22px;
    }

    .section:not(.expanded) .ticker-item {
        grid-template-columns: minmax(0, 1fr) auto 4.6em 5.2em;
        grid-template-areas: "sym px abs chg";
        height: 26px;
    }

    .section:not(.expanded) .ticker-abs { display: block; }
    .section:not(.expanded) .tape-breadth:not(:empty) { display: flex; }
}

/* ---- half height: a two-across ticker that fills the card ----
   Desktop only: below 900px a half card is not half of anything (see the half-height
   block further down), so it keeps the 1×1 list.

   A grid, not a wrapped flex line: rows are `minmax(18px, 1fr)`, so the tape always
   reaches the bottom of the card. Six symbols (the starter tape) are three rows that
   share the whole height; ten are five 18px rows, which is what a 157px card holds
   before it scrolls. The wrapped version stopped at 19px rows and left a third of the
   card empty under the default six (Dan, 2026-10-07). */
@media (min-width: 901px) {
    .section.widget-half:not(.expanded) .stocks-tape { gap: 0; }

    .section.widget-half:not(.expanded) .ticker-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: minmax(18px, 1fr);
        align-content: stretch;
        gap: 0 14px;
    }

    /* Two across needs about 230px a column to keep the symbol whole and the price clear of
       the move. Under ~460px of card the list is ONE column of 20px rows that scrolls inside
       the card instead: legibility beats fitting everything in view (Dan, 2026-11-09). */
    @container stocks-tape (max-width: 459.98px) {
        .section.widget-half:not(.expanded) .ticker-list {
            grid-template-columns: minmax(0, 1fr);
            grid-auto-rows: minmax(20px, auto);
            align-content: start;
        }
    }

    .section.widget-half:not(.expanded) .tape-group { display: contents; }

    .section.widget-half:not(.expanded) .tape-label,
    .section.widget-half:not(.expanded) .tape-foot,
    .section.widget-half:not(.expanded) .tape-breadth { display: none; }

    .section.widget-half:not(.expanded) .ticker-item {
        min-width: 0;
        height: auto;
        padding: 0 2px;
        grid-template-columns: 5em minmax(0, 1fr) 5.4em;
        column-gap: 6px;
        font-size: .76rem;
        background: none;
        border-bottom: 1px solid var(--overlay-1);
    }

    .section.widget-half:not(.expanded) .ticker-symbol { font-size: max(.68rem, var(--fs-min)); }
    .section.widget-half:not(.expanded) .ticker-change { font-size: max(.72rem, var(--fs-min)); }
    .section.widget-half:not(.expanded) .ticker-symbol { text-overflow: clip; }
    .section.widget-half:not(.expanded) .ticker-price { text-align: right; }
}

/* ---- opened: the full tape, with the bar ---- */
.section.expanded .stocks-tape { gap: 10px; }

.section.expanded .symbol-lookup { margin-bottom: 4px; }

@media (hover: hover) and (pointer: fine) {
    .section.expanded .section-body .symbol-lookup > input {
        height: 36px;
        padding: 0 12px;
        font-size: .85rem;
    }

    .section.expanded .section-body .symbol-lookup > button {
        height: 36px;
        padding: 0 14px;
        font-size: max(.72rem, var(--fs-min));
    }

    .section.expanded .section-body .symbol-lookup > .refresh-tickers-btn {
        width: 36px;
        padding: 0;
        justify-content: center;
    }
}

.section.expanded .ticker-list { gap: 14px; overflow: visible; }

.section.expanded .ticker-item,
.section.expanded .tape-scale {
    grid-template-columns: 4.6em 7.4em 5.6em minmax(120px, 1fr) 5.4em 32px;
    grid-template-areas: "sym px abs bar chg rm";
    column-gap: 14px;
    padding: 0 8px;
}

.section.expanded .ticker-item {
    height: auto;
    min-height: 44px;
    font-size: .92rem;
    border-bottom: 1px solid var(--line);
}

.section.expanded .tape-group > .ticker-item:last-child { border-bottom: none; }

/* the scale row's columns are in em, like the rows', so it carries the ROW's font size
   and only its axis labels are small — otherwise the axis would not sit over the bars */
.section.expanded .tape-scale {
    display: grid;
    height: 14px;
    margin-bottom: -6px;
    font-size: .92rem;
    color: var(--text-dim);
}

.section.expanded .tape-axis { font-size: max(.6rem, var(--fs-min)); }

.section.expanded .tape-label { font-size: max(.66rem, var(--fs-min)); padding: 0 8px 4px; }
.section.expanded .ticker-symbol { font-size: .8rem; }
.section.expanded .ticker-abs { display: block; font-size: .8rem; }
.section.expanded .ticker-change { font-size: .84rem; }
.section.expanded .tape-bar { display: block; }
.section.expanded .tape-foot { font-size: max(.72rem, var(--fs-min)); }

.section.expanded .remove-ticker-btn {
    grid-area: rm;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    min-height: 0;
    padding: 0;
    justify-self: end;
    border: 1px solid var(--line);
    border-radius: var(--radius-control, 0);
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}

.section.expanded .remove-ticker-btn:hover,
.section.expanded .remove-ticker-btn:focus-visible {
    color: var(--danger);
    border-color: var(--danger);
    background: rgba(var(--danger-rgb), .08);
}

.remove-ticker-btn .ico { width: 14px; height: 14px; }

@media (pointer: coarse) {
    .section.expanded .ticker-item,
    .section.expanded .tape-scale { grid-template-columns: 4.6em 7.4em 5.6em minmax(100px, 1fr) 5.4em 44px; }
    .section.expanded .remove-ticker-btn { width: 44px; height: 44px; }
}

/* a phone, or any opened card too narrow for six columns: the dollars go, the bar stays */
@container stocks-tape (max-width: 560px) {
    .section.expanded .ticker-item,
    .section.expanded .tape-scale {
        grid-template-columns: 3.6em 5.6em minmax(36px, 1fr) 4.6em 32px;
        grid-template-areas: "sym px bar chg rm";
        column-gap: 8px;
        padding: 0 2px;
    }

    .section.expanded .ticker-item,
    .section.expanded .tape-scale { font-size: .84rem; }
    .section.expanded .tape-axis { font-size: max(.6rem, var(--fs-min)); }
    .section.expanded .ticker-change { font-size: .78rem; }
    .section.expanded .ticker-abs { display: none; }
    .section.expanded .ticker-cents { display: none; }
}

@container stocks-tape (max-width: 560px) {
    @media (pointer: coarse) {
        .section.expanded .ticker-item,
        .section.expanded .tape-scale { grid-template-columns: 3.4em 5.6em minmax(28px, 1fr) 4.4em 44px; }
    }
}

.stocks-offline-indicator {
    display: none;
    margin-left: 8px;
    font-family: var(--font-mono);
    font-size: max(.58rem, var(--fs-min));
    letter-spacing: .5px;
    color: var(--text-dim);
    vertical-align: middle;
}

.view-more-btn { width: 100%; margin-top: 8px; flex: 0 0 auto; }

/* ============================================================
   EXPANDED-STATE OVERRIDES FOR INNER PANELS
   ============================================================ */
.section.expanded .family-messages,
.section.expanded .ticker-list,
.section.expanded .saved-recipes,
.section.expanded .youtube-videos-list,
.section.expanded ul {
    max-height: none;
}

.section.expanded .photo-grid { max-height: none; }

.projects-section.expanded #projects-list li { padding: 9px 12px; font-size: .85rem; }


/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Never on a frame (2026-10-19), as with the Today block near the top: a 1280x800 panel
   whose WebView reports a devicePixelRatio of 1.5 is 853 CSS px wide, and its deck must
   keep the frame's columns (--deck-min) instead of falling into the phone column. A frame
   gets its compact shell from the display-mode rules at the top of the file. The guard is
   a :where(), so it adds no specificity and the cascade on a phone is exactly as before.
   The same guard is on the single-column block after the reduced-motion rules. */
@media (max-width: 900px) {
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) body { padding-left: 0; padding-top: 62px; }

    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .nav-toggle { display: flex; align-items: center; justify-content: center; }

    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .sidebar {
        transform: translateX(-100%);
        transition: transform .25s ease;
        width: 260px;
    }

    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) body.nav-open .sidebar { transform: translateX(0); }

    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .main-area { padding: 10px 12px 50px; }

    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .grid-deck {
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(300px, auto);
    }

    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .hub-header-inner { padding: 12px; }
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .hub-title { font-size: 1rem; letter-spacing: 2px; padding-left: 46px; }
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .hub-readouts { display: none; }

    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .quote-display-header { padding: 16px 12px 14px; }
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .quote-author-header { text-align: left; }

    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section.expanded {
        width: 96vw !important;
        max-height: 88vh !important;
        padding: 30px 14px 20px !important;
    }

}

@media (max-width: 520px) {
    .upload-btn, .video-btn { font-size: max(.58rem, var(--fs-min)); padding: 7px 8px; }
    .hub-title { font-size: .85rem; }
}

/* ============================================================
   SETTINGS MODULE  (theme picker / personnel / activity log)
   Fully token-driven - inherits whichever theme is active.
   ============================================================ */
.settings-section .set-block {
    border: 1px solid var(--line);
    background: var(--bg-inset);
    padding: 12px 12px 14px;
    margin-bottom: 12px;
    flex: 0 0 auto;
}

.settings-section .set-block-title,
.settings-section .set-sub-title {
    font-family: var(--font-stencil);
    text-transform: var(--case-heads, uppercase);
    letter-spacing: var(--tracking-h2, 2.5px);
    font-size: max(.68rem, var(--fs-min));
    color: var(--toxic);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.settings-section .set-block-title::before {
    content: var(--glyph);
    color: var(--hazard);
    font-size: .8rem;
}

.settings-section .set-sub-title {
    margin-top: 14px;
    font-size: max(.6rem, var(--fs-min));
    color: var(--hazard);
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

.settings-section .set-hint {
    font-family: var(--font-mono);
    font-size: max(.62rem, var(--fs-min));
    letter-spacing: 1px;
    color: var(--text-dim);
    text-transform: var(--case-heads, uppercase);
}

.settings-section .set-msg {
    font-family: var(--font-mono);
    font-size: max(.64rem, var(--fs-min));
    letter-spacing: .8px;
    margin-top: 8px;
    min-height: 1em;
    line-height: 1.4;
    word-break: break-word;
}
.settings-section .set-msg.ok   { color: var(--toxic); }
.settings-section .set-msg.err  { color: var(--danger); }

/* ---- theme swatches ---- */
/* Light skins together, dark skins together: two titled grids inside the picker. */
.theme-swatch-group + .theme-swatch-group { margin-top: 14px; }

.theme-swatch-group-title {
    font-family: var(--font-mono);
    font-size: max(.6rem, var(--fs-min));
    letter-spacing: 2px;
    text-transform: var(--case-heads, uppercase);
    color: var(--text-dim);
    margin: 0 0 8px;
}

.theme-swatch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
    gap: 9px;
}

/* five skins read as one clean row once the settings card is expanded */
@media (min-width: 900px) {
    .section.expanded .theme-swatch-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* 3 + 2 reads better than an orphaned 5th card at tablet widths */
@media (min-width: 421px) and (max-width: 899px) {
    .theme-swatch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* two-up rather than a single stacked column on small phones */
@media (max-width: 420px) {
    .theme-swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.theme-swatch {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 10px 9px;
    background: var(--bg-panel-2);
    border: 1px solid var(--line);
    border-left: 3px solid var(--toxic-dim);
    color: var(--text-dim);
    font-family: var(--font-stencil);
    cursor: pointer;
    text-align: left;
    transition: all .18s ease;
    clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}

.theme-swatch:hover,
.theme-swatch:focus-visible {
    border-color: rgba(var(--toxic-rgb), .5);
    border-left-color: var(--toxic);
    color: var(--toxic);
    background: rgba(var(--toxic-rgb), .07);
    box-shadow: var(--glow-soft) inset;
}

/* clip-path trims an outer ring, so draw it inside */
.theme-swatch:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--toxic);
}

.theme-swatch.active {
    border-color: var(--toxic-dim);
    border-left-color: var(--toxic);
    color: var(--toxic);
    background: rgba(var(--toxic-rgb), .12);
    box-shadow: var(--glow-soft);
}

.theme-swatch-glyph {
    font-size: 1.25rem;
    line-height: 1;
    color: var(--hazard);
}
.theme-swatch.active .theme-swatch-glyph { color: var(--toxic); }

.theme-swatch-name {
    font-size: max(.66rem, var(--fs-min));
    letter-spacing: 2px;
    text-transform: var(--case-heads, uppercase);
}
/* A label never draws past its tile (the clip-path would shear it): it may wrap, and on a
   phone, where three columns leave ~80px, it reads in its own case so "Professional" fits. */
.theme-swatch-name { max-width: 100%; min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
@media (max-width: 700px) {
    .settings-section .theme-swatch-name { text-transform: none; letter-spacing: .02em; }
}

.theme-swatch-strip {
    display: flex;
    width: 100%;
    height: 10px;
    border: 1px solid var(--line);
}
.theme-swatch-strip i { flex: 1 1 0; display: block; }

/* keep the card's expand handler seeing the BUTTON, not an inner span */
.theme-swatch > * { pointer-events: none; }

/* ---- personnel ---- */
.settings-section .user-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-section .user-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 7px 9px;
    background: var(--bg-panel-2);
    border: 1px solid var(--line);
    border-left: 2px solid var(--toxic-dim);
}

.settings-section .user-name {
    font-family: var(--font-mono);
    font-size: .76rem;
    color: var(--text);
    flex: 1 1 100px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.settings-section .user-meta {
    font-family: var(--font-mono);
    font-size: max(.75rem, var(--fs-min));
    letter-spacing: .4px;
    color: var(--text-dim);
    text-transform: var(--case-heads, uppercase);
}

.settings-section .set-btn,
.settings-section .set-btn-sm {
    font-family: var(--font-stencil);
    text-transform: var(--case-heads, uppercase);
    letter-spacing: 1.4px;
    background: rgba(var(--toxic-rgb), .07);
    border: 1px solid var(--toxic-dim);
    color: var(--toxic);
    cursor: pointer;
    transition: all .18s ease;
}

.settings-section .set-btn { font-size: max(.68rem, var(--fs-min)); padding: 9px 14px; }
.settings-section .set-btn-sm { font-size: max(.56rem, var(--fs-min)); padding: 5px 8px; }

.settings-section .set-btn:hover,
.settings-section .set-btn-sm:hover {
    background: rgba(var(--toxic-rgb), .16);
    box-shadow: var(--glow-soft);
}

.settings-section .set-btn-sm.danger {
    background: rgba(var(--danger-rgb), .08);
    border-color: rgba(var(--danger-rgb), .5);
    color: var(--danger);
}
.settings-section .set-btn-sm.danger:hover {
    background: rgba(var(--danger-rgb), .2);
    box-shadow: 0 0 12px rgba(var(--danger-rgb), .4);
}

/* Danger, second rank: Remove / Revoke sit beside the everyday Edit and Password buttons and
   must not out-shout them. Text in the danger colour (it is held to 4.5:1 elsewhere as
   message text), no fill and no border until pointed at; the confirm row that follows is
   what carries the weight. */
.settings-section .set-btn-sm.danger.danger-secondary {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}
.settings-section .set-btn-sm.danger.danger-secondary:hover,
.settings-section .set-btn-sm.danger.danger-secondary:focus-visible {
    background: rgba(var(--danger-rgb), .1);
    border-color: rgba(var(--danger-rgb), .5);
    box-shadow: none;
}

/* A person's colour on their People row: the same hue as their wall chip and avatar. The
   ring is the text colour mixed in, so a pale hue still reads on a light skin. */
.row-hue-dot {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--member, var(--text-dim));
    border: 1px solid color-mix(in srgb, var(--member, var(--text-dim)) 55%, var(--text));
}

.settings-section .set-btn-sm[disabled],
.settings-section .set-btn[disabled] {
    opacity: .4;
    cursor: not-allowed;
    color: var(--text-disabled);
    border-color: var(--line);
    background: transparent;
    box-shadow: none;
}

.settings-section .set-form {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.settings-section .set-input {
    background: var(--bg-deep);
    border: 1px solid var(--line-strong);
    color: var(--toxic);
    caret-color: var(--toxic);
    font-family: var(--font-mono);
    font-size: .76rem;
    letter-spacing: 1px;
    padding: 9px 10px;
    outline: none;
    width: 100%;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.settings-section .set-input:focus-visible,
.first-run .set-input:focus-visible {
    outline: 2px solid var(--toxic);
    outline-offset: 1px;
}
.settings-section .set-input:focus {
    border-color: var(--toxic-dim);
    box-shadow: var(--glow-soft) inset;
}

.settings-section .set-input::placeholder {
    color: var(--text-dimmer);
    letter-spacing: 1px;
}

/* ---- inline confirm (replaces window.confirm) ---- */
.set-confirm {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 7px;
    padding: 8px 9px;
    background: rgba(var(--danger-rgb), .08);
    border: 1px solid rgba(var(--danger-rgb), .45);
}

.set-confirm-text {
    flex: 1 1 140px;
    font-family: var(--font-mono);
    font-size: max(.62rem, var(--fs-min));
    letter-spacing: 1px;
    text-transform: var(--case-heads, uppercase);
    color: var(--danger);
}

/* The same confirm on a card (2026-10-22): every ✕ that deletes asks through
   `deleteButton()` in _ui.js, and Stocks and YouTube call `confirmFirst` directly. Its
   two buttons are `.set-btn-sm`, which is otherwise styled only inside Settings, so they
   are styled here as well. The row always takes a whole line of its own: in a list row
   (which wraps once it holds one), under a Stocks ticker row, across the full width of
   the photo and clip grids after the tile it is about, and at the top of the podcast
   episodes. It never sits on top of a tile: a tile is too small for a sentence anybody
   could read. */
.card-confirm {
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
}
.card-confirm .set-confirm-text { font-size: max(.72rem, var(--fs-min)); }
.card-confirm .set-btn-sm {
    min-height: 32px;
    padding: 5px 10px;
    font-family: var(--font-stencil);
    font-size: max(.64rem, var(--fs-min));
    letter-spacing: 1.2px;
    text-transform: var(--case-heads, uppercase);
    background: rgba(var(--toxic-rgb), .07);
    border: 1px solid var(--toxic-dim);
    color: var(--toxic);
    cursor: pointer;
}
.card-confirm .set-btn-sm.danger {
    background: rgba(var(--danger-rgb), .08);
    border-color: rgba(var(--danger-rgb), .5);
    color: var(--danger);
}
.card-confirm .set-btn-sm[disabled] { opacity: .4; cursor: not-allowed; }
.section-body :where(li, div):has(> .card-confirm) { flex-wrap: wrap; }
.photo-grid > .card-confirm { grid-column: 1 / -1; margin-top: 0; }

/* ---- activity log ---- */
.settings-section .set-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    background: var(--bg-deep);
}

.settings-section .set-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: max(.68rem, var(--fs-min));
}

.settings-section .set-table th {
    text-align: left;
    padding: 7px 9px;
    font-family: var(--font-stencil);
    font-size: max(.56rem, var(--fs-min));
    letter-spacing: 2px;
    text-transform: var(--case-heads, uppercase);
    color: var(--hazard);
    background: var(--bg-shade-a);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.settings-section .set-table td {
    padding: 6px 9px;
    color: var(--text);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.settings-section .set-table tr:last-child td { border-bottom: 0; }
.settings-section .set-table tbody tr:hover td { background: rgba(var(--toxic-rgb), .05); }
.settings-section .set-table td.op { color: var(--toxic); }
.settings-section .set-table td.dim { color: var(--text-dim); }

/* collapsed tile: keep the card readable at 1x1, expand shows all */
.settings-section:not(.expanded) .set-block { max-height: none; }
.settings-section:not(.expanded) { overflow: hidden; }

/* ============================================================
   WIDGET CHROME  (move / minimize / resize)
   Every panel becomes a widget: drag the ⠿ grip to reorder,
   ─ to collapse it to a title bar, ◲ to snap-resize by grid spans.
   100% token-driven so all five skins pick it up for free.
   ============================================================ */
.widget-chrome {
    position: absolute;
    /* 21px keeps the cluster on the title's optical centre now the buttons are 24px
       (the 18px buttons sat at 22; 22 + (18 - 24) / 2 = 19 for the same centre, nudged 2
       down for the title's cap height). */
    top: 21px;
    right: 9px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 2px;
    /* Resting state: legible, not loud. Always on for touch (no hover to wait for);
       css/polish.css settles a fine pointer at a lighter value until the card is pointed at. */
    opacity: .8;
    transition: opacity .18s ease;
}

.widget-chrome:focus-within { opacity: 1; }

.widget-btn {
    /* 24px: the WCAG 2.2 target-size floor (2.5.8) as a real box, not a pad. The chrome
       stays light: no border, a hairline tint, a dim glyph (css/polish.css). A pointer gets
       a 32px-tall hit area from the pad below; a finger gets 32 x 32 further down. */
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: var(--bg-panel-raised, var(--bg-inset));
    border: 1px solid var(--line);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: .58rem;
    line-height: 1;
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
}

.widget-btn:hover {
    color: var(--toxic);
    border-color: var(--toxic-dim);
    box-shadow: 0 0 calc(8px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.22 * var(--glow-k)));
}

.widget-btn:focus-visible {
    outline: 2px solid var(--toxic);
    outline-offset: 1px;
}

/* A pointer's hit area is 26 x 32: 1px of side bleed is half the 2px gap, so two targets
   never overlap, and the pad adds the missing 8px of height (the box itself is 24). */
.widget-btn::after {
    content: "";
    position: absolute;
    inset: -4px -1px;
}

.widget-move { cursor: grab; }
.widget-move:active { cursor: grabbing; }

/* The buttons stay 24px to the eye on a phone too — a card's title bar is not the
   place for three chunky squares — but a thumb gets a real target: the chrome opens
   its gap to 8px and each button grows an invisible 32 x 32 pad. The pad's 4px of
   side bleed is exactly half the gap, so no two targets ever overlap and a tap can
   never land on the neighbour's action. Vertically there is nothing to collide with.
   `.widget-resize` and `.widget-half-toggle` are already hidden below 900px; this is
   for move and minimize, which are not. */
@media (pointer: coarse) {
    .widget-chrome { gap: 8px; }

    .widget-btn::after {
        content: "";
        position: absolute;
        inset: -4px;
    }
}

/* bottom-right snap-resize grip */
.widget-resize {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 20px;
    height: 20px;
    z-index: 6;
    cursor: nwse-resize;
    opacity: .35;
    touch-action: none;
    transition: opacity .18s ease;
}

.widget-resize::before {
    content: '';
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 11px;
    height: 11px;
    border-right: 2px solid var(--toxic-dim);
    border-bottom: 2px solid var(--toxic-dim);
}

.widget-resize:hover { opacity: 1; }
.widget-resize:hover::before { border-color: var(--toxic); }

/* ---- Edit layout mode (js/layout.js setEditing) ----
   Day to day the cards are clean: the move / half / minimize cluster and the resize grip
   are drawn at opacity 0, NOT display:none or visibility:hidden, so the grip stays
   focusable and the arrow keys on it still move the card, and they come up the moment
   focus is inside the card. pointer-events are off while they are invisible so a click in
   the corner of a card opens the card instead of pressing a button nobody can see. The
   same on touch (the toggle in the header is reachable there; a long press on a card body
   still lifts it in either mode). While editing everything is shown, and a faint grid is
   drawn behind the cards from two tokens the engine measures (--deck-colw, --deck-rowu).
   Keyed on .grid-deck:not(.is-editing) here rather than in polish.css, whose chrome rules
   keep a resting value for the card chrome in general. */
.grid-deck:not(.is-editing) .section .widget-chrome,
.grid-deck:not(.is-editing) .section .widget-resize { opacity: 0; pointer-events: none; }
.grid-deck:not(.is-editing) .section:focus-within .widget-chrome,
.grid-deck:not(.is-editing) .section:focus-within .widget-resize { opacity: 1; pointer-events: auto; }
.grid-deck.is-editing .section .widget-chrome { opacity: 1; }
.grid-deck.is-editing .section .widget-resize { opacity: .9; }

.grid-deck.is-editing {
    --deck-line: rgba(127, 127, 127, .12);
    --deck-colw: 296px;
    --deck-rowu: 14.4px;
    background-image:
        repeating-linear-gradient(90deg, var(--deck-line) 0 1px, transparent 1px calc(var(--deck-colw) + var(--deck-gap))),
        repeating-linear-gradient(180deg, var(--deck-line) 0 1px, transparent 1px calc(10 * var(--deck-rowu) + 10 * var(--deck-gap)));
    background-position: 0 0;
    background-origin: content-box;
    background-clip: content-box;
}
@supports (color: color-mix(in srgb, red 10%, blue)) {
    .grid-deck.is-editing { --deck-line: color-mix(in srgb, var(--text-dim, #7f7f7f) 10%, transparent); }
}

/* The toggle in the header band: a quiet pill; filled while editing. Not offered on a
   phone or a wall frame (they have no resize), and layout.js also sets [hidden]. */
.layout-edit-btn {
    flex: 0 0 auto;
    align-self: center;
    margin: 0;
    min-height: 32px;
    padding: 4px 14px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius-control, 6px);
    color: var(--text);
    font-family: inherit;
    font-size: max(.8rem, var(--fs-min));
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
}
.layout-edit-btn:hover { border-color: var(--toxic); }
.layout-edit-btn[aria-pressed="true"] {
    background: var(--toxic);
    border-color: var(--toxic);
    color: var(--on-accent, #fff);
}
.layout-edit-btn:focus-visible { outline: 2px solid var(--toxic); outline-offset: 2px; }
.layout-edit-btn[hidden],
html[data-display="phone"] .layout-edit-btn,
html[data-display="frame10"] .layout-edit-btn,
html[data-display="frame15"] .layout-edit-btn { display: none; }
@media (max-width: 900px) {
    :where(html:not([data-display="frame10"]):not([data-display="frame15"]):not([data-display="desktop"])) .layout-edit-btn { display: none; }
}

/* ---- lifted card while dragging ---- */
.section.widget-dragging {
    z-index: 9500 !important;
    cursor: grabbing !important;
    pointer-events: none;
    opacity: .92;
    border-color: var(--toxic) !important;
    box-shadow:
        0 0 calc(22px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.35 * var(--glow-k))),
        0 22px 60px rgba(0,0,0,.85) !important;
    /* The lift: a short eased scale-up so the card reads as picked up. It is the ONLY
       thing that eases while the pointer is down - the follow rides on `translate`, set
       inline on every move and deliberately left out of this transition, so the card
       never trails or springs behind the hand. `transform` is out too: the card's resting
       transform transition would do exactly that. */
    scale: 1.02;
    transition: scale 120ms cubic-bezier(.2,.8,.2,1) !important;
}

.section.widget-dragging:hover { transform: none; }

.grid-deck.widget-drag-active .section:not(.widget-dragging) {
    transition: none;
}

/* ---- the drop settle: one FLIP glide for every card the release moved ----
   layout.js measures, reorders, then plants an inverse transform on each card that
   moved. That plant has to be instant, so the class transitions nothing until
   .widget-settle-go goes on in the next frame and the transforms are cleared. Cards that
   did not move never get either class. Both beat the resting `.section` transition on
   specificity, and an inline transform beats `.section:hover`, so nothing fights the
   glide on its way home. */
.section.widget-settling { z-index: 20; }
.section.widget-settling.widget-settle-lift { z-index: 9500; }
.section.widget-settling:not(.widget-settle-go) { transition: none; }
.section.widget-settling.widget-settle-go {
    transition: transform 240ms cubic-bezier(.2,.8,.2,1);
}

.grid-deck.widget-drag-active { -webkit-user-select: none; user-select: none; }

/* widget chrome is never text-selectable; whole page locks while a gesture is live */
.widget-chrome, .widget-btn, .widget-move, .widget-resize { -webkit-user-select: none; user-select: none; }
body.widget-no-select, body.widget-no-select * { -webkit-user-select: none !important; user-select: none !important; }

/* ---- drop placeholder / resize preview ---- */
.widget-ghost {
    position: absolute;
    z-index: 4;
    pointer-events: none;
    border: 2px dashed var(--toxic-dim);
    background: rgba(var(--toxic-rgb), .07);
    display: none;
}

.widget-ghost.on { display: block; }

.widget-ghost::after {
    content: attr(data-size);
    position: absolute;
    right: 6px;
    bottom: 4px;
    font-family: var(--font-mono);
    font-size: max(.55rem, var(--fs-min));
    letter-spacing: 2px;
    color: var(--toxic);
}

/* ---- minimized widget: a slim title bar, two micro-rows tall ----
   Two, not one: the micro-row halved when the grid was refined for half-height cards,
   and the bar still has to hold a 24px chrome button. 2 * 18.6 + 16 = 53.2px, the height
   it has always been. */
.section.widget-min {
    grid-row: span 2 !important;
    padding: 0 14px 0 14px !important;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

.section.widget-min > *:not(h2):not(.widget-chrome) { display: none !important; }
.section.widget-min .widget-resize { display: none !important; }

.section.widget-min > h2 {
    margin: 0;
    padding: 0 72px 0 0;   /* same three-button cluster as a full card's title */
    border-bottom: 0;
    font-size: .8rem;
    letter-spacing: 2px;
    /* One line, cut with an ellipsis: a long title ("Emergency Contacts") used to wrap to two
       lines inside the 53px bar and the top line was clipped (Dan, 2026-11-09). */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.section.widget-min::after { display: none; }
.section.widget-min .widget-chrome { top: 50%; transform: translateY(-50%); }

/* ---- half-height widget: 5 micro-rows = 157px ----
   layout.js sets `grid-row: span 5` inline and hangs this class alongside it, so CSS
   (and any widget that cares) can react to the height without measuring it. The card is
   a title bar and two or three lines: the padding comes in a touch, the rule under the
   title tightens, and the body scrolls rather than spilling past `overflow: hidden`.
   `.section-body` already scrolls on the y axis; this restates it as `auto` and gives
   the scrollbar a hair of room. A card with a `<p>` strapline under its title loses it —
   at this height the body is the point.

   Every rule here is :not(.expanded): a half card still expands to the same modal as
   any other, and unlike a minimized one it keeps its class while it is up there
   (modal.js restores a minimized card first, so .widget-min never has to say this). */
.section.widget-half:not(.expanded) {
    padding: 22px 14px 10px;
}

.section.widget-half:not(.expanded) > h2 {
    margin-bottom: 6px;
    padding-bottom: 6px;
    font-size: .85rem;
}

.section.widget-half:not(.expanded) > p { display: none; }

.section.widget-half:not(.expanded) .section-body {
    overflow: auto;
    gap: 6px;
}

.section.widget-half:not(.expanded)::after { display: none; }   /* no room for the bracket */

/* ---- the half card is 120px on a desktop deck (14.4px unit), not the 157px it was on the
   18.6px unit; these are the cards whose half layout needed a rule of its own for that.
   Title and one or two rows of content is the promise of a half card. ---- */
/* A long or wide-set title stays one line (the skin's uppercase face wraps "Family
   Messages" onto two in a 296px card and pushes the content out). */
.section.widget-half:not(.expanded) > h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Podcasts: no room for the strip of shows over the episode list and the player. */
.section.widget-half:not(.expanded) .pod-shows,
.section.widget-half:not(.expanded) .pod-head { display: none; }
/* Daily Question: the question on one line and a one-row answer field, so the field and the
   button are in view rather than under the card's edge. */
.section.widget-half:not(.expanded) .dq-question { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; overflow: hidden; }
.section.widget-half:not(.expanded) .daily-question-body textarea { min-height: 0; max-height: 34px; }
/* Funny Videos: the plate sits beside the title instead of over it. */
.section.widget-half:not(.expanded) .fv-item:not(.fv-playing) {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    column-gap: 8px;
    align-items: center;
    margin: 0;
    padding: 4px;
}
.section.widget-half:not(.expanded) .fv-item:not(.fv-playing) > .fv-plate { grid-row: 1 / span 2; }
.section.widget-half:not(.expanded) .fv-item:not(.fv-playing) > .fv-head,
.section.widget-half:not(.expanded) .fv-item:not(.fv-playing) > .fv-meta { margin-top: 0; }
.section.widget-half:not(.expanded) .fv-play { width: 28px; height: 28px; font-size: .9rem; }
.section.widget-half:not(.expanded) .fv-hint { display: none; }

/* pressed = the card IS half height. Scoped to this button: minimize carries
   aria-pressed too and has never looked latched. */
.widget-btn.widget-half-toggle[aria-pressed="true"] {
    color: var(--toxic);
    border-color: var(--toxic-dim);
    background: rgba(var(--toxic-rgb), .14);
}

/* ---- the gutter a touch target needs ----
   The coarse-pointer rule further up opens the chrome's gap to 8px and pads each button
   out to 32 x 32, so the cluster is wider than the 72px a mouse deck reserves: three
   buttons at 24 + two 8px gaps + the 9px inset + the 4px the first button's pad bleeds
   left = 101. This has to sit AFTER `.section.widget-min > h2` (same specificity, and
   the later rule wins) and BEFORE `.section.expanded > h2`, whose 48px is right — the
   chrome is hidden on a card that is up as the modal. Below 900px the half toggle goes
   away and the mobile block's narrower gutter, later still, takes over. */
@media (pointer: coarse) {
    .section h2,
    .section.widget-min > h2 { padding-right: 102px; }
}

/* ---- chrome is invisible + inert while a panel is the modal ---- */
.section.expanded .widget-chrome,
.section.expanded .widget-resize { display: none !important; }
.section.expanded > h2 { padding-right: 48px; }

/* ---- layout block inside settings ---- */
.settings-section .set-btn.layout-reset { margin-top: 4px; }

.settings-section .widget-key {
    display: inline-block;
    min-width: 18px;
    padding: 1px 4px;
    margin: 0 1px;
    background: var(--bg-panel-raised, var(--bg-inset));
    border: 1px solid var(--line);
    color: var(--toxic);
    font-family: var(--font-mono);
    font-size: .8rem;
    line-height: 1.1;
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    /* No lift, no glide: the card still follows the hand (that is direct manipulation,
       not motion) but does not scale up, and the deck simply has a new order on release.
       layout.js skips the settle outright (reduceMotion); these are the belt to that pair
       of braces, for a setting flipped mid-session. */
    .section.widget-dragging { transform: none !important; scale: none !important; }
    .section.widget-settling { transition: none !important; }
    .widget-chrome, .widget-btn, .widget-resize { transition: none; }

    /* And then everything else, the way admin.css does it in one line: the drag chrome
       was not the only thing moving. The sidebar status dot pulsed forever, the card
       flashed on update, the panel glided half a second to the centre and every hover
       lifted. Near-zero rather than `none` on purpose — animationend and transitionend
       still fire at .01ms, and layout.js's settle waits on one (it also skips the settle
       outright under this setting, and keeps a timer behind it either way). */
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Not on a frame: see the guard note on the RESPONSIVE block. */
@media (max-width: 900px) {
    /* single column: auto-height rows, resize and half height disabled, minimize still
       shrinks. Rows are `auto` here, so micro-rows and half rows mean nothing on a
       phone — a stored half card simply renders at its natural height, exactly as a
       stored 2-row card always has. */
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .grid-deck { grid-auto-rows: auto; }
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section { min-height: 300px; }
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section.widget-min {
        grid-row: auto !important;
        min-height: 0;
        height: 52px;
    }
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .widget-resize { display: none !important; }
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .widget-half-toggle { display: none !important; }
    /* Two buttons in the chrome again, so the title gets its gutter back: 2 x 18 plus
       one gap plus the 9px inset. The gap is the coarse-pointer 8px on every phone and
       2px on the rare fine-pointer narrow window, so this reserves for the wider of the
       two (24 + 24 + 8 + 9) plus the 4px the touch pad bleeds to the left = 69. */
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section h2 { padding-right: 70px; }
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section.widget-min > h2 { padding-right: 70px; }
    /* And a half card is not half of anything here — the class is still on it, so every
       rule the desktop deck hangs on it is put back, at matching specificity (the
       `:not()` above counts for one class, so these have to carry it too). */
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section.widget-half:not(.expanded) {
        padding: 26px 16px 14px;
        min-height: 300px;
    }
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section.widget-half:not(.expanded) > h2 {
        margin-bottom: 10px;
        padding-bottom: 8px;
        font-size: .95rem;
    }
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section.widget-half:not(.expanded) > p { display: block; }
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section.widget-half:not(.expanded) .section-body { gap: 8px; }
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section.widget-half:not(.expanded)::after { display: block; }

    /* ---- nothing on a phone grows without end ----
       `grid-auto-rows: auto` up top is what makes a phone deck readable: every card is
       exactly as tall as it needs to be. The cost is that a card holding a list is as
       tall as the list — the family's music library rendered all of it, and the deck
       below it became a scroll nobody reaches the end of. So every list that can grow
       gets the same ceiling here: a little under half the viewport, then it scrolls
       itself, exactly as it does on a desktop card. 45vh is deliberately not 50 — a
       capped list plus the card's own title has to read as "there is more below".

       Desktop is untouched (this is inside the 900px query), and so is a card that has
       been opened into the modal: `:not(.expanded)` leaves the full-screen reading view
       alone, where the whole point is to see everything.

       Covers: Family Music (.music-list), Podcasts episodes (.pod-episodes) and
       its shows (.pod-shows, .pod-results), Photographs and Video Clips
       (.photo-grid, which .clip-grid is built on), Stocks & Crypto (.ticker-list),
       Messages (.family-messages), YouTube (.youtube-videos-list), Recipes
       (.saved-recipes), and every card whose body is a plain list — Grocery, Chores,
       Notes, Homework, Reading, Watchlist, Countdowns and the rest — via
       `.section-body > ul`. */
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section:not(.expanded) .section-body > ul,
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section:not(.expanded) .music-list,
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section:not(.expanded) .pod-episodes,
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section:not(.expanded) .pod-shows,
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section:not(.expanded) .pod-results,
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section:not(.expanded) .photo-grid,
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section:not(.expanded) .ticker-list,
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section:not(.expanded) .family-messages,
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section:not(.expanded) .youtube-videos-list,
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section:not(.expanded) .saved-recipes {
        max-height: 45vh;
        overflow-y: auto;
    }

    /* The shows strip is the exception to the ceiling: it scrolls sideways, and a
       vertical cap on a single row of artwork would only clip it. */
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section:not(.expanded) .pod-shows {
        max-height: none;
        overflow-y: hidden;
    }

    /* Unless the card is two rows, where it is a stacked list like the others. The
       class survives on a phone even though spans do not — it is the only thing that
       still says "this card was meant to be tall". */
    :where(html:not([data-display="frame10"]):not([data-display="frame15"])) .section.widget-tall:not(.expanded) .pod-shows {
        max-height: 30vh;
        overflow-y: auto;
    }
}
/* ============================================================
   PHASE 3 ADDITIONS
   ============================================================ */

/* The reference markup carried two inline style="background:#4caf50"
   buttons (calendar add, funny-video add). A literal green survives no
   theme switch; this is the token-driven equivalent. */
.btn-affirm {
    flex: 0 0 auto;
    padding: 8px 14px;
    border: 1px solid var(--toxic-dim);
    background: linear-gradient(180deg, var(--bg-panel-raised) 0%, var(--bg-raised-2) 100%);
    color: var(--toxic);
    font-family: var(--font-stencil);
    font-size: max(.66rem, var(--fs-min));
    letter-spacing: 1.4px;
    text-transform: var(--case-heads, uppercase);
    cursor: pointer;
    transition: all .18s ease;
    white-space: nowrap;
}

.btn-affirm:hover {
    border-color: var(--toxic);
    box-shadow: 0 0 calc(9px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.16 * var(--glow-k)));
}

/* Same story for the inline rgba(255,255,255,.25)/.08 form fields the
   reference put on the calendar and funny-video inputs. */
.field-inline {
    flex: 1 1 160px;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--line);
    background: var(--overlay-1);
    color: inherit;
}

/* ---- section stubs (Phase 4 / Phase 7 fill these in) ---- */
.section-pending {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    border: 1px dashed var(--line);
    background: var(--overlay-2);
    padding: 14px;
    text-align: center;
}

.section-pending .pending-glyph {
    font-size: 1.6rem;
    opacity: .5;
    line-height: 1;
}

.section-pending .pending-note {
    font-family: var(--font-mono);
    font-size: max(.68rem, var(--fs-min));
    letter-spacing: 1px;
    text-transform: var(--case-heads, uppercase);
    color: var(--text-dim);
}

.section-pending .pending-phase {
    font-family: var(--font-mono);
    font-size: max(.62rem, var(--fs-min));
    letter-spacing: 1.6px;
    text-transform: var(--case-heads, uppercase);
    color: var(--toxic-dim);
}

/* ---- the shared empty/error line (sections/_ui.js note()) ----
   An empty list and a failed load used to look identical: the same faint grey line, and
   the only difference was a class with no rule behind it. The error keeps full opacity —
   note() leaves the inline dim off for this branch so this can win. */
.fc-note.err {
    color: var(--danger);
    opacity: 1;
}

/* ---- error toast (api.js central error hook) ---- */
.fc-toast-host {
    position: fixed;
    z-index: 12000;
    right: 14px;
    bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(360px, calc(100vw - 28px));
    pointer-events: none;
}

.fc-toast {
    pointer-events: auto;
    padding: 10px 12px;
    border: 1px solid rgba(var(--danger-rgb), .55);
    background: var(--bg-panel);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: max(.74rem, var(--fs-min));
    line-height: 1.45;
    letter-spacing: .04em;
    box-shadow: 0 6px 18px rgba(0,0,0,.55);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.fc-toast.ok { border-color: var(--toxic-dim); }

/* ---- billing banners (js/billing.js: trial countdown, grace, lock) ----
   In the document flow at the top of .main-area rather than fixed, on purpose: the
   lock banner is an explanation the family should scroll past once, not an overlay
   that follows them down a page of photographs. Tokens only — a light skin
   (Phase 7's hearts) redefines --overlay-* and this follows. */
.fc-banner-host {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fc-banner:not(:empty) {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-left-width: 4px;
    background: var(--bg-panel);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: max(.74rem, var(--fs-min));
    line-height: 1.5;
    letter-spacing: .04em;
}

.fc-banner.info   { border-left-color: var(--hazard); }
.fc-banner.warn   { border-left-color: var(--toxic); }
.fc-banner.danger { border-left-color: var(--danger); background: rgba(var(--danger-rgb), .08); }

.fc-banner-text { flex: 1 1 auto; min-width: 0; }

/* The demo ribbon's theme readout, beside the sentence and before the buttons. A token
   rather than an opacity, so it keeps 4.5:1 on the light skins (docs/adding-a-theme.md). */
.fc-banner-note {
    flex: 0 0 auto;
    color: var(--text-dim);
    white-space: nowrap;
}

.fc-banner-action,
.fc-banner-link,
.fc-banner-close {
    flex: 0 0 auto;
    cursor: pointer;
    border: 1px solid var(--line);
    background: var(--overlay-1);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: max(.7rem, var(--fs-min));
    letter-spacing: .08em;
    text-transform: var(--case-heads, uppercase);
    padding: 5px 10px;
}

.fc-banner-close {
    border: none;
    background: none;
    color: var(--text-dim);
    font-size: 1.1rem;
    line-height: 1;
    padding: 2px 6px;
    text-transform: none;
}

.fc-banner-action:hover { border-color: var(--toxic); color: var(--toxic); }
/* The demo ribbon's way home: an anchor wearing the button's clothes. */
.fc-banner-link { text-decoration: none; }
.fc-banner-link:hover { border-color: var(--toxic); color: var(--toxic); }
.fc-banner-close:hover  { color: var(--text); }

/* ---- the demo ribbon: ONE accent button, the rest quiet text links in one row ----
   "Start your own hub" is the only thing here that asks for anything, so it is the only
   thing drawn as a button; "Pause themes" and "Back to ..." go somewhere or pause
   something and read as links. Two classes deep so they win over polish.css's pills. */
.fc-banner.demo-banner .fc-banner-cta {
    background: var(--toxic);
    border-color: var(--toxic);
    color: var(--on-accent);
    min-height: 36px;
    padding: 6px 16px;
    font-weight: 700;
}
.fc-banner.demo-banner .fc-banner-cta:hover { filter: brightness(1.08); color: var(--on-accent); }
.fc-banner.demo-banner .fc-banner-textlink {
    flex: 0 1 auto;
    min-width: 0;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 2px;
    border: 0;
    background: none;
    color: var(--text);
    font: inherit;
    font-size: .8rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fc-banner.demo-banner .fc-banner-textlink:hover { color: var(--toxic); }
.fc-banner.demo-banner .fc-banner-textlink[hidden] { display: none; }
.fc-banner.demo-banner .fc-banner-note { font-size: .8rem; }

/* The view switch: a two-option segmented control, pressed = the view on screen. */
.fc-banner.demo-banner .demo-view-switch {
    display: inline-flex;
    flex: 0 0 auto;
    border: 1px solid var(--toxic);
    border-radius: 999px;
    overflow: hidden;
}
.fc-banner.demo-banner .demo-view-btn {
    min-height: 32px;
    padding: 0 14px;
    border: 0;
    background: none;
    color: var(--text);
    font: inherit;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.fc-banner.demo-banner .demo-view-btn + .demo-view-btn { border-left: 1px solid var(--toxic); }
.fc-banner.demo-banner .demo-view-btn[aria-pressed="true"] { background: var(--toxic); color: var(--on-accent); }
.fc-banner.demo-banner .demo-view-btn:not([aria-pressed="true"]):hover { color: var(--toxic); }
.fc-banner.demo-banner .demo-view-btn:focus-visible { outline: 2px solid var(--toxic); outline-offset: -3px; }

/* Desktop: ONE slim row, about 42px (it was 108px, two lines of crowded controls). The
   theme readout ("Harbor, set up for: ...") is the one item that can go: it only repeats
   what the skin already says, so below 1700px it is kept for screen readers (role=status)
   and drawn on wider screens, where it fits. */
@media (min-width: 701px) {
    .fc-banner.demo-banner:not(:empty) { padding: 5px 12px; gap: 4px 12px; margin-bottom: 8px; line-height: 1.3; flex-wrap: nowrap; }
    .fc-banner.demo-banner .fc-banner-cta { min-height: 30px; padding: 3px 14px; }
    .fc-banner.demo-banner .demo-view-btn,
    .fc-banner.demo-banner .fc-banner-textlink { min-height: 28px; }
}
@media (min-width: 701px) and (max-width: 1699px) {
    .fc-banner.demo-banner .fc-banner-note {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

@media (max-width: 700px) {
    /* Phone: the sentence, then ONE slim row (button, then the two links). The theme
       readout stays for screen readers (role=status) but is not drawn. */
    .fc-banner.demo-banner:not(:empty) { padding: 8px 12px; gap: 6px 12px; }
    .fc-banner.demo-banner .fc-banner-text { flex: 1 0 100%; font-size: .8rem; line-height: 1.4; }
    .fc-banner.demo-banner .fc-banner-note {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .fc-banner.demo-banner .fc-banner-cta { padding: 4px 12px; }
    /* The way home takes whatever width is left and ends in an ellipsis, so the row stays one row. */
    .fc-banner.demo-banner a.fc-banner-textlink { flex: 1 1 0; min-width: 3.5rem; }
}

/* ---- settings > billing panel ---- */
.billing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

/* ---- settings > billing > hubs on your bill (migration 0025) ----
   One row per family: the name and a line of detail on the left, one action on the
   right. Wraps to two lines on a phone rather than squeezing the button off the edge. */
.sponsor-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
}

.sponsor-row-main { min-width: 0; }
.sponsor-row-name { font-weight: 600; }
.sponsor-row .set-hint { margin: 2px 0 0; }

/* ---- the offer to be paid for (migration 0031) ----
   A boxed card rather than another `.sponsor-row`, and that is not decoration: the rows
   above are a list of what this family is doing, and this is a question put TO it, with
   a consequence (a card failing in another house makes this hub read-only) that has to
   be read before either button is pressed. */
.sponsor-offer {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.sponsor-offer .fc-note { padding-bottom: 0; }

/* ---- settings > billing > storage (migration 0027) ----
   A meter and, for an owner whose hub pays for itself, a stepper. The bar's WIDTH is set
   inline by settings.js because it is the only piece of this that is data; everything
   else is here. `--hazard-text` is the palette's "you are near a limit" colour, already
   used by the sign-ins card. */
.storage-meter {
    height: 8px;
    border-radius: 4px;
    background: var(--line);
    overflow: hidden;
    margin: 6px 0 4px;
}

.storage-meter-fill {
    height: 100%;
    width: 0;
    background: var(--toxic);
    transition: width .2s ease;
}

.storage-meter-fill.is-full { background: var(--hazard-text, var(--toxic)); }

.storage-stepper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.storage-stepper-count {
    min-width: 2.5em;
    text-align: center;
    font-weight: 600;
}

/* ---- shell bits Phase 3 added to the markup ---- */

/* Every card is `h2 + p + .section-body`; the module owns the body and
   nothing else, which is what makes a section module a 30-line file. */
.section-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

/* ---------- Calendar (js/sections/calendar.js): days, dots, no inline styles ----------
   Upcoming events sit under a day heading (Today / Tomorrow / Sat Oct 31); a row is the
   author's colour dot, the title and, on a line of its own, the place. The dot reads the
   same eight member hues as Messages and the frame wall (theme.css --fp-member-N). Every
   value is a token, so every skin restyles it; sizes are on the 12px floor (--fs-min). */
.events-list { list-style: none; padding: 0; margin: 0; }
.events-list > li.cal-day {
    margin: 10px 0 2px;
    padding: 0 2px;
    background: none;
    border-radius: 0;
    font-size: max(.72rem, var(--fs-min));
    font-weight: 700;
    letter-spacing: .03em;
    line-height: 1.3;
    color: var(--text-dim);
}
.events-list > li.cal-day:first-child { margin-top: 2px; }
.events-list > li.cal-day:hover { background: none; }
.events-list > li.cal-day-today { color: var(--toxic); }
.events-list > li.event-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 3px;
    padding: 6px 10px;
}
.events-list > li.event-past { color: var(--text-dim); }
.events-list > li.event-toggle { padding: 6px 0; background: none; }
.events-list > li.event-toggle:hover { background: none; }
.cal-dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    margin-top: .42em;
    border-radius: 50%;
    background: var(--member, var(--toxic));
    box-shadow: 0 0 0 2px var(--overlay-2, transparent);
}
.cal-dot[data-hue="0"] { --member: var(--fp-member-0); }
.cal-dot[data-hue="1"] { --member: var(--fp-member-1); }
.cal-dot[data-hue="2"] { --member: var(--fp-member-2); }
.cal-dot[data-hue="3"] { --member: var(--fp-member-3); }
.cal-dot[data-hue="4"] { --member: var(--fp-member-4); }
.cal-dot[data-hue="5"] { --member: var(--fp-member-5); }
.cal-dot[data-hue="6"] { --member: var(--fp-member-6); }
.cal-dot[data-hue="7"] { --member: var(--fp-member-7); }
.event-main { flex: 1 1 auto; min-width: 0; }
.event-title { overflow-wrap: anywhere; line-height: 1.3; }
.event-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 8px;
    margin-top: 1px;
    color: var(--text-dim);
    font-size: max(.78rem, var(--fs-min));
    line-height: 1.3;
}
.event-place { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.event-place > svg { flex: 0 0 auto; width: 12px; height: 12px; }
.event-place > span { overflow-wrap: anywhere; }
.event-meta .circle-badge { margin-left: 0; }
.event-form-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.event-date-input {
    flex: 0 1 170px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--line-strong, var(--overlay-2));
    background: var(--overlay-1);
    color: inherit;
    font: inherit;
}

/* The clipping cue: js/overflow-cue.js marks the element that is cutting a card's content
   off, only while it really overflows and can still scroll. A mask reveals the card's own
   background, so this is right on every skin. Never on an opened card. */
.section:not(.expanded) [data-clip-more] {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--clip-fade-h)), rgba(0, 0, 0, var(--clip-fade-floor)) 100%);
    mask-image: linear-gradient(to bottom, #000 calc(100% - var(--clip-fade-h)), rgba(0, 0, 0, var(--clip-fade-floor)) 100%);
}
/* Where a line of a card's content is cut half-way (Kudos, Chores, a short card whose list runs
   past its box), the fade has to be long enough that the cut line reads as fading, not as
   chopped: 2rem down to .12 in every skin. Twelve skins had tuned theirs to 1.1rem at .5, which
   left a half-cut line looking merely dim (review batch 6, F2). One rule at a specificity
   above every skin's own fade settings (theme.css), so a skin cannot undo it.
   NOT the Dashboard: its stat tiles fill the card to the bottom edge and the last row (Projects
   and Funny videos) has to read fully in every skin at every column count, so
   `.dashboard-content` keeps the short, firm fade each skin gave it (theme.css), as before
   this batch. The review found the stronger fade on it took professional to .64, steel to .33. */
html[data-theme] .section:not(.expanded) [data-clip-more]:not(.dashboard-content),
html:not([data-theme]) .section:not(.expanded) [data-clip-more]:not(.dashboard-content) {
    --clip-fade-h: 2rem;
    --clip-fade-floor: .12;
}

.section.widget-min .section-body { display: none; }

/* The reference logged out through <a href="logout.php">. Logout is a
   CSRF-protected POST now, so it is a button wearing the same coat. */
.nav-logout {
    width: 100%;
    cursor: pointer;
    font-weight: inherit;
}

/* The UA's `[hidden] { display: none }` is a type-less attribute selector and loses to
   the `display: flex` above, so the attribute would hide nothing. js/demo.js sets it:
   the demo hub has no session to terminate. */
.nav-logout[hidden] { display: none; }

/* Privacy / Terms / Acceptable use under the sign-out button. Small and dim, wraps in the
   narrow mobile drawer. */
.nav-legal {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 6px;
    font-size: max(11px, var(--fs-min));
    line-height: 1.5;
    color: var(--text-dimmer, var(--text-dim));
}
.nav-legal a {
    color: inherit;
    text-decoration: none;
}
.nav-legal a:hover,
.nav-legal a:focus-visible {
    text-decoration: underline;
}

.nav-whoami {
    margin: 8px 0;
    padding: 7px 10px;
    border: 1px solid var(--line);
    background: var(--modal-fill);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: max(.62rem, var(--fs-min));
    letter-spacing: 1.2px;
    text-transform: var(--case-heads, uppercase);
    text-align: center;
    overflow-wrap: break-word;
}

.quote-display-header:focus-visible {
    outline: 1px solid var(--toxic-dim);
    outline-offset: 2px;
}

/* The sidebar nav list is built by js/registry.js, so the shell must not
   flash an empty rail before the module manifest is read. */
.nav-list:empty::after {
    content: "Loading…";
    display: block;
    padding: 12px;
    font-family: var(--font-mono);
    font-size: max(.68rem, var(--fs-min));
    letter-spacing: 1px;
    color: var(--text-dim);
}

/* Homework (migration 0028): a row whose due date has gone past and is not ticked.
   The class is put on by js/sections/homework.js, which does the date arithmetic in the
   browser — `due_on` is a plain calendar date and only the browser is standing in the
   family's own timezone. A left rule and the skin's own danger ink, so it reads as late
   on every theme without a second colour that only works on the dark ones. */
.homework-overdue {
    border-left: 3px solid var(--danger);
    padding-left: 7px;
}

/* first run ------------------------------------------------------------------
   The owner's guided pass over a brand-new hub (web/js/first-run.js). It is a
   dialog, not a card: it sits outside <main>, above the deck, and the deck and the
   rail are `inert` behind it. Everything here is tokens, so it wears whichever of
   the thirty-four skins the owner is trying on in step 2 without a second palette. */

.first-run {
    position: fixed;
    inset: 0;
    z-index: 11000;               /* over the expanded card (9500) and the dock (9995) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* The UA's `[hidden] { display: none }` is a type selector and loses to `.first-run`
   above — without this, every hub that is NOT being offered the wizard (first-run.js
   returns before it ever touches the host) wears a dead scrim and an empty dialog over
   the whole deck at z-index 11000, with no handlers on it to close it. */
.first-run[hidden] { display: none; }

.first-run-scrim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .62);
}

.first-run-dialog {
    position: relative;
    width: min(640px, 100%);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 20px 20px 18px;
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-top: 3px solid var(--toxic-dim);
    border-radius: var(--radius-card, 4px);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .55);
    color: var(--text);
}

.first-run-dialog:focus-visible { outline: 1px solid var(--toxic-dim); outline-offset: 2px; }

.first-run-dismiss {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 32px;
    min-height: 32px;
    border: none;
    background: transparent;
    color: var(--text-dim);
    font-size: 1rem;
    cursor: pointer;
}
.first-run-dismiss:hover { color: var(--text); }

.first-run-steps {
    font-family: var(--font-mono);
    font-size: max(.6rem, var(--fs-min));
    letter-spacing: 2px;
    text-transform: var(--case-heads, uppercase);
    color: var(--text-dim);
}

.first-run-title {
    margin: 4px 0 6px;
    font-family: var(--font-stencil);
    font-size: 1.15rem;
    text-transform: var(--case-heads, none);
}

.first-run-lead {
    margin: 0 0 12px;
    color: var(--text-dim);
    font-size: .82rem;
    line-height: 1.45;
}

.first-run-body > .set-sub-title { margin-top: 14px; }

/* `.set-msg.ok` / `.set-msg.err` are scoped to `.settings-section` in the block above,
   and this dialog is not a card — so the two states are restated here rather than
   loosened there, where they would start colouring messages in every widget. */
.first-run-msg {
    min-height: 1.1em;
    margin: 8px 0 0;
    font-family: var(--font-mono);
    font-size: max(.72rem, var(--fs-min));
    color: var(--text-dim);
}
.first-run-msg.ok  { color: var(--toxic); }
.first-run-msg.err { color: var(--danger); }

.first-run-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
/* Skip sits left and reads as the quiet option; the step's own action sits right. */
.first-run-foot .fr-skip { margin-right: auto; }

/* The `set-*` vocabulary — buttons, inputs, hints, sub-titles — is scoped to
   `.settings-section` where it is defined, and this dialog is not a card. Rather than
   widen those selectors (which would start restyling controls in every widget that
   happens to borrow the class), the handful this dialog uses are restated here against
   the same tokens, so a skin change moves both together. */

.first-run .set-sub-title {
    font-family: var(--font-stencil);
    text-transform: var(--case-heads, uppercase);
    letter-spacing: var(--tracking-h2, 2.5px);
    font-size: max(.6rem, var(--fs-min));
    color: var(--hazard);
    margin: 14px 0 8px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.first-run .set-hint {
    font-family: var(--font-mono);
    font-size: max(.62rem, var(--fs-min));
    letter-spacing: 1px;
    line-height: 1.5;
    color: var(--text-dim);
    text-transform: var(--case-heads, uppercase);
}

.first-run .set-btn,
.first-run .set-btn-sm {
    font-family: var(--font-stencil);
    text-transform: var(--case-heads, uppercase);
    letter-spacing: 1.4px;
    background: rgba(var(--toxic-rgb), .07);
    border: 1px solid var(--toxic-dim);
    color: var(--toxic);
    cursor: pointer;
    transition: all .18s ease;
}
.first-run .set-btn { font-size: max(.68rem, var(--fs-min)); padding: 9px 14px; }
.first-run .set-btn-sm { font-size: max(.56rem, var(--fs-min)); padding: 5px 8px; }
.first-run .set-btn:hover,
.first-run .set-btn-sm:hover {
    background: rgba(var(--toxic-rgb), .16);
    box-shadow: var(--glow-soft);
}
.first-run .set-btn[disabled],
.first-run .set-btn-sm[disabled] {
    opacity: .4;
    cursor: not-allowed;
    color: var(--text-disabled);
    border-color: var(--line);
    background: transparent;
    box-shadow: none;
}
/* Skip is an ordinary button (it was plain underlined text, which read as a caption);
   what keeps it quieter than the step's own action is that it sits apart, on the left. */
.first-run .set-input {
    background: var(--bg-deep);
    border: 1px solid var(--line-strong);
    color: var(--toxic);
    caret-color: var(--toxic);
    font-family: var(--font-mono);
    font-size: .76rem;
    letter-spacing: 1px;
    padding: 9px 10px;
    outline: none;
    width: 100%;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.first-run .set-input:focus {
    border-color: var(--toxic-dim);
    box-shadow: var(--glow-soft) inset;
}
.first-run .set-input::placeholder { color: var(--text-dimmer); letter-spacing: 1px; }

/* ---- step 1: who lives here ---- */

.fr-person {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}
.fr-person > .set-input { flex: 1 1 150px; min-width: 0; }
.fr-person .fr-role { flex: 0 0 auto; width: auto; }
.fr-kid-bits { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 100%; }
/* Same specificity trap as `.first-run` above: the row toggles `.hidden` as the Adult/Kid
   select changes, so without this an adult row carries a kid's password field too. */
.fr-kid-bits[hidden] { display: none; }
.fr-kid-bits .fr-pw { flex: 1 1 180px; min-width: 0; }
.fr-adult-bits { display: flex; flex: 1 1 200px; min-width: 0; }
.fr-adult-bits[hidden] { display: none; }
.fr-adult-bits .fr-email { flex: 1 1 100%; min-width: 0; }

.fr-results { margin-top: 14px; }
.fr-made-row {
    margin: 10px 0;
    padding: 9px 10px;
    background: var(--bg-panel-2);
    border: 1px solid var(--line);
    border-left: 3px solid var(--toxic-dim);
}
.fr-made-who { font-size: .82rem; margin-bottom: 6px; }
.fr-copy-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---- step 2: what goes on the screen ---- */

.fr-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 6px;
    margin: 8px 0 4px;
}
.fr-card {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .76rem;
    cursor: pointer;
}
.fr-swatches { margin: 8px 0 4px; }

/* "Start small": one calm line above the groups, then one fieldset per bundle name. */
.fr-start-small {
    margin: 4px 0 6px;
    padding: 9px 12px;
    font-size: .82rem;
    line-height: 1.45;
    color: var(--text-dim);
    border: 1px dashed var(--line);
    border-radius: var(--radius-control, 0);
    background: var(--bg-panel-2);
}
.fr-start-small strong { color: var(--text); }
.fr-group { margin: 12px 0 0; padding: 0; border: 0; min-inline-size: 0; }
.fr-group-title {
    padding: 0;
    margin-bottom: 2px;
    font-family: var(--font-stencil);
    text-transform: var(--case-heads, uppercase);
    letter-spacing: var(--tracking-h2, 2.5px);
    font-size: .75rem;
    color: var(--hazard);
}
.fr-group-note {
    margin-left: 8px;
    font-family: var(--font-mono);
    font-size: .75rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-dim);
}

/* ---- step 3: put one thing on the wall ---- */

.fr-message {
    width: 100%;
    min-height: 68px;
    margin-bottom: 8px;
    resize: vertical;
}

.fr-drop {
    margin-top: 8px;
    padding: 18px 12px;
    text-align: center;
    color: var(--text-dim);
    font-size: .82rem;
    border: 1px dashed var(--line);
    background: var(--bg-panel-2);
    cursor: pointer;
}
.fr-drop > * + * { margin-top: 10px; }
.fr-drop-over { border-color: var(--toxic); color: var(--text); }
.fr-drop:focus-visible { outline: 1px solid var(--toxic-dim); outline-offset: 2px; }

/* A phone: the dialog takes the screen rather than floating in a 16px gutter. */
@media (max-width: 480px) {
    .first-run { padding: 0; align-items: stretch; }
    .first-run-dialog { max-height: 100vh; width: 100%; border-radius: 0; }
    .fr-person .fr-role { width: 100%; }
}

/* ============================================================
   FAMILY TV (js/sections/tv-embed.js)
   The small card is the guide: family channels, then my videos, one row each,
   scrolling inside the card at any size. The opened card is the TV: one 16:9
   player across the top, sized so the guide under it is still in reach, then
   the same rows. The player slot never appears on the deck (Dan, 2026-10-07: a
   frame in a 1x1 card was cut off by the card's bottom edge).
   ============================================================ */
.tv {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.section:not(.expanded) .tv-stage { display: none !important; }

.tv-player {
    position: relative;
    /* Full width, but never so tall the guide falls out of the dialog: 85vh is the
       expanded card's ceiling and ~300px its title, strapline and first rows. */
    width: min(100%, calc((85vh - 300px) * 16 / 9));
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--line);
    border-radius: var(--radius-control, 4px);
    background: var(--overlay-1);
    overflow: hidden;
}

.tv-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.section-body .tv-plate {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 0;
    padding: 12px;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--text);
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
}

.section-body .tv-plate:hover .tv-plate-ic { color: var(--toxic); }
.section-body .tv-plate:focus-visible { outline: 2px solid var(--toxic); outline-offset: -2px; }
.tv-plate-ic { color: var(--text-dim); transition: color .15s ease-out; }
.tv-plate-ic .ico { width: 44px; height: 44px; stroke-width: 1.4; }
.tv-plate-name {
    max-width: 90%;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tv-plate-hint { font-size: .78rem; color: var(--text-dim); }

.tv-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
    font-size: max(.7rem, var(--fs-min));
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.tv-lists > .tv-head ~ .tv-head { margin-top: 10px; }
.tv-count { font-family: var(--font-mono); letter-spacing: 0; }

.section .tv-list {
    flex: none;
    overflow: visible;
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
}

/* The deck's generic list-row tint (`.section ul li`) is for plain lists; these rows
   draw their own, as the setlist's and the podcasts' do. */
.section .tv-list > li {
    margin: 0;
    padding: 0;
    border-left: 0;
    border-bottom: 1px solid var(--overlay-1);
    background: transparent;
    font-size: inherit;
}
.section .tv-list > li:hover { background: transparent; }
.section .tv-list > li:last-child { border-bottom-color: transparent; }

.section-body .tv-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 0;
    padding: 6px;
    border: 0;
    border-radius: var(--radius-control, 4px);
    background: transparent;
    box-shadow: none;
    color: var(--text);
    font: inherit;
    font-size: .85rem;
    letter-spacing: normal;
    text-transform: none;
    text-align: left;
    cursor: pointer;
}

.section-body .tv-row:hover { background: var(--overlay-1); }
.section-body .tv-row:focus-visible { outline: 2px solid var(--toxic); outline-offset: -2px; }
.section-body .tv-row.is-playing { background: rgba(var(--toxic-rgb), .1); }

.tv-row-ic {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text-dim);
    transition: color .15s ease-out, border-color .15s ease-out, background-color .15s ease-out;
}
.tv-row-ic .ico { width: 12px; height: 12px; }
.tv-row:hover .tv-row-ic { border-color: var(--toxic); color: var(--toxic); }
.tv-row.is-playing .tv-row-ic { background: var(--toxic); border-color: var(--toxic); color: var(--on-accent); }

/* The row's 16:9 still: a fixed box, glyph centred underneath, the same-origin picture
   (/api/img/yt/<id>) laid over it once it arrives — so a slow, missing or failed still
   never changes the row's height. A playlist row has no picture and shows the glyph. */
.tv-row-thumb {
    position: relative;
    flex: 0 0 auto;
    width: 64px;
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: var(--radius-control, 4px);
    background: var(--overlay-1);
}
.tv-row-thumb > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tv-row.is-playing .tv-row-thumb { box-shadow: 0 0 0 2px var(--toxic); }

.tv-row-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tv-row-meta {
    flex: 0 0 auto;
    font-size: max(.7rem, var(--fs-min));
    color: var(--text-dim);
}

/* Half height: tighter rows, so two or three still show under the strapline. */
.section.widget-half:not(.expanded) .tv { gap: 4px; }
.section.widget-half:not(.expanded) .section-body .tv-row { padding: 3px 6px; }
.section.widget-half:not(.expanded) .tv-row-ic { width: 20px; height: 20px; }
.section.widget-half:not(.expanded) .tv-row-thumb { width: 48px; }

.section.expanded .section-body .tv-row { padding: 9px 8px; }
.section.expanded .tv-row-thumb { width: 96px; }

@media (pointer: coarse) {
    .section-body .tv-row { min-height: 44px; }
}

/* A page in another language stays hidden until js/i18n.js has put its words in
   (js/theme-boot.js sets the attribute, and removes it itself after 3s whatever happens). */
html[data-i18n-pending] body { visibility: hidden; }

/* ---- Funny Videos (sections/funny-videos.js) ----
   A tile is plate, title, then "badge · added by". The plate is 16:9 for every platform
   so the list reads as one column of the same shape; a portrait still (TikTok, a reel, a
   Short) is shown whole inside it rather than cropped. Only the PLAYING frame changes
   shape: 16:9 for YouTube, ~9:16 for the portrait players, capped so a phone-tall
   player never runs past the viewport. Tokens only - no platform brand colours. */
.fv-item {
    margin: 10px 0;
    padding: 8px;
    border: 1px solid var(--line);
    background: var(--overlay-1);
}
.fv-plate {
    position: relative;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-inset);
    border: 1px solid var(--line);
}
.fv-plate:focus-visible { outline: 1px solid var(--toxic); outline-offset: 2px; }
.fv-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fv-plate.fv-portrait .fv-thumb { object-fit: contain; }
.fv-play {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid var(--toxic-dim);
    background: var(--bg-panel-raised);
    color: var(--toxic);
    font-size: 1.3rem;
    transition: transform .15s ease, box-shadow .15s ease;
}
.fv-play .ico { margin-left: 3px; }
.fv-plate:hover .fv-play,
.fv-plate:focus-visible .fv-play {
    transform: scale(1.06);
    box-shadow: 0 0 calc(12px * var(--glow-blur-k)) rgba(var(--toxic-rgb), calc(.25 * var(--glow-k)));
}
.fv-hint {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 3px 6px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: max(.62rem, var(--fs-min));
    letter-spacing: 1px;
    text-transform: var(--case-heads, uppercase);
    color: var(--text-dim);
    background: var(--bg-panel);
    border-top: 1px solid var(--line);
}
.fv-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
}
.fv-title {
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fv-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: .75rem;
    color: var(--text-dim);
}
.fv-badge {
    padding: 1px 6px;
    border: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: max(.6rem, var(--fs-min));
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text);
    background: var(--bg-panel-2);
}
.fv-link { display: inline-block; margin-top: 6px; text-decoration: underline; }
.fv-link.fv-dead { text-decoration: none; color: var(--text-dim); }
.fv-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-inset);
}
.fv-frame.fv-portrait {
    aspect-ratio: 9 / 16;
    height: min(70vh, 620px);
    max-width: 100%;
    margin-inline: auto;
}
/* TikTok's and Instagram's players are not bare video: both draw their own chrome (a
   caption strip, a profile header) and lay out for a minimum of ~325px wide, so they get a
   little more width than 9:16 or they scroll inside the frame. */
.fv-frame.fv-frame-tiktok.fv-portrait { aspect-ratio: 10 / 16; }
.fv-frame.fv-frame-instagram.fv-portrait { aspect-ratio: 10 / 17; height: min(75vh, 680px); }
.fv-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
/* A playing tile keeps its record in view: title and "badge · added by" move ABOVE the
   frame, so a phone-tall player (or TikTok's end screen, which is only the creator's
   header) can never hide which family post this is. */
.fv-item.fv-playing { display: flex; flex-direction: column; }
.fv-item.fv-playing > .fv-head { order: -2; margin-top: 0; }
.fv-item.fv-playing > .fv-meta { order: -1; margin: 4px 0 8px; }
/* "Back to video": a 44px target flush in the frame's top-right corner (in TikTok's white
   margin, clear of its "View profile"), drawn as a smaller disc. */
.fv-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}
.fv-close > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--bg-panel-raised);
    font-size: .85rem;
    line-height: 1;
}
.fv-close:hover > span,
.fv-close:focus-visible > span { color: var(--toxic); border-color: var(--toxic-dim); }
.fv-close:focus-visible { outline: 1px solid var(--toxic); outline-offset: -2px; }
/* Instagram's player has no side margin and its header's "View profile" sits in that
   corner, so its × drops just below the ~54px header, onto the top of the picture. */
.fv-frame-instagram .fv-close { top: 58px; }
/* Opened card: tiles go to a grid instead of one tall column, and a tile that is playing
   takes the whole row so a portrait player gets its full height. */
.section.expanded .funny-videos-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    align-items: start;
}
.section.expanded .funny-videos-list > .fc-note { grid-column: 1 / -1; }
.section.expanded .fv-item { margin: 0; }
.section.expanded .fv-item:has(.fv-frame) { grid-column: 1 / -1; }

/* ============================================================
   SETTINGS: FOUR PANES (2026-10-07, "the rail")
   You / Family / Hub / Billing, one at a time. Desktop: a rail of sections down the
   left, each with a one-line summary, sticky while the pane scrolls. Phone: the same
   buttons as four tabs across the top. Tokens only; every skin inherits it.
   ============================================================ */
.set-shell[hidden], .set-rail[hidden], .set-rail-tab[hidden], .set-pane[hidden],
.settings-section .set-block[hidden], .set-password[hidden], .media-list[hidden] { display: none !important; }

.set-shell {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}
.set-shell.is-single { grid-template-columns: minmax(0, 1fr); }

.set-rail {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.set-rail-tabs { display: flex; flex-direction: column; gap: 4px; }

.settings-section .set-rail-tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-dim);
    text-align: left;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.settings-section .set-rail-tab:hover { background: var(--overlay-1); color: var(--text); }
.settings-section .set-rail-tab:focus-visible { outline: 2px solid var(--toxic); outline-offset: 1px; }
.settings-section .set-rail-tab[aria-selected="true"] {
    background: rgba(var(--toxic-rgb), .1);
    border-color: var(--toxic-dim);
    color: var(--selected-ink);
}
.set-rail-name {
    font-family: var(--font-stencil);
    text-transform: var(--case-heads, uppercase);
    letter-spacing: var(--tracking-h2, 2.5px);
    font-size: max(.74rem, var(--fs-min));
}
.set-rail-sum {
    font-family: var(--font-mono);
    font-size: max(.7rem, var(--fs-min));
    letter-spacing: .3px;
    line-height: 1.35;
    color: var(--text-dim);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.set-rail-sum:empty { display: none; }

.set-rail-jump {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 0 0 12px;
    border-top: 1px solid var(--line);
}
.set-rail-jump:empty { display: none; }
.settings-section .set-rail-jump-link {
    background: none;
    border: 0;
    padding: 5px 0;
    text-align: left;
    font-family: var(--font-mono);
    font-size: max(.7rem, var(--fs-min));
    letter-spacing: .5px;
    color: var(--text-dim);
    cursor: pointer;
}
.settings-section .set-rail-jump-link:hover,
.settings-section .set-rail-jump-link:focus-visible { color: var(--toxic); text-decoration: underline; text-underline-offset: 3px; outline: none; }

.set-panes { min-width: 0; }
.settings-section .set-pane-hint { margin: 0 0 12px; }
.settings-section .set-sub-first { margin-top: 0; border-top: 0; padding-top: 0; }

/* the offline note, at the top of whichever pane is open */
.set-offline {
    margin: 0 0 12px;
    padding: 8px 10px;
    border: 1px solid rgba(var(--danger-rgb), .45);
    background: rgba(var(--danger-rgb), .08);
    color: var(--danger);
    font-family: var(--font-mono);
    font-size: max(.64rem, var(--fs-min));
    letter-spacing: .8px;
}

/* a row of buttons (and a select) that belong together */
.settings-section .set-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.settings-section .set-actions .set-input { width: auto; flex: 1 1 180px; max-width: 260px; }
.settings-section .set-check { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .78rem; cursor: pointer; }
/* Settings › Hub › Picture frames: the six panel boxes wrap in a row, and each quiet-hour
   time sits beside its own label. */
.settings-section .set-frame-panels { display: flex; flex-wrap: wrap; gap: 0 18px; }
/* The two radio pairs ("Way into the hub", "This wall shows") lay out like the panels. */
.settings-section .set-frame-nav,
.settings-section .set-frame-scope { display: flex; flex-wrap: wrap; gap: 0 18px; }
.settings-section .set-frame-time { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; }
.settings-section .set-frame-time .set-input { max-width: 140px; }
.settings-section .set-frame-time .set-input:disabled { color: var(--text-dimmer); cursor: not-allowed; }

.settings-section .set-btn.danger {
    background: rgba(var(--danger-rgb), .08);
    border-color: rgba(var(--danger-rgb), .5);
    color: var(--danger);
}
.settings-section .set-btn.danger:hover { background: rgba(var(--danger-rgb), .2); }

/* the confirm row also lands inside sponsor, kin and circle rows */
.sponsor-row > .set-confirm, .kin-row > .set-confirm, .circle-row > .set-confirm { flex: 1 1 100%; }

.settings-section .set-password { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* Settings › Account › Passkeys (settings.js initPasskeys): one bordered row per passkey,
   name over a dim line of facts, Rename / Take off beneath. Colours are the theme's own. */
.settings-section .passkey-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.settings-section .passkey-row {
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control, 6px);
    background: var(--bg-inset, transparent);
}
.settings-section .passkey-name { font-weight: 600; overflow-wrap: anywhere; }
.settings-section .passkey-detail { margin-top: 3px; font-size: .8rem; color: var(--text-dim); }
.settings-section .passkey-actions { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.settings-section .passkey-actions .set-input { flex: 1 1 160px; width: auto; min-width: 0; }
/* Rename swaps the buttons for an editor by toggling `hidden` (settings.js). */
.settings-section .passkey-actions[hidden] { display: none; }
.settings-section .set-password .set-input { flex: 1 1 180px; width: auto; min-width: 0; }

.settings-section .weather-row .set-input { width: auto; }

/* ---- Hub › Cards on this hub: one table, two columns ---- */
.set-cards-wrap { margin: 10px 0 0; border: 1px solid var(--line); max-height: 60vh; overflow-y: auto; }
.settings-section .set-cards { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: max(.74rem, var(--fs-min)); }
.settings-section .set-cards th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bg-panel-2);
    padding: 8px 10px;
    text-align: left;
    font-family: var(--font-stencil);
    font-size: max(.58rem, var(--fs-min));
    font-weight: normal;
    letter-spacing: 1.6px;
    text-transform: var(--case-heads, uppercase);
    color: var(--hazard);
    border-bottom: 1px solid var(--line);
}
.settings-section .set-cards td { padding: 6px 10px; border-bottom: 1px solid var(--line); color: var(--text); vertical-align: middle; }
.settings-section .set-cards tr:last-child td { border-bottom: 0; }
.settings-section .set-cards .c { text-align: center; width: 92px; }
.settings-section .set-cards input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--toxic); cursor: pointer; }
.settings-section .set-cards input[type="checkbox"]:disabled { cursor: not-allowed; }
.set-cards-label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.set-cards-label .ico { width: 14px; height: 14px; flex: 0 0 auto; }
.settings-section .set-cards tr.is-locked td { color: var(--text-dim); }
.set-cards-bundle {
    font-size: max(.6rem, var(--fs-min));
    letter-spacing: .6px;
    padding: 1px 6px;
    border: 1px solid var(--line);
    color: var(--text-dim);
}
.set-cards-none { color: var(--text-dimmer); }
/* One group row per bundle name, then a quiet one-line description under each card. */
.settings-section .set-cards tr.set-cards-group td {
    padding: 9px 10px 5px;
    background: var(--bg-panel-2);
    font-family: var(--font-stencil);
    font-size: .75rem;
    letter-spacing: 1.4px;
    text-transform: var(--case-heads, uppercase);
    color: var(--hazard);
    border-bottom: 1px solid var(--line);
}
.set-cards-desc {
    margin-top: 2px;
    font-family: var(--font-body, inherit);
    font-size: .75rem;
    line-height: 1.4;
    color: var(--text-dim);
}
/* "Members may hide" folds away: the status line is the button, the column follows it. */
.set-cards-disclose {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    margin: 10px 0 0;
    padding: 4px 6px;
    background: transparent;
    border: 0;
    color: var(--text-dim);
    font: inherit;
    font-size: .8rem;
    cursor: pointer;
}
.set-cards-disclose:hover { color: var(--text); }
.set-cards-chev { display: inline-block; transition: transform .15s ease; }
.set-cards-disclose[aria-expanded="true"] .set-cards-chev { transform: rotate(90deg); }
.set-cards-hide-panel { margin: 4px 0 0 6px; }
.set-cards-hide-panel[hidden] { display: none; }
.settings-section .set-cards:not(.hides-open) .c-hide { display: none; }
@media (prefers-reduced-motion: reduce) { .set-cards-chev { transition: none; } }

/* ---- Cards a bundle would add (js/sections/_bundle-offer.js) ----
   The note is plain dim text on the card's own ground: --text-dim is held to 4.5:1 on
   both ends of the card gradient in every skin by tools/contrast-check.js. */
.bundle-offer-note {
    font-size: max(.72rem, var(--fs-min));
    color: var(--text-dim);
}
.locked-cards { margin-top: 14px; }
.locked-cards .set-hint { margin-bottom: 6px; }
.locked-card-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-top: 1px solid var(--line);
    cursor: default;
}
.locked-card-row > span:first-child { min-width: 9em; }

/* ---- The demo hub's "Add-on" tag on a bundled card's header ----
   No fill and no glow: the text is --text-dim on the card ground (checked to 4.5:1 in
   every skin), the outline --line-strong (checked to 3:1). The h2's own transform and
   tracking are reset so the tag reads as a label, not as part of the title. */
.section h2 .card-addon-tag {
    margin-left: auto;
    padding: 1px 6px;
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: max(.58rem, var(--fs-min));
    font-weight: 600;
    letter-spacing: .6px;
    text-transform: none;
    text-shadow: none;
    color: var(--text-dim);
    white-space: nowrap;
    flex: 0 0 auto;
}

/* ---- Hub › Family Radio & TV: one list at a time ---- */
.set-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.settings-section .set-tab {
    padding: 6px 10px;
    min-height: 32px;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: max(.7rem, var(--fs-min));
    letter-spacing: .5px;
    cursor: pointer;
}
.settings-section .set-tab:hover { color: var(--text); border-color: var(--toxic-dim); }
.settings-section .set-tab:focus-visible { outline: 2px solid var(--toxic); outline-offset: 1px; }
.settings-section .set-tab[aria-selected="true"] { color: var(--selected-ink); border-color: var(--toxic-dim); background: rgba(var(--toxic-rgb), .1); }
.settings-section .media-list-title { display: none; }

.set-slot:empty { display: none; }

/* Family › Invite someone / Add a kid account: which circles (and, owner only, which
   sides) the newcomer lands in. Filled by _personnel.js; hidden when there is nothing. */
.set-form .set-slot { margin-top: 12px; }
.set-form .set-slot .circle-ticks { margin-bottom: 2px; }
.set-pick-label {
    font-family: var(--font-mono);
    font-size: max(.7rem, var(--fs-min));
    letter-spacing: .5px;
    color: var(--text-dim);
    margin-bottom: 4px;
}

/* ---- phone: four tabs across the top ---- */
@media (max-width: 760px) {
    .set-shell { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .set-rail {
        margin: 0 -14px;
        padding: 6px 14px 8px;
        background: var(--modal-fill);
        border-bottom: 1px solid var(--line);
    }
    .set-rail-tabs { flex-direction: row; gap: 4px; }
    .settings-section .set-rail-tab {
        flex: 1 1 0;
        min-width: 0;
        align-items: center;
        justify-content: center;
        padding: 8px 4px;
        text-align: center;
    }
    .set-rail-name { font-size: max(.72rem, var(--fs-min)); letter-spacing: 1px; }
    .set-rail-sum, .set-rail-jump { display: none; }

    /* thirty-four skins as three narrow columns: all still shown, a third of the scroll */
    .settings-section .theme-swatch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .settings-section .theme-swatch { padding: 7px 7px 6px; gap: 4px; }
    .settings-section .theme-swatch-glyph { font-size: 1rem; }
    .settings-section .theme-swatch-name { font-size: max(.62rem, var(--fs-min)); letter-spacing: .3px; }
    .settings-section .theme-swatch-strip { height: 7px; }

    /* the 37 cards of My deck, two to a row */
    .settings-section #hidden-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
    .settings-section .hidden-card-row { min-width: 0; font-size: max(.74rem, var(--fs-min)); }

    /* the cards table keeps its own scroll (header pinned) so Hub stays one screenful
       of table, not 39 rows of page */
    .settings-section .set-cards .c { width: 56px; }
    .settings-section .set-cards td { padding: 5px 8px; }
    .set-cards-wrap { max-height: 55vh; }
}

/* Text for screen readers only (the keyboard-move announcement lives in one of these). */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- The spotlight: "New from the family" (frames only, 2026-10-16; js/sections/_spotlight.js) ----------
   A layer in the packed wall's grid, placed by today.js over the photo cell (or the largest
   panel), above every cell and under the slideshow and the quiet screen. A glow edge in the
   skin's accent, the "New from …" line, then the thing itself: a photo or a poster full
   bleed, a big play button for a clip or a funny video (nothing plays until the tap), or
   large type for words. The glow pulses only when motion is welcome. */
.today-spotlight { display: none; }
html[data-display="frame10"] #today-view .today-spotlight,
html[data-display="frame15"] #today-view .today-spotlight {
    display: flex; flex-direction: column; position: relative; z-index: 40; min-width: 0; min-height: 0;
    overflow: hidden; border-radius: var(--radius-card); background: var(--bg-panel);
    border: 2px solid var(--toxic); box-shadow: 0 0 0 1px var(--toxic), 0 0 28px rgba(var(--toxic-rgb), 0.55);
    color: var(--text);
}
html[data-display="frame10"] #today-view .today-spotlight[hidden],
html[data-display="frame15"] #today-view .today-spotlight[hidden] { display: none; }
.today-spotlight-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; flex: 0 0 auto; }
.today-spotlight-head { flex: 1 1 auto; min-width: 0; font-size: 1.05rem; font-weight: 700; font-variant: small-caps; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-spotlight-close { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line-strong); background: var(--bg-panel-2); color: var(--text); font-size: 1.1rem; cursor: pointer; }
.today-spotlight-media { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; background: var(--bg-deep); }
.today-spotlight.is-words .today-spotlight-media { display: none; }
.today-spotlight-img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.today-spotlight-plate { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.today-spotlight-plate .today-spotlight-img { position: absolute; inset: 0; }
.today-spotlight-play { position: relative; width: 96px; height: 96px; border-radius: 48px; display: flex; align-items: center; justify-content: center; background: var(--toxic); color: var(--on-accent); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45); }
.today-spotlight-play .ico { width: 44px; height: 44px; margin-left: 6px; }
.today-spotlight-video, .today-spotlight-frame { width: 100%; height: 100%; border: 0; display: block; background: var(--bg-deep); }
.today-spotlight-frame.is-portrait { width: auto; aspect-ratio: 9 / 16; max-width: 100%; }
.today-spotlight-text { flex: 0 0 auto; padding: 8px 14px 12px; }
.today-spotlight.is-words .today-spotlight-text { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
.today-spotlight-words { font-size: 1.05rem; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; cursor: pointer; }
.today-spotlight.is-words .today-spotlight-words { font-family: var(--font-mono); font-style: italic; font-size: 2rem; line-height: 1.2; -webkit-line-clamp: 5; }
html[data-display="frame15"] .today-spotlight.is-words .today-spotlight-words { font-size: 2.6rem; }
.today-spotlight-hint { font-size: 0.8rem; color: var(--text-dim); margin-top: 4px; }
.today-spotlight.is-playing .today-spotlight-hint { display: none; }
/* The pulse is a fixed inner glow on a ::after whose opacity animates, never an animated
   box-shadow: opacity runs on the compositor, a box-shadow repaints every frame on the
   main thread (the card clips its overflow, so the layer glows inward from the edge; the
   static outer glow above stays). It rests while a clip plays. */
html[data-display="frame10"] #today-view .today-spotlight::after,
html[data-display="frame15"] #today-view .today-spotlight::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    border-radius: inherit;
    box-shadow: inset 0 0 22px rgba(var(--toxic-rgb), 0.6);
    opacity: 0;
    pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
    html[data-display="frame10"] #today-view .today-spotlight:not([hidden]):not(.is-playing)::after,
    html[data-display="frame15"] #today-view .today-spotlight:not([hidden]):not(.is-playing)::after { animation: today-spotlight-glow 2.4s ease-in-out infinite; }
}
@keyframes today-spotlight-glow {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}
/* On the photo backdrop the wall's ink is light: the spotlight takes the solid glass under it. */
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-spotlight,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-spotlight { background: var(--wall-glass-solid); color: var(--wall-ink); }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] .today-spotlight-close,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] .today-spotlight-close { background: var(--wall-glass-strong); border-color: var(--wall-glass-line); color: var(--wall-ink); }
#today-view .today-cell.is-under-spotlight { visibility: hidden; }

/* ---------- The fridge note, homework, the daily question, the streak flame (frames, 2026-10-16) ---------- */
html[data-display="frame10"] #today-view[data-packed="true"] .today-note,
html[data-display="frame15"] #today-view[data-packed="true"] .today-note { padding: 12px; }
html[data-display="frame10"] #today-view[data-packed="true"][data-look="backdrop"] > .today-cell.today-note,
html[data-display="frame15"] #today-view[data-packed="true"][data-look="backdrop"] > .today-cell.today-note { background: transparent; border-color: transparent; padding: 12px; }
.today-note-paper { height: 100%; box-sizing: border-box; padding: 14px 16px; background: var(--note-yellow); color: var(--note-ink); border-radius: 3px; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3); transform: rotate(-1.2deg); display: flex; flex-direction: column; overflow: hidden; }
.today-note-paper[data-colour="pink"] { background: var(--note-pink); }
.today-note-paper[data-colour="blue"] { background: var(--note-blue); }
.today-note-paper[data-colour="green"] { background: var(--note-green); }
.today-note-body { font-family: var(--font-mono); font-size: 1.15rem; line-height: 1.3; flex: 1 1 0; min-height: 0; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow-wrap: anywhere; }
html[data-display="frame15"] .today-note-body { font-size: 1.45rem; }
.today-note-by { font-size: 0.8rem; margin-top: 6px; color: var(--note-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-note-by[hidden] { display: none; }
.today-homework-list li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-display="frame10"] #today-view[data-packed="true"] .today-question,
html[data-display="frame15"] #today-view[data-packed="true"] .today-question { display: flex; flex-direction: column; }
.today-question-text { font-size: 1.15rem; line-height: 1.25; font-weight: 600; margin: 2px 0 6px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
html[data-display="frame15"] .today-question-text { font-size: 1.45rem; }
.today-question-answers { list-style: none; padding: 0; margin: 0; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.today-question-answer { font-size: 0.92rem; line-height: 1.3; padding: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-question-name { color: var(--toxic); font-weight: 600; margin-right: 6px; }
.today-question-hint { font-size: 0.75rem; color: var(--text-dim); margin-top: 4px; }
.today-streak { display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto; color: var(--toxic); font-weight: 700; font-size: 0.9rem; }
.today-streak-flame .ico { width: 1.05em; height: 1.05em; }
/* A one-row note (the packer's smallest, 3 × 1) keeps two lines of words and drops its author. */
html[data-display="frame10"] #today-view[data-packed="true"] .today-note[data-rows="1"],
html[data-display="frame15"] #today-view[data-packed="true"] .today-note[data-rows="1"] { padding: 8px 10px; }
.today-note[data-rows="1"] .today-note-paper { padding: 8px 12px; transform: rotate(-0.6deg); }
.today-note[data-rows="1"] .today-note-body { -webkit-line-clamp: 2; font-size: 1rem; }
html[data-display="frame15"] .today-note[data-rows="1"] .today-note-body { font-size: 1.25rem; }
.today-note[data-rows="1"] .today-note-by { display: none; }

/* Allowance balances (frames, household walls only, 2026-10-16): a small list, like the extras. */
.today-allowance .today-person-list li { font-variant-numeric: tabular-nums; }

/* ============================================================
   TAP TARGETS (2026-10-22 review) — KEEP THIS BLOCK LAST IN THE FILE.
   Its selectors have the same specificity as the base rules they lift (the radio/TV
   tabs' 32px, the cards checkboxes' 18px), so they win only by coming after them; the
   first version sat mid-file and lost to both.
   Settings: Remove, Revoke, Password, every Family Setup ✕ and the confirm's Yes/Cancel
   were ~24px, with Remove 8px from Password. On a mouse 32px with the rows' 8px gaps is
   plenty; on a finger every control is at least 44px each way.
   ============================================================ */
.settings-section .set-btn-sm { min-height: 32px; }
@media (pointer: coarse) {
    .settings-section .set-btn-sm,
    .settings-section .set-btn,
    .settings-section .set-tab,
    .set-confirm .set-btn-sm,
    .card-confirm .set-btn-sm {
        min-height: 44px;
        min-width: 44px;
        padding-top: 8px;
        padding-bottom: 8px;
    }
    .settings-section .set-cards input[type="checkbox"] { width: 24px; height: 24px; }
    .set-confirm { gap: 10px; }
    .settings-section .user-row { gap: 10px; }
    /* The circles "?" (circles.js) and the Settings "How circles work" button. */
    .section-body .circle-picker-wrap .circle-help,
    .circle-picker-wrap .circle-help {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        padding: 0;
        border-radius: 50%;
    }
    .circle-explain-open-btn, .circle-explain-foot .set-btn, .circle-explain-dismiss { min-height: 44px; }
    .circle-explain-dismiss { min-width: 44px; }
}

/* The photo and clip ✕ shows on hover — and a phone has no hover, so there it was an
   invisible 20px target on every tile. With no hover it is always shown, at 40px in the
   tile's corner (a 44px one would cover most of a 16:9 clip poster). */
@media (hover: none) {
    .photo-cell .photo-delete-btn,
    .clip-cell .photo-delete-btn {
        opacity: 1;
        width: 40px;
        height: 40px;
        line-height: 38px;
        font-size: .9rem;
    }
}

/* Before the hub boots (js/boot.js removes every [data-ph]) the page holds neutral placeholders,
   not one skin's words: a soft bar the size of the text it stands in for, so nothing jumps when
   the real words paint in. The sign-out button keeps a plain label and only goes quiet. */
[data-ph] {
    color: transparent !important;
    background: var(--overlay-2, rgba(128, 128, 128, .2));
    border-radius: 4px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    pointer-events: none;
}
.nav-logout[data-ph] { background: transparent; opacity: .6; color: var(--text-dim) !important; }

/* ---- lazy cards (js/registry.js LAZY_SECTIONS) ----
   The Settings card's code is fetched the first time it is wanted. Its init is what hides the panes
   this role does not have, so until it has run the card shows its title and nothing of the body
   (a kid must never see Billing for the length of a download). A fetch that failed says so at the
   top of the card, where an open card actually shows it. */
.section[data-lazy-pending] [data-section-body] { visibility: hidden; }
.lazy-error {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin: 0 0 .75rem;
    color: var(--danger);
}

/* ---- Today at boot (js/theme-boot.js, js/today-gate.js) ----
   A wall frame, or a #today address, opens the Today view as soon as its code has arrived, a moment
   after first paint. Until then the shell is hidden so the dashboard is never seen behind it; the
   class is taken off when the view is open (or has failed to load, or after a few seconds). */
html.today-boot .sidebar,
html.today-boot .nav-toggle,
html.today-boot .main-area { visibility: hidden; }
html.today-boot #today-view:not([hidden]) { visibility: visible; }

/* ---- the deck, until js/layout.js has placed it (js/theme-boot.js, js/boot.js) ----
   The cards used to be drawn in their default places at first paint and jump to the member's arrangement
   a moment later. A hub page hides the deck until boot has laid it out, so it appears once. The class
   comes off right after initLayout, or after a few seconds whatever happens. */
html.deck-pending .grid-deck { visibility: hidden; }

/* ---- analytics consent bar (js/consent-banner.js) ----
   Shown only to a visitor who must be asked. A calm strip along the bottom: no overlay, and
   the page behind stays usable. Tokens only, so every skin carries it. */
.nav-legal + .nav-legal { margin-top: 2px; }
.ll-consent {
    position: fixed;
    /* Clear of the sidebar on a desktop, and UNDER it (the sidebar is z-index 900) so an
       open off-canvas sidebar on a phone or a frame is never painted over. */
    inset: auto 12px 12px calc(var(--sidebar-w) + 12px);
    z-index: 890;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    max-width: 760px;
    margin: 0 auto;
    padding: 14px 18px;
    background: var(--bg-panel-raised, var(--bg-panel));
    color: var(--text);
    border: 1px solid var(--line-strong, var(--line));
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .28);
    font-size: max(.88rem, var(--fs-min));
    line-height: 1.5;
}
html[data-display="phone"] .ll-consent,
html[data-display="frame10"] .ll-consent,
html[data-display="frame15"] .ll-consent { inset: auto 12px 12px 12px; }
/* Auto mode on a narrow window: the sidebar goes off-canvas at 900px (see the media blocks
   above), so there is nothing to clear. An explicit "desktop" choice keeps the sidebar. */
@media (max-width: 900px) {
    :where(html:not([data-display="frame10"]):not([data-display="frame15"]):not([data-display="desktop"])) .ll-consent { inset: auto 12px 12px 12px; }
}
.ll-consent:focus { outline: none; }
.ll-consent:focus-visible { outline: 2px solid var(--toxic); outline-offset: 2px; }
.ll-consent-text { flex: 1 1 320px; min-width: 0; }
.ll-consent-title { margin: 0 0 4px; font-size: 1em; font-weight: 700; color: var(--text); }
.ll-consent-body { margin: 0; color: var(--text-dim); }
.ll-consent-body a { color: inherit; text-decoration: underline; }
.ll-consent-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.ll-consent-btn {
    min-height: 44px;
    min-width: 96px;
    padding: 8px 18px;
    font: inherit;
    font-weight: 600;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--line-strong, var(--line));
    border-radius: 10px;
    cursor: pointer;
}
.ll-consent-btn:hover { border-color: var(--toxic); }
.ll-consent-btn:focus-visible { outline: 2px solid var(--toxic); outline-offset: 2px; }
/* Phone / frame: compact (see the marketing twin). Title visually hidden, still the label. */
html[data-display="phone"] .ll-consent { inset: auto 8px 8px 8px; padding: 8px 10px; gap: 6px; font-size: max(.75rem, var(--fs-min)); line-height: 1.3; }
html[data-display="phone"] .ll-consent-text { flex: 1 1 100%; }
html[data-display="phone"] .ll-consent-title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html[data-display="phone"] .ll-consent-actions { flex: 1 1 100%; gap: 8px; }
html[data-display="phone"] .ll-consent-btn { flex: 1 1 0; min-width: 0; padding: 6px 10px; }

/* Chore Streaks rows: the name keeps a readable width, and the days and "this week" detail wrap
   to a second line together rather than squeezing the name into a column of single letters. */
.streak-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 5px 0; }
.streak-name { flex: 1 1 7em; min-width: 0; overflow-wrap: break-word; }
.streak-days { flex: 0 0 auto; font-weight: 600; white-space: nowrap; }
.streak-detail { flex: 0 1 auto; font-size: 0.75rem; color: var(--text-dim); }
.streak-detail:empty { display: none; }
