/* fretboard.css — 指板ビジュアライザー共通スタイル */

.fretboard {
  position: relative;
  background: linear-gradient(180deg, #d4a056 0%, #c4903a 30%, #b8842e 60%, #a67428 100%);
  border-radius: 6px;
  padding: 0;
  border: 3px solid #5a3a1a;
}

/* フレット番号行 */
.fret-numbers {
  display: flex;
  height: 28px;
  background: rgba(0,0,0,0.15);
  border-bottom: 2px solid #5a3a1a;
}

.fret-number {
  width: 64px;
  min-width: 64px;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  line-height: 28px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.fret-number:first-child {
  width: 48px;
  min-width: 48px;
  background: rgba(0,0,0,0.1);
}

/* ポジションマーク行 */
.position-marks {
  display: flex;
  height: 20px;
  background: rgba(0,0,0,0.05);
}

.position-mark-cell {
  width: 64px;
  min-width: 64px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.position-mark-cell:first-child {
  width: 48px;
  min-width: 48px;
}

.dot {
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  opacity: 0.7;
}

/* 弦の行 */
.string-row {
  display: flex;
  position: relative;
  height: 40px;
}

.string-row::after {
  content: '';
  position: absolute;
  left: 48px;
  right: 0;
  top: 50%;
  height: var(--string-thickness, 1px);
  background: linear-gradient(90deg, #ddd 0%, #ccc 50%, #bbb 100%);
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
  box-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

.string-row:nth-child(1)::after { --string-thickness: 1px; background: linear-gradient(90deg, #eee, #ddd); }
.string-row:nth-child(2)::after { --string-thickness: 1.5px; }
.string-row:nth-child(3)::after { --string-thickness: 2px; }
.string-row:nth-child(4)::after { --string-thickness: 2.5px; background: linear-gradient(90deg, #c9a045, #b8903a); }
.string-row:nth-child(5)::after { --string-thickness: 3px; background: linear-gradient(90deg, #c9a045, #b8903a); }
.string-row:nth-child(6)::after { --string-thickness: 3.5px; background: linear-gradient(90deg, #c9a045, #b8903a); }

/* 弦間の区切り */
.string-row + .string-row {
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* 各セル（フレット） */
.fret-cell {
  width: 64px;
  min-width: 64px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
  border-right: 2px solid #8B7355;
}

/* ナット（0フレット） */
.fret-cell:first-child {
  width: 48px;
  min-width: 48px;
  background: rgba(0,0,0,0.08);
  border-right: 4px solid #222;
}

/* 音名バッジ */
.note-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 10px;
  font-weight: bold;
  cursor: default;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
  z-index: 3;
}

.note-badge:hover {
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(255,255,255,0.5);
}

/* 音名ごとの色 */
.note-C  { background: #e74c3c; color: #fff; }
.note-Cs { background: #c0392b; color: #fff; }
.note-D  { background: #e67e22; color: #fff; }
.note-Ds { background: #d35400; color: #fff; }
.note-E  { background: #f1c40f; color: #333; }
.note-F  { background: #2ecc71; color: #fff; }
.note-Fs { background: #27ae60; color: #fff; }
.note-G  { background: #1abc9c; color: #fff; }
.note-Gs { background: #16a085; color: #fff; }
.note-A  { background: #3498db; color: #fff; }
.note-As { background: #2980b9; color: #fff; }
.note-B  { background: #9b59b6; color: #fff; }

/* インターバル色クラス */
.interval-root {
  background: #e63946 !important;
  color: #fff !important;
  box-shadow: 0 0 8px rgba(230, 57, 70, 0.6);
}

.interval-3rd {
  background: #457b9d !important;
  color: #fff !important;
  box-shadow: 0 0 8px rgba(69, 123, 157, 0.6);
}

.interval-5th {
  background: #2a9d8f !important;
  color: #fff !important;
  box-shadow: 0 0 8px rgba(42, 157, 143, 0.6);
}

.interval-7th {
  background: #e9c46a !important;
  color: #1a1a2e !important;
  box-shadow: 0 0 8px rgba(233, 196, 106, 0.6);
}

/* 非コードトーンのディム */
.note-dimmed {
  opacity: 0.15 !important;
  transform: scale(0.8);
}

.note-dimmed:hover {
  opacity: 0.4 !important;
  transform: scale(1.0);
}
