:root {
  --bg: #0c1112;
  --panel: #11191a;
  --panel-2: #152022;
  --line: rgba(216, 231, 221, 0.12);
  --line-strong: rgba(216, 231, 221, 0.22);
  --text: #f2f4ed;
  --muted: #a7b2ad;
  --muted-2: #70807b;
  --mint: #b9f5da;
  --teal: #5cd6bb;
  --gold: #f4c56c;
  --red: #ff8d78;
  --blue: #89c8ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Noto Sans SC", "Manrope", sans-serif; }
button, input { font: inherit; }
button { color: inherit; }

.app-shell { display: grid; grid-template-columns: 290px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: relative; display: flex; flex-direction: column; min-height: 100vh; padding: 32px 24px 24px; background: #101719; border-right: 1px solid var(--line); overflow: hidden; }
.sidebar::before { content: ""; position: absolute; width: 240px; height: 240px; right: -130px; bottom: 150px; border: 1px solid rgba(185, 245, 218, .11); border-radius: 50%; box-shadow: 0 0 0 24px rgba(185, 245, 218, .025), 0 0 0 48px rgba(185, 245, 218, .018); pointer-events: none; }
.brand-mark { display: flex; align-items: center; gap: 11px; margin-bottom: 42px; }
.brand-orbit { position: relative; width: 30px; height: 30px; border: 1px solid var(--teal); border-radius: 50%; transform: rotate(-24deg); }
.brand-orbit::before, .brand-orbit::after { content: ""; position: absolute; inset: 4px 8px; border: 1px solid rgba(92, 214, 187, .7); border-radius: 50%; }
.brand-orbit::after { transform: rotate(90deg); }
.brand-orbit span { position: absolute; width: 4px; height: 4px; background: var(--gold); border-radius: 50%; }
.brand-orbit span:nth-child(1) { top: 2px; left: 12px; }.brand-orbit span:nth-child(2) { right: 2px; bottom: 7px; }.brand-orbit span:nth-child(3) { left: 2px; bottom: 6px; }
.brand-name { font: 700 13px/1 "DM Mono", monospace; letter-spacing: .12em; }.brand-subtitle { margin-top: 5px; color: var(--muted-2); font-size: 11px; }
.course-label, .eyebrow, .concept-kicker, .goal-label { color: var(--teal); font: 500 10px/1.2 "DM Mono", monospace; letter-spacing: .1em; text-transform: uppercase; }
.sidebar h1 { margin: 14px 0 15px; font-size: 28px; line-height: 1.22; font-weight: 900; letter-spacing: -.04em; }.sidebar h1 em { color: var(--mint); font-style: normal; }
.sidebar-intro { max-width: 210px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.module-list { display: grid; gap: 7px; margin-top: 38px; }
.module-item { display: grid; grid-template-columns: 27px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-width: 0; padding: 13px 12px; border: 1px solid transparent; border-radius: 3px; background: transparent; cursor: pointer; text-align: left; transition: border-color .2s, background .2s, transform .2s; }
.module-item:hover { border-color: var(--line-strong); background: rgba(255,255,255,.025); transform: translateX(2px); }.module-item.is-active { border-color: rgba(92,214,187,.35); background: rgba(92,214,187,.08); }
.module-number { color: var(--muted-2); font: 500 11px "DM Mono", monospace; }.is-active .module-number { color: var(--teal); }
.module-copy { display: grid; gap: 4px; min-width: 0; }.module-copy strong { font-size: 13px; font-weight: 700; }.module-copy small { color: var(--muted-2); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.module-state { color: var(--muted-2); font: 10px "DM Mono", monospace; white-space: nowrap; }.module-state.is-done { color: var(--gold); }
.sidebar-footer { margin-top: auto; padding-top: 28px; }.progress-track { height: 3px; background: rgba(255,255,255,.1); }.progress-track span { display: block; width: 0; height: 100%; background: var(--teal); transition: width .35s; }.progress-meta { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted-2); font-size: 11px; }.progress-meta strong { color: var(--mint); font: 500 11px "DM Mono", monospace; }.sidebar-footer p { margin: 18px 0 0; color: var(--muted-2); font-size: 11px; line-height: 1.6; }

.main-stage { min-width: 0; padding: 0 42px 40px; background: radial-gradient(circle at 82% 0%, rgba(61, 145, 126, .09), transparent 36%), var(--bg); }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 70px; border-bottom: 1px solid var(--line); }.breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--muted-2); font-size: 11px; }.breadcrumb b { color: #4e5c59; font-weight: 400; }.breadcrumb strong { color: var(--text); font-weight: 600; }.topbar-actions { display: flex; align-items: center; gap: 14px; }.score-pill { display: flex; align-items: center; gap: 8px; color: var(--gold); font: 500 11px "DM Mono", monospace; }.score-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 14px var(--gold); }.quiet-button, .toolbar-button { border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 11px; padding: 8px 12px; border-radius: 2px; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }.quiet-button:hover, .toolbar-button:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255,255,255,.04); }
.workspace-head { display: flex; justify-content: space-between; gap: 28px; padding: 34px 0 28px; }.workspace-head h2 { margin: 9px 0 8px; font-size: clamp(26px, 3vw, 38px); line-height: 1.08; letter-spacing: -.055em; }.workspace-head p { max-width: 580px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }.goal-card { width: 270px; flex: 0 0 270px; align-self: flex-end; padding: 14px 16px; border-left: 2px solid var(--gold); background: rgba(244, 197, 108, .055); }.goal-card strong { display: block; margin: 7px 0 4px; font-size: 13px; }.goal-card span:last-child { color: var(--muted); font-size: 11px; line-height: 1.5; }
.lab-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr); gap: 16px; align-items: start; }.preview-column, .control-column { min-width: 0; }.preview-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: var(--muted-2); font-size: 11px; }.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; }.live-indicator { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(92,214,187,.12), 0 0 16px rgba(92,214,187,.7); }.toolbar-divider { width: 1px; height: 12px; background: var(--line); }.mono { font-family: "DM Mono", monospace; }
.canvas-frame { position: relative; aspect-ratio: 16/9; overflow: hidden; border: 1px solid var(--line-strong); background: #06090a; box-shadow: var(--shadow); }.canvas-frame canvas { display: block; width: 100%; height: 100%; }.canvas-overlay { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); background: rgba(6,9,10,.78); font: 11px "DM Mono", monospace; transition: opacity .3s; }.canvas-overlay.is-hidden { opacity: 0; pointer-events: none; }.canvas-corner-label { position: absolute; top: 13px; right: 14px; color: rgba(242,244,237,.6); font: 10px "DM Mono", monospace; letter-spacing: .06em; }.timeline-row { display: flex; align-items: center; gap: 12px; padding: 12px 0 9px; }.timeline-time { min-width: 62px; color: var(--muted-2); font-size: 10px; }.timeline-time:last-child { text-align: right; }.timeline-row input { flex: 1; min-width: 0; height: 3px; appearance: none; background: linear-gradient(90deg, var(--teal) 0%, var(--teal) var(--progress, 0%), rgba(255,255,255,.14) var(--progress, 0%)); outline: none; }.timeline-row input::-webkit-slider-thumb { width: 12px; height: 12px; appearance: none; border: 2px solid var(--bg); border-radius: 50%; background: var(--mint); cursor: pointer; }.timeline-row input::-moz-range-thumb { width: 12px; height: 12px; border: 2px solid var(--bg); border-radius: 50%; background: var(--mint); cursor: pointer; }.compare-note { display: flex; align-items: center; gap: 8px; min-height: 31px; padding: 8px 11px; border: 1px solid var(--line); color: var(--muted-2); font-size: 10px; line-height: 1.5; }.note-mark { display: grid; flex: 0 0 15px; place-items: center; width: 15px; height: 15px; border: 1px solid var(--muted-2); border-radius: 50%; font: 10px "DM Mono", monospace; }
.control-column { border: 1px solid var(--line); background: rgba(17,25,26,.72); }.control-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 17px; border-bottom: 1px solid var(--line); }.control-header h3 { margin: 0; font-size: 13px; }.control-header span { color: var(--muted-2); font: 10px "DM Mono", monospace; }.control-body { padding: 8px 16px 16px; }.control-section { padding: 15px 0 12px; border-bottom: 1px solid var(--line); }.control-section:last-child { border-bottom: 0; }.section-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }.section-label strong { color: var(--text); font-size: 11px; font-weight: 600; }.section-label span { color: var(--muted-2); font: 10px "DM Mono", monospace; }.range-control { margin-bottom: 15px; }.range-control:last-child { margin-bottom: 0; }.range-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }.range-label span:first-child { color: var(--muted); font-size: 11px; }.range-label span:first-child::after { content: "  ⓘ"; color: var(--muted-2); font-size: 10px; }.range-value { min-width: 49px; padding: 4px 6px; border: 1px solid var(--line); color: var(--mint); font: 10px "DM Mono", monospace; text-align: right; }.range-control input { width: 100%; height: 3px; appearance: none; background: linear-gradient(90deg, var(--teal) 0%, var(--teal) var(--fill, 40%), rgba(255,255,255,.12) var(--fill, 40%)); outline: none; }.range-control input::-webkit-slider-thumb { width: 13px; height: 13px; appearance: none; border: 2px solid var(--panel); border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 1px rgba(185,245,218,.5); cursor: pointer; }.range-control input::-moz-range-thumb { width: 13px; height: 13px; border: 2px solid var(--panel); border-radius: 50%; background: var(--mint); cursor: pointer; }.select-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }.select-button { min-height: 34px; padding: 8px 7px; border: 1px solid var(--line); background: rgba(255,255,255,.018); color: var(--muted); font-size: 10px; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }.select-button:hover { border-color: var(--line-strong); color: var(--text); }.select-button.is-selected { border-color: var(--teal); background: rgba(92,214,187,.1); color: var(--mint); }.mini-toggle-row { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }.toggle { position: relative; width: 34px; height: 18px; border: 0; border-radius: 10px; background: #293434; cursor: pointer; }.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }.toggle.is-on { background: rgba(92,214,187,.25); }.toggle.is-on::after { transform: translateX(16px); background: var(--mint); }
.learning-strip { display: grid; grid-template-columns: 1.15fr 1fr auto; gap: 16px; align-items: stretch; margin-top: 16px; padding: 18px 0 0; border-top: 1px solid var(--line); }.concept-block, .check-block { padding: 2px 0; }.concept-block strong { display: block; margin: 7px 0 5px; font-size: 14px; }.concept-block p { max-width: 390px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }.check-head { display: flex; justify-content: space-between; margin-bottom: 9px; color: var(--muted); font-size: 11px; }.check-head strong { color: var(--mint); font: 11px "DM Mono", monospace; }.check-list { display: grid; gap: 7px; }.check-item { display: flex; align-items: center; gap: 7px; color: var(--muted-2); font-size: 10px; }.check-item::before { content: ""; flex: 0 0 6px; width: 6px; height: 6px; border: 1px solid var(--muted-2); border-radius: 50%; }.check-item.is-pass { color: var(--text); }.check-item.is-pass::before { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 9px rgba(244,197,108,.7); }.next-button { display: flex; align-items: center; justify-content: space-between; gap: 20px; align-self: end; min-width: 150px; padding: 12px 14px; border: 1px solid rgba(185,245,218,.44); background: rgba(92,214,187,.08); color: var(--mint); font-size: 11px; cursor: pointer; transition: transform .2s, background .2s; }.next-button:hover { background: rgba(92,214,187,.16); transform: translateY(-2px); }.next-button b { font-size: 17px; font-weight: 400; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 4; max-width: 330px; padding: 12px 14px; border: 1px solid rgba(185,245,218,.35); background: #172323; color: var(--mint); box-shadow: var(--shadow); font-size: 11px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .25s, transform .25s; }.toast.is-visible { opacity: 1; transform: translateY(0); }
#sourceVideo, #sourceImage { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-picker-input { position: fixed; left: -10000px; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }

@media (max-width: 1040px) { .app-shell { grid-template-columns: 240px minmax(0,1fr); }.main-stage { padding: 0 24px 32px; }.sidebar { padding-left: 18px; padding-right: 18px; }.lab-grid { grid-template-columns: minmax(0,1fr); }.control-column { order: 2; }.learning-strip { grid-template-columns: 1fr 1fr; }.next-button { grid-column: 2; justify-self: end; } }
@media (max-width: 720px) { .app-shell { display: block; }.sidebar { min-height: 0; padding: 19px 18px 15px; border-right: 0; border-bottom: 1px solid var(--line); }.brand-mark { margin-bottom: 20px; }.sidebar h1 { margin: 10px 0 7px; font-size: 22px; }.sidebar-intro, .sidebar-footer { display: none; }.module-list { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 5px; margin-top: 21px; }.module-item { display: block; min-height: 69px; padding: 9px 8px; }.module-number { display: block; margin-bottom: 8px; }.module-copy { gap: 3px; }.module-copy strong { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.module-copy small, .module-state { display: none; }.main-stage { padding: 0 14px 26px; }.topbar { min-height: 58px; }.breadcrumb span:nth-child(2), .breadcrumb b:nth-of-type(2) { display: none; }.breadcrumb { gap: 7px; font-size: 10px; }.quiet-button { display: none; }.workspace-head { display: block; padding: 25px 0 18px; }.workspace-head h2 { font-size: 31px; }.workspace-head p { font-size: 12px; }.goal-card { width: auto; margin-top: 17px; }.preview-toolbar { margin-bottom: 7px; }.toolbar-button { padding: 7px 9px; font-size: 10px; }.canvas-corner-label { top: 8px; right: 9px; font-size: 8px; }.timeline-row { gap: 7px; }.timeline-time { min-width: 48px; font-size: 9px; }.learning-strip { grid-template-columns: 1fr; gap: 17px; }.next-button { grid-column: auto; justify-self: stretch; }.check-block { border-top: 1px solid var(--line); padding-top: 15px; } }

button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.toolbar-button:disabled { cursor: not-allowed; color: var(--muted-2); border-color: rgba(216,231,221,.07); background: rgba(255,255,255,.015); }
.timeline-row input:disabled { opacity: .45; cursor: not-allowed; }
.canvas-overlay { padding: 20px; text-align: center; }
.canvas-overlay.is-error { color: var(--red); background: rgba(29,10,10,.88); }
.asset-list { display: grid; gap: 8px; }.asset-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(216,231,221,.07); }.asset-row:last-child { border-bottom: 0; }.asset-row-copy { display: grid; min-width: 0; gap: 4px; }.asset-row-copy strong { color: var(--muted); font-size: 10px; font-weight: 600; }.asset-row-copy span { overflow: hidden; color: var(--muted-2); font: 9px "DM Mono", monospace; text-overflow: ellipsis; white-space: nowrap; }.asset-import-button, .asset-reset-button { border: 1px solid var(--line); background: rgba(255,255,255,.02); color: var(--muted); font-size: 10px; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }.asset-import-button { flex: 0 0 auto; padding: 6px 10px; }.asset-import-button:hover, .asset-reset-button:hover { border-color: var(--teal); color: var(--mint); background: rgba(92,214,187,.08); }.asset-reset-button { width: 100%; margin-top: 10px; padding: 8px 10px; }.asset-note { margin: 9px 0 0; color: var(--muted-2); font-size: 9px; line-height: 1.55; }
