/* house: the app's own layer on household.css (loaded first, byte-identical
   across the household apps). Everything else builds on the shared tokens.

   There are no category colours in here any more (2026-09-22). A household
   edits its own categories, so a colour is a row in a table, not a token: the
   markup sets --cat inline and these rules read it. Four hard-coded --z-*
   tokens with a class each were exactly what made a fifth category a code
   change. */

:root {
    --done: 56px;
}

.section-label--help { color: var(--warn); }

.chip--cat { color: var(--cat); background: color-mix(in srgb, var(--cat) 14%, transparent); }
.chip--page    { color: var(--bad); background: rgba(217,97,79,0.14); }
.chip--help    { color: var(--warn); background: rgba(224,161,58,0.14); }
.chip--physical, .chip--cognitive { color: var(--fg); }
.when { font-size: 12px; color: var(--fg-dim); }
.when--overdue { color: var(--warn); font-weight: 600; }
.when--due { color: var(--fg); }
.when--none, .when--upcoming, .when--cue { color: var(--fg-faint); }
.owner {
    font-size: 12px; font-weight: 600; color: var(--c, var(--fg-dim));
    display: inline-flex; align-items: center; gap: 5px;
}
.owner::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--fg-faint)); }
.owner--shared { color: var(--fg-dim); }
.owner--shared::before { background: transparent; border: 1.5px solid var(--fg-faint); }

/* Zone strip (D1: counts even when collapsed) */
.zone-strip {
    display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 6px;
}
.zone-count {
    font-size: 12px; color: var(--fg-dim); background: var(--bg-elev);
    border-radius: 100px; padding: 5px 11px; display: inline-flex; gap: 5px; align-items: baseline;
}
.zone-count b { font-size: 14px; }
.zone-count--cat b { color: var(--cat); }
.zone-count.is-zero { opacity: 0.45; }

/* The categories editor (settings). One row per category: dot, name, count,
   delete. The name is a live input rather than a field with a save button,
   because a rename is one word and a save button per row would be four taps
   for a typo. */
