/* Tiny Sous Chef styles: 1. tokens (use them; don't invent sizes)  2. base  3. shared components  4. screens */

/* ---------- 1. tokens ---------- */
:root {
  color-scheme: light;
  /* color: light */
  /* 11-28 "Avocado + parmesan", a little greener (was cream + toffee); the accent keeps its old name, --toffee */
  --bg: #f3f3e6; --surface: #fdfdf5; --ink: #1d2419; --muted: #666b59; --line: #dfe1cc; --done: #a9ae9c;
  --field-off: #e6e8d8; --field-on: #fdfdf5; --field-edge: #d2d6c0; /* editor rows: waiting, in use, box edge */
  --toffee: #37703a; --toffee-soft: #dbebd5;   /* amounts, stats, the current item (avocado green) */
  --ok: #1f7a8a; --ok-soft: #d8eef2;           /* done, on (teal: apart from the green) */
  --link: #7a4a1f; --link-soft: #f1e5d6;       /* links and jumps (warm brown) */
  --alarm: #c2341f;                            /* warnings, timers going off */
  --g-s: #8a4fd0; --g-e: #2a7fc0; --g-a: #2f8f52; --g-b: #5f9a2a; --g-c: #a8860a; --g-d: #c4621a; --g-f: #c2341f; --g-x: #8c1c3a; /* grades; e: Super Easy, x: Backbreaking */
  --scrim: rgba(0, 0, 0, .45);
  /* type */
  --font-display: "DM Serif Display", Georgia, serif; /* 11-28: classic magazine pairing (was Young Serif + Figtree) */
  --font-body: "DM Sans", -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace; /* timer digits only */
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.8l3.1 6.6 7.2.9-5.3 5 1.4 7.1L12 17.9l-6.4 3.5L7 14.3l-5.3-5 7.2-.9z'/%3E%3C/svg%3E");
  --t-xs: 13px; --t-s: 15px; --t-m: 17px; --t-body: 19px; --t-l: 20px; --t-xl: 24px; --t-xxl: 34px;
  /* space, corners, sizes */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --r-s: 8px; --r-m: 12px; --r-l: 16px; --r-pill: 999px;
  --tap: 44px;         /* smallest thing a finger has to hit */
  --icon-btn: 36px;    /* round buttons beside an item */
  --ad-h: 100px;       /* a 320×100 banner ad */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .08);
  --shadow-2: 0 6px 20px rgba(0, 0, 0, .18);
  --gutter: max(var(--s4), env(safe-area-inset-left, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    /* 11-28 "Pistachio", a little less dark */
    --bg: #1f2419; --surface: #283022; --ink: #eef1e6; --muted: #a9b09b; --line: #3a4433; --done: #6e7764;
    --field-off: #262d20; --field-on: #343e2d; --field-edge: #58644b;
    --toffee: #a8d06c; --toffee-soft: #33432a; --ok: #6cc9d6; --ok-soft: #1d3a40; --link: #e0b07c; --link-soft: #3a2c1c;
    --alarm: #ff7a63;
    --g-s: #c08cff; --g-e: #6cb4f0; --g-a: #5fd38a; --g-b: #a6d65a; --g-c: #f0cc3c; --g-d: #f59a52; --g-f: #ff6b5e; --g-x: #e0607e;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1f2419; --surface: #283022; --ink: #eef1e6; --muted: #a9b09b; --line: #3a4433; --done: #6e7764;
  --field-off: #262d20; --field-on: #343e2d; --field-edge: #58644b;
  --toffee: #a8d06c; --toffee-soft: #33432a; --ok: #6cc9d6; --ok-soft: #1d3a40; --link: #e0b07c; --link-soft: #3a2c1c; /* (the same as above) */
  --alarm: #ff7a63;
  --g-s: #c08cff; --g-e: #6cb4f0; --g-a: #5fd38a; --g-b: #a6d65a; --g-c: #f0cc3c; --g-d: #f59a52; --g-f: #ff6b5e; --g-x: #e0607e;
}

/* ---------- 2. base ---------- */
* { box-sizing: border-box; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + var(--top-h, 0px)); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: var(--t-body); line-height: 1.5; font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
img { max-width: 100%; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
/* everything tappable shows the hand (11-28: one rule for the whole site, so nothing's missed) */
:is(a[href], [role="button"], [role="menuitem"], [role="tab"], summary, select, label, input:is([type="checkbox"], [type="radio"], [type="file"]), .tf, .tf-wrap, [data-choice], [data-pick], [data-sheet], [data-person]) { cursor: pointer; }
:is(button, select, input):disabled { cursor: default; }
input, textarea, select { font-family: inherit; } /* not the browser's Arial */
button:focus-visible, label:focus-within { outline: 3px solid var(--toffee); outline-offset: 2px; }
.wrap { max-width: 680px; margin: 0 auto; padding-inline: var(--gutter); }
main { padding-block: var(--s3) 140px; }
h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--t-xl); margin: var(--s5) 0 var(--s2);
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
h2:first-child { margin-top: var(--s1); }
h2 small { font-family: var(--font-body); font-size: var(--t-s); color: var(--muted); }
h3 { font-size: var(--t-m); margin: var(--s4) 0 var(--s1); color: var(--muted); }
.lead { margin: var(--s1) 0 0; color: var(--muted); font-size: var(--t-m); }
/* toolbar buttons appear together once all are in (or after 2 s) */
.toolbar .tools:not(.ready) { visibility: hidden; animation: shown 0s 2s forwards; }
@keyframes shown { to { visibility: visible; } }
@keyframes blink { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* ---------- 3. shared components ---------- */
/* cards */
.card, .step, .note, .scale, .feed-card, .timer, .peek {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l);
}
/* pills */
.chip, .subtabs button, .picks button {
  display: inline-flex; align-items: center; gap: var(--s1); border-radius: var(--r-pill); white-space: nowrap;
}
.chip { height: var(--icon-btn); border: 2px solid var(--toffee); color: var(--toffee); background: transparent; padding: 0 var(--s3); font-weight: 700; font-size: var(--t-m); }
.chip .mono { font-family: var(--font-mono); }
.chip.running { background: var(--toffee); color: var(--surface); }
/* ✏️ floating in the bottom-right corner of a recipe, for Authors (edit.js editButton) */
.edit-float { position: fixed; right: var(--s4); bottom: calc(var(--s4) + 4px + var(--dock-h, 0px) + env(safe-area-inset-bottom, 0px)); z-index: 7;
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--toffee); background: var(--surface); color: var(--toffee); box-shadow: 0 4px 14px rgba(0, 0, 0, .2); display: grid; place-items: center; }
.edit-float svg { width: 22px; height: 22px; }
body:has(> .edit-float)::after { content: ""; display: block; height: 64px; } /* the page's end scrolls clear of it */
/* round icon buttons */
.tool, .help, .hear {
  flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); padding: 0;
}
.tool svg { width: 20px; height: 20px; }
/* popups ("sheets": dom.js openSheet; 11-28, were bottom sheets) */
/* sized to the visible area, so it sits on the keyboard (dom.js) */
.sheet { position: fixed; left: 0; right: 0; top: var(--vv-top, 0px); height: var(--vv-h, 100%); z-index: 20; background: var(--scrim); display: flex; align-items: center; justify-content: center; padding: var(--s4); }
/* sized to fit, up to most of the screen; it scrolls inside */
.sheet-card { position: relative; width: 100%; max-width: 560px; max-height: 100%; overflow-y: auto; background: var(--bg);
  border-radius: 20px; box-shadow: var(--shadow-2); padding: var(--s5) var(--s4) var(--s4); text-align: left; }
/* the sheet's own scroll bar, always shown while it scrolls (dom.js scrollBar); the browser's is hidden */
.sheet-card { scrollbar-width: none; } .sheet-card::-webkit-scrollbar { display: none; }
.sheet-bar { position: absolute; top: 0; right: 3px; width: 6px; z-index: 4; border-radius: 3px; background: var(--line); pointer-events: none; }
.sheet-bar i { position: relative; display: block; width: 100%; border-radius: 3px; background: var(--muted); opacity: .7; pointer-events: auto; cursor: grab; touch-action: none; }
.sheet-bar i::before { content: ""; position: absolute; inset: 0 -8px; } /* a wider grip than it looks */
.sheet-bar[hidden] { display: none; }
/* the title and the buttons stick while it scrolls */
.sheet-card > h2:first-of-type { position: sticky; top: calc(-1 * var(--s5)); z-index: 2; background: var(--bg);
  margin: calc(-1 * var(--s5)) calc(-1 * var(--s4)) 0; padding: var(--s5) var(--s4) var(--s2); }
/* Cancel and Done along the bottom, where a thumb reaches */
.sheet-foot { position: sticky; bottom: calc(-1 * var(--s4)); z-index: 3; display: flex; gap: var(--s3); margin: var(--s4) calc(-1 * var(--s4)) calc(-1 * var(--s4));
  padding: var(--s3) var(--s4) var(--s4); background: var(--bg); border-top: 1px solid var(--line); }
