/* Fekra Image Studio v1.13.50. Loaded after legacy/modern styles. */
.image-resizer-page .studio-v46{max-width:1260px!important;padding:clamp(17px,2.3vw,28px)!important;--studio-blue:#1862d2;--studio-line:#dbe4ef;--studio-muted:#52647b;--studio-bg:#f7faff;}
.studio-v46 .image-resizer-head{position:static!important;background:none!important;margin:0 0 18px!important;padding-bottom:15px!important;align-items:center;}
.studio-v46 .image-resizer-head h2{font-size:clamp(23px,2.4vw,32px)!important;color:var(--text,#142942)!important;font-weight:850!important;margin:4px 0 5px!important;}
.studio-eyebrow{display:inline-flex;color:var(--studio-blue);font-size:12px;font-weight:800;letter-spacing:.1px}
.studio-head-sub{font-size:14px;line-height:1.8;color:var(--studio-muted);margin:0;}
.studio-v46 .image-resizer-head #closeImageResizerBtn{background:#eef4fc;color:#214c82;flex-shrink:0;}
.studio-dropzone{border:2px dashed #a9c3ee;border-radius:18px;background:linear-gradient(120deg,#eef5ff,#f8fbff);padding:19px 16px;display:flex;flex-direction:column;align-items:center;gap:7px;cursor:pointer;color:#224872;text-align:center;outline:none;}
.studio-dropzone:hover,.studio-dropzone.is-dragover,.studio-dropzone:focus-visible{background:#e2efff;border-color:#2471da;box-shadow:0 0 0 3px #2471da23;}
.studio-upload-icon{width:41px;height:41px;display:grid;place-items:center;background:#dfebff;border-radius:12px;color:#2168d2;font-size:27px;font-weight:600;}
.studio-dropzone strong{font-size:17px;line-height:1.4;}
.studio-dropzone>span:not(.studio-upload-icon){font-size:12px;color:#57718f;}
.studio-upload-buttons{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;margin-top:4px;}
.studio-upload-buttons button{background:#2364cc!important;color:#fff!important;border:1px solid #2364cc!important;border-radius:11px!important;padding:10px 22px!important;min-height:41px!important;font-size:14px!important;font-weight:800!important;}
.studio-upload-buttons #chooseImageFolderBtn{background:#fff!important;color:#1450aa!important;border-color:#a2c0e7!important;}
.studio-columns{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin:17px 0;align-items:start;}
.studio-panel{padding:18px;border:1px solid var(--studio-line);border-radius:16px;background:#fff;min-width:0;box-shadow:0 2px 12px #103b5a0a;}
.studio-v46 .studio-panel h3,.studio-workspace h3{font-size:17px!important;font-weight:850!important;margin:0 0 14px!important;color:#173350!important;}
.studio-panel-title{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;}
.studio-panel-title h3{margin-bottom:10px!important;}
.studio-auto-btn,.studio-clear-btn{padding:9px 12px;border:1px solid #b3d0f5;border-radius:10px;background:#eff6ff;color:#0c5bbe;cursor:pointer;font-weight:800;font-size:13px;}
.studio-presets{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:15px;}
.studio-preset,.studio-tone{background:#f3f6fa;color:#40556e;border:1px solid #dbe5ef;border-radius:9px;padding:9px 11px;min-height:38px;font-size:12px;font-weight:800;cursor:pointer;}
.studio-preset:hover,.studio-tone:hover{border-color:#83aff0;}
.studio-preset.is-active,.studio-tone.is-active{background:#e6f1ff;color:#1056b7;border-color:#6d9ee5;box-shadow:0 0 0 1px #7bb1ff4a inset;}
.studio-v46 .image-resizer-fields{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;margin:0!important;padding:0!important;background:none!important;border:0!important;}
.studio-v46 .image-resizer-fields label{font-size:13px!important;color:#334d68!important;font-weight:750!important;}
.studio-v46 .image-resizer-fields label:nth-child(3),.studio-v46 .image-resizer-fields label:nth-child(4),.studio-v46 .image-resizer-fields label:nth-child(5){grid-column:auto;}
.studio-v46 .image-resizer-fields input,.studio-v46 .image-resizer-fields select{min-height:43px!important;background:#f9fbff!important;color:#20354d!important;border:1px solid #cbd9e8!important;font-size:14px!important;}
.studio-v46 .image-resizer-fields :disabled{opacity:.62;cursor:not-allowed;}
.studio-hint{font-size:12px;line-height:1.85;color:#64748b;margin:12px 0 0;}
.studio-tone-presets{margin-top:3px;}
.studio-slider-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 16px;}
.studio-slider-grid label{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;align-content:flex-start;gap:7px;font-size:13px;font-weight:780;color:#344e68;min-width:0;background:#f6f9fe;border:1px solid #dbe6f4;border-radius:14px;padding:10px 12px;}
.studio-slider-grid output{color:#1b5fc7;font-size:12px;font-weight:900;direction:ltr;}
.studio-slider-grid input[type=range]{width:100%;margin:5px 0 0;accent-color:#2168d5;cursor:pointer;height:22px;}
.studio-workspace{background:var(--studio-bg);border:1px solid var(--studio-line);padding:17px;border-radius:17px;}
.studio-workspace-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px;}
.studio-workspace h3{margin-bottom:4px!important;}
.studio-workspace-head p{font-size:13px;color:#506780;margin:2px 0 0;line-height:1.6;}
.studio-clear-btn{border-color:#e2bcbc;color:#953e3e;background:#fff6f6;white-space:nowrap;}
.studio-clear-btn:disabled{opacity:.45;cursor:not-allowed;}
.studio-preview-wrap{margin-bottom:18px;background:#fff;border:1px solid #cfdeef;border-radius:15px;padding:13px;}
.studio-preview-wrap[hidden]{display:none!important;}
.studio-preview-head{display:flex;justify-content:space-between;gap:12px;font-size:13px;color:#51657b;margin-bottom:10px;}
.studio-preview-head strong{font-size:14px;color:#1c3e65;overflow-wrap:anywhere;}
.studio-compare{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.studio-compare figure{margin:0;min-width:0;}
.studio-preview-img{height:clamp(180px,22vw,270px);background:repeating-conic-gradient(#edf3fa 0 25%,#fff 0 50%) 0 0/20px 20px;border-radius:12px;border:1px solid #dbe5ef;display:flex;align-items:center;justify-content:center;overflow:hidden;}
.studio-preview-img img{width:100%;height:100%;object-fit:contain;}
.studio-compare figcaption{text-align:center;font-weight:800;font-size:13px;color:#39536f;margin-top:8px;}
.studio-v46 .studio-gallery{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(min(100%,230px),1fr))!important;gap:12px!important;margin:6px 0!important;}
.studio-v46 .image-edit-card{background:#fff!important;padding:10px!important;border-radius:13px!important;box-shadow:none!important;transform:none!important;border:1px solid #d8e4f0!important;}
.studio-v46 .image-edit-card.is-selected{border-color:#4e96ff!important;box-shadow:0 0 0 2px #4e96ff30!important;}
.studio-v46 .image-edit-preview{height:176px!important;border-radius:10px!important;}
.studio-v46 .image-edit-name{display:block!important;white-space:normal;font-size:12px!important;min-height:32px;margin:9px 3px!important;}
.studio-v46 .image-edit-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;}
.studio-enhance-mode{display:flex;align-items:center;justify-content:flex-start;margin-top:6px;}
.studio-portrait-badge{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border-radius:999px;background:#e8f1ff;color:#1657ba;font-size:13px;font-weight:800;border:1px solid #bfd5f6;}
.studio-v46 .image-edit-actions .btn{font-size:12px!important;padding:7px 5px!important;min-height:38px!important;border-radius:9px!important;}
.studio-v46 .image-edit-actions .image-preview-btn{display:none!important;}
.studio-v46 .image-edit-actions .image-crop-btn{background:#2364cc!important;border:1px solid #2364cc!important;color:#fff!important;}
.studio-v46 .image-edit-actions .image-reset-btn{background:#f2f5f9!important;color:#384f68!important;border:1px solid #dce6ef!important;}
.studio-v46 .image-edit-note{font-size:11px!important;min-height:25px;color:#56708e!important;background:transparent!important;padding:4px!important;}
.studio-footer{margin-top:18px;padding-top:16px;border-top:1px solid var(--studio-line);}
.studio-footer-main{display:flex;gap:10px;flex-wrap:wrap;}
.studio-v46 #runImageResizeBtn{border-color:#1d60c7!important;background:#1d60c7!important;color:white!important;border-radius:11px!important;padding:13px 21px!important;min-height:48px!important;font-size:15px!important;}
.studio-v46 #cancelImageResizeBtn{background:#f0f4f9!important;color:#3a536a!important;border:1px solid #d4e1ed!important;border-radius:11px!important;}
.studio-v46 progress{width:100%;height:9px;margin-top:14px;accent-color:#2367d5;}
.studio-v46 .image-resizer-status{background:#eef5fe!important;color:#204a7c!important;border-radius:9px!important;padding:10px 13px!important;font-size:13px!important;margin-top:10px;}
/* Improved crop dialog for mouse, touch, keyboard. */
.studio-crop-overlay{z-index:11000!important;align-items:center!important;}
.studio-crop-dialog{background:#fff!important;color:#1f3349!important;max-width:1000px!important;min-height:0!important;max-height:96vh!important;overflow:auto!important;gap:10px!important;}
.studio-crop-dialog .crop-dialog-head{align-items:center;}
.studio-crop-dialog .crop-instruction{padding:10px 12px!important;font-size:14px!important;}
.studio-crop-modes{display:flex;gap:10px;flex-wrap:wrap;}
.studio-crop-mode{padding:11px 16px;border:1px solid #bdd4f3;background:#f4f9ff;color:#25517e;font-size:14px;font-weight:800;border-radius:11px;cursor:pointer;min-height:42px;}
.studio-crop-mode.is-active{background:#2364cc;color:white;border-color:#2364cc;}
.studio-crop-area{display:flex;align-items:center;justify-content:center;min-height:170px;}
.studio-crop-dialog .free-crop-stage{display:block;max-width:100%!important;overflow:hidden!important;width:fit-content!important;}
.studio-crop-dialog .free-crop-canvas{display:block!important;margin:0!important;width:auto!important;height:auto!important;max-width:min(80vw,760px)!important;max-height:56vh!important;touch-action:none!important;}
.studio-crop-dialog .free-crop-point{width:32px!important;height:32px!important;background:#2364cc!important;border:3px solid #fff!important;box-shadow:0 0 0 2px #165cc7,0 2px 10px #0006!important;}
.studio-crop-dialog .free-crop-edge{position:absolute;width:30px;height:30px;transform:translate(-50%,-50%);background:#fff;border:3px solid #2364cc;border-radius:9px;pointer-events:auto;cursor:grab;touch-action:none;}
.studio-crop-dialog polygon{fill:#2674e927!important;stroke:#2364cc!important;stroke-width:2!important;stroke-dasharray:5 2;vector-effect:non-scaling-stroke;}
.studio-crop-dialog .crop-rotate-row{gap:8px;}
.studio-crop-dialog .crop-rotate-row button{background:#edf4ff!important;color:#185aaf!important;border:1px solid #c5dbf8!important;min-height:42px!important;}
.studio-crop-dialog .crop-rotate-row .crop-reset{margin-inline-start:0!important;}
.studio-crop-status{padding:8px 11px;background:#f0f6ff;color:#1a548f;font-size:13px;border-radius:9px;line-height:1.6;}
.studio-crop-dialog .crop-footer-actions .crop-save{background:#2067d4!important;border-color:#2067d4!important;color:#fff!important;box-shadow:none!important;}
/* Theme is applied to HTML and body in different releases: support both. */
:root[data-theme="dark"] .studio-v46,body[data-theme="dark"] .studio-v46{--studio-blue:#78b7ff;--studio-line:#35506b;--studio-muted:#b9cbe1;--studio-bg:#12243b;color:#ecf5ff!important;background:#172a41!important;}
:root[data-theme="dark"] .studio-v46 .image-resizer-head h2,body[data-theme="dark"] .studio-v46 .image-resizer-head h2{color:#eef6ff!important;}
:root[data-theme="dark"] .studio-head-sub,body[data-theme="dark"] .studio-head-sub{color:#bbcee3!important;}
:root[data-theme="dark"] .studio-dropzone,body[data-theme="dark"] .studio-dropzone{background:#1e3957!important;border-color:#4e78ab!important;color:#e8f3ff!important;}
:root[data-theme="dark"] .studio-dropzone>span:not(.studio-upload-icon),body[data-theme="dark"] .studio-dropzone>span:not(.studio-upload-icon){color:#bbd5f5!important;}
:root[data-theme="dark"] .studio-panel,:root[data-theme="dark"] .studio-preview-wrap,:root[data-theme="dark"] .studio-v46 .image-edit-card,body[data-theme="dark"] .studio-panel,body[data-theme="dark"] .studio-preview-wrap,body[data-theme="dark"] .studio-v46 .image-edit-card{background:#20364f!important;border-color:#405f7b!important;color:#edf5ff!important;}
:root[data-theme="dark"] .studio-v46 h3,body[data-theme="dark"] .studio-v46 h3,:root[data-theme="dark"] .studio-slider-grid label,body[data-theme="dark"] .studio-slider-grid label,:root[data-theme="dark"] .studio-v46 .image-resizer-fields label,body[data-theme="dark"] .studio-v46 .image-resizer-fields label{color:#e3f0ff!important;}
:root[data-theme="dark"] .studio-hint,:root[data-theme="dark"] .studio-workspace-head p,body[data-theme="dark"] .studio-hint,body[data-theme="dark"] .studio-workspace-head p{color:#b5cce4!important;}
:root[data-theme="dark"] .studio-v46 .image-resizer-fields input,:root[data-theme="dark"] .studio-v46 .image-resizer-fields select,body[data-theme="dark"] .studio-v46 .image-resizer-fields input,body[data-theme="dark"] .studio-v46 .image-resizer-fields select{background:#13283d!important;color:#f0f8ff!important;border-color:#50718e!important;}
:root[data-theme="dark"] .studio-v46 .studio-preset,:root[data-theme="dark"] .studio-v46 .studio-tone,body[data-theme="dark"] .studio-v46 .studio-preset,body[data-theme="dark"] .studio-v46 .studio-tone{background:#2c4661;color:#dcecff;border-color:#526f8d;}
:root[data-theme="dark"] .studio-v46 .studio-preset.is-active,:root[data-theme="dark"] .studio-v46 .studio-tone.is-active,body[data-theme="dark"] .studio-v46 .studio-preset.is-active,body[data-theme="dark"] .studio-v46 .studio-tone.is-active{background:#2455a1;color:#fff;border-color:#669cf0;}
:root[data-theme="dark"] .studio-v46 .image-resizer-status,body[data-theme="dark"] .studio-v46 .image-resizer-status{background:#203d5f!important;color:#daedff!important;}
:root[data-theme="dark"] .studio-preview-head strong,:root[data-theme="dark"] .studio-compare figcaption,body[data-theme="dark"] .studio-preview-head strong,body[data-theme="dark"] .studio-compare figcaption{color:#dcefff!important;}
@media(max-width:1100px){.studio-slider-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:850px){.studio-columns{grid-template-columns:1fr}.studio-v46 .image-resizer-fields{grid-template-columns:repeat(3,minmax(0,1fr))!important}.studio-v46 .image-resizer-fields label:nth-child(3){grid-column:span 1;}}
@media(max-width:600px){.studio-v46 .image-resizer-head h2{font-size:23px!important}.studio-head-sub{font-size:13px}.studio-panel{padding:13px}.studio-v46 .image-resizer-fields{grid-template-columns:repeat(2,minmax(0,1fr))!important}.studio-v46 .image-resizer-fields label:nth-child(3){grid-column:span 2;}.studio-slider-grid{grid-template-columns:1fr;gap:12px}.studio-compare{gap:7px}.studio-preview-img{height:185px}.studio-preview-wrap{padding:8px}.studio-crop-dialog .free-crop-canvas{max-width:calc(100vw - 38px)!important;max-height:43vh!important}.studio-crop-dialog .crop-rotate-row{gap:5px}.studio-crop-mode{flex:1;padding:9px 7px;font-size:12px}.studio-crop-dialog .free-crop-point{width:28px!important;height:28px!important}.studio-crop-dialog .free-crop-edge{width:26px;height:26px}.studio-v46 .image-edit-preview{height:210px!important;}}

:root[data-theme="dark"] .studio-v46 .studio-auto-btn,:root[data-theme="dark"] .studio-v46 .studio-clear-btn,body[data-theme="dark"] .studio-v46 .studio-auto-btn,body[data-theme="dark"] .studio-v46 .studio-clear-btn{background:#2b517e!important;color:#e8f4ff!important;border:1px solid #557da5!important;}
:root[data-theme="dark"] .studio-v46 .image-resizer-head #closeImageResizerBtn,body[data-theme="dark"] .studio-v46 .image-resizer-head #closeImageResizerBtn{background:#315476!important;color:#fff!important;}


/* V1.13.47 — compact, readable crop editor in both themes.
   The crop dialog is appended to <body>, outside .studio-v46: it needs
   independent dark-mode rules, otherwise global dark text stays white on
   the old hard-coded white dialog. The real drag targets remain 28–32px,
   while visible corner/edge markers are intentionally much smaller. */
.studio-crop-overlay{padding:clamp(8px,1.7vw,18px)!important;align-items:center!important;}
.studio-crop-dialog{
  box-sizing:border-box;width:min(880px,100%)!important;max-width:100%!important;
  max-height:calc(100dvh - 20px)!important;overflow-y:auto!important;
  padding:clamp(12px,1.65vw,19px)!important;gap:8px!important;
  background:#f9fbff!important;color:#1c3551!important;
  border:1px solid #cbdbea!important;border-radius:18px!important;
}
.studio-crop-dialog .crop-dialog-head{padding-bottom:9px!important;border-color:#d9e5ef!important;flex-shrink:0;}
.studio-crop-dialog .crop-dialog-head h3{font-size:clamp(18px,1.7vw,22px)!important;line-height:1.35!important;color:#153a5d!important;margin:0 0 3px!important;}
.studio-crop-dialog .crop-file-name{color:#52677e!important;font-size:12px!important;}
.studio-crop-dialog .crop-close{width:33px!important;height:33px!important;min-width:33px!important;min-height:33px!important;background:#e7eff8!important;color:#294c6e!important;font-size:21px!important;border-radius:9px!important;}
.studio-crop-dialog .crop-instruction{font-size:13px!important;line-height:1.6!important;padding:8px 11px!important;background:#e7f2ff!important;color:#204e7c!important;border:1px solid #c4ddf8!important;}
.studio-crop-modes{gap:7px!important;}
.studio-crop-dialog .studio-crop-mode{min-height:35px!important;padding:7px 12px!important;font-size:12px!important;border-radius:9px!important;}
.studio-crop-dialog .studio-crop-mode.is-active{color:#fff!important;background:#2364cc!important;border-color:#2364cc!important;}
.studio-crop-dialog .studio-crop-area{min-height:0!important;margin:0!important;overflow:visible;flex:0 1 auto;}
.studio-crop-dialog .free-crop-stage{max-width:100%!important;margin:2px auto!important;overflow:visible!important;border:1px solid #b9cde2!important;border-radius:10px!important;box-shadow:0 3px 14px #24425b18!important;}
.studio-crop-dialog .free-crop-canvas{max-width:min(76vw,700px)!important;max-height:min(45dvh,510px)!important;border-radius:9px!important;}
/* Touch/clickable target 28x28; visible marker just 12x12. */
.studio-crop-dialog .free-crop-point{
  width:28px!important;height:28px!important;border:0!important;
  border-radius:50%!important;background:transparent!important;
  box-shadow:none!important;padding:0!important;display:grid!important;
  place-items:center!important;cursor:move!important;touch-action:none!important;
}
.studio-crop-dialog .free-crop-point::after{
  content:"";display:block;width:12px;height:12px;box-sizing:border-box;
  border:2px solid #fff;border-radius:3px;background:#1967d2;
  box-shadow:0 0 0 1px #0951b2,0 1px 5px #0007;
}
.studio-crop-dialog .free-crop-point:active{background:transparent!important;transform:translate(-50%,-50%)!important;}
.studio-crop-dialog .free-crop-edge{
  width:30px!important;height:28px!important;border:0!important;border-radius:0!important;
  padding:0!important;background:transparent!important;box-shadow:none!important;
  display:grid!important;place-items:center!important;touch-action:none!important;
}
.studio-crop-dialog .free-crop-edge[data-edge="1"],
.studio-crop-dialog .free-crop-edge[data-edge="3"]{width:28px!important;height:30px!important;}
.studio-crop-dialog .free-crop-edge::after{
  content:"";display:block;width:18px;height:6px;box-sizing:border-box;
  background:#1769d1;border:1.5px solid #fff;border-radius:4px;
  box-shadow:0 0 0 1px #1558af,0 1px 4px #0006;
}
.studio-crop-dialog .free-crop-edge[data-edge="1"]::after,
.studio-crop-dialog .free-crop-edge[data-edge="3"]::after{width:6px;height:18px;}
.studio-crop-dialog .free-crop-edge:active{background:transparent!important;}
.studio-crop-dialog .free-crop-outline polygon{fill:#2674e918!important;stroke:#226bde!important;stroke-width:1.5!important;stroke-dasharray:4 2!important;}
.studio-crop-dialog .crop-rotate-row{
  display:flex!important;flex-wrap:wrap!important;gap:6px!important;
  border-color:#dce6f0!important;padding:8px 0!important;
}
.studio-crop-dialog .crop-rotate-row button{
  min-height:36px!important;padding:7px 10px!important;font-size:12px!important;
  border-radius:9px!important;background:#ecf3fc!important;color:#214f7c!important;
  border:1px solid #bdd4ec!important;white-space:normal!important;
}
.studio-crop-dialog .studio-crop-status{padding:7px 10px!important;background:#eaf2fd!important;color:#254f7c!important;font-size:12px!important;}
.studio-crop-dialog .crop-footer-actions{padding-top:9px!important;border-color:#dce6f0!important;gap:8px!important;}
.studio-crop-dialog .crop-footer-actions button{min-height:39px!important;padding:8px 14px!important;font-size:13px!important;border-radius:9px!important;}
.studio-crop-dialog .crop-footer-actions .crop-save{background:#2067d4!important;color:#fff!important;border:1px solid #2067d4!important;box-shadow:none!important;}
.studio-crop-dialog .crop-footer-actions .crop-cancel{background:#eaf0f7!important;color:#26415d!important;border:1px solid #c7d7e7!important;}

/* Editor overlay is mounted directly under <body>, not inside .studio-v46. */
:root[data-theme="dark"] .studio-crop-dialog,
body[data-theme="dark"] .studio-crop-dialog{
  background:#16283d!important;color:#e9f3ff!important;border-color:#415e7d!important;
  color-scheme:dark;
}
:root[data-theme="dark"] .studio-crop-dialog .crop-dialog-head,
body[data-theme="dark"] .studio-crop-dialog .crop-dialog-head,
:root[data-theme="dark"] .studio-crop-dialog .crop-rotate-row,
body[data-theme="dark"] .studio-crop-dialog .crop-rotate-row,
:root[data-theme="dark"] .studio-crop-dialog .crop-footer-actions,
body[data-theme="dark"] .studio-crop-dialog .crop-footer-actions{border-color:#3a5572!important;}
:root[data-theme="dark"] .studio-crop-dialog .crop-dialog-head h3,
body[data-theme="dark"] .studio-crop-dialog .crop-dialog-head h3{color:#f2f8ff!important;}
:root[data-theme="dark"] .studio-crop-dialog .crop-file-name,
body[data-theme="dark"] .studio-crop-dialog .crop-file-name{color:#bbd0e7!important;}
:root[data-theme="dark"] .studio-crop-dialog .crop-close,
body[data-theme="dark"] .studio-crop-dialog .crop-close{background:#294461!important;color:#f2f7ff!important;}
:root[data-theme="dark"] .studio-crop-dialog .crop-instruction,
body[data-theme="dark"] .studio-crop-dialog .crop-instruction{background:#203d5e!important;color:#e2f0ff!important;border-color:#3d6897!important;}
:root[data-theme="dark"] .studio-crop-dialog .studio-crop-mode,
body[data-theme="dark"] .studio-crop-dialog .studio-crop-mode{background:#29435e!important;color:#e0efff!important;border-color:#527394!important;}
:root[data-theme="dark"] .studio-crop-dialog .studio-crop-mode.is-active,
body[data-theme="dark"] .studio-crop-dialog .studio-crop-mode.is-active{background:#2866d4!important;color:#fff!important;border-color:#72a4fa!important;}
:root[data-theme="dark"] .studio-crop-dialog .free-crop-stage,
body[data-theme="dark"] .studio-crop-dialog .free-crop-stage{border-color:#5a7591!important;background:#0d1b2c!important;}
:root[data-theme="dark"] .studio-crop-dialog .crop-rotate-row button,
body[data-theme="dark"] .studio-crop-dialog .crop-rotate-row button{background:#284360!important;color:#e9f4ff!important;border-color:#506e91!important;}
:root[data-theme="dark"] .studio-crop-dialog .studio-crop-status,
body[data-theme="dark"] .studio-crop-dialog .studio-crop-status{background:#233e5b!important;color:#e0efff!important;}
:root[data-theme="dark"] .studio-crop-dialog .crop-footer-actions .crop-cancel,
body[data-theme="dark"] .studio-crop-dialog .crop-footer-actions .crop-cancel{background:#314965!important;color:#f1f7ff!important;border-color:#637c9a!important;}
:root[data-theme="dark"] .studio-crop-dialog .crop-footer-actions .crop-save,
body[data-theme="dark"] .studio-crop-dialog .crop-footer-actions .crop-save{background:#2466d0!important;color:#fff!important;border-color:#6ca1f6!important;}
@media(max-width:600px){
  .studio-crop-overlay{padding:7px!important;}
  .studio-crop-dialog{max-height:calc(100dvh - 14px)!important;padding:10px!important;gap:7px!important;}
  .studio-crop-dialog .free-crop-canvas{max-width:calc(100vw - 38px)!important;max-height:39dvh!important;}
  .studio-crop-dialog .studio-crop-mode{font-size:12px!important;padding:7px 8px!important;}
  .studio-crop-dialog .crop-rotate-row{gap:5px!important;}
  .studio-crop-dialog .crop-rotate-row button{padding:7px 8px!important;font-size:12px!important;min-height:35px!important;}
  .studio-crop-dialog .free-crop-point{width:30px!important;height:30px!important;}
  .studio-crop-dialog .free-crop-edge{width:32px!important;height:30px!important;}
  .studio-crop-dialog .free-crop-edge[data-edge="1"],.studio-crop-dialog .free-crop-edge[data-edge="3"]{width:30px!important;height:32px!important;}
}

/* Secondary text in the image studio also needs contrast in dark mode. */
:root[data-theme="dark"] .studio-v46 .studio-eyebrow,
body[data-theme="dark"] .studio-v46 .studio-eyebrow{color:#a2ceff!important;}
:root[data-theme="dark"] .studio-v46 .image-edit-note,
body[data-theme="dark"] .studio-v46 .image-edit-note,
:root[data-theme="dark"] .studio-v46 .studio-preview-head,
body[data-theme="dark"] .studio-v46 .studio-preview-head{color:#c7d9ee!important;}
:root[data-theme="dark"] .studio-v46 .studio-slider-grid output,
body[data-theme="dark"] .studio-v46 .studio-slider-grid output{color:#a8d0ff!important;}
:root[data-theme="dark"] .studio-v46 .studio-slider-grid label,
body[data-theme="dark"] .studio-v46 .studio-slider-grid label{background:#162a43!important;border-color:#355779!important;}
:root[data-theme="dark"] .studio-v46 .studio-portrait-badge,
body[data-theme="dark"] .studio-v46 .studio-portrait-badge{background:#17365a!important;color:#eef6ff!important;border-color:#4775a8!important;}
:root[data-theme="dark"] .studio-v46 .image-edit-actions .image-reset-btn,
body[data-theme="dark"] .studio-v46 .image-edit-actions .image-reset-btn{background:#2e4863!important;color:#ecf5ff!important;border-color:#54718e!important;}

/* V1.13.48 — single live photo, no before/after comparison or customer export controls. */
.studio-v46 .studio-columns{display:block!important;margin:13px 0!important;}
.studio-v46 .studio-enhance-panel{width:100%!important;box-sizing:border-box;}
.studio-v46 .studio-preview-wrap,.studio-v46 .studio-compare,.studio-v46 .studio-resize-panel{display:none!important;}
.studio-v46 .studio-gallery.studio-single-image{grid-template-columns:minmax(0,min(100%,680px))!important;justify-content:center!important;}
.studio-v46 .studio-gallery.studio-single-image .image-edit-card{width:100%;box-sizing:border-box;}
.studio-v46 .studio-gallery.studio-single-image .image-edit-preview{height:clamp(260px,35vw,440px)!important;}
.studio-v46 .studio-gallery.studio-single-image .image-edit-preview img{max-width:100%;height:100%;object-fit:contain;}
.studio-v46 .studio-gallery .image-edit-card.is-selected{outline:2px solid #3782ed;outline-offset:0;}
.studio-v46 .studio-gallery .image-edit-card.is-selected .image-edit-name{color:#1667c8!important;}
:root[data-theme="dark"] .studio-v46 .studio-gallery .image-edit-card.is-selected .image-edit-name{color:#b8dcff!important;}
@media(max-width:600px){.studio-v46 .studio-gallery.studio-single-image .image-edit-preview{height:min(49vh,370px)!important;}}


/* V1.13.49 — bright, plain-white photo preview and independent corner controls. */
/* White is a true white backdrop, not a checkerboard. It does NOT modify exported pixels. */
.studio-v46 .image-edit-preview,
.studio-v46 .studio-gallery.studio-single-image .image-edit-preview{
  background:#ffffff!important;
  background-image:none!important;
  border:1px solid #cbd7e6!important;
}
/* Explicit light palette, so inherited legacy dark rules cannot darken white mode. */
:root:not([data-theme="dark"]) body:not([data-theme="dark"]) .studio-v46 .image-edit-card{
  background:#ffffff!important;
  border-color:#d2e2f2!important;
  color:#173854!important;
}
:root:not([data-theme="dark"]) body:not([data-theme="dark"]) .studio-v46 .image-edit-name{
  color:#194269!important;
}
:root:not([data-theme="dark"]) body:not([data-theme="dark"]) .studio-v46 .image-edit-note{
  color:#4b6782!important;
}
:root[data-theme="dark"] .studio-v46 .image-edit-preview,
body[data-theme="dark"] .studio-v46 .image-edit-preview{
  background:#f8fbff!important;background-image:none!important;
  border-color:#7891ad!important;
}
.studio-crop-dialog .free-crop-stage{background:#ffffff!important;}
.studio-crop-dialog .free-crop-canvas{background:#ffffff!important;}
/* Enlarged invisible hit-area, without enlarged visible grips. */
.studio-crop-dialog .free-crop-point{width:36px!important;height:36px!important;cursor:grab!important;}
.studio-crop-dialog .free-crop-point::after{width:13px!important;height:13px!important;border-radius:4px!important;}
.studio-crop-dialog .free-crop-point:active{cursor:grabbing!important;}
.studio-crop-dialog .studio-crop-mode.is-active{background:#2069d5!important;color:white!important;}
@media(max-width:600px){.studio-crop-dialog .free-crop-point{width:38px!important;height:38px!important;}}
