/* List. — paper and ink. Every token is DESIGN.md §6; nothing under 16 px, anywhere. */

@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/Newsreader.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F6F1E8;
  --paper-2: #EDE6D9;
  --rule: #D9D0C1;
  --ink: #1B1A17;
  --ink-soft: #5C574E;
  --ink-blue: #27456B;
  --oxblood: #8A3B2E;
  --on-blue: #F6F1E8;
  --shadow: 0 10px 30px rgba(27, 26, 23, .16);

  --s: 1;                                   /* Settings → Reading → Text size: 1 / 1.15 / 1.3 */
  --serif: 'Newsreader', ui-serif, 'New York', Georgia, serif;
  --sans: -apple-system, system-ui, 'Helvetica Neue', sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --gutter: 24px;
  --t-now: clamp(40px, 11vw, 56px);
  --t-row: 24px;
  --t-item: 32px;
  --t-body: 20px;
  --t-small: 16px;
  --bar-h: 64px;
  --bottom-h: 64px;

  color-scheme: light;
}

/* Dark: the person's device, unless Settings says otherwise. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #171511; --paper-2: #201D18; --rule: #342F27; --ink: #EDE6D9;
    --ink-soft: #A79F91; --ink-blue: #8FB0D9; --oxblood: #D98A7A; --on-blue: #171511;
    --shadow: 0 10px 30px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #171511; --paper-2: #201D18; --rule: #342F27; --ink: #EDE6D9;
  --ink-soft: #A79F91; --ink-blue: #8FB0D9; --oxblood: #D98A7A; --on-blue: #171511;
  --shadow: 0 10px 30px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* iPad and Mac sizes (DESIGN.md §6 type table, right-hand column). */
@media (min-width: 700px) {
  :root { --gutter: 48px; --t-now: clamp(56px, 5.5vw, 84px); --t-row: 26px; --t-item: 40px; --t-small: 17px; }
}
@media (min-width: 1200px) and (pointer: fine) { :root { --gutter: 64px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--paper); }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: calc(var(--t-body) * var(--s));
  line-height: 1.45;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--ink-blue); }
:focus-visible { outline: 3px solid var(--ink-blue); outline-offset: 3px; border-radius: 6px; }

.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* The wordmark bar stays; everything else scrolls under it. */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: calc(var(--bar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  background: var(--paper);
}
.wordmark {
  font-family: var(--serif); font-weight: 600; font-size: calc(22px * var(--s));
  color: var(--ink); text-decoration: none; line-height: 1;
  display: inline-flex; align-items: center; min-height: 48px; min-width: 48px;
}
.wordmark .dot { color: var(--ink-blue); }

.main { flex: 1; padding: 0 var(--gutter); outline: none; }
.shell-note { font-size: calc(var(--t-row) * var(--s)); text-align: center; margin: 30vh 0 0; }

/* The status line: one quiet line at the bottom of every screen. Centred on a phone. */
.status-wrap {
  position: sticky; bottom: 0; z-index: 15;
  padding: 8px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--paper) 70%, transparent);
  pointer-events: none;
}
.status {
  margin: 0; min-height: 26px; text-align: center;
  font-family: var(--sans); font-size: calc(var(--t-small) * var(--s)); color: var(--ink-soft);
  transition: opacity 400ms var(--ease);
}
.status.idle { opacity: .55; }
.status button, .status a { pointer-events: auto; }
@media (min-width: 700px) { .status { text-align: left; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 120ms !important; animation-duration: 120ms !important; }
}

