/* metronome.css */
.page {
    padding: 24px 0 48px;
  }
  
  .toolHeader {
    max-width: 1000px;
    margin: 0 auto 18px;
    padding: 0 16px;
  }
  
  .toolSub {
    margin-top: 8px;
    opacity: 0.9;
  }
  
  .toolCard {
    max-width: 1000px;
    margin: 14px auto;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.15);
  }
  
  .row {
    display: flex;
    align-items: center;
    gap: 14px;
  }
  
  .rowWrap {
    flex-wrap: wrap;
  }
  
  .control {
    min-width: 180px;
    flex: 1;
  }
  
  .control.wide {
    flex: 1 1 520px;
    min-width: 280px;
  }
  
  .label {
    display: block;
    margin-bottom: 8px;
  }
  
  .select,
  .input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.22);
    color: rgba(234,240,255,.92);
    outline: none;
  }
  
  .range {
    width: 100%;
  }
  
  .hint {
    margin-top: 8px;
    opacity: 0.85;
    font-size: 0.95rem;
  }
  
  .smallNote {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-left: 8px;
  }
  
  .bpmRow {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
  }
  
  .bpmRow .input {
    max-width: 120px;
  }
  
  .actions {
    margin-top: 10px;
  }
  
  .status {
    flex: 1;
    min-width: 260px;
  }
  
  .statusLine {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
  }
  
  .pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.18);
    font-size: 0.92rem;
  }
  
  .chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .chipBeat {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(121, 110, 110, 0.12);
    background: rgba(111, 135, 228, 0.38);
    font-weight: 700;
    user-select: none;
  }
  
  .chipBeat.active {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    border-color: rgba(8, 243, 63, 0.28);
    background-color: rgba(32, 66, 201, 0.38);;
  }
  
  .btn2 {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(0,0,0,0.2);
    color: rgba(234,240,255,.92);
    cursor: pointer;
  }
  
  .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
  
  .btnPrimary {
    background: rgba(20, 201, 36, 0.48);
  }
  
  .btnDanger {
    background: rgba(245, 16, 16, 0.48);
  }
  
  .btnGhost {
    background: rgba(37, 51, 131, 0.12);
  }
  /* =========================
   NOTE TRAINER - PIANO UI
   ========================= */

.pianoKeyboard {
  width: 100%;
}

#guessArea {
  position: relative;
  width: 100%;
  max-width: 840px;
  min-height: 220px;
  margin: 0 auto;
  padding: 18px 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.08)),
    rgba(0,0,0,0.18);
  overflow-x: auto;
  overflow-y: hidden;
}

.pianoInner {
  position: relative;
  height: 185px;
  min-width: 448px;
}

.pianoKey {
  position: absolute;
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 0 0 10px 10px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: transform 0.08s ease, box-shadow 0.12s ease, background 0.12s ease;
  font-weight: 700;
  padding: 0;
}

.pianoKey span {
  pointer-events: none;
  margin-bottom: 10px;
  font-size: 0.82rem;
}

.pianoKey.white {
  height: 180px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f2f2 72%, #dddddd 100%);
  color: #222;
  z-index: 1;
  box-shadow:
    inset 0 -6px 0 rgba(0,0,0,0.08),
    0 8px 16px rgba(0,0,0,0.14);
}

.pianoKey.black {
  height: 110px;
  background: linear-gradient(180deg, #3a3a3a 0%, #111 100%);
  color: rgba(255,255,255,0.95);
  z-index: 2;
  border-color: rgba(255,255,255,0.05);
  box-shadow:
    inset 0 -4px 0 rgba(255,255,255,0.05),
    0 8px 14px rgba(0,0,0,0.35);
}

.pianoKey:hover {
  transform: translateY(1px);
}

.pianoKey:active {
  transform: translateY(3px);
}

.pianoKey.selected.white {
  background: linear-gradient(180deg, #e8f2ff 0%, #d7e7ff 100%);
}

.pianoKey.selected.black {
  background: linear-gradient(180deg, #49618d 0%, #22304b 100%);
}

.pianoKey.correct.white {
  background: linear-gradient(180deg, #e8ffe8 0%, #caf6ce 100%);
}

.pianoKey.correct.black {
  background: linear-gradient(180deg, #347548 0%, #163a1f 100%);
}

.pianoKey.wrong.white {
  background: linear-gradient(180deg, #ffe8e8 0%, #ffd1d1 100%);
}

.pianoKey.wrong.black {
  background: linear-gradient(180deg, #8a3b3b 0%, #471818 100%);
}

.pianoKey.answer {
  outline: 3px solid rgba(255, 214, 10, 0.95);
  outline-offset: -3px;
}

#noteDisplay {
  min-width: 90px;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  padding: 10px 16px;
}

@media (max-width: 768px) {
  #guessArea {
    padding: 14px 10px 10px;
    min-height: 185px;
  }

  .pianoInner {
    height: 155px;
    min-width: 350px;
  }

  .pianoKey.white {
    height: 150px;
  }

  .pianoKey.black {
    height: 92px;
  }

  .pianoKey span {
    font-size: 0.7rem;
    margin-bottom: 8px;
  }
}
/* chord app  */
.chordOption {
  min-width: 140px;
  text-align: center;
}

.chordOption.correct {
  background: rgba(20, 201, 36, 0.48);
}

.chordOption.wrong {
  background: rgba(245, 16, 16, 0.48);
}

.chordOption.answer {
  outline: 2px solid rgba(255, 214, 10, 0.95);
}