/* ─────────────────────────────────────────────────────────────
   Forkcastkitchen.com — a set dinner table, seen from above.
   Ground: deep spruce linen. Plates & cards: warm porcelain.
   Accents: tomato, saffron, basil.
   ───────────────────────────────────────────────────────────── */

:root {
    --spruce-deep: #0C201A;
    --spruce:      #143128;
    --spruce-soft: #1B4033;
    --spruce-line: #2A5344;
    --porcelain:   #FAF3E5;
    --porcelain-dim: #F0E6D0;
    --porcelain-line: #E2D5BB;
    --ink:         #22302A;
    --ink-soft:    #64705F;
    --mist:        #AFC9BA;
    --mist-dim:    #7FA18F;
    --tomato:      #E4532B;
    --tomato-deep: #C43D1B;
    --saffron:     #F2B335;
    --basil:       #5F8C4E;
    --font-display: 'Young Serif', 'Iowan Old Style', Georgia, serif;
    --font-body: 'Schibsted Grotesk', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'Spline Sans Mono', 'Cascadia Code', Consolas, monospace;
    --radius: 18px;
    --shadow-card: 0 24px 60px -24px rgba(4, 16, 12, 0.55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--mist);
    background:
        radial-gradient(1200px 700px at 78% -10%, rgba(242, 179, 53, 0.07), transparent 60%),
        radial-gradient(1000px 800px at -10% 110%, rgba(228, 83, 43, 0.06), transparent 55%),
        var(--spruce-deep);
}

/* woven-linen ground */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(0deg,   rgba(250, 243, 229, 0.016) 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg,  rgba(250, 243, 229, 0.016) 0 1px, transparent 1px 3px);
    z-index: 0;
}

body > * { position: relative; z-index: 1; }

::selection { background: var(--saffron); color: var(--ink); }

.sr-only {
    position: absolute; width: 1px; height: 1px; margin: -1px;
    clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

:focus-visible {
    outline: 2px solid var(--saffron);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── top bar ─────────────────────────────────────────────── */

.topbar {
    /* body > * levels everything at z-index 1, so <main> (later in the DOM)
       would swallow clicks aimed at the open language menu — lift the bar
       (still under the drawer at 60/70 and overlays at 90) */
    z-index: 50;
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 32px 10px;
    display: flex;
    flex-wrap: wrap;      /* narrow screens: nav drops to its own row instead of colliding with the brand */
    row-gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--porcelain);
    text-decoration: none;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.brand .tld, .footer .tld { color: var(--saffron); }

.brand-mark { width: 30px; height: 30px; color: var(--saffron); flex: none; }

.kitchen-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--porcelain);
    background: transparent;
    border: 1px solid var(--spruce-line);
    border-radius: 999px;
    padding: 9px 18px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.kitchen-btn svg { width: 17px; height: 17px; }

.kitchen-btn:hover { border-color: var(--saffron); background: var(--spruce); }

/* ── hero ────────────────────────────────────────────────── */

.hero {
    max-width: 1180px;
    margin: 0 auto;
    padding: 44px 32px 72px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 24px 64px;
    align-items: center;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--saffron);
    margin: 0 0 14px;
}

h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.3rem, 4.6vw, 3.55rem);
    line-height: 1.06;
    color: var(--porcelain);
    margin: 0 0 18px;
    text-wrap: balance;
}

h1 em {
    font-style: normal;
    color: var(--saffron);
}

.lede {
    max-width: 46ch;
    margin: 0 0 30px;
    font-size: 1.06rem;
    color: var(--mist);
}

/* ingredient input */

.ing-form { margin: 0 0 14px; }

.ing-inputwrap {
    position: relative;
    display: flex;
    background: var(--porcelain);
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 14px 34px -18px rgba(3, 14, 10, 0.8);
}

#ingredientInput {
    flex: 1;
    min-width: 0;
    font-family: var(--font-body);
    font-size: 1.02rem;
    color: var(--ink);
    background: transparent;
    border: 0;
    padding: 10px 14px;
}

#ingredientInput::placeholder { color: #9AA091; }

#ingredientInput:focus { outline: none; }

.ing-inputwrap:focus-within { box-shadow: 0 0 0 2px var(--saffron), 0 14px 34px -18px rgba(3, 14, 10, 0.8); }

.ing-add {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--porcelain);
    background: var(--spruce);
    border: 0;
    border-radius: 10px;
    padding: 0 22px;
    cursor: pointer;
    transition: background 0.15s;
}

.ing-add:hover { background: var(--spruce-soft); }

.autocomplete {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--porcelain);
    border-radius: 12px;
    box-shadow: 0 20px 44px -14px rgba(3, 14, 10, 0.7);
    z-index: 30;
    max-height: 264px;
    overflow-y: auto;
}

.autocomplete li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--ink);
    cursor: pointer;
    font-size: 0.97rem;
}

.autocomplete li[aria-selected="true"],
.autocomplete li:hover { background: var(--porcelain-dim); }

.autocomplete .cat {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* ingredient chips */

.chiplist {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
    min-height: 0;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--porcelain);
    color: var(--ink);
    font-weight: 500;
    font-size: 0.92rem;
    border-radius: 999px;
    padding: 6px 7px 6px 13px;
    animation: chip-in 0.25s ease-out;
}

.chip-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

.chip-x {
    display: grid;
    place-items: center;
    width: 21px;
    height: 21px;
    border: 0;
    border-radius: 50%;
    background: var(--porcelain-dim);
    color: var(--ink-soft);
    cursor: pointer;
    font-size: 0;
    transition: background 0.15s, color 0.15s;
}

