/* Görsel düzenleme grubu — sitenin kırmızı temasıyla uyumlu, yalnız .pd altında geçerli. */
.pd{--pd-stage:520px;--pd-red:#ee3c55;border:1px solid #ffffff25;border-radius:22px;background:#111421;padding:22px;box-shadow:0 30px 90px #0006;color:#f7f6fa}
.pd-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px;align-items:start}
.pd-main{min-width:0;display:flex;flex-direction:column;gap:12px}
.pd-drop{position:relative;min-height:380px;border:1px dashed #bf687b70;border-radius:16px;background:#0c0f1a;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:24px;text-align:center;cursor:pointer;transition:border-color .2s,background .2s}
.pd-drop:hover,.pd-drop.is-over{border-color:var(--pd-red);background:#f43c5512}
.pd-drop:focus-within{outline:2px solid #ff92a0;outline-offset:3px}
.pd-file{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.pd-up{width:42px;height:42px;color:#f9788b;margin-bottom:8px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.pd-drop strong{font-size:16px}.pd-drop span{color:#aeb0c3;font-size:13px}.pd-drop small{color:#7f8196;font-size:11px}
.pd-stage,.pd-result{display:flex;flex-direction:column;align-items:center;gap:12px;border-radius:16px;background:#0c0f1a;padding:14px;min-height:240px;justify-content:center}
.pd-stage[hidden],.pd-result[hidden]{display:none}
.pd-preview{max-width:100%;max-height:var(--pd-stage);border-radius:10px;object-fit:contain}
.pd-side{display:flex;flex-direction:column;gap:14px;min-width:0}
.pd-field{display:flex;flex-direction:column;gap:8px}
.pd-label{font-size:12px;font-weight:600;color:#c6c5d3}
.pd-hint{font-size:11px;color:#8d8fa3;line-height:1.5}
.pd input[type=text],.pd textarea{background:#0b0e18;border:1px solid #ffffff1e;color:#fff;border-radius:10px;padding:11px;width:100%;min-width:0;font:inherit;font-size:14px;resize:vertical}
.pd input[type=text]:focus,.pd textarea:focus{border-color:var(--pd-red);outline:none}
.pd-chips{display:flex;flex-wrap:wrap;gap:7px}
.pd-chip{display:inline-flex;align-items:center;gap:7px;padding:9px 13px;border-radius:20px;background:#ffffff08;border:1px solid #ffffff16;font-size:12px;color:#e6e5ee;min-height:38px}
.pd-chip:hover{border-color:#f26c8299}
.pd-chip.is-on{background:#94233e;border-color:#f26c82;color:#fff}
.pd-chip i{width:16px;height:16px;border-radius:50%;border:1px solid #ffffff50;display:block}
.pd-ratio{display:block;height:16px;max-width:30px;border:1.5px solid currentColor;border-radius:3px;opacity:.85}
.pd-suggest{display:flex;flex-wrap:wrap;gap:6px;margin-top:-4px}
.pd-sug{background:#ffffff06;border:1px solid #ffffff12;border-radius:14px;padding:6px 10px;font-size:11px;color:#c9c8d6;text-align:left}
.pd-sug:hover{border-color:#f26c82;color:#fff}
.pd-range{display:flex;align-items:center;gap:10px;font-size:12px;color:#c6c5d3}
.pd-range input{flex:1;accent-color:var(--pd-red)}
.pd-run{width:100%;min-height:48px;font-size:14px}
.pd-run:disabled{opacity:.4;cursor:not-allowed;transform:none}
.pd.is-busy .pd-run{opacity:.7}
.pd-change{align-self:flex-start;background:#ffffff0a;border:1px solid #ffffff1a;border-radius:10px;padding:8px 12px;font-size:12px;color:#e6e5ee}
.pd-status{font-size:12px;color:#f5a1ae;line-height:1.6;min-height:18px;margin:0;overflow-wrap:anywhere}
.pd-status.is-error{color:#ff9d83}
.pd-note{font-size:11px;color:#8d8fa3;line-height:1.6;margin:0}
/* Kabuk gövdeyi .tool-panel içine basıyor: çift çerçeve olmasın */
.tool-panel .pd{border:0;background:none;box-shadow:none;padding:0}
.pd-need{margin:0;font-size:13px;font-weight:600;color:#ffb4c0;background:#f43c5514;border:1px solid #f43c5540;border-radius:10px;padding:10px 12px}
.pd-refs{display:flex;flex-wrap:wrap;gap:8px}
.pd-ref{position:relative;width:64px;height:64px;border-radius:8px;overflow:hidden;border:1px solid #ffffff20;background:#0b0d19}
.pd-ref img{width:100%;height:100%;object-fit:cover;display:block}
.pd-ref button{position:absolute;top:2px;right:2px;width:22px;height:22px;border-radius:50%;background:#000a;color:#fff;font-size:14px;line-height:22px;padding:0}
.pd-ref-add{width:64px;height:64px;border-radius:8px;border:1px dashed #bf687b90;background:#0c0f1a;color:#f9788b;font-size:26px;position:relative;overflow:hidden}
.pd-ref-add input{position:absolute;inset:0;opacity:0;cursor:pointer}
/* Kadraj önizlemesi: çizgili alan = yapay zekânın dolduracağı yer */
.pd-frame{position:relative;max-width:100%;max-height:var(--pd-stage);display:flex;align-items:center;justify-content:center;overflow:hidden;border:1.5px dashed #f26c82;border-radius:10px;background:repeating-linear-gradient(45deg,#f43c551c 0 10px,#0c0f1a 10px 20px)}
.pd-frame img{display:block;max-width:100%;max-height:100%;object-fit:contain;box-shadow:0 0 0 1px #ffffff30}
/* Maske editörü */
.pd-mask{position:relative;max-width:100%;touch-action:none;user-select:none;-webkit-user-select:none;border-radius:10px;overflow:hidden}
.pd-mask canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.pd-mask-paint{opacity:.55;cursor:none;touch-action:none}
.pd-cursor{position:absolute;pointer-events:none;border:2px solid #fff;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 0 1px #0008}
.pd-cursor.is-eraser{border-style:dashed}
/* Sonuç ve önce/sonra kaydırıcısı */
.pd-out{--split:50%;--ar:1/1;position:relative;width:min(100%,calc(var(--pd-stage) * (var(--ar))));aspect-ratio:var(--ar);border-radius:10px;overflow:hidden;background:#0b0d19}
.pd-out img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block}
.pd-checker{background-color:#d9dbe4;background-image:conic-gradient(#f4f5f9 25%,transparent 0 50%,#f4f5f9 0 75%,transparent 0);background-size:20px 20px}
.pd-before{position:absolute;inset:0;clip-path:inset(0 calc(100% - var(--split)) 0 0);background:#0b0d19}
.pd-line{position:absolute;top:0;bottom:0;left:var(--split);width:2px;background:#fff;pointer-events:none;box-shadow:0 0 6px #0008}
.pd-line:after{content:'';position:absolute;top:50%;left:50%;width:26px;height:26px;border-radius:50%;background:#fff;transform:translate(-50%,-50%);box-shadow:0 2px 8px #0006}
.pd-compare input{position:absolute;inset:0;opacity:0;width:100%;height:100%;margin:0;cursor:ew-resize}
.pd-compare input:focus-visible{opacity:.2}
.pd-tag{position:absolute;top:10px;font-size:10px;letter-spacing:1px;padding:4px 7px;border-radius:5px;background:#0b0d19bb;color:#fff;pointer-events:none;text-transform:uppercase}
.pd-tag-b{left:10px}.pd-tag-a{right:10px}
.pd-thumbs{display:flex;gap:8px}
.pd-thumb{width:64px;height:64px;border-radius:8px;overflow:hidden;border:2px solid transparent;padding:0;background:#0b0d19}
.pd-thumb.is-on{border-color:#f26c82}.pd-thumb img{width:100%;height:100%;object-fit:cover}
.pd-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.pd-actions .btn{min-height:42px}
@media(max-width:820px){.pd-grid{grid-template-columns:1fr}.pd-side{order:2}}
@media(max-width:650px){.pd{--pd-stage:340px;padding:14px;border-radius:16px}.pd-drop{min-height:220px}.pd-stage,.pd-result{padding:8px;min-height:180px}}
