.fx-stacks .fx-stacks-body { display: grid; gap: 16px; min-width: 0; color: var(--fx-ink); font-size: 16px; line-height: 1.5; }
.fx-stacks .fx-stacks-how ol { list-style: none; margin: 0; padding: 0; }
.fx-stacks .fx-stacks-how li + li { margin-top: 6px; }
.fx-stacks .fx-stacks-goal { margin: 0; }
.fx-stacks .fx-stacks-controls { border: 0; padding: 0; margin: 0; min-width: 0; }
.fx-stacks .fx-stacks-controls legend { padding: 0; margin-bottom: 10px; font-weight: 800; }
.fx-stacks .fx-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-stacks .fx-btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 40px; min-height: 40px; padding: 6px 10px; border: 2px solid var(--fx-muted); background: var(--fx-paper); color: var(--fx-ink); }
.fx-stacks .fx-btn:has(input:checked) { background: var(--fx-sun); color: var(--fx-ink); border-color: var(--fx-ink); }
.fx-stacks .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-ink); outline-offset: 3px; }
.fx-stacks .fx-stacks-scene { --fx-k: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; align-items: start; min-width: 0; }
.fx-stacks:has(#fx-stacks-3:checked) .fx-stacks-scene { --fx-k: 1; }
.fx-stacks:has(#fx-stacks-4:checked) .fx-stacks-scene { --fx-k: 2; }
.fx-stacks:has(#fx-stacks-5:checked) .fx-stacks-scene { --fx-k: 3; }
.fx-stacks:has(#fx-stacks-6:checked) .fx-stacks-scene { --fx-k: 4; }
.fx-stacks:has(#fx-stacks-7:checked) .fx-stacks-scene { --fx-k: 5; }
.fx-stacks:has(#fx-stacks-8:checked) .fx-stacks-scene { --fx-k: 6; }
.fx-stacks:has(#fx-stacks-9:checked) .fx-stacks-scene { --fx-k: 7; }
.fx-stacks .fx-stage { box-sizing: border-box; min-width: 0; position: relative; }
.fx-stacks .fx-stacks-dial { height: 260px; padding: 12px; text-align: center; overflow: hidden; }
.fx-stacks .fx-stacks-dial > b { display: block; }
.fx-stacks .fx-stacks-dial small { display: block; font-size: 14px; }
.fx-stacks .fx-stacks-view { position: relative; height: 176px; perspective: 600px; }
.fx-stacks .fx-stacks-axle { position: absolute; left: 50%; top: 50%; width: 112px; height: 55px; margin-left: -56px; margin-top: -27.5px; transform: rotateY(-18deg); transform-style: preserve-3d; }
.fx-stacks .fx-stacks-wheel { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(calc(var(--fx-k) * -45deg)); transition: transform 0.6s steps(4, end); }
.fx-stacks .fx-stacks-face { box-sizing: border-box; position: absolute; inset: 0; display: grid; place-items: center; border: 3px solid var(--fx-ink); background: var(--fx-sun-pale); color: var(--fx-ink); font-size: 30px; font-weight: 800; backface-visibility: hidden; transform: rotateX(calc(var(--fx-i) * 45deg)) translateZ(66px); }
.fx-stacks .fx-stacks-wheel::before, .fx-stacks .fx-stacks-wheel::after { content: ""; position: absolute; width: 148px; height: 148px; left: -18px; top: -46.5px; background: var(--fx-sky); clip-path: polygon(35% 0%, 45% 0%, 48% 7%, 55% 7%, 60% 0%, 70% 4%, 70% 13%, 77% 18%, 86% 15%, 94% 24%, 89% 33%, 94% 40%, 100% 42%, 100% 55%, 92% 59%, 89% 67%, 94% 76%, 85% 85%, 76% 82%, 69% 88%, 68% 97%, 56% 100%, 51% 93%, 43% 93%, 38% 100%, 26% 96%, 26% 87%, 18% 81%, 9% 85%, 2% 74%, 7% 66%, 4% 58%, 0% 55%, 0% 42%, 7% 38%, 10% 30%, 5% 22%, 15% 13%, 23% 17%, 30% 11%, 30% 3%); }
.fx-stacks .fx-stacks-wheel::before { transform: rotateY(90deg) translateZ(-56px); }
.fx-stacks .fx-stacks-wheel::after { transform: rotateY(90deg) translateZ(56px); }
.fx-stacks .fx-stacks-pointer { position: absolute; left: 50%; top: 42px; width: 22px; height: 16px; transform: translateX(-50%); background: var(--fx-coral); clip-path: polygon(0% 0%, 100% 0%, 50% 100%); }
.fx-stacks .fx-stacks-floor { height: 356px; padding: 12px; display: grid; grid-template-rows: 40px 20px 174px 40px 32px; gap: 4px; text-align: center; background: var(--fx-sun-pale); }
.fx-stacks .fx-stacks-floor > b { display: grid; place-items: center; line-height: 1.2; }
.fx-stacks .fx-stacks-floor svg { display: block; width: 100%; height: 174px; }
.fx-stacks .fx-stacks-floor rect { fill: var(--fx-sun); stroke: var(--fx-ink); stroke-width: 1; }
.fx-stacks .fx-stacks-floor path { fill: none; stroke: var(--fx-ink); stroke-width: 1; }
.fx-stacks .fx-stacks-floor text { fill: var(--fx-ink); text-anchor: middle; font-size: 18px; font-weight: 800; }
.fx-stacks .fx-stacks-tray { position: relative; display: flex; gap: 4px; align-items: center; padding: 4px; border: 2px solid var(--fx-ink); background: var(--fx-paper); }
.fx-stacks .fx-stacks-loose { flex: 1; visibility: hidden; height: 9px; border: 1px solid var(--fx-ink); background: var(--fx-sun); transform: rotate(-5deg); }
.fx-stacks .fx-stacks-empty { position: absolute; inset: 0; display: grid; place-items: center; visibility: hidden; font-size: 14px; }
.fx-stacks:has(#fx-stacks-4:checked) .fx-stacks-loose:nth-child(-n + 2), .fx-stacks:has(#fx-stacks-5:checked) .fx-stacks-loose:nth-child(-n + 4), .fx-stacks:has(#fx-stacks-7:checked) .fx-stacks-loose:nth-child(-n + 5), .fx-stacks:has(#fx-stacks-8:checked) .fx-stacks-loose { visibility: visible; }
.fx-stacks:has(#fx-stacks-2:checked) .fx-stacks-empty, .fx-stacks:has(#fx-stacks-3:checked) .fx-stacks-empty, .fx-stacks:has(#fx-stacks-6:checked) .fx-stacks-empty, .fx-stacks:has(#fx-stacks-9:checked) .fx-stacks-empty { visibility: visible; }
.fx-stacks .fx-stacks-answer { display: grid; gap: 8px; min-width: 0; }
.fx-stacks .fx-stacks-swap { display: grid; min-width: 0; }
.fx-stacks .fx-stacks-swap > p { grid-area: 1 / 1; margin: 0; color: var(--fx-ink); }
.fx-stacks .fx-stacks-v { visibility: hidden; }
.fx-stacks:has(#fx-stacks-2:checked) .fx-stacks-s2, .fx-stacks:has(#fx-stacks-3:checked) .fx-stacks-s3, .fx-stacks:has(#fx-stacks-4:checked) .fx-stacks-s4, .fx-stacks:has(#fx-stacks-5:checked) .fx-stacks-s5, .fx-stacks:has(#fx-stacks-6:checked) .fx-stacks-s6, .fx-stacks:has(#fx-stacks-7:checked) .fx-stacks-s7, .fx-stacks:has(#fx-stacks-8:checked) .fx-stacks-s8, .fx-stacks:has(#fx-stacks-9:checked) .fx-stacks-s9 { visibility: visible; }
.fx-stacks .fx-stacks-long { display: grid; grid-template-columns: 24px 38px auto; gap: 3px; width: fit-content; margin: 0 0 8px; align-items: center; text-align: center; font-size: 18px; line-height: 1.3; }
.fx-stacks .fx-stacks-long i { grid-area: 1 / 2; font-style: normal; }
.fx-stacks .fx-stacks-long b { grid-area: 2 / 1; }
.fx-stacks .fx-stacks-long em { grid-area: 2 / 2; border-top: 2px solid var(--fx-ink); border-left: 2px solid var(--fx-ink); font-style: normal; }
.fx-stacks .fx-stacks-long small { grid-area: 2 / 3; padding-left: 6px; font-size: 14px; }
@container (max-width: 480px) { .fx-stacks .fx-stacks-scene { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .fx-stacks .fx-stacks-wheel { transition: none; } }