.fx-drum { --fx-drum-k: 0; display: grid; gap: 16px; }
.fx-drum:has(#fx-drum-he:checked) { --fx-drum-k: 1; }
.fx-drum:has(#fx-drum-she:checked) { --fx-drum-k: 2; }
.fx-drum:has(#fx-drum-printer:checked) { --fx-drum-k: 3; }
.fx-drum:has(#fx-drum-we:checked) { --fx-drum-k: 4; }
.fx-drum:has(#fx-drum-children:checked) { --fx-drum-k: 5; }
.fx-drum * { box-sizing: border-box; }
.fx-drum p, .fx-drum li, .fx-drum legend, .fx-drum label { color: var(--fx-ink); font-size: 16px; line-height: 1.4; }
.fx-drum .fx-drum-guide ol { margin: 0; padding-left: 24px; }
.fx-drum .fx-drum-guide li + li { margin-top: 6px; }
.fx-drum .fx-drum-goal, .fx-drum .fx-drum-hint, .fx-drum .fx-drum-read, .fx-drum .fx-drum-output-label { margin: 0; }
.fx-drum .fx-drum-controls { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }
.fx-drum .fx-drum-control { border: 0; padding: 0; margin: 0; min-width: 0; }
.fx-drum .fx-drum-control legend { font-weight: 800; padding: 0; margin-bottom: 10px; }
.fx-drum .fx-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-drum .fx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; max-width: 100%; padding: 9px 12px; border: 2px solid var(--fx-muted); border-radius: 10px; background: var(--fx-paper); color: var(--fx-ink); cursor: pointer; }
.fx-drum .fx-btn:has(input:checked) { background: var(--fx-sun-pale); border-color: var(--fx-ink); 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-control-tile { display: inline-grid; place-items: center; width: 28px; height: 32px; border: 2px solid var(--fx-ink); border-radius: 4px; background: var(--fx-coral); color: var(--fx-ink); font-size: 22px; font-weight: 800; }
.fx-drum .fx-drum-scene { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: center; height: 260px; padding: 12px; overflow: hidden; }
.fx-drum .fx-drum-part { display: grid; justify-items: center; align-content: center; gap: 8px; min-width: 0; }
.fx-drum .fx-drum-part-label { margin: 0; font-size: 14px; text-align: center; }
.fx-drum .fx-drum-view { position: relative; width: min(100%, 210px); height: 148px; perspective: 650px; }
.fx-drum .fx-drum-pointer { position: absolute; left: 0; top: 58px; z-index: 2; font-size: 24px; line-height: 32px; color: var(--fx-ink); }
.fx-drum .fx-drum-wheel { position: absolute; top: 42px; left: 16px; width: calc(100% - 32px); height: 64px; transform-style: preserve-3d; transform: rotateX(calc(var(--fx-drum-k) * -60deg)); transition: transform 0.65s steps(4, end); }
.fx-drum .fx-drum-wheel::before, .fx-drum .fx-drum-wheel::after { content: ""; position: absolute; top: -32px; width: 110.852px; height: 128px; background: var(--fx-sun); border: 2px solid var(--fx-ink); clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); transform: rotateY(90deg); }
.fx-drum .fx-drum-wheel::before { left: -55.426px; }
.fx-drum .fx-drum-wheel::after { right: -55.426px; }
.fx-drum .fx-drum-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 2px solid var(--fx-ink); border-radius: 2px; background: var(--fx-sun-pale); color: var(--fx-ink); font-size: 18px; line-height: 1.2; backface-visibility: hidden; transform: rotateX(calc(var(--fx-drum-i) * 60deg)) translateZ(55.426px); }
.fx-drum .fx-drum-face:nth-child(even) { background: var(--fx-sun); }
.fx-drum .fx-drum-face::before { content: ""; position: absolute; inset: 6px; border-top: 1px solid var(--fx-muted); border-bottom: 1px solid var(--fx-muted); opacity: 0.5; }
.fx-drum .fx-drum-icon { width: 30px; height: 24px; fill: none; stroke: var(--fx-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fx-drum .fx-drum-card { position: relative; width: min(100%, 238px); height: 148px; border: 2px solid var(--fx-ink); border-radius: 12px; background: var(--fx-paper); color: var(--fx-ink); }
.fx-drum .fx-drum-tile-label { position: absolute; top: 12px; left: 0; right: 0; margin: 0; font-size: 14px; text-align: center; }
.fx-drum .fx-drum-wordline { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; align-items: center; justify-content: center; height: 34px; font-size: 24px; line-height: 1.2; }
.fx-drum .fx-drum-slot { position: relative; flex: 0 0 24px; height: 34px; }
.fx-drum .fx-drum-tile { position: absolute; inset: 0; display: grid; place-items: center; border: 2px solid var(--fx-ink); border-radius: 4px; background: var(--fx-coral); color: var(--fx-ink); font-weight: 800; transform: translateY(-44px); transition: transform 0.35s; }
.fx-drum .fx-drum-rest { margin-left: 6px; }
.fx-drum:has(#fx-drum-s:checked) .fx-drum-tile { transform: translateY(0); }
.fx-drum:has(#fx-drum-i:checked):has(#fx-drum-s:checked) .fx-drum-tile { animation: fx-drum-wobble 0.45s 1; }
.fx-drum .fx-drum-output { display: grid; gap: 10px; min-width: 0; }
.fx-drum .fx-drum-stack { display: grid; min-width: 0; }
.fx-drum .fx-drum-state { grid-area: 1 / 1; visibility: hidden; margin: 0; padding: 12px; border: 2px solid var(--fx-ink); border-radius: 10px; color: var(--fx-ink); line-height: 1.5; overflow-wrap: anywhere; }
.fx-drum .fx-drum-sentences .fx-drum-state { background: var(--fx-paper); font-size: 20px; font-weight: 800; }
.fx-drum .fx-drum-feedback .fx-right { background: var(--fx-mint-pale); }
.fx-drum .fx-drum-feedback .fx-wrong { background: var(--fx-coral-pale); }
.fx-drum .fx-drum-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 6px; border-radius: 6px; vertical-align: middle; font-size: 22px; font-weight: 800; color: var(--fx-ink); }
.fx-drum .fx-right .fx-drum-mark { background: var(--fx-mint); }
.fx-drum .fx-wrong .fx-drum-mark { background: var(--fx-coral); }
.fx-drum:has(#fx-drum-i:checked):not(:has(#fx-drum-s:checked)) .fx-drum-i-off, .fx-drum:has(#fx-drum-i:checked):has(#fx-drum-s:checked) .fx-drum-i-on, .fx-drum:has(#fx-drum-he:checked):not(:has(#fx-drum-s:checked)) .fx-drum-he-off, .fx-drum:has(#fx-drum-he:checked):has(#fx-drum-s:checked) .fx-drum-he-on, .fx-drum:has(#fx-drum-she:checked):not(:has(#fx-drum-s:checked)) .fx-drum-she-off, .fx-drum:has(#fx-drum-she:checked):has(#fx-drum-s:checked) .fx-drum-she-on, .fx-drum:has(#fx-drum-printer:checked):not(:has(#fx-drum-s:checked)) .fx-drum-printer-off, .fx-drum:has(#fx-drum-printer:checked):has(#fx-drum-s:checked) .fx-drum-printer-on, .fx-drum:has(#fx-drum-we:checked):not(:has(#fx-drum-s:checked)) .fx-drum-we-off, .fx-drum:has(#fx-drum-we:checked):has(#fx-drum-s:checked) .fx-drum-we-on, .fx-drum:has(#fx-drum-children:checked):not(:has(#fx-drum-s:checked)) .fx-drum-children-off, .fx-drum:has(#fx-drum-children:checked):has(#fx-drum-s:checked) .fx-drum-children-on { visibility: visible; }
@container (max-width: 480px) { .fx-drum .fx-drum-controls { grid-template-columns: 1fr; } .fx-drum .fx-drum-scene { height: 440px; grid-template-columns: 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); } }
@keyframes fx-drum-wobble { 0%, 100% { transform: translateY(0) rotate(0deg); } 30% { transform: translateY(0) rotate(-10deg); } 70% { transform: translateY(0) rotate(10deg); } }
@media (prefers-reduced-motion: reduce) { .fx-drum .fx-drum-wheel, .fx-drum .fx-drum-tile { transition: none; animation: none; } }