/* ---- bars ---- */
.bar-nav { display: flex; align-items: center; gap: 4px; }
.bar-link, .bar-icon {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; min-width: 48px; padding: 0 12px; border-radius: 10px;
  font-family: var(--serif); font-size: calc(20px * var(--s)); color: var(--ink-soft); text-decoration: none;
}
.bar-link[aria-current="page"], .bar-icon[aria-current="page"] { color: var(--ink); }
.bar-link:hover, .bar-icon:hover { color: var(--ink); }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* The phone's bottom bar: Now, List, +. Hidden on wide screens and on the Door. */
.bottom {
  position: sticky; bottom: 0; z-index: 16;
  display: none; justify-content: space-around; align-items: center;
  min-height: calc(var(--bottom-h) + env(safe-area-inset-bottom));
  padding: 0 var(--gutter) env(safe-area-inset-bottom);
  background: var(--paper); border-top: 1px solid var(--rule);
}
.bottom .bar-link { flex: 1; min-height: 56px; font-size: calc(20px * var(--s)); }
@media (max-width: 899px), (max-aspect-ratio: 1/1) {
  .bar-nav .bar-link { display: none; }
  .bottom { display: flex; }
  .bottom:empty { display: none; }
  .status-wrap { bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); }
  body.doorway .status-wrap { bottom: 0; }
}
body.doorway .bar { display: none; }

/* ---- the Door ---- */
.door { max-width: 440px; margin: 0 auto; padding: max(8vh, calc(24px + env(safe-area-inset-top))) 0 48px; display: flex; flex-direction: column; align-items: stretch; }
.door-mark { font-family: var(--serif); font-weight: 600; font-size: calc(56px * var(--s)); line-height: 1; text-align: center; margin: 0 0 40px; }
.door-mark .dot, .page-title .dot { color: var(--ink-blue); }
.door-title { font-weight: 500; font-size: calc(30px * var(--s)); line-height: 1.25; margin: 0 0 8px; text-align: center; }
.door-lead { text-align: center; margin: 0 0 24px; color: var(--ink); }
.door-form { display: flex; flex-direction: column; gap: 16px; }
.field, .set-input {
  width: 100%; min-height: 56px; padding: 10px 16px;
  font-family: var(--serif); font-size: calc(22px * var(--s));
  background: var(--paper-2); color: var(--ink); border: 1px solid var(--rule); border-radius: 12px;
  -webkit-appearance: none; appearance: none;
}
.field::placeholder, .set-input::placeholder { color: var(--ink-soft); opacity: 1; }
.field:focus, .set-input:focus { outline: 3px solid var(--ink-blue); outline-offset: 1px; border-color: transparent; }
.door-hint, .set-hint { margin: -8px 0 0 4px; font-family: var(--sans); font-size: calc(var(--t-small) * var(--s)); color: var(--ink-soft); min-height: 1.2em; }
.set-hint { margin: 0; }
.check { display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; font-size: calc(18px * var(--s)); }
.check input { width: 26px; height: 26px; margin: 0; accent-color: var(--ink-blue); flex: none; }
.primary {
  min-height: 56px; padding: 0 28px; border: 0; border-radius: 14px;
  background: var(--ink); color: var(--paper);
  font-family: var(--serif); font-size: calc(20px * var(--s)); font-weight: 500;
}
.primary:disabled { opacity: .6; }
.primary.small { min-height: 48px; padding: 0 22px; }
.door-error { margin: 0; min-height: 1.4em; text-align: center; font-family: var(--sans); font-size: calc(17px * var(--s)); color: var(--ink); }
.door-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; margin: 24px 0 0; }
.door-links a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 6px; font-size: calc(18px * var(--s)); }
.sep { color: var(--ink-soft); }

