/* Pixtape - arayüz stilleri */
:root {
  --bg: #121419;
  --bg2: #191c22;
  --panel: #1e2128;
  --panel2: #252932;
  --panel3: #2d323c;
  --line: #2f343e;
  --line2: #3a404c;
  --text: #e7e9ee;
  --text2: #a9afbc;
  --text3: #737a89;
  --accent: #6c63ff;
  --accent2: #00b8ff;
  --accent-soft: rgba(108, 99, 255, .18);
  --track: #3a3f4a;
  --danger: #ff5a6a;
  --ok: #2fd18b;
  --warn: #ffb547;
  --stage: #0e1014;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --radius: 10px;
  --grad: linear-gradient(135deg, #7c5cff, #00b8ff);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef0f4;
  --bg2: #f6f7fa;
  --panel: #ffffff;
  --panel2: #f2f4f7;
  --panel3: #e7eaf0;
  --line: #e1e4ea;
  --line2: #d3d7df;
  --text: #1d2129;
  --text2: #555d6d;
  --text3: #8a91a0;
  --track: #d5d9e1;
  --stage: #dfe2e8;
  --accent-soft: rgba(108, 99, 255, .12);
  --shadow: 0 10px 40px rgba(20, 30, 60, .18);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 "Segoe UI", system-ui, -apple-system, sans-serif;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); }
input[type=text], input[type=number], select, textarea {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 8px;
  outline: none;
  min-width: 0;
}
input[type=text]:focus, input[type=number]:focus, select:focus, textarea:focus { border-color: var(--accent); }
select { cursor: pointer; width: 100%; }
select option, select optgroup { background: var(--panel); color: var(--text); }
textarea { width: 100%; resize: vertical; user-select: text; font-size: 14px; }
input[type=number]::-webkit-inner-spin-button { opacity: .4; }
.full { width: 100%; }
.ico { display: block; flex: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
/* iki kaydırma çubuğu birlikte çıkınca köşede kalan beyaz kare görünmesin */
::-webkit-scrollbar-corner { background: transparent; }

/* ---------------------------------------------------------------- düzen */
#app { display: flex; flex-direction: column; height: 100%; }
body.at-home #app { display: none; }
body.at-editor #home { display: none; }

#topbar {
  height: 44px; flex: none; display: flex; align-items: center; gap: 6px;
  padding: 0 10px; background: var(--bg2); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 8px 4px 2px; border-radius: 8px; }
.brand:hover { background: var(--panel2); }
.brand b { font-size: 15px; letter-spacing: .2px; }
.logo { width: 26px; height: 26px; display: inline-block; }
.logo.big { width: 64px; height: 64px; }
#menubar { display: flex; gap: 2px; margin-left: 8px; }
.mb-item { background: none; border: 0; padding: 6px 10px; border-radius: 7px; color: var(--text2); }
.mb-item:hover { background: var(--panel2); color: var(--text); }
.spacer { flex: 1; }

/* proje sekmeleri */
#docTabs { height: 36px; flex: none; display: flex; align-items: flex-end; gap: 2px; padding: 0 8px; background: var(--bg); border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; }
#docTabs::-webkit-scrollbar { height: 0; }
.dt-tab { display: flex; align-items: center; gap: 7px; height: 30px; max-width: 220px; min-width: 110px; padding: 0 6px 0 8px; border: 1px solid transparent; border-bottom: 0; border-radius: 9px 9px 0 0; color: var(--text2); cursor: pointer; font-size: 13px; flex: none; position: relative; }
.dt-tab:hover { background: var(--panel2); color: var(--text); }
.dt-tab.on { background: var(--bg2); border-color: var(--line); color: var(--text); margin-bottom: -1px; height: 31px; }
.dt-tab.on::before { content: ''; position: absolute; left: 8px; right: 8px; top: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.dt-tab.drag { opacity: .4; }
.dt-tab.over { box-shadow: inset 2px 0 0 var(--accent); }
.dt-thumb { width: 18px; height: 18px; object-fit: cover; border-radius: 4px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--text3); background: repeating-conic-gradient(#cfd3da 0 25%, #fff 0 50%) 0 0 / 6px 6px; }
span.dt-thumb { background: none; }
.dt-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); flex: none; }
.dt-x { width: 20px; height: 20px; border: 0; background: none; border-radius: 5px; display: flex; align-items: center; justify-content: center; color: var(--text3); padding: 0; flex: none; opacity: 0; }
.dt-tab:hover .dt-x, .dt-tab.on .dt-x { opacity: 1; }
.dt-x:hover { background: var(--panel3); color: var(--text); }
.dt-add { width: 28px; height: 28px; margin: 0 0 2px 4px; border: 0; background: none; border-radius: 7px; color: var(--text2); display: flex; align-items: center; justify-content: center; flex: none; }
.dt-add:hover { background: var(--panel2); color: var(--text); }
/* sekmeler sığmayınca kaydırma okları: yer kaplamaz, kenarda sabit durur */
.dt-nav { position: sticky; z-index: 2; align-self: stretch; width: 30px; flex: none; border: 0; padding: 0; display: flex; align-items: center; justify-content: center; color: var(--text2); opacity: 0; pointer-events: none; transition: opacity .15s; }
.dt-nav.l { left: -8px; margin: 0 -30px 0 -8px; background: linear-gradient(90deg, var(--bg) 60%, transparent); justify-content: flex-start; padding-left: 6px; }
.dt-nav.r { right: -8px; margin: 0 -8px 0 -30px; background: linear-gradient(270deg, var(--bg) 60%, transparent); justify-content: flex-end; padding-right: 6px; }
.dt-nav:hover { color: var(--text); }
#docTabs.can-l .dt-nav.l, #docTabs.can-r .dt-nav.r { opacity: 1; pointer-events: auto; }

/* yazı tipi seçicide kullanıcı yazı tipleri */
.fp-user { display: flex; align-items: center; }
.fp-user .fp-item { flex: 1; min-width: 0; }
.fp-del { width: 24px; height: 24px; border: 0; background: none; border-radius: 6px; color: var(--text3); display: flex; align-items: center; justify-content: center; padding: 0; flex: none; }
.fp-del:hover { background: var(--panel3); color: var(--danger); }
.fp .btn.block { margin: 8px 0 0; }

