.fx-drum { --fx-k: 0; display: grid; gap: 12px; }
.fx-drum:has(#fx-drum-h00:checked) { --fx-k: 1; }
.fx-drum:has(#fx-drum-h04:checked) { --fx-k: 2; }
.fx-drum:has(#fx-drum-h07:checked) { --fx-k: 3; }
.fx-drum:has(#fx-drum-h12:checked) { --fx-k: 4; }
.fx-drum:has(#fx-drum-h13:checked) { --fx-k: 5; }
.fx-drum:has(#fx-drum-h15:checked) { --fx-k: 6; }
.fx-drum:has(#fx-drum-h18:checked) { --fx-k: 7; }
.fx-drum:has(#fx-drum-h20:checked) { --fx-k: 8; }
.fx-drum:has(#fx-drum-h22:checked) { --fx-k: 9; }
.fx-drum:has(#fx-drum-h23:checked) { --fx-k: 10; }
.fx-drum .fx-steps { list-style: none; margin: 0; padding: 0; }
.fx-drum .fx-steps li + li { margin-top: 6px; }
.fx-drum .fx-goal { margin: 0; color: var(--fx-ink); }
.fx-drum .fx-controls { min-width: 0; margin: 0; padding: 0; border: 0; }
.fx-drum .fx-controls legend { padding: 0; margin-bottom: 10px; font-weight: 800; color: var(--fx-ink); }
.fx-drum .fx-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-drum .fx-btn { box-sizing: border-box; min-width: 44px; min-height: 44px; padding: 8px 10px; display: inline-flex; justify-content: center; align-items: center; background: var(--fx-paper); color: var(--fx-ink); font-size: 16px; cursor: pointer; }
.fx-drum .fx-btn:has(input:checked) { background: var(--fx-mint); color: var(--fx-ink); }
.fx-drum .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-ink); outline-offset: 3px; }
.fx-drum .fx-scene { box-sizing: border-box; height: 420px; padding: 12px; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 210px minmax(0, 1fr); gap: 12px; color: var(--fx-ink); }
.fx-drum .fx-clock { box-sizing: border-box; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); gap: 4px; padding: 12px; border: 8px solid var(--fx-ink); border-radius: 16px; background: var(--fx-ink); }
.fx-drum .fx-unit { min-width: 0; display: grid; grid-template-rows: 36px minmax(0, 1fr); }
.fx-drum .fx-part { display: grid; place-items: center; text-align: center; font-size: 14px; line-height: 1.2; color: var(--fx-ink); background: var(--fx-paper); }
.fx-drum .fx-port { min-width: 0; position: relative; overflow: hidden; perspective: 600px; background: var(--fx-paper); }
.fx-drum .fx-port::after { content: ""; position: absolute; right: 0; top: calc(50% - 7px); width: 10px; height: 14px; background: var(--fx-coral); clip-path: polygon(100% 0, 0 50%, 100% 100%); }
.fx-drum .fx-wheel { position: absolute; inset: 0; transform-style: preserve-3d; transform: translateZ(-123px) rotateX(calc(var(--fx-k) * -360deg / 11)); transition: transform 0.8s steps(4, end); }
.fx-drum .fx-face { box-sizing: border-box; position: absolute; left: 0; top: 50%; width: 100%; height: 72px; margin-top: -36px; display: flex; align-items: center; justify-content: center; background: var(--fx-paper); color: var(--fx-ink); border: 1px solid var(--fx-ink); font-size: 44px; font-weight: 800; line-height: 1; backface-visibility: hidden; transform: rotateX(calc(var(--fx-i) * 360deg / 11)) translateZ(123px); }
.fx-drum .fx-fixed { min-width: 0; display: grid; place-items: center; background: var(--fx-paper); color: var(--fx-ink); font-size: 44px; font-weight: 800; line-height: 1; }
.fx-drum .fx-readout { min-width: 0; box-sizing: border-box; display: grid; grid-template-rows: 24px minmax(0, 1fr); padding: 8px; border: 2px solid var(--fx-ink); border-radius: 10px; background: var(--fx-paper); }
.fx-drum .fx-swap { display: grid; min-width: 0; }
.fx-drum .fx-state { grid-area: 1 / 1; visibility: hidden; margin: 0; color: var(--fx-ink); }
.fx-drum .fx-result .fx-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; font-size: 16px; line-height: 1.2; }
.fx-drum .fx-result strong { font-size: 24px; }
.fx-drum .fx-icon { display: flex; align-items: center; justify-content: center; gap: 6px; }
.fx-drum .fx-icon small { font-size: 14px; }
.fx-drum .fx-icon svg { width: 32px; height: 32px; fill: none; stroke: var(--fx-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fx-drum .fx-icon .fx-lit { fill: var(--fx-sun); }
.fx-drum .fx-icon .fx-sky { fill: var(--fx-sky-pale); }
.fx-drum .fx-icon .fx-balloon { fill: var(--fx-coral); }
.fx-drum:has(#fx-drum-blank:checked) .fx-sblank, .fx-drum:has(#fx-drum-h00:checked) .fx-s00, .fx-drum:has(#fx-drum-h04:checked) .fx-s04, .fx-drum:has(#fx-drum-h07:checked) .fx-s07, .fx-drum:has(#fx-drum-h12:checked) .fx-s12, .fx-drum:has(#fx-drum-h13:checked) .fx-s13, .fx-drum:has(#fx-drum-h15:checked) .fx-s15, .fx-drum:has(#fx-drum-h18:checked) .fx-s18, .fx-drum:has(#fx-drum-h20:checked) .fx-s20, .fx-drum:has(#fx-drum-h22:checked) .fx-s22, .fx-drum:has(#fx-drum-h23:checked) .fx-s23 { visibility: visible; }
@container (max-width: 480px) { .fx-drum .fx-scene { grid-template-columns: minmax(0, 1fr); } .fx-drum .fx-clock { padding: 8px; border-width: 6px; grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); } .fx-drum .fx-face, .fx-drum .fx-fixed { font-size: 36px; } }
@media (prefers-reduced-motion: reduce) { .fx-drum .fx-wheel { transition: none; } }