/* DOOF Stories: one house with DOOF. Tokens copied from getdoof.app (src/styles.css) so both apps match.
   Layout: one phone-width column; the story player is a full-screen colour field above it. */
:root {
  --bg: #FFF9F3; --surface: #FFFFFF; --ink: #282920; --muted: #716A60; --brand: #BE452F; --brand-bright: #E55D3F;
  --line: #E8DFD3; --soft: #F5EBDD; --green: #365C46; --sage: #EAF0E5; --focus: #3069A6; --shadow: rgba(40, 41, 32, .12); --on-brand: #FFF9F3;
  --radius: 22px;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #1D1F19; --surface: #272A22; --ink: #FFF6E9; --muted: #C4BDAD; --brand: #FFA48B; --brand-bright: #F38866; --line: #494B3F; --soft: #39342A; --green: #B6D5B4; --sage: #2D392D; --focus: #95BFFD; --shadow: rgba(0, 0, 0, .4); --on-brand: #1D1F19; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #1D1F19; --surface: #272A22; --ink: #FFF6E9; --muted: #C4BDAD; --brand: #FFA48B; --brand-bright: #F38866; --line: #494B3F; --soft: #39342A; --green: #B6D5B4; --sage: #2D392D; --focus: #95BFFD; --shadow: rgba(0, 0, 0, .4); --on-brand: #1D1F19; color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 10px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; }

.app { max-width: 440px; margin: 0 auto; padding-block: 12px 120px; min-height: 100%; }
.dot { color: var(--brand-bright); }
.wm { font-weight: 800; font-size: 24px; letter-spacing: -1px; }
.eyebrow { font-size: 10px; font-weight: 750; letter-spacing: 1.7px; text-transform: uppercase; color: var(--brand); }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -1px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

.preview-bar { display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--muted); padding: 6px 0 2px; }
.preview-bar b { color: var(--brand); font-weight: 750; letter-spacing: 1px; font-size: 10px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 14px; }
.lock { display: flex; align-items: baseline; gap: 8px; }
.lock .sub { font-size: 10px; font-weight: 750; letter-spacing: 2px; color: var(--brand); }
.seg { display: inline-flex; background: var(--soft); border-radius: 100px; padding: 3px; gap: 2px; }
.seg button { padding: 6px 11px; border-radius: 100px; font-size: 12px; font-weight: 700; color: var(--muted); min-height: 32px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px var(--shadow); }

.hello { padding: 6px 0 18px; display: grid; gap: 6px; }
.hello h1 { font: 400 clamp(36px, 10vw, 46px)/1.02 var(--serif); letter-spacing: -1.5px; }
.hello p { color: var(--muted); }

