/* ===========================================================
   recipe.css — Recipe Protocol's look

   Five themes of its own (none of Weather Protocol's): Pantry (light)
   and Cast Iron (dark) follow the device by default; Herb Garden,
   Chalkboard and Diner are picks in Settings. Everything reads the
   variables below, so a theme is just a block of colours + fonts.
   Same feel as Weather Protocol: cards lean toward the mouse and
   ripple where tapped (js/fx/cardfx.js), the wheel glides
   (js/fx/glide.js). Lite mode and "reduce motion" turn that off.
   =========================================================== */

:root {
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --head: var(--serif);
  --r: 16px;
  --r-sm: 10px;
  --top-h: 64px;
  --tab-h: 0px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- themes ---------- */
:root, :root[data-theme="pantry"] {
  color-scheme: light;
  --bg: #f6efe3; --bg2: #efe5d4; --card: #fffaf1; --card2: #fffdf8;
  --ink: #2a2019; --ink2: #6b5d50; --ink3: #9c8d7c; --line: #e4d7c1; --line2: #d6c6ab;
  --a: #c8432b; --a2: #a8341f; --a-ink: #fff; --a-soft: #f7ddd3;
  --hi: #fbe3a0; --hi-ink: #4a3405; --good: #4f7a3f; --good-soft: #e1ecd6; --warn: #b5650d; --warn-soft: #fbe6c8;
  --rule: #d2462f; --ruled: rgba(120, 160, 205, .32);
  --shadow: 0 1px 2px rgba(60, 35, 15, .06), 0 8px 24px -12px rgba(60, 35, 15, .25);
  --shadow-up: 0 2px 4px rgba(60, 35, 15, .08), 0 18px 40px -16px rgba(60, 35, 15, .35);
  --top-bg: rgba(246, 239, 227, .86);
}
:root[data-theme="castiron"] {
  color-scheme: dark;
  --bg: #141210; --bg2: #1a1714; --card: #1f1b18; --card2: #26211d;
  --ink: #f1e8da; --ink2: #b6a897; --ink3: #85786a; --line: #342d27; --line2: #453c34;
  --a: #ff7a3d; --a2: #ff9562; --a-ink: #1b120c; --a-soft: #3b2216;
  --hi: #4d3a12; --hi-ink: #ffd98a; --good: #8cc27a; --good-soft: #1f2d1a; --warn: #f0a24a; --warn-soft: #3a2810;
  --rule: #ff7a3d; --ruled: rgba(160, 140, 120, .16);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 26px -14px rgba(0, 0, 0, .8);
  --shadow-up: 0 2px 4px rgba(0, 0, 0, .5), 0 20px 44px -18px rgba(0, 0, 0, .9);
  --top-bg: rgba(20, 18, 16, .84);
}
:root[data-theme="herb"] {
  color-scheme: light;
  --bg: #eef0e4; --bg2: #e4e8d6; --card: #fbfcf6; --card2: #ffffff;
  --ink: #23301f; --ink2: #5c6a54; --ink3: #8d9884; --line: #d7dcc4; --line2: #c3cbab;
  --a: #4e7343; --a2: #3d5e34; --a-ink: #fff; --a-soft: #dce7d2;
  --hi: #f1e3a6; --hi-ink: #46380a; --good: #4e7343; --good-soft: #dce7d2; --warn: #a8641a; --warn-soft: #f6e5c8;
  --rule: #b7795a; --ruled: rgba(110, 140, 100, .22);
  --shadow: 0 1px 2px rgba(40, 55, 30, .06), 0 8px 24px -12px rgba(40, 55, 30, .22);
  --shadow-up: 0 2px 4px rgba(40, 55, 30, .08), 0 18px 40px -16px rgba(40, 55, 30, .3);
  --top-bg: rgba(238, 240, 228, .86);
}
:root[data-theme="chalk"] {
  color-scheme: dark;
  --head: "Chalkboard SE", "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  --bg: #1f2b26; --bg2: #1a2420; --card: #26352f; --card2: #2c3d36;
  --ink: #f2efe4; --ink2: #b9c3b8; --ink3: #8a9a90; --line: #3a4b44; --line2: #4a5d55;
  --a: #f2c14e; --a2: #f7d27a; --a-ink: #1f2b26; --a-soft: #3d4330;
  --hi: #4a4a28; --hi-ink: #ffe9a3; --good: #9fd08a; --good-soft: #2a3d2c; --warn: #f2a65a; --warn-soft: #43361f;
  --rule: #f2c14e; --ruled: rgba(242, 239, 228, .1);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 26px -14px rgba(0, 0, 0, .7);
  --shadow-up: 0 2px 4px rgba(0, 0, 0, .4), 0 20px 44px -18px rgba(0, 0, 0, .8);
  --top-bg: rgba(31, 43, 38, .88);
}
:root[data-theme="diner"] {
  color-scheme: light;
  --head: "Rockwell", "Rockwell Nova", "Roboto Slab", "Cooper Black", Georgia, serif;
  --bg: #e3f4ee; --bg2: #d3ece3; --card: #ffffff; --card2: #ffffff;
  --ink: #1b2828; --ink2: #4c6262; --ink3: #7f9595; --line: #c4e2d7; --line2: #a9d3c4;
  --a: #d7263d; --a2: #b01a2f; --a-ink: #fff; --a-soft: #fbd9de;
  --hi: #ffe38c; --hi-ink: #4a3500; --good: #23876b; --good-soft: #d2efe5; --warn: #c76a00; --warn-soft: #ffe8c7;
  --rule: #d7263d; --ruled: rgba(90, 170, 150, .25);
  --shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 1px 2px rgba(20, 60, 50, .08), 0 8px 22px -12px rgba(20, 60, 50, .28);
  --shadow-up: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 2px 4px rgba(20, 60, 50, .1), 0 18px 40px -16px rgba(20, 60, 50, .35);
  --top-bg: rgba(227, 244, 238, .9);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--sans); padding-bottom: var(--tab-h);
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="chalk"] body { background: radial-gradient(1200px 600px at 20% 0%, #24332d, transparent), var(--bg); }
:root[data-theme="diner"] body {
  background: linear-gradient(var(--bg), var(--bg)) padding-box,
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(255, 255, 255, .35) 46px 48px), var(--bg);
}
h1, h2, h3 { font-family: var(--head); line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -.01em; }
a { color: var(--a); }
a:hover { color: var(--a2); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--a); outline-offset: 2px; border-radius: 6px; }
.ic { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--card); padding: 8px 12px; }
.small-print { font-size: .84rem; color: var(--ink3); margin: .2rem 0; }
.hidden, [hidden] { display: none !important; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 30; height: var(--top-h);
  display: flex; align-items: center; gap: 18px; padding: 0 clamp(12px, 3vw, 28px);
  background: var(--top-bg); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
:root[data-theme="diner"] .top { border-bottom: 4px solid transparent; border-image: repeating-conic-gradient(#1b2828 0 25%, #fff 0 50%) 0 0 4 / 0 0 4px / 0 0 0 repeat; border-image-width: 0 0 4px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand img { border-radius: 9px; box-shadow: var(--shadow); }
.brand-words { font-family: var(--head); font-size: 1.22rem; letter-spacing: -.01em; }
.brand-words b { color: var(--a); }
.top-search {
  flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  height: 40px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink3);
}
.top-search:focus-within { border-color: var(--a); box-shadow: 0 0 0 3px var(--a-soft); }
.top-search input { flex: 1; border: 0; background: none; outline: none; color: var(--ink); min-width: 0; }
.top-nav { display: flex; gap: 4px; margin-left: auto; }
.top-nav a, .account-btn {
  color: var(--ink2); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: .94rem;
  display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s; white-space: nowrap;
}
@media (max-width: 1040px) { .brand-words { display: none; } }
.top-nav a:hover { background: var(--bg2); color: var(--ink); }
.top-nav a.on { color: var(--a); background: var(--a-soft); }
.top-nav .nav-write { color: var(--a-ink); background: var(--a); }
.top-nav .nav-write:hover, .top-nav .nav-write.on { background: var(--a2); color: var(--a-ink); }
.account { position: relative; flex: none; }
.account-btn { border: 0; background: none; cursor: pointer; }
.account-btn:hover { background: var(--bg2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--a); color: var(--a-ink); font-weight: 700; font-size: .9rem; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--a); color: var(--a-ink); font-size: .74rem; font-weight: 700; display: inline-grid; place-items: center; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; padding: 6px; z-index: 40;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-up);
}
.menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; }
.menu a:hover, .menu button:hover { background: var(--bg2); }
.menu button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--ink); border: 0; background: none; width: 100%; cursor: pointer; font: inherit; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
.menu .badge { margin-left: auto; }
:root[data-gate="closed"] [data-gated] { visibility: hidden; }

