.arcade-card {
  padding: clamp(15px, 4vw, 32px);
  border: 1px solid var(--game-border);
  border-radius: 12px;
  background: var(--game-wash);
  color: var(--game-ink);
}
.arcade-stats, .arcade-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 17px; }
.arcade-stats { margin-block: 13px 8px; font-weight: 710; font-variant-numeric: tabular-nums; }
.arcade-actions { margin-top: 12px; }
.arcade-status { color: var(--game-ink); min-height: 1.35em; font-size: .94rem; }
.arcade-actions [hidden] { display: none; }
.arcade-card :focus-visible { outline: 2px solid var(--game-ink); outline-offset: 2px; }
.arcade-card .button:disabled { opacity: .68; cursor: default; }

.match-board {
  --tile-gap: clamp(3px, 1.25vw, 7px);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--tile-gap);
  max-width: 490px;
  padding: clamp(5px, 2vw, 12px);
  border: 1px solid #ba779e;
  border-radius: 9px;
  background: #e6a8c6;
}
.match-tile {
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: clamp(3px, 1.5vw, 10px);
  background: var(--tile-fill, #61492e);
  box-shadow: inset 0 2px #ffffff68, inset 0 -3px #4d2d211d;
  font-size: clamp(.9rem, 5.5vw, 2.25rem);
  line-height: 1;
  touch-action: manipulation;
}
.match-tile[data-kind='0'] { --tile-fill: #ffe1ea; }
.match-tile[data-kind='1'] { --tile-fill: #ffd9c4; }
.match-tile[data-kind='2'] { --tile-fill: #ffe4a5; }
.match-tile[data-kind='3'] { --tile-fill: #f8dba9; }
.match-tile[data-kind='4'] { --tile-fill: #e8dfff; }
.match-tile[data-kind='5'] { --tile-fill: #c7ebd6; }
.match-tile[data-kind='-1'] { box-shadow: none; }
.match-tile:not(:disabled):hover { border-color: #7c5224; }
.match-tile[aria-pressed='true'] { border-color: #221911; outline: 2px solid #ffd450; outline-offset: -3px; }
.match-tile:disabled { cursor: default; }
.match-board[data-preview] { opacity: .66; }

.space-stage canvas { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 10px; background: #0c1027; touch-action: none; }
.space-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 16px; margin-top: 12px; }
.space-controls[hidden], .space-stats [hidden] { display: none; }
.space-controls .arcade-actions { margin-top: 0; }
.space-pilots { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; border: 0; padding: 0; margin: 0; }
.space-pilots legend { margin-bottom: 3px; }
.space-pilots[hidden] { display: none; }
.space-pilots label { display: flex; gap: 8px; align-items: center; min-height: 61px; padding: 2px 10px 0 2px; border: 1px solid var(--game-border); border-radius: 7px; background: #f7f4ff; white-space: nowrap; cursor: pointer; }
.space-pilots label img { display: block; width: clamp(42px, 10vw, 66px); height: clamp(57px, 11vw, 76px); object-fit: contain; align-self: end; }
.space-pilots label span { display: inline-flex; align-items: center; gap: 4px; }
.space-pilots label:has(input:checked) { border-color: #6d54a8; background: var(--game-fill); }
.space-pilots input { accent-color: #6d54a8; }
.space-stats .button { margin-left: auto; min-height: 29px; padding: 3px 10px; color: var(--game-ink); }
.space-steering { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.space-steering .button, .arcade-actions .button-outline { color: var(--game-ink); }
.space-steering .button-primary { color: var(--ink); }
.space-steering .button-primary:active { background: #ffe496; }
.space-steering[hidden], .space-steering [hidden] { display: none; }
.space-controls .arcade-status { flex-basis: 100%; }
.space-controls .arcade-status:empty { display: none; }
.space-keys { margin-top: 5px; font-size: .9rem; color: var(--game-ink); }
.space-prize-dialog .runner-prizes { background: radial-gradient(ellipse at 50% 12%, #383261, #1d1c35 50%, #191612 88%); }
.space-prize-dialog .runner-prizes h2 { margin: 10px 30px 14px; color: #ffde7a; }
#space-prize-summary { text-align: center; color: #ece3fa; }
.match-guide, .match-play { width: min(100%, 490px); margin-inline: auto; }
