/* 지판 음이름 페이지 (지판 자체의 모양은 board.css) */

/* ---------- 음 찾기 ---------- */

.finder {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.finder__title {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.finder__chips {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 44px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}

.chip small {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.75;
}

.chip.is-accidental {
  background: #2b221c;
  border-color: #2b221c;
  color: #eee5d8;
}

@media (hover: hover) {
  .chip:hover {
    border-color: var(--accent);
  }
}

.chip[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

/* ---------- 지판 강조 ---------- */

/* 자연음만 보기: 변화음은 감추되 눌러 볼 수는 있다 */
.cell.is-hidden .note {
  visibility: hidden;
}

/* 음을 강조하면 나머지는 흐리게 */
.fretboard.has-highlight .cell:not(.is-match) .note {
  opacity: 0.3;
}

.cell.is-match {
  --note-bg: var(--accent);
  --note-fg: var(--on-accent);
}

.cell.is-match .note {
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.55), 0 1px 3px rgba(0, 0, 0, 0.45);
}

/* 누른 음과 높이까지 같은 음 */
.cell.is-unison .note {
  box-shadow: 0 0 0 3px #fff, 0 0 10px rgba(249, 115, 22, 0.55);
}

.cell.is-selected .note {
  transform: scale(1.2);
  box-shadow: 0 0 0 3px #fff, 0 0 16px 4px rgba(249, 115, 22, 0.75);
}

.legend__swatch .is-match {
  background: var(--accent);
}

.legend__swatch .is-unison {
  background: var(--accent);
  box-shadow: 0 0 0 2px #fff;
}

/* ---------- 정보 ---------- */

.info {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 16px 20px;
  min-height: 112px;
}

.info__empty {
  grid-column: 1 / -1;
  align-self: center;
  color: var(--text-muted);
}

.info__badge {
  display: grid;
  place-items: center;
  min-width: 64px;
  height: 64px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.info__body {
  min-width: 0;
}

.info__name {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
}

.info__solfege {
  margin-left: 2px;
  color: var(--text-muted);
  font-size: 18px;
}

.info__alt {
  margin-left: 6px;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 700;
}

.info__list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 12px 0 0;
}

.info__list > div {
  display: contents;
}

.info__list dt {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.info__list dd {
  margin: 0;
  font-weight: 700;
}

.info__foot {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------- 작은 화면 ---------- */

@media (max-width: 640px) {
  .finder {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .finder__chips {
    display: grid;
    grid-row: 2;
    grid-column: 1 / -1;
    grid-template-columns: repeat(6, 1fr);
  }

  .finder .btn {
    grid-row: 1;
    grid-column: 2;
  }

  .chip {
    flex-direction: column;
    gap: 0;
    min-width: 0;
    height: 38px;
    padding: 0 4px;
    line-height: 1.15;
  }

  .info {
    gap: 12px 14px;
  }

  .info__badge {
    min-width: 52px;
    height: 52px;
    font-size: 20px;
  }

  .info__name {
    font-size: 19px;
  }
}