.chip-x::before { content: "×"; font-size: 14px; line-height: 1; }

.chip-x:hover { background: var(--tomato); color: var(--porcelain); }

@keyframes chip-in {
    from { transform: scale(0.8); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.suggest-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 0 0 30px;
    font-size: 0.85rem;
}

.suggest-label { color: var(--mist-dim); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }

.suggest-chip {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--mist);
    background: transparent;
    border: 1px dashed var(--spruce-line);
    border-radius: 999px;
    padding: 4px 13px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.suggest-chip:hover { color: var(--saffron); border-color: var(--saffron); }

/* time + cuisine controls */

/* step-by-step accordion: one section open at a time, picks advance the flow.
   NB: named .flow because .steps is the recipe method list (numbered li circles) */

.flow { display: flex; flex-direction: column; gap: 10px; margin: 0 0 30px; }

.step {
    border: 1px solid var(--spruce-line);
    border-radius: 14px;
    background: rgba(250, 243, 229, 0.03);
    transition: border-color 0.25s ease, background 0.25s ease;
}

.step-open {
    border-color: var(--mist-dim);
    background: rgba(250, 243, 229, 0.05);
}

.step-head {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 16px;
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
    color: inherit;
    font: inherit;
    border-radius: 14px;
}

.step-head:focus-visible { outline: 2px solid var(--saffron); outline-offset: -2px; }

.step-num {
    flex: none;
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--spruce-line);
    background: var(--spruce-soft);
    color: var(--saffron);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
}

.step-open .step-num {
    background: var(--saffron);
    border-color: var(--saffron);
    color: var(--spruce-deep);
}

.step-title {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--porcelain);
    white-space: nowrap;
    min-width: 0; /* may shrink: never let a long title push the card past the viewport */
    overflow: hidden;
    text-overflow: ellipsis;
}

.step-value {
    margin-left: auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--saffron);
    text-align: right;
}

.step-chev {
    flex: none;
    width: 16px;
    height: 16px;
    color: var(--mist-dim);
    transition: transform 0.25s ease;
}

.step-open .step-chev { transform: rotate(180deg); }

.step-body { padding: 2px 16px 16px; }

.step-body .ing-form { margin-top: 4px; }

.step-body .suggest-row { margin-bottom: 4px; }

.segmented {
    display: inline-flex;
    background: var(--spruce);
    border: 1px solid var(--spruce-line);
    border-radius: 12px;
    padding: 4px;
    gap: 2px;
}

.seg-btn {
    font-family: var(--font-mono);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--mist);
    background: transparent;
    border: 0;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.seg-btn small { font-size: 0.66rem; font-weight: 400; margin-left: 3px; opacity: 0.75; }

.seg-btn[aria-checked="true"] {
    background: var(--porcelain);
    color: var(--ink);
    box-shadow: 0 2px 8px rgba(3, 14, 10, 0.4);
}

.seg-btn:hover:not([aria-checked="true"]) { color: var(--porcelain); }

.cuisine-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.cuisine-chip {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--mist);
    background: transparent;
    border: 1px solid var(--spruce-line);
    border-radius: 999px;
    padding: 7px 16px;
    cursor: pointer;
    transition: all 0.15s;
}

.cuisine-chip:hover { border-color: var(--mist-dim); color: var(--porcelain); }

.cuisine-chip[aria-checked="true"] {
    background: var(--porcelain);
    border-color: var(--porcelain);
    color: var(--ink);
    font-weight: 700;
}

/* CTA */

.cta-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.cta {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-family: var(--font-body);
    font-size: 1.08rem;
    font-weight: 700;
    color: #FFF6EA;
    background: var(--tomato);
    border: 0;
    border-radius: 999px;
    padding: 15px 30px;
    cursor: pointer;
    box-shadow: 0 16px 34px -14px rgba(228, 83, 43, 0.65);
    transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}

.cta svg { width: 19px; height: 19px; transition: transform 0.15s; }

.cta:hover {
    background: var(--tomato-deep);
    transform: translateY(-1px);
    box-shadow: 0 20px 38px -14px rgba(228, 83, 43, 0.75);
}

.cta:hover svg { transform: translateX(3px); }

.cta:active { transform: translateY(0); }

.cta[disabled] { opacity: 0.6; cursor: wait; transform: none; }

.status {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--mist-dim);
    max-width: 34ch;
    line-height: 1.5;
}

.status.error { color: #F0906F; }

/* ── member-gated controls ───────────────────────────────── */

.members-tag {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--saffron);
    border: 1px solid var(--saffron);
    border-radius: 999px;
    padding: 2px 8px;
    margin-left: 8px;
    vertical-align: 1px;
}

.chip-locked,
button.chip-locked {
    opacity: 0.45;
    border-style: dashed;
    cursor: not-allowed;
}

span.chip-locked {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--ink-soft);
    background: transparent;
    border: 1px dashed var(--porcelain-line);
    border-radius: 999px;
    padding: 6px 14px;
    opacity: 1;
}

.members-note {
    margin: 10px 0 0;
    font-size: 0.82rem;
    color: var(--mist-dim);
}

#ingLimit { margin: 0 0 10px; }

a.more-link {
    opacity: 1;
    border-style: solid;
    border-color: var(--saffron);
    color: var(--saffron);
    text-decoration: none;
    cursor: pointer;
}

a.more-link:hover { background: var(--saffron); color: var(--spruce-deep); }

.members-note a { color: var(--saffron); }

.drawer-locked .drawer-hint { margin-bottom: 12px; }

