:root{
  --ink:#0f172a;--muted:#475569;--line:#dbe5f4;--soft:#f4f7fb;--blue:#2563eb;--dark:#0b1326;--green:#16a34a;--orange:#f59e0b;--red:#ef4444;--panel:#ffffff;
  --board:min(70vh,660px,calc(100vw - 420px));
}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Arial,system-ui,sans-serif;color:var(--ink);background:#eef3fb}button,select,input,textarea{font:inherit}button{border:0;border-radius:10px;background:var(--blue);color:#fff;padding:10px 14px;font-weight:800;cursor:pointer}button.secondary{background:#475569}button.danger{background:var(--red)}button.whatsapp{background:#16a34a}button:disabled{opacity:.45;cursor:not-allowed}.hidden{display:none!important}.topbar{height:58px;background:var(--dark);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 14px;gap:12px;position:sticky;top:0;z-index:20}.status{display:inline-block;margin-left:10px;padding:4px 10px;border-radius:999px;background:#64748b;color:white;font-size:12px;font-weight:900}.status.online{background:#16a34a}.status.backup{background:#ca8a04}.status.offline{background:#dc2626}.home-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:28px}.home-card{width:min(1180px,96vw);background:rgba(255,255,255,.95);border:1px solid var(--line);border-radius:28px;padding:36px;box-shadow:0 18px 50px #0f172a18}.badge{display:inline-block;background:#071126;color:white;border-radius:999px;padding:8px 18px;font-weight:900;font-size:14px}.home-card h1{font-size:clamp(38px,5vw,64px);margin:22px 0 10px}.lead{color:#334155;font-size:20px}.home-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:28px}.home-box{background:#f8fafc;border:1px solid var(--line);border-radius:22px;padding:24px}.home-box h2{font-size:28px;margin:0 0 18px}.home-box label,.join-card label{display:block;margin:12px 0 6px;font-weight:800}.home-box input,.home-box select,.join-card input,.control-select,.invite-card input,textarea{width:100%;border:1px solid #cbd5e1;border-radius:12px;padding:12px 14px;background:#fff}.home-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.version-note{margin-top:22px;background:#e9fcff;border:1px solid #67e8f9;color:#075985;border-radius:14px;padding:14px;font-weight:900}.workspace{display:grid;grid-template-columns:190px minmax(0,1fr) 300px;gap:10px;padding:10px}.activity-library,.side-panel,.workspace-card,.toolbar-section,.message-banner,.answer-box{background:var(--panel);border:1px solid var(--line);border-radius:14px}.activity-library{padding:14px;height:calc(100vh - 78px);position:sticky;top:68px}.activity-library h3{margin:0 0 16px}.activity-library h4{margin:16px 0 8px}.activity{display:block;width:100%;text-align:left;margin:8px 0;border-radius:10px;background:#dbeafe;color:#0f172a;padding:10px;font-weight:900}.activity.active{background:var(--blue);color:#fff}.activity.planned{background:#e2e8f0;color:#64748b}.lesson-strip{background:white;border:1px solid var(--line);border-radius:999px;font-size:12px;padding:6px 10px;margin-bottom:8px;display:flex;gap:18px;align-items:center;white-space:nowrap;overflow:auto}.workspace-card{padding:8px}.activity-workspace{min-height:520px;border:1px solid #dbeafe;border-radius:14px;background:#fff;overflow:hidden}.toolbar-section{margin-top:10px;padding:14px}.toolbar-title{font-size:18px;font-weight:900;margin-bottom:10px}.control-panel{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}.control-select-label{display:flex;align-items:center;gap:8px;background:#f8fafc;border:1px solid var(--line);border-radius:12px;padding:10px 12px;font-weight:900}.control-select{width:auto;min-width:110px}.mini-note{font-size:12px;color:#64748b;line-height:1.35}.side-panel{padding:12px;height:calc(100vh - 78px);position:sticky;top:68px;overflow:auto}.side-panel section,.invite-card{border-bottom:1px solid #e5e7eb;padding:0 0 14px;margin-bottom:14px}.side-panel h3{margin:6px 0 12px}.room-big{font-size:26px;text-align:center;font-weight:1000;background:#fff4cc;border:1px dashed #f59e0b;border-radius:14px;padding:12px;color:#0f172a}.invite-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}.full-width{width:100%;margin-top:8px}.teacher-textarea{min-height:82px;resize:vertical}.small-list{display:grid;gap:8px}.participant-row,.list-row{background:#f8fafc;border-radius:10px;padding:10px;display:flex;justify-content:space-between;align-items:center;gap:8px}.ready-pill{display:inline-block;border-radius:999px;background:#dcfce7;color:#166534;padding:3px 7px;font-size:11px;font-weight:900}.not-ready-pill{display:inline-block;border-radius:999px;background:#fee2e2;color:#991b1b;padding:3px 7px;font-size:11px;font-weight:900}.student-layout{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:10px;padding:10px}.student-main{min-width:0}.message-banner{padding:14px;margin-bottom:8px;border-color:#fed7aa;background:#fff7ed;color:#7c2d12;font-size:18px;font-weight:900}.student-toast{position:fixed;top:72px;left:50%;transform:translateX(-50%);background:#111827;color:#fff;padding:12px 20px;border-radius:14px;z-index:50;font-weight:900;box-shadow:0 10px 30px #0003}.answer-box{padding:14px;margin:10px 0}.quick-question-title{font-size:18px;font-weight:900;margin-bottom:6px}.answer-actions{display:flex;gap:8px;margin-top:8px}.join-gate{position:fixed;inset:0;background:#eef3fb;display:flex;align-items:center;justify-content:center;z-index:100}.join-card{width:min(480px,94vw);background:white;border:1px solid var(--line);border-radius:26px;padding:28px;box-shadow:0 22px 55px #0f172a18}.join-card h1{font-size:36px;margin:18px 0 8px}.join-card button{width:100%;margin-top:14px;font-size:18px}.knight-core{height:100%;min-height:520px;display:flex;flex-direction:column;align-items:center;background:#fff}.knight-top{display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap;padding:10px 8px 4px}.stat-card{background:#fff1b9;border:1px solid #fde68a;border-radius:12px;padding:8px 14px;font-weight:1000;box-shadow:0 6px 16px #0001}.target-pill{background:#f8fbff;border:2px solid #38bdf8;border-radius:999px;padding:8px 22px;font-weight:1000;font-size:22px}.target-pill b{color:#0ea5e9}.knight-board-row{flex:1;width:100%;display:flex;align-items:flex-start;justify-content:center;padding:8px 16px 14px;overflow:auto}.board-wrap{display:grid;grid-template-columns:28px var(--board);grid-template-rows:var(--board) 28px;gap:4px}.ranks{display:grid;grid-template-rows:repeat(8,1fr)}.files{grid-column:2;display:grid;grid-template-columns:repeat(8,1fr)}.rank,.file{display:flex;align-items:center;justify-content:center;font-weight:1000;color:#143b1f;font-size:18px}.board{width:var(--board);height:var(--board);display:grid;grid-template-columns:repeat(8,1fr);grid-template-rows:repeat(8,1fr);border:4px solid #21482d;border-radius:18px;overflow:hidden;box-shadow:0 6px 16px #0002}.sq{position:relative;display:flex;align-items:center;justify-content:center;user-select:none}.sq.light{background:#dbeafe}.sq.dark{background:#3b82e8}.sq.legal::after{content:"";width:28%;height:28%;border-radius:50%;background:#a3e635;box-shadow:0 0 20px #a3e635;position:absolute;z-index:3}.coord{position:absolute;left:5px;bottom:4px;font-size:11px;color:#0f3050;opacity:.55;font-weight:900}.num{position:absolute;z-index:4;width:54%;height:54%;border-radius:18px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:clamp(22px,calc(var(--board)/18),48px);font-weight:1000;background:linear-gradient(#fff176,#f59e0b 50%,#c2410c);border:4px solid #fff8ad;text-shadow:0 2px 3px #0005;box-shadow:0 4px 0 #9a3412}.num.blue{background:linear-gradient(#d9f3ff,#3b82f6 55%,#1d4ed8);box-shadow:0 4px 0 #1e3a8a}.knight{position:absolute;z-index:5;font-size:clamp(38px,calc(var(--board)/10),82px);color:#fff;text-shadow:0 0 3px #0284c7,0 0 12px #06b6d4,0 4px 5px #0008}.lesson-status{position:absolute;right:16px;bottom:18px;background:#fff7ed;border:2px solid #f59e0b;border-radius:999px;padding:10px 18px;font-weight:1000}.activity-shell{position:relative;width:100%;height:100%}.result-bar{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;padding:0 10px 10px}.mobile-only{display:none}
@media(max-width:1100px){:root{--board:min(72vw,62vh,620px)}.workspace{grid-template-columns:150px minmax(0,1fr) 260px}.student-layout{grid-template-columns:1fr}.student-layout .side-panel{position:static;height:auto}.side-panel{font-size:14px}}
@media(max-width:760px){:root{--board:calc(100vw - 68px)}.topbar{height:auto;min-height:72px;align-items:flex-start;flex-direction:column;padding:10px}.home-grid{grid-template-columns:1fr}.home-card{padding:22px}.workspace{grid-template-columns:1fr}.activity-library,.teacher-side{position:static;height:auto}.activity-library{display:none}.side-panel{position:static;height:auto}.activity-workspace{min-height:calc(100vh - 230px)}.knight-core{min-height:calc(100vh - 230px)}.knight-top{gap:6px}.stat-card{font-size:14px;padding:7px 9px}.target-pill{font-size:18px;padding:7px 14px}.board-wrap{grid-template-columns:24px var(--board);grid-template-rows:var(--board) 24px}.rank,.file{font-size:15px}.coord{font-size:9px}.lesson-status{left:50%;right:auto;bottom:10px;transform:translateX(-50%);white-space:nowrap}.control-panel{justify-content:flex-start}.control-select-label{width:100%;justify-content:space-between}.student-layout{padding:6px}.student-main .workspace-card{padding:4px}.student-layout .side-panel{display:none}.mobile-only{display:inline-flex}}

