.fx-crease { display: grid; gap: 16px; }
.fx-crease .fx-crease-steps { margin: 0; padding-left: 24px; }
.fx-crease .fx-crease-steps li + li { margin-top: 6px; }
.fx-crease .fx-crease-goal, .fx-crease .fx-crease-look { margin: 0; color: var(--fx-ink); }
.fx-crease .fx-crease-controls { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.fx-crease .fx-crease-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.fx-crease .fx-crease-group legend { padding: 0; margin-bottom: 12px; font-weight: 800; color: var(--fx-ink); }
.fx-crease .fx-row { gap: 8px; }
.fx-crease .fx-btn { box-sizing: border-box; min-height: 40px; min-width: 24px; max-width: 100%; padding: 8px 10px; border: 2px solid var(--fx-ink); background: var(--fx-paper); color: var(--fx-ink); font-weight: 700; overflow-wrap: anywhere; }
.fx-crease .fx-btn:has(input:checked) { background: var(--fx-sun); color: var(--fx-ink); }
.fx-crease .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-grape); outline-offset: 2px; }
.fx-crease .fx-crease-hint, .fx-crease .fx-crease-help { margin: 10px 0 0; font-size: 14px; color: var(--fx-ink); }
.fx-crease .fx-crease-stage { box-sizing: border-box; height: 620px; min-width: 0; padding: 12px; overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; color: var(--fx-ink); }
.fx-crease .fx-crease-directions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; font-size: 12px; }
.fx-crease .fx-crease-middle { min-width: 0; min-height: 0; padding: 8px; display: grid; place-items: center; }
.fx-crease .fx-crease-perspective { width: min(100%, 380px); aspect-ratio: 1; perspective: 1000px; }
.fx-crease .fx-crease-paper { position: relative; width: 100%; height: 100%; transform: rotateX(14deg); transform-style: preserve-3d; }
.fx-crease .fx-crease-grid { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-content: flex-start; box-sizing: border-box; border-top: 1px solid var(--fx-ink); border-left: 1px solid var(--fx-ink); background: var(--fx-paper); color: var(--fx-ink); }
.fx-crease .fx-crease-grid > * { box-sizing: border-box; flex: 0 0 auto; width: calc((100% - 84px) / 4); height: calc((100% - 84px) / 4); min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: safe center; margin: 0; padding: 0; border-right: 1px solid var(--fx-ink); border-bottom: 1px solid var(--fx-ink); background: var(--fx-paper); font-size: 12px; font-weight: 700; line-height: 1.1; }
.fx-crease .fx-crease-grid > :nth-child(5n+1) { width: 84px; }
.fx-crease .fx-crease-grid > :nth-child(-n+5) { height: 84px; }
.fx-crease .fx-crease-grid .fx-crease-rowhead { justify-content: flex-start; padding-left: 4px; }
.fx-crease .fx-crease-grid .fx-crease-colhead { writing-mode: vertical-rl; }
.fx-crease .fx-crease-grid .fx-crease-grey { background: var(--fx-muted); }
.fx-crease .fx-crease-base { clip-path: polygon(0 0, 100% 100%, 0 100%); }
.fx-crease .fx-crease-flap { position: absolute; inset: 0; transform-origin: 0 0; transform-style: preserve-3d; transform: rotate3d(1, 1, 0, 0deg); transition: transform 1.4s; }
.fx-crease .fx-crease-front { clip-path: polygon(0 0, 100% 0, 100% 100%); backface-visibility: hidden; }
.fx-crease .fx-crease-back { clip-path: polygon(0 0, 100% 100%, 0 100%); transform-origin: 0 0; transform: rotate3d(1, 1, 0, 180deg) translateZ(0.6px); backface-visibility: hidden; opacity: 0.6; }
.fx-crease:has(#fx-crease-fold:checked) .fx-crease-flap { transform: rotate3d(1, 1, 0, -180deg); }
.fx-crease .fx-crease-foldline { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: translateZ(1px); pointer-events: none; }
.fx-crease .fx-crease-foldline line { fill: none; stroke: var(--fx-ink); stroke-width: 0.7; stroke-dasharray: 2 2; }
.fx-crease:has(#fx-crease-lm:checked) .fx-crease-a, .fx-crease:has(#fx-crease-ln:checked) .fx-crease-b, .fx-crease:has(#fx-crease-ly:checked) .fx-crease-c, .fx-crease:has(#fx-crease-mn:checked) .fx-crease-d, .fx-crease:has(#fx-crease-my:checked) .fx-crease-e, .fx-crease:has(#fx-crease-ny:checked) .fx-crease-f { background: var(--fx-sun); outline: 2px solid var(--fx-coral); outline-offset: -3px; }
.fx-crease .fx-crease-key { display: grid; gap: 8px; font-size: 12px; }
.fx-crease .fx-crease-key p { margin: 0; }
.fx-crease .fx-crease-parts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.fx-crease .fx-crease-topmark, .fx-crease .fx-crease-bottommark, .fx-crease .fx-crease-greymark { display: inline-block; width: 14px; height: 14px; margin-right: 5px; vertical-align: middle; background: var(--fx-sky); }
.fx-crease .fx-crease-topmark { clip-path: polygon(0 0, 100% 0, 100% 100%); }
.fx-crease .fx-crease-bottommark { clip-path: polygon(0 0, 100% 100%, 0 100%); background: var(--fx-paper); outline: 1px solid var(--fx-ink); }
.fx-crease .fx-crease-greymark { background: var(--fx-muted); }
.fx-crease .fx-crease-dashmark { display: inline-block; width: 28px; margin-right: 5px; vertical-align: middle; border-top: 2px dashed var(--fx-ink); }
.fx-crease .fx-crease-caption { line-height: 1.4; }
.fx-crease .fx-crease-says { display: grid; }
.fx-crease .fx-crease-says p { --fx-picked: hidden; grid-area: 1 / 1; margin: 0; padding: 12px; box-sizing: border-box; color: var(--fx-ink); visibility: hidden; }
.fx-crease:has(#fx-crease-none:checked) .fx-crease-s0, .fx-crease:has(#fx-crease-lm:checked) .fx-crease-s1, .fx-crease:has(#fx-crease-ln:checked) .fx-crease-s2, .fx-crease:has(#fx-crease-ly:checked) .fx-crease-s3, .fx-crease:has(#fx-crease-mn:checked) .fx-crease-s4, .fx-crease:has(#fx-crease-my:checked) .fx-crease-s5, .fx-crease:has(#fx-crease-ny:checked) .fx-crease-s6 { --fx-picked: visible; }
.fx-crease .fx-crease-says .fx-crease-flat { visibility: var(--fx-picked); }
.fx-crease:has(#fx-crease-fold:checked) .fx-crease-says .fx-crease-flat { visibility: hidden; }
.fx-crease:has(#fx-crease-fold:checked) .fx-crease-says .fx-crease-folded { visibility: var(--fx-picked); }
@container (max-width: 480px) { .fx-crease .fx-crease-controls { grid-template-columns: minmax(0, 1fr); } .fx-crease .fx-crease-stage { height: 560px; } .fx-crease .fx-crease-parts { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .fx-crease .fx-crease-flap { transition: none; } }