/* Views from the Stove. Tokens and rules are documented in designstandards.md. */

:root {
  --bg: #efece6;
  --surface: #e5e1d9;
  --line: #cdc7bb;
  --fg: #17151a;
  --muted: #5b5662;
  --on-accent: #f7f3ec;
  --site-accent: #85601c;
  --album-light: var(--site-accent);
  --album-dark: #d2a85a;
  --accent: var(--album-light);

  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, Menlo, Consolas, monospace;

  --content-w: 960px;
  --header-h: 56px;
  --player-h: 0px;
  --dock-h: 0px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0c10; --surface: #17151b; --line: #2d2a33; --fg: #ebe6dc; --muted: #a39dab;
    --on-accent: #0d0c10; --accent: var(--album-dark);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0c10; --surface: #17151b; --line: #2d2a33; --fg: #ebe6dc; --muted: #a39dab;
  --on-accent: #0d0c10; --accent: var(--album-dark);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  padding-bottom: calc(var(--player-h) + var(--dock-h) + env(safe-area-inset-bottom, 0px));
}
img, svg { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
h1:focus, main:focus { outline: none; }
.pill[disabled] { opacity: 0.4; cursor: default; filter: none; }
.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; }

.wrap { max-width: var(--content-w); margin: 0 auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.top .wrap { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; min-width: 0; }
.brand svg { width: 30px; height: 30px; flex: none; color: var(--accent); }
.brand span { font-family: var(--display); font-size: 1.35rem; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; flex: none;
  border: 0; background: transparent; border-radius: 50%; cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- Buttons ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; padding: 0.7rem 1.3rem;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--accent); color: var(--on-accent);
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
}
.pill:hover { filter: brightness(1.08); }
.pill.ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.pill.ghost:hover { box-shadow: inset 0 0 0 1px var(--fg); filter: none; }
.pill svg { width: 16px; height: 16px; }

.switch {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px;
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.switch .track {
  width: 40px; height: 24px; border-radius: 999px; background: var(--line); position: relative; flex: none;
  transition: background 0.15s;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--bg); transition: transform 0.15s;
}
.switch[aria-checked="true"] .track { background: var(--accent); }
.switch[aria-checked="true"] .track::after { transform: translateX(16px); }
.switch.unsupported { opacity: 0.55; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .switch .track, .switch .track::after { transition: none; } }

.textlink { color: var(--accent); text-decoration: none; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }
.textlink svg { width: 13px; height: 13px; margin-left: 4px; vertical-align: -1px; }
.card .row .textlink { display: inline-flex; align-items: center; min-height: 44px; }
.textlink:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Home ---------- */
.hero { padding-block: clamp(2.25rem, 8vw, 5.5rem) clamp(1.75rem, 5vw, 3rem); display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
.hero h1 {
  margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(3.4rem, 13vw, 9rem); line-height: 0.88; letter-spacing: -0.02em;
}
.hero h1 em { color: var(--accent); }
.hero .stats { margin: 0; }
/* Phones: "A cookbook for ..." on its own line, the counts below it. */
@media (max-width: 719px) {
  .hero .stats-for { display: block; }
  .hero .stats-sep { display: none; }
}
.hero .sub { max-width: 46ch; color: var(--muted); font-size: 1.05rem; margin: 0; }

.searchbar { display: flex; gap: 0.5rem; max-width: 34rem; }
.searchbar input { flex: 1; min-width: 0; }
input[type="search"], input[type="text"] {
  font: inherit; font-size: 1rem; color: var(--fg);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  min-height: 48px; padding: 0.6rem 1.1rem;
}
input[type="search"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.section-label { margin: 0 0 1rem; color: var(--muted); }
.discography { padding-block: 2rem 3rem; border-top: 1px solid var(--line); }
.albums { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.album-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 1rem; align-items: center; text-decoration: none; }
.album-card .cover { width: 112px; }
.album-card h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.75rem; line-height: 1.05; }
.album-card p { margin: 0.25rem 0 0; }
.album-card:hover h3 { color: var(--a); }
@media (min-width: 720px) {
  .albums { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.5rem); }
  .album-card { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 0.9rem; }
  .album-card .cover { width: 100%; }
}

.letter { padding-block: 2.5rem 3.5rem; border-top: 1px solid var(--line); display: grid; gap: 0.5rem; }
.letter h2 { margin: 0 0 0.5rem; font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 6vw, 2.8rem); line-height: 1.05; }
.letter p { margin: 0 0 0.75rem; max-width: 56ch; }

