:root {
    --bg-cream: #fff9f1;
    --bg-soft: #ffe8d2;
    --ink: #13231d;
    --muted: #496258;
    --card: rgba(255, 255, 255, 0.72);
    --line: rgba(28, 51, 44, 0.14);
    --accent: #d85f31;
    --accent-2: #f2a13d;
    --danger: #a43228;
    --shadow-soft: 0 20px 35px rgba(17, 30, 25, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: radial-gradient(circle at 0% 0%, #fff4e4 0%, var(--bg-cream) 45%, #f9f4ec 100%);
    font-family: "Manrope", sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

body.dialog-open {
    overflow: hidden;
}

.ambient {
    position: fixed;
    filter: blur(80px);
    border-radius: 1000px;
    z-index: -1;
    opacity: 0.45;
}

.ambient-a {
    width: 400px;
    height: 400px;
    background: #ffbb7d;
    top: -120px;
    right: -80px;
}

.ambient-b {
    width: 360px;
    height: 360px;
    background: #ffcdb7;
    bottom: -120px;
    left: -60px;
}

.site-shell {
    width: min(1120px, 92vw);
    margin: 0 auto;
}

.brand,
.hero-title,
.section-title,
.metric {
    font-family: "Fraunces", serif;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: var(--ink);
    text-decoration: none;
    max-width: 50%;
}

.brand img {
    max-height: 4rem;
}

.frost-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--line);
    background: var(--card);
    backdrop-filter: blur(14px);
    border-radius: 20px;
    padding: 0.8rem 1rem;
}

.nav-actions-shell {
    display: block;
}

.nav-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-actions a,
.nav-actions button {
    border: 0;
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.94rem;
    padding: 0.45rem 0.76rem;
    border-radius: 999px;
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.nav-link.is-active {
    background: rgba(216, 95, 49, 0.16);
    color: #6f3818;
    border: 1px solid rgba(216, 95, 49, 0.35);
}

.nav-icon-only {
    width: 2.1rem;
    height: 2.1rem;
    justify-content: center;
    padding: 0;
    border-radius: 999px;
}

.mobile-menu-toggle {
    display: none;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.8);
    color: var(--ink);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.mobile-header-actions {
    display: none;
}

.mobile-header-logout-form {
    display: none;
}

.mobile-header-logout {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.8);
    color: var(--ink);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.mobile-nav-overlay {
    display: none;
}

.nav-actions a:hover,
.nav-actions button:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 0 0 1px rgba(19, 35, 29, 0.12);
}

.with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.with-icon-title {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.with-icon i,
.with-icon-title i,
.hero-title i,
.eyebrow i {
    opacity: 0.85;
}

.panel {
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-soft);
}

.card-stat {
    border-top: 3px solid rgba(216, 95, 49, 0.45);
    background: linear-gradient(180deg, rgba(255, 245, 235, 0.9), rgba(255, 255, 255, 0.7));
}

.card-action {
    background: linear-gradient(160deg, rgba(255, 252, 248, 0.95), rgba(255, 240, 221, 0.75));
}

.card-section {
    background: rgba(255, 255, 255, 0.76);
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.74rem;
    color: var(--muted);
    font-weight: 700;
}

.hero-title {
    margin: 0.35rem 0 0;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.05;
}

.section-title {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.2;
}

.metric {
    margin-top: 0.4rem;
    font-size: 2.3rem;
    line-height: 1;
}

.metric.small {
    font-size: 1.15rem;
    line-height: 1.35;
    font-family: "Manrope", sans-serif;
    font-weight: 700;
}

.panel-kicker {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

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

.field-label {
    display: block;
    font-size: 0.92rem;
    color: var(--muted);
    font-weight: 600;
}

.field {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.86);
    border-radius: 12px;
    padding: 0.72rem 0.8rem;
    color: var(--ink);
    outline: none;
}

.field:focus {
    border-color: rgba(216, 95, 49, 0.5);
    box-shadow: 0 0 0 3px rgba(216, 95, 49, 0.12);
}

.btn-primary,
.btn-secondary,
.btn-danger {
    border: 0;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.62rem 1rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(120deg, var(--accent) 0%, #e88f44 100%);
}

.btn-secondary {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--line);
}

.btn-danger {
    color: #fff;
    background: var(--danger);
}

.alert {
    border: 1px solid rgba(164, 50, 40, 0.4);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    color: #7f2a23;
    background: rgba(164, 50, 40, 0.08);
}

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

.hover-lift {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 35px rgba(17, 30, 25, 0.12);
}

.chip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.75);
}

