/* Recipe Scaler & Swap Tool — toolkityourlife.com/RecipeScaler/
   Matches the site's look (same base as Home Maintenance Calendar and Receipt Vault): black, Inter + Archivo Black,
   lime accent. Mobile first. Change colors: swapped blue · added lime · adjusted yellow · check-the-label red. */
:root {
  --bg: #000; --bg2: #0b0b0c; --card: #121214; --card2: #18181b; --line: rgba(255,255,255,.12); --line2: rgba(255,255,255,.2);
  --ink: #f4f4f2; --muted: #9a9aa0; --accent: #c9ff3d; --accent-ink: #000;
  --ok: #c9ff3d; --soon: #ffc44d; --bad: #ff6b6b; --none: #77777d; --info: #7cc4ff;
  --r: 14px; --tab-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
html.big { font-size: 112.5%; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 1rem/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 8px);
}
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse 70% 40% at 50% 0%, rgba(255,255,255,.06), transparent 70%); }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px; background: rgba(0,0,0,.78);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-nav { flex: 1; min-width: 0; min-height: 38px; display: flex; align-items: center; }
.acct { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 6px; border-radius: 999px;
  background: rgba(18,18,20,.9); border: 1px solid var(--line); cursor: pointer; font-size: .82rem; font-weight: 600; letter-spacing: .04em; }
