/* Guess the MP only. Green = same, amber = close, grey = different; every tile also says so in words for screen
   readers, and arrows show the direction, so colour is never the only signal. */
.game .mp-legend { list-style: none; padding: 0; margin: 0 0 var(--space-4); display: flex; flex-wrap: wrap; gap: 6px var(--space-4); font-size: var(--step--1); color: var(--text-secondary); }
.game .mp-legend li { display: flex; align-items: center; gap: 6px; }
.game .mp-sw { width: 16px; height: 16px; display: inline-block; border: 1px solid var(--rule-strong); }

.game .mp-rows { list-style: none; padding: 0; margin: 0 0 var(--space-4); }
.game .mp-row { margin-bottom: var(--space-3); }
.game .mp-who { margin: 0 0 4px; font-size: var(--step--1); color: var(--text-secondary); }
.game .mp-who strong { color: var(--text); }
.game .mp-tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1.5fr 1.1fr 1.2fr 1fr 1fr 1fr; gap: 4px; }
.game .mp-tile { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 64px; padding: 6px 8px; border: 2px solid var(--rule-strong);
  animation: mp-flip 420ms ease-out both; animation-delay: calc(var(--i, 0) * 90ms); }
.game .mp-tile:nth-child(1) { --i: 0; } .game .mp-tile:nth-child(2) { --i: 1; } .game .mp-tile:nth-child(3) { --i: 2; }
.game .mp-tile:nth-child(4) { --i: 3; } .game .mp-tile:nth-child(5) { --i: 4; } .game .mp-tile:nth-child(6) { --i: 5; }
.game .mp-rows .mp-row:not(:last-child) .mp-tile { animation: none; }
@keyframes mp-flip { from { transform: perspective(400px) rotateX(-90deg); opacity: 0; } }
.game .mp-tl { font: 600 10px var(--font-mono); text-transform: uppercase; letter-spacing: .05em; opacity: .8; }
.game .mp-tv { font-weight: var(--weight-semibold); font-size: var(--step--1); line-height: 1.2; overflow-wrap: anywhere; }
.game .mp-arrow { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 20px; line-height: 1; }
.game .mp-tile .mp-arrow + * { padding-right: 18px; }
.game .is-hit, .game .mp-sw.is-hit { background: #2F7D32; border-color: #2F7D32; color: #fff; }
.game .is-near, .game .mp-sw.is-near { background: #C99A06; border-color: #C99A06; color: #1b1a17; }
.game .is-miss, .game .mp-sw.is-miss { background: var(--surface-sunken); color: var(--text); }
.game .is-unknown { background: var(--surface-raised); color: var(--text-muted); border-style: dashed; }

.game .mp-lab { display: block; font-weight: var(--weight-semibold); margin-bottom: var(--space-2); }
.game .mp-inrow { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.game .mp-inrow .game-input { flex: 1 1 18rem; }
.game .mp-msg { min-height: 1.5em; color: var(--text-secondary); margin: var(--space-2) 0 0; }
.game .mp-fit { margin-top: var(--space-3); border: 1px solid var(--rule); background: var(--surface-raised); padding: var(--space-2) var(--space-3); }
.game .mp-fit summary { cursor: pointer; font-weight: var(--weight-semibold); }
.game .mp-fit ul { list-style: none; padding: 0; margin: var(--space-2) 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 4px; }
.game .mp-pick { width: 100%; text-align: left; font: inherit; font-size: var(--step--1); color: var(--text); background: var(--surface-page); border: 1px solid var(--rule); padding: 6px 8px; cursor: pointer; min-height: 2.5rem; }
.game .mp-pick:hover { background: var(--primary-tint); }
.game .mp-pick:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.game .mp-answer { font-size: var(--step-1); }
.game a.game-btn { text-decoration: none; }

@media (max-width: 720px) {
  .game .mp-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game .mp-tile { min-height: 56px; }
}
@media (prefers-reduced-motion: reduce) { .game .mp-tile { animation: none; } }