/* story tiles */
.tile { position: relative; overflow: hidden; border-radius: 26px; padding: 20px 20px 18px; display: grid; gap: 10px; text-align: left; width: 100%; color: #FFF9F3; min-height: 210px; isolation: isolate; }
.tile.week { background: #191917; }
.tile.month { background: #365C46; min-height: 150px; }
.tile .art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.tile .art i { position: absolute; border-radius: 50%; filter: blur(.5px); opacity: .9; animation: drift 9s ease-in-out infinite alternate; }
.tile h2 { font: 400 40px/1 var(--serif); letter-spacing: -1.5px; }
.tile .meta { font-size: 12.5px; opacity: .85; }
.tile .eb { font-size: 10px; font-weight: 750; letter-spacing: 1.7px; opacity: .8; }
.tile .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; }
.tile .play { width: 54px; height: 54px; border-radius: 50%; background: #FFF9F3; color: #282920; display: grid; place-items: center; flex: 0 0 auto; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.tile.month .play { background: #FFF9F3; }
.tile .play svg { width: 20px; height: 20px; margin-left: 3px; }
.strip { display: flex; gap: 4px; }
.strip span { height: 5px; flex: 1; border-radius: 3px; }
.tile.fresh .play { animation: pulse 2.4s ease-in-out infinite; }
.stack { display: grid; gap: 12px; }

.sofar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; }
.sofar b { font-size: 15px; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--brand); color: var(--on-brand); border-radius: 100px; padding: 11px 16px; font-weight: 750; font-size: 13.5px; min-height: 44px; }
.pill.ghost { background: var(--soft); color: var(--ink); }
.pill svg { width: 16px; height: 16px; }

.shelf-h { display: flex; justify-content: space-between; align-items: baseline; padding: 26px 0 10px; }
.shelf-h h3 { font: 400 22px var(--serif); letter-spacing: -.5px; }
.shelf { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; margin-inline: -4px; padding-inline: 4px; }
.mini { flex: 0 0 136px; aspect-ratio: 3 / 4; border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 8px; text-align: left; scroll-snap-align: start; color: #FFF9F3; background: #191917; position: relative; overflow: hidden; max-width: 100%; }
.mini.month { background: #365C46; }
.tile.week .strip { max-width: 56%; }
.mini .ml { font: 750 15px/1.15 var(--sans); letter-spacing: -.2px; flex: 1; }
.mini .strip span { height: 4px; }
.fanstack { position: absolute; right: 18px; top: 22px; width: 96px; height: 132px; pointer-events: none; z-index: -1; }
.fanstack i { position: absolute; inset: 0; border-radius: 14px; transform-origin: 50% 115%; box-shadow: 0 6px 18px rgba(0,0,0,.25); animation: fanin .8s cubic-bezier(.2,.8,.2,1) both; }
.fanstack.month { width: 70px; height: 96px; right: 22px; top: 18px; }
.tile .meta, .tile h2, .tile .eb { position: relative; }
.mini .eb { font-size: 9px; font-weight: 750; letter-spacing: 1.4px; opacity: .85; }
.mini b { font: 400 21px/1.05 var(--serif); letter-spacing: -.5px; }
.mini small { font-size: 11px; opacity: .85; }
.foot-note { text-align: center; color: var(--muted); font-size: 12px; padding: 28px 0 0; }

/* tab bar */
.tabs { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(100%, 472px); z-index: 20; padding: 8px max(16px, env(safe-area-inset-left, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.tabs nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 100px; padding: 6px; box-shadow: 0 10px 30px var(--shadow); }
.tabs button { display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted); padding: 6px 0; min-height: 48px; border-radius: 100px; }
.tabs button[aria-current="page"] { color: var(--ink); }
.tabs button svg { width: 22px; height: 22px; }
.tabs .add { width: 58px; height: 58px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; margin: -22px 10px 0; box-shadow: 0 10px 24px rgba(190, 69, 47, .35); }
.tabs .add svg { width: 26px; height: 26px; }

/* sheets and toasts */
.scrim { position: fixed; inset: 0; background: rgba(25, 25, 23, .45); z-index: 60; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease; }
.sheet { width: min(100%, 472px); max-height: 88%; overflow: auto; background: var(--bg); border-radius: 26px 26px 0 0; padding: 22px max(20px, env(safe-area-inset-left, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)); animation: up .28s cubic-bezier(.2, .8, .2, 1); display: grid; gap: 14px; }
.sheet h2 { font: 400 32px/1.05 var(--serif); letter-spacing: -1px; }
.sheet .close { justify-self: end; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 22px; line-height: 1; margin-bottom: -48px; position: relative; z-index: 2; }
.sheet details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.sheet summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.sheet summary::after { content: "+"; color: var(--brand); font-weight: 700; }
.sheet details[open] summary::after { content: "–"; }
.sheet details p { color: var(--muted); padding-top: 8px; font-size: 14px; }
.info { background: var(--soft); border-radius: 18px; padding: 14px 16px; font-size: 14px; }
.copyrow { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px 6px 6px 14px; }
.copyrow code { font: 13px var(--mono); flex: 1; min-width: 0; overflow-wrap: anywhere; user-select: all; }
.copyrow button { background: var(--soft); border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 12.5px; }
.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 90; background: #282920; color: #FFF9F3; padding: 12px 16px; border-radius: 16px; font-size: 13.5px; width: max-content; max-width: min(92vw, 420px); box-shadow: 0 12px 30px rgba(0,0,0,.25); animation: up .25s ease; }

/* add + receipts */
.page-h { padding: 6px 0 16px; display: grid; gap: 6px; }
.page-h h1 { font: 400 40px/1.02 var(--serif); letter-spacing: -1.5px; }
.bigadd { display: grid; place-items: center; gap: 12px; background: var(--brand); color: var(--on-brand); border-radius: 28px; padding: 34px 20px; width: 100%; position: relative; overflow: hidden; }
.bigadd .ring { width: 92px; height: 92px; border-radius: 50%; border: 3px solid rgba(255, 249, 243, .5); display: grid; place-items: center; animation: pulse 2.6s ease-in-out infinite; }
.bigadd .ring svg { width: 40px; height: 40px; }
.bigadd b { font-size: 18px; }
.addrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.addrow label, .addrow button { display: grid; gap: 4px; justify-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; font-weight: 700; cursor: pointer; text-align: left; }
.addrow small { font-weight: 400; color: var(--muted); font-size: 12px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.list { display: grid; gap: 8px; margin-top: 8px; }
.rrow { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; text-align: left; width: 100%; }
.rrow .ic { width: 38px; height: 38px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--brand); }
.rrow b { display: block; font-size: 14px; }
.rrow span { font-size: 12px; color: var(--muted); }
.rrow .amt { font-weight: 750; font-variant-numeric: tabular-nums; }
.chip { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 100px; padding: 2px 8px; background: var(--sage); color: var(--green); }
.chip.warn { background: #FBE7C6; color: #7E5313; }
.scan { position: relative; border-radius: 20px; overflow: hidden; background: var(--soft); min-height: 180px; display: grid; place-items: center; }
.scan img { max-width: 100%; max-height: 260px; display: block; }
.scan::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; background: var(--brand-bright); box-shadow: 0 0 18px var(--brand-bright); animation: scanline 1.6s ease-in-out infinite; }
.readout { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: grid; gap: 10px; }
.readout .lines { font: 12.5px/1.6 var(--mono); display: grid; gap: 2px; }
.readout .lines div { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; }
.bd { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.trivia { background: #191917; color: #FFF9F3; border-radius: 18px; padding: 14px 16px; font-size: 14px; }
.trivia b { color: #E9B42E; }

/* house */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px; display: grid; gap: 12px; }
.member { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-weight: 800; }
.role { font-size: 11px; font-weight: 750; border-radius: 100px; padding: 3px 9px; background: var(--sage); color: var(--green); }
.role.helper { background: #FBE7C6; color: #7E5313; }
.links { display: grid; }
.links button { display: flex; justify-content: space-between; align-items: center; padding: 15px 2px; border-bottom: 1px solid var(--line); font-size: 14.5px; text-align: left; min-height: 52px; }
.links button span { color: var(--brand); }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); }
.field input { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px 14px; min-height: 48px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border: 1px solid var(--line); background: var(--surface); border-radius: 100px; padding: 9px 14px; font-weight: 650; font-size: 13.5px; min-height: 42px; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.who { width: 100%; border-collapse: collapse; font-size: 13px; }
.who th, .who td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.who td:not(:first-child), .who th:not(:first-child) { text-align: center; }
.yes { color: var(--green); font-weight: 750; }
.never { color: var(--muted); }

/* onboarding */
.welcome { min-height: 100%; display: grid; gap: 22px; padding-block: 10px 40px; }
.welcome .hero { position: relative; overflow: hidden; border-radius: 30px; background: #191917; color: #FFF9F3; padding: 26px 22px 24px; min-height: 420px; display: flex; flex-direction: column; gap: 14px; isolation: isolate; }
.welcome .hero h1 { font: 400 clamp(42px, 12vw, 56px)/1 var(--serif); letter-spacing: -2px; }
.welcome .hero p { color: #E8DFD3; max-width: 30ch; }
.fan { position: relative; height: 170px; margin-top: auto; }
.fan i { position: absolute; bottom: 0; width: 92px; height: 140px; border-radius: 16px; left: 50%; transform-origin: 50% 120%; box-shadow: 0 10px 30px rgba(0,0,0,.35); animation: fanin .9s cubic-bezier(.2, .8, .2, 1) both; display: flex; align-items: flex-start; padding: 10px; font: 800 18px/1 var(--sans); }
.cta { display: grid; gap: 10px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 100px; padding: 15px 24px; font-weight: 750; font-size: 15px; min-height: 54px; width: 100%; }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.secondary { background: var(--surface); border: 1px solid var(--line); }
.btn.link { color: var(--muted); font-weight: 600; min-height: 44px; }
.step { display: grid; gap: 18px; padding-block: 24px 40px; }
.step h1 { font: 400 40px/1.05 var(--serif); letter-spacing: -1.4px; }
.progress { display: flex; gap: 6px; }
.progress span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.progress span.on { background: var(--brand); }
.sample { background: var(--soft); border-radius: 16px; padding: 12px 14px; font-size: 13.5px; color: var(--muted); }

/* helper */
.helper-banner { background: #FBE7C6; color: #7E5313; border-radius: 14px; padding: 10px 14px; font-size: 12.5px; font-weight: 650; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.helper-banner button { font-weight: 800; text-decoration: underline; }
.note { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; background: #FFF4D6; color: #282920; border-radius: 18px; padding: 14px; }
.note .tick { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #7E5313; display: grid; place-items: center; }
.note.done { opacity: .55; }
.note.done .tick { background: #365C46; border-color: #365C46; color: #FFF9F3; }

@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(var(--x, 30px), var(--y, -20px)) scale(1.08); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@keyframes scanline { 0% { top: 4%; } 50% { top: 92%; } 100% { top: 4%; } }
@keyframes fanin { from { opacity: 0; translate: 0 30px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Story player: full-screen colour fields. Card colours are fixed per meaning (PRD 4.3) in both themes. */
.player { position: fixed; inset: 0; z-index: 50; background: #0E0F0C; display: flex; justify-content: center; animation: fade .2s ease; }
.stage { position: relative; width: min(100%, 520px); height: 100%; overflow: hidden; }
.card-v { position: absolute; inset: 0; display: flex; flex-direction: column; padding: calc(64px + env(safe-area-inset-top, 0px)) max(22px, env(safe-area-inset-right, 0px)) calc(26px + env(safe-area-inset-bottom, 0px)) max(22px, env(safe-area-inset-left, 0px)); gap: 14px; isolation: isolate; overflow: hidden; }
.card-v .art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.card-v .art i { position: absolute; border-radius: 50%; animation: drift 7s ease-in-out infinite alternate; }
.card-v .art .ring { border: 1.5px solid rgba(255, 249, 243, .14); background: none !important; }
.p-top { position: absolute; top: 0; left: 0; right: 0; z-index: 9; padding: calc(10px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 0 max(14px, env(safe-area-inset-left, 0px)); display: grid; gap: 10px; }
.bars { display: flex; gap: 4px; }
.bars span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .28); overflow: hidden; }
.bars span i { display: block; height: 100%; width: 0; background: #FFF; }
.bars span.done i { width: 100%; }
.p-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.p-row .t { font-size: 11px; font-weight: 750; letter-spacing: 1.6px; text-transform: uppercase; opacity: .85; }
.p-row .btns { display: flex; gap: 8px; }
.p-row .btns button { width: 38px; height: 38px; border-radius: 50%; background: rgba(0, 0, 0, .18); color: inherit; display: grid; place-items: center; }
.p-row .btns svg { width: 18px; height: 18px; }

.c-eb { font-size: 11px; font-weight: 750; letter-spacing: 1.8px; text-transform: uppercase; opacity: .82; }
.c-hero { font: 800 clamp(76px, 25vw, 120px)/.92 var(--sans); letter-spacing: -4px; font-variant-numeric: tabular-nums; }
.c-hero.mid { font-size: clamp(60px, 19vw, 96px); }
.c-hero small { font-size: .38em; letter-spacing: -1px; opacity: .75; font-weight: 700; }
.c-h { font: 750 clamp(34px, 10vw, 46px)/1.02 var(--sans); letter-spacing: -1.4px; text-wrap: balance; }
.c-h.serif { font: 400 clamp(52px, 16vw, 76px)/.98 var(--serif); letter-spacing: -2.5px; }
.c-h.cont { font-size: clamp(30px, 9vw, 40px); }
.c-b { font-size: 17px; line-height: 1.45; max-width: 34ch; opacity: .95; }
.c-b b { font-weight: 750; }
.c-foot { font-size: 18px; font-weight: 650; }
.c-note { font-size: 12.5px; opacity: .75; max-width: 36ch; }
.push { margin-top: auto; }
.c-acts { display: grid; gap: 10px; position: relative; z-index: 6; }
.c-acts button { min-height: 52px; border-radius: 100px; font-weight: 750; font-size: 15px; padding: 12px 18px; border: 1.5px solid currentColor; background: transparent; color: inherit; }
.c-acts button.p { background: #FFF9F3; color: #282920; border-color: #FFF9F3; }
.card-v.dark-text .c-acts button.p { background: #282920; color: #FFF9F3; border-color: #282920; }
.c-acts button.done { opacity: .6; }
.info-btn { position: absolute; z-index: 6; right: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); font-size: 12px; font-weight: 750; padding: 8px 12px; border-radius: 100px; background: rgba(0, 0, 0, .18); color: inherit; }
.card-v.has-acts .info-btn { position: static; justify-self: start; align-self: flex-start; }
.card-v:not(.has-acts) { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }

/* reveal animation */
.r { opacity: 0; transform: translateY(14px); animation: rin .6s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: var(--d, 0s); }
@keyframes rin { to { opacity: 1; transform: none; } }

/* visuals */
.receipt { background: #FFFDF8; color: #282920; font: 12.5px/1.6 var(--mono); padding: 14px 14px 18px; border-radius: 4px; display: grid; gap: 2px; position: relative; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; background: linear-gradient(-45deg, transparent 6px, #FFFDF8 0) 0 0 / 12px 8px repeat-x, linear-gradient(45deg, transparent 6px, #FFFDF8 0) 0 0 / 12px 8px repeat-x; }
.receipt div { display: flex; justify-content: space-between; gap: 10px; }
.receipt .t { border-top: 1px dashed #282920; margin-top: 6px; padding-top: 6px; font-weight: 800; }
.receipt div { animation: print .35s steps(4) both; animation-delay: var(--d, 0s); }
@keyframes print { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.rank { display: grid; gap: 12px; }
.rank > div { display: grid; grid-template-columns: 44px 1fr auto; align-items: baseline; gap: 10px; font-size: 20px; font-weight: 700; border-bottom: 1px solid rgba(40, 41, 32, .15); padding-bottom: 10px; }
.rank b { font: 400 40px/1 var(--serif); }
.rank span:last-child { font-variant-numeric: tabular-nums; }
.qty { display: grid; gap: 12px; }
.qty > div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; }
.qty b { font-size: 26px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.qty em { display: block; height: 10px; border-radius: 10px; background: currentColor; opacity: .85; width: 0; transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
.qty span { font-size: 14px; display: grid; gap: 6px; }
.cbar { display: flex; height: 16px; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.15); }
.cbar i { display: block; height: 100%; width: 0; transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.legend { display: grid; gap: 7px; font-size: 14px; }
.legend div { display: flex; gap: 10px; align-items: baseline; }
.legend i { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; display: inline-block; transform: translateY(1px); }
.legend small { opacity: .8; }
.chipz { display: flex; flex-wrap: wrap; gap: 7px; }
.chipz span { font-size: 13px; font-weight: 650; padding: 7px 11px; border-radius: 100px; background: rgba(255, 255, 255, .14); transform: scale(.6); opacity: 0; animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) forwards; animation-delay: var(--d, 0s); }
@keyframes pop { to { transform: none; opacity: 1; } }
.donut { width: min(64vw, 240px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; align-self: center; background: conic-gradient(#282920 calc(var(--p) * 1%), rgba(40, 41, 32, .18) 0); --p: 0; transition: --p 1.4s; animation: donut 1.6s cubic-bezier(.2, .8, .2, 1) forwards .3s; max-width: 100%; }
.donut div { width: 64%; aspect-ratio: 1; border-radius: 50%; background: #E9B42E; display: grid; place-items: center; font: 800 44px/1 var(--sans); letter-spacing: -2px; }
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }
@keyframes donut { to { --p: var(--to); } }
.dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; max-width: 320px; }
.dots i { aspect-ratio: 1; border-radius: 50%; border: 1.5px solid rgba(255, 249, 243, .45); transform: scale(.4); opacity: 0; animation: pop .4s ease forwards; animation-delay: var(--d, 0s); }
.dots i.on { background: #E9B42E; border-color: #E9B42E; }
.duo { display: grid; gap: 10px; }
.duo > div { background: rgba(40, 41, 32, .1); border-radius: 18px; padding: 14px 16px; display: grid; gap: 4px; }
.duo b { font-size: 19px; font-weight: 800; letter-spacing: -.4px; }
.duo span { font-size: 14px; opacity: .85; }
.card-v.light-panels .duo > div { background: rgba(255, 249, 243, .12); }
.winlist { display: grid; gap: 8px; font-size: 16px; }
.winlist div { display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.winlist div::before { content: "✓"; font-weight: 800; color: #E9B42E; }

/* end card + share */
.endcard { overflow-y: auto; position: absolute; inset: 0; z-index: 8; background: #191917; color: #FFF9F3; display: flex; flex-direction: column; gap: 14px; padding: calc(70px + env(safe-area-inset-top, 0px)) max(22px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(22px, env(safe-area-inset-left, 0px)); animation: fade .3s ease; }
.endcard h2 { font: 400 clamp(48px, 15vw, 66px)/1 var(--serif); letter-spacing: -2px; }
.sharecard { width: auto; max-width: 100%; max-height: 44vh; object-fit: contain; align-self: center; border-radius: 22px; box-shadow: 0 18px 50px rgba(0,0,0,.35); display: block; }
.ev { display: grid; gap: 8px; }
.ev .rrow { cursor: default; }
.rate { display: grid; gap: 8px; }
.rate span { font-size: 14px; opacity: .85; }
.rate div { display: flex; gap: 8px; }
.rate button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(255, 249, 243, .5); color: #FFF9F3; font-weight: 800; }
.rate button.on { background: #E9B42E; border-color: #E9B42E; color: #282920; }
/* v1.4: the next-shop note, the goal tag on the kitchen check, two buttons side by side, the miss-it question */
.nextshop { background: rgba(255, 249, 243, .14); border: 1px solid rgba(255, 249, 243, .28); border-radius: 18px; padding: 12px 16px; display: grid; gap: 6px; position: relative; z-index: 5; }
.card-v.dark-text .nextshop { background: rgba(40, 41, 32, .08); border-color: rgba(40, 41, 32, .22); }
.nextshop .ns-h { font-size: 11px; font-weight: 750; letter-spacing: 1.6px; text-transform: uppercase; opacity: .85; }
.nextshop ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.nextshop li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; font-size: 15.5px; line-height: 1.35; font-weight: 650; }
.nextshop li::before { content: "→"; font-weight: 800; opacity: .8; }
.card-v .nextshop + .c-ctx, .card-v.has-acts .nextshop { margin-top: 2px; }
.c-acts.two { grid-template-columns: 1fr 1fr; }
.c-acts.two button { font-size: 14px; padding: 10px 12px; min-height: 50px; line-height: 1.2; }
.hrows .gtag { display: inline-block; margin-left: 8px; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; padding: 3px 8px; border-radius: 100px; background: #282920; color: #FFF9F3; vertical-align: 2px; }
.hrows .is-goal .hl { font-weight: 800; }
.rate.miss div { flex-wrap: wrap; }
.rate.miss button { width: auto; height: auto; min-height: 44px; border-radius: 100px; padding: 8px 14px; font-size: 13.5px; font-weight: 700; }
@media (max-height: 700px) { .card-v.dense .nextshop li { font-size: 14px; } .card-v.dense .c-b { font-size: 15px; } .card-v.dense .c-h { font-size: clamp(28px, 8.4vw, 38px); } }

/* v1.5.1: the design's three faces, served from this site (the security policy allows fonts from here only). SIL OFL 1.1. */
@font-face { font-family: "Instrument Serif"; src: url(/fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(/fonts/instrument-serif-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/fonts/jetbrains-mono-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url(/fonts/plus-jakarta-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url(/fonts/plus-jakarta-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url(/fonts/plus-jakarta-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
/* v0.2: landing, set-up, home between stories, scanning, instant insights, health card, punch lines.
   Same house as getdoof.app: the tokens in styles.css; bucket and tone colours below. */
:root {
  --real: #3F8F5C; --helperc: #C9931A; --factory: #D9543A; --unsorted: #B8B0A3;
  --tone-catch: #BE452F; --tone-good: #365C46; --tone-ask: #8A5A0F; --tone-info: #716A60;
  --paper: #FFFDF8; --paper-ink: #282920; --wide: 1040px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --real: #7FD39E; --helperc: #F2C14E; --factory: #F38866; --unsorted: #8E887C; --tone-catch: #FFA48B; --tone-good: #B6D5B4; --tone-ask: #F2C14E; --tone-info: #C4BDAD; }
}
:root[data-theme="dark"] { --real: #7FD39E; --helperc: #F2C14E; --factory: #F38866; --unsorted: #8E887C; --tone-catch: #FFA48B; --tone-good: #B6D5B4; --tone-ask: #F2C14E; --tone-info: #C4BDAD; }

body[data-stage="landing"] .app { max-width: var(--wide); padding-bottom: 40px; }
.bd.real { background: var(--real); } .bd.helper { background: var(--helperc); } .bd.factory { background: var(--factory); } .bd.unsorted, .bd.non_food, .bd.baby { background: var(--unsorted); }
.center { text-align: center; }
.label { font-size: 12px; font-weight: 750; color: var(--muted); letter-spacing: .4px; }

/* ---------- landing */
.landing { display: grid; gap: 56px; }
.l-top { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; }
.l-tag { font-size: 12px; font-weight: 700; color: var(--muted); }
.l-hero { display: grid; gap: 28px; align-items: center; }
.l-copy { display: grid; gap: 18px; min-width: 0; }
.l-copy h1 { font: 400 clamp(46px, 12.5vw, 84px)/.96 var(--serif); letter-spacing: -2.5px; }
.l-sub { font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 34ch; }
.l-cta { display: grid; gap: 10px; max-width: 380px; }
.btn.secondary svg { width: 16px; height: 16px; }
.l-micro { font-size: 12.5px; color: var(--muted); }
.l-phone { margin: 0; display: grid; justify-items: center; gap: 12px; }
.l-screen { position: relative; width: min(300px, 100%); aspect-ratio: 390 / 693; border-radius: 38px; overflow: hidden; background: #191917; box-shadow: 0 30px 70px var(--shadow), 0 0 0 9px var(--ink); display: block; padding: 0; max-width: 100%; }
.l-stage { position: absolute; left: 0; top: 0; width: 390px; height: 693px; transform-origin: 0 0; transform: scale(var(--ls, .769)); }
.l-stage .card-v { padding-top: 48px; }
.l-phone figcaption { display: grid; justify-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.l-dots { display: flex; gap: 5px; }
.l-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.l-dots i.on { background: var(--brand); width: 18px; border-radius: 4px; }
.l-how h2, .l-end h2 { font: 400 clamp(30px, 8vw, 44px)/1.05 var(--serif); letter-spacing: -1.2px; }
.l-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: s; }
.l-steps li { counter-increment: s; display: grid; gap: 4px; padding: 18px 18px 18px 64px; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; min-width: 0; }
.l-steps li::before { content: counter(s); position: absolute; left: 18px; top: 14px; font: 400 34px/1 var(--serif); color: var(--brand); }
.l-steps b { font-size: 17px; }
.l-steps span { color: var(--muted); }
.l-ins { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ins-chip { font-size: 12.5px; font-weight: 700; border-radius: 100px; padding: 6px 11px; background: var(--soft); color: var(--tone-info); }
.ins-chip.tone-catch { color: var(--tone-catch); } .ins-chip.tone-good { color: var(--tone-good); } .ins-chip.tone-ask { color: var(--tone-ask); }
.l-trust { display: grid; gap: 1px; background: var(--line); border-radius: 22px; overflow: hidden; border: 1px solid var(--line); }
.l-trust div { background: var(--bg); padding: 18px; display: grid; gap: 4px; }
.l-trust span { color: var(--muted); font-size: 14px; }
.l-end { display: grid; gap: 14px; max-width: 520px; }
.l-end .btn { max-width: 380px; }
.l-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: baseline; border-top: 1px solid var(--line); padding-top: 18px; font-size: 12.5px; color: var(--muted); }
@media (min-width: 860px) {
  .l-hero { grid-template-columns: 1.15fr .85fr; gap: 48px; padding-top: 24px; }
  .l-screen { width: 330px; }
  .l-stage { --ls: .846; }
  .l-steps { grid-template-columns: repeat(3, 1fr); }
  .l-trust { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- onboarding */
.ob-top { display: flex; justify-content: space-between; align-items: baseline; }
.stepper { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sp { display: inline-flex; align-items: center; gap: 4px; background: var(--soft); border-radius: 100px; padding: 4px; }
.sp button { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; }
.sp button:disabled { opacity: .35; cursor: default; }
.sp svg { width: 16px; height: 16px; }
.sp output { min-width: 28px; text-align: center; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.desi-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.desi-row > span { display: grid; gap: 2px; }
.switch { width: 54px; height: 32px; border-radius: 32px; background: var(--line); position: relative; flex: 0 0 auto; transition: background .2s; }
.switch i { position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px var(--shadow); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--brand); }
.switch[aria-checked="true"] i { transform: translateX(22px); }
.punch-demo { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.punch-demo.off { opacity: .4; text-decoration: line-through; }
.punch-demo small { color: var(--muted); font-size: 12px; }
.punch-demo span, .punch-line span { font: italic 600 17px/1.2 var(--serif); color: var(--brand); background: var(--soft); padding: 6px 12px; border-radius: 12px; display: inline-block; transform: rotate(-1.2deg); }
.punch-line { margin-top: 6px; }
.howto { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: h; }
.howto li { counter-increment: h; display: grid; gap: 3px; padding-left: 44px; position: relative; }
.howto li::before { content: counter(h); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.howto span { color: var(--muted); font-size: 14px; }
.install .seg { justify-self: start; }

/* ---------- app shell */
.demo-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); padding: 4px 0; }
.demo-bar b { color: var(--brand); letter-spacing: 1.2px; font-size: 10px; margin-right: 4px; }
.demo-bar button { font-weight: 750; color: var(--ink); background: var(--soft); border-radius: 100px; padding: 6px 12px; min-height: 34px; font-size: 12px; }
.hname { font-size: 12.5px; font-weight: 700; color: var(--muted); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.tcol { display: grid; gap: 10px; flex: 1; min-width: 0; }
.tile h2.m { font-size: 34px; }

/* ---------- the story being built */
.building { background: #191917; color: #FFF9F3; border-radius: 26px; padding: 18px 18px 16px; display: grid; gap: 12px; }
.b-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.eyebrow.light { color: #F38866; }
.b-when { font: 400 22px var(--serif); }
.ghosts { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ghosts i { aspect-ratio: 3 / 4; border-radius: 8px; border: 1.5px dashed rgba(255, 249, 243, .28); max-width: 100%; }
.ghosts i.on { border: 0; background: linear-gradient(160deg, #E9B42E, #BE452F); animation: pop .4s ease both; }
.ghosts i.on:nth-child(2n) { background: linear-gradient(160deg, #365C46, #A4C94F); }
.ghosts i.on:nth-child(3n) { background: linear-gradient(160deg, #1C2948, #3069A6); }
.building p { font-size: 14px; color: #E8DFD3; }
.building p b { color: #FFF9F3; }
.pill.light { background: #FFF9F3; color: #282920; justify-self: start; }

/* ---------- week so far */
.sofar2 { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px 18px; display: grid; gap: 8px; }
.sf-hero { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sf-hero b { font: 800 44px/1 var(--sans); letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
.chip.more { background: #FBE2D9; color: #9E2D1E; } .chip.less { background: var(--sage); color: var(--green); } .chip.same, .chip.learning { background: var(--soft); color: var(--muted); }
.sofar2 ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14.5px; }
.sofar2 li::before { content: "·"; color: var(--brand); font-weight: 800; margin-right: 8px; }
.addcard { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; background: var(--brand); color: var(--on-brand); border-radius: 22px; padding: 16px 18px; text-align: left; width: 100%; }
.addcard .ring { width: 54px; height: 54px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--on-brand) 45%, transparent); display: grid; place-items: center; }
.addcard .ring svg { width: 26px; height: 26px; }
.addcard b { display: block; font-size: 16px; }
.addcard .small { opacity: .85; }
.rmid { display: grid; gap: 2px; min-width: 0; }
.rins { font-size: 12.5px !important; font-weight: 700; color: var(--tone-info) !important; }
.rins.tone-catch { color: var(--tone-catch) !important; } .rins.tone-good { color: var(--tone-good) !important; } .rins.tone-ask { color: var(--tone-ask) !important; }
.checklist .ck { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.checklist .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.checklist .ck.ok .tick { background: var(--green); border-color: var(--green); color: var(--bg); }
.checklist .ck.ok span:nth-child(2) { color: var(--muted); text-decoration: line-through; }
.linkbtn { color: var(--brand); font-weight: 750; font-size: 13px; padding: 6px 4px; }
.row-sb { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tablewrap { overflow-x: auto; }

/* ---------- add: sample receipts as paper */
.papers { display: grid; gap: 10px; margin-top: 10px; }
.ptile { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 10px; text-align: left; width: 100%; }
.pt-paper { background: var(--paper); color: var(--paper-ink); font: 7.5px/1.45 var(--mono); padding: 8px 7px; border-radius: 4px; display: grid; gap: 1px; height: 104px; overflow: hidden; box-shadow: 0 3px 10px var(--shadow); transform: rotate(-2deg); }
.pt-paper b { font-size: 8px; text-align: center; }
.pt-paper i { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-meta { display: grid; gap: 3px; min-width: 0; }
.pt-meta > span { font-size: 12.5px; color: var(--muted); }
.pt-cta { display: inline-flex !important; align-items: center; gap: 6px; justify-self: start; margin-top: 4px; font-weight: 750; color: var(--on-brand) !important; background: var(--brand); border-radius: 100px; padding: 6px 12px; font-size: 12.5px !important; }
.ptile.done .pt-cta { background: var(--sage); color: var(--green) !important; }
.ptile.done .pt-paper { opacity: .7; }

/* ---------- scanner */
.scanner { position: fixed; inset: 0; z-index: 55; background: var(--bg); display: flex; flex-direction: column; animation: fade .2s ease; padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(16px, env(safe-area-inset-left, 0px)); }
.sc-top { width: min(100%, 472px); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 12px 0 8px; }
.sc-top .close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 22px; line-height: 1; }
.sc-body { width: min(100%, 472px); margin: 0 auto; flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 14px; padding-bottom: 24px; }
.paper { position: relative; background: var(--paper); color: var(--paper-ink); font: 12.5px/1.5 var(--mono); padding: 18px 16px 22px; border-radius: 4px; box-shadow: 0 16px 40px var(--shadow); display: grid; gap: 3px; overflow: hidden; }
.paper::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: linear-gradient(-45deg, var(--bg) 6px, transparent 0) 0 0 / 12px 8px repeat-x, linear-gradient(45deg, var(--bg) 6px, transparent 0) 0 0 / 12px 8px repeat-x; }
.pp-head { display: grid; justify-items: center; gap: 1px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px dashed var(--paper-ink); }
.pp-head b { font-size: 15px; letter-spacing: 1px; }
.pl { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; padding: 2px 4px; border-radius: 4px; transition: background .3s; }
.pl .pn { min-width: 0; overflow-wrap: anywhere; }
.pl em { font-style: normal; opacity: .65; }
.pl .pa { font-variant-numeric: tabular-nums; }
.pl .read { grid-column: 1 / -1; display: none; align-items: center; gap: 7px; font: 700 12.5px/1.4 var(--sans); color: #365C46; }
.pl.done { background: rgba(164, 201, 79, .16); }
.pl.done .read { display: flex; animation: rin .35s ease both; }
.pp-total { display: flex; justify-content: space-between; border-top: 1px dashed var(--paper-ink); margin-top: 6px; padding-top: 6px; font-weight: 800; }
.beam { position: absolute; left: 0; right: 0; height: 46px; top: -46px; background: linear-gradient(to bottom, transparent, rgba(229, 93, 63, .22) 70%, #E55D3F); pointer-events: none; opacity: 0; }
.paper.scanning .beam { opacity: 1; animation: beam 2.4s linear infinite; }
@keyframes beam { from { top: -46px; } to { top: 100%; } }
.sc-status { text-align: center; font-weight: 700; color: var(--muted); font-size: 14px; }

/* ---------- result + instant insights */
.result { display: grid; gap: 14px; animation: up .3s ease; }
.res-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.res-head > span { display: grid; gap: 2px; min-width: 0; }
.res-head h2 { font: 400 36px/1 var(--serif); letter-spacing: -1px; }
.res-total { font: 800 26px var(--sans); letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.cbar2 { display: flex; height: 12px; border-radius: 12px; overflow: hidden; background: var(--soft); }
.cbar2 i { display: block; height: 100%; }
.cbar2 .real { background: var(--real); } .cbar2 .helper { background: var(--helperc); } .cbar2 .factory { background: var(--factory); } .cbar2 .unsorted { background: var(--unsorted); }
.legend2 { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.legend2 span { display: inline-flex; align-items: center; gap: 6px; }
.res-h { font: 400 22px var(--serif); letter-spacing: -.4px; padding-top: 4px; }
.ins-list { display: grid; gap: 10px; }
.ins { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--tone-info); border-radius: 16px; padding: 13px 15px; display: grid; gap: 3px; opacity: 0; animation: rin .5s ease forwards; animation-delay: var(--d, 0s); }
.ins.tone-catch { border-left-color: var(--tone-catch); } .ins.tone-good { border-left-color: var(--tone-good); } .ins.tone-ask { border-left-color: var(--tone-ask); }
.ins b { font-size: 16px; }
.ins > span { color: var(--muted); font-size: 14px; }
.lines-d summary { font-weight: 700; cursor: pointer; padding: 6px 0; }
.lines-d .lines { font: 12.5px/1.6 var(--mono); display: grid; gap: 2px; padding-top: 6px; }
.lines-d .lines div { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; }
.res-acts { display: grid; gap: 10px; }

/* ---------- demo steps sheet */
.dsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dsteps li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dsteps .n { width: 30px; height: 30px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--muted); }
.dsteps li.now .n { background: var(--brand); color: var(--on-brand); }
.dsteps li.past .n { background: var(--green); color: var(--bg); }
.dsteps .t { display: grid; gap: 2px; min-width: 0; }
.dsteps .t span { font-size: 12.5px; color: var(--muted); }
.dsteps .pill { min-height: 38px; padding: 8px 12px; font-size: 12.5px; }
.sheet .btn.secondary { flex-wrap: wrap; text-align: center; }

/* ---------- Friday nudge (in-app stand-in for the lock-screen notification) */
.nudge { position: fixed; z-index: 70; left: 50%; top: calc(10px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); width: min(92vw, 420px); display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; text-align: left; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 20px; padding: 12px 14px; box-shadow: 0 18px 40px var(--shadow); animation: drop .45s cubic-bezier(.2, .8, .2, 1); }
.nudge .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 800; }
.nudge b { display: block; font-size: 13px; }
.nudge span span { font-size: 13.5px; }
.nowtag { font-size: 11px; color: var(--muted); }
@keyframes drop { from { transform: translate(-50%, -30px); opacity: 0; } }

/* ---------- player: punch lines, health signal */
.c-punch span { display: inline-block; font: italic 600 clamp(19px, 5.4vw, 23px)/1.2 var(--serif); padding: 7px 14px; border-radius: 14px; background: rgba(255, 249, 243, .16); transform: rotate(-1.6deg); }
.card-v.dark-text .c-punch span { background: rgba(40, 41, 32, .1); }
.c-ctx { font-size: 13px; line-height: 1.4; opacity: .85; max-width: 40ch; padding-top: 8px; border-top: 1px solid currentColor; border-top-color: color-mix(in srgb, currentColor 25%, transparent); }
.hrows { display: grid; gap: 0; }
.hrows > div { display: grid; grid-template-columns: 1fr auto 26px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(40, 41, 32, .14); }
.hrows .hl { font-size: 14px; font-weight: 650; }
.hrows .hv { display: grid; justify-items: end; text-align: right; }
.hrows .hv b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hrows .hv small { font-size: 11.5px; opacity: .7; }
.hrows .ha { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.hrows .watch .ha { background: #BE452F; color: #FFF9F3; }
.hrows .good .ha { background: #365C46; color: #FFF9F3; }
.hrows .neutral .ha { background: rgba(40, 41, 32, .1); }
.hrows .ha:empty { visibility: hidden; }
.card-v.dense { gap: 10px; }
.card-v.dense .c-h { font-size: clamp(27px, 7.6vw, 36px); }
.card-v.dense .c-b { font-size: 15px; }
.card-v.dense .c-acts button { min-height: 46px; padding: 10px 16px; }
.share-img { border-radius: 18px; border: 1px solid var(--line); }
@media (max-height: 700px) { .card-v.dense .hrows > div { padding: 5px 0; } .card-v.dense .c-ctx { display: none; } }
/* the landing's mini player: fixed type sizes (the stage is 390 px wide whatever the window) */
.l-screen { text-align: left; color: inherit; }
.l-stage .c-hero { font-size: 104px; }
.l-stage .c-hero.mid { font-size: 84px; }
.l-stage .c-h { font-size: 40px; }
.l-stage .c-h.serif { font-size: 66px; }
.l-stage .c-h.cont { font-size: 36px; }
.l-stage .card-v.dense .c-h { font-size: 33px; }
.l-stage .c-punch span { font-size: 21px; }
.l-stage .info-btn { display: none; }

/* ---------- live build: reading, review, data, dashboard */
.l-invite { font-size: 14px; max-width: 46ch; }
.demo-bar.warn { background: #FBE7C6; color: #7E5313; border-radius: 12px; padding: 8px 12px; }
.demo-bar.warn b { color: #7E5313; }
.info.warn { background: #FBE7C6; color: #5A3A09; }
.btn.danger, .btn.link.danger { color: #BE452F; }
.btn.danger-bg { background: #BE452F; color: #FFF9F3; }
.btn.typein { margin-top: 10px; }
.btn:disabled { opacity: .55; cursor: default; }
.inrow { display: flex; gap: 8px; }
.inrow input { flex: 1; min-width: 0; }
.res-acts.two { grid-template-columns: 1fr 1fr; }
.res-acts .muted.small { align-self: center; }
.reading { display: grid; gap: 14px; justify-items: center; padding-top: 10px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.thumbs img, .pdfthumb { width: 84px; height: 112px; object-fit: cover; border-radius: 10px; box-shadow: 0 6px 18px var(--shadow); background: var(--soft); }
.pdfthumb { display: grid; place-items: center; color: var(--muted); }
.pdfthumb svg { width: 32px; height: 32px; }
.rd-status { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.review { display: grid; gap: 14px; }
.review h2 { font: 400 32px/1.05 var(--serif); letter-spacing: -1px; }
.rv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rv-grid .field input, .rv-total input { width: 100%; min-width: 0; }
.rv-lines { display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px; }
.rv-h { display: flex; justify-content: space-between; padding: 0 2px 4px; }
.rv-line { display: grid; grid-template-columns: 1fr 86px 34px; gap: 6px; align-items: center; }
.rv-name { display: grid; gap: 2px; min-width: 0; }
.rv-line input { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 8px 10px; min-height: 40px; min-width: 0; width: 100%; font-size: 14px; }
.rv-line .rv-amt { text-align: right; font-variant-numeric: tabular-nums; }
.rv-name small { font: 11px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.rv-del { width: 34px; height: 34px; border-radius: 50%; background: var(--soft); font-size: 18px; line-height: 1; color: var(--muted); }
.rv-check { display: flex; gap: 8px; align-items: flex-start; border-radius: 14px; padding: 10px 12px; font-size: 14px; }
.rv-check svg { flex: 0 0 auto; margin-top: 2px; }
.rv-check.ok { background: var(--sage); color: var(--green); }
.rv-check.warn { background: #FBE7C6; color: #5A3A09; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpis div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 2px; }
.kpis b { font: 800 26px var(--sans); font-variant-numeric: tabular-nums; }
.kpis span { font-size: 12px; color: var(--muted); }
.who.dash td, .who.dash th { text-align: left !important; }
.wrongbox { display: grid; gap: 8px; }
.wrongbox textarea { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 10px 12px; font: inherit; color: inherit; width: 100%; }
.card .btn.secondary { justify-self: start; width: auto; }
.card a.btn { text-decoration: none; color: inherit; }
label.btn { cursor: pointer; }
.stack > *, .card > *, .res-acts > * { min-width: 0; }
.card .field input { width: 100%; }
/* v1.4: kitchen-check dots on receipts, the receipt's three signals, the house goal chips, the gate tiles */
.bd.fresh { background: var(--real); } .bd.refined { background: var(--helperc); } .bd.sweets { background: var(--factory); } .bd.other, .bd.none { background: var(--unsorted); }
.sig3 { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--muted); }
.sig3 span { display: inline-flex; align-items: center; gap: 6px; }
.sig3 b { color: var(--ink); font-weight: 750; font-variant-numeric: tabular-nums; }
.chips.goal { margin-top: 2px; }
.gates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gate { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 2px; border-left-width: 4px; }
.gate.pass { border-left-color: var(--real); } .gate.fail { border-left-color: var(--factory); }
.gate .g-l { font-size: 11px; font-weight: 750; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.gate b { font: 800 24px var(--sans); font-variant-numeric: tabular-nums; }
.gate .g-s { font-size: 12px; color: var(--muted); line-height: 1.35; }
code.pre { white-space: pre-wrap; }

/* ---------------------------------------------------------------- v1.2 production (stories.getdoof.app) */
.btn.google { background: #FFFFFF; color: #1F1F1F; border: 1px solid #DADCE0; }
.btn.google svg { width: 18px; height: 18px; flex: none; }
:root[data-theme="dark"] .btn.google { background: #131314; color: #E3E3E3; border-color: #8E918F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.google { background: #131314; color: #E3E3E3; border-color: #8E918F; } }
.consent { display: flex; gap: 12px; align-items: flex-start; background: var(--soft); border-radius: 18px; padding: 14px 16px; font-size: 14px; margin: 4px 0 2px; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.consent a { color: var(--brand); font-weight: 700; }
.card.push .btn, .card .btn + .muted { margin-top: 2px; }
.card .linkbtn { justify-self: start; }
.rrow.mem { cursor: default; }
.rrow.mem .pill { flex: none; }
.l-foot a { color: inherit; text-decoration: underline; }
.who.dash td:first-child, .who.dash th:first-child { min-width: 150px; }

/* ---------- your kitchen (v1.2.1): things, not charts. Food colours in light and dark. */
:root { --mixb: 38%; --kglow: 16%; --food-milk: #3D8BD4; --food-veg: #2F9E5B; --food-fruit: #EE7A22; --food-sweets: #E0453A; --food-packets: #7B61FF; --food-eggs: #DE9A12; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --mixb: 62%; --kglow: 26%; --food-milk: #7DB9F0; --food-veg: #6FD49A; --food-fruit: #FFA559; --food-sweets: #FF7B6E; --food-packets: #A897FF; --food-eggs: #F5C451; } }
:root[data-theme="dark"] { --mixb: 62%; --kglow: 26%; --food-milk: #7DB9F0; --food-veg: #6FD49A; --food-fruit: #FFA559; --food-sweets: #FF7B6E; --food-packets: #A897FF; --food-eggs: #F5C451; }
.kit { --g: var(--food-veg); position: relative; border-radius: 28px; padding: 18px 18px 16px; display: grid; gap: 14px; min-width: 0; overflow: hidden; border: 1px solid color-mix(in srgb, var(--g) 22%, var(--line));
  background: radial-gradient(120% 70% at 100% 0%, color-mix(in srgb, var(--g) var(--kglow), transparent), transparent 60%), radial-gradient(90% 60% at 0% 100%, color-mix(in srgb, var(--food-fruit) 9%, transparent), transparent 70%), var(--surface); }
.k-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.k-head .eyebrow { margin: 0; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--food-veg); box-shadow: 0 0 0 0 color-mix(in srgb, var(--food-veg) 60%, transparent); animation: live 2.4s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--food-veg) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
/* the glance */
.k-glance { --f: var(--g); display: grid; gap: 10px; }
.k-say { margin: 0; font: 400 29px/1.16 var(--serif); letter-spacing: -.6px; }
.k-say .hl { font-weight: 700; color: var(--f); }
.k-icons { display: flex; flex-wrap: wrap; gap: 5px; }
.k-icons .ic { width: 32px; height: 32px; }
.k-key { margin: 0; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.k-key > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; } .k-key .kn { white-space: normal; color: var(--ink); font-weight: 600; }
.kk { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: 0 0 auto; }
.kk.b { background: color-mix(in srgb, var(--f) var(--mixb), var(--surface)); } .kk.x { background: var(--f); } .kk.s { border: 1.5px dashed var(--f); }
.k-tadka { margin: 0; justify-self: start; font: 600 italic 15px/1.3 var(--serif); color: color-mix(in srgb, var(--f) 75%, var(--ink)); background: color-mix(in srgb, var(--f) 13%, transparent); padding: 7px 12px; border-radius: 14px 14px 14px 4px; }
/* icons: tinted = usual, bright = extra, outline = short */
.ic { width: 22px; height: 22px; flex: 0 0 auto; fill: var(--f); overflow: visible; }
.ic .lbl { fill: rgba(255, 255, 255, .55); } .ic .shine { fill: none; stroke: rgba(255, 255, 255, .7); stroke-width: 1.4; stroke-linecap: round; }
.ic.b { fill: color-mix(in srgb, var(--f) var(--mixb), var(--surface)); } .ic.b .lbl, .ic.b .shine { opacity: .5; }
.ic.x { fill: var(--f); filter: drop-shadow(0 2px 3px color-mix(in srgb, var(--f) 35%, transparent)); }
.ic.s { fill: none; stroke: var(--f); stroke-width: 1.3; stroke-dasharray: 2.2 1.8; } .ic.s .lbl, .ic.s .shine { display: none; }
/* the shelf */
.k-shelf { display: grid; gap: 2px; }
.k-shelf .label { margin-bottom: 4px; }
.srow { --f: var(--food-veg); border-top: 1px solid var(--line); }
.s-top { width: 100%; display: grid; gap: 7px; padding: 12px 0; text-align: left; background: none; color: inherit; }
.sl { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; } .sl b { font-size: 15px; } .sl > span:not(.nchip) { font-size: 12.5px; color: var(--muted); } .sl .nchip { margin-left: auto; padding: 2px 9px; font-size: 11.5px; }
.si { display: flex; flex-wrap: wrap; gap: 4px; } .si .ic { width: 23px; height: 23px; }
.s-unit { margin: 0; } .si-one { margin: 0; font-weight: 700; font-size: 14px; }
.smore { display: none; gap: 10px; padding: 0 0 14px; }
.srow.open .smore { display: grid; animation: up .25s ease both; }
.srow.open .s-top .sl b { color: var(--f); }
.s-chip { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.s-week { display: grid; gap: 6px; }
.kbars { display: flex; align-items: flex-end; gap: 4px; height: 44px; }
.kbars i { flex: 1; background: var(--f, var(--brand)); border-radius: 4px 4px 2px 2px; min-width: 5px; }
.kbars i.zero { background: var(--line); } .kbars i.fest { background: var(--tone-ask); }
.ki-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.s-items { margin: 0; padding: 0; list-style: none; display: grid; }
.s-items li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.si-n { font-weight: 700; } .si-v { font-variant-numeric: tabular-nums; font-weight: 700; }
.si-r { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); }
.nchip { font-size: 12.5px; font-weight: 750; border-radius: 100px; padding: 4px 10px; white-space: nowrap; background: var(--soft); color: var(--muted); }
.nchip.watch { background: color-mix(in srgb, var(--food-sweets) 18%, var(--surface)); color: color-mix(in srgb, var(--food-sweets) 80%, var(--ink)); }
.nchip.good { background: color-mix(in srgb, var(--food-veg) 18%, var(--surface)); color: color-mix(in srgb, var(--food-veg) 75%, var(--ink)); }
/* money, ask, note */
.k-money { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 13px 16px; color: inherit; text-align: left; }
.k-money b { font-size: 18px; } .k-money .m2 { color: var(--muted); font-size: 13px; }
.k-ask { display: grid; gap: 10px; border-radius: 22px; padding: 16px; color: #FFF9F3; background: linear-gradient(135deg, #1C2948, #2B2363 60%, #3A2350); }
.k-ask .label { color: #F2B544; margin: 0; }
.k-qs { display: flex; flex-wrap: wrap; gap: 7px; }
.k-qs button { font-size: 13px; font-weight: 600; color: #FFF9F3; border: 1px solid rgba(255, 249, 243, .32); border-radius: 100px; padding: 8px 12px; min-height: 38px; text-align: left; }
.k-qs button[aria-pressed="true"] { background: #F2B544; color: #1C2948; border-color: #F2B544; }
.k-ans { margin: 0; font-size: 14.5px; line-height: 1.45; color: #EFE7DA; min-height: 42px; }
.k-ans.typing::after { content: ""; display: inline-block; width: 2px; height: 15px; margin-left: 2px; background: #F2B544; vertical-align: -2px; }
.k-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.k-stale { display: flex; align-items: center; gap: 10px; text-align: left; font-size: 13.5px; font-weight: 600; color: inherit; background: color-mix(in srgb, var(--food-eggs) 16%, var(--surface)); border: 1px dashed color-mix(in srgb, var(--food-eggs) 55%, var(--line)); border-radius: 16px; padding: 10px 12px; }
.k-cam { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-weight: 800; }
.kit.play .k-stale { animation: k-word .5s ease both; animation-delay: .1s; }
.fest-tag { color: var(--tone-ask); font-weight: 750; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.sw.fest { background: var(--tone-ask); }
/* arrival: sentence, then things, then tadka, then shelf, then the rest. Played once per change (main.js). */
.kit.play .k-say .w { display: inline-block; animation: k-word .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 55ms); }
.kit.play .k-icons .ic { animation: k-pop .42s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--words) * 55ms + 120ms + var(--j) * 55ms); }
.kit.play .k-icons .ic.x { animation: k-pop .42s cubic-bezier(.3, 1.6, .5, 1) both, k-bob 3.2s ease-in-out 2.6s infinite; animation-delay: calc(var(--words) * 55ms + 120ms + var(--j) * 55ms), calc(2.6s + var(--j) * 90ms); }
.kit.play .k-key { animation: k-fade .4s ease both; animation-delay: calc(var(--words) * 55ms + 700ms); }
.kit.play .k-tadka { animation: k-tadka .6s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--words) * 55ms + 1000ms); transform-origin: 0 100%; }
.kit.play .srow { animation: k-word .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(1.5s + var(--r) * 120ms); }
.kit.play .srow .ic { animation: k-pop .35s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(1.6s + var(--r) * 120ms + var(--j) * 30ms); }
.kit.play .k-money, .kit.play .k-ask, .kit.play .k-note, .kit.play .k-shelf > .label { animation: k-word .5s ease both; animation-delay: 2.3s; }
.kit.play .k-ask { animation-delay: 2.45s; } .kit.play .k-note { animation-delay: 2.6s; } .kit.play .k-shelf > .label { animation-delay: 1.4s; }
@keyframes k-word { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes k-pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
@keyframes k-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes k-tadka { 0% { opacity: 0; transform: scale(.6) rotate(-4deg); } 70% { transform: scale(1.04) rotate(1deg); } 100% { opacity: 1; transform: none; } }
@keyframes k-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
/* the money layer (sheet) */
.ksheet .ks-trend { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ks-week { display: grid; gap: 6px; }
.k-split { display: flex; gap: 10px; }
.k-split div { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: grid; }
.k-split b { font-size: 20px; } .k-split span { color: var(--muted); font-size: 12.5px; }
.mbars { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.mb { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.mbar { height: 84px; width: 100%; display: flex; align-items: flex-end; }
.mb i { width: 100%; background: var(--brand); border-radius: 4px 4px 2px 2px; display: block; }
.mb.fest i { background: var(--tone-ask); }
.mb span { font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; } .mb small { font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.k-shops { margin: 0; padding: 0; list-style: none; display: grid; }
.k-shops li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.k-shops small { display: block; color: var(--muted); font-size: 12px; }

/* ---------------------------------------------------------------- your kitchen (v1.3): battery, list, deck */
:root { --p-ok: #2F9E5B; --p-mid: #D99A1E; --p-low: #E0453A; --p-ring: #EFE8DD; --p-cell: #FFFFFF; --p-wa: #1F8F5A; --p-dark: #1D1E19; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --p-ok: #6FD49A; --p-mid: #F5C451; --p-low: #FF7B6E; --p-ring: #3A3C33; --p-cell: #2C2F26; --p-wa: #2BA36A; --p-dark: #121310; } }
:root[data-theme="dark"] { --p-ok: #6FD49A; --p-mid: #F5C451; --p-low: #FF7B6E; --p-ring: #3A3C33; --p-cell: #2C2F26; --p-wa: #2BA36A; --p-dark: #121310; }
.pan { display: grid; gap: 12px; }
.pan-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pan-h h2 { font: 700 24px/1.1 var(--sans); letter-spacing: -.6px; }
.lpill { display: inline-flex; align-items: center; gap: 6px; background: var(--p-dark); color: #FFF6E9; border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 650; }
.lpill b { font-weight: 800; } .lpill.on { padding-left: 6px; }
.lstack { display: flex; } .lstack img { width: 24px; height: 24px; margin-right: -7px; border-radius: 50%; background: #34352e; padding: 2px; }
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pcell { background: var(--p-cell); border-radius: 22px; padding: 10px 4px 9px; display: flex; flex-direction: column; align-items: center; gap: 1px; box-shadow: 0 1px 0 var(--line), 0 6px 16px rgba(40, 41, 32, .06); transition: transform .15s; min-width: 0; }
.pcell:active { transform: scale(.95); }
.pr { position: relative; width: 74px; height: 74px; }
.pring { position: absolute; inset: 0; transform: rotate(-90deg); }
.pring circle { fill: none; stroke-width: 5; } .pring .bg { stroke: var(--p-ring); }
.pring .fg { stroke-linecap: round; stroke: var(--p-ok); transition: stroke-dashoffset .9s cubic-bezier(.3, .7, .2, 1), stroke .3s; }
.t-mid .pring .fg { stroke: var(--p-mid); } .t-low .pring .fg { stroke: var(--p-low); } .t-new .pring .fg { stroke: var(--p-ring); }
.pimg { position: absolute; inset: 9px; width: 56px; height: 56px; transition: filter .3s, opacity .3s, transform .3s; -webkit-user-drag: none; }
.pword { position: absolute; inset: 9px; display: grid; place-items: center; text-align: center; font: 700 13px/1.05 var(--sans); letter-spacing: -.2px; overflow: hidden; word-break: break-word; }
.ptick { position: absolute; top: -2px; right: -4px; width: 24px; height: 24px; border-radius: 50%; background: var(--p-ok); color: #fff; display: grid; place-items: center; transform: scale(0); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.ptick svg { width: 14px; height: 14px; }
.t-listed .ptick, .t-done .ptick { transform: scale(1); }
.t-listed .pimg, .t-done .pimg { filter: grayscale(1); opacity: .4; transform: scale(.86); }
.pn { font-size: 13.5px; font-weight: 750; margin-top: 3px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; }
.ps { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.t-low .ps { color: var(--p-low); } .t-mid .ps { color: var(--p-mid); } .t-listed .ps, .t-done .ps { color: var(--p-ok); }
.pdock { display: flex; gap: 10px; align-items: center; }
.pdeck { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: var(--p-dark); color: #FFF6E9; border-radius: 24px; padding: 10px 14px 10px 10px; text-align: left; min-height: 70px; }
.pdeck b { display: block; font: 750 18px/1.1 var(--sans); letter-spacing: -.3px; } .pdeck small { color: #cfc6b6; font-size: 12.5px; }
.pdeck.calm { background: var(--surface); color: var(--ink); border: 1px dashed var(--line); padding-left: 16px; } .pdeck.calm small { color: var(--muted); }
.pgo { margin-left: auto; font-weight: 800; font-size: 20px; }
.pfan { position: relative; width: 74px; height: 54px; flex: none; }
.pf { position: absolute; top: 1px; width: 44px; height: 52px; border-radius: 12px; display: grid; place-items: center; border: 2px solid var(--p-dark); background: #F6EEDF; color: #1D1E19; font-size: 13px; }
.pf:nth-child(1) { left: 0; transform: rotate(-12deg); } .pf:nth-child(2) { left: 14px; transform: rotate(-2deg); background: #E8F0E4; } .pf:nth-child(3) { left: 28px; transform: rotate(9deg); background: #E2ECF8; }
.pf img { width: 32px; height: 32px; }
.pcam { flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; box-shadow: 0 10px 22px rgba(190, 69, 47, .32); }
.pcam svg { width: 28px; height: 28px; }
.pfine { font-size: 11.5px; color: var(--muted); text-align: center; }
/* the list sheet */
.lgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.litem { background: var(--p-cell); border-radius: 18px; padding: 10px 4px 8px; display: grid; justify-items: center; gap: 2px; font-size: 13px; font-weight: 700; box-shadow: 0 1px 0 var(--line); }
.litem img.limg { width: 52px; height: 52px; } .litem .pword { position: static; width: 52px; height: 52px; }
.btn.wa { background: var(--p-wa); color: #fff; text-decoration: none; }
/* the deck */
.deckov { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: flex; flex-direction: column; padding: calc(14px + env(safe-area-inset-top, 0px)) 18px calc(18px + env(safe-area-inset-bottom, 0px)); animation: up .28s cubic-bezier(.2, .8, .2, 1); max-width: 520px; margin: 0 auto; }
.dk-prog { display: flex; gap: 4px; } .dk-prog i { flex: 1; height: 4px; border-radius: 2px; background: var(--p-ring); } .dk-prog i.d { background: var(--ink); }
.dk-top { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.dk-top h2 { font: 750 26px/1 var(--sans); letter-spacing: -.8px; } .dk-n { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--muted); }
.dk-top .close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 22px; line-height: 1; }
.dk-deck { position: relative; flex: 1; margin: 14px 0 16px; min-height: 300px; }
.dk-card { position: absolute; inset: 0; border-radius: 32px; overflow: hidden; display: flex; flex-direction: column; touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: 0 14px 34px rgba(40, 41, 32, .16); transition: transform .32s cubic-bezier(.2, .8, .2, 1), opacity .32s; --yes: 0; --no: 0; background: #F6EEDF; color: #1D1E19; }
.dk-card.k-low { background: #E2ECF8; } .dk-card.k-twice { background: #FBE3DF; } .dk-card.k-new { background: #EEE6F8; }
.dk-card.u1 { transform: translateY(12px) scale(.95); } .dk-card.u2 { transform: translateY(22px) scale(.9); opacity: .55; }
.dk-art { flex: 1; display: grid; place-items: center; position: relative; min-height: 0; }
.dk-art img { width: min(210px, 52vw); height: min(210px, 52vw); filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .18)); -webkit-user-drag: none; }
.dk-word { font: 750 44px/1.05 var(--sans); letter-spacing: -1.5px; text-align: center; padding: 0 20px; }
.dk-why { position: absolute; top: 18px; left: 18px; background: #fff; color: #1D1E19; font-size: 13px; font-weight: 800; padding: 7px 12px; border-radius: 14px; }
.k-low .dk-why { color: #C0392B; }
.dk-stamp { position: absolute; top: 70px; font: 900 24px/1 var(--sans); padding: 6px 12px; border-radius: 12px; border: 4px solid; background: rgba(255, 255, 255, .88); }
.dk-stamp.yes { left: 22px; transform: rotate(-12deg); color: #2E7D4F; opacity: var(--yes); } .dk-stamp.no { right: 22px; transform: rotate(12deg); color: #6F695F; opacity: var(--no); }
.dk-meta { padding: 0 22px 22px; } .dk-meta h3 { font: 750 30px/1.05 var(--sans); letter-spacing: -1px; } .dk-meta p { font-size: 14.5px; font-weight: 600; opacity: .7; margin-top: 4px; }
.dk-btns { display: flex; justify-content: center; gap: 14px; }
.dk-b { flex: 1; max-width: 190px; height: 60px; border-radius: 30px; font-weight: 800; font-size: 16px; box-shadow: 0 6px 16px rgba(40, 41, 32, .14); }
.dk-b.no { background: var(--surface); color: var(--muted); border: 1px solid var(--line); } .dk-b.yes { background: #2E7D4F; color: #fff; }
.dk-wa { flex: 2; display: grid; place-items: center; height: 60px; border-radius: 30px; background: var(--p-wa); color: #fff; font-weight: 800; text-decoration: none; }
.dk-end { position: absolute; inset: 0; border-radius: 32px; background: var(--p-dark); color: #fff; padding: 26px 22px; display: flex; flex-direction: column; animation: dkflip .55s cubic-bezier(.2, .8, .2, 1) both; overflow: auto; }
@keyframes dkflip { from { transform: rotateY(75deg) scale(.92); opacity: 0; } }
.dk-end .dkk { font: 800 12px/1 var(--sans); letter-spacing: 1.6px; color: #F5C451; }
.dk-end .big { font: 800 56px/1 var(--sans); letter-spacing: -2.5px; margin: 14px 0 6px; } .dk-end .t { font-size: 18px; font-weight: 650; } .dk-end .s { font-size: 13px; color: #c9c1b2; margin-top: 8px; }
.dk-bask { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: auto; padding-top: 16px; }
.dk-bask span { background: #2b2c25; border-radius: 16px; padding: 8px 4px 6px; text-align: center; font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.dk-bask img { width: 44px; height: 44px; margin: 0 auto 2px; display: block; }

/* ---------- your kitchen v2: the mood, the orb and Doof ka bill (behind DOOF_ORB=on). Light or dark follows the phone. */
:root { --orb-bg: #FBF6EE; --orb-glow: rgba(214, 178, 106, .20); --orb-card: #FFFFFF; --orb-line: #E7DFD2; --orb-brass: #9A7633;
  --bill-bg: #FFFEFA; --bill-ink: #2A2A22; --bill-mute: #7A7266; --bill-rule: #CFC6B6; --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Roboto Mono", monospace; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --orb-bg: #12130F; --orb-glow: rgba(215, 178, 106, .10); --orb-card: #1C1E18; --orb-line: #34362D; --orb-brass: #D7B26A;
  --bill-bg: #1A1C16; --bill-ink: #F3EADB; --bill-mute: #A9A194; --bill-rule: #4A4B40; } }
:root[data-theme="dark"] { --orb-bg: #12130F; --orb-glow: rgba(215, 178, 106, .10); --orb-card: #1C1E18; --orb-line: #34362D; --orb-brass: #D7B26A;
  --bill-bg: #1A1C16; --bill-ink: #F3EADB; --bill-mute: #A9A194; --bill-rule: #4A4B40; }
.o-now { margin: 4px 2px -6px; color: var(--muted); }
.orb { position: relative; display: grid; gap: 4px; min-width: 0; padding: 18px 16px 14px; border-radius: 28px; border: 1px solid var(--orb-line); overflow: hidden;
  background: radial-gradient(80% 40% at 50% 58%, var(--orb-glow), transparent 70%), var(--orb-bg); }
.o-top { display: grid; gap: 6px; align-content: start; min-width: 0; }
.o-mood { font: 400 clamp(32px, 9.2vw, 40px)/1 var(--serif); letter-spacing: -1.2px; text-wrap: balance; }
.o-line { font-size: 15.5px; line-height: 1.4; color: var(--ink); text-wrap: pretty; }
.o-chip { justify-self: start; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; color: var(--muted); background: var(--orb-card); border: 1px solid var(--orb-line); border-radius: 999px; padding: 4px 11px 4px 6px; }
.o-chip.knows { color: var(--orb-brass); border-color: color-mix(in srgb, var(--orb-brass) 45%, transparent); }
.o-ring { width: 18px; height: 18px; flex: none; }
.o-ring circle { fill: none; stroke-width: 2.6; }
.o-ring-bg { stroke: var(--orb-line); } .o-ring-fg { stroke: var(--orb-brass); stroke-linecap: round; }
.o-stale { display: flex; align-items: center; gap: 10px; text-align: left; font-size: 13px; font-weight: 600; color: inherit; background: color-mix(in srgb, var(--food-eggs) 14%, transparent); border: 1px dashed color-mix(in srgb, var(--food-eggs) 55%, var(--orb-line)); border-radius: 14px; padding: 8px 11px; }
.o-stale span { font-size: 18px; line-height: 1; color: var(--food-eggs); }
.o-stage { position: relative; height: 252px; margin: 0 -16px; }
.o-slot, .orb-gl { position: absolute; inset: 0; }
.orb-gl canvas { display: block; width: 100%; height: 100%; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.orb-labels { position: absolute; inset: 0; pointer-events: none; }
.orb-nogl { position: absolute; inset: 34% 24px auto; text-align: center; color: var(--muted); font-size: 14px; }
.o-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.o-sum { font-size: 14px; color: var(--muted); } .o-sum b { font: 400 22px var(--serif); color: var(--ink); margin-right: 2px; }
.o-billbtn { font: 750 14px var(--sans); color: var(--ink); background: var(--orb-card); border: 1px solid var(--orb-line); border-radius: 999px; padding: 10px 16px; min-height: 44px; }
.o-billbtn span { color: var(--orb-brass); margin-left: 2px; }
.o-ignite { width: 100%; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; text-align: left; color: inherit; background: var(--orb-card); border: 1.5px dashed color-mix(in srgb, var(--orb-brass) 60%, var(--orb-line)); border-radius: 20px; padding: 14px 16px; }
.o-ignite b { display: block; font-size: 16px; } .o-ignite span span { color: var(--muted); font-size: 13px; }
.o-cam { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; color: var(--orb-bg); background: var(--orb-brass); }
.o-skip { justify-self: center; }
/* Doof ka bill: the week as a receipt */
.o-billwrap:empty { display: none; }
.o-billwrap { padding-top: 12px; }
.bill { position: relative; color: var(--bill-ink); background: var(--bill-bg); border-radius: 4px; padding: 18px 16px 20px; font-family: var(--mono); font-size: 13px; box-shadow: 0 10px 28px var(--shadow); margin-bottom: 8px; }
.bill::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 8px; background: radial-gradient(circle at 6px 0, var(--bill-bg) 5.5px, transparent 6px) 0 0 / 12px 8px repeat-x; }
.b-head { display: grid; justify-items: center; gap: 2px; text-align: center; padding-bottom: 12px; border-bottom: 1.5px dashed var(--bill-rule); }
.b-head b { font-size: 15px; letter-spacing: 3px; } .b-head span { font-size: 11.5px; color: var(--bill-mute); }
.b-lines { list-style: none; margin: 0; padding: 6px 0; display: grid; }
.b-line > button { width: 100%; display: grid; grid-template-columns: minmax(84px, 7.6em) minmax(0, 1fr) 2.4em 3.6em; align-items: center; gap: 8px; padding: 9px 0; text-align: left; color: inherit; font: inherit; background: none; border: 0; min-height: 44px; }
.b-line + .b-line > button { border-top: 1px dotted var(--bill-rule); }
.bl-name { display: block; line-height: 1.2; font-weight: 700; min-width: 0; }
.bl-u { display: block; font-weight: 400; font-size: 11px; color: var(--bill-mute); }
.bl-dots { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; min-width: 0; }
.bl-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.bl-dots em { font-style: normal; font-size: 11px; color: var(--bill-mute); margin-left: 2px; }
.bl-n { text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; }
.bl-stamp { justify-self: end; font-size: 11px; font-weight: 800; letter-spacing: .5px; color: var(--bill-ink); border: 1.5px solid var(--c); border-radius: 4px; padding: 2px 5px; transform: rotate(-6deg); white-space: nowrap; }
.bl-stamp.empty { border: 0; padding: 0; }
.b-line.open > button { color: var(--bill-ink); }
.b-line.open .bl-name::before { content: "▾ "; color: var(--c); }
.bl-items { list-style: none; margin: 0 0 8px; padding: 0 0 0 12px; display: grid; gap: 4px; border-left: 2px solid var(--c); }
.bl-items li { display: flex; align-items: baseline; gap: 6px; font-size: 12.5px; }
.bl-items li i { flex: 1; border-bottom: 1px dotted var(--bill-rule); transform: translateY(-3px); }
.bl-items li b { font-variant-numeric: tabular-nums; }
.b-none { margin: 2px 0 0; font-size: 11.5px; color: var(--bill-mute); }
.b-total, .b-usual { display: flex; justify-content: space-between; align-items: baseline; }
.b-total { margin-top: 10px; padding-top: 10px; border-top: 1.5px dashed var(--bill-rule); font-size: 15px; letter-spacing: 1px; }
.b-usual { font-size: 12px; color: var(--bill-mute); margin-top: 2px; }
.b-learn { justify-self: start; display: inline-block; margin: 10px 0 0; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; color: var(--orb-brass); border: 1.5px solid var(--orb-brass); border-radius: 4px; padding: 3px 7px; transform: rotate(-3deg); }
.b-thanks { margin: 14px 0 0; text-align: center; font-size: 12px; color: var(--bill-mute); letter-spacing: .5px; }
/* folded blocks: one line each until opened */
.fold { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.fold > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; min-height: 48px; font-weight: 700; font-size: 14.5px; cursor: pointer; }
.fold > summary::-webkit-details-marker { display: none; }
.fold-i { color: var(--muted); transition: transform .2s; } .fold[open] .fold-i { transform: rotate(90deg); }
.fold > .card, .fold > .list { border: 0; box-shadow: none; background: none; margin: 0; padding-top: 0; }
.fold .checklist > b:first-child { display: none; }
.fold > .list { padding: 0 8px 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { .fold-i { transition: none; } }
/* the last 4 weeks under the bill */
.b-strip { margin-top: 14px; padding-top: 12px; border-top: 1.5px dashed var(--bill-rule); }
.b-strip p { margin: 0 0 8px; font-size: 11px; letter-spacing: 2px; color: var(--bill-mute); text-align: center; }
.b-strip ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.b-strip li { display: grid; justify-items: center; gap: 3px; text-align: center; min-width: 0; }
.b-strip i { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 35%, #fff), var(--c) 60%, color-mix(in srgb, var(--c) 70%, #000)); }
.b-strip li.none i { background: none; border: 1.5px dashed var(--bill-rule); }
.b-strip b { font-size: 10.5px; line-height: 1.2; font-weight: 700; }
.b-strip span { font-size: 10px; color: var(--bill-mute); }
/* Friday 6 pm: the story the week poured into */
.tile.week.pour { animation: o-pour 1.4s ease-out 1.3s 2 both; }
@keyframes o-pour { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--orb-brass) 0%, transparent); } 40% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--orb-brass) 45%, transparent); } }
@media (prefers-reduced-motion: reduce) { .tile.week.pour { animation: none; } }

/* ---------- Home v1.5: the Eclipse Ring (design V3.2, locked). Warm obsidian, champagne gold, coral for what jumped. */
:root { --rg-bg: #FBF6EE; --rg-card: #FFFFFF; --rg-line: #E7DFD2; --rg-gold: #A8862A; --rg-coral: #E23A5C; --rg-salmon: #F4A261; --rg-track: #ECE5D8; --rg-dairy: #B9AE97; --rg-good: #2F8F5B; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --rg-bg: #11120F; --rg-card: #181915; --rg-line: #2A2B25; --rg-gold: #D4AF37; --rg-coral: #FF4D6D; --rg-track: #23241F; --rg-dairy: #E8E4D9; --rg-good: #52B788; } }
:root[data-theme="dark"] { --rg-bg: #11120F; --rg-card: #181915; --rg-line: #2A2B25; --rg-gold: #D4AF37; --rg-coral: #FF4D6D; --rg-track: #23241F; --rg-dairy: #E8E4D9; --rg-good: #52B788; }
.rg { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 16px 16px 18px; border-radius: 28px; background: radial-gradient(70% 45% at 50% 40%, color-mix(in srgb, var(--rg-gold) 9%, transparent), transparent 70%), var(--rg-bg); border: 1px solid var(--rg-line); min-width: 0; }
.rg-head { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.rg-head .eyebrow { color: var(--muted); letter-spacing: 2.4px; }
.rg-range { font: 600 11px var(--mono); letter-spacing: 1px; color: var(--ink); border: 1px solid var(--rg-line); border-radius: 999px; padding: 4px 10px; }
.rg-wrap { position: relative; width: min(290px, 82vw); aspect-ratio: 1; max-width: 100%; }
.rg-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.rg-svg circle { fill: none; }
.rg-track { stroke: var(--rg-track); stroke-width: 12; }
.rg-track.empty { stroke-dasharray: 2 7; stroke-width: 10; }
.rg-arc { stroke-width: 12; }
.rg-usual { stroke: var(--rg-gold); stroke-width: 1.5; opacity: .6; }
.rg-learn { stroke: var(--rg-gold); stroke-width: 2.2; stroke-linecap: round; opacity: .85; }
.rg-flare { stroke: var(--rg-coral); stroke-width: 7; stroke-linecap: round; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--rg-coral) 70%, transparent)); }
.rg-mid { position: absolute; inset: 18%; display: grid; place-content: center; justify-items: center; gap: 4px; }
.rg-num { font: 400 clamp(46px, 14vw, 60px)/1 var(--serif); letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.rg-sub { font-size: 12.5px; color: var(--muted); }
.rg-pill { margin-top: 4px; font-size: 12px; font-weight: 650; border-radius: 999px; padding: 3px 10px; border: 1px solid color-mix(in srgb, var(--rg-gold) 55%, transparent); color: var(--rg-gold); white-space: nowrap; }
.rg-pill.up { color: var(--rg-coral); border-color: color-mix(in srgb, var(--rg-coral) 55%, transparent); background: color-mix(in srgb, var(--rg-coral) 10%, transparent); }
.rg-pill.down { color: var(--rg-good); border-color: color-mix(in srgb, var(--rg-good) 55%, transparent); }
.rg-tag { position: absolute; top: -4px; right: -6px; z-index: 2; display: grid; text-align: left; gap: 1px; font-size: 11.5px; padding: 6px 10px 6px 22px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--rg-coral) 55%, transparent); background: color-mix(in srgb, var(--rg-coral) 12%, var(--rg-bg)); }
.rg-tag i { position: absolute; left: 9px; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--rg-coral); }
.rg-tag b { color: var(--rg-coral); font-weight: 700; } .rg-tag span { font: 500 11px var(--mono); color: var(--ink); }
.rg-line { font-size: 15.5px; line-height: 1.45; max-width: 32ch; text-wrap: balance; }
.rg-orb { position: absolute; inset: 14%; }
.rg-q { font: 400 clamp(26px, 7.4vw, 32px)/1.08 var(--serif); letter-spacing: -.8px; text-wrap: balance; }
.rg-snap { display: inline-flex; align-items: center; gap: 8px; font: 750 16px var(--sans); color: #1D1F19; background: var(--rg-salmon); border-radius: 999px; padding: 13px 24px; min-height: 48px; box-shadow: 0 8px 24px color-mix(in srgb, var(--rg-salmon) 35%, transparent); }
.rg-snap span { font-size: 22px; line-height: 1; }
.rg-how { font-size: 12px; color: var(--muted); max-width: 34ch; }
.rg-next { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--muted); }
.rg-next svg { width: 15px; height: 15px; flex: none; }
/* the cards */
.rcs { display: grid; gap: 10px; min-width: 0; }
.rc-pair { display: grid; gap: 10px; min-width: 0; }
.rcs.two .rc-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rc { position: relative; display: grid; gap: 8px; align-content: start; text-align: left; background: var(--rg-card); border: 1px solid var(--rg-line); border-radius: 18px; padding: 14px; min-width: 0; }
.rc-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rc-h span { font: 500 11.5px var(--mono); color: var(--muted); }
.rc-t { font-size: 14.5px; font-weight: 750; }
.rc.locked { opacity: .62; border-style: dashed; }
.rc.locked p { font-size: 12.5px; color: var(--muted); }
.rc-lock { position: absolute; top: 14px; right: 14px; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; }
.rr, .ri, .rs { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.rr li { display: grid; grid-template-columns: 9px minmax(0, 7.5em) minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 13.5px; }
.rr li > i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.rr-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-bar { height: 6px; border-radius: 3px; background: var(--rg-track); overflow: hidden; }
.rr-bar em { display: block; height: 100%; border-radius: 3px; background: var(--c); }
.rr b, .ri b, .rs b { font: 600 13px var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.ri li, .rs li { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13.5px; min-width: 0; }
.ri li span, .rs li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ri small, .rs small { display: block; font-size: 11px; color: var(--muted); }
.rs small { display: block; margin: 0; color: var(--rg-gold); }
.rs li > i { width: 8px; height: 8px; border-radius: 50%; flex: none; align-self: center; }
.rs li span { flex: 1; }
.rs-trips { font-size: 13px; color: var(--muted); } .rs-trips b { color: var(--ink); font-size: 16px; }
.rs-bar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; }
.rs-ch { font: 500 11.5px var(--mono); color: var(--muted); }
.rc-more summary { font-size: 12.5px; font-weight: 700; color: var(--rg-gold); cursor: pointer; list-style: none; padding: 4px 0; }
.rc-more summary::-webkit-details-marker { display: none; }
.rc-more summary::after { content: " ›"; } .rc-more[open] summary::after { content: " ‹"; }
.rc-more > ul { margin-top: 6px; }
.rc-unlock { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--rg-line); padding-top: 10px; }
.rc-dots { display: inline-flex; gap: 4px; } .rc-dots i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--rg-salmon); } .rc-dots i.on { background: var(--rg-salmon); }
.rc-add { margin-left: auto; font: 750 13px var(--sans); color: #1D1F19; background: var(--rg-salmon); border-radius: 999px; padding: 9px 14px; min-height: 40px; }
/* motion: the arcs draw in, the flare breathes twice, the cards rise; only when the week's figures change */
@keyframes r-draw { from { stroke-dasharray: 0 var(--C); } }
@keyframes r-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes r-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes r-fade { from { opacity: 0; } }
.rg-wrap.play .rg-arc { animation: r-draw .9s cubic-bezier(.3, .7, .2, 1) both; animation-delay: calc(var(--i) * 90ms); }
.rg-wrap.play .rg-learn, .rg-wrap.play .rg-usual { animation: r-fade 1s ease .5s both; }
.rg-wrap.play .rg-flare { animation: r-fade .5s ease 1s both, r-breathe 1.6s ease-in-out 1.5s 2; }
.rg-wrap.play .rg-tag { animation: r-rise .5s ease 1.2s both; }
.rcs.play > *, .rcs.play .rc-pair > * { animation: r-rise .5s ease both; }
.rcs.play > :nth-child(2), .rcs.play .rc-pair > :nth-child(2) { animation-delay: .12s; }
@media (prefers-reduced-motion: reduce) { .rg-wrap.play *, .rcs.play * { animation: none !important; } }

/* ---------- v1.5.1: the eclipse in detail. The design's faces on Home, a dark disk and gold rim, thin arcs, taps, beads. */
:root { --rg-disk1: #FFFDF8; --rg-disk2: #EFE7D8; --f-serif: "Instrument Serif", Georgia, serif; --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace; --f-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --rg-disk1: #1E1F1A; --rg-disk2: #0C0D0A; } }
:root[data-theme="dark"] { --rg-disk1: #1E1F1A; --rg-disk2: #0C0D0A; }
.rg, .rcs, .rg-next, .bsheet { font-family: var(--f-sans); }
.rg-range, .rc-h span, .rr b, .ri b, .rs b, .rs-ch, .bs-items b, .rg-tag span { font-family: var(--f-mono); }
.rg-wrap { width: min(310px, 86vw); }
.rg-disk { stroke: color-mix(in srgb, var(--rg-gold) 22%, transparent); stroke-width: 1; }
.rg-track { stroke-width: 7; opacity: .7; }
.rg-arc { stroke-width: 8; stroke-linecap: round; }
.rg-hit { stroke: transparent; stroke-width: 34; fill: none; pointer-events: stroke; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rg-flare { stroke-width: 6; cursor: pointer; pointer-events: stroke; }
.rg-learn { stroke-width: 2; } .rg-usual { stroke-width: 1.2; }
.rg-mid { inset: 22%; }
.rg-num { font: 400 clamp(54px, 17vw, 70px)/.95 var(--f-serif); letter-spacing: -1.5px; }
.rg-sub { font-size: 12.5px; }
.rg-line { font-size: 15.5px; font-weight: 600; }
.rg-joke { font: italic 400 22px/1.2 var(--f-serif); color: var(--rg-gold); max-width: 28ch; text-wrap: balance; margin-top: -2px; }
.rg-stale { font-size: 12.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 6px; }
.rg-tip { font-size: 12px; color: var(--muted); }
.rg-tag { cursor: pointer; font-family: var(--f-sans); color: inherit; }
.rg-q { font-family: var(--f-serif); font-size: clamp(30px, 8.6vw, 38px); }
.rg-snap { font-family: var(--f-sans); }
.rr li { display: block; }
.rr li button { width: 100%; display: grid; grid-template-columns: 9px minmax(0, 7.2em) minmax(0, 1fr) auto 10px; align-items: center; gap: 8px; font: inherit; font-size: 13.5px; color: inherit; background: none; border: 0; padding: 6px 0; min-height: 36px; text-align: left; cursor: pointer; }
.rr li button > i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.rr-go { color: var(--muted); font-size: 14px; }
.rc-t { font-weight: 700; }
/* beads: when a receipt lands they rise from the + and settle into the arcs */
.rg-bead { opacity: 0; transform-box: fill-box; transform-origin: center; pointer-events: none; }
@keyframes r-land { 0% { opacity: 0; transform: translate(var(--x0), var(--y0)) scale(.6); } 12% { opacity: 1; } 78% { opacity: 1; transform: translate(0, 0) scale(1.15); } 100% { opacity: 0; transform: translate(0, 0) scale(.8); } }
.rg-wrap.land .rg-bead { animation: r-land 1.25s cubic-bezier(.25, .7, .25, 1) both; animation-delay: var(--d); }
.rg-wrap.land .rg-arc { animation-delay: calc(900ms + var(--i) * 90ms); }
/* the group sheet */
.bsheet { display: grid; gap: 10px; }
.bs-h { display: flex; align-items: center; gap: 10px; font: 400 30px/1.1 var(--f-serif); }
.bs-h i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
.bs-h b { margin-left: auto; font-weight: 400; }
.bs-vs { font-size: 13.5px; color: var(--muted); } .bs-vs.up { color: var(--rg-coral); font-weight: 600; }
.bs-items { list-style: none; margin: 0; padding: 0; display: grid; }
.bs-items li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.bs-items small { display: block; font-size: 12px; color: var(--muted); }
.bs-foot { font-size: 12px; color: var(--muted); }
.cur .chips button span { color: var(--muted); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .rg-wrap.land .rg-bead { animation: none; } }
.rg-mid { pointer-events: none; } /* the number never blocks a tap on the arcs behind it */

/* v1.6 "Meet Doof": the character and his lines. Only in builds made with DOOF_CHAR=on (scripts add this file then). */
:root { --df-ink: var(--ink); --df-dot: #BE452F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --df-dot: #E55D3F; } }
:root[data-theme="dark"] { --df-dot: #E55D3F; }
.doof { display: block; width: 100%; height: auto; overflow: visible; }
.doof .df-eye, .doof .df-g { fill: var(--df-ink); }
.doof .df-g { opacity: .13; }
.doof .df-ring { fill: none; stroke: var(--rg-gold); stroke-width: 10; stroke-linecap: round; opacity: .9; }
.doof .df-m { fill: var(--df-dot); }
.doof .df-bill { fill: var(--rg-card); stroke: var(--df-ink); stroke-opacity: .35; stroke-width: 5; opacity: 0; }
.df-say { font: italic 400 22px/1.2 var(--f-serif); color: var(--ink); max-width: 26ch; text-wrap: balance; text-align: center; }

/* Home: the face inside an empty ring, then the small "oo." on the rim of the arc he is talking about */
.rg-doof { position: absolute; inset: 0; pointer-events: none; }
.rg-doof .doof { width: 100%; height: 100%; }
.df-rim { position: absolute; z-index: 3; width: 46px; height: 46px; margin: -23px 0 0 -23px; padding: 6px 5px 4px; border-radius: 50%; background: var(--rg-card);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--rg-gold) 70%, transparent), 0 6px 18px rgba(0, 0, 0, .18); display: grid; place-items: center; }
.rg-wrap.play .df-rim { animation: df-pop .5s 1s both cubic-bezier(.2, 1.4, .4, 1); } /* only when the week's figures changed */
.df-rim .doof { width: 100%; height: 100%; }
.df-rim:focus-visible { outline: 2px solid var(--focus, #2E6BD8); outline-offset: 3px; }
@keyframes df-pop { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
.rg-joke.df-said { color: var(--ink); }

/* reading, the quick check, saved */
.reading.df-reading { gap: 10px; }
.df-stage { width: min(250px, 66vw); }
.df-secs { font-variant-numeric: tabular-nums; }
.df-head { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.df-head .doof { width: 40px; flex: none; }
.df-head p { font: italic 400 20px/1.2 var(--f-serif); }
.df-head b { font-weight: 400; }
.df-head .muted { font: 500 12px var(--sans); font-style: normal; }
.df-done, .df-scan { display: grid; justify-items: center; gap: 4px; margin: 2px 0 12px; }
.df-done .doof { width: min(190px, 52vw); }
.df-scan .doof { width: min(150px, 42vw); }

/* House: Doof's tadka */
.df-tadka .chips { margin-top: 10px; }
.df-tadka .df-soon { opacity: .55; }
.df-tadka .df-soon small { font-size: 11px; font-weight: 500; margin-left: 2px; }
.df-sample { display: flex; align-items: center; gap: 10px; margin-top: 12px; font: italic 400 18px/1.25 var(--f-serif); }
.df-sample .doof { width: 36px; flex: none; }

@media (prefers-reduced-motion: reduce) { .rg-wrap.play .df-rim { animation: none; } }