.sheet-foot button { flex: 1; height: 48px; border-radius: var(--r-pill); border: 2px solid var(--toffee); background: transparent; color: var(--toffee); font-size: var(--t-m); font-weight: 700; }
.sheet-foot button[hidden] { display: none; }
.sheet-foot .sheet-ok { background: var(--toffee); color: var(--surface); }
/* sheet layout */
.sheet-card h2 { display: block; }
.sheet-card h2 small { display: block; margin-top: 2px; font-size: var(--t-s); }
.sheet-card h3 { margin: var(--s4) 0 var(--s1); font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.summary { display: flex; gap: var(--s3); margin: var(--s3) 0; padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.summary div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.summary div + div { border-left: 1px solid var(--line); padding-left: var(--s3); }
.summary b { font-size: var(--t-xl); color: var(--toffee); line-height: 1.2; }
.summary div > span { font-size: var(--t-xs); color: var(--muted); }
/* an Author's time, typed in place (timefield.js) */
.tf-wrap { position: relative; display: inline-flex; align-items: center; gap: var(--s2); max-width: 100%; }
.tf { position: relative; z-index: 1; width: 4.6em; max-width: 100%; padding: 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  background: none; font: inherit; color: inherit; outline: none; }
/* an HTML lines field (recipe.js linesHTML) */
.rich ul, .rich ol { margin: var(--s1) 0; padding-left: 1.4em; }
/* Portions' ⓘ and its notes: small, blue, raised like a footnote mark; the tap area reaches past it */
.scale-tips { position: relative; display: inline-grid; place-items: center; width: 20px; height: 20px; margin: -6px 0 0 2px; padding: 0; border: 0; background: none; color: var(--link); cursor: pointer; align-self: flex-start; vertical-align: super; }
.scale-tips::after { content: ""; position: absolute; inset: -10px; }
.scale-tips svg { width: 14px; height: 14px; }
.ing-top .scale-tips { margin-left: calc(2px - var(--s2)); } /* ⓘ close to the Portions word */
#edTips { margin-right: auto; } /* the editor's ⓘ beside its word, the stepper pushed right */
.sheet-card .rt[data-lines] { min-height: 6em; margin-top: var(--s3); } /* the rich box in a sheet (Explanation, tips) */
p.gap { margin: 0; height: .6em; } /* a blank line typed between two (recipe.js blocksHTML) */
.tips-list { margin: var(--s3) 0 0; padding-left: 1.2em; font-size: var(--t-m); line-height: 1.45; } .tips-list li + li { margin-top: var(--s2); }
/* • and 1. lists and lines inside a step, a note or a tip (recipe.js blocksHTML) */
:is(.body, .note, .tip, #peek) > :is(.tips-list, p) { margin: var(--s1) 0 0; font-size: inherit; }
:is(.body, .note, .tip, #peek) > :is(.tips-list, p):first-child { margin-top: 0; }
:is(.body, .note, .tip, #peek) .tips-list li + li { margin-top: var(--s1); }
.tf-edit { display: grid; flex: none; width: 22px; height: 22px; color: var(--muted); } /* (kept whole when three boxes share the row) */
.tf-edit svg { width: 100%; height: 100%; }
label.tf-wrap:focus-within { outline: none; } /* underlined instead */
.summary [data-grade] { color: var(--grade); }
.tf:focus { border-bottom-color: var(--toffee); border-bottom-style: solid; }
.tf.bad { border-bottom-color: var(--alarm); }
.tf.fresh { color: var(--muted); } /* the time as it was: the first digit typed starts over (timefield.js) */
.money { color: var(--toffee); font-weight: 700; }
/* tables in sheets (calories, cost) */
table.kcal { width: 100%; border-collapse: collapse; font-size: var(--t-m); }
table.kcal td { padding: 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.kcal td:last-child { text-align: right; font-weight: 700; color: var(--toffee); padding-left: var(--s3); }
table.kcal small { display: block; color: var(--muted); font-size: var(--t-xs); }
table.kcal tr.opt { color: var(--muted); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 8;
  max-width: calc(100% - 2 * var(--s4)); padding: 10px var(--s4); border-radius: var(--r-m); background: var(--ink); color: var(--bg); font-size: var(--t-s); }

/* ---------- 4. screens ---------- */
/* header */
header.hero { padding-block: var(--s2) var(--s4); }
/* top bar stays pinned; what sticks under it uses --top-h */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 7; background: var(--bg); padding-block: var(--s3) var(--s2); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.tools { display: flex; gap: var(--s2); }
@media (max-width: 420px) { .toolbar { gap: 6px; } .toolbar .tools, .toolbar-left { gap: var(--s1); } .toolbar .tool { width: 38px; height: 38px; } .toolbar .pet-mini { height: 38px; } } /* the book's bar fits a phone */
.tool { width: 40px; height: 40px; color: var(--muted); }
.tool[aria-pressed="true"] { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.tool.avatar { border-color: var(--toffee); background: var(--toffee-soft); color: var(--toffee); font-weight: 700; font-size: var(--t-m); overflow: hidden; }
.tool.avatar img { width: 100%; height: 100%; object-fit: cover; }
/* sign-in buttons */
.sign-in { display: flex; align-items: center; justify-content: center; gap: var(--s3); min-height: var(--tap); margin: var(--s3) 0;
  border: 2px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none; }
.sign-in.google { background: #fff; color: #1f1f1f; border-color: #747775; }
.tool.slothei { font-size: var(--t-l); text-decoration: none; line-height: 1; }
.eyebrow { font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dates { font-size: var(--t-s); color: var(--muted); margin: calc(-1 * var(--s3)) 0 var(--s3); }
.dates:empty { display: none; }
/* ✍️ "By Kevin Tran": the recipe page, above its dates; a book card, a tap filters by them */
.by { margin: calc(-1 * var(--s3)) 0 var(--s1); font-size: var(--t-s); font-weight: 700; color: var(--ink); }
.by a { color: var(--link); text-decoration: none; }
.by + .dates { margin-top: 0; }
/* the editor's By row (editor.js byRow) */
.ed-by { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); }
.ed-by-l { color: var(--muted); font-size: var(--t-s); font-weight: 700; }
.ed-by .chip { height: 32px; padding-inline: var(--s3); font-size: var(--t-s); display: inline-flex; align-items: center; gap: 4px; }
.ed-by .by-chip { background: var(--toffee-soft); border-color: transparent; color: var(--ink); } .ed-by .by-chip .g { font-size: .8em; color: var(--muted); }
.ed-by .by-add { border-style: dashed; }
.rc-by { display: block; margin-top: 2px; font-size: var(--t-s); color: var(--muted); }
.rc-by .crumb-link { font-size: inherit; font-weight: 700; color: var(--ink); letter-spacing: 0; text-transform: none; padding: 0 2px; border: 0; background: none; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: var(--t-xxl); line-height: 1.1; margin: var(--s1) 0 var(--s4); text-wrap: balance; }
/* header tiles: the rated row, then a slimmer facts row */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.stats:empty { display: none; }
.stats.facts { margin-top: 6px; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: var(--s2) var(--s1);
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); text-align: center; }
.stat-icon { font-style: normal; font-size: var(--t-m); line-height: 1; height: var(--t-m); }
.stat-value { font-size: var(--t-m); line-height: 1.15; color: var(--ink); overflow-wrap: anywhere; }
.stat-label { font-size: var(--t-xs); color: var(--muted); line-height: 1.2; }
.stat [data-grade] { color: var(--grade); white-space: nowrap; }

/* sticky tab bar */
.bar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--top-h, 0px)); z-index: 5; background: var(--bg); padding-block: var(--s2) 10px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; border: var(--s1) solid var(--line); border-radius: var(--r-m); background: var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button[hidden] { display: none; }
/* (11-28) words never shrink; a row too wide for the phone scrolls sideways, like the sub-tabs */
.tabs button { flex: 1 0 auto; white-space: nowrap; border: 0; background: transparent; padding: 9px var(--s3); border-radius: 9px; font-weight: 700; font-size: var(--t-s); color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.count { font-size: var(--t-xs); font-weight: 400; margin-left: var(--s1); opacity: .8; }
/* sub-tabs: pinned, scroll sideways */
.subtabs { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--top-h, 0px) + var(--bar-h, 0px)); z-index: 4; background: var(--bg);
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 6px; padding-block: var(--s2); }
.subtabs::-webkit-scrollbar { display: none; }
/* every sideways row (pills, the book's filters, the timers): a ‹ or › at an edge with more past it; a tap scrolls
   (tabs.js). Drawn by the row itself, pinned to its edge, taking no room (negative margin = its width + the gap) */
:is(.tabs, .subtabs, .filters, .dock .wrap) { --arrow: 44px; --arrow-bg: var(--bg); --arrow-gap: 6px; }
.dock .wrap { --arrow-gap: var(--s2); }
.bar .tabs { --arrow-bg: var(--line); --arrow-gap: var(--s1); }
:is(.tabs, .subtabs, .filters, .dock .wrap).more-r::after, :is(.tabs, .subtabs, .filters, .dock .wrap).more-l::before { content: "›"; position: sticky; z-index: 1; flex: none; box-sizing: border-box; width: var(--arrow); align-self: stretch;
  display: grid; align-items: center; justify-items: end; padding-right: 11px; font-weight: 800; font-size: var(--t-l); line-height: 1; color: var(--toffee); cursor: pointer;
  background: radial-gradient(circle at calc(100% - 16px) 50%, var(--surface) 13px, var(--line) 13.5px 15px, transparent 15.5px), linear-gradient(to right, transparent, var(--arrow-bg) 14px); }
:is(.tabs, .subtabs, .filters, .dock .wrap).more-r::after { right: 0; margin-left: calc(-1 * var(--arrow) - var(--arrow-gap)); }
:is(.tabs, .subtabs, .filters, .dock .wrap).more-l::before { content: "‹"; order: -1; left: 0; margin-right: calc(-1 * var(--arrow) - var(--arrow-gap)); justify-items: start; padding: 0 0 0 11px;
  background: radial-gradient(circle at 16px 50%, var(--surface) 13px, var(--line) 13.5px 15px, transparent 15.5px), linear-gradient(to left, transparent, var(--arrow-bg) 14px); }
.subtabs button { flex: none; border: 2px solid var(--line); background: transparent; padding: 6px var(--s3); font-weight: 700; font-size: var(--t-s); color: var(--muted); }
.subtabs button[aria-selected="true"] { background: var(--toffee); border-color: var(--toffee); color: var(--surface); }

/* ingredients: sub-tabs and a slim Portions pinned, the list fading under them */
.ing-top { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--top-h, 0px) + var(--bar-h, 0px)); z-index: 4; background: var(--bg); padding-block: var(--s2); }
.ing-top::after { content: ""; position: absolute; inset: 100% 0 auto; height: var(--s4); background: linear-gradient(var(--bg), transparent); pointer-events: none; }
.ing-top .scale { padding: var(--s1) var(--s2) var(--s1) var(--s3); }
.ing-top .scale-row { flex-wrap: nowrap; gap: var(--s2); }
.ing-top .scale-label { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: var(--s2); }
.ing-top .stepper button { width: var(--icon-btn); height: var(--icon-btn); font-size: var(--t-xl); }
.ing-top .stepper input { width: 52px; padding: 2px 0; font-size: var(--t-l); }
.scale { padding: var(--s2) var(--s3); display: flex; flex-direction: column; gap: 10px; }
.scale-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.scale-label { display: flex; flex-direction: column; min-width: 0; }
.scale-label strong { font-size: var(--t-m); }
.scale-label span { font-size: var(--t-s); color: var(--toffee); font-weight: 700; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 40px; height: 40px; border-radius: var(--r-m); border: 2px solid var(--toffee); background: transparent; color: var(--toffee);
  font-size: 26px; font-weight: 700; line-height: 1; display: grid; place-items: center; }
.stepper button:disabled { opacity: .35; }
.stepper input { width: 64px; padding: var(--s1) 0; border: 2px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink);
  text-align: center; font-weight: 700; font-size: var(--t-xl); -moz-appearance: textfield; appearance: textfield; }
.stepper input:focus { outline: none; border-color: var(--toffee); }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ing { display: flex; gap: var(--s3); align-items: flex-start; padding: 10px var(--s1); border-bottom: 1px solid var(--line); cursor: pointer; }
.ing input { position: absolute; opacity: 0; pointer-events: none; }
.box { flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 7px; border: 2px solid var(--muted); display: grid; place-items: center; }
.box svg { width: 16px; height: 16px; opacity: 0; }
.ing .qty { font-weight: 700; color: var(--toffee); white-space: nowrap; }
.ing .what { min-width: 0; }
.ing .opt { font-size: var(--t-s); color: var(--muted); }
/* grocery list */
h3.aisle { margin: var(--s4) 0 0; font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--ok); }
.ing.grocery .what { flex: 1; display: flex; flex-direction: column; }
.ing.grocery .what small { font-size: var(--t-s); color: var(--muted); }
.ing.grocery .what em { font-style: normal; font-weight: 700; font-size: var(--t-s); color: var(--alarm); }
.ing .price { flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.ing .price b { color: var(--toffee); }
.ing .price small { font-size: var(--t-xs); color: var(--muted); }
.ing.is-done .price b, .ing.grocery.is-done .what b { color: var(--done); text-decoration: line-through; }
.ing.grocery .what small.from { font-size: var(--t-xs); }
.ing.grocery .from a { display: block; padding-block: 3px; color: var(--link); font-size: var(--t-s); } /* one recipe a line */
.ing.grocery .from .sep { display: none; }
.ing.grocery.is-done .from a { color: var(--done); }
/* only the box checks a line; the name shows the store's picture of the package (grocery.js) */
.ing.grocery { position: relative; cursor: default; }
.ing.grocery .tick { flex: none; cursor: pointer; padding: 6px; margin: -6px; }
.g-pname { align-self: flex-start; border: 0; background: none; padding: 0; color: inherit; font: inherit; text-align: left; cursor: zoom-in; }
.g-pic { display: none; position: absolute; z-index: 6; top: calc(100% - 6px); left: 44px; padding: var(--s2); border: 1px solid var(--line);
  border-radius: var(--r-m); background: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.g-pic img { display: block; width: 160px; height: 160px; object-fit: contain; }
.ing.show-pic .g-pic { display: block; }
@media (hover: hover) { .g-pname:hover + .g-pic { display: block; } }
/* 🛒 Shopping List (list.js, shoplist.js): recipe rows (title, − n +, ✕), the gray + Add Recipe, the pick sheet */
.tool.cart-link { text-decoration: none; }
.tool.cart-link.has { width: auto; display: flex; gap: 4px; padding: 0 10px; border-radius: var(--r-pill); border-color: var(--toffee); color: var(--toffee); }
.cart-link .n { font-weight: 700; font-size: var(--t-s); }
.cart-link .n:empty { display: none; }
.shop-recipes, .pick-recipes { list-style: none; margin: 0 0 var(--s3); padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.shop-recipes li[data-id], .pick-recipes li { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s2) var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.shop-recipes a { flex: 1; min-width: 0; font-weight: 700; color: var(--link); text-decoration: none; }
.shop-recipes .stepper button, .pick-recipes .stepper button { width: var(--icon-btn); height: var(--icon-btn); font-size: var(--t-xl); }
.shop-recipes .stepper input, .pick-recipes .stepper input { width: 46px; padding: 2px 0; font-size: var(--t-l); }
.shop-recipes .x { flex: none; width: var(--icon-btn); height: var(--icon-btn); border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: var(--t-l); }
.shop-add { display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--tap); padding: 0 14px; border: 1px dashed var(--field-edge); border-radius: var(--r-m);
  background: var(--surface); color: var(--muted); font: inherit; font-size: var(--t-m); font-weight: 600; text-align: left; }
.shop-add i { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--toffee); color: var(--surface); display: grid; place-items: center; font-style: normal; font-size: 20px; font-weight: 700; }
.all-got { margin: var(--s4) 0; text-align: center; font-weight: 700; color: var(--ok); }
#listTabs { margin-top: var(--s3); }
.shop-end { display: flex; justify-content: center; gap: var(--s4); }
.shop-end .uncheck { margin-inline: 0; }
.pick-sheet .tpl-q { margin-top: var(--s3); }
.pick-recipes { margin-top: var(--s3); }
.pick-recipes li { min-height: var(--tap); }
.pick-recipes .pick { flex: 1; min-width: 0; align-self: stretch; text-align: left; border: 0; background: none; padding: 0; color: var(--ink); font: inherit; font-size: var(--t-m); }
.pick-recipes li:has(.pick[aria-pressed="true"]) { border-color: var(--toffee); background: var(--toffee-soft); }
.pick-recipes .pick[aria-pressed="true"] { font-weight: 700; }
.pick-recipes li:has(.pick[aria-pressed="false"]) .stepper { display: none; }
.ing.is-done .box { background: var(--ok); border-color: var(--ok); }
.ing.is-done .box svg { opacity: 1; }
.ing.is-done .what, .ing.is-done .qty { color: var(--done); text-decoration: line-through; }

/* prep and steps: one card per item; current outlined, done faded */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.step { padding: var(--s3) var(--s3) var(--s3) 10px; display: grid; grid-template-columns: var(--icon-btn) minmax(0, 1fr); gap: 0 var(--s3); }
.step.is-current { border-color: var(--toffee); box-shadow: 0 0 0 1px var(--toffee) inset; background: linear-gradient(var(--toffee-soft), var(--toffee-soft)) 0 0 / 4px 100% no-repeat, var(--surface); }
.step.is-done { opacity: .55; }
.step.flash { animation: flash 1.6s; }
@keyframes flash { 0%, 60% { box-shadow: 0 0 0 4px var(--link); } }
.step .num { width: var(--icon-btn); height: var(--icon-btn); border-radius: 50%; border: 0; display: grid; place-items: center;
  font-weight: 700; font-size: var(--t-m); background: var(--toffee-soft); color: var(--toffee); }
.step.is-current .num { background: var(--toffee); color: var(--surface); }
.step.is-done .num { background: var(--ok); color: #fff; }
.step .body { min-width: 0; font-size: var(--t-body); line-height: 1.5; padding-top: 4px; }
.step.is-done .body { text-decoration: line-through; text-decoration-color: var(--done); }
.step .body .ref, .note .ref, .tip .ref { font-weight: 700; } /* the editor's bold */
.step .body .amt { color: var(--toffee); font-weight: 700; white-space: nowrap; }
.step .ptitle { display: block; font-size: var(--t-m); color: var(--muted); font-weight: 700; }
.step .tools { grid-column: 2; display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2); }
.step .aside { display: flex; gap: 6px; margin-left: auto; }
.help { width: var(--icon-btn); height: var(--icon-btn); border-color: var(--toffee); background: transparent; color: var(--toffee); font-weight: 700; font-size: var(--t-m); }
.help[aria-expanded="true"] { background: var(--toffee); color: var(--surface); }
.help.why { border-color: var(--muted); color: var(--muted); }
.help.why[aria-expanded="true"] { background: var(--muted); color: var(--surface); }
.help.remind { border-color: var(--alarm); color: var(--alarm); font-size: var(--t-body); }
.help.remind[aria-expanded="true"] { background: var(--alarm); color: var(--surface); }
.help svg { width: 18px; height: 18px; }
.help.done { border-color: var(--ok); color: var(--ok); }
.help.done[aria-pressed="true"] { background: var(--ok); color: #fff; }
.help.done svg { width: 22px; height: 22px; stroke-width: 2.5; }
.step .tip { grid-column: 2; margin-top: var(--s2); padding: 10px var(--s3); border-radius: 10px; background: var(--toffee-soft); font-size: var(--t-m); line-height: 1.45; }
.step .tip + .tip { margin-top: 6px; }
.step .tip strong { display: block; margin-bottom: 2px; }
.step .tip ol { margin: var(--s1) 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.tip-pic { display: block; width: 100%; max-width: 240px; margin: 6px 0 2px; border-radius: var(--r-s); }
.rt-pic { display: inline-block; vertical-align: middle; } .rt-pic img { display: block; height: 56px; width: auto; border-radius: var(--r-s); border: 1px solid var(--line); }
.pic-up { margin-bottom: var(--s3); cursor: pointer; } .pic-up svg { width: 18px; height: 18px; }
.pic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.pic-pick { padding: 4px; border: 2px solid var(--line); border-radius: var(--r-m); background: var(--surface); } .pic-pick img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
.pic-pick[aria-pressed="true"] { border-color: var(--toffee); box-shadow: inset 0 0 0 1px var(--toffee); }
.step .tip.whytip { background: transparent; border: 1px dashed var(--muted); }
.step .tip.remindtip { background: transparent; border: 2px solid var(--alarm); }
/* 📚 Shared tip (edsteps.js pickShared) */
.lib-list { display: grid; gap: var(--s2); }
.lib-row { display: flex; align-items: center; gap: var(--s2); } .lib-row .lib-pick { flex: 1; min-width: 0; }
/* under a tip in the editor: 📚 Shared Tip · ✂️ Unlink, or 📚 Share (edsteps.js shareRow) */
.n-share-row { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2); }
.n-shared { color: var(--muted); font-size: var(--t-xs); font-weight: 700; }
.n-share-row .chip { height: 30px; min-height: 0; padding-inline: var(--s3); font-size: var(--t-s); }
.lib-pick { display: grid; gap: 2px; text-align: left; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); font: inherit; }
.lib-pick span { color: var(--muted); font-size: var(--t-s); }
/* a Storage section's heading (notes.js; the editor's: .ed-sec), as typed, no capitals */
.note-h { margin: var(--s4) 0 var(--s2); font-size: var(--t-l); font-weight: 700; color: var(--ink); }
.note-h:first-child, .subtabs + .note-h { margin-top: var(--s2); }
.ed-sec { display: flex; align-items: center; gap: var(--s1); margin: var(--s4) 0 var(--s2); }
.ed-notewrap:first-child .ed-sec, .ed-notewrap[hidden] + .ed-notewrap .ed-sec { margin-top: var(--s2); }
.ed-sec .n-sname-box { flex: 1; min-width: 0; font-size: var(--t-l); }
.ed-sec .n-sec-x { margin-left: auto; position: static; }
/* in recipe text */
.iref { cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; font-weight: 700; color: var(--link);
  text-decoration: underline dotted; text-underline-offset: 3px; }
[data-go] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.warn { color: var(--alarm); }
/* hover label saying what red means */
@media (hover: hover) {
  .warn { position: relative; }
  .warn:hover::after { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); z-index: 5;
    padding: 2px var(--s2); border-radius: var(--r-s); background: var(--ink); color: var(--bg); font-size: var(--t-xs); font-weight: 700;
    letter-spacing: 0; white-space: nowrap; pointer-events: none; }
  .warn:hover::after { content: "Warning"; }
}
/* press-and-hold preview */
/* a link's note, beside the link (jump.js, placed by menu.js placeBy) */
.peek { position: fixed; z-index: 30; width: min(420px, calc(100vw - 16px)); max-height: 60vh; overflow-y: auto; padding: 14px var(--s4); border: 2px solid var(--link); box-shadow: var(--shadow-2); font-size: var(--t-m); line-height: 1.45; }
.peek small { display: block; color: var(--muted); font-size: var(--t-xs); }
.peek strong { display: block; }

