.fx-scale { --fx-k: 0; display: grid; }
.fx-scale:has(#fx-scale-cheese:checked) { --fx-k: 30; }
.fx-scale:has(#fx-scale-butter:checked) { --fx-k: 25; }
.fx-scale:has(#fx-scale-rice:checked) { --fx-k: 50; }
.fx-scale:has(#fx-scale-apples:checked) { --fx-k: 68; }
.fx-scale:has(#fx-scale-carrots:checked) { --fx-k: 72; }
.fx-scale:has(#fx-scale-sugar:checked) { --fx-k: 86; }
.fx-scale:has(#fx-scale-flour:checked) { --fx-k: 100; }
.fx-scale .fx-main { display: grid; gap: 16px; min-width: 0; color: var(--fx-ink); font-size: 16px; }
.fx-scale .fx-note ol { margin: 0; padding-left: 24px; }
.fx-scale .fx-goal, .fx-scale .fx-caption, .fx-scale .fx-key { margin: 0; }
.fx-scale .fx-controls { border: 0; padding: 0; margin: 0; min-width: 0; }
.fx-scale .fx-controls legend { padding: 0; margin-bottom: 8px; font-weight: 800; }
.fx-scale .fx-controls .fx-caption { margin-bottom: 8px; }
.fx-scale .fx-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fx-scale .fx-choices .fx-btn { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; min-width: 0; min-height: 92px; padding: 8px; box-sizing: border-box; font-size: 14px; line-height: 20px; text-align: center; color: var(--fx-ink); background: var(--fx-paper); }
.fx-scale .fx-choices .fx-btn:has(input:checked) { background: var(--fx-sun-pale); color: var(--fx-ink); border-color: var(--fx-ink); }
.fx-scale .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-grape); outline-offset: 3px; }
.fx-scale .fx-choices svg { width: 48px; height: 40px; flex-shrink: 0; }
.fx-scale symbol path, .fx-scale symbol rect, .fx-scale symbol circle { fill: none; stroke: var(--fx-ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fx-scale symbol .fx-yellow { fill: var(--fx-sun); }
.fx-scale symbol .fx-blue { fill: var(--fx-sky-pale); }
.fx-scale symbol .fx-paper { fill: var(--fx-paper); }
.fx-scale symbol .fx-green { fill: var(--fx-mint); }
.fx-scale symbol .fx-red { fill: var(--fx-coral); }
.fx-scale .fx-scene { height: 560px; box-sizing: border-box; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; font-size: 14px; line-height: 20px; }
.fx-scale .fx-bowl-zone { position: relative; width: min(100%, 190px); height: 90px; flex: 0 0 90px; }
.fx-scale .fx-bowl-label { display: block; text-align: center; }
.fx-scale .fx-bowl { position: absolute; bottom: 0; left: 0; right: 0; height: 42px; box-sizing: border-box; border: 3px solid var(--fx-ink); border-radius: 0 0 80px 80px; background: var(--fx-sky-pale); }
.fx-scale .fx-load { position: absolute; bottom: 10px; left: 0; right: 0; height: 44px; display: grid; place-items: center; }
.fx-scale .fx-food { grid-area: 1 / 1; visibility: hidden; }
.fx-scale .fx-load svg { width: 56px; height: 44px; }
.fx-scale .fx-dial-slot { width: 100%; height: 320px; flex: 0 0 320px; display: grid; place-items: center; perspective: 700px; }
.fx-scale .fx-dial { position: relative; width: min(100%, 320px); aspect-ratio: 1; transform-style: preserve-3d; transform: rotateX(8deg); }
.fx-scale .fx-face, .fx-scale .fx-pointer { display: block; width: 100%; height: 100%; }
.fx-scale .fx-rim { fill: var(--fx-sky); stroke: var(--fx-ink); stroke-width: 4; }
.fx-scale .fx-inner { fill: var(--fx-paper); stroke: var(--fx-ink); stroke-width: 2; }
.fx-scale .fx-ticks { fill: none; stroke: var(--fx-ink); stroke-width: 1.8; stroke-linecap: round; }
.fx-scale .fx-numbers { fill: var(--fx-ink); font-size: 21px; font-weight: 800; text-anchor: middle; dominant-baseline: central; }
.fx-scale .fx-glow { visibility: hidden; }
.fx-scale .fx-glow circle { fill: var(--fx-mint); }
.fx-scale .fx-glow path { fill: none; stroke: var(--fx-mint); stroke-width: 5; stroke-linecap: round; }
.fx-scale .fx-links { position: absolute; inset: 0; transform-style: preserve-3d; transform: translateZ(5px) rotateZ(-150deg); }
.fx-scale .fx-links span { position: absolute; inset: 0; display: block; transform-style: preserve-3d; transform: rotateZ(calc(clamp(0, calc(var(--fx-k) - var(--fx-i)), 1) * 3deg)); transition: transform 0.012s steps(1, end); transition-delay: calc(var(--fx-i) * 0.012s); }
.fx-scale .fx-gear { fill: var(--fx-sun); stroke: var(--fx-ink); stroke-width: 2; }
.fx-scale .fx-needle { fill: var(--fx-coral); stroke: var(--fx-ink); stroke-width: 1; }
.fx-scale .fx-pin { fill: var(--fx-ink); }
.fx-scale .fx-key { text-align: center; }
.fx-scale .fx-says { display: grid; min-width: 0; }
.fx-scale .fx-message { grid-area: 1 / 1; visibility: hidden; margin: 0; min-width: 0; }
.fx-scale:has(#fx-scale-empty:checked) .fx-empty, .fx-scale:has(#fx-scale-cheese:checked) .fx-cheese, .fx-scale:has(#fx-scale-butter:checked) .fx-butter, .fx-scale:has(#fx-scale-rice:checked) .fx-rice, .fx-scale:has(#fx-scale-apples:checked) .fx-apples, .fx-scale:has(#fx-scale-carrots:checked) .fx-carrots, .fx-scale:has(#fx-scale-sugar:checked) .fx-sugar, .fx-scale:has(#fx-scale-flour:checked) .fx-flour { visibility: visible; }
@container (max-width: 480px) { .fx-scale .fx-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .fx-scale .fx-links span { transition: none; } }