:root{color-scheme:dark;--header:64px;--ink:#e8eef8;--muted:#93a3b8;--line:#303b4c;--panel:#18212f;--panel-2:#111827;--editor:#0c111b;--green:#21a366;--blue:#3b82f6;--font:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;--mono:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace}*{box-sizing:border-box}html,body{height:100%}body{margin:0;overflow:hidden;color:var(--ink);background:#0b111b;font:14px/1.5 var(--font);-webkit-font-smoothing:antialiased}button,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent}a{color:inherit;text-decoration:none}:focus-visible{outline:3px solid rgb(96 165 250/.55);outline-offset:2px}.editor-header{height:var(--header);padding:0 16px;display:grid;grid-template-columns:minmax(220px,1fr) minmax(200px,1fr) minmax(340px,1fr);align-items:center;gap:18px;background:#17202d;border-bottom:1px solid var(--line)}.brand{width:max-content;display:flex;align-items:center;gap:10px}.brand>span{width:38px;height:38px;display:grid;place-items:center;color:#fff;background:#1769e0;border-radius:9px;font:750 11px var(--mono)}.brand strong{font-size:14px}.lesson-context{min-width:0;text-align:center}.lesson-context span,.lesson-context strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lesson-context span{color:#7f91aa;font-size:10px;letter-spacing:.08em;text-transform:uppercase}.lesson-context strong{margin-top:2px;font-size:13px}.editor-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px}.editor-actions a,.editor-actions button{min-height:40px;padding:0 13px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;font-weight:700;cursor:pointer}.back-link{color:#b8c4d3}.back-link:hover{color:#fff;background:#253246}.secondary-button{color:#c4cfdd;background:transparent;border:1px solid #435066}.secondary-button:hover{background:#253246}.run-button{gap:7px;color:#fff;background:var(--green);border:1px solid #2bb373;box-shadow:0 5px 18px rgb(33 163 102/.18)}.run-button:hover{background:#178652}.editor-workspace{height:calc(100% - var(--header));display:grid;grid-template-columns:minmax(380px,1fr) minmax(380px,1fr)}.code-panel,.result-panel{min-width:0;min-height:0}.code-panel{display:grid;grid-template-rows:minmax(0,1fr) 36px;border-right:1px solid var(--line)}.editors{min-height:0;display:grid;grid-template-rows:repeat(3,minmax(0,1fr));background:var(--editor)}.editor-pane{min-height:0;display:grid;grid-template-rows:36px minmax(0,1fr);border-bottom:1px solid var(--line)}.editor-pane:last-child{border-bottom:0}.editor-pane header{padding:0 12px;display:flex;align-items:center;gap:8px;color:#c3cedd;background:#151e2b;border-bottom:1px solid #252f3e;font:11px var(--mono)}.editor-pane header label{font-weight:750}.editor-pane header small{margin-left:auto;color:#64748b;font:10px var(--font)}.file-dot{width:8px;height:8px;border-radius:50%}.html-dot{background:#e34f26}.css-dot{background:#3b82f6}.js-dot{background:#eab308}.editor-pane textarea{width:100%;height:100%;padding:14px 16px;resize:none;color:#dbe8f7;background:var(--editor);border:0;outline:0;font:13px/1.65 var(--mono);tab-size:2;white-space:pre;caret-color:#7dd3fc}.editor-pane textarea:focus{background:#0e1521;box-shadow:inset 3px 0 #3b82f6}.editor-status{padding:0 12px;display:flex;align-items:center;justify-content:space-between;color:#77889d;background:#141d29;border-top:1px solid var(--line);font-size:10px}.editor-status>span{display:flex;align-items:center;gap:7px}.editor-status i{width:7px;height:7px;background:#2aa66a;border-radius:50%}.editor-status i.is-saving{background:#f59e0b}.editor-status kbd{padding:1px 4px;color:#a8b6c8;background:#253143;border:1px solid #3a4659;border-radius:4px;font:9px var(--font)}.result-panel{display:grid;grid-template-rows:43px minmax(0,1fr);background:#fff}.result-tabs{padding:0 10px;display:flex;align-items:center;gap:3px;color:#8c9aaf;background:#17202d;border-bottom:1px solid var(--line)}.result-tabs button{height:34px;padding:0 12px;color:inherit;background:transparent;border:0;border-radius:7px;cursor:pointer;font-size:12px}.result-tabs button:hover{color:#e4ebf5;background:#263246}.result-tabs button[aria-selected="true"]{color:#fff;background:#29364a}.result-tabs button span{min-width:17px;height:17px;margin-left:4px;padding:0 4px;display:inline-grid;place-items:center;color:#fff;background:#d84949;border-radius:999px;font-size:9px}.run-state{margin-left:auto;padding-right:5px;color:#6f8197;font-size:10px}.result-view{min-height:0;display:none}.result-view.is-active{display:block}.result-view iframe{width:100%;height:100%;display:block;background:#fff;border:0}.console-view{color:#d4deeb;background:#0a0f18}.console-view.is-active{display:grid;grid-template-rows:38px minmax(0,1fr)}.console-toolbar{padding:0 12px;display:flex;align-items:center;justify-content:space-between;color:#7f8fa5;background:#111923;border-bottom:1px solid #263142;font-size:10px}.console-toolbar button{padding:5px 9px;color:#aab7c8;background:transparent;border:0;border-radius:5px;cursor:pointer}.console-toolbar button:hover{color:#fff;background:#283448}.console-output{padding:8px 0;overflow:auto;font:12px/1.55 var(--mono)}.console-empty{margin:30px;padding:18px;color:#718197;text-align:center;border:1px dashed #2e3a4b;border-radius:8px}.console-line{margin:0;padding:7px 14px;display:grid;grid-template-columns:64px minmax(0,1fr);gap:10px;border-bottom:1px solid rgb(255 255 255/.045);white-space:pre-wrap;overflow-wrap:anywhere}.console-line time{color:#5e7088}.console-line.log{color:#d4deeb}.console-line.info{color:#8ec5ff}.console-line.warn{color:#f8cc72;background:rgb(245 158 11/.05)}.console-line.error{color:#ff9c9c;background:rgb(239 68 68/.07)}.mobile-tabs{display:none}.editor-toast{position:fixed;z-index:20;left:50%;bottom:16px;padding:10px 16px;color:#fff;background:#253246;border:1px solid #46566e;border-radius:999px;box-shadow:0 15px 45px rgb(0 0 0/.35);opacity:0;pointer-events:none;transform:translate(-50%,10px);transition:.18s}.editor-toast.is-visible{opacity:1;transform:translate(-50%,0)}
@media(max-width:920px){:root{--header:58px}.editor-header{padding:0 10px;grid-template-columns:1fr auto}.brand strong{display:none}.lesson-context{display:none}.back-link{display:none}.editor-workspace{grid-template-columns:1fr 1fr}.editor-actions a,.editor-actions button{min-height:38px;padding:0 10px}.shortcut{display:none}}
@media(max-width:680px){body{overflow:auto}.editor-header{position:sticky;z-index:5;top:0}.editor-workspace{height:auto;min-height:calc(100dvh - var(--header));display:block}.code-panel{height:54dvh;grid-template-rows:40px minmax(0,1fr) 32px;border-right:0;border-bottom:1px solid var(--line)}.mobile-tabs{display:flex;align-items:stretch;background:#151e2b;border-bottom:1px solid var(--line)}.mobile-tabs button{flex:1;color:#8090a5;background:transparent;border:0;border-bottom:2px solid transparent;font:11px var(--mono)}.mobile-tabs button[aria-selected="true"]{color:#fff;border-bottom-color:#3b82f6}.editors{display:block}.editor-pane{height:100%;display:none;border:0}.editor-pane.is-mobile-active{display:grid}.result-panel{height:46dvh}.run-state{display:none}}
@media(max-width:420px){.editor-actions .secondary-button{display:none}.brand>span{width:34px;height:34px}.run-button{padding:0 11px}.editor-status{font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition-duration:.01ms!important}}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
