/* Panora Life - the one design standard (UI review 2026-10-17, design/ui-review/REVIEW.md
 * section 2; Craig's calls in the review page: T4 rounded rectangles, T7 Home's small
 * uppercase section heads).
 *
 * The parts were separate apps, each with its own stylesheet, so their edges, buttons,
 * headings and selected states drifted apart. Rather than rewrite eight stylesheets,
 * this file is loaded LAST and brings every part onto the same rules, using each
 * part's own class names. Every rule names the finding it answers. Workout Log
 * (exercise/styles.css) and Know Thyself (knowthyself/index.html) are separate pages
 * in frames, so their share of the standard lives in their own files, marked the same.
 */
:root {
  --gutter: 20px; /* screen side margin, every screen (UI-72) */
  --r-card: 16px; /* cards (UI-78) */
  --r-btn: 14px; /* buttons, inputs, segmented controls (UI-73, T4) */
  --btn-h: 50px; /* main buttons */
  --head-size: 12px; /* section heads (UI-74, T7) */
  --head-track: 0.08em;
}

/* ---------- edges: 20 everywhere (UI-72) ---------- */
.parthead {
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)) !important;
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)) !important;
}
.screen.dom-money {
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.dom-food .page-head,
.dom-food .scroll {
  padding-left: max(var(--gutter), env(safe-area-inset-left)) !important;
  padding-right: max(var(--gutter), env(safe-area-inset-right)) !important;
}
.dom-food .segmented {
  margin-left: max(var(--gutter), env(safe-area-inset-left));
  margin-right: max(var(--gutter), env(safe-area-inset-right));
}

/* ---------- buttons (UI-73, UI-46, UI-61; T4) ----------
   Primary: the accent, flat, 50 tall, radius 14, full width. At most one a screen.
   Secondary: the card colour with a firm edge, ink text. Never a grey slab. */
.btn-primary,
.dom-food .btn.primary,
.dom-focus .btn--primary {
  min-height: var(--btn-h);
  border-radius: var(--r-btn) !important;
  background: var(--accent-lo) !important;
  color: var(--accent-ink) !important;
  box-shadow: none;
  font-size: 16px;
  font-weight: 700;
}
.dom-focus .btn--primary {
  --btn-bg: var(--accent-lo);
}
.btn-quiet {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: 1px solid var(--edge-strong) !important;
  box-shadow: none;
}
.dom-focus .btn {
  border-radius: var(--r-btn);
}
.dom-food .btn {
  border-radius: var(--r-btn);
}
.btn {
  border-radius: var(--r-btn);
}
/* A plain .btn (no kind given) fell back to the browser's grey: "Run the welcome
   again", "Set up the pause", Ask. It is the secondary button. Food and Focus have
   their own button kinds and are left to them. */
.btn:not(.btn-primary, .btn-ghost, .btn-danger, .btn-quiet, .btn-sm):not(.dom-food .btn, .dom-focus .btn) {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--edge-strong);
  box-shadow: none;
}

/* ---------- section heads: Home's small uppercase (UI-74, UI-52, UI-68; T7) ---------- */
.sectionlbl,
.dom-money .mn-cap,
.dom-focus .eyebrow,
.dom-food .section-head,
.dom-food .meal-head,
#settings-overlay .sheet h3,
.sheet h3 {
  font-size: var(--head-size) !important;
  font-weight: 800 !important;
  letter-spacing: var(--head-track) !important;
  text-transform: uppercase !important;
  color: var(--ink-muted) !important;
}
#settings-overlay .sheet h3,
.sheet h3 {
  margin: 24px 2px 8px !important;
}
#settings-overlay .sheet h3:first-of-type {
  margin-top: 8px !important;
}

/* ---------- selected states (UI-75, UI-38, UI-51) ----------
   A segmented choice: the chosen one raised on the card colour with a shadow.
   An on/off chip: an accent outline and a tick. */
.dom-focus .seg input:checked + .seg__opt {
  background: var(--surface);
  border-color: var(--edge);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.dom-focus .seg input:checked + .seg__opt .seg__mark {
  color: var(--accent-text, var(--accent));
}
.dom-unplug .chip.on {
  background: transparent;
  color: var(--accent-text, var(--accent));
  border-color: var(--accent);
}
.dom-unplug .chip.on::before {
  content: '\2713\00a0';
  font-weight: 800;
}
:root[data-theme='dark'] .dom-focus .seg input:checked + .seg__opt {
  background: #34342f;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .dom-focus .seg input:checked + .seg__opt {
    background: #34342f;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.08);
  }
}

/* ---------- one sheet (UI-62, UI-63) ----------
   A handle, the title on the left, the quiet way out at the top right, and the main
   action full width at the bottom - as Settings already does. */
.rv-sheet-card {
  position: relative;
  padding-top: 26px;
}
.rv-sheet-card::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 36px;
  height: 5px;
  margin-left: -18px;
  border-radius: 3px;
  background: var(--edge-strong);
}
.rv-sheet-card > h2 {
  font-size: 22px;
  font-weight: 800;
  padding-right: 84px;
}
.rv-sheet-btns {
  display: block;
}
.rv-sheet-btns .rv-sheet-pair {
  display: block;
}
.rv-sheet-btns .rv-sheet-pair .btn-primary {
  width: 100%;
}
.rv-sheet-btns .rv-sheet-pair .btn-quiet {
  position: absolute;
  top: 18px;
  right: 14px;
  width: auto;
  min-height: 36px;
  padding: 6px 10px;
  background: transparent !important;
  border: 0 !important;
  color: var(--accent-text, var(--accent)) !important;
  font-weight: 700;
}
.rv-sheet-btns > .rv-link,
.rv-sheet-btns > span:empty {
  display: block;
  margin: 0 0 10px;
}
/* Say it once: each row leads with its part, and an unticked row steps back. */
.say-item:has(input:not(:checked)) {
  opacity: 0.55;
}
.say-part {
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 700;
  color: var(--ink-muted);
}

/* ---------- Food (UI review batch 5: UI-17 to UI-23) ---------- */
/* Food names are content, not links: ink, with the number beside them in ink too.
   The accent is kept for things that do something. */
