.ld-arcade-v2 .mission-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.ld-arcade-v2 { position: relative; }

.ld-arcade-v2 .mission-controls button {
  min-height: 44px;
  border: 1px solid #7586d3;
  border-radius: 5px;
  background: #101b44;
  color: #fff;
  padding: 9px 14px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}

/* Use real inline artwork instead of pseudo-element borders so the player ship
   remains visible in mobile Chromium and accessibility display modes. */
.ld-arcade-v2 .spacecraft {
  width: 64px;
  height: 58px;
  pointer-events: none;
  transition: none;
}

.ld-arcade-v2 .spacecraft::before,
.ld-arcade-v2 .spacecraft > span {
  display: none;
}

.ld-arcade-v2 .ship-art {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ld-arcade-v2 .ship-hull {
  fill: #00dce8;
  stroke: #fffdf3;
  stroke-width: 2.5;
}

.ld-arcade-v2 .ship-canopy {
  fill: #f7e502;
  stroke: #101a43;
  stroke-width: 2;
}

.ld-arcade-v2 .ship-thruster {
  fill: #ff5c6f;
  stroke: #f7e502;
  stroke-width: 1.5;
}

.ld-arcade-v2 .mission-controls [data-exit] {
  border-color: #ff5c6f;
}

.ld-arcade-v2 .game-board {
  touch-action: none;
  user-select: none;
}

.ld-arcade-v2 .pause-overlay {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #05091ce8;
  color: #fff;
}

.ld-arcade-v2 .pause-overlay[hidden] {
  display: none;
}

.ld-arcade-v2 .pause-overlay strong {
  color: var(--yellow);
  font: 900 28px monospace;
  letter-spacing: 2px;
}

.ld-arcade-v2.is-paused .pulse {
  animation: none;
  opacity: .4;
}

.ld-arcade-v2 .score-pair .arcade-primary,
.ld-arcade-v2 .score-pair .game-secondary {
  grid-column: 1 / -1;
}

.ld-arcade-v2 .score-pair .game-secondary {
  background: #e9ecf7;
  color: var(--ink);
  padding: 12px;
}

.ld-arcade-v2 .score-pair .game-secondary small,
.ld-arcade-v2 .score-pair .game-secondary span {
  color: #596285;
}

.ld-arcade-v2 .score-pair .game-secondary b {
  color: var(--ink);
  font-size: 30px;
}

.ld-arcade-v2 .score-pair.score-single {
	display: block;
	max-width: 220px;
	margin-inline: auto;
}

.ld-arcade-v2 .score-pair.score-single .arcade-primary { padding: 10px 12px; }
.ld-arcade-v2 .score-pair.score-single b { font-size: 34px; }

@media (max-width: 520px) {
  .ld-arcade-v2 .mission-controls {
    justify-content: stretch;
  }

  .ld-arcade-v2 .mission-controls button {
    flex: 1;
    padding-inline: 8px;
  }

  .ld-arcade-v2 .pause-overlay strong {
    font-size: 22px;
  }

  /* Keep the player's ship inside the visible phone play area. The desktop
     mission retains its full-height board. */
  .ld-arcade-v2 .game-board {
    height: min(430px, 52svh);
    min-height: 320px;
  }

  .ld-arcade-v2 .spacecraft {
    display: block;
    visibility: visible;
    opacity: 1;
    z-index: 12;
    bottom: 12px;
  }
}

/* Keep the configuration panel inside the shared Arcade card at every
   intermediate width. The base game stylesheet remains intentionally compact. */
.ld-arcade-v2 .menu-grid {
  display: block;
  min-height: auto;
  max-width: 1040px;
  padding-block: clamp(28px, 5vw, 54px);
}

.ld-arcade-v2 .menu-grid > *,
.ld-arcade-v2 .mission-card,
.ld-arcade-v2 .lab-set,
.ld-arcade-v2 .lab-set b,
.ld-arcade-v2 .lab-set small {
  min-width: 0;
}

.ld-arcade-v2 .lab-set-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ld-arcade-v2 .mission-card {
  width: 100%;
}

.ld-arcade-v2 .lab-set {
  grid-template-columns: 28px minmax(0, 1fr) auto;
}

.ld-arcade-v2 .lab-set b,
.ld-arcade-v2 .lab-set small {
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .ld-arcade-v2 .mission-card {
    margin-bottom: 25px;
  }
}

/* Figma-approved Lab Defender playfield — visual layer only. Gameplay timing,
   lane assignment, target resolution, scoring, and controls remain unchanged. */
.ld-arcade-v2 .game-wrap {
  max-width: 1240px;
  padding-inline: clamp(12px, 2vw, 24px);
}

.ld-arcade-v2 .mission-controls {
  justify-content: flex-start;
  margin-bottom: 8px;
}

.ld-arcade-v2 .mission-controls button,
.ld-arcade-v2 .hud,
.ld-arcade-v2 .feedback,
.ld-arcade-v2 .decision-line {
  font-family: "Press Start 2P", ui-monospace, monospace;
}

.ld-arcade-v2 .mission-controls button {
  border-radius: 0;
  background: #0d1b3e;
  color: #94a3b8;
  font-size: 8px;
  letter-spacing: .08em;
}

.ld-arcade-v2 .hud {
  margin-bottom: 4px;
  border-radius: 0;
  border-color: #1a3060;
  background: #080f28;
}

.ld-arcade-v2 .hud > div {
  min-height: 44px;
  padding: 7px 10px;
  border-color: #1a3060;
}

.ld-arcade-v2 .hud small {
  color: #4a7ab5;
  font-size: 7px;
}

.ld-arcade-v2 .hud strong {
  font-size: 14px;
}

.ld-arcade-v2 .game-board {
  height: 650px;
  border: 1px solid #1a3060;
  border-radius: 0;
  background: #061633 url("lab-defender-space-bg.png") center / cover no-repeat;
  box-shadow: none;
}

@media (min-width: 521px) and (max-width: 820px) {
  .ld-arcade-v2 .hud { grid-template-columns: 1fr 1.35fr .8fr .8fr 1fr; }
  .ld-arcade-v2 .hud > div:nth-child(2) { grid-column: auto; }
}

.ld-arcade-v2 .starfield {
  display: none;
}

.ld-arcade-v2 .lane-guides {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(20% - 1px), #ffffff18 calc(20% - 1px) 20%), repeating-linear-gradient(0deg, transparent 0 38px, #ffffff12 39px 40px);
  background-size: 100% 100%, 100% 40px;
}

.ld-arcade-v2 .lane-guides::before,
.ld-arcade-v2 .lane-guides::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 42px;
  background:
    linear-gradient(90deg, transparent 0 42%, #ffd09a 42% 46%, #fff 46% 54%, #ffd09a 54% 58%, transparent 58%),
    linear-gradient(0deg, transparent 0 42%, #ffd09a 42% 46%, #fff 46% 54%, #ffd09a 54% 58%, transparent 58%);
  filter: drop-shadow(0 0 4px #ff8a3d);
  opacity: 1;
  z-index: 2;
}

.ld-arcade-v2 .lane-guides::before { left: 14%; top: 9%; }
.ld-arcade-v2 .lane-guides::after { right: 14%; top: 49%; transform: scale(1.18); }

.ld-arcade-v2 .feedback {
  top: 20px;
  padding: 9px 14px;
  border-radius: 0;
  border-color: #2a5090;
  background: #080f28dd;
  font-size: 8px;
  backdrop-filter: blur(4px);
}

.ld-arcade-v2 .lab-target {
  --rock-body: #2a5a8a;
  --rock-shadow: #1a3a5e;
  --rock-crater: #0e2238;
  --rock-highlight: #3a7ab8;
  width: clamp(80px, 8vw, 96px);
  min-height: 82px;
  padding: 14px 8px 10px;
  border: 2px solid var(--rock-highlight);
  clip-path: polygon(46% 0, 67% 3%, 90% 18%, 100% 44%, 94% 73%, 72% 94%, 47% 100%, 20% 88%, 3% 63%, 5% 27%, 23% 7%);
  background: var(--rock-body);
  color: #e8f4f8;
  box-shadow: inset 7px 7px 0 color-mix(in srgb, var(--rock-highlight) 18%, transparent);
  overflow: hidden;
  font-family: "Press Start 2P", ui-monospace, monospace;
}

.ld-arcade-v2 .lab-target[data-palette="0"] { --rock-body:#b83a58; --rock-shadow:#74233a; --rock-crater:#451424; --rock-highlight:#ed6683; }
.ld-arcade-v2 .lab-target[data-palette="1"] { --rock-body:#7a4020; --rock-shadow:#4e2810; --rock-crater:#2e1608; --rock-highlight:#a05830; }
.ld-arcade-v2 .lab-target[data-palette="2"] { --rock-body:#2a5a8a; --rock-shadow:#1a3a5e; --rock-crater:#0e2238; --rock-highlight:#3a7ab8; }
.ld-arcade-v2 .lab-target[data-palette="3"] { --rock-body:#6a3080; --rock-shadow:#421e52; --rock-crater:#281030; --rock-highlight:#8a4aaa; }
.ld-arcade-v2 .lab-target[data-palette="4"] { --rock-body:#7a6010; --rock-shadow:#4e3c08; --rock-crater:#2e2404; --rock-highlight:#b09020; }

.ld-arcade-v2 .lab-target .crater {
  position: absolute;
  z-index: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--rock-crater);
  box-shadow: inset 4px 4px 0 var(--rock-shadow);
  opacity: .92;
}

.ld-arcade-v2 .lab-target .crater-a { left: 20%; top: 18%; }
.ld-arcade-v2 .lab-target .crater-b { right: 17%; top: 24%; width: 17px; height: 17px; }
.ld-arcade-v2 .lab-target .crater-c { right: 28%; bottom: 13%; width: 11px; height: 11px; }
.ld-arcade-v2 .lab-target .crater-d { left: 19%; bottom: 20%; width: 9px; height: 9px; }

.ld-arcade-v2 .lab-target span,
.ld-arcade-v2 .lab-target b,
.ld-arcade-v2 .lab-target small {
  position: relative;
  z-index: 2;
  max-width: 100%;
  text-shadow: 0 1px 2px #000;
}

.ld-arcade-v2 .lab-target span { font-size: 7px; line-height: 1.35; }
.ld-arcade-v2 .lab-target b { color: #ffd700; font-size: clamp(12px, 1.4vw, 16px); }
.ld-arcade-v2 .lab-target small { color: #aac8d0; font-size: 6px; }
.ld-arcade-v2 .lab-target:hover,
.ld-arcade-v2 .lab-target:focus-visible { border-color: #00d4b8; filter: brightness(1.1); }

.ld-arcade-v2 .spacecraft {
  width: 64px;
  height: 58px;
  bottom: 14px;
  z-index: 12;
  filter: drop-shadow(0 0 7px #00d4b8);
}

.ld-arcade-v2 .decision-line {
  display: none;
  z-index: 3;
  bottom: 80px;
  height: 2px;
  border: 0;
  padding: 0;
  background: linear-gradient(90deg, transparent, #ff6b6bb3 20%, #ff6b6bb3 80%, transparent);
}

.ld-arcade-v2 .decision-line span {
  position: absolute;
  right: 12px;
  bottom: 6px;
  color: #ff6b6b;
  font-size: 8px;
  opacity: .8;
}

@media (max-width: 520px) {
  .ld-arcade-v2 .hud { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ld-arcade-v2 .hud > div { min-height: 40px; padding: 6px 7px; }
  .ld-arcade-v2 .hud > div:nth-child(2) { grid-column: span 2; }
  .ld-arcade-v2 .hud > div:last-child { grid-column: auto; }
  .ld-arcade-v2 .hud strong { font-size: 12px; }
  .ld-arcade-v2 .game-board { height: min(500px, 62svh); min-height: 390px; }
  .ld-arcade-v2 .lab-target { width: 72px; min-height: 72px; padding-inline: 5px; }
  .ld-arcade-v2 .spacecraft { width: 64px; height: 58px; bottom: 12px; }
  .ld-arcade-v2 .decision-line { bottom: 66px; }
  .ld-arcade-v2 .feedback { max-width: 88%; }
  .ld-arcade-v2 .lane-guides::before { left: 7%; top: 12%; transform: scale(.72); }
  .ld-arcade-v2 .lane-guides::after { right: 6%; top: 52%; transform: scale(.82); }
}

