:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #24272b;
  background: #f4f5f6;
  font-synthesis: none;
  --line: #dfe2e6;
  --muted: #6b7179;
  --accent: #385e9d;
  --selected: #eef3fa;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button, a, input, textarea, select { outline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #557bb3; }
button:disabled { opacity: .45; cursor: default; }
button:hover:not(:disabled) { background-color: #edf0f4; }
[hidden] { display: none !important; }
a { color: #385e9d; }
input, textarea, select { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 22px; min-height: 60px; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 18px; font-weight: 650; margin: 0; white-space: nowrap; letter-spacing: -.3px; }
.project-title { width: 215px; border: 0; border-left: 1px solid var(--line); padding: 5px 0 5px 18px; background: none; color: #626871; font-size: 12px; }
.global-save { color: #7a8088; font-size: 11px; margin-left: auto; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 7px; }
.button { display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; line-height: 1.4; padding: 8px 12px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: #3a4048; white-space: nowrap; text-decoration: none; }
.button.primary, .button.dark { background: #365d96; border-color: #365d96; color: #fff; }
.button.primary:hover, .button.dark:hover { background: #2d507f; }
.button.quiet { border-color: transparent; background: transparent; color: #646c76; }
.lesson-bar { display: flex; align-items: center; gap: 22px; min-height: 54px; margin: 0 20px; }
.lesson-label { font-size: 12px; font-weight: 600; white-space: nowrap; }
#progress-count { color: #858c94; font-size: 11px; font-weight: 400; margin-left: 9px; }
.mission-nav { display: flex; flex: 1; gap: 6px; max-width: 780px; }
.mission-nav button { display: flex; align-items: center; gap: 7px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #707781; padding: 9px 10px; font-size: 12px; white-space: nowrap; }
.mission-nav button>span { font: 11px var(--mono); color: #9299a1; }
.mission-nav button.active { border-bottom-color: #385e9d; color: #2b5086; }
.mission-nav button.done>span { color: #43825a; }
.workspace { margin: 0 20px; display: grid; grid-template-columns: minmax(350px, 1fr) minmax(370px, 1.2fr) 286px; gap: 12px; height: calc(100dvh - 225px); min-height: 500px; }
.studio, .preview-shell, .inspector-shell { background: #fff; border: 1px solid var(--line); border-radius: 6px; min-width: 0; overflow: hidden; }
.studio, .editor-shell { display: flex; flex-direction: column; min-height: 0; }
.editor-shell { flex: 1; }
.editor-toolbar, .preview-heading, .inspector-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 14px; min-height: 48px; border-bottom: 1px solid var(--line); }
.preview-heading h2, .inspector-heading h2 { font-size: 13px; font-weight: 600; margin: 0; }
.segmented { display: flex; gap: 20px; align-self: stretch; }
.segmented button { border: 0; border-bottom: 2px solid transparent; padding: 0 1px; background: none; font-size: 12px; color: #727983; }
.segmented button.active { color: #2d538a; border-bottom-color: #385e9d; }
.toolbar-button { width: 28px; height: 28px; border: 0; border-radius: 4px; color: #6d7580; background: transparent; font-size: 21px; line-height: 1; }
.editor-body { display: flex; flex: 1; min-height: 0; overflow: hidden; }
.builder-panel { flex: 1; min-width: 0; overflow: auto; padding: 15px 13px; scrollbar-width: thin; scrollbar-color: #c3c9d0 transparent; }
.tree-node { --scope-color: #8198b1; margin-left: 0; }
.tree-node[style*="--level:1"] { --scope-color: #8b9d88; }
.tree-node[style*="--level:2"] { --scope-color: #b09a82; }
.tree-node[style*="--level:3"] { --scope-color: #9d90b0; }
.drop-line { height: 5px; border-radius: 2px; }
.drop-line.drop-active { height: 7px; background: #7598c6; }
.block-heading { display: flex; align-items: center; gap: 3px; }
.block-row { display: flex; flex: 1; flex-wrap: wrap; gap: 8px; min-width: 0; align-items: center; min-height: 34px; border: 1px solid #e0e4e9; border-radius: 4px; background: #fafbfc; padding: 3px 7px; cursor: pointer; touch-action: none; }
.block-row:hover { background: #f0f3f7; border-color: #b4c0d0; }
.block-row.selected { background: #eef3fa; border-color: #7393bf; }
.block-row.dragging { opacity: .4; }
.fold-button, .leaf-mark { flex-shrink: 0; width: 15px; padding: 0; text-align: center; border: 0; background: none; font: 19px var(--mono); color: #8b929b; }
.leaf-mark { font-size: 14px; color: #afb7c0; }
.tag-name { flex-shrink: 0; font: 11px var(--mono); color: #7d5c41; }
.tag-name.container { color: #41648a; }
.node-summary { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; color: #454d57; }
.block-select { display: flex; flex: 1; min-width: 0; gap: 8px; align-items: center; padding: 4px 2px; border: 0; background: transparent; text-align: left; }
.block-select:hover:not(:disabled) { background: transparent; }
.node-class-input { width: 128px; max-width: 45%; min-width: 58px; border: 1px solid #dce2e9; border-radius: 3px; padding: 4px 6px; background: #fff; color: #4e6481; font: 11px var(--mono); cursor: text; touch-action: auto; }
.node-class-input::placeholder { color: #8a939f; }
.node-class-input:focus { border-color: #7393bf; }
.block-row-actions { display: none; flex-basis: 100%; justify-content: space-between; gap: 8px; border-top: 1px solid #dce4ef; padding: 4px 0 1px; }
.block-row.selected>.block-row-actions { display: flex; }
.block-row-actions button { border: 0; padding: 3px 2px; background: transparent; color: #657386; font-size: 10px; }
.block-row-actions .delete-block-button { color: #9a4646; }
.scope-content { margin-left: 20px; }
.scope-open, .scope-close b { color: var(--scope-color); font: 500 21px/1.2 var(--mono); }
.scope-open { padding-top: 2px; }
.scope-body { border-left: 1px solid var(--scope-color); margin-left: 6px; padding-left: 12px; }
.scope-close { display: flex; align-items: center; gap: 8px; min-height: 25px; }
.scope-close span { color: #8a95a3; font: 10px var(--mono); }
.scope-inline { display: none; flex-shrink: 0; font: 14px var(--mono); color: var(--scope-color); }
.scope-collapsed>.scope-content { display: none; }
.scope-collapsed>.block-heading .scope-inline { display: inline; }
.scope-collapsed.drop-expanded>.scope-content { display: block; }
.scope-collapsed.drop-expanded>.block-heading .scope-inline { display: none; }
.nesting-drop { display: none; padding: 13px; margin: 5px 0; border: 1px dashed #b7c4d6; border-radius: 4px; background: #f7f9fc; color: #60768f; font-size: 11px; }
.empty-node>.scope-content>.scope-body>.nesting-drop, .drop-expanded>.scope-content>.scope-body>.nesting-drop { display: block; }
.drop-expanded>.scope-content>.scope-body { min-height: 60px; border-left-color: #517bad; background: #eaf1f9; }
.drop-expanded>.scope-content>.scope-body>.nesting-drop, .drop-inside { border-color: #7196c6; background: #e7eff9; }
.direct-text { padding: 7px; margin: 4px 0; color: #6c7580; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.append-zone { border: 1px dashed #d6dce4; border-radius: 4px; margin: 12px 0 0 19px; padding: 12px; text-align: center; font-size: 11px; color: #87919e; }
.append-zone.drop-active { background: #eaf1f9; border-color: #7598c6; }
.block-library { border-top: 1px solid var(--line); padding: 11px 13px; background: #fcfcfd; }
.library-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: #6b737e; font-size: 11px; }
.library-heading button { color: #42658f; background: none; border: 0; padding: 0; font-size: 11px; }
.library-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.library-item { display: flex; align-items: center; gap: 7px; min-width: 0; border: 1px solid #dfe3e9; border-radius: 4px; background: #fff; color: #4e5762; padding: 8px; font-size: 11px; text-align: left; touch-action: none; cursor: grab; white-space: nowrap; }
.library-item b { font: 10px var(--mono); color: #7b8797; min-width: 18px; }
.editor-status { display: flex; justify-content: space-between; min-height: 25px; border-top: 1px solid #eceef1; padding: 6px 13px; font-size: 10px; color: #8b939e; }
.code-panel { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.code-file-header { display: flex; justify-content: space-between; align-items: center; height: 42px; padding: 8px 14px; color: #798391; font-size: 11px; }
.small-button { background: #f2f5f9; border: 1px solid #d9e1eb; border-radius: 4px; padding: 5px 9px; color: #4c6586; font-size: 11px; }
.code-content { display: flex; flex: 1; min-height: 0; padding: 8px 0; overflow: hidden; }
.line-numbers { min-width: 36px; font: 11px/1.8 var(--mono); color: #a8b1bd; text-align: right; white-space: pre; overflow: hidden; padding: 0 9px; user-select: none; }
#code-editor { flex: 1; width: 100%; background: #fff; color: #344354; border: 0; resize: none; white-space: pre; font: 11px/1.8 var(--mono); padding: 0 12px 15px 4px; tab-size: 2; }
.code-hint { padding: 10px 13px; background: #f7f9fc; border-top: 1px solid var(--line); color: #758498; font-size: 10px; line-height: 1.6; }
.preview-shell { display: flex; flex-direction: column; }
.preview-tools { display: flex; gap: 4px; }
.preview-options { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.toggle-label { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #69727e; cursor: pointer; }
input[type=checkbox] { width: 13px; height: 13px; margin: 0; accent-color: #486b9d; }
.site-panel { display: flex; flex: 1; min-height: 0; position: relative; overflow: hidden; padding: 10px; background: #eef0f3; }
.preview-stage { flex: 1; position: relative; min-width: 0; overflow: hidden; background: #fff; border: 1px solid #e5e8ee; border-radius: 2px; }
#preview-frame { position: absolute; top: 0; border: 0; background: #fff; transform-origin: top left; }
.script-error { position: absolute; bottom: 0; left: 0; right: 0; border-top: 1px solid #e4c7c2; padding: 10px 13px; background: #fff6f4; color: #924c40; font-size: 11px; line-height: 1.5; }
.inspector-shell { display: flex; flex-direction: column; }
.element-properties { flex: 1; min-height: 0; overflow: auto; padding: 14px; scrollbar-width: thin; scrollbar-color: #c4cbd4 transparent; }
.nesting-trail { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-bottom: 14px; color: #9aa3b0; font: 10px var(--mono); }
.nesting-trail button { padding: 0; border: 0; background: transparent; color: #738397; font: inherit; }
.property-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.property-heading>b { color: #41648a; font: 12px var(--mono); }
.node-actions { display: flex; gap: 4px; }
.node-actions button { width: 24px; height: 24px; padding: 0; background: #f6f7f9; border: 1px solid #e4e8ee; border-radius: 3px; color: #7b8593; font-size: 14px; }
.node-actions .delete-block-button { width: auto; padding: 0 7px; color: #9a4646; font-size: 10px; }
.property-fields, .style-fields, .flex-fields { display: flex; flex-direction: column; gap: 13px; }
.property-fields label, .style-fields label, .flex-fields label, .class-fields label { display: flex; flex-direction: column; gap: 7px; color: #616b78; font-size: 11px; }
.property-fields input, .property-fields textarea, .property-fields select, .style-fields select, .flex-fields select, .class-fields input:not([type=checkbox]), .class-fields select { width: 100%; border: 1px solid #d9dfe7; border-radius: 4px; background: #fff; color: #3e4856; padding: 8px 9px; font-size: 12px; resize: vertical; }
.property-fields input::placeholder { color: #a2aab5; }
.class-field-row { display: flex; gap: 5px; }
.class-field-row input { flex: 1; }
.class-field-row button { width: 30px; flex-shrink: 0; border: 1px solid #d8e0ea; border-radius: 4px; background: #f3f6fa; color: #647b99; font-size: 18px; }
.inspector-section { margin-top: 18px; padding-top: 15px; border-top: 1px solid #e7ebf0; }
.inspector-section>summary { display: flex; justify-content: space-between; align-items: center; list-style: none; cursor: pointer; font-size: 12px; font-weight: 600; color: #4d5d72; }
.inspector-section>summary::after { content: '⌄'; color: #8f9aaa; }
.inspector-section[open]>summary { margin-bottom: 14px; }
.element-properties>.inspector-section:first-of-type { margin-top: 0; }
.element-properties>.inspector-section+.property-fields { margin-top: 20px; padding-top: 16px; border-top: 1px solid #e7ebf0; }
.style-target-note { font: 10px var(--mono); color: #7b899d; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-triple { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.color-control { display: flex; align-items: center; gap: 6px; border: 1px solid #dce2ea; border-radius: 4px; padding: 5px 6px; }
.color-control input { width: 24px; height: 23px; border: 0; background: none; padding: 0; }
.color-control span { color: #8290a3; font: 9px var(--mono); }
.slider-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.slider-label-row output { color: #8794a5; font: 10px var(--mono); }
.width-limit-control { display: flex; gap: 6px; }
.width-limit-control .width-limit-value { width: 100%; border: 1px solid #d9dfe7; border-radius: 4px; padding: 7px 9px; background: #fff; color: #3e4856; font-size: 12px; }
.width-limit-control button { border: 1px solid #d9dfe7; border-radius: 4px; padding: 4px 7px; background: #fafbfc; color: #6d7784; font-size: 10px; }
.style-fields label>small { color: #87909b; font-size: 10px; line-height: 1.4; }
.padding-controls { display: flex; flex-direction: column; gap: 10px; }
.padding-controls>b { color: #616b78; font-size: 11px; font-weight: 500; }
.padding-sides { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.padding-sides input { width: 100%; border: 1px solid #d9dfe7; border-radius: 4px; padding: 7px 9px; background: #fff; color: #3e4856; font-size: 12px; }
.property-fields input[type=range], .style-fields input[type=range], .flex-fields input[type=range] { accent-color: #6a84aa; width: 100%; padding: 0; margin: 0; border: 0; }
.checkbox-field { display: flex !important; flex-direction: row !important; align-items: center; gap: 7px !important; }
.direction-buttons { display: flex; gap: 6px; }
.flex-wrap-help { color: #87909b; font-size: 10px; line-height: 1.4; }
.direction-buttons button { flex: 1; background: #fafbfc; border: 1px solid #dce2ea; border-radius: 4px; padding: 8px; font-size: 11px; color: #748398; }
.direction-buttons button.active { color: #3b5d8b; background: #eef3fa; border-color: #a9bedb; }
.position-presets { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; }
.position-presets>span { grid-column: 1/-1; color: #6e7c8f; font-size: 11px; }
.position-presets button { border: 1px solid #dbe2ec; background: #fff; padding: 7px 3px; border-radius: 4px; color: #6b7c92; font-size: 11px; }
.flex-parent-link { margin-top: 17px; border-top: 1px solid #e7ebf0; padding-top: 14px; }
.flex-parent-link button { background: none; border: 0; padding: 0; color: #5c779a; font-size: 11px; }
.image-property-thumb { display: block; width: 100%; height: 128px; object-fit: contain; background: #f4f5f7; border: 1px solid #e2e7ee; border-radius: 4px; }
.image-choose-button { background: #fff; border: 1px solid #d9e1ec; border-radius: 4px; color: #657c9c; font-size: 11px; padding: 8px; }
.model-details { font-size: 10px; color: #8592a4; }
.model-details>summary { cursor: pointer; }
.box-model { padding: 6px; margin-top: 8px; text-align: center; font-size: 9px; border: 1px dashed #c4c2b8; background: #f7f5ee; }
.box-model>div { padding: 6px; margin-top: 4px; background: #f0f3e9; border: 1px solid #ccd7bb; }
.box-model>div>div { padding: 6px; margin-top: 4px; background: #f2f7ee; border: 1px dashed #b5c9a7; }
.box-model b { display: block; font-weight: 400; padding: 7px; margin-top: 4px; border: 1px solid #bacdd9; background: #edf3f7; }
.mission-card { display: flex; align-items: center; gap: 12px; margin: 12px 20px 16px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 13px 15px; min-height: 77px; }
.mission-number { color: #8b96a5; font: 16px var(--mono); border-right: 1px solid var(--line); padding-right: 14px; }
.mission-text { flex: 1; min-width: 0; }
.mission-text h2 { margin: 0 0 5px; font-size: 13px; font-weight: 600; }
.mission-text p { margin: 0; font-size: 12px; color: #6c7684; line-height: 1.6; }
.mission-actions { display: flex; align-items: center; gap: 6px; }
.mission-actions .button { font-size: 11px; }
.hint-box { margin: -5px 20px 16px; padding: 12px 15px; background: #f8fafd; border: 1px solid #dee5ef; border-radius: 5px; color: #62758f; font-size: 12px; line-height: 1.8; }
code { font-family: var(--mono); }
.hint-box code, .help-tip code { color: #48658a; font-size: .95em; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 90; max-width: 85vw; padding: 11px 16px; background: #323d4d; color: #fff; border-radius: 5px; font-size: 12px; line-height: 1.6; box-shadow: 0 4px 18px #15203525; }
.drag-ghost { position: fixed; pointer-events: none; z-index: 100; background: #e9f0fa; color: #42618b; border: 1px solid #94acd0; padding: 8px 12px; border-radius: 4px; font-size: 12px; }
.modal { width: 570px; max-width: calc(100vw - 36px); max-height: 88dvh; overflow: auto; border: 1px solid #d4dbe5; border-radius: 8px; background: #fff; padding: 24px; color: #303a48; box-shadow: 0 16px 70px #1e293b2c; }
.modal::backdrop { background: #27334555; }
.modal-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.modal-heading h2 { font-size: 19px; font-weight: 600; letter-spacing: -.3px; margin: 0; }
.modal-close { width: 28px; height: 28px; padding: 0; flex-shrink: 0; background: none; color: #8a97a8; border: 0; border-radius: 4px; font-size: 23px; }
.modal-intro { font-size: 12px; line-height: 1.8; color: #78879a; margin: 0 0 18px; }
.modal-intro:empty { display: none; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #e4e9f0; padding-top: 17px; margin-top: 20px; }
.modal-footer>span { font-size: 11px; color: #8795a8; line-height: 1.6; }
.gallery-modal { width: 760px; }
.gallery-toolbar { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin-bottom: 16px; }
.gallery-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.gallery-filters button { border: 0; border-radius: 4px; background: none; color: #8591a2; font-size: 12px; padding: 6px 9px; }
.gallery-filters button.active { color: #425e85; background: #edf2f8; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.gallery-item { display: block; padding: 0; text-align: left; border: 1px solid #dce3ed; border-radius: 5px; overflow: hidden; background: #fff; min-width: 0; }
.gallery-item:hover { border-color: #819cc1; }
.gallery-item img { display: block; width: 100%; height: auto; aspect-ratio: 3/2; object-fit: contain; background: #f2f4f7; }
.gallery-item>span { display: block; padding: 9px 10px; color: #5a6a80; font-size: 12px; }
.gallery-note { font-size: 10px; margin-top: 16px; }
.gallery-note a { color: #8c9aae; text-decoration: none; }
.upload-status { color: #95643e; font-size: 12px; line-height: 1.7; }
.upload-status:empty { display: none; }
.phone-upload-panel { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; padding: 16px; border: 1px solid #dae2ed; background: #f7f9fc; border-radius: 5px; }
.phone-upload-panel img { width: 192px; height: 192px; flex-shrink: 0; image-rendering: pixelated; }
.phone-upload-panel h3 { margin: 0 0 9px; font-size: 14px; font-weight: 600; }
.phone-upload-panel p { color: #7a899d; font-size: 12px; line-height: 1.8; }
.phone-upload-panel a { font-size: 11px; color: #5d789f; }
.class-fields { display: flex; flex-direction: column; gap: 14px; }
.class-fields small { color: #95a1b2; font-size: 10px; }
.class-fields input[type=color] { height: 37px; padding: 4px; }
.class-output { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; border: 1px solid #dfe6ee; border-radius: 4px; margin-top: 18px; padding: 14px; align-items: center; }
.class-output pre { font: 11px/1.7 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: #75879f; margin: 0; }
#class-sample { overflow: hidden; line-height: 1.5; }
.project-list { display: flex; flex-direction: column; gap: 8px; }
.projects-modal { width: 650px; }
.project-item { display: flex; align-items: center; gap: 12px; border: 1px solid #dfe5ee; padding: 12px; border-radius: 4px; }
.project-item.active { border-color: #a3b7d3; background: #f3f6fb; }
.project-item-mark { font: 16px var(--mono); color: #99a7bb; }
.project-item-text { flex: 1; min-width: 0; }
.project-item-text b { display: block; font-size: 12px; font-weight: 600; color: #5f728b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-item-text small { display: block; margin-top: 5px; color: #9aa6b6; font-size: 10px; }
.project-item>button { padding: 7px 10px; border: 1px solid #dbe3ef; border-radius: 4px; background: #fff; color: #788da9; font-size: 11px; }
.project-versions { padding: 3px 12px; margin-bottom: 8px; color: #8e9db2; font-size: 11px; }
.project-versions summary { cursor: pointer; }
.project-versions button { display: flex; justify-content: space-between; width: 100%; padding: 8px 0; background: none; border: 0; color: #94a3b7; font-size: 11px; }
.result-options { display: flex; flex-direction: column; gap: 9px; }
.result-options button { display: flex; align-items: center; gap: 14px; border: 1px solid #dce5ef; border-radius: 5px; padding: 16px; background: #fff; text-align: left; color: #98a8bd; }
.result-options button>div { flex: 1; }
.result-options b { display: block; font-size: 13px; font-weight: 600; color: #647a98; }
.result-options small { display: block; margin-top: 5px; color: #98a7ba; font-size: 11px; }
.result-options em { font-style: normal; }
.code-modal { width: 650px; }
#project-code-text { width: 100%; height: 170px; border: 1px solid #dce5f0; background: #f7f9fc; border-radius: 4px; color: #7e91ab; padding: 12px; resize: vertical; font: 11px/1.6 var(--mono); overflow-wrap: anywhere; }
.transfer-status { color: #8094ae; font-size: 11px; line-height: 1.7; }
.fullscreen-modal { width: 1050px; height: 90dvh; overflow: hidden; }
.fullscreen-modal iframe { border: 1px solid #dfe5ed; width: 100%; height: calc(100% - 45px); background: #fff; }
.help-modal { width: 720px; }
.help-files { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.help-files h3 { color: #647a98; font-size: 13px; margin: 10px 0; }
.help-files p, .help-tip p { color: #8192aa; font-size: 12px; line-height: 1.8; }
.file-type { color: #7f97b7; font: 12px var(--mono); }
.help-tip { padding: 14px 0 0; margin-top: 14px; border-top: 1px solid #e1e8f1; }
.help-tip b { color: #6982a3; font-size: 12px; }
.help-tip a { font-size: 11px; }
@media(min-width:1700px) { .workspace { grid-template-columns: minmax(470px,1fr) minmax(500px,1.2fr) 310px; } .node-summary { font-size: 13px; } }
@media(max-width:1200px) { .topbar { gap: 13px; } .project-title { width: 150px; } .global-save { display: none; } .header-actions { margin-left: auto; } .workspace { grid-template-columns: minmax(350px,1fr) minmax(370px,1fr); height: auto; grid-template-rows: 650px auto; } .inspector-shell { grid-column: 1/-1; } .element-properties { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: start; gap: 18px; overflow: visible; } .nesting-trail, .property-heading { grid-column: 1/-1; margin: 0; } .inspector-section { margin: 0; padding: 0 0 0 18px; border-top: 0; border-left: 1px solid #e0e7f0; } .element-properties>.inspector-section+.property-fields { padding-top: 0; margin-top: 0; border-top: 0; } .flex-parent-link { margin-top: 0; } }
@media(max-width:850px) { .topbar { flex-wrap: wrap; padding: 13px 16px; gap: 12px; } .topbar h1 { font-size: 16px; } .project-title { margin-left: auto; width: 160px; } .header-actions { width: 100%; justify-content: flex-end; } .lesson-bar { margin: 0 16px; gap: 12px; align-items: flex-start; padding: 10px 0; } .mission-nav { flex-wrap: wrap; gap: 0; } .mission-nav button { padding: 6px 9px; font-size: 11px; } .lesson-label { padding-top: 6px; } .workspace { display: flex; flex-direction: column; margin: 0 16px; } .studio { height: 650px; } .preview-shell { height: 640px; } .element-properties { display: block; } .inspector-section { margin-top: 18px; padding: 15px 0 0; border-left: 0; border-top: 1px solid #e3e9f1; } .element-properties>.inspector-section+.property-fields { margin-top: 18px; padding-top: 15px; border-top: 1px solid #e3e9f1; } .nesting-trail { margin-bottom: 13px; } .property-heading { margin-bottom: 15px; } .mission-card { margin: 12px 16px; flex-wrap: wrap; } .mission-actions { margin-left: 28px; } .hint-box { margin-left: 16px; margin-right: 16px; } }
@media(max-width:550px) { .project-title { width: 145px; padding-left: 12px; } .button { font-size: 11px; } .header-actions { justify-content: space-between; gap: 5px; } .lesson-bar { flex-direction: column; gap: 2px; } .lesson-label { font-size: 11px; } .mission-nav { max-width: none; } .mission-nav button { gap: 5px; padding: 7px 8px; } .gallery-toolbar { flex-wrap: wrap; gap: 10px; } .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; } .phone-upload-panel { flex-direction: column; align-items: flex-start; } .modal { padding: 19px; } .modal-footer { flex-wrap: wrap; } .modal-footer .button { margin-left: auto; } .class-output, .help-files { grid-template-columns: 1fr; } .node-class-input { width: 100px; } .scope-content { margin-left: 12px; } .scope-body { padding-left: 8px; } .node-summary { font-size: 11px; } .library-item { font-size: 10px; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; } }
/* Lesson tasks: theory before work, measurable steps beneath the editor. */
.workspace { height: calc(100dvh - 340px); min-height: 465px; }
.mission-nav { max-width: none; }
.mission-nav button { gap: 8px; }
.mission-nav button small { font: 10px var(--mono); color: #8b96a5; }
.mission-nav button:disabled { opacity: .55; cursor: not-allowed; }
.mission-card { display: block; padding: 14px 16px 10px; }
.task-heading { display: flex; align-items: flex-start; gap: 13px; }
.task-heading .mission-number { padding-top: 2px; }
.task-heading .mission-text p { max-width: 950px; }
.task-meter { width: 130px; flex-shrink: 0; display: grid; grid-template-columns: 1fr; gap: 5px; text-align: right; }
.task-meter>span { font: 600 19px var(--mono); color: #3c5e8b; }
.task-meter small { color: #8995a5; font-size: 10px; }
.task-meter progress { width: 100%; height: 5px; appearance: none; border: 0; border-radius: 3px; overflow: hidden; background: #e9edf3; color: #577eaf; }
.task-meter progress::-webkit-progress-bar { background: #e9edf3; }
.task-meter progress::-webkit-progress-value { background: #577eaf; transition: width .2s; }
.task-meter progress::-moz-progress-bar { background: #577eaf; }
.task-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #ebeff4; }
.next-step { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 12px; line-height: 1.6; }
.next-step b { color: #405d81; font-size: 11px; font-weight: 600; }
.next-step span { color: #6c7c90; }
.task-success { padding: 10px 12px; margin: 11px 0 0; background: #f0f7f2; border: 1px solid #d3e7d9; border-radius: 4px; font-size: 12px; line-height: 1.7; color: #427750; }
.task-details { margin-top: 9px; font-size: 11px; color: #8090a6; }
.task-details summary { cursor: pointer; display: inline list-item; }
#task-checklist { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 22px; padding: 10px 0 0; margin: 0; list-style: none; }
#task-checklist li { display: flex; align-items: flex-start; gap: 7px; line-height: 1.7; color: #7d8c9f; }
#task-checklist li.done { color: #4c805b; }
#task-checklist li>span { flex-shrink: 0; font-family: var(--mono); }
.assigned-classes { display: flex; gap: 5px; flex-wrap: wrap; }
.assigned-classes button { color: #537297; border: 1px solid #d6e0ec; border-radius: 3px; background: #f6f8fb; padding: 4px 7px; font: 10px var(--mono); }
.assigned-class { display: inline-flex; }
.assigned-class>[data-edit-class] { border-radius: 3px 0 0 3px; }
.assigned-class>.remove-class-button { border-left: 0; border-radius: 0 3px 3px 0; color: #8b5555; font-family: inherit; }
.theory-modal { width: 770px; padding: 26px 30px 0; max-height: 88dvh; }
.theory-heading>span { display: block; color: #8292a8; font-size: 11px; margin-bottom: 8px; }
.theory-heading h2 { color: #354a65; font-size: 23px; font-weight: 600; letter-spacing: -.4px; line-height: 1.25; margin: 0 0 22px; }
.theory-content h3, .theory-assignment h3 { color: #4f6888; font-size: 14px; font-weight: 600; margin: 21px 0 8px; }
.theory-content p { color: #6c7e95; font-size: 13px; line-height: 1.85; margin: 0 0 12px; }
.theory-content code { color: #4f7098; background: #f1f5fa; border-radius: 3px; padding: 1px 4px; font-size: 12px; overflow-wrap: anywhere; }
.theory-content pre { padding: 15px 17px; border: 1px solid #dfe7f1; background: #f7f9fc; border-radius: 5px; font: 12px/1.8 var(--mono); color: #7288a5; white-space: pre-wrap; overflow-wrap: anywhere; }
.semantic-list { display: grid; grid-template-columns: 105px 1fr; gap: 8px 13px; font-size: 12px; line-height: 1.7; }
.semantic-list dt { font: 12px/1.7 var(--mono); color: #5a7599; }
.semantic-list dd { margin: 0; color: #7c8da5; }
.theory-assignment { padding: 0 17px 15px; background: #f4f7fb; border: 1px solid #dee7f3; border-radius: 5px; margin-top: 21px; }
.theory-assignment ol { padding-left: 19px; margin: 8px 0 0; color: #6e829f; font-size: 12px; line-height: 1.8; }
.theory-assignment li+li { margin-top: 6px; }
.theory-sources { display: flex; gap: 15px; flex-wrap: wrap; padding: 15px 0; }
.theory-sources a { color: #8b9bb1; font-size: 10px; text-decoration: none; }
.theory-footer { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 0 20px; border-top: 1px solid #dfe7f1; background: #fff; }
.theory-footer>span { font-size: 11px; color: #91a1b7; line-height: 1.6; }
@media(max-width:1200px) { .workspace { height: auto; min-height: 0; } .task-heading .mission-text p { max-width: none; } }
@media(max-width:850px) { .task-heading { gap: 10px; } .task-meter { width: 85px; } .task-footer { align-items: flex-start; flex-direction: column; gap: 10px; } .mission-actions { margin-left: 0; flex-wrap: wrap; } #task-checklist { grid-template-columns: 1fr; } .theory-modal { padding: 22px 20px 0; } .theory-heading h2 { font-size: 21px; } .theory-footer>span { max-width: 220px; } }
@media(max-width:550px) { .mission-nav button { padding-left: 7px; padding-right: 7px; font-size: 10px; gap: 5px; } .mission-nav button small { font-size: 9px; } .task-heading { flex-wrap: wrap; } .task-heading .mission-text { min-width: 180px; } .task-meter { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; } .task-meter progress { flex: 1; width: auto; } .task-meter small { white-space: nowrap; } .semantic-list { grid-template-columns: 75px 1fr; gap: 7px 9px; } .theory-footer { flex-wrap: wrap; } .theory-footer>span { max-width: none; } .theory-footer button { margin-left: auto; } }