.dom-food .list-btn {
  color: var(--text);
}
.dom-food .list-btn > :last-child {
  font-weight: 600;
}
.dom-food .list-btn.danger {
  color: var(--danger);
}
/* The Weight card: "Log weight" is a quiet action, not a wide white bar. */
.dom-food .wt-head .btn.small {
  background: transparent;
  box-shadow: none;
  border: 0;
  min-height: 36px;
  padding: 4px 0 4px 12px;
  color: var(--accent-text);
  /* Right-aligned at the card's edge, not floating mid-row (UI review 2026-10-18). */
  flex: none;
  width: auto;
  margin-left: auto;
}
.dom-food .weight-card .wt-spark {
  height: 48px;
  margin: 6px 0 2px;
}
.dom-food .weight-card .hint {
  margin: 4px 0 0;
  font-size: 14px;
}
/* Recent: one divider per row, full width, the star inside the row. */
.dom-food .recent-row {
  border-bottom: 1px solid var(--hairline);
}
.dom-food .recent-row:last-child {
  border-bottom: 0;
}
.dom-food .recent-row .list-btn {
  border-bottom: 0;
}
.dom-food .muted-inline {
  white-space: nowrap;
}
/* Foods: search is the input; Scan and Build sit side by side as two buttons. */
.dom-food #food-results > .btn.wide[data-act='scan'],
.dom-food #food-results > .btn.wide[data-act='compose-new'] {
  display: inline-flex;
  width: calc(50% - 5px);
  min-height: var(--btn-h);
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
  vertical-align: top;
}
.dom-food #food-results > .btn.wide[data-act='scan'] {
  margin-right: 10px;
}
/* An empty screen: a tile in Food's colour, a title, a line, one action. */
.dom-food .empty {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: 28px 20px 24px;
  margin: 8px 0;
}
.dom-food .empty::before {
  content: '';
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: #e2bd72
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f2a22' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3v8M5 3v5a2 2 0 0 0 4 0V3M7 11v10M16 3c-2 1-3 4-3 7h3v11'/%3E%3C/svg%3E")
    center / 28px no-repeat;
}
.dom-food .empty h2 {
  font-size: 17px;
  font-weight: 700;
}
.dom-food .empty p {
  font-size: 15px;
  line-height: 1.45;
}
/* The goal card: one left edge for its title and its text. */
.dom-food .goal-card p {
  margin-left: 0;
  padding-left: 0;
}

/* ---------- Focus (UI-39 to UI-43) ---------- */
/* The check-in: a bold question, 8 under it the line, 24 between groups, labels 8 above. */
.dom-focus #s-checkin .h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 0;
}
.dom-focus #s-checkin .h1 + .sub {
  margin-top: 8px;
}
.dom-focus #s-checkin fieldset {
  margin-top: 24px !important;
  gap: 0 !important;
}
.dom-focus #s-checkin legend {
  margin-bottom: 8px;
  padding: 0;
}
.dom-focus #s-checkin fieldset + .foot {
  margin-top: 24px;
}
/* The list's head is a standard section head: "TODAY · ABOUT 35 MIN" (UI-43). */
.dom-focus .listhead {
  font-size: var(--head-size);
  font-weight: 800;
  letter-spacing: var(--head-track);
  text-transform: uppercase;
  color: var(--ink-muted);
  line-height: 1.3;
  margin: 4px 0 0;
}
/* The tasks are one grouped card; rows split by a hairline, no boxes (UI-40, UI-41). */
.dom-focus .tasklist {
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--r-card);
  overflow: hidden;
}
.dom-focus .tasklist:empty {
  display: none;
}
.dom-focus .task {
  border: 0;
  border-radius: 0;
}
.dom-focus .task + .task {
  border-top: 1px solid var(--edge);
}
.dom-focus .task__handle {
  border-right: 0;
  width: 52px;
}
.dom-focus .task__rank {
  width: 28px;
  height: 28px;
}
.dom-focus .task__pick {
  padding-left: 4px;
}
.dom-focus .task__del {
  border-left: 0;
  width: 44px;
  color: var(--ink-muted);
}
/* "Show everything" is a quiet link under the card; "Add more" a secondary button. */
.dom-focus .linkquiet {
  align-self: flex-start;
  min-height: 44px;
  padding: 0 4px;
  margin-top: -4px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-text);
  cursor: pointer;
}
.dom-focus .addmore {
  font-weight: 600;
  color: var(--ink);
}
/* The calendar prompt: a quiet card with its x inside, top right (UI-42). */
.dom-focus .cal-invite {
  position: relative;
  gap: 0;
  background: var(--surface-quiet);
  border-radius: var(--r-card);
}
.dom-focus .cal-invite-go {
  min-height: 52px;
  padding: 0 48px 0 16px;
  border: 0;
  border-radius: var(--r-card);
}
.dom-focus .cal-invite-x {
  position: absolute;
  top: 4px;
  right: 4px;
}

/* ---------- Unplug (UI-48, UI-50) ---------- */
/* Set up: each step a card with a number badge in Unplug's colour. */
.dom-unplug .up-steps {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.dom-unplug .up-steps li.up-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 0 0 10px;
  padding: 16px;
}
.dom-unplug .up-step-n {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-wash, var(--surface-2));
  color: #1f2a22;
  font-size: 14px;
  font-weight: 800;
}
.dom-unplug .up-step-body {
  flex: 1;
  min-width: 0;
}
.dom-unplug .up-step-body p {
  margin: 3px 0 0;
  font-size: 15px;
  line-height: 1.45;
}
.dom-unplug .up-steps li.up-steps-lead {
  margin: 18px 0 8px;
  font-size: var(--head-size);
  font-weight: 800;
  letter-spacing: var(--head-track);
  text-transform: uppercase;
  color: var(--ink-muted);
}
.dom-unplug .up-step .up-urls {
  margin: 12px 0 0;
}
.dom-unplug .up-step .up-url {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 6px 6px 6px 12px;
  background: var(--bg, transparent);
}
.dom-unplug .up-url .btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}
/* Typing the number in: its own card, the hint as a muted line above the boxes. */
.dom-unplug .up-log .up-hint {
  margin: 0 0 10px;
  font-size: 13px;
}

/* ---------- Stillness (UI-34, UI-37) ---------- */
/* The Library: two grouped cards, each row a tile, the length and a chevron. */
.dom-still .lib-group {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card, none);
  padding: 0 16px;
  margin: 0 0 8px;
}
.dom-still .lib-group .techrow {
  gap: 14px;
  padding: 14px 0;
  min-height: 64px;
}
.dom-still .techico {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}
.dom-still .techico svg,
.dom-still .techchev svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #1f2a22;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dom-still .techtext {
  flex: 1;
  min-width: 0;
}
.dom-still .techlen {
  flex: none;
  font-size: 13px;
  color: var(--ink-muted);
  white-space: nowrap;
}
.dom-still .techchev {
  flex: none;
  display: grid;
  margin-left: -6px;
}
.dom-still .techchev svg {
  width: 18px;
  height: 18px;
  stroke: var(--ink-muted);
}

/* ---------- Sleep (UI-09, UI-10, UI-14, UI-16) ---------- */
.dom-sleep .stat .num {
  white-space: nowrap;
  /* Four figures share a phone's width: "11:22 PM" ran into "6:37 AM" at 375 wide
     (panel re-run, Daniel). The size follows the width, down to 17. */
  font-size: clamp(17px, 5.4vw, 22px);
}
.dom-sleep .stat .num small {
  font-size: clamp(10px, 3vw, 13px);
}
.dom-sleep .statrow {
  gap: 12px;
}
/* The night score: ink, not green, so the duration stays the one hero. */
.dom-sleep .score-num {
  color: var(--ink) !important;
  font-size: 28px !important;
  font-weight: 800 !important;
  line-height: 1.1;
}
.dom-sleep .score-vs {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-muted);
  text-align: right;
}
.dom-sleep .wind-head {
  font-size: 17px;
  font-weight: 700;
}

