:root {
  --bg: #ffffff;
  --ink: #141414;
  --soft: #6e6e6e;
  --muted: #b4b4b4;
  --line: #e4e4e4;
  --fill: #f3f3f2;
  --accent: #d0613a; /* terracotta */
  font-family: "Inter Tight", Inter, system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0e0e0e; --ink: #f2f2f2; --soft: #9a9a9a; --muted: #555; --line: #262626; --fill: #1a1a1a; --accent: #e57a52; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0e0e0e; --ink: #f2f2f2; --soft: #9a9a9a; --muted: #555; --line: #262626; --fill: #1a1a1a; --accent: #e57a52; color-scheme: dark; }
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

.app { max-width: 440px; margin: 0 auto; padding: 52px 24px 150px; }

/* Header: big weekday, quiet date */
.top { display: flex; justify-content: space-between; align-items: flex-end; }
.top h1 { font-size: 52px; font-weight: 700; letter-spacing: -.04em; line-height: .9; display: flex; align-items: center; gap: 8px; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); margin-top: 6px; }
.date { text-align: right; font-size: 18px; font-weight: 500; line-height: 1.15; color: var(--muted); letter-spacing: -.01em; }
.date { color: var(--soft); }
.date b { color: var(--muted); font-weight: 500; }

/* Week strip */
.week { display: grid; grid-template-columns: repeat(7, 1fr); margin: 28px -4px 0; }
.day { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px; border-radius: 14px; border: 1px solid transparent; position: relative; }
.day .n { font-size: 20px; font-weight: 500; color: var(--muted); }
.day .w { font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.day.today .w { color: var(--accent); }
.day.today .n { color: var(--ink); }
.day.sel { border-color: var(--line); box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.day.sel .n { color: var(--ink); }
.day.past { opacity: .55; }

/* Progress */
.progress { display: flex; align-items: center; gap: 14px; margin-top: 30px; }
.bar { flex: 1; height: 3px; background: var(--fill); border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s ease; }
.of { font-size: 13px; font-weight: 500; color: var(--soft); font-variant-numeric: tabular-nums; }

/* Assistant line */
.assist { margin-top: 18px; font-size: 14px; line-height: 1.45; color: var(--soft); padding-left: 20px; position: relative; min-height: 20px; }
.assist::before { content: "✳"; position: absolute; left: 0; top: 0; color: var(--accent); font-size: 13px; }
.assist button { color: var(--accent); font-weight: 600; margin-left: 6px; }
.assist button.no { color: var(--muted); font-weight: 500; }

/* Rows with dotted dividers */
.list { list-style: none; padding: 0; margin-top: 18px; border-top: 1.5px dotted var(--line); }
.list:empty { display: none; }
.item { display: flex; align-items: center; gap: 14px; padding: 17px 0; border-bottom: 1.5px dotted var(--line); animation: rise .25s ease; }
.check {
  flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--muted);
  display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.check:active { transform: scale(.9); }
.item.isdone .check { background: var(--accent); border-color: var(--accent); }
.item.isdone .check::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.title { flex: 1; min-width: 0; font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.item.isdone .title { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.time { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.time.soon { color: var(--accent); font-weight: 500; }

.empty { color: var(--muted); font-size: 15px; padding: 26px 0; text-align: center; }

.anytime { margin-top: 26px; }
.anytime .list { margin-top: 6px; }
.anytime .title { color: var(--soft); }
.toggle { font-size: 14px; color: var(--muted); font-weight: 500; }
.toggle[aria-expanded="true"] { color: var(--ink); }

/* Composer: soft pill, like a dock */
.composer { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 24px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 40%); }
.composer > * { max-width: 392px; margin-inline: auto; }
.field { display: flex; align-items: center; gap: 10px; background: var(--fill); border-radius: 999px; padding: 5px 5px 5px 18px; }
.plus { color: var(--soft); font-size: 20px; font-weight: 300; line-height: 1; }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); padding: 10px 0; }
.field input::placeholder { color: var(--muted); }
.send { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 600; transform: scale(0); transition: transform .18s ease; }
.field:focus-within .send { transform: scale(1); }
.preview { font-size: 13px; color: var(--soft); padding: 0 18px 8px; }
.preview b { color: var(--ink); font-weight: 500; }
.preview em { font-style: normal; color: var(--accent); margin-left: 8px; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: var(--bg); border-radius: 999px; padding: 9px 9px 9px 16px; display: flex; gap: 12px; align-items: center; font-size: 14px; white-space: nowrap; animation: toastIn .2s ease; }
.toast button { color: var(--accent); font-weight: 600; padding: 2px 8px; }

@keyframes rise { from { opacity: 0; transform: translateY(4px); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 6px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Rings: week strip and routines share one mark */
.ringsvg { display: block; transform: rotate(-90deg); }
.ringsvg circle { fill: none; stroke-width: 2.5; }
.ringsvg .track { stroke: var(--line); }
.ringsvg .fill { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .4s ease; }
.day .mark { height: 14px; display: grid; place-items: center; margin-top: 3px; }
.day .pip { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }

/* Routine row */
.routine { flex-direction: column; align-items: stretch; gap: 0; }
.rrow { display: flex; align-items: center; gap: 14px; }
.ring { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.routine.isdone .ring { background: var(--accent); }
.routine.isdone .ring::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.rhead { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; text-align: left; }
.rhead .title { flex: none; }
.rcount { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.routine.isdone .title { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }

.steps { list-style: none; padding: 12px 0 0 34px; display: grid; gap: 2px; animation: rise .2s ease; }
.step { display: flex; align-items: center; gap: 12px; font-size: 15px; padding: 7px 0; cursor: pointer; color: var(--ink); }
.sbox { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--muted); flex: none; display: grid; place-items: center; }
.step.ok { color: var(--muted); }
.step.ok .sbox { background: var(--ink); border-color: var(--ink); }
.step.ok .sbox::after { content: ""; width: 7px; height: 4px; border: 1.75px solid var(--bg); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.streak { padding: 8px 0 0 34px; font-size: 12.5px; color: var(--muted); }

/* Task row extras: one quiet line, only what's set */
.tbody { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; }
.tbody .title { flex: none; }
.extras { display: flex; gap: 10px; font-size: 12.5px; color: var(--muted); }
.extras .warn { color: var(--accent); font-weight: 500; }
.item.isdone .extras { display: none; }

/* Edit sheet */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.18); opacity: 0; transition: opacity .25s; z-index: 10; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 11; max-width: 480px; margin: 0 auto;
  background: var(--bg); border-radius: 24px 24px 0 0; padding: 10px 24px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(0,0,0,.08); transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  max-height: 88vh; overflow-y: auto;
}
.sheet-open .scrim { opacity: 1; }
.sheet-open .sheet { transform: none; }
.grab { width: 36px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 18px; }
.stitle { width: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); padding: 4px 0 14px; }

.props { border-top: 1.5px dotted var(--line); }
.prop {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 16px 0; border-bottom: 1.5px dotted var(--line); font-size: 15px; text-align: left; cursor: pointer;
}
.prop .k { flex: 1; color: var(--soft); }
.prop .val { font-weight: 500; color: var(--ink); }
.prop .add { color: var(--muted); }
.prop.set .add, .prop:not(.set) .val, .prop:not(.set) .clear { display: none; }
#rowDeadline.set .val { color: var(--accent); }
.prop input[type="date"], .prop input[type="datetime-local"] { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.prop input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.clear { position: relative; z-index: 2; width: 22px; height: 22px; border-radius: 50%; background: var(--fill); color: var(--soft); font-size: 14px; line-height: 1; }

.opts { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 14px; border-bottom: 1.5px dotted var(--line); }
.opts button { font-size: 13.5px; padding: 7px 13px; border-radius: 999px; background: var(--fill); color: var(--soft); }
.opts button.on { background: var(--ink); color: var(--bg); }

.subshead { cursor: default; border-bottom: 0; padding-bottom: 6px; }
.subs { list-style: none; padding: 0; }
.sub { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 15px; }
.sub span { flex: 1; }
.sub.ok span { color: var(--muted); text-decoration: line-through; }
.sub.ok .sbox { background: var(--ink); border-color: var(--ink); }
.sub.ok .sbox::after { content: ""; width: 7px; height: 4px; border: 1.75px solid var(--bg); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.sub .x { color: var(--muted); font-size: 18px; padding: 0 4px; }
.subin { width: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: 15px; color: var(--ink); padding: 10px 0 14px 28px; border-bottom: 1.5px dotted var(--line); }
.subin::placeholder { color: var(--muted); }

.shint { font-size: 13.5px; color: var(--soft); margin-top: 16px; padding-left: 20px; position: relative; }
.shint:empty { display: none; }
.shint::before { content: "✳"; position: absolute; left: 0; color: var(--accent); }
.sfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; }
.sdel { color: var(--muted); font-size: 14px; }
.sdone { background: var(--ink); color: var(--bg); font-weight: 600; font-size: 15px; padding: 11px 26px; border-radius: 999px; }

/* Upkeep */
.upkeep-link { margin-top: 14px; display: block; }
.upkeep-link span { color: var(--accent); }
.page {
  position: fixed; inset: 0; z-index: 9; background: var(--bg); overflow-y: auto;
  padding: 22px 24px 60px; transform: translateX(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.page > * { max-width: 392px; margin-inline: auto; }
.page-open .page { transform: none; }
.back { display: block; width: 100%; text-align: left; font-size: 15px; color: var(--soft); padding: 8px 0; }
.ptitle { font-size: 44px; font-weight: 700; letter-spacing: -.04em; margin-top: 18px; }
.psub { font-size: 14.5px; line-height: 1.45; color: var(--soft); margin-top: 8px; }
.garea { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 34px; }
.ulist { list-style: none; padding: 0; margin-top: 8px; border-top: 1.5px dotted var(--line); }
.urow { display: flex; width: 100%; align-items: baseline; gap: 12px; padding: 16px 0; border-bottom: 1.5px dotted var(--line); text-align: left; }
.urow .title { flex: 1; }
.when { font-size: 14px; color: var(--muted); }
.when.soon, .umeta .soon { color: var(--accent); font-weight: 500; }

#usheet { z-index: 12; }
.usheet-open .scrim { opacity: 1; }
.usheet-open #usheet { transform: none; }
.uarea { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.utitle { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin-top: 4px; }
.umeta { font-size: 14px; color: var(--soft); margin-top: 4px; }
.umeta b { font-weight: 500; color: var(--ink); }
.ulabel { font-size: 13px; font-weight: 500; color: var(--muted); margin: 24px 0 6px; }
.sub .num { flex: none; width: 16px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.uinfo { display: grid; gap: 8px; font-size: 14.5px; }
.uinfo div { display: flex; gap: 12px; }
.uinfo dt { width: 96px; flex: none; color: var(--soft); }
.uinfo dd { margin: 0; }
.uinfo .none, .uhist span { color: var(--muted); }
.uhist { font-size: 14.5px; line-height: 1.5; }
.ufinish { display: grid; gap: 4px; margin-top: 20px; border-top: 1.5px dotted var(--line); animation: rise .2s ease; }
.ufinish input { border: 0; outline: 0; background: none; font: inherit; font-size: 15px; color: var(--ink); padding: 12px 0; border-bottom: 1.5px dotted var(--line); }
.ufinish input::placeholder { color: var(--muted); }
#uPlan { color: var(--ink); font-weight: 500; font-size: 15px; }
#uPlan:disabled { color: var(--muted); cursor: default; }

/* People */
.upkeep-link + .upkeep-link { margin-top: 2px; }
.ppage-open .ppage { transform: none; }
#psheet { z-index: 12; }
.psheet-open .scrim { opacity: 1; }
.psheet-open #psheet { transform: none; }
.uhist span { color: var(--muted); }
.uhist b { font-weight: 500; }
.uhist .soon { color: var(--accent); }
.pcall { color: var(--ink) !important; font-weight: 500; font-size: 15px; }
.pcall:disabled { color: var(--muted) !important; cursor: default; }
.sub .dash { flex: none; width: 16px; color: var(--muted); }

.switch { display: flex; align-items: center; gap: 12px; font-size: 15px; margin-top: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.knob { width: 36px; height: 22px; border-radius: 22px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.15); transition: transform .2s; }
.switch input:checked + .knob { background: var(--accent); }
.switch input:checked + .knob::after { transform: translateX(14px); }
.switch input:focus-visible + .knob { outline: 2px solid var(--accent); outline-offset: 2px; }
#pIdeas { margin-top: 6px; }

/* Birthday row in the day */
.item.bday { gap: 14px; }
.star { flex: none; width: 20px; text-align: center; color: var(--accent); font-size: 17px; }
.pbody { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; }
.say { font-size: 13px; font-weight: 500; color: var(--accent); }

/* Notes */
.plus { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; transition: background .15s, color .15s; }
.plus.on { background: var(--accent); color: #fff; font-size: 14px; }
.npage-open .npage { transform: none; }
.inboxhead { display: flex; justify-content: space-between; align-items: baseline; }
.sortbtn { font-size: 14px; font-weight: 600; color: var(--accent); }
.allsorted { margin-top: 30px; font-size: 14.5px; color: var(--muted); }
.nlist { list-style: none; padding: 0; margin-top: 8px; border-top: 1.5px dotted var(--line); }
.note { padding: 14px 0; border-bottom: 1.5px dotted var(--line); }
.note p { font-size: 15.5px; line-height: 1.45; }
.note span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.sortcard { z-index: 12; }
.sort-open .scrim { opacity: 1; }
.sort-open .sortcard { transform: none; }
.cardtop { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); padding: 6px 0 22px; }
.cardtop button { color: var(--soft); font-weight: 500; }
.cardtext { font-size: 22px; line-height: 1.35; font-weight: 500; letter-spacing: -.015em; margin: 8px 0 28px; min-height: 60px; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acts button { padding: 14px 12px; border-radius: 14px; background: var(--fill); font-size: 14.5px; font-weight: 500; }
.acts button:first-child { background: var(--ink); color: var(--bg); }
.acts .drop { color: var(--soft); }

/* Generic page/sheet open states for newer spaces */
.page.open { transform: none; }
.sheet.open { transform: none; }
.has-sheet .scrim { opacity: 1; }
#msheet, #csheet, #rsheet { z-index: 12; }

/* More menu */
.menu { display: grid; border-top: 1.5px dotted var(--line); margin-top: 4px; }
.mrow { display: flex; gap: 6px; align-items: baseline; padding: 17px 0; border-bottom: 1.5px dotted var(--line); font-size: 17px; font-weight: 500; text-align: left; }
.mrow span { font-size: 14px; font-weight: 400; color: var(--muted); }
.mrow span:empty { display: none; }
#moreHint, #peopleSoon, #notesSoon, #upkeepSoon { color: var(--accent); }

/* Pills */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pill { margin-top: 18px; font-size: 14px; font-weight: 600; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); }
.pills .pill { margin-top: 0; }
.pill.ghost { background: var(--fill); color: var(--ink); font-weight: 500; }

/* Check-in scales: five steps, intensity shown by a filling dot */
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0 10px; border-radius: 14px; font-size: 12.5px; color: var(--soft); border: 1px solid transparent; }
.scale i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--muted); background: color-mix(in srgb, var(--accent) calc(var(--lvl) * 100%), transparent); }
.scale button.on { border-color: var(--line); color: var(--ink); font-weight: 500; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.scale button.on i { border-color: var(--accent); }
#cSave:disabled { opacity: .3; cursor: default; }

/* Mood page */
.crow { display: flex; gap: 14px; align-items: baseline; padding: 14px 0; border-bottom: 1.5px dotted var(--line); font-size: 15px; }
.ctime { color: var(--muted); font-variant-numeric: tabular-nums; width: 44px; }
.cdim { color: var(--soft); margin-left: auto; font-size: 14px; }
.chart { margin-top: 14px; display: grid; gap: 10px; }
.crow2 { display: grid; grid-template-columns: 56px repeat(14, 1fr); align-items: end; gap: 4px; height: 34px; }
.crow2.axis { height: auto; }
.crow2.axis i { font-style: normal; font-size: 10px; color: var(--muted); text-align: center; }
.clab { font-size: 12.5px; color: var(--soft); align-self: center; }
.mdot { width: 12px; height: 12px; border-radius: 50%; justify-self: center; align-self: center; background: color-mix(in srgb, var(--ink) calc(var(--lvl) * 100%), var(--fill)); }
.ebar { height: var(--h); min-height: 3px; border-radius: 3px; background: var(--accent); opacity: .85; width: 8px; justify-self: center; }
.tod { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px; border-top: 1.5px dotted var(--line); }
.tod div { padding: 14px 0; display: flex; flex-direction: column; gap: 2px; }
.tod b { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.tod span { font-size: 13px; color: var(--muted); }
.tod .low b { color: var(--accent); }

/* Meals */
.mlist { margin-top: 22px; }
.mday { width: 92px; flex: none; font-size: 14px; color: var(--muted); }
.mlist .title.unplanned { color: var(--muted); }
.wbreak { list-style: none; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 26px 0 8px; border-bottom: 1.5px dotted var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips button { font-size: 14.5px; padding: 10px 15px; border-radius: 999px; background: var(--fill); }
.chips button.on { background: var(--ink); color: var(--bg); }
.meal-mark { color: var(--muted); font-size: 15px; }
.mbody { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; }
.item.meal .title { color: var(--soft); }

/* Shopping */
.shopin { padding-left: 0; margin-top: 18px; }
.from { font-style: normal; font-size: 12px; color: var(--muted); }

/* ===== Polish pass ===== */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
button, .step, .urow { -webkit-tap-highlight-color: transparent; }
.top h1 { cursor: pointer; }

/* Dock: spaces button + input, always within reach */
.dock { display: flex; gap: 10px; align-items: center; }
.dock .field { flex: 1; min-width: 0; }
.spaces { position: relative; flex: none; width: 50px; height: 50px; border-radius: 50%; background: var(--fill); display: grid; grid-template-columns: 6px 6px; gap: 4px; place-content: center; }
.spaces i { width: 6px; height: 6px; border-radius: 2px; background: var(--ink); }
.spaces:active, .send:active, .pill:active, .sdone:active { transform: scale(.94); }
.badge { position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--fill); }

/* Timeline "now" line */
.nowline { list-style: none; position: relative; height: 0; border-top: 1.5px solid var(--accent); margin: -1px 0 0 34px; }
.nowline::before { content: ""; position: absolute; left: -6px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.nowline span { position: absolute; right: 0; top: -9px; background: var(--bg); padding-left: 8px; font-size: 11px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }

/* Bigger hit areas without bigger visuals */
.check, .ring { position: relative; }
.check::before, .ring::before { content: ""; position: absolute; inset: -12px; }

/* Progress: a soft glow when the day is complete */
.bar span.full, .bar .full { box-shadow: 0 0 10px var(--accent); }
.check:active, .ring:active { transform: scale(.85); }
.pop { animation: pop .3s ease; }
@keyframes pop { 50% { transform: scale(1.18); } }

/* Assistant line eases in when it changes */
.assist.swap { animation: rise .35s ease; }

/* Swipe */
.item { position: relative; touch-action: pan-y; }
.item > * { transform: translateX(var(--x, 0)); transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.item.drag > * { transition: none; }
.item.sw-r::after, .item.sw-l::after { position: absolute; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 600; opacity: .35; transition: opacity .15s; pointer-events: none; }
.item.sw-r::after { content: "Done"; left: 0; color: var(--accent); }
.item.sw-l::after { content: "Tomorrow"; right: 0; color: var(--soft); }
.item.armed::after { opacity: 1; }

/* Spaces menu: Settings sits apart, quieter */
.mrow.quiet { font-size: 15px; font-weight: 400; color: var(--soft); border-bottom: 0; }

/* Settings */
.srow { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1.5px dotted var(--line); cursor: default; }
.srow > div:first-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.srow b { font-size: 15.5px; font-weight: 500; }
.srow span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.srow .switch { margin: 0; }
.seg { flex: none; display: flex; background: var(--fill); border-radius: 999px; padding: 3px; }
.seg button { font-size: 13px; padding: 6px 11px; border-radius: 999px; color: var(--soft); }
.seg button.on { background: var(--bg); color: var(--ink); font-weight: 500; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.sdesc { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.sabout { margin-top: 40px; font-size: 12px; color: var(--muted); text-align: center; }

/* ===== Forms & editing ===== */
.shead { display: flex; justify-content: space-between; align-items: baseline; }
.editlink { font-size: 14px; font-weight: 500; color: var(--soft); padding: 4px 0 4px 12px; }
.redit { margin-left: 12px; font-size: 12.5px; color: var(--soft); text-decoration: underline; text-underline-offset: 3px; }
.page > .pill { margin-top: 18px; }
.urow small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; font-weight: 400; }
.fbody { margin-top: 18px; border-top: 1.5px dotted var(--line); }
.frow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1.5px dotted var(--line); }
.flab { font-size: 14.5px; color: var(--soft); flex: none; }
.frow input:not([type="checkbox"]) { flex: 1; min-width: 0; text-align: right; border: 0; outline: 0; background: none; font: inherit; font-size: 15.5px; font-weight: 500; color: var(--ink); padding: 4px 0; }
.frow input::placeholder { color: var(--muted); font-weight: 400; }
.frow .seg { flex-wrap: wrap; justify-content: flex-end; }
.fblock { padding: 13px 0 0; }
.fblock .subin { padding-left: 28px; }
.dchips { display: flex; gap: 5px; }
.dchips button { width: 30px; height: 30px; border-radius: 50%; font-size: 12.5px; font-weight: 500; background: var(--fill); color: var(--soft); }
.dchips button.on { background: var(--ink); color: var(--bg); }
.sub .pk { flex: none; width: 92px; color: var(--soft); }
.chips .newchip { background: none; border: 1.5px dashed var(--line); color: var(--soft); }

/* ===== Onboarding & spaces ===== */
.onboard { position: fixed; inset: 0; z-index: 30; background: var(--bg); overflow-y: auto; opacity: 0; transition: opacity .3s; }
.onboard.open { opacity: 1; }
.obinner { max-width: 440px; min-height: 100%; margin: 0 auto; padding: 56px 24px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.obdots { display: flex; gap: 6px; }
.obdots i { width: 18px; height: 3px; border-radius: 3px; background: var(--line); transition: background .2s, width .2s; }
.obdots i.on { background: var(--accent); width: 28px; }
.obbody { flex: 1; padding-top: 48px; animation: rise .35s ease; }
.obkick { font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.obtitle { font-size: 38px; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; margin-top: 12px; }
.obsub { font-size: 16px; line-height: 1.5; color: var(--soft); margin-top: 14px; }
.obfield { display: block; margin-top: 40px; }
.obfield span { font-size: 14px; color: var(--soft); }
.obfield input { display: block; width: 100%; border: 0; border-bottom: 1.5px solid var(--line); outline: 0; background: none; font: inherit; font-size: 24px; font-weight: 500; color: var(--ink); padding: 10px 0; margin-top: 6px; }
.obfield input:focus { border-color: var(--ink); }
.obfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; }
.obback { color: var(--soft); font-size: 15px; }
#obNext:disabled { opacity: .3; }
.spacegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 24px; }
.spacechip { text-align: left; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line); display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, background .15s; }
.spacechip b { font-size: 14.5px; font-weight: 600; }
.spacechip span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.spacechip.on { border-color: var(--ink); background: var(--fill); }
.obchoices { display: grid; gap: 10px; margin-top: 28px; }
.obchoice { text-align: left; padding: 18px; border-radius: 18px; border: 1.5px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.obchoice b { font-size: 16px; font-weight: 600; }
.obchoice span { font-size: 13.5px; color: var(--soft); }
.obchoice.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.sinput { border: 0; outline: 0; background: none; font: inherit; font-size: 15.5px; font-weight: 500; color: var(--ink); text-align: right; width: 140px; }
.sblock { padding: 16px 0; border-bottom: 1.5px dotted var(--line); display: flex; flex-direction: column; gap: 3px; }
.sblock b { font-size: 15.5px; font-weight: 500; }
.sblock > span { font-size: 12.5px; color: var(--muted); }
.sblock .spacegrid { margin-top: 12px; }
.spacechip { position: relative; }
.spacechip.on::after { content: ""; position: absolute; top: 14px; right: 14px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27%3E%3Cpath d=%27M4.5 8.2l2.2 2.2 4.8-4.8%27 fill=%27none%27 stroke=%27white%27 stroke-width=%271.8%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27/%3E%3C/svg%3E") center/16px no-repeat; }
.spacechip:not(.on) b { color: var(--soft); }

/* ===== Assistant thinking state ===== */
.composer.thinking .field { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); }
.dots { display: inline-flex; gap: 3px; margin-right: 6px; vertical-align: middle; }
.dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); animation: blink 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .2; } }
.ai-on .plus { color: var(--accent); }
.toast { max-width: calc(100vw - 32px); white-space: normal; }
.frow { flex-wrap: wrap; }
.frow .seg { flex: 0 1 auto; min-width: 0; margin-left: auto; }
.frow .seg button { padding: 6px 9px; }

/* ===== Sign in & splash ===== */
.splash { position: fixed; inset: 0; z-index: 40; display: grid; place-content: center; grid-auto-flow: column; align-items: center; gap: 8px; background: var(--bg); font-size: 34px; font-weight: 700; letter-spacing: -.04em; }
.splash .dot, .brand .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: middle; }
.splash span { animation: rise .5s ease; }
.brand { font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.auth .obbody { padding-top: 40px; }
.auth .obfield { margin-top: 22px; }
.auth .obfield input { font-size: 19px; }
.autherr { min-height: 20px; margin-top: 18px; font-size: 14px; color: var(--accent); }
.authfoot { display: grid; gap: 16px; justify-items: center; margin-top: 24px; }
.sdone.wide { width: 100%; padding: 15px; font-size: 16px; }
.sdone:disabled { opacity: .5; }
.authswitch { font-size: 14px; color: var(--soft); }
.authswitch button { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
#authNameRow[hidden] { display: none; }
.offline .badge { background: var(--muted); }

/* ===== Brand mark ===== */
.mark { display: inline-block; width: 1.6em; height: 1em; vertical-align: -0.05em; margin-right: .3em; color: var(--ink); }
.brand { display: flex; align-items: center; }
.splash { grid-auto-flow: row; justify-items: center; gap: 14px; }
.splash .mark { width: 72px; height: 45px; margin: 0; animation: rise .6s ease; }
.splash span { font-size: 30px; }
.brand .mark { width: 2em; height: 1.25em; vertical-align: -0.2em; }

/* ===== Icons ===== */
.ic { width: 13px; height: 13px; flex: none; vertical-align: -2px; margin-right: 3px; }
.extras span { display: inline-flex; align-items: center; }
.garea .ic { width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; }

/* ===== Spaces grid ===== */
#msheet .uarea { margin-top: 2px; }
.menu { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border: 0; margin-top: 12px; }
.mrow.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 104px; padding: 14px; border: 1.5px solid var(--line); border-radius: 18px; font-size: 15px; transition: border-color .15s, background .15s; }
.mrow.tile:active { background: var(--fill); }
.tile .tic { width: 24px; height: 24px; color: var(--ink); margin-bottom: auto; }
.tile b { font-weight: 600; margin-top: 12px; }
.tile span { display: block; font-size: 12.5px; line-height: 1.35; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tile span:empty { display: none; }
.tile[hidden] { display: none !important; }
.msettings { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 14px; padding: 14px 4px; border: 0; border-top: 1.5px dotted var(--line); font-size: 15px; color: var(--soft); }
.msettings b { font-weight: 500; }
.msettings .tic { width: 20px; height: 20px; }

/* ===== Carry-over, focus, ritual ===== */
.fstar { width: 14px; height: 14px; color: var(--accent); fill: var(--accent); margin-right: 6px; vertical-align: -1px; }
.planlist { list-style: none; padding: 0; margin-top: 16px; border-top: 1.5px dotted var(--line); }
.planrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 0; border-bottom: 1.5px dotted var(--line); text-align: left; font-size: 15.5px; }
.planrow .ic { width: 20px; height: 20px; color: var(--muted); margin: 0; }
.planrow span { flex: 1; }
.planrow em { font-style: normal; font-size: 13px; color: var(--muted); }
.planrow.on .ic { color: var(--accent); fill: var(--accent); }
.planrow.on span { font-weight: 600; }
.qtitle { font-size: 20px; margin-bottom: 16px; }
.qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qgrid button { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; background: var(--fill); font-size: 15px; font-weight: 500; }
.qgrid .ic { width: 20px; height: 20px; margin: 0; }
.qdelete { width: 100%; margin-top: 14px; padding: 12px; color: var(--accent); font-weight: 500; }
.item.lifting { position: relative; z-index: 5; background: var(--bg); box-shadow: 0 8px 24px rgba(0,0,0,.12); border-radius: 12px; transition: none; }

/* ===== Empty-state examples ===== */
.examples { text-align: left; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.examples p { margin-bottom: 4px; }
.examples button { font-size: 14px; padding: 9px 14px; border-radius: 999px; background: var(--fill); color: var(--ink); }

/* ===== Calendar events in the timeline ===== */
.item.event .evmark { color: var(--soft); display: grid; place-items: center; }
.item.event .evmark .ic { width: 16px; height: 16px; margin: 0; }
.item.event .title { color: var(--soft); font-weight: 400; }
.item.event.past { opacity: .5; }
.item.event .time { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.item.event .time small { font-size: 11.5px; color: var(--muted); }

/* ===== Search ===== */
.search { position: relative; display: block; margin: 2px 0 18px; }
.search input { width: 100%; border: 0; outline: 0; background: var(--fill); border-radius: 14px; padding: 13px 14px 13px 42px; font: inherit; font-size: 16px; color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.sic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; z-index: 1; }
#msheet .search { display: flex; align-items: center; }
#msheet.searching .menu, #msheet.searching .msettings, #msheet.searching > .uarea { display: none; }
#searchResults .garea { margin-top: 10px; }
#searchResults .urow .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ===== Settings bits ===== */
.sinput.left { text-align: left; flex: 1; min-width: 0; width: auto; }
.icsrow { display: flex; gap: 8px; align-items: center; margin: 10px 0 6px; }
.icsrow .sinput { background: var(--fill); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 400; }
#houseBox .srow { border-bottom: 0; padding: 10px 0 0; }
#houseBox .sinput { background: var(--fill); border-radius: 12px; padding: 10px 12px; letter-spacing: .12em; text-transform: uppercase; }
.code { font-family: ui-monospace, Menlo, monospace; letter-spacing: .12em; color: var(--accent); }
.psub.shared { margin-top: 4px; color: var(--accent); font-size: 13.5px; }
.psub.shared:empty { display: none; }

/* ===== Shopping & notes ===== */
.sname { cursor: pointer; }
.qty { font-weight: 600; margin-right: 6px; font-variant-numeric: tabular-nums; }
.note { cursor: pointer; }
.fblock textarea { width: 100%; margin-top: 8px; border: 0; outline: 0; background: var(--fill); border-radius: 12px; padding: 12px; font: inherit; font-size: 15.5px; line-height: 1.45; color: var(--ink); resize: vertical; }

/* ===== Auth recovery ===== */
.forgot { margin-top: 14px; font-size: 14px; color: var(--soft); text-decoration: underline; text-underline-offset: 3px; }
#authEmailRow[hidden], #authPassRow[hidden], .forgot[hidden] { display: none; }
.item { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
