:root{--bg:#f4f5ee;--ink:#234f3e;--muted:#718076;--green:#21563f;--line:#d8ded4;--paper:#fafbf6;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Noto Sans Malayalam","Nirmala UI",sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit}button:disabled{opacity:.35;cursor:not-allowed}button:not(:disabled):hover{filter:brightness(.94)}button:focus-visible,a:focus-visible{outline:3px solid #b07e35;outline-offset:3px}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}.app-header{min-height:66px;padding:8px max(8px,env(safe-area-inset-right)) 6px max(8px,env(safe-area-inset-left));max-width:1160px;margin:auto}.top-navigation{display:grid;grid-template-columns:minmax(60px,1fr) auto minmax(60px,1fr);align-items:center;gap:4px;width:100%;min-width:0}.navigation-button{display:flex;align-items:center;justify-content:center;min-width:60px;min-height:50px;padding:6px;background:transparent;border:0;border-radius:10px;font-size:17px;font-weight:550}.navigation-button:first-child{justify-self:start}.navigation-button:last-child{justify-self:end}.header-end{display:flex;align-items:center;justify-content:center;gap:3px;min-width:0}.icon-button{width:48px;min-width:48px;height:50px;display:grid;place-items:center;background:transparent;border:0;border-radius:10px}.icon-button svg{width:27px;height:27px;stroke-width:1.8}.header-end .icon-button{background:#fcfdf8;border:1px solid #dce4d8;border-radius:14px;box-shadow:0 2px 5px #28482f08}.header-end .icon-button:active{background:#e5eddf}.workspace{max-width:1160px;margin:auto;padding:0 max(8px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}.lesson-sidebar{display:none}.classroom{min-width:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.board-frame{padding:7px 7px 0;background:linear-gradient(100deg,#a77b45,#c5985d 27%,#ae7f48 75%,#b48a51);border:1px solid #ba925e;box-shadow:0 6px 15px #273b2518;border-radius:1px}.board{position:relative;display:flex;flex-direction:column;min-height:clamp(470px,70svh,860px);height:auto;max-height:none;padding:16px 12px 14px;color:#e7eedf;background:radial-gradient(ellipse at 22% 18%,#315d4226,transparent 70%),linear-gradient(115deg,#204c39,#193f30);box-shadow:inset 0 0 36px #0c281e45;overflow:hidden}.board:before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.075;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath filter='url(%23n)' opacity='.5' d='M0 0h180v180H0z'/%3E%3C/svg%3E")}.status-dot{display:inline-block;width:5px;height:5px;border-radius:50%;background:#d2bf6f;flex-shrink:0}.board-title{position:relative;flex-shrink:0;align-self:center;font-size:20px;font-weight:450;line-height:1.8;text-align:center;max-width:100%;overflow-wrap:anywhere;margin:6px 0 0;padding-bottom:6px;border-bottom:1px solid #cadfbe6a}.board-content{position:relative;flex:1 0 auto;min-height:280px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:24px;padding:26px 0;text-align:center}.board-content>*{flex-shrink:0;max-width:100%}.board-content h3{font-size:17px;font-weight:450;line-height:1.8;margin:0;overflow-wrap:anywhere}.chalk-underline{position:relative}.chalk-underline:after{content:"";position:absolute;left:8%;right:8%;bottom:-8px;height:2px;background:#dec8828a;transform:rotate(-1deg);border-radius:50%}.fraction-visual{display:grid;grid-template-columns:repeat(4,1fr);width:min(88%,340px);height:72px;border:2px solid #d0dfcb;border-radius:3px;transform:rotate(-.4deg);overflow:hidden}.fraction-visual>span{border-right:2px solid #d0dfcb;display:grid;place-items:center;font-size:19px;color:#ead591}.fraction-visual>span:last-child{border:0}.fraction-visual>.filled{background:repeating-linear-gradient(125deg,#e5ce8730,#e5ce8730 2px,#e5ce8755 2px,#e5ce8755 4px)}.board-equation{display:flex;align-items:center;justify-content:center;gap:clamp(10px,3vw,26px);font-family:Georgia,serif;font-size:32px;line-height:1.1}.fraction{display:inline-grid;text-align:center;font-size:29px;line-height:1.05;min-width:28px;vertical-align:middle}.fraction span:first-child{padding:0 5px 6px;border-bottom:2px solid currentColor}.fraction span:last-child{padding-top:6px}.equation-label{font-family:system-ui,sans-serif;font-size:13px;line-height:1.8;color:#d0dfce}.chalk-yellow{color:#e8d497}.board-description{font-size:12px;color:#c8dcca;margin:0;line-height:1.9;max-width:95%;overflow-wrap:anywhere}.equivalent-shapes{display:flex;gap:17px;align-items:center}.equivalent-shapes .fraction-visual{width:100px;height:62px}.half-visual{grid-template-columns:repeat(2,1fr)}.doubt-row{position:relative;display:flex;justify-content:flex-end;flex-shrink:0;padding-top:8px}.doubt-button{display:flex;align-items:center;justify-content:center;gap:7px;background:#e1be57;background-image:linear-gradient(180deg,#f4dda0 0%,#e1be57 62%,#d8ae43 100%);color:#20523b;border:1px solid #a9862e;border-top-color:#fff0b4;border-left-color:#f4d883;border-bottom-color:#a78125;border-radius:10px;min-height:44px;min-width:132px;padding:8px 12px;font-size:13px;font-weight:600;box-shadow:inset 0 2px 1px #fff4c5bb,inset 0 -2px 1px #ae822e55,0 3px 0 #977329,0 6px 9px #061d175c}.doubt-button:active{transform:translateY(2px);box-shadow:inset 0 1px 2px #a9862e44,0 1px 0 #977329,0 3px 5px #061d1740}.doubt-button svg{width:18px;height:18px}.chalk-tray{height:8px;position:relative;margin:0 -9px -3px;background:linear-gradient(#bb9360,#ae8452);border-bottom:2px solid #926b43;display:flex;justify-content:flex-end;align-items:flex-start;padding-right:30px;gap:12px}.chalk{display:block;position:relative;top:-4px;width:46px;height:6px;background:#e4e7d3;border-radius:2px;transform:rotate(-3deg);box-shadow:0 1px 3px #0002}.chalk.yellow{background:#e1be57;width:32px;transform:rotate(2deg)}.control-panel{padding:20px 4px 0}.main-controls{display:grid;grid-template-columns:minmax(0,1fr) 96px minmax(0,1fr);align-items:center;gap:12px;max-width:420px;margin:0 auto}.pause-button,.continue-button{display:flex;align-items:center;justify-content:center;gap:6px;border:1px solid #21563f;border-radius:16px;background:#21563f;color:white;font-size:14px;min-height:48px;padding:10px 8px;box-shadow:0 1px 3px #1e3e2810}.pause-button svg,.continue-button svg{width:19px;height:19px;color:white;stroke-width:2}.pause-button svg rect,.continue-button svg path{fill:currentColor}.mic-control{display:flex;align-items:center;flex-direction:column;position:relative;padding-bottom:16px}.live-button{border:5px solid #e5eadd;outline:1px solid #d4ddce;box-shadow:0 3px 5px #38504416;background:#7a887c;color:white;border-radius:50%;width:86px;height:86px;display:grid;place-items:center;padding:0}.live-button svg{width:37px;height:37px;stroke-width:1.8}.mic-control:after{content:"";position:absolute;bottom:11px;height:3px;width:30px;background:#cbd5c4;border-radius:2px}#mic-label{position:absolute;bottom:-9px;left:-25px;right:-25px;text-align:center;font-size:9px;line-height:1.5;color:#7a8678;white-space:nowrap}.status-row{display:flex;justify-content:center;font-size:12px;color:var(--muted);line-height:1.8;padding-top:24px}.status-row>span{display:flex;align-items:center;gap:7px;text-align:center}.text-button{display:block;border:0;background:transparent;min-height:44px;padding:8px 16px;font-size:13px;color:#667766;margin:3px auto 0;border-radius:8px}.caption-area{text-align:center;max-width:720px;margin:6px auto 0;padding:0 12px}.caption-label{font-size:9px;color:#91a08e}.caption-area p{font-size:12px;line-height:1.9;color:#657762;overflow-wrap:anywhere;margin:5px 0 0}.preview-note{text-align:center;font-size:9px;color:#94a08e;line-height:1.8;margin:15px 0 5px}.state-listening .live-button{background:#327343;border-color:#dcebd2;outline-color:#8fb97d}.state-listening .status-dot{background:#b5da8d}.state-listening #mic-label{color:#2f6a32}.state-teaching .live-button,.state-inviting .live-button,.state-doubt-invite .live-button{background:#587564}.state-paused .live-button{background:#8d9589}.state-checking .status-dot{background:#d9c178}dialog{border:1px solid var(--line);border-radius:20px;padding:22px;max-width:480px;width:calc(100% - 28px);background:var(--paper);color:var(--ink);box-shadow:0 20px 80px #10251d2a;max-height:85dvh;overflow:auto}dialog::backdrop{background:#172b2359;backdrop-filter:blur(4px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.dialog-heading h2{font-size:19px;line-height:1.6;margin:3px 0}.dialog-heading .icon-button{flex-shrink:0}dialog>p{font-size:13px;color:var(--muted);line-height:1.9}.eyebrow{font-size:10px;color:var(--muted)}.state-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:20px 0}.state-option{display:flex;align-items:center;gap:8px;text-align:left;min-height:52px;padding:9px 12px;background:var(--bg);border:1px solid var(--line);border-radius:10px;font-size:11px}.state-option[aria-pressed="true"]{background:#e6eee3;border-color:#749774}.state-option .status-dot{width:7px;height:7px}.dialog-note{background:#f3f0e4;font-size:11px;line-height:1.8;padding:12px;border-radius:10px}.concept-list{display:flex;flex-direction:column;gap:7px}.concept{display:flex;align-items:center;gap:12px;border:1px solid transparent;border-radius:12px;background:transparent;text-align:left;padding:13px 10px;min-height:67px;font-size:12px;line-height:1.8;width:100%}.concept-number{font-size:11px;color:#899480;width:28px;height:29px;border:1px solid #dce0d2;border-radius:9px;display:grid;place-items:center;flex-shrink:0}.concept>span:nth-child(2){flex:1}.concept small{display:block;color:#939887;font-size:9px;line-height:1.8;margin-top:2px}.concept svg{width:15px;height:15px;color:#81967b;opacity:0}.concept.active{border-color:#dae1d0;background:#e8eddf}.concept.active .concept-number{background:var(--green);color:white;border-color:var(--green)}.concept.active svg{opacity:1}#mobile-outline{margin-top:20px}
@media(min-width:500px){.app-header{padding:12px max(16px,env(safe-area-inset-right)) 8px max(16px,env(safe-area-inset-left))}.top-navigation{grid-template-columns:minmax(80px,1fr) auto minmax(80px,1fr);gap:12px}.navigation-button{font-size:19px;min-width:80px}.header-end{gap:8px}.icon-button{width:54px;min-width:54px;height:54px}.icon-button svg{width:29px;height:29px;stroke-width:1.8}.workspace{padding-inline:max(16px,env(safe-area-inset-left)) max(16px,env(safe-area-inset-right))}.board{padding:22px 25px 18px}.board-title{font-size:25px;margin-top:8px}.board-content h3{font-size:22px}.board-description{font-size:14px}.board-content{gap:29px;min-height:310px}.fraction-visual{height:86px}.fraction{font-size:34px}.board-equation{font-size:38px}.equivalent-shapes .fraction-visual{width:150px;height:76px}.caption-area p{font-size:14px}.doubt-button{font-size:14px;min-width:140px}.status-row{font-size:13px}}
@media(min-width:900px){.app-header{padding-inline:max(24px,env(safe-area-inset-left)) max(24px,env(safe-area-inset-right))}.workspace{padding-inline:max(24px,env(safe-area-inset-left)) max(24px,env(safe-area-inset-right))}.board{height:auto;min-height:clamp(520px,72svh,840px);max-height:none;padding:24px 34px 20px}.board-frame{padding:9px 9px 0}.board-title{font-size:30px}.board-content h3{font-size:24px}.board-content{gap:30px;min-height:330px}.chalk-tray{margin-inline:-12px;height:10px}.main-controls{max-width:440px;grid-template-columns:1fr 100px 1fr;gap:22px}.control-panel{padding-top:20px}.caption-area{margin-top:10px}.pause-button,.continue-button{font-size:15px}.board-description{font-size:15px}}
@media(min-width:1250px){.workspace,.app-header{max-width:1200px}.board-title{font-size:32px}}
@media(max-width:359px){.app-header{padding-inline:max(6px,env(safe-area-inset-left)) max(6px,env(safe-area-inset-right))}.top-navigation{grid-template-columns:minmax(54px,1fr) auto minmax(54px,1fr);gap:3px}.navigation-button{font-size:16px;min-width:54px;padding:5px}.header-end{gap:2px}.header-end .icon-button{width:44px;min-width:44px;height:48px}.header-end svg{width:24px;height:24px}.workspace{padding-inline:max(6px,env(safe-area-inset-left)) max(6px,env(safe-area-inset-right))}.board{padding:14px 10px;min-height:clamp(455px,70svh,800px)}.board-title{font-size:18px}.board-content h3{font-size:15px}.main-controls{grid-template-columns:1fr 80px 1fr;gap:8px}.live-button{width:74px;height:74px}.live-button svg{width:32px;height:32px}.pause-button,.continue-button{font-size:12px;padding:8px 5px;gap:4px}.state-grid{grid-template-columns:1fr}.equivalent-shapes .fraction-visual{width:91px}}
@media(orientation:landscape) and (max-height:600px){.app-header{padding-block:6px}.board{height:auto;min-height:clamp(410px,90svh,700px);max-height:none}.board-title{font-size:22px;margin-top:6px}.board-content{gap:20px;padding:24px 0;min-height:270px}.board-content h3{font-size:19px}.fraction-visual{height:62px}.fraction{font-size:28px}.board-equation{font-size:31px}.board-description{font-size:13px}}
@media(max-width:319px){.top-navigation{grid-template-columns:1fr 1fr;gap:2px}.header-end{grid-column:1 / -1;grid-row:2}.navigation-button:first-child{grid-row:1;grid-column:1}.navigation-button:last-child{grid-row:1;grid-column:2}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

form label{display:block;font-size:13px;margin:14px 0 8px}form input{font:inherit;width:100%;min-height:48px;border:1px solid #c8d6c4;border-radius:10px;padding:10px 12px;background:white;color:#234f3e;font-size:16px}form input:focus-visible{outline:2px solid #507e50;outline-offset:2px}.form-buttons{display:flex;justify-content:space-between;gap:10px;margin-top:20px}.form-buttons button{min-height:44px;padding:10px 14px;border:1px solid #cdd8c7;border-radius:10px;background:#f1f4ec;font-size:12px}.form-buttons button[type=submit]{background:#21563f;border-color:#21563f;color:white}#key-message{font-size:12px;line-height:1.8;min-height:22px;overflow-wrap:anywhere}#live-error{color:#9d412c}.state-feedback .live-button,.state-reteaching .live-button{background:#587564}.state-connecting .live-button{background:#8d9589}#lesson-question{font-size:14px;line-height:2;max-width:94%}

#lesson-sources:not([hidden]){display:flex;gap:8px;flex-wrap:wrap;padding:8px 12px;font-size:.85rem} #lesson-sources a{color:#225d44;overflow-wrap:anywhere}

.live-check{border-top:1px solid var(--line);margin-top:12px;padding-top:16px}.live-check label{display:block;font-size:13px;margin-bottom:8px}.live-check select{width:100%;min-height:48px;border:1px solid #c8d6c4;border-radius:10px;background:white;color:var(--ink);font:inherit;font-size:13px;padding:10px;min-width:0}.live-check button{width:100%;min-height:48px;padding:10px;border:0;border-radius:10px;background:var(--green);color:white;font:inherit;font-size:13px}.live-check p{font-size:12px;line-height:1.9;overflow-wrap:anywhere}

.screen-awake-setting{display:flex;align-items:center;gap:10px;min-height:44px;font-size:12px;line-height:1.8;margin:12px 0}.screen-awake-setting input{width:20px;height:20px;flex-shrink:0;accent-color:var(--green)}

.quarter-diagram{width:clamp(160px,48vw,230px);height:auto;aspect-ratio:1;max-width:85%;color:#d0dfcb;stroke-width:2.5}.quarter-diagram .quarter-fill{fill:url(#quarter-hatch);stroke:none;opacity:0;transition:opacity .22s ease}.quarter-diagram .quarter-divider{opacity:0;transition:opacity .22s ease}.quarter-diagram[data-stage="1"] .quarter-divider,.quarter-diagram[data-stage="2"] .quarter-divider{opacity:1}.quarter-diagram[data-stage="2"] .quarter-fill{opacity:.7}.quarter-equation{min-height:75px;visibility:hidden;opacity:0;transition:opacity .22s ease}.quarter-equation[data-visible="true"]{visibility:visible;opacity:1}

.live-button{touch-action:none;user-select:none;-webkit-user-select:none}

/* All four equal cells appear on the same audible transcription cue. */
.quarter-parts{opacity:0;transition:opacity .18s ease}.quarter-diagram[data-stage="1"] .quarter-parts{opacity:.48}.quarter-diagram[data-stage="2"] .quarter-parts{opacity:.16}
@media(prefers-reduced-motion:reduce){.quarter-parts,.quarter-diagram .quarter-fill,.quarter-diagram .quarter-divider,.quarter-equation{transition:none}}

/* A fixed frame uses the remaining visible viewport; only board writing scrolls. */
[hidden]{display:none!important}
html,body{min-width:0;width:100%;overflow-x:hidden}
#classroom-view{position:fixed;top:var(--viewport-top,0px);left:0;right:0;height:var(--viewport-height,100dvh);display:flex;flex-direction:column;overflow:hidden}
.app-header{width:100%;flex-shrink:0;padding-top:max(6px,env(safe-area-inset-top))}
.workspace{width:100%;flex:1;min-height:0;overflow:hidden;padding:0 max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left))}
.classroom{height:100%;min-height:0;display:flex;flex-direction:column}
.board-frame{flex:1;min-height:0;display:flex;flex-direction:column}
.board{flex:1;min-height:0;height:auto;max-height:none;padding:12px;overflow:hidden}
.chalk-tray{flex-shrink:0}
.board-title{font-size:clamp(16px,3.7vw,25px);line-height:1.6;margin:0;padding-bottom:5px;flex-shrink:0}
.board-content{min-height:0;flex:1 1 0;gap:10px;padding:12px 0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#97ac8a transparent;scroll-padding-block:12px;justify-content:flex-start}
.board-content>*{flex-shrink:0}
.quarter-diagram{width:clamp(92px,min(34vw,23dvh),200px)}
.quarter-equation{min-height:48px}.quarter-equation[data-visible="false"]{display:none}
.fraction{font-size:27px}.equation-label{font-size:12px}#lesson-question{font-size:13px;line-height:1.7;margin:0}
.doubt-row{padding-top:8px;flex-shrink:0}
.control-panel{position:relative;left:auto;transform:none;bottom:auto;flex-shrink:0;width:100%;max-width:1160px;margin:0 auto;background:var(--bg);border:0;padding:12px max(12px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));box-shadow:none}
.main-controls{grid-template-columns:minmax(0,1fr) 82px minmax(0,1fr);gap:12px}
.live-button{width:72px;height:72px}.live-button svg{width:33px;height:33px}.mic-control{padding-bottom:14px}#mic-label{bottom:-5px}
.control-bottom{display:flex;justify-content:center;align-items:center;gap:12px;min-height:44px;max-width:520px;margin:0 auto}.control-bottom .status-row{padding-top:0;font-size:12px;min-height:22px;min-width:0;flex:1;line-height:1.6}.control-bottom .footer-links{flex-shrink:0;gap:0}.footer-links{display:flex;justify-content:center;gap:24px}.footer-links .text-button{margin:0;font-size:12px;min-height:44px}
.class-messages{max-height:90px;overflow-y:auto;text-align:center;font-size:12px;line-height:1.6}.class-messages p{margin:6px 0;overflow-wrap:anywhere}.class-messages p:empty{display:none}.class-messages:not(:has(p:not(:empty))){display:none}
.caption-area{display:none}.sample-board{display:flex;align-items:center;flex-direction:column;gap:16px}.sample-expression{font-size:clamp(26px,7vw,46px);font-family:Georgia,serif;color:#ead591;margin:0}.sample-spoken{display:none}.angle-diagram{width:min(230px,60vw);height:auto;color:#e7eedf;stroke-width:4}.angle-highlight{stroke:#f29b8e;stroke-width:5}
.home-view{min-height:var(--viewport-height,100dvh);padding:max(24px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));display:grid;place-items:center}.home-card{width:100%;max-width:570px;background:var(--paper);border:1px solid #dbe4d5;border-radius:24px;padding:clamp(20px,5vw,36px);box-shadow:0 12px 45px #19472f0a}.home-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.home-brand{display:flex;align-items:center;gap:12px;min-width:0}.home-logo{background:var(--green);color:white;font-size:29px;font-weight:700;border-radius:15px;width:54px;height:54px;display:grid;place-items:center;flex-shrink:0}.home-brand h1{font-size:clamp(24px,6vw,32px);margin:0;letter-spacing:-1px}.home-brand p{font-size:12px;line-height:1.8;margin:3px 0}.home-heading .icon-button{width:44px;min-width:44px}.profile-greeting{font-size:15px;line-height:1.8}.home-view select{width:100%;min-height:50px;padding:10px;border:1px solid #c8d6c4;border-radius:10px;background:white;color:var(--ink);font:inherit;font-size:14px}.field-note,.home-note{font-size:12px;line-height:1.9;color:var(--muted);overflow-wrap:anywhere}.home-note{margin:18px 0 0;text-align:center}.paste-material{width:100%;display:flex;align-items:center;gap:12px;text-align:left;background:#f0f4e8;border:1px solid #cddbbe;border-radius:14px;padding:15px;margin:20px 0;color:var(--green);min-height:74px;font-size:15px}.paste-material>span{flex:1;min-width:0}.paste-material small{display:block;font-size:11px;line-height:1.8;margin-top:5px}.home-start{width:100%;display:flex;justify-content:center;align-items:center;gap:10px;min-height:56px;border:0;border-radius:14px;background:var(--green);color:white;font-size:16px;font-weight:600;margin-top:22px}.material-preview{background:#eef3e6;border-radius:12px;padding:12px;font-size:13px;line-height:1.9}.material-preview ol{padding-left:24px}.material-dialog{max-width:760px;width:calc(100% - 24px)}textarea{font:inherit;font-size:16px;line-height:1.8;width:100%;min-height:230px;resize:vertical;padding:14px;border:1px solid #c8d6c4;border-radius:12px;color:var(--ink);background:white}textarea:focus-visible{outline:2px solid #507e50}#material-file{font-size:13px;min-height:48px}#home-message,#material-message,#material-file-status{font-size:13px;line-height:1.8;overflow-wrap:anywhere}.material-dialog .form-buttons{position:sticky;bottom:-22px;padding:12px 0;background:var(--paper)}
@media(orientation:landscape) and (max-height:600px){.app-header{padding-block:4px}.icon-button,.navigation-button{min-height:44px;height:44px}.board-content{gap:12px;padding:8px 0}.quarter-diagram{width:104px}.board-description{max-width:50%}#lesson-question{flex:1;min-width:160px}.quarter-equation{min-height:40px}.control-panel{padding-top:6px}.live-button{width:54px;height:54px;border-width:3px}.live-button svg{width:26px;height:26px}.main-controls{grid-template-columns:minmax(0,1fr) 68px minmax(0,1fr)}.status-row{padding-top:6px;font-size:11px}.footer-links .text-button{min-height:44px;padding:5px 12px}.angle-diagram{width:150px}.sample-board{flex-direction:row}.sample-spoken{max-width:45vw;font-size:13px}}
@media(min-width:900px) and (min-height:650px){.board{padding:22px}.quarter-diagram{width:210px}.board-content{gap:18px}.sample-spoken{font-size:20px;max-width:700px}.home-card{padding:36px}}

.home-sources{font-size:12px;line-height:1.8;margin-top:20px;color:var(--muted)}.home-sources summary{cursor:pointer;min-height:44px;padding:10px 0}.home-sources a{display:block;min-height:44px;padding:8px 0;color:var(--green)}

/* Local handwriting fonts never require a third-party request during live teaching. */
@font-face{font-family:Chilanka;src:url('./chilanka.woff') format('woff');font-display:swap;font-weight:400}
@font-face{font-family:Kalam;src:url('./kalam.woff') format('woff');font-display:swap;font-weight:700}
.board{font-family:Chilanka,Kalam,sans-serif}.board-title{font-weight:600;font-size:clamp(23px,5vw,32px)}.board-equation,.sample-expression,.math-digit,.math-hint{font-family:Kalam,Chilanka,sans-serif;font-weight:700}.board-keywords{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:12px;color:#efd67e;font-size:clamp(22px,5vw,32px);line-height:1.6;max-width:100%;overflow-wrap:anywhere}.board-keywords li:before{content:'•';margin-right:12px}.home-view{background:radial-gradient(ellipse at 15% 5%,#e7eee2,transparent 65%),#f5f6ef}.home-card{max-width:530px;border:0;background:transparent;box-shadow:none;padding:24px 8px}.home-brand h1{letter-spacing:-1.4px;font-weight:750;font-size:34px}.home-logo{border-radius:18px;background:#20523e;width:62px;height:62px;box-shadow:0 8px 24px #244d3c18}.home-logo svg{width:44px;height:44px;stroke:white;stroke-width:3}.home-heading{margin-bottom:30px}.home-brand p{font-size:13px}.profile-greeting{font-size:20px;font-weight:600;margin:0 0 26px;line-height:1.6}.home-view input,.home-view select{background:#fcfdf9;border-color:#d9e2d4;border-radius:14px}.home-view label{font-size:12px;font-weight:600;color:#718076}.lesson-menu{display:grid;grid-template-columns:1fr;gap:0}.home-start{border-radius:16px;min-height:60px;box-shadow:0 8px 16px #24503f13;letter-spacing:.2px}.paste-material{background:transparent;border-style:dashed;font-size:14px;margin:22px 0;min-height:64px;padding:12px}.paste-material small{font-size:11px}.home-view #home-message:empty{display:none}.resume-card{padding:18px;border-radius:18px;background:#e8eee0;margin:20px 0}.resume-card p{font-size:14px;line-height:1.8;margin:0 0 12px}.resume-card #home-resume{display:flex;align-items:center;justify-content:center;gap:8px;background:var(--green);color:white;border:0;border-radius:12px;min-height:50px;width:100%;font-size:16px}.math-setup{margin-top:12px}.operand-fields{display:grid;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr);align-items:center;text-align:center;gap:8px;margin-top:16px}.operand-fields input{font-size:25px;text-align:center;min-width:0}.math-board{width:100%;display:grid;grid-template-columns:84px minmax(0,1fr);align-items:start;gap:10px;min-height:0}.carry-row{position:sticky;top:4px;grid-column:1;grid-row:1 / 3;display:flex;flex-direction:column;align-items:center;gap:12px;padding-top:6px;font-size:18px;color:#e9d995}.carry-strip{display:flex;flex-direction:column;align-items:center;gap:12px}.carry-chip{display:grid;place-items:center;min-width:39px;height:39px;border:2px solid #ee9b8a;border-radius:50%;color:#ee9b8a;font-family:Kalam,sans-serif;font-size:24px;animation:carry-appear .2s ease}.carry-used{color:#f0d873;border-color:#f0d873;animation:carry-used .8s ease forwards}.math-canvas{grid-column:2;grid-row:1;width:100%;max-width:300px;height:auto;max-height:none;align-self:start;justify-self:center;overflow:visible;fill:none}.math-digit{fill:#edf2df;stroke:none;font-size:30px}.active-digit{fill:#f1d97e}.digit-box{stroke:#e7d28f;fill:#e9ce7612;stroke-width:1.6}.calculation-line{stroke:#dfecd5;stroke-width:2}.multiply-arrow{stroke:#edcf77;stroke-width:2.5;stroke-dasharray:5 5;fill:none}.shift-zero{fill:#d0ddc4;stroke:none;font-family:Kalam,sans-serif;font-size:26px}.math-hint{align-self:stretch;margin:0;padding:5px 4px;border:1px solid #c7bd6f66;border-radius:9px;font-size:17px;line-height:1.5;color:#ecd88f;min-height:0;overflow-wrap:normal}.math-hint:empty{display:none}.board-content:has(.math-board:not([hidden])){display:block;padding-top:5px}.board-content:has(.math-board:not([hidden])) .board-description{display:none}.doubt-button{font-family:system-ui,sans-serif}.footer-links{gap:18px}.board-content{overflow-wrap:anywhere}
@keyframes carry-appear{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
@keyframes carry-used{0%{opacity:1;transform:translateY(0)}60%{opacity:1;transform:translateY(12px)}100%{opacity:.15;transform:translateY(12px)}}
@media(orientation:landscape) and (max-height:600px){.math-canvas{max-width:290px}.carry-row{font-size:16px}.math-hint{font-size:16px}.board-content:has(.math-board:not([hidden])){flex-direction:column}.math-board{grid-template-columns:84px minmax(0,1fr)}.math-canvas{max-width:230px}.math-hint{max-width:100%}.home-card{max-width:650px}.home-heading{margin-bottom:18px}.profile-greeting{margin-bottom:16px}}
@media(prefers-reduced-motion:reduce){.carry-chip,.carry-used{animation:none}.carry-used{opacity:.7}}

.carry-existing{animation:none}.carry-settled{animation:none;opacity:.15;color:#f0d873;border-color:#f0d873;transform:translateY(12px)}
.shift-zero-active{fill:#f1d97e}.shift-zero-box{stroke:#f1d97e;fill:#f1d97e18}

@media(max-width:359px){.math-board{grid-template-columns:72px minmax(0,1fr);gap:6px}.carry-row{font-size:16px}}
@media(orientation:landscape) and (max-height:600px){.board-title{font-size:22px}.control-panel{padding-top:6px;padding-bottom:max(0px,env(safe-area-inset-bottom))}.board{padding:8px}.doubt-button{min-height:44px}.class-messages{max-height:58px}}

/* Recovery is UI status, never lesson writing on the green board. */
.control-panel #live-error{color:#874b3c}
.control-panel{padding-top:8px}
.control-bottom{gap:8px}
@media(orientation:landscape) and (max-height:600px){.control-panel{padding-top:4px}.control-panel .class-messages{max-height:36px}.mic-control{padding-bottom:8px}}

.diagnostic-section {margin-block-start:1rem;}
#diagnostic-report {max-height:14rem;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.5 monospace;}

#restart-lesson{display:flex;align-items:center;gap:8px;justify-content:center;min-height:48px}#restart-lesson svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8}

.calculation-row{flex-shrink:0;display:flex;justify-content:flex-start}.calculation-row:has(.math-hint:empty){display:none}.calculation-row .math-hint{max-width:min(100%,340px);font-size:18px;padding:8px 12px;margin:8px 0;border-radius:10px}.math-canvas{justify-self:end}.board-heading:has(#lesson-title:empty){display:none}.footer-links{display:flex;justify-content:center;gap:18px}#restart-now{min-height:44px}

/* Viewport fitting: one header, one flexible board, one bottom toolbar.
   Values follow visualViewport in CSS pixels; rotation never touches the Live session. */
#classroom-view .app-header{max-width:none;min-height:0;padding:4px max(8px,env(safe-area-inset-right)) 4px max(8px,env(safe-area-inset-left));padding-top:max(4px,env(safe-area-inset-top))}
#classroom-view .top-navigation{grid-template-columns:minmax(48px,1fr) auto minmax(48px,1fr);gap:4px}
#classroom-view .navigation-button{min-width:48px;min-height:44px;height:var(--classroom-header-size,48px);padding:4px;font-size:1rem}
#classroom-view .header-end{gap:4px}
#classroom-view .header-end .icon-button{width:var(--classroom-header-size,48px);min-width:44px;height:var(--classroom-header-size,48px);min-height:44px;border-radius:13px}
#classroom-view .header-end .icon-button svg{width:27px;height:27px}
#classroom-view .workspace{max-width:none;flex:1 1 0;min-height:0;padding-inline:max(8px,env(safe-area-inset-left)) max(8px,env(safe-area-inset-right))}
#classroom-view .board{min-height:0;padding:10px 12px}
#classroom-view .board-title:empty{display:none}
#classroom-view .board-content{min-height:0;flex:1 1 0;padding-block:6px;scroll-padding-block:6px}
#classroom-view .control-panel{max-width:none;padding:4px max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}
#classroom-view .main-controls{width:100%;max-width:480px;grid-template-columns:minmax(0,1fr) var(--classroom-mic-size,60px) minmax(0,1fr);gap:12px}
#classroom-view .live-button{width:var(--classroom-mic-size,60px);height:var(--classroom-mic-size,60px);min-width:44px;min-height:44px}
#classroom-view .mic-control{padding-bottom:0}#classroom-view .mic-control:after{display:none}
#classroom-view #mic-label{font-size:12px;bottom:-4px}
#classroom-view .control-bottom{max-width:680px;min-height:44px;gap:8px}
/* The mic already carries its live label; avoid repeating status below the board. */
#classroom-view #mic-label,#classroom-view .control-bottom .status-row{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#classroom-view .control-bottom{height:0;min-height:0;margin:0;padding:0}
#classroom-view .control-bottom .footer-links{display:none}
#classroom-view .doubt-row{justify-content:space-between;align-items:center;gap:8px}
#classroom-view .doubt-row .text-button{font-family:system-ui,sans-serif;font-size:14px;color:#e7eedf;border:1px solid #cadfbe66;border-radius:10px;padding:8px 10px;margin:0;min-height:44px}
#classroom-view .class-messages:has(#live-error:not(:empty)) #lesson-notice{display:none}
#classroom-view .control-bottom .status-row{font-size:14px;line-height:1.5}
#classroom-view .control-bottom .status-row>span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
#classroom-view .footer-links{gap:0}
#classroom-view .footer-links .text-button{font-size:14px;padding:6px 10px;margin:0;min-height:44px}
#classroom-view .pause-button,#classroom-view .continue-button{min-height:44px;font-size:14px}
:root[data-classroom-density="compact"] #classroom-view .board{padding:6px 10px}
:root[data-classroom-density="compact"] #classroom-view .doubt-row{padding-top:4px}
:root[data-classroom-density="compact"] #classroom-view .mic-control{padding-bottom:0}
:root[data-classroom-density="compact"] #classroom-view .mic-control:after{display:none}
/* The accessible live status remains available without using a second visual row. */
:root[data-classroom-density="compact"] #classroom-view #mic-label,
:root[data-classroom-density="compact"] #classroom-view .control-bottom .status-row{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
:root[data-classroom-density="compact"] #classroom-view .live-button{border-width:3px}
:root[data-classroom-density="compact"] #classroom-view .live-button svg{width:27px;height:27px}
:root[data-classroom-density="compact"] #classroom-view .control-panel .class-messages{max-height:30px}
:root[data-classroom-density="compact"] #classroom-view .calculation-row .math-hint{padding:4px 8px;margin:4px 0}
@media(min-width:600px){
 :root[data-classroom-density="compact"] #classroom-view .control-panel{display:flex;align-items:center;justify-content:center;gap:0;padding-top:4px}
 :root[data-classroom-density="compact"] #classroom-view .main-controls{flex:1 1 420px;max-width:480px;margin:0}
 :root[data-classroom-density="compact"] #classroom-view .control-bottom{flex:0 0 auto;margin:0}
}
@media(max-width:319px){
 #classroom-view .top-navigation{grid-template-columns:1fr 1fr}
 #classroom-view .header-end{grid-column:1 / -1;grid-row:2}
}

.control-panel .class-messages{max-height:44px;font-family:system-ui,sans-serif;font-size:12px;line-height:1.4;text-align:left}.control-panel .class-messages p{margin:3px 0}

.volume-dialog{width:min(360px,calc(100% - 24px))}.volume-range{display:flex;align-items:center;gap:16px;margin:8px 0 12px}.volume-range input[type=range]{min-width:0;flex:1;height:44px;padding:0;accent-color:var(--green)}.volume-range output{min-width:4ch;font-variant-numeric:tabular-nums;font-size:1rem}.volume-dialog .text-button{min-height:44px;font-size:1rem}
@media(max-width:479px){#classroom-view .header-end .icon-button{width:44px}}
@media(max-width:359px){#classroom-view .top-navigation{grid-template-columns:1fr 1fr}#classroom-view .header-end{grid-column:1 / -1;grid-row:2}}

/* Reference-led home: cream surfaces, deep green brand, soft raised controls. */
.home-view{background:radial-gradient(ellipse at 0 0,#e7eddf 0,transparent 60%),linear-gradient(135deg,#f5f5ec,#eaece1);align-items:start;min-height:var(--viewport-height,100dvh);padding:max(24px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left))}
.home-card{max-width:480px;padding:12px 0 8px;background:transparent;border:0;box-shadow:none}
.home-heading{gap:12px;margin-bottom:28px}.home-brand{gap:14px}.home-brand h1{font-size:clamp(27px,7vw,36px);font-weight:750;letter-spacing:-1.1px;line-height:1.15}.home-brand p{font-size:14px;line-height:1.7;margin:6px 0 0;color:#526354}.home-logo{width:64px;height:68px;border-radius:19px;color:#d5c383;background:linear-gradient(135deg,#42714e,#173f30 85%);border:1px solid #608363;box-shadow:inset 0 1px 2px #a6bf8770,0 7px 12px #234a3430}.home-logo svg{width:45px;height:45px;stroke:#d5c383;stroke-width:2;fill:none}.home-heading .icon-button{width:44px;min-width:44px;height:48px;border:0;background:transparent}.home-heading .icon-button svg{width:27px;height:27px}
.profile-greeting{background:linear-gradient(105deg,#e9e3c2,#f1ecd8);border-radius:17px;padding:15px 17px;font-size:18px;font-weight:600;line-height:1.7;margin:0 0 18px;color:#2e4938}.profile-greeting:empty{display:none}
.home-view label{display:block;font-size:14px;font-weight:550;color:#50624e;margin:14px 0 7px;line-height:1.6}.home-view input,.home-view select{width:100%;min-width:0;min-height:54px;padding:12px 15px;border:1px solid #d5dccb;border-radius:17px;background:linear-gradient(130deg,#fffffa,#f7f8f0);color:#254c39;font:inherit;font-size:16px;box-shadow:inset 0 1px 2px #fff,0 5px 8px #314e3220}.home-view select{padding-right:40px;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23254c39' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"),linear-gradient(130deg,#fffffa,#f7f8f0);background-repeat:no-repeat;background-position:right 16px center,center;background-size:20px,auto}.home-view input:focus-visible,.home-view select:focus-visible{outline:2px solid #a89253;outline-offset:3px}
.home-view .spoken-name-setting{margin:5px 0 0;border:0;padding:0}.home-view .spoken-name-setting summary{min-height:36px;padding:5px 0;font-size:14px;color:#52664e;line-height:1.8}.home-view .field-note{font-size:13px;line-height:1.8;margin:6px 0;color:#6e7c69}.math-setup{margin-top:0}.operand-fields{grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr);gap:10px;margin:16px 0 0}.home-view .operand-fields input{font-size:clamp(30px,8vw,40px);height:70px;padding:6px 10px;text-align:center;font-weight:500;line-height:1.2}.operand-fields #operand-sign{font-size:27px;color:#2e533c}.home-view .math-setup>.field-note{display:none}
.home-view .paste-material{min-height:48px;margin:15px 0 0;padding:8px 2px;gap:10px;border:0;box-shadow:none;background:transparent;border-radius:10px;font-size:14px}.home-view .paste-material small{font-size:12px;margin:0;color:#74806d}.home-view .paste-material>svg:last-child{display:none}.home-view .paste-material>svg:first-child{width:21px;height:21px}
.home-start{min-height:56px;margin-top:17px;border-radius:24px;border:1px solid #507356;border-bottom-color:#173b2b;background:linear-gradient(180deg,#4d7a50,#20543b 70%,#194430);color:#fffef1;box-shadow:inset 0 1px 2px #93b3838c,0 7px 11px #24432f35;font-size:17px;font-weight:550;letter-spacing:0}.home-start:active{transform:translateY(1px)}.home-view #home-message{font-size:14px;line-height:1.8;margin:8px 0}.home-view .resume-card{background:#e8e3c9;padding:15px;border-radius:17px;margin:14px 0}.home-view .resume-card #home-resume{border-radius:20px;background:linear-gradient(#48734b,#20543b);box-shadow:0 4px 7px #29482d20}.home-view .resume-card .text-button{font-size:14px;padding:8px 0}.home-view .material-preview{font-size:14px}.home-view .home-sources{font-size:14px}
@media(min-width:760px){.home-view{padding-top:40px;padding-bottom:40px}.home-card{max-width:500px;padding:28px 30px;border:1px solid #fffff0;background:#f6f7ef90;border-radius:30px;box-shadow:0 18px 50px #31452c15}}
@media(max-width:360px){.home-view{padding-left:16px;padding-right:16px}.home-brand{gap:10px}.home-logo{width:50px;height:55px;border-radius:15px}.home-brand h1{font-size:27px}.home-brand p{font-size:13px}.home-heading{gap:5px;margin-bottom:20px}.profile-greeting{font-size:16px}}
@media(prefers-reduced-motion:reduce){.home-start:active{transform:none}}

/* The supplied brand mark, framed directly from its reference image. */
.home-heading{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:12px;align-items:center}
.home-brand{display:grid;grid-template-columns:58px minmax(0,1fr);gap:12px;align-items:center;min-width:0}
.home-logo{display:block;width:58px;height:58px;border:0;border-radius:20%;background-image:url('./brand-reference.png');background-size:800% 597.395833%;background-position:6.547619% 9.424084%;background-repeat:no-repeat;box-shadow:0 5px 9px #234a342b;overflow:hidden}
.home-brand-copy{width:max-content;max-width:100%;min-width:0}
.home-brand h1{font-size:clamp(23px,6.5vw,32px);font-weight:750;line-height:1.2;letter-spacing:-.8px;white-space:nowrap;margin:0}
.home-brand p{width:0;min-width:100%;max-width:100%;margin:5px 0 0;font-size:14px;line-height:1.65;letter-spacing:0;overflow-wrap:anywhere;color:#526354}
.home-heading .icon-button{align-self:center;justify-self:end;margin:0}
@media(max-width:360px){.home-heading{gap:8px}.home-brand{grid-template-columns:48px minmax(0,1fr);gap:10px}.home-logo{width:48px;height:48px}.home-brand h1{font-size:23px}.home-brand p{font-size:13px}}

/* English home hierarchy and reference upload card. */
#home-view .home-heading{margin-bottom:32px;min-height:62px}#home-view .profile-greeting{display:none}#home-view .home-brand-copy{width:auto}#home-view .home-brand h1{font-size:clamp(23px,6.6vw,33px)}
#home-view label{font-size:16px;font-weight:500;margin:15px 0 7px;color:#40563f}#home-view #home-form>label:first-child{margin-top:0}#home-view input,#home-view select{font-size:17px;min-height:54px}
.home-select{position:relative;min-width:0}.home-select>svg{position:absolute;left:16px;top:50%;transform:translateY(-50%);width:22px;height:22px;pointer-events:none;color:#245139}.home-view .home-select select{padding-left:49px}#home-view .spoken-name-setting summary{font-size:13px;min-height:30px;padding:4px 0;color:#687761}#home-view .spoken-name-setting{margin-bottom:2px}#home-view .operand-fields{margin-top:17px;gap:12px}#home-view .operand-fields input{font-size:37px;height:66px}
#home-view .paste-material{display:flex;gap:14px;min-height:98px;padding:14px;border:1.5px dashed #82906e;border-radius:20px;background:#fcfcf39e;margin:19px 0 0;text-align:left}#home-view .paste-material .upload-mark{display:grid;place-items:center;flex:0 0 52px;width:52px;height:58px;border-radius:16px;background:linear-gradient(135deg,#e9e6cf,#e1dfc9);box-shadow:inset 0 1px 2px #fff8}#home-view .upload-mark svg{width:29px;height:29px;stroke-width:2;color:#28553a}#home-view .upload-copy{font-size:17px;font-weight:650;line-height:1.35;min-width:0}#home-view .upload-types{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}#home-view .upload-types>span{display:inline-block;padding:4px 12px;font-size:14px;font-weight:500;border-radius:20px;background:#e5e3cb;color:#3f513a;line-height:1.25}#home-view .home-start{margin-top:17px;font-size:18px;letter-spacing:1px;min-height:54px}
.material-dialog{border:1px solid #d5dccb;background:linear-gradient(135deg,#f8f9f0,#eff2e7);border-radius:26px;padding:24px;box-shadow:0 18px 65px #1d3d2938;font-size:16px}.material-dialog .dialog-heading h2{font-size:24px;margin:0}.material-dialog label{display:block;font-size:15px;color:#40563f;margin:16px 0 8px}.material-dialog textarea,.material-dialog input:not([type=file]){background:#fffff8;border:1px solid #d5dccb;border-radius:16px;box-shadow:inset 0 1px 1px white,0 4px 8px #314e3215;font-size:16px}.material-dialog .field-note{font-size:14px;line-height:1.6}.material-dialog .form-buttons{background:#f2f5ea;padding-top:14px;gap:10px}.material-dialog .form-buttons button{border-radius:20px;min-height:48px;font-size:15px}.material-dialog .form-buttons button[type=submit]{background:linear-gradient(#48734b,#20543b);box-shadow:0 5px 8px #24432f25}.material-dialog .text-button{font-size:14px;margin:6px 0;padding-left:0}.material-dialog #material-file{width:100%;font-size:14px;min-height:48px}.material-dialog #material-file::file-selector-button{border:1px solid #d5dccb;border-radius:12px;padding:10px 14px;background:#fffff8;color:#254c39;margin-right:10px;font:inherit}
@media(max-width:360px){#home-view .home-brand h1{font-size:23px}#home-view .paste-material{padding:12px;gap:10px}#home-view .upload-copy{font-size:15px}#home-view .upload-types{gap:5px}#home-view .upload-types>span{padding:4px 9px}}

/* Audible calculation cue: lower middle, left aligned, outside the scroll surface. */
#classroom-view .calculation-row{position:absolute;left:12px;top:55%;width:calc(100% - 24px);max-width:390px;z-index:1;pointer-events:none;transform:translateY(-10%)}
#classroom-view .calculation-row .math-hint{max-width:100%;width:fit-content;font-size:clamp(25px,5vw,32px);line-height:1.4;padding:10px 16px;margin:0;border:1px solid #d8c77b88;border-radius:13px;background:#204c39f2;box-shadow:0 3px 8px #0d281c20;overflow-wrap:anywhere}
:root[data-classroom-density="compact"] #classroom-view .calculation-row{left:10px;top:54%;max-width:min(390px,calc(100% - 20px))}
:root[data-classroom-density="compact"] #classroom-view .calculation-row .math-hint{font-size:22px;padding:5px 12px;margin:0}
#home-view #resume-card{display:none}#home-view .home-heading{margin-bottom:20px}#home-view label{margin-top:11px}#home-view .paste-material{min-height:88px;margin-top:14px;padding:12px 14px}#home-view .home-start{margin-top:13px}

/* BrainTalk home: one viewport, balanced rows, independently reserved START. */
#home-view{position:fixed;top:var(--viewport-top,0px);left:0;right:0;height:var(--viewport-height,100dvh);min-height:0;overflow:hidden;display:flex;justify-content:center;align-items:stretch;padding:max(14px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));background:radial-gradient(ellipse at 10% 10%,#e4edda,transparent 75%),linear-gradient(135deg,#f7f7ee,#edf0e4)}
#home-view .home-card{container:home / size;width:100%;max-width:460px;min-height:0;height:100%;display:flex;flex-direction:column;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
#home-view .home-heading{flex:0 0 auto;display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;min-height:52px;margin:0 0 16px;gap:12px}
#home-view .home-brand{display:block;min-width:0}#home-view .home-brand h1{display:inline-flex;align-items:baseline;font-family:system-ui,-apple-system,sans-serif;font-size:clamp(31px,9vw,45px);font-weight:800;letter-spacing:-1.7px;line-height:1.15;white-space:nowrap;margin:0}.brain-word{color:#103e59}.talk-word{color:#2eac36;position:relative}.talk-word:after{content:'';position:absolute;left:40%;bottom:-.075em;width:.2em;height:.19em;background:#2eac36;clip-path:polygon(0 0,100% 0,0 100%)}
#home-view #home-form{display:flex;flex-direction:column;flex:1 1 0;min-height:0;margin:0}
#home-view .home-fields{flex:1 1 0;min-height:0;display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:max-content;align-content:space-between;gap:12px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#93a78c transparent;padding:2px 3px 9px;margin:0 -3px}
#home-view .home-field{min-width:0}#home-view .lesson-menu,#home-view .math-setup:not([hidden]){display:contents}
#home-view .home-actions{flex:0 0 auto;padding-top:10px}#home-view .home-start{width:100%;min-height:52px;margin:0;background:linear-gradient(180deg,#195778,#103f5b 65%,#0c354c);border-color:#41647a;border-bottom-color:#082c40;box-shadow:inset 0 1px 2px #6990a570,0 5px 9px #1d40542b;border-radius:24px;color:#fffef3;font-size:18px;letter-spacing:.5px}
#home-view .home-field>label{font-size:16px;line-height:1.35;margin:0 0 6px;color:#43573d}
#home-view .home-field input,#home-view .home-field select{height:54px;min-height:44px;padding-top:10px;padding-bottom:10px;font-size:17px;border-radius:17px}
#home-view .operand-fields{margin:0;gap:12px;align-self:end}#home-view .operand-fields input{height:64px;min-height:44px;font-size:37px}
#home-view .paste-material{margin:0;min-height:88px;padding:12px;gap:12px;align-self:end}#home-view .upload-mark svg{color:#123f5a}#home-view .upload-mark{background:linear-gradient(135deg,#eeead5,#e1dfc8)}
#home-view .material-preview{grid-column:1 / -1}#home-view .home-sources{display:none}#home-view #home-message:empty{display:none}#home-view #home-message{margin:0 0 8px;font-size:14px;line-height:1.5;max-height:54px;overflow:auto}
/* Queries use the actual visible card height, including browser chrome/keyboard. */
@container home (max-height:680px){
 #home-view .home-heading{min-height:44px;margin-bottom:10px}
 #home-view .home-brand h1{font-size:clamp(30px,9vw,40px)}
 #home-view .home-fields{gap:10px;padding-bottom:7px}
 #home-view .home-field>label{font-size:15px;margin-bottom:5px}
 #home-view .home-field input,#home-view .home-field select{height:48px;font-size:16px;padding-block:8px}
 #home-view .operand-fields input{height:56px;font-size:32px}
 #home-view .paste-material{min-height:76px;padding:10px;gap:10px}
 #home-view .upload-mark{height:48px;flex-basis:46px;width:46px}
 #home-view .upload-copy{font-size:15px}#home-view .upload-types{margin-top:5px}
 #home-view .home-start{min-height:48px}#home-view .home-actions{padding-top:7px}
}
@container home (max-height:570px){
 #home-view .home-fields{gap:7px;padding-bottom:5px}
 #home-view .home-field>label{font-size:14px;margin-bottom:4px}
 #home-view .home-field input,#home-view .home-field select{height:44px}
 #home-view .operand-fields input{height:48px;font-size:30px}
 #home-view .paste-material{min-height:66px;padding:8px 10px}
 #home-view .upload-mark{height:44px;width:42px;flex-basis:42px}
 #home-view .upload-types>span{padding:3px 10px}
 #home-view .home-heading{margin-bottom:8px}#home-view .home-start{min-height:44px}
}
@container home (min-height:780px){
 #home-view .home-field input,#home-view .home-field select{height:64px}
 #home-view .operand-fields input{height:76px;font-size:40px}
 #home-view .paste-material{min-height:100px;padding:16px}
 #home-view .home-heading{min-height:60px;margin-bottom:16px}
 #home-view .home-start{min-height:56px}
}
@container home (min-width:500px) and (max-height:570px){
 #home-view .home-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 16px}
 #home-view .home-heading{margin-bottom:6px}
 #home-view .upload-copy{font-size:14px}#home-view .upload-types{gap:5px}
 #home-view .upload-types>span{font-size:14px;padding:3px 8px}
 #home-view .home-actions{padding-top:6px}
}
@media(min-width:600px) and (max-height:600px){#home-view{padding-block:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-bottom))}#home-view .home-card{max-width:820px}}
@media(min-width:760px) and (min-height:701px){#home-view{padding-top:28px;padding-bottom:28px}#home-view .home-card{max-height:820px;max-width:500px;padding:22px 26px;border:1px solid #fffff0;background:#f6f7ef90;border-radius:28px;box-shadow:0 16px 45px #31452c15}}
@media(max-width:360px){#home-view{padding-left:16px;padding-right:16px}#home-view .home-brand h1{font-size:31px}#home-view .home-heading{gap:8px}}
.material-dialog .form-buttons button[type=submit]{background:linear-gradient(#195778,#103f5b);border-color:#41647a}

/* Recorded multiplication follows the same cream, navy and chalk palette. */
.class-library-link{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;border:1px solid #d7ddce;border-radius:12px;background:#f7f8ed;color:#103c54;padding:9px 12px;margin:0 0 10px;font-size:13px;font-weight:650;min-height:40px}
.class-library-link span{font-size:11px;font-weight:400;color:#647569}
.class-library-dialog{width:min(840px,96vw);max-width:96vw;height:min(900px,94dvh);max-height:94dvh;padding:18px;overflow-y:auto;background:#f3f5e9;color:#173d32;border-radius:22px}
.class-library-dialog::backdrop{background:#0d271cb3}.class-library-dialog h2{margin:3px 0 0}.class-eyebrow{font-size:10px;letter-spacing:.15em;margin:0;color:#62756b}
.class-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:16px 0 8px}.class-tabs button{background:#fcfcf6;color:#214b3d;border:1px solid #d5ddce;border-radius:13px;min-height:44px}.class-tabs button[aria-pressed="true"]{background:#103c54;color:#fff;border-color:#103c54}
.class-list{display:grid;gap:10px}.class-card{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #d8dece;border-radius:16px;padding:14px;background:#fcfcf5;box-shadow:0 5px 10px #243c2410}.class-card h3{font-size:19px;margin:0 0 5px;font-weight:600}.class-card p{font-size:12px;margin:0;color:#65776c}.class-card-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.class-card-actions button,.class-play-controls button,.class-live-doubt button,.class-library-status button{border:1px solid #d2dccd;background:#f7f9ed;color:#164733;border-radius:11px;padding:9px 12px;min-height:44px;font-size:13px}.class-card-actions button:first-child{background:#103c54;color:white;border-color:#103c54}
.class-import-row{margin-top:18px;padding:12px;border:1px dashed #8b9b80;border-radius:14px}.class-import-row label{font-size:13px}.class-import-row input{font-size:12px;padding:6px 0;max-width:100%;background:transparent}.class-library-status{margin-top:12px}.class-library-status p{font-size:13px;margin:8px 0;line-height:1.5}.class-library-status progress{width:100%}.class-preview-heading{display:flex;align-items:center;gap:8px;justify-content:space-between;flex-wrap:wrap}.class-preview-heading h3{font-size:20px}.class-volume-label{display:flex;align-items:center;gap:8px;font-size:12px}.class-volume-label input{width:85px;padding:0}.class-board-surface{background:radial-gradient(ellipse at top,#24553c,#173d2c);border:7px solid #b48c55;border-radius:3px;color:#f5f3da;padding:18px 16px;min-height:260px;max-height:56dvh;overflow:auto}.class-board-surface .math-board{grid-template-columns:56px minmax(0,1fr)}.class-board-surface .math-canvas{max-width:360px;max-height:43dvh;fill:none}.class-board-surface .math-hint{margin-top:10px;font-size:23px;min-height:34px;width:fit-content}.class-play-controls{display:flex;gap:6px;flex-wrap:wrap}.class-play-controls .class-doubt-button{background:#edcc73;color:#1f4936}.class-live-doubt p{line-height:1.6;font-size:14px}.class-live-doubt p:empty{display:none}#class-play-status{font-size:12px;color:#62776c}
@media(max-width:480px){.class-library-dialog{padding:14px;width:96vw}.class-card{padding:12px;gap:8px}.class-card-actions{max-width:46%}.class-card h3{font-size:18px}.class-card-actions button{padding:8px;font-size:12px}.class-board-surface{padding:14px 8px}.class-library-link{font-size:12px}.class-library-link span{font-size:10px}}
@media(max-height:600px) and (orientation:landscape){.class-board-surface{min-height:150px;max-height:43dvh}.class-board-surface .math-canvas{max-height:34dvh}.class-preview-heading h3{margin:6px 0}}

/* Ready lesson browser shares the home palette; management is a separate view. */
.class-number{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border-radius:12px;background:#e9ece2;color:#123c53;font-size:14px;font-weight:700}
.class-card-info{flex:1;min-width:0}.class-card-info h3{margin:0;font-size:21px;color:#173d4c}.class-card-info p{margin:5px 0 0}
.class-card{gap:14px}.class-card-actions button{min-height:44px}.class-empty{padding:30px 16px;text-align:center;color:#59695d;font-size:16px;line-height:1.6}
#class-operation,#class-delete-scope{width:100%;min-height:48px;margin:8px 0 18px;padding:10px 14px;border:1px solid #d5d9ca;border-radius:14px;background:#fcfcf6;color:#183f35;font-size:16px}
.class-import-row{font-size:14px;line-height:1.5}.recorded-doubt-panel{display:none;padding:8px 16px;max-height:84px;overflow:auto;color:#24483b;background:#f5f6ed;font-size:15px;line-height:1.5}.recorded-doubt-panel p{margin:0}
#home-view.recorded-home .home-fields{align-content:start;gap:clamp(12px,2.5dvh,24px)}
@media(max-width:480px){.class-card{padding:13px 12px;gap:10px}.class-card-actions{gap:6px}.class-card-actions button{padding:8px 12px}.class-card-info h3{font-size:20px}.class-library-dialog{padding:18px}}

.class-library-dialog{height:auto;min-height:260px;max-height:94dvh}.class-tabs{position:sticky;top:0;z-index:1;background:#f3f5e9;padding-block:5px}

.shared-audio-setup{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0;padding:12px;border:1px solid #d5ddce;border-radius:14px;background:#fcfcf6}.shared-audio-setup strong{font-size:15px}.shared-audio-setup p{margin:4px 0 0;font-size:14px;line-height:1.45}.shared-audio-setup button{flex-shrink:0;min-height:44px;padding:9px 12px;font-size:14px}

.shared-audio-setup>div{min-width:0}.shared-audio-setup progress{display:block;width:100%;margin-top:8px}.shared-audio-setup progress[hidden]{display:none}
.shared-audio-setup{flex-wrap:wrap}.shared-audio-setup>div:first-child{flex:1 1 220px}.shared-audio-actions{display:flex;flex-wrap:wrap;gap:8px}.shared-audio-actions .shared-audio-delete{color:#8e3d32;background:#fff5f1;border:1px solid #e9cbc4}.shared-audio-list{display:grid;gap:8px;margin-bottom:16px}.shared-audio-list[hidden]{display:none}.shared-audio-row{display:flex;align-items:center;gap:12px;padding:12px;background:#fcfcf6;border:1px solid #d5ddce;border-radius:12px}.shared-audio-row>div{flex:1;min-width:0}.shared-audio-row strong{font-size:14px}.shared-audio-row p{font-size:14px;line-height:1.6;margin:6px 0 0}.shared-audio-row button{min-height:44px;min-width:64px;flex-shrink:0}

.class-batch-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px 0 16px}.class-batch-controls[hidden]{display:none}.class-batch-controls p{margin:0;font-size:14px;color:#36564a}.class-batch-controls>div{display:flex;gap:8px;flex-wrap:wrap}.class-batch-controls button{min-height:44px;padding:10px 14px;border-radius:14px;font-size:14px}#create-selected-classes{background:#123c53;color:#fff}#clear-class-selection{background:#f8faef;color:#36564a}.class-selection{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;cursor:pointer;flex:0 0 36px}.class-selection input{width:22px;height:22px;margin:0;accent-color:#123c53}.class-selection:has(input:disabled){cursor:default}

/* Geometry shares the main chalkboard and its audio clock. */
.math-board.geometry-board{display:block;width:100%;padding:4px 0}.geometry-board .carry-row{display:none}.geometry-board .math-canvas{display:block;width:100%;max-width:560px;margin:0 auto;height:auto;overflow:visible}.geometry-source{font-size:12px;line-height:1.5;color:#5b7263;margin:7px 0 0}.class-card-info .geometry-source{overflow-wrap:anywhere}
.geometry-active-arc{stroke-dasharray:100;animation:geometry-arc-draw .28s ease-out}.geometry-active-sector{animation:geometry-angle-appear .2s ease-out}.geometry-auxiliary-line{animation:geometry-angle-appear .3s ease-out}
.geometry-angle-side,.geometry-highlight-line{animation:geometry-angle-appear .35s ease-out}
@keyframes geometry-arc-draw{from{stroke-dashoffset:100}to{stroke-dashoffset:0}}@keyframes geometry-angle-appear{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.geometry-active-arc,.geometry-active-sector,.geometry-auxiliary-line,.geometry-angle-side,.geometry-highlight-line{animation:none}}

.source-studio-entry{background:#133f34!important;color:#fff!important;border-color:#133f34!important}.source-studio-entry span{color:#d1e7d8!important}.angle-source-dialog{width:calc(100% - 24px);max-width:700px;max-height:94dvh;padding:20px}.angle-source-dialog textarea{display:block;width:100%;resize:vertical;min-height:180px;font-size:16px;line-height:1.8;padding:12px;border:1px solid #bbcdbd;border-radius:12px;background:#fff;color:#173e30}.angle-source-dialog label{display:block;font-size:15px;margin:14px 0 7px}.angle-upload-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.angle-upload-grid label{padding:14px;border:1px dashed #7e9a89;border-radius:12px;margin:14px 0 0}.angle-upload-grid input{display:block;width:100%;font-size:14px;margin-top:9px}.angle-create-actions{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.angle-create-actions button{min-height:48px;padding:12px 20px;border:0;border-radius:12px;background:#174b37;color:#fff;font-size:16px}.angle-source-dialog progress{width:100%}.angle-source-dialog #angle-source-message{font-size:15px;line-height:1.7}.angle-source-dialog summary{cursor:pointer;font-size:15px;padding:8px 0}.angle-source-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit;font-size:15px;line-height:1.8}.angle-source-dialog li{padding:10px 0}.angle-source-dialog li p{font-size:15px;line-height:1.8;margin:8px 0}.class-number[role="button"]{cursor:pointer;border:2px solid #80a38b!important}.class-number[role="button"]:focus-visible{outline:3px solid #174b37;outline-offset:3px}@media(max-width:430px){.angle-upload-grid{grid-template-columns:1fr}.angle-source-dialog{padding:14px}}

#classroom-view .math-hint.class-practice{display:flex;flex-direction:column;gap:12px;width:100%;font-family:system-ui,sans-serif;font-size:18px}.practice-score{font-family:Chilanka,system-ui,sans-serif;color:#f0db93}.practice-choices{display:flex;flex-wrap:wrap;gap:10px}.practice-choices button{min-width:70px;min-height:48px;padding:10px 18px;font-size:18px;border:1px solid #efd57c;border-radius:10px;color:#173d2c;background:#f4df9b}.practice-choices button:focus-visible{outline:3px solid white;outline-offset:3px}.practice-choices button:disabled{opacity:.55}