/* ---------- Money (UI-53) ---------- */
/* A new goal: two boxed fields on one row, the same box for each. */
.dom-money .mn-newgoal .mn-name {
  font: 600 16px var(--font-ui);
  background: var(--canvas);
  border: 1.5px solid var(--edge);
  border-radius: 10px;
  padding: 8px 10px;
}
.dom-money .mn-newgoal .mn-name:focus {
  border-color: var(--accent);
}
.dom-money .mn-newgoal + .btn {
  margin-top: 6px;
}
/* Money's empty screens open on a drawn tile in its colour (UI-56). */
.dom-money .mn-hello-tile {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 4px 0 14px;
  border-radius: 16px;
}
.dom-money .mn-hello-tile svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #1f2a22;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Home (UI-04, UI-05, UI-08) ---------- */
/* Tell Panora: heading, 12, then the box with the mic inside its right edge and one
   48px send button centred on it; 16 all round. */
.say-card {
  padding: 16px !important;
}
.say-label {
  margin: 0 2px 12px !important;
}
.say-row {
  align-items: center !important;
  gap: 10px !important;
}
.say-field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
}
.say-field textarea {
  flex: 1 1 auto;
  min-width: 0;
}
.say-field:has(#say-mic) textarea {
  padding-right: 44px;
  min-height: calc(3 * 1.35em + 20px);
}
.say-field #say-mic {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: transparent !important;
  color: #2d4a3c !important;
}
/* The mic takes the theme's own ink, as the arrow beside it does (UI review 2026-10-18). */
html[data-sky='sunrise'] .say-field #say-mic {
  color: #5b4fae !important;
}
html[data-sky='glacier'] .say-field #say-mic {
  color: #2a40a6 !important;
}
.say-field #say-mic.on {
  background: #c0392b !important;
  color: #fff !important;
}
.say-go {
  flex: none;
  width: 48px !important;
  height: 48px !important;
}
.say-note:empty {
  min-height: 0;
  margin: 0;
}
/* An empty slice draws its icon in the sky's ink, so it shows on the dark slice (UI-05). */
#wins-home.sky .score-ic.score-ic-empty {
  stroke: var(--sky-ink, #fff);
}
/* Ask your data: the title on one line, the example under it (UI-08). The experiment
   offer is the same kind of row (UI review 2026-10-18: its line was squeezed to the right). */
.dom-wins .rv-ask-open,
.dom-wins .xp-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 2px;
}
.dom-wins .rv-ask-open .rv-open-t,
.dom-wins .xp-open .rv-open-t {
  grid-column: 1;
}
.dom-wins .rv-ask-open .rv-open-s,
.dom-wins .xp-open .rv-open-s {
  grid-column: 1;
  grid-row: 2;
  font-weight: 500;
  opacity: 0.85;
}
.dom-wins .rv-ask-open .rv-open-c,
.dom-wins .xp-open .rv-open-c {
  grid-column: 2;
  grid-row: 1 / span 2;
}

/* ---------- Batch 6: Craig's calls ---------- */
/* T1 (a): Home's tools are plain shortcuts, icon + name. The next-step cards above
   already say what today looks like, so the tile's value, line and tick are kept
   for screen readers only ("Food, 592 kcal, logged today"), not shown again. */
#wins-home.sky .home-grid .tile {
  min-height: 56px;
  padding: 10px 12px;
  border-radius: var(--r-card);
  flex-direction: row;
  align-items: center;
}
#wins-home.sky .home-grid .tile-head {
  margin: 0;
  gap: 10px;
}
#wins-home.sky .home-grid .tile .tile-value,
#wins-home.sky .home-grid .tile .tile-sub,
#wins-home.sky .home-grid .tile .tile-bar,
#wins-home.sky .home-grid .tile .tile-state {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
#wins-home.sky .home-grid .tile .tile-label {
  font-size: 15px;
}

/* UI-64: Your week's header, like every part's: today's wheel, the name, this week's wins. */
.dom-review .wk-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 16px;
}
.dom-review .wk-top h1 {
  margin: 0;
  font-size: 26px;
  flex: 1;
}
.dom-review .wk-chip {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
}
.dom-review .wk-chip:empty {
  display: none;
}
.dom-review .wk-chip svg {
  width: 40px;
  height: 40px;
}
.dom-review .wk-status {
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
}
/* T8 (b): each card is named by its part's icon chip; no side stripes. */
.dom-review .rv-card {
  padding: 14px 16px 8px;
}
.dom-review .rv-card::before {
  display: none;
}
.dom-review .rv-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.dom-review .rv-chip {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}
.dom-review .rv-chip svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #1f2a22;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dom-review .rv-chip-wins {
  background: var(--accent-lo, var(--accent));
}
.dom-review .rv-chip-wins svg {
  stroke: var(--accent-ink, #fff);
}
/* UI-65: Ask's button is a secondary one until there is a question to send. */
.dom-review .ask-form .ask-go {
  background: var(--surface);
  color: var(--accent-text, var(--accent));
  border: 1px solid var(--edge-strong, var(--edge));
  box-shadow: none;
}
.dom-review .ask-form:has(#ask-q:not(:placeholder-shown)) .ask-go:not(:disabled) {
  background: var(--accent-lo, var(--accent));
  color: var(--accent-ink, #fff);
  border-color: transparent;
}
#ask-host {
  scroll-margin-top: 64px;
}

/* T6 (b): one line on screen, the reasoning under "Why?" with a drawn chevron. */
details.why {
  margin: 6px 0 2px;
}
details.why > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-text, var(--accent));
}
details.why > summary::-webkit-details-marker {
  display: none;
}
details.why > summary::after {
  content: '';
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6-6'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6-6'/%3E%3C/svg%3E")
    center / contain no-repeat;
  transition: transform 0.15s ease;
}
details.why[open] > summary::after {
  transform: rotate(180deg);
}
details.why > :not(summary) {
  margin-top: 2px;
}
.dom-food .empty details.why {
  text-align: center;
}

/* T2 (b): data (charts, bars, progress) in the part's own colour, the colour its
   wheel slice and icon chip wear; buttons and tabs stay in the theme accent.
   --part-data is the part colour pulled toward the ink, so a bar keeps about 3:1
   against the card in light mode and lightens in dark mode. */
