/* Mise: styles */
:root {
  --bg: #f6f2ec; --surface: #fffdf9; --surface-2: #efe8de; --ink: #1f1b16; --muted: #6f685e; --faint: #a39b8f; --line: #e7dfd3;
  --accent: #d4582c; --accent-2: #b5461d; --accent-soft: #f8e2d6; --on-accent: #fff;
  --green: #3d7a55; --green-soft: #dcebe1;
  --scrim: rgba(24, 18, 12, .42);
  --glass: rgba(255, 252, 247, .74);
  --shadow-1: 0 1px 2px rgba(50, 35, 20, .05), 0 6px 18px rgba(50, 35, 20, .06);
  --shadow-2: 0 18px 50px rgba(40, 25, 10, .18), 0 2px 8px rgba(40, 25, 10, .08);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .9, .25, 1);
  --top: env(safe-area-inset-top, 0px); --bot: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12110f; --surface: #1c1a17; --surface-2: #282521; --ink: #f4efe8; --muted: #aba397; --faint: #716a60; --line: #2f2b27;
    --accent: #f0703f; --accent-2: #ff8d5f; --accent-soft: #3b2319; --on-accent: #fff;
    --green: #74c391; --green-soft: #1e3326; --scrim: rgba(0, 0, 0, .6); --glass: rgba(34, 31, 28, .72);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
    --shadow-2: 0 18px 50px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12110f; --surface: #1c1a17; --surface-2: #282521; --ink: #f4efe8; --muted: #aba397; --faint: #716a60; --line: #2f2b27;
  --accent: #f0703f; --accent-2: #ff8d5f; --accent-soft: #3b2319; --on-accent: #fff;
  --green: #74c391; --green-soft: #1e3326; --scrim: rgba(0, 0, 0, .6); --glass: rgba(34, 31, 28, .72);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  --shadow-2: 0 18px 50px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100dvh; overscroll-behavior-y: none; }
