#evxmodal-box.portal-image-editor-modal-box {
    --card: #f6f9fc;
    --text: #173041;
    --muted: #6f8594;
    --border: #d4dee6;
    --surface-soft: rgba(9, 100, 176, .05);
    --surface-soft-muted: rgba(23, 48, 65, .035);
    --surface-panel: rgba(255, 255, 255, .82);
    --surface-panel-strong: rgba(255, 255, 255, .92);
    --ui-border: rgba(23, 48, 65, .14);
    --ui-border-soft: rgba(23, 48, 65, .10);
    --label-text: rgba(23, 48, 65, .88);
    --hint-text: rgba(23, 48, 65, .72);
    --canvas-bg: #f4f8fb;
    --overlay-ink: rgba(17, 39, 60, .72);
    --overlay-ink-strong: rgba(17, 39, 60, .92);
    --overlay-ink-mid: rgba(17, 39, 60, .65);
    --scroll-track: rgba(23, 48, 65, .10);
    --scroll-thumb-border: rgba(255, 255, 255, .7);
    --split-zoom-bg: rgba(255, 255, 255, .96);
    --split-zoom-view-bg: #eef4f9;
    --split-crosshair: rgba(23, 48, 65, .88);
    --status-surface: rgba(23, 48, 65, .03);
    --status-error-text: #b33b3b;
    --status-success-text: #20764f;
    --evxmodal-surface: #f6f9fc;
    --evxmodal-surface-elevated: #edf3f8;
    --evxmodal-surface-input: #ffffff;
    --evxmodal-border: #d4dee6;
    --evxmodal-text: #173041;
    --evxmodal-text-muted: #6f8594;
    --evxmodal-link: #0964b0;
    --evxmodal-link-hover: #0b4f88;
}

html.dark #evxmodal-box.portal-image-editor-modal-box,
html[data-bs-theme=dark] #evxmodal-box.portal-image-editor-modal-box {
    --card: #10161d;
    --text: #f7f9fc;
    --muted: #b8c7d4;
    --border: #31516a;
    --surface-soft: rgba(255, 255, 255, .04);
    --surface-soft-muted: rgba(255, 255, 255, .03);
    --surface-panel: rgba(255, 255, 255, .025);
    --surface-panel-strong: rgba(5, 11, 16, .94);
    --ui-border: rgba(255, 255, 255, .12);
    --ui-border-soft: rgba(255, 255, 255, .08);
    --label-text: rgba(255, 255, 255, .88);
    --hint-text: rgba(255, 255, 255, .72);
    --canvas-bg: #020406;
    --overlay-ink: rgba(5, 11, 16, .75);
    --overlay-ink-strong: rgba(5, 11, 16, .95);
    --overlay-ink-mid: rgba(5, 11, 16, .65);
    --scroll-track: rgba(255, 255, 255, .10);
    --scroll-thumb-border: rgba(8, 18, 24, .35);
    --split-zoom-bg: rgba(5, 11, 16, .94);
    --split-zoom-view-bg: #04080b;
    --split-crosshair: rgba(255, 255, 255, .92);
    --status-surface: rgba(255, 255, 255, .03);
    --status-error-text: #f3b2b2;
    --status-success-text: #b9ebd1;
    --evxmodal-surface: #10161d;
    --evxmodal-surface-elevated: #16212b;
    --evxmodal-surface-input: #0f1a21;
    --evxmodal-border: #31516a;
    --evxmodal-text: #f7f9fc;
    --evxmodal-text-muted: #b8c7d4;
    --evxmodal-link: #7fc6ff;
    --evxmodal-link-hover: #a9ddff;
}

.portal-image-editor {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    height: auto;
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    overflow: hidden;
}

.portal-image-editor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-end;
    overflow: visible;
    margin-top: 0;
}

