/* ========== 通用弹窗 ========== */
.modal-mask {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-box {
    width: 100%;
    max-width: 340px;
    background: var(--modal-bg);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 22px;
    text-align: center;
    border: 1px solid var(--glass-border);
    max-height: 80vh;
    overflow-y: auto;
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.modal-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 18px;
    text-align: left;
    line-height: 1.6;
}

.modal-text.error { color: var(--danger); }

.modal-btn-group {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
}

.modal-btn-primary { background: var(--primary); color: #fff; }
.modal-btn-secondary { background: var(--input-border); color: var(--text-primary); }
.modal-btn-danger { background: var(--danger); color: #fff; }

/* ========== 编辑弹窗 ========== */
.edit-modal-mask {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: none;
}

.edit-modal-mask.show { display: block; }

.edit-modal-box {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 30px);
    max-width: 420px;
    background: var(--modal-bg);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    padding: 20px;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid var(--glass-border);
}

.edit-modal-btns {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.edit-modal-btns .btn {
    flex: 1;
}

/* ========== 日详情弹窗 ========== */
.day-detail-modal {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 480px;
    background: var(--detail-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 20px 20px 0 0;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
    z-index: 200;
    transition: transform 0.3s ease;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.day-detail-modal.show { transform: translateX(-50%) translateY(0); }

.day-detail-mask {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 199;
    display: none;
}

.day-detail-mask.show { display: block; }

.detail-close {
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    margin-top: 12px;
    padding: 8px;
    cursor: pointer;
}

/* ========== 轻提示（自动消失） ========== */
.toast-notification {
    position: fixed;
    bottom: calc(100px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
