.balance-main{width:min(1200px,calc(100% - 24px));display:grid;grid-template-columns:220px minmax(0,1fr);gap:20px;align-items:start}.balance-rules{padding:18px;background:#fff;border:1px solid var(--line);border-radius:16px;line-height:1.6}.balance-rules h2{font-size:1.1rem;margin:0}.balance-rules ol{padding-left:20px}.balance-rules small{color:#526a84}.balance-heading{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.balance-heading h1{font-size:2rem}.balance-heading .secondary{margin-left:auto}.balance-legend{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;font-size:.85rem;color:#475f78}.legend-box,.legend-weight{display:inline-grid;place-items:center;width:25px;height:25px;border:2px solid #185ac5;border-radius:4px;font-weight:bold}.legend-weight{border-color:#26374a;border-radius:8px 8px 3px 3px}.balance-scale{position:relative;height:255px;margin:4px 0}.scale-beam{position:absolute;top:48%;left:6%;width:88%;height:9px;border-radius:6px;background:#26374a;z-index:2}.scale-pivot{position:absolute;left:calc(50% - 17px);top:43%;width:34px;height:135px;background:#185ac5;clip-path:polygon(50% 0,100% 100%,0 100%)}.scale-base{position:absolute;bottom:3px;left:36%;width:28%;height:13px;background:#26374a;border-radius:8px}.scale-pan{position:absolute;top:1%;width:40%;height:48%;display:flex;align-items:end;justify-content:center;border-left:2px solid #69829c;border-right:2px solid #69829c}.left-pan{left:6%}.right-pan{right:6%}.pan-tray{height:8px;width:100%;background:#26374a;position:absolute;bottom:0;border-radius:2px 2px 12px 12px}.pan-objects{display:flex;align-content:end;justify-content:center;align-items:end;gap:4px;flex-wrap:wrap;padding:0 5px 11px;max-height:100%;width:100%}.balance-box{display:grid;place-items:center;width:33px;height:33px;border:2px solid #185ac5;background:#e6efff;border-radius:4px;font-size:1.3rem;font-weight:900;color:#185ac5}.balance-weight{display:grid;place-items:center;min-width:30px;height:29px;border:2px solid #26374a;background:#eef1f5;border-radius:10px 10px 3px 3px;font-weight:900;padding:0 5px}.balance-equation{text-align:center;font-size:clamp(1.5rem,5vw,2.2rem);font-weight:800;white-space:nowrap;overflow-x:auto;padding:10px;border-radius:12px;background:#f1f6fd}.balance-controls fieldset{padding:10px;border:0}.balance-operations{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.balance-operations button{padding:12px 6px;border:2px solid #c5d3e5;background:white;color:#26374a;border-radius:10px;font:inherit;font-weight:800;cursor:pointer}.balance-operations button[aria-pressed=true]{background:#185ac5;border-color:#185ac5;color:white;box-shadow:0 3px 8px #185ac53a}.balance-amount{display:grid;grid-template-columns:110px 1fr auto;align-items:end;gap:10px}.balance-amount label{display:grid;gap:5px;font-size:.9rem;font-weight:700}.balance-tools{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin:16px 0}.balance-tools button{font-size:.85rem;padding:9px 12px}.balance-tools span{margin-left:auto;font-size:.85rem;color:#526a84}.balance-feedback{border-left:4px solid #185ac5;background:#eff5fe;padding:12px 16px;border-radius:6px;line-height:1.5;margin:12px 0}.balance-feedback p{margin:0}.balance-feedback.error{border-color:#a13430;background:#fff0ee}.balance-answer{display:flex;align-items:end;gap:10px;margin:16px 0}.balance-answer label{flex:1;font-weight:700}.balance-answer input{max-width:110px;margin-left:8px}.balance-history ol{padding-left:24px}.balance-history li{padding:8px 0;border-bottom:1px solid #e4ebf3}.balance-history .history-equation{display:block;font-size:1.15rem;color:#12243a;font-weight:700;white-space:nowrap;overflow-x:auto}.balance-win{background:#eaf8ee;border:2px solid #8ac29c;border-radius:14px;padding:18px;text-align:center}.balance-win h2{margin:0}.division-groups{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.division-group{padding:8px 10px;border:2px dashed #185ac5;border-radius:8px;background:white;font-weight:700}.balance-main [hidden]{display:none!important}.balance-scale.moving .pan-objects{animation:balance-change .6s ease}.balance-confetti{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:100}.balance-confetti i{position:absolute;top:-20px;width:9px;height:15px;background:#185ac5;animation:balance-fall 2.6s ease-in forwards}.balance-confetti i:nth-child(even){background:#36a867}.balance-confetti i:nth-child(3n){background:#eab739}@keyframes balance-change{50%{transform:translateY(-8px);opacity:.4}}@keyframes balance-fall{to{transform:translateY(110vh) rotate(600deg);opacity:0}}@media(max-width:850px){.balance-main{grid-template-columns:1fr}.balance-rules{padding:12px 18px}.balance-rules ol{display:flex;gap:8px 28px;flex-wrap:wrap;margin:8px 0}.balance-rules p,.balance-rules small{font-size:.8rem}}@media(max-width:560px){.balance-main .panel{padding:16px}.balance-amount{grid-template-columns:90px 1fr}.balance-amount .primary{grid-column:1/-1}.balance-answer{flex-wrap:wrap}.balance-heading .secondary{margin-left:0}.balance-box{width:27px;height:27px;font-size:1.1rem}.balance-weight{min-width:26px;height:25px}.balance-scale{height:245px}}@media(prefers-reduced-motion:reduce){.balance-scale.moving .pan-objects,.balance-confetti i{animation:none}.balance-confetti{display:none}}
.balance-box.bundle{width:auto;min-width:60px;padding:0 8px;white-space:nowrap}
/* Match the shared Strategy Games shell; the hanger work area stays intact. */
.balance-main{display:block;width:min(960px,calc(100% - 24px));margin:28px auto}
#balanceSetup .quick-start-card>label{display:block;margin-bottom:7px}
#balanceSetup #levelDescription{line-height:1.45;font-size:14px}
@media(min-width:851px) and (max-width:1400px){.balance-main{width:auto;margin-left:245px;margin-right:12px}}
@media(max-width:850px){.balance-main{margin:12px auto}}
.balance-scale{margin:14px auto;max-width:650px;transition:height .3s}
.scale-beam{top:32px;left:20%;width:60%;height:5px;background:#172334}
.balance-scale:before{content:"";position:absolute;left:calc(50% - 2px);top:2px;width:4px;height:32px;background:#172334}
.scale-pivot,.scale-base,.pan-tray{display:none}
.scale-pan{top:34px;height:calc(100% - 40px);border:0;align-items:start}
.scale-pan:before{content:"";position:absolute;top:0;bottom:0;left:calc(50% - 1px);width:2px;background:#172334}
.left-pan{left:0}.right-pan{right:0}
.pan-objects{position:relative;z-index:1;display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:start;align-content:normal;gap:4px;padding:8px 0 0;max-height:none}
.hanger-shape{display:block;width:44px;height:44px;flex:0 0 44px;color:#172334}
.hanger-shape[data-shape=circle]{color:#185ac5}
.hanger-shape svg,.shape-key svg{display:block;width:100%;height:100%}
.shape-key{display:inline-block;width:32px;height:32px;color:#172334}
.shape-key[data-shape=circle]{color:#185ac5}
@media(prefers-reduced-motion:reduce){.balance-scale{transition:none}}
