:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic Background */
.background-animation {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.15) 0%, rgba(15, 23, 42, 0) 50%),
                radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.15) 0%, rgba(15, 23, 42, 0) 40%);
    z-index: -1;
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.container {
    width: 100%;
    max-width: 700px;
    padding: 2rem;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #a5b4fc, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.05em;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease-out 0.2s both;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary-hover);
    color: white;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    flex-wrap: nowrap;
}

.action-buttons button {
    flex: 1;
    white-space: nowrap;
    min-width: 0;
}

.recommend-btn {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    border: none;
    padding: 1.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.weekly-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 1.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.seasonal-btn {
    background: #f59e0b; /* Amber for seasonal theme */
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    transition: all 0.3s;
}

.seasonal-btn:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.fridge-toggle-btn {
    background: #0ea5e9;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
    transition: all 0.3s;
}

.fridge-toggle-btn:hover {
    background: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.fridge-toggle-btn.active {
    background: #0284c7;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.25), 0 2px 8px rgba(14, 165, 233, 0.4);
    transform: translateY(1px);
}

.weekly-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669, #047857);
}

.weekly-btn:active {
    transform: translateY(1px);
}

.recommend-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, var(--primary-hover), #7c3aed);
}

.recommend-btn:active {
    transform: translateY(1px);
}

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    text-align: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0);
}

.result-card.hidden {
    display: none;
}