.portal-image-editor-tab-button {
    flex: 0 0 auto;
    width: auto;
    height: auto;
    min-height: 40px;
    padding: 11px 14px 9px;
    margin-right: 0;
    margin-bottom: 0 !important;
    border: 1px solid var(--ui-border);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--text) !important;
    box-shadow: none;
}

.portal-image-editor-tab-button.EVX-Tab-Btn-Active-Editor,
.portal-image-editor-tab-button[aria-selected="true"] {
    background: rgba(23, 161, 174, .18);
    border-color: rgba(23, 161, 174, .8);
    color: var(--text) !important;
    box-shadow: inset 0 0 0 1px rgba(23, 161, 174, .15);
}

.portal-image-editor-mobile-tab-nav {
    display: none;
}

.portal-image-editor-nav-select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--ui-border);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--text);
    padding: 8px 12px;
    box-sizing: border-box;
}

.portal-image-editor.is-split-section .portal-image-editor-edit-only,
.portal-image-editor.is-split-section.is-uv-workflow .portal-image-editor-edit-tools-only,
.portal-image-editor.is-edit-section .portal-image-editor-split-only {
    display: none !important;
}

html.portal-image-editor-open,
body.portal-image-editor-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

#evxmodal.portal-image-editor-modal-backdrop {
    background: rgba(3, 8, 12, .42);
}

#evxmodal-box.portal-image-editor-modal-box {
    background: var(--card);
    position: fixed;
    top: 16px;
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
    max-width: none;
    height: auto;
    max-height: none;
    margin-top: 0;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

#evxmodal-box.portal-image-editor-modal-box #evxmodal-box-title,
#evxmodal-box.portal-image-editor-modal-box .evxmodal-box-title,
#evxmodal-box.portal-image-editor-modal-box #evxmodal-box-buttons,
#evxmodal-box.portal-image-editor-modal-box .evxmodal-box-buttons {
    flex: 0 0 auto;
}

#evxmodal-box.portal-image-editor-modal-box #evxmodal-box-content,
#evxmodal-box.portal-image-editor-modal-box .evxmodal-box-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#evxmodal-box.portal-image-editor-modal-box #evxmodal-box-msg,
#evxmodal-box.portal-image-editor-modal-box .evxmodal-box-msg {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    height: auto;
    max-height: none;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    padding: 10px 14px 8px;
    box-sizing: border-box;
    overflow: hidden;
}

#evxmodal-box.portal-image-editor-modal-box #evxmodal-box-buttons,
#evxmodal-box.portal-image-editor-modal-box .evxmodal-box-buttons {
    display: flex;
    justify-content: flex-end;
    min-height: 56px;
    box-sizing: border-box;
}

#evxmodal-box.portal-image-editor-modal-box .evxmodal-box-buttons-center {
    display: none;
}

#evxmodal-box.portal-image-editor-modal-box .evxmodal-box-buttons-left,
#evxmodal-box.portal-image-editor-modal-box .evxmodal-box-buttons-right {
    display: flex;
    align-items: center;
    margin-left: 0;
    margin-right: 0;
}

#evxmodal-box.portal-image-editor-modal-box .evxmodal-box-buttons-left {
    margin-left: auto;
}

#evxmodal-box.portal-image-editor-modal-box .evxmodal-box-button-confirm,
#evxmodal-box.portal-image-editor-modal-box .evxmodal-box-button-cancel {
    margin-bottom: 0;
}

#evxmodal-box.portal-image-editor-modal-box #evxmodal-box-button-close,
#evxmodal-box.portal-image-editor-modal-box .evxmodal-box-button-close {
    color: var(--text);
}

.portal-image-editor-toolbar,
.portal-image-editor-viewbar {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    overflow-x: auto;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.portal-image-editor-toolbar::-webkit-scrollbar,
.portal-image-editor-viewbar::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.portal-image-editor-mobile-view-nav {
    display: none;
    width: 100%;
    margin: 0;
}

.portal-image-editor-mode-group,
.portal-image-editor-action-group,
.portal-image-editor-view-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
}

