/* Layout: builder column (pick board → fill categories) beside a sticky cost card; stacks on phones with a sticky cost bar. */
/* Tasks page: projects strip, list, board. */
.projstrip { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.projcard { display: grid; gap: 4px; text-align: left; min-width: 190px; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.projcard.on { border-color: var(--wine); box-shadow: 0 0 0 2px var(--wine-soft); }
.projbar { display: block; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; } .projbar i { display: block; height: 100%; background: var(--green); }
.projmanage { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; background: var(--inset); }
.projmanage input[type=date], .tkadd input[type=date], .tkedit input[type=date] { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 5px 8px; font: inherit; }
.pri { font-size: .74rem; border-radius: 999px; padding: 1px 8px; font-weight: 600; white-space: nowrap; }
.pri-urgent { background: var(--wine); color: var(--surface); } .pri-high { background: var(--wine-soft); color: var(--wine); } .pri-normal { background: var(--inset); color: var(--muted); } .pri-low { color: var(--muted); border: 1px solid var(--line); }
.tktable td { vertical-align: top; } .tktable th, .tktable td { text-align: left; } .tktable tr.done .kt { text-decoration: line-through; color: var(--muted); }
.tktable .tkname { min-width: 240px; white-space: normal; } .tkdone { width: 18px; height: 18px; accent-color: var(--wine); }
.kt { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; text-align: left; color: var(--fg); cursor: pointer; } .kt:hover { color: var(--wine); text-decoration: underline; }
.tkedit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; padding: 6px 2px; white-space: normal; text-align: left; }
.tkedit label { display: grid; gap: 3px; font-size: .76rem; color: var(--muted); } .tkedit .span3 { grid-column: 1 / -1; }
.tkedit input.wide, .tkedit textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 6px 8px; font: inherit; color: var(--fg); }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; align-items: start; }
.kcol { background: var(--inset); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 8px; min-height: 120px; align-content: start; }
.kcol.over { border-color: var(--wine); box-shadow: inset 0 0 0 2px var(--wine-soft); }
.kcol h3 { margin: 0; font-size: .9rem; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 6px; cursor: grab; }
.kcard.dragging { opacity: .5; } .kcard.open { cursor: default; } .kcard .tkedit { grid-template-columns: minmax(0, 1fr); }
.kmove { justify-self: start; font-size: .78rem; padding: 2px 6px; }
@media (max-width: 860px) { .tkedit { grid-template-columns: minmax(0, 1fr); } .kanban { grid-template-columns: repeat(4, minmax(240px, 80vw)); } }
/* Tasks on the Today page. */
.taskadd { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.taskadd input[name=text], .taskadd input[name=name] { flex: 1 1 220px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 8px 10px; font: inherit; }
.taskadd input[type=date] { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 6px 8px; font: inherit; }
.tasklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tasklist li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 10px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.tasklist li.done .taskchk span { text-decoration: line-through; color: var(--muted); }
.taskchk { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; flex: 1 1 200px; } .taskchk input { width: 18px; height: 18px; accent-color: var(--wine); margin-top: 2px; flex: none; }
.taskmeta { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; } .taskmeta .pill { margin-left: 0; }
:root {
  --bg: #d8c6b0; --surface: #f4ebdf; --inset: #ebdfcf; --line: #c8b197; --fg: #2c1f1a; --muted: #67574d;
  --wine: #6c1d25; --wine-soft: #f3e1e0; --green: #2f5d46; --green-soft: #e1eee6; --warn: #9a5b12; --warn-soft: #fbecd6;
  --font-display: 'Cormorant Garamond', Georgia, serif; --font-body: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  --r: 10px; color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; }
img { max-width: 100%; }
/* No tiny up/down arrows on number boxes: just type the number. */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.45;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 20px 96px; }
.wrap { max-width: 1120px; margin: 0 auto; display: grid; gap: 20px; }
h1 { font-family: var(--font-display); font-weight: 600; font-size: 2rem; margin: 0; letter-spacing: .01em; }
h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; margin: 0; }
.sub { color: var(--muted); margin: 2px 0 0; font-size: .92rem; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

.picker { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.boards { display: grid; gap: 14px; }
.bgroup h3 { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.bsub { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 8px; align-items: center; margin-top: 6px; }
.bsub > span { font-size: .82rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rate { font-size: .72rem; border-radius: 999px; padding: 2px 8px; font-weight: 600; letter-spacing: .02em; vertical-align: middle; margin-left: 4px; }
.rate.excellent { background: var(--green); color: var(--surface); }
.rate.great { background: var(--green-soft); color: var(--green); }
.rate.good { background: #e8eef7; color: #2f4f7a; }
.rate.fair { background: var(--warn-soft); color: var(--warn); }
.rate.poor { background: var(--wine-soft); color: var(--wine); }
.lines .sub-note { display: block; font-size: .74rem; color: var(--muted); font-weight: 400; }
.lines .profit { font-weight: 600; }
.s-head h2 { margin: 0; }
.serves { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.serves span { font-size: .8rem; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--muted); }
.serves b { color: var(--fg); }
.hero { background: var(--bg); border-radius: 10px; padding: 14px; display: grid; gap: 6px; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.eyebrow { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hero-num { font-family: var(--font-display); font-size: 2.4rem; font-weight: 600; line-height: 1; }
.hero-sub { margin: 0; font-size: .9rem; color: var(--muted); }
.hero-sub b { color: var(--fg); }
.hero .rate { font-size: .8rem; padding: 3px 10px; margin: 0; }
.split { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin-top: 6px; gap: 2px; background: var(--line); }
.seg.ing, .dot.ing { background: #b8674f; } .seg.pkg, .dot.pkg { background: #d6a74a; } .seg.oth, .dot.oth { background: #8f8178; } .seg.pro, .dot.pro { background: var(--green); }
.legend { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 3px; font-size: .82rem; }
.legend li { display: grid; grid-template-columns: 14px 1fr auto 48px; gap: 6px; align-items: center; }
.legend span { color: var(--muted); text-align: right; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.hint { margin: 0; font-size: .78rem; color: var(--muted); line-height: 1.4; }
.blk { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 8px; }
.blk h3 { margin: 0 0 2px; font-size: .95rem; display: flex; align-items: center; gap: 8px; }
details.blk > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; }
details.blk > summary::-webkit-details-marker { display: none; }
details.blk > summary h3 { margin: 0; }
details.blk > summary::after { content: '▾'; color: var(--muted); font-size: .85rem; transition: transform .15s; }
details.blk[open] > summary::after { transform: rotate(180deg); }
details.blk:not([open]) { gap: 0; }
.blk-sum { margin-left: auto; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.blk-sum.done::before { content: '✓ '; color: var(--green); }
.blk-sum.no { color: var(--wine); }
.blk-sum.todo { font-weight: 400; color: var(--muted); font-size: .82rem; }
.stepn { width: 22px; height: 22px; border-radius: 50%; background: var(--wine); color: var(--surface); display: inline-grid; place-items: center; font-size: .75rem; font-family: var(--font-body); flex: none; }
.crow { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .92rem; }
.crow > span:first-child { display: grid; }
.crow small { font-size: .74rem; color: var(--muted); }
.crow.tot { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 600; }
.crow.tot small { font-weight: 400; color: var(--muted); margin-left: 4px; }
.money-in { display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 0 8px; min-height: 36px; }
.money-in:focus-within { border-color: var(--wine); box-shadow: 0 0 0 2px var(--wine-soft); }
.money-in i { font-style: normal; color: var(--muted); font-size: .85rem; }
.money-in input { border: 0; background: transparent; width: 72px; padding: 6px 4px; text-align: right; font-size: .95rem; outline: none; color: var(--fg); }
.money-in.min input, .money-in.pctin input { width: 56px; }
.reco-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.reco-grid label { display: grid; gap: 4px; font-size: .78rem; color: var(--muted); }
.reco-grid .money-in input { width: 100%; }
#tm-range { width: 100%; accent-color: var(--wine); }
.todo { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 12px; }
.todo h3 { margin: 0 0 4px; font-size: .85rem; }
.todo ul { margin: 0; padding-left: 18px; font-size: .84rem; display: grid; gap: 2px; }
.fine { font-size: .74rem; margin: 0; }
.discform { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 320px; }
.discform .wide { width: 150px; }
.sbox.full { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 10px; }
.notegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.notegrid label { display: grid; gap: 4px; font-size: .76rem; color: var(--muted); }
.notegrid textarea { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px; font: inherit; font-size: .9rem; color: var(--fg); resize: vertical; }
ul.pairs { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 4px; font-size: .9rem; }
ul.pairs .x { width: 22px; height: 22px; font-size: .9rem; vertical-align: middle; }
.pairadd { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stockrow .pairadd input.wide { width: 260px; max-width: 100%; flex: 0 1 260px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 10px; }
ul.pairs li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.newform.supform { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(0, .9fr) minmax(0, .9fr) auto; }
ul.reorder { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }
tr.lowrow td:first-child input { border-color: var(--wine); }
table.uses th.grp { text-align: center; border-bottom: 1px solid var(--line); }
table.uses .totrow td { border-top: 2px solid var(--line); }
@media (max-width: 860px) { .notegrid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .newform.supform { grid-template-columns: 1fr 1fr; } .newform.supform .btn { grid-column: 1 / -1; } }
.pill.soft { background: var(--inset); color: var(--muted); margin-left: 6px; }
.filebtn { cursor: pointer; }
.findgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.find { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--inset); display: grid; gap: 6px; align-content: start; }
.find-head { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.find-head h3 { margin: 0; font-size: 1.05rem; }
.find-head select { max-width: 150px; }
.find .why { margin: 0; font-size: .9rem; }
.find .desc { margin: 0; font-size: .82rem; color: var(--muted); }
.find .dupe { margin: 0; font-size: .82rem; color: var(--warn); }
.find-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.find-actions a { color: var(--wine); font-size: .85rem; }
ul.declined { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.catlist { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; gap: 6px; }
.catlist li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.catlist li input.wide { max-width: 240px; }
.catlist li.retired input { opacity: .6; }
.boardmode { margin: 10px 0 8px; }
.boardmode .pill.trial { margin-left: 0; }
.pill.trial { background: transparent; color: var(--wine); box-shadow: inset 0 0 0 1px var(--wine); margin-left: 6px; }
.trialtag { color: var(--wine); font-weight: 600; }
.catlist .confirm { flex-basis: 100%; background: var(--warn-soft); color: var(--fg); border-radius: 8px; padding: 8px 10px; font-size: .88rem; display: grid; gap: 6px; }
.setswitch { display: flex; justify-content: flex-start; margin-bottom: 4px; }
.setswitch .seg button { padding: 8px 16px; font-size: .92rem; }
.tab-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--wine); color: var(--surface); font-size: .7rem; font-weight: 600; vertical-align: 1px; }
.stockbtn { border: 1px solid var(--line); background: var(--inset); border-radius: 999px; padding: 4px 10px; font-size: .8rem; white-space: nowrap; cursor: pointer; color: var(--fg); }
.stockbtn.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.stockbtn.bad { background: var(--wine-soft); color: var(--wine); border-color: transparent; }
.stockrow td { background: var(--inset); }
.stockrow .stockgrid { position: sticky; left: 0; width: min(1080px, calc(100vw - 72px)); }
.money-in input.num, .money-in input { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.lowat .money-in, .lot .money-in, .lbl-in .money-in { width: fit-content; }
.stockgrid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.6fr); gap: 16px; padding: 6px 2px; }
.sbox h4, .tagcat h4, .acol h4 { margin: 0 0 6px; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lot { display: flex; gap: 10px; align-items: end; margin-bottom: 8px; flex-wrap: wrap; }
.lot label, .lowat, .lbl-in { display: grid; gap: 3px; font-size: .76rem; color: var(--muted); }
.lot input[type=date] { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 8px; min-height: 36px; color: var(--fg); }
.lowat { margin-top: 10px; }
.lbl-in { grid-auto-flow: column; align-items: center; gap: 8px; font-size: .85rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tchip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 10px; font-size: .8rem; cursor: pointer; color: var(--fg); }
.tchip.on { background: var(--fg); color: var(--surface); border-color: var(--fg); }
/* One meaning per color: dark with a check = selected; amber with a warning sign = allergen. */
.tchip.on::before { content: '✓ '; }
.tchip.on.al { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); font-weight: 600; }
.tchip.on.al::before { content: '⚠ '; }
.tgroup { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; align-items: start; margin-bottom: 6px; }
.tgroup > span { font-size: .78rem; color: var(--muted); padding-top: 4px; }
.alertcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.acol { border-radius: 10px; padding: 10px 12px; }
.acol.bad { background: var(--wine-soft); } .acol.warn { background: var(--warn-soft); }
.acol ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: .88rem; }
.contains { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }
.contains b { color: var(--warn); }
.contains b::before { content: "⚠ "; }
.taggrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px; }
.tagcat { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--inset); }
.tagrow { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px; margin-bottom: 6px; }
.tagrow input { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 5px 8px; font-size: .85rem; }
.tagrow input:disabled { text-overflow: ellipsis; }
.tg-name { font-weight: 600; }
@media (max-width: 860px) { .stockgrid { grid-template-columns: minmax(0, 1fr); } }
.ing-picker { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.pick-in { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 10px; font-size: .92rem; }
.pick-in:focus { outline: none; border-color: var(--wine); box-shadow: 0 0 0 2px var(--wine-soft); }
.pick-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(44,31,26,.15); max-height: 300px; overflow: auto; padding: 4px; display: grid; gap: 2px; }
.pick-opt, .pick-add { display: flex; justify-content: space-between; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 6px; padding: 8px 10px; font-size: .9rem; cursor: pointer; }
.pick-opt small, .pick-note { color: var(--muted); font-size: .76rem; }
.pick-opt:hover, .pick-opt.on, .pick-add:hover, .pick-add.on { background: var(--wine-soft); }
.pick-add { color: var(--wine); font-weight: 500; border-top: 1px solid var(--line); border-radius: 0 0 6px 6px; }
.pick-note { margin: 4px 10px; }
.pill.short { background: var(--wine-soft); color: var(--wine); }
tr.off td input { opacity: .6; }
tr.off .pill { margin-left: 6px; }
.mult-row { margin: 10px 0 4px; gap: 10px; align-items: center; }
.mult-row .money-in input { width: 50px; }
@media (max-width: 520px) { .bsub { grid-template-columns: 1fr; gap: 4px; } }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 7px 14px; font-size: .92rem; }
.chip[aria-pressed="true"] { background: var(--wine); border-color: var(--wine); color: var(--surface); }
.sizes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.size { border: 1px solid var(--line); background: transparent; border-radius: 8px; padding: 8px 6px; text-align: center; display: grid; gap: 1px; }
.size b { font-weight: 500; font-size: .9rem; }
.size span { font-size: .78rem; color: var(--muted); }
.size[aria-pressed="true"] { border-color: var(--wine); background: var(--wine-soft); }
.lbl { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
input.dflt { color: var(--muted, #8a7d74); font-style: italic; }
.set-h { font-size: 1.05rem; margin: 18px 0 6px; }
.settable input.wide { min-width: 110px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 6px 14px; font-size: .88rem; }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

.main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.cats { display: grid; gap: 12px; }
.fill .cat { background: var(--inset); }
.card > div > h2, .s-head h2 { font-size: 1.35rem; }
.cat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 10px; }
.cat-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; align-items: baseline; }
.cat-head h2 { font-size: 1.25rem; }
.target { font-size: .88rem; color: var(--muted); }
.target strong { color: var(--fg); font-weight: 600; }
.pill { font-size: .78rem; border-radius: 999px; padding: 2px 9px; font-weight: 500; }
.pill.ok { background: var(--green-soft); color: var(--green); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.lbtable { border-collapse: collapse; font-size: .9rem; }
.lbtable th, .lbtable td { padding: 4px 8px; text-align: left; vertical-align: middle; }
.lbtable td:first-child small { display: block; color: var(--muted); font-size: .74rem; }
.lbtable .money-in input { width: 5.5em; }
.pill.var { display: inline-flex; align-items: center; gap: 4px; }
.pill.var svg { width: 13px; height: 13px; flex: none; }
.items { display: grid; gap: 6px; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) 92px 74px 28px; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px dashed var(--line); }
.item:first-child { border-top: 0; }
.item .name { min-width: 0; overflow-wrap: anywhere; }
.item .name small { display: block; color: var(--muted); font-size: .78rem; }
.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); }
.qty input { width: 100%; min-width: 0; border: 0; background: transparent; text-align: right; padding: 6px 4px; }
.qty span { padding-right: 7px; font-size: .8rem; color: var(--muted); }
.cost { text-align: right; }
.cost.missing { color: var(--warn); font-size: .8rem; }
.x { border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 1.1rem; line-height: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; padding: 0; }
.x:hover { color: var(--wine); border-color: var(--wine); }
.swapbtn { border: 0; background: none; padding: 0; color: var(--wine); font-size: .78rem; text-decoration: underline; text-underline-offset: 2px; }
.swap { border: 1px solid var(--wine); background: var(--wine-soft); border-radius: 8px; padding: 12px; display: grid; gap: 10px; }
.swap p { margin: 0; }
.swap .goal { font-size: 1.05rem; }
.swap .goal b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.swap input[type=range] { width: 100%; accent-color: var(--wine); }
.swap .explore { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; }
.swap .opts { display: grid; gap: 6px; }
.swap .swaptype { align-items: center; gap: 6px; }
#library .subrow .link { font-weight: 600; color: var(--fg); }
.swap .opt { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; border-top: 1px dashed var(--line); padding-top: 6px; font-size: .9rem; }
.tag { font-size: .75rem; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.tag.in { background: var(--green-soft); color: var(--green); }
.tag.out { background: var(--warn-soft); color: var(--warn); }
.cat-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
select.add { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 6px 8px; max-width: 100%; }
.link { border: 0; background: none; color: var(--wine); text-decoration: underline; text-underline-offset: 3px; padding: 0; font-size: .88rem; }
.newform { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.newform label { display: grid; gap: 3px; font-size: .78rem; color: var(--muted); min-width: 0; }
.newform input { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 6px 8px; width: 100%; min-width: 0; }
.newform.libform { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, .9fr) minmax(0, .9fr) auto; }
.newform select { width: 100%; }
.newform.saveform { grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) auto; }
.btn { border: 1px solid var(--wine); background: var(--wine); color: var(--surface); border-radius: 8px; padding: 7px 14px; font-weight: 500; }
.btn.ghost { background: transparent; color: var(--wine); }
.empty { color: var(--muted); font-size: .9rem; margin: 0; }

.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.lines { display: grid; gap: 7px; margin: 0; }
.lines div { display: flex; justify-content: space-between; gap: 10px; }
.lines dt { color: var(--muted); }
.lines dd { margin: 0; text-align: right; }
.lines .total { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 600; }
.big { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.big div { background: var(--bg); border-radius: 8px; padding: 10px; }
.big b { display: block; font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
.big span { font-size: .78rem; color: var(--muted); }
.note { font-size: .8rem; color: var(--muted); margin: 0; }
.alert { font-size: .85rem; background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 8px 10px; margin: 0; }
.inline-in { width: 70px; border: 1px solid var(--line); background: var(--bg); border-radius: 6px; padding: 3px 6px; text-align: right; }

table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { font-weight: 500; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
tr.cur td { background: var(--wine-soft); }
.scroll { overflow-x: auto; }

.secnav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.secnav::-webkit-scrollbar { display: none; }
.secnav button { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 8px 16px; white-space: nowrap; font-weight: 500; }
.secnav button[aria-current="true"] { background: var(--wine); border-color: var(--wine); color: var(--surface); }
.secnav button[aria-current="true"] .tab-badge { background: var(--surface); color: var(--wine); }
.subnav[hidden] { display: none; }
.supnote-in { display: block; margin-top: 4px; font-size: .78rem; }
#supplies td:nth-child(2) { min-width: 230px; } #supplies td:nth-child(4) { min-width: 200px; }
.supnote { font-size: .76rem; color: var(--muted); margin-top: 3px; max-width: 280px; white-space: normal; }
.linkcell { min-width: 190px; } .linkcell .btn.sm { padding: 3px 10px; font-size: .8rem; margin-bottom: 4px; display: inline-block; text-decoration: none; } .linkcell input { display: block; }
.supgroup h4 { margin: 10px 0 4px; font-size: .85rem; }
.supadd > summary { list-style: none; display: inline-block; cursor: pointer; } .supadd > summary::-webkit-details-marker { display: none; } .supadd[open] > summary { margin-bottom: 10px; }
.usesbox > summary { cursor: pointer; } .usesbox > summary .note { margin-left: 6px; }
.suphead { display: flex; align-items: center; gap: 8px; font-size: .8rem; margin-top: 6px; } .selall { display: inline-flex; gap: 6px; align-items: center; } .selall input { width: 16px; height: 16px; accent-color: var(--wine); }
.suptype { margin: 14px 0 4px; font-family: var(--font-display); font-size: 1.05rem; }
.suprow { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 6px 12px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin-bottom: 8px; }
.suprow.low { border-color: var(--warn); box-shadow: inset 3px 0 0 var(--warn); }
.supname { font-weight: 600; } .supmeta { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.supcost { display: grid; font-size: .85rem; text-align: right; } .supcost b { font-size: 1rem; } .supcost small { color: var(--muted); }
.supline { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.suphand { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); }
.card .suphand input.num { width: 72px; border: 1px solid var(--line); background: var(--bg); border-radius: 6px; padding: 5px 6px; text-align: right; }
.supact { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; } .supact .btn.sm { padding: 4px 12px; font-size: .82rem; text-decoration: none; }
.supmore { grid-column: 2 / -1; display: grid; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.supuse { font-size: .82rem; line-height: 1.5; } .supuse b { font-weight: 600; color: var(--muted); }
.supedit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
.supedit label { display: grid; gap: 3px; font-size: .76rem; color: var(--muted); min-width: 0; } .supedit .span3 { grid-column: 1 / -1; }
.card .supedit input, .card .supedit select { width: 100%; min-width: 0; text-align: left; }
.supedit input.num { text-align: left; }
@media (max-width: 860px) { .supedit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 520px) { .suprow { grid-template-columns: 24px minmax(0, 1fr); } .supcost { grid-column: 2; text-align: left; display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; } .supline { grid-column: 1 / -1; } .supmore { grid-column: 1 / -1; } .supedit { grid-template-columns: minmax(0, 1fr); } .supact { margin-left: 0; } }
.fsrc .pill, .pill.ship, .pill.store, .pill.local { white-space: nowrap; display: inline-block; }
.pill.local { background: var(--green); color: #fff; margin-left: 6px; font-weight: 600; }
.pill.store { background: var(--inset); color: var(--fg); margin-left: 6px; }
.pill.ship { background: var(--wine-soft); color: var(--wine); margin-left: 6px; }
.tchip.adv.on, .tchip.brd.on { background: var(--fg); border-color: var(--fg); color: var(--surface); }
.supcard .meta { font-size: .82rem; color: var(--muted); margin: 0; }
.supcard ul { margin: 0; padding-left: 18px; font-size: .86rem; }
.chip.idea { border-style: dashed; } .chip.idea small { color: var(--muted); font-size: .72rem; }
.ideaform, .ideabanner { display: grid; gap: 10px; background: var(--inset); border: 1px dashed var(--line); border-radius: var(--r); padding: 12px; }
.ideasizes { display: flex; flex-wrap: wrap; gap: 10px; }
.ideaform .newform, .ideabanner .newform { background: none; border: 0; padding: 0; }
.ideaform .lbl-in, .ideabanner .lbl-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; font-size: .78rem; color: var(--muted); }
.ideaform textarea, .ideabanner textarea, .ideaform input:not([type=number]), .ideabanner input:not([type=number]) { width: 100%; font: inherit; font-size: .92rem; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.chip.idea[aria-pressed="true"] small { color: inherit; opacity: .85; }
.findsup { display: grid; gap: 8px; margin-top: 10px; } .findsup h3 { margin: 6px 0 0; font-size: 1.05rem; }
.find { gap: 10px; padding: 14px 16px; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.fhead { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.fhead h3 { margin: 0; font-size: 1.08rem; line-height: 1.25; }
.fsrc { margin: 2px 0 0; font-size: .8rem; color: var(--muted); }
.fprice { display: grid; justify-items: end; text-align: right; font-size: .76rem; color: var(--muted); white-space: nowrap; }
.fprice b { font-size: 1rem; color: var(--fg); } .fprice.none span { font-style: italic; }
.find .why { font-size: .92rem; line-height: 1.45; }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; margin: 0; font-size: .84rem; }
.facts dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.facts dd { margin: 0; }
.contains-al { color: var(--warn); font-weight: 600; }
.contains-al::before { content: '⚠ '; }
.facts .dupe { color: var(--warn); }
.fdecide { display: grid; gap: 6px; border-top: 1px dashed var(--line); padding-top: 8px; }
.frow { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); }
.frow .chips { gap: 4px; } .frow select { justify-self: start; max-width: 200px; }
.seg.sm { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; justify-self: start; }
.seg.sm button { border: 0; background: none; padding: 3px 10px; font-size: .78rem; color: var(--fg); }
.seg.sm button + button { border-left: 1px solid var(--line); }
.seg.sm button.on { background: var(--fg); color: var(--surface); }
.seg.sm button.on::before { content: '✓ '; }
#library tbody tr:not(.grouprow):not(.subrow):not(.stockrow):hover td { background: color-mix(in srgb, var(--inset) 60%, transparent); }
#library td { vertical-align: top; padding-top: 8px; padding-bottom: 8px; }
#library .grouprow td { background: var(--inset); font-family: var(--font-display); font-weight: 600; font-size: 1rem; text-align: left; padding: 6px 10px; }
#library .namecell { min-width: 220px; }
#library .subrow td { font-size: .8rem; font-weight: 600; color: var(--muted); text-align: left; padding: 6px 10px 2px 22px; border-bottom: 1px dashed var(--line); }
#library select.sub { display: block; margin-top: 4px; font-size: .78rem; max-width: 100%; }
.subtag { font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; white-space: nowrap; }
.subcat-lbl { align-self: center; font-size: .85rem; }
.rowmeta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rowmeta .pill { margin-left: 0; } .advtag { font-size: .72rem; color: var(--wine); border: 1px solid var(--wine); border-radius: 999px; padding: 0 7px; }
.detbtn { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 3px 10px; font-size: .8rem; }
.detsum { font-size: .74rem; color: var(--muted); margin-top: 3px; max-width: 220px; white-space: normal; text-align: right; }
.detsum.warn { color: var(--warn); }
.find .tagrow2 { display: grid; gap: 6px; font-size: .78rem; color: var(--muted); }
.find .tagrow2 .chips { gap: 4px; }
.pickf { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .82rem; color: var(--muted); margin-bottom: 4px; }
.pick-opt .star { color: var(--green); font-weight: 700; }
.shipline { font-size: .78rem; color: var(--muted); font-weight: 400; }
.shipgap { font-size: .78rem; color: var(--wine); font-weight: 600; }
#suppliers-table td { vertical-align: top; } #suppliers-table input.wide { min-width: 150px; } #suppliers-table input.num { width: 84px; }
.selcol { width: 28px; padding-right: 0 !important; }
.selcol input { width: 16px; height: 16px; accent-color: var(--wine); }
.bulkbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--wine-soft); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.bulkbar b { margin-right: 4px; }
.bulkbar input.wide { width: 180px; min-width: 0; }
.bulkbar .confirm { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.libtools { gap: 8px; }
.upl { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--bg); display: grid; gap: 8px; }
.upl ul { margin: 0; padding-left: 18px; max-height: 260px; overflow: auto; font-size: .88rem; }
.upl .old { color: var(--muted); text-decoration: line-through; }
@media (max-width: 520px) { .secnav { gap: 4px; padding: 2px 0; } .secnav button { padding: 7px 9px; font-size: .86rem; } .secnav .tab-badge { margin-left: 4px; } }
.todaygrid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.todaygrid .stack { display: grid; gap: 20px; }
.todaygrid > .today-tasks { grid-column: 1 / -1; }   /* Today's task list spans the full width above the two columns */
.todo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.todo-list button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.todo-list button:hover { border-color: var(--wine); }
.todo-list .n { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 2ch; }
.todo-list .bad .n { color: var(--wine); } .todo-list .warn .n { color: var(--warn); }
.todo-list .go { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick .btn { justify-content: center; text-align: center; }
.recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.recent li { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; }
.stockgrid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
.stockgrid.one { grid-template-columns: minmax(0, 460px); }
@media (max-width: 860px) { .todaygrid { grid-template-columns: minmax(0, 1fr); } .stockgrid.two { grid-template-columns: minmax(0, 1fr); } }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; padding: 10px 14px; white-space: nowrap; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs button[aria-selected="true"] { color: var(--wine); border-bottom-color: var(--wine); }
.cattabs { margin-bottom: 10px; }
.cattabs .cnt { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--line); color: var(--fg); font-size: .74rem; margin-left: 4px; }
.pane { display: grid; gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; }
.card input[type=number], .card input.wide { border: 1px solid var(--line); background: var(--bg); border-radius: 6px; padding: 4px 6px; width: 84px; text-align: right; }
.card input.wide { width: 100%; min-width: 120px; text-align: left; }
.perguest td:nth-child(n+4), .perguest th:nth-child(n+4) { color: var(--muted); }
details.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; }
details.panel summary { cursor: pointer; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
details.panel[open] summary { margin-bottom: 12px; }
.panel input { border: 1px solid var(--line); background: var(--bg); border-radius: 6px; padding: 4px 6px; width: 84px; text-align: right; }
.panel input.wide { width: 100%; min-width: 120px; text-align: left; }
.saved { display: grid; gap: 6px; }
.saved > div:not(.recipe) { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px dashed var(--line); padding-top: 6px; }

.recipe { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 10px; background: var(--bg); }
.recipe-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; align-items: baseline; }
.recipe-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }
.recipe table td.catrow { font-weight: 600; color: var(--wine); padding-top: 10px; }
.recipe tfoot td { font-weight: 500; }
.history { font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 12px; }
.summary > .s-head, .summary > .hero, .summary > .todo, .summary > .fine { grid-column: 1 / -1; }
.hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); column-gap: 24px; align-items: center; }
.hero-main { display: grid; gap: 6px; }
.hero-split { display: grid; gap: 4px; align-self: start; }
.hero-split .todo { margin-top: 6px; }
.bar { display: none; position: sticky; bottom: 0; z-index: 15; justify-content: space-between; align-items: center; gap: 12px; margin-top: 4px;
  background: var(--fg); color: var(--bg); border-radius: 10px; padding: 10px 16px; width: 100%; max-width: 1120px; margin: 4px auto 0; box-sizing: border-box; }
.bar b { font-size: 1.05rem; }
.bar a { color: var(--bg); font-size: .85rem; }
@media (max-width: 860px) {
  .summary { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); }
}
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 72px); background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 8px; font-size: .88rem; z-index: 20; }

@media (max-width: 860px) {
  .bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; border-radius: 0; margin: 0;
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
}
@media (max-width: 520px) {
  .sizes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .item { grid-template-columns: minmax(0, 1fr) 86px 64px 24px; gap: 6px; }
  .newform { grid-template-columns: 1fr 1fr; }
  .newform label:first-child { grid-column: 1 / -1; }
  .newform.libform { grid-template-columns: 1fr 1fr; }
  .newform.libform .btn { grid-column: 1 / -1; }
  .newform.saveform { grid-template-columns: 1fr; }
}
/* Notes on ingredients (who wrote it, when). */
.cmtlist { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.cmtlist li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; white-space: normal; }
.cmtlist p { margin: 0 0 2px; font-size: .9rem; white-space: pre-wrap; }
.cmtadd { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.cmtadd textarea { flex: 1 1 260px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: .9rem; color: var(--fg); resize: vertical; }
.cmts.compact .cmtlist li { padding: 4px 8px; } .cmts.compact .cmtlist p { font-size: .84rem; } .cmts.compact .btn { padding: 4px 10px; font-size: .8rem; }
/* Build a board: layered ingredient filters. */
.pick-tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.pick-tags .pick-note { margin: 0 4px 0 0; }
.pf-max { display: inline-flex; align-items: center; gap: 4px; } .pf-max .money-in { min-height: 30px; } .pf-max .money-in input { width: 48px; padding: 3px; }
.pickf select.add { padding: 3px 6px; font-size: .82rem; }
/* Suppliers: approval. */
.supdec { margin-top: 4px; } .supdec button { white-space: nowrap; }
tr.supconfirm td { white-space: normal; text-align: left; background: var(--warn-soft); }
tr.supconfirm .confirm { display: block; font-size: .88rem; } tr.supconfirm .confirm .row { margin-top: 8px; }
.confirm-inline { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .88rem; background: var(--warn-soft); border-radius: 8px; padding: 6px 10px; }
/* Find alternatives. */
.altbox { white-space: normal; text-align: left; }
.altgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 18px; margin-top: 6px; }
.altgrid h5 { margin: 0 0 4px; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.altlist { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .86rem; }
.altlist .note { margin-left: 4px; } .altlist a { color: var(--wine); font-size: .82rem; margin-left: 4px; }
a.tchip { text-decoration: none; display: inline-block; }
.altmore summary { cursor: pointer; margin-top: 6px; }
b.cheaper { color: var(--green); } b.pricier { color: var(--wine); }
/* Average prices. */
.avgtable td { vertical-align: top; } .avgtable .grouprow td { background: var(--inset); font-family: var(--font-display); font-weight: 600; font-size: 1rem; text-align: left; }
.avgtable .avgrow td { border-top: 2px solid var(--line); } .avgtable .money-in input { width: 60px; }
#avg-details > summary { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.sellat { display: inline-block; font-size: .76rem; border: 1px dashed var(--line); border-radius: 999px; padding: 1px 9px; color: var(--muted); }
#boxes .settable input.wide { min-width: 120px; } #boxes .settable select { max-width: 280px; }
.note.stores { margin-top: 2px; } .note.stores span { white-space: nowrap; }
.newform.pantryform { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, .8fr) minmax(0, .7fr) auto; }
@media (max-width: 860px) { .newform.pantryform { grid-template-columns: 1fr 1fr; } .newform.pantryform .btn { grid-column: 1 / -1; } }
table.pantry td, table.bakelines td { vertical-align: top; } table.pantry input.wide { min-width: 140px; } td.nowrap { white-space: nowrap; }
details.bake { border: 1px solid var(--line); border-radius: 10px; background: var(--inset); padding: 10px 14px; }
details.bake > summary { cursor: pointer; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; list-style: none; }
details.bake > summary::-webkit-details-marker { display: none; }
details.bake > summary::after { content: '▾'; color: var(--muted); } details.bake[open] > summary::after { transform: rotate(180deg); }
.bakebody { display: grid; gap: 10px; margin-top: 10px; } .warn-t { color: var(--warn); }
.ftool { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.ftool input.wide { flex: 1 1 260px; width: auto; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 10px; }
.findtable td { vertical-align: top; } .findtable td.wrap { white-space: normal; min-width: 180px; max-width: 320px; } .findtable .rowact { white-space: nowrap; }
.reviewbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.reviewone { max-width: 720px; } .reviewone .find { box-shadow: 0 4px 18px rgba(44,31,26,.12); }
.brands { font-size: .76rem; color: var(--muted); white-space: normal; max-width: 260px; margin-top: 3px; }
.findtable th, .findtable td { text-align: left; } .findtable td.num, .findtable th.num { text-align: right; }
/* Board designer: ingredient list beside a to-scale board; counts, cost and photo below. Stacks on phones. */
.dz-main { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.dz-info { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dz-head .dz-open select { max-width: 280px; }
.dz-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
.dz-form label { display: grid; gap: 3px; font-size: .78rem; color: var(--muted); min-width: 0; }
.dz-form input:not([type=checkbox]):not([type=range]), .dz-form select { border: 1px solid var(--line); background: var(--bg); border-radius: 6px; padding: 7px 8px; font: inherit; color: var(--fg); min-height: 38px; }
.dz-form input[type=number] { width: 92px; } .dz-form #dz-name { width: 230px; } .dz-form.sm input[type=number] { width: 80px; }
.dz-check1 { display: flex !important; align-items: center; gap: 6px; font-size: .88rem !important; color: var(--fg) !important; } .dz-check1 input { width: 20px; height: 20px; accent-color: var(--wine); }
.dz-pal { position: sticky; top: 8px; max-height: calc(100vh - 16px); grid-template-rows: auto auto auto auto minmax(0, 1fr) auto; gap: 8px; }
.dz-pal h3 { margin: 0; font-family: var(--font-display); font-size: 1.15rem; }
.dz-pal input.wide, .dz-pal select { width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 7px 10px; font: inherit; }
.dz-pal-list { overflow-y: auto; display: grid; gap: 4px; align-content: start; min-height: 120px; padding-right: 2px; }
.dz-pal-cat { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.dz-pal-cat i { width: 12px; height: 12px; border-radius: 3px; border: 1px solid; display: inline-block; }
.dz-pal-it { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 6px 8px; min-height: 46px; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
.dz-pal-it:hover { border-color: var(--wine); } .dz-pal-it svg { width: 34px; height: 34px; } .dz-pal-it span { font-size: .88rem; line-height: 1.2; } .dz-pal-it small { display: block; color: var(--muted); font-size: .72rem; }
.dz-ghost { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; background: var(--wine); color: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: .85rem; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.dz-canvas { gap: 8px; }
.dz-tools { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.dz-tools .seg.sm button { padding: 6px 12px; font-size: .82rem; min-height: 34px; }
#designer .btn.sm { padding: 5px 11px; font-size: .84rem; min-height: 34px; } #designer .btn[disabled] { opacity: .45; cursor: default; }
.dz-stat { min-height: 1.2em; }
.dz-stage { overflow: auto; background: var(--inset); border: 1px solid var(--line); border-radius: 8px; max-height: 78vh; display: grid; }
#dz-svg { display: block; width: 100%; height: auto; max-height: 70vh; margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; }
#dz-svg .dz-it { cursor: grab; } #dz-svg .dz-h { cursor: pointer; } #dz-svg.dz-photo-mode { cursor: move; }
.dz-selbox { display: grid; gap: 8px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.dz-fpedit { display: grid; gap: 6px; border-top: 1px dashed var(--line); padding-top: 8px; }
.dz-selhint { min-height: 1.2em; }
.dz-table td, .dz-table th { text-align: left; } .dz-table td.num, .dz-table th:nth-child(n+3) { text-align: right; }
.dz-table td.catrow { font-weight: 600; color: var(--wine); padding-top: 10px; } .dz-table td.missing { color: var(--warn); }
.dz-fptable th:nth-child(n+3) { text-align: left; } .dz-fptable input, .dz-fptable select { border: 1px solid var(--line); background: var(--bg); border-radius: 6px; padding: 5px 6px; font: inherit; }
.dz-fptable input.num { width: 64px; text-align: right; }
.dz-num { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 999px; border: 1px solid; font-size: .78rem; font-weight: 600; padding: 0 5px; }
.dz-h3 { margin: 10px 0 2px; font-size: .95rem; }
.dz-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; } .dz-check li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: .88rem; } .dz-check li > span:first-child { min-width: 120px; }
.dz-line { line-height: 1.5; }
.dz-steps { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
#dz-print { display: none; }
@media (max-width: 1000px) { .dz-info { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .dz-main { grid-template-columns: minmax(0, 1fr); }
  .dz-canvas { order: -1; }
  .dz-pal { position: static; max-height: none; } .dz-pal-list { max-height: 300px; }
  .dz-form #dz-name { width: 100%; } .dz-form label:has(#dz-name) { flex: 1 1 100%; }
}
/* Printing a layout sheet prints only the sheet. */
@media print {
  body.dz-printing { background: #fff; padding: 0; }
  body.dz-printing > *:not(#dz-print) { display: none !important; }
  body.dz-printing #dz-print { display: block; color: #000; font-family: var(--font-body); }
  #dz-print h1 { font-size: 22pt; margin: 0 0 4pt; } #dz-print p { margin: 0 0 8pt; font-size: 10pt; }
  #dz-print .dz-print-grid { display: grid; grid-template-columns: 58% 1fr; gap: 16pt; align-items: start; }
  #dz-print .dz-print-svg { width: 100%; height: auto; max-height: 8.5in; }
  #dz-print table { font-size: 10pt; border-collapse: collapse; width: 100%; } #dz-print th, #dz-print td { text-align: left; padding: 3pt 4pt; border-bottom: 1px solid #ccc; }
  #dz-print .dz-num { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #dz-print svg { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.dz-pal-filt { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; min-height: 26px; }
.dz-find { font-style: normal; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--warn); background: var(--warn-soft); border-radius: 999px; padding: 1px 6px; white-space: nowrap; }
.dz-boardsrc { flex: 1 1 260px; align-self: center; margin: 0; }
.dz-bal { display: flex; height: 14px; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); } .dz-bal span { border-right: 1px solid var(--surface); min-width: 3px; }
.dz-legend { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .82rem; }
.dz-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; border: 1px solid; margin-right: 4px; vertical-align: -1px; }
.dz-fpedit input[type=color], .dz-fptable input[type=color] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.dz-3d { background: var(--inset); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; min-height: 240px; display: grid; place-items: center; }
.dz-3dcanvas { display: block; width: 100%; touch-action: none; cursor: grab; } .dz-3dcanvas:active { cursor: grabbing; }
.dz-3dmsg { padding: 40px 16px; } .dz-tall { color: var(--wine); }
/* Automatic tasks (what needs attention): no checkbox, an Open button to go fix it. */
.tasklist li.auto { background: var(--surface); border-style: dashed; } .autodot { color: var(--warn); font-size: .7rem; margin-top: 4px; flex: none; width: 18px; text-align: center; }
.tasklist li.auto .taskchk { cursor: default; } .tasklist li.auto small { display: block; }
.tktable tr.auto .tkdone { opacity: .35; }
/* App shell: a left menu beside the page on iPad and laptop; on phones it slides in from the ☰ button. */
body { padding-left: 0; padding-right: 0; padding-top: 0; }
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.shell > .wrap { width: 100%; max-width: 1180px; padding: 20px max(16px, env(safe-area-inset-right, 0px)) 96px 24px; margin: 0; align-content: start; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); padding: 16px 10px max(24px, env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 2px; z-index: 40; }
.side-brand { display: flex; align-items: center; gap: 8px; padding: 0 8px 12px; font-family: var(--font-display); font-size: 1.25rem; } .side-brand b { font-weight: 600; }
.side h3 { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 14px 10px 4px; font-weight: 600; }
.side button { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: none; color: var(--fg); border-radius: 8px; padding: 9px 10px; font-size: .95rem; min-height: 40px; }
.side button:hover { background: var(--inset); }
.side button[aria-current="true"] { background: var(--wine); color: var(--surface); font-weight: 500; }
.side button[aria-current="true"] .tab-badge { background: var(--surface); color: var(--wine); }
.tab-badge.soft { background: var(--inset); color: var(--fg); }
.pagehead { display: flex; align-items: center; gap: 12px; } .pagehead h1 { font-size: 1.9rem; }
.menu-btn { display: none; flex-direction: column; justify-content: center; gap: 4px; width: 42px; height: 42px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 0 10px; flex: none; }
.menu-btn span { display: block; height: 2px; background: var(--fg); border-radius: 2px; }
.side-scrim { position: fixed; inset: 0; background: rgba(44, 31, 26, .35); z-index: 35; }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .shell > .wrap { padding: max(14px, env(safe-area-inset-top, 0px)) 16px 96px; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 84vw); transform: translateX(-102%); transition: transform .2s ease; box-shadow: 0 0 30px rgba(0,0,0,.18); }
  body.side-open .side { transform: none; }
  .menu-btn { display: flex; } .pagehead h1 { font-size: 1.5rem; }
}
/* Set up: the checklist and the bar shown on a page opened from it. */
.setup-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px; background: var(--green-soft); border: 1px solid #b9d3c3; border-radius: var(--r); padding: 10px 14px; font-size: .9rem; position: sticky; top: 6px; z-index: 20; }
.su-progress { display: flex; align-items: center; gap: 12px; } .su-progress .projbar { flex: 1; height: 8px; }
.su-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.su-step { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.su-step.done { background: var(--surface); } .su-step.done b { color: var(--muted); }
.su-mark { width: 24px; height: 24px; border-radius: 999px; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 700; color: var(--surface); font-size: .8rem; }
.su-step.done .su-mark { background: var(--green); border-color: var(--green); }
.su-body p { margin: 2px 0 0; } .su-left { color: var(--fg); }
.su-act { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; } .su-act .btn.sm, .setup-bar .btn.sm { padding: 5px 12px; font-size: .84rem; }
@media (max-width: 600px) { .su-step { grid-template-columns: 24px minmax(0, 1fr); } .su-act { grid-column: 2; flex-direction: row; align-items: center; flex-wrap: wrap; } }
/* Today: the week. */
.week { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.week > li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); align-items: baseline; }
.week > li:first-child { border-top: 0; } .week > li.empty { opacity: .75; }
.wk-day { display: grid; } .week ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wk-kind { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; border-radius: 999px; padding: 1px 7px; }
.wk-kind.task { background: var(--inset); } .wk-kind.exp { background: var(--warn-soft); color: var(--warn); } .wk-kind.goal { background: var(--green-soft); color: var(--green); }
@media (max-width: 520px) { .week > li { grid-template-columns: 1fr; gap: 4px; } }

/* ============================================================================================================
   Brand theme (Oct 2026), from the Fig N Pig brand design guide, layered over everything above: Cream
   background, Fig Red accent for actions and selection (changeable in Board settings), Foraged Green ink,
   Honey Gold and Fired Orange in charts, Bebas Neue page titles and Montserrat text. Red-orange for problems
   (short, expired, poor margin), amber for warnings, green for good. Token names are kept (--wine is the
   accent) so every page picks it up. Colors only: the layout is unchanged.
   ============================================================================================================ */
:root {
  --bg: #fdf8ef; --surface: #fffdf9; --inset: #f7efe2; --line: #ebdfcc; --line-strong: #dccbb1; --fg: #1c211e; --muted: #6b645a;
  --wine: #b71932; --wine-hover: #8e1226; --wine-soft: #fbe8e7; --green: #1f6a45; --green-soft: #e9f3ea; --warn: #a8540a; --warn-soft: #fff3d6;
  --danger: #d4380d; --danger-soft: #fdeee6;
  --forest: #0f2d24; --gold: #f2b11b; --orange: #e34a1c; --pink: #f4c5c0;
  --font-head: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --font-display: 'Montserrat', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; --font-body: 'Montserrat', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 12px; --shadow: 0 1px 2px rgba(15, 45, 36, .06); --ring: 0 0 0 4px color-mix(in srgb, var(--wine) 16%, transparent); --wine-line: color-mix(in srgb, var(--wine) 30%, white); --wine-ink: color-mix(in srgb, var(--wine) 75%, black);
}
body { font-size: 13.5px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1 { font-family: var(--font-head); font-weight: 400; letter-spacing: .02em; color: var(--forest); line-height: 1; } .pagehead h1 { font-size: 2.1rem; }
h2, .card > div > h2, .s-head h2 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }
h3 { letter-spacing: -.005em; }
.sub { font-size: .875rem; } .note { font-size: .8rem; }
.lbl, .eyebrow, .bgroup h3, th { font-size: .72rem; letter-spacing: .04em; font-weight: 600; color: var(--muted); }
.hero-num, .big b, .swap .goal b { font-weight: 650; letter-spacing: -.02em; }
#library .grouprow td, .suptype { font-weight: 600; font-size: .9rem; }

/* Surfaces */
.card, .picker, .summary { border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); background: var(--surface); }
.hero { background: var(--inset); }

/* Inputs: white, warm border, accent focus ring. */
html body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), html body select, html body textarea {
  background-color: #fff; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--fg); box-shadow: 0 1px 1px rgba(15, 45, 36, .03); }
html body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):focus, html body select:focus, html body textarea:focus { outline: none; border-color: var(--wine); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: #a39886; }
input[type=checkbox], input[type=radio] { accent-color: var(--wine); }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }

/* Buttons: accent primary; secondary is neutral (white with a warm border), not colored. */
.btn { background: var(--wine); border-color: var(--wine); border-radius: 8px; font-weight: 600; font-size: .875rem; padding: 8px 14px; box-shadow: 0 1px 2px rgba(15, 45, 36, .08); transition: background .15s, border-color .15s; }
.btn:hover { background: var(--wine-hover); border-color: var(--wine-hover); }
.btn.ghost { background: #fff; color: #3d3a33; border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--inset); border-color: var(--line-strong); color: var(--fg); }
.link { color: var(--wine); text-decoration: none; font-weight: 500; } .link:hover { text-decoration: underline; }
.tchip { background: #fff; border-color: var(--line-strong); color: #3d3a33; border-radius: 999px; }
.tchip.on, .tchip[aria-pressed="true"] { background: var(--wine-soft); border-color: var(--wine-line); color: var(--wine); }
.chip { border-color: var(--line-strong); background: #fff; color: #3d3a33; font-size: .875rem; }
.chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: #fff; }
.size { border-radius: 10px; } .size[aria-pressed="true"] { border-color: var(--wine); box-shadow: var(--ring); }

/* Segmented controls: a gray track with a white, raised selection. */
div.seg, div.seg.sm { background: var(--inset); border: 1px solid var(--line); border-radius: 9px; padding: 2px; gap: 2px; }
div.seg button { border-radius: 7px; color: var(--muted); font-weight: 500; }
div.seg button[aria-pressed="true"] { background: #fff; color: var(--fg); box-shadow: 0 1px 2px rgba(15, 45, 36, .1); }

/* Badges and status */
.pill { border-radius: 6px; font-weight: 500; font-size: .75rem; padding: 2px 8px; }
.pill.short, .rate.poor, .stockbtn.bad { background: var(--danger-soft); color: var(--danger); }
.pill.soft { background: var(--inset); color: #55504a; }
.acol.bad { background: var(--danger-soft); } .todo-list .bad .n, .dz-tall { color: var(--danger); }
.pri { border-radius: 6px; } .pri-urgent { background: var(--danger); color: #fff; } .pri-high { background: var(--warn-soft); color: var(--warn); }
.rate { border-radius: 6px; } .rate.excellent { background: var(--green); } .rate.great { background: var(--green-soft); color: var(--green); } .rate.good { background: #fdf0d2; color: #8a5a00; }
.tab-badge { background: var(--wine); font-size: .7rem; font-weight: 600; }
.seg.ing, .dot.ing { background: var(--orange); } .seg.pkg, .dot.pkg { background: var(--gold); } .seg.oth, .dot.oth { background: #b8ab97; } .seg.pro, .dot.pro { background: var(--green); }

/* Tables */
th { text-transform: none; letter-spacing: 0; font-size: .75rem; background: var(--inset); padding-top: 8px; padding-bottom: 8px; }
th:first-child { border-top-left-radius: 8px; } th:last-child { border-top-right-radius: 8px; }
td { border-bottom-color: #efe4d2; }
tbody tr:hover td { background: #fdf6ea; }

/* Left menu: light, like a SaaS sidebar. */
.side { background: #fffcf6; border-right: 1px solid var(--line); }
.side-brand { font-family: var(--font-head); font-size: 1.45rem; font-weight: 400; letter-spacing: .03em; color: var(--forest); padding: 0 10px 12px; line-height: 1; }
.side-brand img.logo { width: auto; height: 64px; flex: none; } .side-brand b { font-weight: 400; color: var(--wine); }
.side h3 { font-size: .68rem; letter-spacing: .06em; margin: 16px 10px 4px; color: #a39886; }
.side button { font-size: .875rem; color: #3d3a33; font-weight: 500; min-height: 36px; padding: 7px 10px; border-radius: 7px; }
.side button:hover { background: var(--inset); }
.side button[aria-current="true"] { background: var(--wine-soft); color: var(--wine); font-weight: 600; }
.side button[aria-current="true"] .tab-badge { background: var(--wine); color: #fff; }
.tab-badge.soft { background: var(--inset); color: #55504a; } .side button[aria-current="true"] .tab-badge.soft { background: #fff; color: var(--wine); }
.menu-btn { background: #fff; border-color: var(--line-strong); }

/* Tasks, Today and Set up */
.tasklist li, .su-step, .projcard, .kcard, .todo-list button { background: #fff; border-color: var(--line); }
.tasklist li.auto { background: #fffcf6; } .autodot { color: var(--gold); }
.kcol { background: var(--inset); } .projcard.on { border-color: var(--wine); box-shadow: var(--ring); }
.projbar { background: #efe4d2; } .projbar i { background: var(--wine); }
.su-step.done { background: #fffcf6; } .su-step.done .su-mark { background: var(--green); border-color: var(--green); } .su-mark { border-color: var(--line-strong); }
.setup-bar { background: var(--wine-soft); border-color: var(--wine-line); color: var(--wine-ink); }
.wk-kind.task { background: var(--inset); color: #55504a; } .wk-kind.exp { background: var(--warn-soft); } .wk-kind.goal { background: var(--wine-soft); color: var(--wine); }
.alert { background: var(--warn-soft); border: 1px solid #f6d98a; } .alert.soft { background: var(--inset); border-color: var(--line); color: #55504a; }
.toast { background: var(--fg); color: #fff; border-radius: 10px; box-shadow: 0 12px 24px rgba(15, 45, 36, .18); }

/* Board designer */
.dz-stage, .dz-3d { background: var(--inset); border-color: var(--line); }
.dz-pal-it { background: #fff; } .dz-pal-it:hover { border-color: var(--wine); }
.dz-selbox, .dz-pal-filt { background: transparent; } .dz-selbox { background: #fffcf6; }
.recent li { align-items: center; } .recent li .pill { align-self: center; flex: none; }

/* Cost & profit: the three steps sit side by side only when each has room (otherwise one per row, e.g. on iPad). */
.summary { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
details.blk > summary h3 { min-width: 0; } .blk-sum { white-space: normal; text-align: right; }
/* Projects page */
.pj-new { margin-bottom: 4px; }
.pj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.pj { gap: 10px; } .pj-done { opacity: .7; }
.pj-head { display: flex; gap: 8px; align-items: center; } .pj-head .pj-name { flex: 1; min-width: 0; font-weight: 600; font-size: 1rem; padding: 6px 8px; }
.pj-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .pj-meta input[type=date] { padding: 4px 8px; }
.pj-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pj-tasks li { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.pj .taskadd input[name=text] { flex: 1 1 160px; }
.taskchk .kt { font-weight: 500; }
.design-warn ul { margin: 6px 0 0; padding-left: 18px; } .design-warn { display: block; }

/* Appearance (Board settings › General): accent color swatches. */
.accents { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.accent { width: 34px; height: 34px; border-radius: 999px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); padding: 0; }
.accent[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--fg); }
.accents input[type=color] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.dz-pal-it.plan.done { opacity: .55; } .dz-plan-src { margin: 0; } .dz-plan-done { color: var(--green); font-weight: 500; }
.dz-beyond-note { margin: 0; font-size: .82rem; background: var(--warn-soft); color: var(--warn); border: 1px solid #f6d98a; border-radius: 8px; padding: 8px 10px; }
.find-price .money-in { width: 110px; } .find-price input.num { width: 80px; }
/* Designer ingredient panel: a simple stack that grows with what's in it; only the list scrolls. */
.dz-pal { display: flex; flex-direction: column; gap: 8px; }
.dz-pal > * { flex: 0 0 auto; }
.dz-pal > .dz-pal-list { flex: 1 1 auto; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.dz-pal-list > * { flex: 0 0 auto; } .dz-pal-it { min-height: max-content; } .dz-pal-cat { margin-bottom: 2px; }
@media (max-width: 760px) { .dz-pal > .dz-pal-list { max-height: 300px; } }
.fp-in { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; } .fp-hint { flex-basis: 100%; }

/* Hiding the left menu on a wide screen (« in the menu; the ☰ button brings it back). */
.side-brand { position: relative; }
.side .side-hide { position: absolute; right: 2px; top: -4px; width: 32px; min-height: 32px; height: 32px; padding: 0; justify-content: center; font-size: 1.05rem; color: #a39886; border-radius: 7px; }
.side .side-hide:hover { color: var(--fg); background: var(--inset); }
@media (min-width: 861px) {
  body.side-hidden .shell { grid-template-columns: minmax(0, 1fr); }
  body.side-hidden .side { display: none; }
  body.side-hidden .menu-btn { display: flex; }
  body.side-hidden .shell > .wrap { max-width: none; padding-left: max(24px, env(safe-area-inset-left, 0px)); }
}

/* Ingredients & prices: one card per ingredient, so everything fits without scrolling sideways. */
.ing-grp { display: flex; align-items: baseline; gap: 8px; font-size: 1rem; font-weight: 600; margin: 22px 0 8px; }
.ing-sub { margin: 10px 0 6px; font-size: .85rem; }
.ingcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px; }
.ingcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ingcard.open { grid-column: 1 / -1; border-color: var(--wine-line); }
.ingcard.off { background: var(--inset); } .ingcard.off input { opacity: .6; }
.ic-top { display: flex; gap: 8px; align-items: flex-start; } .ic-top .namecell { flex: 1; min-width: 0; }
.ic-top .namecell input { width: 100%; font-weight: 600; font-size: 1rem; }
.ic-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.ic-fields label { display: flex; flex-direction: column; gap: 3px; font-size: .75rem; color: var(--muted); font-weight: 500; min-width: 0; }
.ic-fields label select, .ic-fields label > input { width: 100%; min-width: 0; }
.ic-price { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.ic-price .money-in input { width: 70px; }
.ic-cost { display: flex; flex-direction: column; gap: 2px; margin-left: auto; text-align: right; font-size: .9rem; }
.ic-cost.missing b { color: var(--warn); }
.ic-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 8px; font-size: .85rem; }
.ic-det { display: flex; align-items: center; gap: 8px; min-width: 0; } .ic-det .detsum { margin: 0; text-align: left; max-width: none; }
.ingcard .stockgrid { padding: 0; }
.ingcard .discform { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qty-unit { display: inline-flex; gap: 4px; align-items: center; } .qty-unit input { min-width: 0; flex: 1; } .qty-unit .qtyunit { width: auto; flex: none; }
/* Add-ingredient form: fields flow to fit (fruit and veg hide two), and the button stays button-sized. */
.newform.libform { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.newform.libform > label:first-child { grid-column: span 2; }
.newform.libform > .btn { justify-self: start; white-space: nowrap; }
.newform.libform .qty-unit { display: flex; } .newform.libform input[type=number] { width: 100%; }
@media (max-width: 520px) { .newform.libform { grid-template-columns: 1fr 1fr; } .newform.libform > .btn { justify-self: stretch; } }
#sec-sub:empty { display: none; }
/* Ingredients & prices: category filter menu with a count per category. */
.catpick { position: relative; }
.catpick-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 200px; min-height: 40px; padding: 7px 12px; border: 1px solid var(--line-strong, var(--line)); border-radius: 8px; background: #fff; color: var(--muted); font: inherit; text-align: left; }
.catpick-btn::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); flex: none; }
.catpick-btn.chosen { color: var(--fg); }
.catpick-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; min-width: 260px; max-height: 60vh; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 45, 36, .14); padding: 4px; }
.catpick-it { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: 0; background: none; padding: 9px 10px; border-radius: 7px; font: inherit; color: var(--fg); text-align: left; min-height: 40px; }
.catpick-it:hover { background: var(--inset); }
.catpick-it[aria-selected="true"] { background: var(--wine-soft); color: var(--wine); font-weight: 600; }
.catpick-it[aria-selected="true"] .tab-badge { background: var(--wine); color: #fff; }
.catpick-it .tab-badge { margin-left: 0; }
/* Produce tiles: one per item, a row per store. */
.ingcards.tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.itemtile .it-head { display: flex; align-items: flex-start; gap: 12px; }
.itemtile .it-name { flex: 1; min-width: 0; font-weight: 600; font-size: 1.05rem; }
.it-cost { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex: none; } .it-cost b { font-size: 1.15rem; } .it-cost.missing b { color: var(--warn); }
.it-rows { display: flex; flex-direction: column; gap: 8px; }
.it-row { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.it-row.last { border-color: var(--wine-line); background: var(--wine-soft); } .it-row.off { opacity: .7; }
.it-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 10px; }
.it-fields label { display: flex; flex-direction: column; gap: 3px; font-size: .75rem; color: var(--muted); font-weight: 500; }
.it-fields label:has(input.wide) { flex: 1 1 120px; min-width: 0; } .it-fields input.wide { width: 100%; }
.it-fields .money-in input { width: 64px; } .it-fields .ic-cost { margin-left: auto; }
.it-row .ic-foot { border-top: 0; padding-top: 0; }
.it-foot { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; border-top: 1px solid var(--line); padding-top: 8px; }
.it-stat { display: flex; flex-direction: column; gap: 2px; font-size: .75rem; color: var(--muted); } .it-stat b { font-size: .9rem; color: var(--fg); }
.it-quotes { max-width: 260px; }
.it-pref { color: var(--muted); } .it-pref.on { color: var(--wine); font-weight: 600; }
/* Ingredients & prices list view (for picking several at once). */
.libtable td, .libtable th { white-space: nowrap; text-align: left; } .libtable .num { text-align: right; } .libtable td:nth-child(2) { white-space: normal; }
.libtable tr.off td { opacity: .6; }
.libtools .seg { margin-right: 4px; }
/* Supplier / brand picker (matches + "Add as new"). */
.combo-pop { position: fixed; z-index: 60; max-height: 280px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 45, 36, .14); padding: 4px; }
.combo-it { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 7px; font: inherit; color: var(--fg); min-height: 40px; }
.combo-it:hover, .combo-it[aria-selected="true"] { background: var(--inset); }
.combo-it.new { color: var(--wine); } .combo-it.new b { font-weight: 600; }
/* Price boxes on cards and store rows: saved together (Save, Enter, or leaving them). */
.pform { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 10px; }
.pform label { display: flex; flex-direction: column; gap: 3px; font-size: .75rem; color: var(--muted); font-weight: 500; }
.pform .pf-save { display: none; }
.pform:focus-within .pf-save, .pform.dirty .pf-save { display: inline-flex; }
/* Left menu sections: collapse (tap the heading) and reorder (Arrange menu). */
/* Projects list view and overall tracker. */
.pj-total { display: flex; flex-direction: column; gap: 8px; }
.projbar.big { height: 10px; }
.pjtable td { vertical-align: middle; } .pjtable .pj-name.sm { font-size: .95rem; font-weight: 600; width: 100%; min-width: 160px; }
.pjtable .pj-prog { min-width: 200px; } .pjtable .pj-prog .su-progress { margin: 0; }
.pjtable tr.pj-done td { opacity: .65; } .pjtable tr.pj-more td { background: var(--inset); }
.pj-needs { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.pj-need .kt .pill { margin-right: 4px; } .pj-need.done .kt { text-decoration: line-through; color: var(--muted); }
/* Task done button: one round button per task (no second checkbox); selection checkboxes only in Select mode. */
.tkcircle { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong, #dccbb1); background: #fff; padding: 0; flex: none; display: inline-grid; place-items: center; cursor: pointer; margin-top: 1px; }
.tkcircle:hover { border-color: var(--wine); }
.tkcircle.on { background: var(--wine); border-color: var(--wine); }
.tkcircle.on::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: translate(0, -1px) rotate(45deg); }
.tkcircle.auto { border-style: dashed; cursor: default; opacity: .5; }
.tktable .tkdonecol { width: 36px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Card headers: every card starts with a band that matches the left menu's active-page highlight, so it follows the
   accent color chosen in Board settings › General (--wine / --wine-soft). The band is the card's own top heading (h2, h3,
   .s-head, .pj-head, a first div holding one, or the summary of a card that opens and closes); a card without one names
   itself with data-hd, shown as the band. */
.card > :is(h2, h3, .s-head, .pj-head):first-child, .card > div:first-child:has(> h2, > h3, > div > h2), .card > details:first-child > summary,
:is(.card, .picker)[data-hd]::before {
  margin: -16px -16px 0; padding: 11px 16px; background: var(--wine-soft); border-bottom: 1px solid var(--wine-line);
  border-radius: calc(var(--r) - 1px) calc(var(--r) - 1px) 0 0;
}
:is(.card, .picker)[data-hd]::before { content: attr(data-hd); display: block; font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; color: var(--wine); }
.card > :is(h2, h3):first-child, .card > :is(.s-head, .pj-head, div):first-child :is(h2, h3), .card > details:first-child > summary :is(h2, h3) { color: var(--wine); }
.card > details:first-child > summary { display: flex; align-items: center; justify-content: space-between; }
.card > details:first-child:not([open]) > summary { border-bottom: 0; border-radius: calc(var(--r) - 1px); margin-bottom: -16px; }
/* Add forms open in a modal (data-am-open → .am). The header matches the card headers and the menu's active page. */
.am { position: fixed; inset: 0; z-index: 70; display: grid; place-items: start center; overflow-y: auto; padding: max(48px, env(safe-area-inset-top, 0px)) 16px 24px; background: rgba(15, 45, 36, .42); }
.am-box { width: min(560px, 100%); background: var(--surface); border-radius: 14px; box-shadow: 0 24px 60px rgba(15, 45, 36, .28); overflow: hidden; }
.am-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 10px 12px 18px; background: var(--wine-soft); border-bottom: 1px solid var(--wine-line); }
.am-head h2 { margin: 0; color: var(--wine); }
.am-x { border: 0; background: none; width: 36px; height: 36px; border-radius: 8px; font-size: 1.5rem; line-height: 1; color: var(--muted); }
.am-x:hover { background: var(--surface); color: var(--fg); }
body.am-on { overflow: hidden; }
.am .amform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; align-items: end; padding: 16px 18px 18px; background: none; border: 0; border-radius: 0; }
.am .amform label { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--muted); font-weight: 500; min-width: 0; }
.am .amform label > input, .am .amform label > select, .am .amform label > textarea, .am .amform .qty-unit { width: 100%; min-width: 0; }
.am .amform textarea { font: inherit; padding: 8px 10px; resize: vertical; }
.am .amform .span2, .am .amform > label:first-child { grid-column: 1 / -1; }
.am-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.am .amform > .btn { grid-column: 1 / -1; justify-self: end; }
@media (max-width: 520px) { .am { padding-top: max(16px, env(safe-area-inset-top, 0px)); } .am .amform { grid-template-columns: minmax(0, 1fr); } }
.combo-pop { z-index: 80; }
.am .amform input:not([type=checkbox]):not([type=radio]), .am .amform select { min-height: 38px; padding: 7px 10px; text-align: left; }

/* Workspaces: the header menu picks one; the left menu lists that workspace's pages. */
.pagehead { align-items: center; flex-wrap: wrap; }
.pagehead-t { min-width: 0; }
.ws-pick { position: relative; flex: none; }
.ws-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--wine); font-family: var(--font-head); font-size: 1.35rem; letter-spacing: .04em; line-height: 1; position: relative; }
.ws-btn:hover { background: var(--wine-soft); }
.ws-btn .chev { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); flex: none; }
.ws-btn[aria-expanded="true"] .chev { transform: rotate(-135deg) translate(-1px, -1px); }
.ws-dot { position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--wine); border: 2px solid #fff; }
.ws-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 220px; display: grid; gap: 2px; padding: 6px; background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 12px 30px rgba(44, 31, 26, .16); }
.ws-it { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; border-radius: 8px; padding: 10px 12px; font-size: .95rem; font-weight: 500; color: var(--fg); min-height: 42px; }
.ws-it:hover { background: var(--inset); }
.ws-it[aria-selected="true"] { background: var(--wine-soft); color: var(--wine); font-weight: 600; }
.side-ws { display: flex; flex-direction: column; gap: 2px; }
.side .side-wsname { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: #a39886; margin: 6px 10px 6px; font-weight: 600; font-family: inherit; }
@media (max-width: 520px) { .ws-btn { font-size: 1.15rem; min-height: 40px; padding: 0 12px; } .pagehead { gap: 8px 10px; } .pagehead-t { flex-basis: 100%; } }

/* Build a board steps */
.steps { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.steps::-webkit-scrollbar { display: none; }
.steps button { display: inline-flex; align-items: center; gap: 8px; flex: none; border: 0; background: none; padding: 10px 12px; font-size: .92rem; font-weight: 500; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.steps button i { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--inset); color: var(--muted); font-style: normal; font-size: .78rem; font-weight: 700; }
.steps button:hover { color: var(--fg); }
.steps button[aria-current="step"] { color: var(--wine); border-bottom-color: var(--wine); font-weight: 600; }
.steps button[aria-current="step"] i { background: var(--wine); color: #fff; }
.step-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
.step-nav:empty { display: none; }
.bar .link { color: var(--bg); font-size: .85rem; text-decoration: underline; background: none; border: 0; padding: 0; }

/* Saved recipes and designs on each board size */
.size .size-saved { display: grid; gap: 1px; margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line); font-size: .7rem; color: #a39886; line-height: 1.25; }
.size .size-saved em { font-style: normal; }
.size .size-saved em.has { color: var(--forest); font-weight: 600; }
/* With Build a board split into steps, the cost bar shows on every screen size (except on the Cost step itself). */
@media (min-width: 861px) {
  .bar { display: flex; position: fixed; right: 24px; bottom: 16px; left: auto; width: min(460px, calc(100vw - 48px)); margin: 0; z-index: 30; box-shadow: 0 10px 28px rgba(44, 31, 26, .22); }
  body:has(#bar:not([hidden])) .wrap { padding-bottom: 88px; }
}
@media (max-width: 860px) { body:has(#bar:not([hidden])) .wrap { padding-bottom: 72px; } }

/* Board photos on Recipe book cards (photos.js) */
.bp-wrap { margin-top: 12px; display: grid; gap: 10px; }
.bp-wrap h4 { margin: 0; }
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bp { margin: 0; border: 1px solid var(--line, #e6ddd2); border-radius: 10px; overflow: hidden; background: var(--card, #fff); }
.bp.on { border-color: var(--wine, #b71932); }
.bp img, .bp-ph { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.bp-ph { display: grid; place-items: center; color: var(--muted, #8a7f73); font-size: .85rem; }
.bp figcaption { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 8px 10px; font-size: .85rem; }
.bp figcaption b { width: 100%; }
.bp-chk { display: inline-flex; gap: 6px; align-items: center; }

/* Settings › Ordering & delivery (ordering.js) */
#ordering { display: grid; gap: 16px; }
.od-top { gap: 12px; flex-wrap: wrap; align-items: center; }
.od-act { margin-left: auto; display: inline-flex; gap: 8px; }
.od-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: .82rem; color: var(--muted); margin: 8px 0; }
.od-key { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: -8px; vertical-align: -2px; border: 1px solid var(--line); }
.od-key.od-on { background: var(--green); } .od-key.od-off { background: var(--inset); }
.od-key.od-adding { background: #2563eb; } .od-key.od-removing { background: #e34a1c; }
.od-key.od-originkey { background: var(--wine); border-radius: 50%; }
.od-mapwrap { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.od-map { display: block; width: 100%; height: min(62vh, 520px); touch-action: none; cursor: grab; user-select: none; }
.od-z { stroke: var(--surface); stroke-width: .12; cursor: pointer; vector-effect: non-scaling-stroke; }
.od-z.od-on { fill: var(--green); fill-opacity: .78; } .od-z.od-off { fill: var(--inset); }
.od-z.od-adding { fill: #2563eb; fill-opacity: .85; } .od-z.od-removing { fill: #e34a1c; fill-opacity: .85; }
.od-z:hover { fill-opacity: 1; } .od-z.od-pick { stroke: var(--fg); stroke-width: 2.5; }
.od-lbl { fill: var(--fg); text-anchor: middle; dominant-baseline: middle; pointer-events: none; font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: .25em; }
.od-origin { fill: var(--wine); stroke: var(--surface); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.od-zoom { position: absolute; top: 8px; right: 8px; display: grid; gap: 4px; }
.od-zoom .btn { width: 36px; height: 36px; padding: 0; font-size: 1.1rem; background: var(--surface); }
.od-pickinfo { margin-top: 8px; font-size: .9rem; }
.od-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .78rem; color: #fff; }
.od-tag.od-on { background: var(--green); } .od-tag.od-off { background: var(--muted); }
.od-tag.od-adding { background: #2563eb; } .od-tag.od-removing { background: #e34a1c; }
.od-list { margin-top: 10px; } .od-list summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.od-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.od-row { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; text-align: left; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); border-left: 6px solid var(--inset); }
.od-row small { grid-column: 2; color: var(--muted); }
.od-row.od-on { border-left-color: var(--green); } .od-row.od-adding { border-left-color: #2563eb; background: #e3ebfd; } .od-row.od-removing { border-left-color: #e34a1c; background: #fde6de; }
.od-chk { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.od-days td { padding: 4px 6px; } .od-days input[type=time] { min-height: 36px; }
.od-place { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; display: grid; gap: 8px; }
.od-place:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.od-tiers { display: grid; gap: 8px; margin-top: 10px; } .od-tiers .row { gap: 8px; align-items: center; }
.od-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
#ordering .seg { margin-bottom: 10px; }
.od-gmap { width: 100%; height: min(62vh, 520px); }
.od-zhead { flex-wrap: nowrap !important; } .od-zhead .wide { flex: 1; min-width: 0; }
.od-key.od-homekey { background: #e07a1f; border-radius: 50%; } .od-origin.od-home { fill: #e07a1f; }
.od-key.od-otherkey { background: #c6c9cc; }
.od-z.od-other { fill: #c6c9cc; } .od-z.od-zone { fill-opacity: .8; }
.od-modes { margin: 4px 0 6px; flex-wrap: wrap; }
.od-zone .row { gap: 8px; align-items: center; }
.od-simrow { gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; } .od-simrow .wide { flex: 1 1 200px; min-width: 0; }
.od-simout { display: grid; gap: 10px; margin-top: 10px; }
.od-simres { border-top: 1px solid var(--line); padding-top: 8px; display: grid; gap: 6px; }
.chip.od-w { font-size: .82rem; } .chip.od-wok { background: #e3f1e0; color: #24461f; } .chip.od-wno { background: #f3e1dc; color: #7a2a14; }
.od-sched > summary { cursor: pointer; font-weight: 600; padding: 10px 4px; color: var(--muted); }
.od-schedin { display: grid; gap: 16px; }

/* Snap an ingredient (scan.js) */
.am .amform .sc-wide, .am .amform .sc-photos, .am .amform .sc-msg, .am .amform .sc-dupes { grid-column: 1 / -1; }
.sc-photos { display: flex; gap: 8px; flex-wrap: wrap; }
.sc-photos img { height: 96px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line, #ddd); }
.sc-msg:empty { display: none; }
.am .amform .sc-wide h4 { margin: 0 0 6px; font-size: .78rem; color: var(--muted); font-weight: 500; }
.am .amform label.sc-check { flex-direction: row; align-items: center; gap: 8px; margin-top: 8px; color: var(--fg); }
.sc-tgroup { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.sc-tgroup > span { font-size: .75rem; color: var(--muted); min-width: 64px; }
#sc-btn.busy { opacity: .6; pointer-events: none; }
.cat-actions .sc-board { padding-inline: 10px; flex: none; }
.sc-dupes:empty { display: none; }
.sc-dupes { background: var(--wine-soft); border: 1px solid var(--wine-line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; }
.sc-dupes > b { color: var(--wine); font-size: .85rem; }
.sc-dupe { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .85rem; }
/* Toasts show above add/review windows, so a message from one of them is never hidden */
.toast { z-index: 90; }

/* Build a board: category check (catMark in board.js) */
.cat-head h2 { display: inline-flex; align-items: center; gap: 8px; }
.catmark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; flex: none;
  font: 700 .8rem/1 Montserrat, system-ui, sans-serif; }
.catmark.done { background: var(--green); color: #fff; }
.catmark.part { background: #e0a526; color: #3d2a05; }
.catmark.todo { background: transparent; box-shadow: inset 0 0 0 2.5px #c0392b; }

/* Workspace picker in the left menu (it was in the page header) */
.side .ws-pick { margin: 2px 4px 12px; }
.side .ws-btn { width: 100%; justify-content: space-between; }
.side .ws-menu { left: 0; right: 0; min-width: 0; }
.side .side-wsname { display: none; }
/* Dashboard (Plan › Dashboard, renderToday) */
.dash { display: grid; gap: 20px; }
.dash .todaygrid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.dash .todaygrid > .today-tasks { grid-column: auto; }
.dtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.dtile { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--fg); font: inherit; border-left-width: 5px; }
.dtile:hover { background: var(--wine-soft); }
.dtile b { font-size: 1.8rem; line-height: 1; font-weight: 700; }
.dtile span { font-size: .85rem; color: var(--muted); }
.dtile.urgent { border-left-color: #c0392b; } .dtile.urgent b { color: #c0392b; }
.dtile.high { border-left-color: #e0a526; } .dtile.high b { color: var(--warn); }
.dtile.normal, .dtile.low { border-left-color: var(--line-strong); }
.dash-clear { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; color: var(--green); }
@media (max-width: 860px) { .dash .todaygrid { grid-template-columns: minmax(0, 1fr); } .dtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cattabs .cnt.ok { background: var(--green-soft); color: var(--green); }
.am .amform .sc-snaps { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.am .amform .sc-snaps .btn { flex: 1; justify-content: center; text-align: center; }

/* Build a board › drafts (board.js renderDrafts) */
.drafts-card { margin-bottom: 14px; }
.drafts-card h3 { margin: 0; }
.draftlist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.draftlist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.draftlist li.on { border-color: var(--green); background: var(--green-soft); }
.draftlist li > div { display: grid; gap: 2px; min-width: 0; }
.step-nav [data-draft-save] { margin-inline: auto; }

/* ---- App feel (Nov 2026): taps respond at once and look pressed; no gray tap flash; no long-press text selection on controls ---- */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
button, .btn, label.filebtn, [role="tab"], [role="option"], summary, .chip, .size, .dtile, .tchip, select { touch-action: manipulation; }
button, .btn, label.filebtn, [role="tab"], .chip, .size, .dtile, .tchip, .tabbar a, .pagestrip button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button:not(:disabled):active, .btn:active, label.filebtn:active, .chip:active, .size:active, .dtile:active, .tchip:active {
  transform: scale(.97); filter: brightness(.94); transition: transform 50ms ease-out, filter 50ms ease-out; }

/* Phones: bottom tab bar of workspaces + a row of the workspace's pages under the title (navChrome in settings.js) */
.tabbar, .pagestrip { display: none; }
@media (max-width: 860px) {
  :root { --tabbar-h: 58px; }
  .menu-btn { display: none !important; }
  .tabbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 4px max(4px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left, 0px));
    background: rgba(255, 252, 246, .94); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); border-top: 1px solid var(--line); }
  .tabbar button { position: relative; display: grid; justify-items: center; gap: 2px; height: 50px; padding: 5px 0 0; border: 0; background: none; color: #8a8072; font-size: .66rem; font-weight: 600; letter-spacing: .01em; }
  .tabbar button svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar button[aria-current="true"] { color: var(--wine); }
  .tabbar button[aria-current="true"] svg { stroke-width: 2.1; }
  .tabbar .tb-badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--wine); color: #fff; font: 700 .62rem/17px Montserrat, system-ui, sans-serif; font-style: normal; text-align: center; }
  .pagehead { min-width: 0; }
  .pagestrip { display: flex; gap: 6px; flex: 1 1 100%; min-width: 0; max-width: calc(100% + 32px); overflow-x: auto; scrollbar-width: none; margin: 2px -16px 0; padding: 2px 16px 4px; -webkit-overflow-scrolling: touch; }
  .pagestrip::-webkit-scrollbar { display: none; }
  .pagestrip:empty { display: none; }
  .pagestrip button { flex: none; border: 1px solid var(--line); background: #fff; color: var(--fg); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: .85rem; white-space: nowrap; }
  .pagestrip button[aria-current="true"] { background: var(--wine); border-color: var(--wine); color: #fff; }
  .pagestrip .tab-badge { margin-left: 4px; }
  .shell > .wrap { padding-bottom: calc(110px + var(--tabbar-h)); }
  .bar { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)) !important; padding-bottom: 10px !important; }
  .toast { bottom: calc(env(safe-area-inset-bottom, 0px) + var(--tabbar-h) + 72px); }
  body.am-on .tabbar { display: none; }
}

/* Phones: add / review windows are bottom sheets — slide up, grab handle, swipe down to close (amSwipe in core.js) */
@keyframes am-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes am-fade { from { background: rgba(15, 45, 36, 0); } }
@media (max-width: 860px) {
  .am { place-items: end stretch; padding: 0; overflow: hidden; animation: am-fade .22s ease-out; }
  .am-box { width: 100%; max-height: calc(100dvh - max(32px, env(safe-area-inset-top, 0px))); display: flex; flex-direction: column;
    border-radius: 18px 18px 0 0; animation: am-up .28s cubic-bezier(.2, .85, .25, 1); will-change: transform; }
  .am-box > :not(.am-head) { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; min-height: 0; }
  .am .amform { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .am-head { position: relative; padding-top: 20px; touch-action: none; cursor: grab; }
  .am-head::before { content: ''; position: absolute; top: 7px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: rgba(60, 40, 30, .22); }
  .am-box.dragging { animation: none; transition: none; }
  .am-box.settle { transition: transform .22s cubic-bezier(.2, .85, .25, 1); }
}

/* In-app camera (scan.js) */
.cam { position: fixed; inset: 0; z-index: 120; background: #000; color: #fff; display: grid; grid-template-rows: auto 1fr auto; }
.cam[hidden] { display: none; }
body.cam-on { overflow: hidden; } body.cam-on .tabbar { display: none; }
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.go { animation: cam-flash .25s ease-out; }
@keyframes cam-flash { from { opacity: .85; } to { opacity: 0; } }
.cam-top { position: relative; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; padding: max(10px, env(safe-area-inset-top, 0px)) 8px 10px;
  background: linear-gradient(rgba(0,0,0,.55), transparent); text-align: center; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.cam-top button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; font-size: 1.6rem; line-height: 1; }
.cam-msg { position: relative; align-self: center; margin: 0 24px; padding: 16px; border-radius: 14px; background: rgba(255,255,255,.95); color: var(--fg); text-align: center; }
.cam-msg p { margin: 0 0 12px; }
.cam-bot { position: relative; grid-row: 3; padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.cam-thumbs { display: flex; gap: 8px; justify-content: center; min-height: 0; margin-bottom: 10px; }
.cam-thumbs img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; border: 2px solid #fff; }
.cam-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.cam-side { justify-self: center; border: 0; background: rgba(0,0,0,.35); color: #fff; border-radius: 999px; padding: 10px 16px; font-weight: 600; }
#cam-done { justify-self: center; background: #fff; color: #000; }
#cam-shot { width: 74px; height: 74px; border-radius: 50%; border: 5px solid #fff; background: rgba(255,255,255,.92); box-shadow: 0 0 0 3px rgba(0,0,0,.25); }
#cam-shot:active { transform: scale(.92); background: #fff; }
#cam-shot:disabled { opacity: .45; }

/* Phones: a wide table scrolls sideways inside its card instead of widening the page */
@media (max-width: 860px) {
  .shell > .wrap, .pane, .pane > *, .card, .card > *, .saved > *, .recipe > *, .stack > * { min-width: 0; }
  .pane :not(.scroll) > table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .saved > .recipe { display: grid; }
  .saved > .recipe .row { flex-wrap: wrap; }
}

/* Recipe book cards (recipeCard in board.js) — the old ".saved div" row style doesn't apply inside them */
.saved .recipe { display: grid; gap: 12px; padding: 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.saved .recipe .rcp-head h3 { margin: 0; font-size: 1.25rem; line-height: 1.2; }
.saved .recipe .rcp-head .note { margin: 4px 0 0; }
.rcp-notes { margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--bg); font-size: .9rem; }
.saved .recipe .rcp-sizes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.rcp-sizes button { display: grid; gap: 1px; justify-items: center; border: 0; background: none; border-radius: 7px; padding: 7px 4px; color: var(--muted); }
.rcp-sizes button b { color: var(--fg); font-size: .9rem; } .rcp-sizes button span { font-size: .72rem; }
.rcp-sizes button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px rgba(44, 31, 26, .15); }
.rcp-sizes button[aria-pressed="true"] b { color: var(--wine); }
.saved .recipe .rcp-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.saved .recipe .rcp-tile { display: grid; align-content: start; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.rcp-tile span { font-size: .75rem; color: var(--muted); font-weight: 600; }
.rcp-tile b { font-size: 1.15rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rcp-tile b .rate { font-size: .68rem; }
.rcp-today { margin: -4px 0 0; font-size: .82rem; color: var(--warn); }
.saved .recipe .rcp-items { display: grid; gap: 14px; }
.rcp-cat h4 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 4px; padding-bottom: 4px; border-bottom: 2px solid var(--wine-soft);
  color: var(--wine); font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }
.rcp-cat h4 span { color: var(--muted); font-weight: 600; letter-spacing: 0; text-transform: none; }
.rcp-cat ul { list-style: none; margin: 0; padding: 0; }
.rcp-cat li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rcp-cat li:last-child { border-bottom: 0; }
.saved .recipe .rcp-cat li > div { display: grid; gap: 1px; min-width: 0; }
.rcp-name { font-weight: 600; }
.rcp-cat li small { color: var(--muted); font-size: .78rem; }
.rcp-cat li > b { flex: none; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.rcp-cat li > b i { font-style: normal; font-weight: 500; color: var(--muted); font-size: .8rem; }
.rcp-more { border-top: 1px solid var(--line); padding-top: 8px; }
.rcp-more summary { cursor: pointer; font-weight: 600; color: var(--wine); font-size: .9rem; }
.saved .recipe .rcp-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.saved .recipe .rcp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rx-pick { flex-wrap: wrap; } .rx-pick .btn[disabled] { opacity: .45; cursor: default; }
@media (max-width: 560px) { .saved .recipe .rcp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .saved .recipe { padding: 14px; } }

/* Board photo viewer (photos.js) */
.bp-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.bp-open img { display: block; width: 100%; }
.bpv { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; background: rgba(12, 8, 6, .94); animation: am-fade .18s ease-out; }
.bpv[hidden] { display: none; }
.bpv img { max-width: 100vw; max-height: calc(100dvh - 120px); object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.bpv-x { position: absolute; top: max(12px, env(safe-area-inset-top, 0px)); right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 1.7rem; line-height: 1; }
.bpv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 10px; background: rgba(255,255,255,.12); color: #fff; font-size: 2rem; }
#bpv-prev { left: 8px; } #bpv-next { right: 8px; }
.bpv-nav[hidden] { display: none; }
.bpv-cap { position: absolute; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom, 0px)); margin: 0; color: #fff; text-align: center; font-size: .9rem; opacity: .9; }

/* =====================================================================================================
   Calmer pages (Nov 2026). Card headings are plain accent-colored text over a hairline instead of a filled band,
   so a page with many cards doesn't read as a stack of forms. A card inside another card has no box of its own.
   ============================================================================================================ */
.card > :is(h2, h3, .s-head, .pj-head):first-child, .card > div:first-child:has(> h2, > h3, > div > h2), .card > details:first-child > summary,
:is(.card, .picker)[data-hd]::before {
  margin: 0; padding: 0 0 10px; background: transparent; border-bottom: 1px solid var(--line); border-radius: 0;
}
.card > details:first-child:not([open]) > summary { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
:is(.card, .picker) :is(.card, .picker) { border: 0; box-shadow: none; background: transparent; padding: 0; }
:is(.card, .picker) .card > :is(h2, h3, .s-head, .pj-head):first-child, :is(.card, .picker) .card > div:first-child:has(> h2, > h3, > div > h2) { border-bottom: 0; padding-bottom: 0; }
/* Build a board › Board & size: sizes with nothing saved yet don't list "0 recipes · 0 designs". */
.size-saved.none { display: none; }
.boardmode { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* Read mode (Nov 2026): settings cards show their values as plain text; Edit on a card unlocks just that card
   (readmode.js). Buttons that change something are hidden until then; folding sections still open. */
.card.ro-card { position: relative; }
.ro-edit { position: absolute; top: 12px; right: 14px; z-index: 2; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg);
  border-radius: 999px; padding: 4px 14px; font-size: .8rem; font-weight: 600; cursor: pointer; }
.ro-edit[aria-pressed="true"] { background: var(--wine); border-color: var(--wine); color: #fff; }
.card.ro-card > :is(h2, h3, .s-head, .pj-head):first-child, .card.ro-card > div:first-child, .card.ro-card[data-hd]::before { padding-right: 84px; }
html body .card.ro :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea):disabled {
  border-color: transparent; background: transparent; box-shadow: none; color: var(--fg); -webkit-text-fill-color: var(--fg); opacity: 1;
  appearance: none; -webkit-appearance: none; background-image: none; padding-left: 0; padding-right: 0; cursor: default; }
html body .card.ro select:disabled { text-align: inherit; }
.card.ro :is(input, select, textarea):disabled::placeholder { color: var(--muted); -webkit-text-fill-color: var(--muted); }
.card.ro .money-in, .card.ro .money-in:focus-within { border-color: transparent; background: transparent; box-shadow: none; }
.card.ro input:is([type=checkbox], [type=radio]):disabled { opacity: .85; }
.card.ro button:not(.ro-edit):not(.ro-keep), .card.ro .ro-hide, .card.ro input[type=color], .card.ro input[type=range] { display: none !important; }

/* Calculator (Plan › Calculator). */
#quick { display: grid; gap: 14px; }
.qa-pick { gap: 10px; }
.qa-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 10px; }
.qa-seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.qa-seg::-webkit-scrollbar { display: none; }
.qa-seg button { white-space: nowrap; }
.qa-fixed { font-size: .9rem; }
.qa-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.qa-tile { background: var(--inset); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.qa-tile span { font-size: .72rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.qa-tile b { font-size: 1.3rem; font-weight: 650; letter-spacing: -.02em; }
.qa-tile small { color: var(--muted); font-size: .75rem; }
.qa-table { width: 100%; border-collapse: collapse; }
.qa-table th, .qa-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.qa-table th:not(:first-child), .qa-table td.num { text-align: right; }
.qa-table tr.cur td { background: var(--wine-soft); }
.qa-recipe { display: grid; gap: 10px; }
@media (max-width: 560px) {
  .qa-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qa-row { grid-template-columns: 1fr; gap: 4px; }
  .qa-table th, .qa-table td { padding: 7px 4px; font-size: .82rem; }
  .qa-table .qa-items { display: none; }
}
.card.ro input.ro-empty:disabled { color: transparent; -webkit-text-fill-color: transparent; }
.card.ro input[type=date].ro-empty:disabled { display: none; }
/* Bakery menu (Make › Bakery menu). */
.bk-page { display: grid; gap: 14px; }
.bk-page[hidden] { display: none; }
.bk-coll { display: grid; gap: 6px; }
.bk-coll + .bk-coll { margin-top: 10px; }
.bk-coll h3 { margin: 0; font-size: .98rem; }
.bk-card .settable { margin-top: 4px; }
.bake-src a { font-weight: 600; }
.bk-page, .bk-page > .card { min-width: 0; }
.bk-card select { max-width: 200px; }
.bk-coll td:first-child { min-width: 220px; }
.bk-coll select { max-width: none; width: 100%; }

/* Compact rows (Nov 2026): Ingredients & prices and the Baking pantry list one row per item; tapping opens the full card. */
.ingrows { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.ing-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 14px; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--fg); font: inherit; cursor: pointer; }
.ingrows > :last-child, .ingrows > :last-child > .ing-row:last-child { border-bottom: 0; }
.ing-row:hover { background: var(--inset); }
.ing-row.off { opacity: .65; }
.ing-row .ir-main { display: grid; gap: 1px; min-width: 0; }
.ing-row .ir-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ing-row .ir-main .advtag { justify-self: start; margin-top: 2px; }
.ing-row .ir-main small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ing-row .ir-flags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.ing-row .ir-cost { font-weight: 650; white-space: nowrap; text-align: right; }
.ing-row .ir-cost small { color: var(--muted); font-weight: 500; }
.ing-row .ir-cost.missing { color: var(--warn); font-weight: 600; font-size: .85rem; }
.ir-chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-top: -4px; }
.ing-row.open .ir-chev { transform: rotate(-135deg); margin-top: 4px; }
.ing-open { border-bottom: 1px solid var(--line); background: var(--inset); }
.ing-open > .ing-row { border-bottom: 0; background: var(--wine-soft); }
.ing-open > .ingcard { margin: 0 10px 10px; }
@media (max-width: 560px) {
  .ing-row { grid-template-columns: minmax(0, 1fr) auto 12px; }
  .ing-row .ir-flags { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .ing-row .ir-flags:empty { display: none; }
}
.lib-filt { display: none; }
@media (max-width: 560px) {
  .lib-filt { display: inline-flex; }
  #lib-board-card:not(.filt-open) :is(#lib-subfilter, #lib-adv, #lib-board) { display: none; }
  #lib-board-card .lib-csv { display: none; }
}
/* Build a board: each category's budget in its header; the to-finish list folds to a count. */
.catbud { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.catbud b { color: var(--fg); }
.catbud.ok b { color: var(--green); }
.catbud.over { color: var(--danger); } .catbud.over b { color: var(--danger); }
details.todo > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
details.todo > summary::-webkit-details-marker { display: none; }
details.todo > summary h3 { margin: 0; }
details.todo > summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
details.todo[open] > summary::after { content: '▴'; }
.todo-n { background: var(--warn); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 1px 8px; }
details.todo ul { margin-top: 8px; }
.rb-rows .ing-open > .recipe { margin: 0 10px 10px; background: var(--surface); }
/* Build a board › Cost: an open "What this board costs you" takes the full width. Phones fold the ingredient filter chips. */
.summary > details.blk[data-blk="1"][open] { grid-column: 1 / -1; }
.pf-toggle { display: none; justify-self: start; }
@media (max-width: 560px) {
  .pf-toggle { display: inline-flex; }
  .pickf:not(.open) { display: none; }
}

/* Review (Nov 2026): new finds and suggested suppliers one card at a time; swipe right = Want to try, left = Not a fit. */
.rv { position: fixed; inset: 0; z-index: 80; background: rgba(15, 45, 36, .55); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) 14px max(16px, env(safe-area-inset-bottom, 0px)); }
.rv[hidden] { display: none; }
body.rv-on { overflow: hidden; } body.rv-on .tabbar { display: none; }
.rv-box { width: min(460px, 100%); max-height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; }
.rv-head { display: flex; align-items: center; justify-content: space-between; color: #fff; }
.rv-head .link { color: #fff; }
.rv-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .18); color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.rv-card { position: relative; background: var(--surface); border-radius: 18px; padding: 20px 18px; overflow-y: auto; box-shadow: 0 18px 48px rgba(15, 45, 36, .35);
  display: grid; gap: 8px; align-content: start; touch-action: pan-y; user-select: none; cursor: grab; }
.rv-card h2 { margin: 0; font-size: 1.35rem; color: var(--forest); }
.rv-src { margin: 0; color: var(--muted); } .rv-meta { margin: 0; font-size: .88rem; }
.rv-price { margin: 4px 0; font-size: 1rem; } .rv-why { margin: 0; font-weight: 500; } .rv-desc { margin: 0; color: var(--muted); font-size: .88rem; }
.rv-items { margin: 0; padding-left: 18px; font-size: .9rem; } .rv-link { font-weight: 600; }
.rv-stamp { position: absolute; top: 18px; padding: 4px 10px; border: 3px solid; border-radius: 8px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; opacity: 0; pointer-events: none; }
.rv-stamp.yes { left: 16px; color: var(--green); transform: rotate(-12deg); } .rv-stamp.no { right: 16px; color: var(--danger); transform: rotate(12deg); }
.rv-acts { display: flex; justify-content: center; align-items: center; gap: 22px; }
.rv-btn { border: 0; border-radius: 50%; width: 68px; height: 68px; font-size: 1.6rem; font-weight: 700; cursor: pointer; display: grid; place-items: center; line-height: 1;
  background: var(--surface); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.rv-btn small { display: block; font-size: .6rem; font-weight: 600; margin-top: 2px; }
.rv-btn.yes { color: var(--green); } .rv-btn.no { color: var(--danger); }
.rv-btn.skip { width: auto; height: 40px; border-radius: 999px; padding: 0 18px; font-size: .9rem; color: var(--fg); }
.rv-why-pick { background: var(--surface); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; }
.rv-done { background: var(--surface); border-radius: 18px; padding: 28px 20px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.rv-done h2 { margin: 0; }
/* Research statuses on rows. */
.pill.stage-review { background: #e6eef9; color: #234a7a; }
.pill.stage-want { background: var(--green-soft); color: var(--green); }
.pill.stage-notfit { background: var(--inset); color: var(--muted); }
.finds-import { flex-wrap: wrap; }
.notfit-list summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.suprev-body { padding: 0 10px 10px; }
=======
/* Bakery menu (boxes.js) */
.bk-cols { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.bk-col { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-width: 0; }
.bk-col-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bk-col-head .bk-name { flex: 1 1 140px; font-weight: 600; }
.bk-recs { display: grid; gap: 6px; } .bk-recs select { width: 100%; }
.bk-pairs { display: grid; gap: 4px; }
tr.bk-sub td { border-top: 0; padding-top: 0; }
/* Recipe book › Bakery recipes. */
.bb-body { padding: 4px 14px 14px; display: grid; gap: 8px; }
.bb-lines { list-style: none; margin: 0; padding: 0; display: grid; }
.bb-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.bb-lines li b i { font-style: normal; font-weight: 500; color: var(--muted); }
.bb-lines li small { text-align: right; color: var(--muted); }
.bb-body .btn { justify-self: start; }

/* ============================================================================================================
   Phone comfort (Nov 2026)
   ============================================================================================================ */
/* Build a board on a phone: the item's name, source and warnings get the full width; amount, cost and remove sit on the
   line below. Warnings don't break mid-phrase. */
@media (max-width: 560px) {
  .item { grid-template-columns: minmax(0, 1fr) auto auto; row-gap: 6px; }
  .item > .name { grid-column: 1 / -1; }
  .item > .qty { justify-self: start; }
  .item .name .pill { white-space: nowrap; display: inline-block; margin-top: 2px; }
}
/* Long names in list rows run to two lines before they're cut short. */
.ing-row .ir-main b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Touch screens: every button, link-button, chip and checkbox is at least about 40px to tap. */
@media (pointer: coarse) {
  button.link, a.link { min-height: 40px; padding: 8px 6px; display: inline-flex; align-items: center; }
  .tchip, .chip, .seg button, .detbtn, .btn.sm, .x, .ro-edit { min-height: 40px; }
  .x { min-width: 40px; }
  input[type=checkbox], input[type=radio] { width: 22px; height: 22px; }
  label:has(> input[type=checkbox]) { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; }
  .rb-tools .btn { min-height: 44px; }
}
.rb-tools { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.bk-sec > h2 { margin: 0; }
/* The Recipe book's list and tools aren't the old flex rows that .saved > div gives. */
#saved > .ingrows { display: grid; justify-content: initial; align-items: initial; gap: 0; padding-top: 0; border-top: 1px solid var(--line); }
#saved > .rb-tools { border-top: 0; padding-top: 0; justify-content: flex-end; }

/* Bakery menu cost tables (Nov 2026): compact cells, the name column stays put while the sizes scroll,
   and what a row is missing shows once under its name instead of in every cell. */
.bk-mx { width: auto; min-width: 100%; }
.bk-mx th, .bk-mx td { white-space: nowrap; }
.bk-mx th.num, .bk-mx td.num { text-align: right; min-width: 92px; }
.bk-mx th small { font-weight: 400; color: var(--muted); }
.bk-mx .bk-name-c { white-space: normal; min-width: 150px; }
.bk-mx .bk-c small { margin-left: 4px; }
.bk-mx .bk-mg { margin-top: 2px; font-size: .78rem; color: var(--muted); }
.bk-mx .bk-na { color: var(--muted); }
.bk-need { margin-top: 3px; font-size: .74rem; line-height: 1.35; color: var(--muted); white-space: normal; }

/* Make › Bakery menu builder (Nov 2026): same steps, chips and size buttons as Build a board. */
#bakery { display: grid; gap: 14px; }
.bk-sizes { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.bk-strip { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: .9rem; }
.bk-strip > span:last-child { color: var(--muted); }
.bk-col-edit { display: grid; gap: 10px; }
.bk-rec { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; }
.bk-rec select { width: 100%; }
.bk-rec-n { font-weight: 600; font-size: .85rem; white-space: nowrap; }
.bk-rec small { grid-column: 1 / -1; }
.bk-pick { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding-top: 8px; border-top: 1px solid var(--line); }
.bk-recipes { max-height: 260px; overflow: auto; }
.bk-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bk-totals > div { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--inset); }
.bk-totals b { font-size: 1.15rem; }
.bk-h { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 6px 0 0; }
.bk-mx tr.bk-cur td { font-weight: 600; }
.bk-saved-card { margin-top: 6px; }
@media (max-width: 620px) { .bk-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Labels (Make › Labels, Nov 8 2026): cottage food label preview and print. Sizes are real inches and points. */
.lbl-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 16px; align-items: end; }
.lbl-pick label { display: grid; gap: 4px; min-width: 0; }
.lbl-pick select, .lbl-pick input.wide { width: 100%; min-width: 0; box-sizing: border-box; }
.lbl-stage { margin: 18px 0 10px; padding: 18px; background: var(--bg2, #f4efe6); overflow-x: auto; display: flex; justify-content: center; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.clabel { --lbl-pt: 8pt; flex: none; box-sizing: border-box; padding: 0.12in 0.14in; background: #fff; color: #000; border: 1px solid #c9c2b6;
  font-family: 'Montserrat', Arial, sans-serif; font-size: var(--lbl-pt); line-height: 1.25; display: flex; flex-direction: column; gap: 0.04in; overflow: hidden; }
.clabel p { margin: 0; max-width: none; }
.clabel, .clabel * { text-transform: none !important; letter-spacing: normal !important; }
.clabel, .clabel p, .clabel div { font-weight: 400; }
.clabel b { font-weight: 700; }
.clabel .lbl-name, .clabel .lbl-net { font-weight: 700; }
.clabel .lbl-home { font-weight: 700; }
.clabel .lbl-brand { letter-spacing: .06em !important; }
.lbl-brand { font-family: 'Bebas Neue', 'Arial Narrow', sans-serif; font-size: 11pt; letter-spacing: .06em; line-height: 1; }
.lbl-name { font-weight: 700; font-size: 7pt; line-height: 1.2; }
.lbl-net { font-weight: 700; font-size: 7pt; }
.lbl-body { display: grid; gap: 0.03in; }
.lbl-foot { margin-top: auto; display: grid; gap: 0.04in; font-size: 7pt; line-height: 1.25; }
.lbl-home { font-size: 10pt; font-weight: 700; line-height: 1.1; }
.lbl-foot--side { grid-template-columns: max-content minmax(0, 1fr); column-gap: 0.08in; align-items: end; }
.clabel .lbl-biz--big { font-size: 8pt; line-height: 1.3; }
.lbl--biz { justify-content: center; text-align: center; gap: 0.1in; }
.lbl--biz .lbl-brand { font-size: 16pt; }
.lbl--biz .lbl-foot { margin-top: 0; gap: 0.1in; }
.lbl--biz-sm { padding: 0.05in 0.08in; }
.lbl--biz-sm .lbl-foot { gap: 0.04in; }
.lbl--biz-sm .lbl-biz--big { font-size: 6.5pt; line-height: 1.2; }
.lbl-warn { margin: 6px 0 0; padding-left: 1.2em; color: var(--warn, #9a4b00); font-size: .9rem; }
.ok-t { color: var(--ok, #2e7d32); }
.lbl-actions { margin-top: 12px; }
.pan-label { display: grid; gap: 10px; margin: 10px 0 4px; }
.pan-label textarea { font: inherit; padding: 8px 10px; min-height: 52px; resize: vertical; }
.pan-subs { margin: -6px 0 0; }
.lbl-size-add { gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.pan-al .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; align-items: center; }
#lbl-print { display: none; }
@media print {
  body.lbl-printing > *:not(#lbl-print) { display: none !important; }
  body.lbl-printing #lbl-print { display: block; }
  body.lbl-printing #lbl-print .clabel { border: 0; }
  body.lbl-printing { background: #fff !important; margin: 0; }
}

.lbl-check { display: flex !important; flex-direction: row; align-items: center; gap: 8px; align-self: center; }
.lbl-check input { width: 20px; height: 20px; accent-color: var(--accent, #BB0833); }
.lbl--sm { padding: 0.05in 0.07in; gap: 0.03in; }

/* Recipe book bakery recipe: card view, then Edit (Nov 12 2026) */
.bk-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .bk-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bk-facts > div { display: grid; gap: 2px; background: var(--inset); border-radius: 8px; padding: 8px 10px; }
.bk-facts span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.bk-facts b { font-size: .95rem; }
.bk-ings { list-style: none; margin: 0; padding: 0; display: grid; }
.bk-ings li { display: grid; grid-template-columns: 5.5em minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.bk-ings li:last-child { border-bottom: 0; }
.bk-q { font-weight: 600; white-space: nowrap; } .bk-n { overflow-wrap: anywhere; } .bk-c { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.bk-actions { gap: 10px; flex-wrap: wrap; }
.bk-meta { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.bk-f { display: grid; gap: 3px; font-size: .76rem; color: var(--muted); }
.bk-lines { display: grid; gap: 8px; }
.bk-line { display: grid; grid-template-columns: minmax(0, 1fr) 5.5em 5.5em 6em auto; gap: 8px; align-items: center; }
.bk-line select, .bk-line input { min-width: 0; width: 100%; }
.bk-cost { text-align: right; white-space: nowrap; }
@media (max-width: 860px) {
  .bk-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-areas: "pid pid del" "qty unit cost"; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
  .bk-pid { grid-area: pid; } .bk-del { grid-area: del; } .bk-qty { grid-area: qty; } .bk-unit { grid-area: unit; } .bk-cost { grid-area: cost; }
}
