:root {
    --green-950: #113c2f;
    --green-800: #1f5f47;
    --green-700: #2f7a5a;
    --green-600: #2e8b57;
    --green-500: #3ea36a;
    --green-200: #d6ecdf;
    --green-100: #eef8f1;
    --green-050: #f7fcf8;
    --sand-100: #f6f1e8;
    --ink-900: #1f2a24;
    --ink-700: #415148;
    --ink-500: #6c7c72;
    --ink-300: #bcc7bf;
    --white: #ffffff;
    --shadow-sm: 0 14px 35px rgba(17, 60, 47, 0.08);
    --shadow-md: 0 22px 45px rgba(17, 60, 47, 0.14);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'DM Sans', sans-serif;
    color: var(--ink-900);
    background:
        radial-gradient(circle at top right, rgba(62, 163, 106, 0.18), transparent 26%),
        linear-gradient(180deg, #fbfdfb 0%, #f3f8f3 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

code {
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: rgba(17, 60, 47, 0.08);
    font-size: 0.92rem;
}

.site-main {
    min-height: calc(100vh - 5rem);
}

.container {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(31, 95, 71, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1rem 0;
}

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 1rem;
    background: linear-gradient(145deg, #f4fff6, #c6e7cf);
    color: var(--green-900, #123c2f);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    color: var(--white);
}

.brand-copy strong {
    font-size: 1.05rem;
}

.brand-copy small {
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.83rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.82);
    transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
}

.shopping-link {
    position: relative;
}

.shopping-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    height: 1.6rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--white);
    color: var(--green-700);
    font-size: 0.8rem;
    font-weight: 700;
}

.shopping-count.is-empty {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.74);
}

.hero-section,
.page-hero,
.content-section,
.cta-section,
.notice-section {
    padding: 4.5rem 0;
}

.hero-grid,
.page-hero-shell,
.meal-detail-grid,
.library-grid,
.shopping-grid,
.import-grid,
.cta-shell {
    display: grid;
    gap: 2rem;
}

.hero-grid,
.page-hero-shell,
.meal-detail-grid,
.cta-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
}

.hero-copy h1,
.page-hero h1,
.cta-shell h2,
.section-heading h2,
.meal-detail-sidebar h2,
.detail-block h2 {
    margin: 0;
    font-family: 'Fraunces', serif;
    line-height: 1.04;
}

.hero-copy h1 {
    font-size: clamp(2.8rem, 4vw, 4.7rem);
    margin-top: 0.6rem;
}

.page-hero h1,
.cta-shell h2,
.section-heading h2 {
    font-size: clamp(2rem, 3.2vw, 3.1rem);
}

.hero-copy p,
.page-hero p,
.section-heading p,
.cta-shell p,
.feature-card p,
.benefit-card p,
.audience-card p,
.meal-card p,
.sidebar-card p,
.detail-block p,
.empty-card p {
    margin: 0;
    color: var(--ink-700);
    line-height: 1.7;
}

.hero-copy p {
    margin-top: 1.25rem;
    font-size: 1.08rem;
}

.page-hero {
    padding-top: 3.4rem;
    padding-bottom: 2rem;
}

