/* 课程咨询弹层 */
.modal-mask {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: cmFade 0.18s ease-out;
}
.modal-mask.cm-open { display: flex; }
@keyframes cmFade { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
    position: relative;
    width: 100%; max-width: 380px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    padding: 28px 26px 22px;
    animation: cmSlide 0.22s ease-out;
}
@keyframes cmSlide {
    from { transform: translateY(12px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.modal-close {
    position: absolute; top: 8px; right: 12px;
    background: transparent; border: 0;
    font-size: 26px; line-height: 1;
    color: #94a3b8; cursor: pointer;
    padding: 4px 8px;
}
.modal-close:hover { color: #475569; }

.modal-head { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.modal-avatar img {
    width: 48px; height: 48px;
    border-radius: 50%; object-fit: cover;
    border: 2px solid #e2e8f0;
}
.modal-title { font-size: 17px; font-weight: 600; color: #0f172a; }
.modal-sub   { font-size: 12px; color: #64748b; margin-top: 2px; line-height: 1.4; }

.modal-form { display: flex; flex-direction: column; gap: 12px; }
.modal-field { display: flex; flex-direction: column; gap: 4px; }
.modal-label { font-size: 12px; color: #475569; }
.modal-field input {
    height: 40px; padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    background: #f8fafc;
    transition: border-color 0.15s, background 0.15s;
}
.modal-field input:focus {
    outline: none;
    border-color: #14b8a6;
    background: #fff;
}
.modal-field input.cm-err {
    border-color: #ef4444;
    background: #fef2f2;
}

.modal-submit {
    margin-top: 4px;
    height: 44px;
    background: #14b8a6;
    color: #fff;
    border: 0; border-radius: 8px;
    font-size: 15px; font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.modal-submit:hover { background: #0d9488; }
.modal-submit:disabled {
    background: #94a3b8; cursor: not-allowed;
}

.modal-tip { font-size: 11px; color: #94a3b8; text-align: center; margin: 0; line-height: 1.4; }
.modal-tip.cm-ok  { color: #14b8a6; }
.modal-tip.cm-bad { color: #ef4444; }

@media (max-width: 480px) {
    .modal-box { padding: 22px 18px 18px; border-radius: 12px; }
    .modal-title { font-size: 16px; }
}