.offline-bar { background: var(--warn-soft); color: var(--warn); text-align: center; font-size: .88rem; font-weight: 600; padding: 6px 12px; }

/* mobile tab bar */
.tabbar { display: none; }
@media (max-width: 760px) {
  :root { --top-h: 56px; --tab-h: calc(62px + env(safe-area-inset-bottom)); }
  .top-nav, .top-search, .account-name { display: none; }
  .account { margin-left: auto; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: var(--tab-h); padding-bottom: env(safe-area-inset-bottom);
    background: var(--top-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink3); text-decoration: none; font-size: .72rem; font-weight: 600; }
  .tabbar a.on { color: var(--a); }
  .tabbar .tab-write svg { background: var(--a); color: var(--a-ink); border-radius: 50%; padding: 4px; width: 32px; height: 32px; }
}

/* ---------- page ---------- */
#page { max-width: 1200px; margin: 0 auto; padding: clamp(14px, 3vw, 30px) clamp(12px, 3vw, 28px) 60px; outline: none; min-height: 60vh; }
#page.page-in { animation: page-in .32s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 20px; }
.page-head h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.page-head p { margin: 4px 0 0; color: var(--ink2); }
.section { margin: 34px 0 10px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.section-head h2 { font-size: 1.35rem; }
.section-head a { font-weight: 600; text-decoration: none; font-size: .94rem; }

/* ---------- buttons, chips, fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line2); background: var(--card); color: var(--ink);
  font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .12s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { border-color: var(--a); color: var(--ink); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--a); border-color: var(--a); color: var(--a-ink); box-shadow: 0 6px 16px -8px var(--a); }
.btn.primary:hover { background: var(--a2); border-color: var(--a2); color: var(--a-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink2); }
.btn.ghost:hover { background: var(--bg2); color: var(--ink); }
.btn.danger { background: #b3261e; border-color: #b3261e; color: #fff; }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.small { height: 34px; padding: 0 13px; font-size: .9rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link { background: none; border: 0; padding: 0; color: var(--a); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--ink2);
  display: inline-grid; place-items: center; cursor: pointer; font-weight: 700; font-size: .85rem; flex: none;
}
.icon-btn:hover { background: var(--bg2); color: var(--ink); }
.round-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line2); background: var(--card); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.round-btn:hover { border-color: var(--a); color: var(--a); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line2); background: var(--card); color: var(--ink2); font-size: .88rem; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.chip:hover { color: var(--ink); border-color: var(--ink3); }
.chip.on { background: var(--a); border-color: var(--a); color: var(--a-ink); }
.chip.soft { background: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-weight: 650; font-size: .88rem; color: var(--ink2); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.field, select.field, textarea.field {
  width: 100%; min-height: 42px; padding: 9px 13px; border-radius: var(--r-sm); border: 1px solid var(--line2);
  background: var(--card2); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.field:focus { border-color: var(--a); box-shadow: 0 0 0 3px var(--a-soft); }
textarea.field { resize: vertical; line-height: 1.5; }
.label { display: block; font-weight: 650; font-size: .9rem; margin: 0 0 6px; color: var(--ink2); }
.label small { font-weight: 500; color: var(--ink3); }
.form-error { color: #c2362a; font-weight: 600; font-size: .9rem; min-height: 1.2em; margin: 6px 0 0; }
:root[data-theme="castiron"] .form-error, :root[data-theme="chalk"] .form-error { color: #ff8a7a; }

/* ---------- cards (they lean + ripple: fx/cardfx.js) ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); position: relative; }
.card, .tile { transition: transform .18s ease-out, box-shadow .2s; }
.fx-tilt { transition: transform .08s linear, box-shadow .2s; transform-style: preserve-3d; box-shadow: var(--shadow-up); }
.fx-inside > :not(.card-ripple) { transform: translate(var(--fx-x, 0), var(--fx-y, 0)); transition: transform .1s linear; }
.card-ripple { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: 1; }
.card-ripple > span { position: absolute; border-radius: 50%; background: var(--a); opacity: .16; transform: scale(0); animation: card-ripple .6s ease-out forwards; }
@keyframes card-ripple { to { transform: scale(1); opacity: 0; } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }
.recipe-card, .volume-card { display: flex; flex-direction: column; overflow: hidden; color: var(--ink); text-decoration: none; }
.recipe-card:hover, .volume-card:hover { color: var(--ink); }
.card-photo { position: relative; aspect-ratio: 4 / 3; background: var(--bg2); overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.recipe-card:hover .card-photo img { transform: scale(1.04); }
.card-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.card-title { font-size: 1.12rem; }
.card-sum { margin: 0; color: var(--ink2); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 13px; color: var(--ink3); font-size: .84rem; margin-top: auto; padding-top: 4px; }
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.card-by { margin: 0; color: var(--ink3); font-size: .82rem; }
.card-lock { position: absolute; left: 10px; top: 10px; display: inline-flex; gap: 5px; align-items: center; padding: 4px 9px; border-radius: 999px; background: rgba(20, 14, 10, .72); color: #fff; font-size: .78rem; font-weight: 700; }
.stage-tag { position: absolute; right: 10px; top: 10px; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; text-transform: capitalize; background: var(--card); color: var(--ink2); border: 1px solid var(--line); }
.card-meta .stage-tag, .row-meta .stage-tag { position: static; }
.st-pending { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.st-changes { background: var(--a-soft); color: var(--a); border-color: transparent; }
.st-live, .st-done { background: var(--good-soft); color: var(--good); border-color: transparent; }

/* a plate drawing for recipes without a photo */
.plate { width: 100%; height: 100%; display: grid; place-items: center; background: hsl(var(--plate-h, 20) 45% 88%); }
:root[data-theme="castiron"] .plate, :root[data-theme="chalk"] .plate { background: hsl(var(--plate-h, 20) 20% 20%); }
.plate svg { width: 62%; height: 62%; }
.plate .p-rim { fill: var(--card2); stroke: var(--line2); stroke-width: 1.5; }
.plate .p-well { fill: none; stroke: var(--line2); stroke-width: 1.2; }
.plate .p-fork, .plate .p-knife { fill: none; stroke: var(--ink3); stroke-width: 2; stroke-linecap: round; }

/* Volumes */
.volume-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg2); }
.volume-cover img { width: 100%; height: 100%; object-fit: cover; }
.volume-art { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(160deg, var(--a-soft), var(--bg2)); position: relative; }
.volume-art svg { width: 72%; }
.volume-art .va-book { fill: var(--a); }
.volume-art .va-book2 { fill: var(--a2); opacity: .7; }
.volume-art .va-pages { fill: var(--card2); }
.volume-art .va-lines { stroke: var(--line2); stroke-width: 2; }
.volume-art .va-band { fill: var(--hi); }
.volume-art-title { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-family: var(--head); font-weight: 700; color: var(--ink); padding: 0 12px; }
.volume-badge { position: absolute; right: 10px; top: 10px; display: inline-flex; gap: 5px; align-items: center; padding: 5px 10px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: .78rem; font-weight: 700; }
.volume-badge.soon { background: var(--hi); color: var(--hi-ink); }