/* ---------- Cover placeholder ---------- */
.cover {
  aspect-ratio: 1; position: relative; overflow: hidden;
  background: var(--a); color: #f7f3ec; border-radius: 4px;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 9%; container-type: inline-size;
}
.cover .disc { position: absolute; right: -28%; bottom: -28%; width: 80%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgba(247, 243, 236, 0.35); box-shadow: inset 0 0 0 9cqw rgba(247, 243, 236, 0.06), inset 0 0 0 18cqw rgba(247, 243, 236, 0.05); }
.cover .c-top { font-family: var(--mono); font-size: max(7px, 5.2cqw); letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; position: relative; }
.cover .c-title { font-family: var(--display); font-size: 15cqw; line-height: 0.9; position: relative; }
.cover .c-sub { font-family: var(--mono); font-size: max(7px, 4.6cqw); letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; margin-top: 0.4em; display: block; }

.cover.art { padding: 0; background: var(--surface); }
.cover.art img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Album page ---------- */
.crumb { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 1.25rem; color: var(--muted); text-decoration: none; min-height: 44px; }
.crumb:hover { color: var(--fg); }
.crumb svg { width: 16px; height: 16px; flex: none; }
.album-hero { display: grid; gap: 1.5rem; padding-block: 0.5rem 2rem; }
.album-hero .cover { width: min(100%, 300px); }
.album-hero h1 { margin: 0.2rem 0 0.4rem; font-family: var(--display); font-weight: 400; font-size: clamp(2.8rem, 10vw, 5.5rem); line-height: 0.92; }
.album-hero .blurb { margin: 0 0 1rem; max-width: 50ch; color: var(--muted); }
.album-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 1.25rem; }
@media (min-width: 720px) {
  .album-hero { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: end; gap: clamp(1.5rem, 4vw, 3rem); }
  .album-hero .cover { width: 100%; }
}

.tracks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tracks a {
  display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: baseline;
  padding: 0.85rem 0; text-decoration: none; border-bottom: 1px dotted var(--line);
}
.tracks a:hover .t-title { color: var(--accent); }
.tracks .n, .tracks .d { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tracks .t-title { font-family: var(--display); font-size: 1.5rem; line-height: 1.15; display: block; }
.tracks .t-sub { color: var(--muted); font-size: 0.92rem; display: block; }
.tracks .d { text-align: right; white-space: nowrap; }
.tracks .d small { display: block; font-size: 0.68rem; }
.feat { font-family: var(--body); font-size: 0.95rem; color: var(--muted); font-style: italic; }

.empty { padding: 2rem 0; color: var(--muted); border-top: 1px solid var(--line); }
.empty h2 { margin: 0 0 0.3rem; font-family: var(--display); font-weight: 400; color: var(--fg); font-size: 1.8rem; }
.empty p { margin: 0; }

.next-album { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.5rem 0 3rem; margin-top: 2.5rem; border-top: 1px solid var(--line); text-decoration: none; }
.next-album .na-title { font-family: var(--display); font-size: clamp(1.8rem, 6vw, 2.6rem); line-height: 1; display: block; }
.next-album:hover .na-title { color: var(--accent); }
.next-album svg { width: 28px; height: 28px; flex: none; }

/* ---------- Recipe page ---------- */
.recipe-head { display: grid; gap: 0.6rem; padding-block: 0.25rem 1.5rem; }
.recipe-head h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(2.5rem, 9vw, 4.4rem); line-height: 0.98; }
.recipe-head .dish { margin: 0; font-family: var(--display); font-style: italic; color: var(--muted); font-size: 1.4rem; }
.meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.3rem 0 0; padding: 0; list-style: none; }
.meta li { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.3rem 0.65rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.meta li.veg { color: var(--accent); border-color: currentColor; }
.recipe-head .blurb { margin: 0.3rem 0 0; max-width: 58ch; white-space: pre-line; }
.credit { margin: 0; }
.receipt { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.92rem; max-width: 60ch; }
.receipt a { color: var(--accent); white-space: nowrap; }
.receipt a svg { width: 13px; height: 13px; vertical-align: -1px; margin-left: 2px; }
.rtag { display: inline-block; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); border: 1px solid currentColor; border-radius: 3px; padding: 0.05rem 0.4rem; margin-right: 0.3rem; vertical-align: 1px; white-space: nowrap; }
.tracks .rtag { margin: 0 0 0 0.25rem; font-size: 0.6rem; }
.credit a { color: var(--accent); }

.cook-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; padding-block: 1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cook-bar .reset { margin-left: auto; }

.cards { display: grid; gap: 0.75rem; padding-block: 1.5rem; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { background: var(--surface); border-radius: var(--radius); padding: 1rem 1.15rem; display: grid; gap: 0.35rem; align-content: start; }
.card .label { color: var(--accent); margin: 0; }
.card .big { font-family: var(--display); font-size: 1.5rem; line-height: 1.15; margin: 0; }
.card p { margin: 0; }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.4rem; }

