/* ============================================================
   helloPapa UI: the cooking components, direction A "Countertop" (docs/10 §3 "Cooking", Phase 1).
   Link after ui/tokens.css and ui/ui.css. Tokens only, never a raw colour (a test checks it); every painting
   sits on a .plate (D22). Layout of the page itself (the screens, the header) stays in the page's <style>.
   Sizes follow docs/10 §2.2: step title 48 px in landscape and 36 px on a phone, step detail 21 / 18 px,
   every control at least 48 px, the main cook-mode controls 52 to 76 px.
   ============================================================ */

/* ---------- icon button ---------- */
[hidden]{display:none !important}
.ib{width:52px;height:52px;flex:0 0 52px;border-radius:16px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--line);color:var(--ink);box-shadow:0 1px 3px color-mix(in srgb,var(--ink) 7%,transparent);transition:border-color var(--dur-fast) var(--ease),background var(--dur-fast) var(--ease)}
.ib:hover{border-color:var(--line-2)}
.ib .icon{width:22px;height:22px}
.ib.on{background:var(--accent-soft);color:var(--accent-ink);border-color:transparent}
.ib[disabled]{opacity:.4;pointer-events:none}
.kick{font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;font-weight:500;color:var(--ink-3)}
.kick.accent{color:var(--accent-text)}

/* ---------- small parts shared by the recipe page and cook mode ---------- */
.pill{display:inline-flex;align-items:center;gap:6px;border-radius:var(--r-pill);padding:6px 12px;font-size:12.5px;font-weight:600;background:var(--surface-2);color:var(--ink-2)}
.pill .icon{width:14px;height:14px;stroke-width:2.6}
.pill.ok{background:var(--herb-soft);color:var(--herb-text)}
.thumb{flex:0 0 44px;width:44px;height:44px;border-radius:12px;display:grid;place-items:center;overflow:hidden}
.thumb img,.thumb svg{width:40px;height:40px;object-fit:contain}
.thumb.lg{flex-basis:56px;width:56px;height:56px;border-radius:16px}
.thumb.lg img,.thumb.lg svg{width:50px;height:50px}
.stepper{display:flex;align-items:center;gap:6px}
.stepper button{width:48px;height:48px;border-radius:14px;background:var(--surface);border:1px solid var(--line);box-shadow:0 1px 3px color-mix(in srgb,var(--ink) 8%,transparent);display:grid;place-items:center}
.stepper button:hover{border-color:var(--line-2)}
.stepper button[disabled]{opacity:.35;pointer-events:none}
.stepper output{font-family:var(--mono);font-weight:600;font-size:22px;min-width:44px;text-align:center;font-variant-numeric:tabular-nums}

/* ---------- ingredient groups and rows (recipe page, ingredients slide, step sheet) ---------- */
.ov-card,.list-slide,.sheet{container-type:inline-size}
.ing-groups .grp{break-inside:avoid}
@container (min-width:720px){.ing-groups{column-count:2;column-gap:40px}}
.grp h3{display:flex;align-items:center;gap:10px;font-family:var(--mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;font-weight:600;color:var(--accent-text);margin:16px 0 4px}
.grp h3::after{content:"";flex:1;height:1px;background:var(--line)}
.ing-row{display:grid;grid-template-columns:28px auto 1fr auto;gap:14px;align-items:center;width:100%;min-height:56px;padding:9px 0;border-bottom:1px solid var(--line);text-align:left}
.ing-row:last-child{border-bottom:0}
.ing-row.plain{grid-template-columns:28px 1fr auto}
.ck{width:28px;height:28px;border-radius:9px;border:2px solid var(--line-2);display:grid;place-items:center;color:var(--on-herb);transition:background var(--dur-fast) var(--ease),border-color var(--dur-fast) var(--ease)}
.ck .icon{width:16px;height:16px;stroke-width:3;opacity:0;transform:scale(.5);transition:opacity var(--dur-fast) var(--ease),transform var(--dur-fast) var(--ease)}
.ing-row.got .ck{background:var(--herb);border-color:var(--herb)}
.ing-row.got .ck .icon{opacity:1;transform:none}
.ing-row .nm{font-weight:600;font-size:16px;line-height:1.3;min-width:0}
.ing-row .nm small{display:block;font-weight:500;font-size:13px;color:var(--ink-3);line-height:1.35}
.ing-row .nm em{display:block;font-style:normal;font-weight:500;font-size:13px;color:var(--herb-text);line-height:1.35}
.ing-row.got .nm,.ing-row.got .qty{color:var(--ink-3)}
.ing-row.got .nm b{text-decoration:line-through;text-decoration-color:var(--line-2)}
.ing-row .thumb{transition:opacity var(--dur-base) var(--ease)}
.ing-row.got .thumb{opacity:.5}
.qty{font-family:var(--mono);font-weight:600;font-size:15px;text-align:right;white-space:nowrap}
.tools-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:22px;padding-top:20px;border-top:1px solid var(--line)}
.tools-row .pill{font-size:13.5px;padding:9px 14px;background:var(--surface);border:1px solid var(--line)}
.tools-row .pill.opt{color:var(--ink-3)}

