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

/* ── Toggle buttons ── */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 1px;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 3px;
}
.toggle-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;
}
.toggle-btn.active {
  background: #fff;
  color: #1e3a5f;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

/* ── Pan flute body — dark ebony finish with warm amber hint ── */
.panflute-body {
  position: relative;
  background: linear-gradient(160deg, #100c04 0%, #060402 100%);
  border-radius: 1rem;
  padding: 20px 20px 28px;
  box-shadow:
    inset 0 2px 12px rgba(255,255,255,0.04),
    inset 0 -4px 20px rgba(0,0,0,0.6),
    0 8px 32px rgba(0,0,0,0.28);
}
.panflute-body::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(200,160,60,0.06) 0%, transparent 55%);
  pointer-events: none;
  border-radius: 1rem;
}

/* ── Pan flute scroll wrapper ── */
.panflute-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(200,160,60,0.2) transparent;
  padding-bottom: 4px;
  position: relative;
  z-index: 1;
  touch-action: pan-y;
}
.panflute-scroll::-webkit-scrollbar { height: 4px; }
.panflute-scroll::-webkit-scrollbar-track { background: transparent; }
.panflute-scroll::-webkit-scrollbar-thumb { background: rgba(200,160,60,0.2); border-radius: 2px; }

/* ── Pipes container — top-aligned so all pipes share the same blowing edge ── */
.panflute-pipes {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  width: max-content;
  padding-top: 12px;
  padding-bottom: 12px;
  touch-action: none;
}

/* ── Individual pipe (natural / white note) ── */
.pipe {
  position: relative;
  flex-shrink: 0;
  background: linear-gradient(180deg, #d4b07a 0%, #b08840 55%, #8a6420 100%);
  border: 1px solid #6b4a1a;
  border-bottom: 4px solid #3e2608;
  border-radius: 4px 4px 6px 6px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.07s, box-shadow 0.07s, transform 0.07s;
  box-sizing: border-box;
}

/* Bamboo node ring — upper third */
.pipe::after {
  content: '';
  position: absolute;
  left: -1px; right: -1px;
  bottom: 60%;
  height: 3px;
  background: rgba(0,0,0,0.12);
  border-radius: 2px;
  pointer-events: none;
}

/* Binding wrap — removed */

.pipe.playing {
  background: linear-gradient(180deg, #ffd878 0%, #e8a020 55%, #c07010 100%);
  border-color: #f0c030;
  box-shadow: 0 0 14px rgba(240,180,30,0.55), inset 0 0 8px rgba(255,220,80,0.18);
  transform: translateY(2px) scaleY(0.987);
}

/* ── Accidental pipes (sharps/flats) — darker bamboo ── */
.pipe.black-pipe {
  background: linear-gradient(180deg, #4a3018 0%, #2e1c08 55%, #1e1004 100%);
  border-color: #150a02;
  border-bottom-color: #0a0500;
}
.pipe.black-pipe.playing {
  background: linear-gradient(180deg, #8a6030 0%, #6a4018 55%, #4a2808 100%);
  border-color: #c09030;
  box-shadow: 0 0 12px rgba(200,140,30,0.45);
  transform: translateY(2px) scaleY(0.987);
}

/* ── Pipe labels ── */
.pipe-lbl {
  position: absolute;
  bottom: 6px;
  left: 0; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.lbl-note { font-size: 9px;  font-weight: 700; line-height: 1.1; }
.lbl-kb {
  font-size: 7px;
  font-weight: 600;
  color: rgba(255,220,140,0.7);
  margin-top: 1px;
  letter-spacing: 0.02em;
}

/* Hide keyboard shortcuts on mobile */
@media (max-width: 639px) {
  .lbl-kb { display: none; }
}

.pipe .lbl-note      { color: rgba(255,240,200,0.88); }

/* ── Breath ripple ── */
.breath-ripple {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 50;
  border: 2px solid rgba(240,180,40,0.55);
  animation: breathRipple 0.42s ease-out forwards;
}
@keyframes breathRipple {
  from { opacity: 0.65; transform: scale(0.7); }
  to   { opacity: 0;    transform: scale(2.2); }
}

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

/* Hide hover toggle on mobile */
@media (max-width: 639px) {
  .hover-toggle { display: none !important; }
}
