/*
  Chord Bells: 6 chord cards laid out wide.
*/

.chords-stage {
  align-items: center;
  padding-inline: clamp(12px, 3vw, 32px);
}

.chords-board {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 18px);
  align-content: center;
  justify-content: stretch;
  padding: clamp(8px, 2vh, 18px) 0;
}

.chord-card {
  border: 4px solid var(--chord-color);
  border-radius: 22px;
  background: color-mix(in srgb, var(--chord-color) 14%, #ffffff);
  padding: clamp(6px, 1.4vh, 12px) clamp(8px, 1.4vw, 18px);
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  align-items: center;
  gap: 8px;
  color: #1b233e;
  box-shadow: 0 10px 22px rgba(27, 35, 62, 0.12);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, filter 0.08s ease;
}

.chord-card.is-playing {
  transform: translateY(3px) scale(0.985);
  filter: brightness(1.06);
}

.chord-card-visual {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.chord-card-label {
  font-size: clamp(1rem, 2.6vw, 1.5rem);
  line-height: 1;
  font-weight: 900;
}

.chord-triangle {
  position: relative;
  width: clamp(80px, 12vw, 130px);
  height: clamp(70px, 11vw, 116px);
}

.triangle-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  z-index: 0;
}

.triangle-lines line {
  stroke: #c8d2e5;
  stroke-width: 6;
  stroke-linecap: round;
  opacity: 0.92;
}

.note-bubble {
  position: absolute;
  z-index: 1;
  width: clamp(34px, 5.4vw, 50px);
  height: clamp(34px, 5.4vw, 50px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--note-color);
  font-size: clamp(1rem, 2.4vw, 1.45rem);
  line-height: 1;
  font-weight: 900;
}

.note-bubble-third { left: -4%; top: -8%; }
.note-bubble-root { left: 50%; bottom: -8%; transform: translateX(-50%); }
.note-bubble-fifth { right: -4%; top: -8%; }

/* Portrait fallback: 2 columns x 3 rows (still triggers rotate overlay anyway) */
@media (orientation: portrait) {
  .chords-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
  }
}