.shopping-list-grid {
    display: grid;
    gap: 0.7rem;
}

.shopping-item {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.84);
    padding: 0.7rem 0.8rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.7rem;
    align-items: flex-start;
    cursor: pointer;
}

.shopping-item.is-completed {
    opacity: 0.78;
    background: rgba(244, 248, 245, 0.92);
}

.shopping-item.is-completed .shopping-item-head p span {
    text-decoration: line-through;
}

.shopping-item-check {
    margin-top: 0.12rem;
    display: inline-flex;
    cursor: pointer;
}

.shopping-item-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.shopping-check-indicator {
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 999px;
    border: 1px solid rgba(44, 82, 62, 0.35);
    background: #fff;
    color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all 0.15s ease;
    cursor: pointer;
}

.shopping-item-check input:checked + .shopping-check-indicator {
    border-color: rgba(75, 156, 89, 0.65);
    background: rgba(75, 156, 89, 0.2);
    color: #1c5f29;
}

.shopping-item-main {
    min-width: 0;
}

.shopping-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.badge.shopping-qty {
    white-space: nowrap;
    color: #eef1f4;
    background: rgba(35, 40, 47, 0.95);
    border: 1px solid rgba(17, 20, 26, 0.9);
}

.shopping-recipe-inline {
    display: none;
    gap: 0.45rem;
    flex-wrap: wrap;
}

#shopping-root.shopping-recipes-visible .shopping-recipe-inline {
    display: flex;
}

.shopping-recipe-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    color: inherit;
    font-size: 0.78rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.86);
    border-radius: 999px;
    padding: 0.15rem 0.42rem 0.15rem 0.15rem;
    max-width: 240px;
}

.shopping-recipe-chip img {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    object-fit: cover;
    background: #f5eadc;
}

.shopping-recipe-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.25rem 0.62rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #7a3a12;
    background: rgba(242, 161, 61, 0.2);
}

.proposal-card {
    display: flex;
    gap: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.78);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.proposal-card:hover {
    transform: translateY(-2px);
    border-color: rgba(216, 95, 49, 0.45);
}

.proposal-card input {
    margin-top: 0.3rem;
}

.week-nav {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
}

.week-nav-center {
    text-align: center;
}

.week-nav-arrow {
    height: 2.4rem;
    padding: 0 0.72rem;
    border-radius: 999px;
    gap: 0.42rem;
}

.week-nav-label {
    display: inline;
}

.selection-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
}

.weekly-pick-list {
    display: grid;
    gap: 0.75rem;
}

.weekly-pick-card {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    text-align: left;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: stretch;
    min-height: 108px;
}

.weekly-pick-card:hover {
    transform: translateY(-2px);
    border-color: rgba(216, 95, 49, 0.4);
}

.weekly-pick-card.is-selected {
    border-color: rgba(75, 156, 89, 0.6);
    box-shadow: 0 12px 20px rgba(28, 71, 37, 0.12);
}

.weekly-pick-check {
    position: absolute;
    right: 0.55rem;
    top: 0.55rem;
    font-size: 1.1rem;
    color: rgba(76, 85, 80, 0.55);
}

.weekly-pick-card.is-selected .weekly-pick-check {
    color: #2f7d3d;
}

.weekly-pick-downvote {
    position: absolute;
    bottom: 7px;
    right: 7px;
    width: 2rem;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 1px solid rgba(163, 50, 40, 0.3);
    background: rgba(255, 255, 255, 0.88);
    color: #ba0e0e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    margin-top: auto;
    align-self: flex-end;
}

