body.drumline-page {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

#drumlineApp {
  position: relative;
  width: 100%;
  height: 100%;
  height: calc(100dvh - 88px);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

#drumlineApp:fullscreen,
#drumlineApp:-webkit-full-screen,
#drumlineApp.is-fullscreen-fallback {
  height: 100%;
  height: 100dvh;
  background: var(--bg);
  overflow: hidden;
}

#drumlineApp.is-fullscreen-fallback {
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

.drumline-page .center-card {
  width: min(1200px, 98%);
  max-height: none;
  opacity: 1;
  transform: none;
}

.drumline-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  min-height: 0;
}

.drumline-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.drumline-play-toggle {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fff, #dddddd);
  border: none;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  flex-shrink: 0;
}

.drumline-play-toggle:hover {
  filter: brightness(1.1);
}

.drumline-play-toggle svg {
  width: 14px;
  height: 14px;
  fill: #000;
}

.drumline-bpm,
.drumline-volume,
.drumline-track,
.drumline-steps-count,
.drumline-sync {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.drumline-bpm {
  min-width: 200px;
}

.drumline-sync {
  gap: 6px;
  flex-shrink: 0;
}

.drumline-sync-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.drumline-sync-btn {
  min-width: 40px;
  height: 24px;
  padding: 0 8px;
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.02em;
  transition: var(--transition);
  text-shadow: 0 1px 2px black;
}

.drumline-sync-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--fg);
  box-shadow: 0 0 10px var(--accent);
  text-shadow: 0 0 5px var(--accent);
  transform: translateY(-1px);
}

.drumline-volume {
  min-width: 160px;
}

.drumline-bpm input[type="range"],
.drumline-volume input[type="range"] {
  flex: 1;
  min-width: 120px;
  max-width: 160px;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  cursor: pointer;
}

.drumline-bpm input[type="range"]::-webkit-slider-thumb,
.drumline-volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: var(--fg);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

.drumline-bpm input[type="range"]::-moz-range-thumb,
.drumline-volume input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--fg);
  border: none;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

.drumline-bpm input[type="range"]:focus,
.drumline-volume input[type="range"]:focus {
  outline: none;
}

.drumline-bpm-value,
.drumline-volume-value {
  min-width: 40px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.drumline-track select,
.drumline-steps-count select {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
  color: var(--fg);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
}

.drumline-track select:hover,
.drumline-steps-count select:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.drumline-track select:focus,
.drumline-steps-count select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.drumline-track select option,
.drumline-steps-count select option {
  background: #111;
  color: #fff;
}

.drumline-track-color {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.drumline-track .drumline-sync-btn {
  flex-shrink: 0;
}

.drumline-sample-remove {
  min-width: 24px;
  padding: 0 6px;
  color: rgba(255, 180, 180, 0.85);
}

.drumline-sample-remove:hover {
  border-color: #ff5252;
  color: #ff8a80;
}

.drumline-steps {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 100%;
}

.drumline-step-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.drumline-step-btn {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(50, 50, 50, 0.8), rgba(0, 0, 0, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
}

.drumline-step-btn:hover {
  border-color: var(--track-color, var(--accent));
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.drumline-step-btn.active {
  border-color: var(--track-color, var(--accent));
  box-shadow: 0 0 10px var(--track-color, rgba(255, 255, 255, 0.3)), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  background: linear-gradient(180deg, rgba(80, 80, 80, 0.9), rgba(20, 20, 20, 0.95));
}

.drumline-step-dots {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
  pointer-events: none;
}

.drumline-step-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.drumline-step-btn.playing {
  transform: scale(0.92);
  border-color: var(--fg);
  background: linear-gradient(180deg, #fff, #dddddd);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.drumline-step-btn.is-playing {
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.drumline-panel .drumline-container {
  gap: 0;
}

.drumline-panel .drumline-controls {
  gap: 8px 10px;
  margin-bottom: 10px;
  width: 100%;
}

.drumline-panel .drumline-play-toggle {
  width: 28px;
  height: 28px;
}

.drumline-panel .drumline-play-toggle svg {
  width: 11px;
  height: 11px;
}

.drumline-panel .drumline-bpm,
.drumline-panel .drumline-volume,
.drumline-panel .drumline-track,
.drumline-panel .drumline-steps-count,
.drumline-panel .drumline-sync {
  gap: 4px;
  font-size: 11px;
}

.drumline-panel .drumline-bpm {
  min-width: 0;
  flex: 1 1 110px;
  max-width: 140px;
}

.drumline-panel .drumline-sync {
  flex: 0 0 auto;
}

.drumline-panel .drumline-sync-btn {
  min-width: 34px;
  height: 20px;
  padding: 0 6px;
  font-size: 10px;
}

.drumline-panel .drumline-volume {
  min-width: 0;
  flex: 1 1 90px;
  max-width: 110px;
}

.drumline-panel .drumline-bpm input[type="range"],
.drumline-panel .drumline-volume input[type="range"] {
  min-width: 56px;
  max-width: 90px;
}

.drumline-panel .drumline-bpm input[type="range"]::-webkit-slider-thumb,
.drumline-panel .drumline-volume input[type="range"]::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
}

.drumline-panel .drumline-bpm input[type="range"]::-moz-range-thumb,
.drumline-panel .drumline-volume input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
}

.drumline-panel .drumline-bpm-value,
.drumline-panel .drumline-volume-value {
  min-width: 28px;
  font-size: 11px;
}

.drumline-panel .drumline-track select,
.drumline-panel .drumline-steps-count select {
  padding: 3px 5px;
  border-radius: 5px;
  font-size: 11px;
}

.drumline-panel .drumline-track-color {
  width: 10px;
  height: 10px;
}

.drumline-panel .drumline-track .drumline-sync-btn {
  min-width: 52px;
  height: 20px;
  padding: 0 6px;
  font-size: 10px;
}

.drumline-panel .drumline-sample-remove {
  min-width: 22px;
  padding: 0 4px;
}

.drumline-panel .drumline-steps {
  gap: 5px;
}

.drumline-panel .drumline-step-column {
  gap: 4px;
}

.drumline-panel .drumline-step-btn {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(180deg, rgba(70, 70, 70, 0.85), rgba(15, 15, 15, 0.95));
}

.drumline-panel .drumline-step-dots {
  bottom: 3px;
  gap: 2px;
}

.drumline-panel .drumline-step-dot {
  width: 3px;
  height: 3px;
}

@media (max-width: 720px) {
  .drumline-step-btn {
    width: 48px;
    height: 48px;
  }

  .drumline-controls {
    gap: 12px;
    margin-bottom: 20px;
  }

  .drumline-play-toggle {
    width: 44px;
    height: 44px;
  }

  .drumline-play-toggle svg {
    width: 16px;
    height: 16px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .drumline-play-toggle {
    width: 44px;
    height: 44px;
  }

  .drumline-play-toggle svg {
    width: 16px;
    height: 16px;
  }

  .drumline-panel .drumline-play-toggle {
    width: 32px;
    height: 32px;
  }

  .drumline-panel .drumline-play-toggle svg {
    width: 12px;
    height: 12px;
  }

  .drumline-panel .drumline-step-btn {
    width: 32px;
    height: 32px;
  }
}
