/* =========================================================
   PXE FOTO — fotoğraf düzenleme & rötuş (js/apps/foto.js)
   Bütün sınıflar os-ft- ile başlar.
   ========================================================= */
.os-ft { --ft: #3D7BFF; position: relative; height: 100%; overflow: hidden; background: #0D0C0B; color: var(--os-fg); container-type: inline-size; }
.os-ft-app { height: 100%; display: flex; flex-direction: column; }

/* menü çubuğu */
.os-ft-menu { flex: none; height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 6px; background: #171615; border-bottom: 1px solid rgba(242, 238, 231, .06); }
.os-ft-menus { display: flex; gap: 1px; flex: none; }
.os-ft-menus button { padding: 5px 8px; border-radius: 5px; font-size: 12px; color: #B9B2A6; white-space: nowrap; }
.os-ft-menus button:hover, .os-ft-menus button.is-on { background: var(--os-p2); color: var(--os-fg); }
.os-ft-acts { flex: none; display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* iş sekmeleri — belge sekmelerinin yeri (menünün hemen altı); taşarsa yatay kayar */
.os-ft-docs { position: relative; flex: none; height: 32px; display: flex; align-items: flex-end; gap: 2px; padding: 0 6px; background: #121110; border-bottom: 1px solid rgba(242, 238, 231, .06); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.os-ft-docs::-webkit-scrollbar { display: none; }
.os-ft-docs button { position: relative; flex: none; height: 27px; padding: 0 14px 0 27px; border-radius: 6px 6px 0 0; background: rgba(242, 238, 231, .03); font: 500 11.5px/1 var(--f-body); color: var(--os-mut); white-space: nowrap; transition: color .15s, background .15s; }
.os-ft-docs button::before { content: ""; position: absolute; left: 11px; top: 50%; width: 8px; height: 10px; margin-top: -5px; border-radius: 1.5px; background: currentColor; opacity: .35; clip-path: polygon(0 0, 62% 0, 100% 32%, 100% 100%, 0 100%); }
.os-ft-docs button:hover { color: var(--os-fg); background: rgba(242, 238, 231, .06); }
.os-ft-docs button[aria-selected="true"] { background: #242220; color: #F2EEE7; box-shadow: inset 0 2px 0 var(--ft); }
.os-ft-docs button[aria-selected="true"]::before { background: var(--ft); opacity: 1; }
.os-ft-docs button:focus-visible { outline: 2px solid var(--ft); outline-offset: -2px; }
.os .os-ft-acts .chip { height: 26px; padding: 0 11px; font-size: 11.5px; color: var(--os-fg); }
.os .os-ft-acts .btn { height: 26px; padding: 0 12px; font-size: 10px; }

/* seçenek çubuğu */
.os-ft-opt { flex: none; height: 42px; display: flex; align-items: center; gap: 14px; padding: 0 10px; background: #151413; border-bottom: 1px solid rgba(242, 238, 231, .06); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.os-ft-opt::-webkit-scrollbar { display: none; }
.os-ft-og { flex: none; display: flex; align-items: center; gap: 10px; }
.os .os-ft-opt .chip { height: 26px; padding: 0 10px; font-size: 11.5px; color: var(--os-fg); }
.os .os-ft-opt .btn { height: 28px; padding: 0 14px; font-size: 10px; }
.os-ft-ib { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--os-line); font: 700 14px/1 var(--f-mono); color: var(--os-fg); }
.os-ft-ib:hover { background: var(--os-p2); }
.os-ft-rg { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: #B9B2A6; white-space: nowrap; }
.os-ft-rg input { width: 92px; }
.os-ft-rg output { min-width: 26px; font: 400 10.5px/1 var(--f-mono); color: var(--os-mut); }
.os .os-ft input[type="range"] { accent-color: var(--ft); }
.os-ft-pal { display: flex; align-items: center; gap: 5px; }
.os-ft-pal button { width: 18px; height: 18px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.os-ft-pal button[aria-pressed="true"] { outline: 2px solid #F2EEE7; outline-offset: 1px; }
.os-ft-cin { width: 26px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.os-ft-sep { width: 1px; height: 20px; background: var(--os-line); }
.os-ft-pk { display: flex; align-items: center; gap: 8px; font: 400 11px/1 var(--f-mono); }
.os-ft-pk i { width: 18px; height: 18px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.os-ft-oh { margin-left: auto; padding-left: 12px; font: 400 10px/1 var(--f-mono); color: var(--os-mut); white-space: nowrap; }

/* ana alan: araçlar | tuval | paneller */
.os-ft-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 46px minmax(0, 1fr) 292px; }
.os-ft-tools { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 5px; background: #171615; border-right: 1px solid rgba(242, 238, 231, .06); }
.os-ft-tools button { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 7px; color: #CFC8BB; transition: background .15s, color .15s; }
.os-ft-tools button:hover { background: var(--os-p2); color: #fff; }
.os-ft-tools button[aria-pressed="true"] { background: var(--ft); color: #fff; }
.os-ft-tools svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.os-ft-fg { width: 22px; height: 22px; flex: none; margin-top: auto; border-radius: 5px; box-shadow: 0 0 0 2px #F2EEE7, 0 0 0 3px #000; }

.os-ft-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #242220; touch-action: none; }
.os-ft-stage[data-tool="tasi"], .os-ft-stage.is-space { cursor: grab; }
.os-ft-stage.is-grab { cursor: grabbing; }
.os-ft-stage[data-tool="zoom"] { cursor: zoom-in; }
.os-ft-stage[data-tool="kirp"], .os-ft-stage[data-tool="damla"] { cursor: crosshair; }
.os-ft-stage[data-tool="firca"], .os-ft-stage[data-tool="silgi"], .os-ft-stage[data-tool="yama"] { cursor: none; }
.os-ft-stage[data-tool="metin"] { cursor: text; }
.os-ft-stage.is-space { cursor: grab; }
.os-ft-cv { position: absolute; inset: 0; width: 100%; height: 100%; }
.os-ft-cur { position: absolute; left: 0; top: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .92); box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(0, 0, 0, .3); pointer-events: none; }
.os-ft-split { position: absolute; z-index: 2; width: 28px; cursor: ew-resize; touch-action: none; }
.os-ft-split::before { content: ""; position: absolute; left: 13px; top: 0; bottom: 0; width: 2px; background: #F2EEE7; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3); }
.os-ft-split::after { content: "‹ ›"; position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; display: grid; place-items: center; border-radius: 50%; background: #F2EEE7; color: #0E0D0C; font: 700 13px/1 var(--f-mono); box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
.os-ft-split span { position: absolute; top: 10px; padding: 4px 8px; border-radius: 4px; background: rgba(14, 13, 12, .78); font: 700 9.5px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: #F2EEE7; white-space: nowrap; pointer-events: none; }
.os-ft-split span:first-child { right: 20px; }
.os-ft-split span:last-child { left: 20px; }
.os-ft-tin { position: absolute; z-index: 3; width: min(70%, 900px); padding: 0 4px; border: 1px dashed rgba(255, 255, 255, .85); border-radius: 2px; background: rgba(0, 0, 0, .1); font-family: var(--f-display); font-weight: 800; line-height: 1.2; letter-spacing: 0; outline: none; }
.os-ft-zl { position: absolute; left: 10px; bottom: 8px; padding: 3px 7px; border-radius: 4px; background: rgba(14, 13, 12, .7); font: 400 10px/1 var(--f-mono); color: #B9B2A6; pointer-events: none; }

/* sağ paneller */
.os-ft-side { min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 4px; padding: 4px; background: #0D0C0B; }
.os-ft-side .os-pnl { flex: none; }
.os-ft-hist { display: block; width: calc(100% - 20px); height: 92px; margin: 10px 10px 0; border-radius: 4px; background: #121110; }
.os-ft-hs { padding: 8px 10px 10px; font: 400 10px/1.45 var(--f-mono); color: var(--os-mut); }
.os-ft-hs b { color: var(--os-fg); font-weight: 700; }
.os-ft-hb { display: flex; gap: 4px; overflow: visible !important; }
.os-ft-hb button { padding: 4px 7px; border-radius: 4px; border: 1px solid var(--os-line); font: 700 9px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: #CFC8BB; }
.os-ft-hb button:hover { background: var(--os-p2); color: #fff; }
.os-ft-adj { display: grid; gap: 9px; padding: 12px 12px 14px; }
.os-ft-adj label { display: grid; grid-template-columns: 76px 1fr 32px; align-items: center; gap: 8px; font-size: 12px; }
.os-ft-adj output { font: 400 10.5px/1 var(--f-mono); color: var(--os-mut); text-align: right; }
.os-ft-pre { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 10px; }
.os-ft-pre button { min-width: 0; display: grid; gap: 4px; padding: 3px; border-radius: 6px; text-align: center; transition: background .15s; }
.os-ft-pre button:hover { background: var(--os-p2); }
.os-ft-pre button[aria-pressed="true"] { background: rgba(61, 123, 255, .18); box-shadow: inset 0 0 0 1.5px var(--ft); }
.os-ft-pre canvas { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 3px; background: #000; }
.os-ft-pre span { font-size: 10px; line-height: 1.2; color: #CFC8BB; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-ft-lop { display: grid; grid-template-columns: 58px 1fr 40px; align-items: center; gap: 8px; padding: 10px 12px 6px; font-size: 12px; }
.os-ft-lop output { font: 400 10.5px/1 var(--f-mono); color: var(--os-mut); text-align: right; }
.os-ft-lop input:disabled { opacity: .3; cursor: not-allowed; }
.os-ft-lay { display: grid; gap: 2px; padding: 4px; }
.os-ft-lr { width: 100%; display: flex; align-items: center; gap: 9px; padding: 5px 8px; border-radius: 6px; text-align: left; font-size: 12px; }
.os-ft-lr:hover { background: var(--os-p2); }
.os-ft-lr.is-sel { background: rgba(61, 123, 255, .22); }
.os-ft-eye { position: relative; width: 14px; height: 9px; flex: none; border: 1.5px solid #CFC8BB; border-radius: 50%; }
.os-ft-eye::after { content: ""; position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px; border-radius: 50%; background: #CFC8BB; }
.os-ft-lr.is-hid .os-ft-eye { opacity: .25; }
.os-ft-lr.is-hid .os-ft-lt, .os-ft-lr.is-hid .os-ft-ln { opacity: .4; }
.os-ft-lt { width: 40px; height: 30px; flex: none; border-radius: 3px; background: #000; box-shadow: 0 0 0 1px rgba(242, 238, 231, .14); }
.os-ft-lt-a { display: grid; place-items: center; background: #121110; }
.os-ft-lt-a svg { width: 18px; height: 18px; fill: none; stroke: #CFC8BB; stroke-width: 1.4; }
.os-ft-lt-a path { fill: #CFC8BB; stroke: none; }
.os-ft-ln { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-ft-lr small { font: 400 10px/1 var(--f-mono); color: var(--os-mut); }
.os-ft-lock { width: 12px; height: 12px; flex: none; fill: none; stroke: var(--os-mut); stroke-width: 1.3; }
.os-ft-lf { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 10px 12px; }
.os-ft-lf button { padding: 6px 9px; border-radius: 6px; border: 1px solid var(--os-line); font-size: 11px; color: #CFC8BB; }
.os-ft-lf button:hover { background: var(--os-p2); color: #fff; }
/* katman maskesi küçük resmi */
.os-ft-ln em { font-style: normal; font-size: 10px; color: var(--os-mut); }
.os-ft-chain { width: 5px; height: 9px; flex: none; margin: 0 -5px; border: 1.2px solid var(--os-mut); border-radius: 3px; }
.os-ft-mk { position: relative; flex: none; display: block; line-height: 0; border-radius: 3px; cursor: pointer; }
.os-ft-mk:hover .os-ft-lt { box-shadow: 0 0 0 1px #F2EEE7; }
.os-ft-lr.is-sel .os-ft-mk .os-ft-lt { box-shadow: 0 0 0 1.5px var(--ft); }
.os-ft-lr.is-moff .os-ft-mk .os-ft-lt { opacity: .45; }
.os-ft-lr.is-moff .os-ft-mk::after { content: ""; position: absolute; inset: 0; border-radius: 3px; background: linear-gradient(to top right, transparent calc(50% - 1.2px), #E1251B calc(50% - 1.2px), #E1251B calc(50% + 1.2px), transparent calc(50% + 1.2px)); }
.os-ft-lt-t { display: grid; place-items: center; background: #121110; font: 800 15px/1 var(--f-display); color: #CFC8BB; }

/* sağ panel sırası: açıklama kutusu en üstte, iş paneli altında; dekupe ve kolajda katmanlar öne çıkar */
.os-ft-p-kat { order: -3; }
.os-ft-p-job { order: -2; }
.os-ft[data-tab="dekupe"] .os-ft-p-lay, .os-ft[data-tab="kolaj"] .os-ft-p-lay { order: -1; }

/* iş paneli (sekmeye özel kontroller) */
.os-ft-job { display: grid; gap: 10px; padding: 12px; }
.os-ft-job-s { margin: 0; font: 400 10.5px/1.55 var(--f-mono); color: var(--os-mut); }
.os-ft-job-s b { color: var(--os-fg); font-weight: 700; }
.os-ft-job-n { margin: 0; font-size: 11.5px; line-height: 1.5; color: var(--os-mut); }
.os-ft-job-n b { color: var(--os-fg); font-weight: 600; }
.os-ft-job-c { display: flex; flex-wrap: wrap; gap: 6px; }
.os .os-ft-job .chip { height: 26px; padding: 0 11px; font-size: 11.5px; color: var(--os-fg); }
.os-ft-job .os-ft-rg { justify-content: space-between; }
.os-ft-job .os-ft-rg input { flex: 1; width: auto; min-width: 0; }
.os-ft-jb { height: 26px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--os-line); font-size: 11px; color: #CFC8BB; white-space: nowrap; }
.os-ft-jb:hover { background: var(--os-p2); color: #fff; }
.os-ft-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 2px; border-radius: 7px; background: #121110; }
.os-ft-seg button { height: 26px; padding: 0 6px; border-radius: 5px; font-size: 11.5px; color: #B9B2A6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .15s, color .15s; }
.os-ft-seg button:hover { color: #fff; }
.os-ft-seg button[aria-pressed="true"] { background: var(--ft); color: #fff; }
.os-ft-crv { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: 5px; background: #121110; cursor: ns-resize; touch-action: none; }
.os-ft-crv-o { margin-top: -4px; font: 400 10px/1 var(--f-mono); color: var(--os-mut); }

/* durum çubuğu */
.os-ft-st { flex: none; height: 26px; display: flex; align-items: center; gap: 16px; padding: 0 12px; background: #171615; border-top: 1px solid rgba(242, 238, 231, .06); font: 400 10px/1 var(--f-mono); color: var(--os-mut); white-space: nowrap; overflow: hidden; }
.os-ft-s-doc { color: var(--os-fg); font-weight: 700; }
.os-ft-s-c { display: flex; align-items: center; gap: 6px; }
.os-ft-s-c i { width: 10px; height: 10px; border-radius: 2px; background: #333; box-shadow: 0 0 0 1px rgba(255, 255, 255, .16); }
.os-ft-s-c em { font-style: normal; }
.os-ft-s-h { margin-left: auto; overflow: hidden; text-overflow: ellipsis; }

/* açılır menü */
.os-ft-dd { position: absolute; z-index: 20; min-width: 240px; padding: 5px; border-radius: 8px; background: #22201E; border: 1px solid rgba(242, 238, 231, .1); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); animation: osFtIn .14s ease-out; }
.os-ft-dd button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 7px 10px; border-radius: 5px; font-size: 12.5px; text-align: left; white-space: nowrap; }
.os-ft-dd button:hover { background: var(--ft); color: #fff; }
.os-ft-dd kbd { border: 0; padding: 0; font-size: 10px; opacity: .55; }
.os-ft-dd hr { margin: 4px 6px; border: 0; border-top: 1px solid var(--os-line); }
@keyframes osFtIn { from { opacity: 0; transform: translateY(-4px); } }

/* dar pencere / telefon */
@container (max-width: 860px) {
  .os-ft-app { overflow-x: hidden; overflow-y: auto; }
  .os-ft-main { flex: none; display: flex; flex-direction: column; }
  .os-ft-tools { flex-direction: row; overflow-x: auto; scrollbar-width: none; border-right: 0; border-bottom: 1px solid rgba(242, 238, 231, .06); padding: 5px 8px; }
  .os-ft-tools::-webkit-scrollbar, .os-ft-menus::-webkit-scrollbar { display: none; }
  .os-ft-fg { margin: 0 4px 0 auto; }
  .os-ft-stage { flex: none; height: max(260px, 66cqw); }
  .os-ft-side { overflow: visible; }
  .os-ft-oh { display: none; }
  .os-ft-menu { justify-content: space-between; }
  .os-ft-menus { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .os-ft-st { gap: 12px; }
  .os-ft-s-h, .os-ft-s-c em { display: none; }
}
@container (max-width: 480px) {
  .os .os-ft-acts .chip { display: none; }
  .os-ft-s-dim { display: none; }
  .os-ft-adj label { grid-template-columns: 70px 1fr 30px; }
}

.os-ft:focus, .os-ft:focus-visible { outline: none; }