.weekly-pick-downvote:hover {
    background: rgba(255, 236, 233, 0.95);
    box-shadow: 0 8px 16px rgba(140, 52, 42, 0.16);
    transform: translateY(-1px);
}

.weekly-pick-downvote.is-busy {
    opacity: 0.6;
    pointer-events: none;
}

.weekly-pick-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f5eadc;
    display: block;
}

.weekly-pick-body {
    padding: 0.7rem 0.85rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.weekly-picked-list {
    display: grid;
    gap: 0.75rem;
}

.weekly-picked-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.8);
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: stretch;
    min-height: 108px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.weekly-picked-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(20, 39, 31, 0.1);
}

.weekly-picked-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #f5eadc;
}

.weekly-picked-body {
    padding: 0.7rem 0.85rem 0.8rem;
}

.weekly-final-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.85rem;
}

.weekly-final-card {
    display: block;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.weekly-final-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(20, 39, 31, 0.1);
}

.weekly-final-photo {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.weekly-final-body {
    padding: 0.75rem 0.85rem 0.9rem;
}

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

.weekly-flagged-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.7rem 0.8rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
}

.weekly-flagged-main {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.weekly-flagged-card a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    min-width: 0;
}

.weekly-flagged-card a span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weekly-flagged-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.status-badge-done {
    background: rgba(75, 156, 89, 0.22);
    color: #205e2a;
}

.status-badge-pending {
    background: rgba(215, 114, 35, 0.2);
    color: #8a4512;
}

.recipes-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.recipes-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.quick-filters {
    display: grid;
    gap: 0.9rem;
}

.filters-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.filter-groups {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    flex: 1 1 520px;
    min-width: 0;
}

.filter-group {
    display: grid;
    gap: 0.34rem;
    min-width: 0;
}

.filter-group-tags {
    flex: 0 1 auto;
}

.filter-group-categories {
    flex: 1 1 auto;
}

.filter-group-title {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.filters-divider {
    width: 1px;
    align-self: stretch;
    background: rgba(68, 87, 79, 0.2);
    border-radius: 999px;
}

.filter-search {
    position: relative;
    max-width: none;
}

.filter-search .filter-icon {
    position: absolute;
    left: 0.78rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
    opacity: 0.82;
}

.filter-search .field {
    padding-left: 2.2rem;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    flex: 1 1 380px;
}

.recipes-count-badge {
    white-space: nowrap;
    background: rgba(19, 35, 29, 0.09);
    color: #1a352b;
    border: 1px solid rgba(19, 35, 29, 0.16);
}

.recipes-count-badge.is-empty {
    background: rgba(105, 118, 112, 0.12);
    color: #4a5f56;
}

.chip-filter {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.78);
    color: var(--ink);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.36rem 0.68rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.chip-filter.is-active {
    border-color: rgba(216, 95, 49, 0.55);
    background: rgba(216, 95, 49, 0.16);
}

.view-switch {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.2rem;
    background: rgba(255, 255, 255, 0.68);
}

.view-btn {
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    padding: 0.45rem 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.view-btn.is-active {
    color: var(--ink);
    background: #fff;
    box-shadow: 0 8px 18px rgba(30, 45, 36, 0.08);
}

.view-panel {
    animation: fade-in-up 0.3s ease;
}

#recipes-card-grid {
    align-items: start;
}

.recipe-meta-row {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    font-size: 0.84rem;
    color: var(--muted);
}

.recipe-card {
    overflow: hidden;
}

.recipe-card-content {
    display: block;
}

.recipe-photo {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #f5eadc;
}

.recipe-thumb {
    width: 64px;
    height: 44px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #f5eadc;
}

.category-badge {
    color: #6f3818;
    background: rgba(216, 95, 49, 0.16);
}

.badge-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.favorite-badge {
    background: rgba(190, 47, 105, 0.18);
    color: #7f1f4a;
}

.weekend-badge {
    background: rgba(50, 117, 204, 0.2);
    color: #184a85;
}

.selection-mode-badge {
    background: rgba(36, 41, 47, 0.92);
    color: #f1f4f8;
}

.time-badge-dark {
    background: rgba(43, 46, 52, 0.2);
    color: #252a31;
}

.badge-cat-pesce {
    background: rgba(49, 120, 218, 0.18);
    color: #1b4e8d;
}

.badge-cat-carne {
    background: rgba(183, 48, 57, 0.2);
    color: #8f1f2a;
}

.badge-cat-pollo {
    background: rgba(241, 176, 71, 0.26);
    color: #8f5910;
}

.badge-cat-pasta {
    background: rgba(226, 143, 60, 0.22);
    color: #8d4d10;
}

.badge-cat-vegetariano {
    background: rgba(75, 156, 89, 0.22);
    color: #205e2a;
}

.recipe-title-link {
    color: inherit;
    text-decoration: none;
}

.recipe-title-link:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.ingredient-mini-table,
.ingredient-detail-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.7);
    line-height: 12px;
    border-radius: 12px;
}

