/* Shared mobile layout for 800×520 Synth game demos */

.score-bar,
.stat-bar {
  width: 100% !important;
  max-width: 800px;
}

.canvas-wrap {
  width: 100% !important;
  max-width: 800px;
  height: auto !important;
  aspect-ratio: 800 / 520;
  touch-action: none;
}

.canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.controls {
  width: 100%;
  max-width: 800px;
}

@media (max-width: 640px) {
  .wrap {
    padding: 12px 12px 20px;
    gap: 10px;
  }

  .hdr {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .hdr-right {
    text-align: left;
    font-size: .58rem;
  }

  .score-bar,
  .stat-bar {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
  }

  .pill-val {
    font-size: .9rem;
  }

  .controls {
    justify-content: center;
  }

  .btn {
    padding: 10px 12px;
    font-size: .65rem;
  }

  .speed-wrap {
    width: 100%;
    margin-left: 0 !important;
    justify-content: space-between;
    padding-top: 4px;
  }

  .speed-wrap input[type=range] {
    flex: 1;
    max-width: none;
  }
}

@media (max-width: 380px) {
  .logo {
    font-size: .85rem;
    letter-spacing: .14em;
  }

  .score-pill,
  .stat-pill {
    padding: 6px 8px;
  }

  .controls .btn {
    flex: 1 1 calc(50% - 4px);
    text-align: center;
  }
}