.drawer-cta { margin-top: 14px; font-size: 0.95rem; padding: 12px 22px; }

/* kitchen profiles + history */

.inline-form { display: inline; }

.pchip-btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink);
    background: #FFFDF7;
    border: 1px solid var(--porcelain-line);
    border-radius: 999px;
    padding: 7px 16px;
    cursor: pointer;
    transition: all 0.15s;
}

.pchip-btn:hover { border-color: var(--basil); color: var(--basil); }

.add-profile-form { margin-top: 16px; }

.editing-note {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--ink-soft);
    font-weight: 400;
}

.history-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }

.history-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2px 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--porcelain-line);
}

.history-item:last-child { border-bottom: 0; padding-bottom: 0; }

.history-date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
    grid-row: span 2;
    padding-top: 3px;
}

.history-title { font-weight: 700; color: var(--ink); text-decoration: none; }

.history-title:hover { color: var(--tomato); }

.history-meta { font-size: 0.82rem; color: var(--ink-soft); }

.history-pager { display: flex; gap: 14px; justify-content: center; margin: 20px 0 0; font-size: 0.9rem; }

.history-pager a { color: #A6521F; font-weight: 500; }

@media (max-width: 560px) {
    .history-item { grid-template-columns: 1fr; }

    .history-date { grid-row: auto; }
}

/* ── the plate (signature) ───────────────────────────────── */

.hero-plate {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.plate-stage {
    position: relative;
    width: min(100%, 470px);
    aspect-ratio: 1;
}

/* candlelight pool under the plate */
.plate-stage::before {
    content: "";
    position: absolute;
    inset: -7%;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 46%, rgba(242, 179, 53, 0.14), rgba(242, 179, 53, 0.04) 45%, transparent 68%);
}

#plateSvg, .plate-stage svg { position: relative; width: 100%; height: 100%; display: block; }

.plate-caption {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mist-dim);
    text-align: center;
}

.plate-caption strong { color: var(--saffron); font-weight: 600; }

