.toon-editor-dialog{width:min(1480px,calc(100vw - 28px));max-width:none;height:min(940px,calc(100dvh - 28px));max-height:none;padding:0;border:1px solid #3a3942;border-radius:18px;background:#f7f6f3;color:#282932;overflow:hidden;box-shadow:0 32px 140px #12102166}.toon-editor-dialog::backdrop{background:#17151bcc;backdrop-filter:blur(5px)}.toon-editor-dialog[open]{display:flex;flex-direction:column}.editor-header{display:flex;align-items:center;justify-content:space-between;padding:15px 20px;border-bottom:1px solid #dcd9e1;background:#fff;gap:15px}.editor-header-title{display:flex;gap:12px;align-items:center;min-width:0}.editor-brand-mark{display:grid;place-items:center;flex-shrink:0;width:40px;height:40px;background:#e8e0ff;border:1px solid #d2c3f2;border-radius:12px;font-size:23px;color:#6941c6}.editor-header .eyebrow{font-size:9px;letter-spacing:.12em;margin:0 0 3px;white-space:nowrap}.editor-header h2{font-size:19px;margin:0;letter-spacing:-.04em}.editor-header-actions{display:flex;align-items:center;gap:10px}.editor-header-actions .button{min-height:40px;padding:9px 16px;font-size:12px;white-space:nowrap}.editor-free-badge{font-size:10px;color:#625e6b;max-width:200px;line-height:1.5}.editor-workbench{display:grid;grid-template-columns:76px minmax(0,1fr) 260px;flex:1;min-height:0}.editor-tools{border-right:1px solid #dcd9e1;background:#fff;display:flex;flex-direction:column;padding:12px 8px;gap:6px;overflow-y:auto}.editor-tool{padding:8px 3px;display:grid;gap:4px;place-items:center;min-height:57px;background:transparent;border:1px solid transparent;border-radius:9px;color:#625e6b;cursor:pointer}.editor-tool>span{font-size:25px;line-height:1;font-family:system-ui}.editor-tool small{font-size:9px;line-height:1.2;word-break:keep-all}.editor-tool:hover{background:#f1edf8}.editor-tool.active{background:#eee7ff;color:#6941c6;border-color:#d4c4fa}.editor-tool:disabled{opacity:.4;cursor:wait}.editor-tool-divider{height:1px;background:#e6e2ec;margin:7px}.editor-center{min-width:0;min-height:0;display:flex;flex-direction:column;background:#e8e6eb}.editor-canvas-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 14px;background:#f8f7fa;border-bottom:1px solid #dcd9e1;min-height:49px;flex-shrink:0}.editor-canvas-toolbar>div{display:flex;align-items:center;gap:4px}.editor-small-button{border:1px solid transparent;background:transparent;color:#55515f;min-height:30px;padding:5px 8px;border-radius:6px;font-size:10px;cursor:pointer;white-space:nowrap}.editor-small-button:hover{border-color:#d7cee6;background:#eee8f7}.editor-small-button:disabled{opacity:.32;cursor:default}.editor-small-button.danger{color:#a13c52}.editor-zoom-control input{width:70px;accent-color:#7956db}.editor-zoom-control>span{font-size:10px;min-width:36px;color:#625e6b}.editor-stage{position:relative;flex:1;min-height:220px;overflow:auto;display:flex;align-items:safe center;justify-content:safe center;padding:24px;background-image:radial-gradient(#c8c3d0 .8px,transparent .8px);background-size:13px 13px;overscroll-behavior:contain}.editor-canvas-wrap{flex-shrink:0;box-shadow:0 8px 35px #28243b24;background:#fff}.editor-canvas-wrap[hidden]{display:none}.editor-canvas-wrap canvas{display:block;width:100%;height:100%;touch-action:none;user-select:none;cursor:default}.editor-canvas-wrap canvas[data-tool=pen]{cursor:crosshair}.editor-canvas-wrap canvas[data-tool=eraser]{cursor:cell}.editor-statusbar{font-size:9px;line-height:1.4;color:#6f697a;background:#f8f7fa;padding:8px 12px;display:flex;justify-content:space-between;gap:15px;border-top:1px solid #dcd9e1;flex-shrink:0}.editor-statusbar>span:first-child{max-width:75%}.editor-statusbar>span:last-child{white-space:nowrap}.editor-loading{text-align:center;font-size:12px;color:#6a617b}.editor-loading .studio-spinner{margin:0 auto}.editor-inspector{overflow-y:auto;padding:17px;background:#fcfbfd;border-left:1px solid #dcd9e1;min-width:0;overscroll-behavior:contain}.editor-subtitle{font-size:10px;line-height:1.7;color:#756e80;margin:0 0 15px}.editor-inspector .inline-message{font-size:11px;padding:10px}.editor-property-group{padding:15px 0;border-top:1px solid #e5e1eb}.editor-property-group h3,.editor-property-group summary{font-size:11px;font-weight:750;margin:0 0 12px;color:#39323f;letter-spacing:-.01em}.editor-property-group summary{cursor:pointer;list-style-position:inside}.editor-property-group label{font-size:10px;color:#655d71;line-height:1.5}.editor-property-group textarea{margin:5px 0 8px;font-size:12px;min-height:80px;border-radius:7px;padding:9px}.editor-property-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:9px 0}.editor-property-row label{flex-shrink:0;max-width:100px}.editor-property-row input[type=range]{min-width:0;width:107px;accent-color:#7956db}.editor-property-row input[type=color]{padding:0;border:1px solid #d7d0e1;border-radius:5px;width:38px;height:26px;background:#fff;cursor:pointer}.editor-dimension-controls{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}.editor-dimension-controls label{display:flex;align-items:center;gap:4px}.editor-dimension-controls input{width:74px;min-width:0;accent-color:#7956db}.editor-property-hint{font-size:10px;line-height:1.65;color:#81788f;margin:10px 0 0}.editor-layer-list{display:grid;gap:5px;max-height:145px;overflow-y:auto}.editor-layer{width:100%;font-size:10px;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:9px 10px;border:1px solid #e4dfed;border-radius:6px;color:#72677f;background:#f5f2fa;cursor:pointer}.editor-layer.active{border-color:#ae95e1;background:#ece4fa;color:#6941c6}.editor-layer-actions{display:flex;flex-wrap:wrap;gap:2px;margin-top:8px}.editor-layer-actions .editor-small-button{font-size:9px;padding:5px}.editor-bottom-actions{display:grid;gap:13px;margin-top:15px}.editor-bottom-actions .button{font-size:11px;min-height:39px;padding:9px 10px}.editor-bottom-actions .text-button{font-size:10px;color:#8c6982;text-align:center}.editor-inspector input:focus-visible,.editor-inspector button:focus-visible,.editor-tool:focus-visible,.editor-small-button:focus-visible{outline:3px solid #a98cde;outline-offset:2px}.editor-background-properties[open] summary{margin-bottom:15px}
@media(max-width:1000px){.editor-workbench{grid-template-columns:62px minmax(0,1fr) 218px}.editor-free-badge{display:none}.editor-inspector{padding:13px}.editor-tool small{font-size:8px}.editor-canvas-toolbar{padding:8px}.editor-canvas-toolbar .editor-small-button span{display:none}.editor-property-row input[type=range]{width:95px}.editor-statusbar{font-size:8px}}
@media(max-width:650px){.toon-editor-dialog{width:100vw;height:100dvh;border:0;border-radius:0;margin:0;max-height:100dvh}.editor-header{padding:10px 12px;min-height:63px;gap:8px}.editor-header-title{gap:8px}.editor-brand-mark{width:30px;height:30px;border-radius:8px;font-size:19px}.editor-header h2{font-size:15px}.editor-header .eyebrow{font-size:7px}.editor-header-actions{gap:4px}.editor-header-actions .button{font-size:10px;padding:8px 11px;min-height:35px}.editor-header-actions .icon-button{width:31px;height:35px}.editor-workbench{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:52px minmax(0,1fr) min(210px,30dvh)}.editor-tools{flex-direction:row;overflow-x:auto;overflow-y:hidden;border-right:0;border-bottom:1px solid #dcd9e1;padding:5px 10px;gap:5px;justify-content:center}.editor-tool{min-height:48px;min-width:48px;padding:4px 8px;gap:3px}.editor-tool>span{font-size:21px}.editor-tool small{font-size:8px}.editor-tool-divider{width:1px;height:32px;margin:7px 4px;flex-shrink:0}.editor-center{min-height:0}.editor-canvas-toolbar{min-height:36px;padding:3px 10px}.editor-canvas-toolbar .editor-small-button{min-height:28px}.editor-stage{min-height:0;padding:16px}.editor-statusbar{padding:6px 10px;font-size:8px}.editor-statusbar>span:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.editor-inspector{border-left:0;border-top:1px solid #dcd9e1;display:flex;align-items:flex-start;gap:16px;overflow:auto;padding:11px 14px}.editor-subtitle{display:none}.editor-inspector>.inline-message{position:sticky;left:0;max-width:210px;flex-shrink:0}.editor-property-group{padding:0 14px 0 0;border-top:0;border-right:1px solid #e5e1eb;flex:0 0 235px;margin:0}.editor-property-group h3{margin:0 0 7px}.editor-property-group textarea{min-height:60px;padding:7px;font-size:16px;line-height:1.35;max-height:85px}.editor-property-group label,.editor-property-group summary{font-size:10px}.editor-layer-list{max-height:62px;display:flex;overflow-x:auto;margin-bottom:9px}.editor-layer{min-width:110px;max-width:150px;padding:7px;flex-shrink:0}.editor-layer-actions{flex-wrap:nowrap}.editor-property-row{margin:6px 0}.editor-dimension-controls{margin:6px 0}.editor-property-hint{font-size:9px}.editor-background-properties{min-height:120px}.editor-bottom-actions{margin:3px 0;min-width:145px}.editor-bottom-actions .button{font-size:10px}.editor-selection-empty{font-size:10px}.editor-property-group:has(#editor-selection:not([hidden])){flex-basis:270px}.editor-property-group:has(#editor-selection:not([hidden]))>.editor-layer-list{display:none}}
@media(prefers-reduced-motion:reduce){.toon-editor-dialog *, .toon-editor-dialog *::before{animation:none!important;transition:none!important}}
.editor-color-palette{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0 12px}.editor-color-palette button{width:20px;height:20px;border:1px solid #d2c6dc;border-radius:5px;box-shadow:inset 0 0 0 2px #ffffff80;cursor:pointer}.editor-color-palette button:hover,.editor-color-palette button:focus-visible{outline:2px solid #ae95cf;outline-offset:2px}.editor-color-palette button:disabled{opacity:.4;cursor:wait}

.editor-header-title>div{min-width:0}@media(max-width:360px){.editor-header-title{gap:6px}.editor-header h2{font-size:13px}.editor-header .eyebrow{font-size:6px}.editor-header #editor-panel-number{display:none}}

.editor-property-group textarea,.editor-layer{font-family:"Apple SD Gothic Neo","Noto Sans KR","Hiragino Sans","Noto Sans JP",system-ui,sans-serif;word-break:keep-all;overflow-wrap:anywhere}.editor-property-group textarea{line-height:1.55;letter-spacing:-.01em;resize:vertical}

.editor-provenance-note{font-size:11px;line-height:1.8;color:#766582;margin:12px 0;overflow-wrap:anywhere}

/* Output typography controls: explicit sizes and visible fit feedback. */
.editor-preset-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}.editor-preset{min-height:44px;padding:10px 8px;border:1px solid #d8d5cc;border-radius:10px;background:#fffefa;color:#24282c;font-family:inherit;font-size:13px;font-weight:600;line-height:1.4;cursor:pointer;text-align:center}.editor-preset.active{border-color:#526139;background:#eff5d8;box-shadow:inset 0 0 0 1px #526139}.editor-preset:focus-visible,.editor-small-button:focus-visible{outline:3px solid #7956db;outline-offset:2px}.editor-preset:disabled{opacity:.5;cursor:wait}.editor-text-count,.editor-font-actual{display:block;font-size:12px;line-height:1.6;color:#655e6c;margin:5px 0 8px}.editor-readability{border-radius:8px;padding:10px 12px;background:#edf2e2;color:#3e4a30;font-size:12px;line-height:1.65;margin:8px 0}.editor-readability[data-level=small],.editor-readability[data-level=overflow]{background:#fff1d6;color:#77521d}.editor-readability[hidden]{display:none}.editor-property-group label,.editor-property-group summary,.editor-property-hint{font-size:12px;line-height:1.6}.editor-property-group textarea{font-size:16px;line-height:1.6}.editor-small-button{min-height:36px}.editor-color-palette button{width:28px;height:28px}.editor-provenance-note{font-size:12px}.editor-tool small{font-size:11px}
@media(max-width:900px){.editor-text-presets{flex-basis:232px}.editor-preset-grid{margin:0}.editor-preset{font-size:12px;min-height:44px;padding:8px}.editor-property-group label,.editor-property-group summary,.editor-property-hint,.editor-selection-empty{font-size:12px}.editor-readability{font-size:12px;margin:7px 0;padding:8px}.editor-font-actual,.editor-text-count{font-size:12px}.editor-bottom-actions .button{font-size:12px;min-height:44px}.editor-small-button{min-height:40px}.editor-layer{min-height:40px;font-size:12px}.editor-statusbar{font-size:11px}}

/* Canvas-native bubbles: direct movement, resize and speaker-tail controls. */
.editor-bubble-controls{margin:12px 0;padding:12px 0;border-top:1px solid var(--line,#29303a);border-bottom:1px solid var(--line,#29303a)}
.editor-bubble-controls[hidden],#editor-tail-controls[hidden],#editor-tail-size-controls[hidden]{display:none}
.editor-bubble-controls select{width:112px;min-width:0;min-height:38px;border:1px solid var(--line,#29303a);border-radius:7px;padding:7px 9px;background:var(--surface,#14171d);color:var(--ink,#f3f4f6);font:inherit;font-size:12px}
.editor-position-controls{display:grid;grid-template-columns:auto 1fr 1fr;align-items:center;gap:8px;margin-top:14px;font-size:12px;color:var(--muted,#9ca4b3)}
.editor-position-controls label{display:flex;align-items:center;gap:5px;min-width:0}
.editor-position-controls input{width:100%;min-width:0;min-height:36px;padding:5px;border:1px solid var(--line,#29303a);border-radius:6px;background:var(--surface,#14171d);color:var(--ink,#f3f4f6);font:inherit;font-size:12px}
.editor-placement-controls{display:flex;flex-wrap:wrap;gap:3px;margin:8px 0}
.editor-placement-controls .editor-small-button{font-size:11px;flex:1;padding:6px 4px;border:1px solid var(--line,#29303a)}
.editor-canvas-wrap canvas[data-tool=select]{cursor:grab}.editor-canvas-wrap canvas[data-tool=select]:active{cursor:grabbing}.editor-canvas-wrap canvas:focus-visible{outline:3px solid var(--accent,#c8ef7f);outline-offset:5px}
@media(min-width:901px){.editor-workbench{grid-template-columns:76px minmax(0,1fr) 290px}}
@media(max-width:650px){.editor-inspector{scroll-snap-type:x proximity}.editor-inspector>.editor-property-group{scroll-snap-align:start}.editor-bubble-controls select{font-size:16px;min-height:44px}.editor-position-controls input{font-size:16px;min-height:40px}.editor-placement-controls .editor-small-button{min-height:40px}.editor-bubble-controls{margin:10px 0}.editor-property-group:has(#editor-selection:not([hidden])){flex-basis:292px}.editor-statusbar>span:first-child{max-width:100%}.editor-statusbar>span:last-child{display:none}}