/* ---------- home: the recipe list ---------- */
.home-wrap{max-width:1240px;margin:0 auto;padding:56px 40px 72px}
.home-head{max-width:46em;margin-bottom:44px}
.home-head h1{font-size:clamp(44px,6.2vw,78px);line-height:.98;letter-spacing:-.045em;font-weight:800;margin:20px 0 20px}
.home-head p{font-size:19px;color:var(--ink-2);max-width:30em;line-height:1.6}
.home-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:20px}
.rcard{grid-column:span 4;display:flex;flex-direction:column;gap:14px;text-align:left;background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--shadow);padding:26px 28px 28px;min-height:210px;border:1px solid transparent;transition:transform var(--dur-base) var(--ease),border-color var(--dur-base) var(--ease)}
.rcard .soon-ic{width:48px;height:48px;border-radius:14px;background:var(--surface-2);color:var(--ink-3);display:grid;place-items:center}
.rcard .soon-ic .icon{width:24px;height:24px}
.rcard .h{display:block;font-size:22px;line-height:1.15;letter-spacing:-.025em;font-weight:800}
.rcard .desc{display:block;font-size:15px;color:var(--ink-2);line-height:1.5}
.rcard .kick{display:block}
.rcard .cta-row{margin-top:auto;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.rcard .full{display:block;color:var(--ink-3);font-size:14px;margin-top:-6px}
.rcard.soon{opacity:.82;cursor:default}
.rcard.ready{grid-column:span 12;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:0;padding:0;overflow:hidden;min-height:380px}
.rcard.ready .plate{border-radius:0;display:grid;place-items:center;min-height:300px;position:relative}
.rcard.ready .plate img,.rcard.ready .plate svg{width:82%;height:86%;object-fit:contain}
.rcard.ready .body{padding:40px 44px;display:flex;flex-direction:column;gap:16px;justify-content:center}
.rcard.ready .h{font-size:clamp(30px,3.6vw,46px);line-height:1.02;letter-spacing:-.04em}
.rcard.ready .desc{font-size:17.5px;max-width:30em}
.rcard .meta{display:flex;gap:26px;flex-wrap:wrap}
.rcard .meta>span{display:flex;flex-direction:column;gap:2px}
.rcard .meta b{font-size:19px;letter-spacing:-.02em}
@media (hover:hover){.rcard.ready:hover{transform:translateY(-4px);border-color:var(--line-2)}}
.home-foot{margin-top:56px;color:var(--ink-3);font-size:13.5px}

/* ---------- recipe overview ---------- */
.ov-layout{width:100%;display:grid;grid-template-columns:minmax(380px,440px) minmax(0,1fr);gap:28px;max-width:1400px;margin:0 auto;padding:28px;align-items:start}
.ov-side{position:sticky;top:20px;background:var(--surface);border-radius:30px;box-shadow:var(--shadow);overflow:hidden}
.ov-side .plate{border-radius:0;aspect-ratio:16/9;display:grid;place-items:center}
.ov-side .plate img,.ov-side .plate svg{width:80%;height:92%;object-fit:contain}
.ov-side .bd{padding:22px 26px 24px}
.ov-side h1{font-size:34px;line-height:1.02;letter-spacing:-.04em;font-weight:800;margin:10px 0 6px}
.ov-side .full{color:var(--ink-3);font-size:14px}
.ov-side .about{color:var(--ink-2);font-size:15.5px;margin-top:10px;line-height:1.55}
.stats{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);border-radius:18px;margin:16px 0 14px}
.stats>div{padding:12px;border-left:1px solid var(--line)}
.stats>div:first-child{border-left:0}
.stats b{display:block;font-size:19px;letter-spacing:-.02em;margin-top:2px;font-variant-numeric:tabular-nums}
.stats .kick{font-size:10.5px}
.serves{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--bg);border-radius:18px;padding:6px 6px 6px 18px;margin-bottom:14px}
.serves .lbl b{display:block;font-size:16px}
.serves .lbl span{font-size:13px;color:var(--ink-3)}
.cta{width:100%;min-height:60px;font-size:18px;border-radius:18px}
@media (min-width:981px) and (max-height:900px){.ov-side .about{display:none}.ov-side h1{font-size:30px}}
.trust{display:flex;flex-wrap:wrap;gap:8px}
.src{font-size:14.5px;color:var(--ink-2);margin-top:14px;line-height:1.55;max-width:46em}
.src a{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}
.ov-main{display:flex;flex-direction:column;gap:28px;min-width:0}
.tabs{display:flex;gap:4px;background:var(--surface-2);border-radius:16px;padding:4px;width:max-content;max-width:100%;overflow-x:auto}
.tabs button{padding:12px 20px;border-radius:12px;font-weight:600;font-size:15px;color:var(--ink-2);min-height:48px;white-space:nowrap}
.tabs button:hover{color:var(--ink)}
.ov-card{background:var(--surface);border-radius:30px;box-shadow:var(--shadow);padding:28px 30px;scroll-margin-top:20px}
.ov-card .card-h{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:12px;flex-wrap:wrap}
.ov-card .card-h h2{font-size:26px;letter-spacing:-.03em;font-weight:800;margin:0}
.ov-card .card-h p{color:var(--ink-3);font-size:14px}
.ch-r{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.tick-status{font-family:var(--mono);font-size:12px;letter-spacing:.06em;text-transform:uppercase;font-weight:600;color:var(--ink-3)}
.tick-status.ok{color:var(--herb-text)}
.tick-all{min-height:48px;padding:0 18px;font-size:14px}

/* kitchen timeline */
.tl{margin-top:10px}
.tl-axis{position:relative;height:18px;color:var(--ink-3);margin:0 0 6px 120px;font-family:var(--mono);font-size:11px;letter-spacing:.06em}
.tl-axis span{position:absolute;top:0;transform:translateX(-50%)}
.tl-axis span:first-child{transform:none}
.tl-track{display:grid;grid-template-columns:120px 1fr;align-items:center;margin-bottom:12px}
.tl-track>b{font-size:14px}
.tl-track>b small{display:block;font-weight:500;color:var(--ink-3);font-size:12px}
.lane{position:relative;height:52px;background:var(--bg);border-radius:14px}
.blk{position:absolute;top:6px;bottom:6px;border-radius:10px;display:flex;align-items:center;padding:0 10px;font-size:12.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:6px;display:block;line-height:38px}
.blk.t{background:var(--accent-soft);color:var(--accent-ink);border:1px solid color-mix(in srgb,var(--accent) 30%,transparent)}
.blk.h{background:var(--inverse);color:var(--on-inverse);text-align:center;padding:0}
.blk.free{background:repeating-linear-gradient(135deg,transparent 0 8px,color-mix(in srgb,var(--herb-text) 12%,transparent) 8px 16px);color:var(--herb-text);border:1px dashed color-mix(in srgb,var(--herb-text) 50%,transparent);text-align:center}
.legend{display:flex;gap:18px;margin-top:8px;color:var(--ink-3);font-size:13px;flex-wrap:wrap}
.legend i{display:inline-block;width:12px;height:12px;border-radius:4px;margin-right:6px;vertical-align:-1px}
.legend .l1{background:var(--accent-soft);border:1px solid color-mix(in srgb,var(--accent) 35%,transparent)}
.legend .l2{background:var(--inverse)}
.legend .l3{border:1px dashed var(--herb-text)}

/* steps list on the recipe page */
.st-row{display:grid;grid-template-columns:44px 1fr auto;gap:16px;align-items:center;padding:14px 0;border-bottom:1px solid var(--line)}
.st-row:last-child{border-bottom:0}
.st-row .n{width:44px;height:44px;border-radius:13px;background:var(--bg);display:grid;place-items:center;font-family:var(--mono);font-weight:600}
.st-row b{font-size:16.5px;letter-spacing:-.01em;line-height:1.3}
.st-row p{font-size:13.5px;color:var(--ink-3);margin-top:2px}
.tag{font-family:var(--mono);font-size:12px;font-weight:600;border-radius:var(--r-pill);padding:7px 11px;background:var(--bg);color:var(--ink-2);white-space:nowrap}
.tag.tm{background:var(--accent-soft);color:var(--accent-ink)}

/* ---------- cook mode: the top bar ---------- */
.cbar{display:flex;align-items:center;gap:14px;min-height:52px}
.cbar .ttl{min-width:0;flex:0 1 auto}
.cbar .ttl b{display:block;font-size:16px;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:26ch}
.cbar .ttl .kick{display:block}
.steps-bar{flex:1;display:flex;gap:5px;align-items:center;min-width:90px;min-height:48px;padding:0 4px;border-radius:14px}
.steps-bar i{flex:1;height:8px;border-radius:9px;background:var(--surface-2);transition:background var(--dur-base) var(--ease),height var(--dur-base) var(--ease)}
.steps-bar i.past{background:var(--herb)}
.steps-bar i.current{background:var(--accent);height:12px}
.steps-bar i.timerdot{background:linear-gradient(90deg,var(--accent),var(--accent-text));animation:glow 1.8s ease-in-out infinite}
@keyframes glow{0%,100%{opacity:.55}50%{opacity:1}}
.bar-timers{display:flex;gap:10px;align-items:center}

/* timer pills (cook bar, and a floating stack on the other screens) */
.tpill{display:flex;align-items:center;gap:12px;min-height:52px;padding:6px 16px 6px 6px;border-radius:18px;background:var(--surface);border:1px solid color-mix(in srgb,var(--accent) 30%,transparent);box-shadow:0 1px 3px color-mix(in srgb,var(--ink) 7%,transparent);text-align:left;color:var(--ink)}
.ring{--p:0;flex:none;width:40px;height:40px;border-radius:50%;background:conic-gradient(var(--accent) calc(var(--p) * 1%),var(--accent-soft) 0);display:grid;place-items:center}
.ring::after{content:"";width:30px;height:30px;border-radius:50%;background:var(--surface)}
.tpill .t{display:block;font-family:var(--mono);font-weight:600;font-size:20px;line-height:1;font-variant-numeric:tabular-nums}
.tpill .l{display:block;font-size:12px;color:var(--ink-3);margin-top:3px;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tpill.paused .ring{opacity:.5}
.tpill.done{background:var(--accent);color:var(--on-accent);border-color:var(--accent);animation:ping 1.2s ease-in-out infinite}
.tpill.done .l{color:var(--on-accent)}
.tpill.done .ring{background:var(--on-accent)}
.tpill.done .ring::after{background:var(--accent)}
@keyframes ping{0%,100%{box-shadow:0 0 0 0 color-mix(in srgb,var(--accent) 50%,transparent)}50%{box-shadow:0 0 0 8px color-mix(in srgb,var(--accent) 0%,transparent)}}
.tmore{min-width:52px;height:52px;border-radius:18px;padding:0 12px;background:var(--surface);border:1px solid var(--line);font-family:var(--mono);font-weight:600}

/* ---------- cook mode: the stage ---------- */
.stage{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;min-height:0;flex:1}
.scene{background:var(--plate);color:var(--on-plate);border-radius:32px;box-shadow:var(--shadow-plate);position:relative;display:grid;place-items:center;overflow:hidden;min-height:0}
.scene img.art-scene,.scene>svg{width:88%;height:84%;max-height:100%;object-fit:contain;pointer-events:none;-webkit-user-drag:none}
.scene .hint{position:absolute;left:20px;top:20px;background:var(--surface);color:var(--ink-2);border-radius:12px;padding:8px 12px;font-size:11.5px;box-shadow:0 1px 3px color-mix(in srgb,var(--ink) 8%,transparent)}
.scene .flip{position:absolute;top:50%;transform:translateY(-50%);width:52px;height:52px;border-radius:50%;background:color-mix(in srgb,var(--surface) 90%,transparent);color:var(--ink-2);border:1px solid var(--line);box-shadow:0 2px 8px color-mix(in srgb,var(--ink) 10%,transparent);display:grid;place-items:center}
.scene .flip:hover{color:var(--ink);border-color:var(--line-2)}
.scene .flip.l{left:16px}.scene .flip.r{right:16px}
.scene .flip .icon{width:22px;height:22px}
.step-panel{display:flex;flex-direction:column;gap:16px;min-height:0;overflow-y:auto;padding:6px 4px 0 6px;scrollbar-width:thin}
.sn{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.sn .n{font-family:var(--mono);font-weight:600;font-size:15px;background:var(--inverse);color:var(--on-inverse);border-radius:10px;padding:6px 10px;letter-spacing:.02em}
.step-panel h1{font-size:clamp(32px,4.8vh + .6vw,50px);line-height:1;letter-spacing:-.045em;font-weight:800}
.step-panel .det{font-size:clamp(17px,2.4vh + .2vw,21px);line-height:1.5;color:var(--ink-2)}
/* a long step on a landscape tablet tightens up in two stages (fitPanel in app.js) until nothing scrolls */
.step-panel.compact{gap:12px}
.step-panel.compact .det{font-size:17.5px;line-height:1.45}
.step-panel.compact .chip{font-size:14px;padding:4px 12px 4px 4px;gap:8px}
.step-panel.compact .thumb{flex-basis:36px;width:36px;height:36px}
.step-panel.compact .thumb img,.step-panel.compact .thumb svg{width:32px;height:32px}
.step-panel.compact .step-timer{padding:8px 8px 8px 14px}
.step-panel.compact .timer-main-btn{min-height:52px}
.step-panel.tight{gap:8px}
.step-panel.tight h1{font-size:34px}
.step-panel.tight .det{font-size:16px;line-height:1.4}
.step-panel.tight .need .kick{display:none}
.step-panel.tight .need-row{gap:6px}
.step-panel.tight .wait-card{padding:10px 16px}
.step-panel.tiny{gap:6px}
.step-panel.tiny h1{font-size:30px}
.step-panel.tiny .det{font-size:15px;line-height:1.35}
.step-panel.tiny .chip{font-size:13px;padding:3px 10px 3px 3px;gap:6px;border-radius:12px}
.step-panel.tiny .thumb{flex-basis:30px;width:30px;height:30px;border-radius:9px}
.step-panel.tiny .thumb img,.step-panel.tiny .thumb svg{width:26px;height:26px}
.step-panel.tiny .step-timer{padding:6px 6px 6px 12px;border-radius:16px}
.step-panel.tiny .timer-main-btn{min-height:48px;font-size:15px}
.step-panel.tiny .step-timer .what span{display:none}
.step-panel.tiny .tip{font-size:12px;line-height:1.4}
.need .kick{display:block;margin-bottom:10px}
.need-row{display:flex;flex-wrap:wrap;gap:10px}
.chip{display:flex;align-items:center;gap:10px;background:var(--surface);border-radius:16px;padding:6px 16px 6px 6px;font-weight:600;font-size:15.5px;box-shadow:0 1px 3px color-mix(in srgb,var(--ink) 6%,transparent);border:1px solid var(--line)}
.tip{font-size:13.5px;line-height:1.5;color:var(--ink-3)}
.tip b{color:var(--ink-2);font-weight:700}
.fold{width:100%}
.fold summary{list-style:none;display:inline-flex;align-items:center;gap:8px;min-height:48px;font-size:13.5px;font-weight:600;color:var(--herb-text);padding:0 14px;border-radius:var(--r-pill);border:1px dashed color-mix(in srgb,var(--herb-text) 50%,transparent);cursor:pointer}
.fold summary::-webkit-details-marker{display:none}
.fold[open] summary{background:var(--herb-soft);border-style:solid;border-color:transparent}
.fold .fold-body{margin-top:8px;font-size:14px;line-height:1.5;color:var(--ink-2);background:var(--herb-soft);border-radius:14px;padding:12px 16px}
.verify-note{font-size:12px;color:var(--ink-3)}
.verify-note::before{content:"⚑ ";color:var(--accent-text)}

/* the timer for this step */
.step-timer{display:flex;align-items:center;gap:16px;background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:12px 12px 12px 16px;box-shadow:0 1px 3px color-mix(in srgb,var(--ink) 6%,transparent)}
.step-timer .what{flex:1;min-width:0}
.step-timer .what b{display:block;font-size:15px}
.step-timer .what span{font-size:13px;color:var(--ink-3);line-height:1.35;display:block}
.timer-main-btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:56px;padding:0 22px;border-radius:16px;background:var(--accent);color:var(--on-accent);font-weight:700;font-size:16px;white-space:nowrap;box-shadow:0 8px 20px -6px color-mix(in srgb,var(--accent) 55%,transparent)}
.timer-main-btn:hover{background:var(--accent-hover)}
.timer-main-btn .icon{width:20px;height:20px}
.timer-main-btn .t-count{font-family:var(--mono);font-size:19px;font-variant-numeric:tabular-nums}
.timer-main-btn.running{background:var(--herb);box-shadow:none}
.timer-main-btn.paused{background:var(--ink-2)}
.timer-main-btn.done-state{background:var(--inverse);color:var(--on-inverse);box-shadow:none}
.timer-sub{display:none}

/* while you wait */
.wait-card{margin-top:auto;background:var(--herb-soft);border-radius:24px;padding:16px 20px;display:grid;grid-template-columns:1fr auto;gap:4px 16px;align-items:center}
.wait-card .kick{display:block;color:var(--herb-text);margin-bottom:2px}
.wait-card b{font-size:16px;line-height:1.3}
.wait-card .t{font-family:var(--mono);font-weight:600;font-size:26px;color:var(--herb-text);font-variant-numeric:tabular-nums}
.wait-card p{grid-column:1/-1;color:var(--ink-2);font-size:14.5px}
.wait-card .bar{grid-column:1/-1;height:6px;background:color-mix(in srgb,var(--herb-text) 20%,transparent);margin:2px 0}
.wait-card .bar>i{background:var(--herb-text)}

/* ---------- cook mode: the bottom controls ---------- */
.ctrl{display:grid;grid-template-columns:minmax(150px,200px) 1fr;gap:16px;align-items:stretch}
.big{min-height:76px;border-radius:22px;display:flex;align-items:center;gap:14px;padding:0 24px;font-weight:700;font-size:18px;text-align:left}
.big .icon{width:24px;height:24px;stroke-width:2.2}
.big.back{background:var(--surface);border:1px solid var(--line);box-shadow:0 1px 3px color-mix(in srgb,var(--ink) 7%,transparent)}
.big.back:hover{border-color:var(--line-2)}
.big.next{background:var(--accent);color:var(--on-accent);justify-content:space-between;box-shadow:0 10px 24px -8px color-mix(in srgb,var(--accent) 60%,transparent)}
.big.next:hover{background:var(--accent-hover)}
.big.next small{display:block;font-family:var(--mono);font-size:11.5px;letter-spacing:.06em;text-transform:uppercase;font-weight:600;opacity:.88;margin-bottom:2px}
.big.next span{min-width:0}
.big[disabled]{opacity:.4;pointer-events:none}

/* ---------- cook mode: the ingredients and tools slides ---------- */
.list-slide{background:var(--surface);border-radius:32px;box-shadow:var(--shadow);padding:28px 32px;overflow-y:auto;min-height:0;flex:1}
.list-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-bottom:8px}
.list-head h1{font-size:clamp(32px,4.6vh + 1vw,48px);line-height:1;letter-spacing:-.045em;font-weight:800;margin-top:10px}
.list-head p{color:var(--ink-3);font-size:14px;margin-top:6px}
.check-progress{font-family:var(--mono);font-size:12px;letter-spacing:.06em;text-transform:uppercase;font-weight:600;color:var(--herb-text);margin-top:18px}

/* ---------- the step sheet, the timer view, the banner, the toast ---------- */
.sheet .seg{margin-bottom:12px;width:100%}
.sheet .seg>*{flex:1;text-align:center;min-height:48px;display:grid;place-items:center}
.jump-item{display:grid;grid-template-columns:38px 1fr auto;gap:14px;align-items:center;width:100%;min-height:56px;padding:8px 10px;border-radius:16px;text-align:left;font-size:15.5px;font-weight:600;line-height:1.3}
.jump-item:hover{background:var(--surface-2)}
.jump-num{width:38px;height:38px;border-radius:12px;background:var(--bg);display:grid;place-items:center;font-family:var(--mono);font-weight:600;font-size:14px;color:var(--ink-2)}
.jump-item.here{background:var(--accent-soft)}
.jump-item.here .jump-num{background:var(--accent);color:var(--on-accent)}
.jump-item.past .jump-num{background:var(--herb);color:var(--on-herb)}
.jump-num .icon{width:18px;height:18px;stroke-width:3}
.jump-t{font-family:var(--mono);font-size:12px;font-weight:600;color:var(--accent-ink);white-space:nowrap;font-variant-numeric:tabular-nums}

.tview{position:fixed;inset:0;z-index:85;background:var(--bg);display:none;flex-direction:column;padding:max(16px,env(safe-area-inset-top)) 20px max(20px,env(safe-area-inset-bottom))}
.tview.show{display:flex}
.tview .top{display:flex;align-items:center;gap:14px}
.tview .mid{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;text-align:center;min-height:0}
.tview .digits{font-family:var(--mono);font-weight:600;font-size:clamp(88px,26vmin,300px);line-height:.95;letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.tview.done .digits{color:var(--accent-text)}
.tview h2{font-size:clamp(24px,4vmin,40px);letter-spacing:-.03em;font-weight:800}
.tview .tbar{width:min(560px,80vw);height:10px}
.tview .acts{display:flex;gap:14px;justify-content:center;flex-wrap:wrap}
.tview .acts .btn{min-height:64px;padding:0 30px;font-size:17px;border-radius:18px}

#doneBanner{position:fixed;left:50%;top:max(12px,env(safe-area-inset-top));transform:translate(-50%,-20px);z-index:90;width:min(94vw,640px);background:var(--accent);color:var(--on-accent);border-radius:22px;padding:14px 16px 14px 22px;box-shadow:var(--shadow-2);display:flex;align-items:center;gap:14px;opacity:0;pointer-events:none;transition:opacity var(--dur-base) var(--ease),transform var(--dur-base) var(--ease)}
#doneBanner.show{opacity:1;transform:translate(-50%,0);pointer-events:auto}
#doneBanner .db-text{flex:1;font-size:15px;line-height:1.3}
#doneBanner .db-text b{display:block;font-size:18px;letter-spacing:-.01em}
#doneBanner button{min-height:48px;padding:0 18px;border-radius:14px;background:color-mix(in srgb,var(--on-accent) 20%,transparent);font-weight:700;font-size:14.5px;color:var(--on-accent);white-space:nowrap}
#doneBanner button:hover{background:color-mix(in srgb,var(--on-accent) 32%,transparent)}
#toast{position:fixed;left:50%;top:calc(76px + env(safe-area-inset-top));transform:translate(-50%,-10px);z-index:95;background:var(--inverse);color:var(--on-inverse);border-radius:16px;padding:12px 18px;font-size:14.5px;font-weight:600;line-height:1.35;max-width:min(92vw,440px);text-align:center;box-shadow:var(--shadow-2);opacity:0;pointer-events:none;transition:opacity var(--dur-base) var(--ease),transform var(--dur-base) var(--ease)}
#toast.show{opacity:1;transform:translate(-50%,0)}

/* a floating stack of timers on the screens that have no cook bar */
.dock-float{position:fixed;right:16px;bottom:calc(16px + env(safe-area-inset-bottom));z-index:60;display:flex;flex-direction:column;gap:10px;align-items:flex-end}
.dock-float .tpill{box-shadow:var(--shadow-2)}

/* ---------- the done screen ---------- */
.done-wrap{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:20px;flex:1;min-height:0}
.done-panel{display:flex;flex-direction:column;gap:18px;justify-content:center;padding:8px 8px 0 12px;min-height:0;overflow-y:auto}
.done-panel h1{font-size:clamp(38px,6vh + 1vw,64px);line-height:.98;letter-spacing:-.045em;font-weight:800}
.done-panel .det{font-size:19px;line-height:1.55;color:var(--ink-2);max-width:28em}
.done-stats{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid var(--line);border-radius:18px;max-width:30em}
.done-stats>div{padding:14px 16px;border-left:1px solid var(--line)}
.done-stats>div:first-child{border-left:0}
.done-stats b{display:block;font-size:22px;letter-spacing:-.02em;margin-top:2px;font-family:var(--mono);font-variant-numeric:tabular-nums}
.done-stats small{display:block;font-size:12.5px;color:var(--ink-3);margin-top:2px}
.attrib{font-size:13px;color:var(--ink-3);line-height:1.55;max-width:46ch}
.attrib a{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}
.done-acts{display:flex;gap:12px;flex-wrap:wrap}

/* ---------- quiet motion: a short fade and lift, never a slide from the side ---------- */
.slide{position:absolute;inset:0;display:flex;flex-direction:column;min-height:0}
.slide.enter{animation:slideIn var(--dur-base) var(--ease) both}
.slide.exit{animation:slideOut 160ms var(--ease) both}
@keyframes slideIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes slideOut{from{opacity:1}to{opacity:0}}

/* the old flat illustrations animate; keep their keyframes working */
.a-steam,.a-bub,.a-stir,.a-fall,.a-bob,.a-chop{transform-box:fill-box;transform-origin:center}
.a-steam{animation:aSteam 3.4s ease-in-out infinite}
@keyframes aSteam{0%{transform:translateY(6px);opacity:0}25%{opacity:.9}70%{opacity:.6}100%{transform:translateY(-26px);opacity:0}}
.a-bub{animation:aBub 2.6s ease-in-out infinite}
@keyframes aBub{0%,100%{transform:translateY(2px) scale(.9);opacity:.4}50%{transform:translateY(-4px) scale(1.08);opacity:1}}
.a-stir{animation:aStir 2.2s ease-in-out infinite}
@keyframes aStir{0%,100%{transform:rotate(-4deg)}50%{transform:rotate(5deg)}}
.a-chop{transform-origin:80% 80%;animation:aChop 1.6s ease-in-out infinite}
@keyframes aChop{0%,100%{transform:rotate(0)}30%{transform:rotate(-7deg)}55%{transform:rotate(2deg)}}
.a-fall{animation:aFall 2.8s ease-in-out infinite}
@keyframes aFall{0%{transform:translateY(-14px);opacity:0}30%{opacity:1}75%{transform:translateY(8px);opacity:1}100%{transform:translateY(14px);opacity:0}}
.a-bob{animation:aBob 3.6s ease-in-out infinite}
@keyframes aBob{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-6px) rotate(1.6deg)}}
.a-pour{animation:aPour 1.1s linear infinite}
@keyframes aPour{to{stroke-dashoffset:-28}}
.a-glow{animation:aGlow 2.8s ease-in-out infinite}
@keyframes aGlow{0%,100%{opacity:.45}50%{opacity:1}}

