/* ═══════════════════════════════════════════════════════════
   Guitar Scale Practice Plugin — guitar-app.css  v1.12.3
   모바일 퍼스트, 터치 최적화
═══════════════════════════════════════════════════════════ */

/* ── 리셋 & 기본 ─────────────────────────────────────────── */
.gsp-wrap *, .gsp-wrap *::before, .gsp-wrap *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
.gsp-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #1a1a1a;
  background: #ffffff;
  max-width: 680px;
  margin: 0 auto;
  padding: 12px;
}
/* ── 카드 ────────────────────────────────────────────────── */
.gsp-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
/* ── 탭 네비 ─────────────────────────────────────────────── */
.gsp-nav {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 14px;
}
.gsp-nav-btn {
  flex: 1;
  padding: 10px 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #888;
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
  touch-action: manipulation;
}
.gsp-nav-btn.active {
  /* 파란 글자만으로는 어두운 테마/강제 다크모드에서 대비 부족
     → 배경까지 채운 필 형태로 어떤 배경에서도 가독성 보장 */
  background: #1a6fb5;
  color: #ffffff;
  border-radius: 9px 9px 0 0;
  border-bottom-color: #1a6fb5;
}
/* ── 탭 패널 ─────────────────────────────────────────────── */
.gsp-tab { display: none; }
.gsp-tab.show { display: block; }

/* ── 공통 유틸 ───────────────────────────────────────────── */
.gsp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.gsp-mb8  { margin-bottom: 8px; }

/* ── 줄 선택 방식 튜너: 줄 버튼 ── */
.gsp-tuner-strings {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-bottom: 12px;
}
.gsp-tuner-str-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 7px 0 6px;
  width: 54px;
  line-height: 1.15;
}
.gsp-tuner-str-btn .gsp-tstr-num  { font-size: 11px; font-weight: 600; opacity: .75; }
.gsp-tuner-str-btn .gsp-tstr-note { font-size: 17px; font-weight: 800; }
.gsp-tuner-str-btn .gsp-tstr-hz   { font-size: 9px;  opacity: .6; }
.gsp-tuner-str-btn.active .gsp-tstr-num,
.gsp-tuner-str-btn.active .gsp-tstr-hz { opacity: .85; }
@media (max-width: 480px) {
  .gsp-tuner-str-btn { width: 48px; padding: 6px 0 5px; }
  .gsp-tuner-str-btn .gsp-tstr-note { font-size: 15px; }
}