/* svg item drop-in */
.plate-item {
    transform-box: fill-box;
    transform-origin: center;
    animation: plate-drop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

@keyframes plate-drop {
    0%   { transform: translateY(-30px) scale(0.4); opacity: 0; }
    60%  { opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.dish-reveal {
    transform-box: fill-box;
    transform-origin: center;
    animation: dish-in 0.6s ease-out;
}

@keyframes dish-in {
    from { transform: scale(0.86); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* ── results ─────────────────────────────────────────────── */

.results {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px 72px;
}

.result-card {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    background: var(--porcelain);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    animation: card-up 0.5s ease-out;
}

@keyframes card-up {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.result-art {
    background:
        radial-gradient(340px 340px at 50% 42%, rgba(242, 179, 53, 0.16), transparent 70%),
        var(--spruce);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px;
}

.result-art svg { width: 100%; max-width: 330px; height: auto; }

.result-art .dish-photo {
    width: 100%;
    max-width: 330px;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 30px 60px -22px rgba(4, 18, 13, 0.85), 0 0 0 10px rgba(250, 243, 229, 0.07);
    animation: dish-in 0.6s ease-out;
}

.result-body { padding: 38px 44px 42px; color: var(--ink); }

.match-line {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 0 0 12px;
}

.match-badge {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
}

.match-badge.ready { background: #E4EED9; color: #3D6430; }

.match-badge.shop { background: #FBE9CB; color: #8A5A17; }

.match-badge.stretch { background: #DFE9E0; color: #31584A; }

.match-pct {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.dish-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.12;
    margin: 0 0 10px;
    color: var(--ink);
}

.dish-meta {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 0;
}

.dish-meta .sep { margin: 0 9px; color: var(--porcelain-line); }

.dish-desc {
    font-size: 1.02rem;
    color: #46534A;
    margin: 0 0 26px;
    max-width: 56ch;
}

.ing-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px 30px;
    margin-bottom: 30px;
    padding: 22px 24px;
    background: var(--porcelain-dim);
    border-radius: 14px;
}

.ing-col h3 {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0 0 10px;
}

.ing-col ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }

.ing-col li { display: flex; gap: 9px; align-items: baseline; font-size: 0.94rem; }

.ing-col .mark { flex: none; width: 8px; height: 8px; border-radius: 50%; position: relative; top: -1px; }

.ing-col .have .mark { background: var(--basil); }

.ing-col .need .mark { background: transparent; box-shadow: inset 0 0 0 2px var(--tomato); }

.ing-col .qty { color: var(--ink-soft); font-size: 0.85rem; }

.ing-col .allset { color: var(--ink-soft); font-style: italic; font-size: 0.92rem; }

.section-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0 0 16px;
}

.steps {
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
    counter-reset: step;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 60ch;
}

.steps li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 14px;
    align-items: start;
}

.steps li::before {
    content: counter(step, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--porcelain);
    background: var(--spruce);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    margin-top: 1px;
}

.tip {
    display: flex;
    gap: 12px;
    align-items: baseline;
    background: #FBEDCB;
    border-left: 3px solid var(--saffron);
    border-radius: 10px;
    padding: 15px 18px;
    font-size: 0.95rem;
    color: #5C4A1E;
    max-width: 60ch;
}

.tip strong {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #8A5A17;
}

/* share bar */

.share-bar {
    display: flex;
    align-items: center;
    gap: 10px 14px;
    flex-wrap: wrap;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--porcelain-line);
}

.share-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.share-row { display: inline-flex; gap: 8px; flex-wrap: wrap; }

.share-btn {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--porcelain-dim);
    color: var(--ink);
    border: 0;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}

.share-btn svg { width: 19px; height: 19px; }

.share-btn:hover { transform: translateY(-2px); color: #FFFDF7; }

.share-sys:hover { background: var(--spruce); }

.share-email:hover { background: var(--tomato); }

.share-whatsapp:hover { background: #25D366; }

.share-facebook:hover { background: #1877F2; }

.share-x:hover { background: #111; }

.share-telegram:hover { background: #2AABEE; }

.share-pinterest:hover { background: #E60023; }

.share-tiktok:hover { background: #111; }

.share-copy:hover { background: var(--basil); }

.share-toast {
    font-size: 0.85rem;
    color: var(--basil);
    opacity: 0;
    transition: opacity 0.2s;
}

.share-toast.on { opacity: 1; }

/* recipe rating */

.rating-section:empty { display: none; } /* no empty box before JS fills it (no-JS/SEO) */

.rating-block {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--porcelain-line);
}

.rating-heading { margin-bottom: 12px; }

.rating-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.rating-avg-num {
    font-family: var(--font-display);
    font-size: 1.25rem;
    line-height: 1;
    color: var(--ink);
}

.rating-count { color: var(--ink-soft); font-size: 0.9rem; }

/* small read-only star rows (summary + each comment) */
.star-row { display: inline-flex; gap: 2px; }
.star-mini { width: 15px; height: 15px; display: inline-flex; color: var(--porcelain-line); }
.star-mini.on { color: var(--saffron); }
.star-mini svg { width: 100%; height: 100%; display: block; }

.rating-input {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 60ch;
}

.stars { display: inline-flex; gap: 4px; }

.star {
    width: 38px;
    height: 38px;
    padding: 4px;
    border: 0;
    background: none;
    color: var(--porcelain-line);
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.12s, transform 0.12s;
}

.star svg { width: 100%; height: 100%; display: block; }

.star.on { color: var(--saffron); }

.star:hover { transform: scale(1.12); }

.rating-comment {
    width: 100%;
    max-width: 100%;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--porcelain);
    border: 1px solid var(--porcelain-line);
    border-radius: 10px;
    padding: 10px 12px;
    resize: vertical;
    min-height: 46px;
}

.rating-comment:focus {
    outline: 2px solid var(--saffron);
    outline-offset: 1px;
    border-color: var(--saffron);
}

.rating-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.btn-rate {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--porcelain);
    background: var(--tomato);
    border: 0;
    border-radius: 999px;
    padding: 9px 22px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.btn-rate:hover { background: var(--tomato-deep); transform: translateY(-1px); }

.btn-rate:disabled { opacity: 0.6; cursor: default; transform: none; }

.rating-toast { font-size: 0.85rem; opacity: 0; transition: opacity 0.2s; }
.rating-toast.on { opacity: 1; }
.rating-toast.ok { color: var(--basil); }
.rating-toast.warn { color: var(--tomato-deep); }

.rating-comments {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 60ch;
}

.rating-comment-item {
    background: var(--porcelain-dim);
    border-radius: 12px;
    padding: 12px 15px;
}

.rc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.rc-name { font-weight: 700; color: var(--ink); font-size: 0.92rem; }

.rc-date {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-family: var(--font-mono);
    margin-left: auto;
}

.rc-text {
    margin: 6px 0 0;
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.rating-more { margin-top: 12px; }

.rating-more-btn {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tomato-deep);
    background: none;
    border: 0;
    padding: 6px 0;
    cursor: pointer;
}

.rating-more-btn:hover { color: var(--tomato); text-decoration: underline; }

.rating-more-btn:disabled { opacity: 0.5; cursor: default; }

/* public recipe page */

.recipe-page { padding-top: 28px; }

.recipe-cta { margin: 26px 0 0; }

.recipe-cta .cta em { font-style: italic; }

/* "plating your photo" wait state — modal overlay above the page */

.cooking-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(5, 15, 11, 0.68);
    backdrop-filter: blur(3px);
    animation: fade-in 0.25s ease-out;
}

.cooking-overlay .cooking-card {
    max-width: 560px;
    width: 100%;
    box-shadow: 0 44px 90px -28px rgba(0, 0, 0, 0.65);
}

.cooking-card {
    background: var(--porcelain);
    border-radius: var(--radius);
    padding: 56px 40px 50px;
    text-align: center;
    color: var(--ink);
    box-shadow: var(--shadow-card);
    animation: card-up 0.5s ease-out;
}

.cooking-stage {
    position: relative;
    width: 190px;
    margin: 0 auto 10px;
}

.cooking-stage svg {
    width: 100%;
    height: auto;
    animation: plate-breathe 2.6s ease-in-out infinite;
    transform-origin: center;
}

@keyframes plate-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.035); }
}

.steam {
    position: absolute;
    top: -6px;
    width: 6px;
    height: 30px;
    border-radius: 999px;
    background: #B9AE97;
    opacity: 0;
    animation: steam-rise 2.2s ease-out infinite;
}

.steam:nth-child(1) { left: 38%; animation-delay: 0s; }

.steam:nth-child(2) { left: 50%; animation-delay: 0.7s; height: 36px; }

.steam:nth-child(3) { left: 62%; animation-delay: 1.4s; }

@keyframes steam-rise {
    0% { transform: translateY(10px) scaleY(0.6); opacity: 0; }
    35% { opacity: 0.55; }
    100% { transform: translateY(-26px) scaleY(1.15); opacity: 0; }
}

.cooking-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.6rem;
    margin: 14px 0 8px;
}

.cooking-sub {
    color: var(--ink-soft);
    margin: 0 auto;
    max-width: 44ch;
    font-size: 0.97rem;
}

.cooking-dots {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #8A5A17;
    background: #FBEDCB;
    border-radius: 999px;
    padding: 7px 16px;
    margin-top: 22px;
}

.cooking-dots::after {
    content: "";
    display: inline-block;
    width: 1.4em;
    text-align: left;
    animation: cook-dots 1.5s steps(4, end) infinite;
}

@keyframes cook-dots {
    0% { content: ""; }
    25% { content: "."; }
    50% { content: ".."; }
    75% { content: "..."; }
}

.is-hidden { display: none !important; }

/* empty / no-match state */

.no-match {
    background: var(--porcelain);
    border-radius: var(--radius);
    padding: 54px 40px;
    text-align: center;
    color: var(--ink);
    box-shadow: var(--shadow-card);
    animation: card-up 0.5s ease-out;
}

.no-match h2 { font-family: var(--font-display); font-weight: 400; margin: 0 0 10px; }

.no-match p { color: var(--ink-soft); margin: 0 auto; max-width: 46ch; }

/* reassurance line must out-rank the `.no-match p` reset (same specificity trap) */
.no-match p.no-match-note {
    margin-top: 16px;
    color: var(--basil);
    font-weight: 600;
    font-size: 0.92rem;
}

/* alternates */

.alt-block { margin-top: 26px; }

.alt-heading {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.25rem;
    color: var(--porcelain);
    margin: 0 0 16px;
}

.alt-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.alt-card {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    background: var(--spruce);
    border: 1px solid var(--spruce-line);
    border-radius: 14px;
    padding: 12px 16px 12px 12px;
    cursor: pointer;
    color: var(--porcelain);
    font-family: var(--font-body);
    transition: border-color 0.15s, transform 0.15s, background 0.15s;
}

.alt-card:hover { border-color: var(--saffron); transform: translateY(-2px); background: var(--spruce-soft); }

.alt-card svg { width: 64px; height: 64px; flex: none; }

.alt-title { font-size: 0.98rem; font-weight: 700; line-height: 1.3; display: block; }

.alt-meta {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mist-dim);
    display: block;
    margin-top: 3px;
}

/* ── footer ──────────────────────────────────────────────── */

.footer {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 32px 40px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--mist-dim);
    border-top: 1px solid rgba(42, 83, 68, 0.5);
}

.footer-dim { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; }

/* ── drawer: your kitchen ────────────────────────────────── */

.drawer-scrim {
    position: fixed;
    inset: 0;
    background: rgba(5, 15, 11, 0.62);
    backdrop-filter: blur(2px);
    z-index: 60;
    animation: fade-in 0.2s ease-out;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(430px, 94vw);
    background: var(--porcelain);
    color: var(--ink);
    z-index: 70;
    padding: 26px 30px 30px;
    overflow-y: auto;
    box-shadow: -30px 0 70px rgba(3, 12, 9, 0.5);
    animation: drawer-in 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@keyframes drawer-in {
    from { transform: translateX(60px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.drawer-head h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.5rem;
    margin: 0;
}

.drawer-close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: var(--porcelain-dim);
    border: 0;
    border-radius: 50%;
    color: var(--ink);
    cursor: pointer;
    transition: background 0.15s;
}

.drawer-close svg { width: 15px; height: 15px; }

.drawer-close:hover { background: var(--porcelain-line); }

.drawer-section { margin-top: 26px; }

.drawer-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0 0 4px;
}

.drawer-hint { font-size: 0.86rem; color: var(--ink-soft); margin: 0 0 14px; }

.equip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.equip-btn {
    display: flex;
    align-items: center;
    gap: 11px;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink);
    background: #FFFDF7;
    border: 1px solid var(--porcelain-line);
    border-radius: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}

.equip-btn svg { width: 21px; height: 21px; flex: none; opacity: 0.85; }

.equip-btn:hover { border-color: var(--ink-soft); }

.equip-btn[aria-pressed="true"] {
    background: var(--spruce);
    border-color: var(--spruce);
    color: var(--porcelain);
}

.diet-row { display: flex; flex-wrap: wrap; gap: 8px; }

.diet-chip {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink);
    background: #FFFDF7;
    border: 1px solid var(--porcelain-line);
    border-radius: 999px;
    padding: 8px 17px;
    cursor: pointer;
    transition: all 0.15s;
}

