/* ===========================================
   Family Dashboard - Premium Skylight-Style Design
   Michael & Ashley's Home Hub
   =========================================== */

/* Google Fonts - Premium Typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Poppins:wght@300;400;500;600&display=swap');

/* ===========================================
   CSS Variables - Design System
   =========================================== */

:root {
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: 'Poppins', sans-serif;

    /* Day Theme (Default) - Clean, Bright, Productive (11 AM - 5 PM) */
    --color-bg: #F8F9FA;               /* Cool Light Gray */
    --color-surface: #F1F3F5;          /* Soft Gray Surface */
    --color-surface-elevated: #E9ECEF;
    --color-text-primary: #212529;     /* Near Black */
    --color-text-secondary: #6C757D;   /* Medium Gray */
    --color-text-muted: #ADB5BD;       /* Light Gray */
    --color-border: #DEE2E6;           /* Subtle Border */
    --color-border-light: #E9ECEF;     /* Very Subtle */

    /* Accent Colors - Personal Favorites */
    --color-michael: #5A9B7C;          /* Michael's Green */
    --color-michael-bg: rgba(90, 155, 124, 0.12);
    --color-ashley: #9B7BB8;           /* Ashley's Purple */
    --color-ashley-bg: rgba(155, 123, 184, 0.12);
    --color-shared: #7B98B8;           /* Soft Blue (both) */
    --color-shared-bg: rgba(123, 152, 184, 0.12);

    /* UI Colors */
    --color-accent: #4A90E2;           /* Professional Blue */
    --color-success: #5CB85C;          /* Clean Green */
    --color-warning: #F0AD4E;          /* Warm Amber */
    --color-danger: #D9534F;           /* Alert Red */
    --color-overlay: rgba(33, 37, 41, 0.7);  /* Modal overlay */

    /* Shadows - Soft & Layered */
    --shadow-sm:
        0px 1px 2px rgba(33, 37, 41, 0.06),
        0px 2px 4px rgba(33, 37, 41, 0.04);
    --shadow-md:
        0px 2px 4px rgba(33, 37, 41, 0.06),
        0px 4px 8px rgba(33, 37, 41, 0.04),
        0px 8px 16px rgba(33, 37, 41, 0.03);
    --shadow-lg:
        0px 4px 6px rgba(33, 37, 41, 0.05),
        0px 10px 20px rgba(33, 37, 41, 0.04),
        0px 20px 40px rgba(33, 37, 41, 0.03);
    --shadow-xl:
        0px 8px 12px rgba(33, 37, 41, 0.05),
        0px 20px 40px rgba(33, 37, 41, 0.04),
        0px 40px 80px rgba(33, 37, 41, 0.03);

    /* Sizing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 20px;
    --radius-full: 50%;

    /* Navigation Design Language (Gemini-approved Jan 2026) */
    --nav-font-size: 1rem;
    --nav-font-weight: 500;

    /* Transitions */
    --transition-fast: 75ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

/* Morning Theme - Gentle, Soft Awakening (6 AM - 11 AM) */
[data-theme="morning"] {
    --color-bg: #FDFBF6;               /* Warm Cream */
    --color-surface: #FBF8F1;          /* Soft Warm White */
    --color-surface-elevated: #F7F2E9;
    --color-text-primary: #4C4A48;     /* Warm Charcoal */
    --color-text-secondary: #8D8A87;   /* Warm Gray */
    --color-text-muted: #B8B5B2;       /* Light Warm Gray */
    --color-border: #EAE6E0;           /* Soft Cream Border */
    --color-border-light: #F3F0EB;     /* Very Subtle */

    --color-michael: #5A9B7C;
    --color-michael-bg: rgba(90, 155, 124, 0.12);
    --color-ashley: #9B7BB8;
    --color-ashley-bg: rgba(155, 123, 184, 0.12);
    --color-shared: #7B98B8;
    --color-shared-bg: rgba(123, 152, 184, 0.12);
    --color-accent: #A8D8EA;           /* Soft Sky Blue */
    --color-success: #7FB685;
    --color-warning: #E5B567;
    --color-danger: #D98B8B;
    --color-overlay: rgba(76, 74, 72, 0.7);  /* Warm overlay */

    --shadow-sm:
        0px 1px 2px rgba(76, 74, 72, 0.05),
        0px 2px 4px rgba(76, 74, 72, 0.04);
    --shadow-md:
        0px 2px 4px rgba(76, 74, 72, 0.05),
        0px 4px 8px rgba(76, 74, 72, 0.04),
        0px 8px 16px rgba(76, 74, 72, 0.03);
    --shadow-lg:
        0px 4px 6px rgba(76, 74, 72, 0.04),
        0px 10px 20px rgba(76, 74, 72, 0.04),
        0px 20px 40px rgba(76, 74, 72, 0.03);
}

/* Day Theme (Default) - Bright & Energetic (11 AM - 5 PM) */
/* Uses :root defaults - clean and bright */

/* Evening Theme - Warm, Cozy, Winding Down (5 PM - 8 PM) */
[data-theme="evening"] {
    --color-bg: #F4EFE8;               /* Warm Linen */
    --color-surface: #EFE8DC;          /* Soft Parchment */
    --color-surface-elevated: #E8DBCF;
    --color-text-primary: #5C4B3A;     /* Warm Brown */
    --color-text-secondary: #8C7F73;   /* Taupe */
    --color-text-muted: #B8AE9F;       /* Muted Tan */
    --color-border: #DCD1C4;           /* Warm Border */
    --color-border-light: #EAE2D8;     /* Soft Border */

    --color-michael: #5A9B7C;
    --color-michael-bg: rgba(90, 155, 124, 0.15);
    --color-ashley: #9B7BB8;
    --color-ashley-bg: rgba(155, 123, 184, 0.15);
    --color-shared: #7B98B8;
    --color-shared-bg: rgba(123, 152, 184, 0.15);
    --color-accent: #D97746;           /* Warm Sunset Orange */
    --color-success: #6B9B6B;
    --color-warning: #D4A04A;
    --color-danger: #C86B6B;
    --color-overlay: rgba(92, 75, 58, 0.75); /* Warm evening overlay */

    --shadow-sm:
        0px 1px 2px rgba(92, 75, 58, 0.08),
        0px 2px 4px rgba(92, 75, 58, 0.06);
    --shadow-md:
        0px 2px 4px rgba(92, 75, 58, 0.08),
        0px 4px 8px rgba(92, 75, 58, 0.06),
        0px 8px 16px rgba(92, 75, 58, 0.04);
    --shadow-lg:
        0px 4px 6px rgba(92, 75, 58, 0.07),
        0px 10px 20px rgba(92, 75, 58, 0.06),
        0px 20px 40px rgba(92, 75, 58, 0.04);
}

/* Night Theme - Calm, Restful, Easy on Eyes (8 PM - 6 AM) */
[data-theme="night"] {
    --color-bg: #1A202C;               /* Deep Blue-Gray */
    --color-surface: #2D3748;          /* Slate */
    --color-surface-elevated: #4A5568;
    --color-text-primary: #F7FAFC;     /* Soft White */
    --color-text-secondary: #A0AEC0;   /* Cool Gray */
    --color-text-muted: #718096;       /* Muted Blue-Gray */
    --color-border: #4A5568;           /* Slate Border */
    --color-border-light: #718096;     /* Light Border */

    --color-michael: #68D391;          /* Bright Green for Dark */
    --color-michael-bg: rgba(104, 211, 145, 0.18);
    --color-ashley: #B794F4;           /* Bright Purple for Dark */
    --color-ashley-bg: rgba(183, 148, 244, 0.18);
    --color-shared: #63B3ED;           /* Bright Blue for Dark */
    --color-shared-bg: rgba(99, 179, 237, 0.18);
    --color-accent: #9F7AEA;           /* Soft Purple */
    --color-success: #68D391;
    --color-warning: #F6AD55;
    --color-danger: #FC8181;
    --color-overlay: rgba(26, 32, 44, 0.85); /* Dark night overlay */

    --shadow-sm:
        0px 1px 2px rgba(0, 0, 0, 0.25),
        0px 2px 4px rgba(0, 0, 0, 0.20);
    --shadow-md:
        0px 2px 4px rgba(0, 0, 0, 0.25),
        0px 4px 8px rgba(0, 0, 0, 0.20),
        0px 8px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg:
        0px 4px 6px rgba(0, 0, 0, 0.25),
        0px 10px 20px rgba(0, 0, 0, 0.20),
        0px 20px 40px rgba(0, 0, 0, 0.15);
}

/* Legacy dark theme alias */
[data-theme="dark"] {
    --color-bg: #1E1D1B;               /* Warm Charcoal */
    --color-surface: #2A2826;          /* Soft Dark */
    --color-surface-elevated: #333130;
    --color-text-primary: #EAE8E3;     /* Warm Off-white */
    --color-text-secondary: #9B9997;   /* Light Grey */
    --color-text-muted: #6B6966;       /* Muted */
    --color-border: #3D3B38;           /* Dark Line */
    --color-border-light: #333130;

    --color-michael-bg: rgba(90, 155, 124, 0.18);
    --color-ashley-bg: rgba(155, 123, 184, 0.18);
    --color-shared-bg: rgba(123, 152, 184, 0.18);
    --color-overlay: rgba(30, 29, 27, 0.8);  /* Dark overlay */

    --shadow-sm:
        0px 1px 2px rgba(0, 0, 0, 0.2),
        0px 2px 4px rgba(0, 0, 0, 0.15);
    --shadow-md:
        0px 2px 4px rgba(0, 0, 0, 0.2),
        0px 4px 8px rgba(0, 0, 0, 0.15),
        0px 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg:
        0px 4px 6px rgba(0, 0, 0, 0.2),
        0px 10px 20px rgba(0, 0, 0, 0.15),
        0px 20px 40px rgba(0, 0, 0, 0.1);
}

/* ===========================================
   Base Styles
   =========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    overflow: hidden;
    font-family: var(--font-primary);
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.5;
    background: var(--color-bg);
    color: var(--color-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

/* ===========================================
   App Container & Screen System
   =========================================== */

.app {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.screen {
    display: none;
    flex: 1;
    overflow: hidden;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

.screen-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px 32px;
    padding-bottom: 100px; /* Space for bottom nav */
    overflow-y: auto;
}

.screen-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

/* Push add button to far right of header */
.screen-header > .add-btn {
    margin-left: auto;
}

.screen-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.screen-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 500;
    line-height: 1;
    flex: none;
}

.back-btn {
    padding: 10px 20px;
    border: none;
    background: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.back-btn:active {
    transform: scale(0.97);
    background: var(--color-border);
}

/* ===========================================
   Bottom Navigation
   =========================================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border-light);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    padding: 8px 16px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border: none;
    background: none;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-item:active {
    transform: scale(0.95);
    background: var(--color-bg);
}

.nav-item.active {
    color: var(--color-accent);
}

.nav-item.active .nav-icon {
    transform: scale(1.1);
}

.nav-icon {
    font-size: 1.5rem;
    transition: transform var(--transition-fast);
}

.nav-icon.tasks-icon {
    color: var(--color-success);
    font-weight: 700;
}

.nav-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===========================================
   Home Screen Preview Cards
   =========================================== */

.view-more {
    font-size: 0.8125rem;
    color: var(--color-accent);
    font-weight: 500;
}

.calendar-preview,
.todo-preview,
.meals-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    min-height: 0;
}

.preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
    color: var(--color-text-muted);
}

.preview-empty p {
    font-size: 0.9375rem;
}

.preview-hint {
    font-size: 0.8125rem !important;
    color: var(--color-text-muted);
    opacity: 0.7;
    margin-top: 4px;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-shared);
}

.preview-item.michael { border-left-color: var(--color-michael); }
.preview-item.ashley { border-left-color: var(--color-ashley); }
.preview-item.both { border-left-color: var(--color-shared); }

.preview-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

/* Interactive checkbox for todo preview */
.preview-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    flex-shrink: 0;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.preview-checkbox:hover {
    border-color: var(--color-accent);
    background: var(--color-accent-bg);
}

.preview-checkbox:active {
    transform: scale(0.9);
}

/* Checkmark on hover */
.preview-checkbox:hover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 5px;
    border: 2px solid var(--color-accent);
    border-top: none;
    border-right: none;
    transform: translate(-50%, -60%) rotate(-45deg);
    opacity: 0.5;
}

/* Color variations based on assignee */
.preview-item.michael .preview-checkbox {
    border-color: var(--color-michael);
}
.preview-item.michael .preview-checkbox:hover {
    background: rgba(76, 175, 80, 0.1);
}
.preview-item.michael .preview-checkbox:hover::after {
    border-color: var(--color-michael);
}

.preview-item.ashley .preview-checkbox {
    border-color: var(--color-ashley);
}
.preview-item.ashley .preview-checkbox:hover {
    background: rgba(156, 39, 176, 0.1);
}
.preview-item.ashley .preview-checkbox:hover::after {
    border-color: var(--color-ashley);
}

