/* NoxePantry: soft sage background, white rounded cards, real food photos, olive accent.
   No capsule shapes. Controls are rounded squares and rectangles. */
:root {
  --bg: #F1F2EE;
  --card: #FFFFFF;
  --well: #F4F5F1;
  --fill: #E9EBE4;
  --fill-2: #DFE2D8;
  --ink: #1B1E19;
  --ink-2: #5E6359;
  --ink-3: #8D9287;
  --line: #E4E6DF;
  --olive: #5D6F22;
  --olive-2: #A9C04E;
  --olive-soft: #E8ECD8;
  --on-olive: #FFFFFF;
  --orange: #B0501C;
  --orange-soft: #F6E6DA;
  --red: #B3261E;
  --red-soft: #F7E1DF;
  --bar: #1B1E19;
  --bar-ink: #A9AEA2;
  --scrim: rgba(20, 22, 18, .42);
  --lift: 0 1px 2px rgba(27, 30, 25, .04), 0 8px 24px -12px rgba(27, 30, 25, .16);
  --pop: 0 18px 50px -12px rgba(27, 30, 25, .35);
  --ease: cubic-bezier(.32, .72, 0, 1);
  --font: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121410; --card: #1C1F1A; --well: #23271F; --fill: #2A2E26; --fill-2: #3A4034; --ink: #F1F3EC; --ink-2: #B4B9AD;
    --ink-3: #868B80; --line: #2C3028; --olive: #A9C04E; --olive-2: #A9C04E; --olive-soft: #2A3317; --on-olive: #172005;
    --orange: #F0A06A; --orange-soft: #3A2618; --red: #FF8A80; --red-soft: #3D1D1A; --bar: #050604; --bar-ink: #9DA393;
    --lift: 0 1px 0 rgba(0, 0, 0, .4); --scrim: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121410; --card: #1C1F1A; --well: #23271F; --fill: #2A2E26; --fill-2: #3A4034; --ink: #F1F3EC; --ink-2: #B4B9AD;
  --ink-3: #868B80; --line: #2C3028; --olive: #A9C04E; --olive-2: #A9C04E; --olive-soft: #2A3317; --on-olive: #172005;
  --orange: #F0A06A; --orange-soft: #3A2618; --red: #FF8A80; --red-soft: #3D1D1A; --bar: #050604; --bar-ink: #9DA393;
  --lift: 0 1px 0 rgba(0, 0, 0, .4); --scrim: rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.45 var(--font); -webkit-font-smoothing: antialiased; min-height: 100dvh;
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
}
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
h1 { font-size: 32px; line-height: 1.1; font-weight: 700; }
h2 { font-size: 21px; line-height: 1.2; font-weight: 700; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--olive); }
svg { flex: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--olive) 65%, transparent); outline-offset: 2px; border-radius: 12px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 10px 14px; z-index: 50; border-radius: 12px; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top line ---------- */
.top { max-width: 720px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top)) 20px 0; display: flex; justify-content: flex-end; min-height: 34px; }
.brand { display: none; }
.save-state { font-size: 13px; color: var(--ink-3); }
.save-state.bad { color: var(--red); font-weight: 600; }

