/* Doddle app — tokens copied from landingpage/index.html (the brand),
   layout from the agreed design canvas, the shell from
   docs/design/standalone-app.md "Design — an iOS app that happens to run in
   a browser". Loaded by both pages (the Telegram Mini App's index.html and
   the app host's web.html). No inline styles: both pages ship a strict CSP.

   EVERY colour is a custom property declared in :root below (test_app_static
   holds it: a colour literal anywhere else fails). The app is light only,
   whatever the phone says (David, 27 Sep and 13 Oct 2026). Every
   transition and animation sits inside the one
   `prefers-reduced-motion: no-preference` block at the end of the shell
   section (also held by test_app_static). */

/* Self-hosted, latin subset only (app/fonts/, docs/design/standalone-app.md
   "Design"): Fraunces and Karla are each one variable file spanning every
   weight app.css asks for (500-600, 400-700), so one @font-face per family
   covers it — the optical-size axis Fraunces carries applies itself
   (font-optical-sizing defaults to auto). font-display: swap so a slow
   load shows the fallback rather than invisible text; no request ever
   leaves this origin, so a cold launch never flashes Georgia waiting on
   Google. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("/app/fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Karla";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/app/fonts/karla-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #FBF8F3; --bg2: #F3EDE3; --card: #FFFFFF; --line: #E6DFD3;
  --ink: #1F1B17; --ink2: #4A443D; --muted: #6B635A;
  --accent: #1F6B57; --accent-soft: #E3F0EA; --accent-ink: #FFFFFF;
  --gold: #F2B33D; --gold-soft: #FBEECB; --gold-ink: #7A5A10; --on-gold: #1F1B17;
  --warn: #A24813; --warn-soft: #FBE9DC; --on-warn: #fff;
  --today-dow: #DCEFD2; --other-day: #6B635A;
  --backdrop: rgba(31,27,23,.35); --wt-backdrop: rgba(31,27,23,.5);
  --shadow-panel: 0 18px 40px -18px rgba(31,27,23,.4);
  --shadow-card: 0 18px 40px -18px rgba(31,27,23,.5);
  --shadow-toast: 0 10px 30px -10px rgba(31,27,23,.5);
  --shadow-knob: 0 1px 2px rgba(0,0,0,.2);
  --shadow-signin: 0 30px 60px -30px rgba(31,27,23,.25);
  --spot-glow: 0 0 0 4px rgba(242,179,61,.35);
  --pc-coral: #F4A58A; --pc-coral-ink: #1F1B17;
  --pc-sky: #8CC4EC; --pc-sky-ink: #1F1B17;
  --pc-amber: #F2C14E; --pc-amber-ink: #1F1B17;
  --pc-violet: #C3A8EC; --pc-violet-ink: #1F1B17;
  --pc-teal: #7CCFBE; --pc-teal-ink: #1F1B17;
  --pc-rose: #F0A3C0; --pc-rose-ink: #1F1B17;
  --pc-lime: #BFD870; --pc-lime-ink: #1F1B17;
  --pc-slate: #AEB9C6; --pc-slate-ink: #1F1B17;
  --radius: 14px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: var(--sans); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; line-height: 1.1; margin: 0; }
[hidden] { display: none !important; }

.app { min-height: 100vh; display: flex; flex-direction: column; }
/* ── the shell: the header IS the title (docs/design/app-canvas/, the canvas
   this shell is held to): left, the eyebrow over the Fraunces title, the
   paging chevrons at the end of the eyebrow line; right, the alerts bell
   and the viewer's own avatar (the Settings door). A pushed screen starts
   with a plain back chevron. Scrolling shrinks the same title to one 17px
   line (`.app.collapsed`, set by app.js's watchCollapse()); there is never a
   second copy of it. In the Telegram Mini App the document scrolls and the
   header is sticky; on the app host web.css makes .content the one
   scroller inside a 100dvh shell. */
.top { display: flex; align-items: center; gap: 8px; padding: calc(10px + var(--safe-top)) 14px 10px 22px; position: sticky; top: 0; z-index: 5; background: var(--bg); }
.app.collapsed .top { box-shadow: 0 1px 0 var(--line); }
.top-lead { flex-shrink: 0; display: flex; margin-left: -12px; }
.top-lead:empty { display: none; }
.top-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.eyebrow-line { display: flex; align-items: center; gap: 4px; min-height: 28px; }
.pager { display: flex; gap: 2px; }
.pager:empty { display: none; }
.top .title { font-size: clamp(26px, 7vw, 32px); line-height: 1.1; overflow-wrap: anywhere; }
.app.collapsed .top .title { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
/* The sheet's title: one line at every phone width, so the type shrinks
   with the viewport rather than the words wrapping. */
.title { font-size: clamp(21px, 6.2vw, 28px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .title { white-space: normal; }
.top-actions { display: flex; align-items: center; flex-shrink: 0; }
.round { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); display: grid; place-items: center; color: var(--ink2); position: relative; flex-shrink: 0; }
.round:active { background: var(--bg2); }
/* A plain icon button: the bell, the back chevron, the paging chevrons. No
   circle, 44px to the touch. The paging pair draws at 28px and reaches its
   44px through ::after. */
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink2); position: relative; flex-shrink: 0; border-radius: 50%; }
.icon-btn:active { background: var(--bg2); }
.pager .icon-btn { margin: -8px -4px; color: var(--accent); }
.icon-btn.bell svg { width: 22px; height: 22px; }
/* The alerts bell's count, on the bell itself -- the same tokens as
   .tab .badge (the chat tab's unread count). */