/* notes */
.notes { display: flex; flex-direction: column; gap: var(--s3); }
.note { padding: 14px var(--s4); }
.note strong { display: block; margin-bottom: 2px; }
.src { font-size: var(--t-s); color: var(--muted); }
div.src { margin-top: var(--s4); } div.src > span { display: block; font-weight: 700; }
div.src ul { margin: 2px 0 0; padding-left: 1.2em; } div.src li + li { margin-top: 2px; }
.src a { color: var(--toffee); }
/* the end card, after the last step (checklist.js) */
.end-card { margin: var(--s4) 0; padding: var(--s5) var(--s4); border: 2px solid var(--toffee); border-radius: var(--r-l); background: var(--surface); text-align: center; }
.end-msg { margin: 0 0 var(--s4); font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.end-card .end-rate { height: 48px; padding-inline: var(--s5); border: 0; background: var(--toffee); color: var(--surface); }
.end-card .end-msg:last-child { margin: 0; }
.nutri .nu { padding: 2px 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--toffee); text-align: left; } /* Nutrition: a tap, the breakdown */
/* ↺ Uncheck all (uncheck.js) */
.uncheck { display: block; margin: var(--s4) auto 0; padding: var(--s1) var(--s3); border: 0; background: none; color: var(--muted); font-size: var(--t-s); font-weight: 700; cursor: pointer; }
/* toast Undo; confirm popup (dom.js) */
.toast-undo { margin-left: var(--s2); padding: 0 var(--s1); border: 0; background: none; color: var(--toffee); font: inherit; font-weight: 700; cursor: pointer; }
.toast:has(.toast-undo) { display: flex; align-items: center; }
.confirm-bg { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: var(--s4); background: rgb(0 0 0 / .4); }
.confirm { width: min(340px, 100%); padding: var(--s4); border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow-2); text-align: center; }
.confirm p { margin: 0 0 var(--s4); font-size: var(--t-m); font-weight: 700; }
.confirm-row { display: flex; gap: var(--s2); justify-content: center; }
.confirm-row .chip { flex: none; justify-content: center; min-width: 6.5em; padding-inline: var(--s4); } /* sized to the word (11-27) */
.chip.danger { background: var(--alarm); border-color: var(--alarm); color: #fff; }

/* timers: dock at the bottom */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--bg); border-top: 1px solid var(--line); }
.dock .wrap { display: flex; gap: var(--s2); overflow-x: auto; }
.timer { flex: none; min-width: min(330px, calc(100vw - 2 * var(--s4))); display: flex; align-items: stretch; gap: 10px; padding: 10px 10px 10px 14px; border: 2px solid var(--toffee); }
.timer .tmain { flex: 1; min-width: 0; }
.timer .l { font-size: var(--t-s); color: var(--muted); line-height: 1.2; }
.timer .l b { color: var(--ink); }
.timer .tstatus { font-weight: 700; color: var(--alarm); font-size: var(--t-m); }
.timer .t { font-family: var(--font-mono); font-weight: 700; font-size: 26px; }
.timer .t small { font-family: var(--font-body); font-size: var(--t-xs); font-weight: 400; color: var(--muted); margin-left: var(--s2); }
.tbar { position: relative; height: 6px; margin-top: 6px; border-radius: 3px; background: var(--line); }
.tbar span { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--toffee); }
.tbar i { position: absolute; top: -3px; width: 2px; height: var(--s3); background: var(--ink); }
.timer .tbtns { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.timer .tbtns button { min-width: var(--tap); height: 40px; padding: 0 10px; border: 0; border-radius: 10px; background: var(--toffee-soft); font-weight: 700; }
.timer .tbtns button.ok { background: var(--ok); color: var(--surface); }
.timer.checking { border-color: var(--ok); }
.timer.checking .t, .timer.checking .tstatus { color: var(--ok); }
.timer.ringing { border-color: var(--alarm); animation: pulse 1s infinite; }
.timer.ringing .t { color: var(--alarm); }
@keyframes pulse { 50% { background: var(--toffee-soft); } }

/* sheets: rows, ratings */
.meals { list-style: none; margin: 0; padding: 0; }

.picks { display: flex; flex-wrap: wrap; gap: var(--s2); }
.flag-picks { display: flex; flex-wrap: wrap; gap: var(--s2); }
.picks button svg { width: 18px; height: 18px; color: var(--alarm); fill: currentColor; margin-right: var(--s1); }
.picks button { min-width: 52px; justify-content: center; padding: var(--s2) 14px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; }
.picks button[aria-pressed="true"] { background: var(--toffee); border-color: var(--toffee); color: var(--surface); }
.picks button[data-grade] { border-color: var(--grade); color: var(--grade); }
.picks button[data-grade][aria-pressed="true"] { background: var(--grade); color: var(--bg); }
/* Taste: ten stars (two rows; one in Filters); Difficulty: two rows of picks */
.stars { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; }
.stars button { display: flex; flex-direction: column; align-items: center; padding: var(--s1) 0; border: 0; background: none; color: var(--muted); font-size: var(--t-xs); font-weight: 700; }
.stars b { font-size: var(--t-xxl); line-height: 1.1; color: var(--line); }
.stars .on b { color: var(--toffee); }
.stars button[aria-pressed="true"] { color: var(--toffee); }
.two-rows h3 { text-align: left; }
[data-grade="S"] { --grade: var(--g-s); } [data-grade="A"], [data-grade="Easy"] { --grade: var(--g-a); }
[data-grade="Easy-Medium"] { --grade: var(--g-b); } [data-grade="C"], [data-grade="Medium"] { --grade: var(--g-c); }
[data-grade="D"], [data-grade="Medium-Hard"] { --grade: var(--g-d); } [data-grade="F"], [data-grade="Hard"] { --grade: var(--g-f); }
[data-grade="Backbreaking"] { --grade: var(--g-x); } [data-grade="Super Easy"] { --grade: var(--g-e); }
/* a difficulty's word with its points */
.word { display: block; font-size: var(--t-xs); font-weight: 700; line-height: 1.2; }
.word-by { margin-left: 4px; font-size: var(--t-xs); font-weight: 700; }
/* Taste tile's five stars in a row (11-27; was a ring of ten); every icon in the row gets the same height, so the
   numbers line up */
.stats .stat-icon { display: flex; align-items: center; justify-content: center; height: 40px; }
.star-row { display: block; font-size: 11px; line-height: 1; white-space: nowrap; }
:is(.stat-icon, .rc-stats .m) .star-row { display: inline-flex; gap: 1px; font-size: 15px; }
/* stars are a star-shaped mask (DM Sans has no ★) */
.star, .star-row b, .stars b, .s5 b { display: inline-block; width: 1em; height: 1em; vertical-align: -0.125em; background: currentColor;
  -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; }
.star-row b { background: linear-gradient(90deg, var(--grade, var(--line)) var(--f), var(--line) var(--f)); }
svg.g { vertical-align: -0.125em; }
.picks button small { margin-left: 6px; font-size: var(--t-xs); font-weight: 600; opacity: .85; } /* a difficulty's points */

/* Hamagotchi */
.pet-mini { flex: none; display: flex; align-items: center; gap: 6px; padding: 2px 10px 2px 4px; height: 40px; border: 2px solid var(--line); border-radius: var(--r-pill); background: var(--surface); }
.pet-art { display: inline-block; line-height: 0; animation: bob 1.2s steps(2) infinite; }
.pet-art.pet-hungry { animation-duration: 2.4s; }
.pet-art.pet-egg { animation: wobble 2s steps(2) infinite; }
.pet-art.big { display: block; width: fit-content; margin: var(--s2) auto; }
@keyframes bob { 50% { transform: translateY(-2px); } }
@keyframes wobble { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.meter { display: block; width: 44px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--ok); }
.sheet-card .meter { width: 160px; height: 10px; margin: 0 auto var(--s2); border-radius: 5px; }
.pet-name { display: block; margin: 0 auto; width: 70%; text-align: center; font-family: var(--font-display); font-size: 28px; border: 0; border-bottom: 2px dashed var(--line); background: transparent; color: var(--ink); }
.pet-status { margin: var(--s2) 0; color: var(--muted); text-align: center; }
.meals li { display: flex; justify-content: space-between; gap: var(--s3); padding: 10px var(--s1); border-bottom: 1px solid var(--line); }
.meals small { color: var(--muted); }
.feed-card { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-top: 14px; padding: 14px var(--s4); border: 2px dashed var(--toffee); }
.feed-card.done { border-style: solid; border-color: var(--ok); }
.feed-card p { margin: 0; flex: 1; min-width: 0; font-weight: 700; }
.feed-card .food { font-size: 34px; line-height: 1; }
.feed-card .food-img { width: 1.3em; height: 1.3em; }
.feed-card.eating .food { animation: eat 2.4s steps(4) forwards; }
@keyframes eat { to { transform: scale(0); opacity: 0; } }
.feed-card .done-btn { margin-left: auto; padding: 10px 26px; font-size: 18px; background: var(--toffee); color: var(--surface); }
.food-img { width: 1em; height: 1em; image-rendering: pixelated; vertical-align: -0.12em; }

/* unsent save: a dot on your photo (data.js) */
#account { position: relative; }
[data-unsent] #account::after { content: ""; position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--toffee); border: 2px solid var(--bg); }
.sign-out { display: inline-flex; margin-top: var(--s2); text-decoration: none; }
/* a sheet title with a button beside it (clear of the ✕): 📊 Compare */
.set-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-right: calc(2 * 40px + var(--s2)); }
.set-head .vcap { margin: 0; flex: none; }
.mr-open { display: block; width: 100%; min-height: var(--tap); margin-top: var(--s4); padding: var(--s2) 0; border: 0; border-top: 1px solid var(--line); background: none; color: var(--link); font: inherit; font-size: var(--t-m); font-weight: 700; text-align: left; } /* See My Ratings, under the stars */
/* store pick and store sheet */
.store-pick { display: block; margin: var(--s2) 0; border: 0; background: none; padding: 0; text-align: left; font-size: var(--t-s); color: var(--muted); }
button.store-pick { color: var(--link); }
.zip { display: flex; gap: var(--s2); }
.zip input { flex: 1; min-width: 0; }
ul.stores { list-style: none; margin: var(--s3) 0 0; padding: 0; }
ul.stores button { width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: var(--s3) 0; font-size: var(--t-m); color: var(--ink); }

