/* Pantry Plan · iPhone web app styles */
:root {
  --bg: #F5ECE1; --card: #FFFBF5; --sunk: #ECE1D2; --sheet: #FBF5EE;
  --ink: #1D1511; --ink2: #574940; --ink3: #71635A; --line: #E5D7C6; --line2: #D3C1AC;
  --red: #B3312A; --red-text: #A62B24; --red-tint: #F8DED7;
  --blue: #1F5FA8; --blue-text: #1C5597; --blue-tint: #E3ECF7;
  --green: #2E6A3E; --green-tint: #E2EEDD; --amber: #8A5208; --amber-tint: #F8E7C7;
  --left-bg: #EADCC9; --left-fg: #5A4532;
  --scrim: rgba(35,22,14,.42); --shadow: 0 1px 0 rgba(70,45,20,.04), 0 8px 20px -14px rgba(90,55,20,.30);
  --tab: rgba(250,244,236,.94); --toast-bg: #231A15; --toast-fg: #FBF4EC; --toast-accent: #FF9F8E;
  --check2: #FFFBF5;
  --f: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Helvetica Neue", sans-serif;
  --d: "Bricolage Grotesque", -apple-system, "SF Pro Display", system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17120F; --card: #221B17; --sunk: #2E2621; --sheet: #1E1815;
    --ink: #F6EDE3; --ink2: #CFC1B3; --ink3: #A99A8C; --line: #382E28; --line2: #4D4038;
    --red: #C8402F; --red-text: #F2846F; --red-tint: #3B1E19;
    --blue: #24538A; --blue-text: #94BDF0; --blue-tint: #162536;
    --green: #80C592; --green-tint: #16291B; --amber: #EDB766; --amber-tint: #33270F;
    --left-bg: #3B3027; --left-fg: #E8D3BB; --scrim: rgba(0,0,0,.62); --shadow: none;
    --tab: rgba(27,21,18,.94); --toast-bg: #F3E9DE; --toast-fg: #1D1511; --toast-accent: #A62B24; --check2: #221B17;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17120F; --card: #221B17; --sunk: #2E2621; --sheet: #1E1815;
  --ink: #F6EDE3; --ink2: #CFC1B3; --ink3: #A99A8C; --line: #382E28; --line2: #4D4038;
  --red: #C8402F; --red-text: #F2846F; --red-tint: #3B1E19;
  --blue: #24538A; --blue-text: #94BDF0; --blue-tint: #162536;
  --green: #80C592; --green-tint: #16291B; --amber: #EDB766; --amber-tint: #33270F;
  --left-bg: #3B3027; --left-fg: #E8D3BB; --scrim: rgba(0,0,0,.62); --shadow: none;
  --tab: rgba(27,21,18,.94); --toast-bg: #F3E9DE; --toast-fg: #1D1511; --toast-accent: #A62B24; --check2: #221B17;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--f); -webkit-font-smoothing: antialiased; }
body { overflow: hidden; overscroll-behavior: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Shell ---------- */
.app { position: fixed; inset: 0; display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; }
.checker { flex: none; height: 6px; margin-top: var(--safe-top); background-image: repeating-conic-gradient(var(--red) 0% 25%, var(--check2) 0% 50%); background-size: 6px 6px; }
.main { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.page { display: flex; flex-direction: column; gap: 16px; padding: 12px 16px 32px; }
.tabbar[hidden] { display: none; }
.tabbar { flex: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0 4px var(--safe-bottom); min-height: 56px; background: var(--tab); border-top: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 6px 0 4px; border: 0; background: none; color: var(--ink3); font: 600 10.5px/1 var(--f); }
.tab[aria-current="page"] { color: var(--red-text); }
.tab .ico { position: relative; display: flex; }
.badge { position: absolute; top: -4px; right: -11px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font: 700 11px/19px var(--f); text-align: center; }

/* ---------- Type ---------- */
.hdr { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.hdr > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hdr > .hdr-actions { flex-direction: row; gap: 8px; align-items: center; }
.eyebrow { font: 700 12px/1.2 var(--f); letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.title { margin: 0; font: 800 34px/1.05 var(--d); letter-spacing: -.02em; }
.h2 { margin: 0; font: 750 20px/1.2 var(--d); letter-spacing: -.01em; }
.h3 { margin: 0; font: 650 17px/1.25 var(--f); }
.body { margin: 0; font: 400 15px/1.4 var(--f); color: var(--ink2); text-wrap: pretty; }
.small { font: 400 13px/1.35 var(--f); color: var(--ink3); }
.label { margin: 0; font: 700 13px/1.2 var(--f); letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); }
.count-red { font: 700 17px/1 var(--f); color: var(--red-text); }
.mono { font: 500 11.5px/1.2 ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink3); }

/* ---------- Surfaces ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.pad { padding: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-s { display: flex; flex-direction: column; gap: 6px; }
.row-wrap { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.list { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.list > * + * { border-top: 1px solid var(--line); }
.lrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 16px; border: 0; background: transparent; color: var(--ink); font: 600 16px/1.25 var(--f); text-align: left; }
.lrow .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lrow.danger { color: var(--red-text); }
.sunk { background: var(--sunk); border-radius: 16px; padding: 14px 16px; }

/* ---------- Pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font: 700 10.5px/1 var(--f); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; flex: none; border: 1px solid transparent; }
.pill.cook, .pill.allergy { background: var(--red); color: #fff; }
.pill.left { background: var(--left-bg); color: var(--left-fg); }
.pill.flex, .pill.added { color: var(--ink2); border-color: var(--line2); }
.pill.out, .pill.prefer { color: var(--ink2); border: 1px dashed var(--ink3); }
.pill.staple, .pill.neutral { background: var(--sunk); color: var(--ink2); }
.pill.plan, .pill.urgent { background: var(--red-tint); color: var(--red-text); }
.pill.low { background: var(--amber-tint); color: var(--amber); }
.pill.thaw { background: var(--blue-tint); color: var(--blue-text); }
.pill.ok { background: var(--green-tint); color: var(--green); }
.pill.wont { background: var(--ink); color: var(--bg); }
.uses { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--green-tint); color: var(--green); font: 650 12px/1 var(--f); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); font: 600 15px/1.1 var(--f); }
.btn.primary { min-height: 52px; border: 0; border-radius: 14px; background: var(--red); color: #fff; font: 650 17px/1.1 var(--f); width: 100%; }
.btn.big { min-height: 58px; font-size: 18px; }
.btn.ghost { min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--red-text); }
.btn.full { width: 100%; }
.btn.danger { color: var(--red-text); }
.btn.approve { background: var(--green-tint); border-color: var(--green); color: var(--green); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; }
.chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); font: 600 15px/1 var(--f); white-space: nowrap; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip.red, .chip.on.red { background: var(--red); border-color: var(--red); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; }
.icon-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; padding: 0; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.icon-btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

/* ---------- Segmented ---------- */
.seg { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 2px; padding: 3px; border-radius: 12px; background: var(--sunk); }
.seg button { min-height: 42px; border: 0; border-radius: 9px; background: none; color: var(--ink2); font: 600 15px/1 var(--f); }
.seg button[aria-selected="true"] { background: var(--card); color: var(--ink); font-weight: 650; box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.seg .n { opacity: .6; font-weight: 500; }

/* ---------- Inputs ---------- */
.input { width: 100%; min-height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); font: 400 17px/1.2 var(--f); outline: none; -webkit-appearance: none; }
.input:focus { border-color: var(--ink2); }
textarea.input { min-height: 180px; padding: 12px 14px; font-size: 15px; line-height: 1.45; resize: vertical; }
.inline { display: flex; gap: 8px; }
.inline .input { flex: 1; }
.inline .btn.primary { width: auto; padding: 0 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.switch { position: relative; width: 52px; height: 32px; flex: none; border: 0; padding: 0; border-radius: 999px; background: var(--line2); transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .2s; }
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"]::after { left: 23px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper .val { min-width: 64px; text-align: center; font: 700 16px/1.2 var(--f); }
.box { width: 28px; height: 28px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 8px; border: 2px solid var(--line2); background: var(--card); color: transparent; }
[aria-checked="true"] > .box { border-color: var(--green); background: var(--green); color: var(--card); }

/* ---------- Tonight ---------- */
.hero { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.hero-name { margin: 0; font: 800 32px/1.04 var(--d); letter-spacing: -.02em; text-wrap: balance; }
.meta { display: flex; align-items: center; gap: 8px; font: 500 14px/1.35 var(--f); color: var(--ink2); }
.thaw { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 20px; background: var(--blue); color: #fff; }
.thaw .thaw-ico { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; flex: none; border-radius: 16px; background: rgba(255,255,255,.16); }
.thaw .what { font: 800 23px/1.12 var(--d); letter-spacing: -.01em; }
.thaw .btn { border: 0; background: #fff; color: var(--blue); min-height: 50px; font-size: 16px; }
.thaw-soft { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--blue-tint); color: var(--blue-text); }
.amber-card { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 14px; border: 0; border-radius: 16px; background: var(--amber-tint); color: var(--ink); text-align: left; }
.coming { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.coming .card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 132px; padding: 12px; border-radius: 16px; text-align: left; color: var(--ink); }
.done-row { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 12px; background: var(--green-tint); color: var(--green); font: 650 15px/1.2 var(--f); }

/* ---------- Plan ---------- */
.prow { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 14px 12px; border: 0; background: transparent; text-align: left; color: var(--ink); }
.prow.today { background: var(--red-tint); }
.prow.moved { background: var(--sunk); }
.prow.past { opacity: .6; }
.date-col { flex: none; width: 38px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding-top: 2px; }
.date-col .dow { font: 700 11px/1 var(--f); letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.date-col .num { font: 800 22px/1 var(--d); }
.thaw-note { display: flex; gap: 6px; align-items: flex-start; font: 500 13px/1.3 var(--f); color: var(--blue-text); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .head { text-align: center; font: 700 11px/1 var(--f); letter-spacing: .06em; color: var(--ink3); padding: 4px 0; }
.cell { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 96px; padding: 7px 5px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); overflow: hidden; }
.cell.today { border: 2px solid var(--red); }
.cell.past { opacity: .55; background: var(--sunk); }
.cell .bar { width: 100%; height: 4px; border-radius: 2px; }
.cell .t { font: 500 10.5px/1.2 var(--f); text-align: left; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; width: 100%; }

/* ---------- Pantry ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 96px; padding: 12px 4px 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); font: 600 12.5px/1.2 var(--f); text-align: center; box-shadow: var(--shadow); }
.tile-ico { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: var(--red-tint); color: var(--red-text); }
.item { position: relative; overflow: hidden; }
.item .behind { position: absolute; top: 0; right: 0; bottom: 0; display: flex; }
.item .behind button { width: 76px; border: 0; font: 650 15px/1 var(--f); }
.item .behind .edit { background: var(--ink2); color: var(--bg); }
.item .behind .del { background: var(--red); color: #fff; }
.item .front { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; background: var(--card); transition: transform .22s ease; touch-action: pan-y; }
.item.open .front { transform: translateX(-152px); }
.item .name-btn { flex: 1; min-width: 0; min-height: 50px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; }
.item .nm { font: 650 16px/1.25 var(--f); }
.item .qt { font: 500 14px/1.25 var(--f); color: var(--ink2); }
.item .sub { display: flex; align-items: center; gap: 5px 6px; flex-wrap: wrap; font: 400 12.5px/1.3 var(--f); color: var(--ink3); }
.item .sub b { font-weight: 650; color: var(--ink2); }
.acts { flex: none; display: flex; gap: 4px; }
.act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 46px; height: 50px; padding: 0; border: 1px solid var(--line2); border-radius: 12px; background: var(--card); color: var(--ink); font: 650 10.5px/1 var(--f); }
.act.have { border-color: var(--green); background: var(--green-tint); color: var(--green); }
.act.low { border-color: var(--amber); background: var(--amber-tint); color: var(--amber); }

/* ---------- Shop ---------- */
.srow { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; }
.srow.fresh { background: var(--green-tint); transition: background 1s; }
.green-card { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: 18px; background: var(--green-tint); color: var(--green); }

/* ---------- Avoid ---------- */
.food { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 16px; border-radius: 18px; text-align: left; color: var(--ink); background: var(--card); border: 1px solid var(--line); }
.food.allergy { border: 2px solid var(--red); }
.food.prefer { border: 1.5px dashed var(--line2); background: transparent; }
.sev-ico { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: none; border-radius: 999px; }
.sev-ico.allergy { background: var(--red); color: #fff; }
.sev-ico.wont { background: var(--ink); color: var(--bg); }
.sev-ico.prefer { border: 2px dashed var(--ink3); color: var(--ink2); }
.food .fname { font: 750 19px/1.2 var(--d); }
.hidden-box { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 999px; color: #fff; font: 700 11px/1 var(--f); flex: none; }
.avatar.lg { width: 36px; height: 36px; font-size: 16px; }
.sev-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }
.sev-opt[aria-checked="true"] { background: var(--card); border: 2px solid var(--ink); }
.sev-opt.allergy[aria-checked="true"] { border-color: var(--red); }
.radio { width: 22px; height: 22px; flex: none; border-radius: 999px; border: 2px solid var(--line2); }
[aria-checked="true"] > .radio { border: 7px solid var(--ink); }
.allergy[aria-checked="true"] > .radio { border-color: var(--red); }

/* ---------- Sheets, modals, toast ---------- */
.layer { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; justify-content: flex-end; }
.scrim { position: absolute; inset: 0; border: 0; padding: 0; background: var(--scrim); cursor: default; }
.sheet { position: relative; max-height: calc(100% - var(--safe-top) - 24px); display: flex; flex-direction: column; background: var(--sheet); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px -12px rgba(0,0,0,.3); padding-bottom: var(--safe-bottom); width: 100%; max-width: 640px; margin: 0 auto; animation: up .22s ease; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.grabber { flex: none; display: flex; justify-content: center; padding: 8px 0 6px; }
.grabber span { width: 38px; height: 5px; border-radius: 3px; background: var(--line2); }
.sheet-head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 4px 16px 12px; }
.sheet-head h2 { margin: 0; font: 800 24px/1.12 var(--d); }
.sheet-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 0 16px 28px; }
.modal { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; background: var(--bg); max-width: 640px; margin: 0 auto; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-nav { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(var(--safe-top) + 6px) 12px 8px; border-bottom: 1px solid var(--line); }
.modal-nav .t { font: 650 17px/1 var(--f); }
.modal-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 16px 16px 40px; }
.modal-foot { flex: none; padding: 12px 16px calc(var(--safe-bottom) + 12px); border-top: 1px solid var(--line); background: var(--bg); }
.toast { position: fixed; left: 12px; right: 12px; bottom: calc(var(--safe-bottom) + 70px); z-index: 40; max-width: 616px; margin: 0 auto; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 6px 6px 16px; border-radius: 16px; background: var(--toast-bg); color: var(--toast-fg); box-shadow: 0 12px 30px -10px rgba(0,0,0,.45); animation: up .2s ease; }
.toast.high { bottom: calc(var(--safe-bottom) + 16px); }
.toast span { flex: 1; font: 500 14px/1.35 var(--f); }
.toast button { flex: none; min-height: 44px; padding: 0 14px; border: 0; background: none; color: var(--toast-accent); font: 700 15px/1 var(--f); }

/* ---------- Cook mode ---------- */
.steps-bar { display: flex; gap: 4px; padding: 10px 16px 0; }
.steps-bar span { flex: 1; height: 5px; border-radius: 3px; background: var(--line2); }
.steps-bar span.on { background: var(--red); }
.step-title { margin: 0; font: 800 34px/1.05 var(--d); letter-spacing: -.02em; }
.step-body { margin: 0; font: 400 23px/1.45 var(--f); text-wrap: pretty; }
.timer { align-self: flex-start; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); font: 650 18px/1 var(--f); }
.timer.running { background: var(--blue); border-color: var(--blue); color: #fff; }
.cook-foot { flex: none; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 12px 16px calc(var(--safe-bottom) + 12px); border-top: 1px solid var(--line); }
.cook-foot .btn { min-height: 64px; font-size: 18px; }

/* ---------- Menu ideas / draft ---------- */
.segs { display: flex; gap: 3px; }
.segs span { flex: 1; height: 6px; border-radius: 3px; background: var(--line2); }
.segs span.on { background: var(--green); }
.recipe.blocked { background: var(--sunk); }
.conflict { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--sunk); }
.conflict.allergy { background: var(--red-tint); }
.soft { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--ink3); font: 500 13px/1.35 var(--f); color: var(--ink2); }
.dcard { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.dcard.ok { border: 2px solid var(--green); }
.dcard.skip { opacity: .6; }
.progress { height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.progress div { height: 100%; background: var(--green); transition: width .3s; }

/* ---------- Scanner ---------- */
.viewfinder { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 52vh; border-radius: 22px; overflow: hidden; background: #120D0A; }
.viewfinder video { width: 100%; height: 100%; object-fit: cover; }
.viewfinder .frame { position: absolute; left: 12%; right: 12%; top: 34%; height: 26%; border: 3px solid rgba(255,255,255,.9); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,.28); }
.viewfinder .line { position: absolute; left: 16%; right: 16%; top: 47%; height: 2px; background: #E5604F; }
.viewfinder .msg { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: #F6EDE3; font: 600 15px/1.3 var(--f); }

/* ---------- Misc ---------- */
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 30px 20px 24px; text-align: center; }
.empty-ico { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 22px; background: var(--red-tint); color: var(--red-text); }
.skel { border-radius: 8px; background: var(--sunk); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.err { padding: 14px 16px; border-radius: 16px; background: var(--red-tint); color: var(--ink); font: 500 14px/1.4 var(--f); }
.center { text-align: center; }
.login { min-height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 24px; max-width: 420px; margin: 0 auto; }
@media (min-width: 700px) { .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }

.warn-cold { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--blue-tint); color: var(--ink); font: 500 14px/1.4 var(--f); }
.warn-cold svg { color: var(--blue-text); }
.page > *, .modal-body > *, .sheet-body > *, .stack > *, .stack-s > * { flex-shrink: 0; }
