.activity-tabs{display:flex;gap:6px;padding:9px 16px;background:#0b1626;border-bottom:1px solid #2b3f59}.activity-tabs button{border:1px solid transparent;border-radius:4px;min-height:36px;padding:7px 14px;background:transparent;color:#8fa9c7;font-size:10px;display:flex;align-items:center;gap:9px}.activity-tabs button>span{font-size:14px}.activity-tabs button[aria-pressed=true]{background:#ff7a1a12;border-color:#a45d3155;color:#ffb77f}.activity-tabs small{margin-left:auto;align-self:center;font:7px Consolas,monospace;color:#627f9f;letter-spacing:.05em}.chess-panel{display:none;background:#0c1727;border-top:1px solid #293e59;padding:18px}.chess-active .chess-panel{display:block}.chess-active .lab-actions,.chess-active .student-controls,.chess-active .lab-cycle,.chess-active .lab-lesson,.chess-active .lab-options,.chess-active .lab-telemetry,.chess-active .scene-controls{display:none!important}.chess-active .lab-canvas-caption>span:last-child{font-size:0}.chess-active .lab-canvas-caption>span:last-child::after{content:'CHESS WORKCELL / LOCAL PLAY';font-size:8px}.chess-heading{display:flex;justify-content:space-between;gap:10px;align-items:center}.chess-heading h2{font-size:25px;line-height:1.1;letter-spacing:-.04em;color:#e4edf8;margin:8px 0 0}.chess-heading h2 em{font:italic 26px Georgia,serif;color:#ff9c58}.chess-heading>span{font:7px Consolas,monospace;color:#8fc4eb;border:1px solid #375777;padding:5px 7px;border-radius:3px;white-space:nowrap}.chess-levels{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:18px}.chess-levels button{min-height:48px;border:1px solid #30445e;background:#132238;color:#6986a7;border-radius:4px;font:7px Consolas,monospace;text-align:left;padding:8px}.chess-levels b{display:block;color:#b8cde5;font:10px Arial,sans-serif;margin-top:5px}.chess-levels button[aria-pressed=true]{border-color:#b96a38;background:#ff7a1a13;color:#ff9c58}.chess-levels button[aria-pressed=true] b{color:#ffc398}.chess-levels button:disabled{cursor:default;opacity:.6}.chess-level-note{font-size:10px;line-height:1.6;color:#92aac7;margin:9px 0 15px;min-height:32px}.chess-settings,.chess-robot-controls{display:flex;align-items:center;gap:10px;justify-content:space-between}.chess-settings label,.chess-robot-controls label{display:flex;align-items:center;gap:7px;font-size:9px;color:#91aac7}.chess-panel select{background:#132238;border:1px solid #314864;color:#cadcf1;border-radius:3px;min-height:33px;padding:5px 8px;font-size:9px}.chess-panel button:not(.chess-square):not([data-chess-level]){border:1px solid #314864;background:#15253c;color:#b9cee8;border-radius:3px;min-height:33px;padding:6px 9px;font-size:9px}.chess-panel button:disabled{opacity:.45;cursor:default}.chess-status{font-size:11px;line-height:1.6;color:#e0b893;background:#ff7a1a08;border-left:2px solid #bb6a37;padding:8px 10px;margin:13px 0;min-height:49px;display:flex;align-items:center}.chess-board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));aspect-ratio:1;max-width:440px;width:100%;margin:auto;border:3px solid #45546a;border-radius:3px;overflow:hidden;background:#101b2b}.chess-square{aspect-ratio:1;padding:0;border:0;border-radius:0;position:relative;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;isolation:isolate}.chess-square.light{background:#c4cbd0}.chess-square.dark{background:#586c80}.chess-square>small{font:6px Consolas,monospace;position:absolute;left:3px;bottom:2px;color:#27384a;z-index:3;pointer-events:none}.chess-square.dark>small{color:#c9d4e0}.chess-piece{font-family:'Segoe UI Symbol','DejaVu Sans',serif;font-size:clamp(24px,3vw,42px);line-height:1;z-index:2;pointer-events:none}.piece-white{color:#fffdf7;-webkit-text-stroke:1px #34465b;text-shadow:0 2px 1px #17253860}.piece-black{color:#152337;-webkit-text-stroke:.5px #0a1423;text-shadow:0 1px 1px #ffffff50}.chess-square.selected{box-shadow:inset 0 0 0 3px #ff8b36}.chess-square.legal::after{content:'';position:absolute;width:23%;height:23%;border-radius:50%;background:#f68d3cc4;z-index:3;pointer-events:none}.chess-square.legal:has(.chess-piece)::after{width:82%;height:82%;background:transparent;border:3px solid #f68d3c}.chess-square.last-move{background:#b4a77d}.chess-square.last-move.dark{background:#8c8d72}.chess-square.hint-square{box-shadow:inset 0 0 0 3px #44c7ff}.chess-square.king-check{background:#d07163!important}.chess-square:disabled{opacity:1!important;cursor:default}.chess-square:focus-visible{outline:3px solid #ffa04f!important;outline-offset:-3px;z-index:4}.chess-tools{display:flex;justify-content:space-between;gap:6px;margin:12px 0}.chess-tools button{flex:1}.chess-captures{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:10px 0;border-block:1px solid #233852}.chess-captures>span{font:6px Consolas,monospace;color:#728fb0;letter-spacing:.06em}.chess-captures b{font:14px 'Segoe UI Symbol',serif;display:block;color:#a9bfd9;margin-top:4px;min-height:17px;word-break:break-word}.chess-record{margin:12px 0;color:#9bb4d2;font-size:10px}.chess-record summary{cursor:pointer;display:flex;justify-content:space-between;gap:8px;list-style:none}.chess-record summary::before{content:'+';color:#ff9c58}.chess-record summary span{font:6px Consolas,monospace;color:#738faf;margin-left:auto}.chess-record ol{list-style:none;max-height:100px;overflow:auto;margin-top:10px;padding:8px;background:#081321}.chess-record li{display:flex;gap:12px;font:10px Consolas,monospace;color:#aac3df;padding:4px}.chess-record li>span{flex:1}.chess-record li>span:first-child{max-width:25px;color:#6383a6}.chess-motion-note{font:8px Consolas,monospace;color:#9bb5d4;margin-top:8px}.chess-footnote{font-size:9px;color:#7895b6;line-height:1.7;margin-top:12px}.chess-promotion{padding:10px;background:#21364f;border:1px solid #ff9b5780;border-radius:4px;margin:10px 0;display:flex;flex-wrap:wrap;gap:6px}.chess-promotion[hidden]{display:none}.chess-promotion strong{width:100%;font-size:11px;color:#ffd2b2;margin-bottom:4px}.chess-active .scene-viewport{height:330px}
@media(min-width:1000px){.lab-dialog .robot-lab{grid-template-rows:auto auto auto auto auto auto auto auto auto minmax(35px,1fr)}.lab-dialog .activity-tabs{grid-column:1/-1;grid-row:2}.lab-dialog .scene-viewport{grid-row:3/11}.lab-dialog .lab-actions{grid-row:3}.lab-dialog .student-controls{grid-row:4}.lab-dialog .lab-cycle{grid-row:5}.lab-dialog .lab-lesson{grid-row:6}.lab-dialog .lab-options{grid-row:7}.lab-dialog .lab-telemetry{grid-row:8}.lab-dialog .scene-controls{grid-row:9}.lab-dialog .scene-note{grid-row:10}.lab-dialog .chess-active{grid-template-columns:minmax(0,1fr) 380px;grid-template-rows:auto auto minmax(0,1fr) auto}.lab-dialog .chess-active .scene-viewport{grid-row:3/5;height:100%}.lab-dialog .chess-active .chess-panel{grid-column:2;grid-row:3;overflow-y:auto;min-height:0;border-top:0;padding:18px}.lab-dialog .chess-active .scene-note{grid-column:2;grid-row:4;padding:7px 18px}.lab-dialog .chess-piece{font-size:32px}.lab-dialog .chess-levels b{font-size:10px}}
@media(max-width:600px){.activity-tabs{padding:7px 11px;gap:5px}.activity-tabs button{font-size:9px;padding:6px 10px;min-height:34px}.activity-tabs small{font-size:6px}.chess-panel{padding:13px 11px}.chess-heading h2,.chess-heading h2 em{font-size:23px}.chess-levels{gap:4px;margin-top:14px}.chess-levels button{padding:7px 6px}.chess-levels b{font-size:9px}.chess-level-note{font-size:9px}.chess-piece{font-size:30px}.chess-status{font-size:10px}.chess-square>small{font-size:5px;left:2px;bottom:1px}.chess-active .scene-viewport{height:300px}.chess-active .lab-canvas-caption>span:last-child::after{font-size:6px}.lab-dialog .chess-active{display:block;overflow-y:auto;height:auto;min-height:100%}.lab-dialog .chess-active .scene-viewport{height:290px;min-height:290px}.lab-dialog .chess-active .chess-panel{padding:14px}.chess-record summary span{font-size:5px}}
@media(prefers-reduced-motion:reduce){.chess-square{scroll-behavior:auto}}
.chess-player-label{max-width:440px;margin:8px auto;padding:9px 11px;border:1px solid #3a526e;border-radius:4px;background:#13243a;color:#dce9fa;font:600 11px Arial,sans-serif;letter-spacing:.04em;line-height:1.4}
.chess-player-label[data-player=human]{border-left:4px solid #fffdf7}.chess-player-label[data-player=robot]{border-left:4px solid #7187a2}
.chess-play-instructions{font-size:12px;line-height:1.6;color:#b9cce2;margin:12px 0 8px}
.robot-lab #heroCanvas{height:calc(100% - 78px)}
.workcell-camera-controls{position:absolute;z-index:5;bottom:0;left:0;right:0;height:78px;box-sizing:border-box;display:flex;flex-wrap:wrap;align-content:center;justify-content:center;gap:4px;background:#0b1626f5;border-top:1px solid #30445f;padding:5px 8px}
.workcell-camera-controls>span{width:100%;text-align:center;color:#b7cae1;font:10px Arial,sans-serif;line-height:14px}
.workcell-camera-controls>button{flex:0 1 48px;min-width:40px;min-height:44px;border:1px solid #4c6685;border-radius:5px;background:#182b43;color:#edf5ff;font-size:23px;touch-action:manipulation;cursor:pointer}
.workcell-camera-controls>button:focus-visible{outline:2px solid #ff9c58;outline-offset:-3px}
@media(max-width:899px){
 .portal .hero.chess-mode{overflow:visible}
 .portal #scenePanel.chess-active{overflow:visible}
 .portal #scenePanel.chess-active>#sceneViewport{position:sticky;top:76px;z-index:15;height:210px;min-height:0;border-bottom:1px solid #425a76;box-shadow:0 10px 20px #0005}
 .portal .lab-dialog #scenePanel.chess-active>#sceneViewport{top:0}
 .chess-setup{margin:12px 0;border:1px solid #39516f;border-radius:5px;background:#101e31}
 .chess-setup>summary{min-height:44px;display:flex;align-items:center;padding:10px 12px;font-size:12px;line-height:1.5;color:#c5daf2;cursor:pointer;list-style:none}
 .chess-setup>summary::after{content:'+';margin-left:auto;padding-left:8px;color:#ffac70;font-size:19px}
 .chess-setup[open]>summary::after{content:'−'}
 .chess-setup>.chess-levels,.chess-setup>.chess-level-note,.chess-setup>.chess-settings{margin:10px 12px}
 .robot-lab .chess-panel{padding:16px 12px;overflow:visible;min-width:0}
 .chess-heading{align-items:flex-start;flex-wrap:wrap}.chess-heading>span{font-size:10px;white-space:normal;line-height:1.4;padding:8px}
 .chess-levels{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.chess-levels button{min-height:48px;font-size:10px;padding:8px 10px}.chess-levels b{font-size:12px}
 .chess-level-note{font-size:12px;min-height:0;margin:10px 0 16px}
 .chess-settings,.chess-robot-controls{flex-wrap:wrap;gap:10px}.chess-settings label,.chess-robot-controls label{font-size:12px;flex-wrap:wrap}
 .chess-panel select,.chess-panel button:not(.chess-square):not([data-chess-level]){min-height:44px;font-size:12px;padding:8px 10px}
 .chess-status{font-size:13px;line-height:1.5;min-height:52px;margin:14px 0}
 .chess-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.chess-tools button{min-width:0}
 .chess-square{min-width:0;touch-action:manipulation}.chess-piece{font-size:clamp(23px,7.6vw,38px)}.chess-square>small{font-size:7px}
 .chess-captures>span,.chess-motion-note{font-size:10px}.chess-record,.chess-footnote{font-size:12px;line-height:1.6}.chess-record summary{min-height:44px;align-items:center;flex-wrap:wrap}.chess-record summary span{font-size:8px;overflow-wrap:anywhere}
 .chess-record li{font-size:12px;min-height:28px}.chess-record ol{max-height:160px}
}
/* Keep the robot and playable top view together on the normal desktop page. */
.robot-lab{scroll-margin-top:100px}
@media(min-width:900px){
 .hero.chess-mode{grid-template-columns:1fr;min-height:0;align-items:start;gap:0;padding-top:115px;padding-bottom:40px}
 .hero.chess-mode>.hero-content{display:none}
 .hero>.robot-lab.chess-active{display:grid;grid-template-columns:minmax(0,1fr) clamp(330px,30vw,420px);grid-template-rows:auto auto minmax(0,1fr) auto;height:max(650px,calc(100dvh - 145px));max-height:950px;align-self:start;margin-top:0}
 .hero>.chess-active>.scene-header{grid-column:1/-1;grid-row:1}
 .hero>.chess-active>.activity-tabs{grid-column:1/-1;grid-row:2}
 .hero>.chess-active>.scene-viewport{grid-column:1;grid-row:3/5;height:100%;min-height:0;border-right:1px solid #2a3a50}
 .hero>.chess-active>.chess-panel{grid-column:2;grid-row:3;min-height:0;overflow-y:auto;border-top:0;padding:14px}
 .hero>.chess-active>.scene-note{grid-column:2;grid-row:4;padding:7px 14px}
 .hero>.chess-active .chess-heading h2{font-size:21px;margin-top:4px}
 .hero>.chess-active .chess-heading h2 br{display:none}
 .hero>.chess-active .chess-heading h2 em{font-size:22px;margin-left:5px}
 .hero>.chess-active .chess-levels{margin-top:10px}
 .hero>.chess-active .chess-levels button{min-height:40px;padding:6px}
 .hero>.chess-active .chess-level-note{font-size:9px;min-height:29px;margin:6px 0 9px}
 .hero>.chess-active .chess-status{min-height:38px;margin:8px 0}
 .hero>.chess-active .chess-piece{font-size:clamp(27px,2.4vw,38px)}
}