#workspace { flex: 1; display: flex; min-height: 0; }
#toolbar {
  width: 60px; flex: none; background: var(--bg2); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; padding: 8px 0; gap: 4px; overflow-y: auto;
}
.tool-btn {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none;
  background: none; border: 0; border-radius: 11px; padding: 0; color: var(--text2);
  transition: background .12s, color .12s;
}
.tool-btn:hover { background: var(--panel2); color: var(--text); }
.tool-btn.on { background: var(--accent-soft); color: var(--text); }
.tool-btn.on .ico { color: var(--accent); }
/* masaüstünde üzerine gelme göstergesi mor şerittir; şerit kalkınca altta solmakta olan gri zemin bir an parlayıp titremesin */
body:not(.mobile) .tool-btn[data-tool] { transition: none; }
body:not(.mobile) .tool-btn[data-tool]:hover:not(.on) { background: none; }
/* araç çubuğunun en altındaki destek düğmesi */
.tool-btn.tb-support { margin-top: auto; flex-direction: column; gap: 2px; width: 56px; height: 50px; font-size: 9px; white-space: nowrap; font-weight: 600; letter-spacing: .02em; color: var(--text3); }
.tool-btn.tb-support .ico { color: #ff5a8a; }
/* üzerine gelme zemini yumuşak gelir ve daha yavaş söner: fare kenardan hızlıca girip çıkınca
   zemin ve yazı yanıp sönmez, aradaki bir tonda yumuşakça kalır */
.tool-btn.tb-support { transition: background-color .3s ease-out, color .3s ease-out; }
.tool-btn.tb-support:hover { background-color: var(--panel2); color: var(--text); transition: background-color .18s ease-in, color .18s ease-in; }
.sup-heart { position: relative; display: inline-flex; flex: none; will-change: transform; }
.sup-heart > svg { position: relative; }
.sup-heart .sh-body { fill: #ff3b78; fill-opacity: 0; }
/* parıltı filter ile değil, arkadaki yumuşak ışığın saydamlığıyla verilir; kalp ve ışık hep kendi katmanında durur.
   Böylece animasyon başlarken ve biterken katman açılıp kapanmaz, kalp ile yanındaki yazı bir an parlayıp titremez */
.sup-heart .sh-glow { position: absolute; inset: -45%; border-radius: 50%; pointer-events: none; opacity: 0; will-change: opacity;
  background: radial-gradient(closest-side, rgba(255,59,120,.55), rgba(255,59,120,.18) 55%, rgba(255,59,120,0)); }
/* üstüne gelince bir kez oynar: kalp dolar, atar, parlar, üzerinden beyazımsı ışık geçer ve ilk haline yumuşakça döner.
   Sınıfı JS ekler ve animasyon bitince kaldırır; fare erken çıksa da yarıda kesilmez */
.sup-heart.beat { animation: supbeat 1.4s ease-in-out; }
.sup-heart.beat .sh-body { animation: supfill 1.4s ease-in-out; }
.sup-heart.beat .sh-glow { animation: supglow 1.4s ease-in-out; }
@keyframes supbeat { 0%, 100% { transform: scale(1); } 16% { transform: scale(1.22); } 30% { transform: scale(1.06); } 44% { transform: scale(1.18); } 70% { transform: scale(1.04); } }
@keyframes supfill { 0% { fill-opacity: 0; } 14%, 70% { fill-opacity: 1; } 100% { fill-opacity: 0; } }
@keyframes supglow { 0%, 100% { opacity: 0; } 16%, 44% { opacity: 1; } 30% { opacity: .7; } 70% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .sup-heart.beat, .sup-heart.beat .sh-body, .sup-heart.beat .sh-glow { animation: none; } }
/* araç düğmesinin üzerine gelince açılan mor şerit: simge + ad + kısayol */
.tool-fly {
  position: fixed; z-index: 900; display: flex; align-items: center; gap: 10px; padding: 0 14px 0 10px;
  color: #fff; pointer-events: none; white-space: nowrap;
  font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.tool-fly > * { flex: none; position: relative; }
/* Mor zemin ve parıltısı ayrı bir katman: yalnızca transform ile açılır (akıcı, bitişte görüntü değişmez) */
.tool-fly > .tf-bg {
  position: absolute; inset: 0; z-index: -1; border-radius: 11px; background: var(--accent);
  box-shadow: 0 0 0 1px rgba(255,255,255,.1) inset, 0 6px 22px -4px var(--accent), 0 0 18px -6px var(--accent);
  transform-origin: left center; will-change: transform;
}
.tool-fly.rtl > .tf-bg { transform-origin: right center; }
.tool-fly .tf-name, .tool-fly kbd { will-change: opacity, transform; }
.tool-fly.rtl { flex-direction: row-reverse; padding: 0 10px 0 14px; }
.tool-fly .tf-ico { display: flex; }
.tool-fly .tf-ico .ico { color: #fff; }
.tool-fly kbd { font: 600 11px/1 inherit; font-family: inherit; letter-spacing: 0; text-transform: none; padding: 3px 6px; border-radius: 5px; background: rgba(255,255,255,.2); }

#toolpanel { background: var(--panel); min-height: 0; }
.dock-col { flex: none; background: var(--panel); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.dock-grp { display: flex; flex-direction: column; min-height: 0; flex-basis: 0; }
.tp-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--line); min-height: 50px;
}
.tp-head h3 { margin: 0; font-size: 18px; font-weight: 600; }
.tp-actions { display: flex; gap: 6px; transition: opacity .15s; }
.tp-actions.dim { opacity: .35; pointer-events: none; }
.tp-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 2px 24px 12px; scrollbar-gutter: stable; }

#stageWrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#stage { flex: 1; position: relative; overflow: hidden; background: var(--stage); touch-action: none; }
#view { position: absolute; left: 0; top: 0; }
#bottombar {
  height: 42px; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px; background: var(--bg2); border-top: 1px solid var(--line); gap: 8px;
}
.bb-group { display: flex; align-items: center; gap: 4px; min-width: 0; }
.bb-group:first-child { overflow: hidden; }
.bb-info { color: var(--text2); font-size: 12px; margin-left: 10px; white-space: nowrap; }
.bb-info.dim { color: var(--text3); }
.bb-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
/* döndürme açısı adımı: "Angle: 15°" ve açılır ok */
.bb-drop { display: flex; align-items: center; gap: 4px; background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; padding: 3px 6px 3px 8px; font-size: 12px; color: var(--text2); white-space: nowrap; }
.bb-drop:hover { color: var(--text); border-color: var(--line2, var(--text3)); }
.bb-drop b { color: var(--text); font-weight: 600; }
.bb-drop .ico { opacity: .7; }
.zoom-label { background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; min-width: 58px; font-size: 12px; }


/* panel genişliği tutamaçları ve yer değiştirme */
.pane-resizer { flex: none; width: 7px; margin: 0 -3px; position: relative; z-index: 6; cursor: col-resize; touch-action: none; }
.pane-resizer::after { content: ''; position: absolute; top: 0; bottom: 0; left: 3px; width: 1px; background: transparent; transition: background .15s; }
.pane-resizer:hover::after, .pane-resizer.on::after { background: var(--accent); width: 2px; left: 2px; }
.tp-head { cursor: grab; }
.tp-head:active { cursor: grabbing; }
/* arayüz sürükleme: imleci takip eden kart ve bırakma alanı */
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 2000; pointer-events: none; display: flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 9px; background: var(--panel); border: 1px solid var(--accent); box-shadow: var(--shadow); font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.drag-ghost .ico { color: var(--accent); }
.drag-ghost.no { border-color: var(--line2); opacity: .75; }
.drag-ghost.no .ico { color: var(--text3); }
.drop-hint { position: fixed; z-index: 1990; pointer-events: none; border: 2px solid var(--accent); border-radius: 10px; background: rgba(108, 99, 255, .2); display: flex; align-items: center; justify-content: center; opacity: 0; transition: left .12s, top .12s, width .12s, height .12s, opacity .1s; }
.drop-hint.show { opacity: 1; }
.drop-hint.same { border-style: dashed; border-color: var(--line2); background: rgba(128, 128, 128, .08); }
.drop-hint span { background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.35); text-align: center; max-width: 90%; }
.drop-hint.same span { background: var(--panel3); color: var(--text2); }
body.dragging-ui, body.dragging-ui * { cursor: grabbing !important; user-select: none; }
.rp-tab, .rp-phead { cursor: grab; }
.rp-phead { display: flex; align-items: center; gap: 7px; padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--text2); border-bottom: 1px solid var(--line); background: var(--bg2); flex: none; }
.rp-phead .ico { color: var(--text3); }
.rp-split { flex: none; height: 6px; cursor: row-resize; position: relative; border-top: 1px solid var(--line); }
.rp-split:hover, .rp-split.on { background: var(--accent-soft); }
.tool-btn.drag { opacity: .35; }
.tool-btn.over-top { box-shadow: 0 -3px 0 var(--accent); }
.tool-btn.over-bot { box-shadow: 0 3px 0 var(--accent); }
.rp-tabs { display: flex; border-bottom: 1px solid var(--line); }
.rp-tab { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 6px; background: none; border: 0; padding: 11px 6px; color: var(--text3); border-bottom: 2px solid transparent; }
.rp-tab.on { color: var(--text); border-bottom-color: var(--accent); }
.rp-pane { display: none; flex: 1; min-height: 0; flex-direction: column; }
.rp-pane.on { display: flex; }
#layers { display: flex; flex-direction: column; flex: 1; min-height: 0; }
#historyList { flex: 1; overflow-y: auto; padding: 6px 0; scrollbar-gutter: stable both-edges; }

/* ---------------------------------------------------------------- düğmeler */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--panel3); border: 1px solid var(--line2); border-radius: 8px;
  padding: 7px 12px; color: var(--text); white-space: nowrap; transition: background .12s, border-color .12s, transform .05s;
}
.btn:hover { background: var(--line2); }
/* basınca küçülür (aşağı kaymaz: kaydırılabilir kutuların sonundaki düğme taşıp kaydırma çubuğu açmasın) */
.btn:active { transform: scale(.97); }
/* degrade kenarlığın altına da uzansın: aksi hâlde kenarlarda degradenin öbür ucu (mavi şerit) görünür */
.btn.primary { background: var(--grad) border-box; border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: var(--danger); border-color: transparent; color: #fff; }
.btn.small { padding: 6px 11px; font-size: 13px; }
.btn.block { width: 100%; margin: 4px 0; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text2); }
.btn.ghost:hover { background: var(--panel2); color: var(--text); }
.btn:disabled { opacity: .4; pointer-events: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  background: none; border: 0; border-radius: 8px; color: var(--text2); flex: none;
}
.icon-btn:hover { background: var(--panel2); color: var(--text); }
.icon-btn.on { color: var(--accent); background: var(--accent-soft); }
.icon-btn.sm { width: 26px; height: 26px; }
.icon-btn:disabled { opacity: .3; pointer-events: none; }
.icon-btn.fixed { opacity: .55; cursor: not-allowed; }
.icon-btn.fixed:hover { background: var(--accent-soft); color: var(--accent); }
.btn-row { display: flex; gap: 6px; margin: 6px 0; flex-wrap: wrap; }
.btn-row .icon-btn { background: var(--panel2); border: 1px solid var(--line); }
.btn-row .icon-btn:hover { background: var(--panel3); }
.row { display: flex; align-items: center; gap: 8px; margin: 6px 0; flex-wrap: wrap; } /* dar panelde alt satıra geçer */
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

/* ---------------------------------------------------------------- form alanları */
.field { margin: 10px 0; }
.fld-label { display: block; font-size: 14px; color: var(--text); margin-bottom: 6px; }
.num-field input { width: 100%; }
.note { color: var(--text3); font-size: 12.5px; margin: 8px 0; line-height: 1.5; }
.note.accent { color: var(--accent2); }
.note.size-note { margin: -2px 0 10px; color: var(--danger); font-weight: 600; }

.slider { margin: 12px 0 13px; }
.slider.compact { margin: 4px 0; }
.sl-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.sl-label { font-size: 14px; color: var(--text); cursor: default; }
.slider.compact .sl-label { font-size: 13px; color: var(--text2); }
.sl-num { width: 60px; padding: 2px 5px !important; text-align: right; font-size: 13px; color: var(--text2); background: transparent !important; border-color: transparent !important; }
.sl-num:hover, .sl-num:focus { border-color: var(--line) !important; background: var(--panel2) !important; }
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px;
  background: var(--track); outline: none; margin: 0; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: #fff;
  border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.5); transition: transform .1s;
}
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.2); }

