/* Only owned nodes/classes are styled. Layer/canvas geometry is never changed. */
.cw-image-replaced { display:none !important; }
.cw-image-actions { display:inline-flex; gap:5px; align-items:center; vertical-align:middle; }
/* Late image UI initialization must not add an empty track to the design
   toolbar's grid. Hidden buttons alone leave their flex container in layout. */
#LumiseDesign #lumise-top-tools > .cw-image-actions:not(:has(> button:not([hidden]))) { display:none !important; }
.cw-image-actions button,.cw-image-editor button,.cw-object-order button,.cw-image-upload-content button {
  font:inherit; cursor:pointer; border:0; border-radius:12px; min-height:42px; padding:10px 14px; background:#f4f1fb; color:#493778; line-height:1.3;
}
.cw-image-actions button[hidden],.cw-image-editor [hidden],.cw-object-order[hidden],.cw-image-upload-heading[hidden] { display:none !important; }
.cw-image-actions button:disabled,.cw-image-editor button:disabled { opacity:.4; cursor:default; }
.cw-image-editor,.cw-object-order { --cw-image-purple:#5c39cd; box-sizing:border-box; position:fixed; z-index:100002; background:#fff; color:#282334; font:14px/1.5 -apple-system,BlinkMacSystemFont,"Noto Sans KR",sans-serif; box-shadow:0 8px 30px #2518441a; }
.cw-image-editor { bottom:0; padding:18px; overflow:auto; overscroll-behavior:contain; scrollbar-width:none; }
.cw-image-editor *,.cw-object-order * { box-sizing:border-box; }
.cw-image-editor::-webkit-scrollbar,.cw-image-filters::-webkit-scrollbar { display:none; }
.cw-image-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.cw-image-heading h2 { font-size:18px; margin:0; font-weight:700; }
.cw-image-heading .cw-image-close { background:transparent; color:#70697e; padding:8px; }
.cw-image-preview { display:flex; justify-content:center; align-items:center; height:clamp(160px,30vh,350px); border-radius:14px; background:repeating-conic-gradient(#f4f2f7 0% 25%,#fff 0% 50%) 50%/16px 16px; overflow:hidden; margin-bottom:16px; }
.cw-image-preview img { display:block; max-width:100%; max-height:100%; object-fit:contain; }
.cw-image-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; padding-bottom:12px; border-bottom:1px solid #eeeaf4; }
.cw-image-tabs button { padding:9px 4px; background:transparent; white-space:nowrap; }
.cw-image-tabs button[aria-pressed="true"] { background:#eee8fc; color:#5c39cd; font-weight:700; }
.cw-image-tabs .cw-image-delete { color:#996174; }
.cw-image-options { padding:16px 0 8px; }
.cw-image-subtabs { display:flex; gap:6px; margin-bottom:16px; }
.cw-image-subtabs button { min-height:34px; padding:6px 18px; background:#f6f5f8; color:#6e687a; }
.cw-image-subtabs button[aria-pressed="true"] { background:#eee8fc; color:#5c39cd; font-weight:600; }
.cw-image-filters { display:flex; gap:10px; overflow-x:auto; scrollbar-width:none; padding:3px 3px 9px; overscroll-behavior:contain; }
.cw-image-editor .cw-image-filter { position:relative; flex:0 0 76px; padding:3px; background:transparent; color:#70697e; border:2px solid transparent; border-radius:12px; font-size:12px; }
.cw-image-filter img { display:block; width:66px; height:62px; object-fit:cover; border-radius:7px; background:#f4f2f7; margin-bottom:6px; }
.cw-image-editor .cw-image-filter[aria-pressed="true"] { border-color:#6d47d8; color:#5c39cd; }
.cw-image-filter[aria-pressed="true"]::after { content:'✓'; position:absolute; top:5px; right:5px; border-radius:50%; width:19px; height:19px; color:white; background:#5c39cd; text-align:center; }
.cw-image-range { display:grid; grid-template-columns:52px minmax(0,1fr) 32px; align-items:center; gap:9px; min-height:48px; font-size:13px; }
.cw-image-range input { min-width:0; width:100%; accent-color:#6942d5; cursor:pointer; height:28px; }
.cw-image-range input::-webkit-slider-thumb { background:#6942d5; border:2px solid #fff; box-shadow:0 0 0 1px #6942d5; }
.cw-image-range input::-moz-range-thumb { background:#6942d5; border:2px solid #fff; box-shadow:0 0 0 1px #6942d5; }
.cw-image-range output { text-align:right; font-variant-numeric:tabular-nums; color:#6d647e; }
.cw-image-hint { font-size:12px; color:#797183; margin:10px 0 0; }
.cw-image-status { color:#98536c; margin:4px 0; font-size:12px; }
.cw-image-status:empty { display:none; }
.cw-image-footer { display:flex; gap:10px; padding-top:16px; }
.cw-image-footer button { flex:1; }
.cw-image-editor .cw-image-primary,.cw-image-upload-content .cw-image-primary { background:#5c39cd; color:#fff; font-weight:600; }
.cw-image-editor .cw-image-secondary { background:#f3f0f8; color:#655875; }
.cw-object-order { width:202px; border:1px solid #eeeaf5; padding:12px; border-radius:14px; }
.cw-object-order > button { display:block; width:100%; text-align:left; background:transparent; color:#443752; }
.cw-object-order > button:hover { background:#f3effc; }
.cw-object-order .cw-image-heading { margin-bottom:4px; }
.cw-object-order-icon { display:inline-block; margin-right:6px; font-size:19px; }
.cw-object-order-icon {position:relative;}
.cw-object-order-metric {visibility:hidden;}
.cw-object-order-icon > svg {position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:1em;height:1em;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;pointer-events:none;}
.cw-object-order-icon > svg > path {fill:none !important;stroke:currentColor !important;}
#LumiseDesign #lumise-upload-form.cw-image-upload { padding:30px 14px; border:0; background:#fff; border-radius:16px; height:auto; min-height:220px; }
#LumiseDesign #lumise-upload-form.cw-image-upload > i,#LumiseDesign #lumise-upload-form.cw-image-upload > span { display:none; }
.cw-image-upload-content { text-align:center; }
.cw-image-upload-icon { display:block; box-sizing:border-box; width:72px; height:72px; padding:18px; margin:0 auto 20px; border-radius:22px; color:#7954d6; background:linear-gradient(145deg,#f3eeff,#ebe3fc); box-shadow:inset 0 1px 0 #ffffffcc; line-height:0; }
.cw-image-upload-icon > svg { display:block; width:36px; height:36px; }
/* Keep this decorative outline isolated from theme-wide SVG fill rules. */
.cw-image-upload-icon > svg,.cw-image-upload-icon > svg > path { fill:none !important; stroke:#7954d6 !important; stroke-width:1.55 !important; }
.cw-image-upload-content h3 { margin:0 0 18px; color:#554963; font-size:17px; }
.cw-image-upload-content small { display:block; margin-top:12px; color:#90869b; }
.cw-image-upload-heading { font-size:14px; color:#655773; margin:20px 12px 10px; }
/* Touch users need to delete without first tapping the photo to reveal hover controls. */
@media(max-width:736px),(hover:none),(pointer:coarse){
 #lumise-left #lumise-upload-list li.lumise-clipart > i[data-delete] {display:flex;align-items:center;justify-content:center;top:4px;left:4px;width:44px;height:44px;z-index:2;opacity:1;background:rgba(255,255,255,.95);color:#655773;touch-action:manipulation;transition:none;}
}
.cw-image-crop .lumise_crop_selArea { outline:2px solid #8058de; }
#lumise-lightbox.cw-image-crop #lumise-lightbox-body { max-width:calc(100vw - 32px); border-radius:16px; background:#fff; }
#lumise-lightbox.cw-image-crop #lumise-lightbox-content { min-width:0; width:100%; margin:0; padding:20px 20px 8px; scrollbar-width:none; }
#lumise-lightbox.cw-image-crop #lumise-lightbox-content::-webkit-scrollbar { display:none; }
#lumise-lightbox.cw-image-crop .lumise_crop_dragArea { overflow:visible; max-width:100%; }
#lumise-lightbox.cw-image-crop .lumise_crop_img { max-width:100%; max-height:58vh !important; }
#lumise-lightbox.cw-image-crop .lumise_crop_handle { width:28px; height:28px; background:transparent; border:0; margin:0; opacity:1; transform:translate(-50%,-50%); }
#lumise-lightbox.cw-image-crop .lumise_crop_handle::after { content:''; position:absolute; left:8px; top:8px; width:12px; height:12px; border:2px solid #8058de; background:#fff; border-radius:50%; box-sizing:border-box; pointer-events:none; }
#lumise-lightbox.cw-image-crop .lumise_crop_handleN { left:50%; top:0; }
#lumise-lightbox.cw-image-crop .lumise_crop_handleNE { left:100%; top:0; right:auto; }
#lumise-lightbox.cw-image-crop .lumise_crop_handleE { left:100%; top:50%; right:auto; }
#lumise-lightbox.cw-image-crop .lumise_crop_handleSE { left:100%; top:100%; right:auto; bottom:auto; }
#lumise-lightbox.cw-image-crop .lumise_crop_handleS { left:50%; top:100%; bottom:auto; }
#lumise-lightbox.cw-image-crop .lumise_crop_handleSW { left:0; top:100%; bottom:auto; }
#lumise-lightbox.cw-image-crop .lumise_crop_handleW { left:0; top:50%; }
#lumise-lightbox.cw-image-crop .lumise_crop_handleNW { left:0; top:0; }
.cw-image-crop .lumise_crop_marqueeHoriz,.cw-image-crop .lumise_crop_marqueeVert { background:#8058de !important; }
.cw-image-crop .lumise-crop-btns { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; }
#lumise-lightbox.cw-image-crop .lumise-crop-btns li { border-radius:9px; padding:10px 13px; min-height:42px; color:#645773; }
#lumise-lightbox.cw-image-crop .lumise-crop-btns li[data-func="save"] { background:#5c39cd; color:#fff; }
#lumise-lightbox.cw-image-crop .lumise-crop-btns li.active { background:#eee8fc; color:#5c39cd; }
.cw-image-editor button:focus-visible,.cw-image-actions button:focus-visible,.cw-object-order button:focus-visible,.cw-image-crop [role="button"]:focus-visible { outline:2px solid #8b68d9; outline-offset:2px; }
@media(max-width:736px) {
  .cw-image-editor { left:0; right:0; top:auto; bottom:0; width:auto; max-height:88vh; max-height:88dvh; padding:14px 16px calc(16px + env(safe-area-inset-bottom)); border-radius:22px 22px 0 0; box-shadow:0 -5px 25px #2518441a; }
  .cw-image-preview { height:clamp(130px,27vh,280px); margin-bottom:12px; }
  .cw-image-heading { margin-bottom:10px; }
  .cw-image-options { padding-top:12px; }
  .cw-object-order { width:auto; left:0; right:0; top:auto; bottom:0; border-radius:22px; padding:16px 20px calc(20px + env(safe-area-inset-bottom)); }
  .cw-object-order > button { min-height:48px; }
  .cw-image-actions button { min-height:38px; padding:7px 9px; font-size:12px; }
  .cw-image-crop .lumise_crop_img { max-height:60vh !important; max-width:100%; }
}
/* 0.2.0 image-owned shared panel and native range presentation. */
.cw-image-editor[popover] {margin:0;border:0;max-width:none;max-height:none;color:#282334}
.cw-image-editor::backdrop {background:transparent;pointer-events:none}
.cw-image-editor {display:flex;flex-direction:column;overflow:hidden;padding:0;min-height:0}
.cw-image-editor .cw-image-heading {flex:none;padding:12px 18px;margin:0;position:relative}
.cw-image-editor.cw-image-scrolled .cw-image-heading::after {content:'';position:absolute;bottom:0;left:0;right:0;height:1px;background:#e6e7eb}
.cw-image-editor .cw-image-scroll {flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;scroll-padding:12px}
.cw-image-editor .cw-image-scroll::-webkit-scrollbar {display:none}
.cw-image-editor .cw-image-content {padding:0 18px 16px}
.cw-image-editor .cw-image-footer {flex:none;padding:12px 18px max(12px,env(safe-area-inset-bottom));background:white}
.cw-image-editor .cw-image-handle {display:none}
.cw-image-editor .cw-image-source-actions {display:flex;gap:8px;margin:4px 0 12px}
.cw-image-editor .cw-image-filters {margin-inline:-18px;padding-inline:18px;scroll-padding-inline:18px;touch-action:pan-x pan-y}
.cw-image-editor .cw-image-range input {appearance:none;-webkit-appearance:none;height:44px;background:transparent;touch-action:none;margin:0}
.cw-image-editor .cw-image-range input::-webkit-slider-runnable-track {height:5px;background:#dcd2f3;border-radius:5px}
.cw-image-editor .cw-image-range input::-webkit-slider-thumb {appearance:none;-webkit-appearance:none;width:20px;height:20px;margin-top:-7.5px;border-radius:50%;background:#9472db;border:2px solid white;box-shadow:0 0 0 1px #b49be9;transition:transform .12s}
.cw-image-editor .cw-image-range input:active::-webkit-slider-thumb {transform:scale(1.18)}
.cw-image-editor .cw-image-range input::-moz-range-track {height:5px;background:#dcd2f3;border-radius:5px}
.cw-image-editor .cw-image-range input::-moz-range-thumb {width:18px;height:18px;border-radius:50%;background:#9472db;transition:transform .12s}
.cw-image-editor .cw-image-range input:active::-moz-range-thumb {transform:scale(1.18)}
@media(max-width:736px){
 .cw-image-editor {left:0;right:0;top:auto;bottom:var(--cw-sheet-bottom,0px);height:var(--cw-sheet-height,50dvh);max-height:none;min-height:0;transition:height .18s ease;border-radius:20px 20px 0 0}
 .cw-image-editor.cw-image-dragging {transition:none}
 .cw-image-editor .cw-image-handle {display:block;flex:0 0 24px;min-height:24px;height:24px;padding:0;background:white;color:transparent;font-size:0;touch-action:none;border-radius:0;cursor:ns-resize}
 .cw-image-editor .cw-image-handle::after {content:'';display:block;width:36px;height:4px;border-radius:3px;background:#d6cde5;margin:auto}
 .cw-image-editor .cw-image-content {padding-inline:16px}
 .cw-image-editor .cw-image-filters {margin-inline:-16px;padding-inline:16px;scroll-padding-inline:16px}
 .cw-image-editor .cw-image-preview {display:none}
}
@media(prefers-reduced-motion:reduce){.cw-image-editor,.cw-image-editor input::-webkit-slider-thumb{transition:none}}
@media(max-width:736px){
 #LumiseDesign #lumise-uploads.cw-image-upload-sheet {display:flex!important;position:fixed!important;left:0!important;right:0!important;top:auto!important;bottom:var(--cw-sheet-bottom,0px)!important;width:auto!important;height:var(--cw-sheet-height,54dvh)!important;max-height:none!important;padding:0!important;margin:0!important;border:0;background:white;z-index:100003;overflow:hidden!important}
 #LumiseDesign #lumise-uploads.cw-image-upload-sheet > .cw-image-scroll {height:auto!important;max-height:none!important;overflow:auto!important}
 #LumiseDesign #lumise-uploads.cw-image-upload-sheet .cw-image-content > div[data-tab] {height:auto!important;max-height:none!important;overflow:visible!important}
 #LumiseDesign #lumise-uploads.cw-image-upload-sheet .cw-image-content {padding-bottom:max(16px,env(safe-area-inset-bottom))}
}
/* 0.3.0 — image-owned surfaces only. No canvas geometry or body locks. */
.cw-image-editor,.cw-object-order {z-index:var(--cw-image-panel-z,100002)}
.cw-image-upload-content .cw-image-primary {min-height:46px;padding:12px 24px}
#LumiseDesign #lumise-upload-form.cw-image-upload {box-shadow:0 4px 18px #49377809;background:linear-gradient(180deg,#faf8ff,#fff);border:1px solid #f0eaf9}
.cw-image-editor .cw-image-handle:focus-visible {outline:2px solid #8058de;outline-offset:-3px}
.cw-image-crop-ratios {display:flex;gap:6px;flex-wrap:wrap;margin:0 0 18px;justify-content:center}
.cw-image-crop-ratios button {font:inherit;min-height:44px;padding:8px 14px;border:1px solid #e9e1f4;border-radius:10px;background:#fff;color:#665876;cursor:pointer}
.cw-image-crop-ratios button[aria-pressed=true] {background:#eee8fc;border-color:#8058de;color:#5c39cd}
.cw-image-crop-ratios button:focus-visible {outline:2px solid #8058de;outline-offset:2px}
.cw-image-crop [hidden] {display:none!important}
.cw-image-editor .cw-image-reset {margin-top:10px;font-size:13px}
.cw-image-editor .cw-image-range:has(input[aria-label="모서리 둥글기"]) {grid-template-columns:86px minmax(0,1fr) 32px}
.cw-object-order > button {display:flex;align-items:center;gap:12px}
.cw-object-order > button:disabled {opacity:.4;cursor:default}
.cw-object-order-symbol {width:22px;text-align:center;color:#6d47d8;font-size:20px}
.cw-object-order {max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;scrollbar-width:none}
.cw-object-order::-webkit-scrollbar {display:none}
@media(max-width:736px){
 .cw-image-editor .cw-image-preview {display:flex;height:clamp(130px,23dvh,230px);margin-bottom:14px}
 .cw-image-editor .cw-image-handle {flex-basis:36px;min-height:36px;height:36px}
 .cw-image-editor .cw-image-tabs button,.cw-image-editor .cw-image-subtabs button,.cw-image-actions button {min-height:44px}
 #lumise-lightbox.cw-image-crop .lumise_crop_handle {width:44px;height:44px}
 #lumise-lightbox.cw-image-crop .lumise_crop_handle::after {left:15px;top:15px;width:14px;height:14px}
 .cw-object-order {max-height:calc(100dvh - 72px)}
}

/* 0.4.0: native upload list remains scrollable inside the active panel. */
#lumise-uploads.cw-image-upload-sheet .cw-image-scroll {overscroll-behavior:contain;min-height:0;scrollbar-width:none}
#lumise-uploads.cw-image-upload-sheet .cw-image-scroll::-webkit-scrollbar {display:none}
.cw-image-upload-heading[hidden] {display:none!important}

/* 0.4.1: opt-in photo picker, not the native uploads container or desktop panel. */
@media(max-width:736px){
 .cw-image-picker {--cw-picker-safe-top:env(safe-area-inset-top,0px);position:fixed;inset:auto 0 var(--cw-sheet-bottom,0px);margin:0;width:100%;max-width:none;max-height:none;height:var(--cw-sheet-height,68dvh);box-sizing:border-box;border:0;padding:0;color:#282334;background:white;z-index:var(--cw-image-panel-z,100003);transition:height .24s cubic-bezier(.2,.8,.2,1);overscroll-behavior:none}
 .cw-image-picker::backdrop {background:rgba(25,18,43,.28);touch-action:none}
 .cw-image-picker.cw-image-dragging {transition:none;user-select:none}
 .cw-image-picker .cw-image-picker-drag {flex:0 0 auto;touch-action:none;cursor:ns-resize}
 .cw-image-picker .cw-image-handle {height:48px;min-height:48px;flex-basis:48px;width:100%}
 .cw-image-picker .cw-image-handle::after {width:40px;height:5px}
 .cw-image-picker .cw-image-heading {padding-top:0;padding-bottom:12px}
 .cw-image-picker .cw-image-close {touch-action:manipulation;cursor:pointer}
 .cw-image-picker .cw-image-scroll {flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;scrollbar-width:none}
 .cw-image-picker .cw-image-scroll::-webkit-scrollbar {display:none}
 .cw-image-picker .cw-image-content {padding:0 16px max(20px,env(safe-area-inset-bottom,0px))}
 .cw-image-picker-help {font-size:13px;line-height:1.5;color:#736b80;margin:0 0 14px}
 #LumiseDesign .cw-image-picker #lumise-upload-form.cw-image-upload {padding:0;margin:0 0 16px;border:0;box-shadow:none;background:none;min-height:0}
 .cw-image-picker .cw-image-upload-content h3,.cw-image-picker .cw-image-upload-icon,.cw-image-picker .cw-image-upload-content small {display:none}
 .cw-image-picker .cw-image-upload-content .cw-image-primary {width:100%;min-height:48px}
 .cw-image-picker .cw-image-upload-heading {font-size:14px;margin:0 0 12px}
 #lumise-left .cw-image-picker #lumise-upload-list {width:100%;height:auto;max-height:none;overflow:visible;padding:0}
 .cw-image-picker #lumise-upload-list ul.lumise-list-items {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;width:100%;height:auto;max-height:none;overflow:visible;padding:0;margin:0}
 .cw-image-picker #lumise-upload-list ul.lumise-list-items>li {float:none;width:auto;min-width:0;height:auto;aspect-ratio:1;margin:0;box-sizing:border-box;border-radius:12px;background-size:cover;background-position:center}
 .cw-image-picker #lumise-upload-list li img {width:100%;height:100%;object-fit:cover;border-radius:inherit}
 .cw-image-picker-empty {text-align:center;color:#7b7386;padding:24px 0;margin:0;font-size:14px}
}
@media(prefers-reduced-motion:reduce){.cw-image-picker{transition:none}}

@media(max-width:736px){
 #lumise-left #lumise-uploads .cw-image-picker div[data-tab] {float:none;overflow:visible;max-height:none}
}

/* Photo editing replaces only the desktop Images section contents. */
@media(min-width:737px){
 #LumiseDesign #lumise-left #lumise-uploads.cw-image-editing{overflow:hidden!important;}
 #LumiseDesign #lumise-left #lumise-uploads.cw-image-editing > :not(.cw-image-editor-docked){display:none!important;}
 #LumiseDesign #lumise-left #lumise-uploads > .cw-image-editor-docked{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;border:0;border-radius:0;box-shadow:none;z-index:auto;}
 #LumiseDesign #lumise-left .cw-image-editor-docked .cw-image-heading{padding:24px 16px 12px;align-items:center;}
 #LumiseDesign #lumise-left .cw-image-editor-docked .cw-image-heading h2{display:flex;align-items:center;gap:10px;height:44px;min-height:44px;margin:0;padding:0;min-width:0;font:600 18px/24px system-ui,-apple-system,sans-serif;color:#302a3b;}
 #LumiseDesign #lumise-left .cw-image-editor-docked .cw-image-close{min-height:44px;}
 #LumiseDesign #lumise-left .cw-image-editor-docked .cw-image-content{padding:0 16px 16px;}
 #LumiseDesign #lumise-left .cw-image-editor-docked .cw-image-footer{padding:12px 16px;}
 #LumiseDesign #lumise-left .cw-image-editor-docked .cw-image-footer button{min-height:44px;}
 #LumiseDesign .cw-image-editor .cw-image-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 10px;overflow:visible;margin:0;padding:3px 0 9px;scroll-padding:0;}
 #LumiseDesign .cw-image-editor .cw-image-filter{width:100%;min-width:0;}
 #LumiseDesign .cw-image-editor .cw-image-filter img{width:100%;height:auto;aspect-ratio:1;}
 #LumiseDesign .cw-image-editor .cw-image-filter > span{display:block;line-height:1.4;overflow-wrap:anywhere;}
}
.cw-image-editor-icon{display:none;}
.cw-image-editor-docked .cw-image-editor-icon{display:inline-flex;width:24px;height:24px;flex:none;color:inherit;}
div#LumiseDesign .cw-image-editor-icon svg{display:block;width:24px;height:24px;fill:none!important;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;}
div#LumiseDesign .cw-image-editor-icon svg path{fill:none!important;stroke:currentColor!important;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;}
