:root {
  --paper: #F3F5F0; --ink: #15201A; --muted: #58655C; --line: #D5DCD2; --row-line: #E1E6DE; --tile: #EAEEE6; --white: #FFFFFF;
  --tomato: #CC3D27; --link: #B23522; --basil: #2C6843; --yolk: #E2A11E; --indigo: #2D4C7C;
  --w-tomato: #FBE4DE; --w-basil: #DEEBE2; --w-yolk: #FAEFD4; --w-indigo: #E0E7F2; --tip-ink: #6B5310;
  --cook: #15201A; --coral: #F06A50; --cook-muted: #A9B4AC; --cook-line: #33423A; --cook-track: #3A4840; --cook-chip: #26342B;
  --display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --tabbar: calc(62px + max(14px, env(safe-area-inset-bottom)));
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.35; -webkit-tap-highlight-color: transparent; }
a { color: var(--ink); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }

.screen { max-width: 480px; margin: 0 auto; min-height: 100dvh; padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) calc(var(--tabbar) + 16px) max(16px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 12px; }
.screen.no-tabs { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }
.row-flex { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.push-down { margin-top: auto; }

.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding-top: 24px; padding-bottom: 2px; }
.top > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.title { margin: 0; font-family: var(--display); font-weight: 900; font-size: 42px; line-height: 0.9; text-transform: uppercase; overflow-wrap: anywhere; }
.avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 900; font-size: 17px; background: var(--ink); color: var(--paper); }
.avatar.ludo { background: var(--tomato); color: var(--white); }
.avatar.sm { width: 28px; height: 28px; font-size: 15px; }
a.avatar { min-width: 44px; min-height: 44px; background: none; }
a.avatar span { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: var(--paper); }
a.avatar.ludo span { background: var(--tomato); color: var(--white); }

.label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.label.strong { font-weight: 600; letter-spacing: 0.08em; }
h2.label { margin: 4px 0; font-weight: 600; letter-spacing: 0.08em; }
.name { font-weight: 600; font-size: 17px; }
.sub { font-size: 13.5px; color: var(--muted); }
.small { font-size: 12.5px; line-height: 17px; color: var(--muted); }
.mono { font-family: var(--mono); }
.lede { margin: 0; font-size: 15px; line-height: 21px; color: var(--muted); }
.red { font-weight: 600; color: var(--link); }
.indigo { font-weight: 600; color: var(--indigo); }
.basil { color: var(--basil); }
.notice { padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 18px; background: var(--tile); }
.notice.error { background: var(--w-tomato); color: var(--link); font-weight: 600; }
.notice.indigo { border: 1.5px dashed var(--indigo); background: var(--w-indigo); font-weight: 400; color: var(--ink); }

