/* Dashboard layout */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    padding-bottom: var(--space-md);
}

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

@keyframes dashboardPageExit {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.dashboard.view-enter {
    animation: dashboardPageEnter var(--duration-cascade) var(--ease-master) both;
}

.dashboard--loading {
    gap: var(--space-xl);
}

.dashboard--exiting {
    animation: dashboardPageExit 0.32s var(--ease-master) forwards;
    pointer-events: none;
}

.dashboard-shimmer-greeting-date {
    display: block;
    width: 10rem;
    height: 0.75rem;
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-sm);
}

.dashboard-shimmer-greeting-headline {
    display: block;
    width: min(14rem, 80%);
    height: 2.5rem;
    border-radius: var(--radius-sm);
}

.dashboard-shimmer-greeting-line {
    display: block;
    width: min(24rem, 100%);
    height: 3rem;
    margin-top: var(--space-sm);
    border-radius: var(--radius-sm);
}

.dashboard-shimmer-vitals {
    height: 5.5rem;
    border-radius: var(--radius);
}

.vitals-stats-shimmer {
    width: 100%;
    height: 5.5rem;
    border-radius: var(--radius);
}

.vitals-quip--loading {
    display: block;
    width: min(16rem, 70%);
    height: 1.25rem;
    margin-top: var(--space-sm);
}

.vitals-data-row--loading {
    padding: var(--space-md);
    background: var(--color-surface-2);
    border-radius: var(--radius);
}

.recipe-card--loading {
    min-height: 8.5rem;
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow-index-card);
}

.recipe-card-shimmer {
    width: 100%;
    height: 8.5rem;
    border-radius: var(--radius);
}

.dashboard-section-error {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.dashboard-shimmer-section-title {
    width: 9rem;
    height: 0.75rem;
    margin-bottom: var(--space-md);
    border-radius: var(--radius-sm);
}

.dashboard-shimmer-recipe {
    height: 8.5rem;
    border-radius: var(--radius);
}

.dashboard-shimmer-hit-sheet {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.dashboard-shimmer-hit-row {
    height: 4.5rem;
    border-radius: var(--radius-sm);
}

.dashboard .cascade-glide,
.dashboard .cascade-fade {
    animation-delay: calc(var(--stagger, 0) * 45ms);
}

/* Cascade animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.cascade-fade {
    animation: fadeIn var(--duration-cascade) var(--ease-master) both;
}

.cascade-glide {
    animation: glideUp var(--duration-cascade) var(--ease-master) both;
    animation-delay: calc(var(--stagger, 0) * 100ms);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.loading-shimmer {
    color: transparent;
    background: linear-gradient(
        90deg,
        var(--color-surface-2) 25%,
        rgba(44, 42, 41, 0.08) 50%,
        var(--color-surface-2) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.2s var(--ease-master) infinite;
    border-radius: var(--radius-sm);
}

/* Greeting masthead */
.greeting-masthead {
    margin-inline: calc(-1 * var(--space-xs));
}

.greeting-date {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
    min-height: 1rem;
}

.greeting-date.loading-shimmer {
    display: inline-block;
    min-width: 10rem;
    min-height: 0.75rem;
}

.greeting-headline {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.05;
    color: var(--color-text);
    margin: 0;
}

.greeting-headline.loading-shimmer {
    min-height: 2.5rem;
    max-width: 14rem;
}

.greeting-line {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-text-muted);
    margin: var(--space-sm) 0 0;
    max-width: 36rem;
}

.greeting-line.loading-shimmer {
    min-height: 3rem;
    margin-top: var(--space-sm);
}

.greeting-line.hidden {
    display: none;
}

/* Vitals ledger */
.vitals-ledger {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--space-md);
}

.vitals-data-row {
    display: flex;
    align-items: stretch;
    padding: var(--space-md);
    background: var(--color-surface-2);
    border-radius: var(--radius);
}

.vitals-stat {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: var(--space-xs) var(--space-md);
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s var(--ease-master);
}

.vitals-data-row .vitals-stat:first-child {
    padding-left: 0;
}

.vitals-data-row .vitals-stat:last-child {
    padding-right: 0;
}

.vitals-stat--ruled {
    border-right: 1px solid rgba(44, 42, 41, 0.1);
}

.vitals-stat:active {
    opacity: 0.65;
}

.vitals-stat-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.vitals-stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    line-height: 1.2;
}

.vitals-stat--alert .vitals-stat-value {
    color: var(--color-clay);
}

.vitals-stat--expired.vitals-stat--alert .vitals-stat-value,
.vitals-stat--expired.vitals-stat--alert .vitals-stat-label {
    color: var(--expiry-expired);
}

.vitals-stat--expiring.vitals-stat--alert .vitals-stat-value,
.vitals-stat--expiring.vitals-stat--alert .vitals-stat-label {
    color: var(--expiry-expired);
}

.vitals-quip {
    margin: var(--space-sm) 0 0;
    font-family: var(--font-display);
    font-size: 1rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
    color: rgba(44, 42, 41, 0.7);
}

/* Section headers — editorial labels on cream */
.dashboard-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

