.fx-stamp { --fx-k: 0; --fx-edge: var(--fx-coral); display: grid; gap: 16px; }
.fx-stamp > * { min-width: 0; box-sizing: border-box; color: var(--fx-ink); font-size: 16px; }
.fx-stamp:has(#fx-stamp-question:checked) { --fx-k: 1; }
.fx-stamp:has(#fx-stamp-exclaim:checked) { --fx-k: 2; }
.fx-stamp:has(#fx-stamp-card1:checked):has(#fx-stamp-question:checked), .fx-stamp:has(#fx-stamp-card2:checked):has(#fx-stamp-stop:checked), .fx-stamp:has(#fx-stamp-card3:checked):has(#fx-stamp-exclaim:checked) { --fx-edge: var(--fx-mint); }
.fx-stamp .fx-stamp-how ol { margin: 0; padding-left: 24px; line-height: 1.6; }
.fx-stamp .fx-stamp-goal, .fx-stamp .fx-stamp-context, .fx-stamp .fx-stamp-noteheading { margin: 0; line-height: 1.5; }
.fx-stamp .fx-stamp-controls { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.fx-stamp .fx-stamp-group { min-width: 0; border: 0; margin: 0; padding: 0; }
.fx-stamp .fx-stamp-group legend { padding: 0; margin-bottom: 10px; font-weight: 800; font-size: 16px; line-height: 1.4; }
.fx-stamp .fx-stamp-choices { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.fx-stamp .fx-btn { display: flex; align-items: center; box-sizing: border-box; min-width: 0; min-height: 44px; padding: 10px 12px; border: 2px solid var(--fx-ink); background: var(--fx-paper); color: var(--fx-ink); font-size: 16px; line-height: 1.4; text-align: left; white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
.fx-stamp .fx-btn:has(input:checked) { background: var(--fx-sky-pale); color: var(--fx-ink); }
.fx-stamp .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-ink); outline-offset: 3px; }
.fx-stamp .fx-stamp-desk { position: relative; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: center; height: 380px; padding: 18px; background: var(--fx-sun-pale); }
.fx-stamp .fx-stamp-paper { min-width: 0; box-sizing: border-box; padding: 16px; background: var(--fx-paper); border: 2px solid var(--fx-ink); border-radius: 8px; }
.fx-stamp .fx-stamp-part { display: block; margin: 0 0 12px; font-size: 16px; font-weight: 800; line-height: 1.4; }
.fx-stamp .fx-stamp-swap { display: grid; min-width: 0; }
.fx-stamp .fx-stamp-swap > p { grid-area: 1 / 1; visibility: hidden; margin: 0; min-width: 0; }
.fx-stamp .fx-stamp-cardtext { font-size: 24px; font-weight: 700; line-height: 1.65; overflow-wrap: break-word; }
.fx-stamp .fx-stamp-box { display: inline-grid; place-items: center; vertical-align: baseline; box-sizing: border-box; width: 1.25em; height: 1.55em; margin-left: 2px; border: 3px dotted var(--fx-edge); border-radius: 4px; line-height: 1; background: var(--fx-paper); }
.fx-stamp .fx-stamp-boxlabel { margin: 12px 0 0; font-size: 14px; line-height: 1.4; }
.fx-stamp .fx-stamp-machine { min-width: 0; margin: 0; text-align: center; }
.fx-stamp .fx-stamp-machine .fx-stamp-part { margin-bottom: 4px; }
.fx-stamp .fx-stamp-view { position: relative; width: 100%; height: 190px; perspective: 650px; }
.fx-stamp .fx-stamp-pointer { position: absolute; z-index: 2; top: 0; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; line-height: 1.4; }
.fx-stamp .fx-stamp-arrow { display: block; width: 22px; height: 22px; background: var(--fx-coral); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.fx-stamp .fx-stamp-tilt { position: absolute; top: 38px; left: 50%; width: 128px; height: 128px; margin-left: -64px; transform: rotateX(-12deg) rotateY(-16deg); transform-style: preserve-3d; }
.fx-stamp .fx-stamp-rotor { position: relative; width: 128px; height: 128px; transform-style: preserve-3d; transform: rotateX(calc(var(--fx-k) * -120deg)); transition: transform 0.6s steps(4, end); }
.fx-stamp .fx-stamp-strip { position: absolute; top: 50%; left: 50%; box-sizing: border-box; width: 116px; height: 31.1px; margin: -15.55px 0 0 -58px; background: var(--fx-sky); border: 1px solid var(--fx-ink); transform: rotateX(calc(var(--fx-i) * 30deg)) translateZ(58px); backface-visibility: hidden; }
.fx-stamp .fx-stamp-cap { position: absolute; top: 50%; left: 50%; box-sizing: border-box; width: 116px; height: 116px; margin: -58px 0 0 -58px; border: 4px solid var(--fx-ink); border-radius: 50%; background: var(--fx-sky); transform: rotateY(calc(var(--fx-side) * 90deg)) translateZ(58px); backface-visibility: hidden; }
.fx-stamp .fx-stamp-face { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; box-sizing: border-box; width: 116px; height: 70px; margin: -35px 0 0 -58px; border: 3px solid var(--fx-ink); border-radius: 12px; background: var(--fx-paper); color: var(--fx-ink); font-size: 48px; font-weight: 800; line-height: 1; transform: rotateX(calc(var(--fx-i) * 120deg)) translateZ(61px); backface-visibility: hidden; }
.fx-stamp .fx-stamp-setting { font-size: 14px; line-height: 1.5; }
.fx-stamp .fx-stamp-notes { display: grid; gap: 12px; }
.fx-stamp .fx-stamp-feedback > p { display: block; box-sizing: border-box; padding: 14px; color: var(--fx-ink); font-size: 16px; line-height: 1.5; }
.fx-stamp .fx-stamp-feedback .fx-right { background: var(--fx-mint-pale); }
.fx-stamp .fx-stamp-feedback .fx-wrong { background: var(--fx-coral-pale); }
.fx-stamp:has(#fx-stamp-stop:checked) .fx-stamp-setting-stop, .fx-stamp:has(#fx-stamp-question:checked) .fx-stamp-setting-question, .fx-stamp:has(#fx-stamp-exclaim:checked) .fx-stamp-setting-exclaim { visibility: visible; }
.fx-stamp:has(#fx-stamp-card1:checked):has(#fx-stamp-stop:checked) .fx-stamp-s1, .fx-stamp:has(#fx-stamp-card1:checked):has(#fx-stamp-question:checked) .fx-stamp-s2, .fx-stamp:has(#fx-stamp-card1:checked):has(#fx-stamp-exclaim:checked) .fx-stamp-s3, .fx-stamp:has(#fx-stamp-card2:checked):has(#fx-stamp-stop:checked) .fx-stamp-s4, .fx-stamp:has(#fx-stamp-card2:checked):has(#fx-stamp-question:checked) .fx-stamp-s5, .fx-stamp:has(#fx-stamp-card2:checked):has(#fx-stamp-exclaim:checked) .fx-stamp-s6, .fx-stamp:has(#fx-stamp-card3:checked):has(#fx-stamp-stop:checked) .fx-stamp-s7, .fx-stamp:has(#fx-stamp-card3:checked):has(#fx-stamp-question:checked) .fx-stamp-s8, .fx-stamp:has(#fx-stamp-card3:checked):has(#fx-stamp-exclaim:checked) .fx-stamp-s9 { visibility: visible; }
@container (max-width: 480px) { .fx-stamp .fx-stamp-controls { grid-template-columns: minmax(0, 1fr); } .fx-stamp .fx-stamp-desk { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); height: 650px; padding: 12px; gap: 16px; } .fx-stamp .fx-stamp-paper { padding: 12px; } .fx-stamp .fx-stamp-cardtext { font-size: 22px; } }
@media (prefers-reduced-motion: reduce) { .fx-stamp .fx-stamp-rotor { transition: none; } }