.portal-image-editor-toolbar-divider {
    width: 1px;
    align-self: stretch;
    background: var(--ui-border);
}

.portal-image-editor-button,
.portal-image-editor-view-button,
.portal-image-editor-slider-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 11px 14px 9px;
    border: 1px solid var(--ui-border);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--text);
    line-height: 1.2;
    overflow: visible;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, opacity .15s ease;
}

#evxmodal-box.portal-image-editor-modal-box .portal-image-editor-button,
#evxmodal-box.portal-image-editor-modal-box .portal-image-editor-view-button,
#evxmodal-box.portal-image-editor-modal-box .portal-image-editor-slider-reset,
#evxmodal-box.portal-image-editor-modal-box .portal-image-editor-sidebar-tab,
#evxmodal-box.portal-image-editor-modal-box .portal-image-editor-tab-button,
#evxmodal-box.portal-image-editor-modal-box .portal-image-editor-select,
#evxmodal-box.portal-image-editor-modal-box .portal-image-editor-input,
#evxmodal-box.portal-image-editor-modal-box .portal-image-editor-nav-select,
#evxmodal-box.portal-image-editor-modal-box .portal-image-editor-label,
#evxmodal-box.portal-image-editor-modal-box .portal-image-editor-label-text,
#evxmodal-box.portal-image-editor-modal-box .portal-image-editor-label-icon {
    color: var(--text) !important;
}

.portal-image-editor-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    line-height: 1.2;
}

.portal-image-editor-label--muted {
    color: inherit;
}

.portal-image-editor-label-icon {
    width: 14px;
    min-width: 14px;
    text-align: center;
    opacity: .88;
}

.portal-image-editor-label-text {
    min-width: 0;
    line-height: 1.2;
}

.portal-image-editor-button.is-active,
.portal-image-editor-view-button.is-active {
    border-color: rgba(23, 161, 174, .8);
    background: rgba(23, 161, 174, .18);
}

.portal-image-editor-view-button.is-done {
    box-shadow: inset 0 0 0 1px rgba(83, 199, 145, .55);
}

.portal-image-editor-button--primary {
    border-color: rgba(23, 161, 174, .55);
    background: rgba(23, 161, 174, .18);
}

.portal-image-editor-button--success {
    border-color: rgba(83, 199, 145, .45);
    background: rgba(83, 199, 145, .12);
}

.portal-image-editor-button--danger {
    border-color: rgba(216, 96, 96, .35);
}

.portal-image-editor-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: end;
}

.portal-image-editor-control {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.portal-image-editor-control-label {
    color: var(--label-text);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.portal-image-editor-control-label .portal-image-editor-label {
    display: inline-flex;
}

.portal-image-editor-control-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.portal-image-editor-centered-range {
    position: relative;
    display: block;
    flex: 1 1 auto;
}

.portal-image-editor-centered-range::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 16px;
    margin-top: -8px;
    margin-left: -1px;
    border-radius: 999px;
    background: rgba(255, 206, 86, .9);
    box-shadow: 0 0 0 1px var(--overlay-ink);
    pointer-events: none;
}

.portal-image-editor-range {
    flex: 1 1 auto;
    width: 100%;
}

.portal-image-editor-value {
    min-width: 46px;
    color: var(--text);
    font-size: 12px;
    text-align: right;
}

.portal-image-editor-split-tools {
    display: grid;
    flex: 0 0 auto;
    gap: 12px;
    min-height: 0;
}

.portal-image-editor-template-bar {
    display: grid;
    grid-template-columns: minmax(200px, 260px) minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.portal-image-editor-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.portal-image-editor-field-label {
    color: var(--label-text);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.portal-image-editor-select,
.portal-image-editor-input {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid var(--ui-border);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--text);
    box-sizing: border-box;
}

.portal-image-editor-template-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.portal-image-editor-template-actions::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.portal-image-editor-layout {
    display: flex;
    position: relative;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.portal-image-editor-workspace {
    display: flex;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    min-width: 0;
    gap: 14px;
    align-items: stretch;
    overflow: hidden;
}

.portal-image-editor-stage {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    padding: 14px;
    border: 1px solid var(--ui-border-soft);
    border-radius: 14px;
    background: var(--surface-panel);
    overflow: hidden;
    min-width: 0;
    box-sizing: border-box;
}

.portal-image-editor-sidebar {
    display: flex;
    flex: 0 0 320px;
    width: 320px;
    min-width: 280px;
    max-width: 360px;
    min-height: 0;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--ui-border-soft);
    border-radius: 14px;
    background: var(--surface-panel);
    box-sizing: border-box;
    overflow: auto;
}

.portal-image-editor-sidebar-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ui-border-soft);
}

