/* Related tools — subtle internal links row inside footer (discovery + SEO) */
.related-tools {
    padding-bottom: 7px;
    margin-bottom: 7px;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
    line-height: 1.3;
}
.related-tools-label {
    color: var(--color-text-light, #718096);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 0.7rem;
    margin-right: 12px;
    vertical-align: middle;
}
.related-tools .footer-link {
    color: var(--color-text-medium, #4a5568);
    font-weight: 400;
    font-size: 0.85rem;
    border-bottom: none;
    vertical-align: middle;
}
.related-tools .footer-link:hover {
    color: var(--color-accent, #00a8e8);
    border-bottom: none;
}

/* ============================================================
   RECIPE BOOK — Try Swiss Knife
   ── "The kitchen timer" ────────────────────────────────────
   The page is white so the food photos do the colour. Three
   colours have one job each:
     chili     — action: buttons, ticks, the dial's arc
     turmeric  — attention: the spotlight and a pinned dish
     leaf / earth / yolk — the food-label diet marks, nothing else
   The diet mark is the Indian food-label square (green dot veg,
   brown triangle non-veg) — a sign home cooks already read at a
   glance, with a ring for vegan and amber for egg.

   The signature is the dial: total time drawn as a kitchen
   timer, the arc the share of an hour the dish takes. The same
   object counts down a step in cook mode.

   Bricolage Grotesque (condensed via its width axis) sets dish
   names, tabs and the dial — the packaging voice. Figtree sets
   everything read mid-cook.

   Chrome — header, menu shape, footer — is the platform standard.
   ============================================================ */

:root {
    --ink:         #1f1a16;
    --ink-soft:    #5b5149;   /* 7.3:1 on white */
    --ink-faint:   #776d65;   /* 4.8:1 on white — captions only */
    --page:        #ffffff;
    --plate:       #f6f1ea;
    --plate-deep:  #ece4d8;
    --rule:        #ebe4db;
    --rule-strong: #d6ccbf;

    --chili:       #d2391f;   /* 4.8:1 with white text */
    --chili-deep:  #ab2b14;
    --chili-wash:  #fbebe6;
    --chili-line:  #f2c6bb;
    --turmeric:    #f4b400;
    --turmeric-deep:#7a5000;  /* text on turmeric-pale, 6.9:1 */
    --turmeric-pale:#fff3cf;

    --leaf:        #2e7d32;
    --earth:       #8b3a0f;
    --yolk:        #c98a00;

    --danger:      var(--chili-deep);

    --font-display: 'Bricolage Grotesque', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
    --font-body:    'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-chrome:  -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 22px;
    --shadow-card: 0 1px 2px rgba(31,26,22,0.06), 0 6px 18px rgba(31,26,22,0.07);
    --shadow-lift: 0 2px 4px rgba(31,26,22,0.06), 0 14px 30px -10px rgba(31,26,22,0.25);
    --shadow-lg:   0 18px 48px -16px rgba(31,26,22,0.4);

    /* The names the platform dialog, cloud panel and shared modules theme themselves from */
    --color-primary:      var(--chili);
    --color-accent:       var(--chili);
    --color-accent-hover: var(--chili-deep);
    --color-error:        var(--chili-deep);
    --color-text-dark:    var(--ink);
    --color-text-medium:  var(--ink-soft);
    --color-text-light:   var(--ink-faint);
    --color-border:       var(--rule);
    --color-background:   var(--page);
    --radius-md-platform: 12px;

    /* Platform chrome — pinned to the shared TSK values */
    --chrome-white: #ffffff;
    --chrome-border: #e0e6ed;
    --chrome-bg: #f5f7fa;
    --chrome-text: #555f6d;
    --chrome-radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background: var(--page);
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    padding-bottom: env(safe-area-inset-bottom);
}
img { display: block; max-width: 100%; }
a { color: inherit; }
.hidden { display: none !important; }
[hidden] { display: none !important; }
.seo-h1, .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: 0;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--chili); outline-offset: 2px; }
button, input, select, textarea { font-family: inherit; color: inherit; }
.ic { width: 18px; height: 18px; flex-shrink: 0; }
.muted { color: var(--ink-soft); }

/* ─────────────────────────────── HEADER (platform chrome) ─────────────────────────────── */
.header {
    width: 100%; background-color: #ffffff; border-bottom: 1px solid var(--chrome-border);
    position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 4px rgba(0,0,0,0.05); font-family: var(--font-chrome);
}
.header-inner {
    max-width: 1200px; margin: 0 auto; padding: 0.5rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
}
.header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.header-logo-link { display: flex; align-items: center; text-decoration: none; transition: opacity 0.2s ease; }
.header-logo-link:hover { opacity: 0.85; }
.logo-image { height: 36px; width: auto; display: block; flex-shrink: 0; }
.tool-name-btn {
    font-size: 1.5rem; font-weight: 600; color: #1a2332; white-space: nowrap; line-height: 1.2; letter-spacing: -0.015em;
    background: none; border: none; padding: 0; cursor: pointer; transition: color 0.15s; font-family: var(--font-chrome);
}
.tool-name-btn:hover { color: var(--chili); }
.header-icons { display: flex; align-items: center; gap: 8px; flex-shrink: 0; position: relative; }
.header-icon-btn {
    display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0;
    background: var(--chrome-white); border: 1px solid var(--chrome-border); border-radius: var(--chrome-radius);
    cursor: pointer; transition: all 0.2s ease; color: var(--chrome-text);
}
.header-icon-btn:hover { border-color: var(--chili); background: var(--chrome-bg); color: var(--chili); }
.header-icon-btn svg { width: 20px; height: 20px; }
.lang-short { font-size: 0.875rem; font-weight: 600; color: var(--chrome-text); letter-spacing: 0.02em; font-family: var(--font-chrome); }
.header-icon-btn:hover .lang-short { color: var(--chili); }

/* Language dropdown — in the menu; `.active` is the contract with i18n.js */
.language-selector { position: relative; }
.language-dropdown {
    position: absolute; top: calc(100% + 6px); right: 0; min-width: 150px;
    background: var(--chrome-white); border: 1px solid var(--chrome-border);
    border-radius: var(--chrome-radius); box-shadow: var(--shadow-lg); overflow: hidden; display: none; z-index: 1100;
}
.language-dropdown.active { display: block; }
.lang-option {
    display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.6rem 1rem;
    background: none; border: none; font-size: 0.875rem; color: var(--ink); text-align: left; cursor: pointer;
}
.lang-option:hover { background: var(--plate); }
.lang-option.active { background: var(--chili-wash); color: var(--chili-deep); }
.lang-check { font-size: 0.75rem; opacity: 0; }
.lang-option.active .lang-check { opacity: 1; }

/* ─────────────────────────────── LAYOUT ─────────────────────────────── */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px 20px 0; }

