/* Математика кабинеті. lab.css пен geo.css орналасуын қолданады. */
.math-view { background: #fff; }
.math-board { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.math-solids { position: absolute; inset: 0; }
.math-solids canvas { width: 100%; height: 100%; display: block; touch-action: none; }
.math-tools { position: absolute; left: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 20px rgba(20,16,44,.08); max-width: calc(100% - 24px); }
.math-tools button { font: inherit; font-size: 16px; min-width: 38px; height: 38px; padding: 0 9px; border-radius: 10px; border: 0; background: transparent; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.math-tools button span { font-size: 12.5px; font-weight: 600; display: none; }
.math-tools button[aria-pressed="true"] span { display: inline; }
.math-tools button:hover { background: #f1f3f8; }
.math-tools button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.math-tools i { width: 1px; background: var(--line); margin: 4px 2px; }
.math-pens { position: absolute; left: 12px; top: 64px; display: flex; gap: 6px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.math-pens button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.math-pens button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--brand); }
.math-toolhint { position: absolute; right: 12px; top: 70px; max-width: 300px; font-size: 13px; padding: 8px 12px; border-radius: 12px; background: rgba(240,235,255,.95); color: #4c2db8; }
.math-toolhint:empty { display: none; }
.math-goal { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 10px 14px; background: rgba(255,247,230,.96); border: 1px solid #f6d58e; border-radius: 12px; font-size: 14.5px; color: #5c4400; }
.math-goal b { color: #3d2d00; }
.math-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.math-tabs button { font: inherit; font-size: 13px; font-weight: 600; padding: 8px 4px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
.math-tabs button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); }
.math-toggles { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.math-fx { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.math-fx-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.math-fx-head i { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.math-fx-head select { flex: 1; font: inherit; font-size: 13.5px; padding: 6px 8px; border-radius: 10px; border: 1.5px solid var(--line); }
.math-fx-head button { border: 0; background: none; font-size: 18px; color: var(--muted); cursor: pointer; }
.math-formula { font-size: 18px; font-weight: 700; color: var(--ink); margin: 4px 0 8px; font-family: "Onest", serif; }
.math-sl { display: grid; grid-template-columns: 28px 1fr 44px; gap: 8px; align-items: center; font-size: 14px; margin: 4px 0; }
.math-sl input { accent-color: var(--brand); }
.math-sl output { text-align: right; font-weight: 700; }
.math-fx input[type="text"] { width: 100%; font: inherit; font-size: 16px; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line); }
.math-err { color: var(--danger); font-size: 13px; margin-top: 4px; }
.math-keys { font-size: 13.5px; margin-top: 8px; color: var(--text); }
.math-keys b { color: var(--ink); }
.math-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12.5px; }
.math-table td { border: 1px solid var(--line); text-align: center; padding: 3px 2px; }
.math-table tr:first-child td { background: #f4f6fb; font-weight: 700; }
.math-solid-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.math-solid-types button { font: inherit; font-size: 12.5px; font-weight: 600; padding: 8px 4px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; }
.math-solid-types button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.math-res { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #f4f6fb; font-size: 14px; display: grid; gap: 4px; }
.math-res b { font-size: 16px; color: var(--ink); }
.math-group { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 10px 0 6px; }
.math-tlist { display: grid; gap: 6px; }
.math-tlist button { font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; padding: 8px 10px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; display: flex; gap: 8px; align-items: center; }
.math-tlist button::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.math-tlist button.done::before { content: "✓"; background: #2E9E6B; border-color: #2E9E6B; color: #fff; font-size: 11px; display: grid; place-items: center; }
.math-tlist button[aria-pressed="true"] { border-color: var(--brand); }
.math-answer { display: flex; gap: 6px; margin-top: 10px; }
.math-answer input { flex: 1; font: inherit; font-size: 16px; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line); }
.math-hint { margin-top: 8px; font-size: 14px; padding: 10px 12px; border-radius: 12px; background: #fff8e6; }
.math-form { display: grid; gap: 8px; }
.math-form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.math-form input, .math-form select, .math-form textarea { font: inherit; font-size: 14px; color: var(--ink); padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line); }
.math-link { display: flex; gap: 6px; }
.math-link input { flex: 1; font-size: 12px; }
@media (max-width: 900px) { .math-toolhint { display: none; } .math-tabs button { font-size: 12px; } }
