.fx-weigh { --fx-weigh-angle: -12deg; display: grid; }
.fx-weigh:has(#fx-weigh-b:checked), .fx-weigh:has(#fx-weigh-c:checked) { --fx-weigh-angle: -6deg; }
.fx-weigh:has(#fx-weigh-b:checked):has(#fx-weigh-c:checked) { --fx-weigh-angle: 0deg; }
.fx-weigh .fx-weigh-body { display: grid; gap: 14px; min-width: 0; color: var(--fx-ink); }
.fx-weigh .fx-weigh-body, .fx-weigh .fx-weigh-body * { box-sizing: border-box; }
.fx-weigh .fx-weigh-body p { margin: 0; }
.fx-weigh .fx-weigh-steps { list-style: none; margin: 0; padding: 0; line-height: 1.5; }
.fx-weigh .fx-weigh-controls { min-width: 0; margin: 0; padding: 0; border: 0; }
.fx-weigh .fx-weigh-controls legend { padding: 0; margin-bottom: 10px; font-weight: 700; }
.fx-weigh .fx-weigh-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fx-weigh .fx-weigh-choices .fx-btn { display: block; min-width: 0; min-height: 64px; padding: 10px; border: 2px solid var(--fx-muted); border-radius: 8px; background: var(--fx-paper); color: var(--fx-ink); font-size: 14px; line-height: 1.4; text-align: left; cursor: pointer; }
.fx-weigh .fx-weigh-choices .fx-btn:has(input:checked) { background: var(--fx-sky-pale); border-color: var(--fx-ink); color: var(--fx-ink); }
.fx-weigh .fx-weigh-choices .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-ink); outline-offset: 3px; }
.fx-weigh .fx-weigh-prompt { display: block; min-height: 20px; margin-bottom: 4px; font-size: 12px; font-weight: 700; }
.fx-weigh:has(input:checked) .fx-weigh-prompt { visibility: hidden; }
.fx-weigh .fx-weigh-scene { position: relative; height: 440px; min-width: 0; overflow: hidden; color: var(--fx-ink); }
.fx-weigh .fx-weigh-balanced { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); padding: 5px 12px; border: 2px solid var(--fx-ink); border-radius: 8px; background: var(--fx-mint); color: var(--fx-ink); font-size: 14px; font-weight: 700; visibility: hidden; }
.fx-weigh .fx-weigh-stand { position: absolute; top: 88px; left: calc(50% - 3px); width: 6px; height: 246px; background: var(--fx-ink); }
.fx-weigh .fx-weigh-foot { position: absolute; top: 330px; left: 50%; width: 76px; height: 8px; border-radius: 4px; transform: translateX(-50%); background: var(--fx-ink); }
.fx-weigh .fx-weigh-beam { position: absolute; z-index: 2; top: 85px; left: 50%; width: 50%; max-width: 400px; height: 6px; border-radius: 3px; background: var(--fx-ink); transform: translateX(-50%) rotate(var(--fx-weigh-angle)); transition: transform 0.5s; }
.fx-weigh .fx-weigh-pivot { position: absolute; z-index: 3; top: 79px; left: calc(50% - 9px); width: 18px; height: 18px; border: 3px solid var(--fx-ink); border-radius: 50%; background: var(--fx-sun); }
.fx-weigh .fx-weigh-pan { position: absolute; top: 3px; width: min(80%, 180px); height: 190px; transform-origin: 50% 0; transform: translateX(-50%) rotate(calc(0deg - var(--fx-weigh-angle))); transition: transform 0.5s; }
.fx-weigh .fx-weigh-left { left: 0; }
.fx-weigh .fx-weigh-right { left: 100%; }
.fx-weigh .fx-weigh-ropes { position: absolute; inset: 0; width: 100%; height: 190px; fill: none; stroke: var(--fx-ink); stroke-width: 2; }
.fx-weigh .fx-weigh-opinion { position: absolute; bottom: 14px; left: 6px; right: 6px; display: grid; gap: 4px; padding: 6px; border: 2px solid var(--fx-ink); border-radius: 5px; background: var(--fx-coral-pale); color: var(--fx-ink); font-size: 14px; line-height: 1.25; text-align: center; }
.fx-weigh .fx-weigh-reasons-label { position: absolute; top: 28px; left: 0; width: 100%; font-size: 14px; line-height: 1.25; text-align: center; }
.fx-weigh .fx-weigh-floating, .fx-weigh .fx-weigh-solid { position: absolute; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.fx-weigh .fx-weigh-floating { top: 72px; }
.fx-weigh .fx-weigh-solid { bottom: 14px; }
.fx-weigh .fx-weigh-piece { display: grid; place-content: center; width: 36px; height: 40px; border: 2px solid var(--fx-ink); border-radius: 4px; color: var(--fx-ink); font-size: 14px; text-align: center; visibility: hidden; transform: translateY(-12px); transition: transform 0.4s; }
.fx-weigh .fx-weigh-floating .fx-weigh-piece { height: 32px; border: 2px dashed var(--fx-muted); }
.fx-weigh .fx-weigh-solid .fx-weigh-piece { background: var(--fx-mint); }
.fx-weigh .fx-weigh-piece small { font-size: 12px; line-height: 1.2; }
.fx-weigh .fx-weigh-no-weight { position: absolute; top: 116px; left: 50%; transform: translateX(-50%); padding: 2px 5px; border: 1px solid var(--fx-muted); border-radius: 4px; background: var(--fx-paper); color: var(--fx-ink); font-size: 12px; white-space: nowrap; visibility: hidden; }
.fx-weigh .fx-weigh-key { position: absolute; left: 10px; right: 10px; bottom: 14px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; font-size: 12px; line-height: 1.4; }
.fx-weigh .fx-weigh-key span { padding: 5px 8px; border: 2px solid var(--fx-ink); border-radius: 5px; background: var(--fx-paper); color: var(--fx-ink); text-align: center; }
.fx-weigh .fx-weigh-key .fx-weigh-heavy-label { background: var(--fx-mint); }
.fx-weigh .fx-weigh-key .fx-weigh-light-label { border: 2px dashed var(--fx-muted); }
.fx-weigh:has(#fx-weigh-a:checked) .fx-weigh-a, .fx-weigh:has(#fx-weigh-b:checked) .fx-weigh-b, .fx-weigh:has(#fx-weigh-c:checked) .fx-weigh-c, .fx-weigh:has(#fx-weigh-d:checked) .fx-weigh-d { visibility: visible; transform: translateY(0); }
.fx-weigh:has(#fx-weigh-a:checked, #fx-weigh-d:checked) .fx-weigh-no-weight, .fx-weigh:has(#fx-weigh-b:checked):has(#fx-weigh-c:checked) .fx-weigh-balanced { visibility: visible; }
.fx-weigh .fx-weigh-feedback, .fx-weigh .fx-weigh-float-status { display: grid; }
.fx-weigh .fx-weigh-state, .fx-weigh .fx-weigh-float-state { grid-area: 1 / 1; visibility: hidden; }
.fx-weigh .fx-weigh-state { align-self: stretch; color: var(--fx-ink); }
.fx-weigh .fx-weigh-description { display: block; margin-top: 8px; font-size: 12px; line-height: 1.5; }
.fx-weigh .fx-weigh-float-state { font-size: 14px; line-height: 1.5; }
.fx-weigh:not(:has(input:checked)) .fx-weigh-s0, .fx-weigh:has(#fx-weigh-a:checked):not(:has(#fx-weigh-b:checked, #fx-weigh-c:checked, #fx-weigh-d:checked)) .fx-weigh-sa, .fx-weigh:has(#fx-weigh-d:checked):not(:has(#fx-weigh-a:checked, #fx-weigh-b:checked, #fx-weigh-c:checked)) .fx-weigh-sd, .fx-weigh:has(#fx-weigh-a:checked):has(#fx-weigh-d:checked):not(:has(#fx-weigh-b:checked, #fx-weigh-c:checked)) .fx-weigh-sad, .fx-weigh:has(#fx-weigh-b:checked):not(:has(#fx-weigh-c:checked)) .fx-weigh-sb, .fx-weigh:has(#fx-weigh-c:checked):not(:has(#fx-weigh-b:checked)) .fx-weigh-sc, .fx-weigh:has(#fx-weigh-b:checked):has(#fx-weigh-c:checked):not(:has(#fx-weigh-a:checked, #fx-weigh-d:checked)) .fx-weigh-sbc, .fx-weigh:has(#fx-weigh-b:checked):has(#fx-weigh-c:checked):has(#fx-weigh-a:checked, #fx-weigh-d:checked) .fx-weigh-sbc-extra { visibility: visible; }
.fx-weigh:not(:has(#fx-weigh-a:checked, #fx-weigh-d:checked)) .fx-weigh-f0, .fx-weigh:has(#fx-weigh-a:checked):not(:has(#fx-weigh-d:checked)) .fx-weigh-fa, .fx-weigh:has(#fx-weigh-d:checked):not(:has(#fx-weigh-a:checked)) .fx-weigh-fd, .fx-weigh:has(#fx-weigh-a:checked):has(#fx-weigh-d:checked) .fx-weigh-fad { visibility: visible; }
@container (max-width: 480px) { .fx-weigh .fx-weigh-choices { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .fx-weigh .fx-weigh-beam, .fx-weigh .fx-weigh-pan, .fx-weigh .fx-weigh-piece { transition: none; } }