.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    padding: 32px 24px 24px 24px;
    min-width: 320px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.modal-list {
    margin: 0;
    padding-left: 20px;
    color: #555;
    font-size: 1rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-action-btn {
    border: none;
    border-radius: 8px;
    background: #1976d2;
    color: #fff;
    padding: 10px 18px;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.modal-action-btn:hover {
    background: #1565c0;
}

.modal-action-btn-danger {
    background: #d84315;
}

.modal-action-btn-danger:hover {
    background: #bf360c;
}

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

.meal-form-input {
    padding: 8px;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.meal-form-image-row {
    display: grid;
    grid-template-columns: 1fr 42px;
    gap: 8px;
    align-items: center;
}

.meal-form-drive-btn {
    width: 42px;
    height: 42px;
    border: 1px solid #d6dae3;
    border-radius: 8px;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.meal-form-drive-btn:hover {
    border-color: #b8becb;
    background: #f8f9fc;
}

.meal-form-drive-btn img {
    width: 22px;
    height: 22px;
}

.meal-form-textarea {
    min-height: 80px;
}

.meal-form-submit {
    background: #1976d2;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.meal-form-submit:hover {
    background: #1565c0;
}

.planner-meal-modal-content {
    width: min(680px, 92vw);
}

.planner-meal-selection-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 360px;
    min-height: 360px;
    max-height: 360px;
    overflow-y: auto;
}

.planner-meal-selection-item {
    display: grid;
    grid-template-columns: 66px 1fr auto;
    gap: 10px;
    align-items: center;
    border: 1px solid #dbdde5;
    border-radius: 10px;
    background: #ffffff;
    padding: 8px;
}

.planner-selection-image {
    width: 66px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
}

.planner-selection-info h4 {
    margin: 0;
    font-size: 0.98rem;
    color: #20242b;
}

.planner-selection-info p {
    margin: 4px 0 0 0;
    font-size: 0.87rem;
    color: #616773;
}

.planner-selection-qty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.planner-selection-qty button {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #c9ccd6;
    background: #fff;
    cursor: pointer;
    color: #2f3541;
    font-size: 1rem;
}

.planner-selection-qty span {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    color: #2f3541;
}

.planner-selection-empty {
    border: 1px dashed #c8ccd5;
    border-radius: 10px;
    color: #707682;
    padding: 12px;
    text-align: center;
    font-size: 0.92rem;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