/* task-preview-checkbox coloring by assignee in home preview */
.preview-item.michael .task-preview-checkbox {
    border-color: var(--color-michael);
}
.preview-item.michael .task-preview-checkbox.checked {
    background: var(--color-michael);
    border-color: var(--color-michael);
}

.preview-item.ashley .task-preview-checkbox {
    border-color: var(--color-ashley);
}
.preview-item.ashley .task-preview-checkbox.checked {
    background: var(--color-ashley);
    border-color: var(--color-ashley);
}

.preview-item.both .task-preview-checkbox {
    border-color: var(--color-shared);
}
.preview-item.both .task-preview-checkbox.checked {
    background: var(--color-shared);
    border-color: var(--color-shared);
}

.preview-text {
    flex: 1;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-meta {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.preview-more {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    text-align: center;
    padding: 8px;
}

.preview-meal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
}

.preview-meal-type {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.preview-meal-value {
    font-size: 0.875rem;
    color: var(--color-text-primary);
}

/* Grocery Preview on Home Screen */
.grocery-preview-section {
    flex: 1;
    min-height: 150px;
}

.grocery-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

/* Center empty state in grocery preview */
.grocery-preview-list:has(.preview-empty) {
    align-content: center;
    justify-content: center;
}

.grocery-preview-list .preview-empty {
    width: 100%;
}

/* ===========================================
   Full Screen: Tasks (Google Keep-style Masonry Grid)
   =========================================== */

/* ===========================================
   DEPRECATED - Use .screen-header instead
   TODO: Remove after verification period
   =========================================== */
/* Tasks Header */
.tasks-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 20px 8px 20px;
}

.tasks-header h1 {
    margin: 0;
}

/* ===========================================
   DEPRECATED - Use .secondary-header and .filter-chip instead
   TODO: Remove after verification period
   =========================================== */
/* Category Filter Chips */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 20px 16px 20px;
}

.category-chip {
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text-secondary);
}

.category-chip:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Active state for filter/category chips (screen-level navigation) */
/* NOTE: Use .active for navigation/filters, .selected for form choices */
.category-chip.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

/* ===========================================
   Unified Secondary Header Pattern
   For consistent spacing between filter chips and tab buttons
   =========================================== */

/* Base secondary header - shared container for filters/tabs */
.secondary-header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 20px 16px 20px;
    align-items: center;
}

/* When secondary-header is inside screen-header, remove padding and take full width */
.screen-header .secondary-header {
    padding: 0;
    flex: 1;
    flex-basis: 100%;
}

/* When secondary-nav is inside screen-header, align to right and center vertically */
.screen-header .secondary-nav {
    margin-left: auto;
    align-self: center;
}

/* Filter chips (renamed from .category-chip for semantic clarity) */
/* NOTE: Use .active for navigation/filters, .selected for form choices */
.filter-chip {
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    font-size: var(--nav-font-size);
    font-weight: var(--nav-font-weight);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text-secondary);
}

.filter-chip:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.filter-chip.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

/* Task Lists Masonry Grid */
.task-lists-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 8px 20px 120px 20px;
    align-items: start;
}

/* Task List Card */
.task-list-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
    cursor: pointer;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Owner colored bar */
.task-list-card-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.task-list-card-bar.owner-michael {
    background: var(--color-michael);
}

.task-list-card-bar.owner-ashley {
    background: var(--color-ashley);
}

.task-list-card-bar.owner-both {
    background: var(--color-shared);
}

.task-list-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.task-list-card:active {
    transform: translateY(0);
}

/* Task List Header */
.task-list-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.task-list-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.3;
}

.task-list-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.task-list-category {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--color-surface-elevated);
    color: var(--color-text-secondary);
}

.task-list-owner {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.task-list-owner.owner-michael {
    background: var(--color-michael-bg);
    color: var(--color-michael);
}

.task-list-owner.owner-ashley {
    background: var(--color-ashley-bg);
    color: var(--color-ashley);
}

.task-list-owner.owner-both {
    background: var(--color-shared-bg);
    color: var(--color-shared);
}

/* Task List Preview */
.task-list-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-preview-item {
    display: flex;
    align-items: start;
    gap: 10px;
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
}

.task-preview-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
    transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.task-preview-checkbox:hover {
    border-color: var(--color-accent);
    transform: scale(1.1);
}

.task-preview-checkbox.checking {
    transform: scale(0.9);
}

.task-preview-checkbox.checked {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.task-preview-checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.task-preview-text {
    flex: 1;
    line-height: 1.4;
}

.task-preview-text.completed {
    text-decoration: line-through;
    opacity: 0.6;
}

.task-preview-more {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-style: italic;
    padding-left: 30px;
}

.task-preview-empty {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-style: italic;
    text-align: center;
    padding: 12px 0;
}

/* Task List Footer */
.task-list-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border-light);
}

.task-list-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-list-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--color-border-light);
    border-radius: 3px;
    overflow: hidden;
}

.task-list-progress-fill {
    height: 100%;
    transition: width var(--transition-normal);
    border-radius: 3px;
}

.task-list-progress-fill.owner-michael {
    background: var(--color-michael);
}

.task-list-progress-fill.owner-ashley {
    background: var(--color-ashley);
}

.task-list-progress-fill.owner-both {
    background: var(--color-shared);
}

.task-list-count {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    min-width: 50px;
    text-align: right;
}

/* ========================================
   Task List Edit Mode (Drag-and-Drop)
   ======================================== */

/* Wobble Animation - GPU-accelerated for smooth 60fps */
@keyframes wobble {
    0%, 100% { transform: rotate(-0.6deg) translateZ(0); }
    50% { transform: rotate(0.6deg) translateZ(0); }
}

@keyframes wobble-alt {
    0%, 100% { transform: rotate(0.5deg) translateZ(0); }
    50% { transform: rotate(-0.5deg) translateZ(0); }
}

/* Edit Mode - Enable GPU compositing on grid */
.task-lists-grid.edit-mode {
    perspective: 1000px;
}

/* Edit Mode - All cards wobble (GPU-accelerated) */
.task-lists-grid.edit-mode .task-list-card {
    animation: wobble 0.5s ease-in-out infinite;
    cursor: grab;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    contain: layout style;
}

/* Randomize wobble for natural look */
.task-lists-grid.edit-mode .task-list-card:nth-child(2n) {
    animation-name: wobble-alt;
    animation-duration: 0.55s;
}

.task-lists-grid.edit-mode .task-list-card:nth-child(3n) {
    animation-duration: 0.45s;
}

.task-lists-grid.edit-mode .task-list-card:nth-child(5n) {
    animation-duration: 0.52s;
}

/* Disable hover effects in edit mode */
.task-lists-grid.edit-mode .task-list-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
    border-color: var(--color-border);
}

/* Card being dragged */
.task-list-card.dragging {
    animation: none !important;
    opacity: 0.95;
    box-shadow: var(--shadow-xl) !important;
    z-index: 1000;
    cursor: grabbing;
    pointer-events: none;
    position: fixed;
    will-change: transform;
    backface-visibility: hidden;
}

/* Card being dragged over (potential drop target) */
.task-list-card.drag-over {
    transform: scale(0.95);
    opacity: 0.6;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

/* Placeholder for dragged card's original position */
.drag-placeholder {
    border: 2px dashed var(--color-accent);
    border-radius: var(--radius-md);
    background: var(--color-accent-bg);
    min-height: 140px;
    opacity: 0.5;
}

/* Edit Mode Done Button */
.edit-mode-done-btn {
    margin-left: auto;
}

/* Hide FAB in edit mode */
#screen-tasks.edit-mode .fab {
    display: none;
}

/* Hide category filters in edit mode */
#screen-tasks.edit-mode #category-filters {
    display: none;
}

/* Floating Action Button (FAB) */
.fab {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--color-accent);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 100;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.fab:active {
    transform: scale(1.05);
}

.fab-icon {
    font-size: 2rem;
    font-weight: 300;
    line-height: 1;
}

/* ===========================================
   DEPRECATED - Use .empty-state instead
   TODO: Remove after verification period
   =========================================== */
/* Empty State for Tasks */
.task-lists-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.task-lists-empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.task-lists-empty h3 {
    font-size: 1.5rem;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.task-lists-empty p {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

/* Portrait Mode Adjustments */
@media (orientation: portrait) {
    .task-lists-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 8px 16px 120px 16px;
    }

    .fab {
        bottom: 80px;
        right: 20px;
        width: 56px;
        height: 56px;
    }

    .category-filters {
        padding: 8px 16px 12px 16px;
    }
}

/* Category Choice Chips (for modal) */
.category-choice-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.category-choice-chip {
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text-secondary);
}

.category-choice-chip:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Selected state for form choice chips (modal-level selections) */
/* NOTE: Use .active for navigation/filters, .selected for form choices */
.category-choice-chip.selected {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

.category-choice-chip.new-category {
    border-style: dashed;
}

.category-choice-chip.new-category:hover {
    border-color: var(--color-success);
    color: var(--color-success);
}

/* Owner Choice Chips */
.owner-choice-chips {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.owner-choice-chip {
    flex: 1;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text-secondary);
    text-align: center;
}

.owner-choice-chip:hover {
    border-color: var(--color-accent);
}

/* Selected state for owner choice (modal-level selection with owner-specific colors) */
/* NOTE: Use .active for navigation/filters, .selected for form choices */
.owner-choice-chip.selected {
    border-color: currentColor;
    box-shadow: var(--shadow-sm);
}

.owner-choice-chip.owner-both {
    color: var(--color-shared);
}

.owner-choice-chip.owner-both.selected {
    background: var(--color-shared);
    color: white;
}

.owner-choice-chip.owner-michael {
    color: var(--color-michael);
}

.owner-choice-chip.owner-michael.selected {
    background: var(--color-michael);
    color: white;
}

.owner-choice-chip.owner-ashley {
    color: var(--color-ashley);
}

.owner-choice-chip.owner-ashley.selected {
    background: var(--color-ashley);
    color: white;
}

/* List Detail View Modal */
.list-detail-view {
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.list-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--color-border-light);
}

.list-detail-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

.list-detail-category {
    padding: 4px 10px;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--color-surface-elevated);
    color: var(--color-text-secondary);
}

.list-detail-owner-badge {
    padding: 4px 10px;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.list-detail-owner-badge.owner-michael {
    background: var(--color-michael-bg);
    color: var(--color-michael);
}

.list-detail-owner-badge.owner-ashley {
    background: var(--color-ashley-bg);
    color: var(--color-ashley);
}

.list-detail-owner-badge.owner-both {
    background: var(--color-shared-bg);
    color: var(--color-shared);
}

.list-detail-actions {
    position: relative;
}

.list-detail-kebab {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-detail-kebab:hover {
    background: var(--color-surface-elevated);
    color: var(--color-accent);
}

.kebab-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 140px;
    z-index: 100;
    overflow: hidden;
}

.kebab-item {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 0.9375rem;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.kebab-item:hover {
    background: var(--color-surface-elevated);
}

.kebab-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.kebab-danger {
    color: var(--color-danger);
}

.kebab-danger:hover {
    background: var(--color-danger);
    color: white;
}

.list-detail-todos {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px;
}

/* ===========================================
   DEPRECATED - Use .empty-state instead
   TODO: Remove after verification period
   =========================================== */
.list-detail-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-muted);
}

.list-detail-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.6;
}

.list-detail-empty p {
    font-size: 1rem;
    margin: 0;
}

.todo-section {
    margin-bottom: 16px;
}

.todo-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 8px 0;
    margin-bottom: 12px;
}

.todo-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.todo-section-toggle {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    transition: transform var(--transition-fast);
}

.todo-section.completed.collapsed .todo-section-content {
    display: none;
}

.todo-section.completed.collapsed .todo-section-toggle {
    transform: rotate(-90deg);
}

.todo-section.completed h4 {
    opacity: 0.7;
}

.todo-list-items {
    display: flex;
    flex-direction: column;
}

.task-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 8px;
    border-bottom: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: background var(--transition-fast);
    border-radius: var(--radius-sm);
}

.task-detail-item:hover {
    background: var(--color-surface-elevated);
}

.task-detail-item:last-child {
    border-bottom: none;
}

.task-detail-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-border);
    border-radius: 6px;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.task-detail-checkbox.checked {
    background: var(--color-accent);
    border-color: var(--color-accent);
    position: relative;
}

.task-detail-checkbox.checked::after {
    content: "✓";
    color: white;
    font-size: 14px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.task-detail-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-detail-text {
    font-size: 1rem;
    color: var(--color-text-primary);
    line-height: 1.4;
}

.task-detail-content.completed .task-detail-text {
    text-decoration: line-through;
    opacity: 0.5;
}

.task-detail-assignment {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.task-detail-assignment.michael {
    background: rgba(34, 197, 94, 0.15);
    color: var(--color-michael);
}

.task-detail-assignment.ashley {
    background: rgba(168, 85, 247, 0.15);
    color: var(--color-ashley);
}

.task-detail-assignment.both {
    background: rgba(251, 146, 60, 0.15);
    color: var(--color-shared);
}

.empty-hint {
    text-align: center;
    color: var(--color-text-muted);
    font-style: italic;
    padding: 20px;
}

.list-detail-add {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border-light);
}

.quick-add-wrapper {
    display: flex;
    gap: 8px;
}

.quick-add-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-primary);
    color: var(--color-text-primary);
    background: var(--color-bg);
    transition: all var(--transition-fast);
}