.cat-block { background: var(--bg-elev); border-radius: var(--radius); padding: 10px 12px; }
.cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cat-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.cat-row form { margin: 0; }
.cat-name-form { flex: 1; min-width: 0; }
.cat-name {
    width: 100%; background: transparent; border: none; border-bottom: 1px solid transparent;
    color: var(--fg); font: inherit; font-size: 15px; padding: 6px 2px;
}
.cat-name:focus { outline: none; border-bottom-color: var(--me); }
.cat-count { font-size: 12px; min-width: 1.5em; text-align: right; flex-shrink: 0; }
.cat-swatches { flex-shrink: 0; position: relative; }
.cat-swatches > summary {
    list-style: none; cursor: pointer; width: 22px; height: 22px; border-radius: 50%;
    background: var(--cat); display: block;
}
.cat-swatches > summary::-webkit-details-marker { display: none; }
.cat-swatch-grid {
    position: absolute; z-index: 20; top: 28px; left: 0;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    background: var(--bg-elev-2); border: 1px solid var(--border);
    border-radius: var(--radius-s); padding: 10px;
}
.cat-swatch {
    width: 26px; height: 26px; border-radius: 50%; background: var(--cat);
    border: 2px solid transparent; cursor: pointer; padding: 0; display: block;
}
.cat-swatch.is-on { border-color: var(--fg); }
.cat-delete { flex-shrink: 0; }
.cat-add { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.cat-add .field-input { flex: 1; min-width: 0; }
.zone-count.is-zero b { color: var(--fg-faint); }

/* Cards: one tap to done */
.card-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.card {
    background: var(--bg-elev); border-radius: var(--radius);
    display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px;
    border-left: 3px solid transparent;
}
.card--overdue { border-left-color: var(--warn); }
/* Urgent has to be findable in a list without reading it: a thicker rail, a
   tinted card and a chip that is a chip, not grey text (Ethan, 2026-09-22).
   The sort already puts these first (_sort_key). */
.card--page {
    border-left-color: var(--bad); border-left-width: 5px;
    background: color-mix(in srgb, var(--bad) 7%, var(--bg-elev));
}
.chip--page { background: color-mix(in srgb, var(--bad) 20%, transparent); color: var(--bad); font-weight: 700; }
.chip-btn--urgent.is-on { border-color: var(--bad); color: var(--bad); }
.seg-urgent { color: var(--bad); font-weight: 700; }
.panel-card--page { background: color-mix(in srgb, var(--bad) 8%, var(--bg-elev)); }
.card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 4px 0; }
.card-title { font-weight: 600; font-size: 16px; line-height: 1.3; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.done-form { margin: 0; flex-shrink: 0; }
/* Hold to finish (Ethan, 2026-09-22), not tap: the sector inside the ring
   fills clockwise over hold.js's HOLD_MS and the check brightens with it. A
   tap alone does nothing and leaves nothing behind, which is the point. The
   sector is translucent so the check stays readable through it. */
.done-btn {
    position: relative; overflow: hidden;
    width: var(--done); height: var(--done); border-radius: 50%;
    border: 2.5px solid var(--me); background: transparent; color: var(--me);
    display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700;
    cursor: pointer; transition: background 0.1s ease, transform 0.08s ease, color 0.1s ease;
    touch-action: manipulation; -webkit-touch-callout: none;
    -webkit-user-select: none; user-select: none;
}
.done-btn::before {
    content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
    background: conic-gradient(var(--me) var(--hold, 0%), transparent 0);
    opacity: 0; transition: opacity 0.08s ease;
}
.done-btn.is-holding::before { opacity: 0.8; }
.done-btn span { position: relative; opacity: 0.35; transition: opacity 0.1s ease; }
.done-btn.is-holding { transform: scale(0.95); }
/* Cream, not the ring colour: the check has to stay readable on the part the
   sector has swept past and on the part it has not. */
.done-btn.is-holding span { opacity: 1; color: var(--fg); }
.done-btn.is-done, .done-form.htmx-request .done-btn {
    background: var(--me); color: var(--bg); transform: scale(0.94);
}
.done-btn.is-done::before, .done-form.htmx-request .done-btn::before { opacity: 0; }
.done-btn.is-done span, .done-form.htmx-request .done-btn span { opacity: 1; }
.card-list--theirs .card { background: transparent; border: 1px dashed var(--border); border-left: 3px solid transparent; }

/* The other lane, collapsed (D1) */
.theirs { margin-top: 22px; }
.theirs summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    gap: 10px; padding: 12px 14px; background: var(--bg-elev); border-radius: var(--radius);
}
.theirs summary::-webkit-details-marker { display: none; }
.theirs[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.theirs-name { font-weight: 600; color: var(--c); display: inline-flex; align-items: center; gap: 7px; }
.theirs-name::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.theirs-counts { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.theirs-counts .zone-count { background: var(--bg-elev-2); padding: 3px 9px; font-size: 11px; }
.theirs .card-list { padding: 10px; background: var(--bg-elev); border-radius: 0 0 var(--radius) var(--radius); }
.theirs-hint { color: var(--fg-faint); font-size: 12px; margin: 8px 2px 0; }

/* Tap-ins (D2) */
.tapin-list, .ask-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tapin {
    background: var(--bg-elev); border-radius: var(--radius); border-left: 3px solid var(--warn);
    padding: 12px 10px 12px 14px; display: flex; gap: 10px; align-items: center;
}
.tapin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.tapin-title { font-weight: 600; }
.tapin-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.tapin-note { margin: 2px 0 0; color: var(--fg-dim); font-size: 14px; }
.tapin-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex-shrink: 0; }
.tapin-when { font-size: 11px; color: var(--fg-faint); display: flex; flex-direction: column; gap: 3px; }
.tapin-when input { font: inherit; font-size: 16px; background: var(--bg-elev-2); color: var(--fg); border: none; border-radius: 8px; padding: 5px 8px; }
.ask { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; background: var(--bg-elev); border-radius: 10px; font-size: 14px; }
.ask a { flex: 1; min-width: 0; font-weight: 600; }
.ask-state { color: var(--fg-dim); font-size: 12px; }

/* Librarian nudge (D9) */
.librarian-nudge {
    display: flex; gap: 12px; align-items: center; margin-top: 20px;
    padding: 12px 14px; border-radius: var(--radius); background: var(--bg-elev);
    border: 1px dashed var(--border); color: var(--fg-dim); font-size: 13px;
}
.librarian-glyph { font-size: 20px; color: var(--fg-faint); }
.librarian-card { background: var(--bg-elev); border-radius: var(--radius); padding: 14px; }
.librarian-intro { margin: 0 0 12px; font-size: 15px; }
.librarian-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.librarian-item { padding: 10px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.librarian-main { display: flex; flex-direction: column; gap: 2px; }
.librarian-title { font-weight: 600; }
.librarian-answers { display: flex; gap: 6px; flex-wrap: wrap; }
.librarian-foot { color: var(--fg-faint); font-size: 12px; margin: 14px 0 0; }

/* The starter cards' banner. Quiet, not a warning: they are a demonstration,
   not a problem (Ethan, 2026-09-22 — a new household used to land on a colour
   picker and then an empty screen). */
.examples-note {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--bg-elev); border: 1px dashed var(--border); border-radius: var(--radius);
    padding: 10px 12px 10px 14px; margin: 0 0 14px; font-size: 13px; color: var(--fg-dim);
}
.examples-note form { margin: 0; flex-shrink: 0; }

/* Tap a fact to edit it (2026-09-22). Each row is label, then either the value
   as a full-width button or an editor in its place. The row is the tap target,
   not a pencil icon: a value you can change should look like the thing you
   press, and there is nothing else on the row to hit by mistake. */
/* One per row, not the two-up grid the read-only facts use: these are tap
   targets and editors, so they want the whole width. Doubled class because the
   plain .facts rule is further down this file and would otherwise win. */
.facts.facts--tap { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 14px 0 18px; }
.fact {
    background: var(--bg-elev); border-radius: var(--radius-s);
    padding: 10px 14px; display: grid; gap: 4px;
}
.fact.is-editing { background: var(--bg-elev-2); outline: 1px solid var(--border); }
.fact-label {
    color: var(--fg-faint); font-size: 11px; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
}
.fact-value {
    display: block; width: 100%; text-align: left; background: none; border: none;
    padding: 2px 0; font: inherit; font-size: 16px; color: var(--fg); cursor: pointer;
    min-height: 26px;
}
.fact-value:active { opacity: 0.6; }
.fact--title .fact-value { font-weight: 600; }
.fact--notes .fact-value { font-size: 15px; line-height: 1.45; white-space: pre-wrap; }
.fact-link { display: block; color: var(--me); font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
.fact-form { display: grid; gap: 10px; margin: 4px 0 0; }
.fact-form .field { margin-bottom: 0; }
.fact-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }

/* Capture (D5) */
.page-capture { padding-top: 6px; }
.capture-form { display: flex; gap: 8px; align-items: stretch; }
.capture-input {
    flex: 1; min-width: 0; font: inherit; font-size: 18px; padding: 16px 16px;
    background: var(--bg-elev); color: var(--fg); border: 1px solid var(--border); border-radius: var(--radius);
}
.capture-input:focus { outline: none; border-color: var(--me); }
.capture-input::placeholder { color: var(--fg-faint); }
.mic-btn {
    width: 54px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-elev);
    color: var(--bad); cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.12s ease, border-color 0.12s ease;
}
.mic-btn svg { display: block; }
.mic-btn .stop-icon { display: none; }
/* recording: solid red, white square = stop */
.mic-btn.is-listening { background: var(--bad); border-color: var(--bad); color: #fff; }
.mic-btn.is-listening .mic-icon { display: none; }
.mic-btn.is-listening .stop-icon { display: block; }
.capture-add {
    padding: 0 18px; border-radius: var(--radius); border: none; background: var(--me); color: var(--bg);
    font-weight: 700; cursor: pointer;
}
.capture-hint { color: var(--fg-faint); font-size: 12px; margin: 10px 2px 0; }
.recent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.recent-item { background: var(--bg-elev); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.recent-item.is-fresh { outline: 1px solid var(--me); }
.recent-title { font-weight: 600; }
.recent-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; min-height: 14px; }
.quick { display: grid; gap: 6px; margin-top: 4px; }
.quick-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.chip-btn--cat.is-on { border-color: var(--cat); color: var(--cat); }
.chip-btn--quiet { opacity: 0.7; }

/* Who */
.who-form { display: grid; gap: 10px; margin-top: 10px; }
.who-form--inline { grid-template-columns: 1fr 1fr; }
.who-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 22px; font-size: 20px; font-weight: 700; border-radius: var(--radius);
    background: var(--bg-elev); border: 2px solid var(--border); color: var(--fg); cursor: pointer;
}
.who-form--inline .who-btn { padding: 14px; font-size: 16px; }
.who-btn.is-on { border-color: var(--c); }
.who-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); }

