.fx-giftbox { display: grid; gap: 16px; }
.fx-giftbox .fx-shell { --fx-u: 20px; color: var(--fx-ink); display: grid; gap: 16px; min-width: 0; }
.fx-giftbox .fx-shell * { box-sizing: border-box; }
.fx-giftbox .fx-instructions { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fx-giftbox .fx-goal, .fx-giftbox .fx-read { margin: 0; }
.fx-giftbox .fx-controls { display: grid; gap: 14px; }
.fx-giftbox .fx-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.fx-giftbox .fx-group legend { padding: 0; margin-bottom: 8px; font-weight: 700; }
.fx-giftbox .fx-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-giftbox .fx-btn { min-height: 44px; max-width: 100%; padding: 10px 12px; color: var(--fx-ink); }
.fx-giftbox .fx-btn:has(input:checked) { color: var(--fx-ink); background: var(--fx-mint-pale); }
.fx-giftbox .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-ink); outline-offset: 3px; }
.fx-giftbox .fx-figure { margin: 0; min-width: 0; }
.fx-giftbox .fx-space { --fx-f: 0; --fx-b: 0; --fx-l: 0; --fx-r: 0; --fx-t: 0deg; position: relative; height: 410px; overflow: hidden; padding: 0; }
.fx-giftbox:has(#fx-giftbox-front:checked) .fx-space { --fx-f: 1; }
.fx-giftbox:has(#fx-giftbox-back:checked) .fx-space { --fx-b: 1; }
.fx-giftbox:has(#fx-giftbox-left:checked) .fx-space { --fx-l: 1; }
.fx-giftbox:has(#fx-giftbox-right:checked) .fx-space { --fx-r: 1; }
.fx-giftbox:has(#fx-giftbox-lid:checked) .fx-space { --fx-t: -180deg; }
.fx-giftbox:has(#fx-giftbox-lid:checked):has(#fx-giftbox-back:checked) .fx-space { --fx-t: -90deg; }
.fx-giftbox .fx-perspective { position: absolute; inset: 0; perspective: 1100px; }
.fx-giftbox .fx-net { position: absolute; left: 50%; top: 48%; width: calc(8 * var(--fx-u)); height: calc(5 * var(--fx-u)); margin-left: calc(-4 * var(--fx-u)); transform-origin: 50% 0; transform: rotateX(38deg) rotateZ(-12deg); transform-style: preserve-3d; transition: transform 3s; }
.fx-giftbox .fx-face { position: absolute; display: flex; align-items: center; justify-content: center; border: 1px solid var(--fx-ink); background: var(--fx-sun-pale); color: var(--fx-ink); text-align: center; font-size: 12px; line-height: 1.15; padding: 2px; transform-style: preserve-3d; transition: transform 1.2s, background-color 1.2s, box-shadow 1.2s; }
.fx-giftbox .fx-face > span { display: block; }
.fx-giftbox .fx-bottom { inset: 0; padding: 0; }
.fx-giftbox .fx-front { left: -1px; top: calc(100% - 1px); width: calc(8 * var(--fx-u)); height: calc(3 * var(--fx-u)); border-top-style: dashed; transform-origin: 50% 0; transform: rotateX(calc(var(--fx-f) * 90deg)); }
.fx-giftbox .fx-back { left: -1px; bottom: calc(100% - 1px); width: calc(8 * var(--fx-u)); height: calc(3 * var(--fx-u)); border-bottom-style: dashed; transform-origin: 50% 100%; transform: rotateX(calc(var(--fx-b) * -90deg)); }
.fx-giftbox .fx-lid { left: -1px; bottom: calc(100% - 1px); width: calc(8 * var(--fx-u)); height: calc(5 * var(--fx-u)); border-bottom-style: dashed; transform-origin: 50% 100%; transform: rotateX(var(--fx-t)); }
.fx-giftbox .fx-left { right: calc(100% - 1px); top: -1px; width: calc(3 * var(--fx-u)); height: calc(5 * var(--fx-u)); border-right-style: dashed; transform-origin: 100% 50%; transform: rotateY(calc(var(--fx-l) * 90deg)); }
.fx-giftbox .fx-rightside { left: calc(100% - 1px); top: -1px; width: calc(3 * var(--fx-u)); height: calc(5 * var(--fx-u)); border-left-style: dashed; transform-origin: 0 50%; transform: rotateY(calc(var(--fx-r) * -90deg)); }
.fx-giftbox .fx-first { position: absolute; top: calc(100% + 8px); left: 50%; width: 130px; transform: translateX(-50%); font-size: 12px; font-weight: 700; }
.fx-giftbox:has(#fx-giftbox-front:checked) .fx-first { visibility: hidden; }
.fx-giftbox .fx-caption { display: flex; align-items: center; gap: 8px; padding-top: 8px; font-size: 12px; }
.fx-giftbox .fx-dash { flex: 0 0 28px; border-top: 2px dashed var(--fx-ink); }
.fx-giftbox .fx-swap { display: grid; }
.fx-giftbox .fx-swap > p { grid-area: 1 / 1; margin: 0; visibility: hidden; }
.fx-giftbox .fx-status .fx-start, .fx-giftbox .fx-swap .fx-idle { visibility: visible; }
.fx-giftbox:has(.fx-controls input:checked) .fx-status .fx-start { visibility: hidden; }
.fx-giftbox:has(.fx-controls input:checked) .fx-status .fx-progress { visibility: visible; }
.fx-giftbox .fx-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fx-giftbox .fx-card { min-width: 0; padding: 12px; border: 1px solid var(--fx-muted); border-radius: 8px; background: var(--fx-paper); }
.fx-giftbox .fx-card > b { display: block; margin-bottom: 8px; }
.fx-giftbox .fx-card > p { margin: 0; }
.fx-giftbox:has(#fx-giftbox-front:checked) .fx-front-message .fx-idle, .fx-giftbox:has(#fx-giftbox-back:checked) .fx-back-message .fx-idle, .fx-giftbox:has(#fx-giftbox-left:checked) .fx-left-message .fx-idle, .fx-giftbox:has(#fx-giftbox-right:checked) .fx-right-message .fx-idle, .fx-giftbox:has(#fx-giftbox-lid:checked) .fx-lid-message .fx-idle { visibility: hidden; }
.fx-giftbox:has(#fx-giftbox-front:checked) .fx-front-message .fx-folded, .fx-giftbox:has(#fx-giftbox-back:checked) .fx-back-message .fx-folded, .fx-giftbox:has(#fx-giftbox-left:checked) .fx-left-message .fx-folded, .fx-giftbox:has(#fx-giftbox-right:checked) .fx-right-message .fx-folded { visibility: visible; }
.fx-giftbox:has(#fx-giftbox-lid:checked):has(#fx-giftbox-back:checked) .fx-lid-ready, .fx-giftbox:has(#fx-giftbox-lid:checked):has(#fx-giftbox-back:not(:checked)) .fx-lid-warning { visibility: visible; }
.fx-giftbox .fx-shell:not(:has(.fx-controls input:not(:checked))) .fx-status .fx-progress { visibility: hidden; }
.fx-giftbox .fx-shell:not(:has(.fx-controls input:not(:checked))) .fx-status .fx-complete { visibility: visible; }
.fx-giftbox .fx-shell:not(:has(.fx-controls input:not(:checked))) .fx-net { transform: rotateX(55deg) rotateZ(18deg); }
.fx-giftbox .fx-shell:not(:has(.fx-controls input:not(:checked))) .fx-front, .fx-giftbox .fx-shell:not(:has(.fx-controls input:not(:checked))) .fx-back { background: var(--fx-sky); box-shadow: 0 0 8px var(--fx-sky); }
.fx-giftbox .fx-shell:not(:has(.fx-controls input:not(:checked))) .fx-left, .fx-giftbox .fx-shell:not(:has(.fx-controls input:not(:checked))) .fx-rightside { background: var(--fx-mint); box-shadow: 0 0 8px var(--fx-mint); }
.fx-giftbox .fx-shell:not(:has(.fx-controls input:not(:checked))) .fx-bottom, .fx-giftbox .fx-shell:not(:has(.fx-controls input:not(:checked))) .fx-lid { background: var(--fx-coral); box-shadow: 0 0 8px var(--fx-coral); }
@container (max-width: 480px) { .fx-giftbox .fx-shell { --fx-u: 12px; } .fx-giftbox .fx-cards { grid-template-columns: minmax(0, 1fr); } .fx-giftbox .fx-space { height: 320px; } }
@media (prefers-reduced-motion: reduce) { .fx-giftbox .fx-net, .fx-giftbox .fx-face { transition: none; } }