.fx-scales { display: grid; gap: 16px; }
.fx-scales .fx-steps { margin: 0; padding-left: 24px; }
.fx-scales .fx-steps li { padding: 3px 0; }
.fx-scales .fx-goal, .fx-scales .fx-hint { margin: 0; color: var(--fx-ink); }
.fx-scales .fx-controls { min-width: 0; margin: 0; padding: 0; border: 0; }
.fx-scales .fx-controls legend { padding: 0; margin-bottom: 10px; font-weight: 800; color: var(--fx-ink); }
.fx-scales .fx-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-scales .fx-btn { box-sizing: border-box; display: flex; align-items: center; min-height: 40px; max-width: 100%; padding: 8px 12px; border: 2px solid var(--fx-ink); background: var(--fx-paper); color: var(--fx-ink); }
.fx-scales .fx-btn:has(input:checked) { background: var(--fx-sky-pale); color: var(--fx-ink); }
.fx-scales .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-grape); outline-offset: 3px; }
.fx-scales .fx-scene { --fx-angle: -9.462322deg; --fx-left: 30px; --fx-right: -30px; --fx-out3x: 0px; --fx-out3y: 0px; --fx-out4x: 0px; --fx-out4y: 0px; --fx-level: 0; --fx-pan-fill: var(--fx-sky-pale); box-sizing: border-box; height: 440px; min-width: 0; display: grid; grid-template-rows: 70px minmax(0, 1fr) 26px; gap: 8px; padding: 12px; color: var(--fx-ink); }
.fx-scales .fx-labels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; text-align: center; }
.fx-scales .fx-label { font-size: 14px; line-height: 1.3; }
.fx-scales .fx-label span { display: block; font-size: 12px; margin-top: 3px; }
.fx-scales .fx-plate-label { text-align: center; font-size: 14px; }
.fx-scales .fx-drawing { display: block; width: 100%; height: 100%; min-width: 0; overflow: visible; }
.fx-scales .fx-plate, .fx-scales .fx-pan { fill: var(--fx-pan-fill); stroke: var(--fx-ink); stroke-width: 4; }
.fx-scales .fx-stand { fill: var(--fx-sky); stroke: var(--fx-ink); stroke-width: 4; stroke-linejoin: round; }
.fx-scales .fx-foot, .fx-scales .fx-pivot { fill: var(--fx-ink); }
.fx-scales .fx-beam { transform-origin: 300px 140px; transform: skewY(var(--fx-angle)); transition: transform 0.5s; stroke-linecap: round; }
.fx-scales .fx-bar { stroke: var(--fx-ink); stroke-width: 8; }
.fx-scales .fx-glow { stroke: var(--fx-mint); stroke-width: 24; opacity: var(--fx-level); transition: transform 0.5s, opacity 0.5s; }
.fx-scales .fx-left-pan { transform: translateY(var(--fx-left)); transition: transform 0.5s; }
.fx-scales .fx-right-pan { transform: translateY(var(--fx-right)); transition: transform 0.5s; }
.fx-scales .fx-strings { fill: none; stroke: var(--fx-ink); stroke-width: 3; }
.fx-scales .fx-bag { fill: var(--fx-sun-pale); stroke: var(--fx-ink); stroke-width: 4; stroke-linejoin: round; }
.fx-scales .fx-apples { fill: var(--fx-coral); stroke: var(--fx-ink); stroke-width: 2; }
.fx-scales .fx-stems { fill: none; stroke: var(--fx-ink); stroke-width: 3; stroke-linecap: round; }
.fx-scales .fx-bag-three { transform: translate(var(--fx-out3x), var(--fx-out3y)); transition: transform 0.5s; }
.fx-scales .fx-bag-four { transform: translate(var(--fx-out4x), var(--fx-out4y)); transition: transform 0.5s; }
.fx-scales .fx-number { font-size: 42px; font-weight: 800; text-anchor: middle; fill: var(--fx-ink); }
.fx-scales .fx-swap, .fx-scales .fx-part3, .fx-scales .fx-part4 { visibility: hidden; }
.fx-scales:has(#fx-scales-t0:checked) .fx-bag7, .fx-scales:has(#fx-scales-t0:checked) .fx-out0, .fx-scales:has(#fx-scales-t3:checked) .fx-bag4, .fx-scales:has(#fx-scales-t3:checked) .fx-out3, .fx-scales:has(#fx-scales-t4:checked) .fx-bag3, .fx-scales:has(#fx-scales-t4:checked) .fx-out4 { visibility: visible; }
.fx-scales:has(#fx-scales-r0:checked) .fx-total0, .fx-scales:has(#fx-scales-r3:checked) .fx-total3, .fx-scales:has(#fx-scales-r4:checked) .fx-total4, .fx-scales:has(#fx-scales-r7:checked) .fx-total7, .fx-scales:has(#fx-scales-r3:checked) .fx-part3, .fx-scales:has(#fx-scales-r7:checked) .fx-part3, .fx-scales:has(#fx-scales-r4:checked) .fx-part4, .fx-scales:has(#fx-scales-r7:checked) .fx-part4 { visibility: visible; }
.fx-scales:has(#fx-scales-t3:checked) .fx-scene { --fx-out3x: 180px; --fx-out3y: calc(206px - var(--fx-left)); }
.fx-scales:has(#fx-scales-t4:checked) .fx-scene { --fx-out4x: 180px; --fx-out4y: calc(146px - var(--fx-left)); }
.fx-scales:has(#fx-scales-r7:checked):has(#fx-scales-t3:checked) .fx-scene, .fx-scales:has(#fx-scales-r7:checked):has(#fx-scales-t4:checked) .fx-scene, .fx-scales:has(#fx-scales-r4:checked):has(#fx-scales-t4:checked) .fx-scene { --fx-angle: 9.462322deg; --fx-left: -30px; --fx-right: 30px; }
.fx-scales:has(#fx-scales-r7:checked):has(#fx-scales-t0:checked) .fx-scene, .fx-scales:has(#fx-scales-r4:checked):has(#fx-scales-t3:checked) .fx-scene, .fx-scales:has(#fx-scales-r3:checked):has(#fx-scales-t4:checked) .fx-scene { --fx-angle: 0deg; --fx-left: 0px; --fx-right: 0px; --fx-level: 1; --fx-pan-fill: var(--fx-mint-pale); }
.fx-scales .fx-messages { display: grid; min-width: 0; }
.fx-scales .fx-messages .fx-message { display: block; grid-area: 1 / 1; visibility: hidden; margin: 0; min-width: 0; color: var(--fx-ink); }
.fx-scales .fx-message p { margin: 0; }
.fx-scales .fx-message small { display: block; margin-top: 8px; font-size: 12px; line-height: 1.5; }
.fx-scales:has(#fx-scales-r0:checked):has(#fx-scales-t0:checked) .fx-m00, .fx-scales:has(#fx-scales-r3:checked):has(#fx-scales-t0:checked) .fx-m30, .fx-scales:has(#fx-scales-r4:checked):has(#fx-scales-t0:checked) .fx-m40, .fx-scales:has(#fx-scales-r7:checked):has(#fx-scales-t0:checked) .fx-m70, .fx-scales:has(#fx-scales-r0:checked):has(#fx-scales-t3:checked) .fx-m03, .fx-scales:has(#fx-scales-r3:checked):has(#fx-scales-t3:checked) .fx-m33, .fx-scales:has(#fx-scales-r4:checked):has(#fx-scales-t3:checked) .fx-m43, .fx-scales:has(#fx-scales-r7:checked):has(#fx-scales-t3:checked) .fx-m73, .fx-scales:has(#fx-scales-r0:checked):has(#fx-scales-t4:checked) .fx-m04, .fx-scales:has(#fx-scales-r3:checked):has(#fx-scales-t4:checked) .fx-m34, .fx-scales:has(#fx-scales-r4:checked):has(#fx-scales-t4:checked) .fx-m44, .fx-scales:has(#fx-scales-r7:checked):has(#fx-scales-t4:checked) .fx-m74 { visibility: visible; }
@container (max-width: 480px) { .fx-scales .fx-row { display: grid; grid-template-columns: minmax(0, 1fr); } .fx-scales .fx-scene { height: 370px; grid-template-rows: 90px minmax(0, 1fr) 40px; } }
@media (prefers-reduced-motion: reduce) { .fx-scales .fx-drawing * { transition: none; } }