.diet-chip:hover { border-color: var(--ink-soft); }

.diet-chip[aria-pressed="true"] {
    background: var(--basil);
    border-color: var(--basil);
    color: #FFFDF7;
    font-weight: 700;
}

.pantry-toggle {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    cursor: pointer;
}

.pantry-toggle input { position: absolute; opacity: 0; width: 44px; height: 26px; cursor: pointer; }

.pantry-track {
    flex: none;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: var(--porcelain-line);
    position: relative;
    transition: background 0.2s;
    margin-top: 2px;
}

.pantry-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FFFDF7;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s;
}

.pantry-toggle input:checked + .pantry-track { background: var(--basil); }

.pantry-toggle input:checked + .pantry-track::after { transform: translateX(18px); }

.pantry-toggle input:focus-visible + .pantry-track { outline: 2px solid var(--saffron); outline-offset: 2px; }

.pantry-copy strong { display: block; font-size: 0.95rem; }

.pantry-copy small { display: block; color: var(--ink-soft); font-size: 0.8rem; line-height: 1.5; margin-top: 3px; }

.drawer-note {
    margin: 30px 0 0;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-soft);
    text-align: center;
}

/* ── topbar nav: account, free meals, links ──────────────── */

.topnav { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.topnav-link {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--mist);
    text-decoration: none;
    padding: 9px 6px;
    transition: color 0.15s;
}

