.live-shell{max-width:1400px;margin:auto;padding:0 5%}.live-header{height:auto;min-height:95px;gap:20px;flex-wrap:wrap;padding:20px 0}.live-header nav{display:flex;gap:18px;align-items:center}.live-header a:not(.brand){color:var(--green);font-size:13px}.live-main{padding:30px 0}.live-title{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap}.live-title h1{margin-top:6px}.live-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:25px;margin:22px 0}.live-card h2{margin-top:0}.live-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:24px}.live-label{display:block;font-size:12px;font-weight:700;margin:14px 0 7px}.live-input{width:100%;border:1px solid #bdcbbb;border-radius:8px;padding:14px;font:16px 'DM Sans',sans-serif;color:var(--ink);background:#fafbf6}.live-primary{background:var(--green);color:white;border:0;font-size:15px;padding:15px 24px;min-height:48px}.live-primary:hover{background:#32664f}.live-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.live-actions button{min-height:44px}.live-note{font-size:12px;line-height:1.65;color:#687c6b}.live-status{display:inline-block;background:#e9eddf;border-radius:30px;padding:10px 15px;font-size:12px}.live-status.error{background:#f7dfd4;color:#7f382b}.room-code{font:800 clamp(27px,5vw,49px) Manrope;letter-spacing:5px;margin:10px 0;overflow-wrap:anywhere}.join-url{overflow-wrap:anywhere;font-size:13px;color:var(--green)}.live-expression{display:flex;justify-content:center;align-items:center;font-size:clamp(24px,3.2vw,46px);min-height:125px;overflow:auto}.live-expression .letter-badge{margin-right:20px}.live-answer{border-top:1px solid var(--line);padding-top:18px;font-size:22px;display:flex;gap:12px;align-items:center}.live-answer small{font-size:10px;letter-spacing:1px;color:var(--muted)}.room-call-list{max-height:300px;overflow:auto}.room-call{display:flex;gap:16px;padding:14px 0;border-bottom:1px solid var(--line);align-items:center}.room-call span:first-child{font:700 17px Manrope}.student-row{padding:17px 0;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:12px}.student-row strong{display:block;overflow-wrap:anywhere}.student-meta{font-size:11px;color:#6f8170;display:block;margin-top:6px}.student-claim{background:#fff5d8;border-left:4px solid #cda254;padding:14px;border-radius:7px;margin-top:12px}.claim-buttons{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.result-pill{font-weight:700;font-size:13px;color:var(--green)}.room-board{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:18px 0}.board-letter{text-align:center;padding:10px 0;font:800 27px Manrope;border-radius:7px;background:var(--accent)}.board-square{min-width:0;min-height:100px;display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid #cdd5ca;border-radius:10px;color:var(--ink);padding:8px;font-size:clamp(14px,2vw,26px);overflow:auto;cursor:pointer}.board-square[aria-pressed=true]{background:#dbe8ce;box-shadow:inset 0 0 0 3px #527f48}.board-square.free{background:#e8bd71;box-shadow:none;font:700 13px Manrope;flex-direction:column;gap:5px;cursor:default}.board-square.free span{font-size:24px}.board-square:disabled{opacity:1;cursor:default}.board-square:focus-visible{outline:3px solid #b38432;outline-offset:2px}.student-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr);gap:24px;align-items:start}.student-layout .live-card{margin-top:0}.student-board-card{min-width:0}#studentFeedback{min-height:26px;font-weight:600;margin-top:16px}#teacherToast,#studentToast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);border-radius:8px;background:#244f41;color:#fff;padding:14px 20px;z-index:20;max-width:90vw}dialog{border:1px solid #cdd5ca;border-radius:14px;max-width:750px;width:95%;padding:24px;color:var(--ink);background:#f6f5ef}dialog::backdrop{background:#203b3580}.dialog-top{display:flex;justify-content:space-between;align-items:center}.dialog-top h2{overflow-wrap:anywhere}.join-card{max-width:520px;margin:35px auto}.student-heading{margin-bottom:20px}.inline-link{color:#244f41;font-weight:700}#studentGame[hidden],#teacherGame[hidden],[hidden]{display:none!important}.live-section-link{display:block;color:var(--green);font-weight:700;text-decoration:none;border:1px solid #afbea4;background:#fff;border-radius:8px;padding:15px;margin-top:15px;text-align:center}.teacher-tools{display:flex;gap:10px;flex-wrap:wrap}.mini-board .board-square{min-height:80px;font-size:21px}.teacher-tools button{min-height:44px}@media(max-width:950px){.student-layout,.live-grid{grid-template-columns:1fr}.student-layout .room-call-list{max-height:240px}.live-shell{padding:0 3%}}@media(max-width:480px){.live-card{padding:18px}.room-board{gap:4px}.board-square{min-height:76px;padding:4px;font-size:14px;border-radius:6px}.board-letter{font-size:24px}.live-expression{font-size:25px}.live-title h1{font-size:28px}.live-header{gap:16px}.live-header nav{gap:12px}.student-row{flex-wrap:wrap}.mini-board .board-square{font-size:14px;min-height:70px}}

.pattern-preview{display:flex;align-items:center;gap:16px;background:#eef1e7;border-radius:10px;padding:14px;margin:16px 0}.pattern-preview strong{font-size:14px}.pattern-preview p{font-size:12px;line-height:1.5;margin:5px 0 0}.pattern-diagram{display:grid;grid-template-columns:repeat(5,11px);grid-template-rows:repeat(5,11px);gap:3px;flex-shrink:0}.pattern-diagram span{background:#d5dece;border-radius:2px}.pattern-diagram .target{background:#426b45}

/* Student play area: keep the board and current call together. */
.student-page .live-header{min-height:66px;padding:10px 0;gap:12px}
.student-page .brand{font-size:25px}.student-page .brand small{font-size:8px}
.student-page .live-main{padding:14px 0}.student-page .live-title h1{font-size:26px;margin:4px 0}
.student-page .student-heading{margin-bottom:12px;gap:12px}.student-toolbar{display:flex;gap:8px;flex-wrap:wrap}
.student-toolbar button{min-height:42px;padding:9px 13px}#soundToggle[aria-pressed=true]{background:#dbe8ce;border-color:#78976c}
.student-page .student-layout{grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr);grid-template-rows:auto 1fr auto;grid-template-areas:"board current" "board history" "notes notes";gap:16px;align-items:stretch}
.student-page .student-layout>.live-card{padding:16px;margin:0;min-width:0}
.student-board-card{grid-area:board}.student-current-card{grid-area:current}.student-history-card{grid-area:history}.student-notes{grid-area:notes;display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:center}
.student-page #studentBoard{grid-template-rows:32px repeat(5,clamp(48px,calc((100dvh - 470px)/5),88px));gap:6px;margin:12px 0}
.student-page #studentBoard .board-letter{padding:0;display:flex;justify-content:center;align-items:center;font-size:24px}
.student-page #studentBoard .board-square{min-height:0;padding:5px;font-size:clamp(16px,1.9vw,27px)}
.student-page #studentBoard .board-square.free{font-size:11px;gap:1px}.student-page #studentBoard .board-square.free span{font-size:20px}
.student-page .student-board-card .live-actions{margin-top:10px;gap:8px}.student-page .student-board-card .live-actions button{min-height:44px;padding:10px 15px}
.student-page #studentFeedback{min-height:20px;line-height:20px;font-size:13px;margin:8px 0 0}
.student-current-card .live-expression{min-height:95px;font-size:clamp(24px,3vw,43px);margin:8px 0}.student-current-card .letter-badge{width:44px;height:52px;font-size:31px;margin-right:15px}
.student-page #studentHint{margin:8px 0 0}.student-history-card h2{font-size:20px;margin:0 0 10px}.student-page .student-history-card .room-call-list{max-height:clamp(120px,calc(100dvh - 430px),370px)}
.student-notes .live-note{margin:8px 0 0;font-size:13px}.student-notes .pattern-preview{margin:0}
@media(max-width:950px) and (min-width:761px){.student-page .student-layout{grid-template-columns:minmax(0,1.3fr) minmax(250px,1fr)}}
@media(max-width:760px){.student-page .student-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:auto;grid-template-areas:"current" "board" "notes" "history";gap:12px}.student-page .student-current-card{position:sticky;top:0;z-index:5;box-shadow:0 3px 12px #203b3512}.student-current-card .live-expression{min-height:46px;font-size:27px;margin:5px 0}.student-current-card .letter-badge{width:34px;height:38px;font-size:24px}.student-page #studentHint{display:none}.student-page .student-notes{grid-template-columns:1fr}.student-page #studentBoard{grid-template-rows:30px repeat(5,clamp(48px,calc((100dvh - 470px)/5),80px))}.student-page #studentBoard .board-square{font-size:clamp(14px,3.7vw,25px)}.student-page .student-heading .eyebrow{font-size:9px}.student-page .live-title h1{font-size:22px}.student-page .live-status{font-size:10px;padding:8px 10px}}

/* Room invitation spans the dashboard; both working panels start together. */
.teacher-invite{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 24px;align-items:center}
.teacher-invite>.eyebrow,.teacher-invite>.room-code,.teacher-invite>.join-url{grid-column:1;min-width:0}
.teacher-invite>.live-actions{grid-column:2;grid-row:1 / span 3;margin:0;justify-content:flex-end;align-content:center}
.teacher-invite>.live-note{grid-column:1 / -1;margin:7px 0 0}
.teacher-invite .room-code{font-size:42px;margin:5px 0}
.teacher-dashboard{align-items:start}.teacher-dashboard>div>.live-card{margin-top:0}
.student-page #studentBoard{grid-template-rows:32px repeat(5,clamp(60px,calc((100dvh - 420px)/5),100px))}
@media(max-width:760px){.teacher-invite{grid-template-columns:minmax(0,1fr)}.teacher-invite>.live-actions{grid-column:1;grid-row:auto;justify-content:flex-start;margin-top:10px}.teacher-invite .room-code{font-size:34px}.student-page #studentBoard{grid-template-rows:30px repeat(5,clamp(60px,calc((100dvh - 420px)/5),88px))}}

.auto-draw{margin:18px 0;padding:15px;border:1px solid #cbd6c3;border-radius:10px;background:#f1f4eb}.auto-draw .live-label{margin:0 0 10px}.auto-draw-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.auto-draw-controls input{width:88px;min-height:44px;padding:10px;border:1px solid #b8c8ae;border-radius:7px;color:var(--ink);background:white;font:600 16px 'DM Sans',sans-serif}.auto-draw-controls button{min-height:44px}.auto-draw-controls button[aria-pressed=true]{background:#244f41;color:white;border-color:#244f41}.auto-draw-status{display:flex;gap:14px;align-items:center;margin-top:12px}.auto-draw-status strong{font:700 25px Manrope,sans-serif;font-variant-numeric:tabular-nums}.auto-draw-status span{font-size:12px;line-height:1.5;color:#536b55}.auto-draw .live-note{font-size:11px;margin:10px 0 0}.display .auto-draw{display:none}

.classic-timer{display:grid;grid-template-columns:minmax(200px,1fr) auto minmax(220px,1fr);gap:10px 20px;align-items:center;margin:20px 0 0}.classic-timer .live-label,.classic-timer .auto-draw-status{margin:0}.classic-timer .live-note{grid-column:1 / -1;margin:0}@media(max-width:850px){.classic-timer{grid-template-columns:1fr}.classic-timer .live-note{grid-column:1}.auto-draw-controls input{width:80px}}

/* Stable dimensions: scrolling/address-bar changes must not resize answer cells. */
.student-page #studentBoard{grid-template-rows:32px repeat(5,72px)}
.student-page #studentBoard .board-square{overflow:hidden;line-height:normal;-webkit-appearance:none;appearance:none}
.square-scroll{display:block;width:100%;max-width:100%;box-sizing:border-box;overflow-x:auto;overflow-y:hidden;padding:6px 2px;line-height:1.8;-webkit-overflow-scrolling:touch}
.square-answer{display:block;width:max-content;min-width:100%;text-align:center;line-height:1.8}
.square-answer mjx-container{display:inline-block!important;vertical-align:middle;margin:0!important}
.numeric-answer{display:inline-block;vertical-align:middle;line-height:1.2;font-variant-numeric:tabular-nums}
.feedback-setting{display:flex;align-items:flex-start;gap:9px;font-size:13px;line-height:1.6;margin:18px 0 0}.feedback-setting input{margin-top:5px;flex-shrink:0}
@media(max-width:1024px) and (min-width:761px){.student-page #studentBoard{grid-template-rows:32px repeat(5,76px)}}
@media(max-width:760px){.student-page #studentBoard{grid-template-rows:30px repeat(5,72px)}}

.student-page #studentBoard .board-square{font-size:22px}.square-scroll{padding:4px 1px;line-height:1.2}.square-answer{line-height:1.2}.student-page .numeric-answer{font-family:Manrope,system-ui,sans-serif;font-weight:700;font-size:32px;line-height:1.2}

/* The same board geometry applies to every question set. */
.set-addition .hero-math,.set-addition .live-expression{font-size:clamp(36px,4.5vw,66px)}
.set-addition .board-square[aria-pressed=true]{background:#cde3b6;box-shadow:inset 0 0 0 4px #527f48}
.set-addition .live-primary{font-size:17px}
@media(max-width:480px){.set-addition .hero-math,.set-addition.display .hero-math,.set-addition .live-expression{font-size:34px}}
body[data-loading]>.shell,body[data-loading]>.live-shell{display:none}
.game-loading{font:600 18px Manrope,sans-serif;margin:40px auto;padding:24px;max-width:700px}
.game-loading[hidden]{display:none}

#claimBingo:disabled{opacity:.45;cursor:not-allowed}#claimBingo:disabled:hover{background:var(--green)}

.classroom-pattern{display:flex;align-items:center;gap:20px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px 22px;margin:0 0 20px}.classroom-pattern h2{font-size:24px;margin:5px 0}.classroom-pattern p{font-size:16px;margin:0;color:var(--muted)}.classroom-pattern .pattern-diagram{width:82px;min-width:82px}.classroom-pattern[hidden]{display:none!important}@media(max-width:650px){.classroom-pattern{gap:14px;padding:14px}.classroom-pattern h2{font-size:20px}.classroom-pattern p{font-size:14px}}

.classroom-pattern{flex-wrap:wrap}.classroom-invite{margin-left:auto;border-left:1px solid var(--line);padding-left:24px}.classroom-invite>a{display:block;color:var(--green);font:700 clamp(20px,2.4vw,32px) Manrope,sans-serif;margin:5px 0 8px;overflow-wrap:anywhere;text-decoration:none}#classroomRoom{font-size:12px;letter-spacing:1px}#classroomRoomCode{font:800 25px Manrope,sans-serif;letter-spacing:3px;margin-left:10px}@media(max-width:850px){.classroom-invite{margin-left:0;flex-basis:100%;border-left:0;border-top:1px solid var(--line);padding:14px 0 0}}

.round-review{padding:12px 16px;margin-bottom:16px;border:1px solid #b7c7b1;background:#eef3e8;border-radius:10px}.round-review p{margin:6px 0 0;font-size:14px;line-height:1.5}.board-square.review-incorrect{position:relative;box-shadow:inset 0 0 0 4px #ad3939!important;background:#ffe6e0!important}.board-square.review-missed{position:relative;box-shadow:inset 0 0 0 4px #246e99!important;background:#e4f3fc!important}.review-badge{position:absolute;top:2px;right:5px;font:800 14px sans-serif;color:#7c2222}.review-missed .review-badge{color:#175878}

#endRoom{background:var(--green);color:var(--paper);border-color:var(--green);min-height:44px}#endRoom:hover{background:#32664f;border-color:#32664f}

.teacher-qr{max-width:320px;margin:20px auto;background:#fff}.teacher-qr svg{display:block;width:100%;height:auto}.remote-top-actions{display:flex;gap:10px;flex-wrap:wrap}.remote-top-actions button{min-height:48px}.remote-current{font-size:clamp(24px,4vw,42px);text-align:center;overflow:auto;padding:20px 0}.remote-board{margin-top:10px}.remote-board button{pointer-events:none}.remote-notice{padding:12px;background:#fff3db;border-radius:8px}.remote-claim-count{font-weight:700;color:var(--green)}

.remote-auto{display:grid;grid-template-columns:minmax(220px,1fr) minmax(200px,.8fr);gap:24px;align-items:center;margin-top:24px}.remote-auto .live-label{margin-top:0}.remote-countdown{padding:20px 24px;text-align:center;border:1px solid var(--line);border-radius:14px;background:var(--paper)}.remote-countdown>span{display:block;font-size:11px;font-weight:700;letter-spacing:1.5px}.remote-countdown strong{display:block;font:800 clamp(52px,8vw,82px)/1.15 Manrope,sans-serif;letter-spacing:-2px;font-variant-numeric:tabular-nums;margin:8px 0}.remote-countdown small{display:block;font-size:13px}.remote-countdown[data-running=true]{background:var(--green);color:var(--paper);border-color:var(--green)}@media(max-width:650px){.remote-auto{grid-template-columns:1fr;gap:18px}.remote-countdown strong{font-size:64px}}

/* Compact conversion answers; keep the board's existing row heights and scroll fallback. */
.set-scientific-notation.student-page #studentBoard .board-square{font-size:16px}
.set-scientific-notation.student-page #studentBoard .numeric-answer{font-size:18px}
@media(min-width:951px) and (max-width:1150px){.set-scientific-notation.student-page #studentBoard .board-square{font-size:14px}.set-scientific-notation.student-page #studentBoard .numeric-answer{font-size:16px}}
@media(max-width:650px){.set-scientific-notation.student-page #studentBoard .board-square,.set-scientific-notation.student-page #studentBoard .numeric-answer{font-size:12px}}

.add-question{margin:24px 0;padding:22px;border:1px solid var(--line);border-radius:12px;background:var(--paper)}.add-question h3{margin:0 0 10px}.new-question-fields{display:grid;grid-template-columns:90px minmax(0,1fr) minmax(0,1fr);gap:16px;margin-bottom:18px}.new-question-fields>div{min-width:0}.new-question-fields .preview{overflow-x:auto;padding:10px 0;min-height:46px}.add-question code{overflow-wrap:anywhere}@media(max-width:650px){.new-question-fields{grid-template-columns:1fr}.add-question{padding:16px}}

.live-header nav{flex-wrap:wrap}

/* Let previous calls use the full desktop card instead of a short nested window. */
@media(min-width:761px){
 .student-page .student-layout{grid-template-rows:auto minmax(180px,1fr) auto}
 .student-page .student-history-card{display:flex;flex-direction:column;min-height:180px}
 .student-page .student-history-card #studentCalls{height:0;min-height:0;flex:1 1 0%;max-height:none;overflow:auto;overscroll-behavior:contain}
}
@media(max-width:760px){
 .student-page .student-history-card #studentCalls{height:auto;max-height:none;overflow:visible}
}

#celebrationControls{position:relative;font-size:12px;max-width:290px}#celebrationControls summary{cursor:pointer;font-weight:700;padding:10px}#celebrationControls[open]{background:var(--paper);padding:10px;border:1px solid var(--line);border-radius:10px}#celebrationControls button{margin:5px 0}#celebrationControls small{display:block;line-height:1.5}#celebrationPlayer audio{width:260px;max-width:100%}

.room-settings{border-top:1px solid #d4dbcf;margin-top:24px;padding-top:20px}.room-settings .feedback-setting{display:flex;gap:10px;align-items:center;margin:14px 0}.audience-clock{background:#edf2e8;color:#203d36;border-radius:14px;padding:12px 18px;margin:12px 0;font-size:clamp(1.25rem,3vw,2.5rem);font-weight:750;font-variant-numeric:tabular-nums}.audience-clock[hidden]{display:none}

.student-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.remove-student{color:#973d30;border-color:#d6afa5;background:#fff8f5}.classroom-student-count{font-size:clamp(1.1rem,2vw,1.6rem);font-weight:750;margin:0 0 12px}

.student-page .audience-clock{font-size:1rem;line-height:1.3;padding:6px 10px;margin:8px 0;border-radius:8px;font-weight:650}

/* Long current calls fit independently of the fixed-size column badge. */
#currentMath,#liveCurrent,#studentCurrent{display:flex;align-items:center;min-width:0;max-width:100%;overflow:visible;gap:clamp(10px,2vw,20px)}
#currentMath>.letter-badge,#liveCurrent>.letter-badge,#studentCurrent>.letter-badge{flex-shrink:0;margin-right:0}
.current-call-content{display:block;flex:1 1 0%;min-width:0;max-width:100%;text-align:center}
.current-call-content.current-call-words{font-family:inherit;line-height:1.2;white-space:normal;overflow-wrap:anywhere}
.current-call-content mjx-container{max-width:none!important}