/* ---- pages: Settings, People, Archive ---- */
.page { max-width: 720px; margin: 0 auto; padding-bottom: 96px; }
.page-title { font-weight: 500; font-size: calc(var(--t-item) * var(--s)); line-height: 1.25; margin: 16px 0 24px; }
.group { padding: 8px 0 24px; border-top: 1px solid var(--rule); }
.group-title { font-family: var(--sans); font-weight: 600; font-size: calc(var(--t-small) * var(--s)); color: var(--ink-soft); letter-spacing: .02em; margin: 16px 0 12px; }
.set-row { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; }
.set-label { font-family: var(--sans); font-size: calc(var(--t-small) * var(--s)); color: var(--ink-soft); }
.set-text { margin: 0 0 8px; }
.soft { color: var(--ink-soft); }
.set-text.soft { font-family: var(--sans); font-size: calc(var(--t-small) * var(--s)); }
.set-form { display: flex; flex-direction: column; gap: 12px; }
.set-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.text-btn {
  min-height: 48px; padding: 0 4px; border: 0; background: none;
  font-family: var(--serif); font-size: calc(20px * var(--s)); color: var(--ink-blue);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.text-btn.danger { color: var(--oxblood); }
.confirm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.set-link { display: flex; align-items: center; justify-content: space-between; min-height: 56px; color: var(--ink); text-decoration: none; font-size: calc(20px * var(--s)); }
.set-link .icon { color: var(--ink-soft); }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 8px 0 0; border: 0; background: none; font-family: var(--serif); color: var(--ink-blue); text-decoration: none; font-size: calc(20px * var(--s)); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg-b {
  min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--rule);
  background: transparent; color: var(--ink); font-family: var(--serif); font-size: calc(19px * var(--s));
}
.seg-b[aria-checked="true"] { background: var(--ink-blue); color: var(--on-blue); border-color: var(--ink-blue); }
.person { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.person:last-child { border-bottom: 0; }
.person-name { margin: 0; font-size: calc(24px * var(--s)); }
.person .set-text { margin: 0; }
.code-panel { margin: 0 0 24px; padding: 20px 24px; border-radius: 16px; background: var(--paper-2); }
.code-big { margin: 4px 0; font-size: calc(48px * var(--s)); font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.status .status-act { min-height: 44px; min-width: 44px; padding: 0 8px; border: 0; background: none; font-family: var(--sans); font-size: inherit; color: var(--ink-blue); text-decoration: underline; text-underline-offset: 3px; }
.status.warn { color: var(--oxblood); }

/* ======================= M2: Now, the List, the item ======================= */

.main.single { padding-bottom: 32px; }
.listface { max-width: 720px; margin: 0 auto; padding-bottom: 80px; }

/* ---- two panes: the List on the left (40 %, min 380 px), Now or the item on the right ---- */
.main.panes { display: grid; grid-template-columns: minmax(380px, 40%) 1fr; gap: 0; padding: 0; align-items: start; }
.pane { min-width: 0; }
.pane-list { padding: 0 32px 0 var(--gutter); border-right: 1px solid var(--rule); min-height: calc(100dvh - var(--bar-h) - 60px); }
.pane-right { position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top)); padding: 0 var(--gutter) 0 48px; }
.pane-right.has-item { position: static; }
body.two .bar { border-bottom: 1px solid transparent; }

