body.classroom-shell{--class-panel:#fff;--class-ink:#233a50;--class-muted:#607489;--class-line:#dce5ed;--class-tint:#f3f7fa}
html[data-theme="dark"] body.classroom-shell{--class-panel:#1c2c42;--class-ink:#e5edf7;--class-muted:#b7c7db;--class-line:#435974;--class-tint:#263951}
.classroom-shell header{display:flex;height:68px;min-height:68px;flex-wrap:nowrap;padding:0 16px;gap:9px;background:var(--class-panel)}
.classroom-shell header>button,.classroom-modes button{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:38px;padding:0 11px;border-radius:11px;color:var(--class-ink);flex-shrink:0;font-size:12px}
.classroom-shell button svg{width:19px;height:19px;flex-shrink:0}
.classroom-shell .brand{gap:7px;cursor:pointer;flex-shrink:0;min-width:0;margin-right:5px;border-radius:10px}
.classroom-shell .brand-logo{width:40px;height:40px;padding:0}.classroom-shell .brand-logo img{width:40px;height:40px}
.classroom-shell .brand strong{font-size:14px}.classroom-shell .brand small{font-size:8px;letter-spacing:1px}
.classroom-shell .creator-links{display:flex;flex:1;min-width:0;justify-content:flex-end;gap:10px;margin-left:auto}
.classroom-shell .creator-links a,.classroom-shell #copyright-link{font-size:12px;padding:5px 0;font-weight:500;border:0;background:transparent;color:var(--class-muted)}
.classroom-shell .creator-divider{display:none}
.classroom-shell .toolbar,.classroom-shell #palette-toggle{display:none!important}
.classroom-shell #save>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.classroom-shell #save{width:38px;padding:0}
.classroom-modes{display:flex;gap:2px;padding:3px;border:1px solid var(--class-line);border-radius:12px;background:var(--class-tint);flex-shrink:0}
.classroom-modes button{height:30px;border:0;padding:0 8px;background:transparent;color:var(--class-muted)}
.classroom-modes button[aria-pressed="true"]{background:var(--class-panel);color:var(--class-ink);box-shadow:0 1px 5px #18304b19}
.classroom-shell #classroom-connection{background:#fff8ec;color:#806126;border-color:#ecd9b5}
.classroom-shell #classroom-connection[data-state="ready"]{background:#ecf8f3;color:#21644e;border-color:#bedfcf}
.classroom-shell #classroom-connection[data-state="partial"]{background:#f2f5fa;color:#426487;border-color:#ccdae9}
.classroom-shell .workspace-tag{display:none}.classroom-shell .workspace-tools{bottom:28px;right:40px;max-width:none;flex-wrap:nowrap;padding:4px;opacity:.94}
.classroom-shell .workspace-tools button{height:30px}.classroom-shell footer{height:30px;font-size:11px;padding:0 12px}
.classroom-shell footer{display:flex;min-height:30px;flex-wrap:nowrap}.classroom-shell #surface{position:relative}
.classroom-shell #upload-target{font-size:10px}.classroom-shell .blocklyToolbox{width:110px!important;min-width:110px!important}
.classroom-shell .blocklyToolboxCategory{min-height:36px;padding:3px 5px}.classroom-shell .blocklyToolboxCategoryLabel{font-size:11px!important}
.classroom-shell .blocklyToolboxFlyout{overflow:hidden!important}
#classroom-resizer{position:absolute;top:0;bottom:0;width:9px;z-index:8;cursor:col-resize;touch-action:none;background:transparent;display:flex;align-items:center;justify-content:center;color:#90a3b5}
#classroom-resizer:hover,#classroom-resizer:focus-visible{background:#b5cadb66;outline:0}#classroom-resizer span{border-radius:5px;padding:10px 0;background:var(--class-line);font-weight:bold}#classroom-resizer[hidden]{display:none}
.classroom-teaching .workspace-panel{background:var(--class-panel)}
.classroom-shell dialog{padding:0;border-radius:20px;border-color:var(--class-line);background:var(--class-panel);color:var(--class-ink);max-height:90dvh;overflow:auto;box-shadow:0 24px 80px #14283c40}
body.classroom-shell #dialog{max-height:90dvh;overflow:auto}
.classroom-shell .dialog-heading{position:sticky;top:0;z-index:12;padding:17px 22px;background:var(--class-panel);border-bottom:1px solid var(--class-line);gap:18px;min-height:66px}
.classroom-shell .dialog-heading h2{margin:0;font-size:18px;line-height:1.4}
.classroom-shell .dialog-heading button{display:inline-flex;align-items:center;gap:5px;background:var(--class-tint);border:1px solid var(--class-line);border-radius:10px;color:var(--class-ink);padding:0 11px;height:34px;flex-shrink:0}
.classroom-shell #dialog-body{padding:20px 22px;line-height:1.7}.classroom-shell #dialog-body>p{line-height:1.8}
.classroom-shell #classroom-menu{width:min(960px,94vw)}#classroom-menu-body{padding:22px}
.classroom-intro strong{font-size:21px;letter-spacing:-.5px}.classroom-intro p{color:var(--class-muted);margin:8px 0 20px;line-height:1.7}
.setup-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.setup-step{position:relative;background:var(--class-tint);padding:17px;border:1px solid var(--class-line);border-radius:15px;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.step-number{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#526e83;color:white;font-weight:bold}
.setup-step h3{font-size:16px;margin:0}.setup-step .help{font-size:12px;line-height:1.7;margin:0;color:var(--class-muted)}
.step-state{font-size:11px;color:var(--class-muted);margin-bottom:2px}
.setup-step button,.setup-step select,.menu-download{max-width:100%;height:auto;min-height:36px;padding:8px 10px;white-space:normal;line-height:1.5}
.setup-step label{display:flex;flex-direction:column;gap:5px;width:100%;font-size:11px;color:var(--class-muted)}
.menu-download{display:block;text-decoration:none;border-radius:9px;background:#315f83;color:white!important;text-align:center;font-weight:650}
.setup-start{display:block;margin:16px 0 22px auto;background:#315f83;border-color:#315f83;height:39px}
.classroom-menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.menu-section{padding:15px;border:1px solid var(--class-line);border-radius:13px}
.menu-section h3{font-size:13px;margin:0 0 12px}.menu-items{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.menu-items .help{flex-basis:100%;font-size:12px;margin:0;color:var(--class-muted)}
.menu-items button,.menu-items select{max-width:100%;font-size:12px}.menu-items a{color:var(--class-muted);font-size:12px}
.menu-items #example{max-width:100%;width:100%}.classroom-shell .help{color:var(--class-muted)}
@media(max-width:1180px){.classroom-shell header{gap:6px;padding:0 10px}.classroom-shell .brand>div{display:none}.classroom-shell .creator-links{gap:7px}.classroom-shell .creator-links a,.classroom-shell #copyright-link{font-size:11px}.classroom-shell header>button{padding:0 8px}.classroom-shell .classroom-modes button{font-size:11px}}
@media(max-width:850px){.classroom-shell header{height:60px;min-height:60px;gap:5px}.classroom-shell header>button{font-size:11px}.classroom-modes button{padding:0 5px}.classroom-modes button span{font-size:0}.classroom-modes button span::after{font-size:10px}#classroom-edit span::after{content:'작성'}#classroom-mode span::after{content:'강의'}.classroom-shell .creator-links{gap:6px}.classroom-shell .creator-links a span{display:none}.classroom-shell #code-toggle span{display:none}.classroom-shell .brand{margin:0}}
@media(max-width:650px){.classroom-shell header{gap:4px;padding:0 5px}.classroom-shell .brand-logo,.classroom-shell .brand-logo img{width:30px;height:30px}.classroom-shell #classroom-connection span{display:none}.classroom-shell header>button{padding:0 6px;height:34px}.classroom-shell #save{width:32px}.classroom-shell .creator-links{flex-direction:column;align-items:flex-end;gap:0}.classroom-shell .creator-links a,.classroom-shell #copyright-link{font-size:9px;padding:1px 0;line-height:12px;height:auto}.classroom-shell .classroom-modes button{padding:0 3px}.classroom-shell .classroom-modes svg{width:15px}.setup-steps,.classroom-menu-grid{grid-template-columns:1fr}.setup-step{padding:14px}.classroom-shell .dialog-heading{padding:12px 15px}.classroom-shell #dialog-body,#classroom-menu-body{padding:16px}.classroom-shell footer #upload-target{display:none}.classroom-shell .workspace-tools{right:25px;bottom:30px}.classroom-shell #code-panel{inset:60px 0 30px 8%;z-index:10}.classroom-shell #surface{min-height:0}}
@media(min-width:651px) and (max-width:850px){html[lang="en"] #classroom-edit span::after{content:'Build'}html[lang="en"] #classroom-mode span::after{content:'Teach'}}
@media(max-width:650px){.classroom-modes button span{display:none}.classroom-modes button{width:25px}}
.classroom-shell .blocklyToolboxCategory{min-width:0!important;width:calc(100% - 8px)!important}
.classroom-shell .blocklyToolboxCategory{padding:0 6px!important}.classroom-shell .blocklyToolboxCategory .blocklyToolboxCategoryLabel{font-size:11px!important}.classroom-shell .blocklyToolboxCategory .blocklyTreeRowContentContainer{gap:6px}
@media(max-width:650px){.classroom-shell .brand-logo{min-width:30px;min-height:30px}.classroom-shell #code-panel{position:absolute;inset:0 0 0 8%;width:auto;min-width:0}.classroom-shell .workspace-tools button{min-width:25px}.classroom-shell .creator-links{flex-shrink:0}.classroom-shell header>button,.classroom-shell .classroom-modes button{min-height:30px}}
.classroom-shell #copyright-link{min-height:0}.classroom-shell .creator-links{align-self:center}
html[data-theme="dark"] .classroom-shell #classroom-connection{background:#3c3426;color:#f1d695;border-color:#766244}
html[data-theme="dark"] .classroom-shell #classroom-connection[data-state="ready"]{background:#203c35;color:#b3ead1;border-color:#497961}

/* Keep everyday board actions beside the teaching/building mode switch. */
.classroom-code-actions{display:flex;gap:6px;align-items:center;flex-shrink:0}
.classroom-shell .classroom-code-actions button{display:inline-flex;align-items:center;justify-content:center;gap:5px;height:38px;padding:0 11px;border-radius:11px;font-size:12px}
.classroom-shell .classroom-code-actions #check{background:var(--class-tint);color:var(--class-ink);border-color:var(--class-line)}
.classroom-shell .classroom-code-actions #upload{background:#2769da;color:#fff;border-color:#2769da}
.classroom-shell .classroom-code-actions #upload:hover{background:#1d56bb}
@media(min-width:851px) and (max-width:1100px){.classroom-shell .classroom-code-actions button{padding:0 8px;font-size:11px}.classroom-shell #code-toggle span{display:none}}
@media(min-width:651px) and (max-width:850px){.classroom-shell .classroom-code-actions button{padding:0 6px;font-size:11px}.classroom-shell #classroom-connection span{display:none}}
@media(max-width:650px){
 .classroom-shell header{display:grid;grid-template-columns:30px auto 32px 32px 32px minmax(0,1fr);grid-template-rows:34px 38px;height:92px;min-height:92px;padding:6px;gap:4px 6px}
 .classroom-shell header>.brand{grid-column:1;grid-row:1}
 .classroom-shell #studio-menu-button{grid-column:2;grid-row:1}
 .classroom-shell #classroom-connection{grid-column:3;grid-row:1}
 .classroom-shell #code-toggle{grid-column:4;grid-row:1}
 .classroom-shell #save{grid-column:5;grid-row:1}
 .classroom-shell .creator-links{grid-column:6;grid-row:1;min-width:0;margin:0}
 .classroom-shell .classroom-modes{grid-column:1/3;grid-row:2;justify-self:start}
 .classroom-shell .classroom-code-actions{grid-column:3/-1;grid-row:2;justify-self:start;gap:6px}
 .classroom-shell .classroom-code-actions button{height:34px;padding:0 8px;font-size:11px}
 .classroom-shell .classroom-modes button{width:auto;padding:0 5px}
 .classroom-shell .classroom-modes button span{display:inline;font-size:0}
 html[lang="en"] .classroom-shell #classroom-edit span::after{content:'Build'}
 html[lang="en"] .classroom-shell #classroom-mode span::after{content:'Teach'}
}

/* Upload target and result stay beside the upload action. */
.classroom-shell #upload-summary{display:flex;flex-direction:column;justify-content:center;gap:2px;min-width:0;max-width:210px;padding:4px 9px;border:1px solid #d9e3eb;border-radius:9px;background:var(--panel,#f5f8fb);font-size:10px;line-height:1.35}
.classroom-shell #upload-summary #upload-target{font-size:9px;opacity:.75;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.upload-summary-line{display:flex;align-items:center;gap:5px;min-width:0}
#upload-summary #status{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}
#upload-summary .dot{width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:#6f8397}
#upload-summary[data-operation-state="working"] .dot{background:#ba8b19}
#upload-summary[data-operation-state="error"] .dot{background:#ce493e}
#upload-summary[data-operation-state="success"] .dot{background:#239763}
html[data-theme="dark"] #upload-summary{background:#202c3c;border-color:#46576e;color:#e5edf8}
@media(max-width:1100px){.classroom-shell #upload-summary{max-width:155px}}
@media(max-width:650px){.classroom-shell .classroom-code-actions{min-width:0;width:100%}.classroom-shell #upload-summary{flex:1 1 0;max-width:125px;padding:3px 5px}.classroom-shell .classroom-code-actions button{flex-shrink:0}}

.usb-driver-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0}
.usb-driver-card{display:flex;flex-direction:column;gap:12px;padding:20px;border:1px solid var(--class-line,#d8e2ef);border-radius:15px;background:var(--class-tint,#f3f7fb)}
.usb-driver-card h3,.usb-driver-card p{margin:0}.usb-driver-card p{font-size:13px;line-height:1.6;flex:1}.usb-driver-card small{opacity:.75}
.usb-driver-download{display:block;text-align:center;text-decoration:none;padding:11px 14px;border-radius:10px;background:#2867cb;color:#fff!important;font-weight:600;font-size:13px}
.usb-driver-download:hover{background:#1c51a5}.usb-driver-download:focus-visible{outline:3px solid #81acff;outline-offset:3px}
@media(max-width:550px){.usb-driver-grid{grid-template-columns:1fr}}
