/* 5. Klavyeyi öğrenmek */
.fb-wrap { width: 100%; }

/* klavye üstü ek katman: oktav çizgileri, yarım/tam ses bağları, tab ölçü çizgileri */
.k5-ov { pointer-events: none; }
.k5-link { stroke: rgba(239, 231, 214, .55); stroke-width: 1.6; stroke-linecap: round; }
.k5-link.k5-oct { stroke: var(--root); stroke-width: 2.2; stroke-dasharray: 5 4; opacity: .9; }
.k5-link.k5-two { stroke: var(--root); stroke-width: 1.4; stroke-dasharray: 2 5; opacity: .6; }
.k5-link.k5-y { stroke: var(--seventh); stroke-width: 3; opacity: .85; }
.k5-link.k5-t { stroke: rgba(239, 231, 214, .35); stroke-width: 2; }
.k5-linkt { font: 700 10px var(--f-body); fill: var(--bone); text-anchor: middle; dominant-baseline: central; paint-order: stroke; stroke: var(--wood-2); stroke-width: 3px; stroke-linejoin: round; }
.k5-linkt.k5-oct, .k5-linkt.k5-two { fill: var(--root); font-size: 10.5px; }
.k5-linkt.k5-y { fill: #ffb3b9; }
.k5-barline { stroke: var(--paper-ink); stroke-width: 1.4; opacity: .55; }
.k5-dur { fill: var(--paper-ink); stroke: var(--paper-ink); stroke-width: 1.1; opacity: .7; }
.k5-dur line, .k5-dur path { fill: none; stroke-width: 1.2; }
.k5-dur.hollow ellipse { fill: var(--paper); stroke-width: 1.3; }
.k5-dur circle { stroke: none; }

/* işaret türleri */
.fb .mk.k5-acc { opacity: .5; }
.fb .mk.k5-acc .mk-disc { fill: rgba(239, 231, 214, .22); stroke: rgba(239, 231, 214, .5); }
.fb .mk.k5-acc .mk-t { fill: var(--bone); }
.fb .mk.k5-same { opacity: .8; }
.fb .mk.k5-target .mk-disc { fill: var(--root); stroke: #fff; stroke-width: 2; transform: scale(1.3); }
.fb .mk.k5-target .mk-t { font-size: calc(var(--fs, 12px) * 1.25); }
.fb .mk.k5-cur .mk-disc { fill: var(--root); }
.fb .mk.k5-done .mk-t { fill: var(--f2); }
.fb .mk.k5-out { opacity: .55; }
.fb .mk.k5-off { opacity: .32; }
.fb .mk.k5-ct .mk-disc, .fb .mk.k5-ct .mk-sq { stroke: var(--bone); stroke-width: 3.2; }
.fb .mk.k5-blue .mk-disc { fill: rgba(31, 138, 138, .25); stroke: var(--third); stroke-width: 2; stroke-dasharray: 3 2; }
.fb .mk.k5-blue .mk-t { fill: var(--bone); }
.fb[data-mode="tab"] .mk.k5-done .mk-t { fill: var(--f2); }

/* bilgi satırı */
.k5-info { margin: 0; font-size: .92rem; color: var(--ink-2); min-height: 1.5em; line-height: 1.45; }
.k5-info .k5-big { font-family: var(--f-display); font-weight: 750; font-size: 1.35rem; font-stretch: 85%; color: var(--root-ink); margin-right: 4px; }
.k5-shape { font-weight: 650; color: var(--ink); border-bottom: 3px solid var(--kc); }

/* bir oktavlık nota şeridi */
.k5-strip { display: flex; align-items: center; justify-content: center; gap: 3px; flex-wrap: nowrap; }
.k5-cell {
  border: 0; cursor: pointer; display: grid; place-items: center; font-weight: 700; padding: 0;
  font-family: var(--f-body); color: var(--ink); transition: background .15s, transform .1s;
}
.k5-cell.nat { width: 34px; height: 34px; border-radius: 50%; background: var(--bone); box-shadow: inset 0 0 0 1px var(--line-2); font-size: .82rem; }
.k5-cell.acc { width: 24px; height: 24px; border-radius: 50%; background: var(--surface); color: var(--muted); font-size: .58rem; box-shadow: inset 0 0 0 1px var(--line); }
.k5-cell.on { background: var(--root); color: var(--wood); transform: scale(1.12); }
.k5-gap { width: 2px; }
.k5-half { font-size: .62rem; font-weight: 700; color: var(--seventh); padding: 1px 3px; border-top: 2px solid var(--seventh); margin: 0 1px; line-height: 1; }

/* nota oyunu */
.k5-score { gap: 8px 22px; }
.k5-stat { display: inline-flex; flex-direction: column; line-height: 1; }
.k5-stat small { font-size: .74rem; font-weight: 650; color: var(--muted); margin-bottom: 4px; }
.k5-num { font-family: var(--f-display); font-weight: 800; font-size: 2rem; font-stretch: 80%; font-variant-numeric: tabular-nums; color: var(--ink); display: inline-block; }
.k5-num.pop { animation: k5Pop .28s ease-out; }
@keyframes k5Pop { 50% { transform: scale(1.25); color: var(--f2); } }
.k5-clock.low { color: var(--seventh); }
.k5-best { color: var(--root-ink); }
.k5-ans { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.k5-a {
  min-width: 46px; height: 42px; padding: 0 10px; border-radius: 12px; cursor: pointer;
  font-family: var(--f-mono); font-weight: 600; font-size: .92rem; letter-spacing: -.03em;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink);
  transition: background .12s, border-color .12s, transform .08s;
}
.k5-a.acc { font-size: .72rem; background: var(--surface); color: var(--ink-2); }
.k5-a:hover { border-color: var(--accent); }
.k5-a:active { transform: translateY(1px); }
.k5-a.good { background: var(--f2); color: #fff; border-color: var(--f2); }
.k5-a.bad { background: var(--seventh); color: #fff; border-color: var(--seventh); }
.k5-row { display: flex; align-items: center; gap: 10px; }
.k5-row .spacer { flex: 1; }
.k5-msg { margin: 0; font-size: .92rem; color: var(--ink-2); min-height: 1.4em; }
.k5-msg.good { color: var(--f2); font-weight: 650; }
.k5-msg.bad { color: var(--seventh); font-weight: 600; }
.k5-mic.on { background: var(--accent); color: #fff; }

/* Neşeye Övgü */
.k5-count { font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; color: var(--root-ink); min-width: 1em; }

/* majör gam: adım şeridi */
.k5-steps { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 2px; }
.k5-deg { display: inline-flex; flex-direction: column; align-items: center; min-width: 34px; padding: 4px 4px 3px; border-radius: 10px; transition: background .12s; }
.k5-deg b { font-family: var(--f-display); font-size: 1.15rem; line-height: 1; color: var(--ink); }
.k5-deg small { font-size: .7rem; font-weight: 650; color: var(--muted); }
.k5-deg[data-d="0"] b, .k5-deg[data-d="7"] b { color: var(--root-ink); }
.k5-deg[data-d="2"] b { color: var(--third); } .k5-deg[data-d="4"] b { color: var(--fifth); } .k5-deg[data-d="6"] b { color: var(--seventh); }
.k5-deg.on { background: var(--wood); }
.k5-deg.on b, .k5-deg.on small { color: var(--bone); }
.k5-step { font-size: .72rem; font-weight: 750; padding: 2px 7px; border-radius: 999px; }
.k5-step.t { background: var(--surface); color: var(--ink-2); }
.k5-step.y { background: rgba(200, 67, 79, .14); color: var(--seventh); }

/* pentatonik kutu seçici: her düğme kendi şeklinin renginde bir çizgi taşır */
.k5-boxseg button[style] { box-shadow: inset 0 -3px 0 var(--kc); }
.k5-boxseg button.on[style] { box-shadow: inset 0 -3px 0 var(--kc); }
.k5-shapes { font-size: .8rem; }

/* doğaçlama */
.k5-jamhead { display: flex; align-items: center; gap: 12px 22px; flex-wrap: wrap; }
.k5-now { display: flex; align-items: baseline; gap: 10px; min-width: 10.5em; }
.k5-now .chord { font-size: clamp(2rem, 3.2vw, 2.8rem); font-weight: 700; letter-spacing: -0.05em; line-height: 1; }
.k5-now small { color: var(--muted); font-weight: 600; font-size: .82rem; }
.k5-rn { font-family: var(--f-display); font-weight: 750; color: var(--wood); background: var(--root); font-size: .95rem; padding: 2px 9px; border-radius: 999px; align-self: center; }
.k5-bars { display: grid; grid-template-columns: repeat(4, minmax(52px, 1fr)); gap: 4px; flex: 1; max-width: 400px; }
.k5-bar {
  display: flex; align-items: baseline; justify-content: space-between; gap: 4px; padding: 4px 8px; cursor: pointer;
  border: 0; border-radius: 3px 9px 9px 3px; border-left: 3px solid var(--line-2); background: var(--surface); color: var(--ink);
  transition: background .12s, border-color .12s;
}
.k5-bar small { font-size: .62rem; color: var(--muted); font-weight: 650; }
.k5-bar .chord { font-size: .8rem; }
.k5-bar.on { background: var(--wood); color: var(--bone); border-left-color: var(--root); }
.k5-bar.on small { color: var(--root); }
.k5-ctdot { background: var(--surface-2) !important; box-shadow: inset 0 0 0 2.5px var(--bone), 0 0 0 1px var(--line-2) !important; }

@media (max-width: 520px) {
  .k5-cell.nat { width: 24px; height: 24px; font-size: .7rem; }
  .k5-cell.acc { width: 16px; height: 16px; font-size: 0; }
  .k5-half { font-size: .5rem; padding: 1px 1px; }
  .k5-a { min-width: 40px; height: 40px; padding: 0 6px; }
  .k5-num { font-size: 1.6rem; }
  .k5-bars { max-width: none; flex-basis: 100%; }
}

/* dikey klavyede bölge etiketleri kenardan taşar: gizle */
#pentatonik .fb[data-orient="v"] .rg-lab, #dogaclama .fb[data-orient="v"] .rg-lab, #major-gam .fb[data-orient="v"] .rg-lab { display: none; }
