/* CPT with distractors. The card sits in the middle; distractors appear
   above, below or beside it and move. Card colours are fixed (a white card
   in both themes). No transition on the card: it is fully drawn on the
   frame its onset is timed from. Under prefers-reduced-motion the shared
   stylesheet stops the animations, so distractors appear without moving. */
.mx-legend { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.mx-legend li { display: flex; align-items: center; gap: 12px; }
.mx-swatch { display: inline-flex; flex: none; gap: 4px; }
.mx-swatch .mx-card { display: block; width: 30px; height: 42px; }
.mx-sound { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.mx-sound .odak-btn { font-size: 14px; padding: 8px 14px; }
.mx-sound .odak-hint { flex-basis: auto; flex: 1 1 16em; }

.mx-stage { min-height: 460px; overflow: hidden; }
.mx-slot { position: relative; width: 112px; height: 157px; }
.mx-slot .mx-card { position: absolute; inset: 0; width: 100%; height: 100%; visibility: hidden; }
.mx-slot .mx-card.is-shown { visibility: visible; }
.mx-card-bg { fill: #fff; stroke: #8a8a8a; stroke-width: 2; }
.mx-red { fill: #c8102e; }
.mx-black { fill: #1b1b1b; }
.odak-stage[data-odak-state="running"] .odak-stage-msg { display: none; }
.odak-stage:not([data-odak-state="running"]) .mx-slot { display: none; }

.mx-layer { position: absolute; inset: 0; pointer-events: none; }
.mx-distractor { position: absolute; width: 132px; height: 88px; fill: none; stroke: var(--text-soft); stroke-width: 3; stroke-linecap: round; }
.mx-zone-top { top: 14px; left: 50%; margin-left: -66px; }
.mx-zone-bottom { bottom: 14px; left: 50%; margin-left: -66px; }
.mx-zone-left { left: 14px; top: 50%; margin-top: -44px; }
.mx-zone-right { right: 14px; top: 50%; margin-top: -44px; }
.mx-fill-blue { fill: #2f6fd6; stroke: none; }
.mx-fill-dark { fill: #333; stroke: none; }
.mx-fill-grey { fill: #9aa3ad; stroke: none; }
.mx-fill-gold { fill: #d9a21b; stroke: none; }
.mx-fill-red { fill: #d0452f; stroke: none; }
.mx-fill-screen { fill: #9fd3f0; stroke: none; }

.mx-move-birds { animation: mx-drift 3s ease-in-out infinite alternate; }
.mx-move-birds .mx-flap { transform-box: fill-box; transform-origin: center; animation: mx-flap 0.28s ease-in-out infinite alternate; }
.mx-move-ball { animation: mx-bounce 0.45s cubic-bezier(0.5, 0, 0.5, 1) infinite alternate; }
.mx-move-plane { animation: mx-drift 4s linear infinite alternate; }
.mx-move-phone { animation: mx-shake 0.09s linear infinite alternate; }
.mx-move-bell { transform-origin: 50% 10%; animation: mx-swing 0.8s ease-in-out infinite alternate; }
.mx-move-car { animation: mx-drift 2.6s ease-in-out infinite alternate; }
@keyframes mx-drift { from { transform: translateX(calc(-1 * var(--mx-drift, 28px))); } to { transform: translateX(var(--mx-drift, 28px)); } }
@keyframes mx-flap { from { transform: scaleY(1); } to { transform: scaleY(0.3); } }
@keyframes mx-bounce { from { transform: translateY(-14px); } to { transform: translateY(10px); } }
@keyframes mx-shake { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@keyframes mx-swing { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }

@media (max-width: 480px) {
	.mx-stage { min-height: 420px; padding: 12px; }
	.mx-slot { width: 92px; height: 129px; }
	.mx-distractor { width: 96px; height: 64px; }
	.mx-zone-top, .mx-zone-bottom { margin-left: -48px; }
	.mx-zone-left, .mx-zone-right { margin-top: -32px; }
	.mx-zone-left { left: 4px; }
	.mx-zone-right { right: 4px; }
	/* Beside a narrow card there is less room: keep sideways drift clear of it. */
	.mx-zone-left, .mx-zone-right { --mx-drift: 8px; }
}