/* ---------- floating tab bar ---------- */
.tabs {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20;
  max-width: 520px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  background: var(--bar); border-radius: 24px; padding: 6px; box-shadow: var(--pop);
}
.tabs a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 58px; border-radius: 18px; text-decoration: none; color: var(--bar-ink); font-size: 12px; font-weight: 600;
  transition: background-color .3s var(--ease), color .2s;
}
.tabs svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabs a[aria-current="page"] { background: var(--olive-2); color: #10140A; }
.badge {
  position: absolute; top: 5px; left: calc(50% + 7px); min-width: 20px; height: 20px; padding: 0 5px; border-radius: 7px;
  background: #E5533B; color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}
@media (min-width: 760px) {
  body { padding-bottom: 120px; }
  .tabs a { flex-direction: row; gap: 8px; min-height: 52px; font-size: 15px; }
  .badge { position: static; }
}

main { max-width: 720px; margin: 0 auto; padding: 4px 16px 24px; outline: none; }
.view > * + * { margin-top: 26px; }
.lede { color: var(--ink-2); margin-top: 8px; font-size: 16px; max-width: 60ch; }
.hello p { color: var(--ink-2); font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.hello h1 { font-size: 34px; max-width: 14ch; }
.row-title, .view section > h2, #cookList > section > h2 { font-size: 20px; margin: 0 4px 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border-radius: 16px; border: 0;
  background: var(--card); color: var(--ink); font-weight: 600; font-size: 16px; cursor: pointer; text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .18s var(--ease), background-color .2s, box-shadow .2s;
}
.btn:active, .tile:active, .hero:active, .row-btn:active, .icon-btn:active, .tape-strip:active { transform: scale(.975); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-main { background: var(--ink); color: var(--bg); box-shadow: none; }
.btn-go { background: var(--olive); color: var(--on-olive); box-shadow: none; }
.btn-main:disabled { background: var(--fill); color: var(--ink-3); cursor: not-allowed; transform: none; }
.btn-quiet { background: var(--well); box-shadow: none; }
.btn-danger { background: var(--red-soft); color: var(--red); box-shadow: none; }
.btn-wide { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row > .btn { flex: 1 1 140px; }
.link { background: none; border: 0; padding: 10px 0; min-height: 44px; color: var(--red); cursor: pointer; width: 100%; font-weight: 500; }
.text-btn { flex: none; min-height: 44px; padding: 0 2px; border: 0; background: none; color: var(--olive); font-size: 15px; font-weight: 700; cursor: pointer; }

/* ---------- composer ---------- */
.tell { background: var(--card); border-radius: 24px; padding: 18px; box-shadow: var(--lift); }
.tell label { display: block; font-weight: 700; font-size: 17px; margin-bottom: 12px; }
.tell-row { display: flex; gap: 10px; align-items: flex-end; }
.tell-input {
  flex: 1; min-width: 0; min-height: 54px; padding: 15px 16px; font-size: 17px; line-height: 1.35;
  border: 0; border-radius: 18px; background: var(--well); resize: none; outline: none; transition: box-shadow .2s;
}
.tell-input::placeholder { color: var(--ink-3); }
.tell-input:focus { box-shadow: inset 0 0 0 2px var(--olive); }
.icon-btn {
  position: relative; flex: none; width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--olive); color: var(--on-olive);
  display: grid; place-items: center; cursor: pointer; padding: 0; transition: transform .18s var(--ease), background-color .2s;
}
.icon-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.icon-btn.on { background: #E5533B; color: #fff; animation: listen 1.4s ease-in-out infinite; }
@keyframes listen { 50% { box-shadow: 0 0 0 9px rgba(229, 83, 59, .18); } }
.tell-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.tell-tools .btn { min-height: 48px; padding: 0 12px; font-size: 15px; white-space: nowrap; background: var(--well); box-shadow: none; }
.examples { margin-top: 16px; }
.examples p { font-size: 13px; color: var(--ink-3); margin-bottom: 2px; font-weight: 500; }
.try { list-style: none; margin: 0; padding: 0; }
.try li + li { border-top: 1px solid var(--line); }
.row-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 46px;
  padding: 10px 0; border: 0; background: none; text-align: left; font-size: 16px; color: var(--olive); font-weight: 600; cursor: pointer;
}
.preview { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } }
.preview h3 { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-bottom: 4px; }
.preview ol { list-style: none; margin: 0 0 14px; padding: 0; }
.preview li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.preview li:last-child { border-bottom: 0; }
.preview li .what { flex: 1; font-size: 16px; }
.preview li .sub { display: block; color: var(--ink-2); font-size: 13px; margin-top: 1px; }
.preview li.note .what { color: var(--ink-2); }
.step-mark { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 18px; background: var(--olive-soft); color: var(--olive); }
.step-mark.minus { background: var(--orange-soft); color: var(--orange); }
.step-mark.out { background: var(--red-soft); color: var(--red); }
.step-mark.note { background: var(--fill); color: var(--ink-2); }
.x-btn { flex: none; width: 34px; height: 34px; border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 24px; font-weight: 300; line-height: 1; display: grid; place-items: center; position: relative; }
.x-btn::after { content: ''; position: absolute; inset: -6px; }
.unclear { color: var(--red); font-size: 15px; margin-bottom: 12px; }

/* ---------- photo hero ---------- */
.hero {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 3.3; padding: 0; border: 0; cursor: pointer; text-align: left;
  border-radius: 28px; overflow: hidden; background: var(--fill); box-shadow: var(--lift); transition: transform .18s var(--ease);
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .66)); }
.hero-text { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1; color: #fff; }
.hero-name { display: block; font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; text-shadow: 0 1px 12px rgba(0, 0, 0, .3); }
.hero-sub { display: block; margin-top: 4px; font-size: 15px; font-weight: 500; opacity: .92; }
.time-box {
  position: absolute; top: 12px; left: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px 6px 8px; border-radius: 11px; background: rgba(255, 255, 255, .92); color: #1B1E19;
  font-size: 13px; font-weight: 700; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.time-box svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.no-photo {
  display: grid; place-items: center; background: linear-gradient(145deg, var(--olive-soft), var(--fill));
  color: var(--olive); font-size: 44px; font-weight: 800;
}

/* ---------- use first ---------- */
.use-first h2 { display: flex; align-items: baseline; gap: 8px; }
.use-first h2 small { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.items, .tapes, .checks, .history, .ing {
  list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: 20px; overflow: hidden; box-shadow: var(--lift);
}
.items > li, .tapes > li, .checks > li, .history > li, .ing > li { position: relative; }
.items > li + li::before, .tapes > li + li::before, .checks > li + li::before, .history > li + li::before, .ing > li + li::before {
  content: ''; position: absolute; top: 0; right: 16px; left: 16px; border-top: 1px solid var(--line);
}
.tape-strip {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  border: 0; background: none; padding: 12px 16px; min-height: 62px; color: var(--ink); transition: transform .18s var(--ease);
}
.tape-strip .t-name { flex: 1; font-size: 17px; font-weight: 600; }
.tape-strip .t-where { display: block; font-size: 13px; color: var(--ink-2); font-weight: 400; margin-top: 1px; }
.tape-strip .t-when { font-size: 14px; font-weight: 700; color: var(--orange); text-align: right; }
.tape-strip.red .t-when { color: var(--red); }
.tape-cook { margin-top: 12px; width: 100%; }

/* ---------- shelves ---------- */
.shelf-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; background: var(--fill); border-radius: 16px; scrollbar-width: none; margin-bottom: 12px; }
.shelf-tabs::-webkit-scrollbar { display: none; }
.chip {
  min-height: 40px; padding: 8px 14px; border-radius: 12px; border: 0; background: transparent;
  cursor: pointer; font-size: 15px; font-weight: 600; color: var(--ink-2); flex: 1 0 auto; text-align: center;
  transition: background-color .25s var(--ease), color .2s;
}
.chip[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(27, 30, 25, .1); }
.find {
  width: 100%; min-height: 50px; padding: 12px 16px 12px 44px; border: 0; border-radius: 16px; background-color: var(--card); font-size: 16px; outline: none;
  box-shadow: inset 0 0 0 1px var(--line);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238D9287' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m20 20-4.8-4.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 15px center; background-size: 18px;
}
.find:focus { box-shadow: inset 0 0 0 2px var(--olive); }
.find::placeholder { color: var(--ink-3); }
.shelf { margin-top: 22px; }
.shelf > h3 { font-size: 14px; font-weight: 700; color: var(--ink-2); margin: 0 6px 8px; display: flex; gap: 6px; }
.shelf > h3 span { color: var(--ink-3); font-weight: 500; }
.item { display: flex; align-items: center; gap: 8px; padding: 0 12px 0 0; min-height: 64px; transition: opacity .2s; }
.item.zero { opacity: .55; }
.item-open { flex: 1; min-width: 0; min-height: 64px; background: none; border: 0; text-align: left; padding: 10px 6px 10px 16px; cursor: pointer; }
.item-name { display: block; font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.item-when { display: block; color: var(--ink-2); font-size: 13px; margin-top: 1px; }
.item.soon .item-when { color: var(--orange); font-weight: 700; }
.item.today .item-when, .item.past .item-when { color: var(--red); font-weight: 700; }
.stepper { display: flex; align-items: center; gap: 4px; flex: none; background: var(--well); border-radius: 14px; padding: 3px; }
.stepper output { min-width: 34px; text-align: center; font-weight: 700; font-size: 16px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stepper output small { display: block; font-weight: 500; font-size: 11px; color: var(--ink-2); }
.stepper button {
  width: 38px; height: 38px; border: 0; border-radius: 11px; background: var(--card); font-size: 22px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; color: var(--ink); position: relative; box-shadow: 0 1px 2px rgba(27, 30, 25, .08);
}
.stepper button::after { content: ''; position: absolute; inset: -4px -2px; }
.empty { background: var(--card); border-radius: 24px; padding: 22px 18px; box-shadow: var(--lift); }
.empty h2 { font-size: 22px; }
.empty p { color: var(--ink-2); margin: 6px 0 16px; }
.pick { list-style: none; margin: 0 0 18px; padding: 0; }
.pick li + li { border-top: 1px solid var(--line); }
.pick-row { color: var(--ink); font-size: 17px; font-weight: 500; min-height: 50px; padding: 12px 2px; }
.pick-row .mark { flex: none; width: 24px; height: 24px; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--fill-2); display: grid; place-items: center; transition: background-color .2s; }
.pick-row[aria-pressed="true"] .mark { background: var(--olive); box-shadow: none; }
.pick-row[aria-pressed="true"] .mark::after { content: ''; width: 6px; height: 11px; border: solid var(--on-olive); border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.putaway { position: sticky; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 5; animation: fade .25s var(--ease); }
.putaway .btn { box-shadow: var(--pop); }

/* ---------- cook ---------- */
.row-select {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px;
  padding: 0 0 0 18px; background: var(--card); border-radius: 16px; font-size: 16px; font-weight: 600; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line);
}
.row-select select {
  appearance: none; -webkit-appearance: none; border: 0; background-color: transparent; color: var(--ink-2); font-size: 16px; text-align: right;
  min-height: 52px; padding: 0 40px 0 8px; cursor: pointer; outline: none; max-width: 70%; font-weight: 500;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238D9287' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 9 4-4 4 4M8 15l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
.row-select ~ .find { margin-top: 12px; }
#cookList > section { margin-top: 28px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.tile {
  display: flex; flex-direction: column; width: 100%; height: 100%; padding: 6px; border: 0; cursor: pointer; text-align: left;
  background: var(--card); border-radius: 22px; box-shadow: var(--lift); color: var(--ink); transition: transform .18s var(--ease);
}
.tile-photo { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 17px; overflow: hidden; background: var(--fill); }
.tile-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-photo .no-photo { width: 100%; height: 100%; }
.tile-photo .time-box { top: 8px; left: 8px; font-size: 12px; padding: 5px 8px 5px 6px; }
.tile-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 8px 8px; }
.tile-name { font-size: 15px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.st { font-size: 13px; font-weight: 600; line-height: 1.3; }
.st.ready { color: var(--olive); }
.st.miss { color: var(--ink-2); font-weight: 500; }
.st.soon { color: var(--orange); }

/* recipe sheet */
.sheet-photo { position: relative; border-radius: 24px; overflow: hidden; aspect-ratio: 16 / 11; background: var(--fill); }
.sheet-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet-photo .no-photo { width: 100%; height: 100%; }
.close.on-photo { position: absolute; top: 12px; right: 12px; background: rgba(255, 255, 255, .92); color: #1B1E19; border-radius: 12px; padding: 0 14px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sheet-inner > .credit { font-size: 12px; color: var(--ink-3); margin-top: 6px; padding: 0 4px; }
.recipe-title { font-size: 28px; line-height: 1.12; letter-spacing: -.025em; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; color: var(--ink-2); font-size: 15px; font-weight: 500; }
.facts span { display: inline-flex; align-items: center; gap: 6px; }
.facts svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.facts .ready { color: var(--olive); font-weight: 700; }
.facts .miss { color: var(--orange); font-weight: 700; }
.ing li { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; }
.ing .tick { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.ing .yes .tick { background: var(--olive-soft); color: var(--olive); }
.ing .no .tick { background: var(--red-soft); color: var(--red); }
.ing .maybe .tick { background: var(--fill); }
.ing .lbl { flex: 1; font-weight: 600; }
.ing .lbl small { display: block; color: var(--ink-2); font-size: 13px; font-weight: 400; }
.ing .no .lbl small { color: var(--red); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border-radius: 18px; padding: 14px 16px; box-shadow: var(--lift); }
.steps .n { flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.sheet-cta { position: sticky; bottom: 0; padding-top: 14px; background: linear-gradient(180deg, transparent, var(--bg) 35%); }
.cook-list { background: var(--card); border-radius: 20px; overflow: hidden; box-shadow: var(--lift); }
.cook-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 16px; min-height: 64px; position: relative; }
.cook-row + .cook-row::before { content: ''; position: absolute; top: 0; right: 16px; left: 16px; border-top: 1px solid var(--line); }
.cook-row .lbl { flex: 1; font-size: 17px; font-weight: 600; }
.cook-row .lbl small { display: block; font-size: 13px; color: var(--ink-2); font-weight: 400; }
.seg { display: flex; padding: 3px; gap: 3px; background: var(--fill); border-radius: 13px; flex: none; }
.seg button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); transition: background-color .2s; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 2px 6px rgba(27, 30, 25, .1); }

/* ---------- shop ---------- */
.aisle { margin-top: 22px; }
.aisle h3 { font-size: 14px; font-weight: 700; color: var(--ink-2); margin: 0 6px 8px; }
.check { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 12px 8px 16px; cursor: pointer; }
.check input {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0; width: 28px; height: 28px; border-radius: 9px;
  box-shadow: inset 0 0 0 2px var(--fill-2); cursor: pointer; display: grid; place-items: center; transition: background-color .2s;
}
.check input:checked { background: var(--olive); box-shadow: none; }
.check input:checked::after { content: ''; width: 7px; height: 12px; border: solid var(--on-olive); border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.check .lbl { flex: 1; font-size: 17px; font-weight: 600; }
.check .lbl small { display: block; font-size: 13px; color: var(--ink-2); font-weight: 400; }
.check.done .lbl { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1.5px; }

/* ---------- more ---------- */
.card { background: var(--card); border-radius: 24px; padding: 20px 18px; box-shadow: var(--lift); }
.card > * + * { margin-top: 12px; }
.card h2 { font-size: 20px; }
.card p { color: var(--ink-2); font-size: 15px; max-width: 62ch; }
.value-rows { list-style: none; margin: 0; padding: 0; }
.value-rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; font-size: 17px; }
.value-rows li + li { border-top: 1px solid var(--line); }
.value-rows b { font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; color: var(--orange); }
.value-rows b.good { color: var(--olive); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 52px; cursor: pointer; font-size: 17px; }
.toggle input {
  appearance: none; -webkit-appearance: none; order: 2; flex: none; margin: 0; width: 52px; height: 32px; border-radius: 16px;
  background: var(--fill-2); position: relative; cursor: pointer; transition: background-color .25s;
}
.toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); transition: transform .3s var(--ease); }
.toggle input:checked { background: var(--olive); }
.toggle input:checked::after { transform: translateX(20px); }
.card .seg { width: fit-content; }
.card .history { box-shadow: none; background: transparent; border-radius: 0; }
.history li { padding: 10px 0; display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.card .history li + li::before { left: 0; right: 0; }
.history time { color: var(--ink-3); flex: none; }
.help dl { margin: 0; }
.help dt { font-weight: 700; margin-top: 12px; font-size: 15px; }
.help dd { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; }

/* ---------- sheet ---------- */
.sheet {
  width: min(620px, 100%); max-width: 100%; max-height: 94dvh; margin: auto auto 0; padding: 0; border: 0;
  border-radius: 30px 30px 0 0; background: var(--bg); color: var(--ink); box-shadow: var(--pop);
}
@media (min-width: 760px) { .sheet { margin: auto; border-radius: 30px; } }
.sheet::backdrop { background: var(--scrim); }
.sheet[open] { animation: sheet-up .5s var(--ease); }
.sheet[open]::backdrop { animation: scrim .3s ease-out; }
@keyframes sheet-up { from { transform: translateY(100%); } }
@media (min-width: 760px) { .sheet[open] { animation-name: sheet-pop; } }
@keyframes sheet-pop { from { transform: translateY(24px) scale(.97); opacity: 0; } }
@keyframes scrim { from { opacity: 0; } }
.sheet-inner { padding: 14px 14px calc(22px + env(safe-area-inset-bottom)); overflow-y: auto; max-height: 94dvh; }
.sheet-inner > * + * { margin-top: 18px; }
.sheet-inner > section > h3 { font-size: 14px; font-weight: 700; color: var(--ink-2); margin: 0 6px 8px; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 6px 4px 0; }
.sheet-head h2 { flex: 1; font-size: 24px; }
.close { flex: none; min-height: 44px; padding: 0 4px 0 12px; border: 0; background: none; color: var(--olive); font-weight: 700; font-size: 16px; cursor: pointer; }
.sheet form { display: grid; gap: 18px; }
.fresh-line { font-size: 15px; font-weight: 700; color: var(--olive); padding: 0 4px; }
.fresh-line.soon { color: var(--orange); }
.fresh-line.today, .fresh-line.past { color: var(--red); }
.field { display: flex; flex-direction: column; }
.field label, .field .label { display: block; font-size: 14px; font-weight: 700; color: var(--ink-2); margin: 0 6px 8px; }
.field .hint { display: block; color: var(--ink-3); font-size: 13px; margin: 8px 6px 0; order: 3; }
.field input[type="text"], .field input[type="date"], .field input[type="search"], .field input[type="number"], .field select, .field textarea, .field input[inputmode] {
  width: 100%; min-height: 52px; padding: 13px 16px; border: 0; border-radius: 16px; background: var(--card); font-size: 17px; outline: none;
  box-shadow: inset 0 0 0 1px var(--line);
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.4; }
.field input:focus, .field textarea:focus, .field select:focus { box-shadow: inset 0 0 0 2px var(--olive); }
.locs { display: flex; padding: 4px; gap: 4px; background: var(--fill); border-radius: 16px; }
.locs .chip { flex: 1; padding: 8px 4px; min-height: 42px; }
.date-row { display: flex; gap: 8px; }
.date-row input { flex: 1; }
.date-row .btn { min-height: 52px; font-size: 15px; padding: 0 16px; }
.big-stepper { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 16px; padding: 6px; box-shadow: inset 0 0 0 1px var(--line); }
.big-stepper button { width: 52px; height: 44px; border-radius: 12px; border: 0; background: var(--well); font-size: 24px; cursor: pointer; color: var(--ink); }
.field .big-stepper input { width: 72px; min-height: 44px; padding: 0; text-align: center; font-weight: 700; background: none; box-shadow: none; font-variant-numeric: tabular-nums; }
.field .big-stepper select { flex: 1; min-height: 44px; background: var(--well); padding: 0 12px; border-radius: 12px; box-shadow: none; }
.scan-video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; background: #000; }
.found { border-radius: 18px; padding: 14px 16px; background: var(--olive-soft); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 40;
  max-width: 500px; margin: 0 auto; display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: var(--bg); border-radius: 18px; padding: 8px 8px 8px 18px; box-shadow: var(--pop);
  animation: toast-in .4s var(--ease);
}
@keyframes toast-in { from { transform: translateY(16px) scale(.98); opacity: 0; } }
.has-putaway .toast { bottom: calc(172px + env(safe-area-inset-bottom)); }
.toast p { flex: 1; font-size: 15px; font-weight: 500; }
.btn-undo { min-height: 42px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--olive-2); color: #10140A; font-weight: 700; cursor: pointer; }
.noscript { padding: 20px; text-align: center; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  body { background: #fff; padding: 0; }
  .tabs, .top, .toast, .no-print, .putaway { display: none !important; }
  .checks { box-shadow: none; }
}
.credit-line { font-size: 14px; color: var(--ink-3); }
.credit-line a { color: var(--ink-2); font-weight: 600; }