/* ---- Now ---- */
.now {
  position: relative; max-width: 880px; margin: 0 auto;
  min-height: calc(100dvh - var(--bar-h) - var(--bottom-h) - 72px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 24px 40px 32px; touch-action: pan-y;
}
body.two .now { min-height: calc(100dvh - var(--bar-h) - 72px); }
.now-stage { width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; transition: opacity 160ms var(--ease), transform 160ms var(--ease); }
.now-stage.leaving { opacity: 0; transform: translateY(-24px); }
.now-stage.arriving { animation: rise 200ms var(--ease); }
.now-stage.peeking { opacity: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.now-title {
  display: block; width: 100%; max-width: 20ch; margin: 0 auto; padding: 8px 0; border: 0; background: none;
  font-family: var(--serif); font-weight: 450; font-size: calc(var(--t-now) * var(--s)); line-height: 1.12;
  color: var(--ink); text-align: center; cursor: text; overflow-wrap: anywhere; text-wrap: balance;
}
.chips { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 12px; margin-top: 20px; }
.chip { font-family: var(--sans); font-size: calc(var(--t-small) * var(--s)); color: var(--ink-soft); }
.chip-sep { color: var(--ink-soft); font-family: var(--sans); font-size: calc(var(--t-small) * var(--s)); }
.chip-b { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 8px; border: 0; background: none; cursor: pointer; }
.chip-icon { width: 18px; height: 18px; }
.now-steps { list-style: none; margin: 8px 0 0; padding: 0; text-align: left; width: min(100%, 520px); }
.now-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 48px; width: 100%; }
.now-done { position: relative; overflow: hidden; width: min(100%, 360px); min-height: 64px; font-size: calc(22px * var(--s)); background: var(--paper-2); color: var(--ink); border: 1.5px solid var(--ink); }
.now-done .fill { position: absolute; inset: 0; background: var(--ink-blue); transform: scaleX(0); transform-origin: left center; transition: transform 240ms var(--ease); }
.now-done .label { position: relative; }
.now-done.filling { color: var(--on-blue); border-color: var(--ink-blue); transition: color 120ms 80ms; }
.now-done.filling .fill { transform: scaleX(1); }
.text-btn.quiet { color: var(--ink-soft); text-decoration: none; min-width: 120px; font-size: calc(20px * var(--s)); }
.text-btn.quiet:hover { color: var(--ink); }
.peek {
  position: absolute; right: -8px; top: 50%; transform: translateY(-50%);
  width: 48px; height: 96px; border: 0; background: none; color: var(--ink-soft); opacity: .7;
  display: flex; align-items: center; justify-content: center; touch-action: none; -webkit-user-select: none; user-select: none;
}
.peek:hover, .peek:focus-visible { opacity: 1; }
.peek-card {
  position: absolute; left: 40px; right: 40px; top: 50%; transform: translateY(-60%);
  font-family: var(--serif); font-size: calc(var(--t-item) * var(--s)); line-height: 1.25; text-align: center; color: var(--ink);
  pointer-events: none;
}
.now-empty { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.now-empty-text { margin: 0; font-size: calc(var(--t-item) * var(--s)); text-align: center; }

/* ---- the List ---- */
.list-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin: 12px 0 20px; }
.list-name { margin: 0; font-weight: 500; font-size: calc(var(--t-item) * var(--s)); line-height: 1.2; }
.list-date { margin: 0; font-size: calc(20px * var(--s)); color: var(--ink-soft); }
.add { position: relative; display: flex; align-items: center; margin: 0 0 12px; }
.add-input {
  width: 100%; min-height: 60px; padding: 12px 64px 12px 20px;
  font-family: var(--serif); font-size: calc(22px * var(--s)); color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: 14px; -webkit-appearance: none; appearance: none;
}
.add-input::placeholder { color: var(--ink-soft); opacity: 1; }
.add-input:focus { outline: 3px solid var(--ink-blue); outline-offset: 1px; border-color: transparent; }
.add-go {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border: 0; border-radius: 12px; background: var(--ink-blue); color: var(--on-blue);
  display: flex; align-items: center; justify-content: center;
}
.add-go[hidden] { display: none; }
.rows, .done-rows, .steps { list-style: none; margin: 0; padding: 0; }
.row {
  position: relative; display: flex; align-items: flex-start; gap: 0;
  padding: 18px 0; border-bottom: 1px solid transparent; outline: none; border-radius: 10px;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease), max-height 200ms var(--ease);
  background: var(--paper);
}
@media (min-width: 700px) { .row { padding: 22px 0; } }
.row:focus-visible { box-shadow: 0 0 0 3px var(--ink-blue); }
.row-body { flex: 1; min-width: 0; padding-right: 8px; }
.row-title {
  display: block; width: 100%; padding: 4px 0; margin: 0; border: 0; background: none; text-align: left;
  font-family: var(--serif); font-size: calc(var(--t-row) * var(--s)); line-height: 1.25; color: var(--ink); overflow-wrap: anywhere;
  min-height: 44px; cursor: pointer;
}
.row-title.static { cursor: default; min-height: 0; }
.row-meta { margin: 2px 0 0; font-family: var(--sans); font-size: calc(var(--t-small) * var(--s)); color: var(--ink-soft); white-space: pre-wrap; }
/* The circle's hit area is the whole left 64 px of the row. */
.circle {
  flex: none; width: 64px; min-height: 52px; margin: -4px 0; padding: 0 0 0 4px; border: 0; background: none;
  display: flex; align-items: flex-start; justify-content: flex-start; cursor: pointer;
}
.ring {
  display: block; width: 30px; height: 30px; margin-top: 11px; border-radius: 50%;
  border: 2px solid var(--rule); background: transparent; position: relative; overflow: hidden;
  transition: border-color 120ms;
}
.circle:hover .ring { border-color: var(--ink-soft); }
.ring::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; background: var(--ink-blue); transform: scale(0); transition: transform 240ms var(--ease); }
.circle.filled .ring, .row.dropping .ring { border-color: var(--ink-blue); }
.circle.filled .ring::after, .row.dropping .ring::after { transform: scale(1); }
.row.leaving { opacity: 0; transform: translateY(12px); }
.row.done .row-title { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--ink-soft); }
.grip { display: none; flex: none; width: 44px; min-height: 44px; align-items: center; justify-content: center; color: var(--ink-soft); cursor: grab; touch-action: none; }
.grip .icon { stroke-width: 3; }
@media (hover: hover) and (pointer: fine) {
  .rows .row:hover { border-bottom-color: var(--rule); }
  .rows .row:hover .grip, .steps .step:hover .grip { display: flex; }
}
.row.lifted, .step.lifted { z-index: 5; transform-origin: center; box-shadow: var(--shadow); background: var(--paper); scale: 1.02; transition: scale 120ms var(--ease), box-shadow 120ms; cursor: grabbing; }
.sorting .row:not(.lifted), .sorting .step:not(.lifted) { transition: transform 120ms var(--ease); }
.sorting { -webkit-user-select: none; user-select: none; }
.list-empty { margin: 48px 0; text-align: center; font-size: calc(var(--t-row) * var(--s)); }
.drawer { margin-top: 24px; border-top: 1px solid var(--rule); padding-top: 4px; }
.drawer-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; padding: 0; border: 0; background: none;
  font-family: var(--serif); font-size: calc(20px * var(--s)); color: var(--ink-soft);
}
.drawer-toggle:hover { color: var(--ink); }
.archive-link { display: inline-flex; align-items: center; min-height: 48px; margin: 4px 0 16px; color: var(--ink-blue); font-size: calc(18px * var(--s)); }