/* ── 프렛 창 이동 화살표 (지판 아래) ── */
.gsp-fret-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 6px 0 10px;
}
.gsp-fret-nav .gsp-btn {
  padding: 4px 16px;
  min-height: 30px;
  font-size: 13px;
  line-height: 1;
}
.gsp-fret-nav .gsp-btn:disabled {
  opacity: .35;
  cursor: default;
  pointer-events: none;
}
.gsp-fret-range {
  font-size: 13px;
  font-weight: 700;
  color: #444;
  min-width: 64px;
  text-align: center;
}
.gsp-mb10 { margin-bottom: 10px; }
.gsp-mb12 { margin-bottom: 12px; }
.gsp-row-label {
  font-size: 12px;
  color: #888;
  min-width: 40px;
  flex-shrink: 0;
}
.gsp-sec-label {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ── 버튼 ────────────────────────────────────────────────── */
.gsp-btn-group { display: flex; flex-wrap: wrap; gap: 5px; }
.gsp-btn {
  padding: 7px 13px;
  font-size: 13px;
  border: 1.5px solid #bbb;
  border-radius: 8px;
  background: #f5f5f5;       /* 기본 배경: 연회색 */
  color: #222;               /* 기본 글자: 진한 색 */
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  min-height: 36px;
  font-weight: 500;
}
.gsp-btn:hover  { background: #e8e8e8; border-color: #999; }
.gsp-btn:active { background: #ddd;    border-color: #888; }

/* ── 튜너 시작/정지 버튼: 상태별 고대비 전용 스타일 ──
   테마 간섭(밝은 배경+흰 글씨)을 원천 차단하기 위해
   배경·글자색을 모두 명시하고 상태(data-active)로 구분 */
#gsp-tuner-btn {
  background: #1a6fb5 !important;
  border-color: #1a6fb5 !important;
  color: #ffffff !important;
  font-weight: 700;
}
#gsp-tuner-btn:hover  { background: #15598f !important; border-color: #15598f !important; }
#gsp-tuner-btn:active { background: #124d7c !important; border-color: #124d7c !important; color: #ffffff !important; }
#gsp-tuner-btn[data-active="1"] {
  background: #c0392b !important;
  border-color: #c0392b !important;
  color: #ffffff !important;
}
#gsp-tuner-btn[data-active="1"]:hover  { background: #a93226 !important; border-color: #a93226 !important; }
#gsp-tuner-btn[data-active="1"]:active { background: #922b21 !important; border-color: #922b21 !important; color: #ffffff !important; }

/* 선택된(active) 버튼: 파란 배경 + 흰 글씨 — 명확한 대비 */
.gsp-btn.active {
  background: #1a6fb5;
  border-color: #1a6fb5;
  color: #ffffff;
  font-weight: 600;
}
.gsp-btn.gsp-static {
  cursor: default;
  pointer-events: none;
  background: #f0f0f0;
  color: #555;
}

/* 다크모드 버튼 */
/* ── 프렛보드 캔버스 ─────────────────────────────────────── */
#gsp-fretboard {
  width: 100%;
  display: block;
  border-radius: 8px;
  margin-bottom: 6px;
  touch-action: pan-y;
}

/* ── 범례 ────────────────────────────────────────────────── */
.gsp-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.gsp-legend-item {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: #888;
}
.gsp-legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

