Files
iwb-plugins-desktop/image-annotate/plugin/editor.css
T

1488 lines
59 KiB
CSS
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* IWB 鲜艺抠图节点 - 注入样式 */
/* 抠图按钮 */
.iwb-cutout-btn {
cursor: pointer;
opacity: 0.7;
transition: opacity 0.15s, transform 0.15s;
}
.iwb-cutout-btn:hover {
opacity: 1;
transform: scale(1.15);
}
.iwb-cutout-btn svg {
width: 14px;
height: 14px;
display: block;
}
/* 正在处理中的按钮状态 */
.iwb-cutout-btn.processing {
animation: iwb-cutout-pulse 1s infinite;
pointer-events: none;
}
@keyframes iwb-cutout-pulse {
0%, 100% { opacity: 0.4; }
50% { opacity: 1; }
}
/* 全屏遮罩 */
.iwb-cutout-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.25);
display: none;
align-items: center;
justify-content: center;
flex-direction: column;
gap: 12px;
z-index: 999999;
pointer-events: all;
backdrop-filter: blur(2px);
}
/* 自定义按钮提示(挂在 body,最高层级,不会被图片遮挡) */
#iwb-cutout-tip {
position: fixed;
z-index: 2147483647;
background: rgba(30, 30, 46, 0.95);
color: #fff;
padding: 5px 10px;
border-radius: 6px;
font-size: 12px;
line-height: 1.5;
white-space: nowrap;
pointer-events: none;
display: none;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
border: 1px solid rgba(255, 255, 255, 0.14);
font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
max-width: 320px;
white-space: normal;
word-break: break-all;
}
/* 加载动画 */
.iwb-cutout-spinner {
width: 48px;
height: 48px;
border: 4px solid rgba(255, 255, 255, 0.3);
border-top-color: #e8a735;
border-radius: 50%;
animation: iwb-cutout-spin 0.8s linear infinite;
}
@keyframes iwb-cutout-spin {
to { transform: rotate(360deg); }
}
/* 遮罩文字 */
.iwb-cutout-text {
color: #fff;
font-size: 14px;
font-weight: 500;
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
background: rgba(0, 0, 0, 0.6);
padding: 8px 16px;
border-radius: 6px;
}
/* Toast 提示 */
.iwb-cutout-toast {
position: fixed;
bottom: 24px;
left: 50%;
transform: translateX(-50%);
padding: 10px 20px;
border-radius: 8px;
font-size: 13px;
font-weight: 500;
z-index: 999999;
transition: opacity 0.3s;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
display: none;
max-width: 400px;
}
.iwb-cutout-toast-success {
background: #1a7f37;
color: #fff;
}
.iwb-cutout-toast-error {
background: #cf222e;
color: #fff;
}
.iwb-cutout-toast-info {
background: #1f6feb;
color: #fff;
}
/* 白底按钮 */
.iwb-whitebg-btn {
cursor: pointer;
opacity: 0.7;
transition: opacity 0.15s, transform 0.15s;
}
.iwb-whitebg-btn:hover { opacity: 1; transform: scale(1.15); }
.iwb-whitebg-btn svg { width: 14px; height: 14px; display: block; }
.iwb-whitebg-btn.processing { animation: iwb-cutout-pulse 1s infinite; pointer-events: none; }
/* 编辑按钮 */
.iwb-editor-btn-icon {
cursor: pointer;
opacity: 0.7;
transition: opacity 0.15s, transform 0.15s;
}
.iwb-editor-btn-icon:hover { opacity: 1; transform: scale(1.15); }
.iwb-editor-btn-icon svg { width: 14px; height: 14px; display: block; }
/* ==================== 图片编辑器 ==================== */
.iwb-editor-overlay {
position: fixed;
top: 0; left: 0;
width: 100%; height: 100%;
background: rgba(0, 0, 0, 0.6);
display: none;
align-items: center;
justify-content: center;
z-index: 999998;
backdrop-filter: blur(3px);
}
.iwb-editor-modal {
background: #1e1e2e;
border-radius: 0;
box-shadow: none;
display: flex;
flex-direction: column;
width: 100vw;
height: 100vh;
max-width: none;
max-height: none;
overflow: visible;
}
/* 新增:主区域(画布 + 图层面板)flex 布局 */
.iwb-editor-main {
display: flex;
flex: 1 1 auto;
min-height: 0;
overflow: visible;
}
.iwb-editor-header {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 16px;
background: #181825;
border-bottom: 1px solid #313244;
flex-wrap: nowrap;
}
.iwb-editor-header > .iwb-editor-tools {
position: absolute;
left: 12px;
top: 68px;
width: 44px;
flex-direction: column;
padding: 6px;
background: #181825;
border: 1px solid #313244;
border-radius: 8px;
z-index: 20;
}
.iwb-editor-header > .iwb-editor-tools .iwb-editor-action { position: static; }
.iwb-editor-header > .iwb-editor-tools .iwb-editor-action[data-action="undo"],
.iwb-editor-header > .iwb-editor-tools .iwb-editor-action[data-action="redo"],
.iwb-editor-header > .iwb-editor-tools .iwb-editor-action[data-action="reset"],
.iwb-editor-header > .iwb-editor-tools .iwb-editor-action[data-action="restore"] {
position: absolute;
top: -54px;
left: auto;
}
.iwb-editor-header > .iwb-editor-tools .iwb-editor-action[data-action="undo"] { right: 154px; }
.iwb-editor-header > .iwb-editor-tools .iwb-editor-action[data-action="redo"] { right: 118px; }
.iwb-editor-header > .iwb-editor-tools .iwb-editor-action[data-action="reset"] { right: 82px; }
.iwb-editor-header > .iwb-editor-tools .iwb-editor-action[data-action="restore"] { right: 46px; }
.iwb-editor-header > .iwb-editor-tools .iwb-editor-divider {
width: 24px;
height: 1px;
margin: 4px 0;
}
.iwb-editor-title {
color: #cdd6f4;
font-size: 14px;
font-weight: 600;
white-space: nowrap;
}
.iwb-editor-tools {
display: flex;
align-items: center;
gap: 4px;
}
.iwb-editor-tool, .iwb-editor-action {
background: #313244;
border: none;
border-radius: 6px;
color: #cdd6f4;
width: 32px; height: 32px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 15px;
transition: background 0.15s, transform 0.1s;
}
.iwb-editor-tool:hover, .iwb-editor-action:hover { background: #45475a; transform: scale(1.08); }
.iwb-editor-tool.active { background: #e8a735; color: #1e1e2e; }
.iwb-editor-tool svg, .iwb-editor-action svg { display: block; }
.iwb-editor-layer-btn svg { display: block; }
/* 复原按钮:绿色高亮,与撤销/重做/清空区分 */
.iwb-editor-action-restore { background: #1a7f37; color: #fff; }
.iwb-editor-action-restore:hover { background: #15803d !important; }
.iwb-editor-divider {
width: 1px; height: 20px;
background: #45475a;
margin: 0 4px;
}
.iwb-editor-params {
display: flex;
align-items: center;
gap: 10px;
margin-left: 12px;
justify-content: flex-start;
min-width: 0;
flex: 1 1 auto;
flex-wrap: wrap;
}
.iwb-editor-params .iwb-editor-zoom { margin-left: auto; order: 20; }
.iwb-editor-top-colors { display: none; }
.iwb-editor-colors { display: flex; gap: 4px; }
.iwb-editor-color {
width: 20px; height: 20px;
border-radius: 50%;
cursor: pointer;
border: 2px solid transparent;
transition: transform 0.1s, border-color 0.15s;
}
.iwb-editor-color:hover { transform: scale(1.2); }
.iwb-editor-color.active { border-color: #fff; transform: scale(1.15); }
.iwb-editor-brush-label {
display: flex;
align-items: center;
gap: 6px;
color: #a6adc8;
font-size: 12px;
}
.iwb-editor-brush-size { width: 80px; cursor: pointer; }
.iwb-editor-brush-val { color: #e8a735; font-weight: 600; min-width: 16px; }
/* 笔刷/橡皮大小精确数值输入框 */
.iwb-editor-brush-num,
.iwb-editor-eraser-num {
width: 44px;
padding: 2px 3px;
background: #313244;
border: 1px solid #45475a;
border-radius: 5px;
color: #e8a735;
font-weight: 600;
font-size: 11px;
font-family: inherit;
text-align: center;
}
.iwb-editor-brush-num:focus,
.iwb-editor-eraser-num:focus {
outline: none;
border-color: #e8a735;
background: #1e1e2e;
}
.iwb-editor-brush-num::-webkit-outer-spin-button,
.iwb-editor-brush-num::-webkit-inner-spin-button,
.iwb-editor-eraser-num::-webkit-outer-spin-button,
.iwb-editor-eraser-num::-webkit-inner-spin-button {
-webkit-appearance: none; /* 去掉上下箭头,窄输入框更干净 */
margin: 0;
}
/* 实心矩形开关 */
.iwb-editor-fill-btn {
background: #313244;
border: 1px solid #45475a;
border-radius: 6px;
color: #a6adc8;
padding: 4px 10px;
font-size: 12px;
cursor: pointer;
transition: background 0.15s, color 0.15s, border-color 0.15s;
white-space: nowrap;
}
.iwb-editor-fill-btn:hover { background: #45475a; }
.iwb-editor-fill-btn.active {
background: #e8a735;
border-color: #e8a735;
color: #1e1e2e;
font-weight: 600;
}
/* 画笔参数组(硬度/透明度,画笔与橡皮工具共用) */
.iwb-editor-brush-group {
display: flex;
align-items: center;
gap: 10px;
}
.iwb-editor-layer-group {
display: flex;
align-items: center;
gap: 3px;
}
.iwb-editor-layer-btn {
background: #313244;
border: 1px solid #45475a;
border-radius: 6px;
color: #a6adc8;
width: 26px;
height: 26px;
font-size: 14px;
line-height: 1;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
}
.iwb-editor-layer-btn:hover:not(:disabled) { background: #45475a; color: #cdd6f4; }
.iwb-editor-layer-btn:disabled {
opacity: 0.35;
cursor: not-allowed;
}
/* 缩放控件 */
.iwb-editor-zoom {
display: flex;
align-items: center;
gap: 2px;
background: #313244;
border-radius: 6px;
padding: 2px;
}
.iwb-editor-zoom-btn {
background: transparent;
border: none;
color: #cdd6f4;
width: 26px;
height: 26px;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
line-height: 1;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.15s;
}
.iwb-editor-zoom-btn:hover { background: #45475a; }
.iwb-editor-zoom-btn:active { transform: scale(0.94); }
.iwb-editor-zoom-fit { font-size: 12px; width: auto; padding: 0 8px; }
.iwb-editor-zoom-val {
color: #e8a735;
font-size: 12px;
font-weight: 600;
min-width: 46px;
text-align: center;
font-variant-numeric: tabular-nums;
user-select: none;
}
/* 底部操作提示 */
.iwb-editor-zoom-hint {
position: absolute;
bottom: 8px;
right: 14px;
color: #7f849c;
font-size: 11px;
background: rgba(24, 24, 37, 0.85);
padding: 3px 10px;
border-radius: 4px;
pointer-events: none;
z-index: 5;
}
.iwb-editor-canvas-wrap {
position: relative;
background: #11111b;
flex: 1 1 auto;
min-height: 0;
max-width: 100%;
max-height: 100%;
overflow: hidden; /* 裁剪框允许显示在图片边界外;编辑区仍由模态层裁切 */
padding: 12px;
}
.iwb-editor-canvas-stack {
position: absolute;
left: 0;
top: 0;
display: block;
width: 0;
height: 0;
/* 仅图片工作区显示透明棋盘格,外围裁剪工作区保持纯色。 */
background-color: #d6d6d6;
background-image:
linear-gradient(45deg, #b8b8b8 25%, transparent 25%),
linear-gradient(-45deg, #b8b8b8 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, #b8b8b8 75%),
linear-gradient(-45deg, transparent 75%, #b8b8b8 75%);
background-size: 20px 20px;
background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.iwb-editor-base, .iwb-editor-draw, .iwb-editor-text, .iwb-editor-crop-overlay {
display: block;
}
/* 位图图层 canvas(动态创建) */
.iwb-editor-layer-canvas {
display: block;
position: absolute;
top: 0; left: 0;
}
.iwb-editor-base {
background: #fff;
/* 棋盘格透明背景示意 */
background-image:
linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
background-size: 20px 20px;
background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}
.iwb-editor-draw {
position: absolute;
top: 0; left: 0;
cursor: crosshair;
}
/* 笔划预览层:一笔进行中显示(draw 之上、text 之下),事件穿透 */
.iwb-editor-stroke {
position: absolute;
top: 0; left: 0;
pointer-events: none;
display: none;
}
.iwb-editor-brush-hardness { width: 70px; cursor: pointer; }
.iwb-editor-brush-hardness-val { color: #e8a735; font-weight: 600; min-width: 20px; display: inline-block; text-align: right; }
.iwb-editor-brush-opacity { width: 70px; cursor: pointer; }
.iwb-editor-brush-opacity-val { color: #e8a735; font-weight: 600; min-width: 34px; display: inline-block; text-align: right; }
/* 自定义颜色(原生取色器伪装成圆形色板) */
.iwb-editor-color-custom {
position: relative;
overflow: hidden;
border: 2px dashed #a6adc8;
}
.iwb-editor-color-custom.active { border-color: #fff; border-style: solid; transform: scale(1.15); }
.iwb-editor-color-custom input[type="color"] {
position: absolute;
inset: -6px;
width: calc(100% + 12px);
height: calc(100% + 12px);
padding: 0;
border: none;
cursor: pointer;
background: conic-gradient(#ff4444, #ffaa00, #44dd44, #4488ff, #aa44ff, #ff4444);
}
.iwb-editor-color-custom input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.iwb-editor-color-custom input[type="color"]::-webkit-color-swatch { border: none; }
/* 吸管悬停预览浮窗 */
.iwb-editor-picker-tip {
position: fixed;
z-index: 2147483000;
display: none;
align-items: center;
gap: 6px;
background: rgba(30, 30, 46, 0.95);
border: 1px solid rgba(255, 255, 255, 0.14);
border-radius: 6px;
padding: 4px 8px;
pointer-events: none;
font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.iwb-editor-picker-chip {
width: 16px;
height: 16px;
border-radius: 4px;
background: transparent;
}
.iwb-editor-picker-hex {
color: #cdd6f4;
font-size: 12px;
font-weight: 600;
font-variant-numeric: tabular-nums;
}
/* 文字图层:独立 canvas,事件穿透到下层 drawCanvas */
.iwb-editor-text {
position: absolute;
top: 0; left: 0;
pointer-events: none;
}
/* 裁剪覆盖层:遮罩/选区框/手柄画在这层,不污染标注层 */
.iwb-editor-crop-overlay {
position: absolute;
top: 0; left: 0;
pointer-events: none;
}
/* 文字输入框 */
.iwb-editor-text-input {
position: absolute;
display: none;
padding: 4px 8px;
border: 2px solid #4488ff;
border-radius: 4px;
font-size: 14px;
background: rgba(255, 255, 255, 0.95);
color: #1e1e2e;
z-index: 10;
min-width: 120px;
}
.iwb-editor-text-input:focus { outline: none; box-shadow: 0 0 0 3px rgba(68, 136, 255, 0.3); }
/* 裁剪确认栏(含约束控件) */
.iwb-editor-crop-bar {
position: absolute;
bottom: 16px;
left: 50%;
transform: translateX(-50%);
display: none;
gap: 8px;
z-index: 10;
align-items: center;
background: rgba(24, 24, 37, 0.92);
border: 1px solid #313244;
border-radius: 8px;
padding: 6px 10px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
flex-wrap: wrap;
max-width: 90%;
justify-content: center;
}
.iwb-editor-constraint-group {
display: flex;
align-items: center;
gap: 4px;
}
.iwb-editor-constraint-label {
color: #7f849c;
font-size: 11px;
margin-right: 2px;
white-space: nowrap;
}
.iwb-editor-constraint-btn {
background: #313244;
border: none;
border-radius: 4px;
color: #cdd6f4;
padding: 3px 8px;
font-size: 12px;
cursor: pointer;
transition: background 0.15s, transform 0.1s;
white-space: nowrap;
}
.iwb-editor-constraint-btn:hover { background: #45475a; transform: scale(1.05); }
.iwb-editor-constraint-btn.active { background: #4488ff; color: #fff; }
.iwb-editor-constraint-sep {
width: 1px;
height: 20px;
background: #45475a;
}
.iwb-editor-size-input {
width: 50px;
background: #313244;
border: 1px solid #45475a;
border-radius: 4px;
color: #cdd6f4;
padding: 3px 6px;
font-size: 12px;
text-align: center;
}
.iwb-editor-size-input:focus { outline: none; border-color: #4488ff; }
.iwb-editor-size-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.iwb-editor-size-x { color: #7f849c; font-size: 12px; }
.iwb-editor-size-apply {
background: #313244;
border: 1px solid #4488ff;
color: #4488ff;
border-radius: 4px;
padding: 3px 8px;
font-size: 12px;
cursor: pointer;
transition: background 0.15s;
}
.iwb-editor-size-apply:hover { background: #4488ff; color: #fff; }
.iwb-editor-crop-info {
color: #e8a735;
font-size: 12px;
font-weight: 600;
font-variant-numeric: tabular-nums;
white-space: nowrap;
min-width: 60px;
text-align: center;
}
.iwb-editor-crop-confirm, .iwb-editor-crop-cancel {
padding: 6px 16px;
border: none;
border-radius: 6px;
font-size: 13px;
font-weight: 500;
cursor: pointer;
}
.iwb-editor-crop-confirm { background: #1a7f37; color: #fff; }
.iwb-editor-crop-confirm:hover { background: #15803d; }
.iwb-editor-crop-cancel { background: #cf222e; color: #fff; }
.iwb-editor-crop-cancel:hover { background: #b91c1c; }
/* 底部 */
.iwb-editor-footer {
display: flex;
justify-content: flex-end;
gap: 8px;
padding: 12px 16px;
background: #181825;
border-top: 1px solid #313244;
}
.iwb-editor-btn {
padding: 8px 20px;
border: none;
border-radius: 6px;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: background 0.15s, transform 0.1s;
}
.iwb-editor-btn:hover { transform: scale(1.03); }
.iwb-editor-btn-cancel { background: #45475a; color: #cdd6f4; }
.iwb-editor-btn-cancel:hover { background: #585b70; }
.iwb-editor-btn-new { background: #4488ff; color: #fff; }
.iwb-editor-btn-new:hover { background: #3578f0; }
.iwb-editor-btn-replace { background: #e8a735; color: #1e1e2e; }
.iwb-editor-btn-replace:hover { background: #d49628; }
/* ==================== 图层面板 ==================== */
.iwb-editor-layer-panel {
width: 290px;
min-width: 290px;
background: #181825;
border-left: 1px solid #313244;
display: flex;
flex-direction: column;
overflow: hidden;
}
.iwb-editor-layer-panel-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 12px;
border-bottom: 1px solid #313244;
}
.iwb-editor-layer-panel-title {
color: #cdd6f4;
font-size: 13px;
font-weight: 600;
}
.iwb-editor-layer-add-group {
display: flex;
gap: 4px;
}
.iwb-editor-layer-add-btn {
background: #313244;
border: 1px solid #45475a;
border-radius: 6px;
color: #cdd6f4;
width: 26px;
height: 26px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.15s;
}
.iwb-editor-layer-add-btn:hover { background: #45475a; color: #e8a735; }
.iwb-editor-layer-add-btn svg { display: block; }
.iwb-editor-layer-list {
flex: 1 1 auto;
overflow-y: auto;
padding: 4px;
}
/* 图层项 */
.iwb-layer-item {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 8px;
border-radius: 6px;
cursor: pointer;
transition: background 0.12s;
margin-bottom: 2px;
}
.iwb-layer-item:hover { background: #313244; }
.iwb-layer-item.active {
background: #313244;
box-shadow: inset 2px 0 0 #e8a735;
}
.iwb-layer-item.hidden { opacity: 0.5; }
.iwb-layer-item[draggable="true"] { cursor: grab; }
.iwb-layer-item.dragging { opacity: 0.45; }
.iwb-layer-item.drop-target { outline: 1px dashed #e8a735; background: rgba(232, 167, 53, 0.16); }
/* 画笔/橡皮作用目标:与「选中」分离,避免出现两个图层同时高亮 */
.iwb-layer-paint { flex: 0 0 auto; color: #a6adc8; font-size: 11px; opacity: 0.85; }
.iwb-layer-color { width: 22px; height: 22px; padding: 0; border: 1px solid #45475a; border-radius: 50%; background: transparent; cursor: pointer; flex: 0 0 auto; }
.iwb-layer-width { width: 42px; height: 22px; padding: 2px 3px; border: 1px solid #45475a; border-radius: 4px; background: #1e1e2e; color: #e8a735; font-size: 11px; text-align: center; flex: 0 0 auto; }
.iwb-layer-width:focus { outline: none; border-color: #e8a735; }
.iwb-layer-vis {
background: none;
border: none;
color: #a6adc8;
cursor: pointer;
font-size: 13px;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
transition: background 0.12s;
}
.iwb-layer-vis:hover { background: #45475a; }
.iwb-layer-icon {
font-size: 13px;
width: 18px;
text-align: center;
flex-shrink: 0;
}
.iwb-layer-name {
color: #cdd6f4;
font-size: 12px;
flex: 1 1 auto;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
}
.iwb-layer-lock {
background: none;
border: none;
color: #7f849c;
cursor: pointer;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
transition: background 0.12s, color 0.12s;
flex-shrink: 0;
}
.iwb-layer-lock:hover, .iwb-layer-lock.active { background: #45475a; color: #e8a735; }
.iwb-layer-del {
background: none;
border: none;
color: #585b70;
cursor: pointer;
font-size: 12px;
width: 18px;
height: 18px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
transition: background 0.12s, color 0.12s;
flex-shrink: 0;
}
.iwb-layer-del:hover { background: #cf222e; color: #fff; }
/* SVG 图标尺寸 */
.iwb-layer-vis svg { display: block; }
.iwb-layer-icon svg { display: block; }
.iwb-layer-lock svg { display: block; }
.iwb-layer-del svg { display: block; }
/* 独立 PS 风格颜色面板 */
.iwb-editor-color-panel { padding: 12px; border-bottom: 1px solid #313244; background: #202033; }
.iwb-editor-color-panel-title { color: #cdd6f4; font-size: 12px; font-weight: 600; margin-bottom: 10px; }
.iwb-editor-color-panel-main { display: flex; align-items: center; gap: 10px; }
.iwb-editor-color-current { width: 52px; height: 52px; border: 2px solid #cdd6f4; border-radius: 6px; overflow: hidden; display: block; background: #ff4444; }
.iwb-editor-color-panel-input { width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; opacity: 0; }
.iwb-editor-color-panel-values { min-width: 0; flex: 1; }
.iwb-editor-color-hex { color: #cdd6f4; font: 600 12px monospace; display: block; margin-bottom: 8px; }
.iwb-editor-color-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.iwb-editor-color-panel-swatch { width: 20px; height: 20px; border: 1px solid #585b70; border-radius: 4px; cursor: pointer; }
.iwb-editor-color-panel-swatch:hover { transform: scale(1.12); border-color: #fff; }
.iwb-editor-panel-width { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: #a6adc8; font-size: 11px; }
.iwb-editor-panel-width-range { flex: 1; min-width: 60px; }
.iwb-editor-panel-width-num { width: 42px; padding: 3px; background: #313244; color: #e8a735; border: 1px solid #45475a; border-radius: 4px; text-align: center; }
.iwb-layer-color, .iwb-layer-width { display: none !important; }
/* 顶部独立操作区,避免操作按钮被竖向工具栏裁切 */
.iwb-editor-actions { display: flex; align-items: center; gap: 5px; margin-left: auto; flex: 0 0 auto; }
.iwb-editor-actions .iwb-editor-action { position: static !important; }
.iwb-editor-actions .iwb-editor-action-restore { width: auto; padding: 0 9px; font-size: 12px; }
/* 原图 canvas 只负责绘制像素,透明处透出 stack 的棋盘格。 */
.iwb-editor-base { background: transparent !important; background-image: none !important; }
/* 透明区域使用 Photoshop 风格的灰色棋盘格,覆盖整个实际图片区域。 */
.iwb-editor-canvas-stack {
background-color: #d6d6d6 !important;
background-image:
linear-gradient(45deg, #b8b8b8 25%, transparent 25%),
linear-gradient(-45deg, #b8b8b8 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, #b8b8b8 75%),
linear-gradient(-45deg, transparent 75%, #b8b8b8 75%) !important;
background-size: 20px 20px !important;
background-position: 0 0, 0 10px, 10px -10px, -10px 0 !important;
}
.iwb-editor-base { background: transparent !important; background-image: none !important; }
/* 顶部参数区必须保持可见且可交互,避免被侧栏定位层覆盖。 */
.iwb-editor-header { position: relative; min-height: 56px; overflow: visible; }
.iwb-editor-params { position: relative; z-index: 30; overflow: visible; pointer-events: auto; }
.iwb-editor-params input, .iwb-editor-params button, .iwb-editor-params label { pointer-events: auto; }
.iwb-editor-brush-size, .iwb-editor-brush-hardness, .iwb-editor-brush-opacity { min-width: 70px; accent-color: #e8a735; }
.iwb-editor-brush-num, .iwb-editor-eraser-num { pointer-events: auto; }
/* canvas 的透明像素必须透出 stack 棋盘格,不能被黑色工作区遮住。 */
.iwb-editor-canvas-stack { isolation: isolate; }
.iwb-editor-layer-canvas, .iwb-editor-text, .iwb-editor-stroke, .iwb-editor-crop-overlay { background: transparent !important; }
/* 透明棋盘格只覆盖原图的显示矩形,外围裁剪扩展区保持纯色。 */
.iwb-editor-canvas-stack { background: #11111b !important; background-image: none !important; }
.iwb-editor-transparency-grid { position: absolute; z-index: 0; pointer-events: none; background-color: #d6d6d6; background-image: linear-gradient(45deg, #b8b8b8 25%, transparent 25%), linear-gradient(-45deg, #b8b8b8 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #b8b8b8 75%), linear-gradient(-45deg, transparent 75%, #b8b8b8 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.iwb-editor-layer-canvas, .iwb-editor-stroke, .iwb-editor-text { z-index: 1; }
.iwb-editor-crop-overlay { z-index: 10; }
/* 画布扩展区不得盖过编辑器外围,图片区域由透明层单独标识。 */
.iwb-editor-canvas-stack { overflow: visible; max-width: 100%; max-height: 100%; background: #11111b !important; background-image: none !important; }
.iwb-editor-transparency-grid { z-index: 0; overflow: hidden; }
.iwb-editor-layer-canvas { z-index: 1; }
.iwb-editor-stroke { z-index: 4; }
.iwb-editor-text { z-index: 5; }
.iwb-editor-crop-overlay { z-index: 10; }
/* 导出操作与缩放同处顶栏,缩放独立靠右。 */
.iwb-editor-export-actions { display: flex; align-items: center; gap: 6px; margin-left: 10px; flex: 0 0 auto; }
.iwb-editor-export-actions .iwb-editor-btn { padding: 6px 10px; font-size: 11px; }
.iwb-editor-footer { display: none !important; }
.iwb-layer-color, .iwb-layer-width { display: none !important; }
.iwb-editor-export-actions { display: flex; align-items: center; gap: 6px; margin-left: 10px; flex: 0 0 auto; }
.iwb-editor-export-actions .iwb-editor-btn { padding: 6px 10px; font-size: 11px; }
.iwb-editor-footer { display: none !important; }
.iwb-layer-color, .iwb-layer-width { display: none !important; }
/* 顶部七个操作按钮统一文本按钮样式,自适应中文宽度。 */
.iwb-editor-actions { gap: 6px; }
.iwb-editor-actions .iwb-editor-action { width: auto; min-width: 72px; height: 32px; padding: 0 12px; gap: 5px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.iwb-editor-actions .iwb-editor-action svg { width: 14px; height: 14px; flex: 0 0 auto; }
.iwb-editor-export-actions .iwb-editor-btn { min-width: 72px; white-space: nowrap; }
/* 顶部操作按钮统一为纯文本,图标隐藏并保持一致宽度。 */
.iwb-editor-actions .iwb-editor-action svg { display: none !important; }
.iwb-editor-actions .iwb-editor-action { min-width: 76px; width: 76px; justify-content: center; background: #3b3d52; color: #cdd6f4; }
.iwb-editor-actions .iwb-editor-action:hover { background: #50536b; }
.iwb-editor-actions .iwb-editor-action-restore { background: #3b3d52; color: #cdd6f4; }
.iwb-editor-actions .iwb-editor-action-restore:hover { background: #50536b !important; }
.iwb-editor-actions .iwb-editor-action svg { display: none !important; }
.iwb-editor-actions .iwb-editor-action { min-width: 76px; width: 76px; justify-content: center; background: #3b3d52; color: #cdd6f4; }
.iwb-editor-actions .iwb-editor-action:hover, .iwb-editor-actions .iwb-editor-action-restore:hover { background: #50536b !important; }
.iwb-editor-actions .iwb-editor-action { width: auto; min-width: 76px; padding: 0 12px; gap: 5px; }
.iwb-editor-actions .iwb-editor-action span { display: inline-block; }
.iwb-editor-actions { margin-left: 12px; }
.iwb-editor-actions .iwb-editor-btn { width: auto; min-width: 76px; height: 32px; padding: 0 12px; font-size: 12px; white-space: nowrap; }
.iwb-editor-actions .iwb-editor-action { width: auto; min-width: 76px; }
.iwb-editor-actions .iwb-editor-action { min-width: 52px; width: auto; padding: 0 10px; font-size: 12px; }
.iwb-editor-brush-presets { display: flex; align-items: center; gap: 7px; margin-left: 4px; }
.iwb-editor-brush-preset { display: inline-flex; align-items: center; gap: 3px; padding: 2px 3px; border: 0; background: transparent; color: #a6adc8; cursor: pointer; font-size: 11px; }
.iwb-editor-brush-preset i { display: block; width: 12px; height: 12px; border-radius: 50%; background: #e8a735; border: 1px solid #f6d38a; }
.iwb-editor-brush-preset:nth-child(2) i { width: 16px; height: 16px; }
.iwb-editor-brush-preset:nth-child(3) i { width: 20px; height: 20px; }
.iwb-editor-brush-preset:nth-child(4) i { width: 24px; height: 24px; }
.iwb-editor-brush-preset:hover, .iwb-editor-brush-preset.active { color: #fff; }
/* 紧凑顶栏:操作按钮与描边快捷点仅保留必要视觉信息。 */
.iwb-editor-actions .iwb-editor-action { width: 28px; min-width: 28px; height: 28px; padding: 0; }
.iwb-editor-actions .iwb-editor-action svg { display: block !important; width: 14px; height: 14px; }
.iwb-editor-brush-presets { gap: 5px; margin-left: 2px; }
.iwb-editor-brush-preset { width: 24px; height: 24px; padding: 0; justify-content: center; }
.iwb-editor-brush-preset i { width: 5px; height: 5px; }
.iwb-editor-brush-preset:nth-child(2) i { width: 8px; height: 8px; }
.iwb-editor-brush-preset:nth-child(3) i { width: 12px; height: 12px; }
.iwb-editor-brush-preset:nth-child(4) i { width: 16px; height: 16px; }
/* 图层栏内嵌调色板:颜色直接点击应用,不弹出系统取色器。 */
.iwb-editor-color-panel { padding: 10px; }
.iwb-editor-color-current { width: 42px; height: 42px; flex: 0 0 42px; cursor: default; }
.iwb-editor-color-swatches { display: grid; grid-template-columns: repeat(7, 20px); gap: 5px; }
.iwb-editor-color-panel-swatch { width: 20px; height: 20px; border-radius: 50%; }
.iwb-editor-color-panel { padding: 10px; }
.iwb-editor-color-current { width: 42px; height: 42px; flex: 0 0 42px; cursor: default; }
.iwb-editor-color-swatches { display: grid; grid-template-columns: repeat(7, 20px); gap: 5px; }
.iwb-editor-color-panel-swatch { width: 20px; height: 20px; border-radius: 50%; }
.iwb-editor-color-panel { padding: 10px; }
.iwb-editor-palette-current { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.iwb-editor-palette-current .iwb-editor-color-current { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 4px; }
.iwb-editor-color-panel .iwb-editor-color-hex { margin: 0; }
.iwb-editor-color-panel .iwb-editor-color-swatches { display: grid; grid-template-columns: repeat(6, 20px); gap: 7px; }
.iwb-editor-color-panel .iwb-editor-color-panel-swatch { width: 20px; height: 20px; border-radius: 50%; padding: 0; }
.iwb-editor-color-panel .iwb-editor-color-panel-swatch.active { outline: 2px solid #fff; outline-offset: 2px; }
.iwb-editor-color-panel { padding: 10px; }
.iwb-editor-palette-current { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.iwb-editor-palette-current .iwb-editor-color-current { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 4px; }
.iwb-editor-color-panel .iwb-editor-color-hex { margin: 0; }
.iwb-editor-color-panel .iwb-editor-color-swatches { display: grid; grid-template-columns: repeat(6, 20px); gap: 7px; }
.iwb-editor-color-panel .iwb-editor-color-panel-swatch { width: 20px; height: 20px; border-radius: 50%; padding: 0; }
.iwb-editor-color-panel .iwb-editor-color-panel-swatch.active { outline: 2px solid #fff; outline-offset: 2px; }
.iwb-editor-inline-picker { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.iwb-editor-inline-picker .iwb-editor-color-panel-input { width: 42px; height: 28px; padding: 0; opacity: 1; cursor: pointer; border: 1px solid #585b70; border-radius: 4px; }
.iwb-editor-color-panel .iwb-editor-color-swatches { display: grid; grid-template-columns: repeat(6, 20px); gap: 7px; }
.iwb-editor-color-panel .iwb-editor-color-panel-swatch { width: 20px; height: 20px; border-radius: 50%; padding: 0; }
.iwb-editor-inline-picker { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.iwb-editor-inline-picker .iwb-editor-color-panel-input { width: 42px; height: 28px; padding: 0; opacity: 1; cursor: pointer; border: 1px solid #585b70; border-radius: 4px; }
.iwb-editor-color-panel .iwb-editor-color-swatches { display: grid; grid-template-columns: repeat(6, 20px); gap: 7px; }
.iwb-editor-color-panel .iwb-editor-color-panel-swatch { width: 20px; height: 20px; border-radius: 50%; padding: 0; }
.iwb-editor-inline-picker { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.iwb-editor-inline-picker .iwb-editor-color-panel-input { width: 42px; height: 28px; padding: 0; opacity: 1; cursor: pointer; border: 1px solid #585b70; border-radius: 4px; }
.iwb-editor-color-panel .iwb-editor-color-swatches { display: grid; grid-template-columns: repeat(6, 20px); gap: 7px; }
.iwb-editor-color-panel .iwb-editor-color-panel-swatch { width: 20px; height: 20px; border-radius: 50%; padding: 0; }
.iwb-editor-color-panel { padding: 9px; }
.iwb-editor-inline-picker { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.iwb-editor-inline-picker .iwb-editor-color-panel-input { display: block; width: 44px; height: 30px; padding: 0; opacity: 1; cursor: pointer; border: 1px solid #585b70; border-radius: 4px; }
.iwb-editor-color-panel .iwb-editor-color-swatches { display: grid; grid-template-columns: repeat(6, 20px); gap: 7px; }
.iwb-editor-color-panel .iwb-editor-color-panel-swatch { width: 20px; height: 20px; border-radius: 50%; padding: 0; }
.iwb-editor-color-panel .iwb-editor-color-panel-swatch.active { outline: 2px solid #fff; outline-offset: 2px; }
.iwb-editor-color-picker2 { display: flex; gap: 8px; height: 118px; }
.iwb-color-sv { position: relative; flex: 1; background: linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0)); background-color: #f44; border-radius: 4px; }
.iwb-color-hue { width: 18px; border-radius: 4px; background: linear-gradient(to bottom,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00); }
.iwb-editor-color-fields { display: flex; gap: 6px; margin: 8px 0; }
.iwb-editor-color-hex-input { width: 72px; background:#313244; color:#cdd6f4; border:1px solid #585b70; padding:4px; }
.iwb-editor-color-panel-input { width: 32px; height: 26px; opacity: 1; padding: 0; }
.iwb-color-sv span, .iwb-color-hue span { position: absolute; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #222; transform: translate(-50%, -50%); pointer-events: none; }
.iwb-color-sv span { left: 100%; top: 0; }
.iwb-color-hue span { left: 50%; top: 0; }
.iwb-compress-btn { color: #16a34a !important; font-size: 11px; font-weight: 700; }
/* 新版浮动气泡栏内的工具按钮 */
.iwb-node-floatbar .iwb-compress-btn { font-size: 11px; font-weight: 700; }
.iwb-node-floatbar .iwb-cutout-btn.processing,
.iwb-node-floatbar .iwb-whitebg-btn.processing,
.iwb-node-floatbar .iwb-compress-btn.processing { animation: iwb-cutout-pulse 1s infinite; pointer-events: none; }
/* 调色板:吸色按钮(替代原来的弹出式取色器) */
.iwb-editor-color-eye { width: 26px; height: 26px; border: 1px solid #585b70; border-radius: 4px; background: #313244; color: #cdd6f4; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.iwb-editor-color-eye:hover { border-color: #e8a735; color: #e8a735; }
/* 矢量对象独立画布:与位图图层统一参与 z 排序 */
.iwb-editor-vec-canvas { position: absolute; top: 0; left: 0; z-index: 1; background: transparent !important; }
/* 空白画布创建菜单 */
.iwb-blank-menu { position: fixed; width: 242px; background: #fff; border: 1px solid #d0d7de; border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.2); padding: 10px; z-index: 2147483000; font-size: 12px; color: #1f2328; }
.iwb-blank-menu .iwb-blank-title { font-weight: 700; font-size: 12px; margin-bottom: 8px; }
.iwb-blank-menu .iwb-blank-bg, .iwb-blank-menu .iwb-blank-res { display: flex; align-items: center; gap: 5px; margin-bottom: 7px; }
.iwb-blank-menu .iwb-blank-bg span, .iwb-blank-menu .iwb-blank-res span { color: #656d76; min-width: 26px; }
.iwb-blank-menu button { border: 1px solid #d0d7de; background: #f6f8fa; color: #1f2328; border-radius: 6px; padding: 3px 8px; cursor: pointer; font-size: 11px; }
.iwb-blank-menu button:hover { background: #eff2f4; }
.iwb-blank-menu button.on { background: #0ea5e9; border-color: #0ea5e9; color: #fff; }
.iwb-blank-menu .iwb-blank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; }
.iwb-blank-menu .iwb-blank-grid button { display: flex; flex-direction: column; gap: 1px; align-items: center; padding: 5px 4px; }
.iwb-blank-menu .iwb-blank-grid b { font-weight: 600; }
.iwb-blank-menu .iwb-blank-grid i { font-style: normal; color: #656d76; font-size: 10px; }
/* 空参考图节点:常驻“空白画布”按钮(位于节点顶部中央) */
.iwb-blank-inline-btn { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 6; display: inline-flex; align-items: center; gap: 5px; background: #fff; border: 1px solid #d0d7de; border-radius: 14px; padding: 4px 11px; color: #0ea5e9; font-size: 11px; font-weight: 600; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.iwb-blank-inline-btn:hover { background: #f0f9ff; border-color: #0ea5e9; }
.iwb-blank-inline-btn svg { width: 13px; height: 13px; }
/* ============ UI 布局重构(参照 excalidraw) ============ */
/* 顶部:功能按钮在左,工具栏横排整行、按快捷键排序并带数字角标 */
.iwb-editor-header { flex-wrap: wrap; }
.iwb-editor-header > .iwb-editor-title { order: 1; }
.iwb-editor-header > .iwb-editor-actions { order: 2; }
.iwb-editor-header > .iwb-editor-tools {
position: static;
order: 3;
flex: 1 1 100%;
width: auto;
left: auto;
top: auto;
margin-top: 8px;
flex-direction: row;
justify-content: center;
padding: 6px 10px;
border-radius: 10px;
}
.iwb-editor-tool { position: relative; }
.iwb-tool-key {
position: absolute;
right: -3px;
bottom: -3px;
font-size: 8px;
line-height: 1;
background: #45475a;
color: #cdd6f4;
padding: 1px 3px;
border-radius: 3px;
pointer-events: none;
font-style: normal;
font-weight: 600;
}
.iwb-editor-tool.active .iwb-tool-key { background: #1e1e2e; color: #e8a735; }
.iwb-editor-header > .iwb-editor-tools .iwb-editor-divider { width: 1px; height: 22px; margin: 0 6px; }
/* 左侧:工具参数设定栏(缩放/实心/图层/描边/硬度/透明度) */
.iwb-editor-params {
width: 216px;
min-width: 216px;
flex: 0 0 216px;
flex-direction: column;
align-items: stretch;
gap: 12px;
margin-left: 0;
padding: 14px 12px;
background: #181825;
border-right: 1px solid #313244;
overflow-y: auto;
}
.iwb-editor-params .iwb-editor-zoom { margin-left: 0; order: 0; }
.iwb-editor-params .iwb-editor-zoom .iwb-editor-zoom-val { min-width: 52px; text-align: center; }
.iwb-editor-params .iwb-editor-layer-group { flex-wrap: wrap; justify-content: flex-start; }
.iwb-editor-params .iwb-editor-brush-label { width: 100%; }
.iwb-editor-params .iwb-editor-brush-presets { justify-content: flex-start; }
.iwb-editor-params .iwb-editor-fill-btn { align-self: stretch; }
.iwb-editor-main { display: flex; flex-direction: row; }
/* ======== 布局重构 v2(按用户 6 点) ======== */
.iwb-editor-main { display: flex; flex-direction: row; align-items: stretch; }
/* 顶部一行:标题 + 工具栏(含数字角标) + 撤销重做清空还原 */
.iwb-editor-header { flex-wrap: nowrap; align-items: center; }
.iwb-editor-header > .iwb-editor-title { order: 0; }
.iwb-editor-header > .iwb-editor-tools {
position: static; order: 1; flex: 1 1 auto; flex-basis: auto;
margin-top: 0; width: auto; left: auto; top: auto;
flex-direction: row; justify-content: center;
padding: 0; background: transparent; border: 0; border-radius: 0;
}
.iwb-editor-header > .iwb-editor-divider { order: 2; }
.iwb-editor-header > .iwb-editor-history { order: 3; display: flex; align-items: center; gap: 4px; }
/* 左栏:调色板在上,参数竖排,导出按钮底部 */
.iwb-editor-left {
width: 240px; min-width: 240px; flex: 0 0 240px;
display: flex; flex-direction: column; gap: 14px;
padding: 12px; background: #181825; border-right: 1px solid #313244; overflow-y: auto;
}
.iwb-editor-left > .iwb-editor-color-panel { padding: 0; background: transparent; border-bottom: 0; }
.iwb-editor-left > .iwb-editor-params {
width: auto; min-width: 0; flex: 1 1 auto;
flex-direction: column; align-items: stretch; gap: 12px; margin-left: 0; padding: 0;
}
.iwb-editor-left > .iwb-editor-export-actions {
display: flex; flex-direction: column; gap: 8px;
margin-top: auto; padding-top: 12px; border-top: 1px solid #313244;
}
.iwb-editor-left > .iwb-editor-export-actions .iwb-editor-btn { width: 100%; }
/* 参数竖排:一行一个设置 */
.iwb-editor-params .iwb-editor-brush-group { display: flex; flex-direction: column; gap: 10px; }
.iwb-editor-params .iwb-editor-zoom .iwb-editor-zoom-btn,
.iwb-editor-params .iwb-editor-zoom .iwb-editor-zoom-val { flex: 1 1 auto; }
.iwb-editor-params .iwb-editor-layer-group { flex-wrap: wrap; }
/* 颜色值后面的 实心/边线 切换 */
.iwb-editor-fill-pair { display: inline-flex; margin-left: 6px; }
.iwb-editor-fill-pair .iwb-editor-fill-btn { align-self: center; }
/* ======== 布局优化 v3 ======== */
/* 左栏可交互(避免被画布/层级遮挡导致“调节不起作用”) */
.iwb-editor-left { position: relative; z-index: 40; pointer-events: auto; }
.iwb-editor-left input, .iwb-editor-left select, .iwb-editor-left button, .iwb-editor-left label { pointer-events: auto; }
/* 顶部工具栏内的 面/边(实心) 切换按钮 */
.iwb-editor-tools .iwb-editor-fill-btn {
width: 42px; height: 32px; padding: 0; border: 0; border-radius: 8px;
background: transparent; color: #cdd6f4; cursor: pointer; font-size: 11px; font-weight: 600;
}
.iwb-editor-tools .iwb-editor-fill-btn:hover { background: #45475a; }
.iwb-editor-tools .iwb-editor-fill-btn.active { background: #e8a735; color: #1e1e2e; }
/* 右侧图层面板内的图层顺序按钮 */
.iwb-editor-layer-panel .iwb-editor-layer-group {
display: flex; align-items: center; gap: 6px;
padding: 10px 12px; border-bottom: 1px solid #313244;
}
.iwb-editor-layer-panel .iwb-editor-layer-group .iwb-editor-constraint-label { color: #a6adc8; font-size: 12px; margin-right: 2px; }
/* 缩放(画面调整)移到左栏下方 */
.iwb-editor-params .iwb-editor-zoom {
order: 99; margin-top: 10px; padding-top: 10px; border-top: 1px solid #313244;
}
.iwb-editor-params .iwb-editor-zoom .iwb-editor-zoom-btn { flex: 0 0 auto; }
.iwb-editor-params .iwb-editor-zoom .iwb-editor-zoom-val { flex: 0 0 auto; }
/* ======== 布局优化 v4 ======== */
/* 交换左右栏:图层在左,调色板/参数在右 */
.iwb-editor-main { flex-direction: row; }
.iwb-editor-main > .iwb-editor-layer-panel { order: 1; border-left: 0; border-right: 1px solid #313244; }
.iwb-editor-main > .iwb-editor-canvas-wrap { order: 2; }
.iwb-editor-left { order: 3; border-right: 0; border-left: 1px solid #313244; }
/* 硬度/透明度 数值与滑块对齐 */
.iwb-editor-params .iwb-editor-brush-label .iwb-editor-brush-hardness-val,
.iwb-editor-params .iwb-editor-brush-label .iwb-editor-brush-opacity-val {
min-width: 40px; text-align: right; color: #cdd6f4; font-size: 12px;
}
.iwb-editor-params .iwb-editor-brush-label input[type="range"] { flex: 1 1 auto; }
/* 缩放块放在参数区最底部 */
.iwb-editor-params .iwb-editor-zoom, .iwb-editor-left .iwb-editor-zoom {
display: flex; align-items: center; justify-content: center; gap: 8px;
width: 100%; padding: 8px 4px; border-top: 1px solid #313244; margin-top: 12px;
}
.iwb-editor-left .iwb-editor-zoom .iwb-editor-zoom-btn {
flex: 0 0 auto; min-width: 28px; height: 26px; background: #313244; color: #cdd6f4; border: 0; border-radius: 6px; cursor: pointer; font-size: 14px;
}
.iwb-editor-left .iwb-editor-zoom .iwb-editor-zoom-btn:hover { background: #45475a; }
.iwb-editor-left .iwb-editor-zoom .iwb-editor-zoom-val { min-width: 52px; text-align: center; color: #cdd6f4; font: 600 12px sans-serif; }
/* 调色板与下方参数调节之间的横线分割 */
.iwb-editor-params { border-top: 1px solid #313244; padding-top: 12px; }
/* 色相条指示器需定位父级相对 */
.iwb-color-hue { position: relative; }
/* 顶部实心按钮与工具匹配:默认背景 */
.iwb-editor-tools .iwb-editor-fill-btn { background: #313244; color: #cdd6f4; }
/* 裁剪工具条:三行展示(比例 / 尺寸 / 确认取消),避免被挤压 */
.iwb-editor-crop-bar {
display: flex;
flex-direction: column;
gap: 8px;
align-items: center;
padding: 10px 14px;
}
.iwb-editor-crop-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; width: 100%; gap: 6px; }
.iwb-editor-crop-row .iwb-editor-constraint-group { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.iwb-editor-crop-actions { gap: 10px; }
.iwb-editor-crop-actions .iwb-editor-crop-info { min-width: 88px; text-align: center; }
.iwb-editor-constraint-sep { display: none; }
/* ======== 修复:左列(图层)占满高度,三列稳定布局 ======== */
.iwb-editor-main { display: flex; flex-direction: row; align-items: stretch; }
.iwb-editor-main > .iwb-editor-layer-panel { flex: 0 0 290px; min-width: 290px; width: 290px; }
.iwb-editor-main > .iwb-editor-canvas-wrap { flex: 1 1 auto; min-width: 0; }
.iwb-editor-left { flex: 0 0 240px; min-width: 240px; width: 240px; }
.iwb-editor-layer-panel .iwb-editor-layer-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
/* ======== 顶部布局 v5:左侧重置类 / 中间工具 / 右侧保存类 ======== */
.iwb-editor-header > .iwb-editor-title { order: 0; }
.iwb-editor-header > .iwb-editor-history { order: 1; display: flex; align-items: center; gap: 4px; }
.iwb-editor-header > .iwb-editor-tools { order: 2; flex: 1 1 auto; justify-content: center; }
.iwb-editor-header > .iwb-editor-export-actions { order: 3; display: flex; align-items: center; gap: 6px; margin-left: 4px; }
/* 重置类(撤销/重做/清空/复原)统一小圆角按钮 */
.iwb-editor-header .iwb-editor-history .iwb-editor-action {
width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px;
background: #313244; color: #cdd6f4; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.iwb-editor-header .iwb-editor-history .iwb-editor-action:hover { background: #45475a; }
.iwb-editor-header .iwb-editor-history .iwb-editor-action-restore { background: #313244; color: #cdd6f4; }
/* 保存类(新建/覆盖/退出)统一样式 */
.iwb-editor-header .iwb-editor-export-actions .iwb-editor-btn {
height: 30px; padding: 0 14px; border: 0; border-radius: 8px; font-size: 12px; font-weight: 600;
background: #313244; color: #cdd6f4; cursor: pointer;
}
.iwb-editor-header .iwb-editor-export-actions .iwb-editor-btn:hover { background: #45475a; }
/* 调色板与参数之间的分割线及间距 */
.iwb-editor-left > .iwb-editor-params { border-top: 1px solid #313244; margin-top: 16px; padding-top: 16px; }
/* 笔刷快捷值 7 档圆点 */
.iwb-editor-brush-presets { display: flex; align-items: center; gap: 8px; }
.iwb-editor-brush-preset i { width: 6px; height: 6px; }
.iwb-editor-brush-preset:nth-child(2) i { width: 8px; height: 8px; }
.iwb-editor-brush-preset:nth-child(3) i { width: 10px; height: 10px; }
.iwb-editor-brush-preset:nth-child(4) i { width: 13px; height: 13px; }
.iwb-editor-brush-preset:nth-child(5) i { width: 16px; height: 16px; }
.iwb-editor-brush-preset:nth-child(6) i { width: 20px; height: 20px; }
.iwb-editor-brush-preset:nth-child(7) i { width: 24px; height: 24px; }
/* 缩放:缩小比例、圆角 */
.iwb-editor-left .iwb-editor-zoom { gap: 6px; padding: 6px 4px; margin-top: 10px; }
.iwb-editor-left .iwb-editor-zoom .iwb-editor-zoom-btn { min-width: 26px; height: 24px; border-radius: 8px; font-size: 13px; }
.iwb-editor-left .iwb-editor-zoom .iwb-editor-zoom-val { min-width: 44px; font-size: 11px; }
.iwb-editor-left .iwb-editor-zoom .iwb-editor-zoom-fit { font-size: 11px; padding: 0 8px; }
/* 笔刷快捷值:压缩横向间距,避免右栏出现横向滚动条 */
.iwb-editor-left { overflow-x: hidden; }
.iwb-editor-params { overflow-x: hidden; }
.iwb-editor-brush-presets { gap: 3px; flex-wrap: wrap; max-width: 100%; justify-content: flex-start; }
.iwb-editor-brush-preset { padding: 0 1px; min-width: 0; flex: 0 0 auto; }
.iwb-editor-brush-preset i { width: 5px; height: 5px; }
.iwb-editor-brush-preset:nth-child(2) i { width: 7px; height: 7px; }
.iwb-editor-brush-preset:nth-child(3) i { width: 9px; height: 9px; }
.iwb-editor-brush-preset:nth-child(4) i { width: 11px; height: 11px; }
.iwb-editor-brush-preset:nth-child(5) i { width: 14px; height: 14px; }
.iwb-editor-brush-preset:nth-child(6) i { width: 17px; height: 17px; }
.iwb-editor-brush-preset:nth-child(7) i { width: 20px; height: 20px; }
/* 去掉参数模块右侧的边线(隐藏纵向滚动条与右边框) */
.iwb-editor-left { border-right: 0 !important; scrollbar-width: none; -ms-overflow-style: none; }
.iwb-editor-left::-webkit-scrollbar { width: 0; height: 0; display: none; }
.iwb-editor-left > .iwb-editor-params { border-right: 0; }
.iwb-editor-brush-presets::-webkit-scrollbar { width: 0; height: 0; display: none; }
/* 独立悬浮工具条(扩展自建,不插入应用 React DOM) */
.iwb-cutout-toolbar {
position: fixed; z-index: 2147483000; display: none; align-items: center; gap: 3px;
padding: 4px 6px; border-radius: 14px; background: #fff;
border: 1px solid #d0d7de; box-shadow: 0 8px 28px rgba(15, 23, 42, 0.14);
pointer-events: auto;
}
.iwb-cutout-toolbar button {
width: 30px; height: 28px; padding: 0; border: 0; border-radius: 8px;
background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.iwb-cutout-toolbar button:hover { background: #eef2f7; }
.iwb-cutout-toolbar button i { font-style: normal; font-size: 11px; font-weight: 700; }
.iwb-cutout-toolbar button svg { display: block; }
/* 顶部左右两组工具交换:左=新建/覆盖/退出,右=撤销/重做/清空/复原 */
.iwb-editor-header > .iwb-editor-title { order: 0; }
.iwb-editor-header > .iwb-editor-export-actions { order: 1; margin-left: 0; margin-right: 4px; }
.iwb-editor-header > .iwb-editor-tools { order: 2; flex: 1 1 auto; justify-content: center; }
.iwb-editor-header > .iwb-editor-history { order: 3; margin-left: 0; }
/* 图层面板:放大锁定 / 删除按钮的点击区域与图标 */
.iwb-editor-layer-panel .iwb-layer-lock,
.iwb-editor-layer-panel .iwb-layer-del {
width: 24px; height: 24px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
}
.iwb-editor-layer-panel .iwb-layer-lock svg,
.iwb-editor-layer-panel .iwb-layer-del svg { width: 16px; height: 16px; }
/* 图层按钮图标统一 14px */
.iwb-editor-layer-panel .iwb-layer-vis svg,
.iwb-editor-layer-panel .iwb-layer-lock svg,
.iwb-editor-layer-panel .iwb-layer-del svg { width: 14px; height: 14px; }
.iwb-editor-layer-panel .iwb-layer-vis,
.iwb-editor-layer-panel .iwb-layer-lock,
.iwb-editor-layer-panel .iwb-layer-del { width: 22px; height: 22px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
/* ================================================================
v1.1 便利版 UI(单张处理)
只追加、不重写历史样式:旧规则里的魔数定位在这里统一覆盖。
分区:顶栏 / 就地选项栏 / 竖工具栏 / 画布浮层 / 状态栏 / toast
================================================================ */
/* ---- 顶栏:精简、一步可达 ---- */
.iwb-editor-header { min-height: 44px; padding: 6px 12px; gap: 8px; }
.iwb-editor-title em.iwb-editor-doc-size { font-style: normal; font-weight: 400; font-size: 11px; color: #7f849c; margin-left: 6px; }
.iwb-editor-optionbar {
display: flex; align-items: center; gap: 10px;
height: 36px; min-height: 36px; padding: 0 12px;
background: #202033; border-bottom: 1px solid #313244;
color: #a6adc8; font-size: 12px;
}
.iwb-editor-optionbar-label { color: #7f849c; font-weight: 600; white-space: nowrap; }
.iwb-editor-optionbar-body { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; }
.iwb-opt-label { color: #a6adc8; white-space: nowrap; }
.iwb-opt-btn {
background: #313244; color: #cdd6f4; border: 1px solid transparent; border-radius: 5px;
padding: 3px 9px; font-size: 12px; cursor: pointer;
}
.iwb-opt-btn:hover { background: #45475a; }
.iwb-opt-btn.active { background: #4488ff; color: #fff; }
.iwb-opt-num {
width: 46px; padding: 2px 4px; background: #313244; color: #e8a735;
border: 1px solid #45475a; border-radius: 5px; text-align: center; font-size: 12px;
}
.iwb-opt-current { color: #e8a735; font-weight: 600; white-space: nowrap; }
.iwb-opt-hint { color: #7f849c; font-size: 11px; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iwb-editor-more-wrap, .iwb-editor-export-settings-wrap { position: relative; flex: 0 0 auto; z-index: 45; }
.iwb-editor-more-btn, .iwb-editor-panel-toggle, .iwb-editor-export-settings-btn {
background: #313244; color: #cdd6f4; border: 1px solid #45475a; border-radius: 6px;
padding: 5px 10px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.iwb-editor-more-btn:hover, .iwb-editor-panel-toggle:hover, .iwb-editor-export-settings-btn:hover { background: #45475a; }
.iwb-editor-panel-toggle { padding: 5px 8px; }
.iwb-editor-export-summary { color: #e8a735; margin: 0 2px; }
.iwb-editor-more-menu, .iwb-editor-export-settings {
display: none; position: absolute; top: 34px; z-index: 60;
background: #252537; border: 1px solid #45475a; border-radius: 8px;
padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
.iwb-editor-more-menu { left: 0; width: 206px; flex-direction: column; gap: 2px; }
.iwb-editor-more-menu.open, .iwb-editor-export-settings.open { display: flex; flex-direction: column; gap: 4px; }
.iwb-editor-export-settings { right: 0; width: 268px; }
.iwb-editor-more-menu button, .iwb-editor-export-row button {
background: transparent; color: #cdd6f4; border: 0; border-radius: 5px;
padding: 6px 8px; font-size: 12px; text-align: left; cursor: pointer; white-space: nowrap;
}
.iwb-editor-more-menu button:hover, .iwb-editor-export-row button:hover { background: #3b3d52; }
.iwb-editor-more-menu kbd { float: right; color: #7f849c; font-size: 10px; }
.iwb-editor-more-sep { height: 1px; background: #45475a; margin: 4px 0; }
.iwb-editor-export-row { display: flex; align-items: center; gap: 4px; }
.iwb-editor-export-row > span { width: 34px; flex: 0 0 34px; color: #7f849c; font-size: 11px; }
.iwb-editor-export-row button { flex: 1 1 auto; text-align: center; background: #313244; }
.iwb-editor-export-row button.active { background: #4488ff; color: #fff; }
.iwb-editor-export-note { color: #7f849c; font-size: 11px; border-top: 1px solid #313244; padding-top: 6px; }
.iwb-editor-btn-download { background: #1a7f37 !important; color: #fff !important; }
.iwb-editor-btn-download:hover { background: #15803d !important; }
/* ---- 竖工具栏:真正固定在左侧,给 main 留出 56px ---- */
.iwb-editor-header > .iwb-editor-tools {
position: fixed !important; left: 8px !important; top: 112px !important;
width: 40px !important; max-height: calc(100vh - 128px);
flex-direction: column; padding: 5px !important; border-radius: 10px;
overflow-y: auto; overflow-x: hidden; scrollbar-width: none; z-index: 50;
}
.iwb-editor-header > .iwb-editor-tools::-webkit-scrollbar { display: none; }
.iwb-editor-header > .iwb-editor-tools .iwb-editor-tool,
.iwb-editor-header > .iwb-editor-tools .iwb-editor-action { width: 30px !important; height: 30px !important; min-width: 30px; flex: 0 0 auto; }
.iwb-editor-header > .iwb-editor-tools .iwb-editor-divider { width: 22px; height: 1px; margin: 3px 0; flex: 0 0 auto; }
.iwb-editor-header > .iwb-editor-tools .iwb-editor-fill-btn { width: 30px !important; padding: 3px 0 !important; font-size: 10px; writing-mode: vertical-rl; }
.iwb-editor-main { padding-left: 56px; }
.iwb-editor-main > .iwb-editor-layer-panel { flex: 0 0 260px !important; min-width: 260px !important; width: 260px !important; }
.iwb-editor-left { flex: 0 0 220px !important; min-width: 220px !important; width: 220px !important; }
.iwb-editor-overlay.panels-collapsed .iwb-editor-layer-panel,
.iwb-editor-overlay.panels-collapsed .iwb-editor-left { display: none !important; }
.iwb-editor-zoom-hint { display: none !important; }
/* ---- 交互层:蚂蚁线 / 笔刷环各自独立,互不擦除 ---- */
.iwb-editor-selection-overlay, .iwb-editor-cursor-overlay {
position: absolute; top: 0; left: 0; display: block; pointer-events: none;
background: transparent !important;
}
.iwb-editor-selection-overlay { z-index: 11; }
.iwb-editor-cursor-overlay { z-index: 12; }
/* ---- 选区浮动操作条(体验后再定去留;纯视图,可随时替换) ---- */
.iwb-editor-sel-bar {
display: none; position: absolute; z-index: 30; align-items: center; gap: 4px;
padding: 5px 6px; background: rgba(24,24,37,0.96);
border: 1px solid #45475a; border-radius: 8px;
box-shadow: 0 8px 26px rgba(0,0,0,0.45); white-space: nowrap;
}
.iwb-editor-sel-bar.as-menu { border-color: #4488ff; }
.iwb-editor-sel-bar .iwb-editor-sel-info {
color: #7f849c; font-size: 11px; padding: 0 6px;
border-right: 1px solid #45475a; margin-right: 2px; font-variant-numeric: tabular-nums;
}
.iwb-editor-sel-bar button {
background: #313244; color: #cdd6f4; border: 1px solid transparent; border-radius: 5px;
padding: 4px 8px; font-size: 12px; cursor: pointer;
}
.iwb-editor-sel-bar button:hover:not(:disabled) { background: #4488ff; color: #fff; }
.iwb-editor-sel-bar button[data-sel-cmd="sel.delete"]:hover:not(:disabled) { background: #cf222e; }
.iwb-editor-sel-bar button:disabled { opacity: 0.35; cursor: not-allowed; }
/* ---- 状态栏 / toast ---- */
.iwb-editor-statusbar {
display: flex; align-items: center; gap: 14px;
height: 26px; min-height: 26px; padding: 0 12px;
background: #181825; border-top: 1px solid #313244;
color: #a6adc8; font-size: 11px; font-variant-numeric: tabular-nums;
}
.iwb-editor-statusbar span + span { border-left: 1px solid #313244; padding-left: 14px; }
.iwb-editor-status-tool { margin-left: auto; color: #e8a735; }
.iwb-editor-toast {
position: fixed; left: 50%; bottom: 46px; z-index: 1000000;
transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
transition: opacity 0.2s, transform 0.2s;
background: #313244; color: #cdd6f4; padding: 8px 14px; border-radius: 8px;
font-size: 12px; max-width: 80vw; box-shadow: 0 8px 26px rgba(0,0,0,0.45);
}
.iwb-editor-toast.show { opacity: 1; transform: translate(-50%, 0); }
.iwb-editor-toast-success { background: #1a7f37; color: #fff; }
.iwb-editor-toast-error { background: #cf222e; color: #fff; }
.iwb-editor-toast-warn { background: #b06a00; color: #fff; }
.iwb-editor-toast-info { background: #2f6fed; color: #fff; }
@media (max-width: 900px) {
.iwb-opt-hint, .iwb-editor-optionbar-tip { display: none; }
.iwb-editor-export-actions .iwb-editor-btn-cancel { display: none; }
}
/* 输出设置:按预设显示的行(尺寸/体积只属于电商方图)
注意 `.iwb-editor-export-row` 是 display:flex,会盖掉 UA 的 [hidden]{display:none},
必须显式 !important,否则 JS 设 hidden 后行还留在面板里。 */
.iwb-editor-export-row[hidden] { display: none !important; }
.iwb-editor-export-settings [data-export-key]:disabled {
opacity: 0.32; cursor: not-allowed; text-decoration: line-through;
}
.iwb-editor-export-settings [data-export-key]:disabled:hover { background: #313244; }