:root {
  --bg: #1b1c1f; --panel: #26282c; --panel2: #2f3237; --line: #3a3d43; --text: #ececee; --dim: #9a9ca3;
  --accent: #ff9f0a; --rec: #ff453a; --ok: #32d74b; --sel: #ffffff;
  --head: 196px; --ruler: 38px; --lane: 76px; --bar: 52px;
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; overscroll-behavior: none;
  font: 13px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hide { display: none !important; }
#app { position: fixed; inset: 0; padding-left: var(--safe-l); padding-right: var(--safe-r); }
.screen { position: absolute; inset: 0; left: var(--safe-l); right: var(--safe-r); display: flex; flex-direction: column; }
.grow { flex: 1; }

/* üst çubuklar */
.bar, .sbar { height: var(--bar); display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px;
  background: var(--panel); border-bottom: 1px solid var(--line); flex: none; }
.sbar { justify-content: flex-start; gap: 12px; }
.sbar > b { font-size: 18px; }
.grp { display: flex; align-items: center; gap: 4px; }
.tb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 50px; height: 44px;
  padding: 0 6px; border-radius: 10px; color: var(--text); }
.tb small { font-size: 10px; color: var(--dim); white-space: nowrap; }
.tb:active { background: var(--panel2); }
.tb.on, .tb.on small { color: var(--accent); }
.tb:disabled { opacity: .35; }
.tb.big { min-width: 56px; }
.tb.big svg { width: 24px; height: 24px; }
.tb.rec svg { color: var(--rec); }
.tb.rec.on { background: var(--rec); color: #fff; }
.tb.rec.on svg, .tb.rec.on small { color: #fff; }
.tb.pill { flex-direction: row; gap: 6px; background: var(--panel2); height: 34px; padding: 0 10px; min-width: 0; }
.tb.pill b { font-weight: 600; }
.tb.live.on, .tb.live.on small { color: var(--ok); }
.soundBtn { flex-direction: row; gap: 8px; padding: 0 10px; background: var(--panel2); height: 40px; max-width: 170px; }
.soundBtn svg { color: var(--kc); }
.soundBtn span { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.soundBtn b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.soundBtn small { font-size: 10px; color: var(--dim); }
.clock { display: flex; flex-direction: column; align-items: center; min-width: 78px; padding: 3px 8px; background: #111214;
  border-radius: 8px; font-variant-numeric: tabular-nums; }
.clock b { font-size: 16px; color: var(--accent); }
.clock span { font-size: 10px; color: var(--dim); }
.pillBtn { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--accent); color: #000; font-weight: 700; }
.liveBar { display: flex; align-items: center; gap: 8px; padding: 5px 12px; background: #14281a; border-bottom: 1px solid var(--line);
  font-size: 12px; flex: none; overflow-x: auto; white-space: nowrap; }
.peer { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.07); }
.peer i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.peer.connected i { background: var(--ok); }
.peer.failed i { background: var(--rec); }

/* Şarkılarım */
#roomNote { display: flex; align-items: center; gap: 12px; padding: 8px 16px; color: var(--dim); background: #1f2a22; flex: none; }
#roomNote .pillBtn { background: var(--ok); }
#songGrid { flex: 1; overflow-y: auto; padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; align-content: start;
  padding-bottom: calc(16px + var(--safe-b)); }
.songCard { position: relative; display: flex; flex-direction: column; border-radius: 14px; background: var(--panel); overflow: hidden; text-align: left; min-height: 150px; }
.songCard .art { height: 92px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 70%, #000), color-mix(in srgb, var(--c) 25%, #111)); }
.songCard .art svg { width: 38px; height: 38px; color: rgba(255,255,255,.85); }
.sInfo { padding: 9px 40px 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sInfo b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sInfo small { color: var(--dim); font-size: 11px; }
.sMore { position: absolute; right: 4px; bottom: 8px; width: 34px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--dim); }
.sMore:active { background: var(--panel2); }
.newCard { align-items: center; justify-content: center; gap: 8px; border: 2px dashed #4a4d53; background: transparent; color: var(--accent); }
.newCard svg { width: 34px; height: 34px; }
.noSongs { grid-column: 1 / -1; color: var(--dim); padding: 10px 2px; }

/* Enstrüman seçimi */
#brGrid { flex: 1; overflow-y: auto; padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-content: start; }
.kind { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 18px 10px; min-height: 130px; border-radius: 16px;
  background: var(--panel); text-align: center; border: 1px solid var(--line); }
.kind:active { background: var(--panel2); }
.kind svg { width: 40px; height: 40px; color: var(--kc); stroke-width: 1.7; }
.kind b { font-size: 15px; }
.kind small { color: var(--dim); font-size: 11px; }

/* Kanallar */
#main { position: relative; flex: 1; display: flex; min-height: 0; }
#heads { width: var(--head); flex: none; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 2; }
#rulerCorner { height: var(--ruler); display: flex; align-items: center; gap: 2px; padding: 0 4px; border-bottom: 1px solid var(--line); flex: none; }
.mini { display: flex; align-items: center; justify-content: center; width: 34px; height: 26px; border-radius: 6px; color: var(--dim); }
.mini svg { width: 17px; height: 17px; }
.mini.on { color: var(--accent); background: rgba(255,159,10,.12); }
#headList { overflow-y: auto; overflow-x: hidden; flex: 1; position: relative; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: none; }
#headList::-webkit-scrollbar { display: none; }
#headInner { padding-bottom: 8px; }
.head { height: var(--lane); border-bottom: 1px solid var(--line); padding: 6px 6px 6px 8px; display: flex; gap: 6px; align-items: center; position: relative; }
.head.cur { background: rgba(255,159,10,.10); box-shadow: inset 3px 0 0 var(--accent); }
.hIcon { width: 42px; height: 42px; flex: none; border-radius: 10px; background: color-mix(in srgb, var(--kc) 22%, #1c1d20); display: flex; align-items: center; justify-content: center; }
.hIcon svg { width: 24px; height: 24px; color: var(--kc); }
.hIcon:active { filter: brightness(1.3); }
.hMid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hTop { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hName { flex: 1; min-width: 0; text-align: left; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hOwner { font-size: 10px; color: var(--dim); white-space: nowrap; }
.hBtns { display: flex; gap: 4px; align-items: center; }
.hb { min-width: 28px; height: 22px; border-radius: 6px; background: var(--panel2); font-size: 11px; font-weight: 700; color: var(--dim); padding: 0 5px; }
.hb.mute.on { background: #0a84ff; color: #fff; }
.hb.solo.on { background: #ffd60a; color: #000; }
.vol { flex: 1; min-width: 0; accent-color: var(--accent); height: 18px; }
/* seviye göstergesi: renk sesin yüksekliğine göre (−48…0 dB; yeşil, −12 dB'den sonra sarı, −3 dB'den sonra kırmızı) */
.meter { position: relative; height: 6px; border-radius: 3px; background: #0d0e10; overflow: hidden; }
.meter i { position: absolute; inset: 0; clip-path: inset(0 100% 0 0);
  background: linear-gradient(90deg, #2bd14a 0, #2bd14a 74%, #ffd60a 76%, #ffd60a 92%, #ff453a 94%); }
.meter b { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -2px; background: #fff; opacity: 0; }
.meter.clip { box-shadow: inset -6px 0 0 #ff453a; }
.meter.vert { width: 16px; }
.meter.vert i { clip-path: inset(100% 0 0 0); background: linear-gradient(0deg, #2bd14a 0, #2bd14a 74%, #ffd60a 76%, #ffd60a 92%, #ff453a 94%); }
.meter.vert b { left: 0; right: 0; width: auto; height: 2px; margin: 0 0 -2px 0; top: auto; }
.meter.vert.clip { box-shadow: inset 0 6px 0 #ff453a; }
.addTrack { display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; margin: 6px; margin-bottom: calc(6px + var(--safe-b)); border-radius: 10px;
  background: var(--panel2); font-weight: 600; flex: none; }
#scroller { flex: 1; overflow: auto; position: relative; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-x pan-y; }
#area { position: relative; min-height: 100%; }
#ruler { position: sticky; top: 0; height: var(--ruler); background: #202225; border-bottom: 1px solid var(--line); z-index: 3; touch-action: none; }
.tick { position: absolute; top: 14px; bottom: 0; border-left: 1px solid #44474e; font-size: 10px; color: var(--dim); padding: 2px 0 0 4px; pointer-events: none; }
.tick.beat { top: 28px; border-color: #34363b; }
#lanes { position: relative; padding-bottom: 60px; }
.lane { position: relative; height: var(--lane); border-bottom: 1px solid var(--line);
  background-image: linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: var(--barpx) 100%; }
.clip { position: absolute; top: 4px; bottom: 4px; border-radius: 6px; background: var(--c); overflow: hidden; touch-action: pan-x pan-y; border: 1px solid rgba(0,0,0,.25); }
.clip canvas { position: absolute; left: 0; top: 16px; width: 100%; height: calc(100% - 16px); }
.clip .cn { position: absolute; left: 5px; top: 1px; font-size: 10px; font-weight: 700; color: rgba(0,0,0,.75); white-space: nowrap; }
.clip.sel { border: 2px solid var(--sel); box-shadow: 0 0 0 1px #000; touch-action: none; z-index: 2; }
.clip .fade { position: absolute; top: 0; bottom: 0; background: rgba(0,0,0,.25); pointer-events: none; }
.clip .trim { position: absolute; top: 0; bottom: 0; width: 18px; display: none; }
.clip.sel .trim { display: block; }
.clip .trim.l { left: 0; background: linear-gradient(90deg, rgba(255,255,255,.55) 3px, transparent 3px); }
.clip .trim.r { right: 0; background: linear-gradient(270deg, rgba(255,255,255,.55) 3px, transparent 3px); }
.clip.loading { opacity: .55; }
.clip.recording { background: rgba(255,69,58,.5); }
#playhead { position: absolute; top: 0; bottom: 0; width: 0; z-index: 4; pointer-events: none; }
#playhead i { position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: var(--accent); }
#playhead::before { content: ""; position: absolute; top: 0; left: -7px; border: 7px solid transparent; border-top: 10px solid var(--accent); }
#empty { position: absolute; left: var(--head); right: 0; top: 0; bottom: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; color: var(--dim); text-align: center; padding: 20px; z-index: 1; pointer-events: none; }
#empty b { color: var(--text); font-size: 17px; }
#empty button { pointer-events: auto; display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 12px; background: var(--accent); color: #000; font-weight: 700; font-size: 15px; }
#clipBar { display: flex; align-items: center; gap: 4px; padding: 4px 10px; padding-bottom: calc(4px + var(--safe-b)); background: var(--panel); border-top: 1px solid var(--line); flex: none; overflow-x: auto; }
#clipBar .info { font-size: 11px; color: var(--dim); margin-right: 6px; white-space: nowrap; }
#clipBar .tb { min-width: 54px; height: 46px; }
#clipBar .sep { width: 1px; height: 30px; background: var(--line); margin: 0 4px; flex: none; }

/* Enstrüman ekranı */
#strip { position: relative; height: 40px; flex: none; background: #141517; border-bottom: 1px solid var(--line); touch-action: none; }
#strip canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#stripHead { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: var(--accent); pointer-events: none; }
#ctlRow { min-height: 40px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); overflow-x: auto; white-space: nowrap; }
#ctlRow:empty { display: none; }
.cgrp { display: flex; align-items: center; gap: 4px; color: var(--dim); font-size: 12px; }
.seg { padding: 6px 11px; border-radius: 8px; background: var(--panel2); font-weight: 600; font-size: 12px; }
.seg.on { background: var(--accent); color: #000; }
.hintTxt { color: var(--dim); font-size: 12px; white-space: normal; }
#fxStatus { color: var(--accent); font-weight: 600; font-size: 12px; margin-left: auto; }
#instBody { flex: 1; min-height: 0; display: flex; touch-action: none; padding: 6px 8px calc(6px + var(--safe-b)); background: #101113; }

/* klavye */
.keys { position: relative; flex: 1; }
.whites { position: absolute; inset: 0; display: flex; gap: 2px; }
.wk { flex: 1; background: linear-gradient(#e9e9ec, #fafafa 70%, #e2e2e6); border-radius: 0 0 8px 8px; position: relative; box-shadow: inset 0 -6px 0 #c9c9ce; }
.wk span { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 11px; color: #777; pointer-events: none; }
.wk.down { background: linear-gradient(#d8d8dc, #e6e6ea); box-shadow: inset 0 -2px 0 #b9b9be; }
.bk { position: absolute; top: 0; height: 60%; background: linear-gradient(#2a2a2d, #111); border-radius: 0 0 6px 6px; z-index: 2; border: 1px solid #000; box-shadow: inset 0 -5px 0 #333; }
.bk.down { background: #3c3c40; box-shadow: none; }

/* teller (bas, gitar) */
.fret { position: relative; flex: 1; display: flex; flex-direction: column; background: linear-gradient(#3b2a1d, #2e2117); border-radius: 8px; overflow: hidden; }
.str { flex: 1; display: flex; position: relative; }
.str::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: var(--th); margin-top: calc(var(--th) / -2); background: linear-gradient(#f2f2f2, #9a9a9a); pointer-events: none; opacity: .9; }
.fc { flex: 1; border-right: 2px solid #b8b8b8; position: relative; }
.fc.nut { flex: .7; border-right: 6px solid #e8e2d0; background: rgba(0,0,0,.25); }
.fc span { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); font-size: 11px; color: #e8dcc8; font-weight: 700; pointer-events: none; z-index: 1; text-shadow: 0 1px 2px #000; }
.fc.down { background: radial-gradient(circle, rgba(255,159,10,.75) 0 30%, transparent 32%); }
.dots { position: absolute; left: 0; right: 0; bottom: 2px; display: flex; pointer-events: none; }
.dots i { flex: 1; text-align: center; font-style: normal; color: rgba(255,255,255,.35); font-size: 9px; letter-spacing: 3px; }
.dots i:first-child { flex: .7; }
.chords { flex: 1; display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.chord { display: flex; flex-direction: column; background: linear-gradient(#3b2a1d, #2e2117); border-radius: 10px; overflow: hidden; }
.cName { height: 38px; flex: none; font-weight: 800; font-size: 16px; background: rgba(255,255,255,.1); }
.cName:active { background: var(--accent); color: #000; }
.cStr { flex: 1; position: relative; }
.cStr::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: var(--th); background: linear-gradient(#f2f2f2, #9a9a9a); opacity: .85; }
.cStr.mute::after { opacity: .2; }
.cStr.down { background: rgba(255,159,10,.4); }

/* davul */
.pads { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: 1fr 1fr; gap: 8px; }
.pad { border-radius: 14px; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--pc) 38%, #2a2a2e), color-mix(in srgb, var(--pc) 12%, #18181b));
  border: 1px solid color-mix(in srgb, var(--pc) 55%, #000); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px; font-size: 13px; font-weight: 700; }
.pad span { pointer-events: none; }
.pad.down { background: var(--pc); color: #000; }

/* Ses Kaydedici */
.k-audio { gap: 10px; }
.recIn { width: 150px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px; background: var(--panel); border-radius: 12px; }
.recIn b { font-size: 12px; color: var(--dim); }
.recMeter { flex: 1; min-height: 60px; width: 22px; position: relative; }
.recMeter .meter { position: absolute; inset: 0; width: 22px; height: auto; border-radius: 5px; }
.gainLbl { font-size: 11px; color: var(--dim); text-align: center; }
.recIn input[type=range] { width: 130px; accent-color: var(--accent); }
.recSw { width: 210px; flex: none; display: flex; flex-direction: column; justify-content: center; background: var(--panel); border-radius: 12px; padding: 0 12px; }
.recSw .row { padding: 7px 0; }
.recFx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; background: var(--panel); border-radius: 12px; padding: 8px 10px; overflow-y: auto; }
.fxHead { display: flex; align-items: baseline; gap: 8px; }
.fxHead small { color: var(--dim); font-size: 11px; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.preset { height: 38px; border-radius: 10px; background: var(--panel2); font-weight: 600; font-size: 12px; }
.preset.on { background: var(--accent); color: #000; }
.recKnobs:empty { display: none; }
.recKnobs { width: 110px; flex: none; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; background: var(--panel); border-radius: 12px; }
.knobBox { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.knobBox small { color: var(--dim); font-size: 11px; }
.knob { --v: .5; width: 56px; height: 56px; border-radius: 50%; position: relative; touch-action: none;
  background: conic-gradient(from 225deg, var(--accent) calc(var(--v) * 270deg), #3a3d43 0 270deg, transparent 0); }
.knob::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #4a4d55, #24262a); }
.knob i { position: absolute; left: 50%; top: 8px; width: 3px; height: 14px; margin-left: -1.5px; background: #fff; border-radius: 2px;
  transform-origin: 50% 20px; transform: rotate(calc(-135deg + var(--v) * 270deg)); }

/* klip menüsü */
#pop { position: fixed; z-index: 25; display: flex; gap: 2px; padding: 4px; background: #3a3c41; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.5); border: 1px solid #4a4d53; }
.pb { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 9px; border-radius: 8px; font-size: 11px; font-weight: 600; min-width: 48px; }
.pb svg { width: 18px; height: 18px; }
.pb:active { background: rgba(255,255,255,.12); }
.pb.danger { color: var(--rec); }

/* sayfalar */
#sheet { position: absolute; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 20; }
#sheetBox { width: min(520px, 92vw); max-height: 88vh; overflow: auto; background: var(--panel); border-radius: 16px; padding: 14px 16px; border: 1px solid var(--line); }
#sheetBox h3 { margin: 0 0 10px; font-size: 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.xProg { height: 6px; border-radius: 3px; background: var(--panel2); overflow: hidden; margin: 6px 0 10px; }
.xProg i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.row.col { flex-direction: column; align-items: stretch; }
.row:last-child { border-bottom: 0; }
.row label { flex: 1; }
.row small { display: block; color: var(--dim); font-size: 11px; margin-top: 2px; }
.row input[type=range] { width: 180px; accent-color: var(--accent); }
.row input[type=text] { flex: 1; background: #111214; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit; font-size: 15px; -webkit-user-select: text; user-select: text; }
.segs { display: flex; gap: 4px; flex-wrap: wrap; }
.keysel .seg { min-width: 36px; padding: 6px 4px; }
.sw { width: 46px; height: 28px; border-radius: 99px; background: #48484a; position: relative; flex: none; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; }
.sw.on { background: var(--ok); }
.sw.on::after { left: 21px; }
.btnRow { display: flex; gap: 8px; margin-top: 12px; }
.btn { flex: 1; height: 42px; border-radius: 10px; background: var(--panel2); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; }
.btn.small { flex: none; height: 38px; }
.btn.primary { background: var(--accent); color: #000; }
.btn.danger { color: var(--rec); }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper .btn { flex: none; width: 46px; font-size: 18px; }
.stepper b { font-size: 22px; min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.menuList { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.menuList .btn { flex: none; justify-content: flex-start; padding: 0 14px; }
#toast { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); background: rgba(40,40,44,.96); color: var(--text);
  padding: 9px 14px; border-radius: 10px; font-size: 13px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 30; max-width: 80vw; text-align: center; }
#toast.on { opacity: 1; }
#countIn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 90px; font-weight: 800;
  color: var(--accent); pointer-events: none; z-index: 15; text-shadow: 0 4px 30px rgba(0,0,0,.6); }

/* sohbet, not, ses uyarısı */
.tb.chat { position: relative; }
.badge { position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--rec); color: #fff;
  font-size: 10px; font-weight: 700; font-style: normal; display: flex; align-items: center; justify-content: center; }
.sbar .tb.chat { min-width: 60px; }
.hNote { width: 24px; height: 22px; border-radius: 6px; background: #ffd60a; color: #000; display: flex; align-items: center; justify-content: center; flex: none; }
.hNote svg { width: 15px; height: 15px; }
.cNote { position: absolute; right: 3px; top: 2px; max-width: 70%; display: flex; align-items: center; gap: 3px; padding: 1px 5px; border-radius: 5px;
  background: #ffd60a; color: #000; font-size: 10px; font-weight: 700; z-index: 3; }
.cNote svg { width: 12px; height: 12px; }
.cNote span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.noteView { background: #ffd60a; color: #000; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.noteView p { margin: 0 0 6px; font-size: 15px; white-space: pre-wrap; -webkit-user-select: text; user-select: text; }
.noteView small { color: #5a4a00; }
#sheetBox textarea { width: 100%; min-height: 90px; background: #111214; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px;
  font: inherit; font-size: 15px; resize: none; -webkit-user-select: text; user-select: text; }
#audioWarn { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); z-index: 40; padding: 10px 16px; border-radius: 12px; background: var(--rec); color: #fff;
  font-weight: 700; box-shadow: 0 6px 24px rgba(0,0,0,.5); }

/* ses paneli (synth sesleri, amfi) */
#instPanel { flex: none; display: flex; align-items: center; gap: 14px; padding: 6px 12px; background: #1f2023; border-bottom: 1px solid var(--line); overflow-x: auto; }
.pchips { display: flex; gap: 4px; align-items: center; flex-wrap: nowrap; }
.plbl { color: var(--dim); font-size: 12px; margin-right: 4px; }
.pknobs { display: flex; gap: 14px; margin-left: auto; }
.knobBox.sm .knob { width: 40px; height: 40px; }
.knobBox.sm .knob::before { inset: 5px; }
.knobBox.sm .knob i { top: 6px; height: 10px; transform-origin: 50% 14px; }
.knobBox.sm small { font-size: 10px; }
.seg svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.slots .seg { min-width: 54px; }

/* dar ekran (web, dikey): yazılar küçülür, denetim satırı alta kayar */
@media (max-width: 700px) {
  .tb { min-width: 32px; padding: 0 2px; }
  .tb.big { min-width: 40px; }
  .tb small { display: none; }
  .clock { min-width: 58px; padding: 3px 4px; }
  .soundBtn { max-width: 120px; }
  .soundBtn small { display: none; }
  #ctlRow { flex-wrap: wrap; white-space: normal; padding: 4px 8px; gap: 6px 10px; }
  #instPanel { flex-wrap: wrap; }
}

#dbg { position: absolute; left: 8px; right: 8px; bottom: 6px; z-index: 50; padding: 4px 8px; border-radius: 6px; background: rgba(0,0,0,.8); color: #7CFC00;
  font: 11px/1.3 ui-monospace, Menlo, monospace; pointer-events: none; }

/* nota düzenleyici */
#eTitle { font-size: 14px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-left: 6px; }
#eTools { gap: 8px; }
#edMain { flex: 1; min-height: 0; display: flex; }
#edKeys { width: 64px; flex: none; overflow: hidden; background: var(--panel); border-right: 1px solid var(--line); }
.eKey { display: flex; align-items: center; padding-left: 8px; font-size: 10px; color: var(--dim); border-bottom: 1px solid #2a2c30; background: #e9e9ec; color: #555; }
.eKey.blk { background: #1c1c1e; color: #888; }
#scEdit .eKey { white-space: nowrap; overflow: hidden; }
#edScroll { flex: 1; overflow: auto; position: relative; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: #17181a; }
#edArea { position: relative; }
#edGrid { position: absolute; inset: 0; touch-action: pan-x pan-y;
  background-image: linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px), linear-gradient(0deg, rgba(255,255,255,.04) 1px, transparent 1px); }
#edGrid { background-size: 35px 26px, 140px 100%, 560px 100%, 100% 26px; }
.eEnd { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.25); pointer-events: none; }
.eNote { position: absolute; border-radius: 4px; background: var(--kc); border: 1px solid rgba(0,0,0,.4); touch-action: none; }
.eNote.sel { outline: 2px solid #fff; z-index: 2; }
.eNote i { position: absolute; top: 0; bottom: 0; width: 10px; background: rgba(0,0,0,.25); pointer-events: none; }
.eNote i.r { right: 0; border-radius: 0 4px 4px 0; }
.eNote i.l { left: 0; border-radius: 4px 0 0 4px; }
#edHead { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: var(--accent); pointer-events: none; }
#edHint { flex: none; padding: 5px 12px calc(5px + var(--safe-b)); font-size: 11px; color: var(--dim); background: var(--panel); border-top: 1px solid var(--line); }
.hName { cursor: default; }

/* loop tarayıcısı (sağdan açılan panel) ve klip döngüsü */
#loopPanel { position: absolute; top: var(--bar); right: 0; bottom: 0; width: min(440px, 62vw); z-index: 18; display: flex; flex-direction: column;
  background: var(--panel); border-left: 1px solid var(--line); box-shadow: -10px 0 30px rgba(0,0,0,.45); }
#loopPanel header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 4px; }
#loopPanel header b { font-size: 16px; }
#lpFilt { display: flex; flex-direction: column; gap: 6px; padding: 4px 12px 8px; border-bottom: 1px solid var(--line); }
#lpFilt .segs { flex-wrap: nowrap; overflow-x: auto; }
#lpFilt .seg { white-space: nowrap; }
#lpList { flex: 1; overflow-y: auto; padding: 6px 8px calc(8px + var(--safe-b)); }
.lpRow { display: flex; align-items: center; gap: 8px; padding: 7px 6px; border-bottom: 1px solid #303237; }
.lpIc { width: 34px; height: 34px; border-radius: 8px; flex: none; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--kc) 22%, #1c1d20); }
.lpIc svg { color: var(--kc); width: 20px; height: 20px; }
.lpTx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lpTx b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lpTx small { color: var(--dim); font-size: 11px; }
.lpPlay { width: 38px; height: 34px; background: var(--panel2); color: var(--text); }
.lpPlay.on { background: var(--accent); color: #000; }
.lpAdd { display: flex; align-items: center; gap: 2px; }
.lpAdd svg { width: 14px; height: 14px; }
.lpHint { padding: 10px 6px; }
.clip .rep { position: absolute; top: 0; bottom: 0; border-left: 2px dashed rgba(0,0,0,.35); pointer-events: none; }
.clip .loopH { position: absolute; right: 0; top: 0; width: 26px; height: 18px; display: none; align-items: center; justify-content: center;
  background: rgba(255,255,255,.85); color: #000; border-radius: 0 5px 0 6px; z-index: 3; touch-action: none; }
.clip .loopH svg { width: 13px; height: 13px; pointer-events: none; }
.clip.sel .loopH { display: flex; }

/* döngü (sarı bölge) */
.tb.cyc, .tb.cyc small { color: #ffd60a; }
#cycBar { position: absolute; top: 1px; height: 13px; background: #ffd60a; border-radius: 4px; z-index: 2; touch-action: none; }
#cycBar i { position: absolute; top: 0; bottom: 0; width: 18px; }
#cycBar i.l { left: 0; border-left: 4px solid #b38f00; border-radius: 4px 0 0 4px; }
#cycBar i.r { right: 0; border-right: 4px solid #b38f00; border-radius: 0 4px 4px 0; }
#cycShade { position: absolute; top: var(--ruler); bottom: 0; background: rgba(255,214,10,.06); border-left: 1px solid rgba(255,214,10,.5);
  border-right: 1px solid rgba(255,214,10,.5); pointer-events: none; z-index: 1; }

#bBpm { display: none; }        /* tempo Ayarlar sayfasında; üst çubuk yatay telefona sığsın */

/* düzenleyici: seç aracı, kutu */
#edGrid.selMode { touch-action: none; }
#eBox { position: absolute; border: 1.5px dashed #fff; background: rgba(255,255,255,.08); pointer-events: none; z-index: 3; }
#eTools { gap: 6px; }
#eTools .cgrp { gap: 3px; }
#eTools .tb { min-width: 44px; }

/* düzenleyici cetveli: ölçüler, sarı döngü; klavye sütununun üstü boş köşe */
#edTop { flex: none; display: flex; height: 30px; background: #202225; border-bottom: 1px solid var(--line); }
#edCorner { width: 64px; flex: none; background: var(--panel); border-right: 1px solid var(--line); }
#edRuler { flex: 1; min-width: 0; overflow: hidden; position: relative; touch-action: none; }
#edRulerIn { position: relative; height: 100%; }
#edRuler .tick { top: 12px; }
#edRuler .tick.beat { top: 22px; }
#eCycBar { position: absolute; top: 1px; height: 11px; background: #ffd60a; border-radius: 4px; z-index: 2; touch-action: none; }
#eCycBar i { position: absolute; top: 0; bottom: 0; width: 18px; }
#eCycBar i.l { left: 0; border-left: 4px solid #b38f00; border-radius: 4px 0 0 4px; }
#eCycBar i.r { right: 0; border-right: 4px solid #b38f00; border-radius: 0 4px 4px 0; }
#edShade { position: absolute; top: 0; bottom: 0; background: rgba(255,214,10,.06); border-left: 1px solid rgba(255,214,10,.5);
  border-right: 1px solid rgba(255,214,10,.5); pointer-events: none; }

/* klavye: tam aralık, görünen kısım kaydırılır; üstte kaydırma şeridi */
.kbView { position: relative; flex: 1; overflow: hidden; }
.kbView .keys { position: absolute; top: 0; bottom: 0; left: 0; will-change: transform; }
.kbGrp { flex: 1; min-width: 220px; max-width: 520px; }
.kbNav { position: relative; flex: 1; height: 26px; border-radius: 6px; overflow: hidden; touch-action: none; cursor: grab;
  background: repeating-linear-gradient(90deg, #e9e9ec 0 calc(100% / 52 - 1px), #8e8e93 calc(100% / 52 - 1px) calc(100% / 52)); }
.kbMini i { position: absolute; top: 0; height: 60%; width: calc(100% / 52 * .6); margin-left: calc(100% / 52 * -.3); background: #1c1c1e; pointer-events: none; }
.kbWin { position: absolute; top: 0; bottom: 0; border: 2px solid var(--accent); border-radius: 6px; background: rgba(255,159,10,.18); pointer-events: none; }
.kbRange { min-width: 64px; color: var(--dim); font-size: 12px; font-weight: 600; }

/* efekt zinciri (kanal şeridi) */
.fxSec { margin: 14px 0 6px; font-size: 12px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .04em; }
.fxList { display: flex; flex-direction: column; gap: 6px; }
.fxNone { padding: 6px 0; }
.fxSlot { border-radius: 12px; background: #2a2b2f; border: 1px solid var(--line); overflow: hidden; }
.fxSlot.off .fxName b { color: var(--dim); }
.fxSlot.open { border-color: #4a4d53; }
.fxRow { display: flex; align-items: center; gap: 6px; padding: 6px 8px; }
.fxRow .mini:disabled { opacity: .3; }
.fxName { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; padding: 2px 4px; }
.fxName b { font-size: 14px; }
.fxName small { color: var(--dim); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw.sm { width: 38px; height: 23px; }
.sw.sm::after { width: 17px; height: 17px; }
.sw.sm.on::after { left: 18px; }
.fxParams, .fxSpec { padding: 4px 12px 10px; display: flex; flex-direction: column; }
.fxSpec { padding: 0; }
.fxp { display: grid; grid-template-columns: minmax(90px, 34%) 1fr 74px; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; }
.fxp label { color: var(--text); }
.fxp output { text-align: right; color: var(--dim); font-variant-numeric: tabular-nums; font-size: 12px; }
.fxp.col { grid-template-columns: 1fr; gap: 6px; }
.fxp .sw { justify-self: start; grid-column: 2; }
.fxp input[type=range] { width: 100%; }
.eqCv { width: 100%; height: 96px; border-radius: 8px; background: #17181a; margin: 4px 0 6px; display: block; }
.grBar { display: block; height: 8px; border-radius: 4px; background: #17181a; overflow: hidden; grid-column: 2 / 4; }
.grBar b { display: block; height: 100%; width: 0; background: #ff9f0a; transition: width .08s; }
.fxAdd { width: 100%; margin-top: 8px; flex: none; }
.fxMaster { width: 100%; margin-top: 10px; }
.fxPick { margin-bottom: 4px; }
.fxPick .seg { padding: 9px 12px; font-size: 13px; }
.recChain { display: flex; align-items: center; gap: 10px; padding: 10px 0; flex-wrap: wrap; }
.recChain span { flex: 1; min-width: 120px; color: var(--dim); font-size: 12px; }
/* başlıkta ad önce gelir; efekt etiketi kalan yere sığdığı kadar */
.hName { flex: 0 1 auto; min-width: 3.5em; }
.hOwner { flex: 1 3 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: right; }

/* otomasyon */
#lanes.auto .clip { opacity: .4; }
.auLayer { position: absolute; left: 0; top: 0; bottom: 0; z-index: 4; touch-action: pan-x pan-y; }
.auLayer svg { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.auLine { fill: none; stroke: #64d2ff; stroke-width: 2; }
.auLine.flat { stroke-dasharray: 5 5; opacity: .55; }
.auPt { position: absolute; width: 32px; height: 32px; margin: -16px 0 0 -16px; border-radius: 50%; touch-action: none; }
.auPt::after { content: ""; position: absolute; left: 10px; top: 10px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #64d2ff; box-sizing: border-box; }
.auPt.on::after { background: #64d2ff; transform: scale(1.35); }
.auVal { position: absolute; font-size: 11px; font-weight: 600; padding: 2px 6px; background: rgba(0,0,0,.8); border-radius: 6px; color: #fff; pointer-events: none; white-space: nowrap; }
.auPick { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: #64d2ff; background: #1d2a33; border-radius: 7px; padding: 5px 6px; min-width: 0; margin: 3px 0 2px; }
.auPick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; text-align: left; }
.auPick svg { width: 14px; height: 14px; flex: none; }
.auPick.has { color: #fff; }
#bAuto.on { color: #64d2ff; background: #1d2a33; }
.fxp.au { grid-template-columns: minmax(90px, 32%) 1fr 66px 32px; }
.auBtn { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--dim); background: #1f2023; }
.auBtn.on { color: #64d2ff; background: #1d2a33; }
.auBtn svg { width: 16px; height: 16px; }
.fxp input:disabled { opacity: .35; }
.segs .seg.has::after { content: " •"; color: #64d2ff; }

/* efekt panelleri (Logic gibi) */
.plug { display: flex; flex-direction: column; gap: 6px; }
.plugCv { width: 100%; height: 124px; border-radius: 10px; background: linear-gradient(#141518, #1b1c20); display: block; border: 1px solid #34363c; }
.plugCv.drag { touch-action: none; }
.plugKnobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px 4px; padding: 4px 0; }
.pk { display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; padding: 4px 0; }
.pk .knob { width: 46px; height: 46px; }
.pk .knob::before { inset: 5px; }
.pk .knob i { top: 6px; height: 11px; transform-origin: 50% 17px; }
.pk output { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.pk small { font-size: 10px; color: var(--dim); text-align: center; line-height: 1.2; }
.pk.au output { color: #64d2ff; }
.auMini { position: absolute; top: 0; right: 4px; width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--dim); background: #1f2023; }
.auMini.on { color: #64d2ff; background: #1d2a33; }
.auMini svg { width: 13px; height: 13px; }
.eqBands { display: flex; gap: 4px; flex-wrap: wrap; }
.eqBands .seg { display: flex; align-items: center; gap: 5px; padding: 5px 8px; font-size: 11px; }
.eqBands .seg i { width: 8px; height: 8px; border-radius: 50%; background: var(--bc); }
.eqBands .seg.on { background: #3a3c42; color: #fff; box-shadow: inset 0 0 0 1.5px var(--bc); }

/* bilgisayar: alt enstrüman panosu, yüzen efekt pencereleri, efekt zinciri sağda kalıcı panel */
#dock { flex: none; height: 40vh; min-height: 230px; display: flex; flex-direction: column; border-top: 1px solid var(--line); background: var(--panel); }
#dockBar { display: flex; align-items: center; gap: 12px; padding: 4px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
#dockHint { flex: 1; color: var(--dim); font-size: 12px; }
#dockSlot { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#dockSlot #instBody { flex: 1; min-height: 0; }
.fxWin { position: fixed; width: 420px; max-height: 80vh; display: flex; flex-direction: column; background: #26272b; border: 1px solid #4a4d53; border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0,0,0,.55); overflow: hidden; }
.fxWinBar { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #303136; cursor: grab; user-select: none; }
.fxWinBar b { font-size: 13px; }
.fxWinBar small { flex: 1; color: var(--dim); font-size: 11px; }
.fxWinBody { padding: 10px 12px; overflow-y: auto; }
#sheet.yan { inset: 0 0 0 auto; width: 400px; background: transparent; pointer-events: none; justify-content: flex-end; align-items: stretch; }
#sheet.yan #sheetBox { pointer-events: auto; width: 400px; max-height: none; height: 100%; border-radius: 0; border-width: 0 0 0 1px; }

/* enstrümanı değiştir */
.kindGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.kindGrid .kind.on { outline: 2px solid var(--accent); }

/* birlikte çal: arkadaşın oynatma çizgisi ve davet */
.peerHead { position: absolute; top: 0; bottom: 0; width: 0; z-index: 3; pointer-events: none; }
.peerHead i { position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: var(--pc); opacity: .7; }
.peerTag { position: absolute; top: 3px; left: 4px; pointer-events: auto; font: 600 11px/1 inherit; padding: 3px 7px; border-radius: 9px; background: var(--pc); color: #111; border: 0; white-space: nowrap; }
#bgInvite { position: fixed; top: 58px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; gap: 10px; align-items: center; max-width: calc(100vw - 32px);
  padding: 6px 8px 6px 12px; border-radius: 14px; background: #2c2d31; border: 1px solid #4a4d53; box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 14px; }
#bgInvite svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
#bgInvite span { flex: 1; min-width: 0; }
#bgInvite.hide { display: none; }
@media (min-width: 701px) {
.bar.dar { gap: 4px; padding: 0 6px; }
.bar.dar .grp { gap: 1px; }
.bar.dar .tb { min-width: 42px; padding: 0 3px; }
.bar.dar .tb.big { min-width: 48px; }
.bar.dar .tb small { font-size: 9px; }
}
/* Kalıcı şarkı odası (24 Kasım 2026): benimle paylaşılanlar, yalnız dinleyen */
.sharedHead { grid-column: 1 / -1; margin: 14px 2px 0; color: var(--dim); font-size: 13px; font-weight: 600; text-transform: none; }
body.listenOnly #iRec, body.listenOnly #bRec { opacity: .35; pointer-events: none; }