.card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.card.tomato { background: var(--w-tomato); border-color: transparent; gap: 10px; }
.card.dashed { background: none; border: 1.5px dashed var(--line); }
.card.plain { background: none; }
.card.flush { padding: 4px 12px; gap: 0; }
.card.today { border: 2px solid var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--tomato); color: var(--white); font-weight: 600; font-size: 15px; text-align: center; }
.btn.block { display: flex; width: 100%; min-height: 48px; }
.btn.sm { min-height: 38px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.btn.xs { min-height: 34px; padding: 0 12px; border-radius: 9px; font-size: 13px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.quiet { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.dark { background: var(--ink); color: var(--paper); }
.btn[disabled] { opacity: 0.55; }
.btn-row { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.btn-row.even { grid-template-columns: 1fr 1fr; }
form.inline { display: inline; margin: 0; }
.linkish { display: inline-flex; align-items: center; background: none; border: 0; padding: 0; font-weight: 600; font-size: 12.5px; color: var(--ink); min-height: 32px; }
.linkish.indigo { color: var(--indigo); }

input.field, select.field, textarea.field { width: 100%; height: 48px; border: 1.5px solid var(--line); border-radius: 14px; padding: 0 14px; background: var(--white); font-size: 16px; }
textarea.field { height: auto; min-height: 72px; padding: 12px 14px; }
input.field:focus, textarea.field:focus { outline: 2px solid var(--ink); outline-offset: 0; }

.thumb { flex: none; width: 40px; height: 40px; border-radius: 10px; overflow: hidden; background: var(--tile); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 900; font-size: 20px; color: rgba(21, 32, 26, 0.55); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.lg { width: 52px; height: 52px; border-radius: 12px; font-size: 26px; }
.thumb.xl { width: 64px; height: 64px; border-radius: 14px; font-size: 30px; }
.thumb.hero { width: 120px; height: 120px; border-radius: 18px; font-size: 54px; box-shadow: inset 0 0 0 1px var(--line); }
.thumb.mid { width: 92px; height: 92px; border-radius: 16px; font-size: 44px; box-shadow: inset 0 0 0 1px var(--line); }
.thumb.counter { width: 96px; height: 96px; border-radius: 16px; font-size: 44px; }

nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--white); border-top: 1px solid var(--line); padding: 8px max(0px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(0px, env(safe-area-inset-left)); }
nav.tabs > div { max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
nav.tabs a { min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); position: relative; }
nav.tabs a[aria-current] { color: var(--tomato); font-weight: 600; }
nav.tabs .dot { position: absolute; top: 0; left: calc(50% + 8px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--tomato); color: var(--white); font-family: var(--mono); font-size: 10px; font-weight: 600; display: flex; align-items: center; justify-content: center; }

/* Today */
.meal-row { display: flex; align-items: center; gap: 12px; }
.portion { display: flex; flex-wrap: wrap; gap: 6px; }

/* Week */
.day { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px 4px; display: flex; flex-direction: column; scroll-margin-top: 16px; }
.day.today { border: 2px solid var(--ink); }
.day.past { opacity: 0.7; }
.day-head { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; }
.day-name { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1; text-transform: uppercase; }
.day-num { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.day-flag { margin-left: auto; font-family: var(--mono); font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--tomato); }
.slot { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px dashed var(--line); }
.slot > .label { font-size: 10.5px; padding-top: 3px; }
.slot .what { display: flex; flex-direction: column; gap: 2px; }
.slot .what .nm { font-weight: 600; font-size: 16px; }
.slot .what .sb { font-size: 13px; color: var(--muted); }
.slot .actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 6px; }
.slot .actions .linkish { font-size: 14px; min-height: 36px; }
.week-head { font-family: var(--display); font-weight: 800; font-size: 24px; text-transform: uppercase; margin: 10px 0 0; }
.pill { display: inline-block; font-family: var(--mono); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px; background: var(--ink); color: var(--paper); }
.pill.soft { background: var(--w-basil); color: var(--ink); }
.pill.yolk { background: var(--w-yolk); color: var(--ink); }
.pill.indigo { background: var(--w-indigo); color: var(--indigo); }
.pill.tomato { background: var(--w-tomato); color: var(--ink); }
.toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); font-size: 13px; font-weight: 600; }
.toggle[aria-pressed='true'] { border-color: var(--basil); background: var(--w-basil); color: var(--basil); }

/* Pick and swap lists */
.option { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; width: 100%; text-align: left; }
.option.draft { border: 1.5px dashed var(--indigo); border-radius: 12px; padding: 10px 12px; }
.option .nm { font-weight: 600; font-size: 16.5px; }
.option .one { font-size: 13.5px; line-height: 18px; }
.option .nums { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.option .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; font-size: 12.5px; padding: 4px 9px; border-radius: 999px; background: var(--tile); }
.chip.tomato { background: var(--w-tomato); }
.chip.basil { background: var(--w-basil); }
.chip.yolk { background: var(--w-yolk); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
a.chip-link, .chip-link { display: inline-flex; align-items: center; min-height: 34px; font-size: 13.5px; padding: 5px 11px; border-radius: 999px; background: var(--white); border: 1.5px solid var(--line); }
.chip-link[aria-current] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Plan next week */
.plan-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.plan-row:last-child { border-bottom: 0; }
.plan-row .dn { font-family: var(--display); font-weight: 800; font-size: 18px; text-transform: uppercase; }
.plan-row .nm { font-weight: 700; font-size: 15px; }
.plan-row .why { margin-top: 2px; font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--basil); }
.plan-row .btn { min-height: 36px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; }

/* Shop */
.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--tile); border-radius: 12px; padding: 4px; }
.segmented a { text-align: center; padding: 9px; min-height: 40px; border-radius: 9px; font-weight: 600; }
.segmented a[aria-current] { background: var(--white); }
.segmented .n { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 400; }
.progress { height: 6px; border-radius: 6px; background: var(--tile); overflow: hidden; }
.progress > div { height: 6px; background: var(--yolk); }
.status { background: var(--ink); color: var(--paper); border-radius: 12px; padding: 9px 14px; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.status span:last-child { opacity: 0.7; }
.aisle-head { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.aisle-head .n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; font-weight: 600; }
.aisle-head h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 20px; line-height: 1; text-transform: uppercase; }
.aisle-hint { margin: 6px 0 2px; font-size: 13px; line-height: 18px; color: var(--muted); }
.item { display: grid; grid-template-columns: 32px 40px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.item .tick { width: 44px; height: 44px; margin: -9px -6px -9px -6px; padding: 9px; border: 0; background: none; display: flex; align-items: center; justify-content: center; }
.item .tick span { width: 26px; height: 26px; border-radius: 7px; border: 2px solid #8A968D; display: flex; align-items: center; justify-content: center; }
.item .tick svg { opacity: 0; }
.item.ticked .tick span { border: 0; background: var(--basil); }
.item.ticked .tick svg { opacity: 1; }
.item.ticked .thumb { opacity: 0.6; }
.item .nm { font-weight: 600; font-size: 15.5px; }
.item.ticked .nm { text-decoration: line-through; color: var(--muted); }
.item .qty { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.item .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; font-size: 12.5px; color: var(--muted); }
.item .meta a, .item .meta button { font-weight: 600; color: var(--ink); min-height: 30px; display: inline-flex; align-items: center; }
.item .meta .move { color: var(--indigo); }
.item.pending .tick span { border-style: dashed; }
.add-item { display: flex; gap: 8px; margin-top: 4px; }
.add-item .btn { flex: none; min-height: 48px; }

/* Staples */
.staple { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--row-line); }
.staple:last-child { border-bottom: 0; }
.seg3 { display: grid; grid-template-columns: repeat(3, 44px); gap: 3px; background: var(--tile); border-radius: 9px; padding: 3px; }
.seg3 button { min-height: 38px; padding: 0; border: 0; border-radius: 7px; background: none; font-size: 12px; font-weight: 600; color: var(--muted); }
.seg3 button[aria-checked='true'][value='have'] { background: var(--white); color: var(--ink); }
.seg3 button[aria-checked='true'][value='low'] { background: var(--yolk); color: var(--ink); }
.seg3 button[aria-checked='true'][value='out'] { background: var(--tomato); color: var(--white); }
.seg3.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg3.wide button { font-size: 12.5px; }
.seg3.wide button[aria-checked='true'] { background: var(--tomato); color: var(--white); }

/* Recipe */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { background: var(--tile); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.stat b { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1; }
.stat span { font-size: 11.5px; color: var(--muted); }
.ing { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); min-height: 52px; }
.ing .nm { flex: 1; font-size: 15.5px; }
.ing .g { font-family: var(--mono); font-size: 12.5px; }
ol.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; line-height: 20px; }