.portal-image-editor-sidebar-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 11px 14px 9px;
    border: 1px solid var(--ui-border);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--text);
    cursor: pointer;
}

.portal-image-editor-sidebar-tab.is-active {
    border-color: rgba(23, 161, 174, .8);
    background: rgba(23, 161, 174, .18);
}

.portal-image-editor-sidebar-panel {
    display: none;
    gap: 12px;
}

.portal-image-editor-sidebar-panel.is-active {
    display: grid;
}

.portal-image-editor-sidebar-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.portal-image-editor-symbol-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.portal-image-editor-symbol-hint,
.portal-image-editor-counter-empty {
    margin: 0;
    color: var(--hint-text);
    font-size: 12px;
    line-height: 1.45;
}

.portal-image-editor-color {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--ui-border);
    border-radius: 10px;
    background: var(--surface-soft);
    padding: 4px;
    box-sizing: border-box;
}

.portal-image-editor-counter-notes {
    display: grid;
    gap: 8px;
}

.portal-image-editor-counter-notes-list {
    display: grid;
    gap: 8px;
}

.portal-image-editor-counter-note {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--ui-border-soft);
    border-radius: 12px;
    background: var(--surface-soft-muted);
}

.portal-image-editor-counter-note.is-selected {
    border-color: rgba(23, 161, 174, .7);
    background: rgba(23, 161, 174, .10);
}

.portal-image-editor-counter-note-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.portal-image-editor-canvas-wrap {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    height: auto;
    align-items: flex-start;
    justify-content: flex-start;
    line-height: 0;
    width: 100%;
    min-height: 0;
    overflow: auto;
    min-width: 0;
    box-sizing: border-box;
    -ms-overflow-style: auto;
    scrollbar-width: auto;
    scrollbar-color: rgba(23, 161, 174, .9) var(--scroll-track);
    scrollbar-gutter: stable both-edges;
}

.portal-image-editor-canvas-wrap::-webkit-scrollbar {
    width: 12px;
    height: 12px;
    display: block;
}

.portal-image-editor-canvas-wrap::-webkit-scrollbar-track {
    background: var(--scroll-track);
    border-radius: 10px;
}

.portal-image-editor-canvas-wrap::-webkit-scrollbar-thumb {
    background: rgba(23, 161, 174, .9);
    border-radius: 10px;
    border: 2px solid var(--scroll-thumb-border);
}

.portal-image-editor-canvas-wrap::-webkit-scrollbar-corner {
    background: var(--scroll-track);
}

.portal-image-editor-frame {
    position: relative;
    display: block;
    max-width: none;
    max-height: none;
    flex: 0 0 auto;
    line-height: 0;
    margin: auto;
}

