body {
  font-family: Inter, sans-serif;
}

.tool-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .04);
}

/* ── Mode buttons ── */
.mode-btn {
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.mode-btn.active {
  background: #fff;
  color: #92400e;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
}

/* ── Reverb toggle ── */
.reverb-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 1px;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 3px;
}

.reverb-btn {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.reverb-btn.active {
  background: #fff;
  color: #065f46;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
}

/* ── Trombone body ── */
.trombone-wrap {
  background: linear-gradient(160deg, #1a1005 0%, #0d0800 100%);
  border-radius: 0.75rem;
  padding: 20px 16px 16px;
  margin: 0 -0.5rem;
  box-shadow:
    inset 0 2px 8px rgba(255, 200, 80, 0.06),
    inset 0 -4px 20px rgba(0, 0, 0, 0.5),
    0 6px 20px rgba(0, 0, 0, 0.15);
  user-select: none;
}

/* ── Trombone SVG instrument illustration ── */
.trombone-instrument {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  position: relative;
}

#tromboneCanvas {
  display: block;
  max-width: 100%;
}

/* ── Slide control ── */
.slide-section {
  margin-top: 8px;
}

.slide-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.slide-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 200, 80, 0.6);
}

.slide-position-display {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 200, 80, 0.9);
  font-family: 'JetBrains Mono', monospace;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 180, 40, 0.2);
  border-radius: 5px;
  padding: 2px 8px;
}

.slide-track-wrap {
  position: relative;
  height: 48px;
  display: flex;
  align-items: center;
  cursor: grab;
  touch-action: none;
}

.slide-track-wrap:active {
  cursor: grabbing;
}

.slide-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  border: 1px solid rgba(255, 180, 40, 0.2);
  overflow: visible;
}

/* Position markers for 7 slide positions */
.slide-markers {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.slide-marker {
  position: absolute;
  top: -18px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.slide-marker-line {
  width: 1px;
  height: 10px;
  background: rgba(255, 180, 40, 0.3);
}

.slide-marker-label {
  font-size: 0.55rem;
  font-weight: 700;
  color: rgba(255, 180, 40, 0.4);
  font-family: monospace;
}

.slide-thumb {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c49a28 0%, #8a6914 60%, #5a4208 100%);
  border: 2px solid #a07820;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.6),
    0 0 10px rgba(160, 120, 30, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.15);
  transform: translateX(-50%);
  cursor: grab;
  transition: box-shadow 0.1s;
  top: 50%;
  margin-top: -14px;
}

.slide-thumb:active {
  cursor: grabbing;
}

.slide-thumb.active {
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.6),
    0 0 16px rgba(160, 120, 30, 0.5),
    inset 0 1px 2px rgba(255, 255, 255, 0.15);
}

/* ── Note display ── */
.note-display-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.note-display {
  display: flex;
  align-items: center;
  gap: 10px;
}

.note-name-big {
  font-size: 1.6rem;
  font-weight: 700;
  color: rgba(255, 200, 80, 0.95);
  font-family: 'JetBrains Mono', monospace;
  min-width: 60px;
  line-height: 1;
}

.note-freq {
  font-size: 0.65rem;
  color: rgba(255, 180, 40, 0.5);
  font-family: monospace;
}

.note-hint {
  font-size: 0.62rem;
  color: #e5e7eb;
  font-style: italic;
}

/* ── Valve / partial buttons ── */
.partial-section {
  margin-top: 14px;
  border-top: 1px solid rgba(255, 180, 40, 0.1);
  padding-top: 12px;
}

.partial-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 200, 80, 0.5);
  margin-bottom: 8px;
}

.partial-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.partial-btn {
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid rgba(255, 180, 40, 0.2);
  background: rgba(255, 150, 30, 0.06);
  color: rgba(255, 180, 80, 0.55);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s, box-shadow 0.12s;
  -webkit-tap-highlight-color: transparent;
  font-family: monospace;
}

.partial-btn:hover {
  background: rgba(255, 160, 40, 0.15);
  color: rgba(255, 210, 100, 1);
  border-color: rgba(255, 160, 40, 0.4);
}

.partial-btn.active {
  background: rgba(200, 144, 16, 0.25);
  color: #fcd34d;
  border-color: rgba(245, 200, 66, 0.6);
  box-shadow: 0 0 10px rgba(245, 200, 66, 0.2);
}

/* ── Glide toggle ── */
.glide-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.glide-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0.08em;
}

.glide-switch {
  position: relative;
  width: 36px;
  height: 20px;
  cursor: pointer;
}

.glide-switch input {
  display: none;
}

.glide-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: #d1d5db;
  border: 1px solid #9ca3af;
  transition: background 0.2s, border-color 0.2s;
}

.glide-switch input:checked+.glide-switch-track {
  background: rgba(16, 185, 129, 0.4);
  border-color: rgba(16, 185, 129, 0.5);
}

.glide-switch-thumb {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  top: 2px;
  left: 2px;
  transition: transform 0.2s, background 0.2s;
}

.glide-switch input:checked~.glide-switch-thumb {
  transform: translateX(16px);
  background: #10b981;
}

/* ── Keyboard hint ── */
.kb-hint {
  font-size: 0.62rem;
  color: #e5e7eb;
  margin-top: 10px;
  text-align: center;
}

/* ── Vibrato indicator ── */
.vibrato-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.vibrato-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 200, 80, 0.45);
  flex-shrink: 0;
}

.vibrato-track {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 2px;
  overflow: hidden;
}

.vibrato-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(255, 180, 40, 0.4), rgba(255, 220, 80, 0.8));
  border-radius: 2px;
  transition: width 0.05s;
}

tbody tr:nth-child(even) {
  background: #f9fafb;
}

/* ── Fullscreen ── */
.tool-card.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  border-radius: 0 !important;
  max-width: 100vw !important;
  width: 100vw !important;
  height: 100dvh !important;
  overflow-y: auto !important;
  margin: 0 !important;
  padding: 1.5rem !important;
  box-sizing: border-box !important;
}

@media (max-width: 480px) {
  .partial-btns {
    gap: 6px;
  }

  .partial-btn {
    padding: 4px 9px;
    font-size: 0.68rem;
  }

  .note-name-big {
    font-size: 1.3rem;
  }
}