/* Explainer sheets */
body.sheet { background: #7E8781; }
body.sheet.deep { background: #3B4640; }
.sheet-wrap { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.backdrop { flex: none; min-height: calc(96px + env(safe-area-inset-top)); display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: env(safe-area-inset-top) 16px 16px; color: #DDE3DE; }
.backdrop .big { font-family: var(--display); font-weight: 900; font-size: 42px; line-height: 0.9; text-transform: uppercase; }
.panel { flex: 1; background: var(--paper); border-radius: 24px 24px 0 0; padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.grabber { align-self: center; width: 40px; height: 5px; border-radius: 5px; background: #C5CCC4; }
.panel h1 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 32px; line-height: 0.95; text-transform: uppercase; }
.panel h1.dish { font-size: 40px; line-height: 0.9; }
.panel h1.swap { font-size: 38px; line-height: 0.92; }
.say { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.lead { margin: 0; font-size: 18px; line-height: 25px; font-weight: 500; }
.facts { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.facts .k { font-family: var(--mono); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding-top: 2px; }
.facts .v { font-size: 15.5px; }
.tip { display: flex; align-items: center; gap: 10px; background: var(--w-yolk); border-radius: 12px; padding: 11px 14px; }
.tip .k { font-family: var(--mono); font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--tip-ink); }
.tip .v { font-size: 15px; line-height: 20px; }
.family { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.family > * { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; display: flex; flex-direction: column; gap: 2px; text-align: center; }
.family > .base { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.family b { font-weight: 600; font-size: 13px; }
.family span { font-size: 11px; color: var(--muted); }
.family .base span { color: var(--cook-muted); }
.pic3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pic3 > div { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 13px; line-height: 17px; }
.pic3 b { font-family: var(--display); font-size: 26px; line-height: 1; }

/* Atlas */
.atlas-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; }
.atlas-grid a { display: flex; flex-direction: column; gap: 2px; }
.atlas-grid .pic { width: 100%; height: 108px; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px var(--row-line); font-family: var(--display); font-weight: 900; font-size: 48px; color: rgba(21, 32, 26, 0.45); }
.atlas-grid .pic img { width: 100%; height: 100%; object-fit: cover; }
.atlas-grid .nm { font-weight: 600; font-size: 13.5px; line-height: 17px; margin-top: 4px; }
.flag { display: flex; gap: 4px; align-items: center; font-size: 11.5px; color: var(--muted); }
.flag i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.flag i.season { background: var(--basil); }
.flag i.counter { border: 2px solid var(--tomato); }
.flag i.staple { border-radius: 2px; background: var(--yolk); }
.flag.avoid { font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--link); }
.product-hero { position: relative; height: 170px; border-radius: 18px; overflow: hidden; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px var(--line); font-family: var(--display); font-weight: 900; font-size: 96px; color: rgba(21, 32, 26, 0.35); }
.product-hero img { width: 100%; height: 170px; object-fit: contain; }
.sticker { position: absolute; right: 12px; bottom: 12px; background: var(--white); color: #1A1A1A; font-family: var(--mono); font-size: 11px; padding: 5px 8px; border-radius: 4px; transform: rotate(-2deg); box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.3); }
.sayit { background: var(--ink); color: var(--paper); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.sayit .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cook-muted); }
.sayit .it { font-weight: 600; font-size: 17px; line-height: 22px; }
.sayit .en { font-size: 12.5px; color: var(--cook-muted); }
.dish-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* Review: drafted recipes waiting for one of you */
.card.review { gap: 10px; padding: 14px; }
.card.review h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1; text-transform: uppercase; overflow-wrap: anywhere; }
.tag { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 11px; line-height: 15px; padding: 3px 8px; border-radius: 6px; background: var(--tile); color: var(--ink); }
.tag.indigo { background: var(--w-indigo); }
.tag.basil { background: var(--w-basil); }
.tag.yolk { background: var(--w-yolk); }
.tag.tomato { background: var(--w-tomato); color: var(--link); font-weight: 600; }
.ing-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--row-line); font-size: 15px; }
.ing-row .g { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.new-product { display: flex; flex-direction: column; gap: 4px; padding: 10px 0 2px; border-top: 1px dashed var(--line); }
.source { font-family: var(--mono); font-size: 11px; line-height: 15px; color: var(--muted); overflow-wrap: anywhere; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin-top: 4px; }
.review-actions .approve { flex: 1; min-width: 100px; }
.review-actions details[open] { flex-basis: 100%; order: 3; display: flex; flex-direction: column; gap: 8px; }
.review-actions summary { list-style: none; cursor: pointer; }
.review-actions summary::-webkit-details-marker { display: none; }
.btn.quiet-text { background: transparent; color: var(--muted); padding: 0 12px; }
.job { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; border-radius: 12px; border: 1.5px dashed var(--indigo); background: var(--w-indigo); font-size: 14px; line-height: 19px; }
.job.failed { border-color: var(--tomato); background: var(--w-tomato); }
.working { display: inline-flex; gap: 4px; flex: none; }
.working i { width: 7px; height: 7px; border-radius: 50%; background: var(--indigo); animation: working 1.2s ease-in-out infinite; }
.working i:nth-child(2) { animation-delay: 0.15s; }
.working i:nth-child(3) { animation-delay: 0.3s; }
@keyframes working { 0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .working i { animation: none; opacity: 0.7; } }

/* Ask */
.bubble-me { align-self: flex-end; max-width: 78%; background: var(--ink); color: var(--paper); border-radius: 16px 16px 4px 16px; padding: 10px 14px; font-size: 15.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble-bot { align-self: flex-start; width: 88%; background: var(--white); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 21px; }
.bubble-bot p { margin: 0; white-space: pre-wrap; }
.action { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: var(--paper); font-size: 14px; line-height: 18px; }
.action.undone { opacity: 0.55; }
.composer { display: flex; align-items: center; gap: 8px; }
.composer .send { flex: none; width: 48px; height: 48px; border: 0; border-radius: 14px; background: var(--tomato); display: flex; align-items: center; justify-content: center; }
.suggest { font-size: 13px; padding: 6px 11px; min-height: 34px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); }

/* Cook mode and the counter screen */
body.dark { background: var(--cook); color: var(--paper); }
body.dark a { color: var(--paper); }
.dark-screen { max-width: 480px; margin: 0 auto; min-height: 100dvh; padding: calc(16px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.dark-top { display: flex; justify-content: space-between; align-items: center; }
.dark-top a { font-weight: 600; padding: 10px 0; min-height: 44px; display: inline-flex; align-items: center; }
.outline-pill { font-family: var(--mono); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 9px; border: 1px solid var(--paper); border-radius: 999px; }
.dark .kicker { color: var(--cook-muted); }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.bars span { height: 4px; border-radius: 4px; background: var(--cook-track); }
.bars span.on { background: var(--coral); }
.step { display: flex; flex-direction: column; gap: 14px; }
.cook-js .step:not(.current) { display: none; }
.step-text { margin: 4px 0 0; font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1.04; overflow-wrap: anywhere; }
.step-text.long { font-size: 31px; }
.step-text.longer { font-size: 26px; }
.term { display: block; border: 1.5px dashed var(--cook-muted); border-radius: 12px; padding: 10px 12px; font-size: 14.5px; line-height: 20px; }
.term b { font-family: var(--mono); font-weight: 600; color: var(--coral); }
.timer-start { align-self: flex-start; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--coral); background: transparent; color: var(--coral); font-weight: 600; }
.timers { display: flex; flex-direction: column; gap: 10px; }
.timer { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.timer .clock { font-family: var(--mono); font-size: 48px; font-weight: 500; letter-spacing: 0.03em; line-height: 1; }
.timer .lbl { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: var(--cook-muted); flex: 1; min-width: 120px; }
.timer .lbl b { color: var(--paper); font-weight: 600; }
.timer button { min-height: 40px; padding: 0 14px; border: 1.5px solid var(--paper); border-radius: 10px; background: transparent; color: var(--paper); font-weight: 600; font-size: 14px; }
.timer.done .clock { color: var(--coral); }
.cook-ings { font-size: 14.5px; }
.cook-ings summary { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cook-muted); padding: 8px 0; min-height: 44px; display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; }
.cook-ings summary::-webkit-details-marker { display: none; }
.cook-ings summary::after { content: 'Show'; color: var(--cook-text, #F3F5F0); font-weight: 600; }
.cook-ings[open] summary::after { content: 'Hide'; }
.cook-ings div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--cook-line); }
.cook-nav { margin-top: auto; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.cook-nav a, .cook-nav button { min-height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px; font-weight: 600; font-size: 15px; }
.cook-nav .back { border: 1.5px solid var(--paper); background: transparent; color: var(--paper); }
.cook-nav .next { border: 0; background: var(--coral); color: var(--ink) !important; width: 100%; }
.cook-done { margin: 0; }
.say-big { margin: 6px 0 0; font-family: var(--display); font-weight: 800; font-size: 46px; line-height: 1.02; }
.dark-chip { font-family: var(--mono); font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--cook-chip); }
.dark-rule { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--cook-line); }

/* Sign-in */
.login { max-width: 420px; margin: 0 auto; min-height: 100dvh; padding: calc(48px + env(safe-area-inset-top)) 20px 32px; display: flex; flex-direction: column; gap: 16px; }
.code-input { letter-spacing: 0.3em; font-family: var(--mono); font-size: 22px !important; text-align: center; }

@media (min-width: 700px) {
  .screen, .sheet-wrap, .dark-screen { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
.timer-start { display: none; }
.cook-js .timer-start { display: inline-flex; align-items: center; }
.busy { opacity: 0.6; pointer-events: none; }
.cook-done.hidden { display: none; }