.result-card.pop {
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.category-badge {
    display: inline-block;
    background: rgba(236, 72, 153, 0.2);
    color: #f472b6;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.food-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.food-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 1.1rem;
    color: #e2e8f0;
    text-align: left;
    line-height: 1.4;
}

.database-info {
    text-align: center;
    margin-top: 3rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    animation: fadeIn 1s ease-out 0.6s both;
}

.database-info code {
    background: rgba(255,255,255,0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    color: #a5b4fc;
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* Weekly Page Full Screen Layout */
.weekly-page {
    display: block; 
    padding: 2rem;
    height: 100vh;
    overflow: hidden; /* 스크롤 없이 한 화면에 */
}

.weekly-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.weekly-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
    text-align: left;
    animation: fadeInDown 0.6s ease-out;
}

.weekly-header h1 {
    font-size: 2.2rem;
    margin: 0;
}

.back-btn {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.weekly-main {
    flex-grow: 1;
    display: flex;
    overflow: hidden;
    animation: fadeIn 1s ease-out 0.2s both;
}

.weekly-table-full {
    width: 100%;
    height: 100%;
    border-collapse: collapse;
    color: #e2e8f0;
    table-layout: fixed; /* 모든 열 동일한 너비 */
}

.weekly-table-full th, .weekly-table-full td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    vertical-align: middle;
}

.weekly-table-full th {
    height: 3rem;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: #a5b4fc;
    font-size: 1.1rem;
}

.weekly-table-full td {
    background: rgba(0, 0, 0, 0.1);
    transition: background 0.2s;
}

.weekly-table-full td:hover {
    background: rgba(255, 255, 255, 0.05);
}

.meal-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.meal-breakfast { background: rgba(250, 204, 21, 0.2); color: #fde047; }
.meal-lunch { background: rgba(56, 189, 248, 0.2); color: #7dd3fc; }
.meal-dinner { background: rgba(167, 139, 250, 0.2); color: #c4b5fd; }

.meal-name-large {
    font-size: 1.2rem;
    font-weight: 600;
    word-break: keep-all;
    line-height: 1.4;
}

/* Fridge Section Styles */
.fridge-section {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 16px;
    margin-top: 1rem;
    border: 1px solid var(--glass-border);
    animation: fadeIn 0.3s ease-out;
}

.fridge-section.hidden {
    display: none;
}

.fridge-section p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.fridge-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.tags-input-wrapper {
    flex-grow: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    min-height: 3.2rem;
    align-items: center;
    transition: border-color 0.3s;
    cursor: text;
}

.tags-input-wrapper:focus-within {
    border-color: var(--primary);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag-item {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    animation: popIn 0.2s ease-out;
}

.tag-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    margin: 0;
    transition: color 0.2s;
}

.tag-remove:hover {
    color: white;
}

.input-relative-wrapper {
    position: relative;
    flex-grow: 1;
    min-width: 120px;
}

.input-relative-wrapper input {
    width: 100%;
    padding: 0.3rem;
    border: none;
    background: transparent;
    color: white;
    outline: none;
    font-size: 1rem;
}

.suggestions-list {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    list-style: none;
    padding: 0.5rem 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.suggestions-list.hidden {
    display: none;
}

.suggestions-list li {
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    color: #e2e8f0;
    transition: background 0.2s;
    font-size: 0.95rem;
}

.suggestions-list li:hover {
    background: rgba(255, 255, 255, 0.1);
}

.fridge-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.fridge-btn:hover {
    background: var(--primary-hover);
}

/* Fridge Result Card */
.fridge-result-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.5s ease-out;
}

.fridge-result-card.hidden {
    display: none;
}

.fridge-result-card h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #a5b4fc;
    font-size: 1.3rem;
}

.fridge-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fridge-list li {
    background: rgba(0, 0, 0, 0.15);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.fridge-list li strong {
    color: white;
    font-size: 1.1rem;
}

.fridge-list li small {
    display: block;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .weekly-page { padding: 1rem; overflow: auto; }
    .weekly-header h1 { font-size: 1.8rem; }
    .weekly-table-full { min-width: 600px; height: auto; }
    .weekly-table-full td { height: 80px; }
    .meal-name-large { font-size: 1rem; }
}

@media (max-width: 480px) {
    h1 { font-size: 2.5rem; }
    .result-card { padding: 1.5rem; }
    .food-name { font-size: 2rem; }
}

/* Enhanced weekly meal planner */
.weekly-subtitle {
    color: var(--text-muted);
    margin-top: 0.4rem;
    font-size: 0.95rem;
}

.weekly-header-actions {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.small-btn {
    flex: initial !important;
    padding: 0.8rem 1.2rem !important;
    font-size: 1rem !important;
    border-radius: 12px !important;
}

.weekly-main {
    gap: 1rem;
}

.weekly-table-wrap {
    flex: 1 1 auto;
    overflow: auto;
    border-radius: 18px;
}

.weekly-table-full td {
    padding: 0.8rem;
}

.meal-meta {
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.meal-ingredients {
    margin-top: 0.45rem;
    font-size: 0.78rem;
    color: #cbd5e1;
    line-height: 1.35;
    word-break: keep-all;
}

.shopping-list-card {
    width: 280px;
    flex: 0 0 280px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 1.2rem;
    overflow: auto;
}

.shopping-list-card h2 {
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
}

.shopping-list-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

#shoppingList {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

#shoppingList li {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    color: #e2e8f0;
    font-size: 0.9rem;
}

#shoppingList strong {
    color: #a5b4fc;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .weekly-page {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    .weekly-container {
        min-height: calc(100vh - 2rem);
    }

    .weekly-main {
        flex-direction: column;
        overflow: visible;
    }

    .shopping-list-card {
        width: 100%;
        flex: initial;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .weekly-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

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

    .weekly-header-actions button {
        flex: 1;
        min-width: 120px;
    }
}

@media print {
    body {
        background: white;
        color: black;
    }

    .background-animation,
    .weekly-header-actions,
    .meal-select-section,
    .weekly-footer-nav {
        display: none !important;
    }

    .weekly-page {
        padding: 0;
        height: auto;
        overflow: visible;
    }

    .weekly-container {
        box-shadow: none;
        border: none;
        background: white;
        color: black;
        padding: 1rem;
    }

    .weekly-main {
        display: block;
        overflow: visible;
    }

    .weekly-table-wrap {
        width: 100% !important;
        overflow: visible;
    }

    .shopping-list-card {
        display: none !important; /* 장보기 목록은 출력 안 함 */
    }

    .weekly-table-full,
    .weekly-table-full th,
    .weekly-table-full td {
        color: black;
        border-color: #999;
        background: white;
    }

    .meal-meta,
    .meal-ingredients,
    .weekly-subtitle {
        color: #333;
    }
}

/* Korean meal set layout */
.korean-dish-line {
    text-align: left;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 0.55rem;
    margin-bottom: 0.45rem;
}

.korean-dish-line:last-child {
    margin-bottom: 0;
}

.dish-type-badge {
    display: inline-block;
    min-width: 3.8rem;
    margin-right: 0.35rem;
    padding: 0.18rem 0.42rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.16);
    color: #86efac;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
}

/* ── 식단표 음식 버튼 ─────────────────────────────────────────── */
.meal-food-btn {
    display: block;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, transform 0.15s, border-color 0.2s;
    margin-bottom: 0.35rem;
    word-break: keep-all;
    line-height: 1.4;
}

.meal-food-btn:last-child {
    margin-bottom: 0;
}

.meal-food-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.5);
    color: #fff;
    transform: translateY(-1px);
}

.meal-food-btn:active {
    transform: translateY(0);
}

/* ── 음식 상세 모달 ──────────────────────────────────────────── */
.food-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeIn 0.2s ease-out;
}

.food-modal-overlay.hidden {
    display: none;
}

.food-modal {
    background: rgba(20, 30, 50, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 2rem;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.food-modal-close {
    position: absolute;
    top: 1.1rem;
    right: 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.food-modal-close:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.food-modal-header {
    margin-bottom: 1.5rem;
    padding-right: 2.5rem;
}

.food-modal-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: #fff;
    margin: 0.6rem 0 0.8rem;
}

.food-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.modal-tag {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
}

.tag-type      { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
.tag-nutrition { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.tag-cook      { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.tag-time      { background: rgba(56, 189, 248, 0.2); color: #7dd3fc; }
.tag-allergy   { background: rgba(239, 68, 68, 0.2);  color: #fca5a5; }

.food-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.food-modal-section h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

/* 재료 칩 */
.food-modal-ingredients {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.ingredient-chip {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    font-size: 0.88rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
}

.modal-empty {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 레시피 */
.recipe-steps {
    padding-left: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.recipe-steps li {
    color: #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.recipe-text {
    color: #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* 레시피 준비 중 */
.recipe-pending {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: var(--text-muted);
}

.recipe-pending-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.recipe-pending p {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: #cbd5e1;
}

.recipe-pending small {
    font-size: 0.82rem;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .food-modal {
        padding: 1.5rem;
        border-radius: 18px;
    }
    .food-modal-title { font-size: 1.5rem; }
}

/* ── 한식 세트 컨테이너 ──────────────────────────────────────── */
.korean-set {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

/* ── 음식구분 뱃지 (dtb = dish type badge) ────────────────────── */
.dtb {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    margin-right: 0.35rem;
    vertical-align: middle;
    white-space: nowrap;
}

/* 국/탕 — 파란 계열 */
.dtb-soup    { background: rgba(56, 189, 248, 0.2);  color: #7dd3fc; }
/* 찌개    — 주황 계열 */
.dtb-jjigae  { background: rgba(251, 146, 60, 0.2);  color: #fdba74; }
/* 메인반찬 — 보라 계열 */
.dtb-main    { background: rgba(167, 139, 250, 0.2); color: #c4b5fd; }
/* 밑반찬   — 초록 계열 */
.dtb-side    { background: rgba(52, 211, 153, 0.2);  color: #6ee7b7; }
/* 김치/젓갈/장 — 빨강 계열 */
.dtb-kimchi  { background: rgba(248, 113, 113, 0.2); color: #fca5a5; }
/* 간단식   — 회색 계열 */
.dtb-simple  { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
/* 면/만두  — 노랑 계열 */
.dtb-noodle  { background: rgba(250, 204, 21, 0.2);  color: #fde047; }

/* ── 푸터 영역 (애드센스 필수) ───────────────────────────────── */
.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 4rem auto 0 auto;
    padding-top: 2rem;
    width: 100%;
    max-width: 600px;
    border-top: 1px solid var(--glass-border);
    font-size: 0.9rem;
    color: var(--text-muted);
    z-index: 1;
}

.site-footer .footer-links {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.site-footer a, .weekly-footer-nav a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.site-footer a:hover, .weekly-footer-nav a:hover {
    color: var(--text-main);
    text-decoration: underline;
}

.weekly-footer-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 0.8rem;
    border-top: 1px solid var(--glass-border);
    margin: 0.8rem auto 0 auto;
    width: 100%;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ── 식사 시간 선택 패널 (Premium Toggle Buttons) ──────────────── */
.meal-select-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    margin-top: 1rem;
    animation: fadeIn 0.5s ease-out;
}

.meal-select-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
}

.meal-checkbox-group {
    display: flex;
    gap: 0.6rem;
}

.meal-checkbox-label {
    cursor: pointer;
    position: relative;
    user-select: none;
}

/* 기본 체크박스 숨기기 */
.meal-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* 커스텀 버튼 기본 상태 */
.checkbox-custom {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
}

/* 호버 시 효과 */
.meal-checkbox-label:hover .checkbox-custom {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    transform: translateY(-1px);
}

/* 활성화(체크) 되었을 때의 상태 스타일링 (식사별 브랜드 색상 적용) */
.meal-checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    color: white;
    transform: translateY(0);
}

/* 아침 활성화: 노란/골드 계열 */
.meal-checkbox-label:nth-child(1) input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    border-color: #eab308;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.35);
}

/* 점심 활성화: 파란/하늘 계열 */
.meal-checkbox-label:nth-child(2) input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border-color: #0ea5e9;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35);
}

/* 저녁 활성화: 보라 계열 */
.meal-checkbox-label:nth-child(3) input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-color: #8b5cf6;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
}

/* 모바일 반응형 대응 */
@media (max-width: 768px) {
    .meal-select-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        padding: 1rem;
    }
    .meal-checkbox-group {
        width: 100%;
    }
    .meal-checkbox-label {
        flex: 1;
        text-align: center;
    }
    .checkbox-custom {
        width: 100%;
        text-align: center;
        padding: 0.6rem 0.5rem;
    }
}