:root {
  --pc-food: #e2bd72;
  --pc-exercise: #d79a7c;
  --pc-unplug: #86b8b2;
  --pc-sleep: #a3b3cf;
  --pc-still: #a6c79c;
  --pc-focus: #bba4c0;
  --pc-know: #ece0bd;
  --pc-money: #c3cf98;
}
html[data-sky='sunrise'] {
  --pc-food: #f6c08e;
  --pc-exercise: #f2a1a8;
  --pc-unplug: #a9c2ee;
  --pc-sleep: #c3b6ec;
  --pc-still: #a9dcc6;
  --pc-focus: #dcaedb;
  --pc-know: #f5dd9a;
  --pc-money: #f0d9a6;
}
html[data-sky='glacier'] {
  --pc-food: #f0cf8c;
  --pc-exercise: #eba3ae;
  --pc-unplug: #9ccbf2;
  --pc-sleep: #aab4ee;
  --pc-still: #97dcd8;
  --pc-focus: #c6b2ec;
  --pc-know: #e9e2c8;
  --pc-money: #b6dccf;
}
.dom-food {
  --part: var(--pc-food);
}
.dom-unplug {
  --part: var(--pc-unplug);
}
.dom-sleep {
  --part: var(--pc-sleep);
}
.dom-still {
  --part: var(--pc-still);
}
.dom-focus {
  --part: var(--pc-focus);
}
.dom-money {
  --part: var(--pc-money);
}
.dom-food,
.dom-unplug,
.dom-sleep,
.dom-still,
.dom-focus,
.dom-money {
  --part-data: color-mix(in srgb, var(--part) 74%, var(--ink));
  --part-deep: color-mix(in srgb, var(--part) 58%, var(--ink));
}
/* Sleep: the night-by-night bars, naps and the how-long chart. */
.dom-sleep .tl-bar,
.dom-sleep .tl-nap,
.dom-sleep .bar {
  background: var(--part-data);
}
/* Unplug: every day's bar in Unplug's colour, a day over the goal a deeper shade,
   and the phone-free progress. */
.dom-unplug .up-colbar {
  background: var(--part-deep);
  opacity: 1;
}
.dom-unplug .up-col.under .up-colbar {
  background: var(--part-data);
}
.dom-unplug .up-fill {
  background: var(--part-data);
}
/* Food: its charts and bands. */
.dom-food .chart .bar,
.dom-food .band-fill,
.dom-food .store-fill {
  fill: var(--part-data);
  background: var(--part-data);
}
/* Money: progress bars and the net-worth line. */
.dom-money .mn-bar i {
  background: var(--part-data);
}
.dom-money .mn-spark-line {
  stroke: var(--part-data);
}
.dom-money .mn-spark-dot {
  fill: var(--part-data);
}
.dom-money .mn-spark-fill {
  fill: color-mix(in srgb, var(--part) 30%, transparent);
}

/* T3 (b): dark mode inside the parts is lightly tinted by the theme family, so going
   from the dark Home into a part no longer feels like leaving the app. Grove a deep
   green-black, Sunrise a plum-black, Glacier a navy-black. */
:root[data-theme='dark'] {
  --canvas: #0e1411;
  --surface: #18201b;
  --surface-quiet: #212b25;
  --edge-strong: #34403a;
}
:root[data-theme='dark'][data-sky='sunrise'] {
  --canvas: #15111a;
  --surface: #201a27;
  --surface-quiet: #2a2332;
  --edge-strong: #3f3549;
}
:root[data-theme='dark'][data-sky='glacier'] {
  --canvas: #0d1220;
  --surface: #161d2e;
  --surface-quiet: #1f2739;
  --edge-strong: #333d55;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --canvas: #0e1411;
    --surface: #18201b;
    --surface-quiet: #212b25;
    --edge-strong: #34403a;
  }
  :root:not([data-theme='light'])[data-sky='sunrise'] {
    --canvas: #15111a;
    --surface: #201a27;
    --surface-quiet: #2a2332;
    --edge-strong: #3f3549;
  }
  :root:not([data-theme='light'])[data-sky='glacier'] {
    --canvas: #0d1220;
    --surface: #161d2e;
    --surface-quiet: #1f2739;
    --edge-strong: #333d55;
  }
}
/* UI-47: the goal line is labelled at its right end, above the line. */
.dom-unplug .up-goal-tag {
  position: absolute;
  right: 0;
  bottom: 2px;
  padding: 0 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  background: var(--surface);
  border-radius: 4px;
  line-height: 1.3;
}
/* Room at the right of the chart for the label, so it never sits on a bar. */
.dom-unplug .up-plot,
.dom-unplug .up-dows {
  padding-right: 44px;
}

/* Settings -> App icon (iPhone app only): each choice shows its icon. */
.icon-pick {
  grid-template-columns: repeat(2, 1fr);
}
.icon-pick .ic {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: block;
  box-shadow: 0 4px 10px -6px rgba(0, 0, 0, 0.5);
}

/* ---------- Device pass (2026-10-18): the newest iPhones ---------- */
/* Inside a part, Panora's top strip already clears the Dynamic Island
   (--appbar-total, css/shell.css), but the family's .topbar added the same inset
   again (css/sleep.css), so Your week's header sat about 59 points low on an
   iPhone. A browser shows no difference: its inset is 0. Home has no strip, so
   its top bar keeps the inset. */
html:not(.on-home) .screen .topbar {
  padding-top: 4px;
}

/* ---------- Device pass, part 2: bigger screens (2026-10-18) ----------
   Medium, 600 and up (a large phone on its side, a folding phone opened): every part
   is one reading column about 640 wide, its header and bottom bar lined up with it,
   instead of a phone stretched edge to edge. Wide, 768 and up (any iPad, either way
   up; the user panel, Phase 5: Lena's iPad upright is 820 and got a phone column):
   Home in two halves, the day and its wheel left, the rest right, and a 720 reading
   column in the parts. The framed parts (Exercise, Know Thyself) do the same in their
   own pages. */
/* The sky fills the screen however short Home is: on an iPad upright it stopped part
   way down, with the page's cream below it (Phase 5). Home has no top strip. */
#wins-home.sky {
  min-height: calc(100dvh / var(--tz, 1));
  box-sizing: border-box;
}
@media (min-width: 600px) {
  :root {
    --gutter: max(24px, calc((100vw - 640px) / 2));
  }
  .screen.dom-sleep,
  .screen.dom-still,
  .screen.dom-unplug,
  .screen.dom-focus,
  .screen.dom-money,
  .screen.dom-review {
    padding-left: var(--gutter) !important;
    padding-right: var(--gutter) !important;
  }
  .screen.dom-review {
    max-width: none;
  }
  .partbar {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }
  /* Home: the sky edge to edge, its content a 600 column. */
  #wins-home.sky {
    max-width: none;
    padding-left: max(20px, calc((100vw - 600px) / 2));
    padding-right: max(20px, calc((100vw - 600px) / 2));
  }
  #wins-home.sky .home-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 768px) {
  :root {
    --gutter: max(32px, calc((100vw - 720px) / 2));
  }
  #wins-home.sky {
    padding-left: max(32px, calc((100vw - 1060px) / 2));
    padding-right: max(32px, calc((100vw - 1060px) / 2));
  }
  #wins-home.sky #wins-body {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 0 44px;
    align-items: start;
  }
  #wins-home.sky .home-left {
    position: sticky;
    top: 16px;
  }
  #wins-home.sky .home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Build first, the rest (the AI plan, 2026-10-18) ---------- */