.quick-add-input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: var(--color-surface);
}

.quick-add-btn {
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--color-accent);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.quick-add-btn:hover {
    background: var(--color-accent);
    filter: brightness(1.1);
}

.quick-add-btn:active {
    transform: scale(0.97);
}


/* ===========================================
   Bucket Lists - 3 Fixed Columns
   =========================================== */

.bucket-lists-three-col {
    display: grid;
    /* Fix Chromium sub-pixel bug: minmax(0, 1fr) prevents fractional overflow */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 1fr;
    gap: 20px;
    padding: 8px 20px 120px 20px;
    min-height: 0;
    flex: 1;
    /* Create new stacking context to isolate rendering */
    isolation: isolate;
}

.bucket-list-fixed-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    min-height: 0;
    transition: none;
    /* Fix Chromium sub-pixel rendering: force isolated rendering context */
    contain: layout style paint;
    /* Ensure consistent integer pixel boundaries */
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

/* Prevent hover during page load */
.bucket-lists-three-col.loading .bucket-list-fixed-card {
    pointer-events: none;
}

.bucket-list-fixed-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.bucket-list-fixed-card.owner-ashley::before {
    background: var(--color-ashley);
}

.bucket-list-fixed-card.owner-both::before {
    background: var(--color-shared);
}

.bucket-list-fixed-card.owner-michael::before {
    background: var(--color-michael);
}

/* Hover effect - disabled for touchscreen-only device */
/* Uncomment below for mouse-enabled devices:
.bucket-lists-three-col:not(.loading) .bucket-list-fixed-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
    transform: translate3d(0, -4px, 0);
    transition: transform 150ms ease-out;
}
*/

/* Active state (touch feedback) */
.bucket-list-fixed-card:active {
    transform: translate3d(0, -2px, 0);
}

/* Remove focus outline (touch-only interface) */
.bucket-list-fixed-card:focus {
    outline: none;
}

.bucket-list-fixed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.bucket-list-fixed-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.bucket-list-fixed-count {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--color-surface-elevated);
    color: var(--color-text-secondary);
}

.bucket-list-fixed-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    min-height: 0;
}

.bucket-list-fixed-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--color-text-muted);
    font-style: italic;
}

.bucket-list-fixed-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.bucket-list-fixed-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.bucket-list-fixed-checkbox:hover {
    border-color: var(--color-accent);
    transform: scale(1.15);
}

.bucket-list-fixed-checkbox.checking {
    transform: scale(0.9);
}

.bucket-list-fixed-checkbox.checked {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.bucket-list-fixed-checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.bucket-list-fixed-text {
    flex: 1;
    color: var(--color-text-primary);
    line-height: 1.4;
}

.bucket-list-fixed-text.completed {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Progress summary for modals */
.list-progress-summary {
    padding: 8px 16px;
    margin-bottom: 12px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    text-align: center;
}

.list-progress-summary .progress-text {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.bucket-list-fixed-more {
    text-align: center;
    padding: 8px;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-style: italic;
}

/* Portrait mode for bucket lists */
@media (orientation: portrait) and (max-width: 600px) {
    .bucket-lists-three-col {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 12px;
        padding: 8px 12px 120px 12px;
    }

    .bucket-list-fixed-card {
        min-height: 180px;
    }

    .bucket-list-fixed-name {
        font-size: 1.25rem;
    }
}


/* ===========================================
   Full Screen: Meals
   =========================================== */

.meals-full-container {
    display: flex;
    gap: 24px;
    flex: 1;
    min-height: 0;
}

/* Meal Plan Two-Column Layout */
.meal-plan-layout {
    display: flex;
    gap: 24px;
    flex: 1;
    min-height: 0;
}

.meals-grid-full {
    flex: 1;
    display: grid;
    grid-template-columns: 100px repeat(3, 1fr);
    grid-template-rows: auto repeat(7, 1fr);
    gap: 12px;
    align-content: stretch;
}

/* Meal Plan Sidebar */
.meal-sidebar {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-md);
}

.meal-sidebar-header {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border-light);
}

.meal-sidebar-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meal-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.meal-sidebar-item .item-qty {
    color: var(--color-accent);
    font-weight: 600;
    min-width: 28px;
}

.meal-sidebar-item .item-name {
    flex: 1;
    color: var(--color-text-primary);
}

/* ===========================================
   DEPRECATED - Use .empty-state instead
   TODO: Remove after verification period
   =========================================== */
.meal-sidebar-empty {
    color: var(--color-text-muted);
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.grocery-full-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-md);
}

.grocery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-light);
}

.grocery-header h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
}

.grocery-list-full {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

/* Calendar Setup Prompt */
.calendar-setup {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    margin-top: 20px;
}

.calendar-setup p {
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

/* ===========================================
   Typography
   =========================================== */

h1 {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 3rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h2 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
}

h3 {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1.125rem;
}

.text-subtle {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

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

/* ===========================================
   Layout Structure
   =========================================== */

.dashboard {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px 32px;
    padding-bottom: 120px; /* Space for fixed bottom nav + breathing room */
    gap: 24px;
}

/* ===========================================
   Hero Section - Today at a Glance
   =========================================== */

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 36px;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.hero-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-greeting {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 2.75rem;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
}

.hero-date {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    font-weight: 400;
}

.hero-center {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 24px;
    border-radius: var(--radius-lg);
    background: var(--color-bg);
    width: 150px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.hero-stat:active {
    transform: scale(0.96);
    background: var(--color-border);
}

.hero-stat-icon {
    font-size: 1.5rem;
}

.hero-stat-value {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.125rem;
    color: var(--color-text-primary);
    text-align: center;
    line-height: 1.3;
}

.hero-stat-label {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.hero-right {
    text-align: right;
}

.hero-time {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 4.5rem;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    line-height: 1;
}

.hero-ampm {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    margin-left: 8px;
}

/* ===========================================
   Main Content Grid
   =========================================== */

.main-content {
    display: flex;
    gap: 24px;
    flex: 1;
    min-height: 0;
}

/* ===========================================
   Cards - Base Styling
   =========================================== */

.card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-fast);
}

/* Clickable cards on home screen */
.card[onclick] {
    cursor: pointer;
}

.card[onclick]:active {
    transform: scale(0.985);
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-light);
}

.card-header h2 {
    color: var(--color-text-primary);
}

.card-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ===========================================
   Calendar Panel
   =========================================== */

.calendar-panel {
    flex: 0 0 58%;
    min-height: 0; /* Allow shrinking within flex container */
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-light);
}

.panel-header h2 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.5rem;
    color: var(--color-text-primary);
}

/* Calendar Connect Buttons */
.calendar-connect-btns {
    display: flex;
    gap: 8px;
    margin-left: auto;
    margin-right: 16px;
}

.connect-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.connect-btn .connect-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-text-muted);
}

.connect-btn.michael .connect-status {
    background: var(--color-michael);
    opacity: 0.4;
}

.connect-btn.ashley .connect-status {
    background: var(--color-ashley);
    opacity: 0.4;
}

.connect-btn.connected {
    border-color: var(--color-success, #22c55e);
    background: rgba(34, 197, 94, 0.1);
}

.connect-btn.connected .connect-status {
    opacity: 1;
}

.connect-btn.michael.connected .connect-status {
    background: var(--color-michael);
}

.connect-btn.ashley.connected .connect-status {
    background: var(--color-ashley);
}

.connect-btn:hover:not(.connected) {
    border-color: var(--color-accent);
    background: var(--color-surface);
}

.view-toggle {
    display: flex;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: 4px;
}

.toggle-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    font-family: var(--font-primary);
    font-size: var(--nav-font-size);
    font-weight: var(--nav-font-weight);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.toggle-btn.active {
    background: var(--color-surface);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-sm);
}

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

/* Calendar Navigation */
.week-header, .month-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.week-label, .month-label {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text-primary);
    min-width: 220px;
    text-align: center;
}

.nav-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--color-bg);
    color: var(--color-text-primary);
    font-size: 1.25rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.nav-btn:active {
    transform: scale(0.92);
    background: var(--color-accent);
    color: white;
}

.nav-btn.small {
    width: 32px;
    height: 32px;
    font-size: 1rem;
}

/* Week View Grid */
.week-view, .month-view {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.day-column {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-fast);
}

.day-column.today {
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--color-accent);
}

.day-header {
    text-align: center;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--color-border-light);
}

