:root {
    --bg: #fbf5ee;
    --bg-strong: #f3e3cf;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-strong: #fffdf9;
    --line: rgba(83, 56, 31, 0.12);
    --text: #3b2618;
    --muted: #765b48;
    --accent: #a6512b;
    --accent-deep: #7d3918;
    --accent-soft: #e8b07a;
    --success: #296145;
    --warning: #9d6a00;
    --danger: #8d3030;
    --shadow: 0 24px 60px rgba(108, 70, 33, 0.12);
    --radius: 28px;
    --radius-sm: 18px;
    --container: min(1120px, calc(100vw - 2rem));
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 210, 170, 0.5), transparent 30%),
        radial-gradient(circle at top right, rgba(255, 243, 220, 0.8), transparent 35%),
        linear-gradient(180deg, #fffaf4 0%, #fbf5ee 52%, #f7eee3 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
textarea {
    font: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: var(--container);
    margin: 0 auto;
}

.narrow-container {
    max-width: 720px;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(14px);
    background: rgba(251, 245, 238, 0.84);
    border-bottom: 1px solid var(--line);
}

.site-header__inner,
.site-footer__inner,
.section-heading,
.admin-toolbar,
.admin-card__head,
.admin-card__footer,
.recipe-card__meta,
.button-group,
.checkbox-group,
.hero__stats,
.admin-toolbar__actions {
    display: flex;
    gap: 1rem;
}

.site-header__inner,
.site-footer__inner {
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
}

.brand__mark {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, var(--accent), #d5844b);
    box-shadow: 0 12px 24px rgba(166, 81, 43, 0.22);
}

.brand strong,
.hero h1,
.section-heading h2,
.content-card h2,
.content-card h1,
.auth-card h1,
.admin-toolbar h1,
.recipe-card h3,
.hero-card h2,
.hero-card h3 {
    font-family: "Fraunces", serif;
}

.brand small {
    display: block;
    color: var(--muted);
    margin-top: 0.2rem;
}

.site-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--muted);
}

.site-nav a:hover,
.text-link:hover,
.back-link:hover {
    color: var(--accent);
}

.nav-chip,
.pill,
.eyebrow {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
}

.nav-chip,
.pill {
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.75);
    font-size: 0.92rem;
}

.pill--accent {
    background: rgba(166, 81, 43, 0.1);
    color: var(--accent-deep);
}

.eyebrow {
    padding: 0.35rem 0.8rem;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-deep);
    background: rgba(255, 255, 255, 0.8);
}

.hero,
.recipe-section,
.recipe-hero,
.recipe-content,
.admin-shell {
    padding: 3rem 0 4rem;
}

.hero__grid,
.recipe-hero__grid,
.recipe-content__grid,
.editor-grid {
    display: grid;
    gap: 1.5rem;
}

.hero__grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: stretch;
}