/* What does this mean? (Your week's patterns) */
.dom-review .rv-pattern-row {
  padding: 8px 0;
  border-top: 1px solid var(--edge);
}
.dom-review .rv-pattern-row:first-of-type {
  border-top: 0;
}
.dom-review .rv-pattern-row .rv-pattern {
  margin: 0 0 4px;
}
.dom-review .rv-why-go {
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  min-height: 36px;
}
.dom-review .rv-pattern-why {
  margin: 4px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-quiet);
  font-size: 15px;
  line-height: 1.45;
}
/* Am I on track? (Food's weight card, Sleep Trends, Money's plan) */
.ontrack {
  margin-top: 10px;
}
.ontrack-go {
  border: 0;
  background: none;
  padding: 0;
  min-height: 40px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-text, var(--accent));
  cursor: pointer;
}
.ontrack-go:disabled {
  opacity: 0.6;
}
.ontrack-text {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-quiet, rgba(0, 0, 0, 0.04));
  font-size: 15px;
  line-height: 1.45;
}
.ontrack-err,
.up-shot-err,
.gap-err,
.xp-err {
  color: var(--danger);
  font-size: 14px;
  margin: 6px 0 0;
}
/* Screen Time from a screenshot (Unplug) */
.dom-unplug .up-shot-note {
  margin: 4px 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--accent-wash, var(--surface-quiet));
  font-size: 14px;
  line-height: 1.4;
}
.dom-unplug .up-shot-go {
  margin-top: 8px;
}
/* What could I eat? (Food) */
.dom-food .gap-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
}
.dom-food .gap-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
}
.dom-food .gap-food {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dom-food .gap-row .btn {
  flex: none;
  width: auto;
  min-width: 72px;
  margin: 0;
}
.dom-food .gap-food .muted {
  font-size: 13px;
}
.dom-food .gap-note {
  margin: 6px 0;
}
/* Small experiments (Home) */
#wins-home.sky .xp-card {
  padding: 14px 16px;
  margin: 10px 0 0;
  border-radius: var(--r-card);
}
#wins-home.sky .xp-open {
  margin: 10px 0 0;
}
#wins-home.sky .xp-eyebrow {
  margin: 0;
  font-size: var(--head-size);
  font-weight: 800;
  letter-spacing: var(--head-track);
  text-transform: uppercase;
  opacity: 0.85;
}
#wins-home.sky .xp-change {
  margin: 4px 0 2px;
  font-size: 18px;
  font-weight: 800;
}
#wins-home.sky .xp-line,
#wins-home.sky .xp-result {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
}
#wins-home.sky .xp-result {
  font-size: 15px;
}
#wins-home.sky .xp-btns {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
#wins-home.sky .xp-q {
  flex: 1;
  font-weight: 700;
}
#wins-home.sky .xp-tick {
  min-width: 64px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: var(--sky-ink, #fff);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
#wins-home.sky .xp-tick.on {
  background: var(--sky-ink, #fff);
  color: var(--wheel-ink);
  border-color: transparent;
}
#wins-home.sky .xp-btns .btn {
  flex: 1;
}
.xp-list {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}
.xp-pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--edge);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* Ask your data: a conversation, a follow-up box, and a chart from the app's own table. */
.dom-review .ask-thread {
  border-top: 1px solid var(--edge);
  padding-top: 10px;
  margin-top: 10px;
}
.dom-review .ask-thread:not(.older) {
  border-top: 0;
  margin-top: 0;
}
.dom-review .ask-thread.older {
  opacity: 0.8;
}
.dom-review .ask-thread .ask-qa + .ask-qa {
  margin-top: 10px;
}
.dom-review .ask-follow {
  margin: 10px 0 4px;
}
.dom-review .ask-chart {
  margin: 8px 0 4px;
}
.dom-review .ask-chart svg {
  display: block;
  width: 100%;
  height: 64px;
}
.dom-review .ask-chart rect {
  fill: var(--accent);
  opacity: 0.75;
}
.dom-review .ask-chart figcaption {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-muted);
}
/* Focus: Plan my day */
.dom-focus .planday {
  font-weight: 600;
}
.plan-list {
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
}
.plan-list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--edge);
}
.plan-list li:first-child {
  border-top: 0;
}
.plan-at {
  flex: none;
  width: 52px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.plan-what {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.plan-sub {
  font-size: 13px;
  color: var(--ink-muted);
}
.plan-busy {
  opacity: 0.7;
}
.plan-tiny {
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--accent-wash, var(--surface-quiet));
  font-size: 14px;
}
.plan-tiny-k {
  font-weight: 700;
}

/* Sunrise contrast (UI review 2026-10-18, measured from the screenshots): white words on
   Sunrise's white glass were 2.8-3.6:1, under the 4.5:1 bar. Here the glass is tinted with
   Sunrise's own plum instead of white, and a light plum veil runs the whole page below the
   top band, so the cards measure 6-7:1 and the words on the sky 4.6:1. Grove and Glacier
   already pass. Night is dark already. */
html[data-sky='sunrise'] #wins-home.sky:not(.sky-night)::after {
  bottom: 0;
  height: auto;
  background: linear-gradient(
    180deg,
    rgba(58, 29, 79, 0.42) 0,
    rgba(58, 29, 79, 0.36) 170px,
    rgba(58, 29, 79, 0.22) 470px,
    rgba(58, 29, 79, 0.22) 100%
  );
}
html[data-sky='sunrise'] #wins-home.sky .sky-glass,
html[data-sky='sunrise'] #wins-home.sky .tile,
html[data-sky='sunrise'] #wins-home.sky .today-next,
html[data-sky='sunrise'] #wins-home.sky .welcome-card,
html[data-sky='sunrise'] #wins-home.sky .rv-open,
html[data-sky='sunrise'] #wins-home.sky .wins-recent,
html[data-sky='sunrise'] #wins-home.sky .score-explain,
html[data-sky='sunrise'] .dom-wins .score-detail {
  background: rgba(52, 26, 84, 0.2);
}
html[data-sky='sunrise'] #wins-home.sky .tile:active {
  background: rgba(52, 26, 84, 0.3);
}

/* Wins say what they are, under the number (UI review 2026-10-18). */
.dom-wins .wins-what {
  margin: 8px 0 0;
  line-height: 1.4;
}
.dom-wins .wins-how-go {
  background: none;
  border: 0;
  padding: 4px 0;
  min-height: 32px;
  font: inherit;
  font-weight: 700;
  color: var(--accent-text);
  text-decoration: underline;
  cursor: pointer;
}

/* Breathing room between words and the button under them (UI review 2026-10-18):
   Unplug's "Set up the pause" touched its paragraph, and Settings' helper line sat
   right under "Run the welcome again". */
.dom-unplug .up-card > p + .btn {
  margin-top: 12px;
}
#btn-welcome-again + .hint {
  margin-top: 8px;
}

/* T3 for the chosen option too (UI review 2026-10-18): dark mode's selected segment was a
   warm grey (#34342f) in every theme. It takes the family's own edge colour, still lighter
   than its track (UI-60). */
:root[data-theme='dark'] .segmented button.active,
:root[data-theme='dark'] .dom-food .seg.on {
  background: var(--edge-strong);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .segmented button.active,
  :root:not([data-theme='light']) .dom-food .seg.on {
    background: var(--edge-strong);
  }
}