.info-banner {
    display: flex; align-items: flex-start; gap: 8px;
    background: var(--plate); border: 1px solid var(--rule); border-radius: var(--radius-lg);
    padding: 8px 12px; margin-bottom: 12px; font-size: 0.8125rem; line-height: 1.45; color: var(--ink-soft);
}
.info-icon { flex-shrink: 0; font-size: 0.875rem; line-height: 1.4; }
.info-text strong { color: var(--ink); margin-right: 4px; }
.info-close { margin-left: auto; background: none; border: none; font-size: 1.15rem; line-height: 1; color: var(--ink-faint); cursor: pointer; padding: 0 4px; flex-shrink: 0; min-width: 24px; min-height: 24px; }
.info-close:hover { color: var(--ink); }
@media (min-width: 900px) and (hover: hover) { .info-banner-tip { display: none; } }

.eyebrow {
    font-family: var(--font-body); font-weight: 700; font-size: 0.75rem;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--chili-deep);
}

/* ─────────────────────────────── BUTTONS & FIELDS ─────────────────────────────── */
.btn-primary, .btn-ghost, .btn-quiet, .btn-ink, .btn-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 20px; border-radius: 999px;
    font-size: 0.95rem; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
    border: 1.5px solid transparent;
}
.btn-primary { background: var(--chili); color: #fff; border-color: var(--chili); }
.btn-primary:hover { background: var(--chili-deep); border-color: var(--chili-deep); }
.btn-primary:active, .btn-ink:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.btn-ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-ink:hover { background: #000; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); border-color: currentColor; }
.btn-outline:hover { background: rgba(31,26,22,0.06); }
.btn-quiet { background: transparent; color: var(--ink-soft); }
.btn-quiet:hover { color: var(--ink); background: var(--plate); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.875rem; }
.danger-text { color: var(--danger); }
.danger-text:hover { color: var(--danger); background: var(--chili-wash); }

.link-btn {
    background: none; border: none; padding: 0; cursor: pointer; color: var(--chili-deep); font-weight: 700; font-size: 0.9rem;
    text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--ink); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }

.field-label { display: block; font-size: 0.8125rem; font-weight: 700; color: var(--ink); margin: 16px 0 6px; }
.modal-body > .field-label:first-child { margin-top: 0; }
.input {
    width: 100%; min-height: 44px; padding: 0 12px;
    border: 1.5px solid var(--rule-strong); border-radius: var(--radius-md);
    background: #fff; color: var(--ink); font-size: 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.input { padding: 10px 12px; resize: vertical; line-height: 1.45; }
select.input { cursor: pointer; }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--plate-deep); }
.input::placeholder { color: var(--ink-faint); opacity: 0.8; }
.input.is-invalid { border-color: var(--chili); box-shadow: 0 0 0 3px var(--chili-wash); }

/* ─────────────────────────────── SIGNATURE: THE DIAL ─────────────────────────────── */
.dial {
    --size: 54px;
    width: var(--size); height: var(--size); border-radius: 50%; background: #fff;
    position: relative; display: inline-grid; place-items: center; flex: none;
    box-shadow: 0 2px 8px rgba(31,26,22,0.18);
}
.dial svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.dial-track { fill: none; stroke: #efe6db; stroke-width: 7; }
.dial-arc { fill: none; stroke: var(--chili); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 0.9s cubic-bezier(.2,.7,.2,1); }
.dial-lbl { position: relative; text-align: center; line-height: 1; }
.dial-lbl b {
    display: block; font-family: var(--font-display); font-weight: 800; font-stretch: 80%;
    font-size: calc(var(--size) * 0.3); letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.dial-lbl small { display: block; font-weight: 600; font-size: calc(var(--size) * 0.15); color: var(--ink-soft); margin-top: 2px; }
.dial-lg { --size: 92px; }
.dial-xl { --size: 168px; box-shadow: none; background: transparent; }
.dial-xl .dial-track { stroke: var(--plate-deep); }
.dial-xl .dial-lbl b { font-size: 2.9rem; }
.dial-xl.is-running .dial-arc { transition: stroke-dashoffset 0.25s linear; }
.dial-xl.is-done .dial-arc { stroke: var(--leaf); }
.dial-xl.is-done .dial-lbl b { color: var(--leaf); }

/* ─────────────────────────────── DIET MARKS — the food-label square ─────────────────────────────── */
.diet {
    width: 18px; height: 18px; border: 2px solid var(--leaf); border-radius: 3px; background: #fff;
    display: inline-grid; place-items: center; flex: none; vertical-align: -3px;
}
.diet::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); }
.diet-vegan::after { background: transparent; box-shadow: inset 0 0 0 2px var(--leaf); }
.diet-egg { border-color: var(--yolk); }
.diet-egg::after { background: var(--yolk); }
.diet-nonveg { border-color: var(--earth); }
.diet-nonveg::after {
    width: 0; height: 0; border-radius: 0; background: none;
    border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid var(--earth);
}
.diet-sm { width: 14px; height: 14px; border-width: 1.5px; vertical-align: -2px; }
.diet-sm::after { width: 6px; height: 6px; }
.diet-sm.diet-nonveg::after { width: 0; height: 0; border-left-width: 4px; border-right-width: 4px; border-bottom-width: 6px; }
.diet-gap { width: 14px; flex: none; }