/* Recipe index card */
.recipe-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--space-lg);
    padding-top: calc(var(--space-lg) + var(--space-sm));
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow-index-card);
}

.recipe-spin-btn {
    position: absolute;
    top: -20px;
    right: -12px;
    z-index: 2;
    width: var(--touch-min);
    height: var(--touch-min);
    border-radius: 50%;
    background: var(--color-primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-fab);
    transition: transform var(--duration-press) var(--ease-master);
}

.recipe-spin-btn:active {
    transform: scale(0.96);
}

.recipe-spin-btn.spinning .material-symbols-outlined {
    animation: spinRoll 0.7s linear infinite;
}

@keyframes spinRoll {
    to {
        transform: rotate(360deg);
    }
}

.recipe-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.recipe-card-content.is-exiting {
    opacity: 0;
    transform: translateY(-6px);
    transition:
        opacity 0.28s var(--ease-master),
        transform 0.28s var(--ease-master);
    pointer-events: none;
}

.recipe-card-content.is-entering {
    animation: recipeContentEnter 0.5s var(--ease-master) both;
}

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

.recipe-dish {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 var(--space-md);
    padding-right: var(--space-lg);
}

.recipe-ingredients-line {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 0 0 var(--space-lg);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(44, 42, 41, 0.2);
}

.recipe-ingredient {
    color: var(--color-text);
}

.recipe-ingredient--expiring {
    color: var(--expiry-expired);
    font-weight: 600;
}

.recipe-ingredient--expired {
    color: var(--expiry-expired);
    font-weight: 700;
}

.recipe-cta-link {
    align-self: flex-end;
    margin-top: auto;
    padding: var(--space-xs) 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    transition: opacity 0.2s var(--ease-master);
}

.recipe-cta-link:active {
    opacity: 0.65;
}

.recipe-empty {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Recipe sheet tags (modal) */
.recipe-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--color-danger-bg);
    color: var(--color-clay);
    border: 1px solid rgba(184, 92, 56, 0.35);
}

/* Hit list — continuous menu sheet */
.hit-list-mount {
    margin: 0;
}

.hit-list-empty {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.hit-list-sheet {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-index-card);
    overflow: hidden;
}

.hit-list-sheet .hit-list-card + .hit-list-card {
    border-top: 1px solid rgba(44, 42, 41, 0.1);
}

.hit-list-card {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: var(--space-md);
    min-height: var(--touch-min);
}

.hit-list-countdown-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 2.75rem;
    padding-right: var(--space-sm);
}

.hit-list-countdown-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

.hit-list-countdown-col--expired .hit-list-countdown-value,
.hit-list-countdown-col--expiring .hit-list-countdown-value {
    color: var(--expiry-expired);
}

.hit-list-countdown-col--expired .hit-list-countdown-unit,
.hit-list-countdown-col--expiring .hit-list-countdown-unit {
    color: var(--expiry-expired);
}

.hit-list-countdown-unit {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.hit-list-divider-v {
    width: 1px;
    align-self: stretch;
    background: rgba(44, 42, 41, 0.1);
    flex-shrink: 0;
    margin-right: var(--space-md);
}

.hit-list-body {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.hit-list-thumb--round {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.hit-list-thumb--round img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hit-list-thumb--round .material-symbols-outlined {
    font-size: 1.25rem;
}

.hit-list-info {
    flex: 1;
    min-width: 0;
}

.hit-list-name {
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hit-list-location {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Recipe sheet content */
.recipe-sheet-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(44, 42, 41, 0.1);
}

.recipe-sheet-dismiss {
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: color 0.2s var(--ease-master);
}

.recipe-sheet-dismiss:active {
    color: var(--color-text);
}

.recipe-sheet-title {
    flex: 1;
    min-width: 0;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0;
}

.recipe-sheet-summary {
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    font-style: italic;
}

.recipe-sheet-ingredients-title {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.recipe-sheet-ingredient-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin: 0 0 var(--space-lg);
}

.recipe-sheet-ingredient-chip {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--color-surface-2);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.recipe-sheet-ingredient-chip--expiring {
    background: rgba(184, 92, 56, 0.12);
    color: var(--expiry-expired);
    border-color: rgba(184, 92, 56, 0.35);
    font-weight: 700;
}

.recipe-sheet-ingredient-chip--expired {
    background: rgba(184, 92, 56, 0.2);
    color: var(--expiry-expired);
    border-color: rgba(184, 92, 56, 0.5);
    font-weight: 700;
}

.recipe-sheet-steps-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}

.recipe-sheet-steps {
    padding-left: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.recipe-sheet-steps li {
    margin-bottom: var(--space-sm);
    line-height: 1.4;
}

.recipe-sheet-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    margin-top: var(--space-lg);
    padding: var(--space-md) 0 var(--space-xs);
    border: none;
    border-top: 1px solid rgba(44, 42, 41, 0.1);
    background: none;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary);
    transition: opacity 0.2s var(--ease-master);
    margin-left: -0.4rem;
}

.recipe-sheet-download:active {
    opacity: 0.65;
}

.recipe-sheet-download .material-symbols-outlined {
    font-size: 1.1rem;
}