/* ---------- portrait tablets and phones: stacked ---------- */
@media (max-width:980px),(max-aspect-ratio:1/1){
  .home-wrap{padding:40px 24px 56px}
  .rcard{grid-column:span 6}
  .rcard.ready{grid-template-columns:1fr}
  .rcard.ready .body{padding:28px 28px 32px}
  .ov-layout{grid-template-columns:1fr;padding:20px}
  .ov-side{position:static}
  .stage{grid-template-columns:1fr;overflow-y:auto;align-content:start}
  .scene{aspect-ratio:4/3;min-height:220px;max-height:44vh}
  .step-panel{overflow:visible;padding:0}
  .cbar .ttl{display:none}
  .done-wrap{grid-template-columns:1fr;overflow-y:auto;align-content:start}
  .done-panel{overflow:visible;padding:4px 4px 12px}
  .tpill .l{display:none}
  .wait-card{margin-top:4px}
}
@media (max-width:600px){
  .home-wrap{padding:28px 16px 48px}
  .rcard{grid-column:span 12}
  .rcard.ready .body{padding:22px 20px 26px}
  .ov-layout{padding:16px 16px 40px;gap:16px}
  .ov-card{padding:22px 18px;border-radius:24px}
  .stats{grid-template-columns:1fr 1fr}
  .stats>div:nth-child(3){border-left:0}
  .stats>div:nth-child(n+3){border-top:1px solid var(--line)}
  .tl-track{grid-template-columns:1fr}
  .tl-axis{margin-left:0}
  .tl-track>b{margin-bottom:6px}
  .tabs{width:100%}
  .step-panel h1{font-size:36px}
  .step-panel .det{font-size:18px}
  .steps-bar{display:none}
  .ctrl{grid-template-columns:minmax(110px,.6fr) 1.4fr}
  .big{min-height:64px;padding:0 18px;font-size:16px}
  .big.next{font-size:15px;line-height:1.2}
  .list-slide{padding:20px 18px;border-radius:24px}
  .done-stats{grid-template-columns:1fr 1fr 1fr}
  .step-timer{flex-direction:column;align-items:stretch}
  .timer-main-btn{width:100%}
  .ing-row{grid-template-columns:28px auto 1fr auto;gap:12px}
}

/* a phone has no room for the wordmark beside the way back */
@media (max-width:480px){.nav-in:has(#navBack:not([hidden])) .logo{font-size:0;gap:0;min-width:48px;justify-content:center}}