.topnav-link:hover { color: var(--saffron); }

/* emphasized Pricing link — bold, saffron, pill that fills on hover */
.topnav-pricing {
    font-weight: 700;
    color: var(--saffron);
    border: 1.5px solid rgba(242, 179, 53, 0.55);
    border-radius: 999px;
    padding: 7px 16px;
}

.topnav-pricing:hover { color: var(--ink); background: var(--saffron); border-color: var(--saffron); }

.login-btn { text-decoration: none; }

/* floating "back to your kitchen" button (profile page) */
.floating-home {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 45;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: var(--porcelain);
    color: var(--ink);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 14px 34px -10px rgba(4, 16, 12, 0.7);
    transition: transform 0.15s, background 0.15s, color 0.15s;
}

.floating-home svg { width: 20px; height: 20px; }

.floating-home:hover { background: var(--saffron); transform: translateY(-2px); }

/* prominent quick links (profile: meal history / plans) */
.profile-quicklinks { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 0; }

.quicklink {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--porcelain-dim);
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    border: 1px solid var(--porcelain-line);
    transition: background 0.15s, color 0.15s, transform 0.15s, border-color 0.15s;
}

.quicklink svg { width: 18px; height: 18px; }

.quicklink:hover { transform: translateY(-1px); background: var(--spruce); color: var(--porcelain); border-color: var(--spruce); }

.quicklink-accent { background: var(--saffron); border-color: var(--saffron); }

.quicklink-accent:hover { background: var(--tomato); border-color: var(--tomato); color: #FFF; }

/* ── language switcher (details/summary — no JS required) ── */

.lang-menu { position: relative; z-index: 90; } /* the open list must beat the hero's stacking context */

.lang-menu summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid var(--spruce-line);
    border-radius: 999px;
    color: var(--porcelain);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
    user-select: none;
}

.lang-menu summary::-webkit-details-marker { display: none; }

.lang-menu summary svg { width: 12px; height: 12px; color: var(--mist-dim); }

.lang-menu[open] summary, .lang-menu summary:hover { border-color: var(--saffron); }

.lang-menu ul {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 80;
    margin: 0;
    padding: 6px;
    list-style: none;
    min-width: 176px;
    background: var(--spruce);
    border: 1px solid var(--spruce-line);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
}

.lang-menu ul a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 9px;
    color: var(--porcelain);
    text-decoration: none;
    font-size: 0.9rem;
}

.lang-menu ul a:hover { background: var(--spruce-soft); }

.lang-menu ul a.lang-active { color: var(--saffron); }

.lang-flag { font-size: 1rem; line-height: 1; }

.free-pill {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mist);
    border: 1px dashed var(--spruce-line);
    border-radius: 999px;
    padding: 7px 14px;
    white-space: nowrap;
}

/* hero copy of the pill: hidden on desktop (the topbar one shows),
   shown on small screens where the topbar pill has no room */
.free-pill-hero { display: none; margin: -6px 0 20px; align-self: flex-start; }

.free-pill strong { color: var(--saffron); font-weight: 600; }

.free-pill-low { border-color: var(--tomato); color: #F0906F; }

.free-pill-low strong { color: var(--tomato); }

.account-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: var(--porcelain);
    font-size: 0.92rem;
    font-weight: 500;
    border: 1px solid var(--spruce-line);
    border-radius: 999px;
    padding: 5px 14px 5px 6px;
    transition: border-color 0.15s, background 0.15s;
    max-width: 220px;
}

.account-chip:hover { border-color: var(--saffron); background: var(--spruce); }

.account-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar-mini {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
}

.avatar-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--saffron);
    color: var(--spruce-deep);
    font-family: var(--font-display);
    font-size: 0.85em;
}

.footer-links a { color: var(--mist-dim); }

.footer-links a:hover { color: var(--saffron); }

/* ── auth pages (login / register / reset / errors) ──────── */

.auth-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 32px 80px;
    display: grid;
    place-items: start center;
}

.auth-card {
    width: min(480px, 100%);
    background: var(--porcelain);
    color: var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 40px 42px 34px;
    animation: card-up 0.5s ease-out;
}

.auth-card-slim { width: min(440px, 100%); }

.auth-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.75rem;
    line-height: 1.15;
    margin: 0 0 10px;
    color: var(--ink);
}

.auth-sub { color: var(--ink-soft); margin: 0 0 22px; font-size: 0.97rem; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.field-grow { flex: 1; min-width: 0; }

.field-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.field-label small { text-transform: none; letter-spacing: 0.02em; font-weight: 400; }

.field input {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: #FFFDF7;
    border: 1px solid var(--porcelain-line);
    border-radius: 10px;
    padding: 11px 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
    outline: none;
    border-color: var(--saffron);
    box-shadow: 0 0 0 3px rgba(242, 179, 53, 0.25);
}

.field input[disabled] { color: var(--ink-soft); background: var(--porcelain-dim); }

/* file inputs have a wide intrinsic size (Choose File + No file chosen) that
   otherwise drags the whole row past the viewport on phones */
.field input[type="file"] { padding: 9px 10px; font-size: 0.9rem; width: 100%; max-width: 100%; }

.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px 16px;
}

.cta-block { width: 100%; justify-content: center; text-align: center; text-decoration: none; }

a.cta { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--ink);
    background: transparent;
    border: 1.5px solid var(--ink-soft);
    border-radius: 999px;
    padding: 12px 26px;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}