/* Sleep's drawn faces, and labels big enough to read (13px, was 10.5; UI review 2026-10-18). */
.scalebtn .sface svg {
  display: block;
  width: 26px;
  height: 26px;
}
.scalebtn .slbl {
  font-size: 13px !important;
}
.scalebtn.selected .sface {
  color: var(--accent-text);
}

/* Tap targets (UI review 2026-10-18, measured by design/ui-review/capture.mjs): icon
   buttons drawn smaller than 44 x 44 get an invisible layer that reaches 44, so the
   look is unchanged. Sleep's back and save (about 28), Food's day arrows (30), the
   steppers (40). */
.iconbtn,
.dom-food .date-nav .icon-btn,
.stepper > button {
  position: relative;
}
.iconbtn::after,
.dom-food .date-nav .icon-btn::after,
.stepper > button::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}
/* More of them (expert round 4): Money's remove (32), Food's sheet Cancel and Save (40) and
   the toast's Undo (about 21 high). The layer is at least the button and at least 44. */
.dom-money .mn-x,
.dom-food .sheet-btn,
#toast .toast-undo {
  position: relative;
}
.dom-money .mn-x::after,
.dom-food .sheet-btn::after,
#toast .toast-undo::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100%, 44px);
  height: max(100%, 44px);
  transform: translate(-50%, -50%);
}
/* Sleep's and Breathing's chips are wide but about 38 high: a layer as wide as the chip. */
.dom-sleep .chip,
.dom-still .chip {
  position: relative;
}
.dom-sleep .chip::after,
.dom-still .chip::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 44px;
  transform: translateY(-50%);
}

/* Settings, lower half (seen for the first time 2026-10-18): the reminder notes sat right
   under "Also notify me on this device", one line jammed into the next. */
#btn-rem-device ~ .hint {
  margin-top: 8px;
}
#rem-notify-state:empty {
  display: none;
}

/* ---------- Phase 6.2: every tap target at least 44 points (2026-10-19) ----------
   Measured on each screen at 390 wide (the user panel: Food's day arrows were 30, the
   mic 36, checkbox rows 19). Where a bigger box would change the look, an invisible
   layer around the control takes the tap instead. */
.parthead .ph-arw {
  position: relative;
}
.parthead .ph-arw::after,
#wins-home .sky-go::after {
  content: '';
  position: absolute;
  inset: -7px;
}
#wins-home .sky-go {
  position: relative;
}
#wins-home .sky-go::after {
  inset: -9px -4px;
}
.say-btn {
  flex: none;
  min-width: 44px;
  min-height: 44px;
}
.homebtn,
.segmented > button,
.chip,
.part-chip,
#btn-log-back,
.dom-review .link-btn {
  min-height: 44px;
}
/* A checkbox row is one target the full width of the row, its label included. */
.cal-field:has(> input[type='checkbox']),
#reminders-host .rem-on {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  cursor: pointer;
}
.cal-field > input[type='checkbox'] {
  width: 20px;
  height: 20px;
  padding: 0;
  flex: none;
  accent-color: var(--accent);
}
/* "Why?" and "How wins work" lines open on a 44-point row. */
.screen summary,
.sheet summary,
.rv-sheet summary {
  min-height: 44px;
  padding-block: 11px;
  box-sizing: border-box;
}

/* ---------- Phase 6.3: Settings as grouped rows (2026-10-19) ---------- */
/* What is hidden stays hidden: a .btn's display had beaten [hidden], so "Disconnect"
   showed with nothing connected and "Bring back 0 stopped ideas" with none stopped. */
#settings-overlay [hidden] {
  display: none !important;
}
/* Lines for one kind of device only (js/device.js). */
html:not(.is-ios) .ios-only,
html:not(.is-windows) .win-only {
  display: none !important;
}
/* A switch row and the line under it read as one grouped card. */
#settings-overlay .cal-field:has(> input[type='checkbox']) {
  padding: 4px 14px;
  border-radius: 14px 14px 0 0;
  background: var(--surface, #fff);
  border: 1px solid var(--edge);
  border-bottom: 0;
  justify-content: space-between;
  flex-direction: row-reverse;
  font-size: 15px;
  font-weight: 600;
}
#settings-overlay .cal-field:has(> input[type='checkbox']) + .hint {
  margin: 0 0 6px;
  padding: 0 14px 12px;
  border-radius: 0 0 14px 14px;
  background: var(--surface, #fff);
  border: 1px solid var(--edge);
  border-top: 0;
}
/* Switches in the theme's colour, not the system's blue checkbox. */
#settings-overlay input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 46px;
  height: 28px;
  flex: none;
  margin: 0;
  border-radius: 14px;
  background: var(--edge-strong, #c9c4ba);
  cursor: pointer;
  transition: background 0.2s ease;
}
#settings-overlay input[type='checkbox']::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}
#settings-overlay input[type='checkbox']:checked {
  background: var(--accent);
}
#settings-overlay input[type='checkbox']:checked::after {
  transform: translateX(18px);
}
#settings-overlay input[type='checkbox']:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  #settings-overlay input[type='checkbox'],
  #settings-overlay input[type='checkbox']::after {
    transition: none;
  }
}
/* Secondary text: 13 points, muted. */
#settings-overlay .hint,
#settings-overlay .tiny,
#settings-overlay .voice-hint {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-muted);
}
/* "Why?" opens the longer reason in place. */
#settings-overlay .set-why {
  margin: 0 0 8px;
}
#settings-overlay .set-why > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  font-weight: 700;
  color: var(--accent-text, var(--accent));
  cursor: pointer;
}
#settings-overlay .set-why > p {
  margin: 0 0 6px;
}

/* ---------- Phase 6.4: theme slips (2026-10-19) ---------- */
/* Sleep's empty screens open on a drawn tile in its colour, like Money's, not a 🌙. */
.dom-sleep .eico-drawn {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: var(--part, #b8c2e0);
  font-size: 0;
}
.dom-sleep .eico-drawn svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #1f2a22;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Phase 6.6: small items (2026-10-19) ---------- */
/* Deleting sits behind one red row, not eight red buttons by Close. */
#settings-overlay .wipe-more {
  margin-top: 18px;
  border-top: 1px solid var(--edge);
}
#settings-overlay .wipe-more > summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0;
  font-weight: 700;
  color: var(--danger, #b3261e);
  cursor: pointer;
}
/* Food: the meal the day is at, empty, with one way to add to it. */
.dom-food .meal-slot {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 600;
  text-align: left;
  color: var(--accent-text, var(--accent));
  border: 1px dashed var(--hairline, var(--edge));
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}
/* Focus: stacked buttons sat 4 px apart; side-by-side groups keep their own gap. */
.dom-focus :not(.bucket-item__actions):not(.cal-invite) > .btn + .btn {
  margin-top: 10px;
}
.dom-focus .bucket-item__actions .btn {
  min-height: 44px;
}
/* Focus's "Delete everything" reads as what it is before it asks. */
.dom-focus #wipeArea > .btn:only-child {
  --btn-fg: var(--danger);
  --btn-edge: var(--danger);
}
/* The welcome: "Set up" leads; "Not now" is the quiet way out (the user panel, 6.6:
   the two carried equal weight). */
