.fx-shift { --fx-shift-k: 0; display: grid; gap: 16px; }
.fx-shift:has(#fx-shift-v1:checked) { --fx-shift-k: 1; }
.fx-shift:has(#fx-shift-v2:checked) { --fx-shift-k: 2; }
.fx-shift:has(#fx-shift-v3:checked) { --fx-shift-k: 3; }
.fx-shift:has(#fx-shift-v4:checked) { --fx-shift-k: 4; }
.fx-shift > * { min-width: 0; box-sizing: border-box; color: var(--fx-ink); font-size: 16px; line-height: 1.4; }
.fx-shift .fx-shift-how { margin: 0; padding-left: 22px; }
.fx-shift .fx-shift-how li + li { margin-top: 6px; }
.fx-shift .fx-shift-goal { margin: 0; }
.fx-shift .fx-shift-controls { border: 0; padding: 0; margin: 0; min-width: 0; }
.fx-shift .fx-shift-controls legend { padding: 0; margin-bottom: 10px; font-weight: 800; }
.fx-shift .fx-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-shift .fx-btn { min-height: 44px; min-width: 58px; padding: 8px 12px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--fx-muted); background: var(--fx-paper); color: var(--fx-ink); cursor: pointer; font-size: 16px; }
.fx-shift .fx-btn:has(input:checked) { background: var(--fx-sky); color: var(--fx-ink); border-color: var(--fx-ink); }
.fx-shift .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-coral); outline-offset: 3px; }
.fx-shift .fx-shift-machine { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 3fr); align-items: start; gap: 16px; height: 420px; padding: 12px; box-sizing: border-box; }
.fx-shift .fx-shift-dial-panel, .fx-shift .fx-shift-value-panel { display: grid; gap: 8px; min-width: 0; align-content: start; }
.fx-shift .fx-shift-dial-panel { text-align: center; }
.fx-shift .fx-shift-part { margin: 0; }
.fx-shift .fx-shift-dial-window { position: relative; width: 150px; height: 150px; margin: 0 auto; perspective: 500px; }
.fx-shift .fx-shift-dial-window::before { content: ""; position: absolute; inset: 5px; border: 6px solid var(--fx-sky); border-radius: 50%; background: var(--fx-paper); box-shadow: 0 5px 0 var(--fx-muted); }
.fx-shift .fx-shift-drum { position: absolute; top: calc(50% - 23px); left: calc(50% - 43px); width: 86px; height: 46px; transform-style: preserve-3d; transform: rotateX(calc(var(--fx-shift-k) * -72deg)); transition: transform 0.65s steps(4, end); }
.fx-shift .fx-shift-stop { position: absolute; inset: 0; box-sizing: border-box; display: grid; place-items: center; border: 2px solid var(--fx-ink); border-radius: 4px; background: var(--fx-sky-pale); color: var(--fx-ink); font-size: 18px; font-weight: 800; backface-visibility: hidden; transform: rotateX(calc(var(--fx-shift-i) * 72deg)) translateZ(32px); }
.fx-shift .fx-shift-pointer { position: absolute; left: 8px; top: 65px; width: 17px; height: 20px; background: var(--fx-coral); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.fx-shift .fx-shift-stack { display: grid; min-width: 0; }
.fx-shift .fx-shift-stack > .fx-shift-state { grid-area: 1 / 1; visibility: hidden; margin: 0; min-width: 0; color: var(--fx-ink); }
.fx-shift .fx-shift-dial-caption { font-size: 14px; }
.fx-shift:has(#fx-shift-v0:checked) .fx-shift-s0, .fx-shift:has(#fx-shift-v1:checked) .fx-shift-s1, .fx-shift:has(#fx-shift-v2:checked) .fx-shift-s2, .fx-shift:has(#fx-shift-v3:checked) .fx-shift-s3, .fx-shift:has(#fx-shift-v4:checked) .fx-shift-s4 { visibility: visible; }
.fx-shift .fx-shift-key { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-shift .fx-shift-blue-key, .fx-shift .fx-shift-zero-key { padding: 4px 6px; border: 2px solid var(--fx-sky); border-radius: 6px; background: var(--fx-sky-pale); color: var(--fx-ink); font-size: 12px; font-weight: 800; }
.fx-shift .fx-shift-zero-key { border-color: var(--fx-muted); background: var(--fx-paper); }
.fx-shift .fx-shift-board { position: relative; height: 110px; min-width: 0; }
.fx-shift .fx-shift-columns { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); height: 110px; }
.fx-shift .fx-shift-column { min-width: 0; border-right: 1px solid var(--fx-muted); border-top: 1px solid var(--fx-muted); border-bottom: 1px solid var(--fx-muted); box-sizing: border-box; background: var(--fx-paper); text-align: center; }
.fx-shift .fx-shift-column:first-child { border-left: 1px solid var(--fx-muted); }
.fx-shift .fx-shift-column-name { display: block; padding-top: 7px; font-size: 12px; font-weight: 800; letter-spacing: -0.04em; }
.fx-shift .fx-shift-digits { position: absolute; top: 42px; left: calc((4 - var(--fx-shift-k)) * 100% / 7); width: calc(300% / 7); height: 44px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); transition: left 0.65s; }
.fx-shift .fx-shift-tile { min-width: 0; height: 44px; margin: 0 3px; box-sizing: border-box; display: grid; place-items: center; border-radius: 6px; font-size: 20px; line-height: 1; font-weight: 800; color: var(--fx-ink); }
.fx-shift .fx-shift-digit { border: 2px solid var(--fx-sky); background: var(--fx-sky-pale); }
.fx-shift .fx-shift-zeros { position: absolute; top: 42px; left: 0; width: 100%; height: 44px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.fx-shift .fx-shift-zero { grid-row: 1; visibility: hidden; opacity: 0; transform: translateY(-12px); border: 3px solid var(--fx-muted); background: var(--fx-muted); place-items: stretch; transition: transform 0.3s, opacity 0.3s; }
.fx-shift .fx-shift-zero > span { display: grid; place-items: center; border-radius: 2px; background: var(--fx-paper); }
.fx-shift .fx-shift-zero-h { grid-column: 4; }
.fx-shift .fx-shift-zero-t { grid-column: 5; }
.fx-shift .fx-shift-zero-u { grid-column: 6; }
.fx-shift:has(#fx-shift-v2:checked) .fx-shift-zero-u, .fx-shift:has(#fx-shift-v3:checked) .fx-shift-zero-t, .fx-shift:has(#fx-shift-v3:checked) .fx-shift-zero-u, .fx-shift:has(#fx-shift-v4:checked) .fx-shift-zero { visibility: visible; opacity: 1; transform: translateY(0); transition-delay: 0.65s; }
.fx-shift .fx-shift-point { position: absolute; z-index: 2; left: calc(600% / 7); top: 79px; width: 10px; height: 10px; border-radius: 50%; background: var(--fx-coral); transform: translateX(-50%); }
.fx-shift .fx-shift-point-label { margin: 0; font-size: 14px; }
.fx-shift .fx-shift-point-label strong { border-bottom: 3px solid var(--fx-coral); }
.fx-shift .fx-shift-definitions { margin: 0; font-size: 12px; }
.fx-shift .fx-shift-answer { display: grid; justify-items: center; gap: 2px; padding: 8px; border: 2px solid var(--fx-muted); border-radius: 8px; background: var(--fx-paper); }
.fx-shift .fx-shift-answer .fx-score { font-size: 32px; line-height: 1.2; font-weight: 800; }
.fx-shift:has(#fx-shift-v3:checked) .fx-shift-answer { border-color: var(--fx-mint); background: var(--fx-mint-pale); box-shadow: 0 0 0 3px var(--fx-mint-pale); }
@container (max-width: 480px) { .fx-shift .fx-shift-machine { grid-template-columns: minmax(0, 1fr); height: 700px; } }
@media (prefers-reduced-motion: reduce) { .fx-shift .fx-shift-drum, .fx-shift .fx-shift-digits, .fx-shift .fx-shift-zero { transition: none; } }