button {
  font: inherit;
  cursor: pointer;
  border-radius: 7px;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
  transition: background .15s
}

button:enabled:hover {
  filter: brightness(1.15)
}

button:disabled {
  opacity: .45;
  cursor: not-allowed
}

.quiet {
  border: 1px solid #6f7e92;
  background: #1b2430;
  color: var(--text, #edf2f9)
}

.primary {
  background: #2563eb;
  border: 1px solid #3b82f6;
  color: #fff
}

#reset {
  background: #b91c1c;
  border-color: #ef4444;
  color: #fff
}

button:focus-visible {
  outline: 2px solid var(--green, #89e5bd);
  outline-offset: 4px
}

.adjustment-delete {
  display: grid;
  place-items: center;
  width: 32px;
  min-height: 32px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--red, #f69c9d)
}

.adjustment-actions button {
  min-height: 32px;
  padding: 4px 12px
}

.floating-controls {
  position: fixed;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: var(--rail-width, 104px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 8px;
  background: var(--panel, #131923);
  border: 1px solid var(--line, #28303d);
  border-radius: 10px;
  box-shadow: 0 8px 24px #0005
}

.floating-controls .play-controls {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 8px
}

.floating-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 4px;
  font-size: 12px;
  white-space: nowrap
}

#play::before { content: "▶" }
#play[aria-pressed=true]::before { content: "Ⅱ" }
#reset::before { content: "↺" }

.floating-controls #back,
.floating-controls #step {
  font-size: 20px;
  font-weight: 700
}

.floating-controls .lot-toggle {
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 12px;
  gap: 6px
}

.floating-controls .lot-toggle>span:first-child {
  width: 100%;
  text-align: center;
  font-size: 11px
}

@media(max-width:760px) {
  .adjustment-delete {
    width: 44px;
    min-height: 44px
  }

  .adjustment-actions button {
    min-height: 44px
  }

  .floating-controls {
    top: auto;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    transform: none;
    width: auto;
    max-height: none;
    overflow: visible;
    box-shadow: 0 -8px 24px #0006
  }

  .floating-controls .play-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px
  }

  .floating-controls button { min-width: 0 }

  .floating-controls .lot-toggle {
    min-height: 44px;
    flex-wrap: nowrap;
    margin-top: 4px;
    gap: 8px
  }

  .floating-controls .lot-toggle>span:first-child {
    width: auto;
    font-size: 12px
  }
}

@media(max-width:360px) {
  .floating-controls button { font-size: 11px }
}