/* v2.1 stability and lesson UX additions */
.backup-ready-pill{background:#fff3bf;color:#7a4d00;border-radius:999px;padding:3px 8px;font-weight:800;font-size:12px;white-space:nowrap}
.question-prompt{max-width:min(760px,90%);margin:6px auto 10px auto;padding:8px 12px;border:1px solid #cfe4ff;border-radius:14px;background:#f8fbff;color:#0f172a;font-weight:800;text-align:center;box-shadow:0 6px 16px rgba(15,23,42,.06)}
button:disabled{opacity:.45;cursor:not-allowed;filter:grayscale(.15)}
.status.backup{background:#d97706;color:#fff}

/* v2.1.1 question control, ranking report, and mobile UX additions */
button.attention{box-shadow:0 0 0 4px #fef3c7,0 0 0 7px #f59e0b}
.ranking-more{justify-content:center;color:#475569;font-weight:900}.ranking-actions{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}.modal{position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:90;display:flex;align-items:center;justify-content:center;padding:18px}.modal-card{background:#fff;border:1px solid var(--line);border-radius:22px;box-shadow:0 24px 70px #0005;max-height:92vh;overflow:auto}.ranking-modal-card{width:min(980px,96vw);padding:20px}.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;border-bottom:1px solid #e2e8f0;padding-bottom:12px}.modal-head h2{margin:0 0 6px}.table-wrap{overflow:auto;border:1px solid #dbe5f4;border-radius:14px}.ranking-table{width:100%;border-collapse:collapse;background:#fff}.ranking-table th,.ranking-table td{padding:10px 12px;border-bottom:1px solid #e2e8f0;text-align:left;white-space:nowrap}.ranking-table th{background:#eff6ff;color:#0f172a;font-weight:1000}.ranking-table tr:last-child td{border-bottom:0}.sq.legal .num{outline:5px solid #a3e635;outline-offset:3px}.sq.legal::after{z-index:6;pointer-events:none}.sq.legal:has(.num)::after{display:none}
@media(max-width:760px){.message-banner{font-size:15px;padding:9px 11px;margin-bottom:6px}.lesson-status{bottom:4px;padding:7px 12px;font-size:13px;max-width:92vw;overflow:hidden;text-overflow:ellipsis}.ranking-actions button{width:100%}.modal{align-items:flex-start;padding:8px}.ranking-modal-card{padding:14px}.modal-head{align-items:center}.ranking-table th,.ranking-table td{padding:8px;font-size:13px}}

/* v2.2 official challenge additions */
.challenge-section{border:2px solid #bfdbfe;background:linear-gradient(180deg,#ffffff,#eff6ff)}
.challenge-status{margin-top:12px;background:#0f172a;color:white;border-radius:14px;padding:12px 14px;font-weight:900;text-align:center}
.challenge-status b{color:#fde68a}
@media(max-width:760px){.challenge-status{text-align:left;font-size:13px}.challenge-section .control-panel button{width:100%}}

/* v2.2.1 official challenge refinements */
.student-play-actions{display:flex;justify-content:center;gap:10px;padding:0 10px 10px}.try-again-btn{font-weight:1000;border:2px solid #f59e0b;background:#fff7ed;color:#7c2d12}.table-mini-btn{padding:6px 10px;border-radius:8px;font-size:12px;font-weight:900}.ranking-table td:nth-child(2){font-weight:900}.ranking-actions #printTop3FromModal{background:#0f766e;color:#fff}.challenge-status{line-height:1.45}
@media(max-width:760px){.student-play-actions .try-again-btn{width:min(90vw,320px);font-size:15px}.ranking-table th,.ranking-table td{white-space:nowrap}.table-mini-btn{padding:5px 8px}}

/* v2.2.2 branding, small UI hotfixes, and print safety */
.home-hero-brand{display:flex;align-items:center;gap:26px}
.home-logo{width:128px;height:128px;object-fit:contain;border-radius:50%;box-shadow:0 10px 30px #0f172a18;background:#fff}
.home-card h1{margin-top:10px}
.lead{font-weight:800;max-width:900px;line-height:1.35}
.lead-sub{font-size:22px;font-weight:1000;color:#075985;margin:8px 0 0}
.home-footer{margin-top:22px;border-top:1px solid #dbe5f4;padding-top:16px;color:#475569;font-size:14px;line-height:1.65}
.home-box{box-shadow:0 8px 22px rgba(15,23,42,.05)}
.home-box p{line-height:1.35;color:#334155;font-weight:600}
.try-again-btn{background:#f97316!important;color:#fff!important;border:0!important;border-radius:12px!important;font-weight:1000!important;box-shadow:0 4px 0 #c2410c,0 8px 18px rgba(249,115,22,.25)!important;padding:10px 18px!important;letter-spacing:.2px}
.try-again-btn:hover{filter:brightness(1.03)}
.report-modal-card{width:min(620px,96vw);padding:20px}.report-form{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}.report-form label{font-weight:900;color:#0f172a}.report-form input,.report-form textarea{width:100%;margin-top:6px}.report-form .full{grid-column:1/-1}.report-modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}.save-ok{color:#166534;font-weight:900}
@media(max-width:760px){.home-hero-brand{display:block;text-align:left}.home-logo{width:96px;height:96px;margin-bottom:12px}.lead{font-size:17px}.lead-sub{font-size:18px}.report-form{grid-template-columns:1fr}}

/* v2.3.1 Real Voice Alpha — Live Audio Test Room */
.audio-page-wrap{min-height:100vh;padding:18px;background:linear-gradient(135deg,#eef6ff,#fff7e6)}
.audio-shell{max-width:1180px;margin:0 auto;background:rgba(255,255,255,.92);border:1px solid rgba(20,40,80,.12);border-radius:24px;box-shadow:0 18px 45px rgba(20,40,80,.13);padding:18px}
.audio-topbar,.audio-room-header{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px;flex-wrap:wrap}
.audio-brand-mini{display:flex;gap:14px;align-items:center}.audio-logo{width:76px;height:76px;object-fit:contain;border-radius:18px}.audio-brand-mini h1{margin:4px 0 4px;font-size:clamp(28px,4vw,46px)}.audio-brand-mini p{margin:0;color:#536177}.small-link{color:#174a8b;text-decoration:none;font-weight:700}.audio-card{background:#fff;border:1px solid #dfe8f6;border-radius:18px;padding:16px;box-shadow:0 8px 24px rgba(20,40,80,.07);margin-bottom:14px}.audio-card h2{margin-top:0}.audio-grid{display:grid;gap:14px}.audio-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.audio-grid.main{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.audio-actions{display:flex;gap:10px;align-items:center;margin-top:12px}.audio-actions.wrap{flex-wrap:wrap}.audio-actions.compact{margin-top:0}.audio-actions button,.mini{border:0;border-radius:12px;background:#215aa8;color:white;font-weight:800;padding:11px 14px;cursor:pointer}.audio-actions button.secondary,.mini.secondary{background:#eef3fb;color:#1d3763;border:1px solid #c9d7ec}.audio-actions button.success{background:#1f8a4c}.audio-actions button.danger,.mini.danger{background:#c93d3d;color:#fff}.big-buttons button{font-size:17px;padding:14px 18px}.muted-note{color:#607086;font-size:.94rem}.mic-meter-wrap{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;margin:14px 0}.mic-meter{height:16px;background:#edf2f8;border-radius:999px;overflow:hidden;border:1px solid #d1deef}.mic-meter>div{height:100%;width:0%;background:linear-gradient(90deg,#31a861,#f0ba35);transition:width .08s}.audio-list{display:grid;gap:8px}.audio-student-row{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid #e3ebf6;border-radius:14px;padding:10px;background:#fbfdff}.audio-student-row span{color:#586b82;font-size:.92rem}.mini{padding:8px 10px;font-size:.86rem;margin-left:6px}.ready-summary{font-weight:800;background:#f4f8ff;border:1px solid #d9e6f8;padding:10px;border-radius:12px;margin-bottom:10px}.help-card{border:2px solid #f2bc66;background:#fff9ee;border-radius:16px;padding:12px;margin-top:12px}.help-card h3{margin-top:0}.student-mic-status,.realtime-status{background:#f7f9fd;border:1px dashed #cbd9ee;border-radius:14px;padding:12px;margin:12px 0}.rtk-box{height:520px;border:2px solid #243b66;border-radius:18px;overflow:hidden;background:#101725;margin-top:12px}.rtk-box rtk-meeting{display:block;width:100%;height:100%}body.audio-role-student .teacher-only{display:none!important}body.audio-role-teacher .student-only{display:none!important}@media(max-width:760px){.audio-grid.two,.audio-grid.main{grid-template-columns:1fr}.audio-page-wrap{padding:8px}.audio-shell{padding:10px;border-radius:16px}.audio-brand-mini{align-items:flex-start}.audio-logo{width:58px;height:58px}.mic-meter-wrap{grid-template-columns:1fr}.audio-actions{align-items:stretch}.audio-actions button{flex:1}.audio-student-row{flex-direction:column;align-items:stretch}.mini{margin:4px 4px 0 0}.rtk-box{height:430px}}
.button-like{display:inline-block;border-radius:12px;background:#215aa8;color:#fff;text-decoration:none;font-weight:800;padding:11px 14px}

/* v2.3.2 Real Voice Control Hotfix: keep RealtimeKit as an invisible audio engine, never as a visible page overlay. */
.voice-control-card{border:2px solid #b7e4c7;background:linear-gradient(180deg,#f6fff9,#ffffff)}
.voice-box-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0}
.voice-box-grid>div{background:#f7fbff;border:1px solid #d9e6f8;border-radius:14px;padding:12px;min-height:72px}
.voice-label{display:block;color:#607086;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.03em;margin-bottom:6px}
.voice-box-grid b{font-size:18px;color:#0f172a}
.student-line{line-height:1.45}.student-actions{white-space:nowrap}.realtime-status-card{grid-column:1 / -1}.internal-voice-controls{position:absolute!important;left:-9999px!important;top:auto!important;width:1px!important;height:1px!important;overflow:hidden!important;opacity:0!important;pointer-events:none!important}.rtk-engine{position:fixed!important;left:-9999px!important;bottom:0!important;width:1px!important;height:1px!important;overflow:hidden!important;opacity:.01!important;pointer-events:none!important;z-index:-1!important}.rtk-engine rtk-meeting{display:block!important;width:1px!important;height:1px!important;min-width:1px!important;min-height:1px!important}.student-audio-simple .big-buttons button{min-width:160px}
@media(max-width:760px){.voice-box-grid{grid-template-columns:1fr}.student-actions{white-space:normal}.realtime-status-card{grid-column:auto}}


/* v2.3.4 Classroom Voice Stability Fix — fresh meetings, safer reconnect, and mobile voice control refinements. */
.classroom-voice-card,.classroom-student-voice-card{background:#fff;border:2px solid #b7e4c7;border-radius:18px;padding:14px;box-shadow:0 8px 24px rgba(20,40,80,.06);margin-bottom:14px}
.classroom-voice-card h3,.classroom-student-voice-card h3{margin-top:0;color:#0f3f2d}
.compact-voice-grid{grid-template-columns:1fr!important;gap:8px;margin:8px 0}
.compact-voice-grid>div{min-height:auto;padding:9px 10px}
.classroom-voice-actions{margin:10px 0}.classroom-voice-actions button{border-radius:12px;font-weight:900}
.classroom-voice-card .ready-summary{font-size:13px;line-height:1.35;margin-top:10px}.classroom-voice-card .audio-student-row{padding:8px}.classroom-voice-card .student-line{font-size:13px}.classroom-voice-card .student-actions{display:flex;gap:5px;flex-wrap:wrap}.classroom-voice-card .mini{margin:0;padding:7px 9px}
.classroom-student-voice-card{margin:8px 0 12px;background:linear-gradient(180deg,#f6fff9,#ffffff)}.classroom-student-voice-card .realtime-status,.classroom-student-voice-card .student-mic-status{margin:8px 0}.classroom-student-voice-card .big-buttons button{min-width:135px}
.side-panel .classroom-voice-card{margin-top:0}.rtk-engine{position:fixed!important;left:-9999px!important;bottom:0!important;width:1px!important;height:1px!important;overflow:hidden!important;opacity:.01!important;pointer-events:none!important;z-index:-1!important}.rtk-engine rtk-meeting{display:block!important;width:1px!important;height:1px!important;min-width:1px!important;min-height:1px!important}
@media(max-width:760px){.classroom-student-voice-card{padding:10px;border-radius:14px}.classroom-student-voice-card .big-buttons button{width:100%;min-width:0}.classroom-voice-card .audio-student-row{align-items:stretch}.classroom-voice-card .student-actions button{flex:1}}


/* v2.3.4 mobile voice controls: avoid cramped voice buttons on student phones. */
@media (max-width: 680px) {
  .classroom-voice-card .big-buttons,
  .student-voice-card .big-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .classroom-voice-card .big-buttons button,
  .student-voice-card .big-buttons button {
    width: 100%;
    min-height: 52px;
    white-space: normal;
  }
}


/* v2.3.4b Student Voice Guidance + readability fixes */
@media (min-width: 1101px) {
  .workspace{grid-template-columns:190px minmax(0,1fr) 370px;}
}
@media (min-width: 761px) and (max-width: 1100px) {
  .workspace{grid-template-columns:145px minmax(0,1fr) 330px;}
}
.teacher-textarea,
#quickQuestionInput,
#teacherMsgInput{
  font-size:17px;
  line-height:1.55;
  min-height:96px;
}
.answer-box{
  font-size:18px;
  line-height:1.45;
}
.answer-box .quick-question-title{
  font-size:20px;
}
#quickTextQuestion{
  display:block;
  font-size:20px;
  line-height:1.5;
  margin:8px 0;
}
#textAnswer{
  font-size:18px;
  line-height:1.55;
  min-height:96px;
}
.join-card p{
  font-size:17px;
  line-height:1.45;
  color:#334155;
}
.voice-tip{
  margin:8px 0 6px;
  font-size:14px;
  font-weight:800;
  color:#31577a;
  background:#eff6ff;
  border:1px solid #dbeafe;
  border-radius:12px;
  padding:8px 10px;
}
.classroom-voice-card{
  padding:16px;
}
.classroom-voice-card .audio-student-row{
  display:block;
  padding:10px;
}
.classroom-voice-card .student-line{
  font-size:14px;
  overflow-wrap:anywhere;
}
.classroom-voice-card .student-actions{
  margin-top:8px;
}
.classroom-voice-card .ready-summary{
  font-size:14px;
  padding:10px;
}
.classroom-student-voice-card .big-buttons{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.classroom-student-voice-card .big-buttons button{
  min-width:0;
  width:100%;
  min-height:58px;
  white-space:normal;
  line-height:1.2;
}
.classroom-student-voice-card #classroomJoinVoiceStudentBtn,
.classroom-student-voice-card #classroomRaiseHandAudioBtn{
  grid-column:1 / -1;
}
@media (max-width: 760px) {
  .classroom-student-voice-card .big-buttons{
    grid-template-columns:1fr 1fr;
  }
  .classroom-student-voice-card #classroomJoinVoiceStudentBtn,
  .classroom-student-voice-card #classroomRaiseHandAudioBtn{
    grid-column:1 / -1;
  }
  .classroom-student-voice-card .big-buttons button{
    font-size:18px;
    min-height:56px;
  }
  #quickTextQuestion{font-size:21px;}
  #textAnswer{font-size:18px;}
}

/* v2.3.4c Student Room Mobile/iPad UI Polish — student-first layout without changing voice logic. */
.student-layout{
  grid-template-columns:minmax(0,1fr);
  gap:12px;
  padding:12px;
}
.student-status-panel{
  display:none;
}
.student-room-polish{
  min-width:0;
}
.student-welcome-card{
  display:flex;
  align-items:center;
  gap:12px;
  background:linear-gradient(135deg,#ffffff,#eef7ff 55%,#f6fff5);
  border:1px solid #cfe4ff;
  border-radius:20px;
  padding:12px 14px;
  margin-bottom:12px;
  box-shadow:0 10px 28px rgba(15,23,42,.08);
}
.student-welcome-logo{
  width:54px;
  height:54px;
  object-fit:contain;
  flex:0 0 auto;
}
.student-platform{
  display:inline-flex;
  align-items:center;
  width:max-content;
  background:#071126;
  color:#fff;
  border-radius:999px;
  padding:5px 12px;
  font-weight:900;
  font-size:13px;
  margin-bottom:4px;
}
.student-welcome-card h2{
  margin:0;
  font-size:clamp(20px,3vw,30px);
  color:#071126;
  line-height:1.1;
}
.student-welcome-card p{
  margin:4px 0 0;
  color:#31577a;
  font-size:15px;
  line-height:1.35;
}
.student-content-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(330px,400px);
  gap:14px;
  align-items:start;
}
.student-board-column,
.student-tools-column{
  min-width:0;
}
.student-tools-column{
  display:flex;
  flex-direction:column;
  gap:12px;
  position:sticky;
  top:70px;
  max-height:calc(100vh - 84px);
  overflow:auto;
  padding-right:2px;
}
.student-message-card{
  margin:0;
  border:1px solid #fed7aa;
  border-radius:18px;
  background:linear-gradient(180deg,#fff7ed,#fff);
  box-shadow:0 8px 20px rgba(124,45,18,.08);
  font-size:18px;
  line-height:1.45;
}
.student-pretty-card{
  margin:0;
  border-radius:22px;
  border:2px solid #b7e4c7;
  background:linear-gradient(180deg,#f2fff7,#ffffff);
  box-shadow:0 12px 30px rgba(20,83,45,.09);
}
.student-pretty-card h3,
.student-question-card .quick-question-title,
.student-hand-card h3{
  color:#073b2a;
  font-size:22px;
  margin:0 0 10px;
}
.student-pretty-card .realtime-status,
.student-pretty-card .student-mic-status{
  border-radius:16px;
  font-size:16px;
  line-height:1.45;
  padding:12px;
}
.student-pretty-card .mini-note{
  font-size:14px;
  line-height:1.45;
}
.student-pretty-card .classroom-voice-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.student-pretty-card .classroom-voice-actions button{
  width:100%;
  min-height:58px;
  border-radius:16px;
  font-size:16px;
  line-height:1.2;
  padding:10px;
  box-shadow:0 7px 14px rgba(15,23,42,.08);
}
.student-pretty-card #classroomJoinVoiceStudentBtn,
.student-pretty-card #classroomRaiseHandAudioBtn{
  grid-column:1 / -1;
}
.student-question-card{
  margin:0;
  border-radius:22px;
  border:2px solid #bfdbfe;
  background:linear-gradient(180deg,#f8fbff,#ffffff);
  box-shadow:0 12px 28px rgba(30,64,175,.09);
}
.student-question-card #quickTextQuestion{
  font-size:22px;
  color:#0f172a;
  background:#fff7ed;
  border:1px solid #fed7aa;
  border-radius:14px;
  padding:10px 12px;
}
.student-question-card #textAnswer{
  font-size:19px;
  min-height:118px;
  border-radius:16px;
}
.student-question-card .answer-actions{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
}
.student-hand-card{
  background:#ffffff;
  border:1px solid #dbeafe;
  border-radius:20px;
  padding:14px;
  box-shadow:0 10px 24px rgba(15,23,42,.07);
}
.student-hand-actions{
  justify-content:stretch;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.student-hand-actions button{
  width:100%;
  min-height:52px;
  border-radius:15px;
}
.student-board-column .lesson-strip{
  margin-bottom:10px;
}
.student-board-column .workspace-card{
  box-shadow:0 10px 28px rgba(15,23,42,.06);
}
@media (max-width: 900px){
  .student-layout{padding:8px;}
  .student-content-grid{
    display:flex;
    flex-direction:column;
  }
  .student-tools-column{
    order:1;
    position:static;
    max-height:none;
    overflow:visible;
  }
  .student-board-column{
    order:2;
  }
  .student-welcome-card{
    margin-bottom:10px;
  }
}
@media (max-width: 560px){
  .student-welcome-card{
    align-items:flex-start;
    padding:10px;
    gap:10px;
  }
  .student-welcome-logo{
    width:44px;
    height:44px;
  }
  .student-platform{
    font-size:12px;
    padding:4px 10px;
  }
  .student-welcome-card p{
    font-size:14px;
  }
  .student-pretty-card,
  .student-question-card,
  .student-hand-card{
    border-radius:18px;
    padding:12px;
  }
  .student-pretty-card .classroom-voice-actions{
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  .student-pretty-card .classroom-voice-actions button{
    font-size:15px;
    min-height:54px;
    padding:9px 8px;
  }
  .student-pretty-card #classroomJoinVoiceStudentBtn,
  .student-pretty-card #classroomRaiseHandAudioBtn{
    grid-column:1 / -1;
    min-height:58px;
    font-size:17px;
  }
  .student-message-card{
    font-size:17px;
    padding:12px;
  }
  .student-question-card #quickTextQuestion{
    font-size:20px;
  }
  .student-question-card #textAnswer{
    font-size:18px;
  }
  .student-hand-actions{
    grid-template-columns:1fr;
  }
}


/* v2.3.4d Student Branding + Mobile Board Fix */
.student-brand-hero{
  display:grid;
  grid-template-columns:minmax(250px,360px) minmax(0,1fr);
  align-items:center;
  gap:22px;
  min-height:118px;
  background:linear-gradient(90deg,#ffffff 0%,#f3fbff 46%,#f2fff7 100%);
  border:1px solid #bfdbfe;
}
.student-brand-left{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.student-brand-hero .student-welcome-logo{
  width:72px;
  height:72px;
}
.student-slogan{
  color:#ea580c;
  font-weight:1000;
  letter-spacing:.12em;
  font-size:14px;
  text-transform:uppercase;
  white-space:nowrap;
}
.student-brand-hero .student-platform{
  font-size:18px;
  padding:6px 14px;
  margin-bottom:6px;
}
.student-brand-hero h2{
  font-size:clamp(24px,3.2vw,36px);
}
.student-brand-hero p{
  font-size:16px;
  color:#24415f;
}
.student-voice-reminder{
  margin-top:6px!important;
  color:#0f3f2d!important;
}
.scm-program-credit{
  text-align:center;
  color:#37506b;
  font-size:13px;
  line-height:1.45;
  font-weight:800;
  margin:8px auto 0;
  padding:8px 10px;
  border-radius:14px;
  background:linear-gradient(90deg,#ffffff,#f8fafc);
  border:1px solid #dbeafe;
}
.teacher-credit-main{max-width:760px;}
.student-credit{max-width:760px;}
.scm-side-credit{
  margin:14px 0 6px;
  padding:12px;
  border-radius:16px;
  background:#f8fafc;
  border:1px solid #dbeafe;
  color:#0f172a;
  font-size:13px;
  line-height:1.4;
  font-weight:900;
  text-align:center;
}
.scm-side-credit span{color:#475569;font-size:12px;font-weight:800;}
@media(max-width:900px){
  .student-brand-hero{
    grid-template-columns:1fr;
    gap:10px;
  }
  .student-brand-left{justify-content:flex-start;}
}
@media(max-width:560px){
  html,body{overflow-x:hidden;}
  .student-layout{width:100%;max-width:100vw;overflow-x:hidden;}
  .student-brand-hero{
    min-height:auto;
    padding:10px 12px;
  }
  .student-brand-hero .student-welcome-logo{
    width:50px;
    height:50px;
  }
  .student-brand-hero .student-platform{
    font-size:13px;
    padding:4px 10px;
  }
  .student-slogan{
    font-size:10px;
    letter-spacing:.08em;
  }
  .student-brand-hero h2{font-size:22px;}
  .student-brand-hero p{font-size:13px;line-height:1.3;}
  .student-board-column .workspace-card{
    padding:3px;
    overflow:hidden;
    max-width:100%;
  }
  .student-board-column .activity-workspace{
    overflow:hidden;
    max-width:100%;
  }
  .student-board-column .knight-board-row{
    padding-left:0;
    padding-right:0;
    justify-content:center;
    overflow:hidden;
  }
  .student-board-column .board-wrap{
    max-width:calc(100vw - 28px);
  }
  :root{--board:calc(100vw - 72px);}
  .scm-program-credit{font-size:11px;padding:7px;margin-top:6px;}
}


/* v2.3.4e Teacher Note + Student Welcome Spacing + Mobile Board Centering */
.challenge-short-note{
  text-align:center;
  font-size:13px;
  font-weight:900;
  color:#334155;
  background:#f8fafc;
  border:1px solid #dbeafe;
  border-radius:12px;
  padding:8px 10px;
  margin:10px 0 6px;
}
.teacher-challenge-credit{
  max-width:760px;
  margin-top:8px;
  font-size:12px;
}
.student-brand-hero{
  grid-template-columns:minmax(260px,360px) minmax(260px,1.1fr) minmax(260px,.9fr);
  gap:34px;
  padding:16px 22px;
  background:
    radial-gradient(circle at 12% 20%, rgba(255,255,255,.92), rgba(255,255,255,0) 34%),
    linear-gradient(100deg,#ffffff 0%,#eef8ff 43%,#f3fff6 100%);
  border-color:#b9dcff;
}
.student-brand-left{
  padding-right:18px;
  border-right:1px solid rgba(148,163,184,.28);
}
.student-welcome-text{
  padding-left:4px;
  min-width:0;
}
.student-motivation-text{
  align-self:stretch;
  display:flex;
  flex-direction:column;
  justify-content:center;
  border-radius:18px;
  padding:12px 16px;
  background:rgba(255,255,255,.62);
  border:1px solid rgba(186,230,253,.72);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75);
}
.student-motivation-text p{
  margin:0 0 5px;
  color:#24415f;
  font-size:15px;
  line-height:1.35;
}
.student-motivation-text p:last-child{margin-bottom:0;}
.student-motivation-text b{color:#0b3b2e;}
@media(max-width:1100px){
  .student-brand-hero{
    grid-template-columns:minmax(240px,330px) minmax(0,1fr);
    gap:20px;
  }
  .student-motivation-text{
    grid-column:1 / -1;
  }
}
@media(max-width:900px){
  .student-brand-hero{
    grid-template-columns:1fr;
    gap:12px;
    padding:14px;
  }
  .student-brand-left{
    border-right:0;
    border-bottom:1px solid rgba(148,163,184,.25);
    padding:0 0 10px;
  }
  .student-welcome-text{padding-left:0;}
  .student-motivation-text{padding:10px 12px;}
}
@media(max-width:560px){
  .student-brand-hero{
    background:linear-gradient(150deg,#ffffff 0%,#f1f9ff 50%,#f4fff7 100%);
  }
  .student-motivation-text{display:none;}
  .student-board-column .knight-core{
    align-items:center;
  }
  .student-board-column .knight-board-row{
    width:100%;
    justify-content:center;
    align-items:flex-start;
    overflow:hidden;
    padding-left:0;
    padding-right:0;
  }
  .student-board-column .board-wrap{
    margin-left:auto;
    margin-right:auto;
    max-width:100%;
  }
  :root{--board:min(420px, calc(100vw - 92px));}
}
@media(max-width:390px){
  :root{--board:calc(100vw - 104px);}
}


/* v2.3.4f Teacher Credit + Student Welcome Font + Mobile Board Centering */
.student-brand-hero{
  column-gap:44px;
}
.student-brand-hero .student-welcome-text{
  padding-left:18px;
}
.student-motivation-text{
  background:linear-gradient(135deg,rgba(255,255,255,.82),rgba(239,249,255,.9),rgba(243,255,247,.86));
}
.student-motivation-text .student-motivation-title{
  font-size:24px;
  line-height:1.15;
  font-weight:1000;
  color:#071126;
  margin-bottom:8px;
}
.student-motivation-text .student-motivation-line{
  font-size:18px;
  line-height:1.4;
  font-weight:800;
  color:#24415f;
}
.teacher-credit-main{display:none!important;}
@media(max-width:1100px){
  .student-brand-hero .student-welcome-text{padding-left:0;}
  .student-motivation-text .student-motivation-title{font-size:22px;}
  .student-motivation-text .student-motivation-line{font-size:17px;}
}
@media(max-width:560px){
  .student-board-column .workspace-card{
    padding:4px 0;
    display:flex;
    justify-content:center;
    overflow:hidden;
  }
  .student-board-column .activity-workspace{
    width:100%;
    display:flex;
    justify-content:center;
    overflow:hidden;
  }
  .student-board-column .knight-core{
    width:100%;
    max-width:100%;
    align-items:center;
  }
  .student-board-column .knight-board-row{
    justify-content:center;
    width:100%;
    overflow:hidden;
    padding-left:0;
    padding-right:0;
  }
  .student-board-column .board-wrap{
    grid-template-columns:20px var(--board);
    margin-left:auto;
    margin-right:auto;
    transform:translateX(-10px);
  }
  .student-board-column .board{
    border-width:3px;
  }
  .student-board-column .rank,
  .student-board-column .file{font-size:14px;}
  :root{--board:min(340px, calc(100vw - 102px));}
}
@media(max-width:390px){
  :root{--board:calc(100vw - 112px);}
  .student-board-column .board-wrap{transform:translateX(-8px);}
}

/* v2.4.1 Queen Number Quest LIVE */
.activity[data-activity="queen-number-quest-live"]{background:#f3e8ff;color:#4c1d95;border:1px solid #d8b4fe}
.activity[data-activity="queen-number-quest-live"].active{background:linear-gradient(135deg,#7c3aed,#2563eb);color:#fff;border-color:#7c3aed}
.queen-core{background:linear-gradient(135deg,#ffffff 0%,#fbf7ff 45%,#eff6ff 100%)}
.queen-target{border-color:#a855f7;background:#faf5ff}
.queen-target b{color:#7c3aed}
.queen-piece{color:#fffbe8;text-shadow:0 0 3px #7c2d12,0 0 12px #a855f7,0 0 20px #fbbf24,0 4px 5px #0008}
.queen-board{border-color:#4c1d95;box-shadow:0 6px 16px #0002,0 0 0 2px rgba(168,85,247,.18)}
/* v2.5.0 Rook Number Quest LIVE */
.activity[data-activity="rook-number-quest-live"]{background:#dcfce7;color:#14532d;border:1px solid #86efac}
.activity[data-activity="rook-number-quest-live"].active{background:linear-gradient(135deg,#16a34a,#2563eb);color:#fff;border-color:#16a34a}
.rook-core{background:linear-gradient(135deg,#ffffff 0%,#f0fdf4 45%,#eff6ff 100%)}
.rook-target{border-color:#22c55e;background:#f0fdf4}
.rook-target b{color:#16a34a}
.rook-piece{color:#ffffff;text-shadow:0 0 3px #14532d,0 0 12px #22c55e,0 0 20px #38bdf8,0 4px 5px #0008}
.rook-board{border-color:#14532d;box-shadow:0 6px 16px #0002,0 0 0 2px rgba(34,197,94,.18)}
.activity[data-activity="bishop-number-quest-live"]{background:#ede9fe;color:#4c1d95;border:1px solid #c4b5fd}
.activity[data-activity="bishop-number-quest-live"].active{background:linear-gradient(135deg,#7c3aed,#0ea5e9);color:#fff;border-color:#7c3aed}
.bishop-core{background:linear-gradient(135deg,#ffffff 0%,#f5f3ff 45%,#eff6ff 100%)}
.bishop-target{border-color:#8b5cf6;background:#f5f3ff}
.bishop-target b{color:#7c3aed}
.bishop-piece{color:#ffffff;text-shadow:0 0 3px #312e81,0 0 12px #8b5cf6,0 0 20px #38bdf8,0 4px 5px #0008}
.bishop-board{border-color:#4c1d95;box-shadow:0 6px 16px #0002,0 0 0 2px rgba(139,92,246,.18)}



/* v2.4.2 Queen LIVE Classroom Fixes: active students, board demo, mobile-safe board, multi-mic UI */
.participant-row-tools{
  align-items:flex-start;
}
.participant-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.participant-actions .mini,
.audio-student-row .mini{
  font-size:12px;
  padding:6px 8px;
  border-radius:9px;
  box-shadow:none;
}
.demo-pill{
  display:inline-block;
  margin-left:4px;
  padding:3px 7px;
  border-radius:999px;
  background:#ede9fe;
  color:#5b21b6;
  font-size:11px;
  font-weight:1000;
}
.ready-summary{
  margin-top:8px;
}
#classroomRevokeAllMicsBtn{
  min-width:140px;
}
.student-play-actions{
  display:flex;
  justify-content:center;
  padding:0 8px 8px;
}
@media(max-width:560px){
  html,body{max-width:100vw;overflow-x:hidden!important;}
  .student-layout,
  .student-main,
  .student-content-grid,
  .student-board-column,
  .student-board-column .workspace-card,
  .student-board-column .activity-workspace,
  .student-board-column .knight-core{
    width:100%!important;
    max-width:100vw!important;
    overflow-x:hidden!important;
    box-sizing:border-box!important;
  }
  .student-board-column .workspace-card{
    padding:4px 0!important;
  }
  .student-board-column .activity-workspace{
    display:block!important;
    margin:0 auto!important;
  }
  .student-board-column .knight-board-row{
    width:100%!important;
    max-width:100%!important;
    display:flex!important;
    justify-content:center!important;
    align-items:flex-start!important;
    overflow:hidden!important;
    padding:8px 0 12px!important;
  }
  .student-board-column .board-wrap{
    grid-template-columns:20px var(--board)!important;
    grid-template-rows:var(--board) 24px!important;
    gap:4px!important;
    width:calc(24px + var(--board))!important;
    max-width:calc(100vw - 28px)!important;
    margin-left:auto!important;
    margin-right:auto!important;
    transform:none!important;
  }
  .student-board-column .board{
    width:var(--board)!important;
    height:var(--board)!important;
  }
  .student-board-column .rank,
  .student-board-column .file{font-size:13px!important;}
  .student-board-column .coord{font-size:8px!important;}
  :root{--board:min(322px, calc(100dvw - 76px));}
  .student-credit{
    max-width:calc(100vw - 20px)!important;
    overflow-wrap:anywhere;
    font-size:12px!important;
  }
}
@media(max-width:390px){
  :root{--board:min(300px, calc(100dvw - 72px));}
}
@media(max-width:340px){
  :root{--board:min(270px, calc(100dvw - 68px));}
}

/* v2.4.2b: keep lesson/demo banner below the score boxes on mobile */
@media(max-width:760px){
  .lesson-status{
    position:static!important;
    transform:none!important;
    margin:6px auto 10px!important;
    display:inline-block!important;
    white-space:normal!important;
    text-align:center!important;
    max-width:94vw!important;
  }
}


/* v2.5.1 Rook Visual & Question Polish — ROOK ONLY */
.rook-core{
  background:
    radial-gradient(circle at 50% -18%, rgba(168,255,74,.20), transparent 32%),
    linear-gradient(135deg,#ffffff 0%,#f1fff4 45%,#edf7ff 100%)!important;
}
.rook-core .rook-top{padding-top:12px}
.rook-core .stat-card{
  background:linear-gradient(180deg,#fff9d6,#ffe79a);
  border:1px solid #f6d66c;
  box-shadow:0 7px 18px rgba(15,23,42,.10);
}
.rook-core .rook-target{
  background:linear-gradient(180deg,#f7fff3,#e9ffef);
  border:2px solid #22c55e;
  box-shadow:0 7px 18px rgba(34,197,94,.12);
}
.rook-core .rook-target b{color:#15803d}
.rook-core .question-prompt{
  background:linear-gradient(180deg,#ffffff,#eef8ff);
  border-color:#bfdbfe;
  box-shadow:0 6px 16px rgba(15,23,42,.07);
}
.rook-board{
  border:4px solid #14532d!important;
  border-radius:20px!important;
  box-shadow:0 8px 0 #21482d,0 14px 30px rgba(20,83,45,.18),0 0 0 2px rgba(34,197,94,.20)!important;
}
.rook-board .sq.light{background:linear-gradient(135deg,#e7f2ff,#cfe1f6)!important}
.rook-board .sq.dark{background:linear-gradient(135deg,#4490f4,#2576d8)!important}
.rook-board .coord{
  color:#15334f;
  opacity:.56;
  font-weight:1000;
}
.rook-board .num.rook-number{
  width:54%;
  height:54%;
  border-radius:18px;
  background:linear-gradient(180deg,#fff07a 0%,#ffb02e 42%,#f15a24 100%);
  border:4px solid #fff7b0;
  box-shadow:0 5px 0 #a84c09,0 0 14px rgba(255,255,255,.45),0 8px 14px rgba(15,23,42,.20);
  text-shadow:0 2px 2px rgba(0,0,0,.36);
  transform:translateZ(0);
}
.rook-board .num.rook-number.blue{
  background:linear-gradient(180deg,#e2f2ff 0%,#4ea5ff 50%,#1f6ed4 100%);
  box-shadow:0 5px 0 #124d96,0 0 14px rgba(255,255,255,.45),0 8px 14px rgba(15,23,42,.20);
}
.rook-board .num.rook-number span{
  display:block;
  transform:translateY(-1px);
}
.rook-board .rook-piece{
  color:#ffffff;
  font-family:"Segoe UI Symbol","Noto Sans Symbols","DejaVu Sans",Arial,sans-serif;
  text-shadow:0 0 2px #123,0 0 7px #00d9ff,0 0 14px #00a2ff,0 4px 5px rgba(0,0,0,.55)!important;
  filter:drop-shadow(0 0 8px rgba(0,220,255,.95)) drop-shadow(0 6px 4px rgba(0,0,0,.35));
  animation:scmRookGlow 1.6s ease-in-out infinite;
}
@keyframes scmRookGlow{
  0%,100%{filter:drop-shadow(0 0 7px rgba(0,220,255,.80)) drop-shadow(0 6px 4px rgba(0,0,0,.35))}
  50%{filter:drop-shadow(0 0 16px rgba(255,255,255,1)) drop-shadow(0 0 20px rgba(0,220,255,1)) drop-shadow(0 6px 4px rgba(0,0,0,.35))}
}
.rook-board .sq.legal::after{
  background:rgba(168,255,74,.82);
  box-shadow:0 0 12px rgba(168,255,74,.95),inset 0 0 8px rgba(255,255,255,.85);
}
.rook-core .result-bar .stat-card{
  background:linear-gradient(180deg,#fff9d6,#ffe79a);
  border-color:#f6d66c;
}
.rook-core .lesson-status{
  border-color:#f59e0b;
  background:linear-gradient(180deg,#fffaf0,#fff7ed);
  box-shadow:0 5px 14px rgba(15,23,42,.08);
}
@media(max-width:760px){
  .rook-board .num.rook-number{border-width:3px;border-radius:13px}
  .rook-core .lesson-status{font-size:14px;padding:8px 12px}
}


/* v2.6.0 Bishop Number Quest LIVE — BISHOP ONLY */
.bishop-core{
  background:
    radial-gradient(circle at 50% -18%, rgba(196,181,253,.24), transparent 32%),
    linear-gradient(135deg,#ffffff 0%,#f5f3ff 45%,#edf7ff 100%)!important;
}
.bishop-core .bishop-top{padding-top:12px}
.bishop-core .stat-card{
  background:linear-gradient(180deg,#fff9d6,#ffe79a);
  border:1px solid #f6d66c;
  box-shadow:0 7px 18px rgba(15,23,42,.10);
}
.bishop-core .bishop-target{
  background:linear-gradient(180deg,#fbf7ff,#f1ecff);
  border:2px solid #8b5cf6;
  box-shadow:0 7px 18px rgba(139,92,246,.12);
}
.bishop-core .bishop-target b{color:#7c3aed}
.bishop-core .question-prompt{
  background:linear-gradient(180deg,#ffffff,#eef8ff);
  border-color:#bfdbfe;
  box-shadow:0 6px 16px rgba(15,23,42,.07);
}
.bishop-board{
  border:4px solid #4c1d95!important;
  border-radius:20px!important;
  box-shadow:0 8px 0 #312e81,0 14px 30px rgba(76,29,149,.18),0 0 0 2px rgba(139,92,246,.22)!important;
}
.bishop-board .sq.light{background:linear-gradient(135deg,#e7f2ff,#cfe1f6)!important}
.bishop-board .sq.dark{background:linear-gradient(135deg,#4490f4,#2576d8)!important}
.bishop-board .coord{
  color:#15334f;
  opacity:.56;
  font-weight:1000;
}
.bishop-board .num.bishop-number{
  width:54%;
  height:54%;
  border-radius:18px;
  background:linear-gradient(180deg,#fff07a 0%,#ffb02e 42%,#f15a24 100%);
  border:4px solid #fff7b0;
  box-shadow:0 5px 0 #a84c09,0 0 14px rgba(255,255,255,.45),0 8px 14px rgba(15,23,42,.20);
  text-shadow:0 2px 2px rgba(0,0,0,.36);
  transform:translateZ(0);
}
.bishop-board .num.bishop-number.blue{
  background:linear-gradient(180deg,#e2f2ff 0%,#4ea5ff 50%,#1f6ed4 100%);
  box-shadow:0 5px 0 #124d96,0 0 14px rgba(255,255,255,.45),0 8px 14px rgba(15,23,42,.20);
}
.bishop-board .num.bishop-number span{
  display:block;
  transform:translateY(-1px);
}
.bishop-board .bishop-piece{
  color:#ffffff;
  font-family:"Segoe UI Symbol","Noto Sans Symbols","DejaVu Sans",Arial,sans-serif;
  text-shadow:0 0 2px #123,0 0 7px #a78bfa,0 0 14px #38bdf8,0 4px 5px rgba(0,0,0,.55)!important;
  filter:drop-shadow(0 0 8px rgba(167,139,250,.95)) drop-shadow(0 6px 4px rgba(0,0,0,.35));
  animation:scmBishopGlow 1.6s ease-in-out infinite;
}
@keyframes scmBishopGlow{
  0%,100%{filter:drop-shadow(0 0 7px rgba(167,139,250,.80)) drop-shadow(0 6px 4px rgba(0,0,0,.35))}
  50%{filter:drop-shadow(0 0 16px rgba(255,255,255,1)) drop-shadow(0 0 20px rgba(139,92,246,1)) drop-shadow(0 6px 4px rgba(0,0,0,.35))}
}
.bishop-board .sq.legal::after{
  background:rgba(196,181,253,.84);
  box-shadow:0 0 12px rgba(196,181,253,.95),inset 0 0 8px rgba(255,255,255,.85);
}
.bishop-core .result-bar .stat-card{
  background:linear-gradient(180deg,#fff9d6,#ffe79a);
  border-color:#f6d66c;
}
.bishop-core .lesson-status{
  border-color:#8b5cf6;
  background:linear-gradient(180deg,#fffaf0,#faf5ff);
  box-shadow:0 5px 14px rgba(15,23,42,.08);
}
@media(max-width:760px){
  .bishop-board .num.bishop-number{border-width:3px;border-radius:13px}
  .bishop-core .lesson-status{font-size:14px;padding:8px 12px}
}

/* SmartChessMath Live V1.0 — School Access Gate */
.scm-v1-home{background:radial-gradient(circle at 20% 0%,#e0f2fe 0,#eef3fb 42%,#f8fafc 100%)}
.scm-v1-card{max-width:1240px}
.scm-v1-hero{align-items:center}
.scm-v1-hero .lead{max-width:820px;font-size:21px;line-height:1.35;font-weight:800;color:#1e3a5f}
.scm-v1-hero .lead-sub{font-size:20px;color:#0369a1;font-weight:1000;margin-top:6px}
.scm-program-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:24px 0 8px}
.program-tile{border-radius:18px;padding:16px;min-height:122px;color:#0f172a;background:#fff;border:1px solid var(--line);box-shadow:0 8px 22px rgba(15,23,42,.05);display:flex;flex-direction:column;gap:10px;justify-content:space-between}
.program-tile b{font-size:18px;line-height:1.18}.program-tile span{font-size:14px;line-height:1.35;color:#334155;font-weight:800}
.program-tile.knight{border-color:#bfdbfe;background:linear-gradient(180deg,#eff6ff,#ffffff)}
.program-tile.queen{border-color:#e9d5ff;background:linear-gradient(180deg,#faf5ff,#ffffff)}
.program-tile.rook{border-color:#bbf7d0;background:linear-gradient(180deg,#f0fdf4,#ffffff)}
.program-tile.bishop{border-color:#fed7aa;background:linear-gradient(180deg,#fff7ed,#ffffff)}
.gate-grid{align-items:stretch}.login-box{border:2px solid #bfdbfe;background:linear-gradient(180deg,#ffffff,#f8fbff)}
.student-public-box{background:linear-gradient(180deg,#ffffff,#f8fafc)}
.subscription-note,.safe-note{margin-top:12px;font-size:13px;font-weight:900;color:#475569;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:12px;padding:10px;line-height:1.35}
.login-message{margin-top:12px;border-radius:12px;padding:10px 12px;font-weight:900;line-height:1.35}.login-message.error{background:#fff1f2;color:#9f1239;border:1px solid #fecdd3}.login-message.success{background:#f0fdf4;color:#166534;border:1px solid #bbf7d0}
.portal-session-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;background:linear-gradient(90deg,#071126,#0b3b74);color:#fff;border-radius:20px;padding:16px 18px;margin:28px 0 18px;box-shadow:0 10px 28px rgba(11,19,38,.18)}
.portal-session-bar span{color:#cde8ff;font-weight:800}.portal-actions{display:flex;gap:8px;flex-wrap:wrap}.teacher-portal-box{border:2px solid #bfdbfe}.teacher-tools-box{border:2px solid #b7e4c7}.admin-panel{margin-top:24px;border:2px solid #fbbf24;background:linear-gradient(180deg,#fffbeb,#ffffff)}
.admin-form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.admin-form-grid label{font-weight:900}.admin-form-grid input{margin-top:6px;width:100%;border:1px solid #cbd5e1;border-radius:12px;padding:12px 14px;background:#fff}
.schools-table-wrap{margin-top:16px;overflow:auto}.schools-table{width:100%;border-collapse:separate;border-spacing:0;border:1px solid #dbe5f4;border-radius:14px;overflow:hidden;background:white}.schools-table th{background:#0b1326;color:#fff;text-align:left;padding:10px}.schools-table td{border-top:1px solid #e5edf8;padding:10px;vertical-align:middle}.school-actions{display:flex;gap:6px;flex-wrap:wrap}.school-actions button{font-size:12px;padding:7px 9px}.account-active,.account-disabled{display:inline-block;border-radius:999px;padding:4px 9px;font-size:12px;font-weight:1000}.account-active{background:#dcfce7;color:#166534}.account-disabled{background:#fee2e2;color:#991b1b}
@media(max-width:960px){.scm-program-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-form-grid{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.scm-program-strip,.admin-form-grid{grid-template-columns:1fr}.portal-session-bar{display:block}.portal-actions{margin-top:12px}.program-tile{min-height:0}.scm-v1-hero .lead{font-size:17px}.scm-v1-hero .lead-sub{font-size:17px}}


/* SmartChessMath Live V1.0 — Access Gate Polish v2.7.1 */
.scm-v1-card{width:min(1180px,96vw);overflow:hidden}
.home-hero-brand{display:grid;grid-template-columns:120px minmax(0,1fr);gap:22px;align-items:center}
.home-logo{width:104px;height:104px;object-fit:contain}
.scm-v1-card h1{line-height:.98;letter-spacing:-.03em;margin-top:18px}
.scm-program-strip{position:relative;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:28px 0 6px;overflow:visible}
.program-strip-title{grid-column:1/-1;text-align:center;color:#0b3b74;font-size:20px;font-weight:1000;margin:0 0 2px}
.program-tile{min-width:0;min-height:116px;overflow:hidden;transform:none!important;filter:none!important;text-shadow:none!important;box-shadow:0 8px 22px rgba(15,23,42,.06)!important}
.program-tile b{display:block;white-space:normal;overflow-wrap:anywhere}.program-tile span{display:block;overflow-wrap:anywhere}
.login-box,.student-public-box,.teacher-portal-box,.teacher-tools-box{box-shadow:0 12px 28px rgba(15,23,42,.05)}
.portal-session-bar{margin-top:26px}.teacher-tools-grid{align-items:stretch}.teacher-tools-box .home-actions{margin-top:20px}.teacher-tools-box .button-like{font-size:16px;padding:13px 16px}
.admin-access-page .scm-program-strip,.admin-access-page .student-public-box{display:none!important}
.admin-access-page .gate-grid{grid-template-columns:minmax(320px,620px);justify-content:center}
.admin-access-page .home-card h1{font-size:clamp(34px,5vw,58px)}
.admin-panel-page .teacher-tools-grid{display:none!important}
.admin-panel-page #adminPanel{display:block!important;margin-top:22px}
.admin-panel-page .portal-session-bar{margin-bottom:18px}
.school-portal-page #adminPanel{display:none!important}
.admin-panel h2{font-size:30px}.admin-form-grid{align-items:end}.admin-form-grid input{font-weight:800}
.home-footer{border-top:1px solid #dbe5f4;margin-top:28px;padding-top:16px;color:#31577a;font-size:13px;line-height:1.45}
@media(max-width:980px){.scm-program-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.home-hero-brand{grid-template-columns:90px minmax(0,1fr)}.home-logo{width:84px;height:84px}}
@media(max-width:760px){.home-wrap{padding:12px}.home-card{padding:20px;border-radius:22px}.home-hero-brand{grid-template-columns:1fr;text-align:left}.home-logo{width:82px;height:82px}.scm-program-strip{grid-template-columns:1fr}.program-strip-title{text-align:left}.home-grid{grid-template-columns:1fr;gap:16px}.portal-session-bar{border-radius:16px}.admin-access-page .gate-grid{grid-template-columns:1fr}.home-card h1{font-size:clamp(34px,11vw,52px)}}

/* SmartChessMath Live V1.0 — Clean School Login Layout v2.7.2 */
.clean-access-card{max-width:1060px!important;}
.clean-access-card .home-hero-brand{
  display:grid;
  grid-template-columns:120px minmax(0,1fr);
  gap:28px;
  align-items:center;
  margin-bottom:20px;
}
.clean-access-card .home-logo{
  width:110px;
  height:110px;
  object-fit:contain;
}
.clean-access-card h1{
  font-size:clamp(42px,5vw,68px);
  line-height:1.02;
  margin:18px 0 14px;
  letter-spacing:-.035em;
}
.clean-access-card .lead{
  max-width:820px;
  font-size:21px;
  line-height:1.38;
  color:#1e3a5f;
  font-weight:850;
}
.clean-access-card .lead-sub{
  max-width:850px;
  font-size:21px;
  color:#0369a1;
  font-weight:1000;
  margin-top:10px;
}
.clean-login-grid{
  grid-template-columns:minmax(320px,620px)!important;
  justify-content:center;
  margin-top:32px;
}
.clean-school-login{
  border:2px solid #bfdbfe!important;
  background:linear-gradient(180deg,#ffffff,#f8fbff)!important;
  box-shadow:0 18px 42px rgba(15,23,42,.08)!important;
  padding:28px!important;
}
.clean-school-login h2{font-size:30px!important;margin-bottom:12px!important;}
.clean-school-login p{color:#1e3a5f;font-weight:850;line-height:1.45;}
.clean-login-actions button{min-width:150px;font-size:16px;padding:12px 18px;}
.subscription-note{
  margin-top:14px;
  background:#f8fafc;
  border:1px dashed #cbd5e1;
  border-radius:14px;
  padding:12px 14px;
  color:#334155!important;
  font-size:13px;
  font-weight:850;
}
.admin-access-page .clean-access-card .home-hero-brand{margin-bottom:10px;}
.admin-access-page .clean-access-card h1{font-size:clamp(34px,5vw,58px);}
.admin-panel-page .clean-access-card .home-hero-brand,
.school-portal-page .clean-access-card .home-hero-brand{margin-bottom:10px;}
@media(max-width:760px){
  .clean-access-card{padding:22px!important;border-radius:22px!important;}
  .clean-access-card .home-hero-brand{grid-template-columns:1fr;gap:10px;text-align:left;}
  .clean-access-card .home-logo{width:86px;height:86px;}
  .clean-access-card h1{font-size:clamp(34px,11vw,52px);}
  .clean-access-card .lead{font-size:17px;}
  .clean-access-card .lead-sub{font-size:17px;}
  .clean-login-grid{grid-template-columns:1fr!important;margin-top:20px;}
  .clean-school-login{padding:20px!important;}
}

/* SmartChessMath Live V1.0 v2.7.3 — clean two-gate flow */
.school-portal-page .clean-access-card,
.admin-panel-page .clean-access-card{
  max-width:1120px!important;
}
.school-portal-page .home-footer,
.admin-panel-page .home-footer{
  margin-top:22px;
}
.compact-session-bar{
  margin-top:0!important;
  margin-bottom:18px!important;
}
.teacher-portal-shell{
  display:block;
}
.teacher-welcome-panel{
  border:1px solid #dbeafe;
  background:linear-gradient(135deg,#f8fbff,#ffffff);
  border-radius:22px;
  padding:22px 24px;
  margin:0 0 18px;
  box-shadow:0 12px 28px rgba(15,23,42,.05);
}
.teacher-welcome-panel h1{
  font-size:clamp(28px,4vw,44px)!important;
  line-height:1.08!important;
  margin:10px 0 8px!important;
  color:#0f172a;
}
.teacher-welcome-panel p{
  max-width:780px;
  color:#1e3a5f;
  font-weight:850;
  line-height:1.45;
  margin:0;
}
.teacher-main-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:22px;
  align-items:stretch;
}
.compact-teacher-card,
.compact-audio-card{
  min-height:0;
}
.compact-teacher-card h2,
.compact-audio-card h2{
  font-size:28px!important;
  margin-bottom:14px!important;
}
.compact-teacher-card p,
.compact-audio-card p{
  color:#1e3a5f;
  line-height:1.45;
  font-weight:850;
}
.teacher-entry-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.teacher-entry-actions button{
  margin-top:0;
}
@media(max-width:820px){
  .teacher-main-grid{grid-template-columns:1fr;}
  .teacher-welcome-panel{padding:18px;}
  .compact-session-bar{border-radius:16px;}
}