.cols { display: grid; gap: 2rem; padding-block: 1rem 2rem; }
.cols h2 { margin: 0 0 0.8rem; color: var(--accent); font-weight: 500; }
/* Phone: ingredients, method, then comments. The side wrapper disappears so comments can follow the method. */
.cols .side { display: contents; }
.cols .ing-col { order: 1; }
.cols .method { order: 2; }
.cols .comments { order: 3; }
.comments { gap: 0.75rem; }
.comments h2 { margin: 0; }
.comments ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.comments li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: 0.5rem; }
.comments li:not(:has(.c-icon)) { grid-template-columns: minmax(0, 1fr); }
.comments .c-icon { font-size: 1.15rem; line-height: 1.5; }
.comments li p { margin: 0; }
@media (min-width: 960px) {
  .cols { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4rem); }
  .cols .side { display: grid; gap: 1.5rem; align-content: start; position: sticky; top: calc(var(--header-h) + 1.25rem); align-self: start; max-height: calc(100vh - var(--header-h) - var(--player-h) - 2.5rem); overflow: auto; padding-right: 0.5rem; }
  .cols .ing-col, .cols .method, .cols .comments { order: 0; }
}
.group-label { margin: 1.2rem 0 0.3rem; color: var(--muted); }
.group-label:first-of-type { margin-top: 0; }
.ing { list-style: none; margin: 0; padding: 0; }
.ing li label { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.4rem 0; cursor: pointer; min-height: 44px; }
.ing input { accent-color: var(--accent); margin-top: 0.3rem; width: 1.15rem; height: 1.15rem; flex: none; }
.ing input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 1.1rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.6rem; max-width: 62ch; }
.step-body { display: grid; gap: 0.6rem; justify-items: start; }
.steps .timer { min-height: 44px; padding: 0.35rem 0.95rem; font-size: 0.85rem; }
.steps .timer svg { width: 16px; height: 16px; }
.steps li::before { content: counter(s); font-family: var(--mono); color: var(--accent); font-size: 0.95rem; padding-top: 0.15rem; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1.5rem 0 3rem; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; display: grid; gap: 0.2rem; }
.pager a:last-child { text-align: right; }
.pager .p-title { font-family: var(--display); font-size: 1.35rem; line-height: 1.1; }
.pager a:hover .p-title { color: var(--accent); }

/* ---------- Search ---------- */
.search-head { padding-block: 1.75rem 1rem; display: grid; gap: 1rem; }
.search-head h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 9vw, 4rem); line-height: 1; }
.filters { display: grid; gap: 0.9rem; padding-bottom: 1.25rem; }
.filter-group { display: grid; gap: 0.4rem; }
.filter-group .mono { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  min-height: 40px; padding: 0.4rem 0.9rem; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); font-size: 0.92rem;
}
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.results-meta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 0.75rem; border-top: 1px solid var(--line); }
.results-meta button { background: none; border: 0; cursor: pointer; padding: 0.5rem 0; }
.results { list-style: none; margin: 0 0 3rem; padding: 0; }
.results a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 1rem; padding: 0.9rem 0; border-bottom: 1px dotted var(--line); text-decoration: none; }
.results a:hover .r-title { color: var(--a); }
.results .r-title { font-family: var(--display); font-size: 1.45rem; line-height: 1.15; }
.results .r-sub { color: var(--muted); font-size: 0.92rem; grid-column: 1; }
.results .r-meta { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); text-align: right; white-space: nowrap; grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.tag { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--a); grid-column: 1; }
.tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--a); }

/* ---------- Liner notes ---------- */
.liner { padding-block: 0.5rem 3rem; }
.liner-head { display: grid; gap: 0.4rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 1.75rem; }
.liner-head h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 9vw, 4.4rem); line-height: 0.95; }
.liner-body { columns: 1; column-gap: 3rem; }
@media (min-width: 820px) { .liner-body { columns: 2; } }
.liner-note { break-inside: avoid; margin: 0 0 1.75rem; scroll-margin-top: calc(var(--header-h) + 16px); }
.liner-note h2 { margin: 0 0 0.35rem; font-family: var(--mono); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; }
.liner-note p { margin: 0 0 0.4rem; font-size: 0.95rem; line-height: 1.65; }
.liner-note.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { background: color-mix(in srgb, var(--accent) 18%, transparent); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .liner-note.flash { animation: none; } }
.liner-foot { margin-top: 1rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }

footer.site { padding-block: 0 2.5rem; color: var(--muted); font-size: 0.88rem; }
footer.site p { border-top: 1px solid var(--line); padding-top: 2rem; max-width: none !important; }
footer.site p { margin: 0; max-width: 60ch; }

