:root {
  --bg: #fbf7f2; --panel: #ffffff; --panel-2: #f3ece3; --ink: #2a1d14; --muted: #7a6a5c; --line: #eadfd2;
  --accent: #e8590c; --accent-2: #ff922b; --brand: #5b4bff; --cyan: #12b4ff; --good: #2f9e44; --bad: #d9480f;
  --shadow: 0 1px 2px rgba(42,29,20,.06), 0 6px 18px rgba(42,29,20,.07); --r: 16px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #14100d; --panel: #1e1813; --panel-2: #2a221b; --ink: #f5ece4; --muted: #b3a394; --line: #3a2f26; --shadow: none; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #14100d; --panel: #1e1813; --panel-2: #2a221b; --ink: #f5ece4; --muted: #b3a394; --line: #3a2f26; --shadow: none; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
h1 { font-size: 26px; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 18px; margin: 0 0 10px; }
.muted { color: var(--muted); } .small { font-size: 14px; } .grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .stack { display: flex; flex-direction: column; gap: 12px; }
.hide { display: none !important; }

.wrap { max-width: 980px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom)); }
.top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand b { font-size: 20px; } .brand small { display: block; color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

.btn { font: inherit; font-weight: 600; font-size: 15px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 12px; padding: 10px 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; justify-content: center; min-height: 44px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.small { padding: 6px 12px; font-size: 14px; min-height: 36px; } .btn.quiet { background: transparent; border-color: transparent; color: var(--muted); }
.btn.round { border-radius: 99px; }
input, textarea, select { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; width: 100%; min-width: 0; }
input:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); border-color: var(--accent); }
textarea { resize: vertical; line-height: 1.5; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 600; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.chip { font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 99px; padding: 6px 14px; cursor: pointer; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; padding: 5px 12px; border-radius: 99px; background: var(--panel-2); }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr 1fr; gap: 10px; } .card-b { padding: 10px !important; } .card-t { font-size: 15px; } }
.rcard { padding: 0; overflow: hidden; cursor: pointer; position: relative; display: flex; flex-direction: column; }
.thumb { aspect-ratio: 4 / 3; background: linear-gradient(135deg, #ffd8a8, #ffa94d); display: grid; place-items: center; font-size: 42px; position: relative; overflow: hidden; }
.thumb img, .hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-b { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.card-t { font-weight: 700; line-height: 1.3; }
.star { position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: #e8590c; font-size: 20px; cursor: pointer; z-index: 1; }
.src { color: var(--accent); font-weight: 600; font-size: 13px; }

.hero { display: grid; grid-template-columns: 300px 1fr; gap: 18px; padding: 0; overflow: hidden; }
.hero-img { min-height: 220px; background: linear-gradient(135deg, #ffd8a8, #ffa94d); display: grid; place-items: center; font-size: 64px; position: relative; }
.hero-b { padding: 18px 18px 18px 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
@media (max-width: 700px) { .hero { grid-template-columns: 1fr; } .hero-b { padding: 0 16px 16px; } .hero-img { min-height: 0; aspect-ratio: 16 / 10; } }
.serves button { border: 0; background: var(--panel); color: var(--ink); width: 30px; height: 30px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.body { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; margin-top: 14px; }
@media (max-width: 760px) { .body { grid-template-columns: 1fr; } }
.ing { display: flex; gap: 12px; align-items: flex-start; padding: 8px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ing:last-child { border-bottom: 0; }
.ing input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--accent); }
.ing.done span { text-decoration: line-through; color: var(--muted); }
.sec { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin: 12px 0 4px; }
ol.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
ol.steps li { counter-increment: s; position: relative; padding: 4px 0 14px 46px; cursor: pointer; }
ol.steps li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); display: grid; place-items: center; font-weight: 800; color: var(--accent); }
ol.steps li.done { color: var(--muted); } ol.steps li.done::before { content: "✓"; background: var(--good); color: #fff; }
ol.steps li.sec { counter-increment: none; padding-left: 0; } ol.steps li.sec::before { display: none; }
.video { position: relative; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #000; }
.video.youtube { max-width: none; aspect-ratio: 16 / 9; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* add */
.ways { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.way { font: inherit; text-align: left; display: flex; flex-direction: column; gap: 4px; cursor: pointer; color: var(--ink); }
.way .ic { font-size: 28px; } .way b { font-size: 16px; }
.warn { background: color-mix(in srgb, var(--accent-2) 16%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 22px; text-align: center; cursor: pointer; }
.shots { display: flex; gap: 8px; flex-wrap: wrap; } .shots img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; }

/* sheets, toasts */
.veil { position: fixed; inset: 0; background: rgba(20,12,6,.55); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.sheet { background: var(--bg); width: min(720px, 100%); max-height: 92vh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.25); }
@media (min-width: 760px) { .veil { align-items: center; } .sheet { border-radius: 22px; } }
.sheet-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; } .sheet-h h2 { margin: 0; flex: 1; }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-weight: 600; z-index: 60; max-width: calc(100vw - 32px); }
.toast.bad { background: var(--bad); color: #fff; }
.fab { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); width: 62px; height: 62px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-size: 32px; box-shadow: 0 8px 24px rgba(232,89,12,.4); cursor: pointer; z-index: 20; }
.empty { text-align: center; padding: 40px 16px; }

/* cook mode */
.cook { position: fixed; inset: 0; background: var(--bg); z-index: 70; display: flex; flex-direction: column; padding: calc(12px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); }
.cook-bar { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; margin: 10px 0 16px; } .cook-bar i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.cook-main { flex: 1; display: grid; grid-template-columns: 300px 1fr; gap: 20px; min-height: 0; }
.cook-ings { overflow-y: auto; } .cook-step { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; cursor: pointer; }
.cook-text { font-size: clamp(22px, 4.5vw, 34px); line-height: 1.4; font-weight: 600; }
.cook-right { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
@media (max-width: 760px) { .cook-main { grid-template-columns: 1fr; } .cook-ings { display: none; } }
