* { box-sizing:border-box; margin:0; padding:0; }
:root {
  --red:#e8412a; --red-light:#fff0ee;
  /* #252: text-only shades. The brand red and green fall short of the 4.5:1
     WCAG AA contrast for small text (4.0 and 4.3 on white), so small red or
     green TEXT, and fills that carry small white text, use these. Fills,
     borders and big text keep the brand colours. */
  --red-ink:#c7321c; --green-ink:#237a43;
  --green:#2d8a4e; --green-light:#edf7f1;
  --yellow:#f5a623; --yellow-light:#fff8ee;
  --purple:#7c3aed; --purple-light:#f3eeff;
  --bg:#ffffff; --text:#1a1a1a; --muted:#666;
  /* The colour of a card's EDGE and of an unticked tick box.
     The equipment and ingredient cards had border:2px solid transparent — no
     edge at all, just a soft grey shadow — and a pale lilac tick box. Against a
     white page that is somewhere near 1.1:1, which is to say invisible to
     anyone with reduced contrast sensitivity, and this app is built for people
     who have it. This reads as black at a glance and is 15:1 on white. */
  --edge:#23235c;
  /* "This is the one you are on." A SEPARATE knob from --accent, which is the
     brand orange in the header and tabs — the selected card wants to shout and
     a header does not, so pushing --accent would have repainted the whole app.
     Fully saturated (#F26A21 is 89%), and paired with --sel-edge: a hairline of
     a darker orange outside the line. Without it a saturated orange bleeds into
     white and reads softer than it is, which is what the old pale halo was
     doing on purpose. */
  --sel:#FF4D00; --sel-edge:#c43d00;
  --card:#fff; --shadow:0 4px 20px rgba(0,0,0,.08);
}
body { font-family:'Nunito',sans-serif; background:var(--bg); color:var(--text); min-height:100vh; padding-bottom:62px; }