/* ── 색상 커스터마이저 ───────────────────────────────────── */
.gsp-color-card {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}
.gsp-degree-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.gsp-degree-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 10px;
  border: 1.5px solid #bbb;
  border-radius: 8px;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 12px;
  min-height: 36px;
  touch-action: manipulation;
  color: #222;
  font-weight: 500;
}
.gsp-degree-chip:hover { background: #e8e8e8; }
.gsp-degree-chip .gsp-swatch {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.2); flex-shrink: 0;
}
.gsp-color-picker {
  display: none;
  margin-top: 8px;
  padding: 10px;
  background: #f8f8f8;
  border-radius: 10px;
  border: 1px solid #eee;
}
.gsp-color-picker.open { display: block; }
.gsp-picker-title { font-size: 12px; color: #888; }
.gsp-picker-title span { font-weight: 600; color: #1a1a1a; }
.gsp-color-grid { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.gsp-color-swatch {
  width: 26px; height: 26px; border-radius: 50%;
  cursor: pointer; border: 2px solid transparent;
  touch-action: manipulation;
}
.gsp-color-swatch:hover { border-color: #aaa; }
.gsp-color-swatch.selected { border-color: #1a1a1a; }
/* ── 메트로놈 섹션 ───────────────────────────────────────── */
.gsp-metro-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f0f0f0;
}
.gsp-bpm-display {
  font-size: 42px;
  font-weight: 700;
  text-align: center;
  color: #1a1a1a;
  line-height: 1;
}
.gsp-bpm-unit {
  font-size: 11px;
  color: #999;
  text-align: center;
  margin-bottom: 4px;
}
.gsp-wrap input[type="range"] {
  flex: 1;
  min-width: 60px;
  height: 4px;
  accent-color: #1a6fb5;
  cursor: pointer;
}

/* ── 서브디비전 카드 ─────────────────────────────────────── */
.gsp-sub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
@media (max-width: 400px) {
  .gsp-sub-grid { grid-template-columns: repeat(2, 1fr); }
}
.gsp-sub-card {
  padding: 8px 10px;
  border: 1.5px solid #bbb;
  border-radius: 10px;
  cursor: pointer;
  background: #f5f5f5;
  touch-action: manipulation;
  transition: border-color .12s, background .12s;
  min-height: 56px;
}
.gsp-sub-card:hover { border-color: #1a6fb5; background: #eef4fb; }
.gsp-sub-card.active {
  border-color: #1a6fb5;
  background: #ddeaf8;
}
.gsp-sub-title {
  font-size: 12px; font-weight: 600; color: #1a1a1a;
}
.gsp-sub-desc { font-size: 10px; color: #888; margin-top: 2px; }
.gsp-sub-card.active .gsp-sub-title { color: #1a6fb5; }
/* ── 한 줄 비트 트랙 ─────────────────────────────────────── */
.gsp-beat-row-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 8px;
}
.gsp-beat-track {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
}
.gsp-beat-group { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.gsp-beat-sep   { width: 7px; height: 1px; background: #ddd; flex-shrink: 0; }
.gsp-dot {
  border-radius: 50%;
  flex-shrink: 0;
  transition: background .05s, transform .05s, box-shadow .05s;
  border: 1.5px solid #bbb;
  background: #e8e8e8;
}
.gsp-dot.main { width: 22px; height: 22px; }
.gsp-dot.sub  { width: 10px; height: 10px; }
/* 모든 박 동일 색상으로 표시 (강약 구분 없음) */
.gsp-dot.hit     { background: #1a6fb5 !important; border-color: #1a6fb5 !important; transform: scale(1.12); }
.gsp-dot.sub-hit { background: #1a6fb5 !important; border-color: #1a6fb5 !important; transform: scale(1.12); }

/* ── 메트로놈 컨트롤 버튼 ────────────────────────────────── */
.gsp-metro-ctrl { display: flex; gap: 8px; margin-top: 10px; }
.gsp-tap-btn {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid #bbb;
  border-radius: 10px;
  background: #f5f5f5;
  color: #222;
  cursor: pointer;
  touch-action: manipulation;
  min-height: 44px;
  transition: background .12s;
}
.gsp-tap-btn:active { background: #ddd; }
.gsp-metro-start {
  flex: 1;
  padding: 10px;
  font-size: 15px;
  font-weight: 700;
  border: 1.5px solid #bbb;
  border-radius: 10px;
  background: #f5f5f5;
  color: #222;
  cursor: pointer;
  touch-action: manipulation;
  min-height: 44px;
  transition: background .12s, color .12s, border-color .12s;
}
.gsp-metro-start.running {
  background: #1a6fb5;
  border-color: #1a6fb5;
  color: #fff;
}
/* ── 튜너 ────────────────────────────────────────────────── */
.gsp-tuner-note {
  font-size: 64px;
  font-weight: 700;
  text-align: center;
  line-height: 1;
  margin-bottom: 4px;
  color: #1a1a1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 78px;
}
.gsp-tuner-note .gsp-tnote-main { line-height: 1; }
.gsp-tuner-note .gsp-tnote-main sub {
  font-size: 0.4em;
  opacity: 0.6;
  vertical-align: baseline;
}
.gsp-tuner-note .gsp-tnote-str {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.55;
  line-height: 1;
}
.gsp-tuner-cent {
  font-size: 14px;
  text-align: center;
  color: #888;
  margin-bottom: 8px;
  min-height: 20px;
}
.gsp-tuner-bar {
  position: relative;
  height: 10px;
  background: #ebebeb;
  border-radius: 5px;
  margin: 10px 0;
}
.gsp-tuner-center {
  position: absolute;
  left: 50%; top: -4px;
  width: 2px; height: 18px;
  background: #1D9E75;
  transform: translateX(-50%);
  border-radius: 1px;
}
.gsp-tuner-needle {
  position: absolute;
  top: -3px;
  width: 4px; height: 16px;
  background: #E24B4A;
  border-radius: 2px;
  transform: translateX(-50%);
  transition: background .15s;
}
.gsp-tuner-cents-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #aaa;
  margin-bottom: 14px;
}
.gsp-green { color: #1D9E75; font-weight: 600; }

/* ── 모바일 반응형 ───────────────────────────────────────── */
@media (max-width: 480px) {
  .gsp-wrap        { padding: 8px; }
  .gsp-card        { padding: 12px 12px; }
  .gsp-bpm-display { font-size: 36px; }
  .gsp-tuner-note  { font-size: 52px; min-height: 66px; }
  .gsp-tuner-note .gsp-tnote-str { font-size: 13px; }
  .gsp-btn         { padding: 7px 10px; font-size: 12px; }
  .gsp-nav-btn     { font-size: 13px; padding: 9px 6px; }
  .gsp-dot.main    { width: 20px; height: 20px; }
  .gsp-dot.sub     { width: 9px;  height: 9px; }
}
@media (max-width: 360px) {
  .gsp-btn { padding: 6px 8px; font-size: 11px; }
}


/* ── 튜너 개선 (v1.0.3) ─────────────────────────────────── */
/* 목표음 표시 */
.gsp-tuner-target {
  text-align: center;
  font-size: 14px;
  color: #888;
  margin-bottom: 6px;
}
.gsp-tuner-target strong {
  font-size: 18px;
  color: #1a6fb5;
  margin: 0 4px;
}
.gsp-target-freq {
  font-size: 12px;
  color: #999;
}
/* 게이지 정확 구간(±5¢) 음영 */
.gsp-tuner-bar { position: relative; }
.gsp-tuner-zone-ok {
  position: absolute;
  left: 45%;
  width: 10%;
  top: 0; bottom: 0;
  background: rgba(29,158,117,.18);
  border-radius: 2px;
}

/* 줄 선택 그리드 */
.gsp-string-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
@media (max-width: 400px) {
  .gsp-string-grid { grid-template-columns: repeat(2, 1fr); }
}
.gsp-string-cell {
  display: flex;
  align-items: stretch;
  border: 1.5px solid #bbb;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f5f5;
  transition: border-color .12s, background .12s;
}
.gsp-string-cell.active {
  border-color: #1a6fb5;
  background: #ddeaf8;
}
.gsp-string-main {
  flex: 1;
  text-align: center;
  padding: 6px 2px;
  cursor: pointer;
  touch-action: manipulation;
}
.gsp-string-num {
  font-size: 10px;
  color: #999;
}
.gsp-string-note {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}
.gsp-string-cell.active .gsp-string-note { color: #1a6fb5; }
.gsp-string-minus, .gsp-string-plus {
  width: 28px;
  border: none;
  background: rgba(0,0,0,.04);
  color: #555;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}
.gsp-string-minus:active, .gsp-string-plus:active {
  background: rgba(0,0,0,.12);
}
/* A4 기준 표시 */
.gsp-a4-display {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  min-width: 110px;
  text-align: center;
}
/* ── 표준 튜닝 텍스트 표기 (6번줄→1번줄) ─────────────────── */
.gsp-tuning-ref {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
@media (max-width: 400px) {
  .gsp-tuning-ref { grid-template-columns: repeat(3, 1fr); }
}
.gsp-tuning-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  background: #f7f7f7;
}
.gsp-tuning-str  { font-size: 10px; color: #888; }
.gsp-tuning-note { font-size: 17px; font-weight: 700; color: #1a6fb5; }
.gsp-tuning-hz   { font-size: 9px; color: #aaa; }
/* ══════════════════════════════════════════════════════════
   코드/폼 탭 추가 스타일  v1.3.0
══════════════════════════════════════════════════════════ */

/* 탭 3개 대응 */
.gsp-nav-btn { font-size: 13px; }

/* ── 카테고리 버튼 행 ─────────────────────────────────── */
.gsp-chord-cat-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.gsp-chord-cat-btn {
  padding: 5px 11px;
  font-size: 12px;
  border: 1.5px solid #bbb;
  border-radius: 7px;
  background: #f5f5f5;
  color: #444;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .12s, border-color .12s;
  font-weight: 500;
}
.gsp-chord-cat-btn:hover { background: #e8e8e8; }
.gsp-chord-cat-btn.active {
  background: #eef4fb;
  border-color: #1a6fb5;
  color: #1a6fb5;
}
/* ── 코드 타입 버튼 행 ────────────────────────────────── */
.gsp-chord-type-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.gsp-chord-type-btn {
  padding: 5px 12px;
  font-size: 12px;
  border: 1.5px solid #bbb;
  border-radius: 7px;
  background: #f5f5f5;
  color: #222;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .12s, border-color .12s;
  font-weight: 500;
}
.gsp-chord-type-btn:hover { background: #e8e8e8; }
.gsp-chord-type-btn.active {
  border-width: 2px;
  font-weight: 700;
}
/* ── 코드 정보 바 ─────────────────────────────────────── */
.gsp-chord-info {
  font-size: 12px;
  color: #666;
  background: #f7f7f7;
  border-radius: 7px;
  padding: 7px 10px;
  margin-bottom: 8px;
  line-height: 1.6;
}
.gsp-chord-info strong { color: #1a1a1a; font-weight: 600; }

/* ── 코드폼 그리드 (현 세트별 한 줄씩) ──────────────────── */
.gsp-chord-form-grid {
  margin-top: 6px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
/* 줄 구성 라벨 (세트 헤더) */
.gsp-cform-row-label {
  margin: 10px 0 5px;
}
.gsp-cform-row-label:first-child { margin-top: 2px; }
/* 줄 세트 필터 탭 (칩) */
.gsp-set-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 2px 0 8px;
}
.gsp-set-tab {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border: 1.5px solid #ddd;
  border-radius: 14px;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.gsp-set-tab:hover { border-color: #aaa; }
.gsp-set-tab.active {
  color: #fff;
}
.gsp-set-tab.active:not([style]) {
  background: #444;
  border-color: #444;
  color: #fff;
}
.gsp-cform-set-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 5px;
}
/* 한 줄: 최대 4개 균등 배치 */
.gsp-cform-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 4px;
}
/* 카드 (확대) */
.gsp-chord-form-card {
  border: 1.5px solid #ddd;
  border-radius: 9px;
  padding: 8px 5px 6px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  transition: border-color .12s, background .12s;
  touch-action: manipulation;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}
.gsp-chord-form-card:hover { border-color: #aaa; }
.gsp-chord-form-card.active { border-width: 2px; }
.gsp-chord-form-card canvas {
  width: 100%;
  max-width: 108px;
  height: auto;
  display: block;
}
.gsp-cform-inv {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a1a;
  margin-top: 5px;
  line-height: 1.3;
  max-width: 100%;
}
/* 슬래시 코드 (메인 · 크게) */
.gsp-cform-slash {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 5px;
  line-height: 1.25;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 도수 병기 (1/5) — 슬래시 코드에 붙는 보조 수치 */
.gsp-cform-degpair {
  font-size: 11px;
  font-weight: 600;
  color: #1a6fb5;
}
/* 전위 이름 (보조 · 작게) */
.gsp-cform-inv-sub {
  font-size: 10px;
  font-weight: 500;
  color: #999;
  margin-top: 1px;
  line-height: 1.2;
  max-width: 100%;
}
.gsp-cform-voices {
  font-size: 10px;
  font-weight: 500;
  color: #555;
  margin-top: 2px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 모바일: 좁은 화면에서는 한 줄에 2개씩 (카드가 너무 작아지지 않게) */
@media (max-width: 480px) {
  /* 컨트롤 행 간격 축소 (두 줄 분리로 늘어난 세로 공간 상쇄) */
  .gsp-row { margin-bottom: 6px; }
  .gsp-cform-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  .gsp-chord-form-card { padding: 7px 4px 6px; border-radius: 8px; }
  .gsp-cform-inv { font-size: 11px; margin-top: 4px; }
  .gsp-cform-slash { font-size: 12px; margin-top: 4px; }
  .gsp-cform-degpair { font-size: 10px; }
  .gsp-cform-inv-sub { font-size: 9px; }
  .gsp-cform-voices { font-size: 9px; }
  .gsp-chord-form-card canvas { max-width: 130px; }
}

/* ── 코드 프렛보드 캔버스 ─────────────────────────────── */
#gsp-chord-fretboard {
  width: 100%;
  display: block;
  border-radius: 8px;
  margin-bottom: 6px;
  touch-action: pan-y;
}


/* ══ 언어 슬라이드 토글  (KO ⟷ EN) ════════════════════════ */
.gsp-lang-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.gsp-lang-toggle {
  position: relative;
  display: block;
  width: 116px;
  height: 32px;
  padding: 3px;
  margin: 0;
  border: 1.5px solid #cbd5e0;
  border-radius: 999px;
  background: #eef2f7;
  cursor: pointer;
  overflow: hidden;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  font-family: inherit;
}
/* 슬라이딩 노브 — 절대위치, 너비 절반 */
.gsp-lang-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 55px;
  height: 24px;
  border-radius: 999px;
  background: #1a6fb5;
  transition: transform .22s cubic-bezier(.4,0,.2,1), background .22s;
  z-index: 1;
}
/* 라벨 두 개 — 절대위치로 좌우 고정 */
.gsp-lang-opt {
  position: absolute;
  top: 0;
  width: 55px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
  transition: color .2s;
  pointer-events: none;
  box-sizing: border-box;
}
.gsp-lang-opt.gsp-lang-ko { left: 3px; }
.gsp-lang-opt.gsp-lang-en { right: 3px; }
/* 기본(한국어 활성): 노브 왼쪽 */
.gsp-lang-toggle .gsp-lang-ko { color: #fff; }
.gsp-lang-toggle .gsp-lang-en { color: #64748b; }
/* 영어 활성: 노브 오른쪽으로 이동 */
.gsp-lang-toggle.is-en .gsp-lang-knob {
  transform: translateX(55px);
  background: #2a9d6f;
}
.gsp-lang-toggle.is-en .gsp-lang-ko { color: #64748b; }
.gsp-lang-toggle.is-en .gsp-lang-en { color: #fff; }

/* ── 왼손잡이 토글 버튼 ──────────────────────────────────── */
.gsp-lefty-btn {
  border-style: dashed;
  color: #888;
}
.gsp-lefty-btn.active {
  background: #fff3e0;
  border-color: #e67e22;
  border-style: solid;
  color: #c0392b;
  font-weight: 600;
}

/* ══ 악기 선택 바 ════════════════════════════════════════ */
.gsp-inst-bar {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}
.gsp-inst-btn {
  flex: 1;
  padding: 7px 4px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid #cbd5e0;
  border-radius: 7px;
  background: #f0f3f7;
  color: #555;
  cursor: pointer;
  touch-action: manipulation;
  transition: all .12s;
}
.gsp-inst-btn:hover { background: #e6ebf1; }
.gsp-inst-btn.active {
  background: #1a6fb5;
  border-color: #1a6fb5;
  color: #fff;
}

/* ── 아르페지오 탭 ───────────────────────────────────────── */
#gsp-arp-fretboard {
  width: 100%;
  display: block;
  border-radius: 8px;
  margin-bottom: 6px;
  touch-action: pan-y;
}
.gsp-arp-hint {
  font-size: 12px;
  color: #888;
  background: #f7f7f7;
  border-radius: 7px;
  padding: 8px 12px;
  margin-top: 10px;
  line-height: 1.5;
}