#wins-home.sky .welcome-card #welcome-later {
  background: transparent;
  color: var(--sky-ink, #fff);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: none;
}

/* ---------- Panel re-run (2026-10-19) ---------- */
/* The welcome: Next is the filled button whatever card it sits in ("Skip" and "Next"
   carried equal weight; a .welcome-card rule out-ranked the filled one). */
.welcome-sheet .welcome-card-big .welcome-go:not([disabled]) {
  background: var(--accent);
  color: var(--accent-ink, #fff);
  border-color: var(--accent);
}
/* "More ↓" has a row of its own above the buttons, never over an option (panel runs 2 and
   3: eight people found it on top of an option's words, at the side or in the middle). */
.welcome-sheet .welcome-btns {
  flex-wrap: wrap;
}
.welcome-sheet .welcome-more {
  position: static;
  transform: none;
  order: -1;
  flex: 1 0 100%;
  min-height: 44px;
  padding: 4px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 13px;
  color: var(--accent-text, var(--accent));
}
/* The folded AI line says what it is, on a line of its own under the name (Plan 2, B5). */
.ai-fold > summary,
.rv-ai-fold > summary {
  flex-wrap: wrap;
}
.ai-fold-t {
  flex: 1 1 auto;
}
.ai-fold-s {
  order: 3;
  flex-basis: 100%;
  margin: 2px 0 8px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  opacity: 0.8;
}
/* Settings › What matters most: one row per part, moved up or down (Craig, 2026-10-19). */
.order-pick {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.order-row {
  display: grid;
  grid-template-columns: 28px 1fr 44px 44px;
  align-items: center;
  gap: 4px;
  padding: 0 4px 0 12px;
  min-height: 48px;
  border-radius: 12px;
  background: var(--surface-quiet);
}
.order-n {
  font-weight: 800;
  color: var(--accent-text, var(--accent));
}
.order-name {
  font-weight: 600;
}
.order-btn {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
}
.order-btn[disabled] {
  opacity: 0.25;
  cursor: default;
}
/* Bigger ways around (Craig, 2026-10-19: "should the home button be bigger?"). "Home" at
   iPhone's own navigation size, 17 pt with a 24 pt mark, and the inner screens' back
   button as "‹ Back" in the same size, not a thin arrow alone. */
.homebtn {
  font-size: 18px;
  font-weight: 700;
  gap: 9px;
  padding: 0 18px 0 10px;
}
.homeico {
  width: 26px;
  height: 26px;
}
.iconbtn[data-back] {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  width: auto;
  min-width: 76px;
  padding: 0 10px 0 2px;
  font: 600 17px/1 var(--font-ui);
  color: var(--accent-text, var(--accent));
  justify-content: flex-start;
}
.iconbtn[data-back] .back-chev {
  font-size: 30px;
  line-height: 0.8;
  margin-top: -3px;
}
/* The title stays centred: the spacer opposite the back button matches its width. */
.topbar:has(> .iconbtn[data-back]) > span:last-child {
  min-width: 76px;
}
/* Today's parts still open, under the wheel (decision 0068): a dashed pill each, saying what
   it is worth. Dashed, like an empty slot, so it reads as room left, not a fault. */
.score-open {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 6px;
}
.score-waiting-today {
  margin: 2px 12px 6px;
  text-align: center;
  font-size: 13px;
  opacity: 0.8;
}
.score-open-chip {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px dashed currentColor;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
/* The week's own score and how it adds up, in Your week (decision 0068). */
.week-how {
  margin-top: 8px;
  text-align: left;
}
.week-how > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
}
.week-how .sx-rows {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.week-how .sx-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.week-how .sx-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}
.week-how .sx-name {
  font-weight: 700;
  flex-grow: 1;
}
.week-how .sx-pts {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.week-how .sx-sub {
  margin: 2px 0 0 18px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-muted);
}
/* A resting day, under the wheel (decision 0068): one line and its undo, or the three picks. */
.score-rest {
  text-align: center;
  margin: 2px 0 8px;
  font-size: 13px;
}
.score-rest p {
  margin: 0 0 6px;
  line-height: 1.4;
}
.score-rest-picks {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}
/* The bonus parts under the wheel (decision 0023): a small mark each, filled with the
   part's colour when its aim for the day is met. */
.score-bonus {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 4px;
}
.score-bonus .sb-cap {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-right: 4px;
}
.score-bonus .sb-mark {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--pc) 70%, transparent);
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.score-bonus .sb-mark svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.75;
}
.score-bonus .sb-mark.some {
  background: color-mix(in srgb, var(--pc) 30%, transparent);
}
.score-bonus .sb-mark.done {
  background: var(--pc);
  border-color: var(--pc);
  color: #1c1636;
}
.score-bonus .sb-mark.done svg {
  opacity: 1;
}
.score-bonus .sb-tick {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  color: #1c1636;
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}
#wins-home.sky .score-bonus {
  color: var(--sky-ink, #fff);
}
/* The welcome's "I work nights or shifts": a plain box beside its words, in the theme's accent. */
.welcome-shift {
  align-items: center;
  margin: 14px 0 0;
  min-height: 44px;
  cursor: pointer;
}
/* Issue 4: a shift worker has no usual wake time to give; their week of shifts says it instead. */
.welcome-shift:has(input:checked) + .welcome-wake {
  display: none;
}
.welcome-shift > input[type='checkbox'] {
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  flex: none;
  accent-color: var(--accent);
}
/* A backup's passphrase and "Delete everything" (js/safekeep.js). */
#bk-plain {
  width: 100%;
  margin: 0 0 10px;
}
.bk-msg:empty {
  display: none;
}
#del-all .rv-check {
  align-items: center;
  min-height: 44px;
  margin: 6px 0 14px;
}
#del-all .rv-check input {
  width: 22px;
  height: 22px;
  margin: 0;
  flex: none;
  accent-color: #b3261e;
}
#del-all-go,
#btn-delete-all {
  width: 100%;
  min-height: 48px;
  color: #b3261e;
  background: transparent;
  border: 1.5px solid rgba(179, 38, 30, 0.55);
  border-radius: 14px;
  font-weight: 600;
}
#del-all-go:not(:disabled) {
  background: #b3261e;
  color: #fff;
  border-color: #b3261e;
}
#del-all-go:disabled {
  opacity: 0.5;
}
:root[data-theme='dark'] #del-all-go,
:root[data-theme='dark'] #btn-delete-all {
  color: #ff8a80;
  border-color: rgba(255, 138, 128, 0.5);
}
:root[data-theme='dark'] #del-all-go:not(:disabled) {
  background: #c62828;
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) #del-all-go,
  :root:not([data-theme='light']) #btn-delete-all {
    color: #ff8a80;
    border-color: rgba(255, 138, 128, 0.5);
  }
  :root:not([data-theme='light']) #del-all-go:not(:disabled) {
    background: #c62828;
    color: #fff;
  }
}