/* segmented control (a row of tabs in a pill) */
.seg { display: flex; gap: var(--s1); padding: var(--s1); border-radius: var(--r-m); background: var(--line); margin: 0 0 var(--s3); }
.seg button { flex: 1; border: 0; background: transparent; padding: var(--s2); border-radius: var(--r-s); font-weight: 700; font-size: var(--t-s); color: var(--muted); }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.sheet-card h4 { margin: var(--s3) 0 var(--s1); font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- recipe book (index.html) ---------- */
.toolbar-left { display: flex; align-items: center; gap: var(--s2); }
.back { display: grid; place-items: center; color: var(--link); }
/* the logo (11-28): lowercase "tiny sous chef", "tiny" in toffee, in the title font */
.logo { display: inline-flex; align-items: center; gap: .24em; min-height: var(--tap); font-family: var(--font-display); font-size: 22px; line-height: 1; color: var(--ink); text-decoration: none; white-space: nowrap; }
.logo b { font-weight: inherit; color: var(--toffee); }
.book-hero h1 { margin-bottom: var(--s3); }
.search input { width: 100%; height: var(--tap); padding: 0 var(--s4); border: 2px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-m); }
.search input:focus { outline: none; border-color: var(--toffee); }
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-top: var(--s3); padding-bottom: 2px; }
.filters::-webkit-scrollbar { display: none; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--line); background: transparent; border-radius: var(--r-pill); padding: 6px var(--s3); font-weight: 700; font-size: var(--t-s); color: var(--muted); white-space: nowrap; }
.pill[aria-pressed="true"] { background: var(--toffee); border-color: var(--toffee); color: var(--surface); }
/* active filter bubbles */
.active { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s2); }
.pill.bubble { border-color: var(--toffee); background: var(--toffee-soft); color: var(--ink); }
.pill.bubble i { font-style: normal; color: var(--toffee); margin-left: 2px; }
.pill.bubble [data-grade] { color: var(--grade); }
.pill.clear { border-color: var(--line); color: var(--muted); }
.ing-find { margin-bottom: var(--s2); }
/* ingredient search results */
.ing-list { display: flex; flex-direction: column; }
.ing-list button { display: flex; justify-content: space-between; padding: var(--s2) var(--s3); border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; }
.ing-list button[aria-pressed="true"] { color: var(--toffee); font-weight: 700; }
.ing-list button[aria-pressed="true"]::before { content: "✓"; margin-right: var(--s2); }
.ing-list button[aria-pressed="true"] small { margin-left: auto; }
.ing-list small { color: var(--muted); font-weight: 400; }
.cards { list-style: none; margin: var(--s3) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.recipe-card { position: relative; overflow: hidden; transition: transform .12s ease, filter .12s ease; }
/* pressed (not via an inner button), and while opening */
.recipe-card:has(> a:active):not(:has(button:active)), .recipe-card.opening { transform: scale(.97); filter: brightness(.94); }
.recipe-card > a { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.rc-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg); }
span.rc-photo { aspect-ratio: 3 / 1; border-bottom: 1px dashed var(--line); } /* the editor's empty photo spot */
.rc-camera { position: absolute; top: var(--s2); right: var(--s2); }
.crumb-link { border: 1px solid var(--line); border-radius: var(--r-pill); background: none; padding: 1px var(--s2); font: inherit; letter-spacing: inherit;
  text-transform: inherit; color: inherit; transition: transform .1s; }
.crumb-link:active { transform: scale(.92); background: var(--toffee-soft); }
/* every button shrinks a little while pressed */
:is(button, a.tool, a.chip, label.chip, [role="button"], .tool):not(:disabled) { transition: scale .08s ease, opacity .08s ease; }
:is(button, a.tool, a.chip, label.chip, [role="button"], .tool):not(:disabled):active { scale: .93; opacity: .75; }
.eyebrow .draft { color: var(--toffee); font-weight: 700; }
.crumb-pair { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-pill); overflow: hidden; vertical-align: middle; }
.crumb-pair .crumb-link { border: 0; border-radius: 0; }
.crumb-pair .crumb-link:first-child { padding-right: 0; } .crumb-pair .crumb-link:last-child { padding-left: .35em; } /* one word space between them */
.crumb-link[aria-pressed="true"] { border-color: var(--toffee); background: var(--toffee-soft); color: var(--ink); }
/* a card tag's new filter bubble pops */
.pill.bubble.new { animation: pop .5s ease-out; }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.12); } }
.rc-dates { font-size: var(--t-xs); color: var(--muted); }
.recipe-card > .share { position: absolute; bottom: var(--s3); right: var(--s3); }
.recipe-card > .fav { position: absolute; bottom: var(--s3); right: calc(var(--s3) + var(--tap) + var(--s2)); }
.fav[aria-pressed="true"] { color: var(--alarm); }
.fav[aria-pressed="true"] svg { fill: currentColor; }
.share-row { display: flex; gap: var(--s2); }
#share { display: flex; justify-content: flex-end; margin-bottom: var(--s2); } /* ♥ screen-on share, above the title */
#crumb:not(:empty) + h1 { margin-top: var(--s2); }
.chip.vis::after { content: " ▾"; }
.recipe-photo { position: relative; overflow: hidden; border-radius: var(--r-l); margin-bottom: var(--s3); }
.recipe-photo span.rc-photo { border: 1px dashed var(--line); border-radius: var(--r-l); }
.photo-foot { position: absolute; left: var(--s3); right: var(--s3); bottom: var(--s3); display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s2); }
#photo #crumb { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: var(--s1); margin: 0; font-size: 0; } /* hides the dots between tags */
#photo #share { flex: none; margin: 0; }
#photo :is(#share, .photo-top) :is(button, a) { background: rgb(255 255 255 / .92); color: #2b211c; }
.photo-top { position: absolute; top: var(--s3); right: var(--s3); display: flex; gap: var(--s2); }
#photo #crumb span { padding: 2px var(--s2); border-radius: 999px; background: rgb(255 255 255 / .92); color: #2b211c; font-size: var(--t-xs); font-weight: 700; }
.rc-body { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s4); }
.rc-title { font-family: var(--font-display); font-size: var(--t-xl); line-height: 1.15; }
/* card numbers: a grid, three a row */
.rc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: var(--s2); }
.rc-stats .st { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; min-width: 0;
  padding: var(--s2) var(--s1); border: 1px solid var(--line); border-radius: var(--r-m); }
