.fx-drum { --fx-k: 0; display: grid; gap: 14px; }
.fx-drum > * { min-width: 0; color: var(--fx-ink); }
.fx-drum:has(#fx-drum-boss:checked) { --fx-k: 1; }
.fx-drum:has(#fx-drum-fly:checked) { --fx-k: 2; }
.fx-drum:has(#fx-drum-key:checked) { --fx-k: 3; }
.fx-drum:has(#fx-drum-shelf:checked) { --fx-k: 4; }
.fx-drum:has(#fx-drum-person:checked) { --fx-k: 5; }
.fx-drum:has(#fx-drum-sheep:checked) { --fx-k: 6; }
.fx-drum .fx-drum-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fx-drum .fx-drum-goal { margin: 0; }
.fx-drum .fx-drum-controls { border: 0; padding: 0; margin: 0; min-width: 0; }
.fx-drum .fx-drum-controls legend { padding: 0; margin-bottom: 10px; font-weight: 800; }
.fx-drum .fx-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-drum .fx-btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 2px solid var(--fx-ink); border-radius: 10px; background: var(--fx-paper); color: var(--fx-ink); font-weight: 700; 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-drum-hints, .fx-drum .fx-drum-says, .fx-drum .fx-drum-wordstack { display: grid; min-width: 0; }
.fx-drum .fx-drum-swap { --fx-show: 0; grid-area: 1 / 1; visibility: hidden; margin: 0; }
.fx-drum:has(#fx-drum-receipt:checked) .fx-drum-for-receipt, .fx-drum:has(#fx-drum-boss:checked) .fx-drum-for-boss, .fx-drum:has(#fx-drum-fly:checked) .fx-drum-for-fly, .fx-drum:has(#fx-drum-key:checked) .fx-drum-for-key, .fx-drum:has(#fx-drum-shelf:checked) .fx-drum-for-shelf, .fx-drum:has(#fx-drum-person:checked) .fx-drum-for-person, .fx-drum:has(#fx-drum-sheep:checked) .fx-drum-for-sheep { --fx-show: 1; --fx-end: var(--fx-sun); visibility: visible; }
.fx-drum .fx-drum-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.fx-drum .fx-drum-barrel { position: relative; height: 260px; box-sizing: border-box; overflow: hidden; border: 2px dashed var(--fx-sky); border-radius: 14px; background: var(--fx-sky-pale); }
.fx-drum .fx-drum-label { position: absolute; top: 12px; left: 12px; }
.fx-drum .fx-drum-end-label { position: absolute; bottom: 18px; left: 8px; right: 8px; text-align: center; font-size: 14px; }
.fx-drum .fx-drum-view { position: absolute; left: 14px; right: 68px; top: 52px; height: 156px; perspective: 600px; perspective-origin: 50% 40%; }
.fx-drum .fx-drum-view::before, .fx-drum .fx-drum-view::after { content: ""; position: absolute; top: 4px; bottom: 4px; width: 14px; box-sizing: border-box; border: 2px solid var(--fx-ink); border-radius: 50%; background: var(--fx-sun); }
.fx-drum .fx-drum-view::before { left: -6px; }
.fx-drum .fx-drum-view::after { right: -6px; }
.fx-drum .fx-drum-rotor { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(calc(var(--fx-k) * -360deg / 7)); transition: transform 0.8s steps(4, end); }
.fx-drum .fx-drum-face { --fx-end: var(--fx-sun-pale); position: absolute; box-sizing: border-box; top: 50%; left: 0; margin-top: -32px; width: 100%; height: 64px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--fx-ink); border-radius: 5px; background: var(--fx-sun-pale); color: var(--fx-ink); font-size: 24px; font-weight: 800; backface-visibility: hidden; transform: rotateX(calc(var(--fx-i) * 360deg / 7)) translateZ(66.5px); }
.fx-drum .fx-drum-face::before, .fx-drum .fx-drum-face::after { content: ""; position: absolute; top: 0; bottom: 0; width: 5px; background: var(--fx-sun); border-left: 1px solid var(--fx-ink); border-right: 1px solid var(--fx-ink); }
.fx-drum .fx-drum-face::before { left: 4px; }
.fx-drum .fx-drum-face::after { right: 4px; }
.fx-drum .fx-drum-tip { background: var(--fx-end); border-radius: 4px; }
.fx-drum .fx-drum-pointer { position: absolute; top: 118px; right: 6px; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; }
.fx-drum .fx-drum-arrow { display: block; width: 26px; height: 24px; background: var(--fx-coral); clip-path: polygon(100% 0, 0 50%, 100% 100%); }
.fx-drum .fx-drum-cards { height: 260px; display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.fx-drum .fx-drum-card { min-width: 0; padding: 10px 12px; border: 2px solid var(--fx-ink); border-radius: 12px; background: var(--fx-paper); display: grid; align-content: center; gap: 8px; box-sizing: border-box; }
.fx-drum .fx-drum-card > b { font-size: 14px; }
.fx-drum .fx-drum-wordstack > p { position: relative; min-height: 66px; font-size: 30px; font-weight: 800; line-height: 1.2; }
.fx-drum .fx-drum-wordstack small { display: block; margin-top: 5px; font-size: 12px; font-weight: 600; line-height: 1.4; }
.fx-drum .fx-drum-lit { background: var(--fx-sun); border-radius: 4px; }
.fx-drum .fx-drum-tile { display: inline-block; padding: 0 3px; border-radius: 5px; background: var(--fx-mint); opacity: var(--fx-show); transform: translateY(calc((1 - var(--fx-show)) * 12px)) rotateX(calc((1 - var(--fx-show)) * -70deg)); transition: transform 0.6s steps(4, end), opacity 0.4s; }
.fx-drum .fx-drum-mark { display: inline-block; padding: 0 3px; border-radius: 5px; background: var(--fx-sun); font-size: 22px; }
.fx-drum .fx-drum-cut { position: relative; display: inline-block; width: 0; }
.fx-drum .fx-drum-drop { position: absolute; top: -0.9em; left: 0; font-size: 20px; text-decoration: line-through; opacity: calc(1 - var(--fx-show) * 0.65); transform: translateY(calc(var(--fx-show) * 1.6em)) rotate(calc(var(--fx-show) * 15deg)); transition: transform 0.6s, opacity 0.6s; }
.fx-drum .fx-drum-replaced { position: absolute; left: 0; top: 0; opacity: calc(1 - var(--fx-show)); transition: opacity 0.4s; }
.fx-drum .fx-drum-says > p { align-self: stretch; box-sizing: border-box; padding: 12px; border: 2px solid var(--fx-ink); border-radius: 12px; background: var(--fx-sky-pale); color: var(--fx-ink); }
.fx-drum .fx-drum-says > .fx-right { background: var(--fx-mint-pale); }
@container (max-width: 480px) { .fx-drum .fx-drum-pair { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .fx-drum .fx-drum-rotor, .fx-drum .fx-drum-tile, .fx-drum .fx-drum-drop, .fx-drum .fx-drum-replaced { transition: none; } }