.sketch-editor { width:calc(100vw - 32px); max-width:1600px; height:calc(100dvh - 32px); max-height:none; padding:0; border:1px solid var(--lm-border-input); border-radius:12px; color:var(--lm-text); background:var(--lm-page); font:14px/1.5 'Noto Sans SC','Microsoft YaHei',sans-serif; }
.sketch-editor::backdrop { background:#17191ca8; }
.sketch-editor[open] { display:flex; flex-direction:column; }
.sketch-editor * { box-sizing:border-box; }
.sketch-editor header,.sketch-editor footer,.sketch-options { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:10px 14px; background:var(--lm-surface); }
.sketch-editor header { border-bottom:1px solid var(--lm-divider); }
.sketch-editor h2 { margin:0 auto 0 0; font-size:16px; }
.sketch-editor button { font:inherit; min-height:32px; padding:5px 9px; border:1px solid var(--lm-border-input); border-radius:7px; background:var(--lm-surface); color:var(--lm-text); cursor:pointer; }
.sketch-editor button.sketch-icon-button { display:inline-flex; align-items:center; justify-content:center; flex:none; width:36px; height:36px; min-height:36px; padding:7px; border-color:transparent; border-radius:8px; }
.sketch-editor .sketch-icon { display:block; width:20px; height:20px; flex:none; pointer-events:none; }
.sketch-editor button.sketch-icon-button:hover:not(:disabled) { background:var(--lm-page); border-color:var(--lm-border-input); }
.sketch-editor button:is([data-action=remove],[data-action=deleteSelection]):hover:not(:disabled) { color:var(--danger,#b53d36); }
.sketch-editor button:disabled { opacity:.45; cursor:default; }
.sketch-tools button[aria-pressed=true],.sketch-layer[data-active=true] { border-color:var(--lm-primary); background:var(--lm-primary-soft); }
.sketch-editor button.sketch-primary { background:var(--lm-primary); color:#17191c; border-color:var(--lm-primary); }
.sketch-editor button.sketch-primary:hover:not(:disabled) { background:var(--lm-primary); border-color:var(--lm-text); }
.sketch-editor :is(button,input,select,textarea):focus-visible { outline:2px solid var(--lm-focus,#5162d6); outline-offset:2px; }
.sketch-options { border-bottom:1px solid var(--lm-divider); font-size:12px; min-height:48px; }
.sketch-editor label { display:flex; align-items:center; gap:6px; }
.sketch-editor :is(input,select,textarea) { min-width:0; max-width:100%; padding:5px; border:1px solid var(--lm-border-input); border-radius:5px; color:var(--lm-text); background:var(--lm-surface); font:inherit; }
.sketch-editor input[type=number] { width:74px; }
.sketch-editor input[type=range] { width:90px; padding:0; accent-color:var(--lm-primary); }
.sketch-editor .sketch-brush-size input { width:120px; }
.sketch-editor output { font-variant-numeric:tabular-nums; }
.sketch-options output { min-width:32px; text-align:right; }
.sketch-options [data-output=size] { min-width:44px; }
.sketch-editor input[type=color] { width:36px; height:30px; padding:2px; }
.sketch-body { display:grid; grid-template-columns:56px minmax(0,1fr) 250px; flex:1; min-height:0; overflow:hidden; }
.sketch-tools { padding:8px; display:flex; flex-direction:column; align-items:center; gap:4px; overflow-x:hidden; overflow-y:auto; background:var(--lm-surface); border-right:1px solid var(--lm-divider); }
.sketch-tools [data-action=undo] { margin-top:12px; }
.sketch-stage { overflow:auto; position:relative; min-width:0; min-height:0; background:var(--lm-page); }
.sketch-paper { position:relative; margin:24px; width:max-content; box-shadow:0 1px 8px #0003; background-color:#fff; background-image:conic-gradient(#d9d9d9 25%,#fff 0 50%,#d9d9d9 0 75%,#fff 0); background-size:20px 20px; }
.sketch-paper canvas { display:block; touch-action:none; cursor:crosshair; outline:none; }
.sketch-side { min-width:0; overflow-x:hidden; overflow-y:auto; padding:12px; background:var(--lm-surface); border-left:1px solid var(--lm-divider); }
.sketch-side section,.sketch-side label,.sketch-side [data-text-fields] { min-width:0; max-width:100%; }
.sketch-side [data-prop=name] { flex:1; width:0; }
.sketch-side .sketch-scale-range { display:block; width:100%; margin:6px 0; }
.sketch-side input.sketch-scale-range { width:100%; }
.sketch-side [data-output=dimensions] { overflow-wrap:anywhere; }
.sketch-side h3 { margin:0 0 8px; font-size:13px; }
.sketch-side section + section { border-top:1px solid var(--lm-divider); margin-top:12px; padding-top:12px; }
.sketch-side label { font-size:12px; margin:6px 0; justify-content:space-between; }
.sketch-side textarea { width:100%; min-height:68px; resize:vertical; }
.sketch-layer-actions { display:flex; flex-wrap:wrap; gap:4px; margin:8px 0; }
.sketch-layer-actions button.sketch-icon-button { width:32px; height:32px; min-height:32px; padding:5px; border-color:var(--lm-divider); }
.sketch-layers { display:grid; grid-template-columns:minmax(0,1fr); min-width:0; gap:5px; }
.sketch-layer { display:flex; gap:4px; align-items:center; min-width:0; max-width:100%; border:1px solid var(--lm-divider); padding:4px; border-radius:7px; }
.sketch-layer .sketch-layer-name { flex:1 1 0; min-width:0; text-overflow:ellipsis; overflow:hidden; white-space:nowrap; text-align:left; border:0; background:transparent; }
.sketch-layer > :not(.sketch-layer-name) { flex:none; }
.sketch-layer button { padding:3px 5px; font-size:12px; }
.sketch-layer button.sketch-layer-toggle { width:28px; height:28px; min-height:28px; padding:4px; }
.sketch-layer [data-action=visibility][aria-pressed=false] { opacity:.5; }
.sketch-layer img { width:28px; height:28px; object-fit:contain; background:#e3e3e3; }
.sketch-editor footer { border-top:1px solid var(--lm-divider); font-size:12px; }
.sketch-status { flex:1; min-width:130px; color:var(--lm-text-muted); overflow-wrap:anywhere; }
.sketch-status[data-error=true] { color:var(--danger,#b53d36); }
.sketch-hint { margin:7px 0; color:var(--lm-text-muted); font-size:12px; }
.sketch-editor [hidden] { display:none !important; }
.sketch-transform { position:absolute; border:1px solid var(--lm-primary); pointer-events:none; transform-origin:center; }
.sketch-editor .sketch-handle { position:absolute; display:block; width:12px; height:12px; min-height:0; padding:0; border:1px solid var(--lm-primary); border-radius:2px; background:var(--lm-surface); pointer-events:auto; touch-action:none; transform:translate(-50%,-50%); }
.sketch-handle[data-corner=nw] { left:0; top:0; cursor:nwse-resize; }
.sketch-handle[data-corner=ne] { left:100%; top:0; cursor:nesw-resize; }
.sketch-handle[data-corner=se] { left:100%; top:100%; cursor:nwse-resize; }
.sketch-handle[data-corner=sw] { left:0; top:100%; cursor:nesw-resize; }
@media(max-width:850px) { .sketch-editor { width:100vw; height:100dvh; max-width:none; margin:0; border-radius:0; } .sketch-body { grid-template-columns:56px minmax(0,1fr) 210px; } .sketch-options { max-height:100px; overflow:auto; } }
@media(max-width:600px) { .sketch-body { grid-template-columns:56px minmax(0,1fr); grid-template-rows:minmax(180px,1fr) minmax(110px,30%); } .sketch-tools { grid-row:1/3; } .sketch-side { grid-column:2; border-top:1px solid var(--lm-divider); } .sketch-editor header { padding:8px; gap:5px; } .sketch-editor footer { padding:8px; } .sketch-status { flex-basis:100%; } .sketch-options { padding:6px 8px; gap:6px; } }
@media(pointer:coarse) { .sketch-editor .sketch-handle { width:20px; height:20px; } .sketch-editor button.sketch-icon-button { width:44px; height:44px; min-height:44px; } .sketch-body { grid-template-columns:64px minmax(0,1fr) 250px; } }
@media(pointer:coarse) and (max-width:850px) { .sketch-body { grid-template-columns:64px minmax(0,1fr) 210px; } }
@media(pointer:coarse) and (max-width:600px) { .sketch-body { grid-template-columns:64px minmax(0,1fr); } }