.page-hero-shell {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(31, 95, 71, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.hero-actions,
.card-actions,
.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.hero-actions {
    margin-top: 1.6rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.78rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

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

.button-primary {
    background: linear-gradient(135deg, var(--green-600), var(--green-700));
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.72);
    color: var(--green-800);
    border-color: rgba(31, 95, 71, 0.18);
}

.button-tertiary {
    background: rgba(46, 139, 87, 0.08);
    color: var(--green-800);
}

.button-light {
    background: var(--white);
    color: var(--green-700);
}

.button-outline-light {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.45);
    color: var(--white);
}

.text-link {
    color: var(--green-700);
    font-weight: 700;
}

.eyebrow,
.feature-chip,
.small-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.83rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow,
.feature-chip {
    color: var(--green-700);
}

.section-heading {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 2rem;
}

.section-heading.centered {
    text-align: center;
    max-width: 48rem;
    margin-inline: auto;
    margin-bottom: 2.6rem;
}

.section-heading.light h2,
.section-heading.light p,
.section-heading.light .eyebrow {
    color: var(--white);
}

.hero-card,
.feature-card,
.benefit-card,
.audience-card,
.meal-card,
.sidebar-card,
.detail-block,
.filter-panel,
.empty-card,
.notice-card {
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(31, 95, 71, 0.08);
    box-shadow: var(--shadow-sm);
}

.hero-card {
    overflow: hidden;
}

.hero-card img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.hero-card-panel {
    padding: 1.4rem;
    display: grid;
    gap: 0.45rem;
}

.hero-card-panel strong {
    font-size: 1.1rem;
}

.hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.95rem;
    margin-top: 1.8rem;
}

.hero-metrics div {
    min-width: 9rem;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(31, 95, 71, 0.08);
}

.hero-metrics dt {
    color: var(--ink-500);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-metrics dd {
    margin: 0.4rem 0 0;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--green-800);
}

.feature-grid,
.benefit-grid,
.audience-grid,
.meal-card-grid {
    display: grid;
    gap: 1.4rem;
}

.feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.benefit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.audience-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meal-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.meal-card-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card,
.benefit-card,
.audience-card,
.meal-card,
.sidebar-card,
.detail-block,
.filter-panel,
.empty-card,
.notice-card {
    padding: 1.45rem;
}

.feature-card h3,
.benefit-card h3,
.audience-card h3,
.meal-card h3,
.sidebar-card h3,
.empty-card h3 {
    margin: 0.5rem 0 0.7rem;
}

.meal-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.meal-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: linear-gradient(145deg, var(--green-100), var(--sand-100));
}

.meal-card-body {
    display: grid;
    gap: 0.95rem;
    padding: 1.35rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: rgba(46, 139, 87, 0.12);
    color: var(--green-800);
    font-size: 0.85rem;
    font-weight: 700;
}

.tag-chip.light {
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
}

.meal-meta,
.stacked-meta,
.footer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.meal-meta span,
.small-label {
    color: var(--ink-500);
}

.section-soft {
    background: linear-gradient(180deg, rgba(239, 248, 241, 0.82), rgba(247, 252, 248, 0.82));
}

.section-dark,
.cta-section {
    background: linear-gradient(135deg, var(--green-950), var(--green-800));
    color: var(--white);
}

.section-dark .meal-card,
.section-dark .empty-card {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

.section-dark .meal-card p,
.section-dark .empty-card p,
.cta-section p {
    color: rgba(255, 255, 255, 0.78);
}

.cta-shell {
    align-items: center;
}

.library-grid {
    grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
    align-items: start;
}

.filter-panel {
    position: sticky;
    top: 6.4rem;
    display: grid;
    gap: 1.4rem;
}

.filter-form,
.upload-form {
    display: grid;
    gap: 1rem;
}

.field-group {
    display: grid;
    gap: 0.55rem;
}

.field-group span,
.field-group legend {
    font-weight: 700;
    color: var(--ink-900);
}

.field-group input,
.field-group select {
    width: 100%;
    min-height: 3rem;
    padding: 0.78rem 1rem;
    border: 1px solid rgba(31, 95, 71, 0.16);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink-900);
}

.checkbox-list {
    display: grid;
    gap: 0.65rem;
}

.checkbox-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-radius: 1rem;
    background: var(--green-050);
}

.checkbox-row input {
    width: 1rem;
    height: 1rem;
    margin: 0;
}

.checkbox-row small {
    color: var(--ink-500);
}

.meal-detail-grid {
    align-items: start;
}

.meal-detail-main,
.meal-detail-sidebar {
    display: grid;
    gap: 1.4rem;
}