/* The goal's reason, on the card (Panel 2, issue 6). */
.goal-why {
  display: block;
  margin-top: 10px;
  text-align: left;
}

/* Text size (Settings; Panel 2: Dorothy, Walter). The whole page scales, and zoom scales a vh too,
   so every height from the viewport divides by --tz to stay one screen tall. */
html[data-text-size='1.15'] {
  zoom: 1.15;
  --tz: 1.15;
}
html[data-text-size='1.3'] {
  zoom: 1.3;
  --tz: 1.3;
}
/* Up to double, what Apple's Larger Text label asks for (decision 0085). */
html[data-text-size='1.6'] {
  zoom: 1.6;
  --tz: 1.6;
}
html[data-text-size='2'] {
  zoom: 2;
  --tz: 2;
}
.wrap-seg {
  flex-wrap: wrap;
}
.wrap-seg button {
  min-height: 44px;
  flex: 1 1 30%;
}

/* Reduce motion (js/access.js). Breathing's circle keeps moving: it is the guide (decision
   0085). The selector named #screen-session, the old app's id, so it matched nothing and the
   circle snapped (expert round 4); the session is #still-session, and only the circle is kept,
   not its halo and ripples. */
html.reduce-motion *:not(.breath-circle),
html.reduce-motion *:not(.breath-circle)::before,
html.reduce-motion *:not(.breath-circle)::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* More contrast (js/access.js): the sky goes darker, glass goes solid, and quiet text is full strength. */
html.more-contrast {
  --ink-muted: var(--ink);
  --muted: var(--ink);
  --text-2: var(--ink);
  --edge: var(--edge-strong);
}
html.more-contrast:not(.mono-light) #wins-home.sky::before {
  background: linear-gradient(rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.42)), var(--sky-bg, none) !important;
}
html.more-contrast:not(.mono-light) #wins-home.sky .sky-glass,
html.more-contrast:not(.mono-light) #wins-home.sky .tile,
html.more-contrast:not(.mono-light) #wins-home.sky .rv-open,
html.more-contrast:not(.mono-light) #wins-home.sky .home-quick-b,
html.more-contrast:not(.mono-light) #wins-home.sky .simple-go {
  background-color: rgba(0, 0, 0, 0.45);
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
  text-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
html.more-contrast .muted,
html.more-contrast .hint,
html.more-contrast .tiny {
  color: inherit !important;
  opacity: 1 !important;
}

/* Tap targets that were too small to hit reliably (decision 0085). */
#ai-fold-hide,
#home-privacy,
.dom-food .goal-never,
.parthead .ph-arw,
#wins-home.sky .sky-go {
  min-height: 44px;
  min-width: 44px;
}
#home-privacy,
#ai-fold-hide,
.dom-food .goal-never {
  display: inline-flex;
  align-items: center;
}
/* ---------- The bug sweep (2026-11-02, tools/sweep.mjs) ---------- */
/* Money: the month box fits "Pick a month" and a month's name; the extra-payment
   choices keep their gaps when they wrap. */
.dom-money .mn-amt input[data-month] {
  width: 150px;
  text-align: left;
}
.dom-money .mn-seg {
  flex-wrap: wrap;
  gap: 2px;
}
/* Food: a long name in Recent wraps in its own column, clear of + and the star. */
.dom-food .recent-row .food-hit-main > span:first-child {
  white-space: normal;
  overflow-wrap: anywhere;
}
/* A sheet taller than a small phone scrolls inside, so its title and buttons stay on screen. */
.rv-sheet-card {
  max-height: calc(100dvh / var(--tz, 1) - 12px);
  overflow-y: auto;
}
/* Settings' page title takes focus for screen readers, with no ring drawn for everyone. */
#settings-overlay #set-title:focus {
  outline: none;
}
/* Stillness: a length never splits ("10" over "min") and sits apart from the name. */
.techlen {
  white-space: nowrap;
  margin-left: 8px;
}

/* Large text: at 1.6 and 2 the page is laid out as if the phone were 244 or 195 points
   wide, so words beside a control go above it, and rows of four figures go two by two. */
:is(html[data-text-size='1.6'], html[data-text-size='2']) .statrow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 8px;
}
:is(html[data-text-size='1.6'], html[data-text-size='2']) .row {
  flex-wrap: wrap;
}
:is(html[data-text-size='1.6'], html[data-text-size='2']) .row > .rleft {
  flex: 1 1 100%;
}
:is(html[data-text-size='1.6'], html[data-text-size='2']) #reminders-host .rem-row {
  flex-wrap: wrap;
}
:is(html[data-text-size='1.6'], html[data-text-size='2']) #reminders-host .rem-on {
  flex: 1 1 100%;
}
:is(html[data-text-size='1.6'], html[data-text-size='2']) .techrow {
  flex-wrap: wrap;
}
:is(html[data-text-size='1.6'], html[data-text-size='2']) .techrow .techtext {
  flex: 1 1 60%;
  min-width: 0;
}
:is(html[data-text-size='1.6'], html[data-text-size='2']) .techrow .techchev {
  display: none;
}
:is(html[data-text-size='1.6'], html[data-text-size='2']) .techrow .techlen {
  flex: 1 1 100%;
  margin-left: 0;
}
:is(html[data-text-size='1.6'], html[data-text-size='2']) .dom-unplug .up-url {
  flex-wrap: wrap;
}
:is(html[data-text-size='1.6'], html[data-text-size='2']) .segmented {
  flex-wrap: wrap;
}
:is(html[data-text-size='1.6'], html[data-text-size='2']) .segmented button {
  flex: 1 1 45%;
}
:is(html[data-text-size='1.6'], html[data-text-size='2']) #settings-overlay .set-val {
  display: none;
}
:is(html[data-text-size='1.6'], html[data-text-size='2']) .parthead .ph-chip {
  display: none;
}
:is(html[data-text-size='1.6'], html[data-text-size='2']) .dom-focus .task__pick {
  flex-wrap: wrap;
}
:is(html[data-text-size='1.6'], html[data-text-size='2']) .dom-focus .task__title {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}
:is(html[data-text-size='1.6'], html[data-text-size='2']) .partbar .pb-item span {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.1;
  text-align: center;
}
:is(html[data-text-size='1.6'], html[data-text-size='2']) .welcome-card-big .welcome-btns {
  position: static;
  margin-bottom: 0;
}
:is(html[data-text-size='1.6'], html[data-text-size='2']) .welcome-card-big .welcome-more,
:is(html[data-text-size='1.6'], html[data-text-size='2']) .welcome-card-big.has-more .welcome-btns::before {
  display: none !important;
}
html[data-text-size='1.3'] .home-quick {
  grid-auto-flow: row;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
/* Stillness's history: "10 min" stays on one line; the mood word is its own text, so it translates. */
.history-item > .muted {
  white-space: nowrap;
}
