.fx-panel { display: grid; gap: 16px; }
.fx-panel .fx-panel-steps { margin: 0; padding-left: 24px; }
.fx-panel .fx-panel-steps li { padding: 3px 0; }
.fx-panel .fx-panel-goal, .fx-panel .fx-panel-explanation { margin: 0; color: var(--fx-ink); line-height: 1.5; }
.fx-panel .fx-panel-explanation { font-size: 14px; }
.fx-panel .fx-panel-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fx-panel .fx-panel-controls .fx-btn { box-sizing: border-box; min-width: 0; min-height: 48px; padding: 12px; white-space: normal; color: var(--fx-ink); background: var(--fx-paper); border: 2px solid var(--fx-ink); line-height: 1.4; }
.fx-panel .fx-panel-controls .fx-btn:has(input:checked) { color: var(--fx-ink); background: var(--fx-mint-pale); }
.fx-panel .fx-panel-controls .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-grape); outline-offset: 3px; }
.fx-panel .fx-panel-scene { position: relative; box-sizing: border-box; height: 400px; min-width: 0; padding: 12px; overflow: hidden; display: grid; grid-template-rows: 24px 36px minmax(0, 1fr) 24px; gap: 8px; color: var(--fx-ink); }
.fx-panel .fx-panel-sheet-label, .fx-panel .fx-panel-base-label { text-align: center; font-size: 14px; line-height: 24px; }
.fx-panel .fx-panel-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-size: 12px; line-height: 16px; text-align: center; }
.fx-panel .fx-panel-key { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--fx-ink); border-radius: 50%; background: var(--fx-coral); color: var(--fx-ink); }
.fx-panel .fx-panel-perspective { position: relative; justify-self: center; align-self: center; width: calc(100% - 24px); max-width: 360px; aspect-ratio: 3 / 2; perspective: 800px; }
.fx-panel .fx-panel-board { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.fx-panel .fx-panel-triangle { position: absolute; inset: 0; background: var(--fx-sky); clip-path: polygon(0 100%, 40.0616808% 0, 100% 100%); transition: background 0.4s; }
.fx-panel .fx-panel-piece { position: absolute; top: 0; height: 100%; z-index: 2; transform-origin: 50% 50%; transform-style: preserve-3d; transform: translateZ(0px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1); transition: transform 0.9s; }
.fx-panel .fx-panel-left-piece { left: 0; width: 40.0616808%; }
.fx-panel .fx-panel-right-piece { left: 40.0616808%; width: 59.9383192%; }
.fx-panel .fx-panel-surface { position: absolute; inset: 0; background: var(--fx-coral); transition: background 0.4s; }
.fx-panel .fx-panel-left-piece .fx-panel-surface { clip-path: polygon(0 0, 100% 0, 0 100%); }
.fx-panel .fx-panel-right-piece .fx-panel-surface { clip-path: polygon(0 0, 100% 0, 100% 100%); }
.fx-panel .fx-panel-letter { position: absolute; top: 33.333333%; left: 33.333333%; display: grid; place-items: center; box-sizing: border-box; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 1px solid var(--fx-ink); border-radius: 50%; background: var(--fx-paper); color: var(--fx-ink); font-size: 12px; font-weight: 800; transition: transform 0.9s; }
.fx-panel .fx-panel-right-piece .fx-panel-letter { left: 66.666667%; }
.fx-panel .fx-panel-scissors { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; transform: translate(-50%, -50%) rotate(-59deg); fill: none; stroke: var(--fx-ink); stroke-width: 2; stroke-linecap: round; }
.fx-panel .fx-panel-scissors circle { fill: var(--fx-paper); }
.fx-panel .fx-panel-right-piece .fx-panel-scissors { transform: translate(-50%, -50%) rotate(48deg); }
.fx-panel .fx-panel-lines { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; overflow: visible; fill: none; }
.fx-panel .fx-panel-footprint { stroke: var(--fx-muted); stroke-width: 3; stroke-dasharray: 12 10; }
.fx-panel .fx-panel-edge { stroke: var(--fx-ink); stroke-width: 5; stroke-linejoin: round; }
.fx-panel .fx-panel-glow { stroke: var(--fx-mint); stroke-width: 24; stroke-linejoin: round; opacity: 0; transition: opacity 0.4s; }
.fx-panel .fx-panel-height-pale { stroke: var(--fx-sky-pale); stroke-width: 15; stroke-dasharray: 18 12; }
.fx-panel .fx-panel-height { stroke: var(--fx-ink); stroke-width: 3; stroke-dasharray: 18 12; }
.fx-panel .fx-panel-angle { stroke: var(--fx-ink); stroke-width: 3; }
.fx-panel .fx-panel-slope-label, .fx-panel .fx-panel-height-label, .fx-panel .fx-panel-triangle-label { position: absolute; z-index: 4; box-sizing: border-box; padding: 2px 4px; color: var(--fx-ink); background: var(--fx-paper); font-size: 12px; line-height: 16px; }
.fx-panel .fx-panel-slope-label { left: 20.0308404%; top: 50%; white-space: nowrap; transform: translate(-50%, -50%) rotate(-59deg); transition: opacity 0.4s; }
.fx-panel .fx-panel-height-label { left: calc(40.0616808% + 8px); top: 40%; width: 88px; background: var(--fx-sky-pale); }
.fx-panel .fx-panel-triangle-label { left: 50%; bottom: 4px; transform: translateX(-50%); white-space: nowrap; background: var(--fx-sky-pale); }
.fx-panel:has(#fx-panel-left:checked) .fx-panel-left-piece, .fx-panel:has(#fx-panel-right:checked) .fx-panel-right-piece { transform: translateZ(0px) rotateX(0deg) rotateY(0deg) rotateZ(180deg) scale(1); animation: fx-panel-turn 0.9s; }
.fx-panel:has(#fx-panel-left:checked) .fx-panel-left-piece .fx-panel-letter, .fx-panel:has(#fx-panel-right:checked) .fx-panel-right-piece .fx-panel-letter { transform: rotateZ(180deg); }
.fx-panel:has(#fx-panel-left:checked):has(#fx-panel-right:checked) .fx-panel-triangle, .fx-panel:has(#fx-panel-left:checked):has(#fx-panel-right:checked) .fx-panel-surface { background: var(--fx-mint); }
.fx-panel:has(#fx-panel-left:checked):has(#fx-panel-right:checked) .fx-panel-glow { opacity: 1; }
.fx-panel:has(#fx-panel-left:checked):has(#fx-panel-right:checked) .fx-panel-slope-label { opacity: 0.72; }
.fx-panel .fx-panel-messages { display: grid; min-width: 0; }
.fx-panel .fx-panel-message { grid-area: 1 / 1; visibility: hidden; box-sizing: border-box; margin: 0; padding: 12px; color: var(--fx-ink); line-height: 1.5; }
.fx-panel:not(:has(#fx-panel-left:checked)):not(:has(#fx-panel-right:checked)) .fx-panel-start, .fx-panel:has(#fx-panel-left:checked):not(:has(#fx-panel-right:checked)) .fx-panel-left-only, .fx-panel:has(#fx-panel-right:checked):not(:has(#fx-panel-left:checked)) .fx-panel-right-only, .fx-panel:has(#fx-panel-left:checked):has(#fx-panel-right:checked) .fx-panel-both { visibility: visible; }
@keyframes fx-panel-turn { 0% { transform: translateZ(0px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1); } 50% { transform: translateZ(24px) rotateX(-12deg) rotateY(10deg) rotateZ(90deg) scale(0.7); } 100% { transform: translateZ(0px) rotateX(0deg) rotateY(0deg) rotateZ(180deg) scale(1); } }
@container (max-width: 480px) { .fx-panel .fx-panel-controls { grid-template-columns: minmax(0, 1fr); } .fx-panel .fx-panel-scene { height: 340px; } }
@media (prefers-reduced-motion: reduce) { .fx-panel .fx-panel-piece, .fx-panel .fx-panel-letter, .fx-panel .fx-panel-surface, .fx-panel .fx-panel-triangle, .fx-panel .fx-panel-glow, .fx-panel .fx-panel-slope-label { animation: none; transition: none; } }