/* ---------- home ---------- */
.hero {
  position: relative; overflow: hidden; padding: clamp(22px, 5vw, 48px); border-radius: 24px; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--a-soft), var(--card) 60%); border: 1px solid var(--line);
}
.hero h1 { font-size: clamp(1.8rem, 4.6vw, 3rem); max-width: 18ch; }
.hero p { color: var(--ink2); max-width: 52ch; margin: 10px 0 18px; font-size: 1.05rem; }
.hero .chef { position: absolute; right: clamp(10px, 4vw, 50px); bottom: -6px; }
.hero-search { display: flex; gap: 8px; max-width: 560px; }
.hero-search .field { border-radius: 999px; height: 48px; padding-left: 18px; }
.hero-search .btn { height: 48px; }
@media (max-width: 760px) { .hero .chef { display: none; } }

/* ---------- recipe view ---------- */
.rv-top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(18px, 4vw, 40px); align-items: center; margin-bottom: 28px; }
.rv-hero { border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow-up); background: var(--bg2); }
.rv-hero img { width: 100%; height: 100%; object-fit: cover; }
.rv-head { display: flex; flex-direction: column; gap: 12px; }
.rv-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rv-title { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.rv-by { color: var(--ink2); margin: -4px 0 0; }
.rv-by a { font-weight: 650; }
.rv-summary { margin: 0; color: var(--ink2); font-size: 1.06rem; }
.rv-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact { padding: 8px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; min-width: 84px; }
.fact-k { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink3); font-weight: 700; }
.fact-v { font-weight: 700; }
.rv-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-actions .btn.on { color: var(--a); border-color: var(--a); background: var(--a-soft); }
.rv-actions .btn.on .ic-heart { fill: var(--a); }
@media (max-width: 860px) { .rv-top { grid-template-columns: 1fr; } }