.hero__copy,
.hero__showcase,
.auth-card,
.content-card,
.admin-card,
.hero-card {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hero__copy,
.auth-card,
.content-card {
    padding: 2rem;
}

.hero__copy h1,
.recipe-hero__copy h1,
.auth-card h1,
.admin-toolbar h1 {
    margin: 0.7rem 0 1rem;
    font-size: clamp(2.2rem, 6vw, 4.4rem);
    line-height: 0.96;
}

.hero__copy p,
.recipe-hero__copy p,
.auth-card p,
.site-footer p,
.recipe-card p,
.hero-card p,
.admin-card p,
.empty-state p,
.content-card p {
    color: var(--muted);
    line-height: 1.7;
}

.hero__showcase {
    padding: 1rem;
    display: grid;
    gap: 1rem;
    background:
        linear-gradient(180deg, rgba(166, 81, 43, 0.08), rgba(255, 255, 255, 0.9)),
        var(--surface);
}

.hero-card {
    padding: 1.3rem;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.hero-card:hover,
.recipe-card:hover,
.admin-card:hover {
    transform: translateY(-4px);
}

.hero-card--intro {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(250, 222, 190, 0.9));
}

.hero-card__tag {
    color: var(--accent-deep);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero-card__cta,
.text-link {
    color: var(--accent);
    font-weight: 700;
}

.search-panel,
.admin-search {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.search-panel {
    margin-top: 1.6rem;
}

.search-panel__field {
    flex: 1;
}

.search-panel input,
.field input,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    padding: 0.95rem 1rem;
}

.field textarea {
    min-height: 3.5rem;
    resize: vertical;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    padding: 0.95rem 1.25rem;
    font-weight: 700;
    transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button--primary {
    color: white;
    background: linear-gradient(135deg, var(--accent), #d27b48);
}

.button--ghost {
    color: var(--accent-deep);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--line);
}

.button--subtle {
    background: rgba(59, 38, 24, 0.08);
    color: var(--text);
}

.button--block {
    width: 100%;
}

.hero__stats {
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.hero__stats > div {
    min-width: 10rem;
    padding: 1rem 1.1rem;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.hero__stats strong {
    display: block;
    font-size: 1.35rem;
    margin-bottom: 0.2rem;
}

.section-heading {
    align-items: end;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-heading--compact {
    margin-bottom: 1rem;
}

.section-heading h2,
.content-card h2,
.hero-card h2,
.hero-card h3,
.recipe-card h3,
.admin-card h2 {
    margin: 0.4rem 0 0;
    font-size: clamp(1.5rem, 3.8vw, 2.2rem);
}

.recipe-grid,
.admin-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recipe-card,
.admin-card {
    overflow: hidden;
}

.recipe-card__media {
    display: block;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #f0d8bd, #fff6ea);
}

.recipe-card__media img,
.recipe-hero__media img,
.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-card__placeholder,
.recipe-hero__placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at top left, rgba(166, 81, 43, 0.28), transparent 36%),
        linear-gradient(135deg, #f6dcc0, #fff8ef);
}

.recipe-card__placeholder span,
.recipe-hero__placeholder span {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--accent-deep);
    background: rgba(255, 255, 255, 0.82);
    font-family: "Fraunces", serif;
    font-size: 1.8rem;
}

.recipe-card__body {
    padding: 1.35rem;
}

.recipe-hero__grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: center;
}

.recipe-hero__copy {
    padding-right: 1rem;
}

.recipe-hero__media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow);
}

.recipe-content__grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.ingredient-list,
.preparation-flow {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ingredient-list li,
.preparation-flow p {
    padding: 0.9rem 0;
    margin: 0;
    border-bottom: 1px solid var(--line);
}

.preparation-flow h3 {
    margin: 1.2rem 0 0.3rem;
    font-size: 1.05rem;
    color: var(--accent-deep);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.flash-stack {
    padding-top: 1.2rem;
}

.flash {
    margin-bottom: 0.7rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
}

.flash--success {
    color: var(--success);
}

.flash--warning {
    color: var(--warning);
}

.flash--error {
    color: var(--danger);
}

.flash--info {
    color: var(--muted);
}

.admin-toolbar,
.admin-card__footer,
.admin-card__head {
    justify-content: space-between;
    align-items: center;
}

.admin-toolbar {
    align-items: end;
    margin-bottom: 1.5rem;
}

.admin-toolbar__actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-search {
    margin-bottom: 1.5rem;
}

.admin-card {
    padding: 1.35rem;
}

.admin-card__head {
    align-items: start;
}

.editor-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    align-items: start;
}

.field-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field,
.stack-form {
    display: grid;
    gap: 0.45rem;
}

.stack-form {
    margin-top: 1.5rem;
}

.field span {
    font-weight: 700;
}

.field-error {
    color: var(--danger);
}

.editor-side {
    position: sticky;
    top: 6rem;
}

.upload-panel {
    display: grid;
    gap: 0.3rem;
    padding: 1rem;
    border: 1px dashed rgba(166, 81, 43, 0.4);
    border-radius: 22px;
    background: rgba(245, 234, 220, 0.5);
    cursor: pointer;
}

.upload-panel input {
    display: none;
}

.image-preview {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.7);
    margin: 1rem 0;
}

.checkbox,
.checkbox-group {
    align-items: center;
}

.checkbox {
    display: flex;
    gap: 0.65rem;
}

.checkbox input {
    width: 1.1rem;
    height: 1.1rem;
}

.empty-state {
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px dashed rgba(166, 81, 43, 0.3);
    background: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.back-link {
    display: inline-flex;
    margin-bottom: 1rem;
    color: var(--muted);
}

.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.55);
}

@media (max-width: 960px) {
    .hero__grid,
    .recipe-hero__grid,
    .recipe-content__grid,
    .editor-grid,
    .recipe-grid,
    .admin-grid,
    .field-grid {
        grid-template-columns: 1fr;
    }

    .site-header__inner,
    .site-footer__inner,
    .site-nav,
    .search-panel,
    .admin-search,
    .admin-toolbar,
    .admin-toolbar__actions,
    .button-group,
    .checkbox-group {
        flex-direction: column;
        align-items: stretch;
    }

    .site-header {
        position: static;
    }

    .recipe-hero__copy {
        padding-right: 0;
    }

    .editor-side {
        position: static;
    }
}

@media (max-width: 640px) {
    .hero,
    .recipe-section,
    .recipe-hero,
    .recipe-content,
    .admin-shell {
        padding: 2rem 0 3rem;
    }

    .hero__copy,
    .auth-card,
    .content-card {
        padding: 1.35rem;
    }

    .site-header__inner,
    .site-footer__inner {
        padding: 0.85rem 0;
    }
}