.day-name {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.day-number {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 300;
    color: var(--color-text-primary);
}

.day-column.today .day-number {
    background: var(--color-accent);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.day-events {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Events */
.event {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform var(--transition-fast);
    border-left: 3px solid;
    background: var(--color-surface);
}

.event:active {
    transform: scale(0.97);
}

.event.michael {
    background: var(--color-michael-bg);
    border-color: var(--color-michael);
    color: var(--color-text-primary);
}

.event.ashley {
    background: var(--color-ashley-bg);
    border-color: var(--color-ashley);
    color: var(--color-text-primary);
}

.event.shared {
    background: var(--color-shared-bg);
    border-color: var(--color-shared);
    color: var(--color-text-primary);
}

.event-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.event-time {
    font-size: 0.6875rem;
    color: var(--color-text-secondary);
    font-weight: 400;
}

/* Month View */
.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--color-border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex: 1;
}

.month-day-header {
    background: var(--color-bg);
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 14px;
}

.month-day {
    background: var(--color-surface);
    padding: 8px;
    min-height: 90px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
}

.month-day:active {
    background: var(--color-bg);
}

.month-day.other-month {
    opacity: 0.35;
}

.month-day.today {
    background: var(--color-bg);
}

.month-day-number {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-align: right;
    margin-bottom: 6px;
}

.month-day.today .month-day-number {
    color: var(--color-accent);
    font-weight: 600;
}

.month-day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.month-event {
    font-size: 0.625rem;
    line-height: 1.2;
    padding: 2px 4px;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
    font-weight: 500;
}

.month-event.michael { background: var(--color-michael); }
.month-event.ashley { background: var(--color-ashley); }
.month-event.shared { background: var(--color-shared); }

.month-event-more {
    font-size: 0.5625rem;
    color: var(--color-text-muted);
    padding: 1px 4px;
}

/* Keep old dot styles for mini calendar on home */
.month-event-dot {
    height: 5px;
    border-radius: 3px;
}

.month-event-dot.michael { background: var(--color-michael); }
.month-event-dot.ashley { background: var(--color-ashley); }
.month-event-dot.shared { background: var(--color-shared); }

/* Calendar Legend */
.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding-top: 16px;
    margin-top: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-item.michael .legend-dot { background: var(--color-michael); }
.legend-item.ashley .legend-dot { background: var(--color-ashley); }
.legend-item.shared .legend-dot { background: var(--color-shared); }

/* ===========================================
   Sidebar
   =========================================== */

.sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

/* ===========================================
   To-Do Section
   =========================================== */

.todo-section {
    flex: 1;
}

.add-btn {
    padding: 14px 28px;
    border: none;
    background: var(--color-accent);
    color: white;
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    box-sizing: border-box;
    height: 48px; /* Consistent height across all buttons */
    white-space: nowrap;
}

.add-btn:active {
    transform: scale(0.95);
    opacity: 0.9;
}

.add-btn.connected {
    background: var(--color-success, #22c55e);
    cursor: default;
}

.add-btn.connected:hover {
    transform: none;
    filter: none;
}

.add-btn.small {
    padding: 8px 16px;
    font-size: 0.8125rem;
}

.todo-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border-left: 3px solid transparent;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.todo-item:active {
    transform: scale(0.99);
}

.todo-item.michael { border-left-color: var(--color-michael); }
.todo-item.ashley { border-left-color: var(--color-ashley); }
.todo-item.both { border-left-color: var(--color-shared); }

.todo-item.completed {
    opacity: 0.5;
}

.todo-checkbox {
    width: 26px;
    height: 26px;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    font-size: 0.875rem;
    color: white;
}

.todo-checkbox:active {
    transform: scale(0.9);
}

.todo-checkbox.checked {
    background: var(--color-success);
    border-color: var(--color-success);
}

.todo-checkbox.checked::after {
    content: '\2713';
    font-weight: 600;
}

.todo-content {
    flex: 1;
    min-width: 0;
}

.todo-text {
    font-size: 0.9375rem;
    color: var(--color-text-primary);
    font-weight: 400;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: var(--color-text-muted);
}

.todo-assignee {
    font-size: 0.6875rem;
    color: var(--color-text-secondary);
    margin-top: 2px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.todo-delete {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    opacity: 0;
    transition: all var(--transition-fast);
}

.todo-item:hover .todo-delete,
.todo-item:active .todo-delete {
    opacity: 0.5;
}

.todo-delete:active {
    opacity: 1;
    color: var(--color-danger);
    background: var(--color-ashley-bg);
}

/* Swipe Gesture Styles */
.todo-item-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}

.todo-item-wrapper .todo-item {
    margin-bottom: 0;
    position: relative;
    z-index: 2;
    transition: transform var(--transition-normal);
}

.todo-swipe-actions {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    z-index: 1;
}

.todo-swipe-actions.left {
    left: 0;
    padding-left: 16px;
    background: linear-gradient(90deg, var(--color-success) 0%, var(--color-success) 80%, transparent 100%);
    width: 100px;
    justify-content: flex-start;
}

.todo-swipe-actions.right {
    right: 0;
    padding-right: 16px;
    background: linear-gradient(-90deg, var(--color-danger) 0%, var(--color-danger) 80%, transparent 100%);
    width: 100px;
    justify-content: flex-end;
}

.swipe-action-icon {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.todo-item.swiping {
    transition: none;
}

.todo-item.swipe-complete {
    animation: swipeOut 0.3s ease forwards;
}

@keyframes swipeOut {
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

/* ===========================================
   Meals Section
   =========================================== */

.meals-section {
    flex: 0 0 auto; /* Don't grow, just fit content */
}

.meal-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meal-week {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.meals-grid {
    display: grid;
    grid-template-columns: auto repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 16px;
}

.meal-header {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 8px;
    text-align: center;
}

.meal-day-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-primary);
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
}

.meal-day-label .day-name {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
}

.meal-day-label .day-date {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.meal-cell {
    position: relative;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 0.875rem;
    min-height: 70px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid var(--color-border-light);
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.meal-cell:hover {
    border-color: var(--color-border);
    background: var(--color-surface);
}

.meal-cell:active {
    background: var(--color-accent);
    color: white;
}

.meal-cell.filled {
    color: var(--color-text-primary);
    font-weight: 500;
    background: var(--color-surface);
}

.meal-cell.empty {
    color: var(--color-text-muted);
    border-style: dashed;
    background: transparent;
}

.meal-cell.empty::before {
    content: '+';
    font-size: 1.25rem;
    margin-right: 6px;
    opacity: 0.5;
}

/* Today highlighting for meal planner - SUBTLE approach */
.meal-row.today {
    position: relative;
}

.meal-row.today::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--color-accent);
    border-radius: 2px;
}

.meal-day-label.today {
    color: var(--color-accent);
    font-weight: 700;
}

.meal-day-label.today .day-name {
    color: var(--color-accent);
}

.meal-cell.today {
    background: rgba(var(--color-accent-rgb, 123, 152, 184), 0.05);
}

.meal-cell.today.filled {
    font-weight: 600;
}

/* Meal Type Icon (recipe vs custom) */
.meal-type-icon {
    font-size: 0.75em;
    margin-right: 4px;
    opacity: 0.8;
}

/* ===========================================
   Meal Drag and Drop
   =========================================== */

/* Source cell being dragged */
.meal-cell.dragging {
    opacity: 0.35;
    transform: scale(0.97);
    background: var(--color-surface-elevated);
    border: 2px dashed var(--color-border);
    transition: all 0.2s ease;
}

/* Potential drop target highlight */
.meal-cell.potential-drop-target {
    border-style: dashed;
    border-color: var(--color-border);
}

/* Active drop target (empty cell) */
.meal-cell.drop-target {
    background: rgba(74, 144, 226, 0.08) !important;
    outline: 2px dashed var(--color-accent);
    outline-offset: -4px;
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.meal-cell.drop-target::after {
    content: 'Drop here';
    position: absolute;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-accent);
    background: var(--color-surface);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
}

/* Drop target with conflict (filled cell - will swap) */
.meal-cell.drop-target-conflict {
    background: rgba(220, 53, 69, 0.08) !important;
    outline: 2px solid var(--color-danger, #dc3545);
    outline-offset: -4px;
    transform: scale(1.02);
    animation: dropShake 0.4s ease-in-out;
}

@keyframes dropShake {
    0%, 100% { transform: scale(1.02) translateX(0); }
    25% { transform: scale(1.02) translateX(-3px); }
    75% { transform: scale(1.02) translateX(3px); }
}

.meal-cell.drop-target-conflict::after {
    content: 'Swap';
    position: absolute;
    right: 8px;
    top: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    background: var(--color-danger, #dc3545);
    border-radius: var(--radius-sm);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Drag preview element - lifted card effect */
.meal-drag-preview {
    position: fixed;
    transform: translate(-50%, -50%) scale(1.05) rotate(-2deg);
    background: var(--color-surface);
    border: none;
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary);
    /* Layered shadow for lifted effect */
    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.12),
        0 4px 8px rgba(0, 0, 0, 0.08),
        0 2px 4px rgba(0, 0, 0, 0.06);
    z-index: 9999;
    pointer-events: none;
    max-width: 220px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.95;
    animation: dragLift 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dragLift {
    from {
        transform: translate(-50%, -50%) scale(0.9) rotate(0deg);
        opacity: 0;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    to {
        transform: translate(-50%, -50%) scale(1.05) rotate(-2deg);
        opacity: 0.95;
        box-shadow:
            0 10px 20px rgba(0, 0, 0, 0.12),
            0 4px 8px rgba(0, 0, 0, 0.08),
            0 2px 4px rgba(0, 0, 0, 0.06);
    }
}

/* Hint text for drag and drop */
.meal-drag-hint {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}

/* ===========================================
   Meal Prep Reminders
   =========================================== */

/* Meal cell content wrapper */
.meal-cell-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.meal-name {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.3;
}

/* Meal cell with prep reminder */
.meal-cell.has-prep {
    border-color: var(--color-warning);
    border-left: 3px solid var(--color-warning);
}

/* Prep badge inline on meal cell */
/* Prep badge - pill style with proper sizing */
.meal-prep-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    color: #b45309;
    background: rgba(251, 191, 36, 0.15);
    padding: 4px 10px;
    border-radius: 20px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-theme="night"] .meal-prep-badge,
[data-theme="dark"] .meal-prep-badge {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.2);
}

/* Prep input in modal */
.prep-reminder-group {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border-light);
}

.prep-reminder-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.prep-reminder-label .prep-icon {
    font-size: 1rem;
}

.prep-reminder-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    color: var(--color-text-primary);
    font-size: 0.875rem;
    transition: border-color var(--transition-fast);
}

.prep-reminder-input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.prep-reminder-input::placeholder {
    color: var(--color-text-muted);
}

/* ===========================================
   Leftovers Selector
   =========================================== */

.leftovers-selector {
    display: flex;
    flex-direction: column;
}

.leftovers-hint {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 16px;
}

.leftovers-list {
    display: flex;
    flex-direction: column;
    max-height: 360px;
    overflow-y: auto;
    border-top: 1px solid var(--color-border-light);
}

.leftover-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: transparent;
    border-bottom: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.leftover-item:hover {
    background: var(--color-surface);
}

.leftover-item:active {
    background: var(--color-surface-elevated);
}

.leftover-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.leftover-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.leftover-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leftover-meta {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

/* ===========================================
   Meal Planning Modal Components
   =========================================== */

/* Choice Screen - 2x2 Card Grid */
.meal-choice-container {
    text-align: center;
}

.meal-choice-prompt {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 24px;
}

/* 2x2 Grid of choice cards */
.meal-choice-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Card-style choice buttons */
.meal-choice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    gap: 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.meal-choice-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
}

.meal-choice-btn:active {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.meal-choice-icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 4px;
}

.meal-choice-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meal-choice-label {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.2;
}

.meal-choice-desc {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    line-height: 1.3;
}

/* Separator for meal choice modal */
.meal-choice-separator {
    width: 100%;
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 24px 0;
}

/* Restaurant Editor */
.restaurant-editor {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recent-restaurants-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recent-restaurants-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.recent-restaurants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.restaurant-chip {
    padding: 10px 18px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.restaurant-chip:hover {
    background: var(--color-border-light);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.restaurant-chip:active {
    transform: scale(0.97);
}

/* Selected state for restaurant choice (modal-level selection) */
/* NOTE: Use .active for navigation/filters, .selected for form choices */
.restaurant-chip.selected {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

/* Dining Type Toggle */
.dining-type-wrapper {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border-light);
}

.dining-type-label {
    display: block;
    margin-bottom: 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dining-type-toggle {
    display: flex;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: 4px;
    border: 1px solid var(--color-border-light);
}

.dining-type-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dining-type-btn:hover {
    color: var(--color-text-primary);
}

.dining-type-btn.active {
    background: var(--color-surface);
    color: var(--color-accent);
    box-shadow: var(--shadow-sm);
}

.dining-type-btn:active {
    transform: scale(0.97);
}

/* Restaurant actions footer */
.restaurant-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.restaurant-actions .btn {
    flex: 1;
}

/* Recent restaurants empty state */
.recent-restaurants-empty {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    font-style: italic;
    padding: 8px 0;
}


/* Remove Meal Confirmation */
.meal-remove-confirm {
    text-align: center;
    padding: 20px 0;
}

.remove-confirm-message {
    font-size: 1.125rem;
    color: var(--color-text-primary);
    margin-bottom: 24px;
}

.remove-confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.remove-confirm-buttons .btn {
    min-width: 120px;
}

/* Recipe Selector */
.recipe-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recipe-selector-search {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: var(--color-surface);
    color: var(--color-text-primary);
}

.recipe-selector-search:focus {
    outline: none;
    border-color: var(--color-accent);
}

.recipe-selector-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recipe-selector-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.recipe-selector-item:hover {
    border-color: var(--color-accent);
    background: var(--color-border-light);
}

.recipe-selector-item:active {
    transform: scale(0.99);
}

.recipe-selector-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.recipe-selector-meta {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

/* Recipe Confirmation */
.recipe-confirm {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recipe-confirm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--color-surface);
    border-radius: var(--radius-sm);
}

.recipe-confirm-icon {
    font-size: 2rem;
}

.recipe-confirm-info {
    flex: 1;
}

.recipe-confirm-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.recipe-confirm-meta {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.recipe-ingredients-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recipe-ingredients-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

/* Left side of header: toggle checkbox + text */
.ingredients-toggle-left {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
}

.ingredients-toggle-left:hover ~ .ingredient-multiplier,
.ingredients-toggle-left:hover {
    opacity: 0.9;
}

.recipe-ingredients-header:has(.ingredients-toggle-left:hover) {
    background: var(--color-border-light);
}

.recipe-ingredients-header:has(.ingredients-toggle-left:active) {
    background: var(--color-border);
}

.recipe-ingredients-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-primary);
    white-space: nowrap;
}

/* Icon-based checkbox styling (matches grocery history) */
.ingredient-check-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--color-border);
    flex-shrink: 0;
    transition: color var(--transition-fast);
}

.ingredient-check-icon.checked,
.recipe-ingredient-item.checked .ingredient-check-icon {
    color: var(--color-success);
}

.recipe-ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
}

.recipe-ingredient-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.recipe-ingredient-item:hover {
    background: var(--color-border-light);
}

.recipe-ingredient-item:active {
    background: var(--color-border);
}

.recipe-ingredient-item.checked {
    background: var(--color-border-light);
}

.ingredient-name {
    flex: 1;
}

.recipe-confirm-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

/* Custom Meal Editor */
.custom-meal-editor {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.custom-meal-groceries {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-meal-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
}

.custom-meal-selected:empty {
    padding-top: 0;
}

.custom-meal-selected-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px 6px 12px;
    background: var(--color-accent);
    color: white;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
}

.custom-meal-selected-item .item-qty {
    font-size: 0.75rem;
    opacity: 0.85;
    margin-left: 2px;
}

.custom-meal-selected-item .item-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 4px;
    background: rgba(255,255,255,0.25);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: 0.75rem;
    line-height: 1;
    transition: background var(--transition-fast);
}

.custom-meal-selected-item .item-remove:hover {
    background: rgba(255,255,255,0.4);
}

.custom-meal-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

/* Grocery History Selector (in meal modal) */
.grocery-history-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.grocery-history-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grocery-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.grocery-history-item:hover {
    background: var(--color-border-light);
}

.grocery-history-item.selected {
    border-color: var(--color-accent);
    background: rgba(var(--color-accent-rgb, 123, 152, 184), 0.15);
}

.grocery-history-check {
    width: 20px;
    font-size: 1rem;
    color: var(--color-border);
}

.grocery-history-item.selected .grocery-history-check {
    color: var(--color-success);
}

.grocery-history-name {
    flex: 1;
    font-size: 1rem;
    color: var(--color-text-primary);
}

.grocery-history-count {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.grocery-history-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

/* Grocery Section */
.grocery-section {
    border-top: 1px solid var(--color-border-light);
    padding-top: 16px;
    margin-top: 8px;
}

.grocery-section h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grocery-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.grocery-list {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
    flex: 1;
    min-height: 60px;
    overflow-y: auto;
    padding: 8px 0;
}

.grocery-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    font-size: 1rem;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 48px;
    user-select: none;
}

.grocery-item:active {
    transform: scale(0.98);
    background: var(--color-border-light);
}

.grocery-item.checked {
    opacity: 0.5;
}

.grocery-item.checked .item-name {
    text-decoration: line-through;
}

.grocery-item .check-icon {
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: white;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.grocery-item.checked .check-icon {
    background: var(--color-success);
    border-color: var(--color-success);
}

.grocery-item .item-name {
    /* No flex-grow - keeps quantity badge close to the name */
}

.grocery-item .quantity-badge {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 22px;
    height: 22px;
    background: var(--color-accent);
    color: white;
    border-radius: 11px;
    padding: 0 6px;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.grocery-item.checked .quantity-badge {
    background: var(--color-text-muted);
}

/* ===========================================
   Modal
   =========================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transition: opacity 60ms ease-out, visibility 60ms ease-out;
}

.modal-overlay.hidden {
    display: flex !important; /* Override generic .hidden */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transform: scale(1) translateY(0);
    opacity: 1;
    transition: transform 75ms ease-out, opacity 75ms ease-out;
}

.modal-overlay.hidden .modal {
    transform: scale(0.96) translateY(8px);
    opacity: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px 20px;
    flex-shrink: 0;
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 500;
    color: var(--color-text-primary);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.close-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border: none;
    background: var(--color-bg);
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    overflow: visible;
    flex-shrink: 0;
}

.close-btn svg {
    width: 16px;
    height: 16px;
    overflow: visible;
    flex-shrink: 0;
}

.close-btn:active {
    background: var(--color-border);
}

.modal-body {
    padding: 0 28px 24px;
    transition: opacity var(--transition-normal);
    flex: 1;
    overflow-y: auto;
}

.modal-body.fade-out {
    opacity: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--color-text-primary);
    background: var(--color-bg);
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-accent);
}

.assignee-options {
    display: flex;
    gap: 10px;
}

.assignee-option {
    flex: 1;
    padding: 14px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.assignee-option:active {
    transform: scale(0.98);
}

/* Selected state for assignee options (modal-level selection in media tracker) */
/* NOTE: Use .active for navigation/filters, .selected for form choices */
.assignee-option.selected {
    border-color: var(--color-accent);
    background: var(--color-michael-bg);
    color: var(--color-accent);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 28px;
    background: var(--color-bg);
    flex-shrink: 0;
}

/* Split footer layout (e.g., Recipe modal with grocery btn on left) */
.modal-footer-actions {
    display: flex;
    gap: 12px;
}

.modal-footer:has(.modal-footer-actions) {
    justify-content: space-between;
}

/* Modal Header Actions - grouped container for edit/delete/close */
.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.modal-header-actions .close-btn {
    color: var(--color-text-secondary);
}

.modal-header-actions .close-btn:hover {
    color: var(--color-text-primary);
    background: var(--color-surface);
}

.modal-header-actions .modal-header-action-danger:hover {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Recipe modal footer - full width buttons */
.modal-footer .btn {
    flex: 1;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-sizing: border-box;
    height: 48px; /* Consistent height across all buttons */
    white-space: nowrap; /* Prevent text wrapping */
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--color-accent);
    color: white;
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-secondary.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

/* Confirmation Modal */
.confirm-modal {
    max-width: 420px;
}

.confirm-modal-body {
    padding: 32px 28px 24px;
    text-align: center;
}

.confirm-modal-body h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text-primary);
    margin: 0;
    line-height: 1.4;
}

.confirm-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 28px;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border-light);
}

