/* © 2026 IG Tools — All rights reserved. */
/* Meta Cam mobile-first shell — only applies while an editor is open (body.mcs-on). The landing
   (drop zone) keeps its own layout. Pairs with shell.js and shared/ui.js. */
#mcsApp{display:contents}
.mcs-dock{display:none}

body.mcs-on #mcsApp{display:flex;flex-direction:column;position:relative}
body.mcs-on .wrap{max-width:560px;padding-left:0;padding-right:0}
body.mcs-on .wrap>header,body.mcs-on .wrap>.drop,body.mcs-on #panel,body.mcs-on .stage .tip,body.mcs-on .stage .note,
body.mcs-on #panel+*:empty{display:none!important}

/* ---- the ONE top bar (UI_RULES §1, mockup G4): same parts on every screen, CSS picks which show ---- */
.mcs-top{display:flex;align-items:center;gap:6px;min-height:calc(56px + var(--ad-handle,0px));padding:var(--ad-handle,0px) 8px 0;box-sizing:border-box;position:relative;z-index:30;margin:calc(var(--ad-gap,0px) - 26px) -18px 18px;
  background:var(--chrome-solid,var(--panel));border-bottom:1px solid var(--line)}
body.mcs-on .mcs-top{margin:0;position:sticky;top:var(--ad-top,0px)}
.mcs-home{order:1;display:flex;align-items:center;gap:8px;min-height:44px;min-width:44px;padding:0 10px;border:0;border-radius:12px;background:none;color:var(--accent);font:700 15px/1 var(--sans);cursor:pointer;justify-content:center}
.mcs-brand,.mcs-sep{display:none}
.mcs-sep{color:var(--muted);opacity:.6;order:2}
.mcs-tool{order:3;display:flex;align-items:center;gap:8px;font:700 17px/1 var(--sans);color:var(--text);padding-left:2px}
.mcs-tool svg{flex:none}
.mcs-new{order:2;display:none}
.mcs-mode{order:3;display:none;gap:2px;padding:3px;border-radius:13px;background:var(--fill)}
.mcs-mode button{min-height:40px;padding:0 9px;border:0;border-radius:10px;background:transparent;color:var(--muted);display:flex;align-items:center;justify-content:center;gap:6px;
  font:600 13px/1 var(--sans);cursor:pointer}