.rc-stats .m { display: grid; place-items: center; height: 40px; font-size: var(--t-m); }
.rc-stats .v { max-width: 100%; font-size: var(--t-s); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-stats .l { font-size: var(--t-xs); color: var(--muted); white-space: nowrap; }
.rc-stats .v [data-grade] { color: var(--grade); }
.recipe-card:has(> .share, > .fav) .rc-body { padding-bottom: calc(var(--tap) + var(--s4)); } /* room for heart and share */
.photo-actions { display: flex; gap: var(--s2); }
.photo-actions .remove { border-color: var(--alarm); color: var(--alarm); }
.uses { font-size: var(--t-s); color: var(--ok); font-weight: 700; margin-top: var(--s1); }

.empty { color: var(--muted); padding: var(--s5) 0; text-align: center; }
/* Filters ranges, two to a row */
.range-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s3); }
.range { min-width: 0; }
.range h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.range-err { margin: var(--s1) 0 0; font-size: var(--t-xs); color: var(--alarm); }
.range-box { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 44px; border: 2px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.range-box:focus-within { border-color: var(--toffee); }
.range-box.bad { border-color: var(--alarm); }
.range-box .end { display: flex; align-items: center; min-width: 0; height: 100%; padding: 0 var(--s1) 0 var(--s2); }
.range-box .dash { color: var(--muted); padding: 0 2px; }
.range-box .pre { font-style: normal; font-weight: 800; margin-right: 3px; flex: none; }
.range-box input { flex: 1; width: 100%; min-width: 0; height: 100%; border: 0; padding: 0; background: none; color: var(--ink); font: inherit; font-size: var(--t-m); outline: none; }
.range-box input::placeholder { color: var(--muted); opacity: .6; }
/* time box: typed digits over a gray 0h 00m */
.hm-end { position: relative; flex: 1; display: flex; min-width: 0; height: 100%; }
.hm-end input { position: relative; z-index: 1; }
.ghost { position: absolute; inset: 0; display: flex; align-items: center; font-size: var(--t-m); color: var(--muted); opacity: .6; white-space: pre; pointer-events: none; }
.ghost i { font-style: normal; visibility: hidden; }
.stars .half b { background: linear-gradient(90deg, var(--toffee) 50%, var(--line) 50%); }
/* five stars with halves to tap or slide (stars.js); the number beside them */
.stars5 { display: flex; align-items: center; gap: var(--s1); padding: var(--s2) 0; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
.stars5:focus-visible { outline: 2px solid var(--toffee); outline-offset: 2px; border-radius: var(--r-s); }
.s5 { display: block; flex: none; }
.s5 b { display: block; width: 44px; height: 44px; background: var(--line); }
.s5[data-f="1"] b { background: linear-gradient(90deg, var(--toffee) 50%, var(--line) 50%); }
.s5[data-f="2"] b { background: var(--toffee); }
.s5-n { min-width: 2.5em; margin-left: var(--s2); color: var(--toffee); font-size: var(--t-l); font-weight: 700; }
.sheet-card h3 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
/* a picked row in a sheet list, used on ✓ (dom.js picked) */
.sheet-card [data-choice][aria-pressed="true"] { color: var(--toffee); font-weight: 700; background: var(--toffee-soft); border-radius: var(--r-s); }
/* "Discard changes?" across the screen's foot (dom.js leaveSheet) */
.sheet-ask { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; max-width: 680px; margin: 0 auto; background: var(--surface);
  border-radius: 20px 20px 0 0; box-shadow: var(--shadow-2); padding: var(--s4) var(--s4) calc(var(--s4) + env(safe-area-inset-bottom, 0px)); text-align: center; }
.sheet-ask p { margin: 0 0 var(--s3); font-size: var(--t-m); font-weight: 700; }
/* Sort sheet */
.sort-list { list-style: none; margin: 0; padding: 0; }
.sort-list span { display: flex; align-items: center; }
.sort-list i { width: 1.7em; font-style: normal; flex: none; }
.sort-list i .bars { width: 1.4em; height: .9em; vertical-align: -1px; }
.sort-list li + li { border-top: 1px solid var(--line); }
.sort-list li { display: flex; align-items: center; background: var(--bg); }
.sort-list li > button { flex: 1; min-width: 0; }
.sort-grip { flex: none; display: grid; place-items: center; width: 36px; align-self: stretch; color: var(--muted); font-size: var(--t-l); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.sort-list li.dragging { position: relative; z-index: 5; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); border-radius: var(--r-s); }
.sort-list li.dragging .sort-grip { cursor: grabbing; color: var(--toffee); }
.sort-list button { width: 100%; min-height: var(--tap); display: flex; align-items: center; justify-content: space-between; border: 0; background: none;
  padding: 0 var(--s1); font: inherit; font-size: var(--t-m); color: var(--ink); text-align: left; }
.sort-list [aria-pressed="true"] { color: var(--toffee); font-weight: 700; }
.sort-list button > svg { width: 22px; height: 22px; stroke: var(--toffee); }
.sort-list [aria-pressed="false"] > svg { visibility: hidden; } /* the ✓, not the row's own icon (♥) */
.sort-list i svg { width: 20px; height: 20px; stroke: var(--alarm); vertical-align: -4px; }
.sort-list [data-choice][aria-pressed="true"] { background: none; }
.sheet-card .seg.source { margin-top: var(--s4); }

.zip input, .ing-find { width: 100%; min-width: 0; height: 40px; padding: 0 var(--s2); border: 2px solid var(--line); border-radius: var(--r-m);
  background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-m); }

/* settings: users list */
.users .user { display: flex; justify-content: space-between; gap: var(--s3); width: 100%; padding: var(--s2) 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font-size: var(--t-s); text-align: left; }
.users .u-blocked, .users .u-banned { color: var(--alarm) !important; font-weight: 700; }
.pop .menu-danger { color: var(--alarm); }
.pf-leave { margin-top: var(--s4); text-align: center; color: var(--muted); font-size: var(--t-s); }
.pf-leave a { color: var(--link); } .pf-delete { padding: 0; border: 0; background: none; color: var(--alarm); font-size: inherit; } /* Download My Data · Delete My Account */
.users .user span:first-child { overflow-wrap: anywhere; }
.users .user span:last-child { flex: none; color: var(--muted); }

/* footer and legal pages */
.foot { display: flex; flex-direction: column; align-items: center; gap: var(--s2); margin-top: var(--s6); padding-block: var(--s4); border-top: 1px solid var(--line); font-size: var(--t-xs); color: var(--muted); }
.foot span { display: flex; gap: var(--s2); }
.foot a, .foot button { padding: 6px var(--s3); border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--muted); text-decoration: none; font-weight: 600; }
.foot button { background: none; font: inherit; font-weight: 600; }
/* inbox: unread dot; new notices marked */
.tool.unread { position: relative; color: var(--toffee); border-color: var(--toffee); }
.tool.unread::after { content: ""; position: absolute; top: var(--s1); right: var(--s1); width: var(--s3); height: var(--s3); border-radius: 50%; background: var(--alarm); }
/* the inbox (11-28): small links, not buttons; boxes only while selecting (.ib-picking) */
.ib-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s4); margin-top: var(--s3); min-height: var(--tap); font-size: var(--t-s); }
.ib-n { margin-right: auto; color: var(--muted); }
.ib-l { border: 0; background: none; padding: var(--s2) 0; color: var(--link); font: inherit; font-weight: 700; }
.ib-l.warn { color: var(--alarm); }
.ib-l:disabled { opacity: .4; }
.ib-all { align-items: center; gap: var(--s3); padding: var(--s2) 0; border-top: 1px solid var(--line); font-size: var(--t-s); font-weight: 700; cursor: pointer; }
.ib-acts { gap: var(--s4); margin-right: auto; }
.ib-all, .ib-acts, .ib-pick { display: none; }
.ib-picking :is(.ib-all, .ib-acts) { display: flex; }
.ib-picking .ib-pick { display: block; }
.ib-picking .ib-dot { display: none; } /* (its box takes the dot's place; unread still reads darker) */
.ib-picking :is(.ib-n, [data-ib="select"]) { display: none; }
.ib-all input, .ib-pick { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--toffee); cursor: pointer; }
.inbox { list-style: none; margin: var(--s1) 0 0; padding: 0; }
.inbox li { display: flex; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); cursor: pointer; }
.inbox li > div { flex: 1; min-width: 0; }
.ib-dot { flex: none; width: 9px; height: 9px; margin-top: 7px; border-radius: 50%; }
.inbox li.new .ib-dot { background: var(--toffee); }
.inbox p { margin: var(--s1) 0; overflow-wrap: anywhere; }
.inbox .ik { display: flex; align-items: baseline; gap: .3em; margin: 0; color: var(--muted); font-size: var(--t-s); }
.inbox .ik b { flex: none; color: var(--ink); }
.inbox .ik a { color: var(--link); font-weight: 700; }
.inbox .ik time { flex: none; margin-left: auto; padding-left: var(--s2); font-size: var(--t-xs); }
.ib-peek { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; white-space: pre-line; }
.inbox li:not(.new) .ib-peek { color: var(--muted); }
.ib-full { display: none; }
.ib-full > p:not(.ib-h, .ib-by) { white-space: pre-wrap; }
.inbox li.open .ib-full { display: block; }
.inbox li.open .ib-peek { display: none; }
.inbox small { display: block; color: var(--muted); font-size: var(--t-xs); }
/* a report, opened: the comment as a card, then the reason, who reported it, Go to Comment */
.ib-cm { display: flex; gap: var(--s2); margin: var(--s2) 0; padding: var(--s2) var(--s3); border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.ib-cm > div { min-width: 0; }
.ib-cm b { font-size: var(--t-s); }
.ib-cm small { display: inline; }
.ib-cm p { margin: 2px 0 0; }
.ib-h { margin: var(--s3) 0 0 !important; font-size: var(--t-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ib-by { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); margin-top: var(--s2) !important; font-size: var(--t-xs); color: var(--muted); }
.ib-by a { font-size: var(--t-s); font-weight: 700; color: var(--link); }
/* the profile page (profile.js): a list of rows, like the phone's own Settings */
.pf-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); padding: var(--s4) 0 var(--s3); }
button.pf-photo { padding: 0; border: 0; cursor: pointer; }
.pf-about { flex: 1 0 100%; padding: var(--s2) var(--s3); border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: var(--t-m); cursor: pointer; }
.pf-about > :last-child { margin-bottom: 0; } .pf-about :first-child { margin-top: 0; }
.pf-add { color: var(--muted); } /* About, up top (profile.js) */
.pf-head h1 { margin: 0; font-size: var(--t-xl); }
.pf-sub { margin: 2px 0 0; color: var(--muted); font-size: var(--t-s); overflow-wrap: anywhere; }
.pf-photo { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--toffee-soft); color: var(--toffee); font-size: var(--t-xl); font-weight: 800; }
.pf-photo img { width: 100%; height: 100%; object-fit: cover; }
.pf-h { margin: var(--s5) 0 var(--s2); color: var(--muted); font-size: var(--t-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pf-list { list-style: none; margin: var(--s3) 0 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); overflow: hidden; }
.pf-list li + li { border-top: 1px solid var(--line); }
.pf-row { display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: var(--tap); padding: var(--s2) var(--s3); border: 0; background: none; color: var(--ink); font: inherit; font-size: var(--t-m); text-align: left; text-decoration: none; cursor: pointer; }
.pf-row:active { background: var(--toffee-soft); }
.pf-name { flex: 1; }
.pf-value { color: var(--muted); font-size: var(--t-s); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-go { color: var(--muted); font-size: var(--t-l); line-height: 1; }
.profile .sign-out { display: block; margin: var(--s5) auto 0; }
.pf-input { display: block; width: 100%; margin-top: var(--s3); padding: var(--s2); border: 2px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-m); }
.pf-input:focus { outline: none; border-color: var(--toffee); }
.pf-edit { cursor: text; } .pf-edit:active { background: none; }
.pf-inline { flex: 1; min-width: 0; padding: 4px 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: inherit; font-size: var(--t-m); text-align: right; }
select.pf-inline { appearance: none; -webkit-appearance: none; text-align: right; text-align-last: right; cursor: pointer; }
.pf-inline:focus { outline: none; border-bottom-color: var(--toffee); color: var(--ink); } /* Display Name, typed in its row */
.person-head { display: flex; align-items: center; gap: var(--s3); margin-right: calc(2 * 40px + var(--s2)); }
.person-head h2 { margin: 0; }
.person-about { padding: 0; margin-top: var(--s3); }
.by-name { padding: 0; border: 0; background: none; color: var(--link); font: inherit; cursor: pointer; }
.pf-comments { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.pf-comments li { padding: var(--s3) 0; border-top: 1px solid var(--line); }
.pf-comments a { font-weight: 700; }
.pf-comments p { margin: var(--s1) 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pf-comments small { color: var(--muted); font-size: var(--t-xs); }
/* 📊 My Ratings (myratings.js): the scale top to bottom, recipes as chips on their level; tap one, then a level */
.mr-tabs { position: static; margin: var(--s2) 0 var(--s3); }
.mr-level { display: grid; grid-template-columns: 7.5em 1fr; gap: var(--s2); align-items: start; min-height: 44px; padding: var(--s1) 0; border-top: 1px solid var(--line); cursor: pointer; }
.mr-label { padding-top: 6px; font-size: var(--t-s); font-weight: 700; }
.mr-label small { color: var(--muted); font-weight: 600; }
.mr-chips { display: flex; flex-wrap: wrap; gap: var(--s1); }
.mr-chip { padding: 4px var(--s2); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-s); text-align: left; }
.mr-chip small { color: var(--muted); }
.mr-chip[data-here] { border-color: var(--toffee); }
.mr-chip[aria-pressed="true"] { border-color: var(--toffee); background: var(--toffee); color: #fff; }
.mr-chip[aria-pressed="true"] small { color: #fff; }
/* a small menu under its button (menu.js): Share, the photo menu */
.pop { position: fixed; z-index: 60; min-width: 12em; max-width: calc(100vw - 16px); padding: var(--s1) 0; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); box-shadow: 0 10px 28px rgba(0, 0, 0, .18); }
.pop :is(a, button) { display: block; width: 100%; min-height: var(--tap); padding: var(--s2) var(--s4); border: 0; background: none; color: var(--ink); font: inherit; font-size: var(--t-m); text-align: left; text-decoration: none; }
.pop :is(a, button):active, .pop :is(a, button):hover { background: var(--toffee-soft); }
.pop .menu-main { font-weight: 700; }
.pop hr { margin: var(--s1) 0; border: 0; border-top: 1px solid var(--line); }
.pop-head { padding: var(--s2) var(--s4); color: var(--muted); font-size: var(--t-s); }
.pop-head b { display: block; color: var(--ink); font-size: var(--t-m); }
/* under every tab: the sources; the Comments tab (comments.js) */
.after { margin-top: var(--s5); }
.comments { margin-top: var(--s4); }
.cm-list, .cm-replies { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.cmt { padding: var(--s3) 0 0; }
.cm-list > .cmt + .cmt { margin-top: var(--s2); border-top: 1px solid var(--line); }
.cm-replies { margin: var(--s1) 0 0 var(--s2); padding-left: var(--s3); border-left: var(--s1) solid var(--toffee-soft); }
.cmt.hidden-cm > :not(.cm-replies), .cmt.gone > p { opacity: .6; }
.cm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--t-s); }
.cm-face { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; overflow: hidden; background: var(--toffee-soft); color: var(--toffee); font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
.cm-face img { width: 100%; height: 100%; object-fit: cover; } /* the writer's photo (comments.js) */
/* the comment a report's Go to Comment opened: a glow that fades */
.cmt.cm-target > :not(.cm-replies) { animation: cm-glow 5s ease-out; } /* (its own lines, not its replies) */
.cmt { scroll-margin-top: calc(var(--top-h, 0px) + var(--bar-h, 0px) + var(--s4)); } /* clear of the pinned bars */
@keyframes cm-glow { from { background: var(--toffee-soft); } to { background: transparent; } }
.cm-head .cm-me { color: var(--toffee); }
.cm-name { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.cm-text.rich { white-space: normal; } .cm-text.rich :is(p, ul, ol, h2) { margin: var(--s1) 0; } .cm-text.rich :is(ul, ol) { padding-left: var(--s4); } .cm-text.rich h2 { font-size: var(--t-l); }
.cm-text.rich .light { color: var(--muted); } .cm-text.rich a { color: var(--link); }
.rb-count { display: block; margin-top: var(--s1); color: var(--muted); font-size: var(--t-xs); text-align: right; }
.rb-count.over { color: var(--alarm); font-weight: 700; } /* your own comments: your name in the accent color */
.cm-tag { margin-left: var(--s2); color: var(--muted); font-size: var(--t-xs); font-weight: 700; }
.cm-tag.tier-premium { color: var(--toffee); } /* Premium beside a name (11-28) */
.person-head .cm-tag { margin-left: 0; }
.cm-review { color: var(--toffee); font-size: var(--t-s); font-weight: 700; }
.cm-text, .cmt.gone p { margin: var(--s1) 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 0 var(--s1); }
.cm-votes { display: inline-flex; align-items: center; }
.cm-score { min-width: 1.5em; text-align: center; color: var(--muted); font-size: var(--t-s); }
.cm-foot .cm-vote { padding: 0 var(--s2); color: var(--muted); font-size: var(--t-s); }
.cm-foot .cm-vote[aria-pressed="true"] { color: var(--toffee); }
.cm-foot small { margin-right: auto; color: var(--muted); font-size: var(--t-xs); }
.cm-foot button { min-height: var(--tap); padding: 0 var(--s2); border: 0; background: none; color: var(--link); font: inherit; font-size: var(--t-s); font-weight: 700; }
.cm-more { display: block; min-height: var(--tap); padding: 0; border: 0; background: none; color: var(--link); font: inherit; font-size: var(--t-s); font-weight: 700; }
.cm-back { margin-bottom: var(--s2); }
.cm-replies .cm-replies { margin-left: var(--s1); } /* deeper levels step in less */
/* the comment a reply or report is about: a quote card, its writer on top */
.cm-quote { margin: var(--s3) 0 0; padding: var(--s2) var(--s3); border-left: 4px solid var(--line); border-radius: var(--r-s); background: var(--surface); color: var(--ink);
  font-size: var(--t-s); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 8em; overflow: hidden; }
.cm-quote b { display: block; margin-bottom: 2px; color: var(--muted); font-size: var(--t-xs); }
.rb-box:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; } /* the box's hint */
.fb-text, .cm-box { display: block; width: 100%; margin: var(--s3) 0; padding: var(--s2); border: 2px solid var(--line); border-radius: var(--r-m);
  background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-m); resize: vertical; }
.fb-text:focus, .cm-box:focus { outline: none; border-color: var(--toffee); }
.legal { padding-block: var(--s4) var(--s6); }
.legal ol { padding-left: var(--s5); }
.legal .light, .rb-box .light { color: var(--muted); }
.legal a { color: var(--link); }
/* the general rich box (richbox.js): Feedback, and the Privacy and Terms editors */
.rb { margin-top: var(--s3); }
.rb-bar { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: var(--s2); }
.rb-b:active { background: var(--toffee-soft); } /* the buttons are the editor's .rt-b */
.rt-b.rb-b.light { color: var(--muted); }
.rb-linkform { display: flex; gap: var(--s2); margin-bottom: var(--s2); }
.rb-linkform[hidden] { display: none; }
.rb-linkform input { flex: 1; min-width: 0; height: 40px; padding: 0 var(--s2); border: 2px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-m); }
.rb-box { min-height: 8em; padding: var(--s2) var(--s3); border: 2px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font-size: var(--t-m); line-height: 1.5; overflow-wrap: anywhere; }
.rb-box:focus { outline: none; border-color: var(--toffee); }
.rb-box :is(p, ul, ol) { margin: 0 0 var(--s2); }
.rb-box a, .rb-shown a { color: var(--link); }
.rb-box.legal { padding-block: var(--s2); }
.rb-shown :is(p, ul, ol) { margin: var(--s1) 0; } .rb-shown :is(ul, ol) { padding-left: var(--s4); }
.legal-edit { margin-top: var(--s3); }
.legal-do { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--top-h, 60px)); z-index: 3; display: flex; justify-content: flex-end; gap: var(--s2); padding: var(--s2) 0; background: var(--bg); }
.legal h2 { margin: var(--s5) 0 var(--s1); }
.legal p, .legal li { line-height: 1.5; }
/* lists in rich text: bullets inside the text column, nested ones a step in (Indent) */
:is(.legal, .rb-box, .rb-shown, .cm-text) :is(ul, ol) { padding-left: 1.5em; }
:is(.legal, .rb-box, .rb-shown, .cm-text, .tips-list) li > :is(ul, ol) { margin: 2px 0 0; }

