:root{--bg:#f7f9fc;--card:#fff;--text:#0f172a;--muted:#64748b;--line:#e5eaf1;--blue:#2563eb;--soft:#eef4ff;--shadow:0 20px 55px rgba(15,23,42,.09)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.it-header{position:sticky;top:0;z-index:30;background:rgba(247,249,252,.88);backdrop-filter:blur(16px);border-bottom:1px solid var(--line)}.it-head-inner{max-width:1180px;margin:auto;height:78px;padding:0 22px;display:flex;align-items:center;justify-content:space-between;gap:20px}.it-brand img{width:250px;max-width:42vw;display:block}.it-nav{display:flex;align-items:center;gap:8px}.it-nav a{color:var(--text);text-decoration:none;font-weight:750;padding:9px 12px;border-radius:10px}.it-nav a:hover{background:var(--soft);color:var(--blue)}.it-shell{max-width:1180px;margin:0 auto;padding:42px 22px 72px}.it-breadcrumb{font-size:13px;color:var(--muted);margin-bottom:16px}.it-breadcrumb a{color:var(--blue);text-decoration:none}.it-title{display:flex;gap:14px;align-items:flex-start;margin-bottom:24px}.it-title .ico{width:54px;height:54px;display:grid;place-items:center;border-radius:16px;background:var(--soft);font-size:25px;flex:0 0 auto}.it-title h1{font-size:clamp(28px,4vw,44px);line-height:1.06;margin:0 0 8px}.it-title p{margin:0;color:var(--muted);font-size:16px;max-width:760px}.it-panel{background:var(--card);border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow);padding:24px}.dropzone{border:1.5px dashed #b9c7da;border-radius:18px;padding:18px;background:#fbfdff}.dropzone label{display:block;font-weight:800;margin-bottom:8px}.dropzone input[type=file]{width:100%}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:16px}.field{display:flex;flex-direction:column;gap:7px}.field.wide{grid-column:1/-1}.field label{font-size:13px;font-weight:800}.field input,.field select,.field textarea{width:100%;font:inherit;border:1px solid var(--line);background:#fff;color:var(--text);border-radius:12px;padding:11px 12px;outline:none}.field input:focus,.field select:focus,.field textarea:focus{border-color:#80a7ff;box-shadow:0 0 0 3px rgba(37,99,235,.10)}.field textarea{min-height:160px;resize:vertical}.range-row{display:grid;grid-template-columns:140px 1fr 58px;gap:12px;align-items:center}.range-row label{font-size:13px;font-weight:800}.range-row output{text-align:right;font-variant-numeric:tabular-nums;color:var(--muted);font-size:13px}.controls-stack{display:grid;gap:12px;margin-top:16px}.btns{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}.btn,.btn-secondary{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:none;border-radius:12px;padding:11px 16px;font:inherit;font-weight:850;cursor:pointer;text-decoration:none}.btn{background:var(--blue);color:#fff}.btn:hover{filter:brightness(.96)}.btn-secondary{background:var(--soft);color:#174ea6}.btn:disabled,.btn-secondary:disabled{opacity:.55;cursor:not-allowed}.preview-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:20px}.preview-card{border:1px solid var(--line);border-radius:18px;overflow:hidden;background:#f8fafc;min-width:0}.preview-head{padding:10px 12px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px}.preview-head b{font-size:13px}.preview-head small{color:var(--muted)}.preview-stage{min-height:290px;display:grid;place-items:center;padding:14px;overflow:auto;background-image:linear-gradient(45deg,#eef2f6 25%,transparent 25%),linear-gradient(-45deg,#eef2f6 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#eef2f6 75%),linear-gradient(-45deg,transparent 75%,#eef2f6 75%);background-size:18px 18px;background-position:0 0,0 9px,9px -9px,-9px 0}.preview-stage img,.preview-stage canvas{max-width:100%;max-height:520px;object-fit:contain;display:block}.empty{color:var(--muted);font-size:13px;text-align:center;padding:34px}.status{margin-top:14px;padding:12px 14px;border-radius:12px;background:#f8fafc;border:1px solid var(--line);font-size:13px;color:var(--muted)}.status strong{color:var(--text)}.crop-wrap{position:relative;display:inline-block;line-height:0;user-select:none}.crop-wrap img{display:block;max-width:100%;max-height:520px}.crop-box{position:absolute;border:2px solid #2563eb;background:rgba(37,99,235,.10);box-shadow:0 0 0 9999px rgba(15,23,42,.32);cursor:move}.crop-handle{position:absolute;width:16px;height:16px;border-radius:50%;background:#fff;border:3px solid #2563eb;right:-9px;bottom:-9px;cursor:nwse-resize}.ratio-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.ratio-row button{border:1px solid var(--line);background:#fff;border-radius:10px;padding:8px 10px;font-weight:800;cursor:pointer}.ratio-row button.active{background:var(--blue);color:#fff;border-color:var(--blue)}.color-readout{display:flex;gap:12px;align-items:center;margin-top:12px}.swatch{width:46px;height:46px;border-radius:12px;border:1px solid var(--line)}.batch-list{display:grid;gap:8px;margin-top:12px}.batch-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:12px}.tools-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.tool-card{display:block;text-decoration:none;color:inherit;background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;transition:.15s}.tool-card:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(15,23,42,.08);border-color:#c9d8ef}.tool-card .ti{font-size:22px}.tool-card b{display:block;margin:8px 0 5px}.tool-card small{color:var(--muted);line-height:1.45}.viewall-title{margin:10px 0 22px}.note{font-size:12px;color:var(--muted);margin-top:10px;line-height:1.55}.zoom-btn{font-size:12px;border:0;background:transparent;color:var(--blue);font-weight:800;cursor:pointer}.preview-modal{position:fixed;inset:0;z-index:100;background:rgba(2,6,23,.82);display:grid;place-items:center;padding:24px}.preview-modal[hidden]{display:none}.preview-modal img,.preview-modal canvas{max-width:94vw;max-height:88vh}.preview-close{position:fixed;top:18px;right:20px;width:42px;height:42px;border:0;border-radius:50%;font-size:26px;cursor:pointer}.format-note{font-size:12px;color:var(--muted);margin-top:4px}@media(max-width:900px){.tools-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:720px){.it-head-inner{height:68px;padding:0 14px}.it-brand img{width:205px}.it-nav a:nth-child(2){display:none}.it-shell{padding:28px 14px 58px}.it-panel{padding:16px;border-radius:18px}.form-grid,.preview-grid{grid-template-columns:1fr}.range-row{grid-template-columns:105px 1fr 52px}.preview-stage{min-height:220px}.tools-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:430px){.tools-grid{grid-template-columns:1fr}.it-nav a{padding:8px;font-size:13px}}

/* Build 6 polish — modern editor controls + sticky live preview */
.editor-layout{display:grid;grid-template-columns:minmax(330px,.82fr) minmax(420px,1.18fr);gap:22px;align-items:start;margin-top:18px}
.editor-controls{min-width:0}
.editor-preview{position:sticky;top:98px;min-width:0}
.live-preview-card{border:1px solid #dbe5f2;border-radius:24px;background:linear-gradient(180deg,#ffffff,#f8fbff);box-shadow:0 18px 50px rgba(15,23,42,.10);overflow:hidden}
.live-preview-card .preview-head{padding:14px 16px;background:linear-gradient(90deg,rgba(37,99,235,.06),rgba(20,184,166,.05));align-items:flex-start}
.live-preview-card .preview-head>div{display:flex;flex-direction:column;gap:2px}.live-preview-card .preview-head>div small{color:var(--muted)}
.editor-after-stage{min-height:470px;max-height:68vh;background-size:20px 20px}
.mini-before{display:grid;grid-template-columns:92px 1fr;gap:12px;align-items:center;padding:12px 14px;border-top:1px solid var(--line);background:#fff}
.mini-before-stage{width:92px;height:72px;border:1px solid var(--line);border-radius:13px;display:grid;place-items:center;overflow:hidden;background:#f8fafc}
.mini-before-stage img,.mini-before-stage canvas{width:100%;height:100%;object-fit:cover;display:block}.mini-before-stage .empty{padding:4px;font-size:11px}
.mini-before-info{display:flex;flex-direction:column;gap:2px;min-width:0}.mini-before-info b{font-size:13px}.mini-before-info small{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mini-before-info .zoom-btn{text-align:left;padding:0;margin-top:3px;width:max-content}
.preset-bar{padding:14px;border-radius:18px;border:1px solid #d9e4f3;background:linear-gradient(135deg,#f8fbff,#f4fffd);margin-bottom:14px}.preset-bar>span{display:block;font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin-bottom:9px}.preset-chips{display:flex;flex-wrap:wrap;gap:8px}.preset-chips button{border:1px solid #dce5f0;background:#fff;color:#24324a;border-radius:999px;padding:8px 12px;font-weight:800;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease}.preset-chips button:hover{transform:translateY(-2px);box-shadow:0 8px 18px rgba(37,99,235,.12);border-color:#9fc0ff}.preset-chips button.selected{background:linear-gradient(135deg,#2563eb,#14b8a6);color:#fff;border-color:transparent;box-shadow:0 8px 20px rgba(37,99,235,.20)}
.adjustment-groups{display:grid;gap:13px}.control-group{border:1px solid #dce5f0;border-radius:19px;background:linear-gradient(180deg,#fff,#fbfdff);overflow:hidden;box-shadow:0 8px 24px rgba(15,23,42,.045)}.control-group-head{display:flex;align-items:center;gap:8px;padding:12px 14px;border-bottom:1px solid #edf1f6;background:rgba(37,99,235,.035)}.control-group-head span{font-size:16px}.control-group-head b{font-size:13px;letter-spacing:.02em}.control-list{display:grid;padding:8px}.control-card,.simple-control-card{position:relative;border:1px solid transparent;border-radius:15px;padding:10px 10px 11px;background:#fff;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease}.control-card:hover,.simple-control-card:hover{transform:translateY(-1px);border-color:#d9e7fb;background:#fbfdff;box-shadow:0 8px 20px rgba(37,99,235,.07)}.control-card.changed{border-color:rgba(37,99,235,.18);background:linear-gradient(90deg,rgba(37,99,235,.035),rgba(20,184,166,.02))}.control-card.changed:before{content:'';position:absolute;left:3px;top:50%;width:4px;height:22px;border-radius:5px;background:linear-gradient(#2563eb,#14b8a6);transform:translateY(-50%)}.control-card.active,.simple-control-card.active{animation:controlPulse .26s ease-out}.control-top{display:grid;grid-template-columns:28px 1fr auto 26px;gap:7px;align-items:center;margin-bottom:9px}.simple-control-card .control-top{grid-template-columns:28px 1fr auto}.control-icon{width:27px;height:27px;border-radius:9px;display:grid;place-items:center;background:linear-gradient(145deg,#eef4ff,#e9fffa);color:#1e63cf;font-weight:900}.control-top label{font-size:12px;font-weight:850}.control-top output{font-size:11px;font-weight:900;color:#1556bb;background:#eef5ff;border-radius:999px;padding:5px 8px;min-width:48px;text-align:center;font-variant-numeric:tabular-nums}.mini-reset{width:25px;height:25px;border:0;border-radius:8px;background:transparent;color:#728096;cursor:pointer;font-size:14px;transition:.16s}.mini-reset:hover{background:#eef4ff;color:#2563eb;transform:rotate(-28deg)}.control-bottom{display:grid;grid-template-columns:28px 1fr 28px;gap:8px;align-items:center}.nudge{width:28px;height:28px;border:1px solid #dce5f0;border-radius:9px;background:#fff;color:#36506f;font-weight:900;cursor:pointer;transition:.16s}.nudge:hover{transform:scale(1.08);border-color:#9fc0ff;color:#2563eb;box-shadow:0 4px 12px rgba(37,99,235,.12)}
.control-bottom input[type=range],.simple-control-card input[type=range]{appearance:none;-webkit-appearance:none;width:100%;height:8px;border-radius:999px;outline:none;background:linear-gradient(90deg,#d7e4f7 0%,#8db5ff 48%,#3cc7b6 100%);box-shadow:inset 0 1px 2px rgba(15,23,42,.10)}.control-bottom input[type=range]::-webkit-slider-thumb,.simple-control-card input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:20px;height:20px;border-radius:50%;background:#fff;border:4px solid #2563eb;box-shadow:0 4px 12px rgba(37,99,235,.28);cursor:grab;transition:transform .14s ease,box-shadow .14s ease}.control-bottom input[type=range]:hover::-webkit-slider-thumb,.simple-control-card input[type=range]:hover::-webkit-slider-thumb{transform:scale(1.12);box-shadow:0 5px 16px rgba(37,99,235,.38)}.control-bottom input[type=range]:active::-webkit-slider-thumb,.simple-control-card input[type=range]:active::-webkit-slider-thumb{cursor:grabbing;transform:scale(.94)}.control-bottom input[type=range]::-moz-range-thumb,.simple-control-card input[type=range]::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:#fff;border:4px solid #2563eb;box-shadow:0 4px 12px rgba(37,99,235,.28);cursor:grab}
.editor-format{grid-template-columns:1fr;margin-top:14px}.editor-actions{margin-top:14px}.simple-control-card{margin-bottom:14px;border-color:#dce5f0;background:linear-gradient(180deg,#fff,#fbfdff);box-shadow:0 8px 24px rgba(15,23,42,.05)}
@keyframes controlPulse{0%{box-shadow:0 0 0 0 rgba(37,99,235,.18)}100%{box-shadow:0 0 0 8px rgba(37,99,235,0)}}

/* Smaller Original preview for regular image tools */
.preview-grid.compact-before{grid-template-columns:240px minmax(0,1fr);align-items:start}.preview-grid.compact-before .before-card .preview-stage{min-height:150px;max-height:210px}.preview-grid.compact-before .before-card .preview-stage img,.preview-grid.compact-before .before-card .preview-stage canvas{max-height:180px}.preview-grid.compact-before .after-card .preview-stage{min-height:340px}
.base64-field textarea{min-height:210px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;line-height:1.45;word-break:break-all}.base64-field label{display:flex;justify-content:space-between;gap:12px}.base64-field label small{color:var(--muted);font-weight:700}

@media(max-width:900px){.editor-layout{grid-template-columns:1fr}.editor-preview{position:relative;top:auto;order:-1}.editor-after-stage{min-height:360px;max-height:none}.preview-grid.compact-before{grid-template-columns:180px minmax(0,1fr)}}
@media(max-width:640px){.editor-after-stage{min-height:300px}.mini-before{grid-template-columns:76px 1fr}.mini-before-stage{width:76px;height:62px}.preview-grid.compact-before{grid-template-columns:1fr}.preview-grid.compact-before .before-card{max-width:180px}.preview-grid.compact-before .before-card .preview-stage{min-height:110px;max-height:140px}.preview-grid.compact-before .after-card .preview-stage{min-height:280px}.preset-chips button{padding:7px 10px}.control-card{padding:9px 7px}.control-top{grid-template-columns:26px 1fr auto 24px}}

/* Build 6 compact control pass — one visual system for every image slider */
.control-card,.simple-control-card{padding:7px 9px 8px;border-radius:13px}
.control-top{grid-template-columns:24px 1fr auto 23px;gap:6px;margin-bottom:6px}
.simple-control-card .control-top{grid-template-columns:24px 1fr auto}
.control-icon{width:23px;height:23px;border-radius:7px;font-size:12px}
.control-top label{font-size:11.5px}
.control-top output{font-size:10.5px;min-width:42px;padding:4px 7px}
.mini-reset{width:22px;height:22px;border-radius:7px;font-size:13px}
.control-bottom{grid-template-columns:24px minmax(90px,1fr) 24px;gap:6px}
.nudge{width:24px;height:24px;border-radius:8px;font-size:12px}
.control-bottom input[type=range],.simple-control-card input[type=range],input[data-ui-range]{height:5px}
.control-bottom input[type=range]::-webkit-slider-thumb,.simple-control-card input[type=range]::-webkit-slider-thumb,input[data-ui-range]::-webkit-slider-thumb{width:16px;height:16px;border-width:3px}
.control-bottom input[type=range]::-moz-range-thumb,.simple-control-card input[type=range]::-moz-range-thumb,input[data-ui-range]::-moz-range-thumb{width:10px;height:10px;border-width:3px}
.control-bottom input[type=range]:focus-visible,.simple-control-card input[type=range]:focus-visible,input[data-ui-range]:focus-visible{box-shadow:0 0 0 3px rgba(37,99,235,.14);border-radius:999px}
.branded-range{margin:10px 0 12px;max-width:100%}
.form-grid .branded-range{grid-column:1/-1;margin:0}
@media(min-width:901px){.control-list{padding:5px}.adjustment-groups{gap:10px}.control-group-head{padding:9px 12px}.preset-bar{padding:11px 12px;margin-bottom:10px}.preset-chips button{padding:6px 10px}.editor-layout{grid-template-columns:minmax(300px,.74fr) minmax(440px,1.26fr)}}

/* Build 6 final image UX pass */
.editor-layout{grid-template-columns:minmax(300px,.78fr) minmax(430px,1.22fr);gap:18px;align-items:start}
.editor-controls{min-width:0}
.editor-preview{position:sticky;top:94px;align-self:start;z-index:3}
.live-preview-card{border-radius:20px}
.editor-after-stage{min-height:430px;height:calc(100vh - 245px);max-height:650px;padding:12px;overflow:hidden}
.editor-after-stage canvas,.editor-after-stage img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
.mini-before{grid-template-columns:132px minmax(0,1fr);padding:9px 12px;gap:10px}
.mini-before-stage{width:132px;height:88px;border-radius:11px}
.mini-before-stage img,.mini-before-stage canvas{width:100%;height:100%;object-fit:contain;background:#f8fafc}
.dropzone{padding:13px 15px;border-radius:15px}.dropzone label{margin-bottom:5px;font-size:13px}
.it-panel{padding:20px}.form-grid{gap:10px;margin-top:12px}.field{gap:5px}.field input,.field select,.field textarea{padding:9px 10px;border-radius:10px}.btns{margin-top:13px}
.control-group-head{padding:8px 10px}.control-list{padding:4px}.adjustment-groups{gap:8px}.preset-bar{padding:9px 10px;margin-bottom:8px}.preset-chips{gap:6px}.preset-chips button{padding:5px 9px;font-size:12px}
.control-card,.simple-control-card{padding:6px 8px 7px;border-radius:11px}.control-top{grid-template-columns:22px 1fr auto 21px;gap:5px;margin-bottom:4px}.simple-control-card .control-top{grid-template-columns:22px 1fr auto 21px}.control-icon{width:21px;height:21px;font-size:11px}.control-top label{font-size:11px}.control-top output{font-size:10px;min-width:38px;padding:3px 6px}.mini-reset{width:20px;height:20px;font-size:12px}.control-bottom{grid-template-columns:22px minmax(80px,1fr) 22px;gap:5px}.nudge{width:22px;height:22px;font-size:11px;border-radius:7px}.control-bottom input[type=range],.simple-control-card input[type=range],input[data-ui-range]{height:4px}.control-bottom input[type=range]::-webkit-slider-thumb,.simple-control-card input[type=range]::-webkit-slider-thumb,input[data-ui-range]::-webkit-slider-thumb{width:14px;height:14px;border-width:3px}.control-bottom input[type=range]::-moz-range-thumb,.simple-control-card input[type=range]::-moz-range-thumb,input[data-ui-range]::-moz-range-thumb{width:8px;height:8px;border-width:3px}.branded-range{margin:8px 0 9px}
.compact-upload-preview{display:grid;grid-template-columns:180px minmax(0,1fr);gap:14px;align-items:center;margin-top:13px;padding:10px;border:1px solid var(--line);border-radius:14px;background:#fbfdff}.compact-thumb{width:180px;height:112px;overflow:hidden;display:grid;place-items:center;border:1px solid var(--line);border-radius:11px;background:#f8fafc}.compact-thumb img,.compact-thumb canvas{width:100%;height:100%;object-fit:contain}.compact-thumb .empty{padding:8px}.color-thumb{cursor:crosshair}.verify-card{margin-top:16px;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:#f8fafc}.verify-card .preview-stage{min-height:300px;max-height:520px}.base64-field{margin-top:13px}.base64-field textarea{min-height:170px}
.crop-editor-card{margin-top:12px;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:#f8fafc}.crop-stage{min-height:330px;max-height:480px;display:grid;place-items:center;padding:10px;overflow:hidden;background-image:linear-gradient(45deg,#eef2f6 25%,transparent 25%),linear-gradient(-45deg,#eef2f6 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#eef2f6 75%),linear-gradient(-45deg,transparent 75%,#eef2f6 75%);background-size:18px 18px;background-position:0 0,0 9px,9px -9px,-9px 0}.crop-wrap img{max-height:440px}.crop-box{will-change:transform,width,height;left:0!important;top:0!important}.crop-handle{touch-action:none}.crop-wrap,.crop-box{touch-action:none}
.preview-canvas{display:block;max-width:100%;max-height:100%;object-fit:contain}
.status{margin-top:10px;padding:9px 11px}
@media(max-width:900px){.editor-layout{grid-template-columns:1fr}.editor-preview{position:relative;top:auto;order:-1}.editor-after-stage{height:auto;min-height:320px;max-height:none}.mini-before{grid-template-columns:120px 1fr}.mini-before-stage{width:120px;height:82px}}
@media(max-width:640px){.compact-upload-preview{grid-template-columns:128px minmax(0,1fr)}.compact-thumb{width:128px;height:86px}.editor-after-stage{min-height:280px}.mini-before{grid-template-columns:100px 1fr}.mini-before-stage{width:100px;height:72px}.crop-stage{min-height:280px}}

/* Build 6 upload row patch — filename + picker + compact thumbnail in one line */
.dropzone.upload-row{
  display:grid;
  grid-template-columns:minmax(150px, 1fr) auto 58px;
  align-items:center;
  gap:10px;
  padding:9px 11px;
  min-height:66px;
  border-radius:14px;
}
.upload-name{
  min-width:0;
  font-size:14px;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  color:var(--text);
}
.native-file-input{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}
.file-pick-btn{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  margin:0!important;
  padding:8px 11px;
  border:1px solid #cbd7e8;
  border-radius:10px;
  background:#fff;
  color:#183153;
  font-size:13px!important;
  font-weight:800!important;
  line-height:1;
  cursor:pointer;
  box-shadow:0 2px 7px rgba(15,23,42,.04);
  transition:transform .12s ease,border-color .12s ease,box-shadow .12s ease;
}
.file-pick-btn:hover{transform:translateY(-1px);border-color:#8eb0e7;box-shadow:0 5px 13px rgba(37,99,235,.09)}
.native-file-input:focus-visible + .upload-thumb{outline:2px solid #2563eb;outline-offset:2px}
.upload-thumb{
  width:58px;
  height:46px;
  overflow:hidden;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:9px;
  background:#f8fafc;
  line-height:1;
}
.upload-thumb img,.upload-thumb canvas{width:100%;height:100%;object-fit:contain;display:block}
.upload-thumb .empty{padding:3px;font-size:10px}
.color-tool-help{margin-top:12px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#fbfdff}
@media(max-width:640px){
  .dropzone.upload-row{grid-template-columns:minmax(100px,1fr) auto 52px;gap:7px;padding:8px;min-height:60px}
  .upload-thumb{width:52px;height:42px}
  .file-pick-btn{padding:8px 9px;font-size:12px!important}
  .upload-name{font-size:13px}
}


/* Build 6 compact desktop workspace patch */
@media(min-width:901px){
  .it-head-inner{height:64px}
  .it-brand img{width:218px}
  .it-shell{padding:18px 22px 36px}
  .it-breadcrumb{margin-bottom:8px;font-size:12px}
  .it-title{gap:10px;align-items:center;margin-bottom:12px}
  .it-title .ico{width:38px;height:38px;border-radius:12px;font-size:19px}
  .it-title h1{font-size:30px;line-height:1.05;margin:0 0 3px}
  .it-title p{font-size:13px;line-height:1.35}
  .it-panel{padding:16px;border-radius:20px}
  .dropzone.upload-row{min-height:62px;padding:8px 10px}
  .editor-layout{margin-top:12px;grid-template-columns:minmax(330px,.84fr) minmax(470px,1.16fr);gap:16px}
  .editor-preview{top:76px}
  .live-preview-card{border-radius:18px}
  .live-preview-card .preview-head{padding:9px 12px}
  .live-preview-card .preview-head>div small{font-size:11px}
  .editor-after-stage{height:300px;min-height:300px;max-height:300px;padding:10px;overflow:hidden}
  .editor-after-stage img,.editor-after-stage canvas{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}
  .empty{padding:12px}
  .form-grid{gap:10px;margin-top:10px}
  .field{gap:5px}.field input,.field select,.field textarea{padding:9px 10px}
  .btns{margin-top:12px;gap:8px}.btn,.btn-secondary{padding:9px 14px}
  .status{margin-top:10px;padding:9px 11px}
  .controls-stack{gap:8px;margin-top:10px}
  .control-card,.simple-control-card{padding-top:7px;padding-bottom:8px}
}
@media(max-width:900px){
  .editor-after-stage{min-height:240px;height:240px;max-height:240px}
  .it-title{margin-bottom:14px}
}


/* Build 6 layout fix — upload stays in left editor column, preview aligns at top */
.editor-layout{align-items:start}
.editor-controls>.dropzone.upload-row{margin:0 0 10px}
.editor-preview{top:90px}
.live-preview-card{width:100%}
.editor-after-stage{height:340px;min-height:340px;max-height:340px;overflow:hidden;padding:10px}
.editor-after-stage img,.editor-after-stage canvas{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
@media(max-width:720px){
  .editor-after-stage{height:280px;min-height:280px;max-height:280px}
  .editor-controls>.dropzone.upload-row{margin-bottom:10px}
}


/* Build 6 FINAL processed-preview fit fix */
.editor-after-stage{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
  min-width:0 !important;
}
.editor-after-stage > img,
.editor-after-stage > canvas{
  display:block !important;
  width:auto;
  height:auto;
  max-width:100%;
  max-height:100%;
  object-fit:contain !important;
  flex:0 0 auto;
  margin:auto !important;
}


/* Build 6 — GLOBAL upload-row layout
   Every image-upload tool uses the same compact filename + Choose File + thumbnail row. */
.global-upload-row{
  width:100%;
  box-sizing:border-box;
}
.editor-controls>.global-upload-row{
  max-width:none;
  margin:0 0 10px;
}
/* Standalone upload tools also stay compact and left-aligned instead of stretching across the panel. */
.it-panel>.global-upload-row{
  max-width:540px;
  margin:0 0 12px;
}
/* Never allow upload controls to leak into the processed-preview column. */
.editor-preview .global-upload-row,
.live-preview-card .global-upload-row{
  display:none !important;
}
@media(max-width:900px){
  .it-panel>.global-upload-row{max-width:none;}
}

/* Build 7 branded color selector */
.dmo-color-orb{position:relative}.dmo-color-orb-btn{width:100%;min-height:44px;border:1px solid #d8e3f1;border-radius:14px;background:linear-gradient(135deg,#fff,#f8fbff);display:flex;align-items:center;gap:9px;padding:7px 10px;cursor:pointer;font:inherit}.dmo-color-orb-btn:hover{border-color:#9dbcf0;box-shadow:0 8px 20px rgba(37,99,235,.10)}.dmo-color-dot{width:28px;height:28px;border-radius:10px;border:2px solid #fff;box-shadow:0 0 0 1px #cbd5e1,0 4px 12px rgba(15,23,42,.16)}.dmo-color-orb-btn>span:last-child{margin-left:auto;color:#64748b}.dmo-color-pop{position:absolute;z-index:80;top:calc(100% + 7px);left:0;width:218px;padding:10px;background:#fff;border:1px solid #dbe5f2;border-radius:15px;box-shadow:0 18px 44px rgba(15,23,42,.18);display:grid;grid-template-columns:repeat(5,32px);gap:8px}.dmo-color-pop[hidden]{display:none}.dmo-color-chip,.dmo-custom-color{width:32px;height:32px;border-radius:10px;border:2px solid #fff;box-shadow:0 0 0 1px #d1d9e6;background:var(--chip);cursor:pointer}.dmo-color-chip.active{box-shadow:0 0 0 3px rgba(37,99,235,.25)}.dmo-custom-color{display:grid;place-items:center;position:relative;background:conic-gradient(#ef4444,#f59e0b,#22c55e,#06b6d4,#3b82f6,#8b5cf6,#ef4444);color:#fff;font-weight:900;overflow:hidden}.dmo-custom-color input[type=color]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}

/* DoKitly Build 1 brand */
:root{--blue:#0f67c8;--teal:#08a6b5;--cyan:#12d5c4;--dk-gradient:linear-gradient(110deg,#0b3e82,#0f67c8 45%,#08a6b5 78%,#12d5c4)}
.it-brand img{width:205px;max-height:56px;object-fit:contain}.btn,.primary{background:var(--dk-gradient)!important}.it-title .ico{background:linear-gradient(145deg,#edf6ff,#e9fffb)}

/* DoKitly Build 2 — brand asset hardening */
.it-brand img{background:transparent!important;object-fit:contain;object-position:left center;filter:none}

/* Build 2 — final compact tool-first pass */
@media(min-width:901px){.it-head-inner{height:58px!important}.it-brand img{width:205px!important}.it-shell{padding:10px 22px 30px!important}.it-breadcrumb{margin-bottom:6px!important;font-size:11px!important}.it-title{margin-bottom:9px!important}.it-title .ico{width:36px!important;height:36px!important;font-size:18px!important}.it-title h1{font-size:25px!important;margin-bottom:2px!important}.it-title p{font-size:12px!important;line-height:1.3!important}.it-panel{padding:13px!important}}
