.back-link {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--accent);
}

.scout-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.hud {
  display: flex;
  gap: 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.hud strong {
  color: var(--text);
}

#board {
  background: #1a2740;
  border: 2px solid var(--border);
  border-radius: 10px;
  touch-action: none;
  cursor: pointer;
  max-width: 100%;
  height: auto;
}

.hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
  text-align: center;
}

.touch-controls {
  display: none;
  gap: 0.75rem;
  width: 100%;
  max-width: 480px;
}

@media (hover: none) and (pointer: coarse) {
  .touch-controls {
    display: flex;
  }
}

.touch-btn {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 1rem 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.touch-btn:active {
  background: var(--accent);
  color: #0d0f14;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 15, 20, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  z-index: 10;
  padding: 1rem;
  text-align: center;
}

.overlay.hidden {
  display: none;
}

.overlay p {
  margin: 0;
}

#overlay-text {
  font-size: 1.75rem;
  font-weight: 700;
}

#overlay-sub {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 320px;
}

.overlay button {
  margin-top: 0.5rem;
  background: var(--accent);
  color: #0d0f14;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.overlay button:hover {
  filter: brightness(1.1);
}