.ghost-btn:hover { border-color: var(--tomato); color: var(--tomato); }

.auth-links {
    margin: 20px 0 0;
    font-size: 0.92rem;
    color: var(--ink-soft);
    text-align: center;
}

.auth-links a { color: #A6521F; font-weight: 500; }

.auth-links .dot { margin: 0 8px; color: var(--porcelain-line); }

.auth-code { background: var(--porcelain-dim); border-radius: 8px; padding: 10px 14px; overflow-wrap: anywhere; font-size: 0.85rem; }

.alert {
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.94rem;
    margin: 0 0 18px;
}

.alert-error { background: #FBE3D9; color: #8A2E12; border-left: 3px solid var(--tomato); }

.alert-ok { background: #E4EED9; color: #3D6430; border-left: 3px solid var(--basil); }

.alert-dev { background: #FBEDCB; color: #5C4A1E; border-left: 3px solid var(--saffron); overflow-wrap: anywhere; }

.sso-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--ink);
    background: #FFFDF7;
    border: 1px solid var(--porcelain-line);
    border-radius: 999px;
    padding: 12px 20px;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.sso-btn svg { width: 19px; height: 19px; }

.sso-btn:hover { border-color: var(--ink-soft); box-shadow: 0 4px 14px -8px rgba(20, 30, 25, 0.4); }

.sso-disabled { opacity: 0.75; }

.sso-note { font-size: 0.8rem; color: var(--ink-soft); text-align: center; margin: 8px 0 0; }

.sso-note code, .auth-sub code { background: var(--porcelain-dim); border-radius: 4px; padding: 1px 5px; font-size: 0.85em; }

.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
    color: var(--ink-soft);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--porcelain-line);
}

.error-card { text-align: center; }

.error-code {
    font-family: var(--font-display);
    font-size: 4.4rem;
    line-height: 1;
    color: var(--tomato);
    margin: 0 0 8px;
}

/* the row is a <p> inside .no-match, so it must out-rank the `.no-match p` margin reset */
.no-match-actions,
.no-match p.no-match-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px auto 0;
}

/* ── profile page ────────────────────────────────────────── */

.profile-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 32px 32px 80px;
}

.profile-head { margin-bottom: 22px; }

.profile-head .auth-title { color: var(--porcelain); font-size: 2rem; }

.profile-head .auth-sub { color: var(--mist); }

.panel {
    background: var(--porcelain);
    color: var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 30px 34px;
    margin-bottom: 22px;
}

.panel-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.3rem;
    margin: 0 0 18px;
}

.panel-form { display: flex; flex-direction: column; gap: 16px; }

.panel-form .cta { align-self: flex-start; }

.panel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.panel-row .panel-title { margin-bottom: 4px; }

.panel-row .auth-sub { margin: 0; }

.avatar-row { display: flex; align-items: center; gap: 18px; }

.avatar-big {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
    font-size: 1.6rem;
    border: 2px solid var(--porcelain-line);
}

.linked-note { font-size: 0.85rem; color: var(--basil); margin: 0; }

.chips-select { display: flex; flex-wrap: wrap; gap: 8px; }

.pchip { position: relative; }

.pchip input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.pchip span {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink);
    background: #FFFDF7;
    border: 1px solid var(--porcelain-line);
    border-radius: 999px;
    padding: 7px 16px;
    transition: all 0.15s;
}

.pchip:hover span { border-color: var(--ink-soft); }

.pchip input:checked + span {
    background: var(--basil);
    border-color: var(--basil);
    color: #FFFDF7;
    font-weight: 700;
}

.pchip-danger input:checked + span {
    background: var(--tomato);
    border-color: var(--tomato);
}

.pchip input:focus-visible + span { outline: 2px solid var(--saffron); outline-offset: 2px; }

.tagbox {
    background: #FFFDF7;
    border: 1px solid var(--porcelain-line);
    border-radius: 12px;
    padding: 10px 12px;
}

.tagbox .chiplist { margin: 0 0 6px; }

.tagbox .chip { background: var(--porcelain-dim); }

.tagbox input {
    width: 100%;
    border: 0;
    background: transparent;
    font-family: var(--font-body);
    font-size: 0.96rem;
    color: var(--ink);
    padding: 6px 4px;
}

.tagbox input:focus { outline: none; }

.tagbox:focus-within { border-color: var(--saffron); box-shadow: 0 0 0 3px rgba(242, 179, 53, 0.25); }

/* country dropdown with flags */

.country-select { position: relative; }

.country-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: #FFFDF7;
    border: 1px solid var(--porcelain-line);
    border-radius: 10px;
    padding: 11px 14px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.country-btn:focus-visible,
.country-btn[aria-expanded="true"] {
    outline: none;
    border-color: var(--saffron);
    box-shadow: 0 0 0 3px rgba(242, 179, 53, 0.25);
}

.country-btn-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.country-btn-text.placeholder { color: #9AA091; }

.country-caret { width: 15px; height: 15px; color: var(--ink-soft); flex: none; }

.country-flag {
    width: 24px;
    height: 18px;
    border-radius: 3px;
    object-fit: cover;
    flex: none;
    box-shadow: 0 0 0 1px rgba(34, 48, 42, 0.12);
}

.country-pop {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 40;
    background: #FFFDF7;
    border: 1px solid var(--porcelain-line);
    border-radius: 12px;
    box-shadow: 0 20px 44px -14px rgba(3, 14, 10, 0.4);
    padding: 8px;
}

.country-search {
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--porcelain-dim);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 9px 12px;
    margin-bottom: 6px;
}

