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

:root {
  --sax-brass-light: #e8b84b;
  --sax-brass-mid: #c8922a;
  --sax-brass-dark: #8b6010;
  --sax-key-bg: #2a2318;
  --sax-key-rim: #5a4520;
  --sax-bell-rim: #d4a830;
}

.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);
}

.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;
  white-space: nowrap;
}

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

.sax-body {
  background: linear-gradient(160deg, #f5f0e8 0%, #e8e0cc 40%, #d8d0b8 100%);
  border-radius: 1rem;
  padding: 28px 20px 32px;
  border: 1px solid #d8c898;
  box-shadow:
    inset 0 2px 8px rgba(255, 240, 180, 0.2),
    inset 0 -8px 18px rgba(120, 90, 20, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.10);
  position: relative;
  overflow: hidden;
}

.sax-body::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 240, 180, 0.18) 0%, transparent 55%);
  pointer-events: none;
}

.sax-svg-wrap {
  width: 100%;
  max-width: 420px;
  margin: 0 auto 16px;
  display: block;
}

.sax-note-display {
  text-align: center;
  padding: 8px 0 4px;
  position: relative;
  z-index: 1;
}

.sax-note-name {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--sax-brass-dark);
  line-height: 1;
  letter-spacing: 0.04em;
  min-height: 2.4rem;
  transition: color 0.08s;
}

.sax-note-name.playing {
  color: #92400e;
}

.sax-note-meta {
  font-size: 0.72rem;
  color: #a8956a;
  margin-top: 3px;
  min-height: 1rem;
  letter-spacing: 0.06em;
}

.sax-keys {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

.sax-key {
  aspect-ratio: 1;
  border: 1.5px solid #e5d9c0;
  border-radius: 8px;
  background: #faf7f0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: background 0.07s, border-color 0.07s, transform 0.07s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  padding: 3px;
}

.sax-key:hover {
  border-color: var(--sax-brass-mid);
  background: #fdf3d8;
}

.sax-key.active {
  background: #fde68a;
  border-color: var(--sax-brass-dark);
  transform: scale(0.93);
}

.sax-key.active .key-note-lbl {
  color: #78350f;
}

.key-char-lbl {
  font-size: 9px;
  color: #a8a09a;
  font-weight: 500;
  line-height: 1;
}

.key-note-lbl {
  font-size: 13px;
  font-weight: 700;
  color: #44403c;
  line-height: 1;
}

.sax-ripple {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 50;
  animation: saxRip 0.45s ease-out forwards;
  border: 2px solid rgba(200, 146, 42, 0.7);
}

@keyframes saxRip {
  from { transform: scale(0); opacity: 1; }
  to   { transform: scale(4); opacity: 0; }
}

.fullscreen-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  background: #f9fafb;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
  margin-left: auto;
}

.fullscreen-btn:hover {
  background: #fff;
  color: #92400e;
  border-color: #fcd34d;
}

.fullscreen-btn svg {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.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;
}

#bell-flash {
  pointer-events: none;
  mix-blend-mode: screen;
}

@media (max-width: 639px) {
  .sax-body {
    padding: 20px 12px 24px;
  }

  .sax-keys {
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
  }

  .key-note-lbl {
    font-size: 13px;
  }

  .key-char-lbl {
    font-size: 10px;
  }

  .sax-svg-wrap {
    max-width: 300px;
  }
}

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