html, body {
  background: #f7f7f9;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

body {
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.bpm-display {
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1;
}

.beats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  gap: 8px;
}

.beat-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: #eef0f3;
  border: 1px solid #dfe2e6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
  transition: background 80ms ease, transform 80ms ease, box-shadow 80ms ease;
  font-weight: 600;
  color: #444;
}

.beat-cell.disabled {
  background: #f5f5f7;
  color: #bbb;
  text-decoration: line-through;
}

.beat-cell .beat-num {
  font-size: 1.05rem;
}

.beat-cell .beat-snd {
  font-size: 0.62rem;
  font-weight: 400;
  color: #888;
  margin-top: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}

.beat-cell.active {
  background: #1e87f0;
  color: #fff;
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(30,135,240,.35);
}

.beat-cell.active .beat-snd { color: rgba(255,255,255,.85); }

.play-button {
  border-radius: 999px;
  min-width: 200px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.play-button.is-playing {
  background-color: #f0506e;
}

#bpm-slider { width: 100%; }

.preset-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
