.fx-flipcard { display: grid; gap: 14px; }
.fx-flipcard .fx-howto { margin: 0; }
.fx-flipcard .fx-howto ol { margin: 0; padding-left: 24px; line-height: 1.5; }
.fx-flipcard .fx-goal, .fx-flipcard .fx-read { margin: 0; line-height: 1.5; }
.fx-flipcard .fx-read { font-weight: 700; }
.fx-flipcard .fx-controls { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.fx-flipcard .fx-group { min-width: 0; border: 0; padding: 0; margin: 0; }
.fx-flipcard .fx-group legend { padding: 0; margin-bottom: 10px; font-weight: 700; }
.fx-flipcard .fx-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-flipcard .fx-btn { display: flex; align-items: center; min-height: 44px; min-width: 0; max-width: 100%; box-sizing: border-box; padding: 10px 12px; border: 2px solid var(--fx-ink); border-radius: 10px; background: var(--fx-paper); color: var(--fx-ink); cursor: pointer; white-space: normal; }
.fx-flipcard .fx-btn:has(input:checked) { background: var(--fx-sun); color: var(--fx-ink); }
.fx-flipcard .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-grape); outline-offset: 3px; }
.fx-flipcard .fx-scene { position: relative; display: grid; grid-template-rows: 24px 36px 260px; gap: 4px; height: 360px; min-width: 0; margin: 0; padding: 12px; box-sizing: border-box; color: var(--fx-ink); }
.fx-flipcard .fx-title { text-align: center; }
.fx-flipcard .fx-places { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 92%; max-width: 405px; margin: 0 auto; text-align: center; font-size: 12px; line-height: 1.4; }
.fx-flipcard .fx-perspective { position: relative; perspective: 900px; width: 100%; max-width: 440px; height: 260px; justify-self: center; }
.fx-flipcard .fx-table { position: absolute; bottom: 0; left: 0; width: 100%; height: 24px; box-sizing: border-box; border: 2px solid var(--fx-ink); border-radius: 50%; background: var(--fx-sun-pale); text-align: center; font-size: 12px; line-height: 20px; }
.fx-flipcard .fx-card { position: relative; width: 92%; height: 238px; margin: 0 auto; transform-style: preserve-3d; transform: rotateY(0deg); transition: transform 0.85s; }
.fx-flipcard:has(#fx-flipcard-turn:checked) .fx-card { transform: rotateY(180deg); }
.fx-flipcard .fx-face { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto; gap: 8px; padding: 10px; box-sizing: border-box; border: 2px solid var(--fx-ink); border-radius: 10px; background: var(--fx-paper); backface-visibility: hidden; }
.fx-flipcard .fx-front { transform: rotateY(0deg) translateZ(1px); }
.fx-flipcard .fx-back { transform: rotateY(180deg) translateZ(1px); }
.fx-flipcard .fx-pairs { display: grid; min-width: 0; }
.fx-flipcard .fx-pair { grid-area: 1 / 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: end; visibility: hidden; }
.fx-flipcard .fx-item { min-width: 0; }
.fx-flipcard .fx-item p { margin: 4px 0 0; text-align: center; font-size: 14px; font-weight: 700; line-height: 1.5; }
.fx-flipcard .fx-back .fx-item:first-child { grid-column: 2; grid-row: 1; }
.fx-flipcard .fx-back .fx-item:last-child { grid-column: 1; grid-row: 1; }
.fx-flipcard .fx-art { display: block; width: 100%; height: 136px; fill: var(--fx-paper); stroke: var(--fx-ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fx-flipcard .fx-art .fx-glass { fill: var(--fx-sky-pale); }
.fx-flipcard .fx-art .fx-body { fill: var(--fx-sun-pale); }
.fx-flipcard .fx-art .fx-roof { fill: var(--fx-coral); }
.fx-flipcard .fx-art .fx-wheel { fill: var(--fx-ink); }
.fx-flipcard .fx-turn-mark { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin: 0; font-size: 12px; line-height: 20px; }
.fx-flipcard .fx-turn-mark svg { width: 28px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--fx-ink); stroke-width: 2; }
.fx-flipcard:has(#fx-flipcard-computer:checked) .fx-cpair, .fx-flipcard:has(#fx-flipcard-house:checked) .fx-hpair, .fx-flipcard:has(#fx-flipcard-truck:checked) .fx-tpair, .fx-flipcard:has(#fx-flipcard-tablets:checked) .fx-epair { visibility: visible; }
.fx-flipcard .fx-sentences, .fx-flipcard .fx-feedback { display: grid; min-width: 0; }
.fx-flipcard .fx-message { display: block; grid-area: 1 / 1; visibility: hidden; min-width: 0; margin: 0; color: var(--fx-ink); line-height: 1.5; }
.fx-flipcard .fx-word { background: var(--fx-sun); color: var(--fx-ink); padding: 0 2px; border-bottom: 2px solid var(--fx-ink); }
.fx-flipcard:has(#fx-flipcard-computer:checked):not(:has(#fx-flipcard-turn:checked)) .fx-cf, .fx-flipcard:has(#fx-flipcard-computer:checked):has(#fx-flipcard-turn:checked) .fx-cb, .fx-flipcard:has(#fx-flipcard-house:checked):not(:has(#fx-flipcard-turn:checked)) .fx-hf, .fx-flipcard:has(#fx-flipcard-house:checked):has(#fx-flipcard-turn:checked) .fx-hb, .fx-flipcard:has(#fx-flipcard-truck:checked):not(:has(#fx-flipcard-turn:checked)) .fx-tf, .fx-flipcard:has(#fx-flipcard-truck:checked):has(#fx-flipcard-turn:checked) .fx-tb, .fx-flipcard:has(#fx-flipcard-tablets:checked):not(:has(#fx-flipcard-turn:checked)) .fx-ef, .fx-flipcard:has(#fx-flipcard-tablets:checked):has(#fx-flipcard-turn:checked) .fx-eb { visibility: visible; }
@container (max-width: 480px) { .fx-flipcard .fx-controls { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .fx-flipcard .fx-card { transition: none; } }