.ep-math-teacher{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#102033;margin:0 auto 24px;max-width:1180px}.ep-math-teacher *{box-sizing:border-box}.ep-math-teacher-card{display:flex;align-items:center;gap:18px;padding:22px;border-radius:28px;background:linear-gradient(135deg,#f8fbff,#eef4ff 55%,#fff6fb);border:1px solid #dbe6ff;box-shadow:0 18px 45px rgba(16,24,40,.1);margin-bottom:18px}.ep-math-teacher-card__icon{width:62px;height:62px;border-radius:22px;display:grid;place-items:center;font-size:34px;background:linear-gradient(135deg,#42b7ff,#7547ff);color:#fff;box-shadow:0 14px 30px rgba(66,93,255,.28)}.ep-math-kicker{display:inline-flex;padding:4px 10px;border-radius:999px;background:#eaf1ff;color:#285fe8;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.05em}.ep-math-teacher h2{margin:5px 0 6px;font-size:28px;line-height:1.08;color:#102033}.ep-math-teacher p{font-size:16px;line-height:1.55;color:#4f6380;margin:0}.ep-math-primary,.ep-math-secondary,.ep-math-open-button{border:0;border-radius:999px;padding:12px 18px;font-weight:900;cursor:pointer;box-shadow:0 10px 26px rgba(16,24,40,.12);transition:.18s transform,.18s opacity}.ep-math-primary,.ep-math-open-button{background:linear-gradient(135deg,#28a6ff,#7a4cff);color:#fff}.ep-math-secondary{background:#fff;border:1px solid #d7e5ff;color:#173150}.ep-math-primary:hover,.ep-math-secondary:hover{transform:translateY(-1px)}.ep-math-teacher-modal{border-radius:28px;background:linear-gradient(135deg,#f7fbff,#eef5ff);border:1px solid #dbe6ff;overflow:hidden}.ep-math-teacher-layout{display:grid;grid-template-columns:minmax(260px,350px) 1fr;gap:20px;padding:20px}.ep-math-teacher-avatar{min-height:560px;border-radius:26px;background:radial-gradient(circle at 25% 18%,#ffd9eb,transparent 28%),radial-gradient(circle at 80% 20%,#c2f5ed,transparent 25%),linear-gradient(180deg,#fff,#edf7ff);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:22px;border:1px solid #cfe0ff;position:relative;overflow:hidden}.ep-teacher-face{width:190px;height:230px;border-radius:90px 90px 74px 74px;background:linear-gradient(135deg,#ffd7bd,#efaa88);position:relative;box-shadow:0 20px 44px rgba(16,24,40,.18);animation:epFloat 4.6s ease-in-out infinite}.ep-teacher-hair{position:absolute;left:10px;right:10px;top:-26px;height:90px;border-radius:90px 90px 45px 45px;background:linear-gradient(135deg,#311421,#7c3f58);transform:rotate(-4deg)}.ep-teacher-eye{position:absolute;top:100px;width:32px;height:18px;border-radius:50%;background:#fff;box-shadow:inset 0 -5px 0 rgba(0,0,0,.05);animation:epBlink 6s infinite}.ep-eye-left{left:48px}.ep-eye-right{right:48px}.ep-teacher-eye:after{content:"";position:absolute;width:8px;height:8px;border-radius:50%;background:#20121b;left:12px;top:5px}.ep-teacher-mouth{position:absolute;left:50%;bottom:54px;width:46px;height:16px;border-radius:0 0 50px 50px;background:#a52f51;transform:translateX(-50%);transition:.16s}.ep-teacher-face.is-speaking .ep-teacher-mouth{height:28px;border-radius:50%;animation:epTalk .23s ease-in-out infinite alternate}.ep-teacher-face.is-listening{box-shadow:0 0 0 8px rgba(42,166,255,.1),0 0 0 18px rgba(120,76,255,.08),0 20px 44px rgba(16,24,40,.18)}.ep-teacher-wave{display:flex;gap:5px;align-items:flex-end;margin:24px 0 12px;padding:8px 11px;border-radius:999px;background:rgba(255,255,255,.75)}.ep-teacher-wave i{display:block;width:6px;height:10px;border-radius:9px;background:linear-gradient(180deg,#ff5d9d,#654cff);animation:epWave .8s ease-in-out infinite alternate}.ep-teacher-wave i:nth-child(2){animation-delay:.12s}.ep-teacher-wave i:nth-child(3){animation-delay:.24s}.ep-teacher-wave i:nth-child(4){animation-delay:.36s}.ep-math-credit-warning{margin-top:14px;display:inline-flex;padding:8px 12px;border-radius:999px;background:#fff8e1;color:#8a5c00;font-weight:800;font-size:12px}.ep-math-teacher-workspace{display:flex;flex-direction:column;gap:14px;min-width:0}.ep-math-input-tabs{display:flex;gap:8px;flex-wrap:wrap}.ep-math-input-tabs button{border:1px solid #d8e6ff;background:#fff;color:#20405f;border-radius:999px;padding:10px 14px;font-weight:900;cursor:pointer}.ep-math-input-tabs button.is-active{background:linear-gradient(135deg,#2ca9ff,#7b4dff);color:#fff;border-color:transparent}.ep-math-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.ep-math-controls label{font-size:12px;font-weight:900;color:#40566f;text-transform:uppercase;letter-spacing:.04em}.ep-math-controls select,.ep-math-pane textarea,.ep-voice-box textarea{display:block;width:100%;margin-top:6px;border:1px solid #d5e2f7;border-radius:16px;padding:12px 14px;background:#fff;color:#102033;font-size:15px;outline:none}.ep-math-pane{display:none}.ep-math-pane.is-active{display:block}.ep-math-pane textarea{min-height:116px;resize:vertical}.ep-math-pane input[type=file]{display:block;width:100%;border:1px dashed #8fb6ff;border-radius:20px;background:#fff;padding:18px;margin-bottom:10px}.ep-math-pane img,.ep-math-camera-box img,.ep-math-camera-box video{max-width:100%;max-height:290px;border-radius:18px;border:1px solid #dce8ff;background:#fff;display:block;margin:10px auto}.ep-math-camera-box{min-height:120px;border-radius:20px;background:#f7fbff;border:1px dashed #bfd4ff;display:flex;align-items:center;justify-content:center;padding:10px;margin-bottom:10px}.ep-voice-box{position:relative}.ep-voice-box .ep-math-primary{margin-top:8px}.ep-math-detected,.ep-math-status,.ep-math-whiteboard{border-radius:22px;background:#fff;border:1px solid #dbe6ff;padding:16px;box-shadow:0 12px 28px rgba(16,24,40,.06)}.ep-math-status{font-weight:800;color:#31516f}.ep-math-actions,.ep-math-doubt-buttons{display:flex;gap:9px;flex-wrap:wrap}.ep-math-doubt-buttons button{border:1px solid #d8e5ff;background:#fff;color:#173150;border-radius:999px;padding:9px 13px;font-weight:800;cursor:pointer}.ep-board-title{font-size:20px;font-weight:1000;margin-bottom:10px;color:#102033}.ep-board-question,.ep-math-step,.ep-math-formula,.ep-math-final-answer,.ep-math-common-mistake,.ep-math-teacher-says,.ep-math-similar{border-radius:16px;padding:12px 14px;margin:10px 0;background:#f7fbff;border:1px solid #e1ebff;color:#102033}.ep-math-step{animation:epStepIn .35s ease both;animation-delay:var(--ep-step-delay,0ms)}.ep-math-step strong{display:block;color:#2457d6;margin-bottom:4px}.ep-math-step code{display:block;white-space:pre-wrap;background:#102033;color:#fff;border-radius:12px;padding:10px;margin-top:8px}.ep-math-final-answer{background:#eafff1;border-color:#b9f2c8;color:#065e24;font-weight:800}.ep-math-common-mistake{background:#fff8e7;border-color:#ffd891;color:#7a4a00}.ep-math-formula{background:#eef4ff;border-color:#c8dbff;color:#1d3d85}.ep-math-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.ep-math-meta span{padding:7px 10px;border-radius:999px;background:#eef4ff;color:#2553b8;font-weight:800}.ep-math-livebar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:14px;padding:10px 12px;border-radius:18px;background:linear-gradient(135deg,#eefbff,#f7f3ff);border:1px solid #cde9ff}.ep-math-livebar span{font-weight:900}.ep-math-livebar button{border:0;border-radius:999px;background:linear-gradient(135deg,#7752ff,#17bfe0);color:#fff;font-weight:900;padding:10px 14px;cursor:pointer}.ep-math-error{background:#fff4e6;border:1px solid #ffd3a4;color:#7a3600;padding:14px;border-radius:16px;font-weight:800}.ep-math-disclaimer{font-size:13px!important;color:#60758d!important;margin:4px 0 0!important}.ep-math-short-answer{padding:12px 14px;border-radius:16px;background:#effff8;border:1px solid #b9f2d4;color:#074b31;font-weight:800;margin:10px 0}@keyframes epFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}@keyframes epBlink{0%,48%,50%,100%{transform:scaleY(1)}49%{transform:scaleY(.08)}}@keyframes epTalk{from{transform:translateX(-50%) scaleY(.7)}to{transform:translateX(-50%) scaleY(1.3)}}@keyframes epWave{to{height:25px}}@keyframes epStepIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}html[data-theme="dark"] .ep-math-teacher,body[data-ai-study-theme="dark"] .ep-math-teacher{color:#eaf3ff}html[data-theme="dark"] .ep-math-teacher-card,body[data-ai-study-theme="dark"] .ep-math-teacher-card,html[data-theme="dark"] .ep-math-teacher-modal,body[data-ai-study-theme="dark"] .ep-math-teacher-modal{background:linear-gradient(135deg,#0d1c31,#10213a);border-color:#264d79}html[data-theme="dark"] .ep-math-teacher h2,body[data-ai-study-theme="dark"] .ep-math-teacher h2,html[data-theme="dark"] .ep-board-title,body[data-ai-study-theme="dark"] .ep-board-title{color:#fff}html[data-theme="dark"] .ep-math-teacher p,body[data-ai-study-theme="dark"] .ep-math-teacher p{color:#c9d8ef}html[data-theme="dark"] .ep-math-teacher-avatar,body[data-ai-study-theme="dark"] .ep-math-teacher-avatar,html[data-theme="dark"] .ep-math-detected,body[data-ai-study-theme="dark"] .ep-math-detected,html[data-theme="dark"] .ep-math-status,body[data-ai-study-theme="dark"] .ep-math-status,html[data-theme="dark"] .ep-math-whiteboard,body[data-ai-study-theme="dark"] .ep-math-whiteboard{background:#102238;border-color:#28527f;color:#eaf3ff}html[data-theme="dark"] .ep-math-controls label,body[data-ai-study-theme="dark"] .ep-math-controls label{color:#dcecff}html[data-theme="dark"] .ep-math-controls select,html[data-theme="dark"] .ep-math-pane textarea,html[data-theme="dark"] .ep-voice-box textarea,body[data-ai-study-theme="dark"] .ep-math-controls select,body[data-ai-study-theme="dark"] .ep-math-pane textarea,body[data-ai-study-theme="dark"] .ep-voice-box textarea{background:#07182b;color:#fff;border-color:#2b5b88}html[data-theme="dark"] .ep-math-controls select option,body[data-ai-study-theme="dark"] .ep-math-controls select option{background:#07182b;color:#fff}html[data-theme="dark"] .ep-math-pane textarea::placeholder,html[data-theme="dark"] .ep-voice-box textarea::placeholder,body[data-ai-study-theme="dark"] .ep-math-pane textarea::placeholder,body[data-ai-study-theme="dark"] .ep-voice-box textarea::placeholder{color:#a9c3e2}html[data-theme="dark"] .ep-math-step,html[data-theme="dark"] .ep-board-question,html[data-theme="dark"] .ep-math-teacher-says,html[data-theme="dark"] .ep-math-similar,body[data-ai-study-theme="dark"] .ep-math-step,body[data-ai-study-theme="dark"] .ep-board-question,body[data-ai-study-theme="dark"] .ep-math-teacher-says,body[data-ai-study-theme="dark"] .ep-math-similar{background:#0b1b30;border-color:#28527f;color:#eaf3ff}html[data-theme="dark"] .ep-math-secondary,html[data-theme="dark"] .ep-math-doubt-buttons button,body[data-ai-study-theme="dark"] .ep-math-secondary,body[data-ai-study-theme="dark"] .ep-math-doubt-buttons button{background:#0d2036;border-color:#2c5c8a;color:#fff}html[data-theme="dark"] .ep-math-livebar,body[data-ai-study-theme="dark"] .ep-math-livebar{background:#0b1c31;border-color:#2b5b88;color:#fff}@media(max-width:860px){.ep-math-teacher-card{align-items:flex-start;flex-direction:column}.ep-math-teacher-layout{grid-template-columns:1fr}.ep-math-teacher-avatar{min-height:360px}.ep-math-controls{grid-template-columns:1fr}.ep-math-actions button,.ep-math-doubt-buttons button{flex:1 1 100%}} 

/* v1.1.0: Maths OpenAI sync + D-ID live teacher buttons */
.ep-math-livebar{flex-wrap:wrap}
.ep-math-livebar button{white-space:nowrap;margin-left:6px}
.ep-math-livebar button[data-ep-math-did-open]{background:linear-gradient(135deg,#111827,#0ea5e9)}
html[data-theme="dark"] .ep-math-livebar button[data-ep-math-did-open],body[data-ai-study-theme="dark"] .ep-math-livebar button[data-ep-math-did-open]{background:linear-gradient(135deg,#2563eb,#14b8a6);color:#fff}

/* v29 Maths real-teacher voice + coach controls */
.ep-math-teacher-options{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,1fr);gap:12px;align-items:end;margin:2px 0 0}.ep-math-teacher-options label{font-size:12px;font-weight:900;color:#40566f;text-transform:uppercase;letter-spacing:.04em}.ep-math-teacher-options select{display:block;width:100%;margin-top:6px;border:1px solid #d5e2f7;border-radius:16px;padding:12px 14px;background:#fff;color:#102033;font-size:15px;outline:none}.ep-math-toggle{align-self:stretch;display:flex!important;align-items:center;gap:10px;padding:12px 14px;border-radius:16px;background:linear-gradient(135deg,#eefbff,#f7f4ff);border:1px solid #d8e6ff;color:#102033!important;text-transform:none!important;letter-spacing:0!important}.ep-math-toggle input{width:18px;height:18px;accent-color:#654cff}.ep-math-coach-panel{margin-top:14px;padding:14px;border-radius:18px;background:linear-gradient(135deg,#f3fbff,#fff8fc);border:1px solid #cde9ff;box-shadow:0 12px 28px rgba(16,24,40,.06)}.ep-coach-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:10px}.ep-coach-head strong{font-size:17px;color:#102033}.ep-coach-head span{padding:5px 9px;border-radius:999px;background:#eaf1ff;color:#285fe8;font-size:12px;font-weight:900}.ep-coach-actions{display:flex;flex-wrap:wrap;gap:8px}.ep-coach-actions button{border:0;border-radius:999px;background:linear-gradient(135deg,#fff,#eef8ff);border:1px solid #d7e5ff;color:#173150;font-weight:900;padding:9px 12px;cursor:pointer}.ep-coach-actions button:first-child{background:linear-gradient(135deg,#28a6ff,#7a4cff);border-color:transparent;color:#fff}.ep-coach-current{margin-top:12px;border-radius:14px;padding:12px;background:#fff;border:1px solid #dce8ff;color:#102033}.ep-coach-current p{margin:6px 0;color:#314966}.ep-coach-current code{display:block;white-space:pre-wrap;background:#102033;color:#fff;border-radius:12px;padding:10px;margin-top:8px}.ep-math-teacher-avatar.is-voice-active:before{content:"Teacher Voice ON";position:absolute;top:16px;right:16px;padding:7px 10px;border-radius:999px;background:rgba(16,32,51,.86);color:#fff;font-size:11px;font-weight:900;letter-spacing:.04em}.ep-math-teacher-avatar.is-voice-active .ep-teacher-wave i{animation-duration:.32s}.ep-teacher-face.is-speaking{animation:epFloat 2.2s ease-in-out infinite,epVoiceGlow 1s ease-in-out infinite alternate}@keyframes epVoiceGlow{from{box-shadow:0 0 0 8px rgba(42,166,255,.12),0 20px 44px rgba(16,24,40,.18)}to{box-shadow:0 0 0 12px rgba(42,166,255,.18),0 0 0 23px rgba(120,76,255,.10),0 20px 44px rgba(16,24,40,.18)}}
html[data-theme="dark"] .ep-math-teacher-options label,body[data-ai-study-theme="dark"] .ep-math-teacher-options label{color:#dcecff}html[data-theme="dark"] .ep-math-teacher-options select,body[data-ai-study-theme="dark"] .ep-math-teacher-options select{background:#07182b;color:#fff;border-color:#2b5b88}html[data-theme="dark"] .ep-math-toggle,body[data-ai-study-theme="dark"] .ep-math-toggle{background:#102238;border-color:#28527f;color:#fff!important}html[data-theme="dark"] .ep-math-coach-panel,body[data-ai-study-theme="dark"] .ep-math-coach-panel{background:#102238;border-color:#28527f;color:#eaf3ff}html[data-theme="dark"] .ep-coach-head strong,body[data-ai-study-theme="dark"] .ep-coach-head strong{color:#fff}html[data-theme="dark"] .ep-coach-current,body[data-ai-study-theme="dark"] .ep-coach-current{background:#07182b;border-color:#2b5b88;color:#fff}html[data-theme="dark"] .ep-coach-current p,body[data-ai-study-theme="dark"] .ep-coach-current p{color:#dcecff}html[data-theme="dark"] .ep-coach-actions button,body[data-ai-study-theme="dark"] .ep-coach-actions button{background:#0a1a2e;border-color:#2b5b88;color:#fff}
@media (max-width:760px){.ep-math-teacher-options{grid-template-columns:1fr}.ep-coach-actions button{flex:1 1 calc(50% - 8px)}}

/* v30 Maths teacher Indian voice/pronunciation selector */
.ep-math-teacher-options{grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) minmax(180px,1fr)}
.ep-math-teacher-options [data-ep-voice-pronunciation]{font-weight:800}
.ep-math-status[data-ep-math-status]{transition:background .18s ease,color .18s ease}
@media (max-width:980px){.ep-math-teacher-options{grid-template-columns:1fr}}

/* v31: voice + dropdown readability refinements */
.ep-math-controls select,
.ep-math-teacher-options select{
  min-height:54px !important;
  height:auto !important;
  line-height:1.35 !important;
  padding:14px 46px 14px 16px !important;
  font-size:15px !important;
  font-weight:800 !important;
  overflow:visible !important;
  text-overflow:clip !important;
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  background-image:linear-gradient(45deg,transparent 50%,#694cff 50%),linear-gradient(135deg,#694cff 50%,transparent 50%),linear-gradient(to right,#dce8ff,#dce8ff) !important;
  background-position:calc(100% - 20px) calc(50% - 2px),calc(100% - 14px) calc(50% - 2px),calc(100% - 38px) 50% !important;
  background-size:6px 6px,6px 6px,1px 26px !important;
  background-repeat:no-repeat !important;
}
.ep-math-controls label,
.ep-math-teacher-options label{min-width:0;overflow:visible!important;}
.ep-math-controls select option,
.ep-math-teacher-options select option{font-size:15px;line-height:1.5;padding:8px 12px;}
.ep-math-teacher-avatar.is-listening:after{
  content:"Listening";
  position:absolute;
  top:16px;
  left:16px;
  padding:7px 11px;
  border-radius:999px;
  background:rgba(40,166,255,.92);
  color:#fff;
  font-size:11px;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
  box-shadow:0 10px 22px rgba(40,166,255,.24);
}
.ep-math-teacher-avatar.is-listening .ep-teacher-wave i{animation:epWave .28s ease-in-out infinite alternate;}
.ep-math-teacher-avatar.is-voice-active .ep-teacher-wave,
.ep-math-teacher-avatar.is-listening .ep-teacher-wave{transform:scale(1.08);}
.ep-coach-actions button[data-ep-teach-concept],
.ep-coach-actions button[data-ep-mistake-drill],
.ep-coach-actions button[data-ep-practice-set]{background:linear-gradient(135deg,#f9fbff,#eaf5ff);}
@media (max-width:1100px){.ep-math-controls{grid-template-columns:1fr!important}.ep-math-teacher-options{grid-template-columns:1fr!important}}
html[data-theme="dark"] .ep-math-controls select,
body[data-ai-study-theme="dark"] .ep-math-controls select,
html[data-theme="dark"] .ep-math-teacher-options select,
body[data-ai-study-theme="dark"] .ep-math-teacher-options select{
  background-color:#07182b !important;
  color:#fff !important;
  border-color:#2b5b88 !important;
  background-image:linear-gradient(45deg,transparent 50%,#7dd3fc 50%),linear-gradient(135deg,#7dd3fc 50%,transparent 50%),linear-gradient(to right,#2b5b88,#2b5b88) !important;
}
html[data-theme="dark"] .ep-coach-actions button[data-ep-teach-concept],
html[data-theme="dark"] .ep-coach-actions button[data-ep-mistake-drill],
html[data-theme="dark"] .ep-coach-actions button[data-ep-practice-set],
body[data-ai-study-theme="dark"] .ep-coach-actions button[data-ep-teach-concept],
body[data-ai-study-theme="dark"] .ep-coach-actions button[data-ep-mistake-drill],
body[data-ai-study-theme="dark"] .ep-coach-actions button[data-ep-practice-set]{background:#0a1a2e;color:#fff;border-color:#2b5b88;}


/* v32: stronger teacher voice + class-wise teaching controls */
.ep-math-actions button[data-ep-class-wise],
.ep-math-actions button[data-ep-stop-voice]{white-space:nowrap;}
.ep-math-actions button[data-ep-stop-voice]{background:#fff3f3;border-color:#ffd1d1;color:#b42318;}
.ep-math-actions button[data-ep-math-speak]{box-shadow:0 8px 22px rgba(40,166,255,.16)}
.ep-math-teacher-avatar.is-voice-active .ep-teacher-mouth{animation:epTeacherTalk .18s ease-in-out infinite alternate;}
@keyframes epTeacherTalk{from{transform:scaleX(1) scaleY(.65)}to{transform:scaleX(1.28) scaleY(1.35)}}
.ep-math-coach-panel .ep-coach-actions button[data-ep-class-wise],
.ep-math-coach-panel .ep-coach-actions button[data-ep-answer-check-trick]{background:linear-gradient(135deg,#fff7ed,#eef8ff);}
html[data-theme="dark"] .ep-math-actions button[data-ep-stop-voice],
body[data-ai-study-theme="dark"] .ep-math-actions button[data-ep-stop-voice]{background:#351515;border-color:#7f1d1d;color:#fecaca;}
html[data-theme="dark"] .ep-math-coach-panel .ep-coach-actions button[data-ep-class-wise],
html[data-theme="dark"] .ep-math-coach-panel .ep-coach-actions button[data-ep-answer-check-trick],
body[data-ai-study-theme="dark"] .ep-math-coach-panel .ep-coach-actions button[data-ep-class-wise],
body[data-ai-study-theme="dark"] .ep-math-coach-panel .ep-coach-actions button[data-ep-answer-check-trick]{background:#0a1a2e;color:#fff;border-color:#2b5b88;}

/* v1.26.6 - Maths teacher class-wise advanced solution cards */
.ep-math-class-method,
.ep-math-check-trick,
.ep-math-practice-set{
  margin:12px 0;
  padding:13px 15px;
  border-radius:16px;
  border:1px solid rgba(37,99,235,.18);
  background:linear-gradient(135deg,rgba(239,246,255,.95),rgba(255,255,255,.95));
  color:#102033;
  line-height:1.55;
  box-shadow:0 8px 22px rgba(15,23,42,.06);
}
.ep-math-check-trick{border-color:rgba(22,163,74,.25);background:linear-gradient(135deg,rgba(240,253,244,.98),rgba(255,255,255,.96));}
.ep-math-practice-set{border-color:rgba(124,58,237,.22);background:linear-gradient(135deg,rgba(245,243,255,.98),rgba(255,255,255,.96));}
.ep-math-teacher-avatar.is-voice-active .ep-math-bars i,
.ep-math-teacher-face.is-speaking + .ep-math-bars i{
  animation:epMathBars .42s ease-in-out infinite alternate;
}

/* v38: Maths teacher voice model refinement only */
.ep-math-teacher-options label small{display:block;margin-top:6px;font-size:11px;line-height:1.35;color:#60708a;font-weight:600;text-transform:none;letter-spacing:0}
.ep-math-teacher-options select[data-ep-voice-pronunciation]{min-height:54px;padding-right:46px;line-height:1.35;font-weight:800}
.ep-math-teacher-avatar.is-voice-active .ep-math-avatar-caption::after{content:' • speaking';color:#0ea5e9;font-weight:900}
.ai-study-dark .ep-math-teacher-options label small{color:#d7e8ff}


/* v1.27.4 smaller avatar panel + bigger workspace */
.ep-math-teacher-layout{grid-template-columns:minmax(180px,240px) 1fr!important;gap:16px!important}
.ep-math-teacher-avatar{min-height:430px!important;padding:18px 14px!important}
.ep-teacher-face{width:150px!important;height:185px!important;border-radius:72px 72px 58px 58px!important}
.ep-teacher-hair{left:8px!important;right:8px!important;top:-18px!important;height:72px!important;border-radius:72px 72px 38px 38px!important}
.ep-teacher-eye{top:80px!important;width:28px!important;height:16px!important}
.ep-eye-left{left:34px!important}.ep-eye-right{right:34px!important}
.ep-teacher-eye:after{left:10px!important;top:4px!important}
.ep-teacher-mouth{bottom:40px!important;width:38px!important;height:14px!important}
.ep-math-teacher-avatar strong{font-size:16px!important}
.ep-math-teacher-avatar p{font-size:14px!important;line-height:1.5!important}
.ep-real-avatar-wrap{position:relative;width:min(100%,168px);height:220px;border-radius:28px;overflow:hidden;background:#eef3ff;box-shadow:0 18px 38px rgba(16,24,40,.18);display:flex;align-items:center;justify-content:center}
.ep-real-avatar-wrap video,.ep-real-avatar-wrap img{width:100%;height:100%;object-fit:cover;display:block}
.ep-real-avatar-wrap:after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(255,255,255,0));pointer-events:none}
.ep-real-avatar-eye{position:absolute;top:var(--ep-eye-top,39%);width:var(--ep-eye-width,12%);height:var(--ep-eye-height,4.5%);border-radius:999px;background:rgba(11,17,35,.85);transform:translate(-50%,-50%);box-shadow:0 0 0 2px rgba(255,255,255,.16)}
.ep-real-avatar-eye--left{left:var(--ep-eye-left,40%)}
.ep-real-avatar-eye--right{left:var(--ep-eye-right,60%)}
.ep-real-avatar-wrap.has-blink .ep-real-avatar-eye{animation:epRealBlink 6.6s infinite}
.ep-real-avatar-mouth{position:absolute;left:var(--ep-mouth-left,50%);top:var(--ep-mouth-top,68%);width:var(--ep-mouth-width,18%);height:var(--ep-mouth-height,5.8%);transform:translate(-50%,-50%);border-radius:999px;background:radial-gradient(circle at 50% 78%,#ff9bb3 0 26%,#8b1636 27% 100%);opacity:.84;transition:transform .14s ease,height .14s ease,opacity .14s ease}
.ep-math-teacher-avatar.is-voice-active .ep-real-avatar-mouth,.ep-math-teacher-avatar.is-listening .ep-real-avatar-mouth{animation:epRealTalk .22s ease-in-out infinite alternate;opacity:.96}
@keyframes epRealBlink{0%,47%,49%,100%{transform:translate(-50%,-50%) scaleY(1)}48%{transform:translate(-50%,-50%) scaleY(.08)}}
@keyframes epRealTalk{from{transform:translate(-50%,-50%) scaleY(.72)}to{transform:translate(-50%,-50%) scaleY(1.34)}}
@media(max-width:860px){.ep-math-teacher-layout{grid-template-columns:1fr!important}.ep-math-teacher-avatar{min-height:360px!important}.ep-real-avatar-wrap{width:min(100%,150px);height:198px}}

/* v1.27.5 top aligned compact maths avatar + clickable smart suggestions */
.ep-math-teacher-avatar{justify-content:flex-start!important;padding-top:18px!important;min-height:410px!important}
.ep-math-smart-suggestions{width:100%;margin-top:12px;padding:10px;border-radius:16px;background:rgba(255,255,255,.84);border:1px solid #d9e7ff;box-shadow:0 10px 22px rgba(16,24,40,.06);text-align:left}
.ep-math-smart-suggestions[hidden]{display:none!important}
.ep-math-smart-suggestions strong{display:block;font-size:12px;color:#285fe8;margin-bottom:7px}
.ep-math-smart-suggestions div{display:flex;flex-direction:column;gap:6px}
.ep-math-smart-suggestions button{border:0;border-radius:12px;padding:7px 9px;background:#f4f8ff;color:#102033;font-size:12px;font-weight:800;cursor:pointer;text-align:left;box-shadow:inset 0 0 0 1px #dbe7ff}
.ep-math-smart-suggestions button:hover{background:#e8f1ff}
.ep-math-whiteboard{height:auto!important;min-height:120px!important;max-height:none!important;overflow:visible!important}
.ep-math-teacher-workspace,.ep-math-teacher-modal{overflow:visible!important}
html[data-theme="dark"] .ep-math-smart-suggestions,body[data-ai-study-theme="dark"] .ep-math-smart-suggestions{background:#0d2036;border-color:#2b5b88}
html[data-theme="dark"] .ep-math-smart-suggestions button,body[data-ai-study-theme="dark"] .ep-math-smart-suggestions button{background:#102944;color:#eaf3ff;box-shadow:inset 0 0 0 1px #2b5b88}


/* v1.28.4 Maths Live Teacher responsive + working layout guard */
.ep-math-teacher{max-width:1180px!important;width:100%!important;overflow-x:hidden!important}
.ep-math-teacher-modal,.ep-math-teacher-workspace,.ep-math-whiteboard,.ep-math-pane,.ep-math-camera-box{max-width:100%!important;min-width:0!important;overflow-wrap:anywhere!important}
.ep-math-teacher-layout{grid-template-columns:minmax(170px,230px) minmax(0,1fr)!important;align-items:start!important}
.ep-math-teacher-avatar{align-self:start!important;position:sticky;top:12px;min-height:360px!important;max-height:none!important}
.ep-math-pane img,.ep-math-camera-box img,.ep-math-camera-box video,.ep-math-camera-box canvas{max-width:100%!important;max-height:240px!important;width:auto!important;height:auto!important;object-fit:contain!important;display:block!important;margin:8px auto!important}
.ep-math-whiteboard{height:auto!important;max-height:none!important;overflow:visible!important}
.ep-math-output-expanded{height:auto!important;max-height:none!important;overflow:visible!important}
.ep-math-actions,.ep-math-doubt-buttons,.ep-coach-actions{align-items:center!important}
.ep-math-actions button,.ep-math-doubt-buttons button,.ep-coach-actions button{min-height:42px!important;line-height:1.15!important}
.ep-math-controls select,.ep-math-teacher-options select{min-height:48px!important;line-height:1.35!important;padding:12px 42px 12px 14px!important;text-overflow:ellipsis!important}
@media(max-width:980px){
  .ep-math-teacher-layout{grid-template-columns:1fr!important}
  .ep-math-teacher-avatar{position:relative!important;top:auto!important;min-height:250px!important}
  .ep-math-controls,.ep-math-teacher-options{grid-template-columns:1fr!important}
}
