.app {
  max-width: 720px;
  width: 100%;
  gap: 12px;
}

.board-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  cursor: crosshair;
  background: #87ceeb;
  user-select: none;
  touch-action: none;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.overlay[hidden] { display: none; }

.overlay-card {
  background: var(--surface);
  color: var(--text-strong);
  padding: 24px 28px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  text-align: center;
  min-width: 240px;
  max-width: 80%;
}

.overlay-card h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.overlay-card p {
  margin: 0 0 14px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.overlay-card .btn {
  font-weight: 600;
  font-size: 1rem;
  padding: 10px 24px;
}

.combo-banner {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 80, 80, 0.92);
  color: #fff;
  padding: 6px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  letter-spacing: 0.04em;
  pointer-events: none;
  z-index: 4;
  animation: comboPop 0.18s ease-out;
}

@keyframes comboPop {
  0%   { transform: translateX(-50%) scale(0.7); }
  60%  { transform: translateX(-50%) scale(1.08); }
  100% { transform: translateX(-50%) scale(1); }
}

.toolbar { display: flex; gap: 8px; justify-content: center; }

@media (max-width: 540px) {
  .board-wrapper { aspect-ratio: 4 / 5; }
}