.portal-image-editor-source-image {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.portal-image-editor-preview-canvas {
    display: block;
    max-width: none;
    max-height: none;
    height: 100%;
    width: 100%;
    border-radius: 0;
    user-select: none;
    -webkit-user-drag: none;
    background: var(--canvas-bg);
}

.portal-image-editor-annotation-canvas {
    position: absolute;
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.portal-image-editor-overlay {
    position: absolute;
    inset: 0;
    top: 0;
    left: 0;
    border-radius: 0;
    touch-action: none;
    z-index: 3;
    overflow: hidden;
}

.portal-image-editor-annotation-layer {
    position: absolute;
    inset: 0;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    z-index: 3;
}

.portal-image-editor-grid {
    position: absolute;
    inset: 0;
    border-radius: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px var(--ui-border);
    background-image:
        linear-gradient(to right, rgba(0,0,0,.34) 0, rgba(0,0,0,.34) 1px, rgba(255,255,255,.22) 1px, rgba(255,255,255,.22) 2px, transparent 2px),
        linear-gradient(to bottom, rgba(0,0,0,.34) 0, rgba(0,0,0,.34) 1px, rgba(255,255,255,.22) 1px, rgba(255,255,255,.22) 2px, transparent 2px),
        linear-gradient(to right, rgba(2, 10, 14, .58) 0, rgba(2, 10, 14, .58) 1px, rgba(63, 214, 228, .52) 1px, rgba(63, 214, 228, .52) 3px, transparent 3px),
        linear-gradient(to bottom, rgba(2, 10, 14, .58) 0, rgba(2, 10, 14, .58) 1px, rgba(63, 214, 228, .52) 1px, rgba(63, 214, 228, .52) 3px, transparent 3px);
    background-size: 10% 100%, 100% 10%, 25% 100%, 100% 25%;
    background-position: 0 0, 0 0, 0 0, 0 0;
}

.portal-image-editor-overlay.is-split-mode {
    cursor: crosshair;
}

.portal-image-editor-overlay.is-straighten-mode {
    cursor: crosshair;
}

.portal-image-editor-overlay.is-blemish-mode {
    cursor: none;
}

.portal-image-editor-box,
.portal-image-editor-blemish-cursor,
.portal-image-editor-blemish,
.portal-image-editor-straighten-line,
.portal-image-editor-straighten-point {
    position: absolute;
    box-sizing: border-box;
}

.portal-image-editor-box {
    border: 2px solid rgba(23, 161, 174, .95);
    background: rgba(23, 161, 174, .16);
    border-radius: 6px;
    color: inherit;
}

.portal-image-editor-box[data-view-code] {
    cursor: move;
}

.portal-image-editor-box.is-active {
    border-color: rgba(255, 206, 86, .95);
    background: rgba(255, 206, 86, .18);
}

.portal-image-editor-box.is-draft {
    pointer-events: none;
    border-style: dashed;
}

.portal-image-editor-box span {
    position: absolute;
    top: -28px;
    left: 0;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--overlay-ink-strong);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.portal-image-editor-handle {
    position: absolute;
    width: 13px;
    height: 13px;
    border: 2px solid var(--overlay-ink-strong);
    border-radius: 999px;
    background: rgba(255, 206, 86, .98);
    box-sizing: border-box;
}

.portal-image-editor-handle--nw { top: -7px; left: -7px; cursor: nwse-resize; }
.portal-image-editor-handle--ne { top: -7px; right: -7px; cursor: nesw-resize; }
.portal-image-editor-handle--n { top: -7px; left: 50%; margin-left: -6.5px; cursor: ns-resize; }
.portal-image-editor-handle--sw { bottom: -7px; left: -7px; cursor: nesw-resize; }
.portal-image-editor-handle--se { right: -7px; bottom: -7px; cursor: nwse-resize; }
.portal-image-editor-handle--s { bottom: -7px; left: 50%; margin-left: -6.5px; cursor: ns-resize; }
.portal-image-editor-handle--w { top: 50%; left: -7px; margin-top: -6.5px; cursor: ew-resize; }
.portal-image-editor-handle--e { top: 50%; right: -7px; margin-top: -6.5px; cursor: ew-resize; }

.portal-image-editor-straighten-line {
    height: 2px;
    transform-origin: 0 50%;
    background: rgba(255, 206, 86, .98);
    box-shadow: 0 0 0 1px var(--overlay-ink);
}

.portal-image-editor-straighten-point {
    width: 10px;
    height: 10px;
    margin-left: -5px;
    margin-top: -5px;
    border-radius: 999px;
    background: rgba(255, 206, 86, .98);
    box-shadow: 0 0 0 2px var(--overlay-ink);
}

.portal-image-editor-annotation-hit,
.portal-image-editor-annotation-shape,
.portal-image-editor-annotation-text,
.portal-image-editor-annotation-handle {
    pointer-events: auto;
}

.portal-image-editor-annotation-hit,
.portal-image-editor-annotation-handle,
.portal-image-editor-annotation-text {
    pointer-events: all;
}

.portal-image-editor-annotation-shape {
    vector-effect: non-scaling-stroke;
}

.portal-image-editor-annotation-text {
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: central;
    paint-order: stroke;
    stroke: var(--overlay-ink-mid);
    stroke-width: 2px;
    vector-effect: non-scaling-stroke;
}

.portal-image-editor-annotation-text--counter-label {
    font-weight: 600;
    text-anchor: start;
}

.portal-image-editor-annotation.is-selected .portal-image-editor-annotation-shape {
    filter: drop-shadow(0 0 0.35rem rgba(255, 206, 86, .48));
}

.portal-image-editor-annotation-handle {
    fill: rgba(255, 206, 86, .98);
    stroke: var(--overlay-ink-strong);
    stroke-width: 2px;
    vector-effect: non-scaling-stroke;
    cursor: pointer;
}

.portal-image-editor-blemish {
    border: 2px dashed rgba(216, 96, 96, .95);
    background: rgba(216, 96, 96, .12);
    border-radius: 999px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.portal-image-editor-blemish-cursor {
    border: 2px solid rgba(255, 206, 86, .98);
    background: rgba(255, 206, 86, .12);
    border-radius: 999px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    box-shadow: 0 0 0 1px var(--overlay-ink);
}

.portal-image-editor-split-zoom {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 220px;
    height: 220px;
    padding: 10px;
    border: 1px solid var(--ui-border);
    border-radius: 14px;
    background: var(--split-zoom-bg);
    box-shadow: 0 18px 40px rgba(0,0,0,.34);
    box-sizing: border-box;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .14s ease, transform .14s ease;
    z-index: 6;
}

.portal-image-editor-split-zoom.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.portal-image-editor-split-zoom-view {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
    background: var(--split-zoom-view-bg);
}

.portal-image-editor-split-zoom-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.portal-image-editor-split-zoom-overlay {
    position: absolute;
    inset: 0;
}

.portal-image-editor-split-zoom-box {
    position: absolute;
    border: 1px solid rgba(23, 161, 174, .95);
    background: rgba(23, 161, 174, .15);
    box-sizing: border-box;
}

.portal-image-editor-split-zoom-box.is-active {
    border-color: rgba(255, 206, 86, .95);
    background: rgba(255, 206, 86, .18);
}

.portal-image-editor-split-zoom-box.is-draft {
    border-style: dashed;
    background: var(--surface-soft);
}

.portal-image-editor-split-zoom-crosshair {
    position: absolute;
    display: block;
    background: var(--split-crosshair);
    box-shadow: 0 0 0 1px var(--overlay-ink);
}

.portal-image-editor-split-zoom-crosshair--x {
    top: 0;
    bottom: 0;
    width: 1px;
    transform: translateX(-.5px);
}

.portal-image-editor-split-zoom-crosshair--y {
    left: 0;
    right: 0;
    height: 1px;
    transform: translateY(-.5px);
}

.portal-image-editor-status {
    min-height: 40px;
    padding: 10px 12px;
    border: 1px solid var(--ui-border-soft);
    border-radius: 10px;
    background: var(--status-surface);
    color: var(--muted);
    line-height: 1.4;
}

.portal-image-editor-status.is-error {
    border-color: rgba(216, 96, 96, .45);
    color: var(--status-error-text);
}

.portal-image-editor-status.is-success {
    border-color: rgba(83, 199, 145, .45);
    color: var(--status-success-text);
}

.portal-image-editor-status.is-info {
    border-color: rgba(23, 161, 174, .3);
    color: var(--text);
}

.portal-image-editor-button:disabled,
.portal-image-editor-view-button:disabled,
.portal-image-editor-select:disabled,
.portal-image-editor-input:disabled,
.portal-image-editor-range:disabled {
    opacity: .55;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    #evxmodal-box.portal-image-editor-modal-box .portal-image-editor-button .portal-image-editor-label-text,
    #evxmodal-box.portal-image-editor-modal-box .portal-image-editor-view-button .portal-image-editor-label-text,
    #evxmodal-box.portal-image-editor-modal-box .portal-image-editor-sidebar-tab .portal-image-editor-label-text,
    #evxmodal-box.portal-image-editor-modal-box .portal-image-editor-tab-button .portal-image-editor-label-text {
        display: none;
    }

    #evxmodal-box.portal-image-editor-modal-box .portal-image-editor-button .portal-image-editor-label,
    #evxmodal-box.portal-image-editor-modal-box .portal-image-editor-view-button .portal-image-editor-label,
    #evxmodal-box.portal-image-editor-modal-box .portal-image-editor-sidebar-tab .portal-image-editor-label,
    #evxmodal-box.portal-image-editor-modal-box .portal-image-editor-tab-button .portal-image-editor-label {
        gap: 0;
    }

    #evxmodal-box.portal-image-editor-modal-box .portal-image-editor-button,
    #evxmodal-box.portal-image-editor-modal-box .portal-image-editor-view-button,
    #evxmodal-box.portal-image-editor-modal-box .portal-image-editor-sidebar-tab,
    #evxmodal-box.portal-image-editor-modal-box .portal-image-editor-tab-button {
        padding-right: 12px;
        padding-left: 12px;
    }

    .portal-image-editor-template-bar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .portal-image-editor-workspace {
        flex-direction: column;
    }

    .portal-image-editor-sidebar {
        width: 100%;
        min-width: 0;
        max-width: none;
        flex-basis: auto;
    }

    .portal-image-editor-stage {
        min-height: 260px;
    }
}