/* ---- the row's menu ---- */
.menu {
  position: fixed; z-index: 50; min-width: 220px; padding: 6px; border-radius: 14px;
  background: var(--paper-2); border: 1px solid var(--rule); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.menu-b { min-height: 52px; padding: 0 16px; border: 0; border-radius: 10px; background: none; text-align: left; font-family: var(--serif); font-size: calc(20px * var(--s)); color: var(--ink); }
.menu-b:hover, .menu-b:focus-visible { background: var(--paper); outline: none; }

/* ---- the add sheet over Now (phone +, Mac N) ---- */
.add-sheet { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; justify-content: flex-start; }
.add-sheet-scrim { position: absolute; inset: 0; background: rgba(23, 21, 17, .35); }
.add-sheet-card {
  position: relative; margin: calc(12px + env(safe-area-inset-top)) auto 0; width: min(720px, calc(100% - 2 * 16px));
  padding: 16px; border-radius: 18px; background: var(--paper); box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: flex-end; animation: drop 200ms var(--ease);
}
.add-sheet-card .add { width: 100%; margin: 0; }
@keyframes drop { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }

/* ---- the item ---- */
.item { max-width: 720px; margin: 0 auto; padding-bottom: 120px; }
.item.sheet {
  position: fixed; inset: 0; z-index: 30; max-width: none; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(8px + env(safe-area-inset-top)) var(--gutter) calc(120px + env(safe-area-inset-bottom));
  background: var(--paper); animation: sheet 240ms var(--ease);
}
.item.sheet > * { max-width: 720px; margin-left: auto; margin-right: auto; }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.item-top { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 12px; }
.item-done {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 4px 0 12px; border: 0; background: none;
  font-family: var(--serif); font-size: calc(20px * var(--s)); color: var(--ink);
}
.circle-mini { display: inline-block; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--rule); }
.circle-mini.filled { background: var(--ink-blue); border-color: var(--ink-blue); }
.item-title, .item-note {
  display: block; width: 100%; resize: none; overflow: hidden; border: 0; background: none; padding: 4px 0; margin: 0;
  font-family: var(--serif); color: var(--ink);
}
.item-title { font-size: calc(var(--t-item) * var(--s)); font-weight: 450; line-height: 1.25; min-height: 52px; }
.item.is-done .item-title { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--ink-soft); }
.item-note { margin-top: 12px; font-size: calc(var(--t-body) * var(--s)); line-height: 1.45; min-height: 48px; }
.item-note::placeholder { color: var(--ink-soft); opacity: 1; }
.item-title:focus, .item-note:focus { outline: none; box-shadow: 0 2px 0 var(--ink-blue); }
.steps-head { margin: 36px 0 4px; font-family: var(--sans); font-weight: 600; font-size: calc(var(--t-small) * var(--s)); color: var(--ink-soft); }
.step { display: flex; align-items: center; gap: 0; background: var(--paper); border-radius: 10px; }
.step .circle.small { width: 56px; min-height: 48px; margin: 0; align-items: center; }
.circle.small .ring { width: 26px; height: 26px; margin-top: 0; }
.step-input, .step-text {
  flex: 1; min-width: 0; min-height: 48px; padding: 6px 0; border: 0; background: none;
  font-family: var(--serif); font-size: calc(var(--t-body) * var(--s)); color: var(--ink);
}
.step-text { display: flex; align-items: center; }
.step-input:focus { outline: none; box-shadow: 0 2px 0 var(--ink-blue); }
.step.ticked .step-input, .step.ticked .step-text { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--ink-soft); }
.step.ticked .circle .ring { border-color: var(--ink-blue); }
.step.ticked .circle .ring::after { transform: scale(1); }
.step-add {
  width: 100%; min-height: 52px; margin: 4px 0 0; padding: 6px 0 6px 56px; border: 0; background: none;
  font-family: var(--serif); font-size: calc(var(--t-body) * var(--s)); color: var(--ink);
}
.step-add::placeholder { color: var(--ink-soft); opacity: 1; }
.step-add:focus { outline: none; box-shadow: 0 2px 0 var(--ink-blue); }
.item-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; gap: 16px; }