body.locked { position: fixed; left: 0; right: 0; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i.sm { width: 18px; height: 18px; }
.i.fill { fill: currentColor; }

main { max-width: 760px; margin: 0 auto; padding: calc(var(--top) + 8px) 16px calc(130px + var(--bot)); }

/* ---------- headings ---------- */
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 22px 2px 16px; }
.top h1 { font-family: var(--serif); font-weight: 600; font-size: 36px; letter-spacing: -.025em; line-height: 1.05; margin: 0; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
h2 { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -.015em; margin: 0; }
.muted { color: var(--muted); }

/* ---------- buttons ---------- */
.btn { appearance: none; border: 0; font-weight: 600; font-size: 14.5px; height: 46px; padding: 0 18px; border-radius: 999px; background: var(--surface-2); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .15s var(--ease), background .2s, opacity .2s; white-space: nowrap; text-decoration: none; }
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.dark { background: var(--ink); color: var(--bg); }
.btn.ghost { background: transparent; }
.btn.danger { color: #c4372b; }
.btn.block { width: 100%; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.loading { pointer-events: none; opacity: .8; }
.btn.loading .i { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow-1); color: var(--ink); display: grid; place-items: center; flex: none; transition: transform .15s var(--ease); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.flat { box-shadow: none; background: transparent; }
.link { border: 0; background: none; color: var(--accent-2); font-weight: 600; padding: 0; }

/* ---------- floating dock ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: calc(14px + var(--bot)); display: flex; justify-content: center; align-items: center; gap: 10px; z-index: 20; pointer-events: none; transition: transform .5s var(--ease), opacity .35s; }
.dock.hide { transform: translateY(calc(100% + 40px + var(--bot))); opacity: 0; }
.pill { pointer-events: auto; display: flex; gap: 2px; padding: 6px; border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8); border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); box-shadow: var(--shadow-2); }
.pill button { border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 11.5px; letter-spacing: .01em; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 54px; min-width: 76px; padding: 0 14px; border-radius: 999px; position: relative; transition: background .3s var(--ease), color .3s; }
.pill button.on { background: var(--accent-soft); color: var(--accent-2); }
.pill button:active { transform: scale(.95); }
.fab { pointer-events: auto; width: 66px; height: 66px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 45%, transparent), 0 2px 6px rgba(0,0,0,.12); display: grid; place-items: center; transition: transform .2s var(--ease); }
.fab .i { width: 28px; height: 28px; stroke-width: 2.2; }
.fab:active { transform: scale(.92); }
.badge { position: absolute; top: 5px; right: 16px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.badge:empty { display: none; }

/* ---------- plan ---------- */
.weekbar { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border-radius: 999px; padding: 5px; box-shadow: var(--shadow-1); }
.weekbar .lbl { text-align: center; line-height: 1.2; border: 0; background: none; padding: 4px 10px; }
.weekbar .lbl b { display: block; font-size: 15px; }
.weekbar .lbl small { color: var(--muted); font-size: 12.5px; }
.weekbar .icon-btn { box-shadow: none; background: var(--surface-2); width: 40px; height: 40px; }
.summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 2px 14px; }
.summary p { margin: 0; color: var(--muted); font-size: 13.5px; }
.day { background: var(--surface); border-radius: 24px; padding: 14px 14px 10px 18px; margin-bottom: 12px; box-shadow: var(--shadow-1); position: relative; }
.day.today::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.day-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.day-h b { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.day-h span { color: var(--muted); font-size: 13px; margin-left: 8px; }
.day-h .tag { color: var(--accent-2); font-weight: 700; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-left: 8px; }
.add-sm { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; }
.add-sm .i { width: 18px; height: 18px; }
.entry { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: none; padding: 8px 0; border-top: 1px solid var(--line); }
.entry:first-child { border-top: 0; }
.entry .th { width: 50px; height: 50px; border-radius: 14px; overflow: hidden; flex: none; }
.entry .th img { width: 100%; height: 100%; object-fit: cover; }
.entry small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.entry b { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.entry .note-th { background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.empty-day { border: 0; background: none; color: var(--faint); padding: 6px 0 8px; font-size: 14px; text-align: left; width: 100%; }

/* ---------- recipes ---------- */
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 999px; padding: 0 8px 0 16px; height: 50px; box-shadow: var(--shadow-1); color: var(--muted); }
.search input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); outline: none; min-width: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 16px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-weight: 500; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .i { width: 16px; height: 16px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { border: 0; padding: 0; background: var(--surface); border-radius: 22px; overflow: hidden; text-align: left; box-shadow: var(--shadow-1); display: flex; flex-direction: column; position: relative; transition: transform .2s var(--ease); }
.card:active { transform: scale(.97); }
.card .th { aspect-ratio: 4 / 3.3; overflow: hidden; }
.card .th img { width: 100%; height: 100%; object-fit: cover; }
.card .cb { padding: 10px 12px 13px; }
.card b { font-size: 15px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.card .fav { position: absolute; top: 9px; right: 9px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.88); color: var(--accent); display: grid; place-items: center; }
.card .fav .i { width: 16px; height: 16px; }
.ph { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; color: rgba(40, 20, 5, .38); font-size: 40px; background: linear-gradient(140deg, hsl(var(--h) 62% 84%), hsl(calc(var(--h) + 28) 55% 72%)); }
:root[data-theme="dark"] .ph { background: linear-gradient(140deg, hsl(var(--h) 30% 28%), hsl(calc(var(--h) + 28) 32% 20%)); color: rgba(255,255,255,.35); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ph { background: linear-gradient(140deg, hsl(var(--h) 30% 28%), hsl(calc(var(--h) + 28) 32% 20%)); color: rgba(255,255,255,.35); } }
.entry .ph { font-size: 20px; }

.empty { text-align: center; padding: 48px 24px 24px; }
.empty .art { width: 120px; height: 120px; margin: 0 auto 18px; border-radius: 40px; background: var(--accent-soft); color: var(--accent-2); display: grid; place-items: center; }
.empty .art .i { width: 54px; height: 54px; stroke-width: 1.4; }
.empty h2 { margin-bottom: 8px; }
.empty p { color: var(--muted); margin: 0 auto 20px; max-width: 320px; }

/* ---------- shopping ---------- */
.add-row { display: flex; gap: 8px; align-items: center; background: var(--surface); border-radius: 999px; padding: 5px 5px 5px 18px; box-shadow: var(--shadow-1); }
.add-row input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); outline: none; height: 42px; }
.add-row .btn { height: 42px; width: 42px; padding: 0; }
.group { margin-top: 22px; }
.group h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 4px 8px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.list { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-1); overflow: hidden; }
.item { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item .tick { flex: 1; display: flex; align-items: center; gap: 14px; border: 0; background: none; text-align: left; padding: 13px 4px 13px 16px; min-width: 0; }
.circ { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; transition: background .2s, border-color .2s; }
.circ .i { width: 14px; height: 14px; stroke-width: 3; opacity: 0; color: #fff; }
.item.done .circ { background: var(--green); border-color: var(--green); }
.item.done .circ .i { opacity: 1; }
.item .txt { min-width: 0; }
.item .txt b { font-weight: 600; margin-right: 6px; }
.item.done .txt { color: var(--faint); text-decoration: line-through; }
.item .del { border: 0; background: none; color: var(--faint); width: 44px; height: 44px; display: grid; place-items: center; flex: none; }
.item .del .i { width: 18px; height: 18px; }

/* ---------- layers ---------- */
.layer { position: fixed; inset: 0; z-index: 50; }
.scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .35s; touch-action: none; }
.layer.open .scrim { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 640px; max-height: calc(100dvh - var(--top) - 28px); background: var(--surface); border-radius: 30px 30px 0 0; box-shadow: var(--shadow-2); transform: translateY(105%); transition: transform .42s var(--ease); display: flex; flex-direction: column; padding-bottom: var(--bot); }
.layer.open .sheet { transform: none; }
.sheet.dragging, .page.dragging { transition: none; }
.grab { padding: 10px 0 4px; flex: none; touch-action: none; }
.grab::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto; }
.sheet-h { padding: 6px 20px 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; touch-action: none; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 8px 20px 22px; -webkit-overflow-scrolling: touch; }
.sheet-body > p:first-child { margin-top: 0; }

.page-layer .scrim { background: rgba(0,0,0,.25); }
.page { position: absolute; inset: 0; background: var(--bg); transform: translateX(100%); transition: transform .42s var(--ease); display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(0,0,0,.14); overflow: hidden; }
.layer.open .page { transform: none; }
.page-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.page-top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: calc(var(--top) + 10px) 14px 10px; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.page-top .ttl { flex: 1; min-width: 0; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.page-top.solid, .scrolled .page-top { background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); border-color: var(--line); }
.page-top.solid .ttl, .scrolled .page-top .ttl { opacity: 1; transform: none; }
.glass-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 82%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,.1); flex: none; transition: transform .15s; }
.glass-btn:active { transform: scale(.9); }
.glass-btn.on { color: var(--accent); }
.inner { max-width: 760px; margin: 0 auto; }