.confirm-modal-footer .btn {
    flex: 1;
    padding: 14px 16px; /* Reduced horizontal padding to fit text */
}

/* ===========================================
   Night Theme Modal Adjustments
   =========================================== */

/* Modal container - add border and enhanced shadow for depth */
[data-theme="night"] .modal {
    border: 1px solid var(--color-border);
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.4),
        0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

/* Primary button - deeper, muted teal */
[data-theme="night"] .btn-primary {
    background-color: #319795;
}

[data-theme="night"] .btn-primary:hover,
[data-theme="night"] .btn-primary:active {
    background-color: #2C7A7B;
}

/* Secondary button - tonal, uses elevated surface */
[data-theme="night"] .btn-secondary {
    background-color: var(--color-surface-elevated);
    border-color: var(--color-border-light);
}

[data-theme="night"] .btn-secondary:hover,
[data-theme="night"] .btn-secondary:active {
    background-color: #718096;
}

/* Danger button - clear red, not neon */
[data-theme="night"] .btn-danger {
    background-color: #E53E3E;
}

[data-theme="night"] .btn-danger:hover,
[data-theme="night"] .btn-danger:active {
    background-color: #C53030;
}

/* Success button - muted green */
[data-theme="night"] .btn-success {
    background-color: #38A169;
}

[data-theme="night"] .btn-success:hover,
[data-theme="night"] .btn-success:active {
    background-color: #2F855A;
}

/* Ingredient list - use borders instead of dark backgrounds */
[data-theme="night"] .recipe-ingredients-list {
    background: transparent;
    border: 1px solid var(--color-border);
}

[data-theme="night"] .recipe-ingredient-item {
    border-bottom: 1px solid var(--color-border);
}

[data-theme="night"] .recipe-ingredient-item:last-child {
    border-bottom: none;
}

[data-theme="night"] .recipe-ingredient-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Form inputs in night mode - softer borders */
[data-theme="night"] .form-group input,
[data-theme="night"] .form-group textarea,
[data-theme="night"] .form-group select {
    border-color: var(--color-border);
}

[data-theme="night"] .form-group input:focus,
[data-theme="night"] .form-group textarea:focus,
[data-theme="night"] .form-group select:focus {
    border-color: #9F7AEA;
}

/* Close button in night mode */
[data-theme="night"] .close-btn {
    background: var(--color-surface-elevated);
}

[data-theme="night"] .close-btn:hover,
[data-theme="night"] .close-btn:active {
    background: var(--color-border);
}

/* Modal footer in night mode */
[data-theme="night"] .modal-footer,
[data-theme="night"] .confirm-modal-footer {
    background: var(--color-bg);
    border-top-color: var(--color-border);
}

/* ===========================================
   Event Popup
   =========================================== */

.event-popup {
    position: fixed;
    z-index: 999;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow-xl);
    min-width: 260px;
    animation: popIn 200ms ease;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.event-popup-content {
    position: relative;
}

.event-popup h4 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 8px;
    padding-right: 36px;
}

.event-popup p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.event-popup .close-btn {
    position: absolute;
    top: -4px;
    right: -8px;
    width: 28px;
    height: 28px;
    font-size: 1rem;
}

/* ===========================================
   Utility Classes
   =========================================== */

.hidden {
    display: none !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

/* ===========================================
   Unified Empty State Pattern
   Consistent icon + heading + paragraph structure
   =========================================== */

/* Base empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-state.compact {
    padding: 20px;
}

/* Empty state icon (emoji) */
.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state.compact .empty-state-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

/* Empty state heading */
.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

/* Empty state body text */
.empty-state p {
    font-size: 1rem;
    margin: 0;
}

.empty-state.compact p {
    font-size: 0.875rem;
}

/* Empty state hint (optional subtext) */
.empty-state-hint {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    opacity: 0.8;
    margin-top: 8px;
    font-style: italic;
}

/* Meal Suggestions - Quick pick buttons */
.meal-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meal-suggestion {
    flex: 0 0 auto;
    padding: 10px 16px;
}

/* Preview more - full width variant */
.preview-more.full-width {
    width: 100%;
}

/* Modal hint text */
.modal-hint {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    margin-top: 8px;
}

/* History Modal Styles */
.history-search {
    margin-bottom: 12px;
}

.history-search input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text-primary);
}

.history-search input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.sort-toggle {
    display: flex;
    background: var(--color-border);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 12px;
}

/* Sort toggle buttons - scoped to .sort-toggle to avoid conflict with Calendar .toggle-btn */
.sort-toggle .toggle-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.sort-toggle .toggle-btn:hover {
    color: var(--color-text-primary);
}

.sort-toggle .toggle-btn.active {
    background: var(--color-surface);
    color: var(--color-accent);
    box-shadow: var(--shadow-sm);
}

.history-list-container {
    max-height: 40vh;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-top: 8px;
}

.history-list {
    display: flex;
    flex-direction: column;
}

.history-group-header {
    padding: 10px 16px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-border-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: background var(--transition-fast);
    gap: 12px;
    min-height: 56px;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item:hover {
    background: var(--color-border-light);
}

.history-item:active {
    background: var(--color-border);
}

.history-item-check {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--color-border);
    flex-shrink: 0;
}

.history-item.added-persistent .history-item-check {
    color: var(--color-success);
}

.history-item-rank {
    width: 32px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.history-item-name {
    flex: 1;
    font-size: 1.0625rem;
    color: var(--color-text-primary);
}

.history-item-meta {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

/* Quantity controls for added items */
.history-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.history-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.history-qty-btn:hover {
    background: var(--color-border-light);
}

.history-qty-btn:active {
    transform: scale(0.9);
    background: var(--color-border);
}

.history-qty-plus {
    background: var(--color-accent);
    color: white;
}

.history-qty-plus:hover {
    opacity: 0.9;
}

.history-qty-value {
    min-width: 24px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

/* Persistent added state - item on grocery list (still tappable for toggle) */
.history-item.added-persistent {
    background: var(--color-border-light);
}

.history-item.added-persistent .history-item-check {
    color: var(--color-success);
}

.history-item.added-persistent:hover {
    background: var(--color-border);
}

.history-item.added-persistent:active {
    background: var(--color-surface);
}

/* Full width button variant */
.btn.btn-block {
    width: 100%;
    margin-top: 10px;
}

/* Loading Animation */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--color-text-secondary);
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 12px;
}

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

/* ===========================================
   Old class compatibility (for existing HTML)
   =========================================== */

.header {
    display: none; /* Hide old header, we use hero now */
}

.calendar-panel,
.todo-section,
.meals-section {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
}

.calendar-panel {
    flex: 0 0 58%;
    min-height: 0;
    overflow: hidden;
}

.sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ===========================================
   Mini Month Calendar (Home Screen Preview)
   Premium Skylight-Style Design
   =========================================== */

.mini-calendar-month {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mini-calendar-header {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.mini-calendar-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
}

.mini-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    /* 1 header row (auto) + 6 day rows (equal height) */
    grid-template-rows: auto repeat(6, 1fr);
    gap: 6px;
    flex: 1;
    min-height: 0;
    height: 100%;
}

.mini-month-day-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 4px;
}

.mini-month-day {
    background: var(--color-bg);
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-fast);
    overflow: hidden;
}

/* Only apply hover on devices with mouse/pointer hover capability */
@media (hover: hover) {
    .mini-month-day:not(.other-month):hover {
        background: var(--color-surface-elevated);
        border-color: var(--color-accent);
    }
}

.mini-month-day.other-month {
    opacity: 0.3;
    pointer-events: none;
}

.mini-month-day-number {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-primary);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

/* Today gets a circular accent highlight on the number */
.mini-month-day.today .mini-month-day-number {
    background: var(--color-accent);
    color: white;
    font-weight: 500;
}

.mini-month-day-dots {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
    height: 8px;
}

.mini-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-shared);
}

.mini-dot.michael {
    background: var(--color-michael);
}

.mini-dot.ashley {
    background: var(--color-ashley);
}

.mini-dot.shared {
    background: var(--color-shared);
}

/* ===========================================
   Responsive - Portrait Orientation
   =========================================== */