/* The phone hides the bottom bar while the item sheet is up. */
body[data-face="item"]:not(.two) .bottom { display: none; }
body[data-face="item"]:not(.two) .status-wrap { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; }

@media (prefers-reduced-motion: reduce) {
  .now-stage.arriving, .item.sheet, .add-sheet-card { animation: fade 120ms linear; }
  .now-stage.leaving { transform: none; }
  .row.leaving { transform: none; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}

/* Buttons that sit in the bars look like the links beside them. */
button.bar-link { border: 0; background: none; font: inherit; color: var(--ink-soft); }
@media (max-width: 699px) {
  .now { padding: 16px 8px 24px; }
  .peek { right: -20px; }
}
.chips { flex-wrap: nowrap; white-space: nowrap; max-width: 100%; }

/* ======================= M4: when, the picker, reminders ======================= */
.add-wrap { margin: 0 0 12px; }
.add-wrap .add { margin: 0; }
.add.has-mic .add-input { padding-right: 116px; }
.add-mic {
  position: absolute; right: 58px; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border: 0; border-radius: 12px; background: none; color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
}
.add-mic[aria-pressed="true"] { color: var(--ink-blue); background: var(--paper); }
.add-go[hidden] ~ .add-mic, .add.has-mic:has(.add-go[hidden]) .add-mic { right: 6px; }
.add-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 4px 0; }
.add-preview[hidden] { display: none; }
.preview-title { font-family: var(--serif); font-size: calc(20px * var(--s)); color: var(--ink); }
.chip-pill { display: inline-flex; align-items: center; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper-2); }
.chip-b.pill { min-height: 44px; padding: 0 6px 0 14px; gap: 8px; font-family: var(--sans); font-size: calc(var(--t-small) * var(--s)); color: var(--ink); }
.pill-x { width: 44px; height: 44px; border: 0; background: none; color: var(--ink-soft); display: flex; align-items: center; justify-content: center; border-radius: 999px; }
.pill-x .icon { width: 18px; height: 18px; }

