.ag-game-alge-balance{--ab-ok:#1e8a55;--ab-bad:#c2412d;--ab-bad-text:#ff8f7a}:root[data-theme=light] .ag-game-alge-balance{--ab-bad-text:#a8321f}.ag-game-alge-balance [hidden]{display:none!important}.ag-game-alge-balance .ab-game{min-width:0;color:var(--ink);gap:14px;display:grid}.ag-game-alge-balance .ab-head{flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:6px 10px;display:flex}.ag-game-alge-balance .ab-level-title{color:var(--ink);margin:0;font-size:1.1rem;font-weight:700}.ag-game-alge-balance .ab-difficulty{color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:2px 10px;font-size:.8rem}.ag-game-alge-balance .ab-status{background:var(--panel-soft);border-radius:10px;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:4px 10px;padding:8px 12px;display:flex}.ag-game-alge-balance .ab-status-label{letter-spacing:.12em;color:var(--muted);font-size:.72rem;font-weight:700}.ag-game-alge-balance .ab-status strong{font-variant-numeric:tabular-nums}.ag-game-alge-balance .ab-instruction{margin:0;line-height:1.5}.ag-game-alge-balance .ab-mobile-scroll{-webkit-overflow-scrolling:touch;border:1px solid var(--line);background:var(--panel-soft);border-radius:14px;padding:12px 8px;overflow-x:auto}.ag-game-alge-balance .ab-mobile-scroll:focus-visible{outline:3px solid var(--accent);outline-offset:2px}.ag-game-alge-balance .ab-mobile{width:100%;height:auto;display:block}.ag-game-alge-balance .ab-wire{stroke:var(--muted);stroke-width:2px;fill:none}.ag-game-alge-balance .ab-ceiling{stroke:var(--muted);stroke-width:4px;stroke-linecap:round}.ag-game-alge-balance .ab-bar{stroke:var(--ink);stroke-width:5px;stroke-linecap:round}.ag-game-alge-balance .ab-svg-beam.balanced .ab-bar{stroke:var(--ab-ok)}.ag-game-alge-balance .ab-svg-beam.unbalanced .ab-bar{stroke:var(--ab-bad)}.ag-game-alge-balance .ab-pivot,.ag-game-alge-balance .ab-join{fill:var(--ink)}.ag-game-alge-balance .ab-distance{fill:var(--muted);font-size:11px;font-weight:600}.ag-game-alge-balance .ab-distance-tick{stroke:var(--muted);stroke-width:1.5px}.ag-game-alge-balance .ab-beam-tag{fill:var(--panel);stroke:var(--line)}.ag-game-alge-balance .ab-svg-beam.selected .ab-beam-tag{stroke:var(--accent);stroke-width:2px}.ag-game-alge-balance .ab-beam-label{fill:var(--ink);font-size:12px;font-weight:700}.ag-game-alge-balance .ab-beam-word{fill:var(--muted);letter-spacing:.02em;font-size:10px;font-weight:700}.ag-game-alge-balance .ab-beam-frame{fill:none;stroke:var(--accent);stroke-width:3px}.ag-game-alge-balance .ab-beam-hint{fill:none;stroke:var(--accent);stroke-width:2px;stroke-dasharray:7 5}.ag-game-alge-balance .ab-weight{fill:var(--accent)}.ag-game-alge-balance .ab-weight-text{fill:var(--button-ink);font-size:14px;font-weight:700}.ag-game-alge-balance .ab-child-tag{fill:var(--panel);stroke:var(--line)}.ag-game-alge-balance .ab-child-text{fill:var(--ink);font-size:11px;font-weight:700}.ag-game-alge-balance .ab-bar,.ag-game-alge-balance .ab-weight{transition:stroke .18s,fill .18s}.ag-game-alge-balance .ab-diagram-key{color:var(--muted);flex-wrap:wrap;gap:4px 14px;font-size:.8rem;display:flex}.ag-game-alge-balance .ab-assumption,.ag-game-alge-balance .ab-entry-note,.ag-game-alge-balance .ab-equations-note{color:var(--muted);margin:0;font-size:.84rem;line-height:1.45}.ag-game-alge-balance .ab-entry-section,.ag-game-alge-balance .ab-equations{gap:10px;display:grid}.ag-game-alge-balance .ab-section-heading{flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:4px 10px;display:flex}.ag-game-alge-balance h3{color:var(--ink);margin:0;font-size:.95rem}.ag-game-alge-balance .ab-value-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;display:grid}.ag-game-alge-balance .ab-value-form{border:1px solid var(--line);background:var(--panel);border-radius:12px;gap:8px;margin:0;padding:10px;display:grid}.ag-game-alge-balance .ab-value-form label{color:var(--ink);align-items:center;gap:8px;font-size:.92rem;font-weight:600;display:flex}.ag-game-alge-balance .ab-shape{flex:none;width:20px;height:20px}.ag-game-alge-balance .ab-value-controls{gap:8px;display:flex}.ag-game-alge-balance .ab-value-controls input{border:1px solid var(--line);background:var(--bg);min-width:0;min-height:44px;color:var(--ink);font:inherit;text-align:center;font-variant-numeric:tabular-nums;border-radius:10px;flex:1;padding:6px 8px;font-size:1.1rem}.ag-game-alge-balance .ab-value-controls input:focus-visible{outline:3px solid var(--accent);outline-offset:1px}.ag-game-alge-balance .ab-value-controls input:disabled{opacity:.6}.ag-game-alge-balance .ab-commit{min-width:76px;min-height:44px}.ag-game-alge-balance .ab-note{min-height:1.5em;color:var(--ink);margin:0;font-size:.92rem;line-height:1.45}.ag-game-alge-balance .ab-note.is-error{color:var(--ab-bad-text);font-weight:600}.ag-game-alge-balance .ab-note.is-info{color:var(--muted)}.ag-game-alge-balance .ab-eq-button{text-align:left;border:1px solid var(--line);background:var(--panel);width:100%;min-height:44px;color:var(--ink);font:inherit;cursor:pointer;border-radius:12px;gap:4px;padding:10px 12px;display:grid}.ag-game-alge-balance .ab-eq-button:focus-visible{outline:3px solid var(--accent);outline-offset:2px}.ag-game-alge-balance .ab-eq-button[aria-pressed=true]{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.ag-game-alge-balance .ab-eq-balanced{border-left:4px solid var(--ab-ok)}.ag-game-alge-balance .ab-eq-unbalanced{border-left:4px solid var(--ab-bad)}.ag-game-alge-balance .ab-eq-hint{border-style:dashed;border-color:var(--accent)}.ag-game-alge-balance .ab-eq-top{color:var(--muted);flex-wrap:wrap;justify-content:space-between;gap:4px 8px;font-size:.86rem;display:flex}.ag-game-alge-balance .ab-eq-top strong{color:var(--ink)}.ag-game-alge-balance .ab-eq-formula{font-variant-numeric:tabular-nums;overflow-wrap:anywhere;font-size:.95rem}.ag-game-alge-balance .ab-hints{background:var(--panel-soft);border-radius:12px;gap:6px;padding:10px 12px;display:grid}.ag-game-alge-balance .ab-hints ol,.ag-game-alge-balance .ab-proof-path,.ag-game-alge-balance .ab-proof-steps{gap:4px;margin:0;padding-left:1.3em;font-size:.9rem;line-height:1.45;display:grid}.ag-game-alge-balance .ab-study-banner{border:1px dashed var(--accent);color:var(--ink);border-radius:10px;align-items:center;gap:8px;padding:8px 12px;font-size:.9rem;display:flex}.ag-game-alge-balance .ab-done-banner{border:1px solid var(--accent);color:var(--ink);border-radius:10px;align-items:center;gap:8px;padding:8px 12px;font-size:.9rem;display:flex}.ag-game-alge-balance .ab-lock{width:16px;height:16px;color:var(--accent);flex:none}.ag-game-alge-balance .ab-proof{border:1px solid var(--line);background:var(--panel);border-radius:14px;gap:10px;padding:12px;display:grid}.ag-game-alge-balance .ab-proof p{margin:0;font-size:.9rem;line-height:1.5}.ag-game-alge-balance .ab-proof-note{color:var(--muted);font-size:.86rem!important}.ag-game-alge-balance .ab-proof-scroll{-webkit-overflow-scrolling:touch;overflow-x:auto}.ag-game-alge-balance .ab-proof-scroll table{border-collapse:collapse;width:100%;min-width:300px;font-size:.88rem}.ag-game-alge-balance .ab-proof-scroll caption{text-align:left;color:var(--muted);padding-bottom:6px}.ag-game-alge-balance .ab-proof-scroll th,.ag-game-alge-balance .ab-proof-scroll td{border-bottom:1px solid var(--hairline);text-align:center;font-variant-numeric:tabular-nums;padding:6px 8px}@media (width<=420px){.ag-game-alge-balance .ab-value-grid{grid-template-columns:1fr}}@media (prefers-reduced-motion:reduce){.ag-game-alge-balance .ab-bar,.ag-game-alge-balance .ab-weight{transition:none}}.ag-game-alge-balance .ag-board{-webkit-overflow-scrolling:touch;scrollbar-gutter:stable;max-height:max(320px,100dvh - 180px);overflow-y:auto}.ag-game-alge-balance .ab-game{flex:none;max-width:100%}.ag-game-alge-balance .ab-main,.ag-game-alge-balance .ab-main-diagram,.ag-game-alge-balance .ab-main-work{align-content:start;gap:14px;min-width:0;display:grid}.ag-game-alge-balance .ab-svg-beam{cursor:pointer}@media (width>=900px){.ag-game-alge-balance .ag-board{max-height:max(320px,100dvh - 150px)}.ag-game-alge-balance .ab-game{gap:8px;width:100%}.ag-game-alge-balance .ab-main{gap:10px 18px}.ag-game-alge-balance .ab-main.is-side{grid-template-columns:minmax(0,1.5fr) minmax(280px,.8fr);align-items:start}.ag-game-alge-balance .ab-main-diagram,.ag-game-alge-balance .ab-main-work{gap:8px}.ag-game-alge-balance .ab-main.is-side .ab-entry-note,.ag-game-alge-balance .ab-main.is-side .ab-equations-note{font-size:.8rem;line-height:1.4}.ag-game-alge-balance .ab-main.is-side .ab-mobile{max-height:min(46vh,380px)}.ag-game-alge-balance .ab-entry-section,.ag-game-alge-balance .ab-equations{gap:8px}}
