/* Match the shared Aladamus surfaces, typography and action colors. All rules stay inside Edit. */
.ed-app {
    --ed-bg:#101214;
    --ed-panel:#191c1f;
    --ed-border:#303438;
    --ed-muted:#989fa5;
    --ed-accent:#22d3ee;
    position:relative;
    display:flex;
    flex-direction:column;
    height:var(--ed-app-height,100dvh);
    min-height:620px;
    padding:24px;
    color:var(--cg-primary-color-text,#f3f4f6);
    background:var(--cg-background,#000);
    font-family:inherit;
    font-weight:400;
    color-scheme:dark;
}
.ed-app * {box-sizing:border-box}
.ed-app [hidden] {display:none!important}
/* Splitter preferences apply only to the desktop workspace. */
.ed-panel-resize {display:none}
@media (min-width:761px) and (pointer:fine), (min-width:1025px) {
    .ed-app .ed-layers {height:var(--ed-layers-height,auto);max-height:var(--ed-layers-height,280px)}
    .ed-app .ed-layers-panel {position:relative;padding-bottom:22px}
    .ed-app .ed-panel-resize {display:flex;align-items:center;justify-content:center;color:#879098;touch-action:none;user-select:none;z-index:4;border-radius:6px;outline:none}
    .ed-panel-resize span {display:block;width:3px;height:3px;border-radius:50%;background:currentColor;box-shadow:-6px 0 0,6px 0 0;font-size:0;pointer-events:none}
    .ed-app .ed-panel-resize:hover,.ed-app .ed-panel-resize:focus-visible {background:#ffffff0d;color:#e5e7eb;outline:none;box-shadow:inset 0 0 0 1px #60666c}
    .ed-panel-resize-width {position:absolute;right:calc(var(--ed-sidebar-width,clamp(310px,24vw,340px)) + 2px);top:0;bottom:0;width:16px;cursor:col-resize}
    .ed-panel-resize-width span {box-shadow:0 -6px 0,0 6px 0}
    .ed-panel-resize-height {position:absolute;bottom:2px;left:calc(50% - 30px);width:60px;height:16px;cursor:row-resize}
    .ed-app.ed-resizing {user-select:none}
    .ed-app.ed-resizing .ed-stage {pointer-events:none}
}
.ed-app #ed-generation-panel.ed-reference-dragover {border-color:#969fa7;box-shadow:0 0 0 2px #969fa750,0 12px 32px #0008}
.ed-app #ed-generation-panel.ed-reference-dragover::after {content:attr(data-drop-label);position:absolute;inset:6px;display:flex;align-items:center;justify-content:center;padding:24px;border:1px dashed #969fa7;border-radius:14px;background:#171b1ef0;color:#e5e7eb;text-align:center;font-size:14px;z-index:10;pointer-events:none}
.ed-opacity-label {display:flex;align-items:center;justify-content:space-between;gap:12px}
.ed-opacity-label output {margin:0;white-space:nowrap;color:#b9c0c6;font-variant-numeric:tabular-nums}
.ed-app button,.ed-app input,.ed-app textarea,.ed-app select {font:inherit}
.ed-app button {cursor:pointer;color:inherit;border:0;background:transparent;transition:background-color .15s,border-color .15s,color .15s}
.ed-app button:disabled {opacity:.4;cursor:not-allowed}
.ed-app :focus-visible {outline:2px solid var(--ed-accent);outline-offset:3px}
.ed-app button:hover:not(:disabled) {background:#ffffff0d}
.ed-app input:not([type=range]):not([type=color]),.ed-app select,.ed-app textarea {color:inherit;background:#171b1e;border:1px solid var(--ed-border);border-radius:10px;padding:10px 12px;width:100%;min-width:0}
.ed-app input::placeholder,.ed-app textarea::placeholder {color:#7c858d}
.ed-app select option {background:var(--ed-panel)}
.ed-app label {display:block;font-size:12px;color:#b9c0c6;margin:12px 0}
.ed-app label select,.ed-app label input {margin-top:7px}
.ed-app input[type=range] {width:100%;accent-color:#808080}
.ed-topbar {display:flex;align-items:center;gap:16px;min-height:40px;margin-bottom:20px;flex-shrink:0}
.ed-topbar .ed-home-link {display:flex;align-items:center;justify-content:center;flex:0 0 28px;width:28px;min-height:32px;border-radius:6px;}
.ed-topbar .ed-home-link img {display:block;width:28px;height:28px;object-fit:contain;}
.ed-brand {font-size:24px;font-weight:650;letter-spacing:-.6px;white-space:nowrap}
.ed-mark {color:var(--ed-accent);font-size:18px;margin-right:8px}
.ed-topbar #ed-title {background:transparent;border-color:transparent;max-width:220px;font-size:13px;color:#b0b8bf}
.ed-topbar #ed-title:hover,.ed-topbar #ed-title:focus {border-color:var(--ed-border)}
#ed-save-state {font-size:11px;color:var(--ed-muted);margin-right:auto}
.ed-button {border:1px solid var(--ed-border)!important;border-radius:8px;padding:10px 14px;font-size:12px!important;display:inline-flex;align-items:center;justify-content:center;gap:9px;white-space:nowrap;min-height:40px}
.ed-app .ed-primary,.ed-app .ed-generate {background:linear-gradient(to right,#06b6d4,#2563eb);border-color:transparent!important;color:#fff;font-weight:600}
.ed-app .ed-primary:hover:not(:disabled),.ed-app .ed-generate:hover:not(:disabled) {background:linear-gradient(to right,#0891b2,#1d4ed8)}
.ed-workspace {position:relative;display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:20px;flex:1;min-height:0}
.ed-stage {position:relative;overflow:hidden;display:flex;flex-direction:column;min-width:0;border:1px solid var(--ed-border);border-radius:20px;background:#14171a}
.ed-viewport {position:relative;flex:1;min-height:250px;overflow:hidden;display:flex;align-items:center;justify-content:center}
.ed-viewport.dragover {outline:2px dashed var(--ed-accent);outline-offset:-16px;background:#22d3ee08}
#ed-canvas-wrap {position:absolute;inset:0}
.ed-empty {text-align:center;padding:28px 24px}
.ed-empty-icon {display:flex;align-items:center;justify-content:center;width:64px;height:64px;margin:0 auto 22px;border-radius:18px;background:linear-gradient(135deg,#123f4d,#18274c);color:var(--ed-accent);font-size:28px}
.ed-eyebrow {font-size:10px;font-weight:700;letter-spacing:2px;color:var(--ed-accent)}
.ed-empty h1 {font-size:clamp(30px,3.2vw,48px);font-weight:600;line-height:1.15;letter-spacing:-1.1px;margin:20px 0 16px;color:var(--cg-primary-color-text,#f3f4f6)}
.ed-empty p {font-size:13px;color:var(--ed-muted);margin:0 auto 24px;max-width:420px;line-height:1.7}
.ed-empty small {display:block;font-size:11px;color:#858f98;margin-top:16px}
.ed-feature-tags {display:flex;justify-content:center;gap:8px;margin-top:26px}
.ed-feature-tags span {padding:6px 10px;border:1px solid var(--ed-border);border-radius:8px;color:#a1aab3;font-size:10px}
.ed-stage-bottom {padding:6px 12px 6px;display:flex;align-items:center;flex-direction:column;gap:8px;z-index:2;border-top:1px solid #ffffff06;background:var(--ed-bg)}
.ed-toolbar,.ed-navigation {display:flex;align-items:center;gap:3px;padding:5px 8px;border:1px solid var(--ed-border);background:var(--ed-panel);border-radius:10px}
.ed-toolbar button,.ed-navigation button {height:32px;min-width:32px;border-radius:6px;font-size:13px}
.ed-toolbar button.active {background:#22d3ee18;color:var(--ed-accent)}
.ed-divider {height:20px;width:1px;background:var(--ed-border);margin:0 5px}
.ed-toolbar #ed-brush-color {width:24px;height:24px;padding:0;background:none;border:0}
.ed-toolbar #ed-brush-size {width:55px}
.ed-navigation {align-self:flex-start;border:0;background:none;font-size:11px;padding:0}
.ed-navigation #ed-dimensions {color:var(--ed-muted);padding:0 8px}
.ed-prompt-form {width:min(660px,100%);display:flex;align-items:center;padding:6px;background:var(--ed-panel);border:1px solid #3a4147;border-radius:14px}
.ed-prompt-form:focus-within {border-color:#26869a}
.ed-prompt-form>button {width:38px;height:38px;flex-shrink:0;border-radius:9px;font-size:21px}
.ed-prompt-form #ed-prompt {background:none;border:0;resize:none;max-height:100px;font-size:13px;line-height:22px;padding:8px}
.ed-prompt-form #ed-prompt:focus-visible {outline:0}
.ed-prompt-caption {font-size:10px;min-height:14px;color:var(--ed-muted);text-align:center}
.ed-sidebar {padding:14px;overflow-y:auto;display:flex;flex-direction:column;gap:14px;background:var(--ed-bg);border:1px solid var(--ed-border);border-radius:20px;scrollbar-width:thin;scrollbar-color:#42484d transparent;min-width:0}
.ed-sidebar-heading {display:flex;align-items:center;font-size:10px;font-weight:600;letter-spacing:1.4px;padding:5px 8px 16px;border-bottom:1px solid var(--ed-border);flex-shrink:0}
.ed-live-dot {width:6px;height:6px;border-radius:50%;background:var(--ed-accent);margin-left:auto}
.ed-tools {flex-shrink:0}
.ed-tools h2,.ed-panel-heading h2 {font-size:10px;line-height:1.4;color:var(--ed-muted);letter-spacing:.8px;margin:0;font-weight:500}
.ed-tools h2 {padding:4px 10px 10px}
.ed-panel-heading {display:flex;justify-content:space-between;align-items:center;gap:8px}
.ed-panel-heading button {font-size:21px;width:28px;height:28px;border-radius:6px;flex-shrink:0}
.ed-layers-panel {border:1px solid var(--ed-border);border-radius:12px;padding:12px;flex:0 0 auto;min-height:150px;background:#14171a}
.ed-history-panel{border:1px solid var(--ed-border);border-radius:12px;padding:12px;flex:0 0 auto;background:#14171a}
.ed-history-panel summary{cursor:pointer;color:var(--ed-text);font-size:12px;user-select:none}
.ed-history-panel summary span{float:right;color:var(--ed-muted);font-size:11px}
.ed-history-list{display:flex;flex-direction:column;gap:3px;max-height:220px;overflow-y:auto;margin-top:12px;scrollbar-width:thin}
.ed-app .ed-history-list button{text-align:left;padding:8px 9px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--ed-muted);font-size:11px;line-height:1.4}
.ed-app .ed-history-list button:hover{background:#ffffff08;color:#e1e5e9}
.ed-app .ed-history-list button.current{border-color:#515960;background:#ffffff0a;color:#e1e5e9;opacity:1}
.ed-app .ed-history-list button.future{opacity:.45}
.ed-layers {margin-top:10px;max-height:280px;overflow:auto;scrollbar-width:thin;scrollbar-color:#42484d transparent}
.ed-layer {display:flex;align-items:center;gap:8px;padding:8px;border-radius:7px;cursor:pointer;margin-bottom:3px;border:1px solid transparent}
.ed-layer:hover {background:#ffffff05}
.ed-layer.selected {background:#22d3ee0d;border-color:#288697}
.ed-layer[draggable=true] {cursor:grab;touch-action:none;user-select:none}
.ed-layers {position:relative}
.ed-layers.sorting {cursor:grabbing}
.ed-layers.sorting>.ed-layer {transition:transform .14s ease;pointer-events:none}
.ed-layers.sorting>.ed-layer.dragging {opacity:0}
.ed-layer-drag-ghost {position:fixed;left:0;top:0;margin:0;box-sizing:border-box;z-index:1200;pointer-events:none;opacity:.88;background:#25323a;border-color:var(--ed-accent);box-shadow:0 14px 30px #0009,0 0 0 1px #22d3ee33;will-change:transform}
.ed-layer-drag-ghost.outside {opacity:.4}
.ed-layer-drop-slot {position:absolute;left:0;right:0;box-sizing:border-box;border:1px dashed #72777d;border-radius:7px;background:#92979d12;display:flex;align-items:center;justify-content:center;color:#b6bbc1;font-size:11px;pointer-events:none}
@media(prefers-reduced-motion:reduce) {.ed-layers.sorting>.ed-layer {transition:none}}
.ed-app .ed-layer input.ed-layer-rename {min-width:0;flex:1;width:0;height:24px;min-height:0;margin:0;padding:2px 0;font-size:12px;line-height:20px;border:0;border-radius:0;background:transparent;box-shadow:none;outline:none}
.ed-layer.renaming,.ed-layer.renaming:hover {background:#ffffff05;border-color:#4b5055}
.ed-app .ed-layer-rename::selection {background:#555b62;color:#fff}
.ed-layer-menu {position:fixed;z-index:1100;min-width:200px;max-height:calc(100dvh - 16px);overflow-y:auto;overscroll-behavior:contain;padding:5px;background:#1b2025;border:1px solid var(--ed-border);border-radius:10px;box-shadow:0 12px 36px #0008}
.ed-layer-menu button {display:block;width:100%;padding:9px 12px;text-align:left;border-radius:6px;font-size:12px!important}
.ed-layer-menu button:hover,.ed-layer-menu button:focus-visible {background:#22d3ee16;color:var(--ed-accent)}
.ed-layer-menu button:last-child {color:#ee9696}
.ed-layer-menu button:disabled {opacity:.35;cursor:default}
.ed-layer-thumb {width:34px;height:34px;border-radius:4px;object-fit:contain;background:repeating-conic-gradient(#3b4248 0% 25%,#272d32 0% 50%) 50%/10px 10px}
.ed-layer canvas.ed-layer-thumb {flex:0 0 34px;display:block;cursor:pointer}
.ed-layer canvas.ed-layer-thumb + .ed-layer-mask-icon {margin-left:-4px}
.ed-layer>span {font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.ed-sidebar {overflow-anchor:none}
.ed-mask-cursor {position:fixed;z-index:1200;pointer-events:none;box-sizing:border-box;border:1px solid white;box-shadow:0 0 0 1px #0009;border-radius:50%;transform:translate(-50%,-50%)}
.ed-mask-cursor[hidden] {display:none}
.ed-toolbar[hidden],#ed-mask-panel[hidden] {display:none!important}
#ed-mask-panel.ed-mask-dock {display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;width:calc(100% - 24px);max-width:1100px;max-height:230px;overflow:auto;margin:0 auto;padding:12px;border-radius:12px;box-sizing:border-box;background:#171c20;border:1px solid var(--ed-border)}
.ed-mask-dock>.ed-panel-heading,.ed-mask-dock>.ed-mask-subheading,.ed-mask-dock #ed-mask-status,.ed-mask-dock>.ed-mask-help {display:none}
.ed-mask-dock .ed-mask-preview-wrap {margin:0!important}
.ed-mask-dock .ed-mask-preview-button #ed-mask-preview {width:48px;height:32px}
.ed-mask-dock-field {flex:1 1 115px;min-width:105px;max-width:165px}
.ed-mask-dock-field label,.ed-mask-dock-field .ed-value-label,.ed-mask-dock-field .ed-mask-brush-label {margin:0 0 4px!important;font-size:11px}
.ed-mask-dock-field input[type=range] {width:100%;margin:0}
#ed-mask-panel.ed-mask-dock>.ed-mask-actions {margin:0;gap:5px;flex:0 0 auto}
.ed-mask-dock .ed-mask-actions .ed-button {padding:6px!important;font-size:10px!important}
.ed-mask-dock .ed-mask-shortcuts {margin:0;flex-basis:100%}
.ed-mask-dock .ed-mask-shortcuts[open] {max-height:100px;overflow:auto}
.ed-mask-dock-exit {padding:7px!important;font-size:11px!important}
@media(max-width:760px) {#ed-mask-panel.ed-mask-dock {max-height:260px}.ed-mask-dock-field {max-width:none}}
#ed-mask-panel.ed-mask-dock {display:block;width:fit-content;max-width:calc(100% - 24px);max-height:260px;padding:8px 10px;border-radius:14px;background:#191d20}
.ed-mask-main-row {display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.ed-mask-main-row .ed-mask-dock-field {flex:1 1 110px;min-width:100px;max-width:155px}
.ed-mask-colors {display:flex;align-items:center;gap:4px;border-right:1px solid var(--ed-border);padding-right:12px}
#ed-mask-panel .ed-mask-colors button {display:flex;align-items:center;justify-content:center;width:32px;height:32px;min-width:32px;padding:0!important;border:1px solid transparent!important;border-radius:8px;background:transparent}
#ed-mask-panel .ed-mask-colors button[aria-pressed=true] {background:#3a4044;border-color:#565e63!important}
#ed-mask-panel .ed-mask-colors .ed-mask-swatch {width:17px;height:17px;border-radius:50%;border:1px solid #e8ebed}
.ed-mask-more {margin-top:7px;border-top:1px solid var(--ed-border);padding-top:5px;color:var(--ed-muted);font-size:11px}
.ed-mask-more>summary {cursor:pointer;width:fit-content;padding:2px 4px}
#ed-mask-panel.ed-mask-dock {max-height:none;overflow:visible}
.ed-mask-settings-button {padding:8px!important;font-size:11px!important}
.ed-stage-bottom {position:relative}
.ed-stage-bottom>.ed-toolbar {min-height:76px;box-sizing:border-box}
#ed-mask-panel.ed-mask-dock {position:absolute;bottom:12px;left:50%;transform:translateX(-50%);margin:0;max-width:calc(100% - 24px);overflow-x:auto;overflow-y:hidden}
.ed-mask-dock .ed-mask-main-row {flex-wrap:nowrap}
.ed-mask-main-row>.ed-button,.ed-mask-main-row>.ed-mask-colors {flex-shrink:0}
.ed-canvas-popup {position:absolute;z-index:20;right:16px;bottom:115px;width:min(480px,calc(100% - 32px));max-height:calc(100% - 140px);display:flex;flex-direction:column;background:#191e22;border:1px solid #455057;border-radius:12px;box-shadow:0 14px 44px #0009;color:var(--ed-text);overflow:hidden}
.ed-canvas-popup[hidden] {display:none}
.ed-popup-heading {display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--ed-border);flex-shrink:0;font-size:13px}
.ed-popup-heading button {width:28px;height:28px;font-size:22px!important;border-radius:6px}
.ed-popup-body {padding:14px 16px;overflow-y:auto;min-height:0;overscroll-behavior:contain}
.ed-popup-body .ed-mask-advanced {padding:0;overflow:visible}
.ed-popup-body .ed-mask-dock-field {max-width:none;flex-basis:190px;min-width:170px}
.ed-popup-body .ed-mask-preview-wrap {margin:0}
.ed-shortcuts-open {margin-left:0;width:28px;height:28px;border:1px solid var(--ed-border)!important;border-radius:50%;font-size:13px!important}
.ed-shortcut-guide section+section {margin-top:20px}
.ed-shortcut-guide h3 {font-size:12px!important;font-weight:600;margin:0 0 9px;color:var(--ed-text)}
.ed-shortcut-guide section>div {display:grid;grid-template-columns:minmax(110px,40%) 1fr;gap:12px;padding:7px 0;border-top:1px solid #ffffff08;font-size:11px;line-height:1.5;color:var(--ed-muted)}
.ed-shortcut-guide kbd {white-space:normal;background:#252b30;color:#e0e7ea;border-radius:4px;padding:2px 5px;align-self:start;font:10px/1.6 monospace}
.ed-mask-advanced {display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding-top:12px}
.ed-mask-extra-actions {display:flex;flex-wrap:wrap;align-items:center;gap:6px;width:100%;padding-top:10px;border-top:1px solid var(--ed-border)}
.ed-mask-extra-actions .ed-button {font-size:10px!important;padding:6px 8px!important}
.ed-mask-extra-actions #ed-mask-remove {margin-left:auto;color:#dd9696}
.ed-mask-extra-actions .ed-mask-views {margin:0}
.ed-mask-main-row .ed-mask-brush-label input[type=number] {width:48px!important;height:23px!important;background:#111517!important;border-color:transparent!important}
@media(max-width:600px) {.ed-mask-main-row {gap:8px}.ed-mask-main-row .ed-mask-dock-field {min-width:85px}.ed-mask-colors {padding-right:6px}}
.ed-mask-cursor.adjusting::after {content:attr(data-label);position:absolute;left:50%;top:100%;transform:translate(-50%,8px);white-space:nowrap;background:#171c20;color:#fff;border:1px solid #637078;border-radius:5px;padding:4px 7px;font:11px sans-serif}
.ed-mask-cursor.precise {border:0;border-radius:0;box-shadow:none;background:linear-gradient(#fff,#fff) center/1px 100% no-repeat,linear-gradient(#fff,#fff) center/100% 1px no-repeat;filter:drop-shadow(1px 1px 0 #000)}
.ed-mask-canvas-view {position:absolute;left:0;top:0;pointer-events:none;z-index:2}
.ed-mask-canvas-view[hidden] {display:none}
.ed-layer>button {font-size:12px;padding:4px;box-sizing:border-box;flex:0 0 26px;width:26px;min-width:26px;max-width:26px;display:inline-flex;align-items:center;justify-content:center}
.ed-muted {font-size:11px;color:var(--ed-muted);padding:12px 0;line-height:1.6}
#ed-layer-properties {margin-top:12px;border-top:1px solid var(--ed-border);padding-top:12px}
.ed-export {display:flex;gap:8px;flex-shrink:0;margin-top:auto}
.ed-export button {flex:1}
.ed-notice {position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#162d36;border:1px solid #237b91;color:#f3f5f6;padding:15px 24px;border-radius:12px;z-index:1100;max-width:90vw;box-shadow:0 12px 40px #0006;font-size:13px}
.ed-notice.error {background:#3b2424;border-color:#965d56}
.ed-busy {position:absolute;inset:0;background:#101214ed;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:18px;z-index:20}
.ed-busy span {font-size:12px;color:#aab5be}
.ed-spinner {border:2px solid #2c4956;border-top-color:var(--ed-accent);height:36px;width:36px;border-radius:50%;animation:ed-spin 1s linear infinite}
@keyframes ed-spin {to{transform:rotate(360deg)}}
.ed-dialog {background:var(--ed-panel);color:#f3f5f6;border:1px solid var(--ed-border);border-radius:16px;width:min(560px,92vw);max-height:75vh;padding:24px;overflow:auto;scrollbar-width:thin}
.ed-dialog::backdrop {background:#000b}
.ed-dialog h2 {font-size:20px;font-weight:600;color:inherit;letter-spacing:-.4px}
.ed-project-item {width:100%;text-align:left;border-bottom:1px solid var(--ed-border)!important;padding:18px 5px!important;display:flex;justify-content:space-between;gap:15px}
.ed-project-item time {color:#a2adb7;font-size:11px}
.ed-empty-projects {padding:25px 0;color:#a2adb7;font-size:13px}
@media(min-width:1600px) {
    .ed-workspace {grid-template-columns:minmax(0,1fr) 340px}
    .ed-sidebar {padding:18px}
}
@media(max-width:1050px) {
    .ed-app {padding:20px}
    .ed-workspace {grid-template-columns:minmax(0,1fr) 270px;gap:16px}
    .ed-topbar {gap:10px}
    .ed-brand {font-size:20px}
    .ed-topbar #ed-title {max-width:160px}
    .ed-stage-bottom {padding:8px 12px 12px}
    .ed-empty h1 {font-size:34px}
}
@media(max-width:760px) {
    .ed-app {height:auto;min-height:0;padding:16px}
    .ed-topbar {flex-wrap:wrap;margin-bottom:16px}
    .ed-brand {font-size:20px;margin-right:auto}
    .ed-topbar #ed-title {order:4;max-width:65%;flex:1}
    #ed-save-state {order:5;margin-right:0}
    .ed-topbar .ed-button {padding:8px 10px;font-size:11px!important}
    .ed-workspace {display:flex;flex-direction:column;gap:16px}
    .ed-stage {height:650px;min-height:70vh;border-radius:16px}
    .ed-sidebar {overflow:visible;border-radius:16px}
    .ed-tools {display:grid;grid-template-columns:1fr 1fr}
    .ed-tools h2 {grid-column:1/-1}
    .ed-empty {padding:24px 16px}
    .ed-empty h1 {font-size:34px}
    .ed-eyebrow {letter-spacing:1.3px;font-size:9px}
    .ed-feature-tags {margin-top:24px}
    .ed-toolbar {gap:0;padding:4px}
    .ed-toolbar button {min-width:28px}
    .ed-toolbar #ed-brush-size {width:35px}
    .ed-toolbar .ed-divider {margin:0 3px}
    .ed-navigation {font-size:10px}
    .ed-dialog {max-height:80vh}
}
@media(max-height:800px) and (min-width:761px) {
    .ed-empty {padding:18px}
    .ed-empty-icon {width:44px;height:44px;font-size:22px;margin-bottom:14px;border-radius:12px}
    .ed-empty h1 {font-size:36px;margin:14px 0}
    .ed-empty p {margin-bottom:18px;font-size:12px}
    .ed-empty small {margin-top:12px}
    .ed-feature-tags {display:none}
    .ed-stage-bottom {gap:5px;padding-top:6px;padding-bottom:10px}
    .ed-navigation button {height:24px}
}
@media(prefers-reduced-motion:reduce) {
    .ed-app button {transition:none}
    .ed-spinner {animation:none}
}


/* Masks replace the former recipe list. Region generation is hidden until a selection exists. */
.ed-mask-help {font-size:12px;line-height:1.65;color:var(--ed-muted);margin:8px 0 14px}
.ed-mask-actions {display:flex;gap:8px}
.ed-mask-actions .ed-button {flex:1;min-width:0;padding:9px 8px;font-size:11px!important}
.ed-mask-actions .active {color:var(--ed-accent);background:#22d3ee16;border-color:#288697!important}
.ed-mask-swatch {display:inline-block;width:15px;height:15px;border:1px solid #78858f;border-radius:3px;flex-shrink:0}
.ed-mask-swatch.white {background:#fff}.ed-mask-swatch.black {background:#000}
.ed-mask-preview-wrap {display:flex;align-items:center;gap:12px;margin:14px 0}
#ed-mask-preview {width:100px;height:64px;object-fit:contain;background:#000;border:1px solid var(--ed-border);border-radius:8px;flex-shrink:0}
#ed-mask-status {font-size:11px;line-height:1.6;color:var(--ed-muted)}
.ed-mask-preview-button {padding:3px!important;border:1px solid var(--ed-border)!important;border-radius:6px;background:transparent;flex-shrink:0;line-height:0}
.ed-mask-preview-button.active {border-color:#b6c1c5!important}
.ed-mask-preview-button #ed-mask-preview {width:72px;height:48px;border:0;border-radius:2px}
.ed-mask-subheading {display:flex;justify-content:space-between;align-items:center;font-size:12px!important;font-weight:500;margin:20px 0 10px!important;padding-top:14px;border-top:1px solid var(--ed-border)}
.ed-mask-brush-label {display:flex;align-items:center;justify-content:space-between;gap:8px;margin:12px 0 3px;font-size:11px;color:var(--ed-muted)}
.ed-mask-brush-label label {margin:0!important}
.ed-mask-brush-label>span {display:flex;align-items:center;gap:5px}
.ed-mask-brush-label input[type=number] {width:62px!important;height:27px!important;padding:3px 6px!important;border:1px solid var(--ed-border)!important;border-radius:5px!important;background:#0e1214!important;color:var(--ed-text);text-align:right;font-size:11px!important;box-shadow:none!important}
.ed-mask-brush-label input:focus {outline:1px solid #7b858c!important;outline-offset:0}
.ed-mask-actions #ed-mask-swap {flex:0 0 32px;font-size:18px!important;padding:0!important}
.ed-mask-views {margin-bottom:14px}
.ed-mask-views [aria-pressed=true] {border-color:#86969f!important;background:#ffffff0c}
.ed-mask-shortcuts {margin:14px 0;font-size:11px;color:var(--ed-muted);line-height:1.8}
.ed-mask-shortcuts summary {cursor:pointer}
.ed-mask-shortcuts p {margin:8px 0}
#ed-mask-panel kbd {background:transparent;color:var(--ed-muted);font:10px monospace;padding:0 2px;box-shadow:none}
#ed-mask-panel>.ed-mask-actions {margin-top:8px}
#ed-mask-panel .ed-mask-preview-wrap {margin-top:8px}
.ed-layer .ed-layer-mask-icon {flex:0 0 32px!important;width:32px!important;min-width:32px!important;height:27px!important;padding:2px!important;border:0!important;cursor:pointer;border-radius:3px!important;background:#000;opacity:1}
.ed-layer-mask-icon canvas {width:26px;height:20px;display:block;pointer-events:none}
.ed-layer .ed-layer-mask-icon {flex-basis:34px!important;width:34px!important;min-width:34px!important;height:34px!important;padding:0!important;box-sizing:border-box;border-radius:4px!important}
.ed-layer .ed-layer-mask-icon canvas {width:34px;height:34px}
.ed-mask-main-row #ed-mask-remove {width:30px;height:32px;padding:0!important;color:#c89a9a;border-radius:6px}
@media(max-width:760px) {#ed-mask-panel {display:block}}
.ed-layer-settings {border:1px solid var(--ed-border);border-radius:12px;padding:12px;background:#14171a;flex-shrink:0}
.ed-layer-settings .ed-panel-heading h2 {padding:0}
.ed-layer-features {display:flex;flex-direction:column;gap:6px;margin-top:14px}
.ed-layer-features .ed-button {font-size:11px!important;justify-content:flex-start;padding:9px 10px}
.ed-layer-features .active {color:var(--ed-accent);border-color:#288697!important;background:#22d3ee10}
.ed-layer-secondary {display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:8px;font-size:11px!important;color:var(--ed-muted)!important;text-align:left}
.ed-layer-secondary>span:last-child {margin-left:auto;font-size:17px}
#ed-mask-badge,#ed-feather-badge {color:var(--ed-accent);font-size:8px}
.ed-layer-hint {font-size:11px;color:var(--ed-muted);line-height:1.6;margin:12px 0 0}
.ed-app .ed-switch {display:flex;align-items:center;gap:9px;margin:14px 0}
.ed-app .ed-switch input[type=checkbox] {width:15px;height:15px;padding:0;margin:0;accent-color:var(--ed-accent)}
.ed-app .ed-value-label {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}
.ed-value-label output {color:var(--ed-accent);font-size:11px}
#ed-feather-reset {margin-top:12px;min-height:32px;padding:7px 10px;font-size:11px!important}
.ed-generation-panel {width:min(660px,100%)}
.ed-reference-heading {display:flex;align-items:center;gap:10px;font-size:10px;color:var(--ed-muted)}
.ed-reference-heading .ed-button {min-height:30px;padding:5px 9px;font-size:11px!important}
.ed-ratio-auto {margin-left:auto}
.ed-reference-list {display:flex;gap:8px;overflow-x:auto;max-width:100%;padding:6px 0;scrollbar-width:thin}
.ed-reference-list:empty {display:none}
.ed-reference {position:relative;width:54px;height:54px;flex:0 0 54px;border:1px solid var(--ed-border);border-radius:8px;overflow:hidden;background:var(--ed-panel)}
.ed-reference img {width:100%;height:100%;object-fit:cover}
.ed-reference>span {position:absolute;bottom:2px;left:3px;background:#101214cc;color:#fff;font-size:10px;padding:0 3px;border-radius:3px}
.ed-reference>button {position:absolute;right:0;top:0;width:20px;height:20px;background:#101214dd;font-size:15px;line-height:18px;border-radius:0 0 0 5px}
.ed-reference .ed-reference-retry {top:auto;bottom:0}
.ed-reference.error {border-color:#bd6666}
.ed-reference.uploading,.ed-reference.waiting {border-style:dashed;opacity:.6}
.ed-reference-help {font-size:10px;color:var(--ed-muted);line-height:1.5;margin:4px 0 8px}
.ed-generation-options {display:flex;gap:10px;align-items:flex-end;margin-bottom:8px}
.ed-generation-options label {flex:1;min-width:0;margin:0;font-size:10px}
.ed-generation-options label:first-child {flex:2}
.ed-generation-options select {padding:7px 9px;font-size:11px;min-height:34px}
.ed-generation-panel .ed-prompt-caption {margin-top:6px}
.ed-generation-status {display:flex;align-items:center;gap:10px;max-width:660px;font-size:11px;color:var(--ed-accent);line-height:1.6;padding:8px 12px;border:1px solid #244650;background:#12252b;border-radius:8px}
.ed-generation-status .ed-button {font-size:10px!important;min-height:30px;padding:5px 8px}
.ed-stage-bottom {flex-shrink:0}
@media(max-width:760px) {
    .ed-tools {display:block}
    .ed-generation-options {flex-wrap:wrap}
    .ed-generation-options label:first-child {flex-basis:100%}
    .ed-generation-status {flex-wrap:wrap}
}

.ed-saved-region{display:flex;align-items:center;gap:8px;border:1px dashed #555d64;border-radius:7px;margin-bottom:8px;padding:8px;color:#aeb8c0;font-size:11px}.ed-saved-region .ed-region-select{flex:1;min-width:0;text-align:left}

/* Compact editor navigation; project metadata lives beside its layers. */
.ed-app .ed-topbar{min-height:30px;gap:8px;margin-bottom:10px;flex-wrap:nowrap}
.ed-app .ed-topbar .ed-button{min-height:30px;padding:5px 10px;font-size:11px!important}
.ed-topbar #ed-new{margin-left:0;width:30px;flex-shrink:0}
.ed-project-meta{display:flex;align-items:center;gap:8px;padding:2px 4px;min-width:0}
.ed-project-meta .ed-brand{font-size:12px;font-weight:500;letter-spacing:0;color:var(--ed-muted)}
.ed-app .ed-project-meta #ed-title{flex:1;width:0;min-width:0;height:26px;min-height:0;margin:0;padding:3px 5px;font-size:12px;line-height:18px;background:transparent;border:1px solid transparent;border-radius:4px;box-shadow:none;outline:none;text-overflow:ellipsis}
.ed-app .ed-project-meta #ed-title:hover,.ed-app .ed-project-meta #ed-title:focus{border-color:var(--ed-border)}
.ed-app .ed-topbar .ed-token-balance {margin-left:auto}
/* Keep project actions above the sidebar; the canvas spans the full workspace height. */
@media (min-width:1025px), (min-width:761px) and (pointer:fine) {
 .ed-app .ed-workspace {grid-template-columns:minmax(0,1fr) var(--ed-sidebar-width,clamp(310px,24vw,340px));grid-template-rows:auto minmax(0,1fr);row-gap:10px}
 .ed-app .ed-workspace>.ed-topbar {grid-column:2;grid-row:1;margin:0;min-width:0;flex-wrap:nowrap;gap:8px;padding-left:18px}
 .ed-app .ed-topbar #ed-projects-open {min-width:0;white-space:nowrap;padding-inline:8px;font-size:10px!important}
 .ed-app .ed-workspace>.ed-stage {grid-column:1;grid-row:1 / 3}
 .ed-app .ed-workspace>.ed-sidebar {grid-column:2;grid-row:2;min-height:0}
}
.ed-app .ed-navigation {width:100%}
.ed-app .ed-navigation #ed-save-state {margin:0 0 0 auto;order:2;min-width:0;font-size:10px;text-align:right;overflow-wrap:anywhere}
@media(max-width:760px),(max-width:1024px) and (pointer:coarse) {
 .ed-app .ed-navigation {flex-wrap:wrap}
 .ed-app .ed-navigation #ed-save-state {flex-basis:100%;padding:2px 5px}
 .ed-app .ed-navigation #ed-save-state:empty {display:none}
}
.ed-project-meta #ed-title::selection{background:#555b62;color:#fff}
.ed-app .ed-navigation input#ed-fit{width:62px;height:28px;min-width:0;padding:3px 5px;border-radius:6px;font-size:11px;text-align:center}

.ed-layer.ed-saved-region{height:52px;margin-bottom:3px;flex-shrink:0}.ed-region-select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:grab!important}
.ed-region-select .ed-region-model,.ed-region-select small {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.5}
.ed-region-select .ed-region-model {font-size:11px;color:#e4e7eb}
.ed-region-select small {font-size:10px;color:var(--ed-muted)}

/* Selection-anchored generation popover, independent of canvas layout. */
.ed-stage>.ed-generation-panel,.ed-workspace>.ed-generation-panel{position:absolute;z-index:5;width:min(360px,calc(100% - 16px));padding:10px;background:#1c2024f5;border:1px solid #4a5055;border-radius:16px;box-shadow:0 12px 32px #0008;max-height:calc(100% - 24px);overflow:auto;backdrop-filter:blur(12px)}
.ed-generation-panel .ed-prompt-form{display:block;width:100%;padding:0;background:none;border:0;border-radius:0}
.ed-generation-panel .ed-prompt-form #ed-prompt{display:block;min-height:52px;max-height:110px;padding:5px 4px;font-size:12px;line-height:20px}
.ed-generation-footer{display:flex;align-items:center;gap:7px}
.ed-app #ed-generation-close{position:absolute;top:7px;right:7px;width:26px;height:26px;padding:0;border:0;border-radius:7px;background:transparent;color:var(--ed-muted);font-size:20px;line-height:26px}
.ed-app #ed-generation-close:hover{background:#ffffff0d;color:#e3e7ea}
.ed-generation-panel .ed-prompt-form #ed-prompt{padding-right:30px}
.ed-app .ed-generation-footer #ed-model:focus,.ed-app .ed-generation-footer #ed-model:focus-visible{outline:1px solid #58616a;outline-offset:0;box-shadow:none;border-color:transparent;background-color:#ffffff06}
.ed-generation-footer>button{flex:0 0 32px;height:32px;border-radius:50%;font-size:19px;background:#ffffff09}
.ed-app .ed-generation-footer #ed-model{flex:1;width:0;min-width:0;padding:6px 22px 6px 6px;border:0;background-color:transparent;font-size:11px;font-weight:600}
.ed-generation-footer .ed-generate{background:linear-gradient(135deg,#06b6d4,#2563eb)}
.ed-generation-settings{font-size:10px;color:var(--ed-muted);margin-top:8px}
.ed-generation-settings summary{cursor:pointer;user-select:none;padding:3px 2px}
.ed-generation-settings summary span{float:right}
.ed-generation-settings .ed-generation-options{margin:8px 0;flex-wrap:nowrap}
.ed-generation-settings .ed-generation-options label:first-child{flex:1;flex-basis:auto}
.ed-generation-panel .ed-prompt-caption{text-align:left;font-size:9px;margin-top:5px;min-height:0}
.ed-generation-panel .ed-reference-list{margin-top:4px}

.ed-app .ed-generation-status{position:fixed;right:24px;bottom:24px;z-index:1300;width:min(420px,calc(100vw - 32px));max-width:none;padding:14px 16px;border:1px solid #414c55;border-radius:12px;background:#20272ef5;color:#d8e4ec;box-shadow:0 12px 36px #0008;backdrop-filter:blur(10px)}

/* Generation dialog: header, prompt and controls each occupy their own row. */
.ed-app #ed-generation-panel{width:min(390px,calc(100% - 16px));padding:16px;box-sizing:border-box;border:1px solid #424b54;border-radius:16px;background:#1c2228;box-shadow:0 16px 48px #0007;scrollbar-width:thin}
.ed-generation-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.ed-generation-heading strong{font-size:13px;font-weight:600;color:#e4e9ed}
.ed-app #ed-generation-panel #ed-generation-close{position:static;flex:0 0 28px;width:28px;height:28px;line-height:28px;margin:0;outline-offset:0}
.ed-app #ed-generation-panel #ed-prompt-form{position:static;display:flex;flex-direction:column;align-items:stretch;gap:12px;margin:0;padding:0;width:100%;border:0;box-shadow:none}
.ed-app #ed-generation-panel #ed-prompt{position:static;box-sizing:border-box;width:100%;height:112px;min-height:112px;max-height:180px;margin:0;padding:12px;resize:vertical;overflow-y:auto;scrollbar-width:thin;background:#151a1f;border:1px solid #38424b;border-radius:10px;color:#e4e9ed;font-size:12px;line-height:1.6}
.ed-app #ed-generation-panel #ed-prompt:focus{outline:none;border-color:#657482;box-shadow:none}
.ed-app #ed-generation-panel .ed-generation-footer{display:grid;grid-template-columns:36px minmax(0,1fr) 36px;align-items:center;gap:10px}
.ed-app #ed-generation-panel .ed-generation-footer>button{position:static;width:36px;height:36px;margin:0;border-radius:10px}
.ed-app #ed-generation-panel #ed-model{width:100%;height:36px;margin:0;padding:7px 24px 7px 10px;background-color:#151a1f;border:1px solid #38424b;border-radius:9px;font-size:12px}
.ed-app #ed-generation-panel .ed-generation-settings{margin:14px 0 0;padding-top:12px;border-top:1px solid #343c44;font-size:11px}
.ed-app #ed-generation-panel .ed-generation-settings summary{padding:2px 0 6px;color:#bbc5ce}
.ed-app #ed-generation-panel .ed-generation-options{display:flex;gap:10px;margin:10px 0}
.ed-app #ed-generation-panel .ed-generation-options label{flex:1;min-width:0;font-size:11px}
.ed-app #ed-generation-panel .ed-reference-help{margin:8px 0 0;line-height:1.5}
.ed-app #ed-generation-panel .ed-reference-list:empty{display:none}
.ed-app #ed-generation-panel .ed-reference-list{margin:12px 0 0;gap:8px}
.ed-app #ed-generation-panel .ed-prompt-caption{margin-top:12px;padding-top:10px;border-top:1px solid #343c44;font-size:10px;line-height:1.6;overflow-wrap:anywhere}
.ed-app .ed-saved-region{cursor:pointer}
.ed-app .ed-layer.ed-saved-region:hover{background:#ffffff08}
.ed-app .ed-layer.ed-saved-region.selected{background:#22d3ee14;border:1px solid #288697;color:#e4e9ed}
.ed-app .ed-layer.ed-saved-region:focus-visible{outline:1px solid #288697;outline-offset:-1px}
.ed-app .ed-saved-region>.ed-region-select{pointer-events:none}
.ed-app #ed-generation-panel #ed-generation-close{display:grid;place-items:center;padding:0;line-height:1}
.ed-app #ed-generation-close svg{display:block;margin:0;pointer-events:none}
.ed-app #ed-selection-help[title]{cursor:help;text-decoration:underline dotted #66717a;text-underline-offset:3px}
/* Phone/tablet controls. Desktop layout and mouse interactions remain unchanged. */
.ed-mobile-tabs,.ed-layer-menu-button,.ed-layer-drag-handle {display:none!important}
@media (pointer:coarse) {
 .ed-app .ed-layer-menu-button {display:inline-flex!important;align-items:center;justify-content:center;min-width:40px;width:40px;height:44px;font-size:24px;order:5}
 .ed-app .ed-layer-drag-handle {display:flex!important;align-items:center;justify-content:center;flex:0 0 26px;height:44px;touch-action:none;cursor:grab}
 .ed-app .ed-layer[draggable=true] {touch-action:pan-y;cursor:pointer}
 .ed-app .ed-layer button {min-height:40px}
}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app {height:var(--ed-mobile-height,100dvh);min-height:0;padding:6px 8px max(6px,env(safe-area-inset-bottom));overflow:hidden}
 .ed-app .ed-topbar {gap:6px;margin:0 0 4px;min-height:40px;flex-wrap:nowrap}
 .ed-app .ed-topbar button {min-height:40px}
 .ed-mobile-tabs {display:flex!important;flex:0 0 42px;gap:6px;margin-bottom:4px}
 .ed-mobile-tabs button {flex:1;border:1px solid var(--ed-border);border-radius:8px;font-size:13px}
 .ed-mobile-tabs button[aria-pressed=true] {background:#22d3ee18;color:var(--ed-accent)}
 .ed-app .ed-workspace {display:flex;flex-direction:column;gap:0;min-height:0;overflow:hidden}
 .ed-app .ed-stage {height:auto;min-height:0;flex:1;border-radius:12px}
 .ed-app .ed-sidebar {display:none;height:auto;min-height:0;overflow:auto;overscroll-behavior:contain;flex:1;border-radius:12px}
 .ed-app.ed-mobile-layers .ed-stage {display:none}
 .ed-app.ed-mobile-layers .ed-sidebar {display:flex}
 .ed-app .ed-layers {max-height:none;overflow:visible}
 .ed-app .ed-viewport {min-height:70px;flex:1;touch-action:none}
 .ed-app .ed-stage-bottom {padding:4px;gap:2px;flex:0 0 auto;order:2}
 .ed-app .ed-navigation {width:100%;justify-content:space-between;gap:0;min-height:40px}
 .ed-app .ed-navigation button {min-width:38px;height:40px}
 .ed-app #ed-dimensions {display:none}
 .ed-app .ed-toolbar {width:100%;min-height:48px;padding:2px;justify-content:space-evenly}
 .ed-app .ed-toolbar button {min-width:40px;height:44px}
 .ed-app .ed-toolbar .ed-divider {margin:0 2px}
 .ed-app.ed-mobile-mask .ed-toolbar {display:none!important}
 .ed-app #ed-mask-panel.ed-mask-dock {position:static;transform:none;width:100%;max-width:none;max-height:none;margin:0;padding:2px;overflow:visible}
 .ed-app .ed-mask-dock .ed-mask-main-row {display:flex;flex-wrap:nowrap;gap:4px;width:100%}
 .ed-app .ed-mask-main-row .ed-mask-dock-field {min-width:70px;max-width:none;flex:1;margin:0}
 .ed-app .ed-mask-main-row .ed-mask-colors {padding:0;gap:0}
 .ed-app .ed-mask-colors button {min-width:36px;min-height:44px}
 .ed-app .ed-mask-dock-exit {min-width:44px;padding:4px;font-size:10px!important}
 .ed-app .ed-mask-main-row #ed-mask-remove {display:none}
 .ed-app .ed-mask-settings-button {min-width:44px;height:44px;font-size:0!important}
 .ed-app .ed-mask-settings-button:after {content:'⚙';font-size:22px}
 .ed-app .ed-canvas-popup {position:relative;right:auto;bottom:auto;order:1;width:100%;max-height:42%;min-height:0;flex-shrink:0;border-radius:10px;margin:0;box-shadow:none}
 .ed-app .ed-popup-heading {padding:4px 10px;min-height:44px}
 .ed-app .ed-popup-heading button {width:44px;height:40px}
 .ed-app .ed-popup-body {min-height:0;overflow:auto;overscroll-behavior:contain}
 .ed-app #ed-generation-panel {position:relative;inset:auto!important;order:1;width:100%;max-height:45%!important;flex-shrink:0;padding:8px;border-radius:10px;box-shadow:none;overflow:auto;overscroll-behavior:contain}
 .ed-app.ed-mobile-popup #ed-generation-panel {display:none!important}
 .ed-app #ed-generation-panel #ed-prompt {height:68px;min-height:68px;font-size:16px;padding:6px;line-height:1.3}
 .ed-app #ed-generation-panel .ed-generation-heading {margin-bottom:4px}
 .ed-app #ed-generation-panel .ed-generation-footer>button,.ed-app #ed-generation-panel #ed-model {min-height:44px}
 .ed-app #ed-generation-panel #ed-generation-close {width:44px;height:44px}
 .ed-app #ed-generation-panel #ed-prompt-form {gap:4px}
 .ed-app #ed-generation-panel .ed-generation-settings,.ed-app #ed-generation-panel .ed-prompt-caption {margin-top:6px;padding-top:6px}
 .ed-app input[type=number],.ed-app textarea,.ed-app select {font-size:16px!important}
 .ed-app .ed-layer-menu-button {display:inline-flex!important;align-items:center;justify-content:center;min-width:40px;width:40px;height:44px;font-size:24px;order:5}
 .ed-app .ed-layer-drag-handle {display:flex!important;align-items:center;justify-content:center;flex:0 0 26px;height:44px;touch-action:none;cursor:grab}
 .ed-app .ed-layer[draggable=true] {touch-action:pan-y}
 .ed-app .ed-layer {padding:4px;gap:5px;min-height:52px}
 .ed-app .ed-layer button {min-height:40px}
 .ed-app .ed-layer-menu {max-height:calc(100dvh - 16px);overflow:auto}
 .ed-app .ed-layer-menu button {min-height:44px}
 .ed-app .ed-empty {padding:12px;overflow:auto}
 .ed-app .ed-empty h1 {font-size:23px;margin:8px 0}
 .ed-app .ed-empty p {margin-bottom:10px}
 .ed-app .ed-feature-tags,.ed-app .ed-empty-icon {display:none}
}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app.ed-mobile-keyboard .ed-stage-bottom,.ed-app.ed-mobile-keyboard .ed-viewport {display:none}
 .ed-app.ed-mobile-keyboard #ed-generation-panel,.ed-app.ed-mobile-keyboard .ed-canvas-popup {max-height:100%!important;flex:1}
 .ed-app.ed-mobile-keyboard .ed-topbar {display:none}
 .ed-app .ed-mask-settings-button {font-size:0!important}
 .ed-app .ed-popup-body button {min-height:44px}
}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app .ed-canvas-popup {max-height:min(42%,calc(100% - 176px))}
 .ed-app #ed-generation-panel {max-height:min(45%,calc(100% - 176px))!important}
 .ed-app.ed-mobile-keyboard #ed-generation-panel,.ed-app.ed-mobile-keyboard .ed-canvas-popup {max-height:100%!important}
}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app .ed-layer canvas.ed-layer-thumb {width:40px;height:40px;flex-basis:40px}
 .ed-app .ed-layer .ed-layer-mask-icon {width:40px!important;min-width:40px!important;height:40px!important;flex-basis:40px!important}
 .ed-app .ed-layer .ed-layer-mask-icon canvas {width:40px;height:40px}
}
/* Compact phone tool dock: navigation and tools are distinct, touch-sized groups. */
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app .ed-stage-bottom {padding:6px;gap:6px;background:#101416;border-top:1px solid #30383d}
 .ed-app .ed-navigation {display:flex;gap:3px;padding:3px 5px;min-height:42px;border:1px solid #30393f;border-radius:12px;background:#191f23}
 .ed-app .ed-navigation button {min-width:34px;width:34px;height:34px;border-radius:8px;color:#bfcbd2;font-size:18px}
 .ed-app .ed-navigation #ed-fit {width:55px;flex:0 0 55px;height:32px;padding:3px 5px;border:0;border-radius:7px;background:#101619;font-size:12px!important;text-align:center;color:#eef5f8}
 .ed-app .ed-navigation .ed-divider {height:18px;margin:0 2px;background:#38434a}
 .ed-app .ed-navigation .ed-shortcuts-open {margin-left:0;width:30px;min-width:30px;font-size:14px;border:1px solid #3c484f}
 .ed-app .ed-navigation button:disabled {opacity:.25}
 .ed-app .ed-toolbar {gap:3px;padding:4px;min-height:52px;border:1px solid #30393f;border-radius:12px;background:#191f23;box-shadow:0 3px 12px #0002}
 .ed-app .ed-toolbar button {height:42px;min-width:38px;flex:1;border-radius:9px;font-size:15px;color:#cbd5db}
 .ed-app .ed-toolbar button.active {color:#5ce1ed;background:#22414a;box-shadow:inset 0 0 0 1px #3c6872}
 .ed-app .ed-toolbar #ed-brush-color {width:28px;height:28px;flex:0 0 28px;border-radius:7px;overflow:hidden}
 .ed-app .ed-toolbar #ed-brush-color::-webkit-color-swatch-wrapper {padding:3px}
 .ed-app .ed-toolbar #ed-brush-color::-webkit-color-swatch {border:0;border-radius:5px}
 .ed-app .ed-toolbar #ed-brush-size {width:42px;flex:0 1 42px;min-width:26px}
 .ed-app #ed-mask-panel.ed-mask-dock {padding:4px;border:1px solid #30393f;border-radius:12px;background:#191f23}
 .ed-app .ed-mask-main-row {min-height:44px;gap:6px!important}
 .ed-app .ed-mask-dock-exit {border:0!important;background:#252e34;border-radius:8px;color:#c7d3da;min-width:42px;min-height:42px}
 .ed-app .ed-mask-colors {border:0}
 .ed-app .ed-mask-colors button {border:0!important;border-radius:9px;min-width:32px;min-height:42px;padding:4px!important}
 .ed-app .ed-mask-colors button[aria-pressed=true] {background:#34434b;box-shadow:inset 0 0 0 1px #657782}
 .ed-app .ed-mask-main-row .ed-mask-brush-label {gap:2px;font-size:10px}
 .ed-app .ed-mask-main-row .ed-mask-brush-label label {font-size:10px;color:#a5b5bf}
 .ed-app .ed-mask-main-row .ed-mask-brush-label input {width:44px!important;font-size:12px!important;text-align:right}
 .ed-app .ed-mask-settings-button {border:0!important;background:#252e34;min-width:42px;height:42px;border-radius:9px}
 .ed-app .ed-mask-settings-button:after {content:'⚙';color:#cbd5db;font-size:23px}
 .ed-app .ed-layer {touch-action:pan-y}
 .ed-app .ed-layer .ed-layer-drag-handle {flex:0 0 40px;width:40px;height:44px;font-size:23px;color:#9baeb9;background:#ffffff05;border-radius:8px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
 .ed-app .ed-layers.sorting .ed-layer-drag-handle {pointer-events:auto}
 .ed-app .ed-layer-drag-ghost {border-color:#65747e;background:#232c32;box-shadow:0 12px 32px #0008}
 .ed-app .ed-canvas-popup {max-height:min(42%,calc(100% - 190px))}
 .ed-app #ed-generation-panel {max-height:min(45%,calc(100% - 190px))!important}
 .ed-app.ed-mobile-keyboard #ed-generation-panel,.ed-app.ed-mobile-keyboard .ed-canvas-popup {max-height:100%!important}
}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app .ed-toolbar .ed-draw-size-button {flex:0 0 48px;font-size:11px;background:#101619;color:#c7d7de;border:1px solid #36434b}
 .ed-app .ed-draw-size-button[aria-expanded=true] {background:#22414a;color:#5ce1ed}
 .ed-app .ed-draw-size-popup .ed-popup-body {display:flex;align-items:center;gap:14px;padding:14px}
 .ed-app .ed-draw-size-popup #ed-brush-size {flex:1;min-width:0;width:100%;height:44px;margin:0;touch-action:pan-y}
 .ed-app .ed-draw-size-popup input[type=number] {flex:0 0 70px;width:70px;min-height:44px;text-align:center}
}
/* Center the tools; keep the larger generation button anchored to the bottom. */
.ed-app .ed-toolbar {flex:0 0 auto;align-items:center;gap:2px;padding:0 12px;min-height:76px;width:auto;background:#191d20;border:1px solid var(--ed-border);border-radius:14px;box-shadow:none}
.ed-app .ed-toolbar button {position:relative;flex:0 0 32px;min-width:32px;width:32px;height:32px;margin-bottom:0}
.ed-app .ed-toolbar .ed-region-tool {flex-basis:64px;width:64px;min-width:64px;height:64px;background:#22343c;color:#83e7ee;border:1px solid #41606b;border-radius:12px;margin-right:2px;}
.ed-app .ed-toolbar .ed-region-tool.active {background:#23505b;color:#a7f4fa;box-shadow:inset 0 0 0 1px #58939e}
.ed-region-tool svg {display:block;width:36px;height:36px;margin:auto}
.ed-app .ed-toolbar .ed-divider {margin:0 2px;flex-shrink:0}
.ed-app .ed-toolbar #ed-brush-color {align-self:center;margin-bottom:0;flex:0 0 24px;width:24px;height:24px}
.ed-app .ed-toolbar #ed-brush-size {align-self:center;margin-bottom:0;width:40px;flex:0 0 40px}
.ed-app .ed-navigation button {position:relative}
.ed-tool-key {position:absolute;bottom:1px;left:0;width:100%;font-family:inherit;font-size:7px;line-height:1.1;font-weight:500;color:#94a7b2;white-space:nowrap;pointer-events:none;background:none;padding:0;border:0}
.ed-app button:has(>.ed-tool-key) {padding-bottom:8px}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app .ed-toolbar {min-height:88px;flex:0 0 auto;gap:1px;padding:0 8px;width:auto;background:#191f23;border-color:#30393f;border-radius:12px}
 .ed-app .ed-toolbar button {height:40px;width:38px;min-width:38px;flex-basis:38px}
 .ed-app .ed-toolbar .ed-region-tool {height:40px;width:38px;min-width:38px;flex-basis:38px;border-radius:9px}
 .ed-region-tool svg {width:26px;height:26px}
 .ed-app .ed-toolbar .ed-draw-size-button {flex:0 0 44px;min-width:44px;font-size:10px}
 .ed-app .ed-tool-key {font-size:7px}
}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app .ed-canvas-popup {max-height:min(42%,calc(100% - 226px))}
 .ed-app #ed-generation-panel {max-height:min(45%,calc(100% - 226px))!important}
 .ed-app.ed-mobile-keyboard #ed-generation-panel,.ed-app.ed-mobile-keyboard .ed-canvas-popup {max-height:100%!important}
}

/* Shortcut hints stay in the control flow, without overlapping labels. */
.ed-app .ed-control-key {display:inline-block;margin-left:6px;padding:1px 3px;border:1px solid #465158;border-radius:3px;background:transparent;color:#a6b5bd;font-family:inherit;font-size:9px;line-height:1.3;white-space:nowrap;pointer-events:none}
.ed-app .ed-mask-colors button {position:relative}
.ed-app .ed-mask-colors .ed-control-key {position:absolute;right:1px;bottom:0;margin:0;padding:0 2px;border:0;background:#191d20;font-size:8px}
.ed-app .ed-mask-preview-button .ed-control-key {display:block;margin:3px 0 0;font-size:8px}
.ed-app .ed-layer-menu .ed-control-key {float:right;margin-left:16px}
.ed-app #ed-prompt-submit {display:flex;flex-direction:column;align-items:center;justify-content:center}
.ed-app #ed-prompt-submit .ed-control-key {margin:0;padding:0;border:0;font-size:7px;color:inherit}

@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app .ed-tool-key,.ed-app .ed-control-key,.ed-app button>kbd {display:none!important}
 .ed-app button:has(>.ed-tool-key) {padding-top:0;padding-bottom:0}
}

/* Keep brush labels and values readable; gesture hints sit below the sliders. */
@media (min-width:761px) {
 .ed-app .ed-mask-main-row .ed-mask-brush-field {flex:0 1 155px;min-width:140px}
 .ed-app .ed-mask-brush-field .ed-mask-brush-label {gap:8px;margin:0 0 4px!important}
 .ed-app .ed-mask-brush-field .ed-mask-brush-label label {white-space:nowrap;margin:0!important}
 .ed-app .ed-mask-brush-field .ed-mask-brush-label>span {flex-shrink:0;gap:4px;color:#8f9da6}
 .ed-app .ed-mask-brush-field>.ed-control-key {display:block;width:fit-content;margin:3px 0 0;padding:0;border:0;background:none;color:#83939e;font-size:9px;line-height:12px}
}
@media (max-width:1024px) and (pointer:coarse) {
 .ed-app .ed-mask-main-row .ed-mask-brush-field {flex:1;min-width:70px}
}

.ed-app .ed-mask-extra-actions .ed-mask-views {flex:0 1 auto;flex-wrap:wrap;max-width:100%;gap:6px}
.ed-app .ed-mask-views .ed-button {flex:0 0 auto;width:auto;min-width:max-content;box-sizing:border-box;gap:6px}
.ed-app #ed-mask-overlay>kbd {flex-shrink:0;margin:0;padding:1px 3px;border:1px solid #465158;border-radius:3px;background:transparent;color:#a6b5bd;font-family:inherit;font-size:9px;line-height:1.3;box-shadow:none}

/* Outline the active mask without changing thumbnail size or layer layout. */
.ed-app .ed-layer .ed-layer-mask-icon.active {outline:1px solid #fff;outline-offset:2px}

.ed-app .ed-layer .ed-layer-mask-icon,.ed-app .ed-layer .ed-layer-mask-icon canvas {border-radius:0!important}

.ed-app .ed-layer .ed-layer-thumb {border-radius:0}

/* Contextual, read-only mask walkthrough. Fixed positioning avoids dock clipping. */
.ed-app .ed-mask-guide-trigger {flex:0 0 28px;margin-left:auto;min-width:28px;width:28px;height:28px;padding:0;border:1px solid #60717a;border-radius:50%;color:#cad7df;font-size:16px;font-weight:600;background:#252e34;cursor:help}
.ed-app .ed-mask-guide-trigger[aria-expanded=true] {border-color:#64d8e5;color:#64d8e5}
.ed-app .ed-mask-guide {position:fixed;z-index:11000;box-sizing:border-box;width:320px;max-width:calc(100vw - 24px);overflow:auto;overscroll-behavior:contain;border:1px solid #435057;border-radius:14px;background:#1b2226;color:#e4edf2;box-shadow:0 12px 40px #0008}
.ed-app .ed-mask-guide[hidden] {display:none}
.ed-mask-guide-header,.ed-mask-guide-footer {display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px}
.ed-mask-guide-header strong {font-size:12px;font-weight:600}
.ed-app .ed-mask-guide button {width:30px;min-width:30px;height:30px;border:1px solid #3b484f;border-radius:7px;padding:0;background:#242e34;color:#dce9ef;font-size:20px;cursor:pointer}
.ed-app .ed-mask-guide button:disabled {opacity:.3;cursor:default}
.ed-mask-guide-demo {height:180px;position:relative;overflow:hidden;background:repeating-conic-gradient(#3b4248 0% 25%,#272d32 0% 50%) 50%/12px 12px}
.ed-mask-guide-demo img {display:block;width:180px;height:180px;margin:auto;object-fit:contain}
.ed-mask-guide-demo[data-example=hide] img {mask-image:radial-gradient(circle at 63% 46%,transparent 0 27%,#000 28%)}
.ed-mask-guide-demo[data-example=reveal] img {mask-image:radial-gradient(circle at 63% 46%,#000 0 32%,transparent 33%)}
.ed-mask-guide-demo[data-example=soft] img {mask-image:radial-gradient(circle at 63% 46%,#000 0 22%,transparent 52%)}
.ed-mask-guide-tint {display:none;position:absolute;top:0;left:50%;transform:translateX(-50%);width:180px;height:180px;background:radial-gradient(circle at 63% 46%,#ef354580 0 27%,transparent 28%);pointer-events:none}
.ed-mask-guide-demo[data-example=overlay] .ed-mask-guide-tint {display:block}
.ed-mask-guide-body {padding:12px 14px 4px}
.ed-mask-guide-body h3 {font-size:14px;line-height:1.4;margin:0 0 6px;color:#edf4f7}
.ed-mask-guide-body p {font-size:12px;line-height:1.55;margin:0;color:#b8c7cf}
.ed-mask-guide-shortcut {display:flex;flex-direction:column;gap:4px;margin-top:10px;font-size:10px;color:#93a9b5}
.ed-mask-guide-shortcut kbd {align-self:flex-start;padding:3px 6px;border:1px solid #42515a;border-radius:5px;background:#242d33;color:#ddebf2;font:10px/1.4 monospace}
.ed-mask-guide-footer {font-size:11px;color:#9aafb9}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app .ed-mask-guide-trigger {flex-basis:32px;min-width:32px;width:32px;height:40px;border-radius:9px}
 .ed-app .ed-mask-guide button {width:40px;min-width:40px;height:40px}
 .ed-mask-guide-shortcut {display:none}
}

.ed-mask-guide-demo[data-example=size],.ed-mask-guide-demo[data-example=hardness],.ed-mask-guide-demo[data-example=feather] {height:auto;aspect-ratio:320 / 216;background:#1b2226}
.ed-mask-guide-demo[data-example=size] img,.ed-mask-guide-demo[data-example=hardness] img,.ed-mask-guide-demo[data-example=feather] img {width:100%;height:auto;aspect-ratio:320 / 216;object-fit:contain}
.ed-mask-guide-shortcut[hidden] {display:none}

.ed-app .ed-mask-guide-trigger {display:inline-flex;align-items:center;justify-content:center;line-height:1;text-align:center;padding:0}

.ed-app .ed-navigation #ed-zoom-in {flex:none;align-self:flex-end}
.ed-app .ed-navigation #ed-fit {align-self:flex-end}

/* Keep every tool in the flex flow, with a shared lower button edge. */
.ed-app .ed-toolbar {align-items:flex-end;padding:12px;gap:4px;min-height:90px}
.ed-app .ed-toolbar .ed-region-tool {position:static;margin:0;align-self:auto}
.ed-app .ed-toolbar #ed-brush-color {align-self:flex-end;margin-bottom:4px}
.ed-app .ed-toolbar #ed-brush-size {align-self:flex-end;margin-bottom:8px}
.ed-app .ed-toolbar .ed-divider {align-self:flex-end;margin-bottom:6px}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app .ed-toolbar {padding:8px 10px;gap:clamp(4px,1.2vw,6px);min-height:58px;max-width:100%;flex-wrap:wrap;align-items:center;justify-content:center}
 .ed-app .ed-toolbar button {padding:0;display:inline-flex;align-items:center;justify-content:center}
 .ed-app .ed-toolbar button:has(>.ed-tool-key) {padding-bottom:0}
 .ed-app .ed-toolbar #ed-brush-color {align-self:center;margin:0}
 .ed-app .ed-toolbar .ed-divider {align-self:center;margin:0 2px}
}

.ed-app .ed-layer-menu button {display:flex;align-items:center;gap:10px}
.ed-layer-menu-icon {display:block;flex:0 0 18px;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.ed-layer-menu-label {flex:1;text-align:left}
.ed-app .ed-layer-menu .ed-control-key {float:none;flex-shrink:0;margin-left:8px}

.ed-app .ed-toolbar .ed-draw-icon {display:block;margin:auto;pointer-events:none}

.ed-app .ed-mask-brush-field>.ed-mouse-shortcut {display:flex;align-items:center;gap:4px}
.ed-right-mouse-icon {display:block;flex:0 0 16px;width:16px;height:19px}

/* Color Grading: isolated draft editor with a full-resolution commit. */
.ed-app .ed-grade-dialog {width:min(1060px,calc(100vw - 32px));height:min(800px,calc(100dvh - 32px));max-width:none;max-height:none;margin:auto;padding:0;color:#e3edf2;background:#13191d;border:1px solid #39474f;border-radius:18px;box-shadow:0 24px 90px #0009;overflow:hidden}
.ed-grade-dialog::backdrop {background:#05090dcc;backdrop-filter:blur(4px)}
.ed-grade-dialog[open] {display:flex;flex-direction:column}
.ed-grade-heading {display:flex;align-items:center;gap:16px;padding:14px 20px;border-bottom:1px solid #303b42;flex-shrink:0}
.ed-grade-heading strong {font-size:18px;font-weight:600;letter-spacing:-.3px}
.ed-grade-heading>span {color:#879eab;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.ed-grade-heading>.ed-button {margin-left:auto;min-width:36px;padding:0;font-size:22px!important}
.ed-grade-layout {display:grid;grid-template-columns:minmax(0,1fr) 320px;min-height:0;flex:1}
.ed-grade-preview {display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:0;padding:20px;gap:12px;background:#0c1115}
.ed-grade-preview>canvas:not(.ed-grade-histogram) {display:block;max-width:100%;max-height:calc(100% - 220px);width:auto;height:auto;object-fit:contain;background:repeating-conic-gradient(#30383e 0% 25%,#22292f 0% 50%) 50%/14px 14px}
.ed-grade-preview>canvas.picking {cursor:crosshair;outline:1px solid #73c6d3}
.ed-grade-preview-tools {display:flex;gap:8px;justify-content:center;flex-wrap:wrap;flex-shrink:0}
.ed-app .ed-grade-dialog .ed-button {background:#202a31;color:#d2e0e8;border-color:#364650!important;min-height:34px;padding:7px 10px;font-size:11px!important;cursor:pointer;white-space:normal}
.ed-app .ed-grade-dialog .ed-button:hover {background:#2b3a44}
.ed-app .ed-grade-dialog [aria-pressed=true] {background:#193a43;border-color:#428391!important;color:#a0edf4}
.ed-app .ed-grade-dialog .ed-button:disabled {opacity:.45;cursor:wait}
.ed-grade-controls {overflow:auto;overscroll-behavior:contain;min-height:0;padding:16px;border-left:1px solid #303b42;scrollbar-width:thin;scrollbar-color:#465963 transparent}
.ed-grade-actions {display:flex;gap:5px;margin-bottom:12px}
.ed-grade-actions>.ed-button {flex:1}
.ed-grade-presets {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-bottom:14px}
.ed-grade-note {font-size:11px;line-height:1.55;color:#8fa4b1;margin:8px 0}
.ed-grade-group {border-top:1px solid #2d3941;padding:12px 0}
.ed-grade-group>summary {cursor:pointer;color:#cbdce6;font-size:12px;font-weight:600;list-style-position:inside;user-select:none}
.ed-grade-field {margin-top:12px}
.ed-grade-field>div {display:flex;align-items:center;justify-content:space-between;gap:12px}
.ed-app .ed-grade-field label {font-size:11px;margin:0;min-width:0;color:#b6cbd7}
.ed-app .ed-grade-field input[type=number] {width:65px;min-width:65px;height:28px;background:#0e151a;color:#d3e6ef;border:1px solid #354751;border-radius:5px;padding:2px 4px;text-align:right;font-size:11px;box-shadow:none}
.ed-app .ed-grade-field input[type=range] {display:block;width:100%;margin:5px 0 0;height:22px;cursor:pointer}
.ed-grade-field input:focus-visible,.ed-grade-dialog button:focus-visible {outline:2px solid #7595a6;outline-offset:2px}
.ed-grade-histogram {width:min(256px,100%);height:64px;border:1px solid #2d3d46;border-radius:6px;background:#11191f;flex-shrink:0}
.ed-grade-status {font-size:11px;color:#8cbdcc;margin:0;min-height:16px}
.ed-grade-footer {display:flex;align-items:center;gap:10px;flex-shrink:0;padding:12px 20px;border-top:1px solid #303b42}
.ed-grade-footer>.ed-button:first-child {margin-right:auto}
.ed-app .ed-grade-footer>.ed-grade-apply {background:#245564;color:#d3f8fc;border-color:#428796!important}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app .ed-grade-dialog {width:calc(100vw - 12px);height:calc(100dvh - 12px);border-radius:12px}
 .ed-grade-heading {padding:8px 12px;gap:8px}
 .ed-grade-heading strong {font-size:15px}
 .ed-grade-layout {display:flex;flex-direction:column}
 .ed-grade-preview {padding:8px;gap:6px;flex:0 0 32%;min-height:160px}
 .ed-grade-preview>canvas:not(.ed-grade-histogram) {max-height:calc(100% - 65px);max-width:100%}
 .ed-grade-preview .ed-grade-note,.ed-grade-histogram {display:none}
 .ed-grade-preview-tools {gap:5px}
 .ed-grade-controls {border-left:0;border-top:1px solid #303b42;padding:12px;flex:1}
 .ed-app .ed-grade-dialog .ed-button {min-height:40px}
 .ed-app .ed-grade-field input[type=number] {height:36px;font-size:16px}
 .ed-app .ed-grade-field input[type=range] {height:36px;touch-action:pan-y}
 .ed-grade-footer {padding:8px;gap:6px}
}

/* Draggable tools retain their layout slot and stay inside the stage. */
.ed-app .ed-toolbar {position:relative;touch-action:none;z-index:5}
.ed-app .ed-toolbar .ed-toolbar-grip {position:absolute;top:-10px;left:50%;transform:translateX(-50%);width:36px;min-width:36px;height:20px;padding:0;display:flex;align-items:center;justify-content:center;background:var(--ed-panel);border:1px solid var(--ed-border);border-radius:6px;color:var(--ed-muted);cursor:grab;touch-action:none;font-size:16px;line-height:1}
.ed-app .ed-toolbar-dragging,.ed-app .ed-toolbar-dragging .ed-toolbar-grip {cursor:grabbing;user-select:none}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app .ed-shortcuts-open {display:none!important}
 .ed-app .ed-toolbar .ed-toolbar-grip {height:24px;top:-12px;width:44px;min-width:44px}
}

/* Navigation stays at the foot; desktop tools float over the canvas. */
.ed-app .ed-navigation {order:10;margin-top:auto}
.ed-app .ed-toolbar {position:absolute;bottom:calc(100% + 12px);left:50%;translate:-50% 0;width:max-content;max-width:calc(100% - 24px)}
.ed-app .ed-toolbar .ed-toolbar-grip {position:static;transform:none;flex:0 0 20px;width:20px;min-width:20px;height:32px;margin-right:4px;align-self:center;background:transparent;border:0;border-right:1px solid var(--ed-border);border-radius:0;color:#8b979e;font-size:20px}
.ed-app .ed-toolbar .ed-toolbar-grip:hover {color:#e0e8ed;background:#ffffff08}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app .ed-toolbar {position:static;translate:none;transform:none!important;order:0;max-width:100%;touch-action:auto}
 .ed-app .ed-toolbar .ed-toolbar-grip {display:none}
 .ed-app .ed-navigation {order:10}
}

.ed-app .ed-navigation input#ed-fit:focus,
.ed-app .ed-navigation input#ed-fit:focus-visible {outline:none;box-shadow:none;border-color:#626b72}

/* Mask tools share the desktop drag handle and keep a separate saved position. */
.ed-app #ed-mask-panel.ed-mask-dock {bottom:calc(100% + 12px);transform:none;translate:-50% 0;z-index:5}
.ed-app #ed-mask-panel .ed-toolbar-grip {position:static;flex:0 0 20px;width:20px;min-width:20px;height:32px;padding:0;display:flex;align-items:center;justify-content:center;align-self:center;background:transparent;border:0;border-right:1px solid var(--ed-border);border-radius:0;color:#8b979e;font-size:20px;line-height:1;cursor:grab;touch-action:none}
.ed-app #ed-mask-panel .ed-toolbar-grip:hover {color:#e0e8ed;background:#ffffff08}
.ed-app #ed-mask-panel.ed-toolbar-dragging,.ed-app #ed-mask-panel.ed-toolbar-dragging .ed-toolbar-grip {cursor:grabbing;user-select:none}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app #ed-mask-panel.ed-mask-dock {position:static;bottom:auto;translate:none;transform:none!important}
 .ed-app #ed-mask-panel .ed-toolbar-grip {display:none}
}

.ed-app #ed-mask-feather-value {white-space:nowrap;flex-shrink:0}
.ed-app .ed-mask-main-row .ed-mask-dock-field:has(#ed-mask-feather) {min-width:145px;flex-basis:145px}

/* Compact generation composer: references, prompt, then controls and action. */
.ed-app #ed-generation-panel {width:680px;max-width:calc(100% - 24px);padding:16px 20px;background:linear-gradient(135deg,#17191b,#1e2123);border:1px solid #353a3e;border-radius:20px}
.ed-app #ed-generation-panel .ed-generation-heading {margin-bottom:8px}
.ed-app #ed-generation-panel #ed-prompt-form {display:flex;flex-direction:column;gap:12px}
.ed-generation-references {display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-right:24px}
.ed-app #ed-generation-panel #ed-reference-add {flex:0 0 52px;width:52px;height:52px;border:1px dashed #53595e;border-radius:10px;background:#ffffff08;color:#bec6cc;font-size:22px}
.ed-app #ed-generation-panel .ed-reference-list {display:flex;flex-wrap:wrap;margin:0;gap:8px}
.ed-app #ed-generation-panel #ed-reference-count {font-size:11px;color:var(--ed-muted)}
.ed-app #ed-generation-panel #ed-prompt {background:transparent;border:1px solid #454b50;border-radius:8px;padding:8px 10px;height:68px;min-height:68px;box-shadow:none;resize:vertical}
.ed-app #ed-generation-panel #ed-prompt:focus {border-color:#656b70;outline:none;box-shadow:none}
.ed-app #ed-generation-panel .ed-generation-footer {display:flex;align-items:flex-end;justify-content:space-between;gap:14px}
.ed-generation-controls {display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
.ed-app #ed-generation-panel .ed-generation-controls select {width:auto;max-width:100%;height:38px;min-height:38px;margin:0;padding:6px 26px 6px 12px;border:1px solid #393e42;border-radius:12px;background-color:#17191b;font-size:12px;color:#f3f4f6;outline:none;box-shadow:none}
.ed-app #ed-generation-panel .ed-generation-controls select:focus {border-color:#69727a;outline:none;box-shadow:none}
.ed-app #ed-generation-panel #ed-model {max-width:220px}
.ed-app #ed-generation-panel #ed-quality-label {margin:0;min-width:0}
.ed-option-label {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.ed-app #ed-generation-panel #ed-prompt-submit {position:static;display:flex;flex-direction:column;gap:5px;flex:0 0 156px;width:156px;height:76px;margin:0;padding:12px;border:0;border-radius:14px;background:linear-gradient(120deg,#598ff3 0%,#46ddf5 48%,#50fed1 100%);background-color:#e6e6e6;background-blend-mode:multiply;color:#062b33;font-size:15px;font-weight:600;white-space:nowrap;transition:background-color .2s,opacity .2s}
.ed-app #ed-generation-panel #ed-prompt-submit:hover:not(:disabled) {background-color:#fff}
.ed-generation-price {font-size:12px;font-weight:500}
.ed-generation-info {margin-top:12px;font-size:10px;color:var(--ed-muted)}
.ed-app #ed-generation-panel .ed-reference-help {font-size:10px}
.ed-app #ed-generation-panel .ed-prompt-caption {margin-top:8px;padding-top:8px}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app #ed-generation-panel {width:100%;max-width:100%;padding:10px 12px;border-radius:14px}
 .ed-app #ed-generation-panel .ed-generation-footer {flex-wrap:wrap;gap:10px}
 .ed-app #ed-generation-panel .ed-generation-controls {width:100%;gap:6px}
 .ed-app #ed-generation-panel .ed-generation-controls select {min-height:44px;font-size:12px}
 .ed-app #ed-generation-panel #ed-model {max-width:100%;flex:1}
 .ed-app #ed-generation-panel #ed-prompt-submit {flex:1 0 100%;width:100%;height:48px;flex-direction:row;gap:10px}
 .ed-app #ed-generation-panel #ed-reference-add {width:44px;height:44px;flex-basis:44px}
}

.ed-app #ed-generation-panel {width:520px}
.ed-app #ed-generation-panel #ed-prompt {resize:none;height:76px;min-height:76px;max-height:76px;overflow-y:auto;flex-shrink:0}
.ed-app #ed-generation-panel .ed-generation-references {gap:8px;padding-right:0}
.ed-app #ed-generation-panel .ed-reference-list {display:contents}
.ed-app #ed-generation-panel .ed-reference-list:empty {display:none}
.ed-app #ed-generation-panel .ed-crop-reference canvas {display:block;width:100%;height:100%}
.ed-app #ed-generation-panel #ed-reference-add {width:54px;height:54px;flex-basis:54px}
.ed-app #ed-generation-panel .ed-generation-controls #ed-model {background:#17191b;border-color:#393e42;color:#f3f4f6}
.ed-app #ed-generation-panel #ed-reference-help {margin:0;font-size:10px;line-height:1.4}
.ed-app #ed-generation-panel #ed-prompt-submit {flex-basis:130px;width:130px}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app #ed-generation-panel {width:100%}
 .ed-app #ed-generation-panel #ed-prompt-submit {flex-basis:100%;width:100%}
}

.ed-app #ed-generation-panel {width:660px}
.ed-app #ed-generation-panel #ed-prompt-form {display:grid;grid-template-columns:minmax(0,1fr) 130px;gap:10px 14px}
.ed-app #ed-generation-panel .ed-generation-references,.ed-app #ed-generation-panel #ed-reference-help {grid-column:1 / -1}
.ed-app #ed-generation-panel #ed-prompt {grid-column:1;grid-row:3;height:80px;min-height:80px;max-height:80px;width:100%}
.ed-app #ed-generation-panel .ed-generation-footer {display:contents}
.ed-app #ed-generation-panel .ed-generation-controls {grid-column:1;grid-row:4;flex-wrap:wrap}
.ed-app #ed-generation-panel .ed-generation-controls #ed-model {width:100%;max-width:none;flex:1 0 200px;min-width:200px}
.ed-app #ed-generation-panel #ed-prompt-submit {grid-column:2;grid-row:3 / 5;align-self:end}
.ed-crop-selection-icon {position:absolute;inset:9px;width:34px;height:34px;color:#00d5ed;filter:drop-shadow(0 1px 3px #000);pointer-events:none}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app #ed-generation-panel {width:100%}
 .ed-app #ed-generation-panel #ed-prompt-form {grid-template-columns:minmax(0,1fr)}
 .ed-app #ed-generation-panel #ed-prompt,.ed-app #ed-generation-panel .ed-generation-controls {grid-column:1}
 .ed-app #ed-generation-panel #ed-prompt-submit {grid-column:1;grid-row:5;width:100%}
 .ed-app #ed-generation-panel .ed-generation-controls #ed-model {min-width:0;flex-basis:100%;width:100%}
}

.ed-app #ed-generation-panel #ed-prompt-form {grid-template-columns:minmax(0,1fr) 190px}
.ed-app #ed-generation-panel #ed-prompt-submit {width:190px;flex-basis:190px;flex-direction:row;gap:8px;white-space:nowrap}
.ed-app #ed-generation-panel .ed-generation-controls #ed-model {flex:0 0 auto;width:220px;min-width:0;max-width:100%}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app #ed-generation-panel #ed-prompt-form {grid-template-columns:minmax(0,1fr)}
 .ed-app #ed-generation-panel #ed-prompt-submit {width:100%;flex-basis:100%}
 .ed-app #ed-generation-panel .ed-generation-controls #ed-model {flex:0 0 auto;width:220px;min-width:0;max-width:100%}
}

.ed-app #ed-generation-panel .ed-generation-controls {flex-wrap:nowrap;gap:6px}
.ed-app #ed-generation-panel .ed-generation-controls #ed-model {flex:1 1 160px;width:160px;min-width:0;max-width:180px}
.ed-app #ed-generation-panel .ed-generation-controls select {padding-left:8px;padding-right:20px;font-size:11px}
.ed-app #ed-generation-panel #ed-quality-label {flex:0 1 116px;min-width:0}
.ed-app #ed-generation-panel #ed-quality {width:100%;min-width:0}
.ed-app #ed-generation-panel #ed-resolution {flex:0 0 58px;width:58px}

.ed-app #ed-generation-panel #ed-prompt-submit .ed-generation-price {font-size:inherit;font-weight:inherit;line-height:inherit}

/* Same button and menu design as image generation, scoped to Edit. */
.ed-app #ed-generation-panel .ed-generation-drop-btn {display:flex;align-items:center;font-size:14px;font-weight:500;height:40px;padding:0 15px;border-radius:12px;background:#171717;border:1px solid #333;color:white;white-space:nowrap;min-width:0;max-width:100%}
.ed-app #ed-generation-panel .ed-generation-counter {display:flex;flex:0 0 auto;gap:10px;align-items:center;justify-content:center;height:40px;padding:0 12px;background:#171717;border:1px solid #333;border-radius:12px;font-size:14px;font-weight:500;white-space:nowrap}
.ed-app #ed-generation-panel .ed-generation-counter button {display:flex;align-items:center;justify-content:center;min-width:20px;width:20px;height:36px;padding:0;background:none;border:0;border-radius:4px;color:#fff;font-size:22px;line-height:1}
.ed-generation-counter output {display:inline-block;min-width:2ch;margin:0;padding:0;color:inherit;font-size:inherit;font-weight:inherit;font-variant-numeric:tabular-nums;text-align:right}
.ed-generation-count-limit {color:#b1b7bd}
.ed-app #ed-generation-panel .ed-generation-counter button:focus-visible {outline:1px solid #777;outline-offset:1px;box-shadow:none}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app #ed-generation-panel .ed-generation-counter {height:44px;gap:6px;padding:0 4px}
 .ed-app #ed-generation-panel .ed-generation-counter button {width:36px;min-width:36px;height:42px}
}
.ed-app #ed-generation-panel .ed-generation-drop-btn[data-select="ed-model"] {padding-right:0;flex:0 1 auto;max-width:230px}
.ed-generation-drop-btn>span {overflow:hidden;text-overflow:ellipsis}
.ed-generation-drop-btn .icon {width:18px;height:18px;flex-shrink:0;margin:0 8px}
.ed-app #ed-generation-panel #ed-quality-label {flex:0 1 auto}
.ed-app .ed-generation-drop-btn:focus-visible,.ed-app .ed-drop-option:focus-visible {outline:1px solid #777;outline-offset:1px;box-shadow:none}
.ed-app .ed-generation-drop-menu {position:fixed;z-index:1000;background:#222;border:1px solid #444;border-radius:12px;overflow:auto;padding:8px;box-shadow:0 8px 30px #0005;color:white}
.ed-drop-header {padding:10px 12px 6px;font-size:11px;font-weight:600;color:#888;text-transform:uppercase;letter-spacing:.5px;border-bottom:1px solid #333;margin-bottom:4px}
.ed-app .ed-drop-option {display:flex;align-items:flex-start;gap:12px;padding:10px 12px;margin-top:4px;border-radius:10px;width:100%;text-align:left;font-size:14px;font-weight:500;line-height:1.3}
.ed-app .ed-drop-option:hover {background:#ffffff0d}
.ed-app .ed-drop-option[aria-checked="true"] {background:#ffffff14}
.ed-drop-model-icon {flex:0 0 36px;width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;background:#ffffff0f}
.ed-drop-model-icon .icon {width:18px;height:18px;display:block}
.ed-drop-info {min-width:0;white-space:normal}
.ed-drop-info small {display:block;color:#ffffff73;font-size:12px;line-height:1.3;margin-top:3px}

.ed-app #ed-generation-panel {width:560px}
.ed-app #ed-generation-panel .ed-generation-controls {flex-wrap:wrap}
@media (max-width:760px), (max-width:1024px) and (pointer:coarse) {
 .ed-app #ed-generation-panel {width:100%}
}

.ed-mask-dock-field:has(#ed-mask-expand) {min-width:120px}
#ed-mask-expand-value {white-space:nowrap;flex-shrink:0}
.ed-app .ed-editor-close {margin-left:auto;width:30px;height:30px;flex-shrink:0;padding:0;display:grid;place-items:center;line-height:1;color:var(--ed-muted);border:1px solid var(--ed-border);border-radius:7px;background:transparent}
.ed-editor-close svg {display:block}
.ed-app .ed-mask-colors {border-right:0;padding-right:0}
.ed-app .ed-mask-main-row .ed-mask-dock-field {display:grid;grid-template-rows:24px 20px 19px;align-items:center;row-gap:4px}
.ed-app .ed-mask-main-row .ed-mask-dock-field[hidden] {display:none}
.ed-app .ed-mask-main-row .ed-value-label,.ed-app .ed-mask-main-row .ed-mask-brush-label {display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0!important;white-space:nowrap}
.ed-app .ed-mask-main-row .ed-mask-dock-field>input[type=range] {margin:0;width:100%;align-self:center}
.ed-app .ed-mask-main-row .ed-mask-dock-field>.ed-control-key {margin:0}
.ed-app .ed-has-generation-mask .ed-mask-main-row .ed-mask-dock-field:has(#ed-mask-hardness) {position:relative;border-right:0;padding-right:0;margin-right:20px;min-width:130px}
.ed-app .ed-has-generation-mask .ed-mask-main-row .ed-mask-dock-field:has(#ed-mask-hardness)::after {content:"";position:absolute;right:-18px;top:0;bottom:0;width:1px;background:var(--ed-border);pointer-events:none}
.ed-layer>.ed-layer-spinner {display:block;box-sizing:border-box;width:14px;min-width:14px;max-width:14px;height:14px;flex:0 0 14px;margin-left:auto;border:2px solid #ffffff30;border-top-color:#d1d5db;border-radius:50%;animation:ed-spin .8s linear infinite}
.ed-layer>.ed-layer-failed {flex:0 0 auto;width:auto;min-width:0;margin-left:auto;padding:3px 6px;border-radius:4px;background:#b75e5e1c;color:#e5a5a5;font-size:10px;font-weight:600;line-height:1.4;white-space:nowrap}
.ed-app .ed-layer-menu {width:310px;max-width:calc(100vw - 16px)}
.ed-app .ed-layer-menu-label {min-width:0;white-space:normal;line-height:1.4}
.ed-app .ed-toolbar {flex-wrap:wrap;justify-content:center}
.ed-app .ed-toolbar .ed-region-tool {display:flex;align-items:center;justify-content:center;width:56px;min-width:56px;height:56px;flex:0 0 56px}
.ed-app .ed-region-tool .ed-region-icon {width:36px;height:36px;flex-shrink:0}
.ed-app .ed-mask-main-row .ed-mask-dock-field.ed-mask-brush-field {min-width:100px;flex:1 1 110px}
.ed-app .ed-mask-main-row .ed-mask-dock-field:has(#ed-mask-feather) {min-width:110px;flex-basis:110px}
.ed-app .ed-toolbar #ed-brush-size {width:92px;flex-basis:92px}
.ed-draw-size-value {display:flex;align-items:center;gap:4px;color:var(--ed-muted);font-size:11px;align-self:center}
.ed-app .ed-toolbar .ed-draw-size-value {align-self:flex-end;margin-bottom:3px}
.ed-app .ed-draw-size-value input {width:42px!important;min-width:0;height:27px;padding:3px!important;text-align:right;border:1px solid var(--ed-border)!important;box-shadow:none!important;outline:0}
/* Whole-canvas composer follows /image/generation, scoped to its own mode. */
.ed-app .ed-canvas-generate {display:flex;align-items:center;justify-content:center;gap:10px;width:100%;margin:0 0 14px;min-height:42px;background:#1a252b;border-color:#384b55;color:#d7e8ee}
.ed-app .ed-canvas-generate .icon {width:18px;height:18px;flex:0 0 18px}
.ed-app .ed-canvas-generate[aria-expanded=true] {background:#25363d;border-color:#59717c}
.ed-app #ed-generation-panel.ed-generation-canvas {position:absolute;left:50%;top:auto;bottom:58px;translate:-50% 0;width:960px;max-width:calc(100% - 36px);max-height:calc(100% - 82px);padding:18px;border-radius:22px;background:linear-gradient(227deg,rgba(32,32,32,.99),rgba(17,17,17,.99));border:1px solid #333c;box-shadow:0 20px 60px #0008;z-index:6}
.ed-app #ed-generation-panel.ed-generation-canvas #ed-prompt-form {display:flex;flex-direction:column;gap:10px}
.ed-app #ed-generation-panel.ed-generation-canvas #ed-prompt {height:82px;min-height:82px;max-height:82px;font-size:15px;line-height:1.6;padding:8px 4px}
.ed-app #ed-generation-panel.ed-generation-canvas .ed-generation-footer {display:flex;align-items:center;gap:16px;justify-content:space-between;margin-top:8px}
.ed-app #ed-generation-panel.ed-generation-canvas .ed-generation-controls {flex-wrap:wrap;gap:10px}
.ed-app #ed-generation-panel.ed-generation-canvas #ed-prompt-submit {flex:0 0 auto;width:auto;min-width:190px;height:54px;padding:14px 24px;align-self:auto}
.ed-app #ed-generation-panel.ed-generation-canvas .ed-generation-info {display:inline-block;margin-top:12px}
.ed-app #ed-generation-panel.ed-generation-canvas .ed-prompt-caption {border:0;padding:0;margin-top:4px}
.ed-app .ed-generation-canvas .ed-crop-selection-icon {display:none}
.ed-app.ed-canvas-composing .ed-toolbar {visibility:hidden;pointer-events:none}
@media(max-width:760px),(max-width:1024px) and (pointer:coarse) {
 .ed-app #ed-generation-panel.ed-generation-canvas {position:relative;left:auto;top:auto;bottom:auto;translate:none;order:1;width:100%;max-width:100%;max-height:65%!important;padding:12px;border-radius:12px;flex:0 1 auto;box-shadow:none}
 .ed-app #ed-generation-panel.ed-generation-canvas #ed-prompt {height:64px;min-height:64px;max-height:64px;font-size:16px}
 .ed-app #ed-generation-panel.ed-generation-canvas .ed-generation-footer {flex-wrap:wrap;gap:10px;margin-top:0}
 .ed-app #ed-generation-panel.ed-generation-canvas #ed-prompt-submit {width:100%;min-width:0;min-height:48px;height:48px;flex:1 0 100%}
 .ed-app.ed-canvas-composing .ed-toolbar {display:none}
 .ed-app.ed-mobile-keyboard #ed-generation-panel.ed-generation-canvas {max-height:100%!important;flex:1}
}

/* Neutral sliders throughout Edit, including dynamically created grading controls.
   The clipped thumb shadow follows the native value, including keyboard/programmatic updates. */
.ed-app input[type=range] {appearance:none;-webkit-appearance:none;min-height:16px;padding:0;border:0;background:transparent;overflow:hidden;cursor:pointer}
.ed-app input[type=range]::-webkit-slider-runnable-track {height:2px;border:0;border-radius:2px;background:#000}
.ed-app input[type=range]::-webkit-slider-thumb {appearance:none;-webkit-appearance:none;box-sizing:border-box;width:14px;height:14px;margin-top:-6px;border:2px solid #808080;border-radius:50%;background:#000;box-shadow:-100vmax 0 0 100vmax #808080;clip-path:path('M .072 6 H -10000 V 8 H .072 A 7 7 0 1 0 .072 6 Z')}
.ed-app input[type=range]::-moz-range-track {height:2px;border:0;border-radius:2px;background:#000}
.ed-app input[type=range]::-moz-range-progress {height:2px;border-radius:2px;background:#808080}
.ed-app input[type=range]::-moz-range-thumb {box-sizing:border-box;width:14px;height:14px;border:2px solid #808080;border-radius:50%;background:#000}
.ed-app input[type=range]:focus-visible {outline:1px solid #808080;outline-offset:3px}
.ed-app input[type=range]:disabled {opacity:.4;cursor:not-allowed}
@media(max-width:760px),(max-width:1024px) and (pointer:coarse) {
 .ed-app .ed-toolbar .ed-region-tool {width:40px;min-width:40px;height:40px;flex-basis:40px}
 .ed-app .ed-region-tool .ed-region-icon {width:28px;height:28px}
 .ed-app .ed-mask-main-row .ed-mask-dock-field {grid-template-rows:24px 20px;row-gap:0}
 .ed-app .ed-toolbar {max-width:100%;gap:4px;padding:8px;box-sizing:border-box;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-areas:"region select pan draw arrow erase" "text color size size size size"}
 .ed-app .ed-toolbar .ed-divider {display:none}
 .ed-app .ed-toolbar .ed-region-tool {grid-area:region;justify-self:center}
 .ed-app .ed-toolbar [data-mode=select] {grid-area:select}
 .ed-app .ed-toolbar [data-mode=pan] {grid-area:pan}
 .ed-app .ed-toolbar [data-mode=draw] {grid-area:draw}
 .ed-app .ed-toolbar [data-mode=arrow] {grid-area:arrow}
 .ed-app .ed-toolbar [data-mode=erase] {grid-area:erase}
 .ed-app .ed-toolbar #ed-add-text {grid-area:text}
 .ed-app .ed-toolbar #ed-brush-color {grid-area:color;justify-self:center}
 .ed-app .ed-toolbar .ed-draw-size-button {grid-area:size;width:100%}
 .ed-app .ed-draw-size-popup .ed-draw-size-value input {height:40px;width:64px!important}
}