.props { margin: 28px 0 0; border-top: 1px solid var(--rule); }
.prop { display: flex; align-items: center; border-bottom: 1px solid var(--rule); }
.prop-b {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; min-height: 60px; padding: 8px 0; border: 0; background: none; text-align: left;
}
.prop-label { flex: none; width: 92px; font-family: var(--sans); font-size: calc(var(--t-small) * var(--s)); color: var(--ink-soft); }
.prop-value { flex: 1; min-width: 0; font-family: var(--serif); font-size: calc(var(--t-body) * var(--s)); color: var(--ink); }
.prop-value.soft { color: var(--ink-soft); }
.prop-chev { color: var(--ink-soft); }
.prop-x { width: 48px; height: 48px; border: 0; background: none; color: var(--ink-soft); display: flex; align-items: center; justify-content: center; }

.picker { position: fixed; inset: 0; z-index: 45; display: flex; align-items: center; justify-content: center; }
.picker-card {
  position: relative; width: min(440px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto;
  padding: 16px; border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); animation: drop 200ms var(--ease);
  display: flex; flex-direction: column; gap: 12px;
}
@media (max-width: 699px) { .picker { align-items: flex-end; } .picker-card { width: 100%; border-radius: 20px 20px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); } }
.picker-words { min-height: 52px; font-size: calc(20px * var(--s)); }
.picker-heard { margin: -4px 4px 0; min-height: 1.3em; font-family: var(--sans); font-size: calc(var(--t-small) * var(--s)); color: var(--ink-soft); }
.month-head { display: flex; align-items: center; justify-content: space-between; }
.month-name { margin: 0; font-size: calc(20px * var(--s)); }
.icon-btn { width: 48px; height: 48px; border: 0; border-radius: 12px; background: none; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.grid { display: grid; grid-template-columns: repeat(7, minmax(44px, 1fr)); gap: 2px; }
.dow { text-align: center; font-family: var(--sans); font-size: calc(16px * var(--s)); color: var(--ink-soft); padding: 4px 0; }
.day {
  min-height: 46px; border: 0; border-radius: 999px; background: none; color: var(--ink);
  font-family: var(--serif); font-size: calc(19px * var(--s)); font-variant-numeric: tabular-nums;
}
.day.today { box-shadow: inset 0 0 0 1.5px var(--ink-soft); }
.day.chosen { background: var(--ink-blue); color: var(--on-blue); box-shadow: none; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick .seg-b { flex: 1 1 auto; }
.time-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.time-row { display: flex; align-items: center; gap: 6px; transition: opacity 120ms; }
.time-row.off { opacity: .45; }
.col {
  min-height: 52px; min-width: 72px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 12px;
  background: var(--paper-2); color: var(--ink); font-family: var(--serif); font-size: calc(22px * var(--s)); text-align: center;
}
.colon { font-size: calc(22px * var(--s)); }
.switch { gap: 10px; }
.picker-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.picker-actions .primary { min-width: 140px; }

/* ======================= M5: notifications ======================= */
.set-row.inline { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.set-input.time { width: auto; min-width: 150px; }
.switch-b { display: inline-flex; align-items: center; gap: 14px; min-height: 52px; padding: 0; border: 0; background: none; font-family: var(--serif); font-size: calc(20px * var(--s)); color: var(--ink); }
.switch-track { position: relative; width: 56px; height: 32px; border-radius: 999px; background: var(--rule); transition: background 180ms var(--ease); flex: none; }
.switch-dot { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform 180ms var(--ease); }
.switch-b[aria-checked="true"] .switch-track { background: var(--ink-blue); }
.switch-b[aria-checked="true"] .switch-dot { transform: translateX(24px); }
.walk { padding: 16px 20px; border-radius: 16px; background: var(--paper-2); margin-bottom: 16px; }
.walk-steps { margin: 8px 0 0; padding-left: 24px; }
.walk-steps li { margin: 6px 0; }
.devices { list-style: none; margin: 8px 0 16px; padding: 0; }
.device { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.device .set-text { margin: 6px 0 0; }

/* ======================= M7: settings, people ======================= */
select.set-input { -webkit-appearance: menulist; appearance: auto; }
.errors summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-family: var(--sans); font-size: calc(var(--t-small) * var(--s)); color: var(--ink); }
.log { white-space: pre-wrap; overflow-wrap: anywhere; font-size: calc(16px * var(--s)); background: var(--paper-2); padding: 12px; border-radius: 10px; }