/* Items */
.lane-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 14px; padding-bottom: 2px; }
.lane-tab { flex-shrink: 0; font-size: 13px; padding: 7px 12px; border-radius: 100px; background: var(--bg-elev); color: var(--fg-dim); }
.lane-tab b { color: var(--fg-faint); margin-left: 4px; }
.lane-tab.is-active { background: var(--fg); color: var(--bg); }
.lane-tab.is-active b { color: var(--bg); opacity: 0.6; }
.item-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.item-row { background: var(--bg-elev); border-radius: 12px; }
.item-link { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; }
.item-title { font-weight: 600; }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }

/* Detail */
.detail-title { margin: 6px 0 8px; font-size: 24px; font-weight: 700; line-height: 1.2; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-bottom: 14px; }
.detail-notes { white-space: pre-wrap; background: var(--bg-elev); padding: 12px 14px; border-radius: 12px; font-size: 15px; margin: 0 0 12px; }
.detail-standard { background: var(--bg-elev); padding: 10px 14px; border-radius: 12px; font-size: 14px; margin: 0 0 12px; }
.detail-standard .section-label { margin: 0 0 4px; }
.detail-actions { display: grid; gap: 10px; margin: 16px 0; }
.detail-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.detail-row form { margin: 0; }
.detail-snoozed { margin-left: auto; }
.detail-help summary { list-style: none; display: inline-block; cursor: pointer; }
.detail-help summary::-webkit-details-marker { display: none; }
.help-form { display: grid; gap: 10px; margin-top: 10px; padding: 12px; background: var(--bg-elev); border-radius: 12px; }

/* Forms */
.edit summary { cursor: pointer; }
.edit-form { display: grid; gap: 4px; margin-top: 8px; }
/* min-width: 0 on both, because a grid track is auto-minimum by default and
   input[type=date] carries an intrinsic width from its own picker UI that is
   wider than half a phone. Without this the field pushed out of the card
   (Ethan, 2026-09-22). */
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.field-grid > * { min-width: 0; }
.field-input { max-width: 100%; }
input[type="date"].field-input, input[type="time"].field-input {
    min-width: 0; width: 100%;
    -webkit-appearance: none; appearance: none;
}

/* A form's own button should not be a wall. Full width stays reserved for the
   one action a screen exists for (done, on a task; done, on welcome). Anything
   else commits a form and gets this: about half the width, centred, with a
   floor so the word never crowds the edges and a ceiling so it does not grow
   into a banner on a wide screen. 320px was the first try and it never bit on
   a 375px phone, which is the width that matters (Ethan, 2026-09-22). */
.btn-commit {
    display: block; width: min(56%, 240px); min-width: 140px;
    margin: 20px auto 0; text-align: center;
}