/* ---------- Pinned player ---------- */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--bg); border-top: 1px solid var(--line);
  padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom, 0px));
}
.player .inner { max-width: var(--content-w); margin: 0 auto; display: flex; align-items: center; gap: 0.5rem; }
.player .embed { flex: 1; min-width: 0; height: 80px; border-radius: 12px; overflow: hidden; background: var(--surface); }
.player .embed iframe { display: block; border: 0; }
.player .ctrls { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, 38px); gap: 2px; }
.player .ctrls .icon-btn { width: 38px; height: 38px; }
.player .ctrls .icon-btn svg { width: 18px; height: 18px; }

/* ---------- Cook mode ---------- */
.cook {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  display: grid; grid-template-rows: auto auto 1fr auto; grid-template-columns: minmax(0, 1fr);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: calc(var(--player-h) + var(--dock-h) + env(safe-area-inset-bottom, 0px));
}
.cook-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.5rem var(--gutter); border-bottom: 1px solid var(--line); }
.cook-top .title { min-width: 0; flex: 1; }
.cook-top .title span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cook-top .title .name { font-family: var(--display); font-size: 1.2rem; line-height: 1.1; }
.progress { height: 3px; background: var(--line); }
.progress span { display: block; height: 100%; background: var(--accent); transition: width 0.2s; }
.cook-body { overflow: auto; padding: clamp(1.25rem, 5vw, 3rem) var(--gutter); }
.cook-body .inner { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.cook-step-n { color: var(--accent); margin: 0; }
.cook-step-text { margin: 0; font-size: clamp(1.35rem, 4.6vw, 2rem); line-height: 1.45; }
.uses h2 { margin: 0 0 0.5rem; color: var(--muted); font-weight: 500; }
.uses ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.uses li label { display: flex; gap: 0.7rem; align-items: flex-start; min-height: 40px; padding: 0.25rem 0; cursor: pointer; }
.uses input { accent-color: var(--accent); width: 1.15rem; height: 1.15rem; margin-top: 0.3rem; flex: none; }
.uses input:checked + span { color: var(--muted); text-decoration: line-through; }
.timers { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.timer {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 48px; padding: 0.5rem 1.1rem;
  border-radius: 999px; border: 1px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer;
  font-family: var(--mono); font-size: 0.95rem; font-variant-numeric: tabular-nums;
}
.timer svg { width: 18px; height: 18px; }
.timer.running { background: var(--accent); color: var(--on-accent); }
.timer.done { background: var(--fg); color: var(--bg); border-color: var(--fg); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.6; } }
@media (prefers-reduced-motion: reduce) { .timer.done, .dock-item.done { animation: none; } }

/* ---------- Timer dock ----------
   Every timer that's running, paused, or done, from any recipe.
   Sits above the player and over cooking mode. */
.timer-dock {
  position: fixed; left: 0; right: 0; bottom: var(--player-h); z-index: 55;
  background: var(--bg); border-top: 1px solid var(--line);
  padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom, 0px));
}
body:has(#player:not([hidden])) .timer-dock { padding-bottom: 8px; }
.timer-dock .inner { max-width: var(--content-w); margin: 0 auto; display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; }
.timer-dock .inner::-webkit-scrollbar { display: none; }
.dock-item { flex: none; display: flex; align-items: stretch; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); max-width: 78vw; }
.dock-main { display: grid; text-align: left; gap: 0; background: none; border: 0; color: inherit; cursor: pointer; padding: 0.3rem 0.4rem 0.3rem 1rem; min-height: 44px; min-width: 0; }
.dk-name { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-time { font-family: var(--mono); font-size: 0.95rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.dock-x { background: none; border: 0; color: inherit; cursor: pointer; width: 44px; display: grid; place-items: center; flex: none; }
.dock-x svg { width: 16px; height: 16px; }
.dock-item.running { background: var(--accent); color: var(--on-accent); }
.dock-item.running .dk-name { color: inherit; opacity: 0.85; }
.dock-item.done { background: var(--fg); color: var(--bg); border-color: var(--fg); animation: pulse 1s ease-in-out infinite; }
.dock-item.done .dk-name { color: inherit; opacity: 0.85; }
.cook-nav { display: grid; grid-template-columns: 1fr 1.6fr; gap: 0.75rem; padding: 0.75rem var(--gutter); border-top: 1px solid var(--line); }
.cook-nav .pill { min-height: 56px; font-size: 0.85rem; }
.cook-done { text-align: center; display: grid; gap: 1rem; justify-items: center; padding-top: 2rem; }
.cook-done h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 9vw, 3.6rem); line-height: 1; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 60;
  bottom: calc(var(--player-h) + var(--dock-h) + 16px + env(safe-area-inset-bottom, 0px));
  background: var(--fg); color: var(--bg); padding: 0.75rem 1.1rem; border-radius: 12px;
  max-width: min(92vw, 28rem); font-size: 0.95rem; display: flex; gap: 1rem; align-items: center;
}
.toast button { background: none; border: 0; color: inherit; cursor: pointer; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: underline; }
