/* =========================================================
   3D-МОДЕЛИ В ОТВЕТАХ НА ЭКЗАМЕНАЦИОННЫЕ ВОПРОСЫ
   ========================================================= */

.exam-three-shell{
    margin:18px 0 28px;
    border:1px solid #cfd8e3;
    border-radius:14px;
    overflow:hidden;
    background:#f8fafc;
    box-shadow:0 10px 28px rgba(15,23,42,.08);
}

.exam-three-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:12px 15px;
    border-bottom:1px solid #dbe3ec;
    background:linear-gradient(135deg,#eff6ff,#f8fafc);
}

.exam-three-title{
    min-width:0;
    color:#0f172a;
    font-size:15px;
    font-weight:800;
    line-height:1.3;
}

.exam-three-badge{
    flex:0 0 auto;
    display:inline-flex;
    align-items:center;
    min-height:28px;
    padding:4px 9px;
    border:1px solid #93c5fd;
    border-radius:999px;
    background:#dbeafe;
    color:#1d4ed8;
    font-size:11px;
    font-weight:800;
    white-space:nowrap;
}

.exam-three-stage{
    position:relative;
    width:100%;
    height:clamp(390px, 58vw, 650px);
    min-height:390px;
    overflow:hidden;
    background:
        radial-gradient(circle at 50% 28%, #ffffff 0, #eef4f8 58%, #e2e8f0 100%);
    touch-action:none;
}

.exam-three-stage canvas{
    display:block;
    width:100%;
    height:100%;
    outline:none;
}

.exam-three-loading,
.exam-three-error{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    box-sizing:border-box;
    text-align:center;
    color:#475569;
    font-size:14px;
    font-weight:700;
    line-height:1.5;
}

.exam-three-error{
    color:#991b1b;
    background:#fef2f2;
}

.exam-three-panel{
    padding:13px 15px 15px;
    border-top:1px solid #dbe3ec;
    background:#fff;
}

.exam-three-controls{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.exam-three-control{
    flex:1 1 330px;
    display:grid;
    grid-template-columns:auto minmax(160px,1fr) auto;
    align-items:center;
    gap:10px;
}

.exam-three-control label{
    margin:0;
    color:#334155;
    font-size:13px;
    font-weight:800;
    white-space:nowrap;
}

.exam-three-control input[type="range"]{
    width:100%;
    min-width:120px;
}

.exam-three-control output{
    min-width:74px;
    color:#0f172a;
    font-size:14px;
    font-weight:900;
    text-align:right;
    white-space:nowrap;
}

.exam-three-buttons{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.exam-three-button{
    min-height:38px;
    padding:7px 12px;
    border:1px solid #94a3b8;
    border-radius:8px;
    background:#fff;
    color:#334155;
    font:inherit;
    font-size:12px;
    font-weight:800;
    cursor:pointer;
}

.exam-three-button:hover{
    background:#f1f5f9;
}

.exam-three-button.is-primary{
    border-color:#2563eb;
    background:#2563eb;
    color:#fff;
}

.exam-three-button.is-primary:hover{
    background:#1d4ed8;
}

.exam-three-values{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:9px;
    margin-top:12px;
}

.exam-three-value{
    padding:9px 10px;
    border:1px solid #e2e8f0;
    border-radius:9px;
    background:#f8fafc;
}

.exam-three-value span{
    display:block;
    margin-bottom:2px;
    color:#64748b;
    font-size:11px;
    font-weight:700;
}

.exam-three-value strong{
    color:#0f172a;
    font-size:14px;
}

.exam-three-chain{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    flex-wrap:wrap;
    margin-top:12px;
    padding:10px;
    border:1px solid #bfdbfe;
    border-radius:9px;
    background:#eff6ff;
    color:#1e3a8a;
    font-size:12px;
    font-weight:800;
}

.exam-three-chain b{
    color:#2563eb;
    font-size:15px;
}

.exam-three-help{
    padding:9px 15px 11px;
    border-top:1px solid #e2e8f0;
    background:#f8fafc;
    color:#64748b;
    font-size:11px;
    line-height:1.45;
    text-align:center;
}

.rich-editor [id^="exam-three-"]{
    min-height:90px;
    margin:14px 0;
    padding:14px;
    border:2px dashed #8b5cf6;
    border-radius:10px;
    background:#f5f3ff;
    color:#5b21b6;
    font-size:13px;
    font-weight:800;
}

@media(max-width:760px){
    .exam-three-stage{
        height:460px;
        min-height:360px;
    }

    .exam-three-head{
        align-items:flex-start;
        flex-direction:column;
    }

    .exam-three-control{
        grid-template-columns:1fr auto;
    }

    .exam-three-control label{
        grid-column:1 / -1;
    }

    .exam-three-values{
        grid-template-columns:1fr;
    }

    .exam-three-buttons{
        width:100%;
    }

    .exam-three-button{
        flex:1 1 130px;
    }
}