.history-tldr {
    color: var(--fg-dim); font-size: 13px; line-height: 1.5;
    padding: 10px 14px 0; margin: 0;
}
.history-tldr b { color: var(--fg); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg label > span {
    display: inline-block; font-size: 13px; padding: 7px 12px; border-radius: 100px;
    background: var(--bg-elev-2); color: var(--fg-dim); border: 1px solid transparent;
}
.seg label > span.chip { font-size: 13px; padding: 7px 12px; }
/* A category keeps its colour inside a picker. `.seg label > span` sets a flat
   background and a dim colour and outranks `.chip--cat` on specificity, so
   without this every category chip in an editor reads as grey text and the
   colour that tells them apart everywhere else disappears exactly where you
   are choosing between them. */
.seg label > span.chip--cat {
    background: color-mix(in srgb, var(--cat) 14%, transparent); color: var(--cat);
}
.seg input:checked + span { border-color: var(--fg); color: var(--fg); }
.seg input:checked + span.owner { border-color: var(--c); }
.seg input:checked + span.chip--cat { border-color: var(--cat); color: var(--cat); }
.seg-check span::before { content: "☐ "; }
.seg-check input:checked + span::before { content: "☑ "; }
.edit-advanced { margin: 4px 0 14px; }
.edit-advanced summary { cursor: pointer; }
.edit-advanced[open] summary { margin-bottom: 8px; }

/* History */
.history-item { background: var(--bg-elev); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.history-main { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.history-type { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-dim); }
.history-ingredients { color: var(--fg-dim); font-size: 13px; margin-top: 3px; }
.history-when { color: var(--fg-faint); font-size: 12px; margin-top: 3px; }

/* Settings */
.conn-status { font-size: 18px; font-weight: 700; }
.push-card { padding: var(--pad); background: var(--bg-elev); border-radius: var(--radius); }
#push-enable { width: 100%; }
#push-enable.is-on { color: var(--ok); }

/* ---- Panel (D7): the widget on the counter ---------------------------- */
body.panel { --pad: 24px; padding: var(--pad); min-height: 100vh; overflow: hidden; }
/* Clock and date hold the left, the add box takes the slack, "everything"
   sits on the right. The board below is unchanged; this row is the only thing
   the counter screen gained that is not a task (Ethan, 2026-09-22). */
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.panel-header .panel-clock, .panel-header .panel-date { flex: 0 0 auto; }
.panel-add { display: flex; gap: 10px; align-items: stretch; flex: 1 1 260px; min-width: 200px; margin: 0; }
.panel-add-input {
    flex: 1; min-width: 0; font: inherit; font-size: 18px; padding: 12px 16px;
    background: var(--bg-elev); color: var(--fg);
    border: 1px solid var(--border); border-radius: var(--radius);
}
.panel-add-input:focus { outline: none; border-color: var(--a); }
.panel-add-input::placeholder { color: var(--fg-faint); }
.panel-add-btn {
    padding: 0 20px; border: none; border-radius: var(--radius);
    background: var(--bg-elev-2); color: var(--fg-dim); font-weight: 700; font-size: 16px; cursor: pointer;
}
.panel-add-btn:active { background: var(--a); color: var(--bg); }
.panel-link { flex: 0 0 auto; color: var(--fg-dim); font-size: 17px; font-weight: 600; padding: 10px 4px; }
.panel-link:active { color: var(--fg); }

/* The lane switcher on the everything view. */
.panel-lanes { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.panel-lane {
    font-size: 16px; font-weight: 600; color: var(--fg-dim);
    padding: 10px 16px; border-radius: 100px; background: var(--bg-elev); border: 1px solid transparent;
}
.panel-lane b { color: var(--fg); margin-left: 6px; }
.panel-lane.is-on { border-color: var(--a); color: var(--fg); }
.panel-lane--back { margin-left: auto; background: transparent; }
.panel-list--all { max-height: none; }
.panel-clock { font-size: 52px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.panel-date { color: var(--fg-dim); font-size: 20px; }
.zone-strip--panel { margin-bottom: 18px; }
.zone-strip--panel .zone-count { font-size: 18px; padding: 10px 18px; }
.zone-strip--panel .zone-count b { font-size: 26px; }
.panel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.panel-card {
    background: var(--bg-elev); border-radius: 18px; padding: 16px 16px 16px 20px;
    display: flex; align-items: center; gap: 14px; border-left: 4px solid transparent;
}
.panel-card--overdue { border-left-color: var(--warn); }
.panel-card--page { border-left-color: var(--bad); }
.panel-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.panel-card-title { font-size: 30px; font-weight: 700; line-height: 1.2; }
.panel-card-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.panel-card-meta .chip { font-size: 15px; padding: 4px 12px; }
.panel-card-meta .when, .panel-card-meta .owner { font-size: 16px; }
/* One circle per person. Two sit side by side as they always have; four or
   more wrap rather than squeezing the title, which is the holding shape until
   the counter screen's own pass redesigns this row. */
.panel-done { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; flex-shrink: 0; max-width: 42%; }
.panel-done form { margin: 0; }
.done-btn--who { --done: 72px; font-size: 18px; letter-spacing: 0.02em; }
.done-btn--who span { opacity: 0.8; }
.panel-more { color: var(--fg-faint); font-size: 15px; margin: 14px 4px 0; }
/* The counter screen's undo: bigger, because it is read from across a room and
   it is the safety net under an instant tap. */
.toast--panel { font-size: 20px; padding: 14px 14px 14px 22px; }
.toast--panel .btn { padding: 12px 22px; font-size: 18px; }
.toast--panel form { margin: 0; }
/* The backfill bands (Ethan, 2026-09-22): present, clearly secondary. Each
   step down is smaller and quieter, so today still owns the top of the screen
   and the rest reads as "and after that". */
.panel-band { margin-top: 22px; }
.panel-band-label {
    display: block; color: var(--fg-faint); font-size: 13px; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase; margin: 0 4px 8px;
}
.panel-card--soon, .panel-card--loose { background: transparent; border: 1px solid var(--border); }
.panel-card--soon .panel-card-title { font-size: 24px; }
.panel-card--loose .panel-card-title { font-size: 21px; color: var(--fg-dim); }
.panel-card--soon .done-btn--who, .panel-card--loose .done-btn--who { --done: 56px; font-size: 15px; }
.panel-card--loose .done-btn--who { opacity: 0.75; }
.panel-empty-sub { color: var(--fg-faint); font-size: 18px; margin: 10px 0 0; }
.panel--tv .panel-band-label { font-size: 17px; }
.panel--tv .panel-card--soon .panel-card-title { font-size: 32px; }
.panel--tv .panel-card--loose .panel-card-title { font-size: 28px; }
.panel-help { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.panel-help-card {
    background: rgba(224,161,58,0.10); border: 1px solid rgba(224,161,58,0.35);
    border-radius: 18px; padding: 14px 18px; display: flex; flex-direction: column; gap: 4px;
}
.panel-help-label { color: var(--warn); font-size: 14px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.panel-help-title { font-size: 26px; font-weight: 700; }
.panel-help-state { font-size: 16px; color: var(--c, var(--fg-dim)); }
.panel-empty { padding: 60px 0; text-align: center; }
.panel-empty-title { font-size: 34px; font-weight: 700; color: var(--fg-dim); margin: 0; }

/* TV: same screen, everything larger */
body.panel--tv { --pad: 48px; }
.panel--tv .panel-clock { font-size: 72px; }
.panel--tv .panel-date { font-size: 28px; }
.panel--tv .zone-strip--panel .zone-count { font-size: 24px; padding: 12px 22px; }
.panel--tv .zone-strip--panel .zone-count b { font-size: 32px; }
.panel--tv .panel-card-title { font-size: 40px; }
.panel--tv .panel-card-meta .chip, .panel--tv .panel-card-meta .when, .panel--tv .panel-card-meta .owner { font-size: 20px; }
.panel--tv .done-btn--who { --done: 96px; font-size: 24px; }
.panel--tv .panel-help-title { font-size: 34px; }
.panel--tv .panel-empty-title { font-size: 56px; }
.panel--tv .panel-more { font-size: 22px; }

.disclosure > *:not(summary) { background: var(--bg-elev); border-radius: 0 0 12px 12px; padding: 12px 14px 4px; }
.disclosure--nested { margin: 4px 0 12px; }
.disclosure--nested > summary { background: var(--bg-elev-2); font-size: 13px; padding: 10px 12px; }
.disclosure--nested > *:not(summary) { background: var(--bg-elev-2); }
.advanced-body { display: grid; gap: 2px; padding-top: 12px !important; }
.disclosure .history-list { padding: 0; background: transparent; }
.disclosure .history-list li { background: var(--bg-elev-2); }
.disclosure .edit-form { padding-top: 14px !important; }

/* Inline menus on the detail row */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; display: inline-block; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-body { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.menu-body form { margin: 0; }
.help-form { display: grid; gap: 8px; padding: 12px; background: var(--bg-elev); border-radius: 12px; }
.detail-done { margin: 14px 0 10px; }
.detail-row--quiet { margin-top: 18px; justify-content: flex-end; }

/* Tap-in: date picker behind a word */
.pick-day > summary { list-style: none; cursor: pointer; font-size: 11px; color: var(--fg-faint); text-align: center; }
.pick-day > summary::-webkit-details-marker { display: none; }
.pick-day input { margin-top: 4px; font: inherit; font-size: 16px; background: var(--bg-elev-2); color: var(--fg); border: none; border-radius: 8px; padding: 5px 8px; width: 100%; }

/* Recent captures: one line each, zone chips on the fresh one only */
.recent { margin-top: 18px; }
.recent-row { display: flex; flex-direction: column; gap: 4px; }
.recent-item { padding: 12px 14px; }
.quick-row { margin-top: 8px; }

/* Settings */
.share-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.share-row { display: flex; align-items: center; gap: 10px; background: var(--bg-elev); border-radius: 12px; padding: 10px 14px; }
.share-name { flex: 1; font-weight: 600; color: var(--c, var(--fg)); display: inline-flex; align-items: center; gap: 7px; }
.share-name[style]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.share-status { min-width: 40px; text-align: right; }
.kv { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; color: var(--fg-dim); padding-bottom: 10px !important; }
.kv li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.kv b { color: var(--fg); }
.kv-mono { font-size: 12px; font-weight: 500; text-align: right; }
.kv a { color: var(--fg); font-weight: 600; }
.push-card { padding: 0; background: transparent; }

/* History notes */
.history-note { color: var(--fg-dim); font-size: 13px; margin-top: 3px; }

/* ---- 2026-09-21 pass 2: card hierarchy, settings, lanes ------------------ */
/* Facts grid: the card's information before its actions */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 0; }
.facts > div { background: var(--bg-elev); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.facts dt { font-size: 11px; color: var(--fg-faint); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.facts dd { margin: 0; font-size: 15px; font-weight: 600; }
.facts dd .chip { font-size: 13px; padding: 3px 10px; }

/* Actions below the facts, normal size */
.actions { margin: 16px 0 4px; display: grid; gap: 10px; }
.actions-done .btn { padding: 13px 18px; font-size: 16px; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.menu--more > summary { padding-left: 14px; padding-right: 14px; font-size: 20px; line-height: 1; }
.menu-body--stack { flex-direction: column; align-items: flex-start; }
.confirm > summary { list-style: none; cursor: pointer; display: inline-block; }
.confirm > summary::-webkit-details-marker { display: none; }
.confirm[open] > summary { display: none; }

/* State card for done / dropped / someday */
.state-card { display: flex; align-items: center; gap: 10px; background: var(--bg-elev); border-radius: 12px; padding: 12px 14px; margin: 4px 0 12px; }
.state-title { font-weight: 700; font-size: 16px; }
.state-action { margin-left: auto; }

/* Settings: rows with native controls */
.settings-form { display: grid; gap: 4px; }
.group { background: var(--bg-elev); border-radius: var(--radius); padding: 4px 14px; margin-bottom: 8px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.row:last-child { border-bottom: none; }
.row--stack { flex-direction: column; align-items: flex-start; gap: 8px; }
.row-note { color: var(--fg-dim); font-size: 13px; margin: 0; padding: 10px 0; }
.pick { font: inherit; font-size: 16px; background: var(--bg-elev-2); color: var(--fg); border: none; border-radius: 10px; padding: 8px 10px; min-width: 110px; text-align: right; -webkit-appearance: none; appearance: none; }
.pick::-webkit-calendar-picker-indicator { filter: invert(0.8); }
.settings-form .btn-block { margin-top: 6px; }
.group .push-card { padding: 12px 0 0; }
.group .push-card .btn { margin-bottom: 4px; }
.group .push-status { margin: 4px 0 8px; }
.kv .share-name { flex: 0 1 auto; }

/* Today extras */
.away-note { color: var(--fg-dim); font-size: 13px; margin: 6px 2px 0; }
.card-list--upcoming .card { opacity: 0.8; }

/* Large text (settings: look) */
body.text-large { font-size: 18px; }
body.text-large .card-title { font-size: 19px; }
body.text-large .chip, body.text-large .when, body.text-large .owner { font-size: 14px; }
body.text-large .zone-count { font-size: 14px; }
body.text-large .zone-count b { font-size: 17px; }
body.text-large .done-btn { --done: 64px; }
body.text-large .page-title { font-size: 32px; }

/* ---- 2026-09-21 pass 3: one card everywhere, compact settings ------------- */
.card--plain { padding-right: 14px; }
.card.is-fresh { outline: 1px solid var(--me); }
.card .quick-row--card { padding: 0 14px 12px; margin: 0; width: 100%; }
.card { flex-wrap: wrap; }
.card .card-main { flex: 1 1 200px; }
.card .done-form { flex: 0 0 auto; }
.recent .card-list { margin-top: 0; }
.recent { margin-top: 14px; }

/* Settings, compact */
.group { padding: 0 12px; margin-bottom: 6px; }
.row { padding: 9px 0; font-size: 14px; gap: 10px; }
.row > span:first-child { flex: 1; }
.pair { display: flex; align-items: center; gap: 6px; }
.pick { font-size: 16px; padding: 6px 8px; min-width: 96px; border-radius: 8px; }
.pick--time { min-width: 0; width: 88px; text-align: center; }
.seg--tight { gap: 4px; }
.seg--tight label > span { font-size: 12px; padding: 5px 9px; }
.seg--tight label > span.chip { font-size: 12px; padding: 5px 9px; }
.group .push-status { margin: -4px 0 6px; font-size: 12px; }
.group .push-status:empty { display: none; }
.settings-form .btn-block { margin-top: 8px; padding: 11px 18px; }
.page-settings .disclosure { margin-top: 10px; }
.pair { flex-wrap: nowrap; flex-shrink: 0; }
.pick--time { width: 92px; padding: 6px 4px; }
.pick--time::-webkit-calendar-picker-indicator { display: none; }
.row > span:first-child { flex: 1 1 auto; min-width: 0; }

/* ---- 2026-09-21 pass 4: identical nav icons, one card for every Today block */
.card--help { border-left-color: var(--warn); }
.card-note { display: block; color: var(--fg-dim); font-size: 14px; margin-top: 2px; }
.card-actions { margin: 0; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.card--quiet .card-title { font-size: 15px; font-weight: 500; }
.theirs summary { padding: 12px 14px; }
.theirs { margin-top: 14px; }

.zone-strip { margin-bottom: 4px; }
.detail-title { margin: 2px 0 8px; }
/* same pill for the list tabs and the area counts */
.lane-tab, .zone-count { font-size: 13px; padding: 6px 12px; }
.zone-count b { font-size: 14px; }
.lane-tabs { margin: 0 0 12px; }
.row #push-enable { width: auto; }


/* ---- Welcome: your name, your colour (api/routes/settings.py) ------------- */
.welcome-form { display: grid; gap: 4px; }
.welcome-form .field { margin-bottom: 18px; }
.swatches {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    margin: 8px 0 22px;
}
.swatch {
    /* 44px is the tap target floor; the label sits under the dot inside it. */
    min-height: 68px; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 6px; padding: 8px 4px; cursor: pointer;
    background: var(--bg-elev); border: 2px solid transparent; border-radius: var(--radius);
}
.swatch input { position: absolute; opacity: 0; width: 0; height: 0; }
.swatch-dot {
    width: 28px; height: 28px; border-radius: 50%; background: var(--c);
    box-shadow: 0 0 0 0 var(--c); transition: box-shadow 0.1s ease;
}
.swatch-name { font-size: 12px; color: var(--fg-dim); }
.swatch:has(input:checked) { border-color: var(--c); }
.swatch:has(input:checked) .swatch-dot { box-shadow: 0 0 0 3px var(--bg-elev), 0 0 0 5px var(--c); }
.swatch:has(input:checked) .swatch-name { color: var(--fg); font-weight: 600; }
/* Taken: their colour at full strength (you have to be able to tell which one
   it is), the tile itself plainly not a choice. */
.swatch.is-taken { cursor: default; background: transparent; border: 2px dashed var(--border); }
.swatch.is-taken .swatch-name { color: var(--fg-faint); }
.swatch:has(input:focus-visible) { outline: var(--stroke) solid var(--me-dim); outline-offset: 2px; }
.row-go::after { content: "\203a"; color: var(--fg-faint); font-size: 18px; line-height: 1; }

/* Form controls never go below 16px: iOS zooms the page on focus of a smaller field and does not zoom back (2026-09-21). */

/* ---- 2026-09-21 pass 9: no tab bar, one home ---------------------------- */
/* The add row starts at the top of the scroller and stays there; cards slide under it. */
.home-add { position: sticky; top: 0; z-index: 5; background: var(--bg); margin-top: -14px; padding: 14px 0 10px; }
.together-card { margin-top: 18px; }
.more-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 0; }

/* ---- 2026-09-23: Ethan's notes from using it ------------------------------ */

/* Settings: section names you do not skip past, hints under a label rather
   than crammed beside it, and a category picker that wraps under its label. */
.page-settings .settings-section { font-size: 13px; color: var(--fg-dim); letter-spacing: 0.08em; margin: 22px 2px 8px; }
.page-settings .settings-section:first-child { margin-top: 6px; }
.row-hint { display: block; color: var(--fg-faint); font-size: 12px; font-weight: 400; margin-top: 2px; line-height: 1.35; }
.row--stack { align-items: stretch; }
.row--stack > span:first-child { flex: 0 0 auto; }
.row--stack .seg { width: 100%; }
.pick--wide { width: 100%; text-align: left; }

/* Cards are app surfaces, not web links: holding one must never open Safari's
   link menu or start a text selection. */
.card, .card a, .card-main { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.repeat-mark { font-size: 12px; color: var(--fg-dim); }

/* The finished card, in its own place, with its undo. Folds to nothing. */
.card--done {
    background: color-mix(in srgb, var(--me) 12%, var(--bg-elev));
    border-left-color: var(--me); overflow: hidden;
    transition: height 0.26s ease, opacity 0.2s ease, padding 0.26s ease, margin 0.26s ease;
    animation: done-in 0.18s ease-out;
}
.card--done .card-title { text-decoration: line-through; text-decoration-color: var(--fg-faint); color: var(--fg-dim); }
.card-done-check {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    background: var(--me); color: var(--bg); font-weight: 800; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
}
.card-undo { flex-shrink: 0; color: var(--fg); }
.card--done.is-folding { opacity: 0; padding-top: 0; padding-bottom: 0; margin-top: -8px; }
@keyframes done-in { from { transform: scale(0.98); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .card--done { transition: none; animation: none; } }

/* Any toast left (the counter screen, the task screen) sits under the header,
   where the eye already is, not at the bottom edge. */
.toast { top: calc(env(safe-area-inset-top) + 58px); bottom: auto; left: 50%; right: auto; transform: translateX(-50%); width: min(92vw, 420px); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, -8px); } }

/* Task screen: the title is the heading and the thing you tap to rename. */
.detail-head { margin: 2px 0 10px; }
.detail-head .fact { background: none; padding: 0; }
.detail-head .fact:not(.is-editing) .fact-label { display: none; }
.detail-head .fact-value { font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.detail-head .fact.is-editing { background: var(--bg-elev-2); padding: 10px 14px; }
.btn-done { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px auto 0; font-size: 16px; }
.btn-check {
    width: 22px; height: 22px; border-radius: 50%; border: 2px solid currentColor;
    display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; line-height: 1;
}
.actions-done { margin: 0; }
.actions-row { justify-content: center; }
.menu--more { position: static; }
.menu-body--row { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
.menu-body--row .confirm[open] { display: contents; }
.seg--stack .field-hint { margin: -2px 0 8px 22px; line-height: 1.4; }
.more-repeats { margin-top: 4px; }
.more-repeats > summary { list-style: none; cursor: pointer; color: var(--fg-dim); font-size: 13px; padding: 4px 0; }
.more-repeats > summary::-webkit-details-marker { display: none; }
.more-repeats > summary::after { content: " ›"; }
.more-repeats[open] > summary { margin-bottom: 6px; }
.seg-time > span { display: inline-flex !important; align-items: center; gap: 6px; }
.time-inline {
    font: inherit; font-size: 16px; background: transparent; color: var(--fg); border: none;
    padding: 0; width: 92px; -webkit-appearance: none; appearance: none;
}
.time-inline::-webkit-calendar-picker-indicator { display: none; }
.quick-label { color: var(--fg-faint); font-size: 14px; align-self: center; padding: 0 2px 0 4px; }

/* Today: the band after today, clearly not today. */
.section-hint { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--fg-faint); margin-left: 6px; }
.section-label--ahead { margin-top: 26px; }
.card-list--upcoming .card { opacity: 1; background: transparent; border: 1px solid var(--border); border-left: 3px solid transparent; }
.card-list--upcoming .done-btn { --done: 46px; opacity: 0.7; }

/* Home: the way into everything else. */
.go-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 0; }
.go-tile {
    display: flex; flex-direction: column; gap: 2px; padding: 14px;
    background: var(--bg-elev); border-radius: var(--radius); -webkit-user-select: none; user-select: none;
}
.go-tile:active { background: var(--bg-elev-2); }
.go-glyph { color: var(--me); font-size: 18px; line-height: 1; margin-bottom: 6px; }
.go-name { font-weight: 700; font-size: 16px; }
.go-sub { color: var(--fg-faint); font-size: 12px; }

/* The list: search, category filter, lanes. */
.list-find { display: grid; gap: 10px; margin: 0 0 12px; }
.list-search {
    width: 100%; font: inherit; font-size: 17px; padding: 12px 14px;
    background: var(--bg-elev); color: var(--fg); border: 1px solid var(--border); border-radius: var(--radius);
    -webkit-appearance: none; appearance: none;
}
.list-search:focus { outline: none; border-color: var(--me); }
.list-search::placeholder { color: var(--fg-faint); }
.list-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.list-cats::-webkit-scrollbar { display: none; }
.cat-filter { flex-shrink: 0; cursor: pointer; }
.cat-filter input { position: absolute; opacity: 0; width: 0; height: 0; }
.cat-filter > span {
    display: inline-block; font-size: 13px; padding: 6px 12px; border-radius: 100px;
    background: var(--bg-elev); color: var(--fg-dim); border: 1px solid transparent;
}
.cat-filter > span.chip--cat { background: color-mix(in srgb, var(--cat) 12%, transparent); color: var(--cat); font-weight: 600; }
.cat-filter input:checked + span { border-color: var(--fg); color: var(--fg); }
.cat-filter input:checked + span.chip--cat { border-color: var(--cat); color: var(--cat); }
.list-count, .list-foot { color: var(--fg-faint); font-size: 13px; margin: 0 2px 10px; }
.list-foot { margin-top: 12px; }
.lane-mark { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-faint); }

/* Calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.cal-month { font-weight: 700; font-size: 18px; }
.cal-step { font-size: 26px; line-height: 1; color: var(--fg-dim); padding: 4px 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--fg-faint); text-transform: uppercase; padding-bottom: 2px; }
.cal-day {
    aspect-ratio: 1 / 1.05; min-width: 0; border-radius: var(--radius-xs); background: var(--bg-elev);
    display: flex; flex-direction: column; align-items: center; justify-content: space-between;
    padding: 6px 2px 5px; border: 1.5px solid transparent;
}
.cal-day.is-out { background: transparent; }
.cal-day.is-past { background: transparent; }
.cal-day.is-past .cal-num { color: var(--fg-faint); }
.cal-day.is-today { border-color: var(--me); }
.cal-day.is-picked { background: var(--bg-elev-2); border-color: var(--fg-dim); }
.cal-day.is-today.is-picked { border-color: var(--me); }
.cal-num { font-size: 13px; font-weight: 600; }
.cal-count {
    font-size: 12px; font-weight: 700; min-width: 20px; text-align: center;
    padding: 1px 6px; border-radius: 100px; background: color-mix(in srgb, var(--me) 22%, transparent); color: var(--fg);
}
.cal-count--done { background: transparent; color: var(--fg-faint); font-weight: 600; }
.cal-key { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--fg-faint); font-size: 12px; margin: 10px 2px 0; }
.cal-key .cal-count--done { margin-left: 8px; }
.cal-empty { color: var(--fg-faint); font-size: 14px; margin: 0 2px; }
.cal-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cal-stat { background: var(--bg-elev); border-radius: var(--radius-s); padding: 10px 12px; color: var(--fg-dim); font-size: 12px; display: flex; flex-direction: column; }
.cal-stat b { font-size: 20px; color: var(--fg); }
.cal-stat.is-warn b { color: var(--warn); }
/* Inside an open editor the row is already --bg-elev-2, so an unpicked chip
   in the same colour read as bare text. */
.fact.is-editing .seg label > span:not(.chip--cat) { background: var(--bg-elev); }
.time-inline { border-bottom: 1px dashed var(--fg-faint); min-height: 22px; }
/* The three menus under done open as a row beneath the buttons, never inside
   the button's own box: a <details> grows to hold its body, so an open "…"
   used to push itself onto a line of its own with its chips stacked under it
   (Ethan, 2026-09-23). The row reserves the room for whichever one is open. */
.actions-row { position: relative; }
.actions-row .menu { position: static; }
.actions-row .menu > .menu-body { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; justify-content: center; }
.actions-row .menu[open] > summary { background: var(--bg-elev-2); color: var(--fg); outline: 1px solid var(--border); }
.actions-row:has(.menu--snooze[open]), .actions-row:has(.menu--more[open]) { padding-bottom: 50px; }
.actions-row:has(.menu--help[open]) { padding-bottom: 176px; }
.actions-row .help-form { bottom: 0; }
.menu-body--row .confirm > summary, .menu-body--row form { display: inline-block; }

/* Staging (2026-09-23): a strip that cannot be missed or mistaken. */
.env-strip {
    flex: 0 0 auto; background: #7a4bd6; color: #fff; text-align: center;
    font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    padding: max(4px, env(safe-area-inset-top)) 12px 4px;
}
body.is-staging .app-header { padding-top: 10px; }

/* The week (check-in, 2026-09-23) */
.week-card { background: var(--bg-elev); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 10px; }
.week-head { display: flex; justify-content: space-between; align-items: center; }
.week-dates { color: var(--fg-dim); font-size: 13px; font-weight: 600; }
.week-stars { font-size: 22px; letter-spacing: 2px; color: var(--fg-faint); }
.week-stars .is-on { color: var(--warn); }
.week-line { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.35; }
.week-nums { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--fg-dim); }
.week-nums b { color: var(--fg); font-size: 15px; }
.week-nums .is-warn b { color: var(--warn); }
.week-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.week-people li { display: grid; grid-template-columns: 90px 1fr 28px; align-items: center; gap: 10px; font-size: 13px; }
.week-people li b { text-align: right; }
.week-bar { height: 8px; border-radius: 100px; background: var(--bg-elev-2); overflow: hidden; }
.week-bar > span { display: block; height: 100%; border-radius: 100px; }
.week-cats { display: flex; flex-wrap: wrap; gap: 6px; }

/* Routines (2026-09-23): a row of pills, not a list of cards. */
.routine-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.routine-pill { display: inline-flex; align-items: center; gap: 4px; }
.routine-pill .done-form { margin: 0; }
.done-btn--pill {
    width: auto; height: auto; border-radius: 100px; padding: 9px 14px 9px 10px;
    font-size: 14px; font-weight: 600; color: var(--fg); background: var(--bg-elev);
    border: 1.5px solid var(--border); gap: 8px; justify-content: flex-start;
}
.done-btn--pill::before {
    border-radius: 100px; background: linear-gradient(90deg, var(--me) var(--hold, 0%), transparent 0);
}
.done-btn--pill.is-holding::before { opacity: 0.35; }
.done-btn--pill span { opacity: 1; }
.done-btn--pill.is-holding span, .done-btn--pill.is-done span { color: var(--fg); }
.done-btn--pill.is-holding { transform: scale(0.97); }
.done-form.htmx-request .done-btn--pill, .done-btn--pill.is-done { background: color-mix(in srgb, var(--me) 20%, var(--bg-elev)); color: var(--fg); }
.routine-ring { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--me); flex-shrink: 0; }
.routine-time { color: var(--fg-faint); font-weight: 500; font-size: 12px; margin-left: 2px; }
.routine-done {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px; border-radius: 100px;
    font-size: 14px; font-weight: 600; color: var(--fg-dim);
    background: color-mix(in srgb, var(--me) 14%, transparent); border: 1.5px solid transparent;
}
.routine-check {
    width: 16px; height: 16px; border-radius: 50%; background: var(--me); color: var(--bg);
    font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
}
.routine-undo { background: none; border: none; color: var(--fg); font-size: 13px; font-weight: 600; padding: 8px 6px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.kind-pick { display: grid; gap: 6px; margin-top: 4px; }
.kind-opt { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 10px 12px; border-radius: var(--radius-xs); background: var(--bg-elev); border: 1px solid transparent; }
.kind-opt input { margin-top: 3px; accent-color: var(--me); }
.kind-opt span { font-size: 13px; color: var(--fg-dim); line-height: 1.4; }
.kind-opt b { color: var(--fg); margin-right: 4px; }
.kind-opt:has(input:checked) { border-color: var(--me); }