/* Difficulty bars (categories.js) */
svg.bars { width: 1.7em; height: 1em; vertical-align: -0.12em; }

/* the recipe editor (editor.html) */
.editor input, .editor select, .editor textarea { width: 100%; min-width: 0; padding: var(--s2); border: 2px solid var(--line); border-radius: var(--r-m);
  background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-m); }
.editor input, .editor select { height: var(--tap); }
.editor :is(input, select, textarea):focus { outline: none; border-color: var(--toffee); }
.editor .bad { border-color: var(--alarm); }
.editor textarea { resize: vertical; line-height: 1.4; }
.chip.toggle { min-height: var(--tap); margin-bottom: var(--s3); border-color: var(--line); color: var(--muted); }
.plans { margin-top: var(--s3); }
/* ads (ads.js) */
.ad { list-style: none; margin: var(--s4) 0; min-height: var(--tap); }
/* test bed placeholders: a gray box with its letter */
.ad-box { display: flex; align-items: center; justify-content: center; height: var(--ad-h); border-radius: var(--r-m);
  background: var(--line); color: var(--muted); font-size: var(--t-xs); font-weight: 700; }
.cards .ad-box { margin: 0; }
/* ‹ 1 2 … 7 › under the book's cards (book.js) */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--s1); margin: var(--s4) 0 0; }
#pagerTop { margin: var(--s3) 0 0; }
.pager:empty { display: none; }
.pager button { min-width: var(--tap); height: var(--tap); padding: 0 var(--s2); border: 2px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.pager button[aria-current="page"] { border-color: var(--toffee); background: var(--toffee); color: var(--surface); }
.pager button:disabled { opacity: .35; cursor: default; }
.pager .gap { color: var(--muted); padding: 0 2px; }
.plans { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip.toggle[aria-pressed="true"] { border-color: var(--toffee); background: var(--toffee-soft); color: var(--toffee); }
.ed-paste { display: grid; gap: var(--s2); justify-items: start; margin-bottom: var(--s4); }
/* editor Ingredients tab */
.editor .ing-top { position: static; z-index: auto; }
.editor .ing-top::after { display: none; }
.editor .ing-top .subtabs { padding-block: var(--s1); }
.ed-sub { flex: none; display: inline-flex; align-items: center; gap: var(--s1); padding: 0 var(--s1) 0 var(--s3); min-height: 37px; border-radius: var(--r-pill); background: var(--toffee); }
.editor .ed-sub input { width: auto; height: auto; padding: 0; border: 0; border-radius: 0; background: none; color: var(--surface); font-size: var(--t-s); font-weight: 700; }
.editor .ed-sub input::placeholder { color: var(--surface); opacity: .65; }
.editor .ed-sub input:focus { border: 0; }
.subtabs .ed-sub-x { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--surface); }
.subtabs .ed-sub-x svg { width: 14px; height: 14px; }
.subtabs .ed-sub-add { justify-content: center; min-width: var(--tap); border-style: dashed; color: var(--toffee); font-size: var(--t-l); padding-block: 0; }
.ed-ings { list-style: none; margin: var(--s2) 0; padding: 0; display: flex; flex-direction: column; gap: var(--s1); }
.ed-ing { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s2); min-height: calc(var(--tap) + var(--s3)); padding: var(--s1) var(--s2); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--field-on); }
.ed-ing.off { align-items: center; border-color: transparent; background: var(--field-off); }
.ed-ing.off :is(.i-fields, .i-more, .i-shop, .i-extra, .i-grip) { display: none; }
.i-grip { align-self: center; flex: none; width: 20px; height: var(--tap); margin-right: calc(-1 * var(--s1)); padding: 0; border: 0; background: none; color: var(--muted); font-size: var(--t-l); line-height: 1; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.ed-ing.dragging { position: relative; z-index: 6; scale: 1.03; box-shadow: 0 12px 28px rgba(0, 0, 0, .28); border-color: var(--toffee); }
.ed-ing.dropping { transition: translate .15s ease; }
.ed-ing.dragging .i-grip { cursor: grabbing; color: var(--toffee); }
.i-fields { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s1) var(--s2); }
.i-ms { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
.m { position: relative; display: flex; align-items: center; gap: var(--s1); }
.m + .m::before { content: "+"; padding-inline: 2px; color: var(--muted); font-weight: 700; }
.editor .ed-ing :is(input, textarea) { border-width: 1px; border-color: var(--field-edge); background-color: transparent; padding-inline: var(--s2); }
.editor .ed-ing :is(input, textarea):focus { border-color: var(--toffee); box-shadow: 0 0 0 1px var(--toffee); }
.editor .ed-ing .bad { border-color: var(--alarm); box-shadow: 0 0 0 1px var(--alarm); }
.editor .m-qty { width: 3.5em; font-weight: 700; color: var(--toffee); text-align: center; padding-inline: 2px; }
.editor .m-unit { width: 4.7em; padding-right: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a7a6c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 6px center; }
.m-u { position: relative; display: block; }
.editor .i-name { flex: 1 1 8em; min-width: 0; height: var(--tap); overflow: hidden; resize: none; line-height: 1.4; }
.i-more { flex: none; width: 30px; height: var(--tap); padding: 0; border: 0; background: none; color: var(--muted); font-weight: 800; }
.i-more[aria-expanded="true"] { color: var(--toffee); }
.ed-ing:is([data-kind="opt"], [data-kind="fixed"]) .i-fields::after { align-self: center; color: var(--muted); font-size: var(--t-s); }
.ed-ing[data-kind="opt"] .i-fields::after { content: "optional"; }
.ed-ing[data-kind="fixed"] .i-fields::after { content: "not scaled"; }
/* how much of the row no 🔗 link has used (edingredients.js markLinked) */
.i-left { flex-basis: 100%; order: 9; margin-top: calc(-1 * var(--s1)); color: var(--muted); font-size: var(--t-xs); }
.i-left.over { color: var(--alarm); font-weight: 700; }
.i-extra { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); padding: 0 0 var(--s1); }
.i-extra .chip { margin: 0; min-height: 0; padding-inline: var(--s3); font-size: var(--t-s); }
.i-del { width: var(--icon-btn); height: var(--icon-btn); padding: 0; border-radius: 50%; background: none; }
/* 🛒 beside ⋯ (11-24, one tap): faint till the row has its store product */
.i-shop { flex: none; width: 30px; height: var(--tap); padding: 0; border: 0; background: none; font-size: var(--t-m); filter: grayscale(1); opacity: .45; }
.i-shop.on { filter: none; opacity: 1; }
.i-checks { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s4); } /* the two checkboxes and 🗑, a row under the buttons */
.i-check { display: flex; align-items: center; gap: var(--s2); min-height: 36px; font-size: var(--t-s); }
.i-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--toffee); }
.i-del { display: grid; place-items: center; border: 0; margin-left: auto; color: var(--alarm); }
.i-del svg { width: 22px; height: 22px; }
/* fractions above the box (below on a list's first row: Portions is above it), units below */
.q-fracs { position: absolute; bottom: 100%; left: 0; z-index: 7; display: flex; gap: 2px; margin-bottom: var(--s1); padding: 2px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow-2); }
.q-fracs.below { bottom: auto; top: 100%; margin: var(--s1) 0 0; }
.q-fracs button { width: var(--icon-btn); height: var(--icon-btn); padding: 0; border: 0; border-radius: var(--r-s); background: none; color: var(--toffee); font-size: var(--t-m); font-weight: 700; }
.u-list { position: absolute; top: 100%; left: 0; z-index: 9; width: 12em; max-height: 280px; overflow-y: auto; margin: var(--s1) 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow-2); }
.u-list.up { top: auto; bottom: 100%; }
.u-list button { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); width: 100%; min-height: var(--tap); padding: 0 var(--s3); border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font-size: var(--t-m); text-align: left; }
.u-list li:last-child button { border-bottom: 0; }
.u-list .at { background: var(--toffee-soft); }
.u-list small { color: var(--muted); font-size: var(--t-xs); }
.u-list .lead { padding: var(--s2) var(--s3); color: var(--muted); }
.editor .x { flex: none; width: var(--icon-btn); height: var(--icon-btn); border: 0; border-radius: 50%; background: none; color: var(--muted); }
.ed-tabs { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--top-h, 0px)); z-index: 6; box-shadow: 0 0 0 var(--s2) var(--bg); }
.ed-tabs button { padding-inline: 2px; white-space: nowrap; }
.ps-q { width: 100%; height: var(--tap); padding: 0 var(--s2); border: 2px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-m); }
.ps-list { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.ps-list button { display: grid; gap: 2px; width: 100%; min-height: var(--tap); padding: var(--s2) 0; border: 0; border-top: 1px solid var(--line);
  background: none; color: var(--ink); font: inherit; text-align: left; }
.ps-list button:disabled { opacity: .45; }
.ps-list button[aria-pressed="true"] { color: var(--toffee); font-weight: 700; background: var(--toffee-soft); }
/* the 🛒 sheet's food line: what the calories and aisle come from, and Change */
.ps-food { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: var(--s2); font-size: var(--t-s); color: var(--muted); }
.ps-food b { color: var(--ink); } .ps-food .chip { flex: none; }
.ps-q { margin: var(--s2) 0 var(--s3); }
.ps-l { display: grid; gap: var(--s1); margin-bottom: var(--s2); color: var(--muted); font-size: var(--t-s); font-weight: 700; }
.ps-l:focus-within { outline: none; }
.ps-list small { color: var(--muted); font-size: var(--t-xs); }
/* one row: 🌐 ▾ ↶ ↷ … 🗑 Cancel Save */
.ed-actions { display: flex; align-items: center; gap: 6px; margin-top: var(--s6); position: sticky; bottom: 0; z-index: 7; /* over the sticky tabs */ background: var(--bg);
  border-top: 1px solid var(--line); padding: var(--s2) 0 calc(var(--s2) + env(safe-area-inset-bottom, 0px)); }
.chip.save { background: var(--toffee); color: var(--surface); }
.ed-actions :is(#delete, #cancel) { margin-left: auto; } /* Visibility, Undo, Redo left; the rest right */
.ed-actions #delete + #cancel { margin-left: 0; }
.ed-actions .chip { white-space: nowrap; padding-inline: var(--s3); }
.ed-actions .chip.ic { width: var(--icon-btn); padding: 0; display: grid; place-items: center; font-size: var(--t-l); }
.ed-actions .chip.vis { padding-inline: var(--s2); }
.chip.undo { border-color: var(--line); color: var(--ink); }
.chip.undo:disabled { opacity: .4; }
.ed-actions .chip.ic svg { width: 20px; height: 20px; }
.chip.cancel.sure { border-color: var(--alarm); color: var(--alarm); }
.chip.remove { border-color: var(--alarm); color: var(--alarm); }
.chip.remove.sure { background: var(--alarm); border-color: var(--alarm); color: #fff; }
/* editor top: the page header, with boxes */
.ed-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-bottom: var(--s1); }
.editor .ed-crumb .crumb-link { cursor: pointer; }
.editor .ed-crumb .crumb-link:hover { border-color: var(--toffee); }
/* ⭐ Specialty: dashed gray off, filled on */
.editor .ed-crumb #f-special { border-style: dashed; }
.editor .ed-crumb #f-special[aria-pressed="false"] { filter: grayscale(1); opacity: .75; }
.editor .ed-crumb #f-special[aria-pressed="true"] { border: 1px solid var(--toffee); background: var(--toffee); color: var(--surface); }
.editor .ed-crumb .crumb-link { width: auto; field-sizing: content; height: 32px; padding: 0 var(--s2); border: 1px solid var(--line); border-radius: var(--r-pill); background: none;
  color: var(--muted); font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; }
.editor .ed-crumb select.crumb-link { -webkit-appearance: none; appearance: none; }
.editor .ed-crumb .crumb-link[data-empty] { border-style: dashed; }
.ed-pick { position: relative; display: inline-block; }
.crumb-menu { width: max-content; min-width: 10em; text-transform: none; letter-spacing: normal; font-weight: 400; }
.editor .ed-title { display: block; margin: var(--s1) 0 var(--s3); padding: var(--s1) var(--s3); border: 1px solid var(--field-edge); border-radius: var(--r-m); background: var(--field-on);
  font-family: var(--font-display); font-size: var(--t-xxl); line-height: 1.1; resize: none; overflow: hidden; }
.editor .ed-title:focus { border-color: var(--toffee); }
/* a word the recipe can rename (Portions, Adapted from:): bold text in a dashed box (11-24), solid toffee while typing */
.editor .ed-label { width: auto; min-width: 6ch; field-sizing: content; height: auto; padding: 2px var(--s2); border: 1.5px dashed var(--field-edge); border-radius: var(--r-s);
  background: none; color: var(--ink); font: inherit; font-weight: 700; }
.editor .ed-label:focus { border-style: solid; border-color: var(--toffee); }
.ed-end { display: block; margin-top: var(--s5); } .ed-end-h { display: block; font-size: var(--t-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); } .ed-end input { width: 100%; margin-top: var(--s1); } /* the Steps tab's End Message */
.editor .ed-label.src { display: block; margin-top: var(--s4); color: var(--muted); font-size: var(--t-s); }
/* growing lists (edrows.js): the gray item at the end */
[data-grow] > .off { min-height: var(--tap); border-radius: var(--r-m); box-shadow: none !important; }
[data-grow] > .off > :not(.num, .add-label, .s-tpl) { display: none !important; }
:not(.off) > .s-tpl { display: none; }
.s-tpl { position: absolute; right: var(--s2); top: 50%; transform: translateY(-50%); z-index: 1; min-height: 0; height: 32px; font-size: var(--t-s); }
.s-tpl:hover { background: var(--toffee-soft); }
/* template sheets */
.tpl-sheet :is(.tpl-list, .tpl-q, .tpl-card, .ps-l, .lead) { margin-top: var(--s4); }
.tpl-name, .tpl-q { width: 100%; height: var(--tap); padding: 0 var(--s3); border: 2px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t-m); }
.tpl-card { margin: 0; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); font-size: var(--t-m); line-height: 1.45; }
.tpl-card b { display: block; }
.tpl-list { list-style: none; margin: var(--s3) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.tpl-list li { display: flex; align-items: center; gap: var(--s2); }
.tpl-use { flex: 1; min-width: 0; text-align: left; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.tpl-use b { display: block; }
.tpl-use small { display: block; color: var(--muted); font-size: var(--t-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-tplname { display: block; margin-bottom: var(--s1); color: var(--muted); font-size: var(--t-xs); font-weight: 700; }
/* the item waiting at a list's end (the user's pick "B", 11-23): a white row, dashed, a round toffee + and what it adds,
   "Add Make Ahead Note" (its list's --add, edrows.js addAttr) */
[data-grow] > .off, .ed-ing.off { background: var(--surface) !important; border: 1px dashed var(--field-edge) !important; }
.add-label { position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; padding-left: 14px; color: var(--muted); font-size: var(--t-m); font-weight: 600; line-height: 1.2; pointer-events: none; }
.add-label i { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--toffee); color: var(--surface); display: grid; place-items: center; font-style: normal; font-size: 20px; font-weight: 700; }
.add-label::after { content: "Add " var(--add, ""); }
.ed-step.off .add-label { padding-left: var(--s3); }
.ed-step.off .num { visibility: hidden; }
[data-grow] > .off, .ed-ing.off { position: relative; cursor: pointer; }
@media (hover: hover) { [data-grow] > .off:hover, .ed-ing.off:hover { background: var(--toffee-soft) !important; } }
:not(.off) > .add-label { display: none; }
[data-grow] > .off { display: flex; align-items: center; gap: var(--s3); padding-left: var(--s3); }
/* prep and step cards: boxes only on the one being typed in (.on) */
.ed-steps { counter-reset: ed; margin: var(--s2) 0; }
.ed-step > :not(.num) { grid-column: 2; min-width: 0; }
.ed-step .num::before { counter-increment: ed; content: counter(ed); }
.ed-step { position: relative; }
.ed-step > .s-grip { grid-column: 1; }
.s-grip { position: absolute; left: 0; top: calc(var(--s3) + var(--icon-btn) + var(--s1)); width: var(--icon-btn); height: 44px; padding: 0; border: 0; background: none; color: var(--muted); font-size: var(--t-l); line-height: 1; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
/* a card being dragged (⠿): lifted under the finger */
.ed-step.dragging { position: relative; z-index: 6; scale: 1.03; box-shadow: 0 12px 28px rgba(0, 0, 0, .28); border-color: var(--toffee); background: var(--surface); }
.ed-step.dropping { transition: translate .15s ease; }
.subtabs [data-tabid] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } .subtabs.sorting { cursor: grabbing; }
.ed-sub.dragging { position: relative; z-index: 6; scale: 1.06; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
body:has(.ed-step.dragging, .ed-ing.dragging) { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.ed-step.dragging .s-grip { cursor: grabbing; color: var(--toffee); }
.ed-step.on { border-color: var(--toffee); box-shadow: 0 0 0 1px var(--toffee) inset; }
.ed-step .body { display: grid; gap: var(--s1); padding-top: 0; }
.editor .ed-step :is(input, textarea, select) { border-width: 1px; border-color: var(--field-edge); background-color: transparent; padding-inline: var(--s2); }
.editor .ed-step :is(input, textarea, select):focus { border-color: var(--toffee); box-shadow: 0 0 0 1px var(--toffee); }
.editor .ed-step .s-title-box { padding-block: 2px; font-size: var(--t-m); font-weight: 700; color: var(--muted); }
.rt-title { font-weight: 700; } /* bold, as on the page */
.editor .ed-step .s-text { font-size: var(--t-body); line-height: 1.5; resize: none; overflow: hidden; }
.ed-step .tools { margin-top: var(--s2); }
.ed-step .tools .aside { gap: var(--s1); }
.ed-step .help { padding: 0; display: grid; place-items: center; }
.ed-more-btn { border-color: var(--line); color: var(--muted); font-weight: 800; }
.ed-more-btn[aria-expanded="true"] { background: var(--muted); border-color: var(--muted); color: var(--surface); }
.ed-more { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-top: var(--s2); padding-top: var(--s2); border-top: 1px dashed var(--line); }
/* the timer on its own line, its name in the chip; the note buttons under it */
.ed-step.timed .tools { flex-direction: column; align-items: flex-start; }
.ed-step.timed .tools .aside { align-self: flex-end; margin-left: 0; }
.s-timerbox .s-dot { opacity: .4; margin: 0 10px; }
.s-timerbox .s-timer-x { display: grid; place-items: center; width: 24px; height: 24px; margin: 0 -4px 0 var(--s1); padding: 0; border: 0; border-radius: 50%; background: none; color: var(--toffee); opacity: .7; cursor: pointer; }
.s-timerbox .s-timer-x svg { width: 14px; height: 14px; }
.ed-step .s-timerbox { max-width: 100%; min-width: 0; } /* never wider than the card: a long name scrolls in its box */
.s-timerbox .s-label { flex: 0 1 auto; border: 0; background: none; padding: 0; font: inherit; color: inherit; min-width: 3ch; outline: 0; text-overflow: ellipsis; }
.s-timerbox .s-label::placeholder { color: var(--toffee); opacity: .45; }
@supports (field-sizing: content) { .s-timerbox .s-label { field-sizing: content; width: auto !important; min-width: 3ch; } }
.ed-moves { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }
/* a card's ? 📖 ! notes */
.ed-notes { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.ed-step .ed-notes > .ed-note { grid-column: 1 / -1; } /* an .ed-note is also a page .tip (grid-column: 2) */
.ed-step .ed-note.tip { position: relative; display: grid; gap: 2px; margin: 0; padding-right: 40px; }
.editor .ed-note :is(input, textarea) { height: auto; padding: 2px var(--s2); border-color: var(--field-edge); font-size: var(--t-m); resize: none; overflow: hidden; }
.editor .ed-note .n-title-box { font-weight: 700; }
.ed-note .n-del, .ed-pair .n-del { position: absolute; top: var(--s1); right: 0; }
.ed-pair, .ed-step .ed-note.tip { gap: var(--s1) !important; }
/* Notes and sources */
.ed-notetab { list-style: none; margin: var(--s2) 0 var(--s4); padding: 0; }
.ed-notetab .note { position: relative; display: grid; gap: 2px; padding: var(--s2) 40px var(--s2) var(--s3); }
.editor .ed-pair :is(input, textarea) { height: auto; padding: 2px var(--s2); border-width: 1px; border-color: var(--field-edge); background: transparent; resize: none; overflow: hidden; }
.editor .ed-pair :is(input, textarea):focus { border-color: var(--toffee); }
.editor .ed-pair .p-a { font-weight: 700; }
.ed-srcs { list-style: none; margin: var(--s1) 0 0; padding: 0; display: grid; gap: var(--s1); }
.ed-src { position: relative; display: grid; gap: 2px; padding: var(--s1) 40px var(--s1) var(--s2); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.editor .ed-src .p-b { color: var(--toffee); font-size: var(--t-s); } .editor .ed-src .p-c { font-size: var(--t-s); }
/* a tile showing yours: the other under it (source.js) */

/* the editor's text box (edtext.js); its bar shows while typing */
.rt { min-height: calc(1.5em + 2 * var(--s1) + 2px); padding: var(--s1) var(--s2); border: 1px solid var(--field-edge); border-radius: var(--r-m); background: transparent;
  line-height: 1.5; outline: none; overflow-wrap: anywhere; cursor: text; }
.rt:focus { border-color: var(--toffee); box-shadow: 0 0 0 1px var(--toffee); }
.rt:empty::before, .rt.blank::before { content: attr(data-placeholder); color: var(--muted); opacity: .7; }
.rt .bold, .rt .warn { font-weight: 700; }
.rt .tok { display: inline-block; padding: 0 var(--s1); border-radius: var(--r-s); background: var(--toffee-soft); color: var(--toffee); font-size: var(--t-m); font-weight: 700; }
/* a link: one chip, shown as on the page (an ingredient's amount then its words; a prep item or step blue); tap to change */
.rt .tok.rt-link { display: inline; padding: 0 2px; font-size: inherit; color: var(--ink); cursor: pointer; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.rt .rt-link .rt-amt { color: var(--toffee); white-space: nowrap; }
.rt .tok.rt-go { background: var(--link-soft); color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.s-rich { font-size: var(--t-body); }
.n-rich, .p-rich { font-size: var(--t-m); }
/* the rich box's buttons, docked (edtext.js): one row, every button shrinking a little before the row scrolls, so it
   never spills past the page; on a phone it takes the editor's bottom bar's place, wider it sits right under the box
   (in its card), in a sheet the sheet's foot */
.rt-dock { display: flex; align-items: center; gap: 2px; width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.rt-dock::-webkit-scrollbar { display: none; }
.rt-bar, .rt-ok { display: flex; flex-wrap: nowrap; gap: 2px; min-width: 0; }
.rt-bar { flex: 1 1 auto; } .rt-ok { flex: 0 1 auto; justify-content: flex-end; padding-left: var(--s1); }
.rt-dock .rt-b { flex: 0 1 40px; width: auto; min-width: 24px; height: auto; aspect-ratio: 1; } .rt-dock .rt-ok .rt-b { flex: 0 0 38px; } /* ✕ ✓ keep their size */
@media (max-width: 599px) { /* a phone: the bar takes the bottom bar's place, fixed above the keyboard */
  .ed-actions.typing > :not(.rt-dock) { display: none; }
  .ed-actions.typing { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding-inline: var(--gutter); } }
.rt + :is(input, textarea) + .rt-dock { margin-top: 2px; } /* wider: under the box */
.ed-sec:has(> .rt-dock:not([hidden])) { flex-wrap: wrap; } .ed-sec > .rt-dock { order: 1; } /* (a Storage heading: under its ✕ row) */
html:has(.ed-actions.typing) { scroll-padding-bottom: 72px; } /* (the box being typed in stays clear of it) */
.sheet-card > .rt-dock { position: sticky; bottom: calc(48px + var(--s3) + 1px); z-index: 2; margin-top: var(--s3); padding: var(--s2) 0; /* just above Cancel and Done */ border-top: 1px solid var(--line); background: var(--bg); }
.rt-b { width: 34px; height: 36px; padding: 0; display: grid; place-items: center; line-height: 1; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-size: var(--t-s); font-weight: 700; }
.rt-b.warn { color: var(--alarm); }
.rt-b.link { color: var(--link); }
.rt-b:is(.undo, .redo) { color: var(--muted); } .rt-b.cancel { color: var(--muted); } .rt-b.done { background: var(--toffee); border-color: var(--toffee); color: var(--surface); } .rt-b svg { display: block; width: 20px; height: 20px; } .rt-b > b { font-size: 17px; }
/* 🔗 the link sheet (edlink.js) */
.lk-ic { color: var(--link); margin-right: 4px; } .lk-ic svg { width: 22px; height: 22px; vertical-align: -3px; }
.lk-words { margin: var(--s1) 0 var(--s3); color: var(--muted); font-size: var(--t-s); } .lk-words b { color: var(--link); }
.lk-unlink { margin: 0 0 var(--s3); }
.lk-list h3 { margin-top: var(--s3); }
.lk-row { display: grid; grid-template-columns: 30px 1fr; align-items: start; gap: 2px var(--s3); width: 100%; margin-bottom: var(--s2); padding: var(--s2) var(--s3);
  border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink); text-align: left; font-size: var(--t-m); }
.lk-row .lk-n { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; background: var(--toffee-soft); color: var(--toffee); font-weight: 700; font-size: var(--t-s); display: grid; place-items: center; }
.lk-row small { color: var(--muted); font-size: var(--t-xs); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-row.best { border: 2px solid var(--link); background: var(--link-soft); }
.sheet-card .lk-row[data-choice][aria-pressed="true"] { border: 2px solid var(--toffee); background: var(--toffee-soft); color: var(--ink); }
.lk-back { margin-bottom: var(--s2); }
.lk-big { margin: var(--s4) 0 var(--s2); text-align: center; }
.lk-big > b { display: block; font: 400 var(--t-xxl)/1.2 var(--font-display); color: var(--toffee); }
.lk-big span { color: var(--muted); } .lk-big span b { color: var(--toffee); }
.lk-amt.none .lk-big > b { color: var(--muted); font-size: var(--t-xl); }
.lk-amt.none .lk-big span { display: none; }
.lk-amt.none .lk-slide { opacity: .4; }
/* the slider: what's taken elsewhere is hatched past the wall at --left */
.lk-slide { position: relative; margin: var(--s3) 0 0; }
.lk-range { width: 100%; height: 32px; margin: 0; accent-color: var(--toffee); }
.lk-wall { position: absolute; top: 4px; bottom: 4px; left: var(--left); width: calc(100% - var(--left)); border-left: 2px solid var(--muted); pointer-events: none;
  background: repeating-linear-gradient(135deg, transparent 0 4px, color-mix(in srgb, var(--muted) 35%, transparent) 4px 7px); border-radius: 0 6px 6px 0; }
.lk-slide[style*="--left:100%"] .lk-wall { display: none; }
.lk-ticks { display: flex; justify-content: space-between; color: var(--muted); font-size: var(--t-xs); }
.lk-uses { list-style: none; margin: 0; padding: 0; } .lk-uses li { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.lk-uses b { color: var(--toffee); white-space: nowrap; }
.lk-none { margin-top: var(--s4); }
.lk-none[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.rt-b[aria-pressed="true"] { border-color: currentColor; background: var(--toffee-soft); box-shadow: inset 0 0 0 1px currentColor; }
/* timer, buttons and a step's title show only once set (⋯ adds them) */
.ed-p.empty, .ed-step[data-kind="steps"] .s-title-box:is(:empty, .blank):not(:focus), .s-timers:empty { display: none; }
.s-timers { display: flex; flex-wrap: wrap; gap: var(--s2); max-width: 100%; }
/* ⏰ 10–[max] min · Name ✕ (11-27): the time part like the page's ▶ 10-15 min (timer font, one baseline, exact widths);
   an empty max is a small dashed box, the site's "type here" (like Portions) */
.s-timerbox { flex: none; display: inline-flex; align-items: baseline; gap: 0; box-sizing: border-box; min-height: var(--icon-btn); padding: 6px var(--s3); border: 2px solid var(--toffee); border-radius: var(--r-pill); color: var(--toffee); font-size: var(--t-s); font-weight: 700; line-height: 1.25; cursor: text; }
.s-timerbox:focus-within { outline: none; box-shadow: 0 0 0 1px var(--toffee); }
.s-timerbox .s-ic { margin-right: .45ch; }
.editor .ed-step :is(.s-timer, .s-max) { min-width: 1ch; height: auto; padding: 0; border: 0; box-shadow: none; color: var(--toffee); font-family: var(--font-mono); font-weight: 700; line-height: 1.25; text-align: left; }
.editor .ed-step .s-timerbox .s-label { padding: 0; height: auto; line-height: 1.25; }
.s-timerbox .s-to { margin: 0 .25ch; color: var(--toffee); font-family: var(--font-mono); font-weight: 700; } .s-timerbox:has(.s-max:placeholder-shown) .s-to { color: var(--muted); opacity: .5; }
.editor .ed-step .s-max:placeholder-shown { outline: 1.5px dashed var(--line); outline-offset: 1px; border-radius: 5px; margin: 0 3px; }
.editor .ed-step .s-max::placeholder { color: var(--muted); opacity: .6; font-weight: 600; }
.s-timerbox .s-unit { margin-left: .6ch; font-family: var(--font-mono); }
.s-timerbox .s-timer-x { align-self: center; }
.ed-more .chip { margin: 0; min-height: 0; font-size: var(--t-s); }
/* ! ? 📖 add buttons, in their colors */
.ed-more .s-addp { display: inline-flex; align-items: center; gap: var(--s1); }
.ed-more .s-addp .ic { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; border-width: 1.5px; font-size: var(--t-xs); }
.ed-more .s-addp .ic svg { width: 12px; height: 12px; }
.ed-more .s-addp[data-p="remind"] { border-color: var(--alarm); color: var(--alarm); }
.ed-more .s-addp[data-p="why"] { border-color: var(--muted); color: var(--muted); }

.rt-b:disabled { opacity: .4; }
.rt-b { position: relative; }
.rt-b::after { content: attr(data-said); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); z-index: 5;
  display: none; padding: 2px var(--s2); border-radius: var(--r-s); background: var(--ink); color: var(--bg); font-size: var(--t-xs); font-weight: 700;
  white-space: nowrap; pointer-events: none; } /* each button's word: hovered, or tapped (edtext.js) */
.rt-b.said::after { display: block; }
@media (hover: hover) { .rt-b:hover::after { display: block; } }
.rt-b .sw { display: block; padding: 0 2px; border-bottom: 3px solid currentColor; font-size: 17px; font-weight: 800; line-height: 18px; } /* a text color swatch */
.ed-step:is(:not([data-use]), [data-use=""]) .s-unlink { display: none; } /* only on a template's card */

/* Plan & Billing: the renewal terms under the buttons (California, 11-28) */
.plans .terms { margin: .4em 0 0; font-size: 15px; }
.plans .terms a { color: var(--link); }
