.fx-fill { --fx-p: 0; display: grid; }
.fx-fill:has(#fx-fill-200:checked) { --fx-p: 0.2; }
.fx-fill:has(#fx-fill-400:checked) { --fx-p: 0.4; }
.fx-fill:has(#fx-fill-600:checked) { --fx-p: 0.6; }
.fx-fill:has(#fx-fill-800:checked) { --fx-p: 0.8; }
.fx-fill:has(#fx-fill-1000:checked) { --fx-p: 1; }
.fx-fill .fx-shell { display: grid; gap: 16px; min-width: 0; color: var(--fx-ink); }
.fx-fill .fx-steps { margin: 0; padding-left: 24px; }
.fx-fill .fx-steps li { padding: 3px 0; }
.fx-fill .fx-goal { margin: 0; }
.fx-fill .fx-controls { min-width: 0; margin: 0; padding: 0; border: 0; }
.fx-fill .fx-controls legend { padding: 0; margin-bottom: 10px; font-weight: 800; }
.fx-fill .fx-options { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-fill .fx-btn { box-sizing: border-box; min-height: 36px; color: var(--fx-ink); background: var(--fx-paper); border: 2px solid var(--fx-ink); }
.fx-fill .fx-choice { display: flex; align-items: center; justify-content: center; flex: 1 1 76px; padding: 8px; white-space: nowrap; cursor: pointer; }
.fx-fill .fx-btn:has(input:checked) { color: var(--fx-ink); background: var(--fx-sky-pale); }
.fx-fill .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-ink); outline-offset: 3px; }
.fx-fill .fx-drawing { height: 392px; box-sizing: border-box; padding: 0; display: grid; place-items: center; overflow: hidden; }
.fx-fill .fx-canvas { position: relative; width: min(100%, 300px); height: 380px; }
.fx-fill .fx-jug-name { position: absolute; top: 10px; left: 0; right: 0; text-align: center; }
.fx-fill .fx-scale-name { position: absolute; top: 43px; left: 4px; right: 4px; margin: 0; text-align: center; font-size: 14px; line-height: 18px; }
.fx-fill .fx-tick { position: absolute; z-index: 2; left: calc(8% + 104px); right: 3%; bottom: calc(36px + var(--fx-mark) * 44px); height: 32px; min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 3px; padding: 4px; font-size: 12px; line-height: 16px; cursor: pointer; white-space: nowrap; }
.fx-fill .fx-tick::before { content: ""; position: absolute; right: 100%; top: calc(50% - 1px); width: 7px; border-top: 2px solid var(--fx-ink); }
.fx-fill .fx-tag { padding: 1px 3px; border: 1px solid var(--fx-ink); border-radius: 4px; background: var(--fx-sun-pale); font-size: 12px; line-height: 16px; }
.fx-fill:has(#fx-fill-200:checked) .fx-t200, .fx-fill:has(#fx-fill-400:checked) .fx-t400, .fx-fill:has(#fx-fill-600:checked) .fx-t600, .fx-fill:has(#fx-fill-800:checked) .fx-t800, .fx-fill:has(#fx-fill-1000:checked) .fx-t1000 { background: var(--fx-sky-pale); }
.fx-fill:has(#fx-fill-1000:checked) .fx-tag { background: var(--fx-mint); box-shadow: 0 0 0 4px var(--fx-mint-pale); }
.fx-fill .fx-world { position: absolute; left: 8%; top: 88px; width: 120px; height: 240px; perspective: 850px; }
.fx-fill .fx-jug { position: relative; width: 104px; height: 240px; transform-style: preserve-3d; transform: rotateY(-16deg); transition: transform 0.6s; }
.fx-fill .fx-plane { position: absolute; box-sizing: border-box; }
.fx-fill .fx-back { inset: 0; background: var(--fx-paper); border: 2px solid var(--fx-ink); transform: translateZ(-16px); }
.fx-fill .fx-front { inset: 0; border: 2px solid var(--fx-ink); transform: translateZ(16px); }
.fx-fill .fx-side { left: 104px; top: 0; width: 32px; height: 240px; border: 2px solid var(--fx-ink); background: var(--fx-sky-pale); opacity: 0.25; transform-origin: 0 50%; transform: rotateY(90deg) translateX(-16px); }
.fx-fill .fx-rim, .fx-fill .fx-bottom { left: 0; width: 104px; height: 32px; border: 2px solid var(--fx-ink); transform-origin: 50% 0; transform: rotateX(90deg) translateY(-16px); }
.fx-fill .fx-rim { top: 0; }
.fx-fill .fx-bottom { top: 240px; background: var(--fx-paper); }
.fx-fill .fx-handle { left: -12px; top: 64px; width: 22px; height: 80px; border: 5px solid var(--fx-ink); border-radius: 10px; transform: translateZ(-5px); }
.fx-fill .fx-liquid { transition: transform 0.6s, opacity 0.2s; }
.fx-fill .fx-water-front { left: 2px; bottom: 0; width: 100px; height: 220px; background: var(--fx-sky); transform-origin: 50% 100%; transform: translateZ(14px) scaleY(var(--fx-p)); }
.fx-fill .fx-water-side { left: 102px; bottom: 0; width: 28px; height: 220px; background: var(--fx-sky); transform-origin: 0 100%; transform: rotateY(90deg) translateX(-14px) scaleY(var(--fx-p)); }
.fx-fill .fx-water-top { left: 2px; top: 20px; width: 100px; height: 28px; background: var(--fx-sky-pale); border: 1px solid var(--fx-ink); transform-origin: 50% 0; transform: translateY(calc(220px - 220px * var(--fx-p))) rotateX(90deg) translateY(-14px); }
.fx-fill:has(#fx-fill-empty:checked) .fx-water-top { opacity: 0; }
.fx-fill .fx-scale-lines { position: absolute; inset: 0; transform: translateZ(17px); }
.fx-fill .fx-scale-lines span { position: absolute; left: 72px; width: 32px; bottom: calc(var(--fx-mark) * 44px); border-top: 2px solid var(--fx-ink); }
.fx-fill .fx-water-name { position: absolute; left: 8%; bottom: 12px; font-size: 14px; font-weight: 700; }
.fx-fill .fx-hint { position: absolute; top: 308px; left: calc(8% + 104px); right: 3%; margin: 0; font-size: 12px; line-height: 18px; visibility: hidden; }
.fx-fill .fx-readings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fx-fill .fx-reading { min-width: 0; padding: 12px; border: 2px solid var(--fx-ink); border-radius: 8px; background: var(--fx-paper); }
.fx-fill .fx-reading b { font-size: 14px; }
.fx-fill .fx-swaps { display: grid; }
.fx-fill .fx-state { grid-area: 1 / 1; visibility: hidden; margin: 0; }
.fx-fill .fx-reading .fx-score { font-size: 28px; line-height: 36px; }
.fx-fill .fx-messages .fx-state { box-sizing: border-box; padding: 12px; color: var(--fx-ink); }
.fx-fill:has(#fx-fill-empty:checked) .fx-s0, .fx-fill:has(#fx-fill-200:checked) .fx-s200, .fx-fill:has(#fx-fill-400:checked) .fx-s400, .fx-fill:has(#fx-fill-600:checked) .fx-s600, .fx-fill:has(#fx-fill-800:checked) .fx-s800, .fx-fill:has(#fx-fill-1000:checked) .fx-s1000 { visibility: visible; }
@container (max-width: 480px) { .fx-fill .fx-readings { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .fx-fill .fx-liquid, .fx-fill .fx-jug { transition: none; } }