.ingredient-mini-table th,
.ingredient-mini-table td,
.ingredient-detail-table th,
.ingredient-detail-table td {
    border-bottom: 1px solid var(--line);
    padding: 0.46rem 0.58rem;
    text-align: left;
    font-size: 0.84rem;
    background-color: #00000008;
}

.ingredient-mini-table tr:last-child td,
.ingredient-detail-table tr:last-child td {
    border-bottom: 0;
}

.ingredient-mini-table th,
.ingredient-detail-table th {
    background: rgba(255, 243, 229, 0.75);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ingredient-collapsible {
    display: grid;
    gap: 0.45rem;
}

.ingredient-toggle {
    display: none;
}

.recipe-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.recipe-actions-compact {
    justify-content: flex-end;
}

.recipes-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 760px;
}

.recipes-table th,
.recipes-table td {
    padding: 0.8rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 0.9rem;
    vertical-align: middle;
    white-space: nowrap;
}

.recipes-table th {
    font-size: 0.77rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 700;
}

.recipes-table td:nth-child(2) {
    white-space: normal;
    min-width: 180px;
}

.table-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.table-actions-compact {
    justify-content: flex-end;
}

.recipes-pagination {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.recipes-scroll-sentinel {
    width: 100%;
    height: 1px;
}

.icon-action-btn {
        background: rgb(239 238 238 / 92%);
    color: var(--ink);
    width: 2rem;
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.icon-action-btn:hover {
    border-color: rgba(216, 95, 49, 0.55);
}

.icon-action-btn.danger {
    color: var(--danger);
}

.recipe-detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 1.2fr) 1fr;
}

.recipe-detail-photo {
    width: 100%;
    height: 100%;
    min-height: 250px;
    object-fit: cover;
    background: #f5eadc;
}

.detail-title {
    font-size: clamp(2rem, 3vw, 2.5rem);
}

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

.stepper-shell {
    display: grid;
    gap: 0.75rem;
}

.stepper-progress {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.stepper-card {
    min-height: 0;
    height: fit-content;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    padding: 1rem;
    display: block;
}

.stepper-text {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.45;
    color: var(--ink);
}

.stepper-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(8, 18, 13, 0.44);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.dialog-backdrop .recipe-dialog {
    transform: translateY(14px) scale(0.985);
    opacity: 0;
    transition: transform 0.24s ease, opacity 0.24s ease;
}

.dialog-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.dialog-backdrop.is-open .recipe-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.recipe-dialog {
    width: min(760px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: auto;
    margin: 1rem auto;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 250, 244, 0.97);
    box-shadow: 0 26px 50px rgba(16, 29, 23, 0.22);
}

.dialog-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem 0.8rem;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 250, 244, 0.96);
}

.dialog-body {
    padding: 1rem;
    display: grid;
    gap: 1rem;
}

