:root{--bg:#f7f7f5;--ink:#1a1a1a;--accent:#c8541a;--ok:#1a7a3c;--warn:#b3261e;--card:#fff;--line:#ddd8d0;font-family:system-ui,-apple-system,sans-serif}*{box-sizing:border-box}body{background:var(--bg);color:var(--ink);margin:0}main{max-width:640px;margin:0 auto;padding:16px}button{font:inherit;min-height:44px}.app-header{max-width:640px;margin:0 auto;padding:16px 16px 0}.app-header h1{margin:0;font-size:1.25rem}.update-toast{z-index:1000;background:var(--accent);color:#fff;min-height:44px;font:inherit;cursor:pointer;border:none;border-radius:999px;padding:0 20px;font-size:.9rem;font-weight:600;position:fixed;bottom:16px;left:50%;transform:translate(-50%);box-shadow:0 4px 16px #00000040}.course-map-header{justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px;display:flex}.course-map-header h2{margin:0;font-size:1.1rem}.btn{cursor:pointer;white-space:nowrap;border:1px solid #0000;border-radius:8px;justify-content:center;align-items:center;min-height:44px;padding:0 20px;font-size:.95rem;font-weight:600;text-decoration:none;display:inline-flex}.btn-primary{background:var(--accent);color:#fff}.btn-primary:hover{filter:brightness(.95)}.banner{border:1px solid var(--warn);color:var(--warn);background:#fff4e9;border-radius:8px;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px;padding:8px 8px 8px 14px;font-size:.9rem;display:flex}.banner button{color:inherit;cursor:pointer;background:0 0;border:none;min-width:44px;min-height:44px;font-size:1.25rem;line-height:1}.part-section{margin-bottom:24px}.part-label{text-transform:uppercase;letter-spacing:.04em;color:#6b6558;margin:0 0 8px;font-size:.8rem}.module-card{background:var(--card);border:1px solid var(--line);border-radius:10px;margin-bottom:12px;padding:12px 14px}.module-card h4{margin:0 0 8px;font-size:1rem}.lesson-list{flex-direction:column;gap:4px;margin:0;padding:0;list-style:none;display:flex}.lesson-row a,.lesson-row-locked{min-height:44px;color:var(--ink);border-radius:6px;align-items:center;gap:10px;padding:4px 6px;text-decoration:none;display:flex}.lesson-row a:hover{background:var(--bg)}.lesson-row.locked .lesson-row-locked{color:#9a9488}.lesson-row.completed .lesson-icon{color:var(--ok)}.lesson-row.unlocked .lesson-icon{color:var(--accent)}.lesson-icon{text-align:center;flex-shrink:0;width:1.4em}.lesson-title{flex:1}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.lesson-view h2{margin:0 0 16px;font-size:1.2rem}.lesson-blocks{flex-direction:column;gap:16px;display:flex}.block-text :first-child{margin-top:0}.block-text :last-child{margin-bottom:0}.block-todo{border:1px dashed var(--line);color:#6b6558;border-radius:10px;padding:14px 16px;font-size:.9rem}.block-todo-button{text-align:left;cursor:pointer;background:0 0;width:100%;display:block}.block-figure{margin:0}.block-figure img{border:1px solid var(--line);border-radius:8px;max-width:100%;display:block}.block-figure figcaption{color:#6b6558;margin-top:6px;font-size:.85rem}.lesson-footer{background:var(--bg);border-top:1px solid var(--line);margin-top:24px;padding:12px 0 4px;position:sticky;bottom:0}.lesson-footer .btn{width:100%}.lesson-footer .btn:disabled{opacity:.5;cursor:not-allowed}.callout{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:14px 16px}.callout-header,.callout-belief,.callout-truth{align-items:baseline;gap:8px;margin:0 0 8px;display:flex}.callout-belief s{color:var(--warn)}.callout-truth strong{color:var(--ok)}.callout-body :first-child{margin-top:0}.callout-body :last-child{margin-bottom:0}.callout-misconception{border-color:var(--warn)}.callout-safety{border-left:4px solid var(--warn)}.callout-rule{border-left:4px solid var(--accent)}.callout-shop-reality{border-left:4px solid #6b6558}.quiz{background:var(--card);border:1px solid var(--line);border-radius:10px;flex-direction:column;gap:12px;padding:14px 16px;display:flex}.quiz-progress{text-transform:uppercase;letter-spacing:.04em;color:#6b6558;margin:0;font-size:.8rem}.quiz-prompt{margin:0;font-weight:600}.quiz-choice{border:0;flex-direction:column;gap:8px;margin:0;padding:0;display:flex}.quiz-option{border:1px solid var(--line);border-radius:8px;overflow:hidden}.quiz-option-btn{text-align:left;cursor:pointer;width:100%;min-height:44px;font:inherit;color:var(--ink);background:0 0;border:none;justify-content:space-between;align-items:center;gap:10px;padding:10px 14px;display:flex}.quiz-option-btn[aria-checked=true]{border-color:var(--accent);background:#fdf1e9}.quiz-option-btn:disabled{cursor:default}.quiz-option-mark{font-weight:700}.quiz-option-explain{color:#6b6558;margin:0;padding:8px 14px 12px;font-size:.85rem}.quiz-option-correct{border-color:var(--ok)}.quiz-option-correct .quiz-option-mark{color:var(--ok)}.quiz-option-incorrect{border-color:var(--warn)}.quiz-option-incorrect .quiz-option-mark{color:var(--warn)}.quiz-numeric{align-items:center;gap:8px;display:flex}.quiz-numeric-field{border:1px solid var(--line);min-height:44px;font:inherit;border-radius:8px;flex:1;padding:0 12px;font-size:1rem}.quiz-numeric-field:disabled{background:var(--bg)}.quiz-numeric-unit{color:#6b6558;font-weight:600}.quiz-predict{flex-direction:column;gap:10px;display:flex}.quiz-predict-figure{border:1px solid var(--line);border-radius:8px;max-width:100%;display:block}.quiz-sort-list{flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;display:flex}.quiz-sort-item{border:1px solid var(--line);border-radius:8px}.quiz-sort-item-btn{text-align:left;cursor:pointer;width:100%;min-height:44px;font:inherit;color:var(--ink);background:0 0;border:none;align-items:center;gap:10px;padding:10px 14px;display:flex}.quiz-sort-item-btn:disabled{cursor:default}.quiz-sort-item-picked{border-color:var(--accent)}.quiz-sort-chip{background:var(--accent);color:#fff;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;min-width:24px;height:24px;font-size:.8rem;font-weight:700;display:inline-flex}.quiz-sort-reset{border:1px solid var(--line);color:var(--ink);background:0 0;align-self:flex-start}.quiz-feedback{border-radius:8px;padding:10px 14px}.quiz-feedback-verdict{margin:0 0 4px;font-weight:700}.quiz-feedback-explain{margin:0;font-size:.9rem}.quiz-feedback-correct{color:var(--ok);background:#eaf6ee}.quiz-feedback-correct .quiz-feedback-explain{color:var(--ink)}.quiz-feedback-incorrect{color:var(--warn);background:#fdecea}.quiz-feedback-incorrect .quiz-feedback-explain{color:var(--ink)}.quiz-actions{justify-content:flex-end;display:flex}.quiz-actions .btn{min-width:120px}.quiz-summary-score{text-align:center;margin:0;font-size:1.1rem;font-weight:700}.sim-viewport{aspect-ratio:4/3;background:var(--card);border:1px solid var(--line);touch-action:none;border-radius:8px;width:100%;position:relative;overflow:hidden}.sim-viewport-svg{touch-action:none;width:100%;height:100%;display:block}.sim-viewport-fit-btn{border:1px solid var(--line);background:var(--card);min-width:44px;min-height:44px;color:var(--ink);cursor:pointer;border-radius:8px;padding:0 12px;font-weight:600;position:absolute;bottom:8px;right:8px}.wire-flow{stroke:var(--accent);stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:6 6;fill:none;animation:.6s linear infinite parts-flow}.wire-flow.flow-reverse{animation-direction:reverse}@keyframes parts-flow{to{stroke-dashoffset:-12px}}.battery-case{fill:#2b2b2b;stroke:#111;stroke-width:1px}.battery-cap{fill:#4a4a4a;stroke:#111;stroke-width:1px}.battery-post{fill:#c9a53b;stroke:#7a6420;stroke-width:1px}.battery-post-label{fill:var(--ink);font-size:12px;font-weight:700}.battery-label{fill:#fff;font-size:11px;font-weight:600}.lamp-lead{stroke:#6b6558;stroke-width:3px;stroke-linecap:round}.lamp-dome{fill:#eef1f4;stroke:#9aa3ad;stroke-width:1.5px}.lamp-filament{fill:#ffd45c;transition:opacity .12s linear}.lamp-glow{fill:#ffd45c;filter:blur(4px);transition:opacity .12s linear}.switch-hit{fill:#0000}.switch-lead{stroke:#6b6558;stroke-width:3px;stroke-linecap:round}.switch-arm{stroke:var(--ink);stroke-width:3px;stroke-linecap:round;transition:x2 .12s,y2 .12s}.part-switch.is-closed .switch-arm{stroke:var(--ok)}.switch-pivot,.switch-contact{fill:#4a4a4a}.wire-base{stroke:#2f6f4f;stroke-linecap:round;stroke-linejoin:round}.frame-hatch-bg{fill:#7d8790}.frame-hatch-line{stroke:#5a626a;stroke-width:1.5px}.connection-blob{fill:#d9d2c2;stroke:#8a8270;stroke-width:1.5px}.connection-corrosion{fill:#6fae4a}.connection-heat{fill:var(--warn);filter:blur(3px)}.probe-ring{fill:#c8541a2e;stroke:var(--accent);stroke-width:1.5px}.probe-dot{fill:#1a1a1a73}.ammeter-face{fill:var(--card);stroke:var(--line);stroke-width:1.5px}.ammeter-reading{fill:var(--ink);text-anchor:middle;font-size:9px;font-weight:700}.parts-workbench{flex-direction:column;gap:16px;display:flex}.parts-workbench h3{margin:16px 0 4px;font-size:1rem}.parts-workbench-grid{grid-template-columns:1fr;gap:16px;display:grid}.workbench-terminal-marker{fill:#0af;stroke:#003a66;stroke-width:1px}.resistor-body{fill:#eee6d6;stroke:#8a8270;stroke-width:1.5px}.resistor-label{fill:var(--ink);font-size:10px;font-weight:600}.probe-lead{stroke-width:3px;cursor:pointer;pointer-events:stroke;opacity:.8}.probe-lead-red{stroke:#c0392b}.probe-lead-black{stroke:#1a1a1a}.probe-sim{flex-direction:column;gap:12px;display:flex}.probe-sim-corrosion{flex-direction:column;gap:4px;font-size:.85rem;display:flex}.probe-sim-corrosion input[type=range]{width:100%;min-height:44px}.meter-panel{background:var(--card);border:1px solid var(--line);border-radius:10px;flex-direction:column;gap:10px;min-height:180px;padding:12px 14px;display:flex}.meter-task{border-bottom:1px solid var(--line);padding-bottom:8px}.meter-task-prompt{margin:0;font-weight:600}.meter-task-done{color:var(--ok);margin:0;font-weight:700}.meter-task-success{justify-content:space-between;align-items:center;gap:12px;display:flex}.meter-task-success-text{color:var(--ok);margin:0;font-weight:600}.meter-task-next{min-width:88px;padding:0 14px}.meter-toast{color:var(--warn);border:1px solid var(--warn);background:#fdecea;border-radius:8px;padding:8px 12px;font-size:.85rem}.meter-body{flex-direction:column;gap:10px;display:flex}.meter-lcd{border:1px solid var(--line);background:#dbe6d8;border-radius:6px;align-items:baseline;gap:6px;padding:8px 12px;font-family:Courier New,monospace;display:flex}.meter-lcd-reading{color:#1a2e1a;font-size:1.6rem;font-weight:700}.meter-lcd-unit{color:#1a2e1a;font-size:1rem;font-weight:600}.meter-lcd-beep{margin-left:auto;font-size:1.1rem}.meter-row{justify-content:space-between;align-items:center;gap:10px;display:flex}.meter-dial,.meter-jacks,.meter-probes{gap:4px;display:flex}.meter-dial-btn,.meter-jack-btn,.meter-probe-btn{border:1px solid var(--line);background:var(--card);min-width:44px;min-height:44px;color:var(--ink);cursor:pointer;border-radius:8px;padding:0 12px;font-weight:600}.meter-dial-btn[aria-pressed=true],.meter-jack-btn[aria-pressed=true]{background:var(--accent);color:#fff;border-color:var(--accent)}.meter-probe-red{color:#c0392b;border-color:#c0392b}.meter-probe-red.is-armed{color:#fff;background:#c0392b;animation:.8s ease-in-out infinite probe-pulse}.meter-probe-red.is-placed{border-width:2px}.meter-probe-black{color:#1a1a1a;border-color:#1a1a1a}.meter-probe-black.is-armed{color:#fff;background:#1a1a1a;animation:.8s ease-in-out infinite probe-pulse}.meter-probe-black.is-placed{border-width:2px}@keyframes probe-pulse{0%,to{opacity:1}50%{opacity:.55}}.meter-fuse-btn{border:1px solid var(--warn);min-height:44px;color:var(--warn);cursor:pointer;background:#fdecea;border-radius:8px;padding:0 14px;font-weight:700}.probe-dev-workbench,.loop-builder{flex-direction:column;gap:12px;display:flex}.loop-slot-placeholder{fill:var(--bg);stroke:var(--line);stroke-width:2px;stroke-dasharray:4 4}.loop-slot-placeholder-label{fill:#6b6558;text-anchor:middle;font-size:10px}.loop-slot-empty.is-valid-target .loop-slot-placeholder{stroke:var(--accent);stroke-dasharray:none;fill:#fdf1e9}.loop-joint-hit{fill:#0000}.loop-joint-dot{fill:var(--ok);stroke:#0d3d1f;stroke-width:1px}.loop-joint.is-open .loop-joint-dot{fill:var(--warn)}.loop-joint-spark{font-size:20px}.loop-tray{flex-wrap:wrap;gap:8px;display:flex}.loop-tray-btn{border:1px solid var(--line);background:var(--card);min-height:44px;color:var(--ink);cursor:pointer;border-radius:8px;padding:0 14px;font-weight:600}.loop-tray-btn.is-armed{background:var(--accent);color:#fff;border-color:var(--accent);animation:.8s ease-in-out infinite probe-pulse}.loop-tray-empty{color:#6b6558;margin:0;font-size:.9rem}.loop-task{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:12px 14px}.loop-task-prompt{margin:0;font-weight:600}.loop-task-done{color:var(--ok);margin:0;font-weight:700}.loop-task-success{justify-content:space-between;align-items:center;gap:12px;display:flex}.loop-task-success-text{color:var(--ok);margin:0;font-weight:600}.loop-task-next{min-width:88px;padding:0 14px}.loop-dev-workbench{flex-direction:column;gap:12px;display:flex}.loop-dev-workbench h3{margin:16px 0 4px;font-size:1rem}