.icon-btn .badge { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--warn); color: var(--on-warn); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.me-btn { width: 44px; height: 44px; display: grid; place-items: center; flex-shrink: 0; }
.me-btn:active { opacity: .7; }
.avatar.me { width: 34px; height: 34px; font-size: 15px; }

/* ── the splash: the wordmark on the cream ground from the first paint,
   until app.js (or login.js on the app host) has something to show. Never
   over sign-in or the gate, whichever script is late. */
.splash { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: grid; place-items: center; }
.splash .wordmark { font-size: 44px; }
.splash { align-content: center; gap: 14px; }
.splash-mark { width: 72px; height: 72px; border-radius: 22px; }
.splash.gone { opacity: 0; pointer-events: none; }
.signin:not([hidden]) ~ .splash, .gate:not([hidden]) ~ .splash { display: none; }

/* ── controls behave like controls: no selection, no callout, no grey tap
   flash; a pressed state on touch. Text in the plan and the chat stays
   selectable (.bubble re-enables it). */
button, .tab, .chip, .round, .icon-btn, .btn { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.tab:active, .chip:active { opacity: .7; }

/* ── sheets: every action and ask opens from the bottom with a grabber over
   a dimmed backdrop — the alerts bell, the cover chooser, the attachment
   picker, a photo opened full-size — dismissed by a downward swipe, the
   backdrop, ✕ or Escape. Nothing opens a centred modal. */
.sheet-backdrop { position: fixed; inset: 0; background: var(--backdrop); z-index: 30; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-width: 640px; margin: 0 auto; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column; background: var(--bg); border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow-panel); padding-bottom: var(--safe-bottom); overscroll-behavior: contain; }
.sheet-grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 2px; flex-shrink: 0; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 8px 22px 10px; touch-action: none; }
.sheet-titles { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.sheet-photo { display: block; width: 100%; height: auto; border-radius: 12px; }

.screen { flex: 1; min-width: 0; padding: 0 22px 110px; display: flex; flex-direction: column; gap: 14px; }

/* ── shared pieces ── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--line); min-height: 52px; }
.row:last-child { border-bottom: 0; }
.row.unassigned { background: var(--gold-soft); }
.row .when { width: 52px; flex-shrink: 0; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }
.row .when.soft { color: var(--muted); font-weight: 500; font-size: 13px; }
.row .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row .main { font-weight: 600; }
.row .sub { font-size: 13px; color: var(--muted); }
.row .sub.warn { color: var(--gold-ink); font-weight: 600; }
.row .sub.gap { color: var(--warn); font-weight: 600; }
.row .action { font-size: 13px; font-weight: 700; color: var(--accent); padding: 8px 0 8px 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 13px; flex-shrink: 0; }
.avatar.a0 { background: var(--accent); color: var(--accent-ink); }
.avatar.a1 { background: var(--gold); color: var(--on-gold); }
.avatar.a2 { background: var(--accent-soft); color: var(--accent); }
.avatar.c-coral { background: var(--pc-coral); color: var(--pc-coral-ink); }
.avatar.c-sky { background: var(--pc-sky); color: var(--pc-sky-ink); }
.avatar.c-amber { background: var(--pc-amber); color: var(--pc-amber-ink); }
.avatar.c-violet { background: var(--pc-violet); color: var(--pc-violet-ink); }
.avatar.c-teal { background: var(--pc-teal); color: var(--pc-teal-ink); }
.avatar.c-rose { background: var(--pc-rose); color: var(--pc-rose-ink); }
.avatar.c-lime { background: var(--pc-lime); color: var(--pc-lime-ink); }
.avatar.c-slate { background: var(--pc-slate); color: var(--pc-slate-ink); }
.avatar.both { background: var(--bg2); color: var(--ink2); font-size: 11px; }
.avatar.none { border: 1.5px dashed var(--warn); color: var(--warn); font-family: var(--sans); font-weight: 700; }
.avatar.small { width: 24px; height: 24px; font-size: 11px; }
/* An extended-family cover (a grandparent, a nanny) or a kind the server
   didn't recognise as an adult -- never a parent's colour (David's
   2026-09-20 ruling): a plain outlined chip, one per person. */
.avatar.extended { background: transparent; border: 1.5px solid var(--line); color: var(--ink2); }
.avatars { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
/* The adult chip as a tap target (a gated trip row: change who is doing
   the run). Chrome-free on purpose -- the chip itself is the button, so
   a tappable row looks exactly like the row it replaced. */
.chiptap { background: transparent; border: 0; padding: 0; display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: -7px; flex-shrink: 0; cursor: pointer; }
.chiptap:active { transform: translateY(1px); }
.row.chooser { background: var(--bg2); }
.row.chooser .buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.row.chooser .btn { gap: 8px; display: inline-flex; align-items: center; }

.section-head { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 2px; }
.section-head.warn { color: var(--warn); }
.section { display: flex; flex-direction: column; gap: 6px; }

.banner { background: var(--bg2); border-radius: var(--radius); padding: 12px 16px; font-size: 14px; color: var(--ink2); display: flex; gap: 10px; align-items: flex-start; }
.update-banner { border-radius: 0; align-items: center; justify-content: space-between; padding: 8px 16px; }
.update-banner span { flex: 1; }
.banner.holiday { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.banner.lapsed-banner { flex-wrap: wrap; align-items: center; justify-content: space-between; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px 7px 8px; font-size: 14px; min-height: 44px; }
.chip .chip-avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.chip .muted { color: var(--muted); }
.chip.gap { border-color: var(--warn); color: var(--warn); }

.decision { background: var(--gold-soft); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.decision .kicker { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-ink); }
.decision .question { font-size: 16px; font-weight: 600; }
.decision .buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.decision .buttons .btn { flex: 0 1 auto; min-width: 96px; padding: 0 18px; display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 44px; text-align: center; }
.decision .buttons .btn.ghost { line-height: 41px; }
.decision .answer { display: flex; flex-direction: column; gap: 8px; }
.decision .answer-row { display: flex; gap: 8px; align-items: center; }
.decision .answer-row .ask-input { flex: 1 1 auto; min-width: 0; }
.decision .answer-row .btn { flex: 0 0 auto; min-width: 96px; }
.decision .outcome { font-size: 14px; color: var(--ink2); }
.decision.answered { background: var(--bg2); }
.decision .subline { font-size: 13px; color: var(--ink2); margin-top: -6px; }
.decision .subline.under { margin-top: 0; }
/* The gap card (app.js gapCard): its groups and items inside one .decision. */
.gap-card .gap-group { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.gap-card .gap-group-title { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.gap-card .gap-item { display: flex; flex-direction: column; gap: 6px; }
.gap-card .gap-label { font-size: 13px; font-weight: 600; color: var(--ink2); }
.gap-card .gap-question { font-size: 15px; white-space: pre-line; }
.gap-card .gap-later { align-self: flex-start; }
.decision-slot { display: flex; flex-direction: column; gap: 12px; }
.decision-slot:empty { display: none; }
/* The install card on Today sits inside the screen, after the decision: the screen's own padding is its margin. */
html.web .screen > .install-card { margin: 0; }
.decision .runs { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.decision .run-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 15px; text-align: left; color: var(--ink); }
.decision .run-line svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.decision.answered .kicker { color: var(--ink2); }
.btn { height: 44px; padding: 0 18px; border-radius: 999px; display: inline-grid; place-items: center; font-weight: 600; font-size: 15px; flex: 1; min-width: 44px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn.soft { background: var(--accent-soft); color: var(--accent); height: 36px; font-size: 14px; flex: 0 0 auto; padding: 0 16px; }
.btn.ghost.small { height: 36px; font-size: 14px; flex: 0 0 auto; padding: 0 16px; }
.btn:disabled { opacity: .5; }
.btn:active { transform: translateY(1px); }
.ask-input { flex: 1 1 140px; min-width: 120px; height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font-size: 15px; }

/* A button that is a row or a strip reads left-aligned like any other row. */
.strip, button.row { text-align: left; }
.strip { display: flex; align-items: center; justify-content: space-between; background: var(--bg2); border-radius: var(--radius); padding: 12px 16px; gap: 10px; }
.strip .body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.strip .main { font-weight: 600; }
.strip .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.note-line { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink2); padding: 0 4px; }
.note-line svg { flex-shrink: 0; margin-top: 2px; color: var(--muted); }

.empty { color: var(--muted); font-size: 14px; padding: 8px 4px; }
/* WP-U7: the brand's "d." mark (the sign-in's icon) above every empty
   state's line and beside Doddle's name in the chat. */
.brand-mark { display: block; border-radius: 7px; }
.empty .brand-mark { margin-bottom: 8px; }
.msg-author { display: flex; align-items: center; gap: 6px; }
.msg-author .brand-mark { border-radius: 5px; }
/* WP-U7: the day's sentence under the title, the All sorted tag, the week's
   all-clear line, and the one-line "Sorted, <adult>'s on it" an answered
   decision collapses into. */
.day-sentence { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 15px; color: var(--ink2); padding: 0 2px; }
.section > .day-sentence { font-size: 14px; }
.week-line { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--accent); padding: 2px; }
.week-line svg { width: 18px; height: 18px; flex-shrink: 0; }
.sorted { display: flex; align-items: center; gap: 10px; background: var(--accent-soft); color: var(--accent); border-radius: var(--radius); padding: 12px 16px; font-size: 15px; font-weight: 600; }
.sorted svg { width: 18px; height: 18px; flex-shrink: 0; }
.decision.collapsing { overflow: hidden; opacity: 0; padding-top: 0; padding-bottom: 0; }
.decision.spent { pointer-events: none; }

/* ── settings switch ── */
/* The control is a 56x44 touch box; the pill and the knob are drawn inside it. */
.switch { position: relative; width: 56px; height: 44px; border: 0; padding: 0; background: none; flex-shrink: 0; }
.switch::before { content: ""; position: absolute; left: 5px; top: 8px; width: 46px; height: 28px; border-radius: 999px; background: var(--line); }
.switch .knob { position: absolute; top: 11px; left: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow-knob); }
.switch.on::before { background: var(--accent); }
.switch.on .knob { left: 26px; }

/* ── week ── */
.datestrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.datestrip button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; border-radius: 12px; }
.datestrip .dow { font-size: 11px; font-weight: 700; color: var(--muted); }
.datestrip .num { font-weight: 600; }
.datestrip .dot { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.datestrip .dot.ok { background: var(--accent); }
.datestrip .dot.decide { background: var(--gold); }
.datestrip .dot.gap { background: var(--warn); }
.datestrip button.today { background: var(--accent); color: var(--accent-ink); }
.datestrip button.today .dow { color: var(--today-dow); }
/* The day date is the fixed element of a day heading and the tag is the
   flexible one: the date never wraps, and a long tag shrinks and ellipsises
   instead of squeezing it onto two lines. */
.dayhead { display: flex; align-items: baseline; gap: 8px; padding: 0 2px; }
.dayhead h2 { font-size: 18px; white-space: nowrap; flex: 0 0 auto; }
.tag { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag.decide { background: var(--gold-soft); color: var(--gold-ink); }
.tag.gap { background: var(--warn-soft); color: var(--warn); }
.tag.holiday { background: var(--accent-soft); color: var(--accent); }
.tag.changed { background: var(--gold-soft); color: var(--gold-ink); }
.tag.sorted { background: var(--accent-soft); color: var(--accent); }
/* The same tag inside a row rather than a day heading: smaller, and it sits
   after the row's own text instead of beside a date. */
.tag.inrow { font-size: 10px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }
.row.context { background: var(--bg2); font-size: 13px; color: var(--ink2); min-height: 40px; padding: 10px 14px; gap: 10px; }
.row.context svg { flex-shrink: 0; color: var(--ink2); }
.row.compact { padding: 11px 14px; gap: 12px; min-height: 46px; }
.row.compact .when { width: 44px; font-size: 13px; }
.row.compact .main { font-weight: 500; font-size: 14px; }

/* ── month ── */
.monthgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.monthgrid .dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.cell { position: relative; height: 56px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px 5px; font-size: 12px; display: flex; flex-direction: column; gap: 3px; text-align: left; overflow: hidden; }
.cell.other { color: var(--other-day); }
.cell.weekend { color: var(--muted); }
.cell.shut { background: var(--bg2); }
.cell.today { border: 2px solid var(--accent); padding: 3px 4px; }
.cell.today .num { font-weight: 700; }
.cell .mark { font-size: 9px; font-weight: 700; line-height: 1.3; padding: 1px 3px; align-self: flex-start; border-radius: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mark.one_off { background: var(--accent-soft); color: var(--accent); }
.mark.birthday { background: var(--gold-soft); color: var(--gold-ink); }
.mark.closure { background: var(--line); color: var(--ink2); }
.mark.family_holiday { background: var(--accent-soft); color: var(--accent); }
.mdots { display: flex; gap: 3px; flex-wrap: wrap; }
.mdot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink2); }
.mdot.corner { position: absolute; top: 5px; right: 5px; }
.mdot.k-decision { background: var(--warn); }
.mdot.k-one_off, .mdot.k-family_holiday { background: var(--accent); }
.mdot.k-birthday { background: var(--gold-ink); }
.mdot.k-closure { background: var(--ink2); }
.row.item .when { width: 52px; font-size: 13px; color: var(--ink2); white-space: normal; }

/* ── Lanes (standalone-app.md "Lanes"): one column per person, time down the
   side; the axis stays put while five or more columns scroll sideways.
   Positions come from app.js laneLayout(); colours are the people tokens. */
.view-toggle .segment { height: 44px; }
.datestrip button.picked { box-shadow: inset 0 0 0 2px var(--accent); }
.lanes { --lane-axis: 36px; --lane-min: 72px; position: relative; z-index: 0; isolation: isolate; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lanes-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.lanes-grid { display: grid; min-width: 0; }
.lane-corner, .lane-axis { position: sticky; left: 0; z-index: 5; background: var(--card); }
.lane-corner { border-bottom: 1px solid var(--line); }
.lane-head { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 6px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); min-width: 0; }
.lane-name { font-size: 12px; color: var(--ink2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane-axis { border-right: 1px solid var(--line); }
.lane-hour { position: absolute; right: 4px; transform: translateY(-50%); font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lane-band-mark { position: absolute; left: 0; right: 0; background: var(--bg2); }
.lane { position: relative; border-left: 1px solid var(--line); min-width: 0; }
.lane-band { position: absolute; left: 0; right: 0; background: var(--bg2); }
.lane-rule { position: absolute; left: 0; right: 0; border-top: 1px solid var(--bg2); }
.lane-block { --lc: var(--muted); position: absolute; left: 3px; right: 3px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 3px 4px 3px 6px; overflow: hidden; text-align: left; border-radius: 8px; border-left: 3px solid var(--lc); background: color-mix(in srgb, var(--lc) 28%, var(--card)); z-index: 1; }
.lane-block.soft { background: color-mix(in srgb, var(--lc) 12%, var(--card)); border-left-style: dashed; }
.lane-block.thin { padding-top: 1px; padding-bottom: 1px; }
.lane-issue.under-bar { padding-top: 17px; }
.lane-block.under-pill { padding-top: 31px; }
.lane-block.a0 { --lc: var(--accent); }
.lane-block.a1 { --lc: var(--gold); }
.lane-block.a2 { --lc: var(--muted); }
.lane-block.c-coral { --lc: var(--pc-coral); }
.lane-block.c-sky { --lc: var(--pc-sky); }
.lane-block.c-amber { --lc: var(--pc-amber); }
.lane-block.c-violet { --lc: var(--pc-violet); }
.lane-block.c-teal { --lc: var(--pc-teal); }
.lane-block.c-rose { --lc: var(--pc-rose); }
.lane-block.c-lime { --lc: var(--pc-lime); }
.lane-block.c-slate { --lc: var(--pc-slate); }
.lane-initial { font-family: var(--serif); font-weight: 600; font-size: 12px; line-height: 1; }
.lane-place, .lane-carer { font-size: 11px; line-height: 1.15; color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane-carer { color: var(--ink2); }
/* An adult's protected time (§3.6): a see-through hatched band laid over the lane's blocks (pointer-events none, so every block under it still opens), never a block itself. */
.lane-protected { position: absolute; left: 0; right: 0; z-index: 2; pointer-events: none; border-top: 2px dashed var(--accent); border-bottom: 2px dashed var(--accent); background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent) 0 4px, transparent 4px 10px); }
.protected-hatch { width: 10px; align-self: stretch; flex-shrink: 0; border-radius: 4px; border: 1px dashed var(--accent); background: repeating-linear-gradient(135deg, var(--accent-soft) 0 3px, var(--card) 3px 6px); }
.lane-issue { position: absolute; left: 3px; right: 3px; z-index: 2; padding: 3px 4px; overflow: hidden; text-align: left; border-radius: 8px; border: 1.5px solid var(--warn); background: repeating-linear-gradient(135deg, var(--warn-soft) 0 5px, var(--card) 5px 10px); }
/* The question sits on a solid pill (a token colour in both themes) so its contrast is against a colour, never the hatch around it. */
.lane-question { font-size: 11px; line-height: 1.2; font-weight: 600; color: var(--warn); background: var(--card); border-radius: 6px; padding: 1px 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lane-block.trip { flex-direction: row; align-items: center; gap: 3px; padding: 1px 6px 1px 5px; background: var(--card); border: 2px solid var(--lc); z-index: 3; pointer-events: none; }
.lane-block.trip.a0 { --lc: var(--accent); }
.lane-block.trip.a1 { --lc: var(--gold); }
.lane-block.trip.a2 { --lc: var(--muted); }
.lane-chevron { font-size: 14px; line-height: 1; font-weight: 700; color: var(--ink); flex-shrink: 0; }
.lane-trip-text { font-size: 11px; line-height: 1.15; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lanes-legend { margin: 0; padding: 6px 10px; font-size: 12px; color: var(--ink2); border-top: 1px solid var(--line); }
.lane-now { position: absolute; left: 0; right: 0; z-index: 4; height: 0; border-top: 2px solid var(--warn); pointer-events: none; }
.day-panel { display: flex; flex-direction: column; gap: 14px; }

/* ── tasks ── */
.segments { display: flex; gap: 4px; }
.segment { flex: 1; height: 44px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.segment.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.segment.warn { color: var(--warn); }
.segment.warn.on { color: var(--accent-ink); }
.tick { width: 44px; height: 44px; margin: -9px -9px -9px -9px; display: grid; place-items: center; flex-shrink: 0; }
.tick .circle { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); }
.tick.overdue .circle { border-color: var(--warn); }
.tick.done .circle { background: var(--accent); border-color: var(--accent); }
.row.task { align-items: center; }
.row.task .sub.overdue { color: var(--warn); font-weight: 600; }
.claim { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.claim:last-child { border-bottom: 0; }
.claim .buttons { display: flex; gap: 8px; }

/* ── tab bar ── */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; padding: 8px 10px calc(12px + var(--safe-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.tab { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; color: var(--muted); font-size: 12px; font-weight: 600; min-height: 44px; }
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab.on { color: var(--accent); font-weight: 700; }
.tab .badge { position: absolute; top: 2px; right: 50%; margin-right: -22px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--warn); color: var(--on-warn); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
/* The demo family's banner (app.js demoBanner, docs/design/demo.md): a slim
   strip at the top of the tab bar, above the tabs, only under a demo
   credential (html.demo). Inside the bar, so the composer's --tabbar-h
   clears it; the screens and the toast keep their distance from the taller
   bar. Tokens only, so it follows whichever palette is in force. */
html.demo .tabs { flex-wrap: wrap; }
.demo-banner { flex: 0 0 100%; order: -1; display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 5px 5px 5px 12px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-ink); font-size: 12px; line-height: 1.25; }
.demo-banner-text { flex: 1; min-width: 0; font-weight: 600; }
.demo-banner-actions { display: flex; gap: 4px; flex-shrink: 0; }
.demo-banner-btn { min-height: 32px; padding: 0 10px; border-radius: 999px; background: var(--card); color: var(--gold-ink); font-size: 12px; font-weight: 700; white-space: nowrap; }
.demo-banner-btn.primary { background: var(--accent); color: var(--accent-ink); }
.demo-banner-btn:active { opacity: .7; }
html.demo .screen { padding-bottom: 160px; }
/* The tab bar (banner included) and the composer (its demo dock included)
   are both measured by app.js's chatChrome(); the fallbacks are their
   usual heights. */
html.demo .screen.chat { padding-bottom: calc(var(--tabbar-h, 122px) + var(--composer-h, 108px) + 24px); }
html.demo .toast { bottom: calc(146px + var(--safe-bottom)); }
/* The demo's message budget (app.js renderDemoDock, docs/design/demo.md
   Decided 5 and "Chat first"): a dock across the top of the composer --
   one sideways-scrolling row of suggested questions (a long one wraps to two lines inside its chip), then a one-line counter; at
   the end, the end card alone (.demo-done hides the input and buttons).
   Each part is one line tall or a short card, so at 320px wide the
   composer stays on screen above the tab bar. */
html.demo .composer { flex-wrap: wrap; }
.demo-dock { flex: 0 0 100%; order: -1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.demo-dock:empty { display: none; }
.demo-chips { display: flex; align-items: center; gap: 6px; overflow-x: auto; margin: 0 -12px; padding: 0 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.demo-chips::-webkit-scrollbar { display: none; }
.demo-chip { flex: 0 0 auto; max-width: 88%; min-height: 34px; padding: 6px 13px; border-radius: 17px; border: 1px solid var(--accent); background: var(--card); color: var(--accent); font-size: 13px; font-weight: 600; line-height: 1.25; text-align: left; }
.demo-chip:active { opacity: .7; }
.demo-counter { font-size: 12px; line-height: 1.2; color: var(--muted); text-align: center; }
.composer.demo-done > :not(.demo-dock) { display: none; }
.demo-end { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: var(--radius); background: var(--gold-soft); }
.demo-end-title { font-family: var(--serif); font-size: 16px; line-height: 1.25; color: var(--ink); }
.demo-end-actions { display: flex; align-items: center; gap: 2px 10px; flex-wrap: wrap; }
/* Today's call-out to the chat, at the top of the day (demo only). */
.card.demo-callout { flex-direction: row; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; background: var(--accent-soft); border-color: transparent; }
.demo-callout-text { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--accent); }

/* ── gate + toast ── */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 22px; }
.gate-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px 24px; max-width: 360px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.wordmark { font-family: var(--serif); font-weight: 600; font-size: 28px; color: var(--accent); }
.gate p { margin: 0; color: var(--ink2); }
.chooser { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.chooser-label { margin: 0 0 2px; font-weight: 600; color: var(--ink); }
.chooser button { height: 44px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-weight: 600; }
.chooser button:active { background: var(--bg2); }
.toast { position: fixed; left: 22px; right: 22px; bottom: calc(96px + var(--safe-bottom)); background: var(--ink); color: var(--bg); border-radius: 12px; padding: 12px 16px; font-size: 14px; box-shadow: var(--shadow-toast); z-index: 40; }
.toast.warn { background: var(--warn); }
.toast .undo { float: right; background: none; border: 0; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; padding: 0 0 0 12px; min-height: 44px; min-width: 44px; cursor: pointer; }
.row.settled, .claim.settled { display: none; }
.skeleton .bar { height: 14px; width: 60%; border-radius: 7px; background: var(--line); opacity: .6; }
.loading { color: var(--muted); font-size: 14px; padding: 20px 4px; }


/* ── first-open walkthrough (WP-A): a dimmed backdrop, a ring around the
   real element the step is about (never a screenshot), and a card with
   "N/<steps>" + one sentence. Every colour here is one of the app's existing
   tokens (:root above) — no new palette. */
.wt-backdrop { position: fixed; inset: 0; background: var(--wt-backdrop); z-index: 50; }
.wt-spot { position: fixed; z-index: 51; border: 2px solid var(--gold); border-radius: 12px;
  box-shadow: var(--spot-glow); pointer-events: none; }
.wt-card { position: fixed; z-index: 52; left: 16px; right: 16px; max-width: 360px; margin: 0 auto;
  top: 50%; transform: translateY(-50%); background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 8px; }
.wt-title { font-size: 19px; }
.wt-text { margin: 0; color: var(--ink2); font-size: 14px; }
.wt-buttons { display: flex; gap: 8px; margin-top: 6px; }
.wt-skip { align-self: center; margin-top: 4px; color: var(--muted); font-size: 13px; font-weight: 600;
  padding: 6px; }

/* ── calendar link ── */
.row.stack { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
.row.stack .buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.url { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px;
  color: var(--ink2); background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; min-height: 44px; -webkit-user-select: all; user-select: all; }

/* ── chat (the fifth tab and the private thread, a pushed screen) ── */
.screen.chat { padding-bottom: calc(180px + var(--safe-bottom)); }
.chat-list { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 84%; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; align-self: flex-start; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg-author { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 12px; }
/* The earlier message a bubble itself replied to: a small, subordinate
   preview above that bubble's own content — never the compose box's quote
   chip (`.compose-quote`), which is a different, interactive thing. */
.msg-quote { max-width: 100%; padding: 2px 10px 2px 10px; border-left: 2px solid var(--line); overflow-wrap: anywhere; }
.bubble { background: var(--card); border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; padding: 9px 13px; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.msg.doddle .bubble { background: var(--bg2); border-color: var(--bg2); }
.msg.mine .bubble { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); border-radius: 18px 18px 6px 18px; }
.bubble.purged { color: var(--muted); font-style: italic; }
.reply-stack { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.reply-lead { font-size: 13px; color: var(--muted); padding: 0 4px; }
.reply-schedule { white-space: normal; display: flex; flex-direction: column; gap: 10px; }
.reply-schedule .sched-header { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.reply-schedule .sched-title { font-weight: 700; margin-bottom: 2px; }
.reply-schedule .sched-line { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.doddle .bubble.reply-failure { background: var(--warn-soft); border-color: var(--warn-soft); color: var(--warn); }
.reply-ask { min-width: 0; }
.msg.pending .bubble { opacity: .7; }
.msg-status { font-size: 12px; color: var(--muted); padding: 0 12px; }
.msg-card { font-size: 13px; color: var(--ink2); background: var(--bg2); border-radius: 12px; padding: 8px 12px; }
.msg-buttons { display: flex; flex-direction: column; gap: 6px; }
.kb-row { display: flex; gap: 6px; flex-wrap: wrap; }
.kb-row .btn { height: 38px; font-size: 14px; flex: 0 1 auto; padding: 0 16px; }
.chip.link { color: var(--accent); border-color: var(--accent); padding: 7px 14px; font-weight: 600; }
.msg-photo { display: block; width: 220px; min-height: 90px; padding: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--bg2); }
.msg-photo img { display: block; width: 100%; height: auto; }
.decision.ask .msg-photo { width: 160px; margin: 8px 0 4px; }
.file-card { display: flex; align-items: center; gap: 10px; min-width: 200px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; text-align: left; color: var(--ink); }
.file-card .name { font-weight: 600; font-size: 14px; }
.file-card .sub { font-size: 12px; color: var(--muted); }
.voice { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px 4px 4px; color: var(--ink); font-size: 13px; font-weight: 600; }
.voice .play { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.thinking { align-self: flex-start; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 2px 12px; }
.thinking .cup-wrap { display: inline-flex; }
.thinking .steam { opacity: 0; }
.thinking.late { gap: 12px; }
.chat-more { align-self: center; }
.composer { position: fixed; left: 0; right: 0; bottom: var(--tabbar-h, 78px); z-index: 6; display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px; background: var(--bg); border-top: 1px solid var(--line); margin: 0; }
.compose-input { flex: 1; min-width: 0; min-height: 44px; max-height: 120px; resize: none; border: 1.5px solid var(--line); border-radius: 20px; background: var(--card); color: var(--ink); font: 400 16px/1.35 var(--sans); padding: 9px 14px; outline: none; }
.compose-input:focus { border-color: var(--accent); }
/* The quote chip a Reply puts above the composer: its own full-width row. */
.composer:has(.compose-quote:not([hidden])) { flex-wrap: wrap; }
.compose-quote { order: -1; flex: 0 0 100%; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 4px 6px 12px; border-left: 3px solid var(--accent); background: var(--card); border-radius: 8px; }
.compose-quote[hidden] { display: none; }
.quote-body { flex: 1; min-width: 0; }
.quote-author { font-size: 12px; font-weight: 600; color: var(--accent); }
.quote-text { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote-close { flex: 0 0 auto; width: 32px; height: 32px; border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; }
/* No system callout menu on a long press anywhere in a message's chrome
   (the avatar, the author line, the quote preview) — but this is
   inherited, and `.bubble` (above) takes it back for the message text
   itself, so a long press there still offers the native copy menu on iOS
   (backlog #685). */
.msg { -webkit-touch-callout: none; }
.round.send { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.round.send:disabled { opacity: .5; }
.recording { position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--bg); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--warn); flex-shrink: 0; }
.rec-time { flex: 1; font-variant-numeric: tabular-nums; font-weight: 600; }
.btn.primary.small { height: 36px; font-size: 14px; flex: 0 0 auto; padding: 0 16px; }
.pick { display: flex; flex-direction: column; }

/* ── motion: the system's timings (about 350 ms for a push, 250 ms for a
   sheet, spring-like ease-out), and EVERY transition or animation in this
   page lives in this one block, so `prefers-reduced-motion: reduce` turns
   all of it off (test_app_static holds that none sits outside it). */
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes push-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes pulse { from { opacity: 1; } to { opacity: .25; } }
@keyframes swap-in { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .thinking .steam { animation: steam 2.4s ease-in-out infinite; }
  .thinking .steam.s2 { animation-delay: .8s; }
  .thinking .steam.s3 { animation-delay: 1.6s; }
  @keyframes steam { 0% { opacity: 0; transform: translateY(3px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-4px); } }
  .btn, .tab, .segment { transition: background .12s ease, transform .08s ease; }
  .switch { transition: background .15s; }
  .switch .knob { transition: left .15s; }
  .wt-spot { transition: top .2s ease, left .2s ease, width .2s ease, height .2s ease; }
  .top .title { transition: font-size .2s ease-out; }
  .splash { transition: opacity .25s ease-out; }
  .sheet:not([hidden]) { animation: sheet-in .25s cubic-bezier(.2, .9, .3, 1); }
  .sheet-backdrop:not([hidden]) { animation: fade-in .25s ease-out; }
  .sheet.settling { transition: transform .25s cubic-bezier(.2, .9, .3, 1); }
  .screen.push-in { animation: push-in .35s cubic-bezier(.2, .9, .3, 1); }
  .screen.settling { transition: transform .35s cubic-bezier(.2, .9, .3, 1); }
  .rec-dot { animation: pulse .9s ease-in-out infinite alternate; }
  /* WP-U7, the sorted moment: the answered card's height collapse and the
     row's avatar swap -- the only two motions it adds. */
  .decision.collapsing { transition: max-height .28s ease-out, opacity .2s ease-out, padding .28s ease-out; }
  .swapped { animation: swap-in .3s cubic-bezier(.2, .9, .3, 1.3); }
}
.chooser .btn { display: flex; gap: 8px; align-items: center; justify-content: center; flex: 0 0 auto; }
/* WP-S10: destructive actions in Settings, and the sheet's explanatory line. */
.btn.danger { background: var(--warn); color: var(--on-warn); }
.danger-text { color: var(--warn); }
.sheet-text { margin: 0 0 12px; color: var(--muted); font-size: 15px; }

/* Settings -> Colours: one swatch per palette token, a tap picks it. The
   chosen swatch carries a ring AND a tick, so selection is never colour
   alone. */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 2px solid transparent; display: grid; place-items: center; font-weight: 700; color: var(--ink); }
.swatch.on { border-color: var(--ink); }
.swatch.c-coral { background: var(--pc-coral); color: var(--pc-coral-ink); }
.swatch.c-sky { background: var(--pc-sky); color: var(--pc-sky-ink); }
.swatch.c-amber { background: var(--pc-amber); color: var(--pc-amber-ink); }
.swatch.c-violet { background: var(--pc-violet); color: var(--pc-violet-ink); }
.swatch.c-teal { background: var(--pc-teal); color: var(--pc-teal-ink); }
.swatch.c-rose { background: var(--pc-rose); color: var(--pc-rose-ink); }
.swatch.c-lime { background: var(--pc-lime); color: var(--pc-lime-ink); }
.swatch.c-slate { background: var(--pc-slate); color: var(--pc-slate-ink); }

/* ── touch targets: every interactive control is at least 44x44 CSS px (the
   box itself, not the glyph; the render gate measures it). The visible
   shape of a small button stays small only where it is drawn inside the
   box (the switch above). */
.btn, .round, .chip, .icon-btn, .tab, .chiptap, .quote-close, .demo-banner-btn, .demo-chip,
.install-btn, html.web .install-close, select, .datestrip button, .kb-row .btn, .signin-link { min-width: 44px; min-height: 44px; }
.quote-close, html.web .install-close { display: grid; place-items: center; }
.demo-banner-btn, .demo-chip, .install-btn, .signin-link { display: inline-flex; align-items: center; justify-content: center; }

/* ── a wide window: the phone layout is one centred 480px column, the tab
   bar with it. */
@media (min-width: 601px) {
  .app { max-width: 480px; margin: 0 auto; width: 100%; }
  .tabs { left: 50%; right: auto; width: 480px; transform: translateX(-50%); }
}

/* ── Today's four pieces (doddle-mini-app.md "Today"): 16px gutters at phone
   width, the List | Lanes toggle small under the day, one collapsed
   "For school" line, and the one-open add-email line at the foot. */
#screen-today { padding-left: 16px; padding-right: 16px; overflow-x: hidden; }
#screen-today .day-sentence { flex-wrap: nowrap; }
#screen-today .day-sentence > span:first-child { min-width: 0; }
.day-foot { display: flex; justify-content: flex-end; }
.day-foot .view-toggle { width: auto; }
.day-foot .view-toggle .segment { height: 44px; font-size: 13px; padding: 0 14px; }
.for-school { background: var(--bg2); border-radius: var(--radius); display: flex; flex-direction: column; gap: 8px; }
.for-school-head { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; min-height: 44px; padding: 12px 16px; background: none; border: 0; color: var(--ink); font-size: 14px; text-align: left; }
.for-school-title { font-weight: 600; flex-shrink: 0; }
.for-school-gist { flex: 1; min-width: 0; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.for-school-head .icon { flex-shrink: 0; color: var(--muted); display: inline-flex; }
.for-school.open .for-school-chev { transform: rotate(90deg); }
.for-school.open { padding-bottom: 12px; }
.for-school .note-line { padding: 0 16px; }
.once-line { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink2); }
.once-text { flex: 1; min-width: 0; min-height: 44px; background: none; border: 0; padding: 8px 4px; text-align: left; color: var(--accent); font-size: 14px; }
.once-close { background: none; border: 0; color: var(--muted); width: 44px; height: 44px; flex-shrink: 0; font-size: 14px; }
/* A there-and-back card's "Split": a small link opening a row per leg. */
.split { display: flex; flex-direction: column; gap: 8px; }
.split-link { align-self: flex-start; min-height: 44px; background: none; border: 0; padding: 0 2px; color: var(--accent); font-size: 14px; font-weight: 600; }
.split-row { display: flex; flex-direction: column; gap: 6px; }
.split-label { font-size: 13px; font-weight: 600; color: var(--ink2); }