.mcs-mode button.on{background:var(--panel);color:var(--text);box-shadow:var(--sh)}
#mcsDl{order:5;margin-left:auto;display:none}
.mcs-top .ig-btn.pri span{white-space:nowrap}
.mcs-lang{order:6;display:flex;align-items:center;gap:2px;margin-left:auto;background:var(--fill);border-radius:10px;padding:2px 2px 2px 8px}
.mcs-theme{order:6;margin-left:auto;display:flex;align-items:center;justify-content:center;width:44px;height:44px;border:0;border-radius:12px;background:none;color:var(--text);cursor:pointer;padding:0}
.mcs-lang{margin-left:0}
.mcs-inst{width:fit-content;margin:14px auto 0;min-height:44px;padding:0 16px;border-radius:22px;display:flex;align-items:center;gap:8px;font:600 14px/1 var(--sans)}
.mcs-inst[hidden],body.mcs-on .mcs-inst{display:none}
.mcs-globe{display:flex;color:var(--muted)}
.mcs-lang button{border:0;background:none;color:var(--muted);font:600 13px/1 var(--sans);padding:8px 10px;border-radius:8px;cursor:pointer}
.mcs-lang button.on{background:var(--panel);color:var(--text);box-shadow:var(--sh)}
/* editor on a phone: Ana sayfa · Yeni foto · Düzenle|Önizle ……… İndir (araç adı ve dil gider) */
body.mcs-on .mcs-tool,body.mcs-on .mcs-lang,body.mcs-on .mcs-theme{display:none}
body.mcs-on .mcs-new,body.mcs-on #mcsDl{display:flex}
body.mcs-on .mcs-mode{display:flex}
.mcs-newbtn{display:flex!important;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:44px;padding:0;border:0;border-radius:12px!important;background:none;box-shadow:none;color:var(--text);cursor:pointer;font:600 14px/1 var(--sans)}
.mcs-newt{display:none}
@media(max-width:380px){.mcs-top .ig-btn.pri span,.mcs-mode button span{display:none}.mcs-top .ig-btn.pri{padding:0;width:44px}}
@media(max-width:380px){body.mcs-prev .mcs-mode button[data-m=edit] span{display:inline}}
/* the old landing header (logo, wordmark, TR/EN) is replaced by the bar; it stays in the DOM, off-screen, for the h1 and the language handlers */
body:not(.mcs-on) .wrap>header{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.igsb{display:none!important}
/* "Yeni foto" asks first: nothing is lost by a stray tap (UI_RULES §1) */
.mcs-ask{text-align:center;padding:4px 0 6px}
.mcs-ask-ic{display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px;border-radius:18px;background:rgba(255,59,48,.12);color:#FF3B30;margin-bottom:10px}
.mcs-ask b{display:block;font:700 19px/1.2 var(--sans);color:var(--text)}
.mcs-ask p{margin:8px 0 0;font:400 14px/1.45 var(--sans);color:var(--muted)}
.mcs-ask-btns{display:flex;gap:8px;margin-top:18px}
.mcs-ask-btns .ig-btn{flex:1;min-height:52px}
.ig-btn.mcs-danger{background:#FF3B30;color:#fff}
/* Çerçeve is an on/off switch: black dot = off, green dot = on (UI_RULES §13); desktop adds the word */
#frameBtn,.mcs-vframe{gap:8px;background:var(--panel)!important;color:var(--text)!important;border:1px solid var(--line)!important;box-shadow:var(--sh)}
#frameBtn::after,.mcs-vframe::after{content:"";flex:none;width:12px;height:12px;border-radius:50%;background:var(--text);box-shadow:0 0 0 3px rgba(128,128,128,.22)}
#frameBtn.on::after,.mcs-vframe.on::after{background:#34C759;box-shadow:0 0 0 3px rgba(52,199,89,.28)}

/* stage fills the screen between bar and dock */
body.mcs-on #stage{display:flex!important;flex-direction:column;margin-top:0;position:relative;min-height:0}
body.mcs-on #stage .editrow{flex:1;display:flex;flex-direction:column;gap:0;align-items:stretch;padding:0 12px}
body.mcs-on #stage .editcol,body.mcs-on #stage .prevcol{flex:1 1 auto;max-width:none;width:100%}
body.mcs-on #stage .editcol{padding-top:12px}

/* mode switch: edit shows the crop frame, preview shows the Story frame */
body.mcs-on:not(.mcs-prev) #stage .prevcol{display:none}
body.mcs-on.mcs-prev #stage .editcol,body.mcs-on.mcs-prev #stripwrap{display:none}
body.mcs-on #pvBlock .previewbar .pl,body.mcs-on #pvqRow,body.mcs-on #dlBtn,body.mcs-on #dlSub,body.mcs-on #dlOne{display:none!important}
body.mcs-on #pvBlock .previewbar{justify-content:flex-end}
body.mcs-on #frameBtn{display:inline-flex;align-items:center;gap:6px;min-height:40px}

/* dock */
body.mcs-on .mcs-dock{display:flex;position:fixed;left:0;right:0;bottom:var(--ad-bot,0px);z-index:30;padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px));
  background:var(--chrome-solid,var(--panel));border-top:1px solid var(--line)}
.mcs-tab{flex:1;min-height:56px;border:0;border-radius:12px;background:transparent;color:var(--muted);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  font:600 12px/1 var(--sans);cursor:pointer;position:relative}
.mcs-tab.on{color:var(--accent);background:var(--fill)}
.mcs-tab:disabled{opacity:.35;cursor:not-allowed;pointer-events:none}
.mcs-tab small{position:absolute;top:5px;right:calc(50% - 30px);font:700 10px/1 var(--sans);color:var(--accent)}

/* moved controls inside sheets */
.ig-sheet .fmt{display:flex;gap:6px;flex-wrap:wrap}
.ig-sheet .fmt button{flex:1 1 0;min-width:80px;min-height:46px;border:0;border-radius:12px;background:var(--fill);color:var(--text);font:600 14px/1 var(--sans)}
.ig-sheet .fmt button.on{background:var(--accent);color:#fff}
.ig-sheet .mcs-zoomrow{display:block!important;margin:0 0 10px}
.ig-sheet .cropHint{display:none}
.ig-sheet #center{min-height:44px;width:100%}
.ig-sheet .ig-row.on{outline:2px solid var(--accent)}

/* the existing format/quality popup becomes a bottom sheet */
body.mcs-on #dlOptsModal{align-items:flex-end;padding:0}
body.mcs-on #dlOptsModal .proc-box{max-width:560px;width:100%;margin:0 auto;border-radius:22px 22px 0 0;padding:18px 16px calc(18px + env(safe-area-inset-bottom,0px))}
body.mcs-on #dlOptsGo{min-height:48px}

/* keep the dock on screen: frame height fits between bar and dock; info strips shrink to one tidy line */
body.mcs-on .status:empty{display:none}
body.mcs-on .wrap{padding:0!important}
body.mcs-on .igsb{display:none}   /* Ana sayfa (house) in the top bar replaces the stand-alone logo bar */
body.mcs-on{padding:var(--ad-top,0px) 0 0!important;margin:0!important}
/* The notice wraps in full. It used to be clamped to two lines by a line-clamp AND a max-height
   that disagreed with it, which sliced the third line in half, mid-sentence, with no ellipsis and
   no way to read the rest. It is three short lines; there is nothing here worth hiding. */
body.mcs-on .rawbar.on{margin:6px 12px 0;padding:8px 34px 8px 12px;font:12px/1.4 var(--sans);
  max-height:none;overflow:visible}
/* A plain cap, deliberately NOT measured. A measured version shipped on 2026-10-14 and had to be
   pulled the next day: it read the frame's getBoundingClientRect().top, which is viewport-relative,
   so scrolling down made the "free space" look bigger and the picture grew — and growing it moved
   the layout, which re-fired the observer that measured it. Never size this from a live rect.
   The cap only has to stop a tall portrait from running past the viewport on a wide window; at
   phone width the picture is width-limited long before it reaches this. */
body.mcs-on .frame img{max-height:calc(100dvh - 190px)}

/* ---------- video ---------- */
.mcs-tab.v{display:none}
body.mcs-video .mcs-tab.v{display:flex}
body.mcs-video .mcs-tab.p{display:none}
body.mcs-video #stage{display:none!important}
body.mcs-video #videoPanel{display:flex!important;flex-direction:column;flex:1;position:relative;background:transparent;border:0;box-shadow:none;margin:0;padding:12px 12px 8px}
body.mcs-video.mcs-prev #videoPanel{padding-top:52px}
body.mcs-video #videoPanel .vp-grid{display:flex;flex-direction:column;align-items:stretch;gap:0}
body.mcs-video #videoPanel .vp-controls{display:none}
body.mcs-video #videoPanel .vp-media{position:relative;display:flex;justify-content:center}
.mcs-vframe{display:none!important}
body.mcs-prev .mcs-vframe{display:inline-flex!important;position:absolute;right:6px;top:-42px;align-items:center;gap:6px;min-height:40px;z-index:5}
body.mcs-video.mcs-prev .mcs-strip,body.mcs-video.mcs-prev .mcs-dock{display:none}
.mcs-moved{display:flex}
.ig-sheet .mcs-moved.fmt,.ig-sheet #vpFill,.ig-sheet #vpZoom,.ig-sheet #vpSpd{display:flex;flex-wrap:wrap}
.ig-sheet #vpFillLbl,.ig-sheet #vpZoomLbl,.ig-sheet #vpSpdLbl{display:block;margin:12px 0 6px;font:600 12px/1 var(--sans);color:var(--muted)}
.ig-sheet #vpOut{margin:12px 0;color:var(--muted);font-size:13px}
.ig-sheet .mcs-go{width:100%;min-height:50px;margin-top:6px}
.mcs-trimlab{font-size:15px;margin:0 0 6px}
.ig-seg>button.on small{opacity:.9}

/* trim strip */
.mcs-strip{padding:14px 4px 0}
.mcs-track{position:relative;height:56px;border-radius:10px;background:var(--fill);touch-action:none;user-select:none;-webkit-user-select:none}
.mcs-film{position:absolute;inset:0;display:flex;border-radius:10px;overflow:hidden}
.mcs-film canvas{display:block}
.mcs-sel{position:absolute;top:-3px;bottom:-3px;border:3px solid #FFCC00;border-left:0;border-right:0;pointer-events:none;box-sizing:border-box}
.mcs-h{position:absolute;top:-3px;bottom:-3px;width:22px;margin-left:-11px;background:#FFCC00;border-radius:7px;cursor:ew-resize;z-index:2}
.mcs-h::after{content:"";position:absolute;left:50%;top:50%;width:3px;height:20px;margin:-10px 0 0 -1.5px;border-radius:2px;background:rgba(0,0,0,.45)}
.mcs-h::before{content:"";position:absolute;inset:-12px -10px}   /* 44px+ touch target */
.mcs-trimval{text-align:center;font:600 13px/1 var(--sans);color:var(--muted);margin-top:10px;font-variant-numeric:tabular-nums}

/* a "nodim" sheet never blocks the canvas behind it (zoom, trim) */
.ig-sheet.nodim{pointer-events:none}
.ig-sheet.nodim .ig-sh-box{pointer-events:auto}
.ig-sheet #vpSpd button,.ig-sheet #vpFill button,.ig-sheet #vpZoom button{flex:1 1 28%;min-height:46px;border:0;border-radius:12px;background:var(--fill);color:var(--text);font:600 14px/1.1 var(--sans)}
.ig-sheet #vpSpd button.on,.ig-sheet #vpFill button.on,.ig-sheet #vpZoom button.on{background:var(--accent);color:#fff}

/* ---- option icons (UI_RULES §12): CSS masks, so the app's textContent rewrites on language change can never delete them ---- */
.mcs-oi::before,#photoMode [data-pm="fill"]::before,#photoMode [data-pm="fit"]::before,#photoFill [data-pf="blur"]::before,#photoFill [data-pf="black"]::before,#photoFill [data-pf="white"]::before,#vpFill [data-f="black"]::before,#vpFill [data-f="blur"]::before,#vpFill [data-f="smear"]::before,#vpFill [data-f="trail"]::before,#vpFill [data-f="zoom"]::before,#vpZoom [data-z="0"]::before,#vpZoom [data-z="35"]::before,#vpZoom [data-z="70"]::before,#vpSpd [data-s="fast"]::before,#vpSpd [data-s="balanced"]::before,#vpSpd [data-s="ig"]::before,#vpSpd [data-s="quality"]::before,#vpSpd [data-s="source"]::before,#fmt [data-fmt="png"]::before,#fmt [data-fmt="jpg"]::before,#scaleSeg [data-scale="ig"]::before,#scaleSeg [data-scale="2k"]::before,#scaleSeg [data-scale="4k"]::before,#scaleSeg [data-scale="8k"]::before,#scaleSeg [data-scale="source"]::before,#qseg [data-q="fast"]::before,#qseg [data-q="max"]::before{content:"";display:block;width:20px;height:20px;flex:none;background:currentColor;-webkit-mask:var(--oi) center/contain no-repeat;mask:var(--oi) center/contain no-repeat}
#photoMode [data-pm="fill"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='2' width='10' height='20' rx='2.5' fill='black' fill-opacity='.55'/%3E%3C/svg%3E")}
#photoMode [data-pm="fit"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='2' width='10' height='20' rx='2.5'/%3E%3Crect x='7' y='8' width='10' height='8' fill='black' stroke='none' opacity='.55'/%3E%3C/svg%3E")}
#photoFill [data-pf="blur"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3.5' fill='black'/%3E%3Ccircle cx='12' cy='12' r='7' opacity='.55'/%3E%3Ccircle cx='12' cy='12' r='10' opacity='.28'/%3E%3C/svg%3E")}
#photoFill [data-pf="black"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='3' fill='black'/%3E%3C/svg%3E")}
#photoFill [data-pf="white"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='3'/%3E%3C/svg%3E")}
#vpFill [data-f="black"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='3' fill='black'/%3E%3C/svg%3E")}
#vpFill [data-f="blur"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3.5' fill='black'/%3E%3Ccircle cx='12' cy='12' r='7' opacity='.55'/%3E%3Ccircle cx='12' cy='12' r='10' opacity='.28'/%3E%3C/svg%3E")}
#vpFill [data-f="smear"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h9M3 12h18M3 16h12'/%3E%3C/svg%3E")}
#vpFill [data-f="trail"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='8' height='8' rx='2' opacity='.3'/%3E%3Crect x='8' y='8' width='8' height='8' rx='2' opacity='.6'/%3E%3Crect x='13' y='8' width='8' height='8' rx='2'/%3E%3C/svg%3E")}
#vpFill [data-f="zoom"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 12L4.5 4.5M12 12l7.5-7.5M12 12l-7.5 7.5M12 12l7.5 7.5'/%3E%3Ccircle cx='12' cy='12' r='1.6' fill='black'/%3E%3C/svg%3E")}
#vpZoom [data-z="0"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 18v-3M12 18v-7M18 18V6' opacity='.25'/%3E%3C/svg%3E")}
#vpZoom [data-z="35"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 18v-3M12 18v-7'/%3E%3Cpath d='M18 18V6' opacity='.25'/%3E%3C/svg%3E")}
#vpZoom [data-z="70"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 18v-3M12 18v-7M18 18V6'/%3E%3C/svg%3E")}
#vpSpd [data-s="fast"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 3L5 14h6l-1 7 8-11h-6z'/%3E%3C/svg%3E")}
#vpSpd [data-s="balanced"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v16M6 20h12M5 8h14'/%3E%3Cpath d='M5 8l-3 6h6zM19 8l-3 6h6z'/%3E%3C/svg%3E")}
#vpSpd [data-s="ig"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='5.5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E")}
#vpSpd [data-s="quality"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 4h12l3 5-9 11L3 9z'/%3E%3Cpath d='M3 9h18'/%3E%3C/svg%3E")}
#vpSpd [data-s="source"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='5' rx='1'/%3E%3Cpath d='M5 9v10h14V9M10 13h4'/%3E%3C/svg%3E")}
#fmt [data-fmt="png"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6z'/%3E%3Cpath d='M14 3v4h4'/%3E%3Crect x='9' y='12' width='6' height='5' rx='1'/%3E%3C/svg%3E")}
#fmt [data-fmt="jpg"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6z'/%3E%3Cpath d='M14 3v4h4'/%3E%3Ccircle cx='12' cy='14.5' r='2.5'/%3E%3C/svg%3E")}
#scaleSeg [data-scale="ig"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='6' height='6' rx='1'/%3E%3C/svg%3E")}
#scaleSeg [data-scale="2k"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='6' height='6' rx='1'/%3E%3Crect x='6' y='6' width='12' height='12' rx='1.5' opacity='.6'/%3E%3C/svg%3E")}
#scaleSeg [data-scale="4k"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='6' height='6' rx='1'/%3E%3Crect x='6' y='6' width='12' height='12' rx='1.5' opacity='.6'/%3E%3Crect x='3' y='3' width='18' height='18' rx='2' opacity='.35'/%3E%3C/svg%3E")}
#scaleSeg [data-scale="8k"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='10' y='10' width='4' height='4' rx='1'/%3E%3Crect x='7.5' y='7.5' width='9' height='9' rx='1' opacity='.75'/%3E%3Crect x='5' y='5' width='14' height='14' rx='1.5' opacity='.5'/%3E%3Crect x='2.5' y='2.5' width='19' height='19' rx='2' opacity='.3'/%3E%3C/svg%3E")}
#scaleSeg [data-scale="source"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5'/%3E%3C/svg%3E")}
#qseg [data-q="fast"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 3L5 14h6l-1 7 8-11h-6z'/%3E%3C/svg%3E")}
#qseg [data-q="max"]::before{--oi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 4h12l3 5-9 11L3 9z'/%3E%3Cpath d='M3 9h18'/%3E%3C/svg%3E")}
#photoMode button,#photoFill button,#vpFill button,#vpZoom button,#vpSpd button,#fmt button,#scaleSeg button,#qseg button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}
#qseg button,#scaleSeg button{flex-direction:row;gap:6px}
.ig-sheet #photoMode button,.ig-sheet #photoFill button,.ig-sheet #vpFill button,.ig-sheet #vpZoom button,.ig-sheet #vpSpd button{min-height:62px}
body.mcs-on #dlOptsModal .fmt button{min-height:52px}
body.mcs-on #dlOptsModal #scaleSeg{flex-wrap:wrap}
body.mcs-on #dlOptsModal #scaleSeg button{flex:1 1 28%}

/* ---- landing (mockup M1): one clear action, Ana sayfa on top ---- */
body:not(.mcs-on) .wrap{max-width:560px}
body:not(.mcs-on) .wrap>header .badge,body:not(.mcs-on) .wrap>header .sub{display:none}
body:not(.mcs-on) .wrap>header{margin-bottom:0}
body:not(.mcs-on) .drop{display:flex;flex-direction:column;justify-content:center;min-height:56vh;border:0;background:none;box-shadow:none;padding:0 8px;margin-top:0}
body:not(.mcs-on) .drop:hover{transform:none;box-shadow:none}
body:not(.mcs-on) .drop .content{display:flex;flex-direction:column;align-items:center;gap:0}
body:not(.mcs-on) .drop .icon{font-size:0;width:84px;height:84px;border-radius:24px;background:#1D1D1F;position:relative;margin:0 0 16px}
body:not(.mcs-on) .drop .icon::after{content:"";position:absolute;inset:19px;background:#fff;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9h20'/%3E%3Crect x='2.5' y='9' width='8' height='6.5' rx='3'/%3E%3Crect x='13.5' y='9' width='8' height='6.5' rx='3'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9h20'/%3E%3Crect x='2.5' y='9' width='8' height='6.5' rx='3'/%3E%3Crect x='13.5' y='9' width='8' height='6.5' rx='3'/%3E%3C/svg%3E") center/contain no-repeat}
body:not(.mcs-on) .drop .big{font-size:22px;font-weight:700;letter-spacing:-.02em}
body:not(.mcs-on) .drop .small{font-size:13.5px;max-width:340px;line-height:1.45;margin:8px 0 18px}
body:not(.mcs-on) .drop .pill{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:60px;margin:0;padding:0 20px;border-radius:18px;font-size:17px;font-weight:600;box-sizing:border-box}
body:not(.mcs-on) .drop .pill::before{content:"";width:24px;height:24px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='14' height='14' rx='2.5'/%3E%3Cpath d='M4 16l4-4 3 3 2-2 4 4'/%3E%3Cpath d='M19 3v6M16 6h6'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='14' height='14' rx='2.5'/%3E%3Cpath d='M4 16l4-4 3 3 2-2 4 4'/%3E%3Cpath d='M19 3v6M16 6h6'/%3E%3C/svg%3E") center/contain no-repeat}

/* format & quality sheet: label above, wrapped options with room for icon + text */
body:not(.xx) #dlOptsModal .dlscale{display:flex;flex-direction:column;align-items:stretch;gap:6px;margin-bottom:10px}
#dlOptsModal .fmt{display:flex;flex-wrap:wrap;gap:6px}
#dlOptsModal .fmt button{flex:1 1 28%;min-height:52px;white-space:nowrap;font-family:var(--sans)}

/* ---------- desktop (>=900px): same parts, wide layout (UI_RULES §1) ----------
   Edit frame and Story preview sit side by side, so the Düzenle|Önizle switch is not needed;
   the dock becomes a centered pill bar and sheets open as centered cards (shared/ui.js). */
@media(min-width:900px){
  body.mcs-on .wrap{max-width:1120px}
  .mcs-top{padding:0 max(20px,calc((100% - 1100px)/2));gap:10px}
  body.mcs-on .mcs-mode{display:none}
  .mcs-brand,.mcs-sep{display:none}   /* same top bar as every tool: home icon + tool icon and name (UI_RULES §29) */
  .mcs-home{padding:0 10px}
  body.mcs-on .mcs-tool,body.mcs-on .mcs-lang{display:flex}
  body.mcs-on .mcs-theme{display:flex;margin-left:6px}
  body.mcs-on #mcsDl{margin-left:auto}
  .mcs-new{order:4;margin-left:6px}
  .mcs-newbtn{padding:0 16px;border:1px solid var(--line)!important;border-radius:22px!important;background:var(--panel)!important;box-shadow:var(--sh)!important;min-height:40px}
  .mcs-newt{display:inline}
  body.mcs-on .mcs-lang{margin-left:0}
  #frameBtn::after,.mcs-vframe::after{content:"Kapalı";width:auto;height:auto;padding-left:18px;border-radius:0;box-shadow:none;font:600 12px/1 var(--sans);color:var(--muted);
    background:radial-gradient(circle at 6px 50%,var(--text) 6px,transparent 6.5px) no-repeat}
  #frameBtn.on::after,.mcs-vframe.on::after{content:"Açık";box-shadow:none;color:#1F8E3D;background:radial-gradient(circle at 6px 50%,#34C759 6px,transparent 6.5px) no-repeat}
  html[lang=en] #frameBtn::after{content:"Off"}html[lang=en] #frameBtn.on::after{content:"On"}
  html[lang=en] .mcs-vframe::after{content:"Off"}html[lang=en] .mcs-vframe.on::after{content:"On"}
  body.mcs-on #stage .editrow{flex-direction:row;align-items:stretch;gap:28px;padding:16px 12px}
  body.mcs-on #stage .editcol{display:flex;flex-direction:column;justify-content:center}   /* edit column is as tall as the preview column (UI_RULES §29) */
  body.mcs-on #stage .editcol{flex:1 1 0;min-width:0}
  body.mcs-on #stage .prevcol,body.mcs-on.mcs-prev #stage .prevcol{display:block!important;flex:0 0 400px;max-width:400px;width:400px}
  body.mcs-on.mcs-prev #stage .editcol{display:block!important}
  body.mcs-on.mcs-prev #stripwrap{display:block!important}
  body.mcs-on .mcs-dock{position:fixed;left:0;right:0;bottom:calc(16px + var(--ad-bot,0px));width:auto;max-width:560px;min-width:420px;margin:0 auto;padding:6px;border:1px solid var(--line);border-radius:20px;box-shadow:var(--sh)}
  body.mcs-video .mcs-tab[data-t=trim]{display:none}   /* the strip is on screen already */
  .mcs-tab{min-width:128px}
  /* video: edit frame left, Story preview right, Çerçeve switch above the phone (mockup McVideoPC) */
  body.mcs-video #videoPanel{padding-top:56px}
  body.mcs-video #videoPanel .vp-grid{flex-direction:row;flex-wrap:wrap;align-items:flex-start;justify-content:center;gap:20px 28px}
  body.mcs-video .mcs-strip{order:5;flex:0 0 100%;max-width:1060px;padding:6px 0 0}
  body.mcs-video .mcs-ed{display:flex;position:relative;flex:1 1 0;min-width:0;max-width:560px;align-items:center;justify-content:center;min-height:420px;border-radius:20px;background:var(--fill);overflow:hidden}
  body.mcs-video .mcs-edv{display:block;max-width:100%;max-height:60vh;background:#000;object-fit:contain}
  body.mcs-video .mcs-grid{position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,transparent 33%,rgba(255,255,255,.55) 33%,rgba(255,255,255,.55) calc(33% + 1px),transparent calc(33% + 1px),transparent 66%,rgba(255,255,255,.55) 66%,rgba(255,255,255,.55) calc(66% + 1px),transparent calc(66% + 1px)),linear-gradient(0deg,transparent 33%,rgba(255,255,255,.55) 33%,rgba(255,255,255,.55) calc(33% + 1px),transparent calc(33% + 1px),transparent 66%,rgba(255,255,255,.55) 66%,rgba(255,255,255,.55) calc(66% + 1px),transparent calc(66% + 1px))}
  body.mcs-video .vp-media{flex:0 0 400px;max-width:400px}
  .mcs-vframe{display:inline-flex!important;position:absolute;right:6px;top:-48px;align-items:center;gap:6px;min-height:40px;z-index:5}
  .mcs-framenote{display:none}
}

/* ---------- desktop landing (>=900px): wide page like the editor, a real drop target ---------- */
@media(min-width:900px){
  body:not(.mcs-on) .wrap{max-width:1120px}
  body:not(.mcs-on) .drop{max-width:760px;width:100%;margin:28px auto 0;min-height:420px;padding:48px 40px;border:2px dashed var(--line);border-radius:28px;background:var(--panel);box-sizing:border-box}
  body:not(.mcs-on) .drop:hover,body:not(.mcs-on) .drop.over{border-color:var(--accent);background:rgba(0,122,255,.05)}
  body:not(.mcs-on) .drop .icon{width:96px;height:96px;border-radius:28px;margin-bottom:20px}
  body:not(.mcs-on) .drop .icon::after{inset:22px}
  body:not(.mcs-on) .drop .big{font-size:28px}
  body:not(.mcs-on) .drop .small{font-size:15px;max-width:480px;margin:10px 0 26px}
  body:not(.mcs-on) .drop .pill{width:auto;min-width:340px}
  body .igsb,body .promo,body .wrap>.seo{max-width:760px;margin-left:auto;margin-right:auto}
}

/* ---- video, phone ---- */
.mcs-ed{display:none}
.mcs-framenote{margin:0}
@media(max-width:899px){
  /* Önizle: the Çerçeve switch is a big card at the bottom with its explanation (mockup McVideoOnizle); the dock steps aside */
  body.mcs-video.mcs-prev .mcs-vframe{position:fixed;left:12px;right:12px;top:auto;bottom:calc(86px + var(--ad-bot,0px));min-height:64px;justify-content:center;font:600 15px/1 var(--sans);border-radius:18px;z-index:31}
  body.mcs-video.mcs-prev .mcs-framenote{position:fixed;left:20px;right:20px;bottom:calc(14px + var(--ad-bot,0px));text-align:center;color:var(--muted);font:400 12.5px/1.4 var(--sans);z-index:31}
  body.mcs-video:not(.mcs-prev) .mcs-framenote{display:none}
  /* dock order as in the mockup: Kırp · Ölçü · Yerleşim */
  .mcs-tab[data-t=trim]{order:-1}
}

/* Çerçeve KAPALI: the plain player must stay inside its column — never grow over the edit frame, strip or dock */
body.mcs-video .vp-media{min-width:0}
body.mcs-video .vp-story.frame-off{width:100%!important;max-width:100%}
body.mcs-video .vp-story.frame-off #vpBox{width:100%!important;max-width:100%;max-height:min(64vh,calc(100dvh - 330px))}
body.mcs-video .vp-story.frame-off #vpVideo{width:100%;height:auto;max-height:min(64vh,calc(100dvh - 330px));object-fit:contain}
@media(min-width:900px){body.mcs-video .vp-media{overflow:visible}}

/* the dock is fixed now, so the end of the page needs room to clear it */
body.mcs-on #mcsApp{padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}

/* The bottom bar is a FIXED object: it must not move while the page scrolls (Osman, 2026-10-15).
   Every tool stylesheet has html,body{overflow-x:hidden}; with html non-visible that makes <body> a scroll container of
   its own, and Safari then lets fixed children drift with it. `clip` cuts the overflow without making a scroller, so the
   viewport is the only scroll container. The dock also gets its own compositor layer so it never repaints late. */
html body{overflow-x:clip!important}
.mcs-dock{-webkit-transform:translateZ(0);transform:translateZ(0);backface-visibility:hidden;-webkit-backface-visibility:hidden}

/* PILOT inner scroll (shell.js INNER_SCROLL): desktop >=1100px with an editor open. The window does not scroll, <body> does, so the
   side-rail ads do not react to scrolling. shell.js only adds the classes at that width; nothing here touches a phone. */
html.mcs-inner{height:100%;overflow:hidden}
html body.mcs-inner{height:100dvh;box-sizing:border-box;overflow:hidden auto!important;overscroll-behavior:contain}
html body.mcs-inner.ig-locked{overflow:hidden!important}