/* Placeholder — a plate seen from above, the dish's initial in the middle */
.plate {
    position: absolute; inset: 0; display: grid; place-items: center;
    background: radial-gradient(circle at 50% 50%, #fff 0 33%, var(--rule) 33.5% 34.5%, #fff 35% 43%, var(--plate) 43.5%);
}
.plate-letter { font-family: var(--font-display); font-weight: 800; font-stretch: 75%; font-size: 2.4rem; color: var(--chili); line-height: 1; }
.spot-photo .plate-letter { font-size: 4.5rem; }
.hero-plain .plate-letter { font-size: 5rem; }
.photo { width: 100%; height: 100%; object-fit: cover; }

/* ─────────────────────────────── WELCOME ─────────────────────────────── */
.welcome { display: grid; gap: 36px; padding: 28px 0 12px; align-items: center; }
@media (min-width: 860px) { .welcome { grid-template-columns: 1.3fr 1fr; padding-top: 40px; } }
.welcome-title {
    font-family: var(--font-display); font-weight: 800; font-stretch: 78%;
    font-size: clamp(2.3rem, 6vw, 4rem); line-height: 0.95; letter-spacing: -0.03em; margin: 10px 0 14px;
}
.welcome-sub { font-size: 1.08rem; color: var(--ink-soft); max-width: 36em; }
.concepts { display: grid; gap: 10px; margin: 24px 0; }
@media (min-width: 560px) { .concepts { grid-template-columns: repeat(3, 1fr); } }
.concept { background: var(--plate); border-radius: var(--radius-lg); padding: 12px 14px; }
.concept dt { font-family: var(--font-display); font-weight: 750; font-stretch: 85%; font-size: 1.1rem; }
.concept dd { font-size: 0.875rem; color: var(--ink-soft); margin-top: 2px; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.welcome-more { margin-top: 14px; }
.welcome-more + .welcome-more { margin-top: 8px; }
.welcome-demo { display: flex; justify-content: center; }
.demo-card { width: min(320px, 100%); transform: rotate(-2deg); }
.demo-card .card-photo { background: var(--turmeric); }
.demo-card .plate { background: radial-gradient(circle at 50% 50%, #fff 0 33%, rgba(31,26,22,0.12) 33.5% 34.5%, #fff 35% 43%, var(--turmeric) 43.5%); }
.demo-card .card-head { display: flex; justify-content: flex-end; margin-top: -27px; padding-right: 8px; position: relative; }
.demo-card .card-name, .demo-card .card-meta { padding: 0 4px; }
.demo-card .dial-arc { animation: dial-fill 1.4s cubic-bezier(.2,.7,.2,1) both; }
@keyframes dial-fill { from { stroke-dashoffset: 276.46; } }

/* ─────────────────────────────── THE BOOK'S NAME ─────────────────────────────── */
/* An input dressed as the page heading: the name is typed where it is read. */
.book-head { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.book-name {
    flex: 1; min-width: 0; border: 0; border-bottom: 2px dashed transparent; background: transparent; padding: 2px 0 4px;
    font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    line-height: 1.05; letter-spacing: -0.025em; color: var(--ink); border-radius: 0;
}
.book-name::placeholder { color: var(--ink-faint); opacity: 0.55; }
.book-name:hover { border-bottom-color: var(--rule-strong); }
.book-name:focus { outline: none; border-bottom-color: var(--chili); }
.book-name:focus-visible { outline: none; }
.book-name-pen { color: var(--ink-faint); font-size: 1.1rem; pointer-events: none; opacity: 0; transition: opacity 0.15s; }
.book-head:hover .book-name-pen, .book-name:placeholder-shown + .book-name-pen { opacity: 1; }
.book-name:focus + .book-name-pen { opacity: 0; }

/* ─────────────────────────────── TABS ─────────────────────────────── */
.workspace { padding-top: 6px; }
.tabbar { display: flex; align-items: flex-end; gap: 16px; border-bottom: 1px solid var(--rule); margin-top: 6px; }
.tabs { display: flex; gap: 28px; flex: 1; min-width: 0; }
.tab {
    background: none; border: 0; padding: 10px 0 12px; position: relative; cursor: pointer;
    font-family: var(--font-display); font-weight: 700; font-stretch: 88%; font-size: 1.4rem; letter-spacing: -0.01em; color: var(--ink-faint);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--chili); border-radius: 3px 3px 0 0; }
.tab-count { font-family: var(--font-body); font-weight: 600; font-size: 0.8rem; margin-left: 6px; vertical-align: 3px; color: var(--ink-faint); }
.tab-new { margin-bottom: 8px; }
@media (max-width: 560px) { .tab-new-label { display: none; } .tab-new { padding: 0 16px; } .tabs { gap: 22px; } }

/* A cook left half-way */
.resume-list:empty { display: none; }
.resume-list { display: grid; gap: 8px; margin-top: 14px; }
.resume {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--chili-wash); border: 1px solid var(--chili-line); border-radius: var(--radius-lg); padding: 10px 14px;
}
.resume p { flex: 1 1 220px; font-size: 0.92rem; }
.resume p span { color: var(--ink-soft); }
.resume-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--chili); box-shadow: 0 0 0 4px rgba(210,57,31,0.18); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(210,57,31,0.05); } }

.stage { padding-bottom: 40px; }