@media (orientation: portrait) {
    html, body {
        overflow-y: auto;
        overflow-x: hidden;
    }

    .dashboard {
        height: auto;
        min-height: 100vh;
        padding: 16px 20px;
        padding-bottom: 120px; /* Space for fixed bottom nav + breathing room */
        gap: 16px;
    }

    /* Hero Section - Compact for Portrait */
    .hero {
        flex-direction: column;
        gap: 16px;
        padding: 16px 20px;
    }

    /* Hide stats tiles in portrait to save space */
    .hero-center {
        display: none;
        text-align: center;
    }

    .hero-left {
        align-items: center;
    }

    .hero-greeting {
        font-size: 2rem;
    }

    .hero-date {
        font-size: 1rem;
    }

    .hero-center {
        width: 100%;
        justify-content: center;
        gap: 16px;
        flex-wrap: wrap;
    }

    .hero-stat {
        padding: 12px 24px;
        width: 135px;
        flex: 0 0 auto;
    }

    .hero-stat-value {
        font-size: 1rem;
    }

    .hero-stat-label {
        font-size: 0.625rem;
    }

    .hero-right {
        text-align: center;
    }

    .hero-time {
        font-size: 3rem;
    }

    .hero-ampm {
        font-size: 1.25rem;
    }

    /* Main Content - Stack Vertically and fill space */
    .main-content {
        flex: 1;
        flex-direction: column;
        gap: 16px;
        min-height: 0;
    }

    /* Calendar Panel - Prominent in Portrait */
    .calendar-panel {
        flex: none;
        width: 100%;
        min-height: 42vh; /* Calendar is the primary feature - give it prominence */
    }

    /* Mini Month Calendar Portrait Adjustments */
    .mini-calendar-header {
        margin-bottom: 1rem;
    }

    .mini-calendar-title {
        font-size: 1.375rem;
    }

    .mini-month-grid {
        gap: 4px;
    }

    .mini-month-day-header {
        font-size: 0.5625rem;
        padding: 6px 2px;
    }

    .mini-month-day {
        padding: 6px 4px;
        gap: 4px;
    }

    .mini-month-day-number {
        font-size: 0.875rem;
        width: 1.75rem;
        height: 1.75rem;
    }

    .mini-dot {
        width: 5px;
        height: 5px;
    }

    .mini-month-day-dots {
        gap: 3px;
        height: 6px;
    }

    .panel-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .panel-header h2 {
        font-size: 1.25rem;
    }

    /* Week View Adjustments */
    .week-grid {
        gap: 6px;
    }

    .day-column {
        padding: 10px 6px;
    }

    .day-name {
        font-size: 0.5625rem;
    }

    .day-number {
        font-size: 1.25rem;
    }

    .day-column.today .day-number {
        width: 36px;
        height: 36px;
    }

    .event {
        padding: 6px 8px;
        font-size: 0.6875rem;
    }

    .event-time {
        font-size: 0.5625rem;
    }

    /* Month View Adjustments */
    .month-day {
        min-height: 60px;
        padding: 6px;
    }

    .month-day-number {
        font-size: 0.75rem;
    }

    .calendar-legend {
        gap: 16px;
        flex-wrap: wrap;
    }

    .legend-item {
        font-size: 0.6875rem;
    }

    /* Sidebar - Full Width and expand to fill */
    .sidebar {
        flex: 1;
        width: 100%;
        gap: 16px;
        min-height: 0;
    }

    /* To-Do Section - Expand to fill space in Portrait */
    .todo-section {
        flex: 1;
        min-height: 0;
    }

    .todo-item {
        padding: 12px 14px;
        gap: 10px;
    }

    .todo-checkbox {
        width: 24px;
        height: 24px;
    }

    .todo-text {
        font-size: 0.875rem;
    }

    .todo-assignee {
        font-size: 0.625rem;
    }

    /* Meals Section - Compact, only takes space needed */
    .meals-section {
        flex: 0 0 auto; /* Don't grow, just fit content */
        min-height: 0;
    }

    .meals-grid {
        gap: 4px;
    }

    .meal-header {
        font-size: 0.5625rem;
        padding: 6px;
    }

    .meal-day-label {
        font-size: 0.6875rem;
        padding: 8px 4px;
    }

    .meal-cell {
        padding: 6px 4px;
        font-size: 0.625rem;
        min-height: 32px;
    }

    /* Hide sidebar on portrait - not enough space */
    .meal-sidebar {
        display: none;
    }

    .meal-plan-layout {
        flex-direction: column;
    }

    .meals-grid-full {
        grid-template-columns: 70px repeat(3, 1fr);
        gap: 6px;
    }

    .meal-day-label .day-name {
        font-size: 0.5rem;
    }

    .meal-day-label .day-date {
        font-size: 0.75rem;
    }

    .meal-cell.empty::before {
        display: none; /* Hide + on portrait */
    }

    .grocery-list {
        gap: 6px;
    }

    .grocery-item {
        padding: 8px 12px;
        font-size: 0.9rem;
        min-height: 40px;
    }

    .grocery-item .check-icon {
        width: 20px;
        height: 20px;
        font-size: 0.625rem;
    }

    .grocery-item .quantity-badge {
        min-width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }

    /* Modal Adjustments */
    .modal {
        width: 95%;
        max-width: none;
        margin: 16px;
    }

    .modal-header {
        padding: 20px 20px 16px;
    }

    .modal-header h3 {
        font-size: 1.25rem;
    }

    .modal-body {
        padding: 0 20px 20px;
    }

    .modal-footer {
        padding: 16px 20px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.875rem;
    }

    /* Navigation Buttons */
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .nav-btn.small {
        width: 28px;
        height: 28px;
        font-size: 0.875rem;
    }

    .add-btn {
        padding: 12px 20px;
        font-size: 0.875rem;
    }
}

/* ===========================================
   Extra Small Portrait (phones)
   =========================================== */

@media (orientation: portrait) and (max-width: 600px) {
    .dashboard {
        padding: 12px 16px;
        gap: 12px;
    }

    .hero {
        padding: 16px 20px;
        gap: 16px;
    }

    .hero-greeting {
        font-size: 1.75rem;
    }

    .hero-center {
        gap: 8px;
    }

    .hero-stat {
        padding: 10px 18px;
        width: 112px;
    }

    .hero-time {
        font-size: 2.5rem;
    }

    .panel-header h2 {
        font-size: 1.125rem;
    }

    .week-label, .month-label {
        font-size: 1rem;
        min-width: 160px;
    }

    .day-name {
        font-size: 0.5rem;
    }

    .day-number {
        font-size: 1rem;
    }

    .day-column.today .day-number {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }

    .todo-section,
    .meals-section {
        min-height: 250px;
    }
}

/* ===========================================
   Hero Special Message
   =========================================== */

.hero-special-message {
    font-size: 0.95rem;
    font-weight: 500;
    font-style: italic;
    color: var(--color-accent);
    margin-top: 6px;
    display: block;
}

.hero-special-message.hidden {
    display: none;
}

/* ===========================================
   List Selector & Dropdown
   =========================================== */

.list-selector {
    position: relative;
    margin-left: auto;
}

.list-selector-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: var(--nav-font-size);
    font-weight: var(--nav-font-weight);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 160px;
}

.list-selector-btn:active {
    background: var(--color-border);
    transform: scale(0.98);
}

.dropdown-arrow {
    font-size: 0.625rem;
    color: var(--color-text-muted);
    margin-left: auto;
    transition: transform var(--transition-fast);
}

.list-selector-btn.open .dropdown-arrow {
    transform: rotate(180deg);
}

.list-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    max-height: 300px;
    overflow-y: auto;
    animation: dropdownIn 75ms ease;
}

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

.list-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--color-border-light);
}

.list-option:last-child {
    border-bottom: none;
}

.list-option:hover,
.list-option:active {
    background: var(--color-bg);
}

.list-option.active {
    background: var(--color-michael-bg);
    color: var(--color-accent);
}

.list-option-name {
    font-weight: 500;
}

.list-option-count {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    background: var(--color-bg);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

/* ===========================================
   List Actions Bar
   =========================================== */

.list-actions-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-light);
}

.btn-small {
    padding: 8px 14px;
    font-size: 0.8125rem;
}

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

.btn-danger:hover,
.btn-danger:active {
    opacity: 0.9;
}

.btn-success {
    background: var(--color-success);
    color: white;
}

.btn-success:hover,
.btn-success:active {
    opacity: 0.9;
}

/* ===========================================
   Recipes Screen
   =========================================== */

.recipes-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 4px;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding-top: 4px; /* Space for card hover/active translateY(-4px) lift effect */
    padding-bottom: 20px;
}

.recipe-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid var(--color-border-light);
}

.recipe-card:hover,
.recipe-card:active {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
}

.recipe-card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recipe-name {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.3;
}

.recipe-meta {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

.recipe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.recipe-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.recipe-ingredients-count {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* Recipes Header (matches grocery-header pattern) */
.recipes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-light);
}

.recipes-header h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
}

.recipe-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.recipe-search-box {
    width: 220px;
}

.recipe-search-box input {
    width: 100%;
    height: 48px; /* Consistent height with buttons */
    padding: 0 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    background: var(--color-bg);
    color: var(--color-text-primary);
    transition: border-color var(--transition-fast);
    box-sizing: border-box;
}

