
:root {
  --ink: #182944;
  --muted: #718098;
  --line: #dfe6f1;
  --panel: #ffffff;
  --blue: #315fce;
  --blue-dark: #21499d;
  --green: #159e72;
  --purple: #7652cc;
  --warm: #fff6dd;
  --shadow: 0 16px 44px rgba(29, 48, 86, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #eef2f8;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 15% 5%, #f9fbff 0, #eef2f8 42%, #e9eef6 100%); }
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; }
.app-shell { min-height: 100vh; padding: 14px; }
.topbar { max-width: 1600px; margin: 0 auto 12px; min-height: 68px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-radius: 20px; background: #10203d; color: white; box-shadow: var(--shadow); }
.brand-wrap, .header-actions, .teacher-topline, .progress-heading, .board-toolbar, .toolbar-actions, .quick-actions, .answer-row, .card-heading { display: flex; align-items: center; }
.brand-wrap { gap: 11px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; font-weight: 900; font-size: 21px; color: white; background: linear-gradient(145deg, #75a6ff, #7652cc); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.brand { font-size: 18px; font-weight: 850; letter-spacing: -.02em; }
.subtitle { margin-top: 2px; color: #b8c7e1; font-size: 12px; }
.header-actions { gap: 9px; }
.engine-badge, .ai-label, .local-pill { border-radius: 999px; padding: 7px 10px; font-size: 10px; font-weight: 850; letter-spacing: .02em; }
.engine-badge.demo { color: #d8e5ff; background: #23365a; border: 1px solid #3a527e; }
.engine-badge.remote { color: #d7fff1; background: #164c3c; border: 1px solid #2c8065; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: white; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); }
.classroom { max-width: 1600px; margin: 0 auto; display: grid; grid-template-columns: minmax(260px,.82fr) minmax(560px,2.15fr) minmax(240px,.72fr); gap: 12px; align-items: stretch; }
.teacher-panel, .board-panel, .utility-card { background: var(--panel); border: 1px solid rgba(213,222,236,.9); box-shadow: var(--shadow); }
.teacher-panel { min-height: 760px; padding: 16px; border-radius: 24px; display: flex; flex-direction: column; overflow: hidden; }
.teacher-topline { justify-content: space-between; }
.state-pill { border-radius: 999px; padding: 7px 10px; font-size: 10px; font-weight: 900; color: #4d5c74; background: #edf1f7; }
.state-pill.speaking { color: #214b9f; background: #e7efff; }.state-pill.listening { color: #0e7251; background: #dff8ed; }.state-pill.thinking { color: #704b12; background: #fff1ce; }.state-pill.waiting { color: #59677c; background: #eef1f5; }
.ai-label { color: #6c4fb0; background: #f0ebff; }
.avatar-frame { position: relative; isolation: isolate; width: min(100%, 300px); aspect-ratio: .9; margin: 16px auto 12px; border-radius: 28px; overflow: hidden; background: linear-gradient(160deg,#0f1d38,#243e71 58%,#6d4bb7); box-shadow: inset 0 0 0 1px rgba(255,255,255,.15), 0 18px 45px rgba(31,52,93,.22); }
.avatar-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center; position: relative; z-index: 2; transform: scale(1.035); animation: idleFloat 4s ease-in-out infinite; }
.avatar-glow { position: absolute; inset: 18% 8% 6%; z-index: 1; background: radial-gradient(circle,rgba(83,142,255,.55),transparent 67%); filter: blur(20px); }
.audio-orbit { position: absolute; z-index: 3; inset: 7%; border: 3px solid rgba(111,173,255,.9); border-radius: 26px; opacity: 0; }
.listening-dots { position: absolute; z-index: 4; bottom: 14px; left: 50%; transform: translateX(-50%); display: none; gap: 5px; padding: 8px 11px; border-radius: 999px; background: rgba(12,32,61,.82); }
.listening-dots i { width: 7px; height: 7px; border-radius: 50%; background: #8ff0ca; animation: dotBounce 1s infinite; }.listening-dots i:nth-child(2){animation-delay:.15s}.listening-dots i:nth-child(3){animation-delay:.3s}
.avatar-frame.speaking .audio-orbit { opacity: 1; animation: orbitPulse 1.2s ease-out infinite; }.avatar-frame.speaking img { animation: speakFloat 1.8s ease-in-out infinite; }.avatar-frame.listening .listening-dots { display: flex; }.avatar-frame.listening img { animation: listeningFloat 2.1s ease-in-out infinite; }
.teacher-copy h1 { margin: 5px 0 7px; font-size: 25px; line-height: 1.08; letter-spacing: -.035em; }.teacher-copy p { min-height: 90px; margin: 0; color: #61708a; font-size: 14px; line-height: 1.56; }
.teacher-controls { display: grid; gap: 8px; margin-top: 12px; }
.primary, .ghost, .soft, .mode-button, .small-primary, .text-button { border-radius: 13px; padding: 11px 13px; font-weight: 850; }
.primary, .small-primary { color: white; background: linear-gradient(135deg,var(--blue),#597ee1); box-shadow: 0 8px 18px rgba(49,95,206,.2); }.primary:hover,.small-primary:hover { background: linear-gradient(135deg,var(--blue-dark),#4d70cc); }
.ghost { color: #2e559e; background: #f3f6fc; border: 1px solid #dbe3f0; }.wide { width: 100%; }.soft { color: #425777; background: #f3f6fb; border: 1px solid #dfe6f1; padding: 9px 11px; font-size: 12px; }
button:disabled { opacity: .48; cursor: not-allowed; }
.mini-progress { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }.progress-heading { justify-content: space-between; font-size: 11px; color: #738198; }.progress-heading strong { color: var(--blue); }.progress-track { height: 8px; margin: 8px 0 14px; border-radius: 999px; background: #e9edf4; overflow: hidden; }.progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#4f78dc,#7652cc); transition: width .45s ease; }
.lesson-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: step; }.lesson-steps li { position: relative; padding-left: 28px; color: #8b96a8; font-size: 11px; font-weight: 750; }.lesson-steps li::before { content: counter(step); counter-increment: step; position: absolute; left: 0; top: -2px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #edf1f6; color: #8793a6; font-size: 9px; }.lesson-steps li.done { color: #18845f; }.lesson-steps li.done::before { content: "✓"; background: #daf4e8; color: #0f7955; }.lesson-steps li.current { color: #2c58bd; }.lesson-steps li.current::before { color: white; background: #426bd2; }
.board-panel { min-height: 760px; border-radius: 24px; overflow: hidden; display: grid; grid-template-rows: auto minmax(510px,1fr) auto; }
.board-toolbar { justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }.eyebrow { color: #8290a6; text-transform: uppercase; letter-spacing: .09em; font-size: 9px; font-weight: 900; }.board-toolbar h2, .card-heading h3 { margin: 3px 0 0; }.board-toolbar h2 { font-size: 21px; }.toolbar-actions { gap: 7px; }.mode-button { padding: 8px 10px; color: #61708a; background: #f4f6fa; border: 1px solid #dee5ef; font-size: 11px; }.mode-button.active { color: #2655b7; background: #eaf0ff; border-color: #bfcff5; }.board-toolbar .icon-button { color: #53627a; background: #f4f6fa; border-color: #dee5ef; }
.board-stage { position: relative; min-height: 510px; overflow: hidden; background: linear-gradient(#fff,#fbfcff); }.lesson-svg { width: 100%; height: 100%; min-height: 510px; display: block; }.scene { display: none; }.scene.active { display: block; }.board-title { fill: #253a5d; font-size: 36px; font-weight: 900; }.board-subtitle { fill: #70809a; font-size: 25px; font-weight: 700; }.icon-disc { fill: #edf2ff; stroke: #cfdaf2; stroke-width: 3; }.large-emoji { font-size: 62px; }.welcome-icons > * { animation: welcomePop 2.2s ease-in-out infinite; }.welcome-icons > *:nth-child(n+3):nth-child(-n+4){animation-delay:.2s}.welcome-icons > *:nth-child(n+5){animation-delay:.4s}
.pizza-line { stroke: #9a4f27; stroke-width: 7; stroke-linecap: round; }.draw-circle { stroke-dasharray: 1050; stroke-dashoffset: 1050; }.draw-line { stroke-dasharray: 340; stroke-dashoffset: 340; }.conceptScene-animate .draw-circle { animation: drawStroke 1.15s ease forwards; }.conceptScene-animate .draw-line { animation: drawStroke .85s ease .75s forwards; }.conceptScene-animate .delay-one { animation-delay: 1.35s; }.topping { fill: #da4b41; opacity: 0; transform-origin: center; }.topping.static { opacity: 1; }.conceptScene-animate .topping { animation: toppingPop .35s ease 1.9s forwards; }.conceptScene-animate .topping:nth-of-type(2){animation-delay:2.05s}.conceptScene-animate .topping:nth-of-type(3){animation-delay:2.2s}.conceptScene-animate .topping:nth-of-type(4){animation-delay:2.35s}
.reveal-later { opacity: 0; }.note-card { fill: #f2f5fb; stroke: #d9e1ee; stroke-width: 3; }.fraction-big { fill: #2b59bf; font-size: 40px; font-weight: 900; }.equals { fill: #7b879b; font-size: 24px; font-weight: 800; }
.eaten-slice { fill: #f4f7fc; stroke: #a15730; stroke-width: 4; stroke-dasharray: 9 8; }.question-text { fill: #596b87; font-size: 29px; font-weight: 720; }.question-strong { fill: #263f68; font-size: 35px; font-weight: 900; }.question-highlight { fill: #315fce; font-size: 34px; font-weight: 900; }.result-label { fill: #7652cc; font-size: 67px; font-weight: 950; }
.bar-outline { fill: #fff; stroke: #2c4b7e; stroke-width: 6; }.bar-part { fill: #b8e1ff; stroke: none; }.bar-part.eaten { fill: #f0f2f6; }.bar-line { stroke: #2c4b7e; stroke-width: 5; }.bar-number { fill: #204a88; font-size: 38px; font-weight: 900; }.bar-cross { fill: #bf4255; font-size: 78px; font-weight: 900; }.fraction-answer { fill: #315fce; font-size: 60px; font-weight: 950; }
.sun { fill: #ffd166; stroke: #f4a321; stroke-width: 5; }.cartoon-bob { animation: cartoonBob 2.5s ease-in-out infinite; transform-origin: 105px 110px; }.kid-head { fill: #f3c9a9; stroke: #754f3b; stroke-width: 4; }.kid-head.two { fill: #c88e67; }.kid-head.three { fill: #e7b890; }.kid-head.four { fill: #9f6f52; }.kid-shirt { fill: #4f7bea; }.kid-shirt.two { fill: #f45f84; }.kid-shirt.three { fill: #16a37b; }.kid-shirt.four { fill: #7f5bd7; }.kid-smile { fill: none; stroke: #633b2c; stroke-width: 4; stroke-linecap: round; }.kid { animation: kidWave 2.2s ease-in-out infinite; transform-origin: 80px 110px; }.kid-two{animation-delay:.18s}.kid-three{animation-delay:.36s}.kid-four{animation-delay:.54s}.pizza-pop { animation: pizzaPop 1.4s ease-in-out infinite; transform-origin: 500px 445px; }.cartoon-eaten { fill: #f4f7fc; stroke: #a15730; stroke-width: 3; stroke-dasharray: 8 7; }.cartoon-caption { fill: #4b5c78; font-size: 24px; font-weight: 800; }
.teachback-card { fill: #f5f7fc; stroke: #d9e1ef; stroke-width: 4; }.teachback-question { fill: #2d4e84; font-size: 38px; font-weight: 900; }.teachback-stem { fill: #6d4bb7; font-size: 30px; font-weight: 850; }.mini-part { fill: #b8e1ff; stroke: #2c4b7e; stroke-width: 3; }.mini-part.eaten { fill: #f0f2f6; stroke-dasharray: 7 5; }
.trophy { font-size: 110px; }.stars text { font-size: 60px; animation: starSpin 1.2s ease-in-out infinite; transform-origin: center; }.stars text:nth-child(2){animation-delay:.15s}.stars text:nth-child(3){animation-delay:.3s}
#inkCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; touch-action: none; }.board-stage.drawing #inkCanvas { pointer-events: auto; cursor: crosshair; }.board-stage.drawing { box-shadow: inset 0 0 0 3px rgba(49,95,206,.22); }
.board-prompt { position: absolute; z-index: 8; bottom: 14px; left: 14px; right: 14px; border-radius: 16px; padding: 12px 14px; background: rgba(16,32,61,.93); color: white; display: flex; justify-content: space-between; align-items: center; gap: 12px; box-shadow: 0 10px 25px rgba(30,45,75,.2); }.board-prompt strong,.board-prompt span { display: block; }.board-prompt span { margin-top: 3px; color: #ccd6e8; font-size: 12px; }.small-primary { padding: 8px 12px; white-space: nowrap; }
.response-area { border-top: 1px solid var(--line); padding: 12px 14px 14px; background: #fff; }.quick-actions { gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }.answer-row { gap: 8px; }.answer-row input { flex: 1; min-width: 0; border: 1px solid #d8e0ec; background: #f8faff; border-radius: 14px; padding: 13px 14px; color: var(--ink); }.mic-button { width: 47px; height: 47px; padding: 0; border-radius: 50%; background: #eff3fb; border: 1px solid #dae3f2; }.mic-button.listening { color: white; background: var(--green); animation: micPulse 1s infinite; }.answer-choices { display: flex; gap: 8px; margin-top: 10px; }.answer-choices button { flex: 1; border: 1px solid #d9e2f0; background: #f8faff; color: #2e559e; font-size: 18px; padding: 10px; border-radius: 12px; }.interaction-status { min-height: 18px; margin: 9px 2px 0; font-size: 12px; color: #77859c; }
.utility-panel { display: grid; gap: 12px; align-content: start; }.utility-card { border-radius: 22px; padding: 15px; }.card-heading { justify-content: space-between; gap: 8px; }.card-heading h3 { font-size: 16px; }.local-pill { color: #3670b4; background: #edf6ff; padding: 6px 8px; }.goal-box { margin-top: 12px; padding: 12px; border-radius: 14px; background: linear-gradient(135deg,#f0f5ff,#f7f2ff); }.goal-box small,.goal-box strong { display: block; }.goal-box small { color: #74839a; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; }.goal-box strong { margin-top: 5px; font-size: 12px; line-height: 1.45; }
.memory-steps { list-style: none; margin: 13px 0; padding: 0; display: grid; gap: 8px; }.memory-steps li { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 12px; color: #8290a4; }.memory-steps li > span { flex: 0 0 24px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #edf1f6; font-size: 10px; font-weight: 900; }.memory-steps strong,.memory-steps small { display: block; }.memory-steps strong { font-size: 11px; }.memory-steps small { margin-top: 2px; font-size: 9px; }.memory-steps li.active { color: #2855b5; background: #edf3ff; }.memory-steps li.active > span { color: white; background: #3f69cf; }.memory-steps li.done { color: #16835e; }.memory-steps li.done > span { color: transparent; background: #d9f4e7; position: relative; }.memory-steps li.done > span::after { content: "✓"; color: #147653; position: absolute; }
.points-total { color: var(--purple); }.reward-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 12px; }.reward-grid div { background: #f7f4ff; border: 1px solid #e7defb; border-radius: 14px; padding: 10px 5px; text-align: center; }.reward-grid span,.reward-grid strong,.reward-grid small { display: block; }.reward-grid span { font-size: 21px; }.reward-grid strong { font-size: 17px; margin-top: 3px; }.reward-grid small { color: #7e7195; font-size: 10px; }.reward-message { margin-top: 10px; background: var(--warm); color: #835d0b; border-radius: 13px; padding: 10px; font-size: 11px; line-height: 1.45; }
.evidence-list { margin: 12px 0 8px; display: grid; gap: 0; }.evidence-list div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #edf0f5; }.evidence-list dt { color: #7a879b; font-size: 11px; }.evidence-list dd { margin: 0; color: #2e476f; font-size: 11px; font-weight: 900; text-align: right; }.text-button { width: 100%; padding: 8px; color: #8b5360; background: transparent; font-size: 10px; }
dialog { border: none; padding: 0; border-radius: 22px; box-shadow: 0 25px 80px rgba(21,36,66,.28); width: min(460px,calc(100% - 30px)); } dialog::backdrop { background: rgba(13,24,47,.55); backdrop-filter: blur(4px); }.settings-card { padding: 20px; display: grid; gap: 14px; }.dialog-heading { display: flex; justify-content: space-between; align-items: center; }.dialog-heading h2 { margin: 0; }.dialog-heading .icon-button { color: var(--ink); border-color: var(--line); background: #f4f6fa; }.settings-card label { display: grid; gap: 7px; font-weight: 750; font-size: 13px; }.settings-card select,.settings-card input { width: 100%; border: 1px solid #d9e1ec; border-radius: 12px; padding: 10px; background: #fbfcff; color: var(--ink); }.check-row { grid-template-columns: auto 1fr; align-items: center; }.setting-help { color: #7d899d; font-size: 10.5px; line-height: 1.4; font-weight: 500; }
.toast { position: fixed; z-index: 50; right: 20px; bottom: 20px; max-width: 360px; background: #14213d; color: white; border-radius: 15px; padding: 12px 15px; box-shadow: 0 16px 40px rgba(21,36,66,.3); opacity: 0; transform: translateY(14px); pointer-events: none; transition: .25s ease; font-size: 13px; }.toast.show { opacity: 1; transform: translateY(0); }.hidden { display: none !important; }
@keyframes idleFloat { 0%,100%{transform:scale(1.035) translateY(0)}50%{transform:scale(1.045) translateY(-4px)} }
@keyframes speakFloat { 0%,100%{transform:scale(1.04) translateY(0)}50%{transform:scale(1.055) translateY(-2px)} }
@keyframes listeningFloat { 0%,100%{transform:scale(1.04) translateX(0)}50%{transform:scale(1.04) translateX(-2px)} }
@keyframes orbitPulse { 0%{transform:scale(.95);opacity:.8}100%{transform:scale(1.08);opacity:0} }
@keyframes dotBounce { 0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-7px)} }
@keyframes drawStroke { to{stroke-dashoffset:0} }
@keyframes toppingPop { from{opacity:0;transform:scale(.1)}to{opacity:1;transform:scale(1)} }
@keyframes welcomePop { 0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)} }
@keyframes cartoonBob { 0%,100%{transform:rotate(-2deg)}50%{transform:rotate(2deg) translateY(-5px)} }
@keyframes kidWave { 0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)} }
@keyframes pizzaPop { 0%,100%{transform:scale(1)}50%{transform:scale(1.06)} }
@keyframes starSpin { 0%,100%{transform:rotate(-8deg) scale(1)}50%{transform:rotate(8deg) scale(1.12)} }
@keyframes micPulse { 0%,100%{box-shadow:0 0 0 0 rgba(21,158,114,.25)}50%{box-shadow:0 0 0 10px rgba(21,158,114,0)} }
@media (max-width: 1180px) { .classroom { grid-template-columns: minmax(230px,.76fr) minmax(520px,2fr); }.utility-panel { grid-column: 1 / -1; grid-template-columns: repeat(3,1fr); }.teacher-panel,.board-panel { min-height: 700px; } }
@media (max-width: 820px) { .app-shell { padding: 8px; }.topbar { border-radius: 16px; padding: 10px 12px; }.subtitle { display: none; }.classroom { display: flex; flex-direction: column; }.teacher-panel { min-height: auto; display: grid; grid-template-columns: 125px 1fr; gap: 12px; border-radius: 18px; padding: 12px; }.teacher-topline { grid-column: 1 / -1; }.avatar-frame { width: 125px; margin: 0; border-radius: 22px; grid-row: 2 / 4; }.teacher-copy { align-self: center; }.teacher-copy h1 { font-size: 20px; }.teacher-copy p { min-height: auto; font-size: 13px; }.teacher-controls { margin: 0; align-self: start; display: flex; gap: 6px; }.teacher-controls button { width: auto; }.mini-progress { grid-column: 1 / -1; padding-top: 12px; }.lesson-steps { display: none; }.board-panel { min-height: 680px; border-radius: 18px; grid-template-rows: auto minmax(440px,1fr) auto; }.board-toolbar { align-items: flex-start; }.toolbar-actions { flex-wrap: wrap; justify-content: flex-end; }.board-toolbar h2 { font-size: 18px; }.utility-panel { grid-template-columns: 1fr; }.answer-row { flex-wrap: wrap; }.answer-row .mic-button { order: 1; }.answer-row input { order: 2; flex-basis: calc(100% - 60px); }.answer-row .primary { order: 3; width: 100%; } }
@media (max-width: 520px) { .brand { font-size: 15px; }.brand-mark { width: 36px; height: 36px; }.engine-badge { display: none; }.teacher-panel { grid-template-columns: 94px 1fr; }.avatar-frame { width: 94px; border-radius: 18px; }.teacher-copy h1 { font-size: 17px; }.teacher-copy p { font-size: 11.5px; line-height: 1.4; }.teacher-controls button { font-size: 11px; padding: 8px 9px; }.board-panel { min-height: 630px; }.board-stage,.lesson-svg { min-height: 400px; }.board-prompt { left: 8px; right: 8px; bottom: 8px; padding: 9px; }.board-prompt span { display: none; }.mode-button { font-size: 10px; padding: 7px; }.quick-actions { display: grid; grid-template-columns: repeat(2,1fr); }.soft { font-size: 10.5px; }.answer-choices { flex-wrap: wrap; }.answer-choices button { min-width: 28%; } }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }

/* V3.2 intent-router status */
.engine-badge.intent { color: #fff2c7; background: #56431a; border: 1px solid #8a6b2a; }
.engine-badge.intent.answer { color: #d7fff1; background: #164c3c; border-color: #2c8065; }
.engine-badge.intent.command { color: #e5eaff; background: #303d70; border-color: #596cba; }
.engine-badge.intent.unknown { color: #ffe4e6; background: #642a35; border-color: #9d4656; }


/* NOVA V3.3 homework upload pilot */
.homework-card {
  background:
    radial-gradient(circle at top right, rgba(91, 124, 250, .11), transparent 42%),
    #ffffff;
}
.homework-copy {
  margin: 10px 0 12px;
  color: #66758c;
  font-size: 12px;
  line-height: 1.5;
}
.homework-dropzone {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 116px;
  padding: 14px;
  border: 2px dashed #b9c9e4;
  border-radius: 17px;
  background: #f7faff;
  color: #315a9e;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.homework-dropzone:hover,
.homework-dropzone.dragging {
  border-color: #5c7cfa;
  background: #eef3ff;
  transform: translateY(-1px);
}
.homework-dropzone strong {
  font-size: 13px;
}
.homework-dropzone small {
  color: #74839a;
  font-size: 10px;
}
.homework-upload-icon {
  font-size: 28px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.homework-file-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid #dce5f2;
  border-radius: 13px;
  background: #fbfcff;
}
.homework-file-details div {
  min-width: 0;
}
.homework-file-details strong,
.homework-file-details small {
  display: block;
}
.homework-file-details strong {
  overflow: hidden;
  color: #22375a;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.homework-file-details small {
  margin-top: 3px;
  color: #7a8799;
  font-size: 9px;
}
.homework-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  color: #7a8799;
  font-size: 9px;
}
.homework-session code {
  padding: 4px 6px;
  border-radius: 8px;
  background: #f1f4f9;
  color: #4d6080;
  font-size: 9px;
}
.homework-status {
  min-height: 34px;
  margin: 9px 0 0;
  color: #77859c;
  font-size: 10px;
  line-height: 1.45;
}
.homework-status.success {
  color: #2f7a4a;
}
.homework-status.error {
  color: #b42318;
}
.homework-status.uploading {
  color: #315a9e;
}
.local-pill.checking {
  color: #6f5a00;
  background: #fff4c7;
}
.local-pill.online {
  color: #2f7a4a;
  background: #e9f7ed;
}
.local-pill.offline {
  color: #a3392f;
  background: #fdecea;
}
#uploadHomeworkButton {
  margin-top: 10px;
}
#uploadHomeworkButton[disabled] {
  cursor: not-allowed;
  opacity: .55;
}


/* NOVA V3.4 homework analysis and subject segregation */
.analysis-card {
  background:
    radial-gradient(circle at top right, rgba(112, 48, 160, .11), transparent 42%),
    #ffffff;
}
.analysis-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  margin: 10px 0;
  border: 1px solid #dce5f2;
  border-radius: 14px;
  background: #f8faff;
}
.analysis-progress strong,
.analysis-progress small {
  display: block;
}
.analysis-progress strong {
  color: #263e68;
  font-size: 11px;
}
.analysis-progress small {
  margin-top: 3px;
  color: #75839a;
  font-size: 9px;
  line-height: 1.4;
}
.analysis-spinner {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 3px solid #d9e2f2;
  border-top-color: #5c7cfa;
  border-radius: 50%;
  animation: nova-analysis-spin .9s linear infinite;
}
@keyframes nova-analysis-spin {
  to { transform: rotate(360deg); }
}
.analysis-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0;
}
.analysis-counts span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 7px;
  border-radius: 10px;
  background: #f4f6fb;
  color: #52627a;
  font-size: 9px;
}
.analysis-counts strong {
  color: #263e68;
  font-size: 12px;
}
.analysis-safety-note {
  margin: 9px 0 0;
  color: #7d668e;
  font-size: 9px;
  line-height: 1.45;
}
.analysis-dialog {
  width: min(1080px, 95vw);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
}
.analysis-dialog::backdrop {
  background: rgba(16, 25, 43, .68);
  backdrop-filter: blur(4px);
}
.analysis-dialog-card {
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  padding: 22px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(17, 34, 68, .28);
}
.analysis-document-summary {
  margin: 7px 0 14px;
  color: #58677e;
  line-height: 1.55;
}
.analysis-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e6ebf3;
}
.analysis-view-tabs {
  display: flex;
  gap: 7px;
}
.analysis-view-tabs .active {
  color: #ffffff;
  background: #315a9e;
}
.analysis-warnings {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #f0d79a;
  border-radius: 13px;
  background: #fff8df;
  color: #705a19;
  font-size: 11px;
}
.analysis-warnings ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.analysis-question-list {
  flex: 1;
  overflow: auto;
  padding: 14px 3px 14px 0;
}
.detected-question {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid #dce4f0;
  border-radius: 16px;
  background: #fbfcff;
}
.detected-question.needs-review {
  border-color: #e9c26e;
  background: #fffdf6;
}
.detected-question-heading,
.detected-meta,
.subject-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.detected-question-heading small {
  display: block;
  margin-top: 3px;
  color: #7b879a;
}
.question-sequence {
  color: #253d67;
  font-weight: 800;
}
.confidence-pill {
  padding: 5px 8px;
  border-radius: 999px;
  background: #edf2fb;
  color: #4d6385;
  font-size: 10px;
  white-space: nowrap;
}
.detected-question label {
  display: grid;
  gap: 5px;
  color: #5f6d82;
  font-size: 10px;
  font-weight: 700;
}
.detected-question select,
.detected-question textarea,
.detected-question input {
  width: 100%;
  border: 1px solid #cad5e5;
  border-radius: 10px;
  background: #ffffff;
  color: #1f2f4d;
  font: inherit;
  font-weight: 500;
}
.detected-question select,
.detected-question input {
  min-height: 36px;
  padding: 7px 9px;
}
.detected-question textarea {
  min-height: 88px;
  padding: 9px;
  resize: vertical;
  line-height: 1.45;
}
.detected-meta span {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  color: #738198;
  font-size: 10px;
}
.review-reason {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff2cf;
  color: #775b12;
  font-size: 10px;
}
.subject-group {
  margin-bottom: 20px;
}
.subject-group-heading {
  position: sticky;
  top: -14px;
  z-index: 2;
  margin-bottom: 9px;
  padding: 9px 11px;
  border-radius: 11px;
  background: #273f6a;
  color: #ffffff;
}
.subject-group-heading h3 {
  margin: 0;
}
.subject-group-heading span {
  font-size: 10px;
  opacity: .84;
}
.analysis-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 13px;
  border-top: 1px solid #e6ebf3;
}
.analysis-dialog-actions span {
  margin-right: auto;
  color: #6b788e;
  font-size: 10px;
}
@media (max-width: 720px) {
  .analysis-dialog-card {
    padding: 15px;
  }
  .analysis-toolbar,
  .analysis-dialog-actions,
  .detected-question-heading,
  .detected-meta {
    align-items: stretch;
    flex-direction: column;
  }
  .analysis-view-tabs {
    width: 100%;
  }
  .analysis-view-tabs button {
    flex: 1;
  }
}


/* NOVA V3.4.3 approval-state fix */
.analysis-approval-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  padding: 11px;
  border: 1px solid #a9d7b0;
  border-radius: 14px;
  background: #effaf1;
}
.analysis-approval-banner strong,
.analysis-approval-banner small {
  display: block;
}
.analysis-approval-banner strong {
  color: #245b31;
  font-size: 11px;
}
.analysis-approval-banner small {
  margin-top: 3px;
  color: #4f7458;
  font-size: 9px;
  line-height: 1.4;
}
.approval-check {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  border-radius: 50%;
  background: #2f7d3f;
  color: #ffffff;
  font-weight: 900;
}
#approveAnalysisStructure.approved,
#approveAnalysisStructure:disabled {
  cursor: default;
  opacity: 1;
  background: #2f7d3f;
  color: #ffffff;
}


/* NOVA V3.5 Mathematics teaching-session pilot */
.teaching-launch-card {
  background:
    radial-gradient(circle at top right, rgba(43, 123, 209, .14), transparent 44%),
    #ffffff;
}
.teaching-question-card {
  max-height: 88vh;
}
.teaching-grade-row {
  display: flex;
  align-items: end;
  gap: 18px;
  margin: 10px 0 14px;
  padding: 12px;
  border-radius: 14px;
  background: #f5f8fd;
}
.teaching-grade-row label {
  display: grid;
  gap: 5px;
  min-width: 150px;
  color: #5c6b82;
  font-size: 10px;
  font-weight: 800;
}
.teaching-grade-row select {
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #cad5e5;
  border-radius: 10px;
  background: #ffffff;
}
.teaching-grade-row p {
  margin: 0 0 4px;
  color: #65748b;
  font-size: 10px;
}
.teaching-question-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding: 2px 3px 12px 0;
}
.teaching-question-choice {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 13px;
  border: 1px solid #d5dfec;
  border-radius: 15px;
  background: #fbfcff;
  color: #263c62;
  text-align: left;
  cursor: pointer;
}
.teaching-question-choice:hover,
.teaching-question-choice.selected {
  border-color: #4777c2;
  background: #eef4ff;
  box-shadow: 0 0 0 2px rgba(71, 119, 194, .12);
}
.teaching-question-choice.unsupported {
  cursor: not-allowed;
  opacity: .58;
}
.teaching-question-choice span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.teaching-question-choice small,
.teaching-question-choice em {
  color: #718097;
  font-size: 9px;
}
.teaching-question-choice p {
  margin: 0;
  color: #334662;
  line-height: 1.45;
}
.teaching-question-choice em {
  font-style: normal;
}
.teaching-session-dialog {
  width: min(1120px, 96vw);
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
}
.teaching-session-dialog::backdrop {
  background: rgba(13, 24, 43, .72);
  backdrop-filter: blur(5px);
}
.teaching-session-card {
  display: flex;
  flex-direction: column;
  max-height: 94vh;
  padding: 21px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 25px 75px rgba(12, 28, 55, .33);
}
.teaching-status-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0 11px;
  color: #69778c;
  font-size: 10px;
}
.teaching-original-question {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-left: 4px solid #315f9e;
  border-radius: 8px 14px 14px 8px;
  background: #f2f6fc;
}
.teaching-original-question small,
.teaching-objective small,
.teaching-final-answer small {
  color: #718097;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.teaching-original-question strong {
  color: #22395f;
  line-height: 1.45;
}
.teaching-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 280px;
  color: #53647e;
}
.teaching-loading strong,
.teaching-loading small {
  display: block;
}
.teaching-loading small {
  margin-top: 5px;
  max-width: 520px;
  line-height: 1.5;
}
.teaching-lesson-content {
  flex: 1;
  overflow: auto;
  padding: 14px 3px 8px 0;
}
.teaching-lesson-content > section {
  margin-bottom: 14px;
}
.teaching-avatar-row {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 15px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 9% 25%, rgba(88, 123, 213, .2), transparent 29%),
    #f6f8fd;
}
.teaching-avatar-row img {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(30, 56, 101, .18);
}
.teaching-avatar-row p {
  margin: 6px 0 9px;
  color: #2d4164;
  font-size: 14px;
  line-height: 1.55;
}
.teaching-voice-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.teaching-objective {
  display: grid;
  gap: 5px;
  padding: 11px 13px;
  border: 1px solid #dce5f1;
  border-radius: 14px;
}
.teaching-objective strong {
  color: #29456f;
}
.teaching-explanation-list,
.teaching-worked-example ol {
  margin: 8px 0 0;
  padding-left: 22px;
  color: #3b4e6b;
  line-height: 1.55;
}
.teaching-explanation-list li,
.teaching-worked-example li {
  margin-bottom: 6px;
}
.teaching-whiteboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.teaching-whiteboard article {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 9px;
  padding: 12px;
  border: 1px solid #dbe5f1;
  border-radius: 14px;
  background:
    linear-gradient(rgba(44, 75, 120, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 75, 120, .04) 1px, transparent 1px),
    #fbfdff;
  background-size: 22px 22px;
}
.teaching-whiteboard article > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #315f9e;
  color: #ffffff;
  font-weight: 900;
}
.teaching-whiteboard strong {
  color: #29476f;
}
.teaching-whiteboard p {
  margin: 5px 0 0;
  white-space: pre-wrap;
  color: #3e506d;
  font-family: "Courier New", monospace;
  line-height: 1.5;
}
.teaching-worked-example {
  padding: 13px;
  border-radius: 15px;
  background: #f7f4ff;
}
.teaching-worked-example > strong {
  color: #4b3977;
}
.teaching-check-gate {
  padding: 15px;
  border: 2px solid #d8e2f1;
  border-radius: 17px;
  background: #ffffff;
}
.teaching-check-gate h3 {
  margin: 4px 0 7px;
}
.teaching-check-gate p {
  color: #334866;
  line-height: 1.5;
}
.teaching-check-gate textarea {
  width: 100%;
  min-height: 94px;
  margin: 4px 0 9px;
  padding: 10px;
  border: 1px solid #becde0;
  border-radius: 11px;
  resize: vertical;
  font: inherit;
}
.teaching-feedback-panel {
  padding: 13px;
  border-radius: 15px;
  background: #fff8df;
  color: #6b5517;
}
.teaching-feedback-panel h3 {
  margin-top: 0;
}
.teaching-hint {
  margin-top: 9px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #ffffff;
  color: #4e607b;
}
.teaching-final-answer {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 15px;
  border: 1px solid #a8d4ae;
  border-radius: 17px;
  background: #effaf1;
}
.teaching-final-answer h3 {
  margin: 4px 0 6px;
  color: #285c33;
}
.teaching-final-answer strong {
  display: block;
  color: #184b26;
  font-size: 18px;
}
.teaching-final-answer p {
  margin-bottom: 0;
  color: #42694a;
  line-height: 1.5;
}
.teaching-session-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #e3e8f0;
}
.teaching-session-actions span {
  margin-left: auto;
  color: #718097;
  font-size: 9px;
}
@media (max-width: 760px) {
  .teaching-grade-row,
  .teaching-session-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .teaching-whiteboard {
    grid-template-columns: 1fr;
  }
  .teaching-avatar-row {
    grid-template-columns: 72px 1fr;
  }
  .teaching-avatar-row img {
    width: 72px;
    height: 72px;
  }
}

/* ==========================================================================\n   NOVA V4.0 — single-page desktop classroom\n   Baseline: user-confirmed V3.5 package.\n   Scope: layout only. No application behavior is changed.\n   ========================================================================== */
@media (min-width: 1000px) {
  html, body { width:100%; height:100%; overflow:hidden; }
  .app-shell { display:flex; flex-direction:column; width:100%; height:100vh; min-height:0; padding:10px; overflow:hidden; }
  .topbar { flex:0 0 auto; width:100%; min-height:56px; margin:0 auto 8px; padding:8px 14px; border-radius:16px; }
  .brand-mark { width:38px; height:38px; border-radius:12px; }
  .classroom { flex:1 1 auto; width:100%; min-height:0; overflow:hidden; grid-template-columns:minmax(220px,.78fr) minmax(480px,2.2fr) minmax(220px,.72fr); gap:10px; align-items:stretch; }
  .teacher-panel, .board-panel, .utility-panel { height:100%; min-height:0; }
  .teacher-panel { padding:14px; border-radius:20px; overflow-x:hidden; overflow-y:auto; scrollbar-gutter:stable; }
  .avatar-frame { width:min(100%,230px); max-height:280px; margin:10px auto 8px; border-radius:22px; }
  .teacher-copy h1 { font-size:22px; }
  .teacher-copy p { min-height:60px; font-size:13px; line-height:1.45; }
  .teacher-controls { gap:6px; margin-top:8px; }
  .mini-progress { padding-top:10px; }
  .progress-track { margin:7px 0 10px; }
  .lesson-steps { gap:5px; }
  .board-panel { min-height:0; border-radius:20px; overflow:hidden; grid-template-rows:auto minmax(0,1fr) auto; }
  .board-toolbar { padding:10px 14px; }
  .board-toolbar h2 { font-size:19px; }
  .board-stage { height:auto; min-height:0; overflow:hidden; }
  .lesson-svg { width:100%; height:100%; min-height:0; }
  .response-area { flex:0 0 auto; padding:8px 12px 9px; }
  .quick-actions { gap:5px; margin-bottom:7px; }
  .soft { padding:7px 9px; font-size:11px; }
  .answer-row { gap:7px; }
  .answer-row input { padding:10px 12px; }
  .mic-button { width:42px; height:42px; }
  .interaction-status { min-height:14px; margin:5px 2px 0; font-size:11px; }
  .utility-panel { display:block; grid-column:auto; overflow-x:hidden; overflow-y:auto; padding-right:3px; scrollbar-gutter:stable; overscroll-behavior:contain; }
  .utility-card { margin-bottom:10px; padding:13px; border-radius:18px; }
}
@media (min-width:1000px) and (max-height:800px) {
  .topbar { min-height:52px; padding-top:7px; padding-bottom:7px; }
  .subtitle { font-size:11px; }
  .teacher-panel { padding:12px; }
  .avatar-frame { width:min(100%,190px); max-height:220px; margin:7px auto 6px; }
  .teacher-copy h1 { margin-bottom:5px; font-size:19px; }
  .teacher-copy p { min-height:48px; font-size:11.5px; line-height:1.38; }
  .primary, .ghost { padding-top:9px; padding-bottom:9px; }
  .mini-progress { padding-top:8px; }
  .lesson-steps { grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 7px; }
  .lesson-steps li { padding-left:24px; font-size:9.5px; }
  .board-toolbar { padding:8px 12px; }
  .board-toolbar h2 { font-size:18px; }
  .mode-button { padding:7px 9px; }
  .response-area { padding:7px 10px 8px; }
  .quick-actions { flex-wrap:nowrap; overflow-x:auto; padding-bottom:1px; }
  .soft { flex:0 0 auto; padding:6px 8px; font-size:10px; }
  .answer-row input { padding:9px 11px; }
  .mic-button { width:40px; height:40px; }
  .utility-card { padding:11px; }
}

/* ==========================================================================
   NOVA V4.1 — inline teaching surface and existing-control bridge
   Baseline: V4.0 deployed package.
   ========================================================================== */

.board-stage.inline-teaching-active {
  display: block;
  overflow-y: auto;
  background: #ffffff;
  overscroll-behavior: contain;
}

.teaching-surface-hidden {
  display: none !important;
}

.teaching-session-dialog.inline-teaching-session[open] {
  position: static;
  inset: auto;
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
}

.teaching-session-dialog.inline-teaching-session::backdrop {
  display: none;
  background: transparent;
}

.teaching-session-dialog.inline-teaching-session .teaching-session-card {
  width: 100%;
  max-height: none;
  min-height: 100%;
  padding: 16px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.teaching-session-dialog.inline-teaching-session .teaching-lesson-content {
  max-height: none;
  overflow: visible;
}

/* The existing classroom response bar is the only active student input. */
.teaching-session-dialog.inline-teaching-session
  #teachingStudentAnswer,
.teaching-session-dialog.inline-teaching-session
  #submitTeachingAnswer {
  display: none !important;
}

.teaching-session-dialog.inline-teaching-session
  .teaching-check-gate::after {
  content:
    "Use the microphone or response field below the whiteboard, then choose Check answer.";
  display: block;
  margin-top: 9px;
  color: #66778f;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.board-panel:has(.inline-teaching-session[open]) .response-area {
  position: relative;
  z-index: 12;
  display: block;
  background: #ffffff;
  box-shadow: 0 -8px 24px rgba(30, 54, 90, .08);
}

.board-panel:has(.inline-teaching-session[open]) .quick-actions {
  display: flex;
}

.board-panel:has(.inline-teaching-session[open]) #answerInput,
.board-panel:has(.inline-teaching-session[open]) #micButton,
.board-panel:has(.inline-teaching-session[open]) #submitAnswer {
  visibility: visible;
}

@media (min-width: 1000px) {
  .teaching-session-dialog.inline-teaching-session .teaching-session-card {
    padding: 14px;
  }

  .teaching-session-dialog.inline-teaching-session .dialog-heading {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 8px 0 10px;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(8px);
  }
}


/* V4.1.1: Suspend the legacy fractions-demo UI while homework teaching is active. */
.nova-homework-active #startLesson,
.nova-homework-active .mini-progress,
.nova-homework-active #whiteboardMode,
.nova-homework-active #cartoonMode,
.nova-homework-active #answerChoices {
  display: none !important;
}


/* NOVA V4.2.2: Ancy-ready classroom. No hardcoded fractions content. */
.ancy-stage { background:linear-gradient(145deg,#14243d,#283d64 58%,#41568c); display:grid; place-items:center; width:min(100%,300px); aspect-ratio:.88; }
.ancy-video-mount { position:relative; z-index:2; width:100%; height:100%; display:grid; place-items:center; }
.ancy-placeholder { display:flex; flex-direction:column; gap:8px; align-items:center; justify-content:center; text-align:center; padding:22px; color:#fff; }
.ancy-monogram { width:110px; height:110px; border-radius:50%; display:grid; place-items:center; font-size:56px; font-weight:650; background:linear-gradient(140deg,#7199e5,#8e7ad6); border:2px solid rgba(255,255,255,.35); box-shadow:0 20px 40px rgba(0,0,0,.15); }
.ancy-placeholder strong { font-size:24px; letter-spacing:.02em; }
.ancy-placeholder span:last-child { font-size:12px; max-width:230px; color:#e0eaff; line-height:1.5; }
.ancy-connection-state { position:absolute; z-index:3; bottom:10px; left:12px; right:12px; text-align:center; background:rgba(8,19,37,.68); border:1px solid rgba(255,255,255,.2); border-radius:999px; padding:7px 12px; font-size:11px; color:#edf4ff; }
.ancy-readiness { display:flex; flex-direction:column; gap:3px; font-size:12px; padding:10px; background:#f3f6fc; border:1px solid #e0e7f4; border-radius:12px; }
.ancy-readiness span { font-size:11px; line-height:1.4; color:#5d718b; }
.workspace-status { display:inline-flex; color:#486080; background:#ecf2ff; border:1px solid #dce6fa; padding:8px 11px; border-radius:999px; font-size:11px; font-weight:700; }
.nova-empty-lesson { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:30px 20px; text-align:center; min-height:360px; width:100%; height:100%; background:radial-gradient(circle at center 24%,#f9fbff,#eff4fc); }
.nova-empty-lesson h3 { font-size:23px; margin:8px 0; color:#233757; }
.nova-empty-lesson p { font-size:13px; max-width:440px; line-height:1.65; color:#66768b; }
.empty-workspace-icon { font-size:36px; width:84px; height:84px; display:grid; place-items:center; border:1px solid #cadbf5; border-radius:24px; background:#fff; color:#406ab0; }
.learning-steps { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:14px; }
.learning-steps span { font-size:11px; font-weight:750; background:white; color:#365986; border:1px solid #dbe6f6; padding:8px 12px; border-radius:999px; }
.teaching-ancy-mark { width:60px; height:60px; border-radius:18px; display:grid; place-items:center; background:linear-gradient(135deg,#274775,#8679c9); color:white; font-weight:800; font-size:30px; flex:0 0 60px; }
#answerInput:disabled, #submitAnswer:disabled, #micButton:disabled { cursor:not-allowed; opacity:.55; }
#inkCanvas.hidden { display:none; }
#ancyPlaceholder[hidden] { display:none !important; }
@media (max-width:820px) { .ancy-stage { width:min(100%,145px); aspect-ratio:.88; } .ancy-monogram { width:55px; height:55px; font-size:28px; } .ancy-placeholder { padding:8px; gap:4px; } .ancy-placeholder strong { font-size:16px; } .ancy-placeholder span:last-child { font-size:9px; } .ancy-connection-state { padding:3px 5px; font-size:9px; } }
/* Keep the 'Not connected' badge clear of the placeholder message. */
.ancy-placeholder { padding: 12px 12px 43px; gap: 6px; }
.ancy-monogram { width: 88px; height: 88px; font-size: 44px; }
.ancy-placeholder span:last-child { font-size: 11px; line-height: 1.38; }
@media (max-width:820px) {
  .ancy-placeholder { padding: 6px 5px 24px; gap: 2px; }
  .ancy-monogram { width: 45px; height: 45px; font-size: 25px; }
  .ancy-placeholder span:last-child { font-size: 9px; }
}

/* Ancy live video — staging only */
.ancy-call-controls { display: flex; flex-direction: column; gap: 7px; padding: 8px 0; }
.ancy-access-label { color:#375173; font-size:11px; font-weight:700; }
#ancyAccessCode, #ancyApiUrl { width:100%; box-sizing:border-box; padding:10px 12px; border:1px solid #cedaef; border-radius:10px; font:inherit; background:#fff; color:#162948; }
#ancyApiUrl { margin-top:7px; }
.ancy-api-settings { font-size:12px; color:#36506d; display:block; margin:12px 0; font-weight:600; }
.ancy-session-message { font-size:11px; line-height:1.45; color:#4b6282; margin:0; }
.ancy-external-link { text-align:center; font-size:12px; color:#2d56ba; text-decoration:underline; }
.ancy-stage.in-call .ancy-video-mount { display:block; }
.ancy-stage.in-call iframe { border:0; width:100%; height:100%; display:block; border-radius:17px; background:#0d1930; }
.ancy-stage.in-call .ancy-connection-state { display:none; }


/* NOVA V4.3.1 — central Ancy video. This is presentation only; no
   changes to Tavus authentication, Bedrock mastery or teaching state. */
.ancy-center-stage[hidden] { display:none !important; }
.ancy-center-stage { position:absolute; z-index:19; display:flex; flex-direction:column; overflow:hidden; color:#fff; background:#101d34; box-shadow:0 18px 48px rgba(18,31,57,.2); }
.ancy-center-stage.ancy-focused { inset:0; border-radius:0; }
.ancy-center-head { display:flex; align-items:center; gap:9px; min-height:46px; padding:10px 16px; background:#142945; color:#e7f0ff; font-size:13px; }
.ancy-center-head span:last-child { margin-left:auto; font-size:11px; font-weight:500; color:#aebfd6; }
.ancy-center-dot { display:block; width:9px; height:9px; flex:0 0 9px; border-radius:50%; background:#32c895; box-shadow:0 0 0 4px rgba(50,200,149,.12); }
.ancy-center-video { flex:1; width:100%; min-height:0; background:linear-gradient(135deg,#0f1b31,#203b67); }
.ancy-center-video iframe { width:100%; height:100%; border:0; display:block; background:#0f1b31; }
.ancy-center-foot { padding:9px 16px; background:#142945; font-size:10px; letter-spacing:.035em; color:#b5c6df; }
.ancy-center-stage.ancy-pip { inset:auto 16px 16px auto; width:min(34%,320px); height:240px; border:2px solid rgba(255,255,255,.95); border-radius:17px; z-index:24; }
.ancy-pip .ancy-center-head { min-height:31px; padding:6px 10px; font-size:11px; }
.ancy-pip .ancy-center-head span:last-child { display:none; }
.ancy-pip .ancy-center-foot { display:none; }
.ancy-layout-button { flex:0 0 auto; border:1px solid #bed0f1; border-radius:999px; padding:8px 12px; color:#254d9c; background:#e9efff; font-size:11px; font-weight:800; }
.ancy-layout-button:hover { background:#dbe7ff; }
.ancy-stage.in-call { max-height:160px; aspect-ratio:2.3; }
.ancy-stage.in-call .ancy-placeholder { padding:12px 9px 26px; }
.ancy-stage.in-call .ancy-monogram { width:45px; height:45px; font-size:22px; }
.ancy-stage.in-call .ancy-placeholder strong { font-size:18px; }
.ancy-stage.in-call .ancy-placeholder span:last-child { font-size:10px; }
@media (max-width:820px) {
  .ancy-center-stage.ancy-pip { width:min(48%,255px); height:170px; bottom:10px; right:10px; }
  .ancy-stage.in-call { max-height:130px; }
}
@media (max-width:520px) {
  .ancy-center-stage.ancy-pip { width:46%; height:137px; }
  .ancy-pip .ancy-center-head { font-size:9px; }
  .ancy-center-head { min-height:39px; font-size:11px; }
  .ancy-center-foot { padding:6px 10px; font-size:9px; }
}

/* V4.4: Tavus-controlled visual workspace. Dedicated 2D SVG layer; never
   render untrusted HTML from Tavus arguments. Ancy remains centered or PiP. */
.nova-visual-layer[hidden] { display:none!important; }
.nova-visual-layer { position:absolute;inset:0;z-index:15;display:flex;flex-direction:column;background:#fff;overflow:auto;border-radius:15px; }
.nova-visual-head {display:flex;align-items:center;gap:10px;flex:0 0 auto;padding:11px 16px;background:#e9f0ff;color:#233e78;border-bottom:1px solid #d7e2f8;font-size:13px; }
.nova-visual-dot {background:#4a70cf;width:10px;height:10px;border-radius:50%;}
#novaVisualStatus {margin-left:auto;max-width:53%;text-align:right;font-size:11px;color:#42638d;}
.nova-visual-root {display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:10px;overflow-y:auto;flex:1;min-height:0;}
.nova-v-svg {display:block;width:100%;height:auto;min-height:200px;max-height:min(64vh,470px);transition:transform .35s ease;transform-origin:center center;}
.nova-v-description {color:#4a6081;font-size:13px;line-height:1.4;margin:5px 20px 14px;max-width:720px;word-break:break-word;}
.nova-v-object {cursor:pointer;transition:filter .15s ease;}
.nova-v-object:focus-visible,.nova-v-selected,.nova-v-highlight {filter:drop-shadow(0 0 8px #eaaa35);stroke:#e0a52f!important;stroke-width:4!important;}
.nova-v-playing .nova-v-object { animation:nova-v-pulse 1.8s ease-in-out infinite alternate;transform-box:fill-box;transform-origin:center center; }
@keyframes nova-v-pulse {from{opacity:.67;transform:scale(.97)}to{opacity:1;transform:scale(1.03)}}
@media (prefers-reduced-motion:reduce){.nova-v-playing .nova-v-object{animation:none!important}}
@media (max-width:600px){.nova-visual-head {flex-wrap:wrap}#novaVisualStatus {max-width:100%}.nova-v-svg{min-height:180px;}}

/* Staging-only explicit access-code clearing action. */
.ancy-forget-code { display:block; width:max-content; max-width:100%; margin: 2px 0 8px auto; padding: 3px 0; border:0; background:transparent; color:inherit; text-decoration:underline; text-underline-offset:2px; cursor:pointer; font-size: 0.78rem; opacity:0.74; }
.ancy-forget-code:hover,.ancy-forget-code:focus-visible {opacity:1;}
