/* Akor araçları: şarkı araç çubuğu, akor vurgusu, satır düzeni, kayan düğmeler, akor şemaları, ritim/arpej,
   akor cetveli ve transpoze aracı. Renkler temanın değişkenlerinden gelir. */

/* Başlığın sağındaki araç çubuğu düğmesi (eski #song_settings_btn): açıkken × , kapalıyken + */
.song { position: relative; }
.song .song-title { padding-right: 45px; }
.ch-settings-toggle { position: absolute; top: 0; right: 0; z-index: 2; display: flex; padding: 0; border: 0; background: none; color: var(--text, #212529); }
.ch-settings-toggle svg { transform: rotate(45deg); transition: transform 200ms cubic-bezier(.4, 0, .2, 1); }
.ch-settings-toggle.is-closed svg { transform: rotate(0deg); }

/* Araç çubuğu */
.ch-tools { margin: 0 0 1rem; padding: 12px 16px; background: var(--navy, #1e272e); color: #e1e1e1; }
.ch-tools-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.ch-tools button, .ch-tools a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 6px; border: 0; background: none; color: #e1e1e1; font-size: 16px; transition: color .2s, text-shadow .2s; }
.ch-tools button:hover, .ch-tools a:hover { color: #fff; }
.ch-tools .repertoire-tool { margin: 0 0 0 auto; }
.ch-tools .repertoire-tool .save-bookmark { color: #e1e1e1; font-weight: 400; }
.ch-tools .repertoire-tool .save-bookmark:hover { color: #fff; }
@media (max-width: 350px) { .ch-tools .repertoire-tool .title { display: none; } }
.ch-font button { width: 36px; font-weight: 600; font-size: 17px; }
.ch-split { display: none !important; }
@media (min-width: 768px) { .ch-split { display: inline-flex !important; } }
.ch-split.active { color: #fff; text-shadow: 0 0 10px var(--accent, #ffbf00); }
.ch-keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; margin-top: 10px; }
.ch-key { position: relative; width: 48px; min-height: 32px; padding: 0; border: 1px solid var(--accent, #ffbf00); background: #1e1f21; color: #fff; font-size: 14px; font-weight: 600; }
.ch-tools .ch-key { width: 48px; min-height: 32px; padding: 0; border: 1px solid var(--accent, #ffbf00); background: #1e1f21; color: #fff; font-size: 14px; }
.ch-key:hover { filter: brightness(1.15); }
.ch-key.active, .ch-tools .ch-key.active { background: var(--accent, #ffbf00); color: #07151d; }
.ch-key.is-original::after { content: "•"; position: absolute; left: 0; bottom: -3px; width: 100%; font-size: 12px; line-height: 1; text-align: center; }
.ch-tools-chords { margin-top: 6px; text-align: center; }
.ch-tools .ch-chords-toggle { flex-direction: column; gap: 0; font-size: 16px; }
.ch-arrow { width: 10px; height: 10px; margin-top: 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.ch-chords-toggle[aria-expanded="true"] .ch-arrow { transform: rotate(-135deg); margin-top: 8px; }
.ch-tools-panel { margin-top: 10px; text-align: left; }
.ch-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 12px; padding: 4px 4px 4px 12px; border-radius: 10px; background: rgba(255, 255, 255, .04); }
.ch-panel-label { font-size: 13px; color: #c9d1d7; }
.ch-tools-panel .ch-instruments { margin: 0; }
/* Araç çubuğunun genel düğme kuralı (inline-flex) kartlara uygulanmaz: bütün kartlar aynı boyutta, ad üstte. */
.ch-tools-panel .ch-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.ch-tools-panel .ch-grid li { flex: 0 0 104px; }
.ch-tools-panel .ch-card { display: block; width: 100%; min-height: 0; padding: 8px 0; gap: 0; color: #fff; font-size: inherit; }
.ch-tools-panel .ch-card-name { margin-bottom: 4px; font-size: 14px; }
.ch-tools-panel .ch-card-svg { width: 90px; max-width: 90px; }
.ch-tools-panel .ch-chart-links { margin: 10px 4px 0; color: #c9d1d7; }
.ch-tools-panel .ch-chart-links a { display: inline; min-height: 0; padding: 0; color: var(--accent, #ffbf00); font-size: inherit; }

/* Akor vurgusu (ayarlar paneli; songs.css varsayılanı: gri zemin + kalın) */
#song .c { cursor: pointer; }
#song.chord-bg-0 .c { background: none; padding: 0; }
#song.chord-bg-1 .c { background: #e8e296; color: #000; }
#song.chord-bg-2 .c { background: #deb789; color: #000; }
#song.chord-bg-3 .c { background: #b1e493; color: #000; }
#song.chord-bg-4 .c { background: #98d7e4; color: #000; }
#song.chord-bg-5 .c { background: #cc82e2; color: #000; }
#song.chord-bg-6 .c { background: #cd79bb; color: #000; }
#song.chord-color-1 .c { color: #c22922; }
#song.chord-color-2 .c { color: #130ebb; }
#song.chord-color-3 .c { color: #2f9a1e; }
#song.chord-color-4 .c { color: #2a9fbd; }
#song.chord-color-5 .c { color: #8b208c; }
[data-theme="dark"] #song.chord-bg-0.chord-color-2 .c { color: #7c79ff; }
#song.chord-thin .c { font-weight: 400; }
#song.chord-italic .c { font-style: italic; }

/* Satır düzeni: dar ekranda bölme ve iki sütun */
#song.ch-laid { white-space: normal; overflow: visible; }
.song-layout-block { display: block; margin: 0; padding: 0; break-inside: avoid; }
.song-layout-line { display: block; width: max-content; max-width: none; min-height: 1.55em; white-space: pre; }
.song-layout-measure { position: absolute !important; top: 0; left: -100000px; height: auto !important; margin: 0 !important; overflow: visible !important; visibility: hidden !important; pointer-events: none !important; }
.song-layout-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; width: 100%; }
.song-layout-column { display: block; min-width: 0; }

/* Kayan düğmeler: ton +/− ve otomatik kaydırma */
/* Yükseklik 0, yapışkan: şarkı boyunca ekranın altında, ana sütunun sağında durur (eski sitedeki gibi). */
.ch-float { position: sticky; bottom: 16px; z-index: 90; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-end; gap: 10px; height: 0; pointer-events: none; }
.ch-float[hidden] { display: none; }
/* Dar ekranda kayan ton/kaydırma düğmeleri (56px sütun) satır sonlarını örtmesin: gövdeye sağ boşluk. Satır bölme
   (song-dom.js) ölçümü bu boşluğu düşer, satırlar düğmelerin soluna sığacak şekilde bölünür (2026-11-26). */
@media (max-width: 767px) { .song:has(#chFloat) .song-body { padding-right: 60px; } }
.ch-float > * { pointer-events: auto; }
.ch-float-keys { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 56px; }
.ch-float-keys button { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: var(--accent, #ffbf00); color: #fff; }
.ch-scroll { position: relative; display: flex; align-items: center; gap: 10px; }
.ch-scroll-toggle { display: flex; align-items: center; justify-content: center; flex: 0 0 56px; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; background: var(--accent, #ffbf00); color: #fff; }
.ch-scroll .ch-pause, .ch-scroll.playing .ch-play { display: none; }
.ch-scroll.playing .ch-pause { display: block; }
.ch-speed { position: relative; display: none; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 30px; background: rgba(0, 0, 0, .25); }
.ch-scroll.playing .ch-speed { display: flex; }
[data-theme="dark"] .ch-speed { background: rgba(255, 255, 255, .25); }
.ch-speed button { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; background: none; color: #fff; }
#chScrollRange { --value: 15%; flex: 0 0 120px; width: 120px; height: 6px; margin: 0; border-radius: 10px; outline: none; appearance: none; -webkit-appearance: none; cursor: pointer; background: linear-gradient(to right, var(--accent, #ffbf00) 0, var(--accent, #ffbf00) var(--value), rgba(0, 0, 0, .55) var(--value), rgba(0, 0, 0, .55) 100%); }
#chScrollRange::-webkit-slider-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--accent, #ffbf00); -webkit-appearance: none; appearance: none; }
#chScrollRange::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--accent, #ffbf00); }
@media (max-width: 767px) { #chScrollRange { flex-basis: 90px; width: 90px; } .ch-speed { gap: 5px; padding: 7px 9px; } }
.ch-scroll-info { position: absolute; left: 50%; bottom: calc(100% + 14px); display: flex; flex-direction: column; gap: 5px; min-width: 185px; padding: 10px 12px; border-radius: 8px; background: #1d272e; color: #fff; font-size: 12px; line-height: 1.35; opacity: 0; visibility: hidden; transform: translate(-50%, 6px); transition: opacity .2s, transform .2s, visibility .2s; pointer-events: none; }
.ch-scroll-info.show { opacity: .85; visibility: visible; transform: translate(-50%, 0); }
.ch-scroll-info p { margin: 0 0 4px; font-weight: 600; }
.ch-scroll-info span { white-space: nowrap; }
.ch-scroll-info kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 20px; margin-right: 5px; padding: 0 5px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 4px; background: rgba(255, 255, 255, .1); font: inherit; font-weight: 600; }

/* Enstrüman seçici */
.ch-instruments { display: flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--line, #e0e0e0); border-radius: 8px; }
.ch-instruments button { padding: 7px 11px; border: 1px solid transparent; border-radius: 6px; background: none; color: inherit; font-size: 12px; font-weight: 600; line-height: 1; }
.ch-instruments button.current, .ch-instruments button:hover { border-color: var(--accent, #ffbf00); }
.ch-tools .ch-instruments { border-color: #3a454e; }
.ch-tools .ch-instruments button { min-height: 0; padding: 7px 11px; font-size: 12px; }

/* Akor şemaları */
.ch-used { margin: 0 0 1.5rem; }
.ch-used-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; }
.ch-used-intro { margin: 0 0 .5rem; color: var(--muted, #6c757d); font-size: 14px; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.ch-card { display: block; width: 100%; padding: 8px 0; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--text, #212529); text-align: center; transition: background-color .15s, transform .15s; }
button.ch-card:hover, button.ch-card:focus-visible { background: rgba(212, 212, 212, .12); }
button.ch-card:active, .ch-card.is-playing { transform: scale(.98); }
.ch-card-name { display: block; font-size: 14px; font-weight: 700; line-height: 1.2; }
.ch-card-svg { display: block; width: 100%; max-width: 90px; margin: 0 auto; aspect-ratio: 140 / 168; }
.ch-card-svg svg { display: block; width: 100%; height: 100%; }
.ch-card-svg .ch-piano { height: auto; margin-top: 30px; }
/* Piyano tuşları sabit renklidir: currentColor kullanılırsa koyu araç çubuğunda (açık yazı rengi) ve karanlık temada
   siyah tuşlar açık renge dönüp kayboluyordu (2026-11-26). */
.ch-pk-white { fill: #fff; stroke: #3a3a3a; stroke-width: 1; }
.ch-pk-black { fill: #1b1b1b; stroke: #1b1b1b; stroke-width: 1; }
[data-theme="dark"] .ch-pk-white:not(.is-active) { fill: #e4e4e4; stroke: #0d0d0d; }
[data-theme="dark"] .ch-pk-black:not(.is-active) { fill: #0d0d0d; stroke: #0d0d0d; }
.ch-pk.is-active { fill: var(--accent, #ffbf00); }
.ch-pk.is-root { fill: #e0a800; }
.ch-chart-links { margin: .5rem 0 0; font-size: 14px; }
.ch-chart-links a { color: var(--accent-dark, #dea700); }

/* Şarkıdaki akorun üzerine gelince açılan kart (eski chord-diagrams görünümü) */
.ea-chord-floating-layer { position: absolute; top: 0; left: 0; z-index: 10000; overflow: visible; pointer-events: none; }
.ea-chord-floating-card { position: absolute; width: 140px; max-width: calc(100% - 16px); overflow: hidden; border: 1px solid var(--line, #d9dde2); border-radius: 4px; background: var(--panel, #fff); color: var(--text, #212529); box-shadow: 0 6px 20px rgba(0, 0, 0, .12); pointer-events: auto; }
.ea-chord-floating-card.is-measuring { visibility: hidden; }
.ea-chord-floating-card.is-dragging { user-select: none; }
.ea-chord-floating-card.is-unavailable .ea-chord-floating-diagram, .ea-chord-floating-card.is-unavailable .ea-chord-floating-positions, .ea-chord-floating-card.is-unavailable .ea-chord-floating-play { display: none; }
.ea-chord-floating-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; padding: 6px 8px 5px 12px; border-bottom: 1px solid var(--line, #e0e0e0); cursor: grab; touch-action: none; }
.ea-chord-floating-title { font-size: 13px; font-weight: 700; }
.ea-chord-floating-actions button { width: 26px; height: 26px; padding: 0; border: 0; background: none; color: inherit; font-size: 17px; opacity: .65; }
.ea-chord-floating-actions button[hidden] { display: none; }
.ea-chord-floating-diagram { width: 100%; max-width: 90px; margin: 0 auto; padding: 5px 0; cursor: grab; touch-action: none; }
.ea-chord-floating-diagram svg { display: block; width: 100%; height: auto; }
.ea-chord-floating-card[data-instrument="piano"] .ea-chord-floating-diagram { max-width: 140px; padding: 20px 10px 16px; }
.ea-chord-floating-positions { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; min-height: 32px; border-top: 1px solid var(--line, #e0e0e0); }
.ea-chord-floating-positions[hidden] { display: none; }
.ea-chord-floating-positions button { height: 32px; border: 0; background: none; color: inherit; font-size: 20px; }
.ea-chord-floating-positions span { font-size: 10px; text-align: center; opacity: .62; }
.ea-chord-floating-play { width: 100%; min-height: 34px; padding: 7px 10px; border: 0; border-top: 1px solid var(--line, #e0e0e0); background: none; color: inherit; font-size: 12px; }
.ea-chord-floating-play:hover, .ea-chord-floating-positions button:hover { background: rgba(212, 212, 212, .15); }

/* Ritim ve arpej */
.ch-tech { margin: 0 0 1.5rem; }
.ch-tech-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 340px)); gap: 16px; }
.ch-tech-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 5px; border-bottom: 1px solid var(--line, #e0e0e0); }
.ch-tech-title span { color: var(--muted, #6c757d); font-size: .8rem; }
.ch-tech-title strong { font-size: .9rem; }
.ch-tech-play { padding: 2px 10px; }
.ch-tech-play.is-playing { background: var(--navy, #1e272e); }
.ch-tech-play:disabled { opacity: .55; cursor: not-allowed; }
.ch-tech-stage { width: 100%; }
.song-technique-svg { display: block; width: 100%; height: auto; color: var(--text, #20252b); }
.song-technique-svg .line { stroke: currentColor; fill: none; stroke-width: 1.1; }
.song-technique-svg .arrow, .song-technique-svg .stem { stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.song-technique-svg .stem { stroke-width: 1.55; }
.song-technique-svg .tie { stroke: currentColor; fill: none; stroke-width: 1.2; stroke-linecap: round; }
.song-technique-svg .beam { stroke: currentColor; fill: none; stroke-width: 4.2; }
.song-technique-svg .secondary-beam { stroke-width: 3.6; }
.song-technique-svg .fill, .song-technique-svg .dot, .song-technique-svg .flag { fill: currentColor; stroke: none; }
.song-technique-svg .open { fill: var(--bg, #fff); stroke: currentColor; stroke-width: .75; }
.song-technique-svg .note-head { stroke-width: .75; }
.song-technique-svg .muted-mark, .song-technique-svg .ghost-note { stroke: currentColor; fill: none; stroke-width: 1.15; stroke-linecap: round; }
.song-technique-svg text { fill: currentColor; font-family: inherit; }
.song-technique-step-bg { fill: var(--accent, #ffbf00); opacity: 0; transition: opacity .08s; }
.song-technique-step.is-active .song-technique-step-bg { opacity: .42; }

/* Akor cetveli */
.ch-chart-keys ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 1rem; padding: 0; list-style: none; }
.ch-chart-keys a { display: flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--line, #e0e0e0); border-radius: 6px; font-weight: 600; transition: border-color .15s, background-color .15s; }
.ch-chart-keys a:hover, .ch-chart-keys a[aria-current="page"] { border-color: var(--accent, #ffbf00); background: rgba(255, 191, 0, .1); }
.ch-chart-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; padding: 4px 4px 4px 12px; border-radius: 10px; background: rgba(129, 129, 129, .078); }
.ch-chart-label { font-size: 13px; color: var(--muted, rgba(33, 37, 41, .75)); }
.ch-chart-bar .ch-instruments { margin-left: auto; }
.ch-chart-h2 { margin: 0; font-size: 20px; }
.ch-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 1.5rem; padding: 0; list-style: none; }
@media (min-width: 576px) { .ch-chart-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 992px) { .ch-chart-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ch-chart.is-loading .ch-chart-grid { opacity: .7; }
.ch-chart-card { display: flex; flex-direction: column; border: 1px solid var(--line, #e0e0e0); border-radius: 8px; }
.ch-chart-card[hidden] { display: none; }
.ch-chart-card .ch-card { position: relative; padding: 14px 0 10px; }
.ch-chart-card .ch-card-svg { max-width: 120px; }
.ch-card-play { position: absolute; top: 8px; right: 8px; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1px solid var(--line, #e0e0e0); border-radius: 50%; font-size: 9px; }
.ch-positions { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; border-top: 1px solid var(--line, #e0e0e0); }
.ch-positions[hidden] { display: none; }
.ch-positions button { height: 32px; border: 0; background: none; color: inherit; font-size: 20px; }
.ch-positions button:hover { background: rgba(212, 212, 212, .15); }
.ch-positions span { font-size: 11px; text-align: center; color: var(--muted, #6c757d); }

/* Transpoze aracı */
.ch-transposer-label { display: block; margin-bottom: 6px; font-weight: 600; }
.ch-transposer-input { display: block; width: 100%; padding: 10px 12px; border: 1px solid var(--line, #e0e0e0); background: var(--bg, #fff); font-family: var(--mono); font-size: 15px; line-height: 1.5; white-space: pre; resize: vertical; }
.ch-transposer-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.ch-transposer-controls[hidden] { display: none; }
.ch-transposer-step { display: flex; gap: 4px; }
.ch-transposer-step .btn { width: 40px; font-size: 18px; }
.ch-transposer-controls .ch-keys { justify-content: flex-start; margin: 0; }
.ch-transposer-controls .ch-key { background: var(--navy, #1e272e); }
.ch-transposer-controls .ch-key.active { background: var(--accent, #ffbf00); color: #07151d; }
.ch-transposer-status { min-height: 1.5em; margin: 8px 0; color: var(--muted, #6c757d); font-size: 14px; }
.ch-transposer-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ch-transposer-output { min-height: 3em; }
.ch-transposer-output .sec-block { display: block; }
.ch-transposer-howto { margin-top: 1.5rem; }
.ch-transposer-howto ol { padding-left: 1.2rem; }