.recipe-search-box input:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* Recipe card states for What Can I Make */
.recipe-card.can-make {
    border-color: var(--color-success, #22c55e);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, transparent 100%);
}

.recipe-card.can-make::before {
    content: '✓ Ready to make';
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    background: var(--color-success, #22c55e);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.recipe-card.almost-there .missing-ingredients {
    display: block;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border-light);
}

.missing-ingredients {
    display: none;
}

.missing-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.missing-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.missing-chip {
    padding: 4px 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--color-danger, #ef4444);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.missing-chip:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--color-danger, #ef4444);
}

/* Recipe View Modal */
.recipe-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recipe-view-meta {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.recipe-view-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recipe-section {
    margin-top: 24px;
}

/* Larger gap between consecutive sections (e.g., Ingredients → Instructions) */
.recipe-section + .recipe-section {
    margin-top: 32px;
}

.recipe-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 12px 0;
}

.recipe-ingredients-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recipe-ingredients-list li {
    padding: 12px 20px;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 0.9375rem;
}

.recipe-ingredients-list li:last-child {
    border-bottom: none;
}

.ing-qty,
.ing-unit {
    color: var(--color-text-secondary);
    margin-right: 4px;
}

.ing-name {
    color: var(--color-text-primary);
    font-weight: 500;
}

/* Ingredient Multiplier Control */
.ingredient-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ingredient-header h4 {
    margin: 0;
}

.ingredient-multiplier {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-multiplier {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-primary);
    font-size: 1.25rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-multiplier:hover {
    background: var(--color-surface-elevated);
    border-color: var(--color-accent);
}

.btn-multiplier:active {
    transform: scale(0.92);
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

.multiplier-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    min-width: 30px;
    text-align: center;
}

.recipe-instructions {
    font-size: 0.9375rem;
    color: var(--color-text-primary);
    line-height: 1.7;
}

/* Recipe Form */
.recipe-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-group.half {
    flex: 1;
}

.ingredients-builder {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.ingredient-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ingredient-row input {
    padding: 10px 12px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    background: var(--color-bg);
    color: var(--color-text-primary);
}

.ingredient-row input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--color-danger);
    color: white;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.btn-icon:active {
    transform: scale(0.92);
    opacity: 0.8;
}

/* ===========================================
   Quick-Add Chips (Smart Grocery)
   =========================================== */

.quick-add-section {
    margin-bottom: 16px;
}

.quick-add-section label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quick-add-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-add-chip {
    padding: 8px 14px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    font-family: var(--font-primary);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-add-chip:active {
    transform: scale(0.96);
}

.quick-add-chip:hover {
    border-color: var(--color-accent);
    background: var(--color-michael-bg);
}

.quick-add-chip.added {
    background: var(--color-success);
    color: white;
    border-color: var(--color-success);
}

/* ===========================================
   Cook Mode - Full Screen Recipe Steps
   =========================================== */

/* Cook Mode - Full Screen Two-Column Layout */
.cook-mode-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    z-index: 10000;
    overflow: hidden;
}

.cook-mode {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

/* Header - Recipe info and progress */
.cook-mode-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 24px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
}

.cook-mode-exit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.cook-mode-exit:hover {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: white;
}

.cook-mode-exit svg {
    flex-shrink: 0;
}

.cook-mode-title-section {
    flex: 1;
    min-width: 0;
}

.cook-mode-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cook-mode-meta {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.cook-mode-tags {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.cook-mode-tag {
    padding: 2px 10px;
    background: var(--color-surface-elevated);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.cook-mode-progress-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 150px;
}

.cook-mode-progress {
    width: 100%;
    height: 8px;
    background: var(--color-surface-elevated);
    border-radius: 4px;
    overflow: hidden;
}

.cook-mode-progress-bar {
    height: 100%;
    background: var(--color-success);
    border-radius: 4px;
    transition: width 0.3s ease-out;
}

.cook-mode-progress-text {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Two-column body */
.cook-mode-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Ingredients Panel (Left) */
.cook-mode-ingredients-panel {
    width: 35%;
    min-width: 280px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border-light);
}

.cook-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border-light);
}

.cook-panel-header h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

/* Multiplier buttons */
.cook-multiplier {
    display: flex;
    gap: 4px;
}

.cook-multiplier-btn {
    padding: 6px 12px;
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cook-multiplier-btn:hover {
    background: var(--color-bg);
}

/* Active state for cook mode multiplier (follows filter-chip visual pattern) */
/* NOTE: Use .active for navigation/filters, .selected for form choices */
.cook-multiplier-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

/* Ingredients list */
.cook-ingredients-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.cook-ingredient-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cook-ingredient-item:hover {
    background: var(--color-surface-elevated);
}

.cook-ingredient-item.completed {
    opacity: 0.5;
}

.cook-ingredient-check {
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: transparent;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.cook-ingredient-check.checked {
    background: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

.cook-ing-qty {
    font-weight: 600;
    color: var(--color-text-primary);
    min-width: 40px;
}

.cook-ing-unit {
    color: var(--color-text-secondary);
    margin-right: 4px;
}

.cook-ing-name {
    color: var(--color-text-primary);
}

/* Steps Panel (Right) */
.cook-mode-steps-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cook-steps-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.cook-step-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    margin-bottom: 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cook-step-item:hover {
    border-color: var(--color-border);
}

.cook-step-item.current {
    border-left: 4px solid var(--color-accent);
    background: var(--color-surface-elevated);
}

.cook-step-item.completed {
    opacity: 0.5;
    border-left: 4px solid var(--color-success);
}

.cook-step-check {
    width: 36px;
    height: 36px;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.cook-step-check.checked {
    background: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

.cook-step-content {
    flex: 1;
    min-width: 0;
}

.cook-step-text {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--color-text-primary);
}

/* Inline timer button */
.cook-timer-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 4px 12px;
    background: var(--color-accent);
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    vertical-align: middle;
}

.cook-timer-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

/* Footer */
.cook-mode-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border-light);
}

.cook-footer-left,
.cook-footer-right {
    flex: 1;
}

.cook-footer-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.cook-footer-right {
    display: flex;
    justify-content: flex-end;
}

.cook-wake-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.cook-wake-indicator svg {
    color: var(--color-warning);
}

/* Timer display in footer */
.cook-timer-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.cook-timer-display.hidden {
    display: none;
}

.cook-timer-display.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.cook-timer-display.timer-complete {
    animation: timer-flash 0.5s ease-in-out infinite;
    background: var(--color-success);
    border-color: var(--color-success);
}

@keyframes timer-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.cook-timer-time {
    font-family: var(--font-mono, monospace);
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    min-width: 60px;
}

.cook-timer-control {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.cook-timer-control:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Next step button */
.cook-next-btn {
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    min-width: 160px;
}

.cook-next-btn.all-done {
    background: var(--color-success);
}

.cook-next-btn:disabled {
    background: var(--color-success);
    opacity: 1;
}

/* Portrait/Mobile Layout */
@media (max-width: 900px), (orientation: portrait) {
    .cook-mode-header {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 16px;
    }

    .cook-mode-exit {
        padding: 10px 16px;
    }

    .cook-mode-title-section {
        order: 2;
        flex-basis: 100%;
    }

    .cook-mode-progress-container {
        order: 1;
        flex: 1;
        min-width: auto;
    }

    .cook-mode-title {
        font-size: 1.25rem;
    }

    .cook-mode-body {
        flex-direction: column;
    }

    .cook-mode-ingredients-panel {
        width: 100%;
        max-width: none;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid var(--color-border-light);
    }

    .cook-mode-steps-panel {
        flex: 1;
        min-height: 0;
    }

    .cook-steps-list {
        padding: 12px 16px;
    }

    .cook-step-item {
        padding: 16px;
    }

    .cook-step-text {
        font-size: 1rem;
    }

    .cook-mode-footer {
        padding: 12px 16px;
        gap: 8px;
    }

    .cook-wake-indicator {
        font-size: 0;
    }

    .cook-wake-indicator svg {
        font-size: 16px;
    }

    .cook-next-btn {
        padding: 12px 20px;
        min-width: 120px;
    }
}

/* ===========================================
   Special Day Themes
   =========================================== */

/* Michael's Birthday - Green Theme */
[data-special-theme="birthday-michael"] .hero {
    background: linear-gradient(135deg, #5A9B7C 0%, #4A8B6C 50%, #3A7B5C 100%);
}

[data-special-theme="birthday-michael"] .hero-greeting,
[data-special-theme="birthday-michael"] .hero-time,
[data-special-theme="birthday-michael"] .hero-date,
[data-special-theme="birthday-michael"] .hero-stat-value,
[data-special-theme="birthday-michael"] .hero-stat-label,
[data-special-theme="birthday-michael"] .hero-ampm {
    color: white !important;
}

[data-special-theme="birthday-michael"] .hero-stat {
    background: rgba(255, 255, 255, 0.2);
}

[data-special-theme="birthday-michael"] .hero-special-message {
    color: rgba(255, 255, 255, 0.9);
}

/* Ashley's Birthday - Purple Theme */
[data-special-theme="birthday-ashley"] .hero {
    background: linear-gradient(135deg, #9B7BB8 0%, #8B6BA8 50%, #7B5B98 100%);
}

[data-special-theme="birthday-ashley"] .hero-greeting,
[data-special-theme="birthday-ashley"] .hero-time,
[data-special-theme="birthday-ashley"] .hero-date,
[data-special-theme="birthday-ashley"] .hero-stat-value,
[data-special-theme="birthday-ashley"] .hero-stat-label,
[data-special-theme="birthday-ashley"] .hero-ampm {
    color: white !important;
}

[data-special-theme="birthday-ashley"] .hero-stat {
    background: rgba(255, 255, 255, 0.2);
}

[data-special-theme="birthday-ashley"] .hero-special-message {
    color: rgba(255, 255, 255, 0.9);
}

/* Anniversary - Pink/Gold Romantic Theme */
[data-special-theme="anniversary"] .hero {
    background: linear-gradient(135deg, #E8B4B8 0%, #D4A0A4 50%, #C08B90 100%);
}

[data-special-theme="anniversary"] .hero-greeting,
[data-special-theme="anniversary"] .hero-time,
[data-special-theme="anniversary"] .hero-date,
[data-special-theme="anniversary"] .hero-stat-value,
[data-special-theme="anniversary"] .hero-stat-label,
[data-special-theme="anniversary"] .hero-ampm {
    color: #4A3035 !important;
}

[data-special-theme="anniversary"] .hero-stat {
    background: rgba(255, 255, 255, 0.4);
}

[data-special-theme="anniversary"] .hero-special-message {
    color: #4A3035;
}

/* Valentine's Day - Red/Pink Theme */
[data-special-theme="valentines"] .hero {
    background: linear-gradient(135deg, #E57373 0%, #D46A6A 50%, #C45C5C 100%);
}

[data-special-theme="valentines"] .hero-greeting,
[data-special-theme="valentines"] .hero-time,
[data-special-theme="valentines"] .hero-date,
[data-special-theme="valentines"] .hero-stat-value,
[data-special-theme="valentines"] .hero-stat-label,
[data-special-theme="valentines"] .hero-ampm {
    color: white !important;
}

[data-special-theme="valentines"] .hero-stat {
    background: rgba(255, 255, 255, 0.2);
}

[data-special-theme="valentines"] .hero-special-message {
    color: rgba(255, 255, 255, 0.9);
}

/* Christmas - Red/Green Theme */
[data-special-theme="christmas"] .hero {
    background: linear-gradient(135deg, #C45C5C 0%, #A84848 25%, #2D5A3D 75%, #1E4A2D 100%);
}

[data-special-theme="christmas"] .hero-greeting,
[data-special-theme="christmas"] .hero-time,
[data-special-theme="christmas"] .hero-date,
[data-special-theme="christmas"] .hero-stat-value,
[data-special-theme="christmas"] .hero-stat-label,
[data-special-theme="christmas"] .hero-ampm {
    color: white !important;
}

[data-special-theme="christmas"] .hero-stat {
    background: rgba(255, 255, 255, 0.2);
}

[data-special-theme="christmas"] .hero-special-message {
    color: rgba(255, 255, 255, 0.9);
}

/* Thanksgiving - Orange/Brown Theme */
[data-special-theme="thanksgiving"] .hero {
    background: linear-gradient(135deg, #D4A574 0%, #C49464 50%, #A47850 100%);
}

[data-special-theme="thanksgiving"] .hero-greeting,
[data-special-theme="thanksgiving"] .hero-time,
[data-special-theme="thanksgiving"] .hero-date,
[data-special-theme="thanksgiving"] .hero-stat-value,
[data-special-theme="thanksgiving"] .hero-stat-label,
[data-special-theme="thanksgiving"] .hero-ampm {
    color: #3A2810 !important;
}

[data-special-theme="thanksgiving"] .hero-stat {
    background: rgba(255, 255, 255, 0.35);
}

[data-special-theme="thanksgiving"] .hero-special-message {
    color: #3A2810;
}

/* Easter (Western/Catholic) - Pastel Theme */
[data-special-theme="easter"] .hero {
    background: linear-gradient(135deg, #B8E0D2 0%, #D6EADF 25%, #EAD8E8 75%, #E8C8D4 100%);
}

[data-special-theme="easter"] .hero-greeting,
[data-special-theme="easter"] .hero-time,
[data-special-theme="easter"] .hero-date,
[data-special-theme="easter"] .hero-stat-value,
[data-special-theme="easter"] .hero-stat-label,
[data-special-theme="easter"] .hero-ampm {
    color: #4A5568 !important;
}

[data-special-theme="easter"] .hero-stat {
    background: rgba(255, 255, 255, 0.5);
}

[data-special-theme="easter"] .hero-special-message {
    color: #4A5568;
}

/* Orthodox Easter - Gold/Blue Theme */
[data-special-theme="easter-orthodox"] .hero {
    background: linear-gradient(135deg, #D4AF37 0%, #C9A227 25%, #4A6FA5 75%, #3A5F95 100%);
}

[data-special-theme="easter-orthodox"] .hero-greeting,
[data-special-theme="easter-orthodox"] .hero-time,
[data-special-theme="easter-orthodox"] .hero-date,
[data-special-theme="easter-orthodox"] .hero-stat-value,
[data-special-theme="easter-orthodox"] .hero-stat-label,
[data-special-theme="easter-orthodox"] .hero-ampm {
    color: white !important;
}

[data-special-theme="easter-orthodox"] .hero-stat {
    background: rgba(255, 255, 255, 0.2);
}

[data-special-theme="easter-orthodox"] .hero-special-message {
    color: rgba(255, 255, 255, 0.9);
}

/* ===========================================
   Theme Tester (DEV ONLY)
   Hidden for production - remove display:none to re-enable for testing
   =========================================== */

.theme-tester {
    display: none; /* Hidden - remove this line to show theme tester */
    background: rgba(0, 0, 0, 0.8);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin: 0 24px 16px 24px;
    color: white;
    font-size: 0.75rem;
}

.theme-tester.collapsed .theme-tester-content {
    display: none;
}

.theme-tester-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.theme-tester-header span {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.theme-tester-header button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.6875rem;
}

.theme-tester-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.theme-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.theme-group label {
    font-weight: 500;
    margin-right: 8px;
    min-width: 100px;
}

.theme-group button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.6875rem;
    transition: all var(--transition-fast);
}

.theme-group button:hover {
    background: rgba(255, 255, 255, 0.25);
}

.theme-group button:active {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0.95);
}

/* ===========================================
   Form Select Styling
   =========================================== */

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238A8886' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Modal scrollable content handled in main modal styles above */

/* ===========================================
   Responsive Additions for New Features
   =========================================== */

@media (orientation: portrait) {
    /* List selector */
    .list-selector {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
    }

    .list-selector-btn {
        width: 100%;
    }

    .list-actions-bar {
        flex-wrap: wrap;
    }

    /* Recipes grid */
    .recipes-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 12px;
    }

    .recipe-card {
        padding: 16px;
    }

    .recipe-name {
        font-size: 1rem;
    }

    .recipe-search-box {
        max-width: none;
        width: 100%;
        margin-bottom: 8px;
    }

    /* Form rows stack on mobile */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    /* Ingredient builder */
    .ingredient-row {
        flex-wrap: wrap;
    }

    .ingredient-row input[style*="width: 60px"],
    .ingredient-row input[style*="width: 70px"] {
        width: 45% !important;
        flex: 0 0 45%;
    }

    .ingredient-row input[style*="flex: 1"] {
        width: 100% !important;
        flex: 0 0 100%;
        margin-top: 8px;
    }

    /* Quick add chips wrap better */
    .quick-add-chips {
        gap: 6px;
    }

    .quick-add-chip {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}

@media (orientation: portrait) and (max-width: 600px) {
    .recipes-grid {
        grid-template-columns: 1fr;
    }

    .screen-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .screen-header h1 {
        font-size: 1.5rem;
    }
}

/* ===========================================
   Secondary Navigation Tabs (Gemini-refined)
   =========================================== */

.secondary-nav {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    padding: 6px;
    background: var(--color-surface-elevated);
    border-radius: var(--radius-lg);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.secondary-nav-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-size: var(--nav-font-size);
    font-weight: var(--nav-font-weight);
    font-family: var(--font-primary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.secondary-nav-btn:hover:not(.active) {
    background: rgba(0,0,0,0.04);
    color: var(--color-text-primary);
}

.secondary-nav-btn.active {
    background: var(--color-accent);
    color: white;
    box-shadow: var(--shadow-md);
}

/* Tab Content */
.tab-content {
    display: none;
    flex: 1;
    overflow: auto;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* ===========================================
   Activities Hub - Navigation Cards (Gemini-refined)
   =========================================== */

.hub-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.hub-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hub-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.hub-card:active {
    transform: translateY(-4px);
}

.hub-card-icon {
    font-size: 3rem;
    line-height: 1;
    flex-shrink: 0;
    color: var(--color-accent);
}

.hub-card-content {
    flex: 1;
}

.hub-card-content h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 4px 0;
}

.hub-card-content p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.hub-card-arrow {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    flex-shrink: 0;
    transition: transform var(--transition-normal);
}

.hub-card:hover .hub-card-arrow {
    transform: translateX(4px);
}

/* ===========================================
   Media Tracker Styles (Gemini-refined)
   =========================================== */

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 20px;
}

/* Media Card - Vertical Poster Style */
.media-card {
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    width: 140px;
    flex-shrink: 0;
}

.media-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-md);
}

/* Poster image area - portrait aspect ratio (2:3) */
.media-card-image {
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--color-surface-alt);
}

.media-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-category-icon {
    font-size: 2.5rem;
    line-height: 1;
    opacity: 0.8;
}

/* Compact card body for vertical layout */
.media-card-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.media-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
}

.media-title {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-primary);
    flex: 1;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-type {
    font-size: 0.6875rem;
    color: var(--color-text-secondary);
}

/* Hide notes on card - too cramped */
.media-card .media-notes {
    display: none;
}

.media-notes {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.media-view {
    padding: 8px 0;
}

.media-view-type {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 12px;
}

.media-view-status {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.media-section {
    margin-top: 20px;
}

.media-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 12px 0;
}

.status-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


/* ===========================================
   Crafts Tracker Styles (Gemini-refined)
   =========================================== */

.crafts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 20px;
}

/* Craft Card - Vertical Poster Style (matches Media cards) */
.craft-card {
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    width: 140px;
    flex-shrink: 0;
}

.craft-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-md);
}

/* Emoji/icon area - portrait aspect ratio (2:3) like Media posters */
.craft-card-image {
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
}

.craft-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.craft-category-icon {
    font-size: 3rem;
    line-height: 1;
    opacity: 0.9;
}

/* Compact card body for vertical layout */
.craft-card-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.craft-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
}

.craft-title {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-primary);
    flex: 1;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hide materials/notes/status on card - too cramped for vertical layout */
/* Status is already shown by Kanban column */
.craft-card .craft-materials,
.craft-card .craft-notes,
.craft-card .craft-status-tag {
    display: none;
}

.craft-status-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-md);
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-primary);
}

.craft-materials {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.craft-notes {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.craft-view {
    padding: 8px 0;
}

.craft-view-status {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.craft-section {
    margin-top: 20px;
}

.craft-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 12px 0;
}

/* Portrait orientation adjustments for new elements */
@media (orientation: portrait) {
    .hub-container {
        padding: 16px;
    }

    .media-grid,
    .crafts-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .secondary-nav {
        flex-wrap: wrap;
    }

    .secondary-nav-btn {
        min-width: 100px;
    }
}

/* ===========================================
   Crafts Kanban Board Layout
   =========================================== */

.crafts-kanban-board {
    display: flex;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 180px);
    min-height: 400px;
}

.crafts-kanban-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    overflow: hidden;
    min-width: 0;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.crafts-kanban-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border-light);
    background: var(--color-bg);
    flex-shrink: 0;
}