.import-dialog {
    width: min(840px, calc(100vw - 2rem));
}

.import-textarea {
    resize: vertical;
    min-height: 150px;
    line-height: 1.45;
}

.import-privacy-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.import-preview {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.7);
}

.import-preview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.45rem;
}

.import-preview-steps ol {
    margin: 0.45rem 0 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.28rem;
}

.btn-secondary.is-loading {
    opacity: 0.8;
    cursor: wait;
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.recipe-dialog-footer {
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
}

.dialog-footer-left,
.dialog-footer-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-btn {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.86);
    color: var(--ink);
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.icon-btn.danger {
    color: var(--danger);
}

.ingredient-block {
    display: grid;
    gap: 0.65rem;
}

.ingredient-block-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.ingredient-rows {
    display: grid;
    gap: 0.55rem;
}

.ingredient-row {
    display: grid;
    grid-template-columns: minmax(120px, 1.4fr) minmax(100px, 0.8fr) minmax(80px, 0.6fr) auto;
    gap: 0.45rem;
    align-items: center;
}

.prep-step-rows {
    display: grid;
    gap: 0.55rem;
}

.prep-step-row {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) auto;
    gap: 0.45rem;
    align-items: center;
}

.prep-step-textarea {
    resize: none;
    overflow: hidden;
    min-height: 64px;
    line-height: 1.4;
}

.photo-preview-wrap {
    display: flex;
    align-items: flex-end;
}

.photo-upload-control {
    display: grid;
    gap: 0.5rem;
}

.photo-upload-btn {
    justify-content: center;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.photo-upload-btn.has-file {
    border-color: rgba(75, 156, 89, 0.55);
    background: rgba(75, 156, 89, 0.16);
    color: #205e2a;
}

.photo-upload-btn:active {
    transform: scale(0.985);
}

.photo-upload-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    min-width: 0;
}