@media (max-width: 760px) {
    #evxmodal-box.portal-image-editor-modal-box {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100vw;
        max-width: none;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }

    #evxmodal-box.portal-image-editor-modal-box #evxmodal-box-msg,
    #evxmodal-box.portal-image-editor-modal-box .evxmodal-box-msg {
        height: auto;
        max-height: none;
        padding: 10px 10px 14px;
    }

    .portal-image-editor-view-group {
        display: none;
    }

    .portal-image-editor-mobile-view-nav {
        display: block;
        margin-bottom: 6px;
    }

    .portal-image-editor-toolbar,
    .portal-image-editor-viewbar {
        flex-wrap: wrap;
        align-items: stretch;
        gap: 12px;
        overflow-x: visible;
        padding-bottom: 0;
    }

    .portal-image-editor-tabs {
        display: none;
    }

    .portal-image-editor-mobile-tab-nav {
        display: block;
    }

    .portal-image-editor-mode-group,
    .portal-image-editor-action-group {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .portal-image-editor-toolbar-divider {
        display: none;
    }

    .portal-image-editor-stage {
        padding: 8px;
        min-height: 220px;
    }

    .portal-image-editor-split-zoom {
        width: 170px;
        height: 170px;
        top: 10px;
        right: 10px;
        padding: 8px;
    }

    .portal-image-editor-workspace {
        gap: 10px;
    }

    .portal-image-editor-sidebar {
        padding: 10px;
    }
}
