/* Robotics Academy: same tokens, fonts and brick buttons as app.css. */
[hidden] { display: none !important; }

/* ---------- pages ---------- */
.preview-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; border-radius: 14px; background: var(--y1-soft); border: 2px dashed var(--y1); font-weight: 700; }
.xp-pill { margin-left: auto; font-size: 1rem; padding: 6px 14px; }
.continue { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 18px; border-radius: var(--radius); background: var(--acad); color: #fff; text-decoration: none; box-shadow: 0 6px 0 var(--acad-shade); transition: transform .06s, box-shadow .06s; }
.continue:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--acad-shade); }
.continue .c-emoji { width: 60px; height: 60px; flex: none; display: grid; place-items: center; font-size: 2.2rem; border-radius: 16px; background: rgba(255,255,255,.2); }
.continue small { display: block; font-weight: 700; opacity: .9; }
.continue strong { font-family: var(--font-head); font-size: 1.4rem; line-height: 1.15; }
.continue .go { margin-left: auto; font-size: 1.6rem; }
.level-now { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.rings { display: flex; gap: 6px; flex-wrap: wrap; }
.ring-item { position: relative; width: 44px; height: 44px; }
.ring-item span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: .9rem; }
.ring-item.locked { opacity: .45; }
.ring { width: 44px; height: 44px; }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 6; }
.ring-fg { fill: none; stroke: var(--acad); stroke-width: 6; stroke-linecap: round; }
.acad-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.acad-tile { display: flex; flex-direction: column; gap: 2px; padding: 16px; min-height: 130px; border-radius: var(--radius); background: var(--surface); border: 3px solid var(--line); box-shadow: 0 6px 0 var(--line); color: var(--ink); text-decoration: none; transition: transform .06s, box-shadow .06s, border-color .1s; }
.acad-tile:hover { border-color: var(--acad); }
.acad-tile:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--line); }
.acad-tile .emoji { font-size: 2rem; }
.acad-tile strong { font-family: var(--font-head); font-size: 1.2rem; }
.acad-tile small { color: var(--ink-soft); font-weight: 700; }
.topics.acad .topic { --c: var(--acad); --s: var(--acad-shade); --soft: var(--acad-soft); min-height: 150px; }
.lesson-status { margin-top: auto; font-weight: 800; font-size: .9rem; color: var(--ink-soft); }
.lesson-status .done { color: var(--good); }
.level { margin-bottom: 26px; }
.level.locked .level-head { opacity: .55; }
.level-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.level-head h2 { margin: 0; }
.level-head p { margin: 0; }
.lv-num { width: 52px; height: 52px; flex: none; display: grid; place-items: center; font-size: 1.8rem; border-radius: 16px; background: var(--acad-soft); }
.soon { padding: 14px; border-radius: 14px; border: 2px dashed var(--line); color: var(--ink-soft); font-weight: 800; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip-btn { min-height: 44px; display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 800; font-size: .95rem; }
.chip-btn[aria-current="true"] { background: var(--acad); border-color: var(--acad); color: #fff; }
.comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.comp-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 3px solid var(--line); box-shadow: 0 5px 0 var(--line); color: var(--ink); text-decoration: none; }
.comp-card:hover { border-color: var(--acad); }
.comp-card small { color: var(--ink-soft); font-weight: 700; }
.comp-art { width: 100%; max-width: 160px; }
.comp-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 20px; align-items: start; }
.comp-big .art { width: 100%; }
.lead { font-size: 1.2rem; font-weight: 700; }
.pins, .prog-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; background: var(--surface); border-radius: 14px; overflow: hidden; }
.pins td, .pins th, .prog-table td, .prog-table th { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.pins th, .prog-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.coming { text-align: center; }
.big-emoji { font-size: 4rem; display: block; }
.daily .q { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 16px 12px; border-radius: var(--radius); background: var(--surface); border: 3px solid var(--line); }
.badge.earned { border-color: var(--star); box-shadow: 0 5px 0 var(--star); }
.badge.locked { opacity: .6; }
.badge .b-emoji { font-size: 2.6rem; width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); }
.badge.earned .b-emoji { background: var(--y1-soft); }
.badge small { color: var(--ink-soft); font-weight: 700; }
.badge .b-when { color: var(--good); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { padding: 14px; border-radius: var(--radius); background: var(--surface); border: 3px solid var(--line); text-align: center; }
.stat strong { display: block; font-family: var(--font-head); font-size: 1.8rem; color: var(--acad); }
.stat span { font-weight: 800; color: var(--ink-soft); font-size: .9rem; }

/* ---------- lesson player ---------- */
.player { max-width: 820px; margin: 0 auto; position: relative; }
.player-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.player-top .progress > div { background: var(--acad); }
.pcard { background: var(--surface); border-radius: 26px; border: 3px solid var(--line); padding: 22px; box-shadow: 0 8px 0 var(--line); min-height: 340px; touch-action: pan-y; }
.pcard h2 { font-size: clamp(1.5rem, 5vw, 2rem); }
.pcard h3 { margin-top: 1em; }
.player-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.player-nav .btn[hidden] { display: none; }
.part-tag { display: inline-block; font-weight: 900; font-size: .85rem; color: var(--acad); background: var(--acad-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 6px; }
.intro-emoji { font-size: 4rem; line-height: 1; margin-bottom: 8px; }
.meta-row { display: flex; gap: 12px; flex-wrap: wrap; font-weight: 800; color: var(--ink-soft); align-items: center; }
.bolts .off { opacity: .2; filter: grayscale(1); }
.learn li { margin-bottom: .35em; font-weight: 700; }
.safety { margin-top: 14px; padding: 12px 16px; border-radius: 16px; background: var(--y1-soft); border: 3px solid var(--y1); }
.safety h3 { margin: 0 0 6px; }
.safety ul { margin: 0; padding-left: 1.2em; }
.safety li { margin-bottom: .3em; }
.card-art { display: flex; justify-content: center; align-items: center; min-height: 150px; margin-bottom: 12px; }
.card-art .art, .card-art .circuit { width: 100%; max-width: 420px; max-height: 260px; }
.card-emoji { font-size: 5.5rem; line-height: 1; }
.card-text { font-size: clamp(1.2rem, 3.6vw, 1.45rem); font-weight: 700; line-height: 1.5; }
.prompt { font-size: 1.2rem; font-weight: 800; }
.term { font: inherit; color: var(--acad); background: none; border: 0; padding: 0 1px; cursor: pointer; text-decoration: underline dotted 3px; text-underline-offset: 4px; font-weight: 900; min-height: 0; }
.term[aria-expanded="true"] { background: var(--acad-soft); border-radius: 6px; }
.term-pop { position: absolute; z-index: 40; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 3px solid var(--acad); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.term-pop strong { font-family: var(--font-head); font-size: 1.2rem; color: var(--acad); text-transform: capitalize; }
.term-pop p { margin: 4px 0 10px; font-weight: 700; }
.solved { margin-top: 14px; padding: 12px 16px; border-radius: 16px; background: var(--good-soft); border: 3px solid var(--good); font-weight: 800; }
.diagram { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.diagram-part { margin: 0; padding: 10px; border-radius: 16px; background: var(--surface-2); }
.diagram-art .art { width: 100%; max-height: 240px; }
.diagram figcaption { text-align: center; margin: 4px 0 8px; }
.labels { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.label-btn { min-height: 44px; padding: 6px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font-weight: 800; font-size: .92rem; cursor: pointer; }
.label-btn[aria-expanded="true"] { border-color: var(--acad); background: var(--acad-soft); }
.label-desc { min-height: 1.5em; margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: var(--acad-soft); font-weight: 700; }
.label-desc:empty { display: none; }
.na { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--surface-2); font-weight: 700; font-size: 1.15rem; }
.na > span { font-size: 2.4rem; line-height: 1; }
.steps { padding-left: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; margin-bottom: 8px; }
.steps label, .checks label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); cursor: pointer; min-height: 44px; }
.steps label::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--acad); color: #fff; font-weight: 900; }
.steps input, .checks input { width: 22px; height: 22px; flex: none; margin-top: 3px; accent-color: var(--good); }
.steps input:checked + span, .checks input:checked + span { text-decoration: line-through; opacity: .6; }
.checks { list-style: none; padding: 0; }
.checks li { margin-bottom: 6px; }
.code { position: relative; border-radius: 16px; background: #0F172A; color: #E2E8F0; padding: 36px 0 12px; overflow-x: auto; }
.code .lang { position: absolute; top: 8px; left: 14px; font-size: .8rem; font-weight: 800; color: #94A3B8; }
.code pre { margin: 0; font: 600 .95rem/1.6 ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; }
.ln { display: block; padding: 0 14px 0 0; white-space: pre; }
.ln i { display: inline-block; width: 2.6em; padding-right: 1em; text-align: right; color: #64748B; font-style: normal; user-select: none; }
.ln.has-note { cursor: pointer; }
.ln.has-note i { color: #C4B5FD; }
.ln.hl { background: rgba(176,124,245,.28); box-shadow: inset 4px 0 0 #B07CF5; }
.code .k { color: #F472B6; } .code .n { color: #FBBF24; } .code .s { color: #86EFAC; } .code .c { color: #94A3B8; font-style: italic; }
.notes { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.code-note { padding: 8px 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface-2); font-weight: 700; }
.code-note.on { border-color: var(--acad); background: var(--acad-soft); }
.ln-tag { min-height: 40px; padding: 4px 10px; margin-right: 6px; border-radius: 10px; border: 0; background: var(--acad); color: #fff; font-weight: 900; font-size: .85rem; cursor: pointer; }
.mistakes { display: grid; gap: 12px; }
.mistake { padding: 12px 16px; border-radius: 16px; background: var(--surface-2); }
.mistake p { margin: 0 0 6px; }
.m-bad { font-weight: 900; color: var(--bad); }
.m-fix { font-weight: 800; }
.trouble { margin-bottom: 10px; padding: 4px 14px; border-radius: 14px; background: var(--surface-2); }
.trouble summary { cursor: pointer; font-weight: 900; min-height: 48px; display: flex; align-items: center; }
.pcard .q { font-family: var(--font-head); font-size: clamp(1.35rem, 4.4vw, 1.8rem); font-weight: 800; line-height: 1.2; }
.pcard .answers .answer, .daily .answers .answer { font-size: clamp(1.05rem, 3.4vw, 1.3rem); min-height: 72px; }
.adult { display: inline-block; padding: 6px 12px; border-radius: 12px; background: var(--y1-soft); border: 2px solid var(--y1); font-weight: 800; }
.hint { margin-top: 10px; padding: 4px 14px; border-radius: 14px; background: var(--surface-2); }
.hint summary { cursor: pointer; font-weight: 900; min-height: 48px; display: flex; align-items: center; }
.pill.done { background: var(--good-soft); border-color: var(--good); font-size: 1rem; padding: 8px 14px; }
.muted.small { font-size: .9rem; margin-top: 10px; }
.finish { text-align: center; }
.finish .btn-row { justify-content: center; }
.xp-line { font-size: 1.25rem; font-weight: 800; }

/* ---------- widgets ---------- */
.w-host { margin-top: 12px; }
.w-help { font-weight: 800; color: var(--ink-soft); }
.w-status, .w-readout { margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); font-weight: 700; min-height: 48px; }
.w-status:empty { display: none; }
.w-status.good, .w-readout.good { background: var(--good-soft); border: 2px solid var(--good); }
.w-status.bad, .w-readout.bad { background: var(--bad-soft); border: 2px solid var(--bad); }
.w-readout.big { font-size: 1.2rem; }
.w-controls { display: grid; gap: 12px; margin-top: 12px; }
.w-controls label { display: flex; flex-direction: column; gap: 6px; font-weight: 800; }
.w-controls input[type="range"] { width: 100%; height: 44px; accent-color: var(--acad); }
.w-controls select { min-height: 48px; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; }
.w-controls select:disabled { opacity: .7; }
.w-circuit { display: flex; justify-content: center; margin: 10px 0; overflow-x: auto; }
.w-circuit .circuit { width: 100%; }
.w-done { text-align: center; padding: 10px; }
.w-done .big { font-family: var(--font-head); font-size: 2.6rem; font-weight: 800; margin: 0; }
.sort-tray { display: flex; flex-wrap: wrap; gap: 8px; min-height: 56px; }
.sort-card { min-height: 52px; padding: 8px 14px; border-radius: 14px; border: 3px solid var(--line); background: var(--surface); box-shadow: 0 4px 0 var(--line); font-weight: 800; cursor: pointer; }
.sort-card[aria-pressed="true"] { border-color: var(--acad); background: var(--acad-soft); transform: translateY(-3px); }
.sort-bins { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.sort-bin { min-height: 120px; display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; border-radius: 18px; border: 3px dashed var(--acad); background: var(--acad-soft); cursor: pointer; text-align: left; }
.sort-bin[aria-disabled="true"] { cursor: default; }
.sort-bin strong { font-family: var(--font-head); font-size: 1.2rem; }
.sort-in { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 10px; border-radius: 999px; background: var(--surface); font-size: .85rem; font-weight: 800; }
.tank { width: 100%; max-width: 480px; display: block; margin: 0 auto; }
.tank-wrap { background: var(--surface-2); border-radius: 16px; padding: 8px; }
.tank-pipe { stroke: #9DB4E0; stroke-linecap: butt; fill: none; }
.tank-flow { stroke: #1E6FD9; stroke-dasharray: 6 14; animation: flow 1s linear infinite; }
.tank-flow.still { animation: none; }
@keyframes flow { to { stroke-dashoffset: -40; } }
.cells { display: flex; flex-wrap: wrap; gap: 4px; min-height: 70px; align-items: center; margin: 10px 0; }
.cell { position: relative; width: 38px; height: 64px; border-radius: 8px; background: linear-gradient(90deg, #E0B23D, #F5CD5B); border: 3px solid var(--ink); }
.cell::before { content: ""; position: absolute; top: -8px; left: 11px; width: 10px; height: 6px; border-radius: 2px 2px 0 0; background: #B8C0CC; border: 2px solid var(--ink); border-bottom: 0; }
.cell i { position: absolute; top: 4px; left: 0; right: 0; text-align: center; font-style: normal; font-weight: 900; color: #1B2350; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg [role="radio"] { min-height: 48px; padding: 8px 14px; border-radius: 14px; border: 3px solid var(--line); background: var(--surface); font-weight: 800; cursor: pointer; }
.seg [aria-checked="true"] { border-color: var(--acad); background: var(--acad); color: #fff; }
.press-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.press-btn { width: 120px; height: 120px; border-radius: 50%; border: 0; background: #E53935; color: #fff; font-family: var(--font-head); font-size: 1.2rem; font-weight: 800; box-shadow: 0 10px 0 #991B1B; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.press-btn.down { transform: translateY(8px); box-shadow: 0 2px 0 #991B1B; }
.press-row .w-readout { flex: 1; min-width: 180px; margin: 0; }
.spot-art { display: flex; justify-content: center; margin: 6px 0 4px; }
.spot-art .art { width: 100%; max-width: 280px; max-height: 200px; }
.cc-art { display: flex; justify-content: center; }
.cc-art .art { width: 100%; max-width: 360px; }
.bands { border: 0; padding: 0; margin: 12px 0 0; }
.bands legend { font-weight: 800; margin-bottom: 6px; }
.band-chip { min-width: 44px; min-height: 44px; margin: 0 4px 6px 0; border-radius: 10px; border: 3px solid var(--line); background: var(--chip); color: #fff; font-weight: 900; text-shadow: 0 0 3px #000, 0 0 2px #000; cursor: pointer; }
.band-chip[aria-pressed="true"] { border-color: var(--acad); outline: 3px solid var(--acad); outline-offset: 2px; }

/* ---------- circuit ---------- */
.circuit { display: block; height: auto; }
.cx-wire { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; fill: none; }
.cx-thin { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; fill: none; }
.cx-outline { stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.cx-flow { stroke: #FFC400; stroke-width: 4; stroke-dasharray: 3 13; stroke-linecap: round; animation: flow 1.1s linear infinite; pointer-events: none; }
.cx-cut { font-size: 18px; fill: var(--bad); pointer-events: none; }
.cx-hit { stroke: transparent; stroke-width: 26; cursor: pointer; }
.cx-hit:focus-visible { stroke: color-mix(in srgb, var(--focus) 35%, transparent); outline: none; }
.cx-hitbox { fill: transparent; }
.cx-part[role="button"] { cursor: pointer; }
.cx-part[role="button"]:focus-visible { outline: none; }
.cx-part[role="button"]:focus-visible .cx-hitbox { stroke: var(--focus); stroke-width: 3; rx: 10px; }
.cx-resistor { fill: #E9D3A6; stroke: var(--ink); stroke-width: 2.5; }
.cx-bulb { fill: var(--surface); stroke: var(--ink); stroke-width: 3; }
.cx-bulb.on { fill: #FFE14D; }
.cx-glow { fill: #FFE14D; }
.cx-socket { fill: none; stroke: var(--ink-soft); stroke-width: 2.5; stroke-dasharray: 4 4; }
.cx-node { fill: var(--ink); }
.cx-cap { fill: #E53935; stroke: var(--ink); stroke-width: 2; }
.cx-meter { fill: #F5B301; stroke: var(--ink); stroke-width: 3; }
.cx-meter-text { font: 900 12px var(--font-body); fill: #1B2350; }
.cx-plate { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.cx-plate.thick { stroke-width: 7; }
.cx-pos { font: 900 22px var(--font-head); fill: #E53935; }
.cx-neg { font: 900 22px var(--font-head); fill: var(--ink); }
.cx-label { font: 800 16px var(--font-body); fill: var(--ink); }

/* ---------- art ---------- */
.art { display: block; height: auto; }
.ar-leg { stroke: #9AA3B2; stroke-width: 5; stroke-linecap: round; fill: none; }
.ar-resistor { fill: #E9D3A6; stroke: var(--ink); stroke-width: 2.5; }
.ar-band { stroke: none; }
.ar-edge { stroke: var(--ink); stroke-width: 2.5; }
.ar-edge-thin { stroke: var(--ink); stroke-width: 1.5; }
.ar-blackwire { stroke: #3A4050; }
.ar-cell { font: 900 16px var(--font-head); fill: #1B2350; }
.ar-text { font: 800 14px var(--font-body); fill: var(--ink); }
.ar-small { font: 700 12px var(--font-body); fill: var(--ink-soft); }
.ar-tiny { font: 800 10px var(--font-body); fill: #1B2350; }
.ar-screen { font: 800 26px ui-monospace, Menlo, Consolas, monospace; fill: #1B2350; }
.ar-stripe { font: 900 18px var(--font-head); fill: #2F5DAF; }
.ar-line { stroke: var(--ink); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ar-line.dashed { stroke-dasharray: 6 8; }
.ar-thin { stroke: var(--ink); stroke-width: 1.5; fill: none; }
.ar-body { fill: var(--surface-2); stroke: var(--ink); stroke-width: 3; }
.ar-soft { fill: var(--acad-soft); }
.ar-fillink { fill: var(--ink); }
.ar-emoji { font-size: 36px; }
.ar-big { font: 800 40px var(--font-head); fill: var(--ink); }
.ar-chip { font: 900 15px var(--font-head); }
.ar-tag { fill: var(--acad); stroke: #fff; stroke-width: 2; }
.ar-tagtext { font: 900 13px var(--font-body); fill: #fff; }
.ar-electrons { animation: electrons 1.4s linear infinite; }
@keyframes electrons { from { transform: translateX(-12px); } to { transform: translateX(12px); } }

@media (max-width: 700px) {
  .comp-detail { grid-template-columns: 1fr; }
  .pcard { padding: 16px; min-height: 300px; border-radius: 22px; }
  .player-nav .btn { flex: 1; }
  .intro-emoji { font-size: 3.2rem; }
}

/* ---------- virtual lab ---------- */
.lab-intro { font-weight: 700; }
.lab-link { margin-top: 14px; }
.lab { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.lab-main { min-width: 0; }
.lab-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.lab-toolbar .btn[hidden] { display: none; }
.lab-palette { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; margin-bottom: 8px; border-radius: 14px; background: var(--surface); border: 2px solid var(--acad); }
.lab-palette .chip-btn { cursor: pointer; }
.lab-help { min-height: 1.4em; margin: 0 0 6px; font-weight: 800; color: var(--ink-soft); font-size: .95rem; }
.lab-board-wrap { border-radius: 18px; border: 3px solid var(--line); background: var(--surface); overflow: hidden; }
.lab-board { display: block; width: 100%; height: auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.lab-dot { fill: var(--line); }
.lab-part { cursor: grab; outline: none; }
.lab-part:active { cursor: grabbing; }
.lab-part.out { opacity: .35; }
.lab-hitbox { fill: transparent; }
.lab-part.sel .lab-hitbox, .lab-part:focus-visible .lab-hitbox { stroke: var(--focus); stroke-width: 3; stroke-dasharray: 6 5; }
.lab-leg { stroke: #9AA3B2; stroke-width: 4; stroke-linecap: round; }
.lab-label { font: 800 13px var(--font-body); fill: var(--ink); pointer-events: none; }
.lab-ma { font: 900 13px var(--font-body); fill: var(--acad); pointer-events: none; }
.lab-out { font: 900 12px var(--font-body); fill: var(--bad); pointer-events: none; }
.lab-bat-v { font: 900 14px var(--font-head); fill: #fff; }
.lab-sign { font: 900 16px var(--font-head); fill: var(--ink); }
.lab-sign.pos { fill: #E53935; }
.lab-pin-name { font: 800 11px var(--font-body); fill: var(--ink-soft); }
.lab-boom { font-size: 22px; }
.lab-boom.small { font-size: 14px; }
.lab-glow { pointer-events: none; }
.lab-wire-under { fill: none; stroke: var(--ink-soft); stroke-width: 9; stroke-linecap: round; opacity: .55; }
.lab-wire-under.sel { stroke: var(--focus); opacity: 1; stroke-width: 13; }
.lab-wire { fill: none; stroke-width: 6; stroke-linecap: round; pointer-events: none; }
.lab-flow { fill: none; stroke: #FFE14D; stroke-width: 3; stroke-dasharray: 2 14; stroke-linecap: round; animation: flow 1s linear infinite; pointer-events: none; }
.lab-wire-hit { fill: none; stroke: transparent; stroke-width: 22; cursor: pointer; outline: none; }
.lab-wire-hit:focus-visible { stroke: color-mix(in srgb, var(--focus) 35%, transparent); }
.lab-pin { cursor: crosshair; outline: none; }
.lab-pin-hit { fill: transparent; }
.lab-pin-dot { fill: var(--surface); stroke: var(--acad); stroke-width: 3; }
.lab-pin.used .lab-pin-dot { fill: var(--acad); }
.lab-pin.sel .lab-pin-dot { fill: #FFE14D; stroke: var(--focus); stroke-width: 4; r: 10px; }
.lab-pin:focus-visible .lab-pin-hit { fill: color-mix(in srgb, var(--focus) 30%, transparent); }
.lab-side { display: grid; gap: 10px; }
.lab-side h3 { margin: 6px 0 0; }
.lab-diag { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-weight: 800; min-height: 52px; }
.lab-diag.good { background: var(--good-soft); border: 2px solid var(--good); }
.lab-diag.bad { background: var(--bad-soft); border: 2px solid var(--bad); }
.lab-goals { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.lab-goals li { padding: 8px 12px; border-radius: 12px; background: var(--surface); border: 2px solid var(--line); font-weight: 700; }
.lab-goals li.ok { border-color: var(--good); background: var(--good-soft); }
.lab-hints p { margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--y1-soft); font-weight: 700; }
.lab-success { padding: 14px 16px; border-radius: 16px; background: var(--good-soft); border: 3px solid var(--good); font-weight: 700; }
.lab-success p { margin: 0 0 4px; }
.lab-xp { font-weight: 900; }
@media (max-width: 860px) { .lab { grid-template-columns: 1fr; } }