/* ─────────────────────────────── SPOTLIGHT ─────────────────────────────── */
.spot {
    margin-top: 22px; background: var(--turmeric); border-radius: var(--radius-xl); padding: 16px;
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: center; position: relative;
}
.spot-photo {
    border: 0; padding: 0; cursor: pointer; display: block; position: relative; overflow: hidden;
    border-radius: var(--radius-lg); aspect-ratio: 16 / 10; background: var(--plate);
}
.spot-photo .photo { transition: transform 0.6s cubic-bezier(.2,.7,.2,1); }
.spot-photo:hover .photo { transform: scale(1.03); }
.spot-body { padding: 8px 110px 8px 0; min-width: 0; }
.spot .eyebrow { color: #5c3c00; }   /* 7.6:1 on turmeric */
.spot-name {
    margin: 10px 0 12px; font-family: var(--font-display); font-weight: 800; font-stretch: 78%;
    font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 0.95; letter-spacing: -0.03em; overflow-wrap: anywhere;
}
.spot-name .linkish:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.spot-meta { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; font-weight: 600; font-size: 0.95rem; }
.spot-meta-item { display: inline-flex; align-items: center; gap: 8px 12px; }
.spot-meta .sep { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.spot-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.spot-dial { position: absolute; right: 22px; top: 22px; }
.spot.swap .spot-photo, .spot.swap .spot-body > * { animation: rise 0.45s cubic-bezier(.2,.7,.2,1) both; }
.spot.swap .spot-body > *:nth-child(2) { animation-delay: 0.04s; }
.spot.swap .spot-body > *:nth-child(3) { animation-delay: 0.08s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 760px) {
    .spot { grid-template-columns: 1fr; gap: 12px; padding: 10px; }
    .spot-body { padding: 4px 8px 10px; }
    .spot-photo { aspect-ratio: 4 / 3; }
    .spot-dial { top: 20px; right: 20px; --size: 76px; }
    .spot-meta .sep { display: none; }   /* a wrapped line would start or end on a dot */
    .spot-meta { gap: 6px 16px; }
}

/* ─────────────────────────────── FILTERS ─────────────────────────────── */
.filters { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
.search { flex: 1 1 260px; position: relative; display: block; }
.search .ic { position: absolute; left: 15px; top: 14px; color: var(--ink-faint); }
.search input {
    width: 100%; height: 46px; border: 1.5px solid var(--rule); border-radius: 999px;
    padding: 0 16px 0 44px; font-size: 1rem; background: #fff;
}
.search input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--plate-deep); }
.seg { display: inline-flex; background: var(--plate); border-radius: 999px; padding: 4px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
    border: 0; background: transparent; padding: 0 14px; height: 38px; border-radius: 999px; cursor: pointer;
    display: inline-flex; gap: 7px; align-items: center; font-weight: 600; font-size: 0.9rem; color: var(--ink-soft); white-space: nowrap;
}
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(31,26,22,0.16); }
.filter-row { display: flex; gap: 10px; align-items: center; width: 100%; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    border: 1.5px solid var(--rule); background: #fff; min-height: 38px; padding: 0 14px; border-radius: 999px; cursor: pointer;
    font-weight: 600; font-size: 0.875rem; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.chip:hover { border-color: var(--rule-strong); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip-n { background: var(--chili); color: #fff; border-radius: 999px; font-size: 0.72rem; padding: 1px 7px; }
.sort { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 0.9rem; white-space: nowrap; }
.sort select { height: 38px; border: 0; background: transparent; font-weight: 700; font-size: 0.9rem; cursor: pointer; }
.catpanel { width: 100%; background: var(--plate); border-radius: var(--radius-lg); padding: 14px 16px; }
.cat-h { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-faint); margin: 8px 0 8px; }
.cat-h:first-child { margin-top: 0; }
.catpanel .chip { min-height: 34px; }
/* Two rows, then the "more…" link; clampChips() sets the max-height it measured. */
.chips.is-clamped { overflow: hidden; padding-bottom: 1px; }
.chips-more { display: inline-block; margin: 6px 0 2px; font-size: 0.85rem; }
@media (max-width: 760px) {
    .filter-row { overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
    .filter-row::-webkit-scrollbar { display: none; }
    .filter-row .chips { flex-wrap: nowrap; }
    .sort { margin-left: 0; }
}

/* ─────────────────────────────── RECIPE CARDS ─────────────────────────────── */
.result-line { margin: 22px 0 14px; color: var(--ink-faint); font-size: 0.875rem; }
.result-line .link-btn { margin-left: 8px; font-size: 0.875rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px 20px; }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr 1fr; gap: 22px 12px; } }
.card-hit { display: block; width: 100%; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; border-radius: var(--radius-lg); }
.card-photo {
    position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden;
    background: var(--plate); box-shadow: var(--shadow-card);
}
.card-photo .photo { transition: transform 0.5s cubic-bezier(.2,.7,.2,1); }
.card-hit:hover .card-photo .photo { transform: scale(1.04); }
.card-diet { position: absolute; left: 10px; top: 10px; }
.pin-tag {
    position: absolute; right: 10px; top: 10px; background: var(--turmeric); color: var(--ink);
    font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px;
}
.card-head { display: flex; justify-content: flex-end; min-height: 10px; margin-top: -27px; padding-right: 8px; position: relative; }
.card-name {
    display: block; margin: 8px 0 2px; font-family: var(--font-display); font-weight: 700; font-stretch: 90%;
    font-size: 1.12rem; line-height: 1.15; letter-spacing: -0.01em; overflow-wrap: anywhere;
}
.card-meta { display: block; color: var(--ink-soft); font-size: 0.85rem; }
.card-meta .never, .never { color: var(--chili-deep); font-weight: 600; }
.card-head:empty + .card-name { margin-top: 12px; }
@media (max-width: 520px) {
    .card .dial { --size: 44px; }
    .card-head { margin-top: -22px; }
    .card-name { font-size: 1rem; }
    .card-meta { font-size: 0.78rem; }
}

.empty-note, .empty-tab { text-align: center; padding: 40px 16px; color: var(--ink-soft); }
.empty-tab { background: var(--plate); border-radius: var(--radius-xl); margin-top: 22px; display: grid; gap: 10px; justify-items: center; }
.empty-title { font-family: var(--font-display); font-weight: 800; font-stretch: 85%; font-size: 1.35rem; color: var(--ink); }

/* ─────────────────────────────── MENUS ─────────────────────────────── */
.menus { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-top: 24px; }
@media (max-width: 400px) { .menus { grid-template-columns: 1fr; } }
.menu-card { border: 1.5px solid var(--rule); border-radius: var(--radius-xl); padding: 22px; background: #fff; display: flex; flex-direction: column; }
.plates { display: flex; margin-bottom: 14px; }
.mini-plate {
    position: relative; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex: none;
    border: 3px solid #fff; box-shadow: 0 1px 4px rgba(31,26,22,0.2); margin-right: -14px; background: var(--plate);
}
.mini-plate .plate-letter { font-size: 1.1rem; }
.mini-plate .plate { background: var(--plate); }
.menu-name { font-family: var(--font-display); font-weight: 800; font-stretch: 82%; font-size: 1.7rem; line-height: 1.02; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.menu-note { color: var(--ink-soft); margin-top: 6px; }
.dish-list { list-style: none; margin: 16px 0 18px; border-top: 1px dashed var(--rule-strong); }
.dish-row {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 0; border: 0; background: none;
    border-bottom: 1px dashed var(--rule-strong); font-weight: 500; font-size: 0.97rem; text-align: left; cursor: pointer;
}
.dish-row:hover .dish-name { color: var(--chili-deep); }
.dish-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dish-row small { color: var(--ink-faint); font-size: 0.82rem; white-space: nowrap; }
.menu-empty { color: var(--ink-soft); margin: 14px 0 18px; font-size: 0.92rem; }
.menu-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.menu-new {
    border: 2px dashed var(--rule-strong); border-radius: var(--radius-xl); display: grid; gap: 8px; justify-items: center; align-content: center;
    text-align: center; padding: 28px; color: var(--ink-soft); min-height: 220px;
}

/* ─────────────────────────────── RECIPE VIEW ─────────────────────────────── */
.detail { padding-top: 4px; }
.back {
    display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 8px; min-height: 40px;
    background: none; border: 0; padding: 0; font-weight: 700; color: var(--ink-soft); cursor: pointer;
}
.back:hover { color: var(--ink); }
.hero { position: relative; border-radius: var(--radius-xl); overflow: hidden; aspect-ratio: 21 / 8; background: var(--plate); }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 38%, rgba(20,14,10,0.74)); pointer-events: none; }
.hero-plain { background: var(--turmeric); aspect-ratio: auto; min-height: 220px; }
.hero-plain::after { display: none; }
.hero-plain .plate { left: auto; width: 60%; max-width: 360px; right: -60px; background: radial-gradient(circle at 50% 50%, #fff 0 33%, rgba(31,26,22,0.12) 33.5% 34.5%, #fff 35% 43%, transparent 43.5%); }
.hero-title { position: absolute; left: 28px; right: 140px; bottom: 24px; z-index: 1; color: #fff; }
.hero-plain .hero-title { color: var(--ink); position: relative; left: auto; right: auto; bottom: auto; padding: 28px 140px 28px 28px; }
.hero-title h2 {
    font-family: var(--font-display); font-weight: 800; font-stretch: 76%;
    font-size: clamp(2.1rem, 5vw, 3.8rem); line-height: 0.92; letter-spacing: -0.03em; overflow-wrap: anywhere;
}
.hero-cats { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.hero-cats span { font-size: 0.78rem; font-weight: 600; background: rgba(255,255,255,0.2); backdrop-filter: blur(6px); padding: 4px 10px; border-radius: 999px; }
.hero-plain .hero-cats span { background: rgba(255,255,255,0.65); }
.hero-dial { position: absolute; right: 28px; bottom: 24px; z-index: 1; }
.hero-plain .hero-dial { top: 28px; bottom: auto; }
.detail-bar { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.facts { display: flex; gap: 26px; flex-wrap: wrap; }
.fact small { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.fact b { font-family: var(--font-display); font-weight: 700; font-stretch: 90%; font-size: 1.15rem; }
.fact-diet { display: inline-flex; align-items: center; gap: 7px; }
.detail-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.history { background: var(--chili-wash); border-radius: var(--radius-lg); padding: 12px 16px; margin-top: 18px; font-size: 0.93rem; }
.history-empty { background: var(--plate); color: var(--ink-soft); }
.hist-notes { list-style: none; margin-top: 6px; display: grid; gap: 3px; color: var(--ink-soft); }
.hist-date { font-weight: 700; color: var(--ink); margin-right: 4px; }
.detail-cols { display: grid; grid-template-columns: minmax(260px, 5fr) 7fr; gap: 44px; padding: 28px 0 20px; }
.sec-h { font-family: var(--font-display); font-weight: 800; font-stretch: 85%; font-size: 1.5rem; margin-bottom: 12px; }
.ing-group { margin: 18px 0 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--chili-deep); }
.ing { list-style: none; }
.ing li { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.ing .q { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ing .n { overflow-wrap: anywhere; }
.steps { list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 14px 0 14px 46px; border-bottom: 1px solid var(--rule); }
.steps li::before {
    content: counter(s); position: absolute; left: 0; top: 12px;
    font-family: var(--font-display); font-weight: 800; font-stretch: 75%; font-size: 1.7rem; line-height: 1; color: var(--chili);
}
.steps p { overflow-wrap: anywhere; white-space: pre-line; }
.step-timer-tag { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.step-timer-tag::before { content: ''; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--chili); border-right-color: transparent; transform: rotate(45deg); }
.source { margin-top: 18px; color: var(--ink-soft); font-size: 0.9rem; overflow-wrap: anywhere; }
.more-photos { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.more-photo { font-size: 0.85rem; font-weight: 600; color: var(--chili-deep); }
@media (max-width: 820px) {
    .detail-cols { grid-template-columns: 1fr; gap: 26px; }
    .hero { aspect-ratio: 4 / 3; }
    .hero-plain { aspect-ratio: auto; }
    .hero-title { left: 18px; right: 18px; bottom: 18px; }
    .hero-plain .hero-title { padding: 22px 110px 22px 20px; }
    .hero-dial { top: 16px; right: 16px; bottom: auto; --size: 76px; }
    .detail-actions { margin-left: 0; width: 100%; }
    .detail-actions .btn-primary { flex: 1; }
}

/* Kebab on the recipe view */
.kebab { position: relative; }
.icon-btn {
    width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
    background: var(--plate); border: 0; cursor: pointer; color: var(--ink);
}
.icon-btn:hover { background: var(--plate-deep); }
.kebab-menu {
    position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; z-index: 50;
    background: #fff; border: 1px solid var(--rule); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 6px;
}
.kebab-item {
    display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 8px;
    font-size: 0.95rem; font-weight: 600; cursor: pointer; min-height: 44px;
}
.kebab-item:hover, .kebab-item:focus-visible { background: var(--plate); }
.kebab-item.danger { color: var(--danger); }
.kebab-item.danger:hover { background: var(--chili-wash); }
.kebab-sep { height: 1px; background: var(--rule); margin: 6px 4px; }

/* ─────────────────────────────── MENU (kebab sheet) ─────────────────────────────── */
:root {
    --tsk-menu-align: 1200px;
    --tsk-menu-z: 1400;
    --tsk-menu-scrim: rgba(31,26,22,0.45);
    --tsk-menu-bg: #ffffff;
}
.menu-header { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.85rem; gap: 8px; }
.menu-header h3 { margin: 0; color: var(--ink); font-family: var(--font-display); font-stretch: 85%; font-weight: 800; font-size: 1.25rem; }
.menu-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.close-menu {
    background: var(--chrome-bg); border: 1px solid var(--chrome-border); border-radius: var(--chrome-radius);
    font-size: 1.25rem; color: var(--chrome-text); cursor: pointer; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center; line-height: 1;
}
.close-menu:hover { background: var(--chili-wash); color: var(--chili-deep); border-color: var(--chili-line); }
.menu-action {
    width: 100%; background: var(--plate); border: 1px solid var(--rule); padding: 11px 14px;
    border-radius: 12px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 12px;
    font-size: 0.95rem; font-family: inherit; color: var(--ink); font-weight: 700; text-align: left; text-decoration: none;
}
.menu-action:hover { background: #fff; border-color: var(--chili); transform: translateY(-1px); box-shadow: var(--shadow-card); }
.menu-action.danger { color: var(--danger); border-color: var(--chili-line); }
.menu-action.danger:hover { background: var(--chili-wash); border-color: var(--danger); }
.action-icon { font-size: 1.35rem; flex-shrink: 0; }
.action-content { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.action-hint { font-size: 0.75rem; color: var(--ink-faint); font-weight: 400; }
.menu-divider { height: 1px; background: var(--rule); margin: 2px 0 10px; }

/* ─────────────────────────────── MODALS ─────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(31,26,22,0.45); z-index: 1500;
    display: flex; align-items: flex-start; justify-content: center; padding: 72px 16px 24px; overflow-y: auto;
}
/* Capped to the viewport so the actions row is never pushed out of reach. The number is
   the overlay's own vertical padding — keep the two in step. */
.modal {
    width: 100%; max-width: 480px; background: #fff; border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg); animation: modalIn 0.16s ease; display: flex; flex-direction: column; max-height: calc(100dvh - 96px);
}
.modal-wide { max-width: 760px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 8px; flex-shrink: 0; }
.modal-head-text { min-width: 0; }
.modal-eyebrow { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--chili-deep); margin-bottom: 2px; overflow-wrap: anywhere; }
.modal-title { font-family: var(--font-display); font-stretch: 78%; font-weight: 800; font-size: 1.75rem; line-height: 1.05; }
.modal-x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rule-strong); background: #fff; font-size: 1.25rem; line-height: 1; color: var(--ink-soft); cursor: pointer; flex-shrink: 0; }
.modal-x:hover { color: var(--chili-deep); border-color: var(--chili-line); }
.modal-body { padding: 8px 22px 20px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.modal-actions {
    display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; flex-shrink: 0;
    padding: 12px 22px; border-top: 1px solid var(--rule); background: var(--plate); border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.modal-actions-spacer { flex: 1; }

/* ── Recipe editor ── */
.editor .input-name { font-family: var(--font-display); font-weight: 700; font-stretch: 90%; font-size: 1.25rem; min-height: 50px; }
.field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cat-picker { border: 0; margin-top: 4px; }
.cat-group { margin-bottom: 4px; }
.cat-group .cat-h small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.cat-picker .chip { min-height: 36px; }
.editor-block { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--rule); }
.editor-block-head { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.editor-h { font-family: var(--font-display); font-weight: 800; font-stretch: 85%; font-size: 1.25rem; }
.editor-hint { font-size: 0.8rem; color: var(--ink-faint); }
.ing-edit, .step-edit { list-style: none; display: grid; gap: 8px; }
.ing-row { display: grid; grid-template-columns: 70px 96px minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.ing-row .input { min-height: 42px; padding: 0 10px; }
.ing-qty { text-align: right; font-variant-numeric: tabular-nums; }
.ing-group-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; margin-top: 6px; }
.group-input { font-weight: 700; text-transform: none; border-style: dashed; color: var(--chili-deep); }
.step-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 92px auto; gap: 6px; align-items: start; }
.step-n { font-family: var(--font-display); font-weight: 800; font-stretch: 75%; font-size: 1.4rem; color: var(--chili); line-height: 44px; text-align: center; }
.step-timer { display: flex; align-items: center; gap: 4px; font-size: 0.8rem; color: var(--ink-faint); }
.step-timer .input { min-height: 44px; padding: 0 8px; text-align: right; }
.row-tools { display: inline-flex; gap: 2px; }
.tool-btn {
    width: 32px; height: 42px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--ink-faint); font-size: 1rem;
}
.tool-btn:hover:not(:disabled) { background: var(--plate); color: var(--ink); }
.tool-btn:disabled { opacity: 0.3; cursor: default; }
.tool-del:hover:not(:disabled) { color: var(--chili-deep); background: var(--chili-wash); }
.editor-adds { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
@media (max-width: 600px) {
    .field-row { gap: 8px; }
    .ing-row { grid-template-columns: 62px 82px minmax(0, 1fr); }
    .ing-row .row-tools { grid-column: 1 / -1; justify-content: flex-end; margin-top: -4px; }
    .step-row { grid-template-columns: 22px minmax(0, 1fr) 84px; }
    .step-row .row-tools { grid-column: 2 / -1; justify-content: flex-end; }
}
.media-edit { display: flex; gap: 10px; flex-wrap: wrap; }
.media-edit:empty { display: none; }
.media-item { position: relative; width: 96px; }
.media-thumb { position: relative; display: block; width: 96px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--plate); }
.media-thumb .plate-letter { font-size: 1.2rem; }
.media-cover { position: absolute; left: 6px; bottom: 6px; background: var(--turmeric); font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 6px; border-radius: 4px; }
.media-remove { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--rule-strong); background: #fff; cursor: pointer; line-height: 1; }
.media-remove:hover { color: var(--chili-deep); }
.media-add { display: flex; gap: 8px; margin-top: 10px; }
.media-soon { margin-top: 6px; }
.media-status { font-size: 0.85rem; margin-top: 6px; min-height: 1.2em; color: var(--ink-soft); }
.media-status.ok { color: var(--leaf); }
.media-status.err { color: var(--chili-deep); }

/* ── Menu editor / pick lists ── */
.menu-dishes { list-style: none; display: grid; gap: 6px; }
.menu-dish { display: flex; align-items: center; gap: 8px; background: var(--plate); border-radius: 10px; padding: 0 4px 0 12px; min-height: 46px; }
.menu-dish-empty { color: var(--ink-faint); font-size: 0.9rem; }
.pick-list { list-style: none; display: grid; gap: 6px; }
.pick-row { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 6px 12px; border: 1.5px solid var(--rule); border-radius: 12px; cursor: pointer; }
.pick-row:hover { border-color: var(--rule-strong); }
.pick-row input { width: 20px; height: 20px; accent-color: var(--chili); flex: none; }
.pick-row.is-in { opacity: 0.6; cursor: default; }
.pick-name { flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.pick-row small { color: var(--ink-faint); white-space: nowrap; }

/* ── Publish picker: a dish ticked by its menu is locked until the menu is unticked ── */
.pub-lead { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 4px; }
.pub-recipes-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 6px; }
.pub-recipes-head .field-label { margin: 0; }
.pub-recipes-head .btn-quiet { min-height: 36px; padding: 0 10px; }
.pick-row.is-locked { cursor: default; background: var(--plate); }
.pick-row.is-locked small { color: var(--chili-deep); white-space: normal; text-align: right; max-width: 50%; }
.pub-count { font-size: 0.85rem; color: var(--ink-soft); }

/* ─────────────────────────────── TOAST ─────────────────────────────── */
.toast {
    position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 16px); max-width: min(440px, 90vw);
    padding: 10px 16px; background: var(--ink); color: #fff; border-radius: 12px;
    box-shadow: var(--shadow-lg); font-size: 0.9rem; font-weight: 700; opacity: 0; pointer-events: none;
    transition: opacity 0.2s, transform 0.2s; z-index: 1800;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--chili-deep); }
.cook-page .toast { bottom: 96px; }

/* ─────────────────────────────── ABOUT SECTION ─────────────────────────────── */
.about-section { margin: 40px 0 20px; }
.about-toggle {
    display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 9px 1.5rem;
    background: none; border: none; border-top: 1px dotted var(--rule-strong);
    font-family: inherit; font-size: 0.8rem; font-weight: 500; color: #94a3b8; text-align: left; cursor: pointer; transition: color 0.2s;
}
.about-toggle[aria-expanded="true"] { justify-content: flex-start; }
.about-toggle:not([aria-expanded="true"]) .about-title { flex: 0 1 auto; }
.about-toggle:hover { color: #64748b; }
.about-icon { font-size: 0.8rem; flex-shrink: 0; }
.about-title { flex: 1; }
.toggle-icon { font-size: 0.65rem; transition: transform 0.2s; flex-shrink: 0; }
.about-toggle[aria-expanded="true"] .toggle-icon { transform: rotate(180deg); }
.about-content { padding: 4px 20px 20px; margin-top: 4px; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius-lg); }
.about-content h2 { font-family: var(--font-display); font-stretch: 82%; font-weight: 800; font-size: 1.4rem; margin: 20px 0 12px; }
.about-content h3 { font-size: 1.05rem; font-weight: 700; margin: 20px 0 8px; }
.about-content p { font-size: 0.9rem; line-height: 1.55; color: var(--ink-soft); margin-bottom: 8px; }
.about-content ul, .about-content ol { margin: 0 0 12px 18px; }
.about-content li { font-size: 0.9rem; line-height: 1.55; color: var(--ink-soft); margin-bottom: 5px; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 20px; }
.how-to-steps li { margin-bottom: 8px; }
.how-to-steps p { margin: 2px 0 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.feature-item { padding: 12px; background: var(--plate); border-radius: var(--radius-lg); }
.feature-item strong { display: block; font-size: 0.9rem; margin-bottom: 2px; }
.feature-item p { font-size: 0.82rem; margin: 0; }
.keywords-section { margin-top: 20px; color: var(--ink-faint); }

/* ─────────────────────────────── FOOTER (platform chrome) ─────────────────────────────── */
.app-footer { padding: 16px 0 32px; text-align: center; font-size: 0.8125rem; color: var(--ink-faint); font-family: var(--font-chrome); }
.app-footer p { margin-bottom: 3px; }
.footer-link { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid transparent; }
.footer-link:hover { color: var(--chili); border-bottom-color: var(--chili); }
.footer-separator { margin: 0 8px; color: var(--rule-strong); }
.version-badge { background: none; border: none; padding: 0; font-size: 0.8125rem; color: var(--ink-soft); cursor: pointer; border-bottom: 1px solid transparent; font-family: var(--font-chrome); }
.version-badge:hover { color: var(--chili); border-bottom-color: var(--chili); }

/* ============================================================
   COOK MODE (cook.html) — big type, big targets, one thing at a time
   ============================================================ */
.cook-page { background: #fff; }
.cook-bar { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,0.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.cook-page { --tsk-header-h: 64px; --tsk-menu-align: 760px; }
.cook-bar-inner { max-width: 760px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.cook-close {
    width: 44px; height: 44px; border-radius: 50%; background: var(--plate); display: grid; place-items: center; flex: none; color: var(--ink);
}
.cook-close svg { width: 20px; height: 20px; }
.cook-close:hover { background: var(--plate-deep); }
.cook-heading { min-width: 0; flex: 1; }
.cook-title { font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 1.45rem; line-height: 1.05; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cook-sub { color: var(--ink-soft); font-size: 0.85rem; }
.awake { font-size: 0.75rem; font-weight: 700; color: var(--leaf); display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.awake::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 4px rgba(46,125,50,0.15); }
.cook-bar-icons { display: flex; gap: 6px; }
@media (max-width: 520px) { .awake { display: none !important; } .cook-title { font-size: 1.2rem; } }

.cook { max-width: 760px; margin: 0 auto; padding: 4px 16px 40px; }
.phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0 20px; }
.phase { border: 0; background: none; padding: 0 0 10px; text-align: left; border-bottom: 4px solid var(--rule); cursor: pointer; color: var(--ink-faint); }
.phase-name { display: block; font-family: var(--font-display); font-weight: 700; font-stretch: 90%; font-size: 1.05rem; }
.phase small { font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.phase.done { border-color: var(--ink); color: var(--ink); }
.phase[aria-current="step"] { border-color: var(--chili); color: var(--ink); }

.dish-block + .dish-block { margin-top: 10px; }
.dish-h { display: flex; align-items: center; gap: 12px; margin: 22px 0 6px; }
.dish-h h2 { font-family: var(--font-display); font-weight: 800; font-stretch: 85%; font-size: 1.35rem; line-height: 1.05; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dish-h > span { color: var(--ink-faint); font-size: 0.85rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dish-thumb { position: relative; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; background: var(--plate); display: block; }
.dish-thumb .plate-letter { font-size: 1rem; }
.tick-group { margin: 16px 0 2px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--chili-deep); }
.tick-list { list-style: none; }
.tick {
    display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 10px 4px;
    background: none; border: 0; border-bottom: 1px solid var(--rule); text-align: left; font-size: 1.12rem; cursor: pointer;
}
.box {
    width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid var(--rule-strong); display: grid; place-items: center; flex: none;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.box svg { width: 16px; height: 16px; opacity: 0; color: #fff; }
.tick:hover .box { border-color: var(--ink-soft); }
.tick[aria-pressed="true"] .box { background: var(--chili); border-color: var(--chili); }
.tick[aria-pressed="true"] .box svg { opacity: 1; }
.tick:active .box { transform: scale(0.9); }
.tick-q { font-weight: 800; min-width: 78px; font-variant-numeric: tabular-nums; }
.tick-n { font-family: var(--font-display); font-weight: 800; font-stretch: 75%; font-size: 1.3rem; color: var(--ink-faint); min-width: 18px; }
.tick-txt { flex: 1; min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }
.tick[aria-pressed="true"] .tick-txt, .tick[aria-pressed="true"] .tick-q { color: var(--ink-faint); text-decoration: line-through; text-decoration-thickness: 2px; }
.step-tag { display: inline-block; margin-left: 6px; font-size: 0.8rem; font-weight: 700; color: var(--chili-deep); text-decoration: none; }
.steps-list .tick { font-size: 1rem; min-height: 52px; }

.cook-foot {
    position: sticky; bottom: 0; display: flex; align-items: center; gap: 14px; margin-top: 18px;
    padding: 22px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(255,255,255,0), #fff 30%);
}
.progress { flex: 1; color: var(--ink-soft); font-weight: 600; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.bar { display: block; height: 6px; background: var(--rule); border-radius: 6px; margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--chili); border-radius: 6px; transition: width 0.3s; }

.dish-tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.dish-tabs::-webkit-scrollbar { display: none; }
.dish-tab {
    display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--rule); border-radius: 999px; background: #fff;
    padding: 4px 14px 4px 4px; font-weight: 600; white-space: nowrap; cursor: pointer; min-height: 44px;
}
.dish-tab .dish-thumb { width: 32px; height: 32px; }
.dish-tab[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.dish-tab.is-done:not([aria-selected="true"]) { color: var(--ink-faint); }
.timer-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.timer-chip {
    display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; background: var(--chili-wash); color: var(--chili-deep);
    padding: 6px 12px; font-weight: 600; font-size: 0.85rem; cursor: pointer; min-height: 40px;
}
.chip-clock { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.timer-chip.is-done { background: var(--leaf); color: #fff; animation: pulse-done 1s ease-in-out infinite; }
@keyframes pulse-done { 50% { opacity: 0.7; } }

.now { background: var(--plate); border-radius: var(--radius-xl); padding: 24px; display: grid; gap: 20px; align-items: center; }
/* The steps still to do, side by side: swipe on a phone, two at a time on a wider screen.
   Each card is its own step with its own timer, so two can run at once. */
.now-row {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 -16px; padding: 2px 16px 6px; scroll-padding: 0 16px; overscroll-behavior-x: contain;
}
.now-row::-webkit-scrollbar { display: none; }
.now-row .now {
    flex: 0 0 86%; scroll-snap-align: start; align-content: start;
    grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; gap: 14px; padding: 20px;
    border: 2px solid transparent;
}
.now-row.is-single .now { flex-basis: 100%; }
.now-row .now.is-running { border-color: var(--chili-line); }
.now-row .now-timer { justify-self: center; }
.now-row .dial-xl { --size: 132px; }
.now-row .dial-xl .dial-lbl b { font-size: 2.3rem; }
.now-row .now-actions { margin-top: 0; justify-content: space-between; }
.now-row .now-actions .btn-primary { flex: 1 1 auto; }
.now-more { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; margin: 8px 2px 4px; font-size: 0.85rem; color: var(--ink-soft); }
@media (min-width: 640px) {
    .now-row .now { flex-basis: calc(50% - 6px); }
    .now-row .now-text { font-size: 1.25rem; }
}
.now.has-timer { grid-template-columns: minmax(0, 1fr) auto; }
.now-row .now.has-timer { grid-template-columns: 1fr; }
/* Phone: the dial sits beside the step instead of under it, so a card is about a third shorter. */
@media (max-width: 639px) {
    .now-row { align-items: flex-start; }   /* each card as tall as its own step, not the longest one */
    .now-row .now { flex-basis: 88%; padding: 16px; gap: 12px; grid-template-rows: auto auto; }
    .now-row .now.has-timer { grid-template-columns: minmax(0, 1fr) auto; }
    .now-row .now.has-timer .now-timer { grid-column: 2; grid-row: 1; align-self: start; }
    .now-row .now .now-actions { grid-column: 1 / -1; }
    .now-row .now-text { font-size: 1.12rem; line-height: 1.35; margin-top: 6px; }
    .now-row .dial-xl { --size: 92px; }
    .now-row .dial-xl .dial-lbl b { font-size: 1.55rem; }
    .now-row .now-actions .btn-primary, .now-row .now-actions .btn-ink { min-height: 44px; padding: 0 16px; }
}
.now-n { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--chili-deep); }
.now-text { margin-top: 8px; font-size: 1.5rem; line-height: 1.35; font-weight: 500; overflow-wrap: anywhere; white-space: pre-line; }
.now-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.now-timer { display: grid; justify-items: center; gap: 10px; }
.now-done { text-align: center; justify-items: center; }
.now-done .now-text { font-family: var(--font-display); font-weight: 800; font-stretch: 82%; font-size: 1.9rem; }
@media (max-width: 600px) {
    .now.has-timer { grid-template-columns: 1fr; }
    .now-timer { justify-self: center; }
    .now-text { font-size: 1.3rem; }
}

.finish { display: grid; gap: 16px; padding-top: 6px; }
.finish-title { font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 2rem; line-height: 1; }
.finish-field { display: grid; gap: 8px; font-weight: 600; }
.finish-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.done-screen { text-align: center; display: grid; gap: 14px; justify-items: center; padding: 60px 10px; }
.done-screen h2 { font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: 2.2rem; line-height: 1; }
.done-plate .dial { --size: 120px; }
.done-plate .dial-arc { stroke: var(--leaf); }

/* ─────────────────────────────── RESPONSIVE ─────────────────────────────── */
@media (max-width: 768px) {
    .tool-name-btn { font-size: 1.25rem; }
    .logo-image { height: 34px; }
}
@media (max-width: 480px) {
    .header-inner { padding: 0.4rem 0.75rem; }
    .logo-image { height: 30px; }
    .header-icon-btn svg { width: 18px; height: 18px; }
    .container { padding: 12px 16px 0; }
    .modal-overlay { padding: 56px 8px 16px; }
    .modal { max-height: calc(100dvh - 72px); }   /* 56 + 16, as above */
    .modal-head, .modal-body, .modal-actions { padding-left: 16px; padding-right: 16px; }
    .menus { grid-template-columns: 1fr; }
}
@media (hover: none) and (pointer: coarse) {
    .tool-btn { width: 40px; height: 44px; }
    .chip { min-height: 44px; }
    .card-hit:hover .card-photo .photo, .spot-photo:hover .photo { transform: none; }
}

/* ─────────────────────────────── ACCESSIBILITY ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
