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-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: #065f46;
  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);
}

/* ── Instrument body ── */
.glock-body {
  position: relative;
  background: linear-gradient(170deg, #1e2a3a 0%, #111d2b 100%);
  border-radius: 1rem;
  padding: 48px 20px 24px;
  box-shadow:
    inset 0 2px 8px rgba(180,210,255,0.06),
    inset 0 -4px 20px rgba(0,0,0,0.4),
    0 8px 32px rgba(0,0,0,0.2);
  overflow: hidden;
  min-height: 200px;
}
.glock-body::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(160,200,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}

/* ── Bars container ── */
.xyl-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  position: relative;
  z-index: 2;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
}

/* ── Individual bar ── */
.glock-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  position: relative;
}

/* ── Metal bar body ── */
.bar-body {
  border-radius: 3px 3px 2px 2px;
  position: relative;
  transition: filter 0.05s, transform 0.05s;
  /* Strong metallic sheen — bright left edge, dark right edge */
  box-shadow:
    inset 4px 0 6px rgba(255,255,255,0.55),
    inset -3px 0 5px rgba(0,0,0,0.35),
    inset 0 3px 4px rgba(255,255,255,0.40),
    inset 0 -3px 5px rgba(0,0,0,0.30),
    0 5px 14px rgba(0,0,0,0.40);
}

/* Gold mounting pin at top of each bar */
.bar-body::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  /* background: radial-gradient(circle at 35% 35%, #ffe090, #b8860b); */
  background: black;
  box-shadow: 0 1px 2px rgba(0,0,0,0.5);
  z-index: 1;
}

/* Second gold pin at bottom of each bar */
.bar-body::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  /* background: radial-gradient(circle at 35% 35%, #ffe090, #b8860b); */
  background: black;
  box-shadow: 0 1px 2px rgba(0,0,0,0.5);
  z-index: 1;
}

.bar-body.struck {
  filter: brightness(1.5);
  transform: scaleY(0.96) translateY(2px);
}

/* ── Small resonator visual below note label ── */
.bar-resonator {
  width: 3px;
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 0 0 2px 2px;
  margin-bottom: 3px;
}

/* ── Bar labels ── */
.bar-note-label {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.90);
  text-align: center;
  line-height: 1.15;
  margin-bottom: 1px;
  white-space: nowrap;
}
.bar-key-label {
  font-size: 6.5px;
  color: rgba(255,255,255,0.28);
  font-family: monospace;
  text-align: center;
  line-height: 1.15;
  margin-bottom: 4px;
  white-space: nowrap;
}

/* ── Mallets ── */
.mallets-row {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 56px;
  pointer-events: none;
  z-index: 3;
}
.mallet {
  position: absolute;
  top: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
  transition: transform 0.08s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.left-mallet  { left:  30%; }
.right-mallet { right: 30%; }

.mallet-stick {
  width: 3px;
  height: 28px;
  background: linear-gradient(180deg, #d4b896 0%, #a07850 100%);
  border-radius: 2px;
}
/* Glockenspiel = small hard head, brass or hard plastic */
.mallet-head {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 1px;
  background: radial-gradient(circle at 35% 35%, #f5f0e0, #9a8840);
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.mallet.strike {
  transform: rotate(18deg);
}

/* ── Landscape banner ── */
.landscape-banner {
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: 0.5rem;
  padding: 8px 14px;
  font-size: 0.75rem;
  color: #92400e;
  text-align: center;
  margin-bottom: 10px;
}

/* ── Ripple ── */
.bar-ripple {
  position: fixed;
  border-radius: 4px;
  pointer-events: none;
  z-index: 50;
  animation: barRip 0.45s ease-out forwards;
}
@keyframes barRip {
  from { opacity: 0.75; transform: scale(1); }
  to   { opacity: 0;    transform: scale(1.7); }
}

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

/* ── Fullscreen button ── */
.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: #065f46;
  border-color: #6ee7b7;
}
.fullscreen-btn svg {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

/* ── Fullscreen mode ── */
.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;
}
.tool-card.is-fullscreen .glock-body {
  flex: 1;
}

/* ── Mobile overrides (<640px) ── */
@media (max-width: 639px) {
  .glock-body {
    padding: 30px 8px 16px;
  }
  .xyl-bars {
    gap: 3px;
  }
}