.rv-body { display: grid; grid-template-columns: minmax(290px, 380px) minmax(0, 1fr); gap: clamp(18px, 4vw, 44px); align-items: start; }
@media (max-width: 860px) { .rv-body { grid-template-columns: 1fr; } }
.rv-side {
  position: sticky; top: calc(var(--top-h) + 14px); padding: 18px 18px 14px; max-height: calc(100vh - var(--top-h) - 28px); overflow: auto;
  overscroll-behavior: contain; border-top: 5px solid var(--rule);
  background-image: repeating-linear-gradient(transparent 0 33px, var(--ruled) 33px 34px); background-position: 0 6px;
}
@media (max-width: 860px) { .rv-side { position: static; max-height: none; } }
.rv-h { font-size: 1.4rem; margin-bottom: 10px; }
.scaler { padding: 12px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.serv-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.serv-label { font-weight: 700; color: var(--ink2); margin-right: 2px; }
.serv-input { width: 64px; height: 38px; text-align: center; font-weight: 800; font-size: 1.08rem; border-radius: 10px; border: 1px solid var(--line2); background: var(--card2); -moz-appearance: textfield; }
.serv-input::-webkit-inner-spin-button, .serv-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.serv-yield { font-weight: 650; }
.serv-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.serv-chips .chip { height: 30px; padding: 0 12px; }
.serv-note { margin: 0; font-size: .84rem; color: var(--ink2); }
.serv-note:empty { display: none; }
.ing-group + .ing-group { margin-top: 12px; }
.ing-head { font-size: 1.02rem; color: var(--a); margin: 6px 0 2px; font-family: var(--sans); font-weight: 750; }
.ing { list-style: none; margin: 0; padding: 0; }
.ing-row label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 2px; cursor: pointer; line-height: 1.45; min-height: 34px; }
.ing-row input { position: absolute; opacity: 0; pointer-events: none; }
.tick { flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 6px; border: 2px solid var(--line2); display: grid; place-items: center; color: transparent; background: var(--card2); transition: background .15s, border-color .15s; }
.ing-row input:focus-visible + .tick { outline: 3px solid var(--a); outline-offset: 2px; }
.ing-row.got .tick { background: var(--good); border-color: var(--good); color: #fff; }
.ing-row.got .ing-words { color: var(--ink3); text-decoration: line-through; text-decoration-color: var(--ink3); }
.amt { font-weight: 750; font-variant-numeric: tabular-nums; }
.amt.changed { background: var(--hi); color: var(--hi-ink); padding: 0 5px; border-radius: 5px; }
.ing-note { color: var(--ink3); }
.reset-ticks { font-size: .84rem; margin-top: 10px; }

.rv-main .step-hint { margin: -6px 0 12px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.step { display: flex; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: opacity .2s, background .2s; }
.step:hover { border-color: var(--line2); }
.step-n { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--a); color: var(--a-ink); font-family: var(--sans); }
.step-main { flex: 1; min-width: 0; }
.step-text { font-size: 1.04rem; line-height: 1.65; white-space: pre-line; }
.step.done { opacity: .55; }
.step.done .step-n { background: var(--good); }
.step-head h3 { font-size: 1.12rem; color: var(--a); margin: 12px 0 0; font-family: var(--sans); font-weight: 750; }
.step-photo { margin-top: 10px; border-radius: 12px; max-height: 260px; object-fit: cover; }
.temp { display: inline-flex; align-items: center; gap: 3px; font-weight: 750; color: var(--warn); }
.timer-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px dashed var(--a); background: var(--a-soft); color: var(--a); border-radius: 999px; padding: 0 9px; font-weight: 700; cursor: pointer; font-size: .96em; line-height: 1.6; }
.timer-chip:hover { border-style: solid; }
.rv-extras { display: flex; flex-direction: column; gap: 24px; margin-top: 30px; }
.rv-extras h2 { font-size: 1.3rem; margin-bottom: 8px; }
.notes { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; white-space: pre-line; }
.equip { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.equip li { padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: .92rem; }
.nut { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 0; }
.nut dt { grid-row: 1; display: none; }
.nut { grid-auto-flow: row; }
.nut dd { margin: 0; }
.nut-cell { padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.nut-cell b { display: block; font-size: 1.1rem; }
.nut-cell span { font-size: .78rem; color: var(--ink3); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.rv-credit { color: var(--ink3); font-style: italic; margin: 0; }
.banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-radius: 14px; margin-bottom: 18px; background: var(--bg2); border: 1px solid var(--line); }
.banner p { margin: 0; flex: 1; min-width: 200px; }
.banner.warn { background: var(--warn-soft); border-color: transparent; }
.banner.note { background: var(--a-soft); border-color: transparent; }
.banner.good { background: var(--good-soft); border-color: transparent; }
.locked { text-align: center; padding: 34px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.locked .ic-lock { width: 40px; height: 40px; color: var(--a); }

/* ---------- editor ---------- */
.ed { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; padding-bottom: 90px; }
.ed-sec { padding: clamp(16px, 3vw, 24px); }
.ed-sec > h2 { font-size: 1.25rem; margin-bottom: 4px; }
.ed-sec > .small-print { margin-bottom: 14px; }
.ed-title { font-family: var(--head); font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 700; border: 0; border-bottom: 2px dashed var(--line2); border-radius: 0; background: transparent; padding: 6px 2px; }
.ed-title:focus { border-bottom-color: var(--a); box-shadow: none; }
.ed-cover { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
@media (max-width: 640px) { .ed-cover { grid-template-columns: 1fr; } }
.photo-drop {
  position: relative; aspect-ratio: 4 / 3; border-radius: 14px; border: 2px dashed var(--line2); background: var(--bg2);
  display: grid; place-items: center; text-align: center; color: var(--ink3); cursor: pointer; overflow: hidden; font-size: .9rem; padding: 10px;
}
.photo-drop:hover, .photo-drop.over { border-color: var(--a); color: var(--a); }
.photo-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-drop .photo-x { position: absolute; right: 6px; top: 6px; z-index: 2; background: rgba(0, 0, 0, .6); color: #fff; }
.photo-drop.busy::after { content: 'Shrinking + uploading…'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; font-weight: 700; }
.ed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ed-grid .wide { grid-column: span 2; }
.ing-ed-group { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--bg2); }
.ing-ed-group + .ing-ed-group { margin-top: 12px; }
.ing-ed-top { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.ing-ed-top .field { font-weight: 700; }
.ed-rows { display: flex; flex-direction: column; gap: 6px; }
.ed-row { display: grid; grid-template-columns: 26px 92px 118px minmax(0, 1fr) minmax(0, .8fr) 34px; gap: 6px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 5px; }
.ed-row .field { min-height: 36px; padding: 6px 9px; border-radius: 8px; }
.ed-row .grip { cursor: grab; color: var(--ink3); display: grid; place-items: center; touch-action: none; }
.ed-row.dragging { opacity: .75; box-shadow: var(--shadow-up); z-index: 3; position: relative; }
.ed-row .amt-ok { border-color: var(--good); }
.ed-row .amt-bad { border-color: #c2362a; }
.ed-row.need .item-in { border-color: var(--warn); background: var(--warn-soft); }
@media (max-width: 700px) {
  .ed-row { grid-template-columns: 26px 80px minmax(0, 1fr) 34px; }
  .ed-row .unit-pick { grid-column: 3; }
  .ed-row .item-in { grid-column: 2 / 4; }
  .ed-row .note-in { grid-column: 2 / 4; }
  .ed-row .row-x { grid-row: 1; grid-column: 4; }
}
.quick-add { margin-top: 10px; }
.quick-add textarea { min-height: 44px; }
.ed-steps { display: flex; flex-direction: column; gap: 10px; }
.ed-step { display: grid; grid-template-columns: 30px minmax(0, 1fr) 34px; gap: 8px; align-items: start; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.ed-step .step-n { width: 28px; height: 28px; font-size: .86rem; }
.ed-step textarea { min-height: 64px; }
.ed-step-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.ed-step-tools .chip { height: 28px; font-size: .8rem; padding: 0 10px; }
.found { display: flex; flex-wrap: wrap; gap: 6px; font-size: .8rem; color: var(--ink3); }
.found span { padding: 2px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.list-ed { display: flex; flex-direction: column; gap: 6px; }
.list-ed-row { display: flex; gap: 6px; }
.ed-bar {
  position: fixed; left: 0; right: 0; bottom: var(--tab-h); z-index: 25; padding: 10px clamp(12px, 3vw, 28px);
  background: var(--top-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.ed-bar-in { max-width: 900px; margin: 0 auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ed-status { flex: 1; color: var(--ink3); font-size: .88rem; min-width: 140px; }
.problems { margin: 0; padding-left: 20px; color: var(--ink2); }
@media (max-width: 760px) {
  .ed { padding-bottom: 130px; }
  .ed-bar { padding: 6px 10px 8px; }
  .ed-bar-in { gap: 6px; flex-wrap: wrap; }
  .ed-status { flex-basis: 100%; font-size: .76rem; min-width: 0; }
  .ed-bar .btn { height: 38px; padding: 0 12px; font-size: .88rem; flex: 1; }
  .ed-bar .prev-btn { flex: none; }
  .ed-bar .lbl { display: none; }
  .ed-bar .sm { display: inline; }
}
.ed-bar .sm { display: none; }
.preview-wrap { border: 2px dashed var(--line2); border-radius: 20px; padding: clamp(12px, 3vw, 24px); }

/* ---------- lists (mine, review) ---------- */
.rows { display: flex; flex-direction: column; gap: 10px; }
.row { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px; color: var(--ink); text-decoration: none; }
.row-photo { width: 84px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--bg2); }
.row-photo img { width: 100%; height: 100%; object-fit: cover; }
.row-title { font-weight: 700; font-size: 1.04rem; }
.row-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--ink3); font-size: .85rem; align-items: center; margin-top: 2px; }
.row-note { margin: 6px 0 0; font-size: .88rem; color: var(--a); }
.row-actions { display: flex; gap: 6px; }
@media (max-width: 600px) { .row { grid-template-columns: 64px minmax(0, 1fr); } .row-photo { width: 64px; height: 52px; } .row-actions { grid-column: 1 / -1; } }
.review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.review-panel { position: sticky; top: calc(var(--top-h) + 14px); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.review-panel textarea { min-height: 90px; }
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .86rem; color: var(--ink2); }
.history b { color: var(--ink); text-transform: capitalize; }
.changes-list { margin: 0; padding-left: 18px; font-size: .9rem; color: var(--ink2); }
@media (max-width: 960px) { .review-layout { grid-template-columns: 1fr; } .review-panel { position: static; } }
@media (max-width: 1320px) { .review-layout .rv-top, .review-layout .rv-body { grid-template-columns: 1fr; } .review-layout .rv-side { position: static; max-height: none; } .review-layout .rv-hero { max-height: 320px; } }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.switch-row:first-child { border-top: 0; }
.switch-row p { margin: 2px 0 0; font-size: .86rem; color: var(--ink3); }

/* ---------- settings ---------- */
.settings { max-width: 760px; display: flex; flex-direction: column; gap: 18px; }
.settings .card { padding: 18px 20px; }
.settings h2 { font-size: 1.2rem; margin-bottom: 8px; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.theme-pick { border: 2px solid var(--line); border-radius: 14px; padding: 0; overflow: hidden; cursor: pointer; background: none; text-align: left; }
.theme-pick.on { border-color: var(--a); box-shadow: 0 0 0 3px var(--a-soft); }
.theme-swatch { height: 64px; display: flex; align-items: flex-end; gap: 6px; padding: 10px; }
.theme-swatch i { width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); }
.theme-name { display: block; padding: 8px 10px 0; font-weight: 700; }
.theme-note { display: block; padding: 0 10px 10px; font-size: .78rem; color: var(--ink3); }

/* ---------- sign in, coming soon, empty, oops ---------- */
.narrow { max-width: 440px; margin: 20px auto; }
.auth { padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.auth h1 { font-size: 1.6rem; }
.auth .chef { margin: -4px auto 0; }
.oops { display: flex; align-items: center; gap: 22px; padding: clamp(20px, 5vw, 40px); max-width: 640px; margin: 30px auto; background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.oops.small { margin: 16px 0; padding: 18px; max-width: none; box-shadow: none; }
.oops-words { flex: 1; min-width: 0; }
.oops-title { font-size: 1.35rem; }
.oops-text { color: var(--ink2); margin: 6px 0 0; }
.oops-code { font-size: .72rem; color: var(--ink3); opacity: .7; margin: 8px 0 0; font-family: ui-monospace, Consolas, monospace; }
.oops-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 520px) { .oops { flex-direction: column; text-align: center; } .oops-actions { justify-content: center; } }
.soon-page { max-width: 640px; margin: 6vh auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.soon-page h1 { font-size: clamp(2rem, 6vw, 3rem); }
.soon-page p { color: var(--ink2); font-size: 1.08rem; margin: 0; max-width: 46ch; }
.soon-page .icon-big { width: 120px; height: 120px; border-radius: 28px; box-shadow: var(--shadow-up); }
.soon-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; width: 100%; margin-top: 8px; }
.soon-feats .card { padding: 14px; text-align: left; font-size: .92rem; color: var(--ink2); }
.soon-feats b { display: block; color: var(--ink); font-family: var(--head); font-size: 1.02rem; }
.empty { text-align: center; padding: 30px 10px; color: var(--ink2); }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 50px 10px; color: var(--ink3); font-weight: 600; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--a); animation: dot 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-6px); opacity: 1; } }

/* Proto the cook (mascot.js) */
.chef { color: var(--a); flex: none; }
.chef svg { overflow: visible; }
.chef .chef-fix { display: none; }
.chef.mood-ours .chef-spoon { display: none; }
.chef.mood-ours .chef-fix { display: inline; }
.chef-spoon-tool { transform-origin: 85px 60px; animation: stir 2.4s ease-in-out infinite; }
.chef-whisk { transform-origin: 84.7px 68px; animation: whisk .5s ease-in-out infinite alternate; }
.chef-smoke path { animation: smoke 2s ease-in-out infinite; }
.chef-smoke path + path { animation-delay: .7s; }
.chef-eyes .eye { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.chef.mood-sleepy .chef-eyes .eye { transform: scaleY(.25); animation: none; }
.chef.mood-look .chef-eyes { animation: look 3s ease-in-out infinite; }
.chef.mood-ours .chef-mouth, .chef.mood-look .chef-mouth { d: path("M44 64 Q50 61 56 64"); }
@keyframes stir { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(10deg); } }
@keyframes whisk { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
@keyframes smoke { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: .6; } 100% { opacity: 0; transform: translateY(-10px); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes look { 0%, 100% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }

/* ---------- toasts, modal, timers ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 18px); transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(520px, calc(100vw - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-up); opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s var(--ease); font-weight: 600; font-size: .94rem; }
.toast.in { opacity: 1; transform: none; }
.toast .chef { color: var(--a); }
.toast .btn { color: var(--bg); border-color: currentColor; }
.modal-back { position: fixed; inset: 0; z-index: 70; background: rgba(20, 14, 10, .45); display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .18s; }
.modal-back.in { opacity: 1; }
.modal { width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--card); border-radius: 22px; padding: 22px; box-shadow: var(--shadow-up); display: flex; flex-direction: column; gap: 10px; transform: translateY(10px) scale(.98); transition: transform .22s var(--ease); outline: none; }
.modal.wide { width: min(760px, 100%); }
.modal-back.in .modal { transform: none; }
.modal .chef { margin: 0 auto; }
.modal-title { font-size: 1.3rem; }
.modal-text { margin: 0; color: var(--ink2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.timers { position: fixed; right: 16px; bottom: calc(var(--tab-h) + 16px); z-index: 50; display: flex; flex-direction: column; gap: 8px; }
.timer { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-up); min-width: 250px; color: var(--a); }
.timer .icon-btn { width: 32px; height: 32px; }
.tm-words { flex: 1; display: flex; flex-direction: column; min-width: 0; color: var(--ink); }
.tm-time { font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tm-label { font-size: .76rem; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.tm-sub { font-size: .76rem; color: var(--a); font-weight: 700; }
.tm-sub:empty { display: none; }
.timer.ringing { animation: ring .5s ease-in-out infinite alternate; border-color: var(--a); background: var(--a-soft); }
@keyframes ring { from { transform: rotate(-1.5deg); } to { transform: rotate(1.5deg); } }

/* ---------- cook mode ---------- */
.cook { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column; }
.cook-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.cook-top h2 { flex: 1; font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cook-body { flex: 1; overflow: auto; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; padding: clamp(16px, 4vw, 40px); }
.cook-step { display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.cook-step .step-n { width: 54px; height: 54px; font-size: 1.4rem; }
.cook-head { color: var(--a); font-weight: 750; }
.cook-text { font-size: clamp(1.4rem, 3.6vw, 2.3rem); line-height: 1.45; font-family: var(--head); white-space: pre-line; }
.cook-ings { padding: 16px; align-self: start; }
.cook-ings h3 { font-size: 1.05rem; margin-bottom: 6px; }
.cook-ings ul { margin: 0; padding-left: 18px; }
.cook-nav { display: flex; gap: 10px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); align-items: center; }
.cook-dots { flex: 1; display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; }
.cook-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line2); }
.cook-dots i.on { background: var(--a); }
@media (max-width: 760px) { .cook-body { grid-template-columns: 1fr; } }

/* ---------- Lite mode + reduce motion ---------- */
:root[data-lite="on"] *, :root[data-lite="on"] *::before, :root[data-lite="on"] *::after {
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important; box-shadow: none !important; filter: none !important;
  animation-duration: .001s !important; transition-duration: .001s !important;
}
:root[data-lite="on"] .card-ripple { display: none !important; }
:root[data-lite="on"] .top, :root[data-lite="on"] .tabbar, :root[data-lite="on"] .ed-bar { background: var(--bg); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}

/* ---------- print: just the recipe ---------- */
@media print {
  .top, .tabbar, .timers, .toasts, .offline-bar, .rv-actions, .scaler .serv-chips, .seg, .reset-ticks, .step-hint, .banner, .ed-bar { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .step, .fact { box-shadow: none !important; border-color: #ccc; background: #fff; }
  .rv-top { grid-template-columns: 1fr 1.4fr; }
  .rv-hero { max-height: 260px; }
  .rv-body { grid-template-columns: 1fr 1.6fr; }
  .rv-side { position: static; max-height: none; background-image: none; }
  .amt.changed { background: none; }
  .step { break-inside: avoid; }
}
