/* BAY Classroom: visually primary, teacher-only projection of existing Classroom Live */
#bayClassroomBoard{margin:18px 0 20px;padding:clamp(12px,2.5vw,20px);border:1px solid #cedeed;border-radius:24px;background:linear-gradient(165deg,#f2f8ff,#fffbf3);color:#233950;box-shadow:0 10px 28px #19487616;overflow:hidden}
.bay-classroom-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.bay-classroom-head h3{font-size:clamp(22px,3vw,29px);margin:3px 0}
.bay-classroom-subtitle{margin:0;color:#697d91;font-size:13px}
.bay-classroom-count{padding:10px 16px;border-radius:17px;background:#fff;color:#a65210;font-weight:900;white-space:nowrap;box-shadow:0 3px 16px #d7af7035}
.bay-classroom-tools{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:16px 0}
.bay-tool{min-height:46px;border:1px solid #e0e7ed;border-radius:13px;padding:9px 15px;font:inherit;font-weight:800;font-size:13px;color:#284059;background:#fff;cursor:pointer}
.bay-tool:hover,.bay-tool:focus-visible{border-color:#2470c1}
.bay-tool-accent{background:#0b3d91;border-color:#0b3d91;color:#fff;box-shadow:0 6px 15px #0b3d9126}
.bay-tool.is-active{background:#e8f2ff;color:#124f9c;border-color:#72a6dd}
.bay-classroom-stage{min-height:118px;padding:18px;display:flex;justify-content:center;align-items:center;gap:20px;flex-wrap:wrap;background:#fff;border:2px dashed #f3c698;border-radius:20px;text-align:center}
.bay-stage-hint{font-weight:700;color:#906743}
.bay-classroom-stage>div{display:grid;gap:4px}
.bay-classroom-stage strong{font-size:clamp(23px,3.2vw,36px);line-height:1.45;color:#b75c16}
.bay-stage-spark{font-size:36px}
.bay-stage-again{min-height:44px;padding:8px 16px;background:#fbe5cb;color:#90450d;border:0;border-radius:12px;font:inherit;font-weight:800;cursor:pointer}
.bay-classroom-timer{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:15px 0;border-bottom:1px solid #f3debf}
.bay-classroom-timer>div:first-child{display:grid;gap:3px}.bay-classroom-timer small{font-size:11px;color:#7b8491}
.bay-timer-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.bay-timer-controls select{min-height:46px;border:1px solid #d7dde3;border-radius:12px;padding:8px;background:#fff;color:#243b55}
#bayClassroomClock{min-width:82px;font-variant-numeric:tabular-nums;font-weight:900;font-size:27px;color:#955015;text-align:center}
.bay-classroom-roster-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:18px 0 9px}
.bay-classroom-roster-head strong{font-size:17px}.bay-classroom-roster-head span{font-size:12px;color:#748090}
.bay-classroom-seats{display:grid;gap:clamp(7px,1.6vw,16px);position:relative;z-index:1;align-content:start;padding:14px clamp(9px,2vw,22px) 6px}
.bay-seat-rows{grid-template-columns:repeat(5,minmax(0,1fr))}
.bay-seat-groups{grid-template-columns:repeat(4,minmax(0,1fr))}
.bay-seat{min-width:0;display:flex;flex-direction:column;position:relative;border:1px solid transparent;border-radius:16px;background:transparent;overflow:visible}
.bay-seat.is-picked{border-color:#f3a04b;box-shadow:0 0 0 3px #ffb56b55;background:#fff3d1b0}
.bay-seat.is-selected{border-color:#236bb8;background:#edf5ffba}
.bay-seat.is-absent{opacity:.66}
.bay-seat-main{display:grid;justify-items:center;align-content:start;gap:3px;width:100%;min-height:155px;padding:7px 3px 9px;border:0;border-radius:14px;background:transparent;color:inherit;font:inherit;cursor:pointer;touch-action:pan-y}

.bay-seat-label{font-size:clamp(11px,1.45vw,14px);font-weight:800;text-align:center;overflow-wrap:anywhere;line-height:1.35;max-width:100%;padding:0 2px}
.bay-seat-main small{color:#62778a;font-size:10px}
.bay-classroom-teams{margin-top:14px}
.bay-classroom-teams:empty{display:none}
.bay-classroom-teams h4{font-size:16px;margin:10px 0}
.bay-classroom-teams h4 small{display:block;color:#68798a;font-size:11px;font-weight:400}
.bay-classroom-disclaimer{margin:14px 0 0;font-size:11px;line-height:1.6;color:#7a8490}
.classroom-advanced-details{margin-top:18px;border-top:1px solid #e8ebf2}
.classroom-advanced-details>summary{cursor:pointer;list-style:none;min-height:45px;padding:14px 0;font-weight:800;color:#536781}
.classroom-advanced-details>summary::-webkit-details-marker{display:none}
.classroom-advanced-details>summary::before{content:"▸ ";color:#dc7b29}
.classroom-advanced-details[open]>summary::before{content:"▾ "}
#bayClassroomBoard button:focus-visible,#bayClassroomBoard select:focus-visible{outline:3px solid #ec9b45;outline-offset:2px}
@media(max-width:760px){#bayClassroomBoard{padding:14px}.bay-seat-rows,.bay-seat-groups{grid-template-columns:repeat(3,minmax(0,1fr))}.bay-classroom-head{align-items:flex-start}.bay-classroom-tools{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.bay-classroom-head{gap:8px}.bay-classroom-count{padding:8px 10px;font-size:12px}.bay-classroom-tools{grid-template-columns:repeat(2,minmax(0,1fr))}.bay-seat-rows,.bay-seat-groups{grid-template-columns:repeat(3,minmax(0,1fr))}.bay-timer-controls{width:100%}.bay-timer-controls .bay-tool{flex:1}}
@media(prefers-reduced-motion:reduce){#bayClassroomBoard *{animation:none!important;transition:none!important}}
/* Classroom Live: celebration, local seating preference, and auditable session kudos */
.bay-board-reset-layout{min-height:44px;padding:7px 12px;border:1px solid #dce6ed;border-radius:11px;background:#fff;color:#40627f;font:inherit;font-size:12px;font-weight:800;cursor:pointer}
.bay-stage-rolling{display:grid;gap:5px;justify-items:center;min-width:min(100%,270px);animation:bay-draw-roll .22s ease-in-out infinite alternate}
.bay-stage-rolling span{color:#9b641b;font-size:12px;font-weight:850}
.bay-stage-rolling strong{font-size:clamp(20px,5vw,32px);color:#225fba;overflow-wrap:anywhere}
.bay-stage-winner{animation:bay-winner-pop .65s cubic-bezier(.2,.8,.2,1) both}
.bay-stage-spark{animation:bay-star-celebrate 1s ease-in-out both}
.bay-classroom-stage:has(.bay-stage-winner){border-color:#e5ae51;background:radial-gradient(circle at 18% 20%,#fff1c8 0,transparent 30%),radial-gradient(circle at 80% 90%,#e7f6ff 0,transparent 40%),#fff}
.bay-tool:disabled{opacity:.67;cursor:wait}
.bay-seat-mastery{padding:3px 5px 6px;color:#2c8060;font-size:11px;text-align:center;font-weight:800;overflow-wrap:anywhere}
.bay-board-reset-layout:focus-visible{outline:3px solid #e7a547;outline-offset:2px}
@keyframes bay-draw-roll{from{transform:translateY(-3px) scale(.99)}to{transform:translateY(3px) scale(1.02)}}
@keyframes bay-winner-pop{0%{opacity:.2;transform:scale(.78) translateY(12px)}65%{transform:scale(1.08) translateY(-2px)}100%{opacity:1;transform:scale(1) translateY(0)}}
@keyframes bay-star-celebrate{0%{opacity:.1;transform:rotate(-25deg) scale(.5)}65%{opacity:1;transform:rotate(15deg) scale(1.28)}100%{transform:rotate(0deg) scale(1)}}
@media(max-width:480px){.bay-classroom-roster-head{align-items:flex-start}.bay-board-reset-layout{width:100%}}
@media(prefers-reduced-motion:reduce){.bay-stage-rolling,.bay-stage-winner,.bay-stage-spark{animation:none}}

.bay-classroom-mode-hint{margin:7px 2px 2px;font-size:12px;color:#5e7790;font-weight:750}


/* Classroom board controls extend the existing presentation-only stylesheet. */
.bay-seat-main:focus-visible,.bay-seat-main:hover{outline:3px solid #176de5;outline-offset:-3px;border-radius:14px}
.bay-seat-stars{color:#955015;background:#fff7e5;padding:2px 6px;border-radius:8px;font-size:12px;font-weight:850}
.bay-seat-layout-controls{display:flex;gap:6px;flex-wrap:wrap}
.bay-seat-layout-controls[hidden],.bay-student-actions[hidden],#bayClassroomUndoKudos[hidden]{display:none!important}
.bay-seat-layout-controls .bay-tool{min-height:44px;padding:6px 9px;font-size:12px}
.bay-student-actions{display:grid;gap:10px;margin:12px 0 15px;padding:14px;border:1px solid #c7dcec;border-radius:16px;background:#f7fbff}
.bay-student-selected{display:flex;justify-content:space-between;align-items:center;gap:12px}
.bay-student-selected>div{display:grid;gap:2px}
.bay-student-selected small,.bay-student-notice{font-size:12px;color:#657d99;line-height:1.5}
.bay-student-selected strong{font-size:19px;color:#11325f;overflow-wrap:anywhere}
.bay-student-dismiss{min-width:44px;min-height:44px;border:1px solid #c7dcec;border-radius:12px;background:#fff;color:#11325f;cursor:pointer}
.bay-student-actions-list{display:flex;gap:8px;flex-wrap:wrap}
.bay-student-action{min-height:44px;border:1px solid #c7dcec;border-radius:12px;background:#fff;padding:8px 12px;color:#0b3d91;font:inherit;font-size:14px;font-weight:850;cursor:pointer}
.bay-student-action:first-child{border-color:#0b3d91;background:#0b3d91;color:#fff}
.bay-student-action:disabled{background:#edf0f4;border-color:#d7dde5;color:#657d99;opacity:.7;cursor:not-allowed}
.bay-student-notice{margin:0}
.bay-team-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.bay-team-group{min-width:0;padding:13px;border:2px solid #c7dcec;border-radius:15px;background:#fff}
.bay-team-group header{display:flex;justify-content:space-between;align-items:center;gap:8px}
.bay-team-group header strong{font-size:16px;overflow-wrap:anywhere}
.bay-team-group header span,.bay-team-group>small{font-size:12px;color:#536b82}
.bay-team-group ul{list-style:none;display:flex;flex-wrap:wrap;gap:6px;padding:0;margin:10px 0}
.bay-team-group li{padding:6px 9px;border-radius:10px;background:#f5faff;color:#11325f;font-size:13px;font-weight:700;overflow-wrap:anywhere}
.bay-team-red{border-color:#dc726d}.bay-team-blue{border-color:#176de5}.bay-team-green{border-color:#16855b}.bay-team-orange{border-color:#ff943f}.bay-team-purple{border-color:#9272c0}.bay-team-teal{border-color:#3798a9}
#bayClassroomBoard :is(.bay-student-action,.bay-student-dismiss):focus-visible{outline:3px solid #176de5;outline-offset:2px}
@media(max-width:359px){.bay-seat-rows,.bay-seat-groups{grid-template-columns:repeat(2,minmax(0,1fr))}.bay-team-grid{grid-template-columns:minmax(0,1fr)}.bay-seat-main{min-height:105px}}
@media(min-width:360px) and (max-width:480px){.bay-seat-label{font-size:12px}.bay-seat-avatar{width:39px;height:39px}}
@media(max-width:520px){.bay-team-grid{grid-template-columns:minmax(0,1fr)}.bay-student-actions-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}


/* Illustrated classroom built with local SVG + the existing accessible buttons. */
.bay-classroom-world{position:relative;overflow:hidden;border-radius:22px;border:2px solid #b9d1e7;background:linear-gradient(180deg,#cfeeff 0%,#e6f6ff 39%,#fff0d7 39.1%,#ffe6be 100%);isolation:isolate}
.bay-classroom-world::before{content:"";position:absolute;inset:38% 0 0;background:repeating-linear-gradient(0deg,#ffe5bc55 0,#ffe5bc55 38px,#d9b08322 39px,#d9b08322 40px);pointer-events:none}
.bay-classroom-wall{position:relative;height:150px;display:flex;align-items:center;justify-content:center;padding:12px;gap:18px;z-index:1}
.bay-classroom-window{width:clamp(48px,16%,118px);height:95px;border:8px solid #fdfbf5;border-radius:15px;background:linear-gradient(#8ed3ff 52%,#d4efff 52%);box-shadow:0 6px 0 #a8cde9,0 9px 16px #264d7430;display:grid;place-items:center;color:#fff;font-size:35px;position:relative}
.bay-classroom-window::after{content:"";position:absolute;inset:0 45%;background:#fdfbf5;box-shadow:0 0 0 1px #fff8}
.bay-classroom-chalkboard{flex:1;min-width:0;max-width:460px;height:122px;display:grid;align-content:center;justify-items:center;gap:2px;border:9px solid #c28b54;border-radius:14px;background:linear-gradient(145deg,#1b726e,#10524f);color:#fffbe9;box-shadow:0 9px 0 #b98a64,0 13px 18px #31546a45;text-align:center;text-shadow:0 1px 3px #1b484855}
.bay-classroom-chalkboard>span{font-size:11px;letter-spacing:.06em}
.bay-classroom-chalkboard>strong{font-size:clamp(18px,3vw,27px);line-height:1.35}
.bay-classroom-chalkboard>small{font-size:12px;color:#d2ffe8}
.bay-classroom-shelf{width:clamp(40px,11%,80px);display:flex;align-items:flex-end;justify-content:center;gap:3px;height:84px;color:#489c76;font-size:28px;border-bottom:12px solid #ad825d;text-shadow:0 2px 3px #fff}
.bay-classroom-floor{display:flex;justify-content:space-around;padding:2px 16px 10px;font-size:22px;position:relative;z-index:0;color:#fff2cb}
.bay-classroom-world .bay-seat{animation:bay-character-appear .35s ease-out both;animation-delay:calc(var(--student-index,0)*35ms)}
.bay-classroom-world .bay-seat-main:focus-visible,.bay-classroom-world .bay-seat-main:hover{outline:3px solid #1456b3;outline-offset:1px;background:#fff8ed96}
.bay-classroom-world .bay-character-shell{position:relative;display:grid;place-items:center;width:100%;height:80px;filter:drop-shadow(0 5px 3px #36547836);transition:transform .25s ease}
.bay-classroom-world .bay-character-art{width:min(76px,88%);height:82px;max-width:100%;overflow:visible}
.bay-classroom-world .bay-seat-desk{display:block;position:relative;width:clamp(55px,75%,125px);height:20px;margin-top:-17px;z-index:2;border:2px solid #9d643a;border-radius:9px 9px 12px 12px;background:linear-gradient(135deg,#edb37b,#c17e4c);box-shadow:0 5px 0 #986036,0 9px 0 -4px #895631}
.bay-classroom-world .bay-seat-desk::after{content:"";position:absolute;top:6px;left:16%;width:24%;height:3px;border-radius:4px;background:#fff7e9b7}
.bay-classroom-world .bay-seat-main:hover .bay-character-shell,.bay-classroom-world .bay-seat.is-picked .bay-character-shell{transform:translateY(-7px) scale(1.06)}
.bay-classroom-world .bay-seat.is-picked{animation:bay-character-pick .65s ease-out both;z-index:2}
.bay-classroom-world .bay-seat-main .bay-seat-label{display:block;border-radius:9px;padding:4px 5px;background:#fff9ecde;box-shadow:0 2px 0 #a9844633}
.bay-classroom-world .bay-seat-main small{display:block;padding:2px 5px;border-radius:8px;background:#ecf5fcdf}
.bay-classroom-world .bay-seat-stars{font-size:11px}
.bay-classroom-world .bay-seat.is-absent .bay-character-shell{filter:grayscale(.9);opacity:.6}
.bay-classroom-world .bay-seat.is-selected .bay-character-shell{transform:translateY(-6px) scale(1.04)}
.bay-classroom-world.bay-seat-dragging .bay-seat-main{cursor:grabbing}
.bay-scene-team-layout{grid-template-columns:repeat(2,minmax(0,1fr));padding:15px;gap:12px}
.bay-scene-team-group{min-width:0;display:grid;align-content:start;gap:10px;border:3px solid #a8c0db;border-radius:20px;padding:10px 6px;background:#fffef4c9;box-shadow:0 6px 0 #8094a129}
.bay-scene-team-group h4{margin:0;padding:7px 10px;border-radius:12px;background:#f0f4ff;color:#23456e;text-align:center;font-size:clamp(15px,2.2vw,20px)}
.bay-scene-team-group h4 small{font-size:12px;font-weight:600}
.bay-scene-team-members{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
.bay-scene-team-members .bay-seat-main{min-height:140px}
.bay-scene-team-group.bay-team-blue{border-color:#4a8ae3}.bay-scene-team-group.bay-team-blue h4{background:#dcecff}
.bay-scene-team-group.bay-team-green{border-color:#43a979}.bay-scene-team-group.bay-team-green h4{background:#e0f7e8}
.bay-scene-team-group.bay-team-orange{border-color:#f2a65b}.bay-scene-team-group.bay-team-orange h4{background:#fff0d8}
.bay-scene-team-group.bay-team-purple{border-color:#a48bd7}.bay-scene-team-group.bay-team-purple h4{background:#efe7ff}
.bay-scene-team-group.bay-team-red{border-color:#dd7474}.bay-scene-team-group.bay-team-teal{border-color:#69b6bb}
.bay-classroom-teams[hidden]{display:none!important}
@keyframes bay-character-appear{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@keyframes bay-character-pick{0%{transform:scale(.94)}55%{transform:scale(1.06)}100%{transform:scale(1)}}
@media(max-width:760px){.bay-classroom-wall{height:120px;gap:7px}.bay-classroom-chalkboard{height:95px;border-width:6px}.bay-classroom-window{height:70px;border-width:5px}.bay-classroom-shelf{height:64px;font-size:22px}.bay-classroom-world .bay-seat-main{min-height:146px}.bay-classroom-world .bay-character-shell{height:73px}.bay-classroom-world .bay-character-art{height:75px}.bay-scene-team-layout{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.bay-scene-team-members{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.bay-classroom-world .bay-seat-main{min-height:136px}.bay-classroom-world .bay-seat-label{font-size:11px}.bay-classroom-chalkboard>strong{font-size:18px}.bay-classroom-world .bay-seat-desk{height:16px}.bay-classroom-world .bay-character-shell{height:70px}.bay-classroom-world .bay-character-art{height:72px}.bay-scene-team-layout{grid-template-columns:minmax(0,1fr)}.bay-scene-team-members{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:359px){.bay-classroom-chalkboard>strong{font-size:16px}.bay-classroom-window{width:40px}.bay-classroom-shelf{display:none}}
@media(prefers-reduced-motion:reduce){.bay-classroom-world .bay-seat{animation:none}.bay-classroom-world .bay-character-shell{transition:none}.bay-classroom-world .bay-seat.is-picked{animation:none}}

.bay-seat-drag-mode .bay-seat-main{touch-action:none;cursor:grab}
.bay-winner-illustrated{display:flex!important;align-items:center;gap:12px;justify-content:center}
.bay-winner-character{width:80px;height:92px;display:block;flex:none;filter:drop-shadow(0 5px 4px #0002)}
.bay-winner-character svg{max-width:100%}
@media(max-width:520px){.bay-winner-illustrated{flex-direction:column;gap:4px}.bay-winner-character{height:76px;width:68px}}


/* Projector-like focus mode remains the same board, not a second route or data model. */
.bay-classroom-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.bay-presentation-button{white-space:nowrap;border-color:#72a6dd;color:#124f9c;background:#fff}
body.bay-classroom-is-fullscreen{overflow:hidden!important}
#bayClassroomBoard.is-fullscreen{box-sizing:border-box;position:fixed;inset:0;z-index:9000;width:100%;height:100dvh;margin:0;border:0;border-radius:0;overflow-y:auto;overscroll-behavior:contain;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:#f1f8ff}
#bayClassroomBoard.is-fullscreen .bay-classroom-world{max-width:1300px;margin-inline:auto}
#bayClassroomBoard.is-fullscreen .bay-classroom-head{max-width:1300px;margin-inline:auto}
#bayClassroomBoard.is-fullscreen .bay-classroom-tools{max-width:1300px;margin-inline:auto}
@media(max-width:480px){.bay-classroom-head-actions{gap:6px}.bay-classroom-count{padding:7px 9px}.bay-presentation-button{min-height:44px;padding:8px 10px}}
/* Teacher projector: the whole class takes priority over dashboard chrome on desktop. */
@media(min-width:900px) and (min-height:560px){
  #bayClassroomBoard.is-fullscreen{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-rows:auto auto auto minmax(0,1fr);
    grid-template-areas:"head head" "tools tools" "roster roster" "world world";
    gap:4px 12px;
    overflow:hidden;
    align-content:stretch;
    align-items:stretch;
    padding:8px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left));
  }
  #bayClassroomBoard.is-fullscreen .bay-classroom-head{grid-area:head;min-width:0;max-width:none}
  #bayClassroomBoard.is-fullscreen .bay-classroom-head .eyebrow,
  #bayClassroomBoard.is-fullscreen .bay-classroom-subtitle,
  #bayClassroomBoard.is-fullscreen .bay-classroom-mode-hint,
  #bayClassroomBoard.is-fullscreen .bay-classroom-disclaimer,
  #bayClassroomBoard.is-fullscreen .bay-classroom-timer>div:first-child,
  #bayClassroomBoard.is-fullscreen .bay-classroom-floor{display:none}
  #bayClassroomBoard.is-fullscreen .bay-classroom-head h3{font-size:21px;line-height:1.2;margin:0}
  #bayClassroomBoard.is-fullscreen .bay-classroom-count{padding:6px 9px;font-size:14px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-head-actions{gap:6px}
  #bayClassroomBoard.is-fullscreen .bay-presentation-button{min-height:44px;padding:5px 10px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools{grid-area:tools;max-width:none;margin:0;gap:6px;grid-template-columns:repeat(6,minmax(0,1fr))}
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools .bay-tool{min-height:44px;padding:5px 8px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-timer:not([hidden]){
    position:fixed;z-index:12;top:106px;right:20px;max-width:min(480px,90vw);
    background:#fff;padding:12px;border:1px solid #c7dcec;border-radius:16px;
    box-shadow:0 12px 32px #17345c40;gap:10px
  }
  #bayClassroomBoard.is-fullscreen .bay-timer-controls{gap:6px;flex-wrap:nowrap}
  #bayClassroomBoard.is-fullscreen .bay-timer-controls select{min-height:44px}
  #bayClassroomBoard.is-fullscreen #bayClassroomClock{font-size:20px;min-width:60px}
  #bayClassroomBoard.is-fullscreen .bay-timer-controls .bay-tool{min-height:44px;padding:5px 8px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-roster-head{grid-area:roster;margin:0;min-height:24px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-roster-head strong{font-size:15px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-world{
    grid-area:world;
    display:flex;flex-direction:column;
    min-width:0;min-height:0;height:100%;
    max-width:none;width:100%;margin:0;overflow:hidden;border-radius:14px
  }
  #bayClassroomBoard.is-fullscreen .bay-classroom-wall{height:62px;flex:0 0 62px;padding:4px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-window{height:42px;width:70px;border-width:4px;font-size:20px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-chalkboard{height:50px;max-width:330px;border-width:5px;gap:0}
  #bayClassroomBoard.is-fullscreen .bay-classroom-chalkboard strong{font-size:17px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-chalkboard>span,
  #bayClassroomBoard.is-fullscreen .bay-classroom-chalkboard>small{font-size:9px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-shelf{height:40px;font-size:17px;border-bottom-width:7px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-seats:not(.bay-scene-team-layout){
    flex:1;min-height:0;
    grid-template-columns:repeat(var(--bay-projector-columns,6),minmax(0,1fr));
    grid-template-rows:repeat(var(--bay-projector-rows,3),minmax(0,1fr));
    padding:3px 10px;gap:2px 6px;align-content:stretch;overflow:hidden
  }
  #bayClassroomBoard.is-fullscreen .bay-seat{min-height:0;height:100%;max-height:100%;overflow:hidden}
  /* No entrance stagger on projector: every pupil is visible at first paint. */
  #bayClassroomBoard.is-fullscreen .bay-classroom-world .bay-seat{animation:none}
  #bayClassroomBoard.is-fullscreen .bay-seat-main,
  #bayClassroomBoard.is-fullscreen .bay-scene-team-members .bay-seat-main{
    box-sizing:border-box;min-height:0;height:100%;max-height:100%;padding:2px;gap:1px;align-content:center;overflow:hidden
  }
  #bayClassroomBoard.is-fullscreen .bay-character-shell{height:var(--bay-projector-avatar,62px)}
  #bayClassroomBoard.is-fullscreen .bay-character-art{height:var(--bay-projector-avatar,62px);width:min(64px,90%)}
  #bayClassroomBoard.is-fullscreen .bay-seat-desk{height:13px;margin-top:-10px;box-shadow:0 3px 0 #986036}
  #bayClassroomBoard.is-fullscreen .bay-seat-label{font-size:clamp(11px,1.2vw,14px);line-height:1.2;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #bayClassroomBoard.is-fullscreen .bay-seat-main small{
    position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap
  }
  #bayClassroomBoard.is-fullscreen .bay-seat-stars{font-size:10px;line-height:1.2;padding:1px 5px}
  #bayClassroomBoard.is-fullscreen .bay-scene-team-layout{
    flex:1;min-height:0;grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:repeat(2,minmax(0,1fr));padding:3px;gap:4px
  }
  #bayClassroomBoard.is-fullscreen .bay-scene-team-group{min-height:0;gap:2px;padding:3px}
  #bayClassroomBoard.is-fullscreen .bay-scene-team-group h4{margin:0;padding:3px;font-size:13px}
  #bayClassroomBoard.is-fullscreen .bay-scene-team-members{
    min-height:0;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:1px
  }
  #bayClassroomBoard.is-fullscreen .bay-classroom-stage:not(.is-idle){
    position:fixed;z-index:10;left:50%;top:100px;transform:translateX(-50%);
    width:min(440px,90vw);min-height:0;max-height:55dvh;overflow:auto;
    padding:12px;box-shadow:0 12px 36px #17345c40
  }
  #bayClassroomBoard.is-fullscreen .bay-student-actions:not([hidden]){
    position:fixed;z-index:11;top:100px;right:16px;width:min(410px,90vw);
    max-height:65dvh;overflow:auto;box-shadow:0 12px 32px #17345c40
  }
}
@media(min-width:900px) and (max-height:559px){
  #bayClassroomBoard.is-fullscreen{overflow-y:auto}
}


.bay-classroom-stage.is-idle{display:none}


/* The classroom is the primary teaching surface, on phone as well as projector. */
#bayClassroomTimerPanel[hidden],#bayTeamPreviewControls[hidden]{display:none!important}
#bayClassroomBoard.is-fullscreen .bay-team-preview-controls:not([hidden]){
  position:fixed;z-index:12;top:106px;left:16px;width:min(440px,92vw);max-height:65dvh;overflow:auto;
  border:1px solid #b3cbe2;border-radius:15px;padding:12px;background:#fff;
  box-shadow:0 12px 32px #17345c40
}
.bay-team-preview-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:10px 0;padding:10px;background:#f5faff;border:1px solid #c5dbee;border-radius:13px}
.bay-team-preview-controls label{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:800;color:#16416b}
.bay-team-preview-controls select{min-height:44px;border:1px solid #a8c7e3;border-radius:10px;background:#fff;padding:8px;color:#16416b}
.bay-team-preview-controls small{flex-basis:100%;font-size:12px;color:#61738a;line-height:1.4}
@media(min-width:900px) and (min-height:560px){
  #bayClassroomBoard.is-fullscreen .bay-team-preview-controls:not([hidden]){top:102px}
  #bayClassroomBoard.is-fullscreen .bay-seat-main .bay-seat-label{overflow:hidden;text-overflow:ellipsis}
}
@media(max-width:899px){
  #bayClassroomBoard.is-fullscreen{display:flex;flex-direction:column;gap:7px;align-items:stretch}
  #bayClassroomBoard.is-fullscreen .bay-classroom-head{order:0;gap:8px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-head h3{font-size:21px;line-height:1.25;margin:3px 0}
  #bayClassroomBoard.is-fullscreen .bay-classroom-head .eyebrow{font-size:12px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-subtitle{font-size:12px;line-height:1.4}
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools .bay-tool{min-height:44px;padding:6px 8px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-seats .bay-seat-main{min-height:128px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools{order:1;margin:3px 0}
  #bayClassroomBoard.is-fullscreen .bay-classroom-roster-head{order:2;margin:0;gap:3px}
  #bayClassroomBoard.is-fullscreen .bay-mobile-scroll-hint{display:inline;color:#0b3d91;font-size:12px;font-weight:750}
  /* Mobile is vertically scrollable: never shrink the illustrated roster to a viewport slice. */
  #bayClassroomBoard.is-fullscreen .bay-classroom-world{
    order:3;margin:0;flex:0 0 auto;height:auto;min-height:0;max-height:none;overflow:hidden
  }
  /* Pupils must appear immediately, rather than fading in during a touch interaction. */
  #bayClassroomBoard.is-fullscreen .bay-classroom-world .bay-seat{animation:none}
  #bayClassroomBoard.is-fullscreen .bay-classroom-seats{
    min-height:0;height:auto;max-height:none;grid-auto-rows:auto;overflow:visible
  }
  #bayClassroomBoard.is-fullscreen .bay-student-actions{order:4;margin:0}
  #bayClassroomBoard.is-fullscreen .bay-classroom-stage:not(.is-idle){order:1;position:sticky;top:0;z-index:6;min-height:0;padding:10px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-timer:not([hidden]){order:5;padding:10px}
  #bayClassroomBoard.is-fullscreen .bay-team-preview-controls:not([hidden]){
    position:static;top:auto;left:auto;max-height:none;width:auto;order:2;margin:0;z-index:auto
  }
  #bayClassroomBoard.is-fullscreen .bay-classroom-disclaimer{order:8}
  #bayClassroomBoard.is-fullscreen .bay-classroom-mode-hint{display:none}
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools{grid-template-columns:repeat(3,minmax(0,1fr))}
  #bayClassroomBoard.is-fullscreen .bay-seat-rows{grid-template-columns:repeat(3,minmax(0,1fr))}
  #bayClassroomBoard.is-fullscreen .bay-seat-groups{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:359px){
  #bayClassroomBoard.is-fullscreen .bay-seat-rows{grid-template-columns:repeat(2,minmax(0,1fr))}
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools{grid-template-columns:repeat(2,minmax(0,1fr))}
}

.bay-mobile-scroll-hint{display:none}

/* Mobile teaching focus: controls do not crowd out pupils or overlay each other. */
@media(max-width:520px){
  #bayClassroomBoard.is-fullscreen .bay-classroom-head .eyebrow{display:none}
  #bayClassroomBoard.is-fullscreen .bay-classroom-subtitle{font-size:11px;line-height:1.3}
  #bayClassroomBoard.is-fullscreen .bay-classroom-head h3{font-size:20px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools{gap:6px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools .bay-tool{min-height:44px;padding:6px 5px;font-size:12px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-roster-head{gap:4px 8px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-roster-head strong{font-size:15px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-wall{height:94px;gap:7px;padding:6px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-chalkboard{height:76px;border-width:6px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-window{height:62px;border-width:5px}
  #bayClassroomBoard.is-fullscreen .bay-classroom-shelf{height:55px}
  #bayClassroomBoard.is-fullscreen .bay-seat-layout-controls{width:100%;flex-wrap:nowrap;gap:6px}
  #bayClassroomBoard.is-fullscreen .bay-seat-layout-controls .bay-tool,
  #bayClassroomBoard.is-fullscreen .bay-board-reset-layout{flex:1 1 0;width:auto;min-width:0;font-size:12px;padding:6px 3px}
  #bayClassroomBoard.is-fullscreen .bay-mobile-scroll-hint{display:none}
  #bayClassroomBoard.is-fullscreen.bay-seat-drag-mode .bay-classroom-roster-head #bayClassroomSeatHelp{font-size:11px;line-height:1.4}
}


/* Teacher mobile focus: prioritize class activity over maintenance actions.
   The single existing board retains desktop/projector workflows unchanged. */
.bay-classroom-tools .bay-more-tools{display:none}
@media(max-width:899px){
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools{
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:6px
  }
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools .bay-more-tools{
    display:block;order:3
  }
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools [data-bay-board="draw"]{order:0}
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools [data-bay-board="team-setup"]{order:1}
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools [data-bay-board="timer-panel"]{order:2}
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools [data-bay-board="bulk"]{order:4}
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools [data-bay-board="undo-bulk"]{order:5}
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools [data-bay-board="swap-mode"]{order:6}
  #bayClassroomBoard.is-fullscreen:not(.bay-tools-expanded) .bay-classroom-tools .bay-secondary-tool{display:none}
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools .bay-more-tools[aria-expanded="true"]{
    border-color:#176de5;background:#eaf5ff;color:#0b3d91
  }
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools .bay-secondary-tool:not([hidden]){
    grid-column:span 2
  }
  #bayClassroomBoard.is-fullscreen .bay-student-actions:not([hidden]){
    box-sizing:border-box;position:fixed;top:auto;
    left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));
    bottom:max(12px,env(safe-area-inset-bottom));width:auto;
    max-height:min(60dvh,440px);overflow-y:auto;overscroll-behavior:contain;
    margin:0;padding:14px;border:1px solid #c7dcec;border-radius:22px;
    background:#fff;box-shadow:0 14px 50px #11325f4d;z-index:15;
  }
  #bayClassroomBoard.is-fullscreen .bay-student-actions-list{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr))
  }
  #bayClassroomBoard.is-fullscreen .bay-student-actions-list .bay-student-action{min-width:0}
}
@media(max-width:359px){
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools{grid-template-columns:repeat(2,minmax(0,1fr))}
  #bayClassroomBoard.is-fullscreen .bay-classroom-tools .bay-secondary-tool:not([hidden]){grid-column:span 1}
}