.dialog-layer { display: grid; place-items: center; padding: 24px; }
.dialog { position: relative; background: var(--surface); border-radius: 28px; padding: 24px 22px 16px; width: 100%; max-width: 360px; box-shadow: var(--shadow-2); transform: scale(.92); opacity: 0; transition: transform .3s var(--ease), opacity .25s; }
.layer.open .dialog { transform: none; opacity: 1; }
.dialog h2 { font-size: 21px; margin-bottom: 6px; }
.dialog p { color: var(--muted); margin: 0 0 18px; }
.dialog .row { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- recipe page ---------- */
.hero { position: relative; aspect-ratio: 4 / 3.2; max-height: 52vh; width: 100%; overflow: hidden; background: var(--surface-2); }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 120px; background: linear-gradient(rgba(0,0,0,.28), transparent); pointer-events: none; }
.hero .ph { font-size: 96px; }
.rp { padding: 22px 20px calc(40px + var(--bot)); margin-top: -26px; position: relative; background: var(--bg); border-radius: 28px 28px 0 0; }
.rp h1 { font-family: var(--serif); font-weight: 600; font-size: 31px; line-height: 1.12; letter-spacing: -.02em; margin: 0 0 12px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta .i { width: 18px; height: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tags span { font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.rp-actions { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; margin: 20px 0 6px; }
.rp-actions .btn { padding: 0 10px; font-size: 13.5px; }
.sec { margin-top: 28px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.stepper { display: inline-flex; align-items: center; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow-1); padding: 3px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; }
.stepper button .i { width: 16px; height: 16px; stroke-width: 2.2; }
.stepper span { min-width: 92px; text-align: center; font-weight: 600; font-size: 13.5px; }
.ings { list-style: none; margin: 0; padding: 4px 16px; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-1); }
.ings li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; transition: opacity .2s; }
.ings li:first-child { border-top: 0; }
.ings li .circ { margin-top: 1px; width: 22px; height: 22px; }
.ings li.on { opacity: .45; }
.ings li.on .circ { background: var(--green); border-color: var(--green); }
.ings li.on .circ .i { opacity: 1; }
.ings li.on .nm { text-decoration: line-through; }
.ings .amt { font-weight: 700; }
.ings li.h, .steps li.h { cursor: default; font-family: var(--serif); font-weight: 600; font-size: 16.5px; padding-top: 16px; color: var(--ink); opacity: 1; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.62; cursor: pointer; transition: opacity .2s; }
.steps li:first-child { border-top: 0; }
.steps li .n { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); font-family: var(--serif); font-weight: 600; display: grid; place-items: center; font-size: 15px; margin-top: -2px; }
.steps li.on { opacity: .4; }
.steps li.on .n { background: var(--green-soft); color: var(--green); }
.notes { background: var(--surface); border-radius: 22px; padding: 16px 18px; white-space: pre-wrap; box-shadow: var(--shadow-1); color: var(--ink); }
.source { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); margin-top: 26px; font-size: 13.5px; text-decoration: none; max-width: 100%; }
.source span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 4px 7px; }
.field > span small { font-weight: 400; color: var(--faint); font-size: 12px; text-align: right; }
.input, .field input, .field textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 16px; padding: 13px 15px; font: inherit; font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s; resize: none; }
.input:focus, .field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.field textarea { line-height: 1.55; min-height: 110px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.editor { padding: calc(var(--top) + 76px) 18px calc(40px + var(--bot)); }
.photo-pick { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; border-radius: 22px; border: 1.5px dashed var(--line); background: var(--surface); color: var(--muted); margin-bottom: 18px; overflow: hidden; gap: 6px; }
.photo-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-pick .over { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 8px; }
.import-box { width: 100%; min-height: 150px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12.5px; margin: 18px 0; text-transform: uppercase; letter-spacing: .1em; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.err { color: #c4372b; font-size: 14px; margin: 10px 4px 0; }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }
.opt-list { display: flex; flex-direction: column; gap: 2px; }
.opt { display: flex; align-items: center; gap: 14px; border: 0; background: none; width: 100%; text-align: left; padding: 14px 6px; border-radius: 16px; font-weight: 500; font-size: 15.5px; }
.opt:active { background: var(--surface-2); }
.opt .i { color: var(--muted); }
.opt[disabled] { opacity: .4; pointer-events: none; }
.opt.danger, .opt.danger .i { color: #c4372b; }
.seg { display: flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { flex: 1; border: 0; background: none; height: 38px; border-radius: 999px; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 2px; border-top: 1px solid var(--line); }
.set-row:first-of-type { border-top: 0; }
.set-row p { margin: 0; }
.set-row small { display: block; color: var(--muted); font-size: 13px; }
.switch { position: relative; width: 52px; height: 32px; border-radius: 999px; border: 0; background: var(--line); flex: none; transition: background .25s; }
.switch::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,.2); transition: transform .3s var(--ease); }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(20px); }
.label-sm { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; margin: 18px 2px 8px; }
.pick-list { margin-top: 8px; }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; text-align: left; padding: 8px 4px; border-radius: 16px; }
.pick:active { background: var(--surface-2); }
.pick .th { width: 48px; height: 48px; border-radius: 14px; overflow: hidden; flex: none; }
.pick .th img { width: 100%; height: 100%; object-fit: cover; }
.pick .ph { font-size: 20px; }
.pick b { display: block; font-weight: 600; }
.pick small { color: var(--muted); font-size: 12.5px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chips.days .chip { flex-direction: column; height: 56px; min-width: 52px; padding: 0 10px; gap: 0; line-height: 1.15; justify-content: center; border-radius: 18px; }
.chips.days .chip small { font-size: 11px; opacity: .7; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.chips.days .chip b { font-size: 17px; font-weight: 600; }
.sheet .chips { margin: 0 -20px; padding: 2px 20px 4px; }
.sheet-foot { padding: 10px 20px 14px; flex: none; border-top: 1px solid var(--line); }

/* ---------- cook mode ---------- */
.cook { background: #15120f; color: #f5efe7; --line: #2c2723; --surface-2: #26211d; }
.cook .page-top { color: #f5efe7; }
.cook .page-top .ttl { opacity: 1; transform: none; text-align: center; font-size: 14px; color: #a99f92; }
.cook .glass-btn { background: rgba(255,255,255,.08); color: #f5efe7; box-shadow: none; }
.cook-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--top) + 80px) 26px 20px; overflow-y: auto; max-width: 760px; margin: 0 auto; width: 100%; }
.cook-step { font-size: clamp(22px, 5.6vw, 32px); line-height: 1.45; font-weight: 500; letter-spacing: -.01em; animation: fadeUp .35s var(--ease); }
.cook-sect { color: #f0703f; font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } }
.cook-bar { display: flex; align-items: center; gap: 10px; padding: 12px 18px calc(18px + var(--bot)); max-width: 760px; margin: 0 auto; width: 100%; }
.cook-bar .btn { flex: 1; height: 58px; font-size: 16px; }
.cook-bar .btn:not(.primary) { background: #2a2420; color: #f5efe7; }
.dots { display: flex; gap: 5px; justify-content: center; padding: 0 20px 6px; flex-wrap: wrap; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: #3a332d; transition: all .3s var(--ease); }
.dots i.on { width: 20px; background: #f0703f; }
.cook-ings { position: absolute; left: 0; right: 0; bottom: 0; max-height: 70%; background: #201c18; border-radius: 26px 26px 0 0; transform: translateY(105%); transition: transform .4s var(--ease); z-index: 5; display: flex; flex-direction: column; padding-bottom: var(--bot); }
.cook-ings.open { transform: none; }
.cook-ings ul { list-style: none; margin: 0; padding: 0 22px 22px; overflow-y: auto; }
.cook-ings li { padding: 10px 0; border-top: 1px solid #2c2723; }
.cook-ings li.h { font-family: var(--serif); color: #f0703f; border: 0; padding-top: 16px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 0; right: 0; margin: 0 auto; width: max-content; bottom: calc(100px + var(--bot)); transform: translateY(20px); opacity: 0; pointer-events: none; z-index: 90; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 12px 8px 12px 20px; font-weight: 500; font-size: 14px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-2); transition: transform .35s var(--ease), opacity .25s; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: none; pointer-events: auto; }
.toast:not(:has(button)) { padding-right: 20px; }
.toast button { border: 0; background: none; color: var(--accent); font-weight: 700; padding: 4px 12px; filter: brightness(1.2); }
body.locked .toast { bottom: calc(92px + var(--bot)); }

/* ---------- v2 additions ---------- */
.pan { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--green); background: var(--green-soft); border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: 2px; text-decoration: none; }
.lo-tag { color: var(--green); font-weight: 700; }
.entry.lo .th { box-shadow: inset 0 0 0 2px var(--green-soft); }
.entry.lo .note-th { background: var(--green-soft); color: var(--green); }
.delivery { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; border-top: 1px dashed var(--line); background: none; padding: 10px 0 6px; color: var(--accent-2); font-weight: 600; font-size: 13.5px; text-align: left; }
.cooked { display: flex; align-items: center; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 13.5px; flex-wrap: wrap; }
.stars { display: inline-flex; gap: 2px; }
.stars button { border: 0; background: none; padding: 2px; color: var(--faint); display: grid; place-items: center; }
.stars button.on { color: #e3a21a; }
.stars .i { width: 22px; height: 22px; }
.stars.big .i { width: 40px; height: 40px; stroke-width: 1.4; }
.stars.big button { padding: 4px; transition: transform .15s var(--ease); }
.stars.big button:active { transform: scale(.85); }
.tmr { display: inline-flex; align-items: center; gap: 4px; border: 0; font: inherit; font-weight: 600; color: var(--accent-2); background: var(--accent-soft); border-radius: 999px; padding: 0 9px 0 6px; line-height: 1.55; vertical-align: baseline; }
.tmr .i { width: 15px; height: 15px; stroke-width: 2.2; }
.cook .tmr { background: rgba(240,112,63,.18); color: #ff9a6e; padding: 0 12px 0 8px; }
.cook .tmr .i { width: 0.85em; height: 0.85em; }
.timers { position: fixed; left: 0; right: 0; top: calc(var(--top) + 68px); z-index: 95; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0 16px; pointer-events: none; }
.timer { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; border: 0; height: 42px; padding: 0 12px 0 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-2); animation: fadeUp .3s var(--ease); }
.timer b { font-variant-numeric: tabular-nums; font-size: 15px; }
.timer .i:last-child { opacity: .55; }
.timer.done { background: var(--accent); color: #fff; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.order-btn { margin-top: 18px; background: var(--surface); box-shadow: var(--shadow-1); color: var(--accent-2); }
.order { margin-top: 22px; background: var(--surface-2); border-radius: 24px; padding: 14px 10px 10px; }
.order-h { display: flex; align-items: center; gap: 12px; padding: 0 6px 12px; }
.order-h .oi { width: 40px; height: 40px; border-radius: 14px; background: var(--surface); color: var(--accent-2); display: grid; place-items: center; flex: none; }
.order-h .ot { flex: 1; min-width: 0; }
.order-h b { display: block; font-weight: 700; }
.order-h small { color: var(--muted); font-size: 13px; }
.due { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface); color: var(--muted); white-space: nowrap; }
.order.hot .due { background: var(--accent); color: #fff; }
.order.soon .due { background: var(--accent-soft); color: var(--accent-2); }
.order.late .due { background: #f6d9d4; color: #b3392c; }
.order .list { box-shadow: none; }
.o-actions { display: flex; gap: 6px; padding: 10px 2px 0; flex-wrap: wrap; }
.o-actions .btn.sm:not(.primary):not(.ghost) { background: var(--surface); }
.sel-row { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; border-top: 1px solid var(--line); background: none; padding: 12px 16px; text-align: left; }
.sel-row:first-child { border-top: 0; }
.sel-row.on .circ { background: var(--green); border-color: var(--green); }
.sel-row.on .circ .i { opacity: 1; }
.sel-row b { font-weight: 600; }
.chip .i { width: 15px; height: 15px; }
.chips.wrap .chip.on .i { opacity: .6; }
input[type="time"].input { padding: 11px 12px; }

@media (min-width: 900px) {
  .page { left: auto; width: min(760px, 100%); border-radius: 0; }
  .page-layer .scrim { background: var(--scrim); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
