/* DTFX Image Enhancer v4.0.1 — isolated application */
#dtfx-enhancer-v4{--orange:#ff820b;--orange2:#ffad4b;--ink:#090c10;--panel:#171a20;--edge:#343940;--text:#eef1f6;--muted:#a3aaba;color:var(--text);font:14px/1.45 Inter,"Segoe UI",Arial,sans-serif;background:var(--ink);width:100%;min-height:100vh}
#dtfx-enhancer-v4 *{box-sizing:border-box}#dtfx-enhancer-v4 a{color:inherit}#dtfx-enhancer-v4 :focus-visible{outline:3px solid var(--orange2)!important;outline-offset:2px}#dtfx-enhancer-v4 [hidden]{display:none!important}
#dtfx-enhancer-v4 button,#dtfx-enhancer-v4 input,#dtfx-enhancer-v4 select{font:inherit}#dtfx-enhancer-v4 button{cursor:pointer}#dtfx-enhancer-v4 button:disabled{cursor:not-allowed;opacity:.42}
#dtfx-enhancer-v4 .v4-top{height:66px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #34373e;background:#121419;padding:10px clamp(12px,2vw,28px)}
#dtfx-enhancer-v4 .brand{font-weight:1000;letter-spacing:-.085em;font-size:37px;line-height:1;font-style:italic;color:#fff;text-decoration:none;white-space:nowrap}#dtfx-enhancer-v4 .brand span{color:var(--orange)}
#dtfx-enhancer-v4 .v4-top nav{display:flex;align-items:center;gap:6px;white-space:nowrap;overflow-x:auto;scrollbar-width:none}#dtfx-enhancer-v4 .v4-top nav>*{display:inline-flex;padding:9px 12px;border-radius:10px;text-decoration:none;font-weight:670;font-size:12px;white-space:nowrap}#dtfx-enhancer-v4 .v4-top nav .selected{color:#ffb875;border:1px solid #88430e;background:#40200f}#dtfx-enhancer-v4 .v4-top nav a:hover{background:#272a30}#dtfx-enhancer-v4 .back{border:1px solid #4b4f57;border-radius:9px;padding:9px 12px;white-space:nowrap;text-decoration:none;font-weight:700;font-size:12px}
#dtfx-enhancer-v4 .v4-heading{margin:15px clamp(10px,1.25vw,20px) 12px;padding:20px 25px;display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #4c3627;border-radius:15px;background:radial-gradient(ellipse at 83% 12%,#4b210b90,transparent 37%),linear-gradient(115deg,#15181e,#1c1b1a 70%,#111319)}#dtfx-enhancer-v4 .eyebrow,#dtfx-enhancer-v4 .section-kicker{font-size:11px;letter-spacing:.14em;color:var(--orange2);font-weight:800}#dtfx-enhancer-v4 .v4-heading h1{font-size:clamp(29px,3.3vw,48px);font-weight:900;letter-spacing:-.04em;margin:3px 0 6px;line-height:1.06;color:white}#dtfx-enhancer-v4 .v4-heading h1 span{color:var(--orange)}#dtfx-enhancer-v4 .v4-heading p{margin:0;color:#bec4cd;font-size:13px;max-width:870px}#dtfx-enhancer-v4 .build{border:1px solid #8f481b;color:#ffae61;font-size:10px;font-weight:800;border-radius:30px;padding:7px 10px;white-space:nowrap}
#dtfx-enhancer-v4 .workspace{display:grid;grid-template-columns:minmax(195px,245px) minmax(0,1fr) minmax(310px,365px);align-items:start;gap:12px;padding:0 clamp(10px,1.25vw,20px);min-width:0}
#dtfx-enhancer-v4 .panel{background:linear-gradient(160deg,#1c2026,#15171d);border:1px solid #383e46;border-radius:15px;padding:15px;min-width:0}#dtfx-enhancer-v4 .panel h2{font-size:19px;line-height:1.22;margin:5px 0 14px;letter-spacing:-.02em;color:#fff}#dtfx-enhancer-v4 .muted,#dtfx-enhancer-v4 .note{color:var(--muted);font-size:11px;line-height:1.55}#dtfx-enhancer-v4 .note{margin:7px 0 0}
#dtfx-enhancer-v4 .upload-pane{position:sticky;top:12px}#dtfx-enhancer-v4 .upload-pane .muted{margin:0 0 15px}#dtfx-enhancer-v4 .drop{border:1.5px dashed var(--orange);border-radius:13px;background:#1c2026;min-height:190px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;text-align:center;padding:15px 10px;cursor:pointer}#dtfx-enhancer-v4 .drop.drag{background:#4b2a13}#dtfx-enhancer-v4 .drop strong{font-size:17px}#dtfx-enhancer-v4 .drop span{font-size:12px;color:#c6cdd7}#dtfx-enhancer-v4 .drop small{color:#9ba5b4;font-size:10px;margin-top:5px}#dtfx-enhancer-v4 .upload-symbol{font-size:46px;color:var(--orange);line-height:1;margin-bottom:8px}
#dtfx-enhancer-v4 #files{width:100%;margin:10px 0;font-size:11px;color:#cbd1dc}#dtfx-enhancer-v4 #files::file-selector-button{border:none;background:var(--orange);padding:8px;border-radius:8px;margin-right:5px;font-size:11px;font-weight:800}#dtfx-enhancer-v4 .queue{display:grid;gap:7px;margin:10px 0 12px;max-height:240px;overflow-y:auto}#dtfx-enhancer-v4 .queue-item{text-align:left;overflow-wrap:anywhere;background:#262a32;border:1px solid #474e58;color:#e8ecf3;border-radius:9px;padding:9px;font-size:11px}#dtfx-enhancer-v4 .queue-item small{display:block;color:#aab4bf;margin-top:3px}#dtfx-enhancer-v4 .queue-item.active{background:#3a2519;border-color:var(--orange)}#dtfx-enhancer-v4 .links{margin-top:15px;padding-top:12px;border-top:1px solid var(--edge);display:grid;gap:4px}#dtfx-enhancer-v4 .links a{padding:8px;text-decoration:none;color:#bec6d1;font-size:12px;border-radius:8px}#dtfx-enhancer-v4 .links a:hover{color:var(--orange);background:#242831}
#dtfx-enhancer-v4 .preview-pane{padding:11px}#dtfx-enhancer-v4 .preview-title{display:flex;align-items:start;justify-content:space-between;padding:4px 3px 0}#dtfx-enhancer-v4 .chip{display:inline-block;padding:6px 8px;border-radius:20px;background:#292d35;color:#aeb7c5;font-size:10px;font-weight:800;border:1px solid #474a51}#dtfx-enhancer-v4 .chip.ready{background:#172d20;color:#6ee0a2;border-color:#327e52}
#dtfx-enhancer-v4 .image-view{height:clamp(360px,60vh,760px);min-height:300px;position:relative;border-radius:13px;overflow:hidden;border:1px solid #4f545d;touch-action:pan-y}#dtfx-enhancer-v4 .checker{background:repeating-conic-gradient(#252a32 0 25%,#363b43 0 50%) 50%/22px 22px}#dtfx-enhancer-v4 .image-view.white{background:#fff}#dtfx-enhancer-v4 .image-view.black{background:#050505}#dtfx-enhancer-v4 .image-view img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;user-select:none;pointer-events:none;transform-origin:center}#dtfx-enhancer-v4 #afterImg{clip-path:inset(0 50% 0 0)}#dtfx-enhancer-v4 .empty{position:absolute;inset:0;background:#191d23e5;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;text-align:center;padding:15px}#dtfx-enhancer-v4 .empty>span{font-size:50px;color:var(--orange)}#dtfx-enhancer-v4 .empty strong{font-size:17px}#dtfx-enhancer-v4 .empty small{color:#adb6c4}
#dtfx-enhancer-v4 .divider{position:absolute;top:0;bottom:0;left:50%;width:3px;background:var(--orange);box-shadow:0 0 7px #ff800caa}#dtfx-enhancer-v4 .divider span{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:var(--orange);color:#141515;display:grid;place-items:center;font-size:25px;width:40px;height:40px;border-radius:50%;font-weight:900}#dtfx-enhancer-v4 .compare-labels{position:absolute;top:12px;left:10px;right:10px;display:flex;justify-content:space-between;pointer-events:none}#dtfx-enhancer-v4 .compare-labels span{background:#0a0b0eb8;padding:4px 9px;border-radius:7px;font-size:10px;font-weight:800;color:#fff}
#dtfx-enhancer-v4 .image-view.side-by-side #beforeImg{width:50%;right:auto}#dtfx-enhancer-v4 .image-view.side-by-side #afterImg{width:50%;left:50%;clip-path:none!important}#dtfx-enhancer-v4 .image-view.side-by-side #divider{display:none}
#dtfx-enhancer-v4 .preview-tools{display:flex;align-items:center;gap:7px;flex-wrap:wrap;border:1px solid #393f47;border-radius:9px;padding:10px;background:#23262e;margin-top:9px}#dtfx-enhancer-v4 .preview-tools label{display:flex;align-items:center;gap:6px;flex:1 1 auto;font-size:11px;color:#cdd4de}#dtfx-enhancer-v4 .preview-tools input[type=range]{width:90px;min-width:55px;flex:1}#dtfx-enhancer-v4 input[type=range],#dtfx-enhancer-v4 input[type=checkbox]{accent-color:var(--orange)}#dtfx-enhancer-v4 .preview-tools select{max-width:105px;font-size:11px}
#dtfx-enhancer-v4 .quality{border-left:3px solid var(--orange);background:#25282f;border-radius:8px;padding:11px;margin-top:10px;color:#d8e0ea;line-height:1.4;font-size:12px}#dtfx-enhancer-v4 .quality[data-kind=poor],#dtfx-enhancer-v4 .quality[data-kind=warning]{border-color:#eb6565}#dtfx-enhancer-v4 .quality[data-kind=good]{border-color:#36b77a}#dtfx-enhancer-v4 .progress-wrap{margin-top:9px}#dtfx-enhancer-v4 .progress{height:6px;background:#433121;border-radius:6px;overflow:hidden}#dtfx-enhancer-v4 .progress span{display:block;height:100%;width:0;background:linear-gradient(90deg,#ffa63d,#ff740a)}#dtfx-enhancer-v4 #status{margin:9px 0;color:#cbd3df;font-size:12px;min-height:19px;overflow-wrap:anywhere}#dtfx-enhancer-v4 #status[data-kind=error]{color:#ff8b92}#dtfx-enhancer-v4 #status[data-kind=good]{color:#8fe6ae}#dtfx-enhancer-v4 #status[data-kind=warning]{color:#ffd18b}#dtfx-enhancer-v4 .metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}#dtfx-enhancer-v4 .metrics>div{border:1px solid #3c424a;background:#22262e;border-radius:9px;padding:10px}#dtfx-enhancer-v4 .metrics small{display:block;color:#abb4c3;font-size:10px}#dtfx-enhancer-v4 .metrics b{display:block;color:#ffaf58;margin-top:3px;font-size:13px}
#dtfx-enhancer-v4 .controls-pane{max-height:calc(100vh - 100px);overflow-y:auto;scrollbar-color:#555c66 transparent;scrollbar-width:thin}#dtfx-enhancer-v4 .control{display:block;border-bottom:1px solid #383d44;padding:12px 0;margin:0}#dtfx-enhancer-v4 .control>label,#dtfx-enhancer-v4 .two label{display:block;font-size:11px;color:#e0e6f0;font-weight:700;margin-bottom:8px}#dtfx-enhancer-v4 .two{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:10px}#dtfx-enhancer-v4 .two>*{min-width:0}#dtfx-enhancer-v4 .control select,#dtfx-enhancer-v4 .control input[type=number],#dtfx-enhancer-v4 .preview-tools select{background:#262a32;color:#fff;border:1px solid #4a505a;border-radius:9px;padding:9px 10px;width:100%;min-height:40px}#dtfx-enhancer-v4 details.control>summary{list-style-position:inside;cursor:pointer;font-weight:800;color:#e9edf4;padding:5px 0}#dtfx-enhancer-v4 details.control[open]>summary{margin-bottom:10px}#dtfx-enhancer-v4 .mode-row{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:9px 0}#dtfx-enhancer-v4 .mode{font-size:11px;padding:11px 4px;border:1px solid #4a4e59;border-radius:9px;background:#2b3038;color:#e8ebf1;font-weight:770}#dtfx-enhancer-v4 .mode.active{background:#522c16;color:#ffb36a;border-color:var(--orange)}#dtfx-enhancer-v4 .button-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}#dtfx-enhancer-v4 .button-grid button,#dtfx-enhancer-v4 #applyColor{font-size:11px;min-height:38px;border:1px solid #4b515c;background:#2a2e36;color:#eff1f6;border-radius:9px;padding:7px}#dtfx-enhancer-v4 .history{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:13px}#dtfx-enhancer-v4 .actions{display:grid;gap:8px;margin-top:13px}#dtfx-enhancer-v4 .downloads{margin-top:16px;border-top:1px solid #454a52;padding-top:14px;display:grid;gap:8px}#dtfx-enhancer-v4 .downloads strong{color:#ffb06a;font-size:12px}#dtfx-enhancer-v4 button.primary{background:linear-gradient(120deg,#ffa12b,#ff7200);border:1px solid #ff9b2b;color:#1a130b;min-height:48px;font-weight:900;border-radius:11px}#dtfx-enhancer-v4 button.subtle{border:1px solid #4c515a;background:#272b33;color:#f0f3f8;border-radius:9px;padding:10px;font-weight:700;min-height:39px}#dtfx-enhancer-v4 button.wide{width:100%}#dtfx-enhancer-v4 button:not(:disabled):hover{filter:brightness(1.16)}#dtfx-enhancer-v4 .v4-footer{text-align:center;color:#9ba5b4;font-size:11px;padding:18px}#dtfx-enhancer-v4 .v4-footer a{color:#ffad65}
#dtfx-enhancer-v4 .viewer{padding:0;max-width:min(96vw,1500px);width:96vw;height:95vh;background:#14171c;color:white;border:1px solid #65686e;border-radius:12px}#dtfx-enhancer-v4 .viewer::backdrop{background:#000e}#dtfx-enhancer-v4 .viewer-bar{display:flex;justify-content:space-between;padding:12px 20px;background:#22272f}#dtfx-enhancer-v4 .viewer-bar button{background:var(--orange);border:0;border-radius:6px;padding:7px 14px;font-weight:800}#dtfx-enhancer-v4 .viewer-body{display:flex;align-items:center;justify-content:center;height:calc(100% - 61px);background:repeating-conic-gradient(#242933 0 25%,#353a43 0 50%) 50%/24px 24px}#dtfx-enhancer-v4 .viewer-body img{max-height:100%;max-width:100%;object-fit:contain}
@media(max-width:1130px){#dtfx-enhancer-v4 .workspace{grid-template-columns:minmax(180px,225px) minmax(0,1fr)}#dtfx-enhancer-v4 .controls-pane{grid-column:1/-1;max-height:none;overflow:visible}#dtfx-enhancer-v4 .preview-pane{grid-column:2;grid-row:1}#dtfx-enhancer-v4 .upload-pane{grid-column:1;grid-row:1}#dtfx-enhancer-v4 .controls-pane .button-grid{grid-template-columns:repeat(4,1fr)}}
@media(max-width:700px){#dtfx-enhancer-v4 .v4-top{height:auto;min-height:64px;padding:10px;gap:6px}#dtfx-enhancer-v4 .brand{font-size:29px}#dtfx-enhancer-v4 .back{display:none}#dtfx-enhancer-v4 .v4-top nav{flex:1}#dtfx-enhancer-v4 .v4-top nav>*{font-size:11px;padding:7px!important}#dtfx-enhancer-v4 .v4-heading{padding:14px;margin:9px 8px;align-items:start;flex-direction:column}#dtfx-enhancer-v4 .v4-heading h1{font-size:29px}#dtfx-enhancer-v4 .workspace{grid-template-columns:minmax(0,1fr);padding:0 8px;gap:9px}#dtfx-enhancer-v4 .upload-pane{grid-column:1;grid-row:1;position:static}#dtfx-enhancer-v4 .preview-pane{grid-column:1;grid-row:2}#dtfx-enhancer-v4 .controls-pane{grid-column:1;grid-row:3}#dtfx-enhancer-v4 .drop{min-height:125px}#dtfx-enhancer-v4 .upload-symbol{font-size:29px}#dtfx-enhancer-v4 .image-view{height:clamp(250px,46vh,470px);min-height:250px}#dtfx-enhancer-v4 .metrics b{font-size:11px}#dtfx-enhancer-v4 .controls-pane .button-grid{grid-template-columns:1fr 1fr}#dtfx-enhancer-v4 .panel{padding:12px}}
@media(max-width:390px){#dtfx-enhancer-v4 .preview-tools{gap:5px}#dtfx-enhancer-v4 .preview-tools label{flex:1 1 42%}#dtfx-enhancer-v4 .preview-tools input[type=range]{width:100px}#dtfx-enhancer-v4 .metrics{gap:4px}#dtfx-enhancer-v4 .metrics>div{padding:6px}#dtfx-enhancer-v4 .v4-heading p{font-size:11px}}
@media(prefers-reduced-motion:reduce){#dtfx-enhancer-v4 *{scroll-behavior:auto!important;transition:none!important}}

/* On the WordPress staging shortcode page, bypass the theme's width/sidebar without changing sitewide CSS. */
#dtfx-enhancer-v4[data-wp-fullscreen="1"][data-mounted="1"]{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;z-index:2147482000!important;overflow-y:auto!important;overscroll-behavior:contain!important;}

/* A failed or delayed script must NEVER obscure the shop with an empty black fullscreen element. */
#dtfx-enhancer-v4[data-wp-fullscreen="1"]:not([data-mounted="1"]){position:relative!important;inset:auto!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;z-index:auto!important;}
#dtfx-enhancer-v4 .v4-boot-fallback{background:#191b21;color:#f6f6f6;max-width:760px;margin:24px auto;padding:26px;border:1px solid #ff850f;border-radius:14px;font:16px/1.5 Arial,sans-serif;}
#dtfx-enhancer-v4 .v4-boot-fallback strong{display:block;font-size:22px;}
#dtfx-enhancer-v4 .v4-boot-fallback a{color:#ff9c44;text-decoration:underline;}

/* DTFX 4.0.2 UX: Simple/Advanced and larger preview — isolated to plugin root. */
#dtfx-enhancer-v4{padding-bottom:96px!important}
#dtfx-enhancer-v4 .v4-mode-toggle{display:flex;align-items:center;padding:4px;margin:0 0 14px;border-radius:12px;border:1px solid #444b54;background:#232832;gap:5px}
#dtfx-enhancer-v4 .v4-mode-toggle button{min-height:39px;flex:1 1 0;border-radius:9px;border:0;background:transparent;color:#b6bfce;font-weight:800;font-size:13px}
#dtfx-enhancer-v4 .v4-mode-toggle button.active{background:linear-gradient(120deg,#ff9f24,#ff790a);color:#1e140a;box-shadow:0 2px 12px #0004}
#dtfx-enhancer-v4 .v4-simple-explain{color:#b7c0ca;font-size:12px;line-height:1.55;margin:0 0 14px}
#dtfx-enhancer-v4[data-ui-mode="simple"] .advanced-only{display:none!important}
#dtfx-enhancer-v4[data-ui-mode="advanced"] .v4-simple-explain,#dtfx-enhancer-v4[data-ui-mode="advanced"] #autoEnhance{display:none!important}
#dtfx-enhancer-v4 .v4-original-download{display:none!important} /* Reuse this verified downloader through the sticky bar. */
#dtfx-enhancer-v4 .preview-header-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
#dtfx-enhancer-v4 #focusPreview{white-space:nowrap;min-height:32px!important;padding:6px 9px;font-size:11px}
#dtfx-enhancer-v4 .queue-item{display:flex;align-items:center;gap:9px;min-height:57px}
#dtfx-enhancer-v4 .queue-thumb{width:48px;height:48px;flex:none;object-fit:contain;background:repeating-conic-gradient(#3a404b 0 25%,#262b34 0 50%) 50%/10px 10px;border:1px solid #525963;border-radius:8px}
#dtfx-enhancer-v4 .queue-names{min-width:0;display:block;flex:1}
#dtfx-enhancer-v4 .queue-names strong{display:block;font-size:11px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
#dtfx-enhancer-v4 .queue-names small{font-size:10px}
#dtfx-enhancer-v4 .recommendation{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:11px 12px;margin-top:8px;background:#253129;border:1px solid #42634d;border-radius:11px;color:#d8f2df;font-size:12px}
#dtfx-enhancer-v4 .recommendation b{color:#87e5a6}
#dtfx-enhancer-v4 .recommendation button{min-height:34px!important;font-size:11px;padding:7px 10px}
#dtfx-enhancer-v4.v4-focus-preview .workspace{grid-template-columns:minmax(0,1fr)!important}
#dtfx-enhancer-v4.v4-focus-preview .upload-pane,#dtfx-enhancer-v4.v4-focus-preview .controls-pane{display:none!important}
#dtfx-enhancer-v4.v4-focus-preview .preview-pane{grid-column:1!important;grid-row:1!important;max-width:none!important}
#dtfx-enhancer-v4.v4-focus-preview #canvasView{height:clamp(390px,69vh,1000px)}
#dtfx-enhancer-v4 .v4-action-bar{position:sticky;bottom:0;z-index:60;display:flex;align-items:center;gap:11px;justify-content:flex-end;width:100%;background:rgba(16,19,24,.97);border-top:1px solid #50535e;box-shadow:0 -8px 25px #0009;padding:10px clamp(12px,2vw,26px);min-height:75px;backdrop-filter:blur(15px)}
#dtfx-enhancer-v4 .v4-action-hint{flex:1 1 auto;min-width:0}
#dtfx-enhancer-v4 .v4-action-hint strong{display:block;font-size:13px;color:#fff;font-weight:800}
#dtfx-enhancer-v4 .v4-action-hint small{display:block;font-size:11px;color:#aab4c2;margin-top:3px}
#dtfx-enhancer-v4 .v4-action-bar button{height:48px;min-height:46px;padding:9px 16px;font-weight:800;white-space:nowrap}
#dtfx-enhancer-v4 .v4-action-bar #stickyDownload{background:linear-gradient(120deg,#72df9a,#32b76b);color:#072014;border-color:#62dd90}
#dtfx-enhancer-v4 .v4-action-bar #stickyDownload:disabled{background:#313b35;color:#85998e;border-color:#4b6153}
#dtfx-enhancer-v4 .controls-pane{max-height:calc(100vh - 180px)}
#dtfx-enhancer-v4 .downloads{padding-top:8px}
#dtfx-enhancer-v4 .v4-top nav .selected{background:#40200f;color:#ffbc81}
@media(max-width:1130px){#dtfx-enhancer-v4 .controls-pane{max-height:none}}
@media(max-width:700px){
 #dtfx-enhancer-v4{padding-bottom:118px!important}
 #dtfx-enhancer-v4 .v4-action-bar{position:sticky;bottom:0;min-height:86px;padding:8px 9px;gap:6px;display:grid;grid-template-columns:74px minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto auto}
 #dtfx-enhancer-v4 .v4-action-hint{grid-column:1/-1;grid-row:1}
 #dtfx-enhancer-v4 .v4-action-hint strong{display:inline;font-size:11px}
 #dtfx-enhancer-v4 .v4-action-hint small{display:inline;margin-left:6px;font-size:10px}
 #dtfx-enhancer-v4 .v4-action-bar button{height:45px;min-height:44px;padding:7px 5px;font-size:12px}
 #dtfx-enhancer-v4 .v4-action-bar #stickyUndo{grid-column:1}
 #dtfx-enhancer-v4 .v4-action-bar #stickyEnhance{grid-column:2}
 #dtfx-enhancer-v4 .v4-action-bar #stickyDownload{grid-column:3}
 #dtfx-enhancer-v4 .preview-header-actions #focusPreview{padding:5px 7px;font-size:10px}
 #dtfx-enhancer-v4.v4-focus-preview #canvasView{height:clamp(340px,56vh,650px)}
}
@media(max-width:390px){#dtfx-enhancer-v4 .v4-action-hint small{display:none}#dtfx-enhancer-v4 .v4-action-bar button{font-size:11px}#dtfx-enhancer-v4 .v4-action-bar{grid-template-columns:60px minmax(0,1fr) minmax(0,1fr)}}

/* 4.0.4: clearly visible feedback for external Real-ESRGAN processing. */
#dtfx-enhancer-v4 .v4-ai-inline{display:block;margin:5px 0 10px;padding:11px 12px;background:#29323d;border:1px solid #6b7280;border-left:4px solid #ff860d;border-radius:9px;color:#f5f7fb;font-size:12px;line-height:1.5;overflow-wrap:anywhere;}
#dtfx-enhancer-v4 .v4-ai-inline[hidden]{display:none!important;}
#dtfx-enhancer-v4 .v4-ai-inline[data-kind="error"]{background:#391e24;border-color:#bd4558;color:#fff0f0;}
#dtfx-enhancer-v4 .v4-ai-inline[data-kind="good"]{background:#19382b;border-color:#3bba84;color:#d5ffe8;}
#dtfx-enhancer-v4 .controls-pane #enhance{display:none!important;}
#dtfx-enhancer-v4 .controls-pane #autoEnhance{width:100%;}

/* Ensure selected AI method has one clearly visible Run button in Advanced mode. */
#dtfx-enhancer-v4[data-ui-mode="advanced"] .controls-pane #autoEnhance{display:block!important;}

/* Built-in reliable desktop controls: do not depend on a page-level hotfix. */
@media(min-width:701px){#dtfx-enhancer-v4 .v4-action-bar{display:none!important;}#dtfx-enhancer-v4 .v4-original-download{display:block!important;width:100%!important;}}
