.fx-tiles { display: grid; gap: 16px; }
.fx-tiles * { box-sizing: border-box; }
.fx-tiles .fx-tiles-how { margin: 0; }
.fx-tiles .fx-tiles-how ol { margin: 0; padding-left: 24px; display: grid; gap: 6px; font-size: 16px; line-height: 1.5; }
.fx-tiles .fx-tiles-goal { margin: 0; font-size: 16px; line-height: 1.5; color: var(--fx-ink); }
.fx-tiles .fx-tiles-controls { min-width: 0; margin: 0; padding: 0; border: 0; }
.fx-tiles .fx-tiles-controls legend { margin-bottom: 10px; padding: 0; font-size: 16px; font-weight: 800; }
.fx-tiles .fx-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-tiles .fx-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 76px; padding: 10px 12px; border: 2px solid var(--fx-ink); border-radius: 10px; background: var(--fx-paper); color: var(--fx-ink); font-size: 16px; line-height: 1.3; cursor: pointer; }
.fx-tiles .fx-btn:has(input:checked) { background: var(--fx-sun); color: var(--fx-ink); }
.fx-tiles .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-grape); outline-offset: 3px; }
.fx-tiles .fx-tiles-main { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: center; min-width: 0; }
.fx-tiles .fx-tiles-scene { position: relative; width: 100%; min-width: 0; height: 360px; margin: 0; padding: 0; overflow: hidden; border: 2px dashed var(--fx-sky); background: var(--fx-sky-pale); color: var(--fx-ink); font-size: 14px; }
.fx-tiles .fx-tiles-wall-label { position: absolute; top: 10px; left: 8px; right: 8px; text-align: center; font-size: 14px; line-height: 20px; font-weight: 800; }
.fx-tiles .fx-tiles-wall { position: absolute; left: 12px; top: 40px; width: calc(100% - 24px); height: calc(100% - 78px); }
.fx-tiles .fx-tiles-wall path { fill: none; stroke: var(--fx-sky); stroke-width: 1; }
.fx-tiles .fx-tiles-floor { position: absolute; left: 12px; right: 12px; bottom: 38px; height: 2px; background: var(--fx-ink); }
.fx-tiles .fx-tiles-pack-label { position: absolute; bottom: 7px; left: 0; right: 0; margin: 0; text-align: center; font-size: 14px; line-height: 20px; font-weight: 700; }
.fx-tiles .fx-tiles-view { position: absolute; top: 0; left: 0; right: 0; bottom: 40px; perspective: 1000px; perspective-origin: 100% 0; z-index: 1; }
.fx-tiles .fx-tiles-pile { position: absolute; left: 50%; bottom: 0; width: 128px; height: 216px; transform: translateX(-50%); transform-style: preserve-3d; }
.fx-tiles .fx-tiles-pack { position: absolute; left: 0; bottom: calc(var(--fx-tiles-layer) * 36px); width: 128px; height: 36px; transform-style: preserve-3d; visibility: hidden; transform: translateY(-30px) translateZ(-24px) rotateX(-20deg) rotateY(-25deg) scale(0); transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.45s; }
.fx-tiles .fx-tiles-front, .fx-tiles .fx-tiles-top, .fx-tiles .fx-tiles-side { position: absolute; border: 1px solid var(--fx-ink); background: var(--fx-sun); }
.fx-tiles .fx-tiles-front { inset: 0; display: grid; place-items: center; background: var(--fx-sun-pale); color: var(--fx-ink); font-size: 14px; line-height: 1; font-weight: 800; transform: translateZ(0px); }
.fx-tiles .fx-tiles-pack:nth-child(even) .fx-tiles-front { background: var(--fx-sun); }
.fx-tiles .fx-tiles-top { left: 0; top: -14px; width: 128px; height: 14px; transform-origin: center bottom; transform: rotateX(90deg); }
.fx-tiles .fx-tiles-side { left: 100%; top: 0; width: 14px; height: 36px; transform-origin: left center; transform: rotateY(90deg); }
.fx-tiles:has(#fx-tiles-n1:checked) .fx-tiles-pack:nth-child(-n + 1), .fx-tiles:has(#fx-tiles-n2:checked) .fx-tiles-pack:nth-child(-n + 2), .fx-tiles:has(#fx-tiles-n3:checked) .fx-tiles-pack:nth-child(-n + 3), .fx-tiles:has(#fx-tiles-n4:checked) .fx-tiles-pack:nth-child(-n + 4), .fx-tiles:has(#fx-tiles-n5:checked) .fx-tiles-pack:nth-child(-n + 5), .fx-tiles:has(#fx-tiles-n6:checked) .fx-tiles-pack { visibility: visible; transform: translateY(0px) translateZ(0px) rotateX(0deg) rotateY(0deg) scale(1); }
.fx-tiles .fx-tiles-mark { position: absolute; left: 12px; right: 12px; bottom: 238px; height: 0; z-index: 3; }
.fx-tiles .fx-tiles-mark::before { content: ""; position: absolute; left: 0; right: 0; top: 0; border-top: 2px dashed var(--fx-coral); }
.fx-tiles .fx-tiles-mark::after { content: ""; position: absolute; left: 0; bottom: 0; height: 24px; border-left: 2px dashed var(--fx-coral); }
.fx-tiles .fx-tiles-target, .fx-tiles .fx-tiles-spare { position: absolute; bottom: 26px; padding: 4px 6px; border: 1px solid var(--fx-ink); border-radius: 6px; color: var(--fx-ink); font-size: 14px; line-height: 1.3; font-weight: 800; white-space: nowrap; }
.fx-tiles .fx-tiles-target { left: 0; background: var(--fx-paper); }
.fx-tiles .fx-tiles-spare { right: 0; background: var(--fx-mint); visibility: hidden; }
.fx-tiles .fx-tiles-gap { position: absolute; left: 50%; bottom: 220px; width: 128px; height: 18px; transform: translateX(-50%); border-left: 3px solid var(--fx-coral); border-right: 3px solid var(--fx-coral); background: var(--fx-coral-pale); box-shadow: 0 0 8px var(--fx-coral); visibility: hidden; z-index: 2; }
.fx-tiles:has(#fx-tiles-n5:checked) .fx-tiles-gap { visibility: visible; }
.fx-tiles:has(#fx-tiles-n6:checked) .fx-tiles-spare { visibility: visible; }
.fx-tiles:has(#fx-tiles-n6:checked) .fx-tiles-mark::before, .fx-tiles:has(#fx-tiles-n6:checked) .fx-tiles-mark::after { border-color: var(--fx-mint); }
.fx-tiles .fx-tiles-says { display: grid; min-width: 0; }
.fx-tiles .fx-tiles-says > p { display: block; grid-area: 1 / 1; align-self: stretch; visibility: hidden; margin: 0; font-size: 16px; line-height: 1.5; overflow-wrap: break-word; }
.fx-tiles:has(#fx-tiles-n0:checked) .fx-tiles-s0, .fx-tiles:has(#fx-tiles-n1:checked) .fx-tiles-s1, .fx-tiles:has(#fx-tiles-n2:checked) .fx-tiles-s2, .fx-tiles:has(#fx-tiles-n3:checked) .fx-tiles-s3, .fx-tiles:has(#fx-tiles-n4:checked) .fx-tiles-s4, .fx-tiles:has(#fx-tiles-n5:checked) .fx-tiles-s5, .fx-tiles:has(#fx-tiles-n6:checked) .fx-tiles-s6 { visibility: visible; }
@container (max-width: 480px) { .fx-tiles .fx-tiles-main { grid-template-columns: minmax(0, 1fr); } .fx-tiles .fx-btn { flex: 1 0 76px; } }
@media (prefers-reduced-motion: reduce) { .fx-tiles .fx-tiles-pack { transition: none; } }