/* ── LANDING PAGE ────────────────────────────── */
#landing { min-height:100vh; background:#f5f0ff; display:flex; flex-direction:column; }
.landing-header { background:white; border-bottom:1px solid #f0eaff; padding:1.4rem 1.6rem 1.2rem; display:flex; align-items:center; justify-content:space-between; flex-shrink:0; gap:1rem; }
.landing-logo { display:flex; align-items:center; gap:.75rem; }
.landing-logo { display:flex; align-items:center; gap:1.1rem; min-width:0; }
.landing-logo-icon { height:80px; width:auto; border-radius:0; background:none; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.landing-logo-icon img { height:80px; width:auto; display:block; }
.landing-logo h1 { font-size:1.5rem; font-weight:900; color:#1a1a1a; letter-spacing:-.02em; line-height:1.15; min-width:0; overflow-wrap:break-word; }
.landing-logo h1 span { color:#e8412a; }
.landing-header-actions { display:flex; align-items:center; gap:.6rem; }
.landing-body { max-width:1400px; margin:0 auto; padding:1.5rem 1.4rem 6rem; width:100%; flex:1; }
.landing-cols { display:grid; grid-template-columns:repeat(5,1fr); gap:22px; align-items:start; }
@media(max-width:800px) { .landing-cols { grid-template-columns:repeat(2,1fr); gap:20px; } }
@media(max-width:440px) { .landing-cols { grid-template-columns:1fr 1fr; gap:12px; } }

/* Category column headers */
.landing-col-head { font-weight:900; text-align:center; margin-bottom:1rem; padding:1rem .8rem .9rem; border-radius:14px; display:flex; flex-direction:column; align-items:center; gap:6px; }
.landing-col-head .col-emoji { font-size:2.2rem; line-height:1; }
.landing-col-head .col-label { font-size:1rem; font-weight:900; letter-spacing:.04em; text-transform:uppercase; }
.landing-col-head.breakfast { background:#fff8e8; color:#92620a; border:2px solid #f5e0a0; }
.landing-col-head.lunch     { background:#edfaf3; color:#1a6b3c; border:2px solid #b0e8c8; }
.landing-col-head.dinner    { background:#fff0ee; color:#b83020; border:2px solid #f5c0b8; }
.landing-col-head.dessert   { background:#f3eeff; color:#5b21b6; border:2px solid #d8c8ff; }
.landing-col-head.mealprep  { background:#f0f8ff; color:#1e4080; border:2px solid #b8d8f8; }

/* Recipe cards */
.landing-col-cards { display:flex; flex-direction:column; gap:10px; }
.landing-card { background:#fff; border-radius:16px; box-shadow:0 2px 12px rgba(0,0,0,.07); cursor:pointer; border:2px solid #f0eaff; transition:all .18s ease; user-select:none; overflow:hidden; display:flex; flex-direction:column; }
.landing-card:hover { transform:translateY(-3px); box-shadow:0 8px 28px rgba(0,0,0,.13); }
.landing-card:active { transform:scale(.98); }
.landing-card.breakfast:hover { border-color:#f5a623; }
.landing-card.lunch:hover     { border-color:#2d8a4e; }
.landing-card.dinner:hover    { border-color:#e8412a; }
.landing-card.dessert:hover   { border-color:#7c3aed; }
.landing-card.mealprep:hover  { border-color:#3a7bc8; }
/* CONTAIN, NOT COVER (issue #246). cover fills the 160px box and throws away
   whatever does not fit — so a wide shot of two loaves lost both ends, and a
   portrait photo lost its top and bottom. On a card where the PICTURE is how a
   non-reader identifies the recipe, cropping it is not a cosmetic problem.
   The ground behind the letterbox is the same #f5f5f5 the equipment and
   ingredient tiles use, which have always been contain for the same reason.
   NOTE: the Cloudflare transform (withCdnResize) is width-only with no fit=,
   so the delivered image is never pre-cropped — this rule is the whole story. */
.landing-card-img { width:100%; height:160px; object-fit:contain; background:#f5f5f5; display:block; flex-shrink:0; }
.landing-card-img-ph { width:100%; height:160px; display:flex; align-items:center; justify-content:center; font-size:4rem; flex-shrink:0; }
.landing-card-img-ph.breakfast { background:#fff8e8; }
.landing-card-img-ph.lunch     { background:#edfaf3; }
.landing-card-img-ph.dinner    { background:#fff0ee; }
.landing-card-img-ph.dessert   { background:#f3eeff; }
.landing-card-img-ph.mealprep  { background:#f0f8ff; }
.landing-card-body { padding:.9rem 1rem 1rem; flex:1; display:flex; align-items:flex-start; }
.landing-card-title { font-size:1.05rem; font-weight:900; color:#1a1a1a; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; height:2.8em; }
.landing-empty { text-align:center; color:#ddd; font-size:1.8rem; padding:1.5rem 0 .4rem; }
.landing-empty-txt { text-align:center; color:#ccc; font-size:.78rem; font-weight:700; }

/* ── RECIPE VIEW ─────────────────────────────── */
#recipe-view { display:none; }
#recipe-view.active { display:block; }

/* ── BACK BUTTON ─────────────────────────────── */
.back-btn { display:flex; align-items:center; gap:8px; background:rgba(255,255,255,.22); border:none; color:white; font-family:'Nunito',sans-serif; font-size:1rem; font-weight:900; padding:.55rem 1.1rem; border-radius:50px; cursor:pointer; transition:background .2s; margin-bottom:.75rem; }
.back-btn:hover { background:rgba(255,255,255,.35); }
.back-btn .back-arrow { font-size:1.2rem; }

/* ── HEADER ─────────────────────────────────── */
header { background:var(--red); color:white; padding:2rem 1.5rem 2.5rem; text-align:center; position:relative; overflow:hidden; }
header::after { content:''; position:absolute; bottom:-30px; left:0; right:0; height:60px; background:var(--bg); border-radius:50% 50% 0 0/100% 100% 0 0; }
header h1 { font-size:clamp(2rem,5.5vw,3rem); font-weight:900; }

/* ── HERO IMAGE ──────────────────────────────── */
.hero-wrap { max-width:960px; margin:0 auto; padding:0 1rem; position:relative; top:-10px; }
.hero-box { border-radius:16px; overflow:hidden; box-shadow:var(--shadow); background:#f0ebe5; }
.hero-box img { width:100%; max-height:420px; object-fit:contain; display:block; background:#f5f0eb; }

/* ── MAIN ────────────────────────────────────── */
main { max-width:960px; margin:0 auto; padding:1.5rem 1.25rem 6rem; }
.section-title { font-size:1.6rem; font-weight:900; margin-bottom:1.1rem; }
.video-wrap { border-radius:20px; overflow:hidden; box-shadow:var(--shadow); aspect-ratio:16/9; background:#000; margin-bottom:1.5rem; position:relative; cursor:pointer; }
.video-wrap iframe,.video-wrap video { width:100%; height:100%; border:none; display:block; }
.vid-thumb { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
.vid-play-btn { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; border:0; padding:0; margin:0; background:none; width:100%; cursor:pointer; }
/* #252: a real <button> now, so it shows where keyboard focus is. */
.vid-play-btn:focus-visible { outline:4px solid #fff; outline-offset:-8px; }
.vid-play-btn::before { content:''; width:80px; height:80px; border-radius:50%; background:rgba(232,65,42,.92); display:flex; align-items:center; justify-content:center; box-shadow:0 4px 20px rgba(0,0,0,.4); transition:transform .15s; }
.vid-play-btn::after { content:''; position:absolute; width:0; height:0; border-style:solid; border-width:18px 0 18px 30px; border-color:transparent transparent transparent white; margin-left:6px; }
.video-wrap:hover .vid-play-btn::before { transform:scale(1.1); }
.info-bar { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:2rem; }
.chip { background:var(--card); border-radius:50px; padding:.65rem 1.2rem; font-size:1.05rem; font-weight:700; box-shadow:var(--shadow); }
.chip-servings { background:var(--green-light); color:var(--green); border:2px solid var(--green); }

/* ── SERVES SCALER ────────────────────────────────
   Large, well-spaced tap targets: this control is used by people with reduced
   motor control, so each icon's hit area (padding + min size) is well past the
   visible silhouette and the gaps between neighbours are wide enough that an
   imprecise tap can't easily catch the wrong one. A grid — not a shrink-to-fit
   flex row — so a narrow screen wraps to two rows of four at full size rather
   than squeezing eight tiny icons onto one line. */
.serves-scaler { margin:-.5rem 0 2rem; }

/* The number view of the same count. Tapped by adults standing at a bench and
   by children with limited motor control, so the - and + are 44px targets, not
   arrows squeezed beside the digit. */
.serves-num { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:1rem; }
.serves-num[hidden] { display:none; }
.serves-num-btn {
  min-width:44px; min-height:44px; border-radius:50%; border:2px solid var(--green);
  background:var(--green-light); color:var(--green);
  font-family:'Nunito',sans-serif; font-size:1.6rem; font-weight:900; line-height:1;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:transform .1s, background .15s;
}
.serves-num-btn:active { transform:scale(.94); }
.serves-num-btn:disabled { border-color:#ddd; background:#f4f4f4; color:#bbb; cursor:default; }
.serves-num-btn:focus-visible { outline:3px solid var(--green); outline-offset:2px; }
.serves-num-val { font-family:'Nunito',sans-serif; font-size:1.35rem; font-weight:900; color:#1a1a1a; white-space:nowrap; }
.serves-num-orig { font-family:'Nunito',sans-serif; font-size:.9rem; font-weight:800; color:var(--muted); }
/* display:grid beats the hidden attribute, exactly as .tip-box did: without
   this the people row stays on screen in the number-only view. */
.serves-scaler-row[hidden] { display:none; }
.serves-scaler-row {
  display:grid;
  grid-template-columns:repeat(8, minmax(52px, 66px));
  gap:.5rem .9rem;              /* row-gap / column-gap */
  align-items:center;
  justify-items:center;
}
.serves-person {
  display:flex; align-items:center; justify-content:center;
  width:100%; min-width:52px; min-height:56px;
  padding:.5rem;                /* hit area extends past the silhouette */
  border:none; background:none; cursor:pointer;
  color:#ccc; line-height:0; border-radius:14px;
  transition:color .12s, transform .12s;
}
.serves-person svg { width:2.5rem; height:2.5rem; }   /* overrides the inline 1.35em */
.serves-person.is-on { color:var(--green); }
.serves-person:hover { transform:translateY(-1px); }
.serves-person:active { transform:scale(.94); }
.serves-person:focus-visible { outline:3px solid var(--green); outline-offset:2px; }
/* hidden is only display:none in the UA stylesheet, so ANY author display rule
   beats it. Without this the batch-size reminder below the steps would be on
   screen permanently. */
.tip-box[hidden] { display:none; }

@media (max-width:600px) {
  .serves-scaler-row {
    grid-template-columns:repeat(4, minmax(56px, 1fr));
    gap:.7rem 1rem;
    max-width:360px;
  }
  .serves-person { min-height:60px; }
  .serves-person svg { width:2.8rem; height:2.8rem; }
}

/* ── WCAG 2.2 AA — SCREEN READER ONLY ─────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── WCAG 2.2 AA — FOCUS VISIBLE ─────────────── */
:focus-visible {
  outline: 3px solid #7c3aed;
  outline-offset: 3px;
}
button:focus-visible, [role="button"]:focus-visible, a:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #7c3aed;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── TABS ────────────────────────────────────── */
.tabs { display:flex; gap:8px; margin-bottom:1.35rem; }
.tab-btn { flex:1; padding:1rem .5rem; border:3px solid transparent; border-radius:14px; background:var(--card); font-family:'Nunito',sans-serif; font-size:1.05rem; font-weight:800; cursor:pointer; transition:all .2s; box-shadow:var(--shadow); color:var(--muted); }
.tab-btn.active { background:var(--red); color:white; border-color:var(--red); transform:translateY(-2px); }
.tab-btn:not(.active):hover { border-color:var(--red); color:var(--red); }
.panel { display:none; } .panel.active { display:block; }

/* ── PROGRESS ────────────────────────────────── */
.prog-label { font-size:1rem; font-weight:700; color:var(--muted); margin-bottom:.4rem; text-align:right; }
.prog-wrap { background:#eee; border-radius:50px; height:14px; margin-bottom:1.35rem; overflow:hidden; }
.prog-fill { height:100%; background:linear-gradient(90deg,var(--red),var(--yellow)); border-radius:50px; transition:width .4s; }

/* Circle progress (used for Steps + Cook now). Dots avoid clashing with the
   orange timer bar. Label on the left, circles anchored to the right edge. */
.step-prog { display:flex; align-items:flex-start; justify-content:flex-start; gap:16px; margin-bottom:1.35rem; }
.step-prog-label { font-family:'Nunito',sans-serif; font-size:1.25rem; font-weight:900; color:#534AB7; flex-shrink:0; white-space:nowrap; padding-top:2px; }

/* ── COOKING: THE SCREEN SHOWS THE STEP AND NOTHING ELSE ──────────────
   The Cook tab is a child cooking, one step at a time, hands busy. Everything
   that belongs to BROWSING a recipe - its title, photo, video, chips, the
   serving control, the tab row, the Home button - is noise at that moment and
   comes off the screen. Hidden, not unmounted: the Steps tab is still there
   underneath, so leaving is instant and nothing has to be rebuilt.

   html.cooking is toggled in app-auth.js where the Cook tab is opened, rather
   than :has() on the panel, so this works on an older classroom iPad too.

   !important because several of these are shown and hidden by JS writing an
   inline style, which would otherwise win.

   #app-footer is on that list for a reason that is not tidiness: it is fixed at
   bottom:0 with z-index:950 and owns the bottom 62px of the screen, so it sat
   ON TOP of Back and Next and clipped them. It carries the copyright and the
   settings gear - neither of which a child needs mid-cook.

   NOT hidden: the timer bar, which is the one thing a child needs mid-step,
   and the mic, which only appears on this screen anyway. */
html.cooking #app-footer,
html.cooking #back-btn,
/* the pupil's Home sits in the same slot and must go the same way: the cook
   screen is stripped to the step itself, and its own X is the way out. */
html.cooking #stu-switch-btn,
html.cooking #page-title,
html.cooking #page-safefood,
html.cooking #page-credit,
html.cooking #hero-wrap,
html.cooking #video-section,
html.cooking #info-bar,
html.cooking #serves-scaler,
html.cooking .tabs { display:none !important; }

/* ── CHECKLISTS ──────────────────────────────── */
.checklist { display:flex; flex-direction:column; gap:12px; }
.check-item { display:flex; align-items:center; gap:16px; background:var(--card); border-radius:18px; padding:1.1rem 1.35rem; box-shadow:var(--shadow); cursor:pointer; transition:all .2s; border:3px solid var(--edge); user-select:none; position:relative; overflow:hidden; }
/* Hover used to go to #ddd. Once the resting edge is dark, a pale hover makes
   the card LESS visible the moment you point at it — so hover goes purple,
   which is the app's "you are on this" colour everywhere else. */
.check-item:not(.done):hover { border-color:#7c3aed; }
.check-item.done { background:#1a6b35; border-color:#145229; opacity:1; }
/* THE OBJECT PICTURE. Its size is also written into app.js (search imgStyle),
   because an uploaded photo and the emoji tile are the two halves of one slot
   and must be the same box — change one and you must change the other. */
.check-item .eml { font-size:3.2rem; width:8rem; height:8rem; min-width:8rem; display:flex; align-items:center; justify-content:center; flex-shrink:0; border-radius:14px; background:#f5f5f5; }
.check-item .lbl { font-size:1.45rem; font-weight:900; color:var(--text); flex:1; line-height:1.25; }
.check-item .amt { font-size:1.3rem; color:#4c1d95; font-weight:900; white-space:nowrap; }
.check-item.done .lbl { text-decoration:line-through; color:rgba(255,255,255,0.8); }
.check-item.done .amt { color:rgba(255,255,255,0.65); }
/* Safefood fix (26 Oct): the preparation ("peeled and crushed") under the name. Smaller and
   lighter, so the thing to get out stays the first thing read. */
.check-item .ing-note { display:block; font-size:1rem; font-weight:700; color:var(--muted); margin-top:.15rem; }
.check-item.done .ing-note { color:rgba(255,255,255,0.7); }
.check-item.done .eml { opacity:.85; }
/* ── THE TICK POP (issue #223) ───────────────────────────────────
   The seen half of signalTicked() in app.js. One definition, used by the
   ingredient and equipment boxes, the step cards, and the basket rows — the
   basket injects its own <style> but lives in this same document, so it
   inherits this rather than carrying a second copy that could drift.

   It lifts a little and settles. The first version overshot to 1.4 on a
   spring curve and dipped to .94 on the way back up. On a 4.5rem switch that
   reads as the button jumping out of its card, and the dip on the return made
   it look like it had landed at a different size than it started (reported
   Sept 2026). A tick needs to be NOTICED, not announced: 1.08, no undershoot,
   no spring, gone in a quarter second. The glow still fades out on its own so
   nothing is left highlighted afterwards. */
@keyframes tick-pop {
  0%   { transform:scale(1);    box-shadow:0 0 0 0 rgba(45,138,78,.45); }
  45%  { transform:scale(1.08); box-shadow:0 0 0 .35rem rgba(45,138,78,0); }
  100% { transform:scale(1);    box-shadow:0 0 0 0 rgba(45,138,78,0); }
}
.tick-pop { animation:tick-pop .26s ease-out; }

/* A pop is motion, and motion is the one thing some users have asked their
   device to stop doing. They still get the note and the buzz. */
@media (prefers-reduced-motion:reduce) {
  .tick-pop { animation:none; }
}

.chk { width:2.5rem; height:2.5rem; min-width:2.5rem; border-radius:50%; border:3px solid var(--edge); display:flex; align-items:center; justify-content:center; font-size:1.1rem; background:white; transition:all .2s; cursor:pointer; flex-shrink:0; }
/* When the check is the shared Done switch, drop the round-circle sizing so the button shows */
.chk.done-switch { width:auto; height:48px; min-width:88px; border-radius:14px; font-size:1.05rem; }
.check-item.done .chk { background:#0d3d1f; border-color:#0d3d1f; color:white; }
.check-item.done .chk.done-switch { background:#0d3d1f; border-color:#bce8cc; color:#fff; box-shadow:0 2px 6px rgba(0,0,0,.35); }
/* Big "Done!" overlay across the whole row (mirrors the step overlay) */
.check-done-overlay { display:none; position:absolute; inset:0; background:rgba(26,107,53,.94); align-items:center; justify-content:center; gap:14px; border-radius:16px; z-index:2; pointer-events:none; }
.check-item.done .check-done-overlay { display:flex; }
.check-done-overlay .done-tick { font-size:2.6rem; line-height:1; }
.check-done-overlay .done-word { font-family:'Nunito',sans-serif; font-size:2rem; font-weight:900; color:white; letter-spacing:.06em; }
/* The Done switch sits above the overlay so it stays tappable to undo */
.check-item .chk.done-switch { position:relative; z-index:4; }
/* #363: 4+ measuring tools (buildIngRow adds .many-tools) sat in a grid BESIDE
   the name, and a grid can't get narrower than its spoons — so 5 tablespoons
   pushed the done tick past the card edge, where overflow:hidden cut it off.
   Give them their own full-width row underneath instead, spoons at full size:
     Row 1: [image] [name + amount] [done tick]
     Row 2: [ measuring tools ]
   `order` moves the tools after the tick without changing the DOM. Phones
   (max-width:600px) have their own layout for this below and are left alone. */
@media (min-width:601px) {
  .check-item.many-tools { flex-wrap:wrap; row-gap:12px; }
  .check-item.many-tools .mstep-group { order:1; flex:1 1 100%; }
  /* A long amount — "3 cups (penne or similar short pasta)" — was one
     unbreakable line (.amt is nowrap so "200 g" never splits), wide enough on
     its own to push the done tick off the card. Let the name and amount take
     a second line instead; the tick keeps its place. Phones already did this. */
  .check-item .lbl { min-width:0; }
  .check-item .amt { white-space:normal; }
}
.check-item.partial .chk { background:var(--yellow); border-color:var(--yellow); color:#7a4f00; }
/* Highlight the next un-ticked equipment/ingredient item (like the active Step
   card) so it's obvious what to do next. */
.check-item.active-item { border:5px solid var(--sel) !important; box-shadow:0 0 0 1px var(--sel-edge), 0 6px 22px rgba(0,0,0,.12); }
.check-item.done.active-item { box-shadow:none; }
.cat-hd { font-size:1.1rem; font-weight:900; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; margin:1.35rem 0 .65rem; }

/* Aisle headings on the Ingredients tab — same grouping (and same order) as the
   shopping list, so students see fruit & veg together in both places. */
.ing-aisle-hd { color:#5a3db8; text-transform:none; letter-spacing:0; font-size:1.15rem; margin:1.1rem 0 .2rem; }
.ing-aisle-hd:first-child { margin-top:.1rem; }

/* ── STEP CARDS ──────────────────────────────── */
/* ── STEPS ─────────────────────────────────── */
.steps-section-title { font-family:'Nunito',sans-serif; font-size:1.6rem; font-weight:900; color:var(--text); margin:0 0 1.2rem; }
.steps-list { display:flex; flex-direction:column; gap:0; padding-bottom:2rem; }

/* The gap between steps — very obvious, background shows through */
.step-gap {
  display:flex; align-items:center; justify-content:center;
  height:48px; margin:0 1.5rem;
  position:relative;
}
/* step-gap::before removed — no vertical line between steps */
.step-gap { height:40px; }
.step-gap-arrow { display:none; }

.step-card {
  background:white;
  border-radius:24px;
  box-shadow:0 8px 32px rgba(0,0,0,.18);
  cursor:pointer;
  transition:all .3s;
  border:5px solid #d4ccf5;
  user-select:none;
  overflow:hidden;
}
.step-card:hover  { border-color:#a89fe0; box-shadow:0 10px 36px rgba(0,0,0,.25); }
.step-card.done   { background:#1a6b35; border-color:#145229; box-shadow:0 4px 16px rgba(0,0,0,.1); }
.step-card.active-step {
  border:7px solid #7c3aed;
  box-shadow:0 0 0 4px rgba(124,58,237,.25), 0 10px 40px rgba(0,0,0,.22);
}
.step-img { width:100%; background:#f7f3f0; display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:160px; overflow:hidden; transition:background .3s; position:relative; }
.step-img.dual { flex-direction:row; gap:2px; align-items:stretch; min-height:200px; }
.step-img.dual .step-img-half { flex:1; display:flex; align-items:center; justify-content:center; overflow:hidden; min-height:200px; }
.step-img.dual .step-img-half img { width:100%; height:100%; min-height:200px; object-fit:cover; display:block; }
.step-img.dual .step-done-overlay { position:absolute; inset:0; }
.step-card.done .step-img { background:#145229 !important; }
/* #380 follow-up: a step with no picture yet shows the drawn placeholder (an
   <svg>, from defaultSVG). Only the <img> was hidden on a tick, so the
   placeholder stayed beige over the green and just the text row looked done.
   Hide both, so a ticked card is green all over whatever its picture. */
.step-card.done .step-img img,
.step-card.done .step-img svg { opacity:0; transition:opacity .3s; }
.step-img svg { width:100%; max-width:100%; height:auto; display:block; }
.step-img img { width:100%; max-height:280px; object-fit:contain; background:#f0f0f0; display:block; }
/* Safety net: the action banner/label was removed from app.js. If an older,
   cached app.js is briefly served during a deploy, this stops the banner from
   flashing up on the placeholder before the real image loads. */
.step-action-label, .step-card.done .step-action-label { display:none !important; }
.step-bot { display:flex; align-items:flex-start; gap:16px; padding:1.2rem 1.35rem .6rem; }
.step-num { min-width:72px; height:72px; border-radius:50%; background:var(--red); color:white; font-size:2rem; font-weight:900; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:background .3s; border:3px solid rgba(0,0,0,.1); }
.step-card.done .step-num { background:#0d3d1f; }
.step-card.done .step-text  { color:white; }
.step-card.done .done-badge { color:#a8e6bc; }
.step-text  { font-size:1.35rem; font-weight:800; line-height:1.6; padding-top:10px; flex:1; min-width:0; }
.done-badge { font-size:1.1rem; font-weight:900; color:var(--green); padding-top:10px; min-width:65px; text-align:right; opacity:0; transition:opacity .3s; pointer-events:none; }
.step-card.done .done-badge { opacity:1; }

/* ── TIMER ──────────────────────────────────────────────── */
.timer-bar {
  position:sticky; top:0; z-index:50;
  background:white; border-radius:16px;
  box-shadow:0 4px 18px rgba(0,0,0,.12);
  margin-bottom:16px;
  overflow:hidden;
  border:3px solid #ede8ff;
  transition:border-color .3s;
}
.timer-bar.running { border-color:#e8412a; }
.timer-bar.done    { border-color:#2d8a4e; }
/* Interval nudge ("stir every 5 minutes"): the beep and the spoken prompt
   do the work, but a child who is deaf, or in a noisy kitchen, gets nothing
   from those. Two seconds of pulsing amber is the visual half of the same
   alarm. prefers-reduced-motion falls back to a static amber border. */
.timer-bar.nudge   { border-color:#e07b00; animation:timer-nudge .5s ease-in-out 4; }
@keyframes timer-nudge {
  0%,100% { background:#fff; }
  50%     { background:#fff3e6; }
}
@media (prefers-reduced-motion: reduce) {
  .timer-bar.nudge { animation:none; background:#fff3e6; }
}
.timer-top { display:flex; align-items:center; gap:10px; padding:.7rem 1rem; }
.timer-icon { font-size:1.6rem; flex-shrink:0; }
.timer-label { flex:1; font-size:.88rem; font-weight:800; color:var(--muted); line-height:1.3; }
.timer-display { font-size:2rem; font-weight:900; color:#e8412a; font-variant-numeric:tabular-nums; letter-spacing:.02em; flex-shrink:0; }
.timer-bar.done .timer-display { color:#2d8a4e; }
.timer-controls { display:flex; gap:6px; flex-shrink:0; }
.timer-btn { padding:.4rem .75rem; border-radius:10px; border:none; font-family:'Nunito',sans-serif; font-size:.85rem; font-weight:900; cursor:pointer; }
.timer-btn.start  { background:#e8412a; color:white; }
.timer-btn.pause  { background:#f5890a; color:white; }
.timer-btn.reset  { background:#f0eaff; color:var(--purple); }
.timer-progress-wrap { height:28px; background:#f0eaff; border-radius:0 0 12px 12px; overflow:hidden; }
.timer-progress-fill { height:100%; background:linear-gradient(to right,#e8412a,#f5890a); transition:width .5s linear; border-radius:0 4px 4px 0; display:flex; align-items:center; justify-content:flex-end; padding-right:6px; min-width:4px; }
.timer-bar.done .timer-progress-fill { background:#2d8a4e; }
/* Timer trigger button on step cards */
.step-timer-btn { display:flex; align-items:center; justify-content:center; gap:8px; margin:.4rem 1rem .5rem; padding:.75rem 1rem; border-radius:14px; border:none; background:#e8412a; color:white; font-family:'Nunito',sans-serif; font-size:1.15rem; font-weight:900; cursor:pointer; width:calc(100% - 2rem); box-shadow:0 3px 10px rgba(232,65,42,.35); }
.step-timer-btn:hover { background:#c0311a; }
.tap-prompt { display:flex; align-items:center; justify-content:center; gap:6px; margin:0 1.35rem .9rem; padding:.55rem .9rem; border-radius:12px; background:#2d8a4e; border:none; color:white; font-family:'Nunito',sans-serif; font-size:1rem; font-weight:900; transition:all .2s; cursor:pointer; }
.tap-prompt .tap-hand { font-size:1.1rem; animation:bounce-hand .9s ease-in-out infinite; display:inline-block; }
@keyframes bounce-hand { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }
/* Keep the Done switch visible after completion so it can be tapped to undo */
.step-card.done .tap-prompt { display:flex; }
.speak-btn { display:none; }
.step-text { font-size:1.35rem; font-weight:800; line-height:1.6; padding-top:10px; flex:1; min-width:0; cursor:pointer; }
.step-text::after { content:' 🔊'; font-size:1.1rem; opacity:.5; }
.step-text.speaking { color:#7c3aed; }
/* #373: the word being spoken right now, highlighted like a pen over it. */
.step-text .tts-w.on { background:#ffff00; color:#000; border-radius:5px; box-shadow:0 0 0 3px #ffff00, 0 0 12px 2px rgba(255,255,0,.85); }
.step-text.speaking::after { content:' 🔊'; opacity:1; animation:pulse-speak .8s ease-in-out infinite; }
/* Ingredient & equipment label highlight — matches step tap-to-speak */
.lbl.speaking { color:#7c3aed; }
.lbl.speaking::after { content:none; }
.check-item .lbl { cursor:pointer; }
.check-item:not(.done) .lbl:hover { color:#7c3aed; text-decoration:underline; text-decoration-color:rgba(124,58,237,.4); text-underline-offset:3px; }
.step-card.done .step-text::after { display:none; }
.step-text:hover { text-decoration:underline; text-decoration-color:rgba(124,58,237,.4); text-underline-offset:3px; }
.step-done-overlay { display:none; position:absolute; inset:0; background:rgba(26,107,53,.92); align-items:center; justify-content:center; flex-direction:column; gap:8px; border-radius:0; pointer-events:none; }
.step-card.done .step-done-overlay { display:flex; }
.step-done-overlay .done-tick { font-size:5rem; line-height:1; }
.step-done-overlay .done-word { font-family:'Nunito',sans-serif; font-size:2.2rem; font-weight:900; color:white; letter-spacing:.08em; }

/* ── SPEAK BUTTON ────────────────────────────── */
.speak-btn { display:flex; align-items:center; justify-content:center; gap:8px; margin:0 1.35rem 1.1rem; padding:.75rem 1.1rem; border-radius:12px; border:2px solid var(--yellow); background:var(--yellow-light); color:#7a4f00; font-family:'Nunito',sans-serif; font-size:1.05rem; font-weight:800; cursor:pointer; transition:all .2s; width:calc(100% - 2.7rem); }
.speak-btn:hover,.speak-btn.speaking { background:var(--yellow); }
.speak-btn.speaking { border-color:#d48a00; animation:pulse-speak .8s ease-in-out infinite; }
@keyframes pulse-speak { 0%,100%{transform:scale(1)} 50%{transform:scale(1.03)} }

/* ── ALL DONE BANNER ─────────────────────────── */
.done-banner { display:none; align-items:center; justify-content:center; gap:14px; margin-top:1.35rem; padding:1.2rem 1.75rem; border-radius:18px; background:var(--red); color:white; font-size:1.5rem; font-weight:900; text-align:center; }
.done-banner.show { display:flex; animation:pop-in .4s cubic-bezier(.175,.885,.32,1.275); }
@keyframes pop-in { from{transform:scale(.7);opacity:0} to{transform:scale(1);opacity:1} }
.done-banner .de { font-size:2.4rem; }

/* ── TIP / RESET ─────────────────────────────── */
.tip-box { background:var(--yellow-light); border:2px solid var(--yellow); border-radius:18px; padding:1.1rem 1.35rem; margin-top:1.1rem; display:flex; gap:12px; align-items:flex-start; font-size:1.1rem; font-weight:700; color:#7a4f00; line-height:1.55; }
.reset-btn { margin-top:1.1rem; width:100%; padding:.9rem; border-radius:12px; border:2px dashed #ccc; background:transparent; font-family:'Nunito',sans-serif; font-size:1rem; font-weight:700; color:var(--muted); cursor:pointer; transition:all .2s; }
.reset-btn:hover { border-color:var(--red); color:var(--red); }

/* Task 1 — forward flow when equipment is finished.
   Big primary "Next" button + small quiet restart link, shown together
   with the Done banner (see #eq-finish in app.html). */
.next-step-btn { margin:1.2rem auto 0; width:calc((100% - 16px) / 3); display:flex; align-items:center; justify-content:center; gap:8px; padding:1rem .5rem; border-radius:14px; border:3px solid var(--red); background:var(--red); color:white; font-family:'Nunito',sans-serif; font-size:1.05rem; font-weight:800; cursor:pointer; box-shadow:0 4px 18px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06); transition:all .2s; }
.next-step-btn:hover { background:#e0492f; border-color:#e0492f; transform:translateY(-2px); }
.next-step-btn:active { transform:translateY(0); }
.restart-link { display:block; margin:1rem auto 0; background:none; border:none; font-family:'Nunito',sans-serif; font-size:1.05rem; font-weight:700; color:var(--muted); cursor:pointer; text-decoration:underline; }
.restart-link:hover { color:var(--text); }

/* PDF download button */
.pdf-section { margin-top:2.5rem; padding-top:2rem; border-top:2px dashed #eee; text-align:center; }
/* The Print button lives at the end of <main>, outside every .panel, so it is
   available under Equipment / Ingredients / Steps. It is NOT wanted during the
   cook-through, where it used to reappear under every single step. Panels carry
   .active, so :has() hides it while Cook is open with no JS to keep in sync.
   It has moved twice already — see the comment beside it in app.html. */
main:has(#panel-cook.active) .pdf-section { display:none; }
.pdf-btn { display:inline-flex; align-items:center; gap:10px; padding:1rem 2.2rem; border-radius:16px; border:none; background:var(--red); color:white; font-family:'Nunito',sans-serif; font-size:1.2rem; font-weight:900; cursor:pointer; box-shadow:0 4px 18px rgba(232,65,42,.35); transition:all .2s; }
.pdf-btn:hover { background:#c0321c; transform:translateY(-2px); }
.pdf-btn:active { transform:translateY(0); }
.pdf-btn .pdf-icon { font-size:1.6rem; }

/* NO FLASH OF THE TEACHER'S HOME SCREEN.
   #landing is in the markup above every <script>, so the browser painted the
   full category grid — logo, school name, shopping and planner tiles — for
   about a second on every student reload, until bootStudentToLiveRecipe had
   awaited loadLibrary() and the class's live list and could cover it.
   Async work cannot win that race; only something applied before first paint
   can, which is the inline script in app.html's <head>.
   Deliberately !important and on <html>: it must beat the inline
   style.display='flex' that app.js sets on #landing. */
html.student-boot #landing { display:none !important; }
/* The Cook tab's "All done!" screen has its own Print button (see #cook-finish
   in app.html). It must NOT reuse .pdf-section: the rule above hides that for
   the whole Cook tab, which would hide it on the one screen it belongs on.
   Same separator and spacing, different name — keep the two in step. */
.cook-pdf-section { margin-top:2rem; padding-top:2rem; border-top:2px dashed #eee; text-align:center; }
.pdf-generating { font-size:.95rem; font-weight:700; color:var(--muted); margin-top:.75rem; min-height:1.2rem; }

/* ── FLOATING SETTINGS BUTTON ────────────────── */
#settings-fab { width:46px; height:46px; border-radius:50%; background:var(--purple); color:white; border:none; font-size:1.3rem; cursor:pointer; box-shadow:0 3px 12px rgba(124,58,237,.4); display:flex; align-items:center; justify-content:center; transition:transform .25s, box-shadow .25s; flex-shrink:0; }
#settings-fab:hover { transform:scale(1.12) rotate(30deg); box-shadow:0 8px 32px rgba(124,58,237,.65); }

/* ── FIXED APP FOOTER ───────────────────────────────────── */
#app-footer {
  position:fixed; left:0; right:0; bottom:0; z-index:950;
  height:62px; display:flex; align-items:center;
  padding:0 16px; gap:12px;
  background:#ffffff; border-top:1px solid #e6e0f5;
  box-shadow:0 -2px 12px rgba(0,0,0,.06);
}
#app-footer .footer-slot { flex:1; display:flex; align-items:center; }
#app-footer .footer-left   { justify-content:flex-start; }
#app-footer .footer-center { justify-content:center; font-family:'Nunito',sans-serif; font-size:.8rem; font-weight:800; color:var(--muted); white-space:nowrap; }
#app-footer .footer-right  { justify-content:flex-end; }


@keyframes slide-up { from{transform:translateY(100%)} to{transform:translateY(0)} }

/* ── SETTINGS OVERLAY (full screen) ──────────── */
#settings-overlay { position:fixed; top:0; left:0; right:0; bottom:62px; z-index:1000; display:none; }
#settings-overlay.open { display:flex; }
.s-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.5); animation:fadein .2s; }
@keyframes fadein { from{opacity:0} to{opacity:1} }
.s-panel { position:relative; z-index:1; background:#f8f5ff; width:100%; height:100%; display:flex; flex-direction:column; animation:fadein .2s; }

/* ── SETTINGS HEADER ── */
.s-head { background:var(--purple); color:white; padding:1rem 1.25rem; display:flex; align-items:center; gap:.75rem; flex-shrink:0; }
.s-head h2 { font-size:1.15rem; font-weight:900; flex:1; }
.s-close { background:rgba(255,255,255,.2); border:none; color:white; width:38px; height:38px; border-radius:50%; font-size:1.2rem; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.s-close:hover { background:rgba(255,255,255,.35); }
.s-back { background:rgba(255,255,255,.2); border:none; color:white; padding:.45rem .9rem; border-radius:50px; font-family:'Nunito',sans-serif; font-size:.9rem; font-weight:800; cursor:pointer; display:none; align-items:center; gap:6px; }
.s-back:hover { background:rgba(255,255,255,.35); }

/* ── SCREEN SWITCHER ── */
.s-body { flex:1; overflow:hidden; position:relative; }
.s-screen { position:absolute; inset:0; display:flex; flex-direction:column; overflow:hidden; transition:transform .25s cubic-bezier(.25,.8,.25,1); }
.s-screen.hidden-left  { transform:translateX(-100%); }
.s-screen.hidden-right { transform:translateX(100%); }
.s-screen.visible      { transform:translateX(0); }
.lib-screen { overflow-y:auto !important; padding-bottom:24px; }

/* ── LIBRARY SCREEN ── */
.lib-screen { background:#f8f5ff; }
.lib-topbar { padding:1.1rem 1.25rem; display:flex; align-items:center; justify-content:space-between; border-bottom:2px solid #ede8ff; background:white; flex-shrink:0; }
.lib-topbar h3 { font-size:1.05rem; font-weight:900; color:var(--text); }
.new-btn { padding:.6rem 1.1rem; border-radius:50px; border:none; background:var(--purple); color:white; font-family:'Nunito',sans-serif; font-size:.9rem; font-weight:800; cursor:pointer; transition:all .2s; }
.new-btn:hover { background:#6d28d9; }
.yt-import-btn { padding:.6rem 1.1rem; border-radius:50px; border:2px solid var(--red); background:var(--red-light); color:var(--red); font-family:'Nunito',sans-serif; font-size:.9rem; font-weight:800; cursor:pointer; transition:all .2s; }
.yt-import-btn:hover { background:var(--red); color:white; }

/* YouTube import panel */
.yt-import-panel { background:white; border-top:2px solid #ede8ff; padding:1rem 1.25rem; flex-shrink:0; display:none; }
.yt-import-panel.open { display:block; }
.yt-import-panel h4 { font-size:.95rem; font-weight:900; color:var(--text); margin-bottom:.6rem; }
.yt-import-row { display:flex; gap:8px; }
.yt-import-row input { flex:1; padding:.7rem 1rem; border-radius:10px; border:1.5px solid #ddd; font-family:'Nunito',sans-serif; font-size:.95rem; font-weight:700; outline:none; }
.yt-import-row input:focus { border-color:var(--red); }
.yt-go-btn { padding:.7rem 1.2rem; border-radius:10px; border:none; background:var(--red); color:white; font-family:'Nunito',sans-serif; font-size:.95rem; font-weight:800; cursor:pointer; white-space:nowrap; transition:all .2s; }
.yt-go-btn:hover { background:#c0321c; }
.yt-go-btn:disabled { background:#ccc; cursor:not-allowed; }
.yt-status { margin-top:.6rem; font-size:.88rem; font-weight:700; min-height:1.2rem; color:var(--muted); display:flex; align-items:center; gap:8px; }
.yt-status.error { color:var(--red); }
.yt-status.loading { color:var(--purple); }
.yt-status.success { color:var(--green); }
/* A recipe Claude wrote from a web address it couldn't read (From Website's
   last resort): amber, boxed, so it isn't mistaken for an ordinary success. */
.yt-status.warn { color:#7a3e00; background:#fff4e0; border:2px solid #f0b45a; border-radius:10px; padding:.6rem .8rem; font-weight:700; line-height:1.45; }
.yt-spinner { width:16px; height:16px; border:2.5px solid #ddd; border-top-color:var(--purple); border-radius:50%; animation:spin .7s linear infinite; flex-shrink:0; }
@keyframes spin { to { transform:rotate(360deg); } }
.lib-grid { padding:1rem; display:flex; flex-direction:column; gap:10px; flex-shrink:0; }

/* ── SETTINGS LIST (iOS/Material style) ─────────────────────── */
.cfg-section-label { padding:.9rem 1.25rem .3rem; font-size:.7rem; font-weight:900; color:var(--purple); text-transform:uppercase; letter-spacing:.1em; background:#f8f5ff; flex-shrink:0; }
/* Rows the settings search has filtered out. A class, never style.display: some
   rows are already hidden by an inline display:none for the school's licence or
   role, and clearing the search must not reveal them. */
.cfg-search-hide { display:none !important; }
.cfg-group { background:white; border-top:1.5px solid #ede8ff; border-bottom:1.5px solid #ede8ff; flex-shrink:0; }
.cfg-row { display:flex; align-items:center; gap:12px; padding:.85rem 1.25rem; border-bottom:1px solid #f0ecfc; cursor:pointer; transition:background .15s; min-height:52px; }
.cfg-row:last-child { border-bottom:none; }
.cfg-row:active, .cfg-row:hover { background:#f8f5ff; }
.cfg-row-icon { font-size:1.25rem; width:30px; text-align:center; flex-shrink:0; }
.cfg-row-body { flex:1; min-width:0; }
.cfg-row-label { font-size:.95rem; font-weight:800; color:var(--text); }
.cfg-row-hint  { font-size:.78rem; font-weight:700; color:var(--muted); margin-top:1px; }
.cfg-row-right { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.cfg-row-chevron { color:#c4b5fd; font-size:1rem; font-weight:900; }
.cfg-row-badge { background:var(--green); color:white; font-size:.7rem; font-weight:900; padding:.15rem .55rem; border-radius:50px; }
.cfg-row-badge.warn { background:#f59e0b; }
.cfg-row-input { flex:1; padding:.55rem .85rem; border-radius:10px; border:2px solid #ede8ff; font-family:Nunito,sans-serif; font-size:.88rem; font-weight:700; color:#1a1a1a; outline:none; min-width:0; }
.cfg-row-input:focus { border-color:var(--purple); }
.cfg-save-btn { flex-shrink:0; padding:.55rem .9rem; border-radius:10px; border:none; background:var(--purple); color:white; font-family:Nunito,sans-serif; font-size:.85rem; font-weight:900; cursor:pointer; }
.lib-card { background:white; border-radius:16px; border:2px solid #ede8ff; padding:1rem 1.25rem; cursor:pointer; display:flex; align-items:center; gap:14px; transition:all .15s; box-shadow:0 2px 8px rgba(0,0,0,.05); }
.lib-card:hover { border-color:var(--purple); background:#faf8ff; transform:translateY(-1px); }
.lib-card.live { border-color:var(--green); }
.lib-card-icon { font-size:2.2rem; }
.lib-card-info { flex:1; }
.lib-card-title { font-size:1.05rem; font-weight:900; color:var(--text); margin-bottom:.2rem; }
.lib-card-meta { font-size:.82rem; font-weight:700; color:var(--muted); }
.lib-live-badge { font-size:.72rem; font-weight:900; background:var(--green); color:white; padding:3px 10px; border-radius:50px; flex-shrink:0; }
.lib-arrow { font-size:1.5rem; color:var(--purple); font-weight:900; flex-shrink:0; }

/* ── EDITOR SCREEN ── */
.ed-screen { background:#f8f5ff; }
.ed-pane { flex:1; overflow-y:auto; padding:1.5rem; display:flex; flex-direction:column; gap:1.25rem; }
.ed-section { background:white; border-radius:14px; border:1.5px solid #ede8ff; padding:1.25rem 1.4rem; }
.ed-section h4 { font-size:1rem; font-weight:900; color:var(--purple); margin-bottom:1rem; padding-bottom:.5rem; border-bottom:1.5px solid #f0eaff; }
.ed-label { display:block; font-size:.82rem; font-weight:800; color:var(--muted); margin-bottom:.4rem; text-transform:uppercase; letter-spacing:.05em; }
.ed-input { width:100%; padding:.75rem 1rem; border-radius:9px; border:1.5px solid #ddd; font-family:'Nunito',sans-serif; font-size:1rem; font-weight:700; outline:none; transition:border .2s; background:white; color:#1a1a1a; }
.ed-input:focus { border-color:var(--purple); }
textarea.ed-input { min-height:80px; resize:vertical; line-height:1.5; }
.ed-field { margin-bottom:1rem; }
.ed-row { display:flex; gap:10px; align-items:flex-start; margin-bottom:10px; }
.ed-row .ed-input { flex:1; }
.ed-row .ed-input.sm { flex:0 0 64px; text-align:center; font-size:1.3rem; padding:.65rem .5rem; }
/* The ingredient AMOUNT field. Was flex:0 0 130px — no grow, no shrink, a hard
   130px, which after padding left about 98px of text room. "2 tablespoons" and
   "1 1/2 cups plain flour" scrolled out of sight while you typed them, on the
   one field where seeing the whole value matters most.
   Two-part fix so every device gets something: a roomier fixed base that works
   everywhere, and true grow-as-you-type where the browser has field-sizing.
   That landed in all four engines only in Dec 2025 (iOS Safari 26.2), so a
   classroom iPad on an older iOS keeps the fixed width rather than breaking. */
.ed-row .ed-input.md { flex:0 0 155px; }
@supports (field-sizing: content) {
  .ed-row .ed-input.md {
    flex:0 1 auto;
    width:auto;
    field-sizing:content;
    /* Floor matches the fallback so the field never starts smaller than it used
       to; ceiling stops a long amount squeezing the ingredient NAME beside it,
       which is flex:1 and would be the thing that gives. */
    min-width:155px;
    max-width:260px;
  }
}
.ed-delbtn { width:36px; height:36px; min-width:36px; border-radius:8px; border:none; background:#ffe8e8; color:var(--red); font-size:1.1rem; font-weight:900; cursor:pointer; margin-top:4px; flex-shrink:0; }
.ed-delbtn:hover { background:var(--red); color:white; }
.ed-dupbtn { width:36px; height:36px; min-width:36px; border-radius:8px; border:none; background:#f3eeff; color:var(--purple); font-size:1rem; cursor:pointer; margin-top:4px; flex-shrink:0; }
.ed-dupbtn:hover { background:var(--purple); color:white; }
.ed-stepnum { min-width:32px; height:32px; border-radius:50%; background:var(--red); color:white; font-size:.88rem; font-weight:900; display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:6px; }
.drag-handle { cursor:grab; padding:.3rem .4rem; color:#bbb; font-size:1.1rem; line-height:1; user-select:none; flex-shrink:0; border-radius:6px; margin-top:6px; }
.drag-handle:hover { color:#7c3aed; background:#f3eeff; }
.drag-handle:active { cursor:grabbing; }
.ed-step-block.dragging { opacity:.35; }
.ed-move-btns { display:flex; flex-direction:column; gap:2px; flex-shrink:0; }
.ed-move-btn { width:28px; height:28px; border-radius:6px; border:1.5px solid #c4b5fd; background:#f0eaff; color:#7c3aed; font-size:.85rem; font-weight:900; cursor:pointer; display:flex; align-items:center; justify-content:center; line-height:1; padding:0; transition:background .15s; }
.ed-move-btn:hover { background:#c4b5fd; }
.ed-move-btn:disabled { opacity:.3; cursor:default; }
.ed-step-block.drag-over-above { border-top:3px solid #7c3aed !important; }
.ed-step-block.drag-over-below { border-bottom:3px solid #7c3aed !important; }
.ed-addbtn { width:100%; padding:.6rem; border-radius:9px; border:1.5px dashed #c4b5fd; background:transparent; font-family:'Nunito',sans-serif; font-size:.92rem; font-weight:800; color:var(--purple); cursor:pointer; margin-top:.5rem; }
.ed-addbtn:hover { background:var(--purple-light); }

/* Emoji picker input */
.ed-emoji-pick { flex:0 0 58px; width:58px; text-align:center; font-size:1.8rem; padding:.3rem .2rem; cursor:pointer; border-radius:12px; border:2px solid #c4b5fd; background:#f3eeff; line-height:1; }
.ed-emoji-pick:focus { border-color:var(--purple); outline:none; }

.ed-upload-btn { display:inline-flex; align-items:center; gap:6px; padding:.55rem 1rem; border-radius:10px; border:2px solid var(--purple); background:var(--purple-light); color:var(--purple); font-family:'Nunito',sans-serif; font-size:.88rem; font-weight:800; cursor:pointer; transition:all .2s; }
.ed-upload-btn:hover { background:var(--purple); color:white; }
.ed-upload-btn input[type=file] { display:none; }
.ed-preview { display:none; max-width:120px; max-height:80px; border-radius:8px; object-fit:cover; border:2px solid #ede8ff; margin-top:.4rem; }
.ed-preview.show { display:block; }
.ed-step-img-wrap { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:.5rem; }
/* Remove follows the picture. Every path that puts one on a step sets .show on
   the preview and every path that takes one away removes it, so the button that
   sits immediately after the preview can be driven from that one fact instead
   of from each of the eight places that paint. */
.ed-preview:not(.show) + .ed-img-remove { display:none; }
.vtype-row { display:flex; gap:8px; margin-bottom:.75rem; }
.vtype-btn { flex:1; padding:.5rem; border-radius:10px; border:2px solid #eee; background:white; font-family:'Nunito',sans-serif; font-size:.85rem; font-weight:800; cursor:pointer; color:var(--muted); transition:all .2s; }
.vtype-btn.on { border-color:var(--purple); background:var(--purple-light); color:var(--purple); }

/* Voice settings in editor */
.voice-mode-row { display:flex; gap:8px; margin-bottom:1rem; }
.voice-mode-btn { flex:1; padding:.6rem .5rem; border-radius:10px; border:2px solid #eee; background:white; font-family:'Nunito',sans-serif; font-size:.85rem; font-weight:800; cursor:pointer; color:var(--muted); transition:all .2s; }
.voice-mode-btn.on { border-color:var(--purple); background:var(--purple-light); color:var(--purple); }
.voice-select { width:100%; padding:.75rem 1rem; border-radius:9px; border:1.5px solid #ddd; font-family:'Nunito',sans-serif; font-size:1rem; font-weight:700; outline:none; background:white; margin-bottom:.75rem; }
.voice-select:focus { border-color:var(--purple); }
.range-row { display:flex; align-items:center; gap:12px; margin-bottom:.75rem; }
.range-row label { font-size:.85rem; font-weight:800; color:var(--muted); min-width:55px; text-transform:uppercase; letter-spacing:.04em; }
.range-row input[type=range] { flex:1; accent-color:var(--purple); }
.range-val { font-size:.95rem; font-weight:900; color:var(--purple); min-width:36px; text-align:right; }
.preview-voice-btn { display:flex; align-items:center; gap:8px; padding:.7rem 1.2rem; border-radius:12px; border:2px solid var(--purple); background:var(--purple-light); color:var(--purple); font-family:'Nunito',sans-serif; font-size:.92rem; font-weight:800; cursor:pointer; transition:all .2s; margin-top:.25rem; width:100%; justify-content:center; }
.preview-voice-btn:hover { background:var(--purple); color:white; }
/* Recorder cards */
.rec-card { background:#f9f7ff; border-radius:14px; border:1.5px solid #e8e0ff; padding:.9rem 1rem; display:flex; flex-direction:column; gap:.6rem; margin-bottom:10px; }
.rec-card-top { display:flex; align-items:center; gap:10px; }
.rec-step-label { font-size:.92rem; font-weight:900; color:var(--purple); min-width:54px; flex-shrink:0; }
.rec-step-text { font-size:.82rem; font-weight:700; color:var(--muted); flex:1; line-height:1.3; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.rec-btn { width:44px; height:44px; min-width:44px; border-radius:50%; border:none; cursor:pointer; font-size:1.2rem; display:flex; align-items:center; justify-content:center; transition:all .2s; flex-shrink:0; background:var(--red); color:white; }
.rec-btn:hover { transform:scale(1.08); }
.rec-btn.recording { background:#ff0000; animation:rec-pulse .7s ease-in-out infinite; }
@keyframes rec-pulse { 0%,100%{box-shadow:0 0 0 0 rgba(255,0,0,.5)} 50%{box-shadow:0 0 0 10px rgba(255,0,0,0)} }
.rec-status { font-size:.78rem; font-weight:800; color:var(--red); min-width:52px; text-align:center; }
.rec-audio-row { display:flex; align-items:center; gap:8px; }
.rec-audio-row audio { flex:1; height:30px; }
.rec-clear-btn { padding:.3rem .7rem; border-radius:8px; border:1.5px solid #ddd; background:white; font-family:'Nunito',sans-serif; font-size:.8rem; font-weight:800; color:var(--muted); cursor:pointer; white-space:nowrap; }
.rec-clear-btn:hover { border-color:var(--red); color:var(--red); }

/* action bar */
.s-actions { display:flex; gap:8px; flex-wrap:wrap; padding:1rem 1.25rem; border-top:2px solid #ede8ff; background:white; flex-shrink:0; }
.act { flex:1; min-width:110px; padding:.8rem .5rem; border-radius:12px; border:none; font-family:'Nunito',sans-serif; font-size:.92rem; font-weight:800; cursor:pointer; transition:all .2s; }
.act.save { background:var(--green-ink); color:white; }   /* #252 */
.act.save:hover { background:#1e6b38; }
.act.use { background:var(--purple); color:white; }
.act.use:hover { background:#6d28d9; }
.act.clone { background:var(--yellow-light); color:#7a4f00; border:1.5px solid var(--yellow); }
.act.clone:hover { background:var(--yellow); }
.act.del { background:#ffe8e8; color:var(--red-ink); border:1.5px solid #fca5a5; }   /* #252 */
.act.del:hover { background:var(--red); color:white; }
/* Its own full-width line, so a save message never competes with the buttons
   for room. :empty keeps it from spending a flex gap when there is nothing to
   say — it is blank most of the time. */
.act-msg { flex:0 0 100%; font-size:.85rem; font-weight:800; color:var(--green); }
.act-msg:empty { display:none; }

/* ── THE ⋯ OVERFLOW, PHONES ONLY ───────────────────────────────────
   Wide screens have room for all six and keep them; below 600px the rare four
   collapse into the sheet and the bar drops from 199px to about 71px. */
#act-more { display:none; }

@media (max-width:600px) {
  .s-actions { flex-wrap:nowrap; padding:.7rem .8rem; }
  .s-actions .act { min-width:0; flex:1 1 0; padding:.75rem .4rem; white-space:nowrap;
                    overflow:hidden; text-overflow:ellipsis; }
  /* !important because #act-toolkit carries an inline display from
     applyToolkitGate() in resource-toolkit.js, which would otherwise win. */
  .s-actions .act-rare { display:none !important; }
  #act-more { display:block; flex:0 0 3.2rem; background:#fff; border:2px solid #ddd8ea;
              color:#1a1a1a; font-size:1.3rem; line-height:1; padding:.7rem 0; }
  #act-more:hover { background:#f4f2fb; }
}

.act-sheet-scrim { position:fixed; inset:0; background:rgba(20,12,40,.42); z-index:60; }
.act-sheet { position:fixed; left:0; right:0; bottom:0; z-index:61; background:#fff;
  border-radius:20px 20px 0 0; padding:10px 14px calc(16px + env(safe-area-inset-bottom));
  box-shadow:0 -6px 26px rgba(0,0,0,.2); }
.act-sheet[hidden], .act-sheet-scrim[hidden] { display:none; }
.act-sheet-grab { width:44px; height:5px; border-radius:3px; background:#ddd8ea; margin:2px auto 12px; }
.act-srow { display:flex; align-items:center; gap:12px; width:100%; padding:13px 10px;
  border:none; background:none; font-family:'Nunito',sans-serif; font-size:1rem; font-weight:900;
  color:var(--text); text-align:left; border-radius:12px; cursor:pointer; }
.act-srow + .act-srow { border-top:1.5px solid #f2eefc; }
.act-srow:hover { background:#f7f4ff; }
.act-srow-ico { font-size:1.25rem; width:28px; text-align:center; flex-shrink:0; }
.act-srow small { display:block; font-size:.72rem; font-weight:700; color:#8b86a0; margin-top:1px; }
/* Last, and the only coloured row. It was a full-size button a thumb-width
   from Save, on a screen full of unsaved work. */
.act-srow-danger { color:var(--red-ink); }   /* #252 */
.act-srow-danger:hover { background:var(--red-light); }

/* ── EASY READ OVERRIDES ─────────────────────────────────────── */

/* 1. Hide read-aloud bar */
.speak-btn { display:none !important; }

/* 2. Enlarge step images */
.step-img { min-height:240px; }
.step-img img { max-height:380px; }
.step-img.dual { min-height:280px; }
.step-img.dual .step-img-half { min-height:280px; }

/* 3. Done button — small pill, right-aligned, text only */
.step-card { display:flex; flex-direction:column; }
.tap-prompt {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:.4rem .8rem .6rem auto;
  padding:.55rem 1.2rem;
  border-radius:50px;
  background:#2d8a4e;
  border:1.5px solid #1e6b38;
  color:white;
  font-family:'Nunito',sans-serif;
  font-size:.9rem;
  font-weight:900;
  width:auto;
  line-height:1;
}
.tap-prompt:hover { background:#1e6b38; transform:scale(1.04); }

/* 6. Remove small Done! badge */
.done-badge { display:none; }

/* 7. Root font size for easy read */
:root { font-size:20px; }

/* 8. Step text easy read styling */
.step-text {
  font-size:16pt;
  font-weight:700;
  line-height:1.7;
  font-style:normal;
  color:#1a1a1a;
  letter-spacing:.01em;
  cursor:pointer;
}

/* 5. Audio icon removed from step text but hover kept */
.step-text::after { content:''; }
.step-text.speaking::after { content:none; }
.step-text:hover {
  color:#7c3aed;
  text-decoration:underline;
  text-decoration-color:rgba(124,58,237,.5);
  text-underline-offset:4px;
  transition:color .15s;
}

/* 9. Clear hover states on all clickable elements */
.landing-card:hover { transform:translateY(-3px); box-shadow:0 8px 28px rgba(0,0,0,.18); border-color:#a89fe0; }
.check-item:not(.done):hover { border-color:#7c3aed; background:#faf8ff; transform:translateY(-1px); box-shadow:0 4px 16px rgba(124,58,237,.12); }
/* Not on the chosen tab, and only where a pointer really hovers (Therese,
   23 Nov 2026): this rule turned the chosen tab's words purple on its orange,
   and an iPad keeps "hover" on the last tab tapped, so the chosen tab stayed
   purple on orange and hard to read. */
@media (hover:hover) { .tab-btn:not(.active):hover { border-color:#7c3aed; color:#7c3aed; background:#faf8ff; } }
.tap-prompt:hover { background:#1e6b38; transform:scale(1.04); }
.step-timer-btn:hover { background:#c0311a; transform:scale(1.02); }
.reset-btn:hover { border-color:var(--red); color:var(--red); }
.lib-card:hover { border-color:var(--purple); background:#faf8ff; transform:translateY(-2px); box-shadow:0 4px 16px rgba(124,58,237,.12); }
.cfg-row:hover { background:#f0eaff; cursor:pointer; }
.act:hover { filter:brightness(.92); transform:scale(1.02); }
.pdf-btn:hover { filter:brightness(.92); transform:translateY(-1px); }

/* 10. Recipe card titles — click to speak */
.landing-card-title {
  cursor:pointer;
  transition:color .15s;
}
.landing-card-title:hover {
  color:#7c3aed;
  text-decoration:underline;
  text-underline-offset:3px;
}

/* 11. Category heads — hover feedback */
.landing-col-head {
  cursor:pointer;
  transition:filter .15s, transform .15s;
}
.landing-col-head:hover { filter:brightness(.94); transform:scale(1.03); }

/* 13. Category drill-down */
#cat-view { display:none; }
#cat-view.active { display:block; }
#cat-view-back { display:flex; align-items:center; justify-content:center; width:52px; height:52px; background:white; border:2px solid #b2dfdb; color:#0a9688; font-size:1.6rem; border-radius:50%; cursor:pointer; margin-bottom:1.2rem; transition:all .2s; box-shadow:0 2px 8px rgba(10,150,136,.1); }
#cat-view-back:hover { border-color:#0a9688; background:#e0f5f3; transform:scale(1.08); }
#cat-view-title { font-size:1.6rem; font-weight:900; margin-bottom:1.2rem; display:flex; align-items:center; gap:10px; }
/* Search inside a tile (Joe, 29 Oct 2026). Big enough for a pupil's finger. */
#cat-view-search-wrap { margin:-.4rem 0 1.1rem; }
#cat-view-search { width:100%; max-width:460px; box-sizing:border-box; font-family:'Nunito',sans-serif; font-size:1.1rem; font-weight:800;
  padding:.75rem 1rem; border:2px solid #b2dfdb; border-radius:14px; background:#fff; color:inherit; outline:none; }
#cat-view-search:focus { border-color:#0a9688; box-shadow:0 0 0 3px rgba(10,150,136,.15); }
#cat-view-none { color:#999; font-weight:800; padding:1rem; }
#cat-view-cards [hidden] { display:none !important; }   /* a card the search hides; .mp-card sets its own display */
/* The same grid as the meal planner's picker (.mp-grid in app-shopping.js),
   because it holds the same card. At minmax(200px) the cards were narrower than
   the card was designed for and every title of more than two words wrapped to
   three lines - "7 Veg Tomato Sauce" over three, next to the planner's one. */
#cat-view-cards { display:grid; gap:1rem; align-content:start;
  grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); }
@media (min-width:900px) {
  #cat-view-cards { grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); }
}

/* 15. Cinchify branding & colour scheme */
#landing { background:#f4faf9; }
.landing-header { background:white; border-bottom:1px solid #e0f2f0; padding:1rem 2rem; box-shadow:0 2px 12px rgba(10,150,136,.07); }
.landing-logo h1 { color:#1a73e8; font-size:1.9rem; }
.landing-logo h1 span { color:#f57c00; }
@media(max-width:600px) {
  .landing-logo-icon { height:48px; width:auto; }
  .landing-logo-icon img { height:48px; width:auto; }
  .landing-logo h1 { font-size:1.3rem; }
}
.landing-col-head.breakfast { background:#fff; color:#c47000; border:2px solid #f5d08a; }
.landing-col-head.lunch     { background:#fff; color:#007a6e; border:2px solid #80cbc4; }
.landing-col-head.dinner    { background:#fff; color:#c0280a; border:2px solid #ef9a9a; }
.landing-col-head.dessert   { background:#fff; color:#b0005e; border:2px solid #f48fb1; }
.landing-col-head.mealprep  { background:#fff; color:#2d6a30; border:2px solid #a5d6a7; }
/* Custom (user-added) categories — same tile look as built-ins, cycling 6 colours */
.landing-col-head.custom { background:#fff; }
.landing-col-head.custom-0 { color:#7c3aed; border:2px solid #d8c8ff; }
.landing-col-head.custom-1 { color:#0d7a8a; border:2px solid #a0dce5; }
.landing-col-head.custom-2 { color:#b85c00; border:2px solid #f5ca90; }
.landing-col-head.custom-3 { color:#a01050; border:2px solid #f0a8c8; }
.landing-col-head.custom-4 { color:#2d6a30; border:2px solid #a8d8aa; }
.landing-col-head.custom-5 { color:#1e4080; border:2px solid #aac8f0; }
.step-card { border:4px solid #b2dfdb; }
.step-card:hover { border-color:#0a9688; box-shadow:0 10px 36px rgba(10,150,136,.2); }
.step-card.active-step { border:6px solid #0a9688; box-shadow:0 0 0 4px rgba(10,150,136,.2); }
.s-panel { background:#ffffff; }

/* 17. Deep two-layer shadow */
--shadow: 0 4px 18px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06);
.check-item { box-shadow:0 4px 18px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06); }
.step-card { box-shadow:0 10px 30px rgba(0,0,0,.22), 0 2px 8px rgba(0,0,0,.12); }
.tab-btn { box-shadow:0 4px 18px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06); }
.hero-box { box-shadow:0 4px 18px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06); }
.video-wrap { box-shadow:0 4px 18px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06); }

/* 18. Recipe card title typography */
.landing-card-title { font-size:1rem; font-weight:700; color:#1a3a38; letter-spacing:-.01em; cursor:pointer; transition:color .15s; }
.landing-card-title:hover { color:#0a9688; text-decoration:underline; text-underline-offset:3px; }
.landing-card-body { padding:.85rem 1rem 1rem; border-top:1.5px solid #f0f4f4; }
.landing-card { border:1px solid #e0eeec; border-radius:18px; box-shadow:0 2px 16px rgba(10,150,136,.08); }


/* ── BUTTON PRESS FEEDBACK ─────────────────────────────
   Clear visual reaction on every button when clicked. */
button, .back-btn, .tab-btn, .pdf-btn, .cfg-save-btn,
.speak-btn, .step-timer-btn, .tap-prompt, .reset-btn,
[role="button"], .timer-btn {
  transition: transform .08s ease, box-shadow .12s ease, filter .12s ease;
}
button:hover, .back-btn:hover, .tab-btn:hover, .pdf-btn:hover,
.cfg-save-btn:hover, [role="button"]:hover {
  filter: brightness(1.05);
}
button:active, .back-btn:active, .tab-btn:active, .pdf-btn:active,
.cfg-save-btn:active, .speak-btn:active, .step-timer-btn:active,
.tap-prompt:active, .reset-btn:active, [role="button"]:active,
.timer-btn:active {
  transform: scale(.94);
  filter: brightness(.95);
  box-shadow: 0 1px 4px rgba(0,0,0,.18) inset;
}
/* ...but NOT on a touchscreen. :active means "the finger is down" on a mouse
   and comes off at mouse-up; on a tablet the browser leaves it on the last
   thing tapped until something else is tapped. So the Done switch ran its pop,
   ended the animation at scale(1), and then dropped straight back to the .94
   press state and STAYED there — the "popped out and never came back to the
   size it was" report (Sept 2026). It also moves the button's edge out from
   under a finger resting on it, which is one way a tap lands on the card
   instead of the switch and appears to do nothing. Touch keeps the darken,
   which needs no geometry. */
@media (hover:none) {
  button:active, .back-btn:active, .tab-btn:active, .pdf-btn:active,
  .cfg-save-btn:active, .speak-btn:active, .step-timer-btn:active,
  .tap-prompt:active, .reset-btn:active, [role="button"]:active,
  .timer-btn:active {
    transform: none;
    box-shadow: none;
  }
}

/* ── STICK-TO-RECIPE TOGGLE SWITCH ─────────────────────── */
.strict-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #cfc6e8; border-radius: 26px; transition: background .2s;
}
.strict-slider::before {
  content: ""; position: absolute; height: 20px; width: 20px;
  left: 3px; bottom: 3px; background: #fff; border-radius: 50%;
  transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
/* #297: the Word for word switch shares this slider but its input has its own
   class (.verbatim-toggle-input — app-auth.js syncs both lists by class), so it
   was only ever styled OFF: it switched on and never looked it. */
.strict-toggle-input:checked + .strict-slider,
.verbatim-toggle-input:checked + .strict-slider,
.safety-toggle-input:checked + .strict-slider,
.compost-toggle-input:checked + .strict-slider,
.setup-toggle-input:checked + .strict-slider { background: #7c3aed; }   /* #395 */
.enhance-toggle-input:checked + .strict-slider { background: #7c3aed; }   /* #269 */
.strict-toggle-input:checked + .strict-slider::before,
.verbatim-toggle-input:checked + .strict-slider::before,
.safety-toggle-input:checked + .strict-slider::before,
.compost-toggle-input:checked + .strict-slider::before,
.setup-toggle-input:checked + .strict-slider::before { transform: translateX(20px); }

/* #477: the school's own words for the set-up steps, under that switch. */
.setup-wording { margin-top: .45rem; }
.setup-wording summary { cursor: pointer; font-size: .78rem; font-weight: 900; color: #534AB7; }
.setup-wording-help { font-size: .72rem; font-weight: 700; color: var(--muted,#777); line-height: 1.35; margin: .35rem 0; }
.setup-wording-row { display: flex; gap: .55rem; align-items: flex-start; margin: .45rem 0; }
.setup-wording-row .sw-pic { width: 56px; height: 56px; flex: none; object-fit: cover; border-radius: 8px; border: 1.5px solid #e6e0f5; background: #f8f5ff; }
.setup-wording-row .sw-main { flex: 1; min-width: 0; }
.setup-wording-row .sw-pic-btns { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; }
.setup-wording-row .sw-pic-btns button { font-family: Nunito, sans-serif; font-size: .75rem; font-weight: 800; padding: .3rem .65rem; border-radius: 999px; border: 1.5px solid #c4b5fd; background: #fff; color: #534AB7; cursor: pointer; }
.setup-wording-row .sw-pic-btns .sw-pic-reset { border-color: #ddd; color: #5b5675; }
.setup-wording-row input { width: 100%; box-sizing: border-box; font-family: Nunito, sans-serif; font-size: .82rem; font-weight: 700;
  padding: .45rem .6rem; border: 2px solid #d9d2f0; border-radius: 10px; background: #fff; color: #1a1a1a; }
.setup-wording-row input::placeholder { color: #9a93b8; }
.setup-wording-msg { font-size: .72rem; font-weight: 800; color: #2d8a4e; margin: .2rem 0 0; min-height: 1em; }
.enhance-toggle-input:checked + .strict-slider::before { transform: translateX(20px); }
.strict-toggle-input:focus-visible + .strict-slider,
.verbatim-toggle-input:focus-visible + .strict-slider,
.safety-toggle-input:focus-visible + .strict-slider,
.compost-toggle-input:focus-visible + .strict-slider,
.setup-toggle-input:focus-visible + .strict-slider { outline: 3px solid #7c3aed; outline-offset: 2px; }
.enhance-toggle-input:focus-visible + .strict-slider { outline: 3px solid #7c3aed; outline-offset: 2px; }

/* ── HOME ICON BUTTON (was "Choose another recipe") ────── */
.back-btn.home-btn {
  gap: 0;
  padding: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  justify-content: center;
  overflow: hidden;
  transition: width .25s ease, border-radius .25s ease, background .2s;
}
.back-btn.home-btn .home-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}
.back-btn.home-btn .home-btn-label {
  max-width: 0;
  opacity: 0;
  white-space: nowrap;
  overflow: hidden;
  transition: max-width .25s ease, opacity .2s ease, margin .25s ease;
  font-size: 1.05rem;
  font-weight: 900;
}
/* Reveal the label on hover or keyboard focus */
.back-btn.home-btn:hover,
.back-btn.home-btn:focus-visible {
  width: 150px;
  border-radius: 50px;
}
.back-btn.home-btn:hover .home-btn-label,
.back-btn.home-btn:focus-visible .home-btn-label {
  max-width: 220px;
  opacity: 1;
  margin-left: 10px;
}

/* ── STEP BOTTOM ROW ───────────────────────────────────── */
/* The Done switch is a flex child of .step-bot (margin-left:auto pushes it
   to the right), so no manual right padding reserve is needed. */
.step-bot { padding-right: 1.35rem; }

/* ── MY RECIPES: CATEGORY TILES + SEARCH ───────────────── */
.lib-section-heading {
  font-size: 1.15rem; font-weight: 900; color: var(--text);
  padding: .2rem .25rem .9rem; letter-spacing: -.01em;
}
.lib-cat-tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.lib-cat-tile {
  background: white; border: 2px solid #ede8ff; border-radius: 16px;
  padding: 1.3rem 1rem; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.lib-cat-tile:hover, .lib-cat-tile:focus-visible {
  border-color: var(--purple); background: #faf8ff;
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(124,58,237,.14);
  outline: none;
}
.lib-cat-tile-emoji { font-size: 2.6rem; line-height: 1; }
.lib-cat-tile-label { font-size: 1.02rem; font-weight: 900; color: var(--text); }
.lib-cat-tile-count { font-size: .8rem; font-weight: 700; color: var(--muted); }

/* category header (back + title) */
.lib-cat-header { display: flex; align-items: center; gap: 12px; margin-bottom: .9rem; }
.lib-cat-back {
  flex-shrink: 0; padding: .45rem .9rem; border-radius: 50px;
  border: 2px solid #ede8ff; background: #faf8ff; color: var(--purple);
  font-family: 'Nunito', sans-serif; font-size: .85rem; font-weight: 900; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.lib-cat-back:hover { background: #ede8ff; border-color: var(--purple); }
.lib-cat-header-title { font-size: 1.15rem; font-weight: 900; color: var(--text); }

/* search bar */
.lib-search-wrap { margin-bottom: .9rem; }
.lib-search-input {
  width: 100%; box-sizing: border-box; padding: .7rem 1rem;
  border-radius: 12px; border: 2px solid #ede8ff; background: white;
  font-family: 'Nunito', sans-serif; font-size: .95rem; font-weight: 700; color: var(--text);
  outline: none; transition: border-color .15s;
}
.lib-search-input:focus { border-color: var(--purple); }

/* recipe results reuse .lib-card; just stack them */
.lib-cat-results { display: flex; flex-direction: column; gap: 10px; }

/* ── CATEGORY PAGE: CONTROLS ROW + PAGINATION ──────────── */
.lib-controls {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: .9rem;
}
.lib-controls .lib-search-input { flex: 1 1 240px; margin-bottom: 0; }
/* #431: search across every category, on the My Recipes tiles page */
.lib-all-count { margin: 0 0 .6rem; text-align: left; }
.lib-card-cat { color: var(--purple); font-weight: 900; }
.lib-perpage {
  flex-shrink: 0; font-family: 'Nunito', sans-serif; font-size: .85rem;
  font-weight: 800; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.lib-perpage-select {
  font-family: 'Nunito', sans-serif; font-size: .85rem; font-weight: 800; color: var(--text);
  padding: .4rem .5rem; border-radius: 8px; border: 2px solid #ede8ff; background: white; cursor: pointer;
}
.lib-perpage-select:focus { outline: none; border-color: var(--purple); }

.lib-pager {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 6px; margin-top: 1.1rem;
}
.lib-page-btn {
  min-width: 38px; padding: .45rem .7rem; border-radius: 9px;
  border: 2px solid #ede8ff; background: white; color: var(--text);
  font-family: 'Nunito', sans-serif; font-size: .85rem; font-weight: 900; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.lib-page-btn:hover:not(:disabled):not(.active) { border-color: var(--purple); background: #faf8ff; }
.lib-page-btn.active { background: var(--purple); border-color: var(--purple); color: white; cursor: default; }
.lib-page-btn:disabled { opacity: .4; cursor: default; }
.lib-page-info {
  width: 100%; text-align: center; margin-top: .5rem;
  font-family: 'Nunito', sans-serif; font-size: .78rem; font-weight: 700; color: var(--muted);
}

/* ── CATEGORY RECIPE PAGE (its own sliding screen) ─────── */
.cat-screen { background:#f8f5ff; }
.cat-pane { flex:1; overflow-y:auto; padding:1.25rem; padding-bottom:24px; }

/* ── CATEGORY PAGE: RECIPE TILES (home-page style) ─────── */
.lib-recipe-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.lib-recipe-tiles .landing-card { position: relative; }
.lib-recipe-tiles .landing-card .lib-card-meta {
  font-size: .78rem; font-weight: 700; color: var(--muted);
}
.lib-recipe-tiles .landing-card.lib-tile-live { border-color: var(--green); }
.lib-tile-live-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: var(--green); color: #fff; font-family: 'Nunito', sans-serif;
  font-size: .68rem; font-weight: 900; padding: .2rem .55rem; border-radius: 50px;
  letter-spacing: .04em; box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

/* ============================================================
   VISUAL REDESIGN — one orange accent, white surfaces, black
   Title-Case labels. Appended last so it wins the cascade.
   To match your logo exactly, change --accent below (one value).
   ============================================================ */
:root {
  --accent:        #F26A21;
  --accent-strong: #d8571a;
  --ink:           #1a1a1a;
  --hair:          #ececec;
}

/* Page + header */
#landing { background:#ffffff; }
.landing-header {
  background:#ffffff;
  border-bottom:1px solid var(--hair);
  box-shadow:none;
}
.landing-logo h1 { color:var(--ink); }
.landing-logo h1 span { color:var(--accent); }

/* Category cards — single accent, black labels, big icon */
.landing-col-head,
.landing-col-head.breakfast,
.landing-col-head.lunch,
.landing-col-head.dinner,
.landing-col-head.dessert,
.landing-col-head.mealprep,
.landing-col-head.custom,
.landing-col-head.custom-0,
.landing-col-head.custom-1,
.landing-col-head.custom-2,
.landing-col-head.custom-3,
.landing-col-head.custom-4,
.landing-col-head.custom-5 {
  background:#ffffff;
  color:var(--ink);
  border:2px solid var(--accent);
  border-radius:16px;
  padding:1.6rem 1rem 1.3rem;
  box-shadow:0 1px 3px rgba(0,0,0,.05);
  transition:transform .15s, box-shadow .15s;
}
.landing-col-head:hover {
  filter:none;
  transform:translateY(-3px);
  box-shadow:0 8px 22px rgba(242,106,33,.18);
}
.landing-col-head .col-emoji { font-size:3rem; margin-bottom:.35rem; line-height:1; }
.landing-col-head .col-label {
  color:var(--ink);
  font-size:1.15rem;
  font-weight:900;
  letter-spacing:0;
  text-transform:none;
}

/* Footer + settings button — calmer, on-brand */
#app-footer { border-top:1px solid var(--hair); }
#settings-fab {
  background:var(--accent);
  box-shadow:0 3px 12px rgba(242,106,33,.35);
}
#settings-fab:hover {
  box-shadow:0 8px 26px rgba(242,106,33,.5);
}

/* Redesign — mobile tuning */
@media(max-width:600px) {
  .landing-header { padding:.85rem 1rem; }
  .landing-col-head { padding:1.15rem .6rem .95rem; border-radius:14px; }
  .landing-col-head .col-emoji { font-size:2.4rem; }
  .landing-col-head .col-label { font-size:1rem; }
}

/* Redesign — force equal-width columns (clamp min-content so no column can grow wider) */
.landing-cols { grid-template-columns:repeat(5, minmax(0,1fr)); }
@media(max-width:800px) { .landing-cols { grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media(max-width:440px)  { .landing-cols { grid-template-columns:repeat(2, minmax(0,1fr)); } }

/* ============================================================
   REDESIGN — recipe view + step cards onto the accent
   ============================================================ */
/* Recipe header + tabs + primary buttons */
header { background:var(--accent); }
.tab-btn.active { background:var(--accent); border-color:var(--accent); }
.tab-btn:not(.active):hover { border-color:var(--accent); color:var(--accent); }
.prog-fill { background:var(--accent); }
.step-num { background:var(--accent); }
.next-step-btn { background:var(--accent); border-color:var(--accent); }
.next-step-btn:hover { background:var(--accent-strong); border-color:var(--accent-strong); }
.done-banner { background:var(--accent); }
.pdf-btn { background:var(--accent); box-shadow:0 4px 18px rgba(242,106,33,.35); }

/* Step cards — clean, subtle, premium (done state stays green) */
.step-card { border:1px solid var(--hair); border-radius:20px; box-shadow:0 2px 10px rgba(0,0,0,.06); }
.step-card:hover { border-color:#d9d2c9; box-shadow:0 6px 22px rgba(0,0,0,.10); }
.step-card.active-step { border:7px solid var(--sel); box-shadow:0 0 0 1px var(--sel-edge), 0 10px 40px rgba(0,0,0,.22); }

/* When an ingredient is ticked off (greened), hide the number boxes and the
   measuring-tool image — keep the thumbnail, the label and the tick. */
.check-item.done .mstep-group,
.check-item.done > img:not(:first-child) { display:none !important; }

/* Redesign — larger category cards, larger icons, max 4 per row */
.landing-cols { grid-template-columns:repeat(4, minmax(0,1fr)); gap:26px; }
.landing-col-head { padding:2.4rem 1.2rem 1.9rem; }
.landing-col-head .col-emoji { font-size:4.2rem; margin-bottom:.5rem; }
.landing-col-head .col-label { font-size:1.35rem; }
@media(max-width:980px) { .landing-cols { grid-template-columns:repeat(3, minmax(0,1fr)); } }
@media(max-width:680px) {
  .landing-cols { grid-template-columns:repeat(2, minmax(0,1fr)); gap:16px; }
  .landing-col-head { padding:1.5rem .7rem 1.2rem; }
  .landing-col-head .col-emoji { font-size:3rem; }
  .landing-col-head .col-label { font-size:1.1rem; }
}

/* Icon field reads as tappable */
.ed-emoji-pick { transition:border-color .15s, background .15s; }
.ed-emoji-pick:hover { border-color:var(--purple); background:#ece4ff; }

/* ============================================================
   MOBILE TUNING — recipe view (phones)
   Text sizing is handled in app.js (the large "student view" text is
   set there with !important in a stylesheet that loads after this one,
   so it can only be shrunk there). THIS block handles LAYOUT: it slims
   the oversized product/measuring-tool images, the step number circle
   and the tick buttons, and tightens padding — so the (still-large)
   labels and step text have room and nothing runs off the screen edge.
   Rules that fight app.js's inline sizes use !important on purpose.
   ============================================================ */
@media (max-width:600px) {
  /* reclaim horizontal space so rows aren't crammed against the edge */
  header { padding:1.5rem 1rem 2rem; }
  /* Landing: drop the "My Recipes" heading on phones — it wraps awkwardly into
     a narrow column beside the logo. The logo alone reads fine. */
  #app-title-display { display:none; }
  /* No room for the "© clickeasy.ie" copyright in the footer on phones — hide it
     so the email/logout pill has space. */
  #app-footer .footer-center { display:none; }
  /* Recipe cards were nearly invisible against the light background — give them
     a clear border and a soft layered shadow for a modern, defined card look. */
  .landing-card { border:1.5px solid #e2ddf1; border-radius:18px;
                  box-shadow:0 8px 22px rgba(24,20,45,.13), 0 2px 6px rgba(24,20,45,.06); }
  .landing-card:active { transform:scale(.99); }
  /* Print / Save as PDF: was wrapping to two lines and looked chunky. Make it a
     clean, full-width, single-line button. */
  .pdf-section { margin-top:1.6rem; padding-top:1.4rem; }
  .pdf-btn { display:flex; width:100%; justify-content:center; padding:.95rem 1rem;
             font-size:1.08rem; white-space:nowrap; border-radius:14px; gap:8px; }
  .pdf-btn .pdf-icon { font-size:1.3rem; }
  /* "Ingredients"/"Steps" proceed button was a narrow 1/3-width square, so the
     label wrapped and the emoji looked tiny. Make it full-width, one line, with
     a bigger emoji and text. */
  .next-step-btn { width:100% !important; flex-direction:row !important; gap:10px;
                   padding:1.05rem 1.2rem !important; font-size:1.3rem !important;
                   white-space:nowrap; border-radius:16px; }
  /* Home button: applyMiscFixes() sets a 100px left margin (to clear the desktop
     logo), which on a narrow phone pushes this 60px circle into the middle of the
     banner. Pin it to the top-left corner where a home control belongs. */
  .back-btn.home-btn { margin-left:0 !important; }
  /* Don't pull the image up into the banner's curved edge (it reads as a
     collision). Let the curve finish, then drop the image into a clean,
     even gap below it so it floats as its own tidy card. */
  .hero-wrap { padding:0 .7rem; top:0; margin-top:16px; }
  .hero-box img { max-height:300px; }
  main { padding:1.2rem .65rem 5rem; }
  .section-title, .steps-section-title { font-size:1.3rem; margin-bottom:.9rem; }

  /* tabs: 2 per row (2x2 grid) on phones — four across is too cramped.
     grid 1fr/1fr keeps every button the same width; align stretch keeps
     the two buttons in each row the same height. */
  .tabs { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:1.1rem; }
  .tab-btn { padding:.85rem .5rem; border-width:2px; border-radius:12px; line-height:1.2; }

  /* ── Ingredient + equipment rows (special-needs friendly) ──
     The measuring tools / count boxes move to their OWN full-width row BENEATH
     the item name + amount, so they can be big, easy-to-tap targets. The done
     tick stays on the top row and is enlarged too.
     Row 1: [image] [name + amount] [big done tick]
     Row 2: [ measuring tools / count boxes — large ]                        */
  .check-item { flex-wrap:wrap; align-items:center; row-gap:12px; column-gap:10px;
                padding:.85rem .8rem; border-radius:16px; }
  .check-item > img:first-of-type { width:6.5rem !important; height:6.5rem !important;
                      min-width:6.5rem !important; border-radius:14px !important; }
  .check-item .eml { font-size:3.3rem; width:7.25rem; height:7.25rem; min-width:7.25rem; border-radius:14px; }
  /* min-width:min-content (role test Q5, 18 Nov 2026): with big text on a
     390px phone, "Dishwasher" was wider than the room beside the picture and
     ran under the tick box (min-width:0 let the box shrink below the word).
     Now the name is never narrower than its longest word, so when the word
     does not fit the row wraps and the tick drops under the name, at the
     right. Big text and the big picture stay; no word is broken. */
  .check-item .lbl { flex:1 1 0; min-width:min-content; }
  .check-item .amt { white-space:normal; }
  /* Big done tick — sits AFTER the boxes/tools, pushed to the RIGHT so it's
     under the thumb of the hand holding the phone. */
  .chk.done-switch, .done-switch.chk-box { margin-left:auto !important; min-width:68px !important;
                                           width:68px !important; height:60px !important; font-size:2.1rem !important; }
  /* Measuring tools: a tidy, UNIFORM grid of tap-tiles on their own full-width
     row. Every tile is the same size with the same soft background and subtle
     border; the clunky "+" separators are dropped and equal gaps do the
     spacing, so e.g. three scoops sit neatly on one row. */
  .check-item .mstep-group { display:flex !important; flex-wrap:wrap; flex:1 1 100%; width:100%;
                             justify-content:flex-start; gap:8px !important; margin:4px 0 2px; }
  .check-item .mstep-group > span { display:none !important; }   /* remove the "+" separators */
  .mstep-img { height:4.1rem !important; width:3.6rem !important; min-width:3.6rem !important;
               padding:6px !important; background:#f6f5fb !important; border:1px solid #e8e5f3 !important;
               border-radius:12px !important; box-sizing:border-box; }
  .mstep-img img { max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important; }
  /* count boxes match the tile styling; four still fit on one row */
  .mstep-btn.count-box { width:56px !important; height:56px !important; font-size:1.35rem !important;
                         background:#f6f5fb !important; border:1px solid #e8e5f3 !important; }

  /* Checklist completion: drop the "DONE!" banner and the "Start this list
     again" link on the Equipment/Ingredients tabs — the next-section button
     (e.g. "Ingredients") is the one clear action to keep. The final
     "ALL DONE ⭐" reward on the Steps tab is left in place. */
  #eq-done, #ing-done { display:none !important; }
  .restart-link { display:none !important; }

  /* ── Step cards ──
     The tick is pinned to the card's bottom-right corner (in app.js), so
     the text now spans the full width. Reserve a band at the bottom of the
     card for that corner tick, and shrink the number circle. */
  .step-bot { gap:10px; padding:1rem .9rem 4rem; }
  .step-num { min-width:50px; height:50px; border-width:2px; }
  .step-card .done-switch.chk-style { min-width:58px; height:50px; padding:0 10px; }
  .step-img { min-height:120px; }
  .step-img img { max-height:230px; }
  .step-timer-btn { font-size:1.05rem; }

  /* timer bar: keep it compact on phones. The icon + label share one row
     (previously the label was forced to its own line, making the bar tall),
     and the progress bar is thinned right down. */
  .timer-bar { margin-bottom:12px; border-width:2px; }
  .timer-top { flex-wrap:wrap; row-gap:6px; column-gap:8px; padding:.5rem .7rem; }
  .timer-icon { font-size:1.25rem; }
  .timer-label { flex:1 1 auto; font-size:.8rem; line-height:1.25; }
  .timer-display { font-size:1.55rem; }
  .timer-controls { flex-wrap:nowrap; gap:6px; }
  .timer-btn { padding:.4rem .7rem; font-size:.82rem; }
  .timer-progress-wrap { height:10px; }

  /* info chips a touch tighter */
  .info-bar { gap:8px; margin-bottom:1.4rem; }
  .chip { padding:.5rem .95rem; }
}

/* very narrow phones (≤380px): trim only the product image; the measuring
   tools and tick stay large since they have their own full-width row */
@media (max-width:380px) {
  main { padding:1.1rem .5rem 5rem; }
  .check-item > img:first-of-type { width:5.5rem !important; height:5.5rem !important; min-width:5.5rem !important; }
  .check-item .eml { width:6rem; height:6rem; min-width:6rem; font-size:2.9rem; }
  .mstep-btn.count-box { width:52px !important; height:52px !important; }
  .step-num { min-width:44px; height:44px; }
}


/* #210: a recipe marked finished has its pictures locked — every button that
   would spend money on a picture is hidden (the functions refuse as well). */
#ed-pane.pics-locked [data-act="gen-step-img"],
#ed-pane.pics-locked [data-act="convert-photoreal"],
#ed-pane.pics-locked #ed-make-missing,
#ed-pane.pics-locked .item-ai-gen { display: none !important; }


/* #396: a step switched off from view — still in the editor, clearly marked. */
.ed-hidebtn { border: 1.5px solid #ede8ff; background: #fff; border-radius: 8px; padding: .25rem .45rem; font-size: 1rem; cursor: pointer; margin-left: 4px; }
.ed-step-block .ed-hidden-note { display: none; }
.ed-step-block.step-hidden { opacity: .6; border-style: dashed !important; }
.ed-step-block.step-hidden .ed-hidden-note { display: block; font-size: .78rem; font-weight: 800; color: #6b7280; margin: -.2rem 0 .5rem; }
.ed-step-block.step-hidden .ed-hidebtn { background: #f3f4f6; }

/* #252 — skip link. Off screen until it has keyboard focus, then a plain
   high-contrast pill at the top left. */
.skip-link { position:absolute; left:8px; top:-60px; z-index:100000; background:#1e1b4b; color:#fff; padding:.6rem 1rem; border-radius:10px; font-family:Nunito,sans-serif; font-weight:900; text-decoration:none; }
.skip-link:focus { top:8px; }
#main-content:focus, #landing-content:focus { outline:none; }

/* #252 — the device's "reduce motion" setting was honoured in four places;
   this honours it everywhere. Animations and transitions finish at once, so
   things still end up where they should (and animationend still fires).
   Loading spinners are left turning: they are the only sign the app is busy,
   and a small ring rotating in place is not the movement this setting is for. */
@media (prefers-reduced-motion: reduce) {
  *:not(.yt-spinner):not(.rtk-sp):not([style*="rtkspin"]), *::before, *::after {
    animation-duration:.01ms !important; animation-iteration-count:1 !important;
    transition-duration:.01ms !important; scroll-behavior:auto !important;
  }
}

/* #402 Independent cooking — the editor switch and each step's ⏳ button. The
   buttons only show while the switch is on (the class sits on the Steps
   section, so an Undo rebuild keeps it). A dashed button is the automatic
   guess; solid is the teacher's own choice. */
.ed-indep-row { display:flex; align-items:flex-start; gap:10px; background:#fff7e6; border:2px solid #f5c26b; border-radius:12px; padding:.6rem .8rem; margin:0 0 .8rem; cursor:pointer; }
.ed-indep-row input { width:20px; height:20px; margin-top:2px; flex:none; accent-color:#d97706; }
.ed-indep-row b { display:block; font-size:.9rem; color:#1a1a1a; }
.ed-indep-row small { display:block; font-size:.74rem; font-weight:700; color:#6b6b6b; line-height:1.35; margin-top:2px; }
.ed-waitbtn { display:none; margin:0 0 .5rem; border-radius:8px; padding:.3rem .7rem; font-family:Nunito,sans-serif; font-size:.8rem; font-weight:800; cursor:pointer; border:2px solid #d6d3d1; background:#fff; color:#57534e; }
.ed-section.indep-on .ed-waitbtn { display:inline-block; }
.ed-waitbtn[aria-pressed="true"] { border-color:#d97706; background:#fff7e6; color:#92400e; }
.ed-waitbtn.ed-wait-auto { border-style:dashed; }

/* #402 Steps tab: while the timer runs, a step that needs the wait is locked —
   dimmed, with "⏳ Wait for the chicken to cook" on it, and a small shake if it
   is tapped (no shake with reduce motion: the global rule stops animations). */
.step-card.st-wait-locked { opacity:.55; }
.st-wait-tag { margin:.5rem .8rem .8rem; background:#fff7e6; border:2px solid #f5c26b; color:#7a4b00; border-radius:12px; padding:.5rem .8rem; font-weight:900; font-size:1.05rem; text-align:center; }
.step-card.st-wait-locked .st-wait-tag { opacity:1; }
@keyframes st-wait-shake { 0%,100% { transform:translateX(0); } 25% { transform:translateX(-6px); } 75% { transform:translateX(6px); } }
.step-card.st-wait-nudge { animation:st-wait-shake .3s ease 2; }
.st-ready-note { background:#d97706 !important; color:#fff !important; border-color:#b45309 !important; font-size:1.25rem !important; }
#st-wait-banner { position:sticky; top:.5rem; z-index:5; }

/* #403 Our kitchen — a slot per appliance: tap the picture to upload. */
.our-kitchen { display:grid; grid-template-columns:repeat(auto-fill, minmax(104px, 1fr)); gap:10px; }
.ok-slot { display:flex; flex-direction:column; align-items:center; gap:4px; background:#fff; border:2px solid #ede8ff; border-radius:14px; padding:8px; font-family:Nunito,sans-serif; }
.ok-pic { position:relative; width:84px; height:84px; border-radius:12px; background:#f6f3ff; display:flex; flex-direction:column; align-items:center; justify-content:center; cursor:pointer; overflow:hidden; }
.ok-pic img { width:100%; height:100%; object-fit:contain; background:#fff; }
.ok-pic input { position:absolute; inset:0; opacity:0; cursor:pointer; }
.ok-emoji { font-size:2rem; line-height:1; }
.ok-add { font-size:.66rem; font-weight:800; color:#7c3aed; margin-top:4px; }
.ok-name { font-size:.8rem; font-weight:900; color:#1a1a1a; text-align:center; }
.ok-remove { border:none; background:none; color:#b42318; font-family:Nunito,sans-serif; font-size:.72rem; font-weight:800; cursor:pointer; padding:0; }
.ok-new { justify-content:center; cursor:pointer; border-style:dashed; color:#7c3aed; font-weight:900; font-size:.85rem; min-height:120px; }
.ok-slot.ok-busy { opacity:.5; }

/* #361 — the editor on a phone (390 px wide). Its header held the back button,
   a recipe name that wrapped onto four lines, Undo/Redo, Admin, Security and
   the close ✕, so the last four ran off the right edge; and each step row put
   the timer, duplicate, hide and delete buttons beside the text box, which was
   squeezed to about one letter wide. On narrow screens only:
   • the name stays on one line (… if long) with ✕ close beside it, and the
     other header buttons (Undo/Redo in the editor, Classes — teachers only —
     Admin, Security) drop to a second row;
   • a step row wraps: the text box takes the width, its buttons go underneath
     (the drag handle is hidden — on a phone the ▲▼ buttons move steps). */
@media (max-width:600px) {
  #settings-overlay .s-head { flex-wrap:wrap; row-gap:.45rem; padding:.7rem .8rem; }
  #settings-overlay .s-head h2 { flex:1 1 0; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:1rem; }
  #settings-overlay .s-head .s-back { padding:.35rem .7rem; font-size:.82rem; flex-shrink:0; }
  #settings-overlay #s-close { order:2; flex-shrink:0; }
  /* The other header buttons go on a second row on every Settings screen —
     sharing the first row cut even "My Recipes" down to its icon. */
  #settings-overlay .s-head::after { content:''; order:3; flex-basis:100%; height:0; }
  #settings-overlay .s-head #ed-undo-box,
  #settings-overlay .s-head #classes-nav-btn,
  #settings-overlay .s-head #adm-open-btn,
  #settings-overlay .s-head #c2fa-open-btn,
  #settings-overlay .s-head .st-topmenu { order:4; margin-left:0; }
  .ed-step-block > .ed-row { flex-wrap:wrap; row-gap:6px; }
  .ed-step-block > .ed-row .ed-step-text { flex:1 1 calc(100% - 100px); min-width:0; }
  .ed-step-block > .ed-row .drag-handle { display:none; }
  /* Equipment and ingredient rows: icon + name on the first line, the amount
     and ✕ underneath — the 155 px amount box pushed ✕ off the edge. */
  .ed-ing-block > .ed-row, .ed-eq-block > .ed-row { flex-wrap:wrap; row-gap:6px; }
  .ed-ing-block > .ed-row .ed-input:not(.sm):not(.md):not(.ed-emoji-pick),
  .ed-eq-block > .ed-row .ed-input:not(.sm):not(.md):not(.ed-emoji-pick) { flex:1 1 calc(100% - 130px); min-width:0; }
  .ed-row .ed-input.md { flex:1 1 auto; min-width:0; }
}

/* #361 — Settings on a phone. A row put its buttons to the RIGHT of the label
   and they never wrapped: "How the serving count looks" squeezed its label to
   one word per line and pushed "Both" off the edge, and the text-size
   controls (100% wide PLUS a 42 px indent) ran off it, so the whole panel
   scrolled sideways. On narrow screens a row wraps instead — the buttons drop
   below the label when there isn't room beside it — and a row of buttons can
   wrap onto a second line. */
@media (max-width:600px) {
  .cfg-row { flex-wrap:wrap; }
  .cfg-row-body { flex:1 1 140px; }
  .cfg-row-right { flex-shrink:1; min-width:0; max-width:100%; box-sizing:border-box; flex-wrap:wrap; }
  .cfg-row-right > div { flex-wrap:wrap; }
  #settings-overlay .s-body { overflow-x:hidden; }
}

/* #361: an empty Our kitchen slot shows the appliance's standard picture,
   faded, with "Add photo" over it (no more frying-egg emoji on the Hob). */
.ok-pic img.ok-ph { position:absolute; inset:6px; width:calc(100% - 12px); height:calc(100% - 12px); object-fit:contain; opacity:.35; background:transparent; }
.ok-pic .ok-add { position:relative; z-index:1; background:rgba(255,255,255,.85); border-radius:6px; padding:1px 5px; white-space:nowrap; }
.ok-pic:has(img.ok-ph) { justify-content:flex-end; padding-bottom:6px; }

/* #405 — edge to edge as a home-screen app. With viewport-fit=cover the page
   runs under the iPhone's status bar and home bar; env(safe-area-inset-*) is
   how far, and is 0 everywhere else (a normal browser tab, Android full-screen,
   a computer), so none of this changes anything there.
   • The time and battery are drawn in white over whatever is beneath them, and
     the home screen's header is white — so a strip of our orange (the recipe
     header's colour) sits behind the status bar on every screen, and the page
     starts below it.
   • The footer, the Settings panel and the page's own bottom padding grow by
     the home-bar height, so nothing a child needs sits under the home bar. */
html::before { content:''; position:fixed; top:0; left:0; right:0; height:env(safe-area-inset-top, 0px); background:var(--accent, #F26A21); z-index:2000; pointer-events:none; }
/* --footer-h is the footer's height (62 px; slimmer on a phone, #406). */
body { padding-top:env(safe-area-inset-top, 0px); padding-left:env(safe-area-inset-left, 0px); padding-right:env(safe-area-inset-right, 0px); padding-bottom:calc(var(--footer-h, 62px) + env(safe-area-inset-bottom, 0px)); }
#app-footer { height:calc(var(--footer-h, 62px) + env(safe-area-inset-bottom, 0px)); padding-bottom:env(safe-area-inset-bottom, 0px); }
#settings-overlay { top:env(safe-area-inset-top, 0px); bottom:calc(var(--footer-h, 62px) + env(safe-area-inset-bottom, 0px)); }
/* The home screen fills the screen ABOVE the footer, not the whole screen
   (Joe, 21 Nov 2026: "you need to scroll up to see the band at the top").
   100vh plus the body's footer padding made even a short home screen scroll
   by the footer's height, so a reload or a 🏠 from a long recipe left it
   scrolled with the band out of view (showLanding now opens it at the top
   too, app.js). dvh where there is one: on a phone 100vh is taller than the
   screen while the address bar shows. */
#landing { min-height:calc(100vh - var(--footer-h, 62px) - env(safe-area-inset-bottom, 0px) - env(safe-area-inset-top, 0px)); }
@supports (height:100dvh) { #landing { min-height:calc(100dvh - var(--footer-h, 62px) - env(safe-area-inset-bottom, 0px) - env(safe-area-inset-top, 0px)); } }

/* #406 — Clickeasy's own bars on a phone. The home-screen app (#405) took the
   browser's bars away; on a 390 px phone our own still used a lot of the
   screen: a recipe header with the house button on one line and the title on
   two more below it, a 62 px footer, and an 80 px logo in the home header.
   Phones only — iPad and desktop keep the roomier layout. The Cook tab already
   hides the header and footer. */
@media (max-width:600px) {
  :root { --footer-h:50px; }
  /* Recipe header: house button and title on one row, smaller title, a
     shallower curve underneath. */
  /* A grid, not a flex row (#448): the Safefood line goes on its own row
     under the title. As a third item in the row it took the title's width
     and sat on top of it. */
  header { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; column-gap:.7rem; text-align:left; padding:.6rem 1rem 1.25rem; }
  header .back-btn { margin-bottom:0; padding:.45rem .8rem; }
  header h1 { font-size:1.35rem; line-height:1.15; min-width:0; }
  header .page-safefood { grid-column:2; margin-top:.3rem; }
  header .page-credit { grid-column:2; margin-top:.25rem; font-size:.8rem; }
  header .page-s104 { grid-column:2; margin-top:.25rem; }
  header .page-safefood .sf-chip { font-size:.9rem; padding:2px 9px; }
  header::after { height:26px; bottom:-14px; }
  /* Home screen: a smaller logo and less padding. */
  .landing-header { padding:.5rem 1rem; }
  .landing-logo-icon img { height:44px !important; }
  /* Footer: slimmer, with a smaller ⚙️ and Teacher pill. */
  #app-footer { padding-left:10px; padding-right:10px; }
  #settings-fab { width:38px; height:38px; font-size:1.05rem; }
  #cinchify-user-pill { padding:.25rem .7rem; font-size:.74rem; }
  /* #422: just a head, the size of the ⚙️, until tapped. */
  #cinchify-user-pill:not(.pill-open) { width:38px; height:38px; padding:0; justify-content:center; border-radius:50%; font-size:1.15rem; }
  #cinchify-user-pill:not(.pill-open) .pill-text { display:none; }
}
#cinchify-user-pill .pill-text { overflow:hidden; text-overflow:ellipsis; }

/* Safefood recipes: the line under the recipe title, and under the name on a
   recipe's tile. Set by an admin (Admin → Safefood recipes). Words, not the
   logo (Joe, 18 Oct 2026), in the logo's purple (#6a17ad) on the white box the
   logo sat in, so it reads on the orange header as well as on a white tile. */
.page-safefood { margin-top:.45rem; }
/* "Recipe from <site>" under the title of a website import: the credit to
   the site it came from. Small and quiet, in the header's own white text. */
.page-credit { margin-top:.4rem; font-size:.9rem; font-weight:700; color:#fff; opacity:.95; overflow-wrap:anywhere; }
/* The s.104 statement under that credit (Joe, 13 Nov 2026): a small grey box,
   quieter than anything a pupil needs, readable on the orange header. */
.page-s104 { margin-top:.4rem; padding:.35rem .6rem; border-radius:8px; background:#f1f1f1; color:#4a4a4a;
  font-size:.72rem; font-weight:700; line-height:1.35; overflow-wrap:anywhere; }
.page-s104 div + div { margin-top:.15rem; }
.cn-sf, .landing-card-sf { margin-top:.15rem; }
.sf-chip { display:inline-block; background:#fff; color:#6a17ad; border-radius:8px; padding:3px 9px;
  font-size:.95rem; font-weight:800; line-height:1.3; box-shadow:0 0 0 1px rgba(0,0,0,.1); }
.page-safefood .sf-chip { font-size:1.05rem; padding:4px 12px; }
/* On the category tiles the name has side padding (.mp-card .cn); line up with it. */
.mp-card .cn-sf { padding:0 .9rem .35rem; margin-top:-.25rem; font-size:.9rem; }

/* While a recipe's pictures are being made, the step picture buttons and
   Duplicate step / + Add step are greyed out and can't be pressed
   (refreshImgGenLock in app.js). */
html.imggen-lock .ed-step-img-wrap .ed-upload-btn,
html.imggen-lock .ed-step-img-wrap .ed-gen-btn,
html.imggen-lock .ed-dupbtn,
html.imggen-lock .ed-addbtn { opacity:.45; filter:grayscale(1); pointer-events:none; cursor:not-allowed; }

/* #421: the three "extra steps" switches on the import screen, folded away */
.extra-steps-fold { margin-top: .5rem; margin-bottom: .3rem; border: 2px solid #d9f0e0; border-radius: 12px; background: #f5fbf7; }
.extra-steps-fold > summary { cursor: pointer; padding: .6rem .7rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem;
  font-family: 'Nunito', sans-serif; list-style: none; }
.extra-steps-fold > summary::-webkit-details-marker { display: none; }
.extra-steps-fold > summary::after { content: '▾'; margin-left: auto; color: #2d8a4e; font-weight: 900; transition: transform .15s; }
.extra-steps-fold[open] > summary::after { transform: rotate(180deg); }
.extra-steps-title { font-size: .85rem; font-weight: 900; color: #1a1a1a; }
.extra-steps-state { font-size: .72rem; font-weight: 800; color: #2d8a4e; }
.extra-steps-state.some-off { color: #b45309; }
.extra-steps-fold[open] { padding: 0 .5rem .4rem; }
.extra-steps-fold[open] > summary { padding-left: .2rem; padding-right: .2rem; }

/* BETA TEST SCHOOLS (Joe, 18 Oct 2026): picture Generate / Regenerate, the
   photoreal convert and every import type stay in place but greyed out.
   The selector list is BETA_LOCK_SELECTOR in app.js; keep the two the same.
   app.js's capture-phase guard stops the tap and shows #beta-lock-note. */
html.beta-locked [data-act="gen-step-img"],
html.beta-locked [data-act="imgnote-go"],
html.beta-locked [data-act="convert-photoreal"],
html.beta-locked .load-mode-btn {
  opacity:.45 !important; filter:grayscale(1); cursor:not-allowed !important;
}
/* EDITOR-ONLY LOGIN (#451): hidden rather than greyed — the account will
   never have them. The selector list is EDITOR_LOCK_SELECTOR in app-auth.js. */
html.editor-locked #new-recipe-btn, html.editor-locked #load-recipe-box,
html.editor-locked #act-delete, html.editor-locked #act-clone, html.editor-locked #adm-open-btn,
html.editor-locked .load-mode-btn, html.editor-locked [data-act="gen-step-img"],
html.editor-locked [data-act="imgnote-go"], html.editor-locked [data-act="convert-photoreal"],
html.editor-locked #ed-make-missing, html.editor-locked .item-ai-gen,
html.editor-locked #classes-nav-btn {
  display:none !important;
}
/* MP4 OR TYPING ONLY (Luke, 14 Nov 2026): in every school (no switch), an
   ordinary teacher's import box shows From MP4 and Paste Recipe only. The ids
   are SIMPLE_IMPORT_HIDDEN in app-import.js; keep the two the same.
   !important because setMode() writes each button's inline style. */
html.simple-import #lmode-photo, html.simple-import #lmode-pdf,
html.simple-import #lmode-pptx, html.simple-import #lmode-docx,
html.simple-import #lmode-url, html.simple-import #lmode-instagram,
html.simple-import #lmode-website, html.simple-import #lmode-file,
html.simple-import #load-bulk-zone {
  display:none !important;
}
/* SCHOOLS, 20 Nov 2026 (Joe): a green school teacher has no paid way in, so
   From MP4 and Paste Recipe go too (SCHOOL_TEACHER_IMPORT_HIDDEN). Homes keep
   the rule above. */
html.school-teacher-import #lmode-video, html.school-teacher-import #lmode-text { display:none !important; }
/* HOMES (Luke, 14 Nov 2026): AI step pictures are for the lead only. A person
   the lead added never sees a button that would make one (html.home-member,
   set by app-homeplan.js); the server refuses it too (enforceHomePlan). Stills
   from their own MP4 are not AI pictures and are untouched. */
html.home-member [data-act="gen-step-img"], html.home-member [data-act="imgnote-go"],
html.home-member [data-act="convert-photoreal"], html.home-member #ed-make-missing,
html.home-member .item-ai-gen {
  display:none !important;
}
#beta-lock-note {
  position:fixed; left:50%; bottom:84px; transform:translateX(-50%) translateY(10px);
  background:#1a1a1a; color:#fff; font-family:Nunito,sans-serif; font-weight:800; font-size:.95rem;
  padding:.6rem 1.1rem; border-radius:12px; box-shadow:0 6px 20px rgba(0,0,0,.25);
  opacity:0; pointer-events:none; transition:opacity .2s, transform .2s; z-index:20000; max-width:calc(100vw - 32px); text-align:center;
}
#beta-lock-note.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* 🌐 The family's language (Joe, 6 Nov 2026; see VIEW_LANGS in app.js). A
   round button beside ⚙️ in the bottom bar, the same size; the choices open
   just above the bar. The "Translated automatically" line sits under the title. */
#app-footer .footer-right { gap:8px; }
.vl-fab { height:46px; min-width:46px; padding:0 .7rem; border-radius:23px; background:#fff; color:#1a1a1a; border:2px solid var(--accent, #f26a21);
  font-family:'Nunito',sans-serif; font-size:.9rem; font-weight:900; cursor:pointer; white-space:nowrap; flex-shrink:0; }
.vl-menu { position:fixed; z-index:960; right:max(16px, env(safe-area-inset-right, 0px));
  bottom:calc(var(--footer-h, 62px) + env(safe-area-inset-bottom, 0px) + 8px);
  display:flex; flex-direction:column; gap:4px; padding:6px; background:#fff; border-radius:14px;
  box-shadow:0 6px 24px rgba(0,0,0,.18); max-height:70vh; overflow-y:auto; }
.vl-menu[hidden] { display:none; }
.vl-menu button { background:none; border:none; border-radius:10px; padding:.55rem 1rem; text-align:left; font-family:'Nunito',sans-serif; font-size:1rem; font-weight:800; color:#1a1a1a; cursor:pointer; }
.vl-menu button:hover, .vl-menu button.on { background:#fff1e8; }
.vl-note { margin-top:.45rem; font-size:.8rem; font-weight:700; opacity:.9; }
@media (max-width:600px) {
  .vl-fab { height:38px; min-width:38px; padding:0 .55rem; font-size:.8rem; }
  header .vl-note { grid-column:2; }
}

/* ── EVERY TEACHER RUNS HER OWN CLASSES (teacher_classes switch, app-teacherclasses.js) ──
   Nothing here applies unless the server switched the school on: every rule
   hangs off html.tc-on / html.tc-home or an element only that file makes.
   The tiles are the app's own .landing-col-head; these rules add only what
   the mock-up has and the app had not: class tabs and the "create" tiles. */
html.tc-on #classes-nav-btn { display:none !important; }
html.tc-home #landing-cols, html.tc-home #cat-view { display:none !important; }
#tc-home { font-family:'Nunito',sans-serif; }
#tc-home .tc-tiles { margin-top:.4rem; }
.tc-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 1.2rem; }
.tc-tab { min-height:44px; padding:.5rem 1.1rem; border-radius:50px; border:2px solid var(--green); background:#fff; color:var(--green-ink);
  font-family:'Nunito',sans-serif; font-size:1rem; font-weight:900; cursor:pointer; }
.tc-tab.on { background:var(--green); color:#fff; }
.tc-tab:focus-visible, .tc-choice:focus-visible, .tc-card-create:focus-visible { outline:3px solid var(--green); outline-offset:2px; }
.landing-col-head.tc-create { background:#fff; color:var(--green-ink); border:2px dashed var(--green); }
.landing-col-head.tc-big { padding:2rem 1rem; }
.landing-col-head.tc-big .col-emoji { font-size:3rem; }
#tc-home .tc-tiles > div:has(.tc-big) { grid-column:span 2; }
.tc-hint { color:#4b5563; font-weight:800; font-size:.95rem; line-height:1.5; margin:.4rem 0 0; }
.tc-house { display:flex; align-items:center; justify-content:center; width:52px; height:52px; background:#fff; border:2px solid #b2dfdb; color:#0a9688;
  font-size:1.6rem; border-radius:50%; cursor:pointer; margin-bottom:1.2rem; box-shadow:0 2px 8px rgba(10,150,136,.1); }
.tc-back { background:none; border:none; color:var(--green-ink); font-family:'Nunito',sans-serif; font-size:1rem; font-weight:900; cursor:pointer;
  padding:.4rem 0; min-height:44px; margin-bottom:.4rem; }
.tc-title { font-size:1.6rem; font-weight:900; display:flex; align-items:center; gap:10px; }
.tc-sub { color:#4b5563; font-weight:800; margin:.15rem 0 1.1rem; }
.tc-h { font-size:1.5rem; font-weight:900; margin:.2rem 0 .2rem; }
.tc-p { color:#4b5563; font-weight:800; margin:0 0 1rem; }
.tc-cards { display:grid; gap:1rem; align-content:start; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); }
@media (min-width:900px) { .tc-cards { grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); } }
.tc-card-create { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; min-height:160px; border-radius:14px;
  border:2px dashed var(--green); background:#fff; color:var(--green-ink); font-weight:900; font-size:1.05rem; cursor:pointer; text-align:center; padding:1rem; }
.tc-card-create .col-emoji { font-size:2.2rem; }
.tc-choices { display:flex; flex-direction:column; gap:12px; max-width:560px; }
.tc-choice { display:flex; align-items:flex-start; gap:14px; text-align:left; padding:1rem 1.1rem; border-radius:16px; border:2px solid #d8e9df; background:#fff;
  font-family:'Nunito',sans-serif; cursor:pointer; color:#1a1a1a; min-height:64px; }
.tc-choice:hover { border-color:var(--green); background:var(--green-light); }
.tc-choice .tc-ic { font-size:2rem; line-height:1; }
.tc-choice b { display:block; font-size:1.1rem; font-weight:900; }
.tc-choice span span { display:block; font-size:.95rem; font-weight:700; color:#4b5563; margin-top:2px; }
#tc-ask { position:fixed; inset:0; z-index:100003; background:rgba(20,12,40,.5); display:flex; align-items:center; justify-content:center; padding:16px; font-family:'Nunito',sans-serif; }
#tc-ask .tc-ask-box { background:#fff; border-radius:18px; padding:1.3rem; width:100%; max-width:420px; box-shadow:0 10px 40px rgba(0,0,0,.3); }
#tc-ask h2 { margin:0 0 .3rem; font-size:1.3rem; font-weight:900; }
#tc-ask p { margin:0 0 .9rem; font-weight:700; color:#4b5563; }
.tc-ask-row { display:flex; gap:8px; align-items:center; }
.tc-ask-emoji { font-size:1.8rem; width:44px; text-align:center; }
.tc-ask-row input, .tc-field { flex:1; min-width:0; box-sizing:border-box; font:inherit; font-size:1.05rem; font-weight:800; padding:.7rem .8rem; border-radius:12px; border:2px solid #b7dcc5; }
.tc-err { color:#b91c1c; font-weight:800; font-size:.9rem; min-height:1.1em; margin-top:.4rem; }
.tc-ask-btns { display:flex; gap:10px; justify-content:flex-end; margin-top:.8rem; flex-wrap:wrap; }
.tc-btn { min-height:44px; padding:.55rem 1.2rem; border-radius:12px; border:2px solid var(--green); background:var(--green); color:#fff; font-family:'Nunito',sans-serif;
  font-size:1rem; font-weight:900; cursor:pointer; }
.tc-btn.ghost { background:#fff; color:var(--green-ink); }
.tc-btn.warn { background:#fff; color:#b91c1c; border-color:#f0b4b4; }
/* Settings → My classes: only the part of Settings that is open shows. */
html[data-tcs="classes"] #screen-lib > :not(#tc-settings) { display:none !important; }
#tc-settings { font-family:'Nunito',sans-serif; }
html[data-tcs] #tc-settings, #tc-settings:not(:empty) { padding:1rem 1.25rem; }
.tc-newcls { display:block; width:100%; min-height:52px; margin:.4rem 0 .8rem; border-radius:14px; border:2px dashed var(--green); background:#fff; color:var(--green-ink);
  font-family:'Nunito',sans-serif; font-size:1.05rem; font-weight:900; cursor:pointer; }
.tc-cls { display:grid; grid-template-columns:1fr auto; gap:2px 10px; width:100%; text-align:left; margin:0 0 .6rem; padding:.8rem 1rem; border-radius:14px;
  border:2px solid #d8e9df; background:#fff; font-family:'Nunito',sans-serif; color:#1a1a1a; cursor:pointer; }
.tc-cls.tc-made { cursor:default; background:var(--green-light); border-color:var(--green); }
.tc-cls-name { font-weight:900; font-size:1.05rem; }
.tc-cls small { grid-column:1 / -1; color:#4b5563; font-weight:800; font-size:.9rem; }
.tc-code { font-family:ui-monospace,Menlo,monospace; font-weight:900; letter-spacing:.08em; color:var(--green-ink); background:var(--green-light); border-radius:8px; padding:1px 8px; }
.tc-label { display:block; font-weight:900; margin:.2rem 0 .3rem; }
#tc-settings .tc-field { width:100%; }
.tc-btn.tc-wide, .tc-btn.tc-next { width:100%; margin:.6rem 0; }
.tc-btn.tc-next { background:#fff; color:#c2410c; border-color:#f57c00; }
.tc-h3 { font-size:1.02rem; font-weight:900; margin:1.1rem 0 .45rem; }
.tc-req { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:.55rem 0; border-bottom:1px solid #eef2ef; }
.tc-req-name { flex:1 1 140px; font-weight:900; }
.tc-req-name small { display:block; font-weight:700; color:#4b5563; }
.tc-btn.tc-ok { min-width:96px; }
.tc-row { display:flex; align-items:center; gap:10px; width:100%; min-height:52px; text-align:left; padding:.6rem .9rem; margin:0 0 .4rem; border-radius:12px;
  border:2px solid #e5e7eb; background:#fff; font-family:'Nunito',sans-serif; font-size:1rem; font-weight:800; color:#1a1a1a; cursor:pointer; }
.tc-row > span:nth-last-child(1).tc-go { margin-left:auto; color:#6b7280; font-size:1.3rem; }
.tc-row .tc-ic { font-size:1.4rem; }
.tc-row-create { color:#c2410c; border-style:dashed; }
.tc-link { background:none; border:none; padding:0; font:inherit; color:var(--green-ink); text-decoration:underline; cursor:pointer; font-weight:900; }
.tc-own { margin:1.2rem 0 0; padding:.7rem .9rem; border-radius:12px; background:var(--green-light); color:#1f5f3a; font-weight:800; font-size:.92rem; }
/* A pupil's My classes (every school): the pupil cover's own tiles, plus
   the teacher's name under a class and the waiting line. */
.tc-pupil .tc-pupil-h { font-size:1.6rem; font-weight:900; color:#2f6b4f; margin:.2rem 0 .2rem; }
.tc-pupil .tc-pupil-sub { color:#374151; font-weight:800; font-size:1.05rem; margin:0 0 1.1rem; }
.tc-pupil .tc-by { display:block; font-size:.95rem; font-weight:800; letter-spacing:0; text-transform:none; color:#374151; }
.tc-pupil .tc-pupil-class { background:#fff; color:#2f6b4f; border:2px solid #b0e8c8; }
.tc-pupil .landing-col-head.tc-create { margin-bottom:0; }
.tc-pupil .tc-code-in { display:block; width:100%; max-width:360px; font-size:1.5rem; letter-spacing:.15em; text-transform:uppercase; text-align:center; }
.tc-pupil .tc-ask-btn { max-width:360px; }
.tc-wait { margin:1rem 0 0; padding:.8rem 1rem; border-radius:14px; background:#fff8e6; border:2px solid #f5d08a; color:#5c3d00; font-weight:800; font-size:1.05rem; max-width:560px; }
.tc-pupil-empty { font-size:1.05rem; font-weight:800; color:#666; text-align:center; padding:2.5rem 1.5rem; line-height:1.6; }
/* The sign-in box's "Asked to join" line (app-auth.js doStudentJoin). */
#cstudent-err.cauth-wait { color:#5c3d00; background:#fff8e6; border:2px solid #f5d08a; border-radius:12px; padding:.6rem .8rem; font-weight:800; }
/* Settings: Basic and Advanced (every school). The menu, then one part of
   the existing page at a time. */
html[data-tcs="menu"] #screen-lib > :not(#tc-settings) { display:none !important; }
html[data-tcs="import"] #screen-lib > :not(#tc-settings):not(#load-recipe-box) { display:none !important; }
html[data-tcs="recipes"] #screen-lib > :not(#tc-settings):not(.lib-topbar):not(#lib-grid) { display:none !important; }
html[data-tcs="cfg"] #screen-lib > .lib-topbar, html[data-tcs="cfg"] #screen-lib > #load-recipe-box, html[data-tcs="cfg"] #screen-lib > #lib-grid,
html[data-tcs="cfg"] #screen-lib > div:has(> #cfg-search), html[data-tcs="cfg"] #cfg-search-empty { display:none !important; }
html[data-tcs] .tc-cfg-hide { display:none !important; }
html[data-tcs="import"] #tc-settings, html[data-tcs="recipes"] #tc-settings, html[data-tcs="cfg"] #tc-settings, html[data-tcs="all"] #tc-settings { padding-bottom:.2rem; }
.tc-menu-row .tc-menu-words { display:flex; flex-direction:column; min-width:0; }
.tc-menu-row small { font-size:.85rem; font-weight:700; color:#4b5563; }
.tc-menu.tc-muted .tc-menu-row { background:#fafafa; }
.tc-badge { margin-left:auto; min-width:28px; height:28px; padding:0 8px; border-radius:999px; background:#c2410c; color:#fff; font-weight:900; display:inline-flex; align-items:center; justify-content:center; }
.tc-own-top { margin:.2rem 0 .4rem; }
.tc-note { margin:.6rem 0 .2rem; padding:.7rem .9rem; border-radius:12px; background:#f3f4f6; font-weight:800; color:#374151; }
/* Luke, 14 Nov 2026: in a school Settings is a FULL PAGE for the
   teacher and the lead — the whole screen above the footer, edge to edge, its
   own content centred like the home page's — never a box. */
html.tc-on #settings-overlay { top:0; left:0; right:0; }
html.tc-on #settings-overlay .s-panel { width:100%; max-width:none; height:100%; border-radius:0; margin:0; }
html[data-tcs] #tc-settings { box-sizing:border-box; width:100%; max-width:1100px; margin:0 auto; padding:1.25rem 1.4rem; }
@media (max-width:600px) { html[data-tcs] #tc-settings { padding:1rem; } }
html[data-tcs] #tc-settings .tc-row, html[data-tcs] #tc-settings .tc-cls, html[data-tcs] #tc-settings .tc-newcls { font-size:1.05rem; }
.tc-btn.tc-danger { background:#b91c1c; border-color:#b91c1c; color:#fff; }
.tc-btn.tc-delete { margin-top:1.2rem; }
/* Categories on or off per class (every school). */
.tc-catrow { display:flex; align-items:stretch; gap:8px; margin:0 0 .45rem; }
.tc-catrow .tc-catopen { margin:0; flex:1; min-width:0; }
.tc-catrow:not(.on) .tc-catopen { background:#fafafa; color:#4b5563; }
.tc-switch { flex-shrink:0; display:inline-flex; align-items:center; gap:8px; min-width:104px; min-height:52px; padding:0 12px; border-radius:12px;
  border:2px solid #d1d5db; background:#fff; font-family:'Nunito',sans-serif; font-weight:900; font-size:1rem; color:#4b5563; cursor:pointer; }
.tc-switch .tc-knob { width:40px; height:24px; border-radius:999px; background:#d1d5db; position:relative; flex-shrink:0; }
.tc-switch .tc-knob::after { content:''; position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%; background:#fff; }
.tc-switch[aria-checked="true"] { border-color:var(--green); color:var(--green-ink); }
.tc-switch[aria-checked="true"] .tc-knob { background:var(--green); }
.tc-switch[aria-checked="true"] .tc-knob::after { left:19px; }
.tc-switch:focus-visible { outline:3px solid var(--green); outline-offset:2px; }
.tc-cathint { margin:-.2rem 0 .5rem; }
.tc-code-hint { margin-top:.35rem; font-size:.85rem; font-weight:800; color:#4b5563; line-height:1.35; }
.tc-catopen .tc-menu-words small { display:block; font-size:.85rem; font-weight:700; color:#4b5563; }
/* The "who takes over" email box in Our school's Remove dialog. */
#os-dialog input.os-in { display:block; width:100%; box-sizing:border-box; min-height:48px; margin:.3rem 0 .2rem; padding:.6rem .8rem;
  border-radius:12px; border:2px solid #c4b5fd; font-family:'Nunito',sans-serif; font-size:1.05rem; font-weight:800; }

/* ── A HOME'S FOLDERS (Luke's mock-up v4, part B; app-homefolders.js) ─────────
   Nothing here applies unless the server says this home login has folders:
   every rule hangs off html.hf-on / html.hf-first or an element only that file
   makes. The tiles are the app's own .landing-col-head and the school's tab
   and "create" styles; these rules give them the home's orange (the mock-up's
   tabs and create tiles) and hide the grid's other tiles in a folder that is
   not "My cards". */
html.hf-first #landing-cols { display:none !important; }
html.hf-on #landing-cols.hf-other > div:not(.hf-wrap):not(#col-wrap-safefood) { display:none !important; }
#cat-view.active ~ #hf-tabs, #cat-view.active ~ #hf-first { display:none !important; }
#hf-first { font-family:'Nunito',sans-serif; margin-top:.4rem; }
#hf-first .hf-first-tiles > div:has(.tc-big) { grid-column:1 / -1; }
#hf-first .landing-col-head.tc-big .col-label { font-size:1.15rem; }
.hf-tabs { margin-top:.2rem; }
.hf-tabs .tc-tab { border-color:#F26A21; color:#9a3412; }
.hf-tabs .tc-tab.on { background:#F26A21; color:#fff; }
.hf-tabs .tc-tab:focus-visible { outline:3px solid #F26A21; outline-offset:2px; }
.hf-tabs .hf-tab-add { min-width:52px; font-size:1.2rem; }
html.hf-on .landing-col-head.tc-create { background:#fff4ec; color:#9a3412; border:3px dashed #F26A21; }
html.hf-on .tc-card-create.hf-cc { background:#fff4ec; color:#9a3412; border:3px dashed #F26A21; min-height:120px; }
.landing-col-head.hf-ours { background:#fff; color:#0f766e; border:2px solid #0f766e; }
.landing-col-head .hf-by { font-size:.85rem; font-weight:800; color:#4b5563; letter-spacing:0; text-transform:none; }
.hf-rows { display:flex; flex-direction:column; max-width:720px; border:1.5px solid #e5e7eb; border-radius:14px; overflow:hidden; }
.hf-row { display:flex; align-items:center; gap:12px; width:100%; min-height:56px; padding:.6rem 1rem; border:0; border-top:1.5px solid #e5e7eb;
  background:#fff; text-align:left; font-family:'Nunito',sans-serif; font-size:1.05rem; font-weight:800; color:#1a1a1a; cursor:pointer; }
.hf-row:first-child { border-top:0; }
.hf-row:hover, .hf-row:focus-visible { background:#fff4ec; outline:none; }
.hf-row .hf-row-ic { font-size:1.5rem; width:32px; text-align:center; flex-shrink:0; }
.hf-row .hf-row-t { flex:1; min-width:0; overflow-wrap:anywhere; }
.hf-row .hf-row-by { color:#4b5563; font-weight:700; font-size:.95rem; flex-shrink:0; }
/* "Where should it go?" (app-homefolders.js), in part A's home overlay. */
#home-jar-overlay .hfw-choice { display:flex; gap:12px; align-items:flex-start; padding:.8rem .9rem; border-radius:14px; border:3px solid #e5e7eb; background:#fff; cursor:pointer; }
#home-jar-overlay .hfw-choice.on { border-color:#F26A21; background:#fff4ec; }
#home-jar-overlay .hfw-choice.hfw-ours.on { border-color:#0f766e; background:#e0f2f1; }
#home-jar-overlay .hfw-choice:focus-visible { outline:3px solid #1d4ed8; outline-offset:2px; }
#home-jar-overlay .hfw-words { display:flex; flex-direction:column; gap:3px; min-width:0; flex:1; }
#home-jar-overlay .hfw-words b { font-size:1.1rem; font-weight:900; }
#home-jar-overlay .hfw-words > span { font-size:.95rem; font-weight:700; color:#4b5563; }
#home-jar-overlay .hfw-pick { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:.35rem; }
#home-jar-overlay .hfw-sel { min-height:44px; max-width:100%; padding:0 .5rem; border-radius:10px; border:2px solid #F26A21; background:#fff;
  font-family:'Nunito',sans-serif; font-size:1rem; font-weight:800; color:#1a1a1a; }
#home-jar-overlay .hfw-ai { align-items:center; }
#home-jar-overlay .hfw-ai-words { display:flex; flex-direction:column; color:#1a1a1a; }
#home-jar-overlay .hfw-ai-words small { font-size:.9rem; font-weight:700; color:#4b5563; }
#home-jar-overlay .tc-switch[disabled] { opacity:.5; cursor:not-allowed; }
/* The jar sits on the home page only (mock-up section 2), not under a category. */
html.hf-on #cat-view.active ~ #home-jar-landing { display:none !important; }
#cat-view-cards > .hf-rows, #cat-view-cards > .tc-hint { grid-column:1 / -1; }
#home-jar-overlay .hfw-ai-words b { text-align:left; color:#1a1a1a; font-size:1.05rem; }
/* Settings for a home (mock-up section 6): a full page, as for teachers under
   teacher classes; the "These are your settings" line in the lead's purple,
   or the teal of someone she added; a switch row (the Safefood card). */
html.hf-on #settings-overlay { top:0; left:0; right:0; }
html.hf-on #settings-overlay .s-panel { width:100%; max-width:none; height:100%; border-radius:0; margin:0; }
html.hf-on .tc-own { background:#f1eafe; color:#5b21b6; }
html.hf-on.home-member .tc-own { background:#e0f2f1; color:#0f766e; }
.tc-own.hf-own-free { background:#f3f4f6; color:#374151; }
.tc-menu-row .tc-switch.tc-switch-in { margin-left:auto; min-height:40px; min-width:92px; pointer-events:none; }
.tc-switch.tc-switch-in[aria-checked="true"] { border-color:var(--green); color:var(--green-ink); }
.tc-switch.tc-switch-in[aria-checked="true"] .tc-knob { background:var(--green); }
.tc-switch.tc-switch-in[aria-checked="true"] .tc-knob::after { left:19px; }
.hf-frow { display:flex; gap:8px; align-items:stretch; margin:0 0 .6rem; }
.hf-frow .tc-cls { margin:0; flex:1; min-width:0; }
.hf-move { display:flex; gap:6px; align-items:center; }
.hf-move .tc-btn { min-width:48px; min-height:48px; padding:0; font-size:1.2rem; }
.hf-move .tc-btn:disabled { opacity:.35; cursor:default; }
.tc-newcls.hf-newfolder { border-color:#F26A21; color:#9a3412; }
.hf-free-set .tc-tabs .tc-tab { border-color:#F26A21; color:#9a3412; }
.hf-free-set .tc-tabs .tc-tab.on { background:#F26A21; color:#fff; }
.hf-free-set .tc-menu { max-width:640px; }
.hf-free-set a.hf-mail { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; max-width:420px; box-sizing:border-box; }
/* A home's Settings tabs in the home's orange (mock-up section 6). */
html.hf-on #tc-settings .tc-tabs .tc-tab { border-color:#F26A21; color:#9a3412; }
html.hf-on #tc-settings .tc-tabs .tc-tab.on { background:#F26A21; color:#fff; }
@media (max-width:600px) {
  .hf-tabs { gap:6px; }
  .hf-tabs .tc-tab { padding:.45rem .85rem; font-size:.95rem; }
  .hf-tabs .hf-tab-add { min-width:44px; }
}
.hf-free-set > .tc-row, .hf-free-set > .tc-note, .hf-free-set > .tc-own, .hf-free-set > .tc-p { max-width:640px; }
/* Free's ⚙️ in the footer (app-homefolders.js), like everyone else's. */
#hf-free-fab { width:46px; height:46px; border-radius:50%; background:var(--accent); color:#fff; border:none; font-size:1.3rem; cursor:pointer;
  box-shadow:0 3px 12px rgba(242,106,33,.35); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
#hf-free-fab:focus-visible { outline:3px solid #1d4ed8; outline-offset:2px; }
@media (max-width:600px) { #hf-free-fab { width:38px; height:38px; font-size:1.05rem; } }

/* Picture progress bar (Joe, 18 Nov 2026) — renderPicProgress in app-stepimages.js.
   Sits just above the footer, over the settings overlay (1000, which holds My
   Recipes and the editor), so the teacher sees it wherever they are. It stays
   UNDER the pop-up boxes (9000 and up): the "two quick checks" box an import
   ends with appeared straight away and the bar covered its lower questions.
   A box is answered first; the bar shows again when it closes. */
#pic-progress {
  position:fixed; left:0; right:0; bottom:calc(62px + env(safe-area-inset-bottom, 0px)); z-index:1500;
  background:#ffffff; border-top:2px solid #ede8ff; box-shadow:0 -4px 16px rgba(0,0,0,.08);
  padding:.6rem max(16px, env(safe-area-inset-right, 0px)) .55rem max(16px, env(safe-area-inset-left, 0px));
  font-family:'Nunito',sans-serif; color:#1a1a1a;
}
#pic-progress .pp-row + .pp-row { margin-top:.5rem; }
#pic-progress .pp-line { display:flex; flex-wrap:wrap; justify-content:space-between; gap:.25rem .75rem; font-weight:800; font-size:.92rem; }
#pic-progress .pp-title { min-width:0; overflow-wrap:anywhere; }
#pic-progress .pp-count { color:#534AB7; white-space:nowrap; font-variant-numeric:tabular-nums; }
#pic-progress .pp-track { margin-top:.35rem; height:12px; border-radius:999px; background:#f3eeff; overflow:hidden; }
#pic-progress .pp-fill { height:100%; border-radius:999px; background:#534AB7; transition:width .4s ease; }
#pic-progress .pp-fill.pp-wait { opacity:.35; animation:pp-pulse 1.6s ease-in-out infinite; }
#pic-progress .pp-note { margin-top:.35rem; font-size:.78rem; font-weight:700; color:#5b5675; }
@keyframes pp-pulse { 50% { opacity:.15; } }
@media (prefers-reduced-motion: reduce) { #pic-progress .pp-fill { transition:none; } #pic-progress .pp-fill.pp-wait { animation:none; } }

/* Role test Q6 (18 Nov 2026): a home's Bring in lists only what its Create a
   card offers. YouTube and Instagram are not offered to homes, so their
   buttons are hidden (html.home-words, applyHomeWording in app.js). */
html.home-words #lmode-url, html.home-words #lmode-instagram { display:none !important; }

/* Bring in's TYPE and IMAGE STYLE rows (role test follow-up, 18 Nov 2026):
   three nowrap buttons in a row that could not wrap ran off a 390px phone
   ("Activity", "Photo (HD)" cut off). Like MEASUREMENTS, they now wrap onto
   a second line when they do not fit; on a wide screen nothing changes. */
#load-kind-row, #load-imgstyle-row { flex-wrap:wrap; }

/* ── SETTINGS AND BRING IN & EDIT (settings redesign, Joe 20 Nov 2026) ──────
   app-settingsnav.js. The approved mock-up (settings-admin-v3): the admin
   console's frame, a sidebar of sections on the left and one page on the
   right, stacking into a row of sections above the page on a phone. Every
   rule hangs off #st-shell, which only that file makes, and
   html[data-tcs="shell"] hides the rest of the old page while it shows. The
   settings rows inside are the app's own (borrowed into the page, put back
   on leaving), restyled here to sit in the mock-up's cards; their switches
   keep their own state (aria-pressed) and only look like the mock-up's. */
html[data-tcs="shell"] #screen-lib > :not(#st-shell) { display:none !important; }
/* The frame has its own top bar; the panel's head (← back, ✕) comes back for
   the editor and the toolkit, which slide over the frame and need it. */
html[data-tcs="shell"] #settings-overlay .s-panel:has(#screen-lib.visible) .s-head { display:none; }
html[data-tcs="shell"] #screen-lib { padding-bottom:0; background:#f5f5fa; }
#st-shell {
  --st-navy:#23235c; --st-orange:#F26A21; --st-orange-d:#c24f12; --st-orange-bg:#fff1e8;
  --st-bg:#f5f5fa; --st-panel:#ffffff; --st-ink:#1b1b2e; --st-muted:#63637e; --st-line:#e3e3ef;
  --st-side:#fbf7f3; --st-side-ink:#3a2a1f;
  --st-good:#1f7a46; --st-good-bg:#e6f5ec; --st-warn:#9a5b00; --st-warn-bg:#fff3d6;
  --st-bad:#b42318; --st-bad-bg:#fdecea; --st-info:#3b3bb3; --st-info-bg:#ececfb;
  font-family:'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size:15px; color:var(--st-ink); background:var(--st-bg);
  min-height:100%; display:flex; flex-direction:column; box-sizing:border-box;
}
#st-shell *, #st-shell *::before, #st-shell *::after { box-sizing:border-box; }
#st-shell button { font-family:inherit; }
.st-appbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; background:var(--st-panel); border-bottom:1.5px solid var(--st-line);
  padding-block:10px; padding-left:max(16px, env(safe-area-inset-left, 0px)); padding-right:max(16px, env(safe-area-inset-right, 0px)); }
.st-logo { font-weight:900; color:var(--st-orange); font-size:1.1rem; margin-right:auto; }
.st-ab { all:unset; cursor:pointer; font-weight:900; font-size:.86rem; padding:8px 14px; border-radius:12px; border:2px solid var(--st-line); background:var(--st-panel); color:var(--st-ink); white-space:nowrap; }
.st-ab.new { border-color:var(--st-orange); color:var(--st-orange-d); background:var(--st-orange-bg); }
.st-ab.on { background:var(--st-orange); color:#fff; border-color:var(--st-orange); }
.st-ab:focus-visible { outline:2px solid var(--st-orange); outline-offset:2px; }
.st-ab[hidden] { display:none; }   /* all:unset above would otherwise show a hidden 🔑 Admin */
.st-tag-new { font-size:.62rem; background:var(--st-orange); color:#fff; border-radius:50px; padding:1px 6px; margin-left:4px; vertical-align:2px; }
/* A phone: the three buttons on one line (the word mark is the footer's). */
@media (max-width:600px) {
  .st-appbar { gap:6px; flex-wrap:nowrap; overflow-x:auto; }
  .st-logo { display:none; }
  .st-ab { font-size:.78rem; padding:7px 9px; border-radius:10px; }
  .st-tag-new { display:none; }
}
.st-wrap { display:grid; grid-template-columns:240px minmax(0, 1fr); flex:1; min-height:70vh; }
.st-side { padding:18px 12px; display:flex; flex-direction:column; gap:3px; background:var(--st-side); border-right:1.5px solid var(--st-line); }
.st-grp { font-size:.68rem; font-weight:900; text-transform:uppercase; letter-spacing:.08em; padding:12px 10px 4px; opacity:.6; color:var(--st-side-ink); }
.st-nav { all:unset; cursor:pointer; display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:10px; font-weight:800; font-size:.9rem; color:var(--st-side-ink); overflow-wrap:anywhere; }
.st-nav:hover, .st-nav:focus-visible { background:var(--st-orange-bg); outline:none; }
.st-nav.on { background:#ffffff; color:var(--st-orange-d); box-shadow:inset 3px 0 0 var(--st-orange); }
.st-nav .st-n { margin-left:auto; font-size:.7rem; background:var(--st-orange); color:#fff; border-radius:50px; padding:1px 7px; }
.st-who { margin-top:auto; font-size:.76rem; font-weight:800; padding:8px; opacity:.75; color:var(--st-side-ink); overflow-wrap:anywhere; }
@media (max-width:860px) {
  /* A column, not a one-column grid: the row of sections scrolls sideways,
     and in a grid that made it a scroll box with no height of its own, so
     the page squeezed it to a sliver (390px check, 21 Nov 2026). */
  .st-wrap { display:flex; flex-direction:column; min-height:0; }
  .st-side { flex-shrink:0; }
  .st-side { flex-direction:row; overflow-x:auto; gap:6px; padding:10px 12px; border-right:0; border-bottom:1.5px solid var(--st-line); }
  .st-side .st-grp, .st-side .st-who { display:none; }
  /* A row that scrolls sideways: each section on one line. */
  .st-side .st-nav { white-space:nowrap; flex-shrink:0; }
}
/* TEXT RAN OUT OF ITS BOX (Joe, 21 Nov 2026), measured in Chrome at 1280,
   1024, 768 and 390 px:
   • the page: the app's own `main` rule (max-width, margin:0 auto) reached
     this <main>. Auto margins size a grid or flex item to its content, so a
     page whose rows would not shrink (Text size) ran 30-40 px past the
     window's edge at 1024 and 768; at 1280 every page sat in 960 px.
   • the sections down the left were one line each (nowrap) in a 240 px
     column: "Shopping & meal planner", "Text size, colours, sounds" and "My
     account & password" ran under the page. They wrap now, except in the
     phone's sideways row.
   • "📷 Add photo" was one line in an 84 px box (Our kitchen), cut off.
   Pills, buttons, codes and the borrowed rows wrap too, rather than spill. */
#st-shell .st-main { margin:0; max-width:none; width:auto; }
.st-main { padding-block:22px 40px; padding-left:max(16px, env(safe-area-inset-left, 0px)); padding-right:max(16px, env(safe-area-inset-right, 0px)); min-width:0; display:flex; flex-direction:column; gap:16px; }
@media (min-width:861px) { .st-main { padding-left:28px; padding-right:28px; } }
.st-top { display:flex; align-items:flex-start; gap:12px; flex-wrap:wrap; }
.st-top > div:first-child { min-width:0; overflow-wrap:anywhere; }
.st-top h1 { font-size:1.45rem; font-weight:900; margin:0; text-wrap:balance; color:var(--st-ink); display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.st-top .st-sub { color:var(--st-muted); font-weight:700; font-size:.9rem; max-width:62ch; }
.st-top .st-r { margin-left:auto; }
.st-card { background:var(--st-panel); border:1.5px solid var(--st-line); border-radius:14px; padding:16px; min-width:0; }
.st-card h2 { font-size:1rem; font-weight:900; margin:0 0 10px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; color:var(--st-ink); }
.st-card h2 small { font-weight:700; color:var(--st-muted); font-size:.8rem; }
.st-card h2 .st-sp { margin-left:auto; }
.st-card h2:last-child { margin-bottom:0; }
.st-pill { display:inline-block; font-size:.72rem; font-weight:900; border-radius:50px; padding:2px 9px; max-width:100%; overflow-wrap:anywhere; }
.st-pill.ok { background:var(--st-good-bg); color:var(--st-good); } .st-pill.wa { background:var(--st-warn-bg); color:var(--st-warn); }
.st-pill.no { background:var(--st-bad-bg); color:var(--st-bad); } .st-pill.in { background:var(--st-info-bg); color:var(--st-info); }
.st-pill.or { background:var(--st-orange-bg); color:var(--st-orange-d); }
.st-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:11px 2px; border-top:1px solid var(--st-line); font-weight:700; font-size:.9rem; }
.st-card > .st-row:first-child, .st-card > h2 + .st-row, .st-card > .st-note + .st-row { border-top:0; }
.st-row .st-w { flex:1 1 200px; min-width:0; overflow-wrap:anywhere; }
.st-row small { display:block; color:var(--st-muted); font-weight:700; font-size:.78rem; }
.st-row.st-indent { padding-left:28px; }
.st-row.st-off .st-w > span:first-child { color:var(--st-muted); }
.st-sw { all:unset; cursor:pointer; width:46px; height:26px; border-radius:50px; background:var(--st-line); position:relative; flex-shrink:0; }
.st-sw::after { content:""; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.25); transition:left .15s; }
.st-sw[aria-checked="true"] { background:var(--st-good); } .st-sw[aria-checked="true"]::after { left:23px; }
.st-sw:focus-visible { outline:2px solid var(--st-orange); outline-offset:2px; }
.st-sw[aria-busy="true"] { opacity:.6; cursor:progress; }
.st-caret { all:unset; cursor:pointer; font-weight:900; color:var(--st-muted); font-size:.8rem; padding:4px 8px; border-radius:8px; white-space:nowrap; }
.st-caret:hover, .st-caret:focus-visible { background:var(--st-bg); outline:none; }
.st-btn { all:unset; cursor:pointer; font-weight:900; font-size:.84rem; border-radius:10px; padding:8px 12px; border:1.5px solid var(--st-line); background:var(--st-panel); color:var(--st-ink); text-align:center; max-width:100%; overflow-wrap:anywhere; }
.st-btn:hover, .st-btn:focus-visible { border-color:var(--st-ink); outline:none; }
.st-btn.p { background:var(--st-orange); color:#fff; border-color:var(--st-orange); }
.st-btn.d { color:var(--st-bad); border-color:var(--st-bad); }
.st-btn.s { font-size:.76rem; padding:5px 9px; }
.st-btn[disabled] { opacity:.5; cursor:not-allowed; }
.st-chips { display:flex; gap:8px; flex-wrap:wrap; }
.st-chip { all:unset; cursor:pointer; font-size:.8rem; font-weight:800; padding:5px 12px; border-radius:50px; border:1.5px solid var(--st-line); background:var(--st-panel); color:var(--st-ink); }
.st-chip.on { background:var(--st-navy); color:#fff; border-color:var(--st-navy); }
.st-chip:focus-visible { outline:2px solid var(--st-orange); outline-offset:2px; }
.st-field { border:1.5px solid var(--st-line); border-radius:10px; padding:9px 12px; font-weight:700; background:var(--st-bg); color:var(--st-ink); font:inherit; width:100%; }
.st-note { font-size:.8rem; color:var(--st-muted); font-weight:700; line-height:1.45; margin:0; }
.st-err { color:var(--st-bad); font-weight:800; font-size:.85rem; }
.st-err:empty { display:none; }
#st-shell code { font-family:ui-monospace, Menlo, monospace; font-size:.85rem; font-weight:700; background:var(--st-bg); border-radius:6px; padding:1px 6px; letter-spacing:.04em; overflow-wrap:anywhere; }
.st-once { display:flex; gap:12px; align-items:center; flex-wrap:wrap; background:var(--st-info-bg); color:var(--st-info); border-radius:12px; padding:12px 14px; font-weight:800; font-size:.88rem; }
.st-once .st-btn { margin-left:auto; }
.st-tiles { display:grid; gap:10px; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); }
.st-tile { all:unset; cursor:pointer; border:2px solid var(--st-line); border-radius:14px; padding:14px 12px; background:var(--st-panel); display:flex; flex-direction:column; gap:4px; color:var(--st-ink); }
.st-tile:hover, .st-tile:focus-visible { border-color:var(--st-orange); outline:none; }
.st-tile.on { border-color:var(--st-orange); background:var(--st-orange-bg); }
.st-tile .st-i { font-size:1.5rem; } .st-tile b { font-weight:900; } .st-tile small { color:var(--st-muted); font-weight:700; font-size:.76rem; }
.st-tile.locked { cursor:default; opacity:.5; } .st-tile.locked:hover { border-color:var(--st-line); }
.st-menu { position:fixed; z-index:100003; border:1.5px solid #e3e3ef; border-radius:12px; background:#fff; box-shadow:0 6px 18px rgba(0,0,0,.12);
  padding:6px; display:flex; flex-direction:column; width:min(260px, calc(100vw - 32px)); font-family:'Nunito', sans-serif; }
.st-menu button { all:unset; cursor:pointer; padding:8px 10px; border-radius:8px; font-weight:800; font-size:.86rem; color:#1b1b2e; }
.st-menu button:hover, .st-menu button:focus-visible { background:#fff1e8; color:#c24f12; outline:none; }
.st-menu button.st-danger { color:#b42318; }
.st-share { position:fixed; inset:0; z-index:100004; background:rgba(20,20,46,.45); display:flex; align-items:center; justify-content:center; padding:16px;
  font-family:'Nunito', sans-serif; --st-line:#e3e3ef; --st-ink:#1b1b2e; --st-muted:#63637e; --st-panel:#fff; --st-good:#1f7a46; --st-orange:#F26A21; --st-bad:#b42318; --st-bg:#f5f5fa; }
.st-share .st-card { width:100%; max-width:460px; max-height:calc(100vh - 32px); overflow:auto; box-shadow:0 10px 40px rgba(0,0,0,.25); color:#1b1b2e; }
.st-share .st-acts { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
/* "👀 See it as a pupil" (Therese, 22 Nov 2026): a green-outlined button at
   the end of What pupils see's class chips, and the full-screen preview it
   opens (stPupilPreview, app-settingsnav.js). The preview's inside uses the
   pupil screen's own classes; only the cover and the strip are styled here.
   Above every Settings dialog (.st-share is 100004), and over the footer too:
   the strip's Close is the way out. */
.st-peek { all:unset; cursor:pointer; margin-left:auto; font-size:.8rem; font-weight:900; padding:5px 12px; border-radius:50px; border:2px solid #1f7a46; color:#1f7a46; background:#fff; max-width:100%; overflow-wrap:anywhere; }
.st-peek:hover, .st-peek:focus-visible { background:#e8f5ee; outline:none; }
#st-preview { position:fixed; inset:0; z-index:100005; background:#fff; overflow-y:auto; font-family:Nunito, Arial, sans-serif; }
.st-preview-strip { position:sticky; top:0; z-index:5; display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 16px; padding-top:calc(10px + env(safe-area-inset-top, 0px)); background:#1f7a46; color:#fff; font-weight:900; font-size:1rem; }
.st-preview-strip > span { flex:1 1 220px; min-width:0; overflow-wrap:anywhere; }
.st-preview-close { all:unset; cursor:pointer; background:#fff; color:#1f7a46; border-radius:10px; padding:8px 14px; font-weight:900; white-space:nowrap; }
.st-preview-close:focus-visible { outline:3px solid #F26A21; outline-offset:2px; }
.st-preview-note { background:#e8f5ee; color:#1f5133; font-weight:800; padding:10px 16px; text-align:center; }
.st-preview-note:empty { display:none; }
.st-preview-wait { padding:1.5rem; }
/* Recipe card & sharing: a quiet ⋯ on the home screen's recipe cards. */
.st-card-more { position:absolute; top:6px; right:6px; z-index:3; width:36px; height:32px; border-radius:10px; border:1.5px solid #e3e3ef; background:#fff;
  font:900 1rem 'Nunito', sans-serif; color:#63637e; cursor:pointer; line-height:1; }
.st-card-more:hover, .st-card-more:focus-visible { border-color:#1b1b2e; outline:none; color:#1b1b2e; }
/* The app's own rows, in the page's cards. */
#st-shell .st-card .cfg-row { padding:11px 2px; border-top:1px solid var(--st-line); border-bottom:0; background:none; box-shadow:none; min-height:0; gap:12px; cursor:default; }
#st-shell .st-card > .cfg-row:first-child, #st-shell .st-card > h2 + .cfg-row { border-top:0; }
#st-shell .st-card .cfg-row-icon { display:none; }
#st-shell .st-card .cfg-row-label { font-size:.9rem; font-weight:700; color:var(--st-ink); }
#st-shell .st-card .cfg-row-hint { color:var(--st-muted); font-weight:700; font-size:.78rem; }
#st-shell .st-card .cfg-row { flex-wrap:wrap; }
#st-shell .st-card .cfg-row-body, #st-shell .st-card .cfg-row-label, #st-shell .st-card .cfg-row-hint { min-width:0; overflow-wrap:anywhere; }
#st-shell .st-card .cfg-row-right { flex-shrink:1; min-width:0; max-width:100%; flex-wrap:wrap; }
#st-shell .st-card .cfg-row-right > div { flex-wrap:wrap; min-width:0; }
#st-shell .st-card input[type="range"] { min-width:0; }
#st-shell .ok-pic .ok-add { white-space:normal; text-align:center; max-width:100%; }
#st-shell .ok-name { overflow-wrap:anywhere; max-width:100%; }
#st-shell .st-card .cfg-reach, #st-shell .st-card .cfg-row:not([role="button"]) .cfg-row-chevron { display:none; }
/* A row that is itself the button (Export all recipes, Measuring tools) stays one. */
#st-shell .st-card .cfg-row[role="button"] { cursor:pointer; }
#st-shell .st-card [style*="padding-left:42px"] { padding-left:0 !important; }
/* The app's On / Off buttons as the mock-up's switches. Their words stay for
   a screen reader (aria-pressed and aria-label are theirs). */
/* !important on the box too: the buttons carry their own inline padding and radius. */
#st-shell .st-card .cfg-row-right > button[aria-pressed] { all:unset; cursor:pointer; box-sizing:border-box; width:46px !important; min-width:46px; height:26px !important; padding:0 !important;
  border-radius:50px !important; background:var(--st-line) !important;
  position:relative; flex-shrink:0; font-size:0 !important; color:transparent !important; border:0 !important; }
#st-shell .st-card .cfg-row-right > button[aria-pressed]::after { content:""; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.25); transition:left .15s; }
#st-shell .st-card .cfg-row-right > button[aria-pressed="true"] { background:var(--st-good) !important; }
#st-shell .st-card .cfg-row-right > button[aria-pressed="true"]::after { left:23px; }
#st-shell .st-card .cfg-row-right > button[aria-pressed]:focus-visible { outline:2px solid var(--st-orange); outline-offset:2px; }
@media (prefers-reduced-motion: reduce) { .st-sw::after, #st-shell .st-card .cfg-row-right > button[aria-pressed]::after { transition:none; } }
#st-shell .st-card .st-borrow-block { padding:11px 2px; border-top:1px solid var(--st-line); }
#st-shell .st-card > .st-borrow-block:first-child { border-top:0; }
#st-shell .st-card .st-borrow-block > div { border-bottom:0 !important; padding-left:0 !important; padding-right:0 !important; }
#st-shell .st-card > h2 + .st-borrow-block, #st-shell .st-card > .st-note + .st-borrow-block { border-top:0; }
/* Our kitchen (Round 2, 21 Nov 2026). */
#st-shell .st-card > .st-note.st-intro { margin:0 0 8px; }
/* A collapsible row of the app's (Ingredient & equipment photos, Measuring
   tools) shows open under the card's own heading: its header row hidden,
   its body shown. Nothing in the row is changed, so it goes back as it was. */
#st-shell .st-open-rows .cfg-row[data-click="toggleCfgRow"] { display:none; }
#st-shell .st-open-rows .cfg-row[data-click="toggleCfgRow"] + div { display:block !important; padding:0 !important; background:none !important; border-top:0 !important; }
/* Our equipment for a teacher who is not the lead: the photos, no way to
   change them (the server refuses her a save or a remove too). */
#st-shell .st-view-only .ok-pic { cursor:default; }
#st-shell .st-view-only .ok-pic input, #st-shell .st-view-only .ok-add, #st-shell .st-view-only .ok-remove, #st-shell .st-view-only .ok-new { display:none; }
/* The import box under the tiles: the tiles are its pills now. */
#st-shell #load-recipe-box { border:1.5px solid var(--st-line) !important; border-radius:14px; overflow:hidden; }
#st-shell #load-recipe-box > div:has(> .load-mode-btn) { display:none !important; }
#st-shell #load-recipe-box #load-input-area { display:block !important; }
/* Contact support, in the page rather than over it. */
#st-shell .st-support > div { height:auto !important; max-height:none !important; max-width:none !important; box-shadow:none !important; border-radius:12px !important; border:1.5px solid var(--st-line); }
#st-shell .st-support [data-click="closeSupportOverlay"] { display:none; }
#st-shell .st-support #sup-body { min-height:320px; }
/* "✏️ Bring in & edit" beside ⚙️ in the footer (teachers and the lead). */
#bring-fab { height:46px; padding:0 .9rem; border-radius:23px; background:#fff1e8; color:#c24f12; border:2px solid #F26A21;
  font-family:'Nunito',sans-serif; font-size:.9rem; font-weight:900; cursor:pointer; white-space:nowrap; flex-shrink:0; }
#bring-fab:focus-visible { outline:3px solid #F26A21; outline-offset:2px; }
@media (max-width:600px) { #bring-fab { height:38px; padding:0 .6rem; font-size:.8rem; } #bring-fab .bf-long { display:none; } }
@media print { #st-shell, .st-menu, .st-share, #bring-fab, .st-card-more { display:none !important; } }
/* A way in that costs us money, for a teacher who is not the lead (20 Nov 2026). */
.tc-choice.tc-locked { opacity:.5; cursor:default; }
.tc-choice.tc-locked:hover { border-color:#d8e9df; background:#fff; }
/* The licence key box keeps a usable width in the Our school card. */
#st-shell #licence-key-input { min-width:0; flex:1 1 200px; }
#st-shell .st-card.st-support { padding:0; border:0; background:none; }

/* ═══════════════════════════════════════════════════════════════════════════
   ONE TEACHER MENU (Therese, 23 Nov 2026; her approved mock-up). One list
   down the side in coloured group cards, the open page picked with a thick
   border and ✓ (never colour alone), Find a setting at its foot, and
   everything a finger taps at least 48px. On a phone the list is its own
   screen and each page has "← Menu". Built on the frame above; these rules
   come after it on purpose.
   ═══════════════════════════════════════════════════════════════════════════ */
#st-shell { font-size:16px; --st-sel:#FF4D00; --st-sel-edge:#c43d00; --st-off:#eeeef2; --st-off-ink:#55556a; }
.st-ab { min-height:48px; display:inline-flex; align-items:center; box-sizing:border-box; font-size:1rem; border-width:3px; }
.st-ab.on::after { content:" ✓"; white-space:pre; }
#st-shell .st-btn { min-height:44px; display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; font-size:.92rem; border-width:2px; }
#st-shell .st-btn.s { min-height:44px; font-size:.86rem; padding:6px 12px; }
#st-shell .st-btn.g, .st-share .st-btn.g { background:#1f7a46; border-color:#1f7a46; color:#fff; }
.st-share .st-btn { min-height:44px; display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; }
#st-shell .st-chip { min-height:44px; display:inline-flex; align-items:center; box-sizing:border-box; font-size:.92rem; padding:0 16px; border-width:2px; }
#st-shell .st-chip.on { background:#fff; color:var(--st-ink); border:3px solid var(--st-sel); box-shadow:0 0 0 1px var(--st-sel-edge); }
#st-shell .st-chip.on::before { content:"✓ "; color:var(--st-sel); white-space:pre; }
#st-shell .st-field { min-height:48px; font-size:1rem; }
.st-back-menu { display:none !important; align-self:flex-start; }
/* the side: group cards */
.st-wrap { grid-template-columns:300px minmax(0, 1fr); }
.st-side { gap:12px; padding:14px 12px 24px; }
.st-groups { display:flex; flex-direction:column; gap:12px; }
.st-grpcard { border-radius:16px; background:#fff; border:2px solid var(--st-line); overflow:hidden; }
.st-grpcard h3 { display:flex; align-items:center; gap:8px; font-size:.98rem; font-weight:900; margin:0; padding:9px 12px; }
.st-g-recipes h3 { background:#fff0ee; color:#9e2a17; }
.st-g-classes h3 { background:#e6f5ec; color:#1a5c34; }
.st-g-kitchen h3 { background:#fff8e8; color:#7a5200; }
.st-g-look h3 { background:#f3eeff; color:#5b21b6; }
.st-g-me h3 { background:#ececfb; color:#2f2f8f; }
.st-grpcard .st-nav { width:100%; box-sizing:border-box; min-height:50px; padding:8px 12px; border-radius:0; border-top:1px solid var(--st-line); font-size:.98rem; line-height:1.2; }
.st-grpcard .st-nav .st-ni { font-size:1.2rem; width:1.6rem; text-align:center; flex-shrink:0; }
.st-grpcard .st-nav .st-nl { flex:1; min-width:0; }
.st-grpcard .st-nav.on { border:4px solid var(--st-sel); border-radius:12px; color:#000; font-weight:900; box-shadow:0 0 0 1px var(--st-sel-edge); background:#fff; margin:3px 0; }
.st-grpcard .st-nav.on::after { content:"✓"; color:var(--st-sel); font-weight:900; font-size:1.25rem; }
.st-lead { display:inline-block; font-size:.74rem; font-weight:900; background:#fff3d6; color:#7a4700; border:2px solid #e8c37a; border-radius:8px; padding:0 5px; white-space:nowrap; }
.st-find { border-radius:16px; background:#fff; border:2px solid var(--st-line); padding:10px 12px; }
.st-find label { display:block; font-weight:900; margin-bottom:6px; color:var(--st-ink); }
.st-who { margin-top:0; }
/* pages */
.st-saved { background:#e6f5ec; border:4px solid #2d8a4e; border-radius:16px; padding:12px 16px; font-weight:900; font-size:1.08rem; color:#134d2b; }
.st-saved small { display:block; font-size:.92rem; font-weight:800; color:#1f5c36; margin-top:4px; }
.st-summary { font-weight:800; background:#fff; border:2px solid var(--st-line); border-radius:14px; padding:10px 14px; color:var(--st-ink); }
.st-bigway { all:unset; cursor:pointer; box-sizing:border-box; display:flex; align-items:center; gap:16px; width:100%; min-height:100px; border-radius:18px; border:4px solid var(--st-orange-d); background:var(--st-orange-bg); padding:14px 20px; color:var(--st-ink); }
.st-bigway .st-i { font-size:2.4rem; } .st-bigway b { display:block; font-size:1.3rem; font-weight:900; } .st-bigway small { display:block; font-weight:800; color:#6b3410; font-size:1rem; }
.st-bigway:focus-visible, .st-bigway:hover { box-shadow:0 0 0 3px var(--st-sel-edge); }
.st-or { font-size:1.1rem; font-weight:900; margin:4px 0 0; color:var(--st-ink); }
#st-shell .st-tile { min-height:104px; align-items:center; justify-content:center; text-align:center; border-width:3px; }
#st-shell .st-tile.locked { border-style:dashed; background:var(--st-off); }
.st-aipill { display:inline-block; font-size:.78rem; font-weight:900; background:#f3eeff; color:#3f1d8a; border:2px solid #b9a2f0; border-radius:50px; padding:0 8px; }
.st-pickrow .st-pickic { font-size:1.6rem; }
#st-shell .st-btn.st-big { min-width:120px; min-height:48px; font-size:1rem; }
/* switch with the word on it */
.st-sw.st-sw-word { width:auto; height:auto; min-height:44px; min-width:96px; box-sizing:border-box; display:inline-flex; align-items:center; gap:8px; padding:0 12px 0 6px;
  border-radius:50px; border:3px solid #8a8aa0; background:var(--st-off, #eeeef2); color:var(--st-off-ink, #55556a); font-weight:900; font-size:.95rem; }
.st-sw.st-sw-word::after { content:none; }
.st-sw.st-sw-word .st-k { width:28px; height:28px; border-radius:50%; background:#fff; border:2px solid #8a8aa0; flex-shrink:0; }
.st-sw.st-sw-word[aria-checked="true"] { background:#1f7a46; border-color:#1d6b3a; color:#fff; flex-direction:row-reverse; padding:0 6px 0 14px; }
.st-sw.st-sw-word[aria-checked="true"] .st-k { border-color:#1d6b3a; }
.st-sw.st-sw-word[disabled] { opacity:.5; cursor:not-allowed; }
.st-onchip { display:inline-block; background:#e6f5ec; border:2px solid #8fd0a8; color:#165c34; border-radius:50px; padding:0 10px; font-weight:900; font-size:.85rem; }
.st-offchip { display:inline-block; background:#fff; border:2px solid #6a6a80; color:#33334a; border-radius:50px; padding:0 10px; font-weight:900; font-size:.85rem; }
.st-n0 { font-weight:800; font-size:.88rem; color:var(--st-muted); }
/* What pupils see */
.st-classbar { position:sticky; top:0; z-index:4; background:#f5f5fa; padding:8px 0; align-items:center; border-bottom:2px solid var(--st-line); }
.st-classbar-l { font-weight:900; color:var(--st-muted); }
.st-catgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:14px; }
.st-catcard { border-radius:16px; border:3px solid; display:flex; flex-direction:column; overflow:hidden; background:#fff; }
.st-catopen { all:unset; cursor:pointer; box-sizing:border-box; display:flex; flex-direction:column; align-items:center; gap:4px; padding:12px 10px 10px; text-align:center; min-height:104px; }
.st-catopen:focus-visible { outline:3px solid var(--st-sel); outline-offset:-3px; }
.st-catopen .st-ce { font-size:2.2rem; line-height:1; }
.st-catopen .st-cl { font-weight:900; text-transform:uppercase; letter-spacing:.04em; font-size:.95rem; overflow-wrap:anywhere; }
.st-showing { font-weight:900; color:var(--st-sel-edge); font-size:.88rem; }
.st-catfoot { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px; border-top:2px solid rgba(0,0,0,.08); background:#fff; flex-wrap:wrap; }
.st-catfoot .st-sw-word { margin-left:auto; }
.st-catcard.sel { outline:5px solid var(--st-sel); outline-offset:2px; }
.st-catcard.off { background:var(--st-off) !important; color:var(--st-off-ink) !important; border-style:dashed; border-color:#9a9ab0 !important; }
.st-catcard.off .st-ce { filter:grayscale(1); opacity:.5; }
.st-cc-breakfast { background:#fff8e8; color:#92620a; border-color:#f5e0a0; }
.st-cc-lunch { background:#edfaf3; color:#1a6b3c; border-color:#b0e8c8; }
.st-cc-dinner { background:#fff0ee; color:#b83020; border-color:#f5c0b8; }
.st-cc-dessert { background:#f3eeff; color:#5b21b6; border-color:#d8c8ff; }
.st-cc-safefood { background:#f0fbea; color:#2f6b12; border-color:#bfe3a8; }
.st-cc-c0 { color:#0d7a8a; border-color:#a0dce5; } .st-cc-c1 { color:#a01050; border-color:#f0a8c8; } .st-cc-c2 { color:#5b4a00; border-color:#e8d48a; }
.st-cc-c3 { color:#2f2f8f; border-color:#b9b9ee; } .st-cc-c4 { color:#7a3a00; border-color:#f0c49a; } .st-cc-c5 { color:#1a5c34; border-color:#9fd6b4; }
.st-banner { border-radius:14px; padding:10px 14px; font-weight:800; display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-bottom:10px; }
.st-banner.off { background:#fff3d6; border:3px solid #e8c37a; color:#5a3600; }
.st-banner.sf { background:#f0fbea; border:2px solid #bfe3a8; color:#2f4b12; }
.st-rgrid, .st-mgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:14px; }
.st-rcard, .st-mcard { border-radius:16px; border:4px solid #2d8a4e; background:#fff; display:flex; flex-direction:column; overflow:hidden; position:relative; min-width:0; }
.st-mcard { border:3px solid var(--st-line); }
.st-mcard.live { border:4px solid #2d8a4e; }
.st-rpic { height:96px; display:flex; align-items:center; justify-content:center; font-size:3rem; background:#fff8ee; }
.st-mcard .st-rpic { padding-top:24px; }
/* A recipe with its own dish photo shows the photo, filling the top of the card
   (⋯ sits over its top-right corner; the "On for N classes" pill sits just
   below it since 24 Nov 2026). */
.st-rpic.has-photo, .st-mcard .st-rpic.has-photo { height:130px; padding:0; overflow:hidden; }
.st-rpic.has-photo img { width:100%; height:100%; object-fit:cover; display:block; }
.st-rt { font-weight:900; font-size:1.05rem; padding:8px 12px 2px; overflow-wrap:anywhere; color:var(--st-ink); }
.st-ms { font-weight:700; font-size:.88rem; color:var(--st-muted); padding:0 12px; }
.st-rm { padding:4px 12px 8px; display:flex; gap:6px; flex-wrap:wrap; }
.st-rf { margin-top:auto; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px; border-top:2px solid var(--st-line); flex-wrap:wrap; }
.st-rcard.off { border:4px dashed #9a9ab0; background:var(--st-off); }
.st-rcard.off .st-rpic { filter:grayscale(1); opacity:.45; }
.st-rcard.off .st-rt { color:var(--st-off-ink); text-decoration:line-through; text-decoration-thickness:2px; }
.st-rcard.add { border:3px dashed var(--st-navy); align-items:stretch; justify-content:center; gap:10px; padding:14px; }
#st-shell .st-rcard .st-card-more, #st-shell .st-mcard .st-card-more { width:44px; height:44px; top:6px; right:6px; }
.st-livepill { background:#1f7a46; color:#fff; border-radius:50px; padding:2px 10px; font-weight:900; font-size:.85rem; }
.st-notlive { background:#fff; color:#33334a; border:2px solid #6a6a80; border-radius:50px; padding:1px 9px; font-weight:900; font-size:.82rem; }
/* The pill sits just under the picture, in the card's flow, not over the
   photo. Over the photo's corner it first cut off ("Not on for any cl…",
   check 10.3), then, allowed to wrap, took two lines and covered most of the
   photo at 820px wide (test run, 24 Nov 2026). Under it, it has the card's
   full width and wraps only if it truly must, never hiding anything. */
.st-livepill, .st-notlive { align-self:flex-start; margin:8px 12px 0; max-width:calc(100% - 24px); white-space:normal; line-height:1.25; overflow-wrap:anywhere; }
.st-mgrid { grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); }
/* All classes side by side */
.st-grid-wrap { overflow-x:auto; background:#fff; border:2px solid var(--st-line); border-radius:16px; }
table.st-mx { border-collapse:separate; border-spacing:0; min-width:520px; width:100%; }
.st-mx th, .st-mx td { padding:8px 10px; border-bottom:1px solid var(--st-line); text-align:center; font-weight:800; }
.st-mx thead th { background:#fbf7f3; font-weight:900; }
.st-mx th[scope="row"] { text-align:left; position:sticky; left:0; background:#fff; z-index:1; font-weight:800; }
.st-mx tr.st-mx-cat th, .st-mx tr.st-mx-cat td { background:#fbf7f3; font-weight:900; }
.st-cell { all:unset; cursor:pointer; box-sizing:border-box; min-height:44px; min-width:92px; border-radius:12px; border:3px solid; font-weight:900; font-size:.92rem; padding:0 10px; display:inline-flex; align-items:center; justify-content:center; }
.st-cell.on { background:#1f7a46; border-color:#1d6b3a; color:#fff; }
.st-cell.off { background:var(--st-off); border-color:#8a8aa0; color:var(--st-off-ink); }
.st-cell.catoff { background:#fff; border:3px dashed #9a9ab0; color:var(--st-off-ink); }
.st-cell:focus-visible { outline:3px solid var(--st-sel); outline-offset:2px; }
/* dialogs: Who with?, Which classes see this? */
.st-share .st-card { max-width:560px; }
.st-whoq { font-weight:900; font-size:1.1rem; margin:0 0 8px; }
.st-who-btn { all:unset; cursor:pointer; box-sizing:border-box; display:flex; align-items:center; gap:14px; width:100%; min-height:84px; margin-bottom:10px; border-radius:16px; border:3px solid #c9c9d6; background:#fff; padding:10px 14px; color:#1b1b2e; }
.st-who-btn .st-i { font-size:2.1rem; } .st-who-btn b { display:block; font-size:1.1rem; font-weight:900; } .st-who-btn small { display:block; font-weight:700; color:#55556a; }
.st-who-btn:hover, .st-who-btn:focus-visible { border-color:#FF4D00; }
.st-who-btn[disabled] { opacity:.5; cursor:not-allowed; border-style:dashed; }
.st-which .st-row { flex-wrap:wrap; }
.st-which .st-wpick[hidden] { display:none; }   /* .st-row's display:flex would otherwise show a hidden one */
.st-menu button.st-new { background:#e6f5ec; }
/* the footer's ☰ Menu (the app's ⚙️ button, for a school's teachers): gone
   from the footer (Therese, 24 Nov 2026), it is at the top right now
   (.st-topmenu). The element stays, hidden, because the app still shows,
   hides and focuses #settings-fab; !important beats applyRoleUI's inline
   display:''. Anyone without the menu keeps ⚙️ (no .st-menufab). */
#settings-fab.st-menufab { display:none !important; }
/* The top ☰ Menu (stTopMenuButtons): the menu's own top-bar button, unpicked,
   with a navy edge so it reads on white Home, the orange recipe banner and the
   editor's coloured bar alike. Never for a pupil (the JS gate, and this). */
.st-topmenu { all:unset; box-sizing:border-box; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:8px 16px; border-radius:12px;
  border:2px solid #23235c; background:#fff; color:#1b1b2e; font-family:'Nunito', sans-serif; font-weight:900; font-size:.95rem; white-space:nowrap; flex-shrink:0; }
.st-topmenu:hover { box-shadow:0 0 0 3px #c43d00; }
.st-topmenu:focus-visible { outline:3px solid #F26A21; outline-offset:2px; }
.st-topmenu[hidden], .st-topmenu-box[hidden] { display:none !important; }   /* all:unset would otherwise show a hidden one */
html.student-boot .st-topmenu, html.student-boot .st-topmenu-box, html.cooking .st-topmenu { display:none !important; }
@media print { .st-topmenu, .st-topmenu-box { display:none !important; } }
/* On a recipe: the top right of the banner, level with 🏠 Home. The banner's
   right edge gets room for it, so a long title never runs underneath. */
#recipe-view > header > .st-topmenu { position:absolute; top:2rem; right:max(1.5rem, env(safe-area-inset-right, 0px)); z-index:3; }
#recipe-view > header.st-has-topmenu { padding-right:8.5rem; }
@media (max-width:600px) {
  #recipe-view > header > .st-topmenu { top:.6rem; right:max(.6rem, env(safe-area-inset-right, 0px)); min-height:40px; padding:6px 10px; font-size:.85rem; }
  #recipe-view > header.st-has-topmenu { padding-right:6.5rem; }
}
/* The editor / toolkit header: before ✕. */
#settings-overlay .s-head .st-topmenu { min-height:38px; padding:6px 12px; font-size:.85rem; }
/* the recipe screen's teacher bar */
#st-teacher-bar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; background:#fff; border:3px solid #23235c; border-radius:16px; padding:10px 12px; margin:0 0 12px; font-family:'Nunito', sans-serif; }
#st-teacher-bar .st-tb-who { flex-basis:100%; font-weight:900; color:#23235c; font-size:.95rem; }
.st-tb-btn { min-height:48px; padding:0 16px; border-radius:14px; border:3px solid #23235c; background:#fff; color:#1b1b2e; font-family:inherit; font-weight:900; font-size:1rem; cursor:pointer; }
.st-tb-btn.p { background:#F26A21; border-color:#c24f12; color:#fff; }
html.cooking #st-teacher-bar, html.student-boot #st-teacher-bar { display:none; }
@media print { #st-teacher-bar { display:none !important; } }
/* a phone: the list is its own screen; a page has "← Menu" */
@media (max-width:860px) {
  .st-wrap.st-at-page .st-side { display:none; }
  .st-wrap.st-at-page .st-back-menu { display:inline-flex !important; }
  .st-wrap.st-at-landing .st-side { flex-direction:column; overflow:visible; border-bottom:0; }
  .st-wrap.st-at-landing .st-side .st-grpcard .st-nav { white-space:normal; }
  .st-wrap.st-at-landing .st-side .st-who { display:block; }
}
