/* WhatToCook UI redesign v1
   Warm editorial food-app design system layered over the legacy inline CSS. */

:root {
    --bg: #f5f0e7;
    --bg-deep: #ebe2d4;
    --surface: #fffdf8;
    --surface-soft: #f9f5ed;
    --surface-olive: #eef1e7;
    --text: #2f2b25;
    --text-soft: #71695f;
    --text-faint: #93897d;
    --olive: #64734f;
    --olive-dark: #49583a;
    --olive-soft: #dfe6d6;
    --terracotta: #b56d4d;
    --terracotta-soft: #f1ded3;
    --sand: #e9dfcf;
    --line: rgba(70, 58, 45, .12);
    --line-strong: rgba(70, 58, 45, .2);
    --danger: #9d5047;
    --success: #55734a;
    --shadow-sm: 0 8px 24px rgba(55, 43, 31, .07);
    --shadow-md: 0 18px 50px rgba(55, 43, 31, .10);
    --shadow-lg: 0 30px 80px rgba(55, 43, 31, .14);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 34px;
    --container: 1180px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

::selection { background: #dfe6d6; color: #26301f; }

.app-root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    background:
        radial-gradient(circle at 12% 8%, rgba(255,255,255,.95), transparent 26%),
        linear-gradient(180deg, #faf7f1 0%, var(--bg) 46%, #efe7db 100%);
}

.app-main {
    width: 100%;
    flex: 1;
    padding: 34px 22px 64px;
}

.card-container {
    width: min(var(--container), 100%);
    max-width: var(--container);
    margin: 0 auto;
    display: block;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    background: rgba(250, 247, 241, .88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

.site-header-inner {
    width: min(1240px, calc(100% - 40px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    border: 0;
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    cursor: pointer;
    color: var(--text);
    flex: 0 0 auto;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--olive-dark);
    color: #fffaf0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-style: italic;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

.brand-copy {
    display: grid;
    text-align: left;
    line-height: 1.08;
}

.brand-copy strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    letter-spacing: -.02em;
}

.brand-copy small {
    margin-top: 4px;
    font-size: 10px;
    color: var(--text-faint);
    letter-spacing: .035em;
}

.header-navigation {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.nav-bar {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    flex-wrap: nowrap;
}

.nav-link {
    border: 0;
    background: transparent;
    color: #655d53;
    border-radius: 999px;
    padding: 9px 11px;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
    box-shadow: none;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(100,115,79,.08);
    color: var(--olive-dark);
    box-shadow: none;
    transform: none;
}

.nav-link-active {
    background: var(--olive-soft);
    color: var(--olive-dark);
    box-shadow: none;
}

.nav-icon { margin-right: 5px; }

.account-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.account-link,
.logout-button,
.text-link-button {
    border: 0;
    background: transparent;
    color: var(--olive-dark);
    cursor: pointer;
    font-weight: 700;
}

.account-link { padding: 10px 8px; }
.account-link:hover, .text-link-button:hover { text-decoration: underline; text-underline-offset: 4px; }

.account-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    max-width: 190px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,253,248,.72);
    padding: 5px 11px 5px 5px;
    cursor: pointer;
    color: var(--text);
}

.account-chip:hover,
.account-chip-active {
    border-color: rgba(100,115,79,.35);
    background: #fffdf8;
}

.account-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--terracotta-soft);
    color: #7b452f;
    font-weight: 800;
}

.account-chip-copy {
    min-width: 0;
    display: grid;
    text-align: left;
    line-height: 1.05;
}

.account-chip-copy small { font-size: 9px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .07em; }
.account-chip-copy strong { margin-top: 3px; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.logout-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(255,253,248,.7);
    font-size: 17px;
}

.logout-button:hover { background: #fff; border-color: var(--line-strong); }
.mobile-menu-button { display: none; }

.site-footer {
    width: min(var(--container), calc(100% - 40px));
    margin: 0 auto;
    padding: 26px 0 34px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: center;
    gap: 10px;
    color: var(--text-faint);
    font-size: 12px;
}
.site-footer > span:first-child { color: var(--olive-dark); font-weight: 800; }
.footer-dot { opacity: .5; }

/* Typography */
.eyebrow,
.feature-kicker,
.profile-eyebrow {
    display: inline-block;
    margin: 0 0 9px;
    color: var(--terracotta);
    font-size: 11px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

h1, h2, h3 { color: var(--text); }
.page-hero h1,
.home-hero h1,
.recipe-detail-copy h1,
.section-title-row h2,
.results-heading h2 {
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: -.035em;
}

.subtle-note { color: var(--text-soft); line-height: 1.6; }

/* Buttons */
.primary-button,
.another-button,
.fridge-button {
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--olive-dark);
    color: #fffdf8;
    padding: 11px 18px;
    min-height: 42px;
    font-weight: 780;
    letter-spacing: -.01em;
    cursor: pointer;
    box-shadow: 0 9px 24px rgba(73,88,58,.17);
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.primary-button:hover:not(:disabled),
.another-button:hover:not(:disabled),
.fridge-button:hover:not(:disabled) {
    background: #3f4d33;
    transform: translateY(-1px);
    box-shadow: 0 13px 30px rgba(73,88,58,.22);
}

.primary-button:disabled,
.secondary-button:disabled { opacity: .55; cursor: not-allowed; }
.primary-button-large { min-height: 50px; padding: 13px 22px; }
.primary-button-wide { min-width: 190px; }
.header-cta { min-height: 38px; padding: 8px 14px; box-shadow: none; font-size: 12px; }

.secondary-button {
    border: 1px solid var(--line-strong);
    background: rgba(255,253,248,.92);
    color: var(--text);
    border-radius: 999px;
    min-height: 42px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 730;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.secondary-button:hover:not(:disabled) { background: #fff; border-color: rgba(73,88,58,.35); transform: translateY(-1px); }

/* Forms */
.form-card,
.profile-card,
.editor-section,
.admin-review-card,
.meal-day-card,
.filter-surface {
    background: rgba(255,253,248,.92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.form-card,
.profile-card {
    border-radius: var(--radius-lg);
    padding: 26px;
}

.form-input,
.form-select,
.form-textarea,
.input-field,
.fridge-input {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(70,58,45,.18);
    border-radius: 12px;
    padding: 11px 13px;
    outline: none;
    background: #fffefb;
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.input-field:focus,
.fridge-input:focus {
    border-color: rgba(100,115,79,.65);
    box-shadow: 0 0 0 4px rgba(100,115,79,.10);
    background: #fff;
}

.form-label,
.fridge-label,
.search-filter-label {
    display: block;
    margin-bottom: 7px;
    color: #4f493f;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .01em;
}

.field-hint,
.fridge-hint,
.password-hint { display: block; margin-top: 7px; color: var(--text-faint); font-size: 11px; line-height: 1.5; }
.form-layout { gap: 15px; }
.form-title { font-family: Georgia, "Times New Roman", serif; font-size: 30px; }
.form-subtitle { color: var(--text-soft); }

/* Home */
.home-page { display: grid; gap: 34px; }

.home-cold-start-notice {
    margin-top: 12px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.6;
}
.home-cold-start-notice strong { color: var(--olive-dark); font-weight: 600; }
.home-cold-start-notice p { margin: 4px 0 0; }

.home-hero {
    min-height: 390px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
    align-items: center;
    background:
        radial-gradient(circle at 85% 30%, rgba(255,255,255,.18), transparent 24%),
        linear-gradient(135deg, #e6e8db 0%, #cdd6bd 45%, #aebc96 100%);
    position: relative;
    box-shadow: var(--shadow-md);
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(54,70,43,.11) .65px, transparent .65px);
    background-size: 10px 10px;
    opacity: .25;
}

.home-hero-copy {
    position: relative;
    z-index: 2;
    padding: clamp(36px, 6vw, 74px);
    max-width: 760px;
}

.home-hero h1 { margin: 0; max-width: 650px; font-size: clamp(48px, 6.5vw, 82px); line-height: .96; color: #26301f; }
.home-lead { max-width: 610px; margin: 22px 0 0; color: #45513b; font-size: clamp(16px, 1.9vw, 19px); line-height: 1.65; }
.home-hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 30px; }

.home-hero-art { min-height: 330px; position: relative; z-index: 1; align-self: stretch; }
.plate { position: absolute; border-radius: 50%; aspect-ratio: 1; }
.plate-back { width: 290px; right: -30px; top: 34px; background: rgba(255,249,237,.34); border: 1px solid rgba(255,255,255,.35); }
.plate-front { width: 220px; right: 44px; top: 88px; display: grid; place-items: center; background: #fffaf0; box-shadow: 0 30px 60px rgba(46,58,36,.18), inset 0 0 0 16px #f3eadc; }
.plate-mark { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 76px; color: var(--terracotta); }
.herb { position: absolute; color: #657654; font-family: Georgia, serif; font-size: 84px; transform: rotate(-25deg); opacity: .72; }
.herb-one { right: 248px; top: 56px; }
.herb-two { right: 4px; bottom: 30px; transform: rotate(32deg); }

.home-suggestion-section { display: grid; gap: 18px; }
.section-title-row, .results-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
}
.section-title-row h2, .results-heading h2 { margin: 0; font-size: 36px; }
.section-context, .results-heading > span { max-width: 360px; color: var(--text-faint); font-size: 12px; line-height: 1.5; text-align: right; }

.home-discovery-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.discovery-tile {
    border: 1px solid var(--line);
    background: rgba(255,253,248,.78);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: grid;
    grid-template-columns: 46px 1fr auto;
    align-items: center;
    gap: 14px;
    text-align: left;
    color: var(--text);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.discovery-tile:hover { transform: translateY(-2px); border-color: rgba(100,115,79,.28); box-shadow: var(--shadow-md); }
.discovery-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-olive); color: var(--olive-dark); font-size: 25px; }
.discovery-tile strong { display: block; font-family: Georgia, serif; font-size: 17px; }
.discovery-tile small { display: block; margin-top: 4px; color: var(--text-soft); font-size: 11px; line-height: 1.45; }
.tile-arrow { color: var(--terracotta); font-size: 22px; }

/* Recipe cards */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.recipe-card {
    width: 100%;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: grid;
    grid-template-columns: 90px 1fr;
    align-items: stretch;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.recipe-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(100,115,79,.22); }

.recipe-card-accent {
    min-height: 100%;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,.38), transparent 24%),
        linear-gradient(160deg, #d8dfcb 0%, #aebc96 100%);
    color: rgba(55,68,44,.8);
}
.recipe-card-accent::after { content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); }
.recipe-card-accent span { font-family: Georgia, serif; font-style: italic; font-size: 42px; z-index: 1; }

.recipe-card-content { min-width: 0; padding: 18px; display: flex; flex-direction: column; }
.recipe-card-topline { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.recipe-title-block { min-width: 0; }
.recipe-title-block h2, .recipe-card h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 22px; line-height: 1.08; letter-spacing: -.025em; color: var(--text); }
.recipe-card-kicker { display: block; margin-bottom: 8px; color: var(--terracotta); font-size: 10px; font-weight: 850; letter-spacing: .10em; text-transform: uppercase; }
.recipe-description { margin: 9px 0 0; color: var(--text-soft); font-size: 12px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recipe-meta { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 6px; }
.meta-pill { border-radius: 999px; padding: 5px 9px; background: #f1ede5; color: #655d53; font-size: 10px; font-weight: 720; }
.recipe-ingredient-preview { margin: 12px 0 0; color: var(--text-soft); font-size: 10px; line-height: 1.45; }
.recipe-ingredient-preview > span { color: var(--text-faint); text-transform: uppercase; letter-spacing: .08em; font-weight: 800; margin-right: 4px; }
.tags-row { display: flex; flex-wrap: wrap; gap: 6px; }
.recipe-card-tags { margin-top: 12px; }
.tag-pill { padding: 5px 8px; border-radius: 999px; background: var(--olive-soft); color: var(--olive-dark); font-size: 9px; font-weight: 780; }
.recipe-phrase { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: #6c5f52; font-family: Georgia, serif; font-style: italic; font-size: 13px; line-height: 1.6; }
.recipe-card-actions { margin-top: auto; padding-top: 15px; display: flex; justify-content: flex-end; }
.recipe-open-button { border: 0; background: transparent; padding: 6px 0; color: var(--olive-dark); font-size: 11px; font-weight: 850; cursor: pointer; box-shadow: none; }
.recipe-open-button:hover { color: var(--terracotta); text-decoration: none; }
.recipe-open-button span { margin-left: 4px; }

.recipe-card--featured {
    grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr);
    min-height: 300px;
    border-radius: 28px;
    box-shadow: var(--shadow-md);
}
.recipe-card--featured .recipe-card-accent {
    min-height: 300px;
    background:
        radial-gradient(circle at 35% 26%, rgba(255,255,255,.6), transparent 18%),
        radial-gradient(circle at 58% 56%, rgba(180,109,77,.22), transparent 25%),
        linear-gradient(145deg, #efe3d6 0%, #d9c4ad 100%);
    color: #946248;
}
.recipe-card--featured .recipe-card-accent::before { content: ""; position: absolute; width: 180px; height: 180px; border: 22px solid rgba(255,250,240,.68); border-radius: 50%; box-shadow: 0 20px 40px rgba(89,61,43,.12); }
.recipe-card--featured .recipe-card-accent::after { width: 134px; height: 134px; border-color: rgba(181,109,77,.25); }
.recipe-card--featured .recipe-card-accent span { font-size: 72px; }
.recipe-card--featured .recipe-card-content { padding: 32px; }
.recipe-card--featured .recipe-title-block h2 { font-size: clamp(30px, 3.4vw, 46px); }
.recipe-card--featured .recipe-description { font-size: 14px; -webkit-line-clamp: 3; max-width: 680px; }
.recipe-card--featured .meta-pill { font-size: 11px; padding: 6px 10px; }
.recipe-card--featured .recipe-ingredient-preview { font-size: 11px; }
.recipe-card--featured .recipe-open-button { font-size: 13px; }

.fav-button {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.88);
    box-shadow: 0 5px 14px rgba(50,40,30,.08);
    cursor: pointer;
    font-size: 17px;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.fav-button:hover:not(:disabled) { transform: scale(1.06); border-color: rgba(181,109,77,.28); box-shadow: 0 8px 18px rgba(50,40,30,.12); }
.fav-button-active { background: #fff8f4; border-color: rgba(181,109,77,.25); }

/* Discovery pages */
.discovery-page { display: grid; gap: 24px; }
.page-hero {
    min-height: 215px;
    border-radius: var(--radius-xl);
    padding: clamp(28px, 5vw, 54px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    align-items: center;
    gap: 30px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
}
.page-hero-search { background: linear-gradient(135deg, #ece2d6 0%, #f6efe7 60%, #e7dacb 100%); }
.page-hero-fridge { background: linear-gradient(135deg, #dfe6d6 0%, #eef1e7 62%, #ced9c3 100%); }
.page-hero h1 { margin: 0; font-size: clamp(40px, 5vw, 62px); line-height: .98; }
.page-hero p { max-width: 720px; margin: 18px 0 0; color: var(--text-soft); font-size: 15px; line-height: 1.65; }
.page-hero-mark { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; justify-self: end; background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.65); color: rgba(73,88,58,.66); font-family: Georgia, serif; font-size: 58px; box-shadow: inset 0 0 0 12px rgba(255,255,255,.25); }

.filter-surface { border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.redesigned-search-main-row { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 14px; }
.input-with-icon { position: relative; }
.input-with-icon > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-faint); z-index: 1; }
.input-with-icon .form-input { padding-left: 40px; }

.filter-section { padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--line); }
.filter-section-soft { margin-top: 22px; padding: 20px; border: 0; border-radius: 16px; background: #f7f3ec; }
.filter-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.filter-section-heading .form-label { margin: 0; }
.filter-section-heading small { color: var(--text-faint); font-size: 10px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-chip { border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--text-soft); padding: 8px 12px; font-size: 11px; font-weight: 750; cursor: pointer; }
.choice-chip:hover { border-color: rgba(100,115,79,.35); color: var(--olive-dark); }
.choice-chip-active { background: var(--olive-dark); color: #fff; border-color: var(--olive-dark); }

.mood-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mood-button {
    min-height: 64px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fffdf9;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.mood-button:hover { transform: translateY(-1px); border-color: rgba(100,115,79,.32); }
.mood-button-active { background: var(--surface-olive); border-color: rgba(100,115,79,.4); color: var(--olive-dark); }
.mood-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #f5eee4; font-size: 18px; }
.mood-button-active .mood-icon { background: rgba(255,255,255,.72); }

.discovery-filter-grid { display: grid; grid-template-columns: minmax(180px,.65fr) minmax(280px,1.35fr); gap: 14px; align-items: start; }
.safety-note, .allergen-safety-note { margin: 13px 0 0; padding-left: 12px; border-left: 2px solid rgba(181,109,77,.4); color: #776b5f; font-size: 10px; line-height: 1.65; }
.filter-warning { margin: 9px 0 0; color: #8a5d20; font-size: 10px; }
.redesigned-search-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }

.allergen-dropdown { position: relative; }
.allergen-dropdown > summary {
    min-height: 46px;
    border: 1px solid rgba(70,58,45,.18);
    border-radius: 12px;
    padding: 11px 13px;
    background: #fffefb;
    color: var(--text-soft);
    cursor: pointer;
    list-style: none;
    font-size: 12px;
}
.allergen-dropdown > summary::-webkit-details-marker { display: none; }
.allergen-dropdown > summary::after { content: "⌄"; float: right; color: var(--text-faint); }
.allergen-dropdown[open] > summary { border-color: rgba(100,115,79,.55); box-shadow: 0 0 0 4px rgba(100,115,79,.08); }
.allergen-dropdown-menu { margin-top: 6px; max-height: 260px; overflow: auto; display: grid; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-md); }
.allergen-option { display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: 8px; color: var(--text-soft); font-size: 11px; cursor: pointer; }
.allergen-option:hover { background: var(--surface-soft); }
.selected-allergen-chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.selected-allergen-chip { border: 0; border-radius: 999px; padding: 6px 9px; background: var(--terracotta-soft); color: #794a36; font-size: 9px; font-weight: 750; cursor: pointer; }

.results-section { display: grid; gap: 16px; margin-top: 8px; }
.results-heading { padding: 0 2px; }
.results-heading h2 { font-size: 34px; }
.discovery-empty-state { margin-top: 4px; min-height: 230px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-state-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-olive); color: var(--olive-dark); font-size: 28px; margin-bottom: 8px; }
.discovery-empty-state h3 { margin: 0; font-family: Georgia, serif; font-size: 23px; }
.discovery-empty-state p { max-width: 480px; margin: 8px 0 0; color: var(--text-soft); font-size: 12px; line-height: 1.5; }

/* Fridge input + match states */
.ingredient-token-input {
    min-height: 54px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(70,58,45,.18);
    border-radius: 15px;
    padding: 8px;
    background: #fffefb;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.ingredient-token-input:focus-within { border-color: rgba(100,115,79,.62); box-shadow: 0 0 0 4px rgba(100,115,79,.09); }
.ingredient-token-input input { min-width: 180px; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); padding: 5px 6px; }
.ingredient-token { border: 0; border-radius: 999px; padding: 7px 10px; background: var(--surface-olive); color: var(--olive-dark); font-size: 10px; font-weight: 780; cursor: pointer; }
.ingredient-token span { opacity: .7; margin-left: 3px; }
.fridge-filter-section { margin-top: 18px; }
.fridge-action-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 20px; }
.pantry-inline-note { margin: 0; max-width: 650px; color: var(--text-faint); font-size: 10px; line-height: 1.5; }
.pantry-inline-note span { color: var(--terracotta); margin-right: 5px; }
.pantry-result-card { min-width: 0; display: flex; flex-direction: column; }
.pantry-result-card .recipe-card { flex: 1; border-radius: 0 0 var(--radius-lg) var(--radius-lg); border-top: 0; }
.pantry-match-banner {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    border: 1px solid rgba(181,109,77,.16);
    border-bottom: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: #f7eee8;
    color: #795342;
    font-size: 10px;
}
.pantry-match-banner-ready { background: var(--surface-olive); color: var(--olive-dark); border-color: rgba(100,115,79,.17); }
.match-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: rgba(255,255,255,.65); font-weight: 900; }
.pantry-match-banner > span:last-child { display: grid; gap: 2px; min-width: 0; }
.pantry-match-banner small { color: inherit; opacity: .76; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Recipe details */
.redesigned-recipe-page { display: grid; gap: 22px; }
.back-link { width: max-content; border: 0; background: transparent; padding: 5px 0; color: var(--olive-dark); font-size: 11px; font-weight: 800; cursor: pointer; }
.recipe-detail-hero {
    display: grid;
    grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr);
    min-height: 410px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}
.recipe-detail-visual {
    min-height: 410px;
    position: relative;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 26% 25%, rgba(255,255,255,.65), transparent 20%),
        radial-gradient(circle at 65% 65%, rgba(181,109,77,.18), transparent 24%),
        linear-gradient(145deg, #e8ded0, #cfb99f);
    overflow: hidden;
}
.recipe-detail-visual::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(93,68,48,.12) .5px, transparent .5px); background-size: 8px 8px; opacity: .22; }
.recipe-detail-plate { width: min(270px, 72%); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: #fffaf0; box-shadow: 0 34px 70px rgba(79,53,35,.18), inset 0 0 0 22px #f0e4d3; position: relative; z-index: 1; }
.recipe-detail-plate::after { content: ""; position: absolute; width: 58%; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(181,109,77,.2); }
.recipe-detail-plate span { font-family: Georgia, serif; font-style: italic; font-size: clamp(74px, 9vw, 120px); color: var(--terracotta); }
.recipe-detail-caption { position: absolute; left: 22px; bottom: 18px; z-index: 2; color: rgba(84,63,48,.68); font-family: Georgia, serif; font-size: 12px; font-style: italic; }
.recipe-detail-copy { padding: clamp(32px, 5vw, 62px); display: flex; flex-direction: column; justify-content: center; }
.recipe-detail-topline { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.recipe-detail-copy h1 { margin: 0; font-size: clamp(43px, 5.5vw, 68px); line-height: .98; }
.recipe-detail-description { max-width: 670px; margin: 18px 0 0; color: var(--text-soft); font-size: 15px; line-height: 1.65; }
.recipe-detail-phrase { margin: 18px 0 0; color: #7b6757; font-family: Georgia, serif; font-style: italic; font-size: 13px; line-height: 1.55; }
.recipe-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 26px; }
.recipe-stat { min-height: 70px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); display: grid; align-content: center; gap: 4px; }
.recipe-stat small { color: var(--text-faint); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.recipe-stat strong { color: var(--text); font-size: 15px; }
.recipe-detail-tags { margin-top: 17px; }

.recipe-detail-layout { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr); gap: 18px; align-items: start; }
.recipe-ingredients-panel,
.recipe-steps-panel,
.recipe-safety-section {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255,253,248,.9);
    box-shadow: var(--shadow-sm);
}
.recipe-ingredients-panel { padding: 22px; position: sticky; top: 98px; }
.recipe-steps-panel { padding: 28px; }
.recipe-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.recipe-section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: 31px; }
.ingredient-progress { border-radius: 999px; padding: 5px 9px; background: var(--surface-olive); color: var(--olive-dark); font-size: 10px; font-weight: 850; }
.redesigned-ingredients-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.redesigned-ingredients-list .ingredients-item { padding: 0; border: 0; }
.redesigned-ingredients-list label { min-height: 50px; display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: var(--surface-soft); cursor: pointer; }
.redesigned-ingredients-list input { position: absolute; opacity: 0; pointer-events: none; }
.ingredient-checkmark { width: 20px; height: 20px; border: 1px solid rgba(70,58,45,.24); border-radius: 6px; background: #fff; display: grid; place-items: center; }
.ingredients-item-checked .ingredient-checkmark { background: var(--olive-dark); border-color: var(--olive-dark); }
.ingredients-item-checked .ingredient-checkmark::after { content: "✓"; color: white; font-size: 11px; font-weight: 900; }
.ingredient-main { display: grid; gap: 2px; min-width: 0; }
.ingredient-name { color: var(--text); font-size: 12px; font-weight: 780; }
.ingredient-main small { color: var(--text-faint); font-size: 10px; line-height: 1.35; }
.ingredients-item-checked .ingredient-main { opacity: .55; text-decoration: line-through; }
.redesigned-steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.redesigned-steps-list .step-item { display: grid; grid-template-columns: 54px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.redesigned-steps-list .step-item:last-child { border-bottom: 0; }
.step-number { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--olive-dark); color: #fff; font-family: Georgia, serif; font-size: 13px; }
.step-item p { margin: 2px 0 0; color: #514b42; font-size: 14px; line-height: 1.72; }

.recipe-safety-section { padding: 24px; display: grid; grid-template-columns: minmax(220px,.65fr) minmax(0,1.35fr); gap: 20px 28px; align-items: center; }
.recipe-safety-section h2 { margin: 0; font-family: Georgia, serif; font-size: 26px; }
.allergen-tags-row { align-self: end; }
.allergen-tag { padding: 6px 9px; border-radius: 999px; background: var(--terracotta-soft); color: #754733; font-size: 9px; font-weight: 800; }
.recipe-safety-note { grid-column: 2; margin: -6px 0 0; }
.recipe-page-state { min-height: 460px; display: grid; place-items: center; }
.loading-card { padding: 18px 22px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text-soft); box-shadow: var(--shadow-sm); }
.loading-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: var(--olive); margin-right: 8px; animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .3; transform: scale(.8); } }

/* Existing user area polish */
.section-heading-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 18px; }
.section-heading-row h2 { margin: 0; font-family: Georgia, serif; font-size: 36px; letter-spacing: -.025em; }
.count-badge { background: var(--surface-olive); color: var(--olive-dark); }
.favourites-page,
.my-recipes-page,
.recipe-editor-page,
.admin-page,
.meal-planner-page,
.profile-page-stack { width: 100%; }

.favourites-toolbar { max-width: none; margin-bottom: 18px; display: grid; grid-template-columns: minmax(260px,1fr) 230px; gap: 10px; }
.favourites-grid,
.my-recipes-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.favourite-compact-card,
.my-recipe-card { border-radius: 18px; padding: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.favourite-compact-card h3,
.my-recipe-card h3 { font-family: Georgia, serif; font-size: 20px; }
.compact-meta-row { gap: 9px; font-size: 10px; color: var(--text-faint); }
.compact-open-button { margin-top: auto; }

.profile-page-stack { max-width: 900px; margin: 0 auto; }
.profile-card { width: 100%; }
.profile-header h2, .profile-header h3 { font-family: Georgia, serif; }

.editor-section { border-radius: 20px; padding: 20px; }
.editor-section h3 { font-family: Georgia, serif; font-size: 22px; }
.visibility-card { transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.visibility-card:hover { transform: translateY(-1px); }

.meal-week-grid { gap: 10px; }
.meal-day-card { border-radius: 16px; box-shadow: none; }
.meal-day-card.has-meal { background: var(--surface-olive); }
.admin-review-card { border-radius: 20px; }

.empty-state {
    padding: 28px;
    border: 1px dashed rgba(70,58,45,.18);
    border-radius: 18px;
    background: rgba(255,253,248,.6);
    color: var(--text-soft);
}
.status-text { color: var(--text-soft); }
.error-text { color: var(--danger); }
.form-status-success { color: var(--success); }
.form-status-error { color: var(--danger); }
.info-callout { background: var(--surface-olive); color: #4c5c40; border-color: rgba(100,115,79,.15); }

/* Responsive */
@media (max-width: 1080px) {
    .site-header-inner { width: min(100% - 28px, 1240px); gap: 18px; }
    .brand-copy small { display: none; }
    .nav-link { padding: 9px 8px; font-size: 12px; }
    .account-chip-copy { display: none; }
    .account-chip { padding-right: 5px; }
    .recipe-grid, .favourites-grid, .my-recipes-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .home-hero { grid-template-columns: 1fr 280px; }
    .home-hero-copy { padding: 44px; }
    .recipe-detail-hero { grid-template-columns: .78fr 1.22fr; }
    .recipe-stat-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 860px) {
    .site-header-inner { min-height: 68px; justify-content: space-between; }
    .mobile-menu-button {
        display: grid;
        width: 42px;
        height: 42px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: rgba(255,253,248,.8);
        place-content: center;
        gap: 4px;
        cursor: pointer;
    }
    .mobile-menu-button span { width: 18px; height: 1.5px; background: var(--text); display: block; }
    .header-navigation {
        display: none;
        position: absolute;
        left: 14px;
        right: 14px;
        top: calc(100% + 8px);
        background: rgba(255,253,248,.98);
        border: 1px solid var(--line);
        border-radius: 18px;
        padding: 12px;
        box-shadow: var(--shadow-lg);
    }
    .header-navigation-open { display: grid; gap: 12px; }
    .nav-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
    .nav-link { justify-content: flex-start; text-align: left; border-radius: 11px; padding: 11px 12px; }
    .account-actions { justify-content: stretch; border-top: 1px solid var(--line); padding-top: 10px; }
    .account-chip { max-width: none; flex: 1; }
    .account-chip-copy { display: grid; }
    .account-link, .header-cta { flex: 1; }

    .home-hero { grid-template-columns: 1fr; min-height: auto; }
    .home-hero-art { min-height: 250px; order: -1; }
    .plate-front { right: 50%; transform: translateX(50%); top: 42px; }
    .plate-back { right: 50%; transform: translateX(62%); top: 8px; }
    .herb-one { left: 10%; top: 30px; right: auto; }
    .herb-two { right: 10%; }
    .home-hero-copy { padding: 36px; }
    .home-hero h1 { font-size: clamp(44px, 11vw, 68px); }

    .page-hero { grid-template-columns: 1fr 80px; padding: 32px; }
    .page-hero-mark { width: 76px; height: 76px; font-size: 40px; }
    .recipe-detail-hero { grid-template-columns: 1fr; }
    .recipe-detail-visual { min-height: 320px; }
    .recipe-detail-layout { grid-template-columns: 1fr; }
    .recipe-ingredients-panel { position: static; }
    .recipe-safety-section { grid-template-columns: 1fr; }
    .recipe-safety-note { grid-column: 1; }
    .home-discovery-strip { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .app-main { padding: 22px 14px 46px; }
    .site-header-inner { width: calc(100% - 24px); }
    .brand-copy strong { font-size: 18px; }
    .site-footer { width: calc(100% - 28px); text-align: center; flex-wrap: wrap; }

    .home-page { gap: 24px; }
    .home-hero { border-radius: 24px; }
    .home-hero-art { min-height: 205px; }
    .plate-front { width: 160px; top: 34px; }
    .plate-back { width: 210px; }
    .plate-mark { font-size: 54px; }
    .home-hero-copy { padding: 28px 22px 30px; }
    .home-lead { font-size: 15px; }
    .home-hero-actions { align-items: stretch; flex-direction: column; }
    .text-link-button { text-align: left; padding: 4px 2px; }
    .section-title-row, .results-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
    .section-context, .results-heading > span { text-align: left; }
    .section-title-row h2, .results-heading h2 { font-size: 30px; }

    .recipe-grid,
    .favourites-grid,
    .my-recipes-grid { grid-template-columns: 1fr; }
    .recipe-card { grid-template-columns: 72px 1fr; }
    .recipe-card--featured { grid-template-columns: 1fr; }
    .recipe-card--featured .recipe-card-accent { min-height: 190px; }
    .recipe-card--featured .recipe-card-content { padding: 22px; }

    .page-hero { min-height: 0; grid-template-columns: 1fr; padding: 26px 22px; border-radius: 24px; }
    .page-hero-mark { display: none; }
    .page-hero h1 { font-size: 42px; }
    .page-hero p { font-size: 13px; }
    .filter-surface { padding: 18px; }
    .redesigned-search-main-row, .discovery-filter-grid { grid-template-columns: 1fr; }
    .mood-grid { grid-template-columns: 1fr; }
    .mood-button { min-height: 54px; }
    .redesigned-search-actions, .fridge-action-row { flex-direction: column-reverse; align-items: stretch; }
    .redesigned-search-actions button, .fridge-action-row button { width: 100%; }
    .pantry-inline-note { text-align: left; }

    .recipe-detail-hero { border-radius: 24px; }
    .recipe-detail-visual { min-height: 230px; }
    .recipe-detail-plate { width: 160px; }
    .recipe-detail-copy { padding: 26px 22px; }
    .recipe-detail-copy h1 { font-size: 42px; }
    .recipe-stat-grid { grid-template-columns: 1fr 1fr; }
    .recipe-ingredients-panel, .recipe-steps-panel { padding: 18px; }
    .redesigned-steps-list .step-item { grid-template-columns: 42px 1fr; gap: 12px; }
    .step-number { width: 36px; height: 36px; }
    .step-item p { font-size: 13px; }
    .recipe-safety-section { padding: 20px; }

    .favourites-toolbar { grid-template-columns: 1fr; }
    .section-heading-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ==========================================================
   WhatToCook UI redesign v2 — Mediterranean cookbook polish
   Visual target: warm, food-first, editorial but still an app.
   ========================================================== */

:root {
    --bg: #f7f3ea;
    --surface: #fffdf8;
    --surface-soft: #f8f2e8;
    --surface-olive: #edf1e5;
    --text: #2e2a23;
    --text-soft: #6f675d;
    --text-faint: #94897d;
    --olive: #5d7346;
    --olive-dark: #3f5631;
    --olive-soft: #dfe8d5;
    --terracotta: #bd603c;
    --terracotta-dark: #a94f31;
    --terracotta-soft: #f2dfd3;
    --shadow-sm: 0 8px 24px rgba(67, 52, 37, .06);
    --shadow-md: 0 18px 42px rgba(67, 52, 37, .10);
    --shadow-lg: 0 32px 72px rgba(67, 52, 37, .13);
    --container: 1210px;
}

body {
    overflow-x: hidden;
    background:
        radial-gradient(circle at 18% 8%, rgba(255,255,255,.96), transparent 28%),
        linear-gradient(180deg, #fbf9f4 0%, #f5f0e7 52%, #f1e9dd 100%);
}

.app-root-v2 {
    position: relative;
    isolation: isolate;
    background: transparent;
}

.app-root-v2::before,
.app-root-v2::after {
    content: "";
    position: fixed;
    z-index: -1;
    width: 230px;
    height: 165px;
    background: url('/assets/decor/olive-branch.svg') center / contain no-repeat;
    opacity: .20;
    pointer-events: none;
    filter: saturate(.85);
}

.app-root-v2::before {
    left: -78px;
    top: 430px;
    transform: rotate(-21deg) scale(1.2);
}

.app-root-v2::after {
    right: -95px;
    top: 105px;
    transform: rotate(142deg) scale(1.35);
}

.app-main { padding-top: 22px; }

/* Header */
.site-header-v2 {
    background: rgba(251, 248, 242, .93);
    box-shadow: 0 6px 24px rgba(64, 49, 34, .035);
}

.site-header-v2 .site-header-inner {
    width: min(1360px, calc(100% - 46px));
    min-height: 68px;
    gap: 22px;
}

.brand-v2 {
    position: relative;
    gap: 10px;
    padding-left: 26px;
}

.brand-v2 .brand-branch {
    position: absolute;
    left: -18px;
    top: -16px;
    width: 70px;
    height: 62px;
    z-index: 0;
    opacity: .92;
    transform: rotate(-10deg);
    pointer-events: none;
}

.brand-v2 .brand-branch img { width: 100%; height: 100%; object-fit: contain; }

.brand-v2 .brand-mark {
    position: relative;
    z-index: 1;
    width: 46px;
    height: 46px;
    background: #415d31;
    box-shadow: 0 5px 16px rgba(53,73,42,.16), inset 0 0 0 1px rgba(255,255,255,.2);
    font-size: 24px;
}

.brand-v2 .brand-copy strong {
    font-size: 22px;
    line-height: .98;
    color: #2c2a25;
}

.brand-v2 .brand-copy small {
    font-size: 10px;
    color: #7d7468;
    letter-spacing: .015em;
}

.site-header-v2 .nav-bar { gap: 4px; }

.site-header-v2 .nav-link {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 11px;
    color: #514d46;
    font-size: 12px;
    font-weight: 720;
}

.site-header-v2 .nav-link-active {
    background: #e5ecd9;
    color: #344b29;
    box-shadow: inset 0 0 0 1px rgba(71,92,54,.06);
}

.site-header-v2 .nav-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 2px;
}

.site-header-v2 .account-chip {
    min-height: 47px;
    padding: 5px 13px 5px 5px;
    border-color: rgba(73,60,48,.12);
    background: rgba(255,253,248,.9);
    box-shadow: 0 4px 16px rgba(55,43,31,.04);
}

.site-header-v2 .account-avatar {
    width: 35px;
    height: 35px;
    background: #f2dfd3;
    color: #8a4c35;
}

.account-chevron { margin-left: 2px; color: var(--text-faint); font-size: 12px; }

.site-header-v2 .logout-button {
    display: grid;
    place-items: center;
    color: var(--olive-dark);
}

/* Home page composition */
.home-page-v2 {
    position: relative;
    display: grid;
    gap: 24px;
}

.decorative-olive {
    position: absolute;
    z-index: -1;
    width: 180px;
    height: 130px;
    background: url('/assets/decor/olive-branch.svg') center / contain no-repeat;
    opacity: .16;
    pointer-events: none;
}

.decorative-olive-left {
    left: -130px;
    top: 440px;
    transform: rotate(-20deg) scale(1.25);
}

.decorative-olive-right {
    right: -115px;
    top: 620px;
    transform: rotate(160deg) scale(1.15);
}

.home-hero-photo {
    position: relative;
    min-height: 316px;
    display: grid;
    grid-template-columns: minmax(0, .56fr) minmax(390px, .44fr);
    overflow: hidden;
    border-radius: 27px;
    border: 1px solid rgba(74,63,49,.07);
    box-shadow: 0 15px 40px rgba(78,61,40,.08);
    background: #e8ecd9;
}

.home-hero-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(237,241,225,.18), transparent 40%);
}

.home-hero-photo-layer {
    position: absolute;
    inset: 0 0 0 41%;
    background-size: cover;
    background-position: center;
    transition: opacity .5s ease, transform 1.1s ease;
    animation: heroImageIn .7s ease both;
}

.home-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, #edf1df 0%, #edf1df 34%, rgba(237,241,223,.91) 45%, rgba(237,241,223,.2) 67%, rgba(237,241,223,0) 100%),
        linear-gradient(180deg, rgba(255,255,255,.12), rgba(50,64,38,.02));
    z-index: 1;
}

.home-hero-copy {
    position: relative;
    z-index: 2;
    padding: 50px 24px 42px 54px;
    align-self: center;
}

.home-hero h1 {
    max-width: 620px;
    margin: 0;
    font-size: clamp(42px, 4.4vw, 62px);
    line-height: .98;
    letter-spacing: -.045em;
    color: #26331f;
}

.hero-eyebrow { color: var(--terracotta); margin-bottom: 13px; }

.home-lead {
    max-width: 585px;
    margin: 15px 0 0;
    font-size: 16px;
    line-height: 1.6;
    color: #45483f;
}

.home-hero-actions {
    gap: 16px;
    margin-top: 24px;
}

.hero-primary-button {
    min-width: 236px;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-inline: 20px;
    background: #3f5b2f;
    box-shadow: 0 10px 22px rgba(53,77,39,.18), inset 0 0 0 2px rgba(255,255,255,.16);
}

.hero-primary-button:hover:not(:disabled) { background: #344c28; }

.hero-secondary-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 11px 4px;
    color: #496038;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}

.hero-secondary-button:hover { text-decoration: none; transform: translateX(2px); }

.hero-handwritten {
    position: absolute;
    z-index: 3;
    color: #496038;
    font-family: "Bradley Hand", "Noteworthy", "Segoe Print", cursive;
    font-size: 18px;
    line-height: 1.03;
    transform: rotate(-7deg);
    text-align: center;
    opacity: .95;
}

.hero-handwritten-right { right: 23px; top: 38px; }
.hero-handwritten span { font-size: 22px; }

.home-margin-note {
    position: absolute;
    left: -96px;
    top: 235px;
    color: #6d675d;
    font-family: "Bradley Hand", "Noteworthy", "Segoe Print", cursive;
    font-size: 17px;
    line-height: 1.12;
    text-align: center;
    transform: rotate(-8deg);
    opacity: .92;
}

.home-margin-note span { font-size: 21px; }

.home-section-title-row {
    position: relative;
    min-height: 72px;
    align-items: flex-end;
}

.home-section-title-row h2 {
    margin: 2px 0 0;
    font-size: clamp(31px, 3vw, 42px);
    line-height: 1;
}

.section-handwritten-note {
    position: absolute;
    left: 56%;
    top: 8px;
    display: inline-flex;
    align-items: flex-end;
    gap: 5px;
    color: #496038;
    font-family: "Bradley Hand", "Noteworthy", "Segoe Print", cursive;
    font-size: 17px;
    line-height: 1.02;
    transform: rotate(-4deg);
}

.section-context {
    padding-bottom: 7px;
    color: #8a8177;
    font-size: 10px;
}

/* Featured card — close to approved visual reference */
.recipe-card--featured {
    min-height: 282px;
    grid-template-columns: minmax(380px, .46fr) minmax(0, .54fr);
    border-radius: 22px;
    overflow: hidden;
    background: #fffdfa;
    box-shadow: 0 18px 44px rgba(73,56,39,.10);
}

.recipe-card--featured .recipe-card-visual {
    min-height: 282px;
    border-radius: 0;
}

.recipe-card--featured .recipe-card-content {
    padding: 30px 34px 22px;
}

.recipe-card--featured .recipe-title-block h2 {
    font-size: clamp(34px, 3.5vw, 47px);
    line-height: 1;
}

.recipe-card--featured .recipe-description {
    margin-top: 10px;
    max-width: 630px;
    font-size: 14px;
    line-height: 1.5;
}

.recipe-card-visual {
    position: relative;
    min-height: 170px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.recipe-card-visual-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(28,23,18,.08), transparent 45%);
}

.recipe-card-visual-fallback {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 68% 28%, rgba(255,255,255,.45), transparent 23%),
        radial-gradient(circle at 30% 72%, rgba(255,239,218,.36), transparent 25%),
        linear-gradient(145deg, #d6c2a6, #a98666);
}

.visual-salad .recipe-card-visual-fallback,
.visual-salad.recipe-detail-visual-v2 { background: linear-gradient(140deg, #b9c890, #789061 55%, #536b43); }
.visual-pasta .recipe-card-visual-fallback,
.visual-pasta.recipe-detail-visual-v2 { background: linear-gradient(140deg, #e8c085, #c87845 58%, #9b4e2e); }
.visual-rice .recipe-card-visual-fallback,
.visual-rice.recipe-detail-visual-v2 { background: linear-gradient(140deg, #e1d0ae, #c0a477 58%, #846f51); }
.visual-legumes .recipe-card-visual-fallback,
.visual-legumes.recipe-detail-visual-v2 { background: linear-gradient(140deg, #c6ab88, #96684f 58%, #654b3d); }
.visual-meat .recipe-card-visual-fallback,
.visual-meat.recipe-detail-visual-v2 { background: linear-gradient(140deg, #c79478, #8f5a47 58%, #5e3e35); }
.visual-seafood .recipe-card-visual-fallback,
.visual-seafood.recipe-detail-visual-v2 { background: linear-gradient(140deg, #a9c4bd, #6f9992 58%, #486c68); }
.visual-soup .recipe-card-visual-fallback,
.visual-soup.recipe-detail-visual-v2 { background: linear-gradient(140deg, #d9b18a, #b16f4c 58%, #7b4b39); }
.visual-breakfast .recipe-card-visual-fallback,
.visual-breakfast.recipe-detail-visual-v2 { background: linear-gradient(140deg, #e1c08e, #c68750 58%, #8a593a); }
.visual-homecooked .recipe-card-visual-fallback,
.visual-homecooked.recipe-detail-visual-v2 { background: linear-gradient(140deg, #d8c9b1, #a99475 58%, #74624e); }

.recipe-visual-orbit,
.recipe-detail-visual-orbit {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 25px solid rgba(255,250,239,.72);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 20px 38px rgba(68,50,36,.12);
}

.recipe-visual-orbit::after,
.recipe-detail-visual-orbit::after {
    content: "";
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.35);
}

.recipe-visual-script,
.recipe-photo-note {
    position: absolute;
    color: rgba(255,250,239,.96);
    font-family: "Bradley Hand", "Noteworthy", "Segoe Print", cursive;
    font-size: 17px;
    line-height: 1.08;
    transform: rotate(-7deg);
    text-shadow: 0 1px 6px rgba(39,29,21,.16);
}

.recipe-visual-script { left: 24px; bottom: 22px; }
.recipe-photo-note { left: 22px; top: 80px; z-index: 2; }

.recipe-card--featured .recipe-phrase {
    margin-top: 15px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 13px;
    color: #74695e;
}

.recipe-meta-v2 { gap: 7px; }
.recipe-meta-v2 .meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    background: #f1eee8;
    color: #605a52;
}

.difficulty-bars { display: inline-flex; align-items: end; gap: 1px; width: 13px; height: 13px; }
.difficulty-bars i { width: 2px; border-radius: 2px; background: currentColor; }
.difficulty-bars i:nth-child(1) { height: 5px; }
.difficulty-bars i:nth-child(2) { height: 8px; }
.difficulty-bars i:nth-child(3) { height: 11px; }

.recipe-open-button-v2 {
    min-width: 185px;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border-radius: 999px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #c75d3a, #b44f31);
    color: #fff;
    box-shadow: 0 10px 24px rgba(178,78,47,.18);
}

.recipe-open-button-v2:hover { transform: translateY(-1px); background: #ab472b; }

.featured-recipe-transition { transition: opacity .18s ease, transform .18s ease; }
.featured-recipe-transition-changing { opacity: .55; transform: translateY(5px); }

/* Standard cards become more visual without needing unique per-recipe photos. */
.recipe-grid .recipe-card--standard,
.favourites-grid .recipe-card--standard,
.pantry-result-card .recipe-card--standard {
    grid-template-columns: 118px minmax(0,1fr);
    overflow: hidden;
}

.recipe-card--standard .recipe-card-visual {
    min-height: 100%;
}

.recipe-card--standard .recipe-visual-orbit {
    width: 76px;
    height: 76px;
    border-width: 12px;
}

.recipe-card--standard .recipe-visual-orbit::after { width: 48px; height: 48px; }
.recipe-card--standard .recipe-visual-script { display: none; }

/* Discovery shortcuts */
.home-discovery-strip { gap: 14px; }
.discovery-tile {
    min-height: 82px;
    border-radius: 17px;
    padding: 15px 18px;
    background: rgba(255,253,248,.92);
    box-shadow: 0 9px 25px rgba(65,49,33,.055);
}

.discovery-tile .discovery-icon {
    width: 43px;
    height: 43px;
    border-radius: 50%;
}

.discovery-tile-search .discovery-icon { background: #e8efe0; color: #36532c; }
.discovery-tile-fridge .discovery-icon { background: #f3e3d7; color: #b45434; }
.discovery-tile-search .tile-arrow { color: #36532c; }
.discovery-tile-fridge .tile-arrow { color: #b45434; }

.discovery-tile strong { font-size: 16px; }
.discovery-tile small { font-size: 10px; }

/* Recipe details use same visual language as cards. */
.recipe-detail-hero-v2 { min-height: 370px; }
.recipe-detail-visual-v2 {
    position: relative;
    min-height: 370px;
    background-size: cover !important;
    background-position: center !important;
}

.recipe-detail-visual-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 58%, rgba(30,24,18,.28));
}

.recipe-detail-visual-orbit {
    position: relative;
    z-index: 1;
    width: 190px;
    height: 190px;
    border-width: 28px;
}

.recipe-detail-visual-script {
    position: absolute;
    left: 28px;
    top: 35px;
    color: rgba(255,250,239,.95);
    font-family: "Bradley Hand", "Noteworthy", "Segoe Print", cursive;
    font-size: 18px;
    transform: rotate(-6deg);
}

.recipe-detail-caption { color: rgba(255,250,239,.9); text-shadow: 0 1px 7px rgba(27,19,13,.22); }
.recipe-detail-copy h1 { font-size: clamp(38px, 4.5vw, 58px); }

/* Lightweight motion */
@keyframes heroImageIn {
    from { opacity: .5; transform: scale(1.035); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes softRise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.home-suggestion-section,
.home-discovery-strip { animation: softRise .5s ease both; }
.home-discovery-strip { animation-delay: .07s; }

.recipe-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.recipe-card:hover { transform: translateY(-3px); box-shadow: 0 22px 48px rgba(69,53,38,.11); }
.recipe-card:hover .recipe-card-visual { transform: scale(1.012); }
.recipe-card-visual { transition: transform .45s ease; }

.fav-button { transition: transform .18s cubic-bezier(.2,.8,.2,1), color .18s ease, background .18s ease; }
.fav-button:hover { transform: scale(1.08); }
.fav-button:active { transform: scale(.92); }

/* Footer */
.site-footer-v2 {
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
}
.footer-brand-row,
.footer-message { display: flex; align-items: center; gap: 8px; }
.footer-brand { color: var(--olive-dark); font-weight: 850; }
.footer-message { color: #9b9186; }
.footer-message svg { color: #4e693c; }

/* Responsive tuning */
@media (max-width: 1180px) {
    .home-margin-note { display: none; }
    .section-handwritten-note { left: 52%; }
    .home-hero-photo { grid-template-columns: 1fr; }
    .home-hero-photo-layer { inset: 0 0 0 46%; }
    .home-hero-copy { max-width: 650px; }
    .hero-handwritten-right { right: 18px; }
}

@media (max-width: 980px) {
    .site-header-v2 .site-header-inner { min-height: 64px; }
    .brand-v2 .brand-copy small { display: none; }
    .home-hero-photo { min-height: 340px; }
    .home-hero-photo-layer { inset: 0 0 0 45%; }
    .home-hero-shade { background: linear-gradient(90deg, #edf1df 0%, #edf1df 42%, rgba(237,241,223,.78) 62%, rgba(237,241,223,.08) 100%); }
    .home-hero-copy { padding-left: 38px; }
    .section-handwritten-note { display: none; }
    .recipe-card--featured { grid-template-columns: minmax(280px,.42fr) minmax(0,.58fr); }
}

@media (max-width: 760px) {
    .app-main { padding: 16px 14px 44px; }
    .home-page-v2 { gap: 20px; }
    .app-root-v2::before,
    .app-root-v2::after,
    .decorative-olive { display: none; }

    .home-hero-photo {
        grid-template-columns: 1fr;
        min-height: 500px;
        border-radius: 22px;
    }

    .home-hero-photo-layer {
        inset: auto 0 0 0;
        height: 48%;
        background-position: center 50%;
    }

    .home-hero-shade {
        background: linear-gradient(180deg, #edf1df 0%, #edf1df 49%, rgba(237,241,223,.88) 60%, rgba(237,241,223,.06) 100%);
    }

    .home-hero-copy {
        padding: 32px 24px 228px;
        align-self: start;
    }

    .home-hero h1 { font-size: clamp(38px, 11vw, 52px); max-width: 520px; }
    .home-lead { font-size: 14px; line-height: 1.55; }
    .hero-handwritten-right { display: none; }
    .home-hero-actions { align-items: flex-start; }

    .home-section-title-row { align-items: flex-start; }
    .section-context { max-width: 180px; text-align: right; }

    .recipe-card--featured {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .recipe-card--featured .recipe-card-visual { min-height: 235px; }
    .recipe-card--featured .recipe-card-content { padding: 24px; }
    .recipe-card--featured .recipe-title-block h2 { font-size: 35px; }
    .recipe-photo-note { top: 56px; }

    .site-footer-v2 { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
    .brand-v2 { padding-left: 18px; }
    .brand-v2 .brand-branch { width: 56px; left: -17px; top: -11px; }
    .brand-v2 .brand-mark { width: 40px; height: 40px; font-size: 21px; }
    .brand-v2 .brand-copy strong { font-size: 19px; }

    .home-hero-photo { min-height: 520px; }
    .home-hero-copy { padding: 28px 20px 235px; }
    .hero-primary-button { width: 100%; min-width: 0; }
    .hero-secondary-button { width: 100%; justify-content: center; }
    .home-hero-actions { width: 100%; }

    .section-title-row { align-items: flex-start; }
    .section-context { display: none; }
    .home-section-title-row h2 { font-size: 31px; }
    .home-discovery-strip { grid-template-columns: 1fr; }

    .recipe-grid .recipe-card--standard,
    .favourites-grid .recipe-card--standard,
    .pantry-result-card .recipe-card--standard {
        grid-template-columns: 86px minmax(0,1fr);
    }

    .recipe-open-button-v2 { min-width: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* =========================================================
   WhatToCook UI redesign v3 — Mediterranean product polish
   ========================================================= */

:root {
    --wtc-ink: #2e3326;
    --wtc-olive-900: #35452c;
    --wtc-olive-800: #435537;
    --wtc-olive-700: #536846;
    --wtc-olive-100: #e8eddc;
    --wtc-cream: #f7f2e9;
    --wtc-paper: #fffdf8;
    --wtc-terracotta: #c8663e;
    --wtc-terracotta-dark: #a84f30;
    --wtc-terracotta-soft: #f5e3d8;
}

body {
    background:
        radial-gradient(circle at 8% 4%, rgba(255,255,255,.96), transparent 27%),
        linear-gradient(180deg, #fbf8f2 0%, #f5f0e7 55%, #f1e9de 100%);
}

.app-main { padding-top: 28px; }
.card-container { width: min(1240px, 100%); max-width: 1240px; }

/* Header */
.site-header-v3 .site-header-inner {
    width: min(1360px, calc(100% - 38px));
    min-height: 70px;
    gap: 20px;
}

.brand-v3 { gap: 10px; }
.brand-v3 .brand-branch {
    width: 34px;
    margin-right: -9px;
    transform: rotate(-12deg) translateY(-1px);
}
.brand-v3 .brand-branch img { width: 38px; display: block; }
.brand-v3 .brand-mark {
    width: 44px;
    height: 44px;
    font-size: 22px;
    box-shadow: 0 7px 20px rgba(53,69,44,.18), inset 0 0 0 1px rgba(255,255,255,.2);
}
.brand-v3 .brand-copy strong { font-size: 22px; }
.brand-v3 .brand-copy small { font-size: 10px; }
.site-header-v3 .nav-bar {
    background: rgba(255,253,248,.72);
    border: 1px solid rgba(83,104,70,.08);
    box-shadow: 0 8px 24px rgba(72,59,42,.07);
    border-radius: 999px;
    padding: 4px;
    gap: 0;
}
.site-header-v3 .nav-link { padding: 9px 12px; font-size: 12.5px; }
.site-header-v3 .nav-link-active { background: #e9efdE; box-shadow: inset 0 0 0 1px rgba(83,104,70,.08); }
.site-header-v3 .nav-icon { display: inline-flex; vertical-align: -3px; margin-right: 6px; }
.account-checking {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 13px; border-radius: 999px; background: rgba(255,253,248,.75);
    border: 1px solid var(--line); color: var(--text-soft); font-size: 12px;
}

.session-notice {
    position: sticky;
    top: 70px;
    z-index: 35;
    width: min(1180px, calc(100% - 34px));
    margin: 10px auto -4px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(181,109,77,.22);
    border-radius: 14px;
    background: rgba(255,249,241,.96);
    box-shadow: var(--shadow-sm);
    color: #76503c;
    font-size: 12px;
}
.session-notice span { flex: 1; }
.session-notice button { border: 0; background: transparent; color: var(--olive-dark); font-weight: 750; cursor: pointer; }
.session-notice .session-notice-close { font-size: 18px; color: var(--text-faint); }

/* Home */
.home-page-v3 { position: relative; min-height: 880px; }
.home-hero-v3 {
    min-height: 330px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 52px rgba(71,60,43,.08);
}
.home-hero-v3 .home-hero-photo-layer {
    inset: 0 0 0 44%;
    background-position: center;
    background-size: cover;
}
.home-hero-v3 .home-hero-shade {
    background: linear-gradient(90deg, #edf1df 0%, #edf1df 39%, rgba(237,241,223,.92) 49%, rgba(237,241,223,.18) 74%, rgba(237,241,223,.02) 100%);
}
.home-hero-v3 .home-hero-copy {
    max-width: 720px;
    padding: 54px 54px 48px;
}
.home-hero-v3 .home-hero-copy h1 {
    max-width: 660px;
    font-size: clamp(43px, 4.7vw, 64px);
    line-height: .98;
    letter-spacing: -.04em;
}
.home-hero-v3 .home-lead { max-width: 610px; font-size: 16px; line-height: 1.55; }
.home-hero-actions-v3 { margin-top: 22px; gap: 22px; }
.home-hero-actions-v3 .hero-primary-button {
    background: linear-gradient(135deg, var(--wtc-olive-800), var(--wtc-olive-900));
    min-height: 46px;
    padding-inline: 20px;
}
.home-hero-actions-v3 .hero-secondary-button { display: inline-flex; align-items: center; gap: 7px; }
.hero-photo-enter { animation: heroPhotoFade 1s ease both; }
@keyframes heroPhotoFade { from { opacity: .35; transform: scale(1.025); } to { opacity: 1; transform: scale(1); } }

.home-margin-note { top: 237px; left: -78px; }
.home-suggestion-section-v3 { margin-top: 28px; }
.home-section-title-row h2 { font-size: clamp(30px, 3.2vw, 45px); }
.home-suggestion-section-v3 .section-handwritten-note { color: #58704a; }

.recipe-card--featured {
    grid-template-columns: minmax(340px,.47fr) minmax(0,.53fr);
    border-radius: 24px;
    min-height: 275px;
}
.recipe-card--featured .recipe-card-content { padding: 30px 34px; }
.recipe-card--featured .recipe-title-block h2 { font-size: clamp(30px, 3.1vw, 44px); }
.recipe-card-actions-featured {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--line);
    margin-top: auto;
    padding-top: 17px;
}
.recipe-refresh-button {
    border: 0;
    background: transparent;
    color: var(--olive-dark);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    padding: 8px 0;
}
.recipe-refresh-button:hover { color: var(--terracotta); }
.recipe-refresh-button:disabled { opacity: .55; cursor: default; }
.recipe-card--featured .recipe-open-button-v2 {
    background: linear-gradient(135deg, #ca6941, #b55434);
    color: white;
    padding: 12px 20px;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(181,84,52,.16);
}
.recipe-card--featured .recipe-open-button-v2:hover { background: linear-gradient(135deg, #d17349, #aa492c); }
.recipe-loading-card {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--line);
    background: rgba(255,253,248,.8);
    border-radius: 20px;
    color: var(--text-soft);
}

/* Heart state */
.fav-button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(181,109,77,.18);
    border-radius: 50%;
    background: rgba(255,253,248,.92);
    color: #a69e92;
    box-shadow: 0 8px 20px rgba(74,57,42,.08);
    cursor: pointer;
    transition: transform .18s ease, color .18s ease, background .18s ease;
}
.fav-button svg { fill: transparent; transition: fill .18s ease, transform .18s ease; }
.fav-button:hover { transform: translateY(-2px) scale(1.03); color: var(--terracotta); }
.fav-button-active { color: #c95e3b; background: #fffaf5; }
.fav-button-active svg { fill: currentColor; animation: heartPop .28s ease both; }
@keyframes heartPop { 50% { transform: scale(1.22); } }

/* Reusable editorial page language */
.editorial-page { width: 100%; display: grid; gap: 24px; }
.editorial-page-hero {
    position: relative;
    min-height: 184px;
    border-radius: 25px;
    border: 1px solid rgba(83,104,70,.10);
    padding: 32px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    overflow: hidden;
    background:
        radial-gradient(circle at 86% 15%, rgba(255,255,255,.76), transparent 24%),
        linear-gradient(135deg, #edf1e3 0%, #f7f2e9 62%, #f3e7dc 100%);
    box-shadow: 0 14px 40px rgba(70,56,39,.06);
}
.editorial-page-hero::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 220px;
    right: -40px;
    bottom: -72px;
    background: url('/assets/decor/olive-branch.svg') center/contain no-repeat;
    opacity: .13;
    transform: rotate(26deg);
    pointer-events: none;
}
.editorial-page-hero > * { position: relative; z-index: 1; }
.editorial-page-hero h1 {
    margin: 5px 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(34px, 4vw, 50px);
    line-height: 1;
    letter-spacing: -.035em;
    color: var(--wtc-ink);
}
.editorial-page-hero p { max-width: 690px; margin: 0; color: var(--text-soft); line-height: 1.55; }
.editorial-hero-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--olive-dark);
    background: rgba(255,253,248,.72);
    border: 1px solid rgba(83,104,70,.12);
}
.editorial-hero-action { white-space: nowrap; }
.editorial-error-card {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px;
    border-radius: 15px;
    background: #fff6f2;
    border: 1px solid rgba(157,80,71,.18);
    color: #8f493f;
}
.editorial-empty-state {
    min-height: 260px;
    display: grid;
    justify-items: center;
    align-content: center;
    text-align: center;
    gap: 9px;
    border-radius: 22px;
    border: 1px dashed rgba(83,104,70,.22);
    background: rgba(255,253,248,.62);
    padding: 34px;
}
.editorial-empty-state .empty-icon {
    width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
    background: var(--olive-soft); color: var(--olive-dark);
}
.editorial-empty-state h2,
.editorial-empty-state h3 { margin: 0; font-family: Georgia, serif; font-size: 26px; }
.editorial-empty-state p { margin: 0 0 8px; color: var(--text-soft); max-width: 540px; }
.empty-actions { display: flex; gap: 10px; align-items: center; }

/* Favourites library */
.library-heading-row {
    display: flex; align-items: end; justify-content: space-between; gap: 18px;
}
.library-heading-row h2 { margin: 4px 0 0; font-family: Georgia, serif; font-size: 28px; }
.library-toolbar { display: flex; gap: 10px; align-items: center; }
.library-search { min-width: min(420px, 45vw); position: relative; }
.library-search > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); z-index: 1; color: var(--olive); }
.library-search .form-input { padding-left: 42px; }
.recipe-library-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.library-recipe-card {
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}
.library-recipe-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.library-recipe-visual {
    position: relative;
    min-height: 165px;
    background-position: center;
    background-size: cover;
    display: flex;
    align-items: flex-end;
    padding: 15px;
}
.library-recipe-visual .fav-button { position: absolute; top: 12px; right: 12px; }
.library-recipe-visual-fallback { background: linear-gradient(135deg, #dfe7d2, #f0ddce); }
.visual-pasta .library-recipe-visual-fallback { background: linear-gradient(135deg,#efd7bf,#d99765); }
.visual-rice .library-recipe-visual-fallback { background: linear-gradient(135deg,#efe4c8,#d8c49a); }
.visual-legumes .library-recipe-visual-fallback { background: linear-gradient(135deg,#d7b18e,#9b6449); }
.visual-meat .library-recipe-visual-fallback { background: linear-gradient(135deg,#dec1ae,#a96d54); }
.visual-seafood .library-recipe-visual-fallback { background: linear-gradient(135deg,#cbded8,#7eaaa0); }
.visual-salad .library-recipe-visual-fallback { background: linear-gradient(135deg,#dce8cf,#9eb37c); }
.library-visual-note { font-family: "Segoe Print", "Bradley Hand", cursive; color: rgba(54,66,44,.86); font-size: 15px; transform: rotate(-4deg); }
.library-recipe-body { padding: 17px 18px 18px; display: grid; gap: 9px; }
.library-recipe-body h3 { margin: 0; font-family: Georgia, serif; font-size: 22px; line-height: 1.08; }
.library-recipe-body p { margin: 0; color: var(--text-soft); font-size: 13px; line-height: 1.48; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.library-open-link {
    border: 0; background: transparent; color: var(--olive-dark); padding: 5px 0 0;
    display: inline-flex; align-items: center; gap: 7px; justify-self: start;
    font-weight: 800; cursor: pointer;
}
.library-open-link:hover { color: var(--terracotta); }

/* Profile/settings */
.profile-hero-person { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.profile-hero-avatar { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--terracotta-soft); color: #7c432d; font-family: Georgia, serif; font-size: 24px; font-weight: 800; }
.profile-hero-person > span:last-child { display: grid; }
.profile-hero-person small { color: var(--text-faint); }
.profile-hero-person strong { margin-top: 3px; }
.settings-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.75fr); gap: 18px; align-items: start; }
.settings-card { border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); padding: 25px; }
.settings-card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.settings-card-heading h2 { margin: 3px 0 0; font-family: Georgia, serif; font-size: 25px; }
.settings-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--olive-soft); color: var(--olive-dark); }
.settings-icon-terracotta { background: var(--terracotta-soft); color: var(--terracotta-dark); }
.settings-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.read-only-field { min-height: 44px; display: flex; align-items: center; padding: 0 13px; border-radius: 11px; background: var(--surface-soft); color: var(--text-soft); border: 1px solid var(--line); }
.profile-allergen-field { margin-top: 8px; }
.field-title-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.selected-count { font-size: 11px; color: var(--olive-dark); background: var(--olive-soft); border-radius: 999px; padding: 5px 8px; }
.settings-actions { display: flex; justify-content: flex-end; margin-top: 4px; }
.settings-intro { color: var(--text-soft); margin: -8px 0 17px; }
.profile-role-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 9px; background: var(--terracotta-soft); color: #884b33; font-size: 11px; font-weight: 800; margin-bottom: 15px; }

/* My recipes */
.my-recipes-grid-v3 { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.my-recipe-card-v3 { padding: 0; overflow: hidden; display: grid; }
.my-recipe-visual { min-height: 150px; position: relative; background-position: center; background-size: cover; display: flex; align-items: end; padding: 14px; }
.my-recipe-visual-fallback { background: linear-gradient(135deg,#e6ead9,#efddcf); }
.my-recipe-card-badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 6px; justify-content: space-between; align-items: start; }
.recipe-status-badge, .source-photo-badge { display: inline-flex; align-items: center; gap: 5px; }
.my-recipe-card-body { padding: 17px 18px 18px; display: grid; gap: 9px; }
.my-recipe-card-body h3 { margin: 0; font-family: Georgia, serif; font-size: 23px; line-height: 1.05; }
.my-recipe-visual-button {
    width: 100%;
    border: 0;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.my-recipe-visual-button:focus-visible,
.my-recipe-title-button:focus-visible {
    outline: 2px solid var(--olive);
    outline-offset: 3px;
}
.my-recipe-title-button {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: inherit;
    text-align: left;
    cursor: pointer;
}
.my-recipe-title-button:hover { color: var(--olive-dark); }

.my-recipe-card-body > p { margin: 0; color: var(--text-soft); font-size: 13px; line-height: 1.5; }
.card-action-row-v3 { margin-top: 6px; align-items: center; }
.icon-button-label { display: inline-flex; align-items: center; gap: 6px; }

/* Recipe editor */
.recipe-editor-form-v3 { display: grid; gap: 18px; }
.editor-section-v3 { padding: 26px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.editor-section-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.editor-section-heading-action { flex-wrap: wrap; }
.editor-section-heading-action > button { margin-left: auto; }
.editor-section-heading h2 { margin: 3px 0 0; font-family: Georgia, serif; font-size: 27px; }
.editor-step-number { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--olive-soft); color: var(--olive-dark); font-family: Georgia, serif; font-style: italic; font-weight: 800; }
.toggle-row-v3 { gap: 10px; }
.toggle-row-v3 label { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: var(--surface-soft); }
.ingredient-editor-row-v3 { grid-template-columns: 36px 1.5fr .6fr 1fr 1.1fr 38px; align-items: center; }
.ingredient-index { font-family: Georgia, serif; font-size: 16px; color: var(--text-faint); }
.steps-preview-v3 { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.steps-preview-v3 li { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: start; background: var(--surface-soft); border-radius: 13px; padding: 11px 12px; }
.steps-preview-v3 li > span { font-family: Georgia, serif; color: var(--terracotta); font-weight: 800; }
.steps-preview-v3 li p { margin: 0; }
.visibility-options-v3 { gap: 12px; }
.visibility-options-v3 .visibility-card { min-height: 130px; position: relative; padding: 18px; display: grid; align-content: start; gap: 7px; }
.visibility-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-soft); color: var(--olive-dark); }
.visibility-card.selected .visibility-icon { background: var(--olive-soft); }
.file-drop-zone { position: relative; min-height: 150px; border: 1px dashed rgba(83,104,70,.3); border-radius: 18px; background: var(--surface-soft); display: grid; place-items: center; align-content: center; gap: 5px; text-align: center; color: var(--olive-dark); cursor: pointer; }
.file-drop-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop-zone span { color: var(--text-faint); font-size: 12px; }
.editor-submit-bar { position: sticky; bottom: 16px; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border-radius: 18px; background: rgba(255,253,248,.94); backdrop-filter: blur(16px); border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(57,44,31,.13); }
.editor-submit-bar > div { display: grid; }
.editor-submit-bar span { color: var(--text-faint); font-size: 11px; margin-top: 2px; }

/* Meal planner */
.planner-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.planner-toolbar h2 { margin: 4px 0 0; font-family: Georgia, serif; font-size: 27px; text-transform: capitalize; }
.week-nav-v3 { display: flex; gap: 8px; }
.icon-only-button { min-width: 42px; padding-inline: 12px; }
.meal-week-grid-v3 { grid-template-columns: repeat(7, minmax(0,1fr)); gap: 10px; align-items: stretch; }
.meal-day-card-v3 { min-width: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(61,48,33,.05); }
.meal-day-card-v3 .meal-day-header { padding: 13px 13px 9px; }
.meal-day-card-v3 .meal-day-header > div { display: grid; gap: 2px; }
.meal-day-card-v3 .meal-day-header span { color: var(--text-faint); font-size: 10px; }
.meal-day-visual { min-height: 92px; background-position: center; background-size: cover; display: grid; place-items: center; color: var(--olive-dark); }
.meal-day-visual-fallback { background: linear-gradient(135deg,#e6ead8,#f0dfd2); }
.meal-day-content { padding: 12px 13px; display: grid; gap: 7px; flex: 1; }
.meal-day-content h3 { margin: 0; font-family: Georgia, serif; font-size: 17px; line-height: 1.05; }
.meal-day-actions { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: auto; }
.meal-day-empty { min-height: 118px; display: grid; place-items: center; align-content: center; gap: 7px; color: var(--text-faint); text-align: center; padding: 16px; }
.meal-day-empty > span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-soft); }
.meal-day-empty p { margin: 0; font-size: 11px; }
.meal-day-card-v3 .meal-select { margin: 0 10px 10px; width: calc(100% - 20px); font-size: 10px; }

/* Admin */
.admin-hero-counter { width: 100px; height: 100px; border-radius: 50%; background: var(--terracotta-soft); color: #8b4c34; display: grid; place-items: center; align-content: center; text-align: center; }
.admin-hero-counter strong { font-family: Georgia, serif; font-size: 30px; line-height: 1; }
.admin-hero-counter span { font-size: 10px; margin-top: 3px; }
.admin-review-list-v3 { display: grid; gap: 18px; }
.admin-review-card-v3 { padding: 24px; }
.admin-review-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.admin-review-card-heading h2 { margin: 4px 0 3px; font-family: Georgia, serif; font-size: 28px; }
.admin-review-card-heading p { margin: 0; color: var(--text-faint); font-size: 12px; }
.admin-review-description { color: var(--text-soft); }
.admin-review-panel { background: var(--surface-soft); border-radius: 16px; padding: 16px; }
.admin-review-panel h3 { font-family: Georgia, serif; margin-top: 0; }
.admin-review-actions-v3 { align-items: center; }
.admin-actions-spacer { flex: 1; }

/* Login / register */
.auth-page { display: grid; grid-template-columns: minmax(320px,.9fr) minmax(400px,1.1fr); min-height: 620px; border-radius: 28px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-md); }
.auth-visual-panel { position: relative; padding: 58px 48px; overflow: hidden; background: linear-gradient(145deg,#dfe8d1 0%,#f1eadc 63%,#e5cdbb 100%); }
.auth-visual-panel::after { content:""; position:absolute; width:250px; height:350px; right:-80px; bottom:-80px; background:url('/assets/decor/olive-branch.svg') center/contain no-repeat; opacity:.22; transform:rotate(22deg); }
.auth-visual-panel h1 { position:relative; z-index:1; margin:10px 0 14px; font-family:Georgia,serif; font-size:clamp(42px,5vw,62px); line-height:.95; letter-spacing:-.04em; color:var(--olive-dark); }
.auth-visual-panel p { position:relative; z-index:1; max-width:470px; color:#56604e; line-height:1.6; }
.auth-handwritten { position:absolute; left:48px; bottom:55px; font-family:"Segoe Print","Bradley Hand",cursive; color:#5d704e; font-size:20px; transform:rotate(-4deg); }
.auth-olive-mark { display:none; }
.auth-form-panel { padding: 48px; align-self: stretch; display:flex; flex-direction:column; justify-content:center; }
.auth-form-panel-wide { padding-block: 38px; }
.auth-form-heading h2 { margin:6px 0 7px; font-family:Georgia,serif; font-size:34px; }
.auth-form-heading p { margin:0 0 22px; color:var(--text-soft); }
.auth-form { max-width: 620px; }
.auth-submit { width: 100%; justify-content:center; }
.auth-switch { margin:18px 0 0; color:var(--text-soft); font-size:12px; }
.auth-switch button { border:0; background:transparent; color:var(--olive-dark); font-weight:800; cursor:pointer; }
.auth-fields-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.auth-allergens-field { margin-top:5px; }

/* Discovery pages — same visual language */
.discovery-page .page-hero {
    background:
        radial-gradient(circle at 92% 22%, rgba(255,255,255,.8), transparent 25%),
        linear-gradient(135deg,#eef1e3,#f7f2e9 62%,#f3e4d9);
    border: 1px solid rgba(83,104,70,.10);
    box-shadow: 0 14px 38px rgba(70,56,39,.05);
}
.discovery-page .page-hero h1 { font-size: clamp(36px,4.3vw,52px); }
.discovery-page .page-hero-mark { opacity: .22; }
.filter-surface { box-shadow: var(--shadow-sm); }
.mood-grid { gap: 12px; }
.mood-button { min-height: 58px; }
.recipe-grid { gap: 18px; }

/* Recipe details polish */
.redesigned-recipe-page .recipe-detail-hero-v2 { box-shadow: var(--shadow-md); }
.redesigned-recipe-page .recipe-detail-copy h1 { font-size: clamp(38px,4.5vw,56px); }
.redesigned-recipe-page .recipe-steps-panel,
.redesigned-recipe-page .recipe-ingredients-panel { box-shadow: var(--shadow-sm); }

/* Common */
.compact-meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.compact-meta-row > span { display: inline-flex; align-items: center; gap: 4px; }
.compact-safety-note { margin-top: 10px; }
.editorial-info-callout { display:flex; align-items:center; gap:9px; }
.loading-dot { width: 8px; height: 8px; border-radius:50%; background:var(--olive); animation: loadingPulse 1s ease-in-out infinite; }
@keyframes loadingPulse { 50% { opacity:.32; transform:scale(.72); } }

/* Responsive */
@media (max-width: 1180px) {
    .site-header-v3 .site-header-inner { width: min(100% - 24px, 1180px); }
    .site-header-v3 .nav-link { padding: 8px 9px; font-size: 11.5px; }
    .brand-v3 .brand-copy small { display: none; }
    .meal-week-grid-v3 { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

@media (max-width: 920px) {
    .home-hero-v3 .home-hero-photo-layer { inset: 0 0 0 42%; }
    .home-hero-v3 .home-hero-copy { padding: 42px 36px; max-width: 620px; }
    .home-hero-v3 .home-hero-copy h1 { font-size: clamp(40px,7vw,54px); }
    .recipe-card--featured { grid-template-columns: minmax(260px,.44fr) minmax(0,.56fr); }
    .recipe-library-grid, .my-recipes-grid-v3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .settings-layout { grid-template-columns: 1fr; }
    .meal-week-grid-v3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .auth-page { grid-template-columns: 1fr; }
    .auth-visual-panel { min-height: 280px; padding: 38px; }
    .auth-handwritten { left:auto; right:35px; bottom:30px; }
    .ingredient-editor-row-v3 { grid-template-columns: 30px 1.4fr .7fr .7fr 36px; }
    .ingredient-editor-row-v3 .ingredient-notes-input { grid-column: 2 / 5; }
}

@media (max-width: 720px) {
    .app-main { padding: 18px 13px 42px; }
    .home-page-v3 { min-height: auto; }
    .home-hero-v3 { min-height: 520px; }
    .home-hero-v3 .home-hero-photo-layer { inset: 42% 0 0; background-position: center; }
    .home-hero-v3 .home-hero-shade { background: linear-gradient(180deg,#edf1df 0%,#edf1df 39%,rgba(237,241,223,.85) 51%,rgba(237,241,223,.1) 72%); }
    .home-hero-v3 .home-hero-copy { padding: 28px 22px 260px; }
    .home-hero-v3 .home-hero-copy h1 { font-size: clamp(38px,12vw,50px); }
    .home-margin-note { display:none; }
    .home-section-title-row { align-items: start; }
    .home-section-title-row .section-handwritten-note { display:none; }
    .recipe-card--featured { grid-template-columns: 1fr; }
    .recipe-card--featured .recipe-card-visual { min-height: 235px; }
    .recipe-card-actions-featured { align-items: stretch; flex-direction: column-reverse; }
    .recipe-refresh-button { justify-content:center; }
    .recipe-card--featured .recipe-open-button-v2 { justify-content:center; }
    .editorial-page-hero { min-height: auto; padding: 26px 22px; align-items:flex-start; flex-direction:column; }
    .editorial-page-hero h1 { font-size: 38px; }
    .editorial-hero-icon { width:54px; height:54px; }
    .library-heading-row, .planner-toolbar { align-items: stretch; flex-direction: column; }
    .library-toolbar { width:100%; flex-direction:column; align-items:stretch; }
    .library-search { min-width:0; width:100%; }
    .recipe-library-grid, .my-recipes-grid-v3, .meal-week-grid-v3 { grid-template-columns:1fr; }
    .settings-form-grid, .auth-fields-grid { grid-template-columns:1fr; }
    .profile-hero-person { min-width:0; }
    .editor-section-v3 { padding:20px 17px; }
    .editor-section-heading { align-items:flex-start; }
    .editor-section-heading-action > button { width:100%; margin-left:56px; }
    .editor-grid-4 { grid-template-columns:1fr 1fr; }
    .ingredient-editor-row-v3 { grid-template-columns: 28px 1fr 36px; }
    .ingredient-editor-row-v3 input,
    .ingredient-editor-row-v3 select { grid-column:2; }
    .ingredient-editor-row-v3 .icon-danger-button { grid-column:3; grid-row:1; }
    .visibility-options-v3 { grid-template-columns:1fr; }
    .editor-submit-bar { position:static; flex-direction:column; align-items:stretch; }
    .auth-form-panel { padding:28px 21px; }
    .auth-visual-panel { min-height:240px; padding:30px 22px; }
    .auth-visual-panel h1 { font-size:42px; }
    .auth-handwritten { font-size:16px; right:22px; }
    .session-notice { top:64px; width:calc(100% - 20px); align-items:flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-photo-enter,
    .fav-button-active svg,
    .loading-dot { animation: none !important; }
    .recipe-card,
    .library-recipe-card,
    .fav-button { transition: none !important; }
}

/* ============================================================
   PRODUCT / UI IMAGES V4 — targeted polish, 2026-09-06
   Keeps the approved Mediterranean direction without redesigning
   already-stable pages.
   ============================================================ */

/* Restore the richer olive-leaf background and keep handwritten copy visible. */
.home-page-v3 { position: relative; isolation: isolate; overflow: visible; }
.home-page-v3 > section,
.home-page-v3 > .home-margin-note { position: relative; z-index: 2; }
.home-page-v3 .decorative-olive {
    z-index: 0;
    width: 270px;
    height: 210px;
    opacity: .20;
    filter: saturate(.78);
}
.home-page-v3 .decorative-olive-left {
    left: -175px;
    top: 455px;
    transform: rotate(-23deg) scale(1.28);
}
.home-page-v3 .decorative-olive-right {
    right: -175px;
    top: 720px;
    transform: rotate(157deg) scale(1.30);
}
.home-page-v3 .home-margin-note {
    left: -54px;
    top: 250px;
    width: 116px;
    color: #655f55;
    opacity: .96;
    text-shadow: 0 1px 0 rgba(255,255,255,.5);
}

/* Make “another recipe” unmistakably actionable. */
.recipe-card--featured .recipe-refresh-button {
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid rgba(55,83,43,.18);
    border-radius: 999px;
    background: linear-gradient(135deg, #eef3e5, #e1ead5);
    color: #38532e;
    box-shadow: 0 7px 18px rgba(62,80,47,.09);
    font-size: 12.5px;
    font-weight: 850;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.recipe-card--featured .recipe-refresh-button:hover:not(:disabled) {
    transform: translateY(-1px);
    color: #2f4726;
    background: #dce8d0;
    box-shadow: 0 10px 22px rgba(62,80,47,.14);
}

/* Allergy controls: readable, vertically centred, touch-friendly. */
.allergen-dropdown > summary {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    color: #514b42;
}
.allergen-dropdown > summary::after { float: none; margin-left: auto; font-size: 15px; }
.allergen-dropdown-menu {
    gap: 5px;
    padding: 10px;
    max-height: 330px;
}
.allergen-option {
    min-height: 42px;
    gap: 10px;
    padding: 9px 11px;
    font-size: 13px;
    line-height: 1.3;
}
.allergen-option input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--olive-dark); }
.selected-allergen-chip { font-size: 11px; padding: 7px 10px; }
.optional-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-left: 7px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    color: var(--text-faint);
    font-size: 10px;
    font-weight: 800;
    vertical-align: middle;
}

/* Recipe/tag interaction. */
.clickable-recipe-region,
.clickable-recipe-title { cursor: pointer; }
.clickable-recipe-title:hover { color: var(--olive-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.tag-pill-button {
    appearance: none;
    border: 0;
    font: inherit;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.tag-pill-button:hover {
    transform: translateY(-1px);
    background: #dce7cf;
    box-shadow: 0 4px 10px rgba(62,80,47,.08);
}
.library-recipe-visual.clickable-recipe-region:focus-visible,
.clickable-recipe-title:focus-visible,
.tag-pill-button:focus-visible { outline: 3px solid rgba(83,104,70,.25); outline-offset: 3px; }

/* Search pagination. */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 8px 0 4px;
}
.pagination-button {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text-soft);
    font-weight: 800;
    cursor: pointer;
}
.pagination-button-active { background: var(--olive-dark); color: white; border-color: var(--olive-dark); }
.pagination-button:disabled { opacity: .4; cursor: default; }

/* My Recipes hero button vertical centring. */
.editorial-hero-action {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Profile alignment + real avatar picker. */
.settings-layout { align-items: stretch; }
.settings-card { height: 100%; }
.settings-card-heading {
    min-height: 64px;
    align-items: flex-start;
    padding-top: 1px;
}
.settings-card-heading > div { padding-top: 1px; }
.profile-hero-avatar.profile-hero-avatar-photo,
.account-avatar-photo { overflow: hidden; padding: 0; }
.profile-hero-avatar-photo img,
.account-avatar-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-picker {
    display: grid;
    grid-template-columns: repeat(8, minmax(54px, 1fr));
    gap: 10px;
    margin-top: 9px;
}
.avatar-option {
    position: relative;
    aspect-ratio: 1;
    border: 2px solid transparent;
    border-radius: 50%;
    padding: 3px;
    background: #f5f0e7;
    cursor: pointer;
    overflow: hidden;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.avatar-option img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%; }
.avatar-option:hover { transform: translateY(-2px); }
.avatar-option-selected { border-color: var(--olive-dark); box-shadow: 0 0 0 3px rgba(83,104,70,.10); }
.password-reset-link { justify-self: start; margin-top: 2px; }

/* Category-cover picker for user recipes. */
.recipe-cover-picker {
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    gap: 11px;
    margin-top: 14px;
}
.recipe-cover-choice {
    position: relative;
    display: grid;
    gap: 7px;
    padding: 6px 6px 9px;
    border-radius: 15px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--text-soft);
    text-align: left;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.recipe-cover-choice:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.recipe-cover-choice.selected { border-color: rgba(62,91,47,.65); box-shadow: 0 0 0 3px rgba(83,104,70,.10); color: var(--olive-dark); }
.recipe-cover-choice-image {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 11px;
    background-position: center;
    background-size: cover;
}
.cover-picker-subsection { margin-top: 18px; }
.cover-picker-subsection + .cover-picker-subsection { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.cover-picker-subheading { display: grid; gap: 4px; }
.cover-picker-subheading h3 { margin: 0; font-family: Georgia, serif; font-size: 22px; line-height: 1.1; color: var(--text); }
.cover-picker-subheading-inline { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.cover-category-chip { display: inline-flex; align-items: center; min-height: 32px; padding: 6px 11px; border-radius: 999px; background: #eef2e7; color: var(--olive-dark); font-size: 11px; font-weight: 800; }
.recipe-cover-variant-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 11px; margin-top: 14px; }
.recipe-cover-variant-choice { position: relative; display: grid; gap: 6px; padding: 6px; border-radius: 15px; border: 1px solid var(--line); background: var(--surface-soft); cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.recipe-cover-variant-choice:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.recipe-cover-variant-choice.selected { border-color: rgba(62,91,47,.68); box-shadow: 0 0 0 3px rgba(83,104,70,.10); }
.recipe-cover-variant-image { width: 100%; aspect-ratio: 4/3; border-radius: 11px; background-position: center; background-size: cover; }
.cover-variant-number { justify-self: start; padding: 1px 4px; color: var(--text-soft); font-size: 10px; font-weight: 900; letter-spacing: .08em; }

.cover-choice-check {
    position: absolute;
    top: 11px;
    right: 11px;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--olive-dark);
    color: white;
    box-shadow: 0 4px 10px rgba(40,60,32,.22);
}

/* Recipe page: smaller title, balanced columns and longer visual cooking flow. */
.redesigned-recipe-page .recipe-detail-copy h1 {
    font-size: clamp(34px, 3.8vw, 50px);
    line-height: 1.0;
    max-width: 760px;
}
.redesigned-recipe-page .recipe-detail-layout {
    grid-template-columns: minmax(300px,.82fr) minmax(0,1.18fr);
    align-items: stretch;
}
.redesigned-recipe-page .recipe-ingredients-panel,
.redesigned-recipe-page .recipe-steps-panel { min-height: 100%; }
.redesigned-recipe-page .recipe-steps-panel { display: flex; flex-direction: column; }
.redesigned-recipe-page .redesigned-steps-list { flex: 1; }
.redesigned-recipe-page .step-item { min-height: 64px; align-items: center; }

/* Fridge tokens are unambiguously separate ingredients. */
.ingredient-token-input { cursor: text; }
.ingredient-token { font-size: 11.5px; padding: 8px 11px; }
.ingredient-token-input input { font-size: 14px; min-height: 34px; }

/* Forgot/reset account flows share the same visual shell. */
.password-flow-help { color: var(--text-soft); font-size: 12px; line-height: 1.55; }
.dev-reset-box { margin-top: 14px; padding: 13px; border-radius: 14px; background: #f2f5eb; border: 1px solid rgba(83,104,70,.15); }

/* More room for touch targets and responsive behaviour across the app. */
@media (max-width: 1240px) {
    .home-page-v3 .decorative-olive-left { left: -75px; }
    .home-page-v3 .decorative-olive-right { right: -75px; }
    .home-page-v3 .home-margin-note { left: 4px; top: 360px; }
    .recipe-cover-picker, .recipe-cover-variant-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
    .avatar-picker { grid-template-columns: repeat(6, minmax(54px,1fr)); }
}

@media (max-width: 920px) {
    .home-page-v3 .decorative-olive { width: 190px; height: 150px; opacity: .14; }
    .home-page-v3 .decorative-olive-left { left: -65px; top: 510px; }
    .home-page-v3 .decorative-olive-right { right: -60px; top: 900px; }
    .home-page-v3 .home-margin-note { left: 10px; top: 420px; width: 96px; font-size: 14px; }
    .recipe-cover-picker, .recipe-cover-variant-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .avatar-picker { grid-template-columns: repeat(5, minmax(54px,1fr)); }
    .redesigned-recipe-page .recipe-detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .home-page-v3 .decorative-olive { display: block; width: 135px; height: 105px; opacity: .11; }
    .home-page-v3 .decorative-olive-left { left: -52px; top: 545px; }
    .home-page-v3 .decorative-olive-right { right: -52px; top: 1010px; }
    .home-page-v3 .home-margin-note { display: none; }
    .recipe-card-actions-featured { gap: 10px; }
    .recipe-card--featured .recipe-refresh-button,
    .recipe-card--featured .recipe-open-button-v2 { width: 100%; min-height: 46px; }
    .allergen-dropdown > summary { min-height: 54px; font-size: 14px; }
    .allergen-option { min-height: 45px; font-size: 13px; }
    .recipe-cover-picker, .recipe-cover-variant-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .cover-picker-subheading-inline { align-items: start; flex-direction: column; }
    .avatar-picker { grid-template-columns: repeat(4, minmax(50px,1fr)); }
    .settings-card-heading { min-height: auto; }
    .redesigned-recipe-page .recipe-detail-copy h1 { font-size: clamp(31px, 10vw, 42px); }
    .pagination-button { min-width: 42px; height: 42px; }
    .discovery-filter-grid { grid-template-columns: 1fr !important; }
    .filter-surface, .settings-card, .editor-section-v3 { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 420px) {
    .recipe-cover-picker, .recipe-cover-variant-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .avatar-picker { grid-template-columns: repeat(4, minmax(44px,1fr)); gap: 7px; }
    .editor-grid-4 { grid-template-columns: 1fr; }
    .home-hero-v3 .home-hero-copy h1 { font-size: clamp(34px, 11vw, 44px); }
}

@media (prefers-reduced-motion: reduce) {
    .recipe-cover-choice,
    .recipe-cover-variant-choice,
    .avatar-option,
    .tag-pill-button,
    .recipe-refresh-button { transition: none !important; transform: none !important; }
}

/* Subtle botanical canvas across non-home pages too. */
.app-main { position: relative; isolation: isolate; }
.app-main::before,
.app-main::after {
    content: "";
    position: absolute;
    z-index: 0;
    width: 210px;
    height: 170px;
    background: url('/assets/decor/olive-branch.svg') center/contain no-repeat;
    opacity: .065;
    pointer-events: none;
}
.app-main::before { left: -85px; top: 300px; transform: rotate(-22deg); }
.app-main::after { right: -90px; top: 760px; transform: rotate(158deg); }
.app-main > .card-container { position: relative; z-index: 1; }
.development-reset-card {
    display: grid;
    gap: 9px;
    margin-top: 16px;
    padding: 15px;
    border: 1px solid rgba(83,104,70,.16);
    border-radius: 15px;
    background: #f1f5ea;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.5;
}
.development-reset-card strong { color: var(--olive-dark); }
.development-reset-card .secondary-button { justify-self: start; }
@media (max-width: 720px) {
    .app-main::before, .app-main::after { width: 130px; height: 105px; opacity: .045; }
    .app-main::before { left: -55px; top: 430px; }
    .app-main::after { right: -58px; top: 1080px; }
}

/* ============================================================
   PRODUCT / UI IMAGES V5 — feedback pass, 2026-09-06
   ============================================================ */

/* Shared canvas: keep the same richer Mediterranean atmosphere across all tabs. */
body {
    background:
        radial-gradient(circle at top left, rgba(236, 241, 224, .95), transparent 34%),
        radial-gradient(circle at top right, rgba(247, 239, 230, .92), transparent 28%),
        linear-gradient(180deg, #f6f3ec 0%, #fbf8f1 100%);
}
.app-root-v3 {
    background:
        radial-gradient(circle at 8% 10%, rgba(228,236,214,.78), transparent 16%),
        radial-gradient(circle at 93% 16%, rgba(244,231,220,.72), transparent 14%),
        linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.06));
}
.card-container {
    padding-bottom: 12px;
}
.filter-surface,
.settings-card,
.editor-section-v3,
.recipe-detail-hero-v2,
.editorial-empty-state,
.development-reset-card {
    background:
        linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,253,248,.98)),
        radial-gradient(circle at top right, rgba(236,242,226,.52), transparent 28%);
}
.page-hero,
.editorial-page-hero {
    background-image:
        radial-gradient(circle at 90% 14%, rgba(255,255,255,.72), transparent 24%),
        linear-gradient(135deg, rgba(237,241,227,.96) 0%, rgba(247,242,233,.98) 62%, rgba(243,231,220,.98) 100%);
}

/* Home: richer background, no unnecessary vertical air, handwritten note visible. */
.home-page-v3 {
    min-height: auto;
    padding-bottom: 8px;
}
.home-hero-v3 {
    min-height: 308px;
}
.home-hero-v3 .home-hero-copy {
    padding: 48px 54px 38px;
}
.home-page-v3 .home-margin-note {
    left: auto;
    right: 26px;
    top: 78px;
    width: 128px;
    z-index: 4;
    color: #61724d;
    transform: rotate(4deg);
}
.home-suggestion-section-v3 {
    margin-top: 14px;
}
.home-page-v3 .decorative-olive-left {
    top: 390px;
}
.home-page-v3 .decorative-olive-right {
    top: 635px;
}

/* Header nav logo next to tabs. */
.nav-logo-chip {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #f4f7ee, #e2e9d7);
    box-shadow: inset 0 0 0 1px rgba(83,104,70,.10), 0 7px 18px rgba(62,80,47,.08);
    cursor: pointer;
    padding: 0;
    margin-right: 2px;
}
.nav-logo-chip img {
    width: 21px;
    height: 21px;
}
.nav-logo-chip:hover {
    transform: translateY(-1px);
}
.site-header-v3 .nav-bar {
    align-items: center;
}

/* Discovery/editorial hero photography blocks. */
.page-hero {
    grid-template-columns: minmax(0, 1fr) minmax(210px, 255px);
    gap: 24px;
}
.page-hero-media,
.editorial-hero-media {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(83,104,70,.12);
    box-shadow: 0 14px 34px rgba(70,56,39,.09);
    align-self: stretch;
    min-height: 176px;
    background: #e8ecdf;
}
.page-hero-media img,
.editorial-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.page-hero-media::after,
.editorial-hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(34,38,27,.12));
    pointer-events: none;
}
.page-hero-media-badge {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: calc(100% - 28px);
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,252,246,.92);
    color: #425339;
    border: 1px solid rgba(83,104,70,.12);
    box-shadow: 0 8px 20px rgba(53,63,45,.08);
    font-size: 11px;
    font-weight: 800;
}
.page-hero-media-search img { object-position: center; }
.page-hero-media-fridge img { object-position: center; }

.editorial-page-hero {
    align-items: center;
}
.editorial-hero-side {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}
.editorial-hero-side-profile {
    align-items: stretch;
}
.editorial-hero-media {
    width: 190px;
    min-width: 190px;
    min-height: 132px;
}
.editorial-hero-media-profile {
    width: 178px;
    min-width: 178px;
}

/* Allergy dropdown parity with the select beside it. */
.allergen-selector-compact .allergen-dropdown > summary {
    min-height: 46px;
    padding: 11px 13px;
    font-size: 13px;
    font-weight: 700;
}
.allergen-selector-compact .selected-allergen-chip {
    font-size: 10.5px;
}

/* Modern tag pills, slightly smaller. */
.tag-pill {
    padding: 7px 11px;
    border-radius: 999px;
    background: linear-gradient(135deg, #eef3e5, #e0e9d4);
    color: #46573d;
    font-size: 10px;
    font-weight: 780;
    letter-spacing: .02em;
    box-shadow: inset 0 0 0 1px rgba(83,104,70,.10);
}
.tag-pill-button {
    box-shadow: inset 0 0 0 1px rgba(83,104,70,.10);
}
.tag-pill-button:hover {
    background: linear-gradient(135deg, #e3edd6, #d4e1c4);
    color: #35452c;
}

/* Make generic category photos clearly non-literal until real per-recipe photos exist. */
.visual-disclaimer {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,252,246,.9);
    border: 1px solid rgba(83,104,70,.12);
    color: #5f655c;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .02em;
    box-shadow: 0 8px 18px rgba(52,59,44,.08);
}
.recipe-photo-note {
    top: auto;
    bottom: 16px;
}
.recipe-detail-visual-disclaimer {
    top: 16px;
    left: 16px;
}

/* Responsive follow-through. */
@media (max-width: 1180px) {
    .page-hero { grid-template-columns: minmax(0, 1fr) 220px; }
    .editorial-hero-media { width: 170px; min-width: 170px; }
}

@media (max-width: 920px) {
    .home-page-v3 .home-margin-note {
        right: 14px;
        top: 26px;
        width: 110px;
        font-size: 15px;
    }
    .home-suggestion-section-v3 { margin-top: 12px; }
    .page-hero {
        grid-template-columns: 1fr;
    }
    .page-hero-media {
        min-height: 210px;
        max-width: 360px;
    }
    .editorial-page-hero {
        align-items: flex-start;
    }
    .editorial-hero-side {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
    }
    .editorial-hero-media {
        width: min(240px, 48vw);
        min-width: 0;
    }
}

@media (max-width: 720px) {
    .nav-logo-chip {
        display: none;
    }
    .home-page-v3 .home-margin-note {
        display: none;
    }
    .home-hero-v3 .home-hero-copy {
        padding: 28px 22px 240px;
    }
    .page-hero-media,
    .editorial-hero-media {
        width: 100%;
        max-width: none;
        min-height: 188px;
    }
    .page-hero-media-badge {
        font-size: 10px;
    }
    .editorial-hero-side {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .editorial-hero-side .editorial-hero-action {
        width: 100%;
        justify-content: center;
    }
}


/* ============================================================
   STABILIZATION BATCH 1 — targeted fixes, 2026-09-06
   ============================================================ */
.home-suggestion-heading-layout {
    display: grid;
    grid-template-columns: 106px minmax(0, 1fr);
    align-items: end;
    gap: 18px;
}
.home-page-v3 .home-suggestion-heading-layout .home-margin-note {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    width: 106px;
    margin: 0 0 2px;
    align-self: end;
    color: #61724d;
    font-size: 15px;
    line-height: 1.08;
    text-align: left;
    transform: rotate(-5deg);
    text-shadow: 0 1px 0 rgba(255,255,255,.55);
}
.home-page-v3 .home-suggestion-heading-layout .home-margin-note span {
    display: inline-block;
    margin-left: 2px;
}

.filter-section-heading-inline {
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
}
.filter-section-heading-inline .optional-badge {
    margin-left: 0;
}

@media (max-width: 920px) {
    .home-suggestion-heading-layout {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 12px;
    }
    .home-page-v3 .home-suggestion-heading-layout .home-margin-note {
        display: block;
        width: 88px;
        font-size: 13px;
    }
}

@media (max-width: 720px) {
    .home-suggestion-heading-layout {
        grid-template-columns: 1fr;
    }
    .home-page-v3 .home-suggestion-heading-layout .home-margin-note {
        display: none;
    }
}

/* Product polish phase: search, fridge, editor, planner and moderation */
.active-filter-bar {
    margin: 18px 0 8px;
    padding: 14px 16px;
    border: 1px solid rgba(36, 69, 51, .13);
    border-radius: 18px;
    background: rgba(255,255,255,.72);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.active-filter-label { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .62; }
.active-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.active-filter-chip {
    border: 1px solid rgba(54, 91, 67, .18);
    background: #f4f7f2;
    color: inherit;
    border-radius: 999px;
    padding: 7px 10px;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.active-filter-chip span { margin-left: 5px; opacity: .58; }
.filter-clear-link { border: 0; background: transparent; color: #6e443a; text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; }
.results-heading-with-sort { align-items: end; gap: 20px; }
.results-sort { display: grid; gap: 6px; min-width: 190px; font-size: 12px; font-weight: 700; }

.ingredient-autocomplete-field { position: relative; }
.ingredient-suggestions {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% - 8px);
    max-height: 280px;
    overflow: auto;
    background: #fff;
    border: 1px solid rgba(45, 72, 55, .17);
    border-radius: 15px;
    box-shadow: 0 18px 45px rgba(42, 52, 45, .15);
    padding: 6px;
}
.ingredient-suggestions button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
}
.ingredient-suggestions button:hover { background: #f2f6f0; }

.field-error { display: block; margin-top: 6px; color: #9b3f35; font-size: 13px; font-weight: 650; }
.editor-row-order-actions { display: flex; align-items: center; gap: 5px; }
.mini-order-button { min-width: 31px; width: 31px; height: 31px; padding: 0; border-radius: 9px; }
.structured-steps-editor { display: grid; gap: 10px; }
.structured-step-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(48, 78, 59, .12);
    border-radius: 16px;
    background: rgba(249,250,247,.76);
}
.structured-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e9efe6;
    font-weight: 800;
    font-size: 12px;
}
.structured-step-row .form-textarea { min-height: 76px; resize: vertical; }
.editor-preview-actions { margin-top: 14px; display: flex; justify-content: flex-end; }
.recipe-editor-preview { margin-top: 14px; padding: 20px; border-radius: 18px; background: #f6f4ed; border: 1px solid rgba(80, 70, 50, .1); }
.recipe-editor-preview h3 { margin: 4px 0 6px; font-size: 24px; }
.recipe-editor-preview > p { margin-top: 0; opacity: .72; }
.recipe-editor-preview-columns { display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; margin-top: 16px; }
.recipe-editor-preview-columns ul, .recipe-editor-preview-columns ol { margin: 8px 0 0; padding-left: 20px; }
.editor-review-feedback { display: grid; gap: 5px; margin-bottom: 16px; }
.editor-review-feedback small, .review-feedback small { display: block; margin-top: 5px; opacity: .75; }
.resubmit-button { border-color: rgba(160, 100, 45, .35); background: #fff8ea; }

.planner-summary-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 10px;
    align-items: stretch;
    margin: 14px 0 20px;
}
.planner-summary-card { padding: 13px 15px; border-radius: 15px; background: #f4f6f1; border: 1px solid rgba(45, 72, 55, .1); display: grid; gap: 2px; }
.planner-summary-card strong { font-size: 22px; }
.planner-summary-card span { font-size: 12px; opacity: .68; }
.planner-bulk-actions { display: flex; align-items: center; gap: 10px; padding-left: 8px; }

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(22, 28, 24, .54);
    display: grid;
    place-items: center;
    padding: 20px;
}
.moderation-dialog {
    width: min(620px, 100%);
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(0,0,0,.24);
    padding: 24px;
}
.moderation-dialog h2 { margin: 5px 0 8px; }
.moderation-dialog > p { margin-top: 0; opacity: .72; line-height: 1.55; }
.moderation-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

@media (max-width: 920px) {
    .planner-summary-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .planner-bulk-actions { grid-column: 1 / -1; padding-left: 0; }
    .recipe-editor-preview-columns { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .results-heading-with-sort { align-items: stretch; flex-direction: column; }
    .results-sort { min-width: 0; width: 100%; }
    .active-filter-bar { align-items: flex-start; }
    .structured-step-row { grid-template-columns: 36px minmax(0, 1fr); }
    .structured-step-row .editor-row-order-actions { grid-column: 2; justify-content: flex-end; }
    .planner-summary-row { grid-template-columns: 1fr; }
    .planner-bulk-actions { grid-column: auto; flex-direction: column; align-items: stretch; }
    .moderation-dialog-actions { flex-direction: column-reverse; }
}

/* Public beta / legal */
.brand-beta-badge {
    display: inline-flex;
    align-items: center;
    margin-left: .35rem;
    padding: .08rem .38rem;
    border-radius: 999px;
    border: 1px solid rgba(115, 132, 83, .35);
    background: rgba(237, 243, 226, .85);
    color: #65754a;
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    vertical-align: middle;
}
.footer-beta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    flex-wrap: wrap;
    margin-top: .7rem;
    color: #86745f;
    font-size: .76rem;
}
.footer-link-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: #627447;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    font: inherit;
}
.legal-page {
    width: min(900px, 100%);
    display: grid;
    gap: 1rem;
    padding: .5rem 0 2rem;
}
.legal-hero,
.legal-card {
    background: #fffaf2;
    border: 1px solid rgba(141,119,92,.18);
    border-radius: 20px;
    padding: clamp(1.2rem, 3vw, 2rem);
}
.legal-hero h1 { margin: .35rem 0 .65rem; }
.legal-hero p, .legal-card p, .legal-card li { color: #655441; line-height: 1.65; }
.legal-card h2 { margin-top: 0; }
.legal-card ul { margin-bottom: 0; }
.legal-safety-card { background: #f6f3e9; border-color: rgba(138,108,57,.25); }
.legal-actions { display: flex; justify-content: flex-start; }
.registration-privacy-note {
    margin: .15rem 0 .25rem;
    color: #74634f;
    font-size: .78rem;
    line-height: 1.5;
}
.registration-privacy-note .text-link-button { font-size: inherit; }