.country-search:focus { outline: none; border-color: var(--saffron); }

.country-list {
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 260px;
    overflow-y: auto;
}

.country-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--ink);
    cursor: pointer;
}

.country-list li:hover,
.country-list li.active { background: var(--porcelain-dim); }

.country-list li.selected { font-weight: 700; }

.country-list .country-none { color: var(--ink-soft); font-style: italic; }

/* ── pricing page ────────────────────────────────────────── */

.pricing-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 36px 32px 80px;
}

.pricing-head { text-align: center; max-width: 560px; margin: 0 auto 40px; }

.pricing-head h1 {
    font-size: clamp(2rem, 4vw, 2.9rem);
    margin-bottom: 12px;
}

.pricing-head .auth-sub { color: var(--mist); }

.billing-toggle {
    display: inline-flex;
    background: var(--spruce);
    border: 1px solid var(--spruce-line);
    border-radius: 12px;
    padding: 4px;
    gap: 2px;
    margin-top: 18px;
}

.plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    align-items: stretch;
}

.plan {
    position: relative;
    background: var(--spruce);
    border: 1px solid var(--spruce-line);
    border-radius: var(--radius);
    padding: 30px 28px;
    color: var(--porcelain);
    display: flex;
    flex-direction: column;
}

.plan-featured {
    background: var(--porcelain);
    color: var(--ink);
    border-color: var(--porcelain);
    box-shadow: var(--shadow-card);
    transform: translateY(-6px);
}

.plan-flag {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--saffron);
    color: var(--spruce-deep);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 5px 14px;
    margin: 0;
    white-space: nowrap;
}

.plan-name {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.25rem;
    margin: 0 0 12px;
}

.plan-price { margin: 0 0 2px; }

.plan-price strong {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 2.5rem;
    letter-spacing: -0.01em;
}

.plan-price .per { font-size: 0.95rem; opacity: 0.75; margin-left: 3px; }

.plan-cycle {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
    margin: 0 0 18px;
}

.plan-list {
    list-style: none;
    margin: 0 0 26px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.95rem;
    flex: 1;
}

.plan-list li { padding-left: 24px; position: relative; }

.plan-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--basil);
}

.plan-featured .plan-list li::before { background: var(--tomato); }

.plan-cta { margin-top: auto; }

.plan .ghost-btn { border-color: var(--mist-dim); color: var(--mist); }

.plan .ghost-btn:hover { border-color: var(--saffron); color: var(--saffron); }

.plan-cta-dark { background: var(--spruce-soft); box-shadow: none; }

.plan-cta-dark:hover { background: var(--spruce-line); }

.plan-featured .cta { box-shadow: 0 12px 26px -12px rgba(228, 83, 43, 0.6); }

.pricing-note {
    max-width: 640px;
    margin: 34px auto 0;
    text-align: center;
    font-size: 0.82rem;
    color: var(--mist-dim);
    line-height: 1.6;
}

/* ── responsive ──────────────────────────────────────────── */

@media (max-width: 940px) {
    .hero {
        /* minmax(0,…): a bare 1fr floors at min-content, and the nowrap step
           headers would push the column past the viewport (clipped right edge) */
        grid-template-columns: minmax(0, 1fr);
        padding-top: 24px;
        gap: 8px;
    }

    .hero-plate { order: -1; margin-bottom: 6px; }

    .plate-stage { width: min(62vw, 320px); }

    .result-card { grid-template-columns: 1fr; }

    .result-art { padding: 26px; }

    .result-art svg { max-width: 260px; }

    .result-body { padding: 28px 26px 34px; }
}

@media (max-width: 760px) {
    /* no room in the topbar — the hero pill takes over below */
    .topnav .free-pill, .topnav-link { display: none; }

    .free-pill-hero { display: inline-block; }

    .account-name { max-width: 90px; }
}

@media (max-width: 560px) {
    .topbar { padding: 18px 20px 6px; }

    .brand { font-size: 1.05rem; gap: 8px; }

    .brand-mark { width: 24px; height: 24px; }

    .kitchen-btn { padding: 8px 13px; font-size: 0.84rem; }

    .topnav { gap: 8px; }

    .kitchen-label { display: none; } /* gear icon still opens the drawer */

    .lang-menu summary { padding: 8px 9px; gap: 5px; }

    .lang-code { display: none; } /* flag + chevron still switch languages */

    #kitchenBtn { padding: 9px 11px; }

    .account-name { display: none; }

    .account-chip { padding: 4px; border-radius: 50%; }

    body { overflow-x: clip; }

    .auth-card { padding: 30px 24px 28px; }

    .panel { padding: 24px 20px; }

    .profile-wrap, .pricing-wrap, .auth-wrap { padding-left: 20px; padding-right: 20px; }

    .plan-featured { transform: none; }

    .panel-form .cta { align-self: stretch; justify-content: center; }

    .hero { padding-left: 20px; padding-right: 20px; padding-bottom: 48px; }

    .step-head { padding: 12px 13px; gap: 9px; }

    .step-title { font-size: 0.76rem; letter-spacing: 0.12em; }

    .step-body { padding: 2px 13px 14px; }

    .results { padding-left: 20px; padding-right: 20px; }

    .segmented { display: flex; flex-wrap: wrap; }

    .seg-btn { flex: 1; padding: 8px 10px; }

    .cta { width: 100%; justify-content: center; }

    .equip-grid { grid-template-columns: 1fr; }

    .footer { flex-direction: column; gap: 4px; }
}

/* ── motion preferences ──────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
