.week-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.week-label {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.planner-grid-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-week-arrow {
    background: none;
    color: var(--muted);
    border: none;
    border-radius: 8px;
    padding: 10px 6px;
    font-size: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.12s;
}

.btn-week-arrow:hover {
    color: var(--text);
    background: none;
}

.week-menu-wrap {
    position: relative;
}

.btn-week-menu {
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    transition: background 0.12s;
}

.btn-week-menu:hover {
    background: var(--brand-dark);
}

.week-menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    min-width: 160px;
    z-index: 100;
    overflow: hidden;
}

.week-menu-dropdown.open {
    display: block;
}

.week-menu-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-radius: 0;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
}

.week-menu-dropdown button:hover {
    background: rgba(15, 23, 42, 0.05);
}

.week-menu-dropdown button#clear-week {
    color: #b91c1c;
}

.week-menu-dropdown button#clear-week:hover {
    background: rgba(239, 68, 68, 0.06);
}

.planner-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    align-items: stretch;
    flex: 1;
    min-width: 0;
}

.planner-day {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.planner-meals {
    flex: 1;
}

.planner-day-today {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.planner-day-header {
    background: linear-gradient(135deg, var(--brand), var(--brand-accent));
    color: white;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.planner-day-today .planner-day-header {
    background: linear-gradient(135deg, var(--brand-dark), var(--brand));
}

.planner-day-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.planner-day-date {
    font-size: 0.75rem;
    opacity: 0.88;
}

.planner-meals {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.meal-slot {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    min-height: 120px;
}

.meal-slot:last-child {
    border-bottom: none;
}

.meal-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 6px;
}

.meal-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.add-meal-btn {
    background: rgba(76, 175, 80, 0.08);
    color: var(--brand-dark);
    border: 1px dashed rgba(76, 175, 80, 0.4);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.12s;
}

.add-meal-btn:hover {
    background: rgba(76, 175, 80, 0.16);
}

.guest-banner {
    background: rgba(45, 212, 191, 0.1);
    border: 1px solid rgba(45, 212, 191, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.95rem;
}

.guest-banner a {
    color: var(--brand-dark);
    font-weight: 600;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal {
    background: var(--card);
    border-radius: var(--radius);
    padding: 28px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
    position: relative;
}

.modal h3 {
    margin: 0 0 6px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: rgba(15, 23, 42, 0.06);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--muted);
    padding: 4px;
}

select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    background: #fff;
}

select:focus {
    border-color: rgba(45, 212, 191, 0.6);
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.18);
}

.meal-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meal-card img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.meal-recipe-name {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
}

.remove-meal-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    width: fit-content;
}

.remove-meal-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

.meal-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.note-btn,
.note-btn-empty {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.65rem;
    cursor: pointer;
    width: fit-content;
    line-height: 1;
    filter: grayscale(1) opacity(0.45);
    transition: filter 0.1s;
}

.note-btn:hover,
.note-btn-empty:hover {
    filter: grayscale(1) opacity(0.8);
    background: none;
}

.meal-note-text {
    font-size: 0.75rem;
    color: var(--muted);
    font-style: italic;
    line-height: 1.3;
    display: block;
    margin-top: 2px;
}

.add-to-planner-btn {
    margin: 12px 0;
    width: 100%;
}

@media (max-width: 900px) {
    .planner-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .planner-grid {
        grid-template-columns: 1fr;
    }
}