.acct:hover { border-color: rgba(201,255,61,.6); }
.acct-av { width: 26px; height: 26px; border-radius: 50%; background: var(--card2); display: grid; place-items: center; overflow: hidden; font-size: .8rem; color: var(--muted); }
.acct-av img { width: 100%; height: 100%; object-fit: cover; }
.acct.signed-in .acct-av { background: var(--accent); color: #000; }
.acct-label { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu { position: absolute; right: 12px; top: calc(100% + 6px); min-width: 230px; padding: 6px; background: rgba(18,18,20,.97);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 48px rgba(0,0,0,.6); }
.acct-menu p { margin: 8px 10px; color: var(--muted); font-size: .82rem; }
.acct-menu button, .acct-menu a { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); text-decoration: none; cursor: pointer; }
.acct-menu button:hover, .acct-menu a:hover { background: rgba(255,255,255,.07); color: var(--accent); }

/* ---------- layout ---------- */
.view { max-width: 980px; margin: 0 auto; padding: 16px 14px 24px; outline: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1 { font: 400 clamp(1.45rem, 5.5vw, 2.2rem)/1.05 "Archivo Black", "Inter", sans-serif; text-transform: uppercase; letter-spacing: -.01em; }
h1 .accent { color: var(--accent); }
h1.t-h { text-transform: none; font-size: clamp(1.35rem, 5vw, 1.9rem); letter-spacing: 0; overflow-wrap: anywhere; }
h2 { font-size: 1.05rem; font-weight: 700; letter-spacing: .01em; }
h2 .count { color: var(--muted); font-weight: 600; font-size: .85rem; margin-left: 4px; }
h3 { font-size: .92rem; font-weight: 700; }
.sub { color: var(--muted); margin: 6px 0 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny { font-size: .75rem; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spread { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.stack p { margin: 0; }
.section { margin-top: 22px; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.card > h2 + *, .card > .spread + * { margin-top: 12px; }
.card p { margin: 0; }
.card p + p { margin-top: 8px; }
.crumbs { margin: 0 0 10px; }
.crumbs a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.crumbs a:hover { color: var(--accent); }
.notes { white-space: pre-wrap; color: #d8d8d6; font-size: .92rem; }
details > summary { cursor: pointer; color: var(--muted); font-size: .88rem; }
details[open] > summary { margin-bottom: 8px; }
@media (min-width: 720px) { .view { padding: 22px 20px 28px; } }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--line2); background: var(--card2); color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none; font-size: .95rem; }
.btn:hover { border-color: rgba(201,255,61,.6); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: none; }
.btn.danger { color: var(--bad); border-color: rgba(255,107,107,.4); background: none; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: .85rem; border-radius: 10px; }
.btn.big { min-height: 52px; padding: 0 22px; font-size: 1.02rem; }
.btn.icon { padding: 0; width: 44px; flex: none; }
.btn.sm.icon { width: 36px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: rgba(201,255,61,.08); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.big-actions { display: grid; gap: 10px; grid-template-columns: 1fr; margin-top: 16px; }
@media (min-width: 560px) { .big-actions { grid-template-columns: repeat(3, 1fr); } .big-actions.two { grid-template-columns: repeat(2, 1fr); } }
.big-actions .btn { min-height: 76px; flex-direction: column; gap: 6px; font-size: 1rem; border-radius: 16px; }
.big-actions .btn svg { width: 26px; height: 26px; }
.big-actions .btn small { font-weight: 400; color: var(--muted); font-size: .78rem; }
.big-actions .btn.primary small { color: rgba(0,0,0,.65); }

label.f { display: block; }
label.f > span, .f-label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.in, select.in, textarea.in { width: 100%; min-height: 44px; padding: 10px 12px; font-size: 16px; background: #0e0e10; color: var(--ink);
  border: 1px solid var(--line2); border-radius: 10px; }
select.in.sm, input.in.sm { width: auto; min-height: 36px; padding: 4px 10px; font-size: 14px; }
textarea.in { min-height: 88px; resize: vertical; line-height: 1.4; }
textarea.in.tall { min-height: 220px; }
.in:focus { outline: none; border-color: rgba(201,255,61,.7); box-shadow: 0 0 0 3px rgba(201,255,61,.12); }
.in.num { text-align: right; font-variant-numeric: tabular-nums; }
.fgrid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.fgrid .full { grid-column: 1 / -1; }
@media (min-width: 720px) { .fgrid.four { grid-template-columns: repeat(4, 1fr); } }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: 12px; background: #0e0e10; border: 1px solid var(--line); flex-wrap: wrap; max-width: 100%; }
.seg button { min-height: 38px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; font-weight: 600; font-size: .88rem; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--card2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.seg.wide { display: flex; } .seg.wide button { flex: 1; }
.seg.accent button[aria-pressed="true"] { background: var(--accent); color: #000; box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line2);
  background: #0e0e10; font-size: .85rem; cursor: pointer; max-width: 100%; color: var(--ink); text-decoration: none; }
button.chip:hover, a.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"], .chip.on { border-color: var(--accent); background: rgba(201,255,61,.12); color: var(--accent); }
.chip.static { cursor: default; min-height: 26px; padding: 2px 10px; font-size: .78rem; color: var(--muted); }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper .in { width: 92px; text-align: center; font-weight: 700; font-size: 1.1rem; }
.switch { position: relative; width: 52px; height: 30px; flex: none; border-radius: 999px; border: 1px solid var(--line2); background: #0e0e10; cursor: pointer; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.switch[aria-checked="true"] { background: rgba(201,255,61,.25); border-color: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(22px); background: var(--accent); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-weight: 700;
  letter-spacing: .02em; border: 1px solid currentColor; white-space: nowrap; vertical-align: 1px; }
.b-swap { color: var(--info); } .b-add { color: var(--ok); } .b-adj, .b-adjust { color: var(--soon); } .b-check { color: var(--bad); } .b-note { color: var(--muted); }
.ok-t { color: var(--ok); } .warn-t { color: var(--soon); } .bad-t { color: var(--bad); }

/* ---------- home list ---------- */
.toolbar { display: grid; gap: 8px; grid-template-columns: 1fr; margin-top: 16px; }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; pointer-events: none; }
.search .in { padding-left: 38px; }
.list { display: grid; gap: 8px; margin-top: 12px; }
.rc { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.rc:hover { border-color: rgba(201,255,61,.5); }
.rc.child { margin-left: 18px; border-left: 3px solid var(--info); }
.rc-title { display: block; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.rc-meta { display: block; color: var(--muted); font-size: .8rem; margin-top: 3px; }
.rc svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; }
.empty { text-align: center; padding: 30px 18px; border: 1px dashed var(--line2); border-radius: 18px; margin-top: 16px; }
.empty h2 { font: 400 1.25rem "Archivo Black", sans-serif; text-transform: uppercase; }
.empty p { color: var(--muted); max-width: 460px; margin: 8px auto 16px; }

/* ---------- recipe ---------- */
.dhead { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.actions { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 8px; margin-top: 14px; }
.sumline { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.sumline b.f { font: 400 1.5rem/1 "Archivo Black", sans-serif; color: var(--accent); }
.sumline span { color: var(--muted); font-size: .88rem; } .sumline span b { color: var(--ink); }
.modepanel { margin-top: 12px; display: grid; gap: 10px; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline .in { width: auto; min-width: 0; flex: 1 1 90px; }
.inline .in.w90 { flex: 0 0 90px; width: 90px; }
.ing { list-style: none; margin: 0; padding: 0; }
.ing li { display: grid; grid-template-columns: minmax(84px, max-content) minmax(0, 1fr); gap: 4px 12px; padding: 9px 0; border-top: 1px solid var(--line); align-items: baseline; }
.ing li:first-child { border-top: 0; }
.ing li.grp { display: block; padding: 14px 0 4px; border-top: 0; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ing .amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ing .alt { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); white-space: normal; }
.ing .nm { overflow-wrap: anywhere; }
.ing .nm small { color: var(--muted); }
.ing .was { display: block; font-size: .78rem; color: var(--muted); }
.ing li.c-swap .amt { color: var(--info); } .ing li.c-add .amt { color: var(--ok); } .ing li.c-adj .amt { color: var(--soon); }
.ing .linkbtn, .linkbtn { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font-size: inherit; }
.mix { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(124,196,255,.06); border: 1px solid rgba(124,196,255,.3); font-size: .88rem; }
.mix b { color: var(--info); }
.stepsl { margin: 0; padding-left: 22px; color: #e2e2df; } .stepsl li + li { margin-top: 10px; } .stepsl li::marker { color: var(--accent); font-weight: 700; }
.kpis { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 620px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { padding: 10px 12px; border-radius: 12px; background: #0e0e10; border: 1px solid var(--line); }
.kpi b { display: block; font: 400 1.35rem/1.1 "Archivo Black", sans-serif; }
.kpi span { display: block; margin-top: 4px; color: var(--muted); font-size: .76rem; }
.kpi.hl b { color: var(--accent); }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-top: 0; }
.tbl td.num, .tbl th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl tr.fl td { background: rgba(201,255,61,.05); } .tbl tr.fl td.num.pct { color: var(--accent); font-weight: 700; }
.tbl tr.tot td { font-weight: 700; border-top: 2px solid var(--line2); }
.tbl input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 4px; min-width: 40px; }
.bar i { display: block; height: 100%; background: var(--accent); }
.swapc { display: grid; gap: 10px; }
.swapc .card.on { border-color: rgba(201,255,61,.45); }
.chg { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.chg li { padding: 10px 12px; border-radius: 12px; background: #0e0e10; border: 1px solid var(--line); }
.chg b { display: block; margin: 4px 0 3px; overflow-wrap: anywhere; }
.chg p { color: #c9c9c6; font-size: .88rem; }
.tech { margin: 0; padding-left: 20px; color: #dcdcd9; font-size: .92rem; } .tech li + li { margin-top: 8px; }
.flag { margin-top: 8px; padding: 8px 10px; border-radius: 10px; font-size: .88rem; background: rgba(255,107,107,.08); border: 1px solid rgba(255,107,107,.35); }
.flag.ok { background: rgba(201,255,61,.07); border-color: rgba(201,255,61,.35); }
.pairbox { border-left: 3px solid var(--accent); }

/* ---------- editor ---------- */
.erow { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 6px; align-items: start; }
.erow + .erow { margin-top: 8px; }
.erow .hint { grid-column: 1 / -1; font-size: .78rem; color: var(--muted); margin: -2px 2px 2px; }
.erow .hint.warn { color: var(--soon); }
.erow textarea.in { min-height: 64px; }
.sticky-cta { position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 8px); z-index: 20; display: flex; gap: 8px; padding: 10px; margin-top: 18px;
  background: rgba(8,8,9,.94); border: 1px solid var(--line); border-radius: 16px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.sticky-cta .btn { flex: 1; }
.prog { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line2); }

/* ---------- banners ---------- */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); margin-top: 14px;
  background: rgba(201,255,61,.08); border: 1px solid rgba(201,255,61,.35); }
.banner.warn { background: rgba(255,196,77,.08); border-color: rgba(255,196,77,.4); }
.banner.info { background: rgba(124,196,255,.07); border-color: rgba(124,196,255,.35); }
.banner p { margin: 0; }
.banner .row { margin-top: 10px; }
.syncline { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .82rem; margin-top: 8px; }
.syncline i { width: 8px; height: 8px; border-radius: 50%; background: var(--none); flex: none; }
.syncline.cloud i { background: var(--ok); }
.syncline.off i { background: var(--soon); }
.works { display: flex; flex-wrap: wrap; gap: 8px; }
.works a { font-size: .8rem; color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; }
.works a:hover { color: var(--accent); border-color: rgba(201,255,61,.5); }

/* ---------- sheet / toast ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 2147482000; background: rgba(0,0,0,.7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; background: #0c0c0e; border: 1px solid var(--line); border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(18px + var(--safe-b)); }
.sheet > * + * { margin-top: 12px; }
.sheet p { margin-bottom: 0; }
@media (min-width: 720px) { .sheet-bg { align-items: center; } .sheet { border-radius: 20px; } }
.sheet.wide { max-width: 860px; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); transform: translateX(-50%); z-index: 2147482500;
  background: #151515; border: 1px solid var(--accent); color: var(--ink); padding: 10px 16px; border-radius: 999px; font-size: .9rem; box-shadow: 0 8px 30px rgba(0,0,0,.6); max-width: calc(100vw - 24px); text-align: center; }
.toast.err { border-color: var(--bad); }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(8,8,9,.94); border-top: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted);
  text-decoration: none; font-size: .72rem; font-weight: 600; letter-spacing: .04em; }
.tabbar a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current="page"] { color: var(--accent); }
.tabbar .tab-add svg { width: 30px; height: 30px; padding: 4px; border-radius: 50%; background: var(--accent); color: #000; stroke: #000; }
@media (min-width: 900px) {
  .tabbar { left: 50%; right: auto; bottom: 14px; width: 520px; transform: translateX(-50%); border-radius: 999px; border: 1px solid var(--line); height: 60px; padding: 0; }
  body { padding-bottom: 96px; }
}

/* ---------- timers (visible on every screen while one is running) ---------- */
.timerbar { position: fixed; left: 8px; right: 8px; bottom: calc(var(--tab-h) + var(--safe-b) + 8px); z-index: 70; display: flex; gap: 8px; overflow-x: auto; padding: 4px; }
body.cooking .timerbar { bottom: calc(var(--safe-b) + 84px); }
.tm { flex: none; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 8px 6px 14px; border-radius: 999px; background: #101012;
  border: 1px solid var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,.6); font-variant-numeric: tabular-nums; }
.tm b { font-size: 1.15rem; } .tm span { color: var(--muted); font-size: .8rem; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line2); background: none; cursor: pointer; color: var(--muted); font-size: 1rem; }
.tm.done { background: var(--accent); color: #000; animation: ring 1s infinite; } .tm.done span { color: rgba(0,0,0,.7); } .tm.done button { color: #000; border-color: rgba(0,0,0,.4); }
@keyframes ring { 50% { transform: scale(1.04); } }
@media (min-width: 900px) { .timerbar { left: 50%; right: auto; transform: translateX(-50%); bottom: 86px; max-width: 90vw; } }

/* ---------- cook mode ---------- */
body.cooking { padding-bottom: calc(var(--safe-b) + 150px); }
body.cooking .top, body.cooking .tabbar, body.cooking .foot { display: none; }
.cook { --cz: 1; font-size: calc(1.2rem * var(--cz)); line-height: 1.5; }
.cook-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 8px; margin: -16px -14px 12px; padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
  background: rgba(0,0,0,.9); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 1rem; }
.cook-title { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cook-title small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.cook-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .85rem; color: var(--muted); }
.cook-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--none); display: inline-block; margin-right: 6px; }
.cook-status .on .dot { background: var(--ok); }
.cook h2 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.cook .card { margin-top: 14px; padding: 16px; }
.cook-step { font-size: calc(1.5rem * var(--cz)); line-height: 1.4; font-weight: 500; margin: 0; overflow-wrap: anywhere; }
.cook-nav { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 16px; }
.cook-nav .btn { min-height: 64px; font-size: 1.1rem; border-radius: 16px; }
.cook-timers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cook-timers .btn { min-height: 52px; font-size: 1rem; border-radius: 14px; }
.cklist { list-style: none; margin: 0; padding: 0; }
.cklist li { border-top: 1px solid var(--line); } .cklist li:first-child { border-top: 0; }
.cklist li.grp { padding: 14px 0 4px; border-top: 0; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cklist label, .cklist .ck { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 0; cursor: pointer; width: 100%; text-align: left; background: none; border: 0; }
.cklist input { width: 28px; height: 28px; accent-color: var(--accent); margin: 2px 0 0; }
.cklist .done-t { opacity: .45; text-decoration: line-through; }
.cklist b { font-variant-numeric: tabular-nums; } .cklist small { color: var(--muted); font-size: .8em; }
.cklist li.cur .ck { color: var(--accent); }
.cklist .n { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line2); display: grid; place-items: center; font-size: .85rem; font-weight: 700; }
.cklist li.cur .n { border-color: var(--accent); } .cklist li.dn .n { background: var(--accent); border-color: var(--accent); color: #000; }
.cook-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 65; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 10px 10px calc(10px + var(--safe-b));
  background: rgba(8,8,9,.96); border-top: 1px solid var(--line); }
.cook-bar .btn { min-height: 54px; border-radius: 14px; font-size: .9rem; flex-direction: column; gap: 2px; padding: 0 6px; }
.cook-bar .btn svg { width: 20px; height: 20px; }
.heard { font-size: .85rem; color: var(--muted); min-height: 1.2em; margin-top: 8px; }

/* ---------- ads ---------- */
.ad { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 18px 0; width: 100%; }
.ad-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #666; }
.ad ins, .ad .mn { width: 100%; min-height: 90px; }
.ad-ph { width: 100%; max-width: 970px; min-height: 90px; border: 1px dashed #444; border-radius: 8px; display: grid; place-items: center; color: #777; font-size: 13px; text-align: center; padding: 8px; }
body.cooking .ad, body.printing-view .ad { display: none !important; }

.foot { max-width: 760px; margin: 18px auto 0; padding: 10px 16px 20px; text-align: center; color: #6a6a70; font-size: .78rem; }
.foot a { color: inherit; }
.foot p { margin: 4px 0; }

/* ---------- print (recipe card) ---------- */
.pv { background: #fff; color: #111; border-radius: 12px; padding: 22px; font-size: 13px; line-height: 1.45; margin-top: 14px; }
.pv h1 { color: #111; font: 800 22px/1.15 "Inter", sans-serif; text-transform: none; letter-spacing: 0; }
.pv h2 { font-size: 11px; margin: 16px 0 6px; color: #555; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid #ddd; padding-bottom: 3px; }
.pv p { margin: 4px 0; }
.pv .pv-meta { color: #444; margin-top: 4px; }
.pv .pv-cols { display: grid; grid-template-columns: 1fr; gap: 0 26px; }
.pv table { width: 100%; border-collapse: collapse; }
.pv td { padding: 3px 0; vertical-align: top; border-bottom: 1px dotted #ddd; }
.pv td.a { white-space: nowrap; font-weight: 700; padding-right: 10px; width: 1%; }
.pv td.a small { font-weight: 400; color: #555; }
.pv td.g { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: #555; padding-top: 8px; border: 0; }
.pv ol { margin: 0; padding-left: 18px; } .pv ol li { margin-bottom: 5px; break-inside: avoid; }
.pv ul { margin: 0; padding-left: 16px; } .pv ul li { margin-bottom: 3px; }
.pv .pv-foot { margin-top: 14px; font-size: 10px; color: #777; border-top: 1px solid #ddd; padding-top: 6px; }
.pv.card46 { max-width: 6in; } .pv.card57 { max-width: 7in; }
@media (min-width: 700px) { .pv:not(.card46):not(.card57) .pv-cols { grid-template-columns: 5fr 7fr; } }
@media print {
  @page { margin: 12mm; }
  html, body { background: #fff !important; color: #111 !important; padding: 0 !important; }
  body::before { display: none; }
  [data-noprint], .ad, .toast, .sheet-bg, tyl-nav, .tylp-foot, .noprint, .timerbar, .sticky-cta, .cook-bar { display: none !important; }
  .view { max-width: none; padding: 0; }
  .pv { padding: 0; border-radius: 0; margin: 0; max-width: none !important; }
  .pv:not(.card46):not(.card57) .pv-cols { grid-template-columns: 5fr 7fr; }
  body:not(.printing-view) .card { background: #fff !important; color: #111 !important; border-color: #ccc !important; }
  body:not(.printing-view) h1, body:not(.printing-view) .ing .amt, body:not(.printing-view) .stepsl { color: #111 !important; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
/* cook mode: keep the screen clear (the site's Suggest tab comes back afterwards) */
html.cooking tyl-suggest { display: none !important; }
body.has-timer { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 72px); }
body.has-timer .sticky-cta { bottom: calc(var(--tab-h) + var(--safe-b) + 68px); }
body.has-timer .toast { bottom: calc(var(--tab-h) + var(--safe-b) + 72px); }