.photo-upload-filename {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.photo-preview {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #f4e8d8;
}

.btn-primary.is-loading {
    opacity: 0.78;
    cursor: wait;
}

.status-toggle-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.toggle-badge {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.85);
    color: var(--muted);
    border-radius: 999px;
    padding: 0.4rem 0.72rem;
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.toggle-badge:hover {
    border-color: rgba(216, 95, 49, 0.5);
}

.toggle-badge:active {
    transform: scale(0.97);
}

.toggle-badge.is-selected[data-kind="favorite"] {
    background: rgba(190, 47, 105, 0.18);
    color: #7f1f4a;
    border-color: rgba(190, 47, 105, 0.38);
}

.toggle-badge.is-selected[data-kind="weekend"] {
    background: rgba(50, 117, 204, 0.2);
    color: #184a85;
    border-color: rgba(50, 117, 204, 0.4);
}

.toggle-badge.is-selected[data-kind="active"] {
    background: rgba(75, 156, 89, 0.22);
    color: #205e2a;
    border-color: rgba(75, 156, 89, 0.45);
}

.ui-toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    background: rgba(25, 49, 37, 0.92);
    color: #fff;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
    z-index: 120;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.ui-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.ui-toast.is-error {
    background: rgba(135, 33, 24, 0.94);
}

.fade-in-up {
    animation: fade-in-up 0.45s ease both;
}

.divider {
    height: 3px;
    width: 100%;
    background-color: #c0c0c061;
    border-radius: 2rem;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .dialog-backdrop,
    .dialog-backdrop .recipe-dialog,
    .toggle-badge,
    .photo-upload-btn,
    .ingredient-toggle-chevron {
        transition: none !important;
    }
}

@media (max-width: 760px) {
    .site-shell {
        width: min(1120px, 95vw);
    }

    .week-nav-center {
        text-align: center;
        min-width: 0;
    }

    .week-nav-center .eyebrow {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        letter-spacing: 0.08em;
        font-size: 0.68rem;
    }

    .week-nav-meta {
        display: none;
    }

    .week-nav .btn-secondary {
        font-size: 0.8rem;
        padding: 0.48rem 0.72rem;
        white-space: nowrap;
    }

    .week-nav-label {
        display: none;
    }

    .week-nav-arrow {
        width: 2.4rem;
        min-width: 2.4rem;
        padding: 0;
    }

    .weekly-pick-card,
    .weekly-picked-card {
        grid-template-columns: 96px 1fr;
        min-height: 96px;
    }

    .shopping-recipe-inline {
        gap: 0.36rem;
    }

    .weekly-flagged-card {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .weekly-flagged-main {
        flex-wrap: wrap;
        gap: 0.45rem;
    }

    .weekly-flagged-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .frost-nav {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    .mobile-header-actions {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
    }

    .mobile-header-logout-form {
        display: block;
    }

    .nav-actions-shell {
        width: 100%;
        order: 3;
        display: none;
        border-top: 1px solid var(--line);
        padding-top: 0.55rem;
        margin-top: 0.1rem;
    }

    body.mobile-nav-open .nav-actions-shell {
        display: block;
    }

    .nav-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
        align-items: stretch;
    }

    .nav-actions a,
    .nav-actions button {
        width: auto;
        justify-content: flex-start;
    }

    .nav-link.is-active {
        box-shadow: inset 0 0 0 1px rgba(216, 95, 49, 0.35);
    }

    button[id="open-create-dialog"] span {
        display: none;
    }

    button[id="open-import-dialog"] span {
        display: none;
    }

    .nav-actions form {
        display: inline-flex;
    }

    .menu-logout-form {
        display: none !important;
    }

    .nav-icon-only {
        justify-content: center !important;
    }

    .recipe-dialog {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        margin: 0;
    }

    .dialog-body {
        padding: 0.9rem;
    }

    .ingredient-collapsible {
        gap: 0.5rem;
    }

    .ingredient-toggle {
        width: 100%;
        border: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.82);
        border-radius: 12px;
        padding: 0.48rem 0.62rem;
        font-size: 0.82rem;
        font-weight: 700;
        color: var(--ink);
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .ingredient-toggle-meta {
        color: var(--muted);
        margin-left: auto;
        margin-right: 0.2rem;
    }

    .ingredient-toggle-chevron {
        font-size: 0.78rem;
        color: var(--muted);
        transition: transform 0.18s ease;
    }

    .ingredient-collapsible:not(.is-expanded) .ingredient-mini-table {
        display: none;
    }

    .ingredient-collapsible.is-expanded .ingredient-toggle-chevron {
        transform: rotate(180deg);
    }

    .ingredient-row {
        grid-template-columns: minmax(0, 1fr) 64px 58px 36px;
        gap: 0.35rem;
        align-items: center;
    }

    .ingredient-row .field {
        padding: 0.5rem 0.44rem;
        font-size: 0.8rem;
    }

    .ingredient-row .icon-btn {
        width: 2rem;
        height: 2rem;
        justify-self: end;
    }

    .prep-step-row {
        grid-template-columns: 1fr;
    }

    .filter-search {
        max-width: none;
    }

    .filter-groups {
        width: 100%;
        flex-direction: column;
        gap: 0.55rem;
    }

    .filter-group {
        width: 100%;
    }

    .filters-divider {
        width: 100%;
        height: 1px;
    }

    .recipes-table {
        min-width: 620px;
    }

    .recipes-table th,
    .recipes-table td {
        padding: 0.58rem;
        font-size: 0.8rem;
    }

    .recipe-detail-hero {
        grid-template-columns: 1fr;
    }

    .dialog-footer {
        justify-content: stretch;
    }

    .dialog-footer .btn-primary,
    .dialog-footer .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .recipe-dialog-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .dialog-footer-left {
        justify-content: flex-start;
    }

    .dialog-footer-right {
        justify-content: stretch;
    }

    .stepper-actions {
        flex-wrap: nowrap;
    }

    .stepper-actions .btn-primary,
    .stepper-actions .btn-secondary {
        width: auto;
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        white-space: nowrap;
    }
}
