.fx-pages { --fx-pages-k: 0; --fx-pages-leaf: var(--fx-paper); display: grid; gap: 14px; }
.fx-pages:has(#fx-pages-p983:checked) { --fx-pages-k: 1; }
.fx-pages:has(#fx-pages-p984:checked) { --fx-pages-k: 2; }
.fx-pages:has(#fx-pages-p985:checked) { --fx-pages-k: 3; }
.fx-pages:has(#fx-pages-p986:checked) { --fx-pages-k: 4; }
.fx-pages:has(#fx-pages-rap:checked):has(#fx-pages-p982:checked), .fx-pages:has(#fx-pages-rust:checked):has(#fx-pages-p984:checked) { --fx-pages-leaf: var(--fx-mint-pale); }
.fx-pages .fx-pages-how ol { margin: 0; padding-left: 24px; }
.fx-pages .fx-pages-how li { padding-left: 2px; margin: 5px 0; }
.fx-pages .fx-pages-goal, .fx-pages .fx-pages-tip, .fx-pages .fx-pages-step { margin: 0; color: var(--fx-ink); }
.fx-pages .fx-pages-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; }
.fx-pages .fx-pages-group { min-width: 0; padding: 0; margin: 0; border: 0; }
.fx-pages .fx-pages-group legend { padding: 0; margin-bottom: 10px; font-weight: 700; }
.fx-pages .fx-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-pages .fx-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 12px; box-sizing: border-box; border: 2px solid var(--fx-ink); color: var(--fx-ink); background: var(--fx-paper); }
.fx-pages .fx-btn:has(input:checked) { background: var(--fx-sun); color: var(--fx-ink); }
.fx-pages .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-grape); outline-offset: 3px; }
.fx-pages .fx-pages-options .fx-btn { flex: 1; min-width: 36px; padding: 8px 4px; font-size: 14px; }
@container (max-width: 480px) { .fx-pages .fx-pages-controls { grid-template-columns: 1fr; } }
.fx-pages .fx-pages-scene { position: relative; display: grid; grid-template-rows: 44px 20px 214px 30px; align-content: center; gap: 8px; height: 360px; padding: 10px; box-sizing: border-box; overflow: hidden; color: var(--fx-ink); }
.fx-pages .fx-pages-target { display: flex; align-items: center; justify-content: center; gap: 12px; justify-self: center; max-width: 100%; padding: 6px 12px; box-sizing: border-box; background: var(--fx-sun); border: 2px solid var(--fx-ink); }
.fx-pages .fx-pages-target > b { font-size: 12px; }
.fx-pages .fx-pages-words { display: grid; min-width: 40px; font-size: 20px; }
.fx-pages .fx-pages-words strong { grid-area: 1 / 1; visibility: hidden; }
.fx-pages:has(#fx-pages-rap:checked) .fx-pages-word-rap, .fx-pages:has(#fx-pages-rust:checked) .fx-pages-word-rust { visibility: visible; }
.fx-pages .fx-pages-title { text-align: center; font-size: 14px; font-weight: 800; }
.fx-pages .fx-pages-book { display: flex; flex-wrap: wrap; min-width: 0; border: 3px solid var(--fx-ink); border-radius: 8px 8px 4px 4px; overflow: hidden; background: var(--fx-sun); }
.fx-pages .fx-pages-left, .fx-pages .fx-pages-leaf { height: calc(100% - 30px); box-sizing: border-box; }
.fx-pages .fx-pages-left { width: calc(100% / 3.3); min-width: 0; padding: 14px 9px; background: var(--fx-sun-pale); border-right: 3px solid var(--fx-ink); }
.fx-pages .fx-pages-leaf { flex: 1; min-width: 0; padding: 6px; background: var(--fx-pages-leaf); box-shadow: inset 0 0 0 3px var(--fx-pages-leaf); }
.fx-pages:has(#fx-pages-rap:checked):has(#fx-pages-p982:checked) .fx-pages-leaf, .fx-pages:has(#fx-pages-rust:checked):has(#fx-pages-p984:checked) .fx-pages-leaf { box-shadow: inset 0 0 0 3px var(--fx-mint); }
.fx-pages .fx-pages-window { height: 128px; width: 100%; overflow: hidden; perspective: 650px; }
.fx-pages .fx-pages-drum { position: relative; width: 100%; height: 128px; transform-style: preserve-3d; transform: translateZ(-88px) rotateX(calc(var(--fx-pages-k) * -72deg)); transition: transform 0.6s steps(4, end); }
.fx-pages .fx-pages-face { position: absolute; top: 0; left: 0; display: grid; align-content: center; justify-items: center; gap: 8px; width: 100%; height: 128px; padding: 6px 2px; box-sizing: border-box; background: var(--fx-pages-leaf); color: var(--fx-ink); text-align: center; backface-visibility: hidden; transform: rotateX(calc(var(--fx-pages-i) * 72deg)) translateZ(88px); }
.fx-pages .fx-pages-face > b { font-size: 16px; }
.fx-pages .fx-pages-face small { font-size: 12px; line-height: 1.3; }
.fx-pages .fx-pages-lines { display: flex; flex-direction: column; gap: 13px; }
.fx-pages .fx-pages-lines span { display: block; height: 3px; background: var(--fx-muted); opacity: 0.45; }
.fx-pages .fx-pages-lines span:nth-child(even) { width: 75%; }
.fx-pages .fx-pages-short { gap: 5px; margin: 7px 8px 0; }
.fx-pages .fx-pages-tabs { width: 100%; height: 30px; box-sizing: border-box; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; padding: 3px 4px 0; border-top: 2px solid var(--fx-ink); }
.fx-pages .fx-pages-tabs span { display: grid; place-items: center; border: 1px solid var(--fx-ink); border-bottom: 0; border-radius: 4px 4px 0 0; font-size: 12px; font-weight: 700; background: var(--fx-paper); }
.fx-pages:has(#fx-pages-p982:checked) .fx-pages-t982, .fx-pages:has(#fx-pages-p983:checked) .fx-pages-t983, .fx-pages:has(#fx-pages-p984:checked) .fx-pages-t984, .fx-pages:has(#fx-pages-p985:checked) .fx-pages-t985, .fx-pages:has(#fx-pages-p986:checked) .fx-pages-t986 { background: var(--fx-sky); }
.fx-pages .fx-pages-direction { display: grid; align-items: center; text-align: center; font-size: 14px; }
.fx-pages .fx-pages-direction b { grid-area: 1 / 1; visibility: hidden; }
.fx-pages:has(#fx-pages-rap:checked):has(#fx-pages-p982:checked) .fx-pages-found, .fx-pages:has(#fx-pages-rust:checked):has(#fx-pages-p984:checked) .fx-pages-found { visibility: visible; }
.fx-pages:has(#fx-pages-rust:checked):has(#fx-pages-p982:checked, #fx-pages-p983:checked) .fx-pages-forward { visibility: visible; }
.fx-pages:has(#fx-pages-rap:checked):has(#fx-pages-p983:checked, #fx-pages-p984:checked, #fx-pages-p985:checked, #fx-pages-p986:checked) .fx-pages-back, .fx-pages:has(#fx-pages-rust:checked):has(#fx-pages-p985:checked, #fx-pages-p986:checked) .fx-pages-back { visibility: visible; }
.fx-pages .fx-pages-messages { display: grid; min-width: 0; }
.fx-pages .fx-pages-messages p { grid-area: 1 / 1; visibility: hidden; margin: 0; padding: 12px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.fx-pages:has(#fx-pages-rap:checked):has(#fx-pages-p982:checked) .fx-pages-r982, .fx-pages:has(#fx-pages-rap:checked):has(#fx-pages-p983:checked) .fx-pages-r983, .fx-pages:has(#fx-pages-rap:checked):has(#fx-pages-p984:checked) .fx-pages-r984, .fx-pages:has(#fx-pages-rap:checked):has(#fx-pages-p985:checked) .fx-pages-r985, .fx-pages:has(#fx-pages-rap:checked):has(#fx-pages-p986:checked) .fx-pages-r986, .fx-pages:has(#fx-pages-rust:checked):has(#fx-pages-p982:checked) .fx-pages-u982, .fx-pages:has(#fx-pages-rust:checked):has(#fx-pages-p983:checked) .fx-pages-u983, .fx-pages:has(#fx-pages-rust:checked):has(#fx-pages-p984:checked) .fx-pages-u984, .fx-pages:has(#fx-pages-rust:checked):has(#fx-pages-p985:checked) .fx-pages-u985, .fx-pages:has(#fx-pages-rust:checked):has(#fx-pages-p986:checked) .fx-pages-u986 { visibility: visible; }
@media (prefers-reduced-motion: reduce) { .fx-pages .fx-pages-drum { transition: none; } }