.seg { display: flex; background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.seg.wrap { flex-wrap: wrap; }
.seg-btn { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: none; border: 0; border-radius: 7px; padding: 7px 8px; color: var(--text2); font-size: 13px; white-space: nowrap; min-width: 0; }
/* dar panelde uzun seçenek adları düğmenin içinde alt satıra geçer (taşmaz) */
.seg:not(.icons) .seg-btn { white-space: normal; text-align: center; line-height: 1.2; }
.seg-btn:hover { color: var(--text); background: var(--panel3); }
.seg-btn.on { background: var(--accent); color: #fff; }
.seg.wrap .seg-btn { flex: 1 1 30%; min-width: max-content; } /* yazısı sığmayan düğme alt satıra geçer */
.seg.icons .seg-btn { flex: 0 0 auto; min-width: 34px; }
.seg.icons .seg-btn span { display: none; }
/* simge ızgarası: satırlar eşit dolsun (ör. Çizim aracının 12 şekli, 6'lı iki satır) */
.seg.wrap.icons { display: grid; grid-template-columns: repeat(6, 1fr); }
.seg.wrap.icons .seg-btn { min-width: 0; padding: 7px 0; }

.toggle { display: flex; align-items: center; gap: 10px; margin: 10px 0; cursor: pointer; }
.toggle input { display: none; }
.tg-track { width: 36px; height: 20px; border-radius: 20px; background: var(--track); position: relative; flex: none; transition: background .15s; }
.tg-track::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.toggle input:checked + .tg-track, .opt-head input:checked + .tg-track { background: var(--accent); }
.toggle input:checked + .tg-track::after, .opt-head input:checked + .tg-track::after { transform: translateX(16px); }
.tg-label { font-size: 14px; color: var(--text); }

/* renk / degrade alanı: solda ad, sağda tek kutu */
.color-field { margin: 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.color-field .fld-label { margin: 0; }
.color-field.bare { justify-content: flex-start; }
.cl-swatch { width: 40px; height: 30px; border-radius: 8px; border: 2px solid var(--line2); cursor: pointer; flex: none; padding: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.cl-swatch:hover, .gr-swatch:hover { border-color: var(--accent); }
.gr-swatch { width: 130px; height: 30px; border-radius: 8px; border: 2px solid var(--line2); cursor: pointer; flex: none; padding: 0; }

/* açılır-kapanır seçenek bölümü (Kontur, Gölge…) */
.opt-sec { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; background: var(--bg2); }
.opt-sec.on { border-color: var(--line2); }
.opt-head { display: flex; align-items: center; gap: 10px; padding: 11px 12px; cursor: pointer; }
.opt-head input { display: none; }
.opt-title { flex: 1; font-size: 14px; font-weight: 600; }
.opt-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.opt-sec.on .opt-wrap { grid-template-rows: 1fr; }
.opt-body { overflow: hidden; padding: 0 12px; }
.opt-sec.on .opt-body { padding-bottom: 6px; border-top: 1px solid var(--line); }

/* açılır pencere */
.popup { position: fixed; z-index: 1200; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; width: 266px; animation: pop .14s; }
.popup.wide { width: 300px; }
/* Düz renk / Degrade: seçim göstergesi iki seçenek arasında kayar */
.cp-mode .seg { position: relative; }
.cp-mode .seg::before { content: ''; position: absolute; left: 3px; top: 3px; bottom: 3px; width: calc(50% - 4px); border-radius: 7px; background: var(--accent); transition: transform .24s cubic-bezier(.2,.8,.2,1); }
.cp-mode.is-grad .seg::before { transform: translateX(calc(100% + 2px)); }
.cp-mode .seg-btn { position: relative; flex: 1 1 0; transition: color .2s; }
.cp-mode .seg-btn.on { background: none; }
.cp-mode .seg-btn:not(.on):hover { background: none; color: var(--text); }
.cp-sv { position: relative; border-radius: 8px; overflow: hidden; cursor: crosshair; touch-action: none; }
.cp-sv canvas, .cp-hue canvas { display: block; width: 100%; }
.cp-sv canvas { height: 150px; }
.cp-dot { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 1px 4px rgba(0,0,0,.5); pointer-events: none; }
.cp-hue { position: relative; margin: 12px 0 4px; height: 14px; border-radius: 7px; cursor: pointer; touch-action: none; }
.cp-hue canvas { height: 14px; border-radius: 7px; }
.cp-hdot { position: absolute; top: -3px; width: 8px; height: 20px; margin-left: -4px; border-radius: 4px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.45), 0 1px 3px rgba(0,0,0,.4); pointer-events: none; }
.cp-row { display: flex; align-items: flex-end; gap: 6px; margin-top: 10px; }
.cp-pv { display: flex; border-radius: 8px; overflow: hidden; border: 1px solid var(--line2); flex: none; height: 32px; }
.cp-old, .cp-new { width: 24px; height: 100%; border: 0; padding: 0; display: block; }
.cp-old { cursor: pointer; }
.cp-f { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.cp-f span { font-size: 12px; color: var(--text2); }
.cp-f input { width: 100%; padding: 5px 6px; font-size: 13px; }
.cp-f.wide { flex: 2; }
.cp-hex { font-family: Consolas, monospace; text-transform: lowercase; }
.cp-lbl { font-size: 12.5px; color: var(--text2); margin: 12px 0 6px; }
.cp-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.cp-sw { aspect-ratio: 1; border-radius: 5px; border: 1px solid rgba(128,128,128,.4); padding: 0; }
.cp-sw:hover { transform: scale(1.18); }

/* degrade düzenleyici */
.gp-title { font-weight: 600; font-size: 15px; margin-bottom: 10px; }
.gp-barwrap { position: relative; padding-bottom: 22px; }
.gp-bar { height: 34px; border-radius: 6px; cursor: copy; background: repeating-conic-gradient(#cfd3da 0 25%, #fff 0 50%) 0 0 / 10px 10px; overflow: hidden; border: 1px solid var(--line2); }
.gp-fill { width: 100%; height: 100%; }
.gp-marks { position: absolute; left: 0; right: 0; top: 34px; height: 22px; }
.gp-mark { position: absolute; top: 2px; width: 16px; height: 20px; margin-left: -8px; cursor: ew-resize; touch-action: none; }
.gp-mark::before { content: ''; position: absolute; left: 4px; top: -5px; border: 4px solid transparent; border-bottom: 5px solid var(--text2); }
.gp-mark i { position: absolute; inset: 3px 0 0; border-radius: 4px; border: 2px solid var(--text2); }
.gp-mark.on::before { border-bottom-color: var(--accent); }
.gp-mark.on i { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.gp-mark.away { opacity: .3; }
.gp-stop { margin-top: 2px; }
.gp-stoprow { display: flex; align-items: center; gap: 8px; }
.gp-stoprow .color-field { flex: 1; margin: 4px 0; }
.gp-sep { height: 1px; background: var(--line); margin: 10px 0; }
.gp-dirs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-top: -2px; }
.gp-dir { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 0; font-size: 14px; color: var(--text2); }
.gp-dir:hover { border-color: var(--accent); color: var(--text); }
.gp-presets { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.gp-pre { aspect-ratio: 1; border-radius: 7px; border: 1px solid var(--line2); padding: 0; }
.gp-pre:hover { border-color: var(--accent); transform: scale(1.06); }

.sec { border-bottom: 1px solid var(--line); padding: 2px 0; }
.sec:last-child { border-bottom: 0; }
.sec > summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; font-weight: 600; font-size: 15px; color: var(--text); cursor: pointer;
}
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary::after { content: ''; width: 7px; height: 7px; border-right: 1.6px solid var(--text3); border-bottom: 1.6px solid var(--text3); transform: rotate(45deg); margin-right: 4px; transition: transform .15s; }
.sec:not([open]) > summary::after { transform: rotate(-45deg); }
.sec-body { padding-bottom: 10px; }
.sec.sec-tg > summary::after { display: none; }
.sec.sec-tg > summary > span:first-child { flex: 0 1 auto; }
.sec.sec-tg:not(.on) > summary { color: var(--text2); }
/* bilgi simgesi başlığın hemen yanında, anahtar en sağda */
.sec-switch { margin: 0 0 0 auto; }
.sec.sec-tg > summary .info-i { margin-right: 0; }
.rs-input { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; }
.rs-val { width: 120px; font-size: 16px; font-weight: 600; }
.rs-unit { color: var(--text2); }
.rs-presets { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 2px; }
.rs-chip { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 3px 10px; font-size: 12px; color: var(--text2); }
.rs-chip:hover, .rs-chip.on { border-color: var(--accent); color: var(--text); }
.rs-explain { background: var(--accent-soft); border-radius: 9px; padding: 9px 11px; font-size: 12.5px; line-height: 1.45; color: var(--text); margin: 8px 0 4px; }
/* seçili fotoğrafın sonucu: boyut ve dosya boyutu */
.bt-dims { font-size: 12.5px; color: var(--text2); margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.bt-dims:empty { display: none; }
.bt-dims b { color: var(--text); }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.tab { background: var(--panel2); border: 1px solid var(--line); border-radius: 20px; padding: 4px 10px; font-size: 12px; color: var(--text2); }
.tab:hover { color: var(--text); }
.tab.on { background: var(--accent); border-color: transparent; color: #fff; }

/* ---------------------------------------------------------------- araç paneli içerikleri */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 6px; }
.quick-btn { display: flex; flex-direction: column; align-items: center; gap: 5px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 2px 8px; font-size: 11px; color: var(--text2); }
.quick-btn:hover { border-color: var(--accent); color: var(--text); }
.quick-row { display: flex; gap: 5px; flex-wrap: wrap; margin: 8px 0 4px; }
.quick-row { flex-wrap: nowrap; }
.quick-row .btn { flex: 1 1 0; min-width: 0; padding: 5px 4px; }

.fx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 6px 0; }
.fx-card { display: flex; flex-direction: column; gap: 4px; min-width: 0; background: none; border: 0; padding: 0; text-align: center; font-size: 12.5px; color: var(--text2); }
/* filtre ayarları: panelin altında sabit durur, filtre listesi kaymaz */
.fx-card canvas { width: 100%; aspect-ratio: 1; border-radius: 9px; border: 2px solid transparent; background: var(--panel2); display: block; }
.fx-card:hover canvas { border-color: var(--line2); }
.fx-card.on canvas { border-color: var(--accent); }
.fx-card.on span { color: var(--text); font-weight: 600; }
.fx-card span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hist-wrap { background: var(--panel2); border-radius: 9px; padding: 6px; margin: 6px 0; }
.hist { width: 100%; height: 64px; display: block; }
.curve-wrap canvas { width: 100%; aspect-ratio: 1; background: var(--panel2); border-radius: 9px; margin-top: 8px; display: block; cursor: crosshair; }
.hsl-dots { display: flex; gap: 6px; justify-content: space-between; margin: 6px 0; }
.hsl-pv { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; }
.hsl-sw { flex: 1; height: 18px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.hsl-arrow { display: flex; color: var(--text3); }
.hsl-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; padding: 0; }
.hsl-dot.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.hsl-dot.pick { display: flex; align-items: center; justify-content: center; background: var(--panel3); color: var(--text2); border: 1px dashed var(--line2); }
.hsl-dot.pick.has { color: #fff; border-style: solid; }
.hsl-dot.pick.has .ico { filter: drop-shadow(0 0 1px rgba(0,0,0,.8)); }
.hsl-dot.pick:hover { color: var(--text); border-color: var(--accent); }

.warn-box { background: rgba(255, 181, 71, .1); border: 1px solid rgba(255, 181, 71, .55); border-radius: 10px; padding: 10px 12px 12px; margin: 4px 0 10px; }
.wb-head { display: flex; align-items: center; gap: 8px; color: var(--warn); }
.wb-head b { color: var(--text); font-size: 14px; }
.warn-box p { margin: 6px 0 10px; font-size: 12.5px; color: var(--text2); line-height: 1.45; }
.btn.warn-btn { background: var(--warn); border-color: transparent; color: #241600; font-weight: 600; }
.btn.warn-btn:hover { filter: brightness(1.06); background: var(--warn); }
.wb-prog { display: none; align-items: center; gap: 8px; margin-top: 10px; }
.wb-prog.on { display: flex; }
.wb-prog .bt-prog { flex: 1; margin: 0; }
.wb-prog-l { font-size: 12px; color: var(--text2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ai-card { display: flex; gap: 10px; width: 100%; text-align: left; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 6px 0; align-items: flex-start; }
.ai-card:hover { border-color: var(--accent); }
.ai-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.ai-txt { display: flex; flex-direction: column; gap: 2px; }
.ai-txt b { font-size: 12.5px; font-weight: 600; }
.ai-txt small { color: var(--text3); font-size: 11.5px; line-height: 1.35; }
.badge { font-style: normal; font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 10px; background: var(--accent2); color: #001; margin-left: 4px; vertical-align: 1px; }

.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; transition: opacity .15s; }
.preset-grid.wait { opacity: 0; pointer-events: none; }
.preset-btn { background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 4px; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.preset-btn:hover { border-color: var(--accent); }
.txt-input { min-height: 70px; }

.el-box { margin-top: 4px; }
.shape-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.shape-btn { background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 4px; display: flex; align-items: center; justify-content: center; }
.shape-btn:hover { border-color: var(--accent); }
.shape-btn.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.note.hint-on { color: var(--accent2); font-weight: 600; }
.qc-row { display: flex; align-items: center; gap: 6px; margin: 6px 0 4px; }
.qc-row .note { margin: 0 4px 0 0; }
.qc-btn { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line2); padding: 0; }
.qc-btn:hover { outline: 2px solid var(--accent); }
.btn-row.two > .btn { flex: 1 1 0; min-width: 0; }
.btn-row.two > .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.on { border-color: var(--accent); background: var(--accent-soft); }
.rm-box { display: none; margin: 4px 0 8px; padding: 10px; border: 1px solid var(--line2); border-radius: 10px; background: var(--panel2); }
.rm-box.on { display: block; animation: fade .15s; }
.rm-box .note { margin-bottom: 0; }
.shape-btn canvas { width: 48px; height: 48px; }
.emoji-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
.emoji-btn { background: none; border: 0; border-radius: 8px; font-size: 26px; padding: 4px 0; font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif; }
.emoji-btn:hover { background: var(--panel2); transform: scale(1.12); }
.frame-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.frame-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; font-size: 12.5px; color: var(--text2); padding: 0; }
.frame-btn canvas { width: 100%; aspect-ratio: 1; border-radius: 9px; border: 2px solid transparent; }
.frame-btn:hover canvas { border-color: var(--line2); }
.frame-btn.on canvas { border-color: var(--accent); }
.leak-row { display: flex; gap: 6px; margin: 6px 0; }
.leak-sw { flex: 1; height: 26px; border-radius: 7px; border: 0; }

/* ---------------------------------------------------------------- katmanlar */
.ly-list { flex: 1; overflow-y: auto; padding: 6px 0; scrollbar-gutter: stable both-edges; display: flex; flex-direction: column; gap: 3px; }
.ly-row { position: relative; display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 9px; border: 1px solid transparent; cursor: pointer; }
/* satırlar arasındaki boşluk da satıra aittir: sürüklerken sıralama çizgisinin üstünde imleç "bırakılamaz" olmaz */
.ly-row::after { content: ''; position: absolute; left: -1px; right: -1px; top: -3px; bottom: -3px; }
.ly-row:hover { background: var(--panel2); }
.ly-row.on { background: var(--accent-soft); border-color: rgba(108,99,255,.5); }
.ly-row.sel { background: var(--accent-soft); border-color: rgba(108,99,255,.28); border-style: dashed; }
.ly-row.hidden .ly-thumb, .ly-row.hidden .ly-info { opacity: .45; }
.ly-row.drag { opacity: .4; }
.ly-row.drag-hide { display: none; }
/* sürüklenen katmanın bırakılacağı yer */
.ly-ph { border: 2px dashed var(--accent); border-radius: 9px; background: var(--accent-soft); box-sizing: border-box; }
.ly-thumb { width: 40px; height: 40px; border-radius: 6px; flex: none;
  background: repeating-conic-gradient(#cfd3da 0 25%, #fff 0 50%) 0 0 / 10px 10px; border: 1px solid var(--line2); }
.ly-info { flex: 1; min-width: 0; }
.ly-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.ly-sub { font-size: 12px; color: var(--text3); }
/* satırın sürükleme alanı (::after) simgelerin üstünü kapatmasın, tıklama simgeye gelsin */
.ly-ic { position: relative; z-index: 1; background: none; border: 0; color: var(--text2); width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 6px; flex: none; padding: 0; }
.ly-ic:hover { background: var(--panel3); color: var(--text); }
.ly-ic.off { color: var(--text3); }
.ly-ic.dimmed { opacity: 0; }
.ly-row:hover .ly-ic.dimmed { opacity: .6; }
.ly-ic.on { color: var(--warn); }
.ly-props { padding: 6px 10px; border-top: 1px solid var(--line); }
.ly-props.dim { opacity: .4; pointer-events: none; }
.ly-blend-row select { padding: 5px 8px; font-size: 12px; }
/* karışım modu seçici (açılır liste görünümünde düğme) */
.blend-pick { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; color: var(--text); text-align: left; cursor: pointer; }
.blend-pick:hover, .blend-pick:focus-visible { border-color: var(--accent); outline: none; }
.ly-blend-row .blend-pick { padding: 5px 8px; font-size: 12px; }
.blend-pick .bp-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blend-pick .bp-arrow { display: flex; color: var(--text3); flex: none; }
.blend-menu .menu-item { padding-top: 4px; padding-bottom: 4px; font-size: 13px; }
.blend-menu .menu-head { padding-top: 5px; }
/* düğmeden yukarı doğru kayarak açılır */
.blend-menu { animation: bmdown .16s cubic-bezier(.25,.8,.25,1); transform-origin: top center; }
.blend-menu.up { animation-name: bmup; transform-origin: bottom center; }
@keyframes bmup { from { opacity: 0; transform: translateY(10px) scaleY(.96); } to { opacity: 1; transform: none; } }
@keyframes bmdown { from { opacity: 0; transform: translateY(-10px) scaleY(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .blend-menu { animation: none; } }
.ly-foot { display: flex; justify-content: space-around; padding: 4px; border-top: 1px solid var(--line); }

.hs-row { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; text-align: left; padding: 7px 8px; border-radius: 8px; color: var(--text2); font-size: 13.5px; }
.hs-row:hover { background: var(--panel2); color: var(--text); }
.hs-row.on { background: var(--accent-soft); color: var(--text); }
.hs-row.future { opacity: .45; }
.hs-ico { color: var(--text3); }
.hs-foot { justify-content: space-between; align-items: center; padding: 4px 6px 4px 12px; }
.hs-foot .note { margin: 0; }

/* ---------------------------------------------------------------- menü / modal / bildirim */
.menu {
  position: fixed; z-index: 1000; min-width: 220px; background: var(--panel); border: 1px solid var(--line2);
  border-radius: 10px; box-shadow: var(--shadow); padding: 5px; max-height: calc(100vh - 20px); overflow-y: auto;
}
.menu-item { display: flex; align-items: center; gap: 9px; width: 100%; background: none; border: 0; padding: 7px 10px 7px 7px; border-radius: 7px; text-align: left; font-size: 13.5px; line-height: 18px; }
.menu-item:hover { background: var(--accent); color: #fff; }
.menu-item:hover .mi-key { color: rgba(255,255,255,.8); }
.menu-item:disabled { opacity: .4; pointer-events: none; }
.mi-ico { width: 16px; height: 18px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--text2); }
.mi-key svg { display: block; color: var(--accent); }
.mi-dot { width: 14px; height: 14px; border-radius: 50%; display: block; margin: 1px; box-shadow: 0 0 0 1px rgba(0,0,0,.3); }
.menu-item:hover .mi-key svg { color: #fff; }
.menu-item:hover .mi-ico { color: #fff; }
.mi-label { flex: 1; display: flex; align-items: center; gap: 6px; }
.menu-item > .mi-label:first-child { padding-left: 3px; }
.mi-key { color: var(--text3); font-size: 11.5px; line-height: 18px; display: flex; align-items: center; margin-left: 14px; }
.mi-key:empty { margin-left: 0; }
.mi-chk { display: flex; color: var(--accent); }
.menu-item:hover .mi-chk { color: #fff; }
.menu-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.menu-head { padding: 6px 10px 2px; font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; }

.modal-wrap { position: fixed; inset: 0; z-index: 900; background: rgba(5, 8, 14, .6); display: flex; align-items: center; justify-content: center; backdrop-filter: blur(3px); animation: fade .15s; }
.modal { background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow); max-width: calc(100vw - 30px); max-height: calc(100vh - 30px); display: flex; flex-direction: column; animation: pop .18s; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px 18px; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 4px 8px 12px; overflow-y: auto; scrollbar-gutter: stable both-edges; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.modal-msg { font-size: 14px; color: var(--text); margin: 6px 0 10px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }

#toasts { position: fixed; bottom: 56px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--panel3); color: var(--text); border: 1px solid var(--line2); border-left: 4px solid var(--accent); padding: 9px 16px; border-radius: 9px; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: all .25s; max-width: 520px; font-size: 13px; }
.toast.show { opacity: 1; transform: none; }
.toast.ok { border-left-color: var(--ok); }
.toast.warn { border-left-color: var(--warn); }
.toast.error { border-left-color: var(--danger); }

#busy { position: fixed; inset: 0; z-index: 1500; background: rgba(5, 8, 14, .45); display: none; align-items: center; justify-content: center; }
#busy.show { display: flex; }
.busy-box { background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; padding: 22px 30px; display: flex; flex-direction: column; align-items: center; gap: 14px; box-shadow: var(--shadow); min-width: 240px; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Ayarlar → Animasyonlar kapalı: geçişler ve açılış animasyonları olmaz, her şey anında belirir.
   İşin sürdüğünü gösteren göstergeler (dönen halka, ilerleme şeridi, kısayol kaydı) dönmeye devam eder. */
html.no-motion *, html.no-motion *::before, html.no-motion *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
html.no-motion .spinner, html.no-motion .cp-spin { animation: spin .8s linear infinite !important; }
html.no-motion .busy-box:not(.det) .busy-bar i { animation: busyslide 1.1s ease-in-out infinite !important; }
html.no-motion .kbd-key.rec { animation: kbdrec 1s ease-in-out infinite !important; }
.busy-msg { font-size: 13.5px; color: var(--text); text-align: center; max-width: 320px; }
.busy-box { gap: 12px; min-width: 300px; padding: 22px 26px 18px; }
.busy-bar { width: 100%; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; position: relative; }
.busy-bar i { position: absolute; top: 0; bottom: 0; left: 0; width: 0; border-radius: 3px; background: var(--grad); transition: width .15s; }
.busy-box:not(.det) .busy-bar i { width: 35%; animation: busyslide 1.1s ease-in-out infinite; transition: none; }
@keyframes busyslide { from { left: -35%; } to { left: 100%; } }
.busy-box { position: relative; }
.busy-x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; }
.modal-wrap.top { z-index: 1600; }
.busy-pct { font-size: 11.5px; color: var(--text3); min-height: 15px; margin-top: -4px; font-variant-numeric: tabular-nums; }

#dropOverlay { position: fixed; inset: 0; z-index: 1800; display: none; align-items: center; justify-content: center; background: rgba(108, 99, 255, .25); border: 3px dashed var(--accent); pointer-events: none; }
#dropOverlay.show { display: flex; }
#dropOverlay div { display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--panel); padding: 26px 40px; border-radius: 14px; font-size: 16px; color: var(--accent); box-shadow: var(--shadow); }

/* ---------------------------------------------------------------- ana ekran */
#home { position: fixed; inset: 0; overflow-y: auto; background:
  radial-gradient(900px 500px at 10% -10%, rgba(124, 92, 255, .22), transparent 60%),
  radial-gradient(800px 500px at 100% 0%, rgba(0, 184, 255, .14), transparent 60%), var(--bg); }
#home { overflow: hidden; }
.home-shell { display: flex; height: 100%; }
.home-nav { width: 232px; flex: none; display: flex; flex-direction: column; gap: 4px; padding: 18px 12px 14px; background: rgba(0, 0, 0, .14); border-right: 1px solid var(--line); overflow-y: auto; }
:root[data-theme="light"] .home-nav { background: rgba(255, 255, 255, .55); }
.hn-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 16px; }
.hn-brand .logo { width: 32px; height: 32px; }
.hn-brand b { font-size: 18px; letter-spacing: -.2px; }
.hn-label { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text3); padding: 14px 10px 4px; }
.hn-group { display: flex; flex-direction: column; gap: 2px; }
.hn-item { display: flex; align-items: center; gap: 11px; width: 100%; background: none; border: 0; border-radius: 9px; padding: 9px 10px; color: var(--text2); text-align: left; font-size: 13.5px; }
.hn-item:hover { background: var(--panel2); color: var(--text); }
a.hn-item, a.home-card { text-decoration: none; cursor: pointer; }
a.home-card { color: inherit; }
.hn-item .ico { color: var(--text3); }
.hn-item:hover .ico { color: var(--accent); }
.home-nav .spacer { flex: 1; min-height: 16px; }
.home-main { flex: 1; min-width: 0; overflow-y: auto; scrollbar-gutter: stable; }
.home-inner { max-width: 1320px; margin: 0 auto; padding: 36px 40px 60px; }
.home-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.home-open { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.home-open .note { margin: 0; }
.ho-list { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ho-chip { display: flex; align-items: center; gap: 7px; max-width: 220px; padding: 5px 12px 5px 6px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line2); font-size: 13px; }
.ho-chip img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.ho-chip span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ho-chip:hover, .ho-chip.on { border-color: var(--accent); }
.rc-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 30px; border: 1px dashed var(--line2); border-radius: 14px; color: var(--text3); }
.rc-empty p { margin: 0; }
.rc-card { position: relative; }
.rc-pinmark { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--warn); color: #241600; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.home-brand { display: flex; align-items: center; gap: 18px; }
.home-brand h1 { margin: 0; font-size: 38px; letter-spacing: -.5px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-brand p { margin: 2px 0 0; color: var(--text2); font-size: 15px; }
.home-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (min-width: 1280px) { .home-cards { grid-template-columns: repeat(6, 1fr); } }
.home-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px; transition: transform .12s, border-color .12s; }
.home-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.home-card.primary { background: var(--grad) border-box; border-color: transparent; color: #fff; }
.home-card.primary .hc-s { color: rgba(255,255,255,.85); }
.home-card.primary .hc-ico { background: rgba(255,255,255,.2); color: #fff; }
.hc-ico { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.hc-t { font-size: 15px; font-weight: 600; }
.hc-s { font-size: 12px; color: var(--text3); }
.home-drop { margin: 16px 0 6px; border: 2px dashed var(--line2); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text2); }
.home-drop b { color: var(--text); font-size: 14px; }
/* özellik sayfasının resim seçme penceresi */
.start-drop { margin: 0 0 12px; padding: 30px 22px; transition: border-color .15s, background-color .15s; }
.start-drop.over { border-color: var(--accent); background: var(--panel2); }
.start-drop .btn { margin-top: 10px; }
.home-inner h2 { font-size: 16px; margin: 26px 0 12px; }
.home-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.quick-size { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 8px 12px; }
.quick-size:hover { border-color: var(--accent); }
.quick-size small { color: var(--text3); font-size: 11px; }
.quick-size b { font-size: 12px; font-weight: 600; text-align: center; }
.qs-box { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.qs-box i { display: block; border: 2px solid var(--accent); border-radius: 4px; background: var(--accent-soft); }
.home-recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.rc-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.rc-card.pinned { border-color: var(--warn); }
.rc-thumb { background: repeating-conic-gradient(#2a2e37 0 25%, #23262e 0 50%) 0 0 / 16px 16px; border: 0; padding: 0; height: 140px; display: flex; align-items: center; justify-content: center; }
.rc-thumb img { max-width: 100%; max-height: 140px; display: block; }
.rc-info { padding: 8px 10px 2px; display: flex; flex-direction: column; min-width: 0; }
.rc-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.rc-info small { color: var(--text3); }
.rc-acts { display: flex; justify-content: flex-end; padding: 0 4px 4px; }

/* ---------------------------------------------------------------- dışa aktarma */
.exp { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.exp-pv-wrap { background: repeating-conic-gradient(#2a2e37 0 25%, #23262e 0 50%) 0 0 / 16px 16px; border-radius: 10px; min-height: 300px; display: flex; align-items: center; justify-content: center; padding: 10px; }
.exp-preview { max-width: 100%; max-height: 300px; box-shadow: 0 4px 20px rgba(0,0,0,.4); }
.exp-info { margin-top: 10px; color: var(--text2); text-align: center; }

/* ---------------------------------------------------------------- kolaj */
.col-wrap { display: flex; gap: 16px; height: min(70vh, 720px); }
.col-side { width: 270px; flex: none; overflow-y: auto; scrollbar-gutter: stable; }
.col-stage { flex: 1; background: var(--stage); border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; min-width: 0; }
.col-canvas { box-shadow: 0 6px 30px rgba(0,0,0,.4); cursor: pointer; }
.col-layouts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.col-lay { background: var(--panel2); border: 2px solid transparent; border-radius: 9px; padding: 3px; display: flex; justify-content: center; }
.col-lay canvas { width: 46px; height: 46px; }
.col-lay.on { border-color: var(--accent); }

/* ---------------------------------------------------------------- toplu */
.bt-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 18px; height: min(68vh, 680px); }
.bt-left { display: flex; flex-direction: column; min-height: 0; }
.bt-right { overflow-y: auto; scrollbar-gutter: stable; }
.bt-list { flex: 1; overflow-y: auto; scrollbar-gutter: stable; background: var(--panel2); border-radius: 10px; padding: 6px; min-height: 120px; }
.bt-empty { color: var(--text3); text-align: center; padding: 40px 20px; border: 2px dashed var(--line2); border-radius: 10px; }
.bt-item { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 7px; }
.bt-item:hover { background: var(--panel3); }
.bt-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-size { color: var(--text3); font-size: 11.5px; }
.bt-pv-wrap { margin-top: 10px; }
.bt-pv { max-width: 100%; max-height: 220px; border-radius: 8px; display: block; }
.bt-prog { height: 6px; background: var(--panel3); border-radius: 6px; overflow: hidden; margin-top: 10px; }
.bt-bar { height: 100%; width: 0; background: var(--grad); transition: width .2s; }

/* ---------------------------------------------------------------- GIF oluşturucu / sıkıştırıcı */
.gif-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 18px; height: min(72vh, 720px); height: round(min(72vh, 720px), 1px); }
.gif-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; gap: 10px; }
.gif-side { overflow-y: auto; scrollbar-gutter: stable; }
.gif-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gif-toolbar .spacer { flex: 1; }
.gif-stage { flex: 1; min-height: 180px; display: flex; flex-direction: column; background: var(--stage); border-radius: 12px; overflow: hidden; }
.gif-pvwrap { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 10px; background: repeating-conic-gradient(#2a2e37 0 25%, #23262e 0 50%) 0 0 / 16px 16px; }
.gif-pv { max-width: 100%; max-height: 100%; box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.gif-pvbar { display: flex; align-items: center; gap: 8px; padding: 4px 10px; background: var(--panel2); font-size: 12.5px; color: var(--text2); }
.gif-pvbar .spacer { flex: 1; }
.gif-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; min-height: 128px; flex: none; }
.gif-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text3); border: 2px dashed var(--line2); border-radius: 12px; padding: 18px; text-align: center; }
.gif-empty b { color: var(--text2); }
.gif-fr { flex: none; width: 100px; background: var(--panel2); border: 2px solid transparent; border-radius: 10px; padding: 6px 6px 4px; position: relative; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.gif-fr:hover { border-color: var(--line2); }
.gif-fr.on { border-color: var(--accent); }
.gif-fr.drag { opacity: .4; }
.gif-fr.over { box-shadow: -4px 0 0 var(--accent); }
.gif-fr canvas { width: 84px; height: 64px; border-radius: 6px; background: repeating-conic-gradient(#cfd3da 0 25%, #fff 0 50%) 0 0 / 8px 8px; }
.gif-no { position: absolute; top: 2px; left: 4px; font-size: 10.5px; color: var(--text3); z-index: 1; background: var(--panel2); border-radius: 6px; padding: 0 4px; }
.gif-fr-row { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--text3); }
.gif-delay { width: 56px; padding: 2px 4px !important; font-size: 12px; text-align: right; }
.gif-fr-acts { display: flex; gap: 2px; opacity: 0; }
.gif-fr:hover .gif-fr-acts { opacity: 1; }
.gif-fr-acts button { width: 24px; height: 22px; border: 0; background: none; border-radius: 5px; color: var(--text2); display: flex; align-items: center; justify-content: center; padding: 0; }
.gif-fr-acts button:hover { background: var(--panel3); color: var(--text); }
.gif-res { display: flex; align-items: center; gap: 12px; flex: none; }
.gif-res .bt-prog { flex: 1; margin: 0; }
.gif-res-img img { max-height: 64px; max-width: 120px; border-radius: 6px; display: block; }
.gif-res-info { flex: 1; display: flex; flex-direction: column; font-size: 12.5px; color: var(--text2); }
.gif-res-info b { color: var(--ok); font-size: 15px; }
.gif-res-info .note { margin: 0; font-size: 11.5px; }
.gif-res-wait { flex: 1; display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--text2); min-height: 40px; }
.gif-res-img img { -webkit-user-drag: none; }
.gif-video { width: 100%; max-height: 300px; border-radius: 10px; background: #000; }
.gif-stats { font-variant-numeric: tabular-nums; }
.inline-apply { display: flex; gap: 6px; align-items: stretch; }
.inline-apply input { flex: 1; min-width: 0; }
.inline-apply .btn { height: auto; flex: none; }
.cp-list { flex: 1; overflow-y: auto; scrollbar-gutter: stable; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.cp-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: var(--panel2); border-radius: 10px; }
.cp-item canvas { border-radius: 7px; flex: none; }
.cp-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cp-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: 13.5px; }
.cp-name small, .cp-note { color: var(--text3); font-size: 11.5px; }
.cp-res { display: flex; align-items: center; gap: 12px; }
.cp-stack { display: flex; flex-direction: column; align-items: flex-end; }
.cp-acts { display: flex; align-items: center; gap: 2px; flex: none; }
.cp-save { font-size: 17px; font-weight: 700; color: var(--ok); min-width: 54px; text-align: right; }
.cp-save.none { color: var(--text3); }
.cp-save.more { color: var(--warn); }
.cp-sizes { font-size: 12.5px; color: var(--text2); white-space: nowrap; }
.cp-err { color: var(--danger); font-weight: 600; }
.cp-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.cp-total { font-weight: 600; color: var(--text); flex: none; }
.cp-cmp { display: block; max-width: 100%; border-radius: 8px; cursor: ew-resize; background: repeating-conic-gradient(#2a2e37 0 25%, #23262e 0 50%) 0 0 / 16px 16px; }

/* ---------------------------------------------------------------- diğer */
.anchor-grid { display: grid; grid-template-columns: repeat(3, 26px); gap: 4px; }
.anc { width: 26px; height: 26px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line2); padding: 0; }
.anc.on { background: var(--accent); border-color: var(--accent); }
.kbd-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.kbd-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
kbd { background: var(--panel3); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 6px; padding: 2px 7px; font: 11.5px Consolas, monospace; white-space: nowrap; }
/* ayarlar */
.settings-modal .modal-body { padding: 0; }
.set-wrap { display: grid; grid-template-columns: 190px 1fr; height: min(72vh, 560px); }
.set-nav { border-right: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 2px; background: var(--bg2); }
.set-tab { display: flex; align-items: center; gap: 10px; background: none; border: 0; border-radius: 8px; padding: 9px 10px; text-align: left; color: var(--text2); font-size: 13.5px; }
.set-tab:hover { background: var(--panel2); color: var(--text); }
.set-tab.on { background: var(--accent-soft); color: var(--text); }
.set-tab.on .ico { color: var(--accent); }
.set-body { padding: 6px 22px 18px; overflow-y: auto; scrollbar-gutter: stable; min-height: 0; }
.set-title { margin: 12px 0 6px; font-size: 17px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.set-l b { font-weight: 600; font-size: 14px; }
.set-l small { color: var(--text3); font-size: 12px; line-height: 1.35; }
.set-c { flex: none; display: flex; justify-content: flex-end; min-width: 0; max-width: 62%; }
.set-c .field, .set-c .toggle, .set-c .slider, .set-c .color-field { margin: 0; }
.set-c .slider { width: 220px; }
.set-c .slider .sl-top { margin-bottom: 4px; justify-content: flex-end; }
.set-block { padding: 10px 0 14px; border-bottom: 1px solid var(--line); }
.set-block .set-l { margin-bottom: 10px; }
.lang-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lang-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 11px; font-size: 13px; color: var(--text2); }
.lang-card:hover { border-color: var(--line2); color: var(--text); }
.lang-card.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); font-weight: 600; }
.flag { display: block; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); flex: none; }
/* yazının gözle görülen ortası (büyük harf ile küçük harf yüksekliğinin ortası) satır kutusunun ~1,5 px altındadır.
   Bayrak satırın tam ortasında kalır, dil adı o kadar yukarı alınır: ikisi hem birbiriyle hem satırla ortalı görünür. */
.hn-lang > span, .menu-item:has(.flag) .mi-label { transform: translateY(-1.5px); }
/* ikonlu düğmelerde de yazı ikonun ortasına gelsin (aynı ~1,5 px fark) */
.btn > .ico + span { position: relative; top: -1.5px; }

.about { padding: 4px 0 6px; }
.ab-hero { text-align: center; padding: 18px 10px 20px; margin: 0 -18px 16px; background: radial-gradient(420px 160px at 50% 0%, rgba(124, 92, 255, .22), transparent 70%); }
.ab-hero .logo { margin: 0 auto 10px; width: 72px; height: 72px; filter: drop-shadow(0 8px 22px rgba(108, 99, 255, .45)); }
.ab-name { display: flex; align-items: center; justify-content: center; gap: 10px; }
.ab-name h2 { margin: 0; font-size: 28px; letter-spacing: -.4px; }
.ab-ver { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(108, 99, 255, .35); }
.ab-tag { margin: 8px 0 0; color: var(--text2); font-size: 14.5px; }
.ab-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ab-feat { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; color: var(--text); }
.ab-feat > span:first-child { color: var(--accent); display: flex; }
.ab-privacy { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 14px; border-radius: 12px; background: rgba(47, 209, 139, .08); border: 1px solid rgba(47, 209, 139, .28); }
.ab-shield { color: var(--ok); display: flex; flex: none; margin-top: 1px; }
.ab-privacy b { font-size: 14px; }
.ab-privacy p { margin: 4px 0 0; color: var(--text2); font-size: 12.5px; line-height: 1.5; }
.i18n-wait body { visibility: hidden; }

/* Açılış ekranı */
#splash { position: fixed; inset: 0; z-index: 100000; visibility: visible; background: #121419; color: #f2f4f8; font-family: 'Segoe UI', system-ui, sans-serif; transition: opacity .35s ease; }
#splash.out { opacity: 0; pointer-events: none; }
#splash > * { position: absolute; left: 50%; transform: translateX(-50%); text-align: center; white-space: nowrap; }
#splash svg { top: calc(50% - 102px); width: 72px; height: 72px; }
.sp-name { top: calc(50% - 18px); height: 40px; line-height: 40px; font-size: 30px; font-weight: 600; }
.sp-tag { top: calc(50% + 22px); height: 20px; line-height: 20px; font-size: 14px; color: #8b93a7; }
.sp-bar { top: calc(50% + 68px); width: 240px; height: 4px; border-radius: 2px; background: #262a33; overflow: hidden; }
.sp-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; background: linear-gradient(90deg, #7c5cff, #00c2ff) 0 0 / 240px 100%; }
.sp-bar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent) no-repeat; background-size: 60px 100%; animation: sp-shine 1.1s linear infinite; }
@keyframes sp-shine { from { background-position: -60px 0; } to { background-position: 240px 0; } }
.sp-msg { top: calc(50% + 84px); height: 18px; line-height: 18px; font-size: 13px; color: #8b93a7; }

/* ---------------------------------------------------------------- tuval üstü öğeler */
.stage-ui { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.stage-ui > * { pointer-events: auto; }
/* tuval üzerinde yazma: metin tuvalde çizilir, alan yalnızca imleci ve seçimi gösterir */
.txt-inline {
  position: absolute; margin: 0; border: 1px dashed rgba(79,140,255,.9); outline: none; resize: none; overflow: hidden;
  background: transparent; color: transparent; white-space: pre; transform-origin: 50% 50%;
  box-sizing: border-box; user-select: text; cursor: text;
}
.txt-inline::selection { background: rgba(79,140,255,.45); color: transparent; }
.txt-inline.plain {
  color: var(--text); background: var(--panel); border: 1px solid var(--accent); border-radius: 8px;
  padding: 8px 10px; font: 15px/1.4 "Segoe UI", sans-serif; box-shadow: var(--shadow);
}
.txt-inline.plain::selection, .txt-inline.plain *::selection { color: #fff; }
.txt-inline *::selection { background: rgba(79,140,255,.45); color: transparent; }
/* tuval üzerinde yazarken imleç ve seçim ayrıca çizilir (.txt-deco); tarayıcınınki gizlenir */
.txt-inline:not(.plain)::selection, .txt-inline:not(.plain) *::selection { background: transparent; }
.txt-deco { position: absolute; pointer-events: none; transform-origin: 50% 50%; }
.txt-deco > div { position: absolute; }
.txt-selbox { background: rgba(79,140,255,.45); }
.txt-caret { animation: txt-blink 1.06s steps(1) infinite; }
@keyframes txt-blink { 50% { opacity: 0; } }
.txt-inline.plain { height: auto; white-space: pre-wrap; }
/* panelde ayar yapılırken yazma alanında seçili kalan bölüm */
.txt-inline.plain .sel-pend { background: rgba(79,140,255,.38); }
.txt-scope { margin: 0 0 8px; color: var(--accent); }

/* yazı tipi seçici */
.font-pick { width: 100%; text-align: left; background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 30px 8px 10px; font-size: 17px; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.font-pick::after { content: ''; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; border-right: 1.6px solid var(--text3); border-bottom: 1.6px solid var(--text3); transform: translateY(-70%) rotate(45deg); }
.font-pick:hover { border-color: var(--accent); }
/* arama kutusu (filtre, efekt, şekil, çerçeve listeleri) */
.srch { position: relative; display: flex; align-items: center; margin: 6px 0 8px; }
.srch-ic { position: absolute; left: 9px; display: flex; color: var(--text3); pointer-events: none; }
.srch-in { width: 100%; height: 32px; padding: 0 30px 0 32px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); color: var(--text); font-size: 13px; }
.srch-in:focus { border-color: var(--accent); outline: none; }
.srch-in::-webkit-search-cancel-button { display: none; }
.srch-x { position: absolute; right: 5px; width: 22px; height: 22px; display: none; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: none; color: var(--text3); }
.srch-x:hover { color: var(--text); background: var(--panel3); }
.srch.has .srch-x { display: flex; }
.srch-none { grid-column: 1 / -1; padding: 14px 4px; text-align: center; color: var(--text3); font-size: 12.5px; }
.popup.fontpop { width: 290px; padding: 10px; }
.fp-search { margin-bottom: 8px; }
.fp-list { max-height: min(60vh, 520px); overflow-y: auto; scrollbar-gutter: stable; margin: 0 -4px; }
.fp-head { position: sticky; top: 0; background: var(--panel); font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: .4px; padding: 8px 6px 4px; z-index: 1; }
.fp-head small { text-transform: none; letter-spacing: 0; }
.fp-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 7px; padding: 6px 8px; font-size: 19px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-item:hover { background: var(--panel2); }
.fp-item.on { background: var(--accent-soft); color: var(--text); }

@media (max-width: 1100px) {
  #menubar .mb-item { padding: 6px 7px; }
  .home-nav { width: 190px; }
  .home-inner { padding: 28px 24px 50px; }
}
@media (max-width: 760px) {
  .home-nav { display: none; }
  .home-cards { grid-template-columns: 1fr 1fr; }
  .gif-wrap { grid-template-columns: 1fr; }
  .exp, .bt-wrap { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- 1.3 eklemeleri */
/* "i" bilgi simgesi ve açıklama baloncuğu */
.info-i { display: inline-flex; align-items: center; justify-content: center; color: var(--text3); cursor: help; margin-left: 6px; border-radius: 50%; flex: none; vertical-align: middle; outline: none; }
.info-i:hover, .info-i:focus-visible { color: var(--accent); }
.info-i .ico { stroke-width: 2; }
.info-tip { position: fixed; z-index: 3000; max-width: 300px; padding: 9px 12px; background: var(--panel); color: var(--text); border: 1px solid var(--line2); border-radius: 10px; box-shadow: var(--shadow); font-size: 12.5px; line-height: 1.5; pointer-events: none; animation: tipin .12s ease-out; }
@keyframes tipin { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.fld-label.with-info { display: flex; align-items: center; }
.fld-label.with-info .info-i { margin-left: 5px; }
.sec > summary .info-i { margin-right: auto; margin-left: 7px; }
.sl-top .info-i { margin-right: auto; margin-left: 5px; }
.toggle .info-i { margin-left: 2px; }

/* ana ekran: destekle, son projelerde seçme */
.hn-support .ico { color: #ff5a8a; }
.hn-support:hover .ico { color: #ff3b78; }
.rc-head { align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 26px 0 12px; }
.rc-head h2 { margin: 0 0 4px; }
.rc-title { display: flex; flex-direction: column; }
.rc-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rc-tools .note { margin-right: 4px; }
.rc-thumb { position: relative; cursor: pointer; }
/* fareyle tıklanan kart, sonra bir tuşa basılınca klavye odak çerçevesi göstermesin (seçim zaten mor çerçeveyle görünür) */
.rc-thumb:focus, .rc-thumb:focus-visible { outline: none; }
.home-recent:not(.selecting) .rc-check { display: none; }
.home-recent.selecting .rc-acts { visibility: hidden; }
.rc-check { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 7px; border: 2px solid rgba(255,255,255,.85); background: rgba(0,0,0,.35); color: transparent; display: flex; align-items: center; justify-content: center; }
.rc-card.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.rc-card.sel .rc-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.home-recent.selecting .rc-card:not(.sel) .rc-thumb img { opacity: .8; }

/* hakkında: ad ve sürüm aynı eksende, alt alta */
.ab-title { margin: 0; font-size: 28px; line-height: 1.15; letter-spacing: -.4px; }
.ab-hero .ab-ver { display: inline-block; margin-top: 8px; }

/* destekleyin */
.support { display: flex; flex-direction: column; gap: 10px; padding-bottom: 6px; }
.sp-hero { text-align: center; padding: 6px 10px 8px; }
.sp-heart { display: inline-flex; color: #ff4f86; filter: drop-shadow(0 6px 16px rgba(255, 79, 134, .35)); }
.sp-hero p { margin: 8px 0 0; color: var(--text2); line-height: 1.5; }
.sp-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.sp-link:hover { border-color: var(--accent); }
.sp-link.primary { background: linear-gradient(135deg, rgba(255,79,134,.16), rgba(124,92,255,.16)); border-color: rgba(255,79,134,.45); }
.sp-ico { display: flex; color: var(--accent); flex: none; }
.sp-link.primary .sp-ico { color: #ff4f86; }
.sp-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sp-txt small { color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-go { display: flex; color: var(--text3); }

/* lisanslar */
.lic { display: flex; flex-direction: column; gap: 8px; }
.lic-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; }
.lic-row small { grid-column: 1 / -1; color: var(--text2); }
.lic-tag { font-size: 11.5px; padding: 1px 8px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); align-self: center; }

/* klavye kısayolları (düzenlenebilir) */
.kbd-modal .modal-body { max-height: min(72vh, 680px); }
.kbd-group { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--text3); margin: 14px 0 4px; }
.kbd-group:first-child { margin-top: 2px; }
.kbd-c { display: flex; align-items: center; gap: 4px; }
.kbd-sp { width: 26px; }
.kbd-alt { font-size: 11.5px; color: var(--text3, var(--text2)); margin-right: 6px; white-space: nowrap; }
.kbd-key { min-width: 92px; padding: 4px 10px; border-radius: 7px; background: var(--panel2); border: 1px solid var(--line2); border-bottom-width: 2px; color: var(--text); font: 600 12px/1.4 Consolas, "Segoe UI", monospace; text-align: center; cursor: pointer; }
.kbd-key:hover { border-color: var(--accent); }
.kbd-key.custom { color: var(--accent); }
.kbd-key.none { color: var(--text3); font-weight: 400; }
.kbd-key.rec { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); animation: kbdrec 1s ease-in-out infinite; }
@keyframes kbdrec { 50% { box-shadow: 0 0 0 3px var(--accent-soft); } }

/* sıkıştırıcı: eski ayarlarla sıkıştırılmış resimler */
.cp-stale { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 8px; border-radius: 10px; background: var(--accent-soft); border: 1px solid rgba(108, 99, 255, .35); font-size: 13px; }
.cp-stale > span:first-child { display: flex; color: var(--accent); }
.cp-stale > span:nth-child(2) { flex: 1; }
.cp-note.old { color: var(--warn); }

/* toplu düzenleme: liste | büyük önizleme | ayarlar */
.batch-modal .bt-wrap { grid-template-columns: 230px minmax(0, 1fr) 330px; height: min(74vh, 760px); }
.bt-item { cursor: pointer; }
.bt-item.on { background: var(--accent-soft); }
.bt-th { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; flex: none; background: var(--panel3); }
.bt-center { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.bt-center .bt-pv-wrap { flex: 1; min-height: 0; margin: 0; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: repeating-conic-gradient(#2a2e37 0 25%, #23262e 0 50%) 0 0 / 16px 16px; overflow: hidden; }
.bt-center .bt-pv { max-width: 100%; max-height: 100%; border-radius: 0; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.bt-pv-bar { display: flex; align-items: center; gap: 6px; padding-top: 8px; }
.bt-pv-info { color: var(--text2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 1000px) { .batch-modal .bt-wrap { grid-template-columns: 1fr; height: auto; } .bt-center .bt-pv-wrap { height: 300px; } }

/* ---------------------------------------------------------------- 1.4 eklemeleri */
/* ekrandan renk seçme: büyüteç */
.eyedrop { position: fixed; inset: 0; z-index: 5000; cursor: none; }
/* çerçeve kenarlık değil gölge halkası: kenarlık içeriği 4 px kaydırıyor, büyütülen görüntü imlecin tam altında durmuyordu */
.ed-loupe { position: fixed; left: 0; top: 0; width: 148px; height: 148px; pointer-events: none; will-change: transform; border-radius: 50%; box-shadow: 0 0 0 4px var(--ring, #fff), 0 0 0 5px rgba(0,0,0,.6), 0 8px 26px rgba(0,0,0,.45); }
.ed-loupe canvas { display: block; border-radius: 50%; }
/* arayüzün üstünde renk alınmaz: büyüteç gizlenir, imleç artı işareti olur */
.ed-loupe.ui { visibility: hidden; }
.ed-lab { position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 4px 9px 4px 5px; border-radius: 12px; background: rgba(20,22,28,.92); color: #fff; font-size: 12px; white-space: nowrap; box-shadow: 0 3px 10px rgba(0,0,0,.4); }
.ed-lab .ed-zoom { opacity: .6; margin-left: 2px; }
.ed-lab i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,.7); }
.ed-hint { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); padding: 7px 14px; border-radius: 16px; background: rgba(20,22,28,.9); color: #fff; font-size: 13px; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
/* katmanlar: en alttaki arka plan rengi satırı */
.ly-paper { display: flex; align-items: center; gap: 8px; margin: 0 6px 6px; padding: 5px 6px; border-radius: 9px; border: 1px dashed var(--line2); cursor: pointer; flex: none; }
.ly-paper:hover { background: var(--panel2); }
.ly-paper-sw { width: 40px; height: 40px; border-radius: 6px; flex: none; border: 1px solid var(--line2); }
.ly-paper-sw.none { background: repeating-conic-gradient(#cfd3da 0 25%, #fff 0 50%) 0 0 / 10px 10px; }
/* araç panellerinde üstte sabit kalan ayar alanı (efekt, filtre, ayarlama) */
.fx-head { position: sticky; top: -8px; z-index: 3; margin: -8px -2px 8px -12px; padding: 10px 2px 10px 12px; background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: 0 8px 16px -10px rgba(0,0,0,.45); }
.fx-head.at-bottom { top: auto; bottom: -24px; margin: 10px -2px -24px -12px; padding-bottom: 14px; border-bottom: 0; border-top: 1px solid var(--line); box-shadow: 0 -8px 16px -10px rgba(0,0,0,.45); }
.fx-head.at-bottom.empty { padding: 9px 12px 12px; }
.fx-head .tabs { margin-bottom: 0; }
.fx-head .hist-wrap { margin-bottom: 8px; }
.fx-head-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.fx-head-title { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-head.empty .fx-head-title { color: var(--text3); font-weight: 500; font-size: 13.5px; }
.fx-head.empty .fx-head-row { margin-bottom: 0; }
.fx-scroll { max-height: 40vh; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; margin: 0 -6px; padding: 0 6px; }
.fx-adv { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.fx-adv.open { grid-template-rows: 1fr; }
.fx-adv-in { min-height: 0; overflow: hidden; }
.fx-more { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 6px; padding: 6px; border: 1px solid var(--line2); border-radius: 8px; background: var(--panel2); color: var(--text2); font-size: 12.5px; }
.fx-more:hover { color: var(--text); background: var(--panel3); }
.fx-more .ico { transition: transform .22s; }
.fx-more.open .ico { transform: rotate(180deg); }
.peek-btn { touch-action: none; user-select: none; }
.peek-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-size: 12.5px; cursor: pointer; align-self: flex-start; }
.link-btn:hover { text-decoration: underline; }
.sec > summary .sec-act { margin-left: auto; margin-right: 6px; width: 26px; height: 26px; }
.sec > summary .info-i + .sec-act { margin-left: 0; }

/* ---------------------------------------------------------------- telefon (dar ekran)
   Araçlar en altta yatay şerit; araç paneli şeridin üstünde alttan açılan çekmece (kapalıyken yalnızca başlığı görünür);
   Katmanlar / Geçmiş sağdan açılan çekmece. Dokunmayla kullanım için düğmeler büyür, fareye özgü düğmeler gizlenir. */
#btnLayersM { display: none; }
body.mobile {
  --m-bar: 58px; --m-head: 50px; --m-sheet: min(42vh, 400px);
}
body.mobile #topbar { padding: 0 6px; gap: 4px; }
body.mobile .brand b { display: none; }
body.mobile #menubar { margin-left: 0; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; min-width: 0; flex: 1; }
body.mobile #menubar::-webkit-scrollbar { display: none; }
body.mobile #menubar .mb-item { padding: 8px 8px; white-space: nowrap; }
body.mobile #topbar .spacer, body.mobile #btnHelp { display: none; }
body.mobile #btnSave2 span { display: none; }
body.mobile #btnLayersM { display: flex; }
body.mobile #workspace { position: relative; padding-bottom: calc(var(--m-bar) + var(--m-head)); }
body.mobile.m-open #workspace { padding-bottom: calc(var(--m-bar) + var(--m-sheet)); }
body.mobile #toolbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; width: auto; height: var(--m-bar);
  flex-direction: row; justify-content: flex-start; padding: 0 6px; gap: 2px; overflow-x: auto; overflow-y: hidden;
  border: 0 !important; border-top: 1px solid var(--line) !important; scrollbar-width: none;
}
body.mobile #toolbar::-webkit-scrollbar { display: none; }
body.mobile .tool-btn { width: 46px; height: 46px; }
/* telefonda araç düğmeleri satırı tam doldurur, aralarındaki boşluk eşittir; sığmazsa yine kaydırılır */
body.mobile #toolbar { justify-content: space-between; gap: 0; }
body.mobile #toolbar .tool-btn[data-tool] { flex: 1 1 0; width: auto; min-width: 36px; max-width: 52px; }
body.mobile .tool-btn.tb-support { display: none; }
body.mobile .pane-resizer { display: none; }
body.mobile .dock-col.m-tool {
  position: fixed; left: 0; right: 0; bottom: var(--m-bar); z-index: 35; height: var(--m-head);
  border-top: 1px solid var(--line); border-radius: 14px 14px 0 0; box-shadow: 0 -8px 24px rgba(0,0,0,.35);
  transition: height .2s ease; overflow: hidden;
}
body.mobile.m-open .dock-col.m-tool { height: var(--m-sheet); }
body.mobile .m-tool .tp-head { cursor: pointer; position: relative; padding-top: 14px; }
body.mobile .m-tool .tp-head::before { content: ''; position: absolute; left: 50%; top: 5px; width: 38px; height: 4px; margin-left: -19px; border-radius: 2px; background: var(--line); }
body.mobile .dock-col.m-sidebar {
  position: fixed; top: 44px; right: 0; bottom: var(--m-bar); z-index: 45; width: min(86vw, 330px);
  border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgba(0,0,0,.4);
  transform: translateX(105%); transition: transform .2s ease;
}
body.mobile.m-side .dock-col.m-sidebar { transform: none; }
/* alt çubuk: yakınlaştırma, sığdır, geri al / yinele kalır */
body.mobile #bottombar { height: 40px; padding: 0 4px; }
body.mobile #docInfo, body.mobile #cursorPos, body.mobile #btnGrid, body.mobile #btnSnap, body.mobile #btnSpace, body.mobile #btnFree,
body.mobile #btnRotStep, body.mobile #btnRotSnap, body.mobile #bottombar .bb-sep, body.mobile #btnCompare span { display: none; }
body.mobile .tp-body { padding: 8px 8px 24px 12px; }
body.mobile .icon-btn { min-width: 36px; min-height: 36px; }


/* metin şablonları */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.tpl-btn { padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #2a2d35; aspect-ratio: 14 / 9; overflow: hidden; display: flex; align-items: center; justify-content: center; transition: border-color .12s, transform .12s; }
.tpl-btn:hover { border-color: var(--accent); }
.tpl-btn:active { transform: scale(.97); }
.tpl-btn canvas { width: 100%; height: 100%; display: block; }

/* Dar panelde yazılar kesilmesin ya da düğmeden taşmasın: düğme en uzun kelimesinden dar olmaz, uzun adlar alt satıra
   geçer, sığmayan düğmeler bir alt sıraya iner */
.tp-body .seg:not(.icons) { flex-wrap: wrap; }
.tp-body .seg:not(.icons) .seg-btn { min-width: min-content; }
.tp-body .quick-row { flex-wrap: wrap; }
.tp-body .quick-row .btn, .tp-body .btn-row.two > .btn { min-width: min-content; white-space: normal; text-align: center; line-height: 1.2; }
.tp-body .btn-row.two > .btn span { white-space: normal; overflow: visible; }
.fx-card span { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; line-height: 1.25; }
/* alt çubuk dar alanda kesilmez, yatay kaydırılır */
#bottombar { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
#bottombar::-webkit-scrollbar { display: none; }
#bottombar .bb-group { flex: none; }
#bottombar .bb-group:first-child { overflow: visible; }
.bg-add { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bg-add > .note { margin: 0; white-space: nowrap; }
.bg-presets { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; }
.bg-presets .qc-btn { width: auto; height: auto; aspect-ratio: 1; max-width: 26px; }
.ly-row.ly-land { z-index: 2; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.ly-row.ly-land:not(.on) { background: var(--panel2); }