.crafts-kanban-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.crafts-kanban-count {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: var(--color-accent);
    color: white;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 600;
}

/* Independent scrolling for each column */
/* Craft cards in Kanban - horizontal wrapping grid (left-to-right, then next row) */
.crafts-kanban-cards {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 12px;
}

.crafts-kanban-cards .craft-card {
    flex-shrink: 0;
}

/* Empty column state */
.crafts-kanban-cards .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ===========================================
   Crafts Kanban Edit Mode (Drag & Drop)
   =========================================== */

/* Edit mode - wobble without perspective (cards are nested in columns) */
/* Note: Unlike Tasks where cards are direct children, Crafts cards are 3 levels deep.
   Perspective creates containing blocks that break position:fixed for nested elements. */

/* Edit Mode - All cards wobble (GPU-accelerated via animation) */
.crafts-kanban-board.edit-mode .craft-card {
    animation: wobble 0.5s ease-in-out infinite;
    cursor: grab;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    contain: layout style;
}

/* Randomize wobble for natural look */
.crafts-kanban-board.edit-mode .craft-card:nth-child(2n) {
    animation-name: wobble-alt;
    animation-duration: 0.55s;
}

.crafts-kanban-board.edit-mode .craft-card:nth-child(3n) {
    animation-duration: 0.45s;
}

.crafts-kanban-board.edit-mode .craft-card:nth-child(5n) {
    animation-duration: 0.52s;
}

/* Disable hover effects in edit mode */
.crafts-kanban-board.edit-mode .craft-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

/* Card being dragged - must escape stacking contexts */
.craft-card.dragging {
    animation: none !important;
    opacity: 0.95;
    box-shadow: var(--shadow-xl) !important;
    z-index: 1000;
    cursor: grabbing;
    pointer-events: none;
    position: fixed;
    will-change: transform;
    backface-visibility: hidden;
}

/* Column highlight when card is dragged over it */
.crafts-kanban-column.drag-target {
    border-color: var(--color-accent);
    border-width: 2px;
    background: var(--color-accent-bg);
}

/* Card drop target within column */
.craft-card.drag-over {
    transform: scale(0.95);
    opacity: 0.6;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

/* Placeholder for dragged card's position - matches vertical card size */
.crafts-drag-placeholder {
    border: 2px dashed var(--color-accent);
    border-radius: var(--radius-lg);
    background: var(--color-accent-bg);
    opacity: 0.5;
    flex-shrink: 0;
    width: 140px;
    aspect-ratio: 2 / 3;
}

/* Hide Add button in edit mode */
#screen-crafts.edit-mode .add-btn {
    display: none;
}

/* ===========================================
   Crafts Kanban Portrait Mode (Stacked Columns)
   =========================================== */

@media (orientation: portrait) {
    .crafts-kanban-board {
        flex-direction: column;
        height: auto;
        gap: 16px;
        padding: 16px;
        overflow-y: auto;
    }

    .crafts-kanban-column {
        max-height: none;
        flex: none;
    }

    /* Sticky headers in portrait */
    .crafts-kanban-header {
        position: sticky;
        top: 0;
        z-index: 10;
    }

    /* Horizontal scroll for cards in portrait */
    .crafts-kanban-cards {
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }

    .crafts-kanban-title {
        font-size: 1rem;
    }

    /* Slightly smaller cards in portrait */
    .craft-card {
        width: 120px;
    }
}

@media (orientation: portrait) and (max-width: 600px) {
    .crafts-kanban-board {
        padding: 12px;
        gap: 12px;
    }

    .crafts-kanban-header {
        padding: 12px 16px;
    }

    .crafts-kanban-cards {
        padding: 12px;
        gap: 10px;
        max-height: 250px;
    }
}

/* ===========================================
   Media Kanban Board Layout
   (Mirrors Crafts Kanban structure)
   =========================================== */

.media-kanban-board {
    display: flex;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 180px);
    min-height: 400px;
}

.media-kanban-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    overflow: hidden;
    min-width: 0;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.media-kanban-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border-light);
    background: var(--color-bg);
    flex-shrink: 0;
}

.media-kanban-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.media-kanban-count {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: var(--color-accent);
    color: white;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 600;
}

/* Media cards in Kanban - horizontal wrapping grid (left-to-right, then next row) */
.media-kanban-cards {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    gap: 12px;
}

.media-kanban-cards .media-card {
    flex-shrink: 0;
}

/* Empty column state */
.media-kanban-cards .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ===========================================
   Media Kanban Edit Mode (Drag & Drop)
   =========================================== */

/* Edit Mode - All cards wobble (GPU-accelerated via animation) */
.media-kanban-board.edit-mode .media-card {
    animation: wobble 0.5s ease-in-out infinite;
    cursor: grab;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    contain: layout style;
}

/* Randomize wobble for natural look */
.media-kanban-board.edit-mode .media-card:nth-child(2n) {
    animation-name: wobble-alt;
    animation-duration: 0.55s;
}

.media-kanban-board.edit-mode .media-card:nth-child(3n) {
    animation-duration: 0.45s;
}

.media-kanban-board.edit-mode .media-card:nth-child(5n) {
    animation-duration: 0.52s;
}

/* Disable hover effects in edit mode */
.media-kanban-board.edit-mode .media-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

/* Card being dragged - must escape stacking contexts */
.media-card.dragging {
    animation: none !important;
    opacity: 0.95;
    box-shadow: var(--shadow-xl) !important;
    z-index: 1000;
    cursor: grabbing;
    pointer-events: none;
    position: fixed;
    will-change: transform;
    backface-visibility: hidden;
}

/* Column highlight when card is dragged over it */
.media-kanban-column.drag-target {
    border-color: var(--color-accent);
    border-width: 2px;
    background: var(--color-accent-bg);
}

/* Card drop target within column */
.media-card.drag-over {
    transform: scale(0.95);
    opacity: 0.6;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

/* Placeholder for dragged card's position - matches vertical card size */
.media-drag-placeholder {
    border: 2px dashed var(--color-accent);
    border-radius: var(--radius-lg);
    background: var(--color-accent-bg);
    opacity: 0.5;
    flex-shrink: 0;
    width: 140px;
    aspect-ratio: 2 / 3;
}

/* Hide Add button in edit mode */
#screen-media.edit-mode .add-btn {
    display: none;
}

/* ===========================================
   Media Kanban Portrait Mode (Stacked Columns)
   =========================================== */

@media (orientation: portrait) {
    .media-kanban-board {
        flex-direction: column;
        height: auto;
        gap: 16px;
        padding: 16px;
        overflow-y: auto;
    }

    .media-kanban-column {
        max-height: none;
        flex: none;
    }

    /* Sticky headers in portrait */
    .media-kanban-header {
        position: sticky;
        top: 0;
        z-index: 10;
    }

    /* Horizontal scroll for cards in portrait */
    .media-kanban-cards {
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }

    .media-kanban-title {
        font-size: 1rem;
    }

    /* Slightly smaller cards in portrait */
    .media-card {
        width: 120px;
    }
}

@media (orientation: portrait) and (max-width: 600px) {
    .media-kanban-board {
        padding: 12px;
        gap: 12px;
    }

    .media-kanban-header {
        padding: 12px 16px;
    }

    .media-kanban-cards {
        padding: 12px;
        gap: 10px;
        max-height: 250px;
    }
}

/* ===========================================
   TMDB Search Styles
   =========================================== */

/* Search wrapper with relative positioning for dropdown */
.tmdb-search-wrapper {
    position: relative;
}

/* Search results dropdown */
.tmdb-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 350px;
    overflow-y: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    margin-top: 4px;
}

.tmdb-search-results.hidden {
    display: none;
}

/* Loading and status messages */
.tmdb-loading,
.tmdb-no-results,
.tmdb-error {
    padding: 16px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

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

/* Individual search result item */
.tmdb-result-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition-fast);
}

.tmdb-result-item:last-child {
    border-bottom: none;
}

.tmdb-result-item:hover {
    background: var(--color-accent-bg);
}

/* Poster thumbnail in search results */
.tmdb-result-poster {
    flex-shrink: 0;
    width: 50px;
    height: 75px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-surface-alt);
}

.tmdb-result-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tmdb-no-poster {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--color-surface-alt) 0%, var(--color-border) 100%);
}

/* Result info section */
.tmdb-result-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tmdb-result-title {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tmdb-result-meta {
    display: flex;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.tmdb-result-type {
    background: var(--color-surface-alt);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.tmdb-result-rating {
    color: #f5c518;
}

.tmdb-result-overview {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Form divider */
.form-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    margin: 16px 0;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--color-border);
}

.form-divider span {
    padding: 0 12px;
}

/* Selected TMDB item preview */
.tmdb-selected-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--color-accent-bg);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.tmdb-selected-preview img {
    width: 46px;
    height: 69px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.tmdb-preview-info {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.tmdb-preview-title {
    font-weight: 600;
    color: var(--color-text);
}

.tmdb-preview-year {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.tmdb-preview-rating {
    color: #f5c518;
    font-size: 0.875rem;
}

.tmdb-preview-clear {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.tmdb-preview-clear:hover {
    color: var(--color-danger);
    background: rgba(220, 53, 69, 0.1);
}

/* Media card with poster */
.media-card-image.has-poster {
    background: none;
}

.media-card-image.has-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-card-image .media-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Media card meta info (year, rating) */
.media-meta {
    font-size: 0.625rem;
    color: var(--color-text-muted);
    margin-top: 1px;
}

.media-meta .rating {
    color: #f5c518;
}

/* Media View Modal Enhancements */
.media-view-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.media-view-poster {
    flex-shrink: 0;
}

.media-view-poster img {
    width: 100px;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.media-view-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.media-view-type {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.media-view-meta {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.media-view-meta::before {
    content: '·';
    margin-right: 8px;
}

.media-section {
    margin-top: 16px;
}

.media-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.media-section p {
    color: var(--color-text);
    line-height: 1.5;
}