.detail-image-shell {
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.detail-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: linear-gradient(145deg, var(--green-100), var(--sand-100));
}

.detail-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.ingredient-list,
.instruction-list,
.plain-list {
    margin: 0;
    padding-left: 1.35rem;
    display: grid;
    gap: 0.85rem;
}

.instruction-list.compact {
    gap: 0.6rem;
}

.ingredient-list li,
.instruction-list li,
.plain-list li {
    color: var(--ink-700);
    line-height: 1.6;
}

.ingredient-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
}

.stacked-meta {
    display: grid;
}

.stacked-meta div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(31, 95, 71, 0.1);
}

.stacked-meta div:last-child {
    border-bottom: 0;
}

.stacked-meta dt {
    color: var(--ink-500);
    font-weight: 500;
}

.stacked-meta dd {
    margin: 0;
    font-weight: 700;
    color: var(--green-800);
}

.shopping-grid,
.import-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.selected-meal-list,
.aggregated-list {
    display: grid;
    gap: 1rem;
}

.selected-meal-card,
.aggregated-item {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--green-050);
}

.selected-meal-card {
    grid-template-columns: 88px minmax(0, 1fr) auto;
    align-items: center;
}

.selected-meal-thumb {
    width: 88px;
    height: 72px;
    border-radius: 1rem;
    object-fit: cover;
    background: linear-gradient(145deg, var(--green-100), var(--sand-100));
}

.selected-meal-card h3,
.aggregated-item strong {
    margin: 0;
}

.quantity-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.quantity-button {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    border: 1px solid rgba(31, 95, 71, 0.14);
    background: var(--white);
    color: var(--green-800);
    font-weight: 800;
}

.quantity-value {
    min-width: 1.4rem;
    text-align: center;
    font-weight: 700;
}

.aggregated-item {
    grid-template-columns: 1fr auto;
    align-items: start;
}

.empty-card {
    display: grid;
    gap: 0.85rem;
    justify-items: start;
}

.empty-card.tall {
    min-height: 20rem;
    align-content: center;
}

.notice-card {
    margin-bottom: 1.25rem;
}

.notice-warning {
    background: #fff7eb;
    border-color: #f5d7a9;
    color: #7a5523;
}

.notice-success {
    background: #eef9f0;
    border-color: #cde7d4;
    color: #215135;
}

.site-footer {
    padding: 3rem 0 2rem;
    background: rgba(17, 60, 47, 0.98);
    color: rgba(255, 255, 255, 0.88);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 2rem;
}

.site-footer h3,
.site-footer h4 {
    margin-top: 0;
    color: var(--white);
}

.site-footer p,
.site-footer li {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.65;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.55rem;
}

.footer-meta {
    justify-content: space-between;
    padding-top: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 1024px) {
    .hero-grid,
    .page-hero-shell,
    .library-grid,
    .meal-detail-grid,
    .shopping-grid,
    .import-grid,
    .cta-shell,
    .feature-grid,
    .benefit-grid,
    .audience-grid,
    .meal-card-grid,
    .meal-card-grid.compact,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        position: static;
    }

    .selected-meal-card {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .quantity-controls {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .nav-shell,
    .site-nav,
    .hero-actions,
    .card-actions,
    .detail-block-header,
    .footer-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-copy h1 {
        font-size: 2.5rem;
    }

    .page-hero h1,
    .cta-shell h2,
    .section-heading h2 {
        font-size: 2rem;
    }

    .selected-meal-card,
    .aggregated-item {
        grid-template-columns: 1fr;
    }
}

@media print {
    .site-header,
    .site-footer,
    .page-hero,
    .filter-panel,
    .button,
    #clear-shopping-list,
    #print-shopping-list {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .detail-block,
    .aggregated-item,
    .selected-meal-card {
        border: 1px solid #d9e1db;
        box-shadow: none;
        background: #fff;
    }
}

