/* Classroom workspace: RoCode's flat panels, blue selection, and readable tools. */
html,body{height:100%;overflow:hidden}body{display:flex;flex-direction:column}
:root{--code-size:16px;--line:#d7e2ec;--ink:#17324d;--muted:#52677c}
.studio-layout{display:grid;grid-template-columns:minmax(280px,var(--preview-share,42fr)) 5px minmax(400px,var(--code-share,58fr));flex:1;min-height:0;position:relative;background:#fff}
.preview-panel,.code-panel{min-width:0;min-height:0;display:flex;flex-direction:column;position:relative}
.panel-toolbar{height:54px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 16px;border-bottom:1px solid var(--line);background:#fff}
.panel-title{font-size:16px;font-weight:750;white-space:nowrap}
.device-toggle,.editor-actions{display:flex;gap:4px}
.device-toggle button,.editor-actions button,.text-size-control button{min-height:44px;min-width:44px;padding:0 12px;border:1px solid transparent;background:#fff;border-radius:6px;color:var(--ink);font-size:15px;font-weight:600}
.device-toggle button[aria-pressed=true]{color:#fff;background:var(--rocode-action)}
.device-toggle button:hover:not([aria-pressed=true]),.editor-actions button:hover:not(:disabled),.text-size-control button:hover:not(:disabled){background:var(--rocode-action-soft)}
.preview-canvas{flex:1;min-height:0;padding:12px;background:#f1f6fa;overflow:auto;display:flex;justify-content:center;align-items:stretch}
.preview-window{width:100%;display:flex;flex-direction:column;min-height:260px;overflow:hidden;border:1px solid var(--line);background:#fff}
.preview-window.phone{width:375px;max-width:100%;border:5px solid #294761;border-radius:20px}
iframe{width:100%;flex:1;min-height:250px;border:0;background:white}
.preview-bottom,.code-bottom{min-height:44px;flex-shrink:0;display:flex;align-items:center;gap:12px;padding:0 14px;font-size:13px;color:var(--muted);border-top:1px solid var(--line);background:#fff}
.preview-bottom button,.code-bottom button{min-height:44px;margin-left:auto;padding:0 8px;border:0;background:none;color:#275bb0;font-size:14px;font-weight:600;white-space:nowrap}
.preview-bottom button:hover,.code-bottom button:hover{text-decoration:underline}
.resize-handle{background:#edf1f6;border-left:1px solid #ccd9e6;border-right:1px solid #ccd9e6;cursor:col-resize;position:relative;z-index:5;touch-action:none}
.resize-handle:after{content:'';position:absolute;top:48%;left:0;height:28px;width:3px;background:#8ba4bd}
.resize-handle:hover{background:#a2bfff}body.resizing iframe{pointer-events:none}body.resizing{cursor:col-resize;user-select:none}
.file-row{height:48px;flex-shrink:0;display:flex;justify-content:space-between;border-bottom:1px solid var(--line);background:#edf4f9}
.file-tabs{display:flex;gap:2px}.file-tab{min-width:110px;padding:0 22px;border:0;border-right:1px solid var(--line);border-radius:5px 5px 0 0;background:#deebf4;color:#39566e;font-size:16px;font-weight:700}
.file-tab.active{background:var(--rocode-action);color:#fff}.file-tab:hover:not(.active){background:#cfdfef}
.text-size-control{display:flex;align-items:center;gap:2px;margin-right:8px}.text-size-control button{background:transparent;font-weight:700;font-size:16px}.text-size-control output{width:26px;text-align:center;font-size:14px;font-variant-numeric:tabular-nums}
#editor-host{flex:1;min-height:0;overflow:hidden}#code-editor{width:100%;height:100%;resize:none;border:0;font:16px Consolas,monospace}
.CodeMirror{height:100%;font-family:Consolas,'Cascadia Code',monospace;font-size:var(--code-size);line-height:1.65;color:#17324d;background:#fff}
.CodeMirror-lines{padding:16px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 12px}.CodeMirror-gutters{background:#f6f9fc;border-right:1px solid #e5edf4}.CodeMirror-linenumber{color:#637991;padding:0 10px;min-width:20px;font-size:14px}
.cm-s-default .cm-tag{color:#1855ae}.cm-s-default .cm-attribute{color:#87501e}.cm-s-default .cm-string{color:#257044}.cm-s-default .cm-comment{color:#617487}.cm-s-default .cm-property{color:#71428f}.cm-s-default .cm-number{color:#98520f}
.insert-bar{padding:7px 12px;border-top:1px solid var(--line);display:flex;align-items:center;flex-wrap:wrap;gap:6px;background:#f7fafc}
.insert-bar>span{font-size:14px;color:var(--muted);margin-right:5px}.insert-bar button{min-height:44px;padding:0 12px;border:1px solid #bccfe1;background:#fff;border-radius:6px;color:#284e75;font-size:15px;font-weight:600}
.insert-bar button:hover{color:#214f9b;background:#edf4ff;border-color:#7da4df}
.reference-panel{position:absolute;bottom:44px;left:12px;right:12px;padding:20px;z-index:10;background:#fff;border:1px solid #b9ccdf;border-radius:6px;box-shadow:0 4px 16px #17324d20}
.reference-panel h3{font-size:18px;margin:0 0 15px}.reference-panel dt{font:16px Consolas,monospace;color:#285eaa;margin-top:12px}.reference-panel dd{margin:5px 0;font-size:15px;color:var(--ink);line-height:1.5}
.studio-status{height:30px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 16px;border-top:1px solid var(--line);background:#f6f9fc;color:var(--muted);font-size:12px}
/* Optional sample drawer; it does not take space away from the editor. */
.mission-panel{position:absolute;left:0;top:0;bottom:0;width:350px;max-width:100%;z-index:20;display:flex;flex-direction:column;overflow:auto;background:#fff;border-right:1px solid #b7cbdf;box-shadow:4px 0 16px #17324d22}
.course-heading{padding:16px 20px;border-bottom:1px solid var(--line);background:#f1f7fc}.activity-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.activity-heading h1{font-size:20px;margin:0}.activity-heading button{width:44px;height:44px;background:none;border:0;color:var(--ink);font-size:25px}.course-heading p{font-size:14px;line-height:1.5;margin:5px 0 12px;color:var(--muted)}
.mission-browse{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:44px;padding:0 10px;background:white;border:1px solid #bdd0e3;border-radius:6px;color:#285a99;font-size:15px;font-weight:600}
.mission-content{padding:22px 20px}h2{font-size:22px;margin:0 0 12px}.mission-description{font-size:16px;color:var(--ink);line-height:1.6;margin:0 0 22px}.small-heading{font-size:16px;margin:0 0 14px}.checkpoints{list-style:none;padding:0;margin:0 0 20px}.checkpoints li{display:flex;gap:10px;font-size:16px;line-height:1.5;margin:0 0 15px}.checkpoint-icon{display:grid;place-items:center;width:21px;height:21px;flex:0 0 21px;margin-top:2px;border:1.5px solid #8fa7bd;border-radius:50%;color:#fff;font-size:14px}.checkpoints .passed .checkpoint-icon{background:#21804e;border-color:#21804e}
.hint-button{width:100%;min-height:44px;display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #bdd0e3;border-radius:6px;background:#fff;color:#285a99;font-size:16px;font-weight:600}.hint-button img{width:22px;height:22px}.hint-button:hover{background:#eef4ff}.hint-content{font-size:15px;line-height:1.6;padding:14px;background:#edf3ff;color:#26496e;white-space:pre-wrap}.check-feedback{margin-top:16px;padding:12px;border-left:3px solid #bf8b20;font-size:15px;line-height:1.5;background:#fff6df;color:#634812}.check-feedback.success{background:#e6f5ed;color:#20633e;border-color:#328c59}
.primary{min-height:48px;border:1px solid var(--rocode-action);background:var(--rocode-action);color:#fff;border-radius:6px;font-weight:700;padding:10px 18px;font-size:16px}.primary:hover:not(:disabled){background:var(--rocode-action-hover)}.check-button{width:100%;margin-top:18px}.next-button{width:100%;min-height:44px;border:0;color:#275bab;font-size:15px;font-weight:700;background:none;margin-top:8px;padding:5px}
.tori-tip{margin:auto 20px 20px;padding-top:18px;display:flex;gap:12px;border-top:1px solid var(--line)}.tori-tip img{width:42px;height:57px;object-fit:contain;flex-shrink:0}.tori-tip strong{font-size:15px}.tori-tip p{font-size:14px;line-height:1.5;color:var(--muted);margin:6px 0}
dialog{width:min(740px,calc(100vw - 32px));max-height:85vh;overflow:auto;border:1px solid #bfcedd;border-radius:8px;padding:0;box-shadow:0 20px 80px #102b5040;color:var(--ink)}dialog::backdrop{background:#10294b66}.dialog-top{position:sticky;top:0;display:flex;justify-content:space-between;align-items:center;padding:12px 24px;background:#fff;z-index:1;border-bottom:1px solid var(--line)}.dialog-top h2{margin:0;font-size:22px}.dialog-top button{background:#f1f5fa;border:0;border-radius:6px;width:44px;height:44px;font-size:26px;color:#34536d}#dialog-content{padding:22px 24px}.dialog-intro{color:var(--muted);font-size:16px;line-height:1.6;margin:0 0 20px}.mission-grid,.projects-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.mission-card,.project-card{text-align:left;padding:16px;border:1px solid #c6d6e6;border-radius:6px;background:#fff;color:var(--ink)}.mission-card:hover,.project-card:hover{border-color:#5e8ddd;background:#f0f5ff}.mission-card.current{border-color:#5e8ddd;background:#edf4ff}.mission-card small{font-size:14px;color:var(--muted)}.mission-card strong,.project-card strong{display:block;margin:7px 0;font-size:17px}.mission-card p,.project-card p{font-size:14px;color:var(--muted);line-height:1.5;margin:0}.mission-card .earned{color:#216d45}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:22px}.secondary{min-height:48px;background:#fff;border:1px solid #b4c9dd;border-radius:6px;padding:10px 16px;font-size:16px;color:#294e73}.new-field{display:block;margin:20px 0;font-size:16px;font-weight:650}.new-field input{display:block;margin-top:8px;padding:12px;border:1px solid #a9bfd5;border-radius:6px;width:100%;color:#17324d;min-height:48px}.help-copy{font-size:16px;line-height:1.7;color:var(--ink)}.help-copy h3{font-size:18px;margin-bottom:8px}.help-copy kbd{border:1px solid #c6d6e6;padding:2px 5px;border-radius:4px;font-size:14px}.toast{position:fixed;left:50%;bottom:45px;transform:translateX(-50%);padding:14px 20px;background:#233e61;color:#fff;border-radius:6px;font-size:16px;line-height:1.5;z-index:100;max-width:90vw}.toast.error{background:#8b3b3b}
/* Publishing setup is explicit: proposed names are never labelled available. */
.publish-address{display:flex;align-items:center;flex-wrap:wrap;gap:8px;background:#edf4ff;border:1px solid #c7d8ee;padding:14px;border-radius:6px}.publish-address input{min-width:120px;flex:1;width:100%;min-height:48px;padding:10px;border:1px solid #a9bfd5;border-radius:4px;font-size:18px;color:var(--ink)}.publish-address span{font-size:16px}.publish-preview{font-size:16px;line-height:1.6;overflow-wrap:anywhere}.publish-note{font-size:15px;line-height:1.6;color:var(--muted)}.publish-status{font-size:16px;line-height:1.5;padding:14px;background:#fff6df;border-left:3px solid #b58217}.publish-status.invalid{border-color:#b33c3c;background:#fff1f1;color:#883131}.publish-label{display:block;font-size:16px;font-weight:700;margin-bottom:10px}
/* Compact utility shell stays faithful to the existing RoCode header. */
.rocodeHeaderMenu button{min-height:44px;font-size:15px}.course-link{margin-left:0;min-height:34px;font-size:14px;padding:0 12px;border:1px solid #ffffff94;border-radius:6px;background:#ffffff22}.course-link[aria-expanded=true]{background:#ffffff55}.publish-button{background:#fff;color:#275bab;border-color:#fff;font-weight:750}.publish-button:hover{background:#edf4ff}.workspace-strip{gap:12px}
@media(max-width:1000px){.studio-layout{grid-template-columns:minmax(260px,var(--preview-share,40fr)) 5px minmax(390px,var(--code-share,60fr))}.panel-toolbar{padding:0 10px}.insert-bar{padding:6px 10px;gap:5px}.insert-bar>span{display:none}.insert-bar button{padding:0 10px}.file-tab{min-width:90px}.preview-bottom{padding:0 10px}}
@media(max-width:720px){html,body{height:auto;min-height:100%;overflow:auto}.rocodeHeader{position:sticky;top:0;z-index:40}.rocodeAppHeader{padding:0 8px;gap:5px;flex-wrap:wrap;height:96px;align-content:center}.roboThinkLogo{width:104px;flex-basis:104px}.roboThinkLogo:after{width:100px}.rocodeProjectIdentity{margin-left:0;flex:1;padding:3px 2px}.header-spacer{display:none}.rocodeAppHeader .file-control{margin-left:auto}.rocodeAppHeader>button[data-action=projects]{display:none}.rocodeHeaderButton{min-height:38px}.rocodeHeader{background-size:auto 90px;background-color:#4f95ff}.rocodeAppHeader .help-button{margin-right:0}.workspace-strip{padding:0 10px}.studio-layout{display:flex;flex-direction:column}.preview-panel{width:100%;height:560px}.code-panel{width:100%;height:640px;border-top:1px solid var(--line)}.resize-handle{display:none}.preview-canvas{padding:10px}.mission-panel{position:fixed;top:134px;bottom:0}.studio-status{font-size:11px;padding:0 10px}.mission-grid,.projects-grid{grid-template-columns:1fr}.rocodeHeaderMenu{right:0}.file-tab{min-width:90px}.panel-title{font-size:16px}.text-size-control{margin-right:4px}.CodeMirror-linenumber{font-size:14px}.insert-bar>span{display:none}.preview-bottom,.code-bottom{font-size:12px}.code-bottom #file-language{display:none}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
