@font-face{font-family:WorkbenchPixel;src:url('fonts/Tiny5.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}
/* Recovery stays visible without competing with the canvas or side banners. */
.recovery-notice{display:flex;align-items:center;gap:8px;padding:5px 8px;background:#eed69b;border-block:2px solid #968275;flex-shrink:0;font-size:18px}
.recovery-notice>span{flex:1;min-width:0}.recovery-notice button{font-size:16px}
.statusbar .autosave-status{font-size:16px;min-height:22px;padding:0 5px;flex-shrink:0}
.recovery-error{color:#8a241f!important}
#recovery-dialog{width:680px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:0}
#recovery-dialog .dialog-title{margin:0;position:sticky;top:0;z-index:1}
#recovery-dialog .dialog-content{padding:12px 16px}#recovery-dialog p{overflow-wrap:anywhere}
.recovery-toolbar,.recovery-item-actions{display:flex;gap:6px;flex-wrap:wrap}.recovery-toolbar button,.recovery-item-actions button{font-size:18px}
#recovery-list{max-height:300px;overflow:auto;border:2px solid #554d4a;background:#eee5d8}
.recovery-item{padding:10px 12px;border-bottom:2px solid #b9a99c}.recovery-item:last-child{border-bottom:0}
.recovery-item h2{font-size:22px;margin:0;overflow-wrap:anywhere}.recovery-item p{margin:5px 0}.recovery-item-actions{margin-top:8px}
.recovery-empty{padding:12px}.recovery-item-actions button:first-child{background:#adbfaa}
.recovery-delete-confirm{padding:8px;margin-top:8px;border:2px solid #8a3a27;background:#f5ddc5}.recovery-delete-confirm button{margin-right:6px;font-size:18px}
@media(max-width:480px){.statusbar .autosave-status{font-size:14px;padding-inline:2px}.recovery-notice{font-size:16px}#recovery-dialog .dialog-content{padding:10px}#recovery-list{max-height:220px}}
:root{color-scheme:light;--face:#d3cbbe;--hot:#faf0e6;--ink:#171319;--edge:#554d4a;--shade:#968275;--light:#fff6e9;--active:#7d929e;--active-light:#99b3c2;--workspace:#655561;--timeline:#c6c6c6;--left:176px;--tools:40px;--timeline-height:188px;--layer-width:244px;font:20px/1.15 WorkbenchPixel,"Courier New",monospace;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;height:100dvh;display:flex;flex-direction:column;overflow:hidden;background:var(--face);color:var(--ink)}[hidden]{display:none!important}button,input,select,summary{font:inherit;color:inherit}button,select{border:2px solid var(--edge);border-radius:0;background:var(--face);box-shadow:inset 2px 2px var(--light),inset -2px -2px var(--shade);min-height:26px;padding:1px 7px;cursor:pointer}button:hover:not(:disabled),select:hover{background:var(--hot)}button:active:not(:disabled),button[aria-pressed=true]{box-shadow:inset 2px 2px #536069,inset -2px -2px #b1c3cd;background:var(--active);color:white}button:disabled{cursor:default;color:#8b7d73}button:focus-visible,input:focus-visible,summary:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:2px solid #ffff7d;outline-offset:-3px}input:disabled{opacity:.45}button{white-space:nowrap}.pixel-icon{width:20px;height:20px;display:block;fill:currentColor;flex-shrink:0}button:disabled .pixel-icon{opacity:.55}kbd{font:16px WorkbenchPixel,monospace;white-space:nowrap}p{margin:10px 0}.secondary{font-size:16px;color:#574f4d}strong{font-weight:400}select{appearance:none;padding-right:23px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0h12v2H2v2h8v2H4v2h4V6H4V4H2V2H0z' fill='%23332e31'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 5px center;max-width:100%}
.menubar{height:30px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 7px;border-top:2px solid var(--light);z-index:30}.menubar nav{display:flex;height:100%}.application-name{font-size:16px;color:#655561;padding-right:4px;white-space:nowrap}.app-menu{position:relative}.app-menu>summary{list-style:none;padding:2px 9px;height:100%;cursor:pointer}.app-menu>summary::-webkit-details-marker{display:none}.app-menu[open]>summary,.app-menu>summary:hover{background:#ffebb6}.menu-popup{position:absolute;left:0;top:100%;min-width:260px;padding:5px;background:var(--face);border:2px solid #302b2f;box-shadow:inset 2px 2px var(--light),inset -2px -2px var(--shade),4px 4px #0005;z-index:40}.menu-command{display:flex;align-items:center;justify-content:space-between;gap:24px;width:100%;text-align:left;border:0;box-shadow:none;min-height:30px;padding:3px 11px}.menu-command:hover:not(:disabled){background:#ffebb6}.menu-command:active:not(:disabled){background:var(--active);box-shadow:none}.menu-separator{border-top:2px solid var(--shade);border-bottom:2px solid var(--light);margin:4px 5px}.menu-note{display:block;padding:8px 11px;font-size:16px;color:#655561;max-width:265px}.menu-check{display:flex;gap:8px;align-items:center;padding:6px 11px;cursor:pointer}.menu-check:hover{background:#ffebb6}
.tabsbar{height:36px;display:flex;align-items:flex-end;gap:4px;flex-shrink:0;padding:1px 8px 0;border-bottom:4px solid var(--active);position:relative;z-index:20}.home-tab{width:40px;height:29px;border-bottom:0;padding:3px 8px}.document-tab{height:30px;min-width:190px;max-width:350px;background:var(--active);color:white;display:flex;align-items:center;gap:8px;padding:3px 16px 0 10px;border:2px solid var(--edge);border-bottom:0;box-shadow:inset 2px 2px #b4c6ce;clip-path:polygon(0 6px,4px 6px,4px 2px,8px 2px,8px 0,calc(100% - 6px) 0,calc(100% - 6px) 4px,100% 4px,100% 100%,0 100%)}#filename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#dirty{font-family:monospace;font-size:12px;color:#dce7ed}#dirty.unsaved{color:#ffff7d}.tab-fill{flex:1}.tabsbar select{font-size:16px;height:27px;min-height:27px;margin-bottom:2px;width:168px}
.contextbar{height:40px;flex-shrink:0;display:flex;align-items:center;border-bottom:2px solid var(--shade);box-shadow:inset 0 2px var(--light);padding:4px 5px;gap:10px}.palette-actions{width:calc(var(--left) - 6px);flex-shrink:0;display:flex;align-items:center;gap:4px}.palette-actions button{width:30px;height:28px;padding:2px 3px}.palette-actions>span{margin-left:4px}.brush-context{display:flex;align-items:center;gap:12px;min-width:0}.brush-context label{display:flex;align-items:center;gap:6px;white-space:nowrap}.bar-divider{width:4px;height:24px;border-left:2px solid var(--shade);border-right:2px solid var(--light)}#tool-hint{min-width:79px}.brush-size input{width:60px}.brush-size output{min-width:38px}.alpha-context input{width:94px}.alpha-context output{width:31px;text-align:right}.quick-actions{margin-left:auto;display:flex;gap:3px;align-items:center}.quick-actions button{height:28px;padding:2px 5px}.quick-actions .pixel-icon{width:17px;height:17px}
input[type=range]{appearance:none;height:20px;border:2px solid var(--edge);border-radius:0;background:var(--active);box-shadow:inset 1px 1px #536069;margin:0;cursor:pointer;min-width:0}input[type=range]::-webkit-slider-thumb{appearance:none;width:8px;height:20px;border:2px solid #302b2f;background:var(--face);box-shadow:inset 1px 1px #fff}input[type=range]::-moz-range-thumb{width:6px;height:16px;border:2px solid #302b2f;border-radius:0;background:var(--face)}input[type=checkbox]{appearance:none;width:16px;height:16px;display:inline-grid;place-content:center;border:2px solid #413b3d;background:#faf0e6;box-shadow:inset 2px 2px #a39789;cursor:pointer;margin:0}input[type=checkbox]:checked::after{content:'';width:8px;height:8px;background:var(--ink)}
.workspace{display:grid;grid-template-columns:var(--left) minmax(0,1fr) var(--tools);grid-template-rows:minmax(0,1fr) var(--timeline-height);min-height:0;flex:1;padding:0 4px}.color-panel{grid-column:1;grid-row:1/3;padding:4px 6px 4px 2px;display:flex;flex-direction:column;min-height:0}.palette-well{background:var(--workspace);border:2px solid #302b2f;box-shadow:inset 2px 2px #413b47;min-height:80px;flex:1;overflow:auto}.palette{padding:4px;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));align-content:start;gap:0}.swatch{border:1px solid #2e272d;background:var(--swatch);padding:0;box-shadow:none;min-height:24px;aspect-ratio:1;position:relative}.swatch:hover:not(:disabled){background:var(--swatch);box-shadow:inset 0 0 0 2px #faf0e6}.swatch.active{z-index:1;outline:2px solid #ffff7d;outline-offset:-3px;box-shadow:inset 0 0 0 4px #000}.swatch.transparent{background:repeating-conic-gradient(#dedede 0 25%,#8e8e8e 0 50%) 0 0/8px 8px}.color-picker{margin-top:7px;display:flex;flex-direction:column;gap:5px}.sv-picker{height:100px;border:2px solid #302b2f;position:relative;touch-action:none;cursor:crosshair;background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,transparent),hsl(var(--hue,40) 100% 50%);box-shadow:0 1px #fff6e9}.sv-picker[aria-disabled=true]{opacity:.5;cursor:default}#sv-marker{position:absolute;width:7px;height:7px;border:1px solid white;outline:1px solid black;transform:translate(-50%,-50%);left:48%;top:0;pointer-events:none}input.hue{height:18px;width:100%;background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red);border:2px solid #302b2f}input.hue::-webkit-slider-thumb{height:18px;background:transparent;border-color:white;box-shadow:0 0 0 1px black;width:5px}.foreground{height:29px;background:var(--paint,#ffda85);color:var(--paint-contrast,#000);position:relative;border:2px solid #302b2f;box-shadow:inset 2px 2px #ffffff70,inset -2px -2px #0004;display:grid;place-items:center}.foreground input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.foreground input:focus-visible{opacity:.2}.foreground span{pointer-events:none;font-size:16px}.palette-note{height:17px;margin:0;text-align:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:16px;color:#655561}
.editor{grid-column:2;grid-row:1;position:relative;min-width:0;min-height:0;border:2px solid #302b2f;background:var(--workspace)}.viewport{width:100%;height:100%;display:grid;place-items:center;overflow:auto;padding:32px;overscroll-behavior:contain;background:var(--workspace)}#canvas-stage{position:relative;line-height:0;flex-shrink:0;margin:auto;box-shadow:0 0 0 2px #171319,2px 4px #41412c}#canvas{display:block;image-rendering:pixelated;background:repeating-conic-gradient(#999 0 25%,#777 0 50%) 0 0/16px 16px;cursor:crosshair;touch-action:none}#grid-overlay{position:absolute;inset:0;pointer-events:none;width:100%;height:100%}.tool-strip{grid-column:3;grid-row:1/3;display:flex;flex-direction:column;gap:2px;padding:4px 0 2px 4px;overflow:auto}.tool{width:32px;height:29px;min-height:29px;padding:3px 4px;flex-shrink:0}.tool .pixel-icon{width:20px;height:20px}.tool.selected{background:var(--active);color:white;box-shadow:inset 2px 2px #536069,inset -2px -2px #b1c3cd}.tool-separator{height:4px;border-top:2px solid var(--shade);border-bottom:2px solid var(--light);margin:3px 0;flex-shrink:0}.tool-spacer{flex:1;min-height:6px}
.timeline{grid-column:2;grid-row:2;display:flex;flex-direction:column;min-height:0;background:var(--timeline);border:2px solid #302b2f;border-top:4px solid var(--face);box-shadow:inset 0 2px #fff}.timeline-toolbar{display:flex;align-items:center;gap:8px;height:38px;min-height:38px;padding:4px 6px;background:var(--active);border-bottom:2px solid #536069;box-shadow:inset 0 2px #a8bcc6}.transport{display:flex;gap:0}.transport button{width:28px;height:27px;padding:3px 4px;border-right-width:0}.transport button:last-child{border-right-width:2px}.transport .pixel-icon{width:16px;height:16px}.transport #play{font-size:0;position:relative}.transport #play::after{content:'';display:block;border-left:10px solid #302b2f;border-top:6px solid transparent;border-bottom:6px solid transparent;margin:1px 2px}.transport #play[aria-label="Pause animation"]::after{border:0;width:10px;height:12px;background:linear-gradient(to right,#302b2f 0 30%,transparent 30% 70%,#302b2f 70%)}.frame-counter{font-size:16px;color:#2e3234}.duration-control{margin-left:auto;display:flex;gap:7px;align-items:center;white-space:nowrap}.duration-control input{width:68px;height:27px;font-size:18px}.timeline-options{width:28px;height:27px;padding:3px}.timeline-options .pixel-icon{width:16px;height:16px}.timeline-body{display:flex;flex:1;min-height:0;overflow:auto;position:relative;background:var(--timeline)}.layer-panel{width:var(--layer-width);flex-shrink:0;position:sticky;left:0;background:var(--timeline);z-index:2;border-right:2px solid #536069;min-height:100%;height:max-content}.layer-heading{display:flex;align-items:center;gap:5px;height:30px;padding:1px 5px;background:var(--active);color:white;border-bottom:2px solid #536069;box-shadow:inset 0 2px #a8bcc6}.layer-heading>.pixel-icon{width:16px;height:16px}.layer-heading>span{margin-left:3px}.layer-heading button{margin-left:auto;width:25px;height:24px;min-height:24px;padding:1px 3px}.layer-heading button .pixel-icon{width:15px;height:15px}.layers{display:flex;flex-direction:column}.layer-row{height:28px;min-height:28px;display:flex;align-items:center;border-bottom:1px solid #7d929e;background:#b9bfc1;padding:0 3px;color:#29262a;gap:2px}.layer-row.selected{background:var(--active);color:white}.layer-row .eye{background:transparent;box-shadow:none;border:0;padding:0;width:22px;height:24px;min-height:24px;flex-shrink:0;font-size:0;position:relative}.eye::before{content:'';display:block;width:16px;height:10px;border:2px solid currentColor;clip-path:polygon(0 30%,20% 30%,20% 0,80% 0,80% 30%,100% 30%,100% 70%,80% 70%,80% 100%,20% 100%,20% 70%,0 70%)}.eye::after{content:'';position:absolute;left:6px;top:10px;width:4px;height:4px;background:currentColor}.eye.off{opacity:.3}.layer-lock{width:16px;flex-shrink:0;font-size:14px}.layer-name{background:transparent;border:0;box-shadow:none;flex:1;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis;padding:1px 3px;min-height:25px;font-size:18px;color:inherit}.layer-name:hover:not(:disabled){background:#ffffff25}.layer-name[aria-pressed=true]{box-shadow:none}.layer-kind{font-size:14px;color:inherit}.cel-scroll{flex:1;min-width:0;min-height:100%;overflow-x:auto;background:var(--timeline)}.cel-grid{display:grid;grid-template-rows:30px;grid-auto-rows:28px;width:max-content;min-width:100%;align-content:start;background:var(--timeline)}.cel-grid>button{width:36px;min-width:36px;height:28px;min-height:28px;border:0;border-right:1px solid #7d929e;border-bottom:1px solid #7d929e;padding:0;box-shadow:none;background:#bdc3c7;position:relative}.cel-grid .frame{height:30px;min-height:30px;background:#b9bfc1;border-bottom:2px solid #536069;font-size:18px}.cel-grid .frame.selected{background:var(--active);color:white}.cel-grid .cel-cell.current-column{background:#a3b7c2}.cel-grid .cel-cell.current-layer{background:#aab9c1}.cel-grid .cel-cell.selected{background:var(--active);box-shadow:inset 0 0 0 2px #fff;color:white}.cel-grid .cel-cell.has-image::after{content:'';position:absolute;width:8px;height:8px;left:14px;top:10px;background:#302b2f;border-radius:50%}.cel-grid .cel-cell.linked::after{background:transparent;border:2px solid #302b2f}.cel-grid .cel-cell.group-cell::after{content:'';height:2px;width:12px;background:#655561;position:absolute;left:12px;top:13px}.cel-grid>button:hover{background:#d9d9d9}.cel-grid .cel-gap{width:36px;text-align:center;color:#655561}.timeline-hidden .workbench{--timeline-height:0px}.timeline-hidden .timeline{display:none}
.statusbar{height:30px;flex-shrink:0;display:flex;align-items:center;gap:18px;background:var(--active);color:#2e3234;box-shadow:inset 0 2px #aac1cc;border-top:2px solid #536069;padding:2px 7px;font-size:16px}#status{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#status.error{color:#820b18}#doc-meta,#position{white-space:nowrap}.zoom-controls{display:flex;align-items:center;gap:3px}.zoom-controls button{height:23px;min-height:23px;padding:0 5px;font-size:16px}.zoom-controls output{display:inline-block;min-width:55px;text-align:center;background:var(--face);border:2px solid var(--edge);box-shadow:inset 1px 1px var(--shade);padding:1px 5px;line-height:18px}.preview-window{position:absolute;right:16px;bottom:16px;width:176px;border:2px solid #302b2f;background:var(--face);box-shadow:inset 2px 2px var(--light),inset -2px -2px var(--shade),3px 3px #0004;padding:3px;z-index:5}.window-title{display:flex;align-items:center;justify-content:space-between;background:var(--active);color:white;padding-left:6px;height:25px;font-size:18px}.window-title button{width:23px;height:23px;min-height:23px;padding:3px}.window-title .pixel-icon{width:13px;height:13px}.preview-content{height:144px;display:grid;place-items:center;padding:8px;background:var(--workspace);margin-top:3px}.preview-content canvas{max-width:100%;max-height:100%;object-fit:contain;image-rendering:pixelated;background:repeating-conic-gradient(#999 0 25%,#777 0 50%) 0 0/10px 10px}
dialog{background:var(--face);color:var(--ink);border:3px solid #302b2f;border-radius:0;box-shadow:inset 2px 2px var(--light),inset -2px -2px var(--shade),6px 6px #0006;padding:20px;width:430px;max-width:calc(100vw - 30px);max-height:90dvh;overflow:auto}dialog::backdrop{background:#201c254d}dialog h1{background:var(--active);color:white;font-weight:400;font-size:22px;margin:-16px -16px 18px;padding:5px 9px;border-bottom:2px solid #536069}dialog h2{font-size:20px;font-weight:400;color:#2c4c91;margin:12px 0 6px}dialog p,dialog li{font-size:18px;line-height:1.3}dialog ul{padding-left:20px}.section-label{display:none}.dialog-title{display:flex;justify-content:space-between;align-items:center;margin:-16px -16px 16px;padding:2px 3px 2px 8px;color:white;background:var(--active);height:30px}.dialog-title button{height:24px;min-height:24px;width:26px;padding:3px}.dialog-title .pixel-icon{width:16px;height:16px}.dialog-content>label,#new-form label{display:grid;gap:8px;margin:14px 0}.control output{float:right}.control input{width:100%}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.dialog-actions button{min-width:80px;padding:5px 15px}input[type=number],input:not([type]),input[type=text]{border:2px solid #302b2f;border-radius:0;background:#faf0e6;box-shadow:inset 2px 2px #a39789;padding:2px 7px;min-width:0;max-width:100%}#new-form input,#new-form select{min-height:30px;width:100%}.form-row{display:flex;align-items:center;gap:12px}.form-row label{flex:1;min-width:0}.form-row>span{padding-top:18px}#help-dialog{width:760px}.help-columns{display:grid;grid-template-columns:1fr 1fr;gap:24px}.history-actions{display:flex;gap:8px}.history{list-style:none;max-height:260px;overflow:auto;background:#faf0e6;border:2px solid #302b2f;margin:15px 0;padding:3px}.history li{padding:3px 8px;font-size:18px}.history li.current{color:white;background:var(--active)}.history li.future{color:#968275;text-decoration:line-through}dl{display:grid;grid-template-columns:1fr auto;gap:8px}dd{margin:0}details summary{cursor:pointer}#warnings p{font-size:16px}.warning{color:#8a3a27}#layer-note{color:#655561}
::-webkit-scrollbar{width:12px;height:12px;background:#536069}::-webkit-scrollbar-thumb{background:var(--active);border:2px solid #302b2f;box-shadow:inset 1px 1px #d3e0e5}::-webkit-scrollbar-corner{background:var(--face)}
@container editor (max-width:1050px){.workbench{--left:158px;--layer-width:220px}.application-name{display:none}.contextbar{gap:6px}.brush-context{gap:8px}.brush-size input{width:40px}.alpha-context input{width:65px}.palette{grid-template-columns:repeat(5,minmax(0,1fr))}.quick-actions button[data-action=undo],.quick-actions button[data-action=redo]{display:none}.frame-counter{display:none}#doc-meta{display:none}}
@container editor (max-width:760px){.workbench{--left:122px;--layer-width:170px;--tools:36px;--timeline-height:170px;font-size:18px}.menubar{padding-inline:2px}.app-menu>summary{padding:3px 6px}.tabsbar{padding-inline:4px}.document-tab{min-width:140px;max-width:260px}.tabsbar select{width:116px}.contextbar{height:36px}.palette-actions{gap:2px}.palette-actions button{width:25px;padding:2px}.palette-actions>span{font-size:16px;margin:0}.brush-context{gap:6px}.brush-size input{display:none}.brush-size output{min-width:30px}.alpha-context{font-size:16px}.alpha-context input{width:48px}.alpha-context output{display:none}.bar-divider{height:20px}#tool-hint{min-width:55px}.quick-actions{display:none}.palette{grid-template-columns:repeat(4,minmax(0,1fr));padding:3px}.swatch{min-height:24px}.color-panel{padding-right:4px}.tool-strip{padding-left:2px}.tool{width:30px;height:28px;min-height:28px}.sv-picker{height:80px}.timeline-toolbar{gap:4px;padding-inline:3px}.duration-control{gap:3px;font-size:16px}.duration-control input{width:55px;font-size:16px}.transport button{width:24px;padding:3px 2px}.timeline-options{display:none}.layer-name{font-size:16px}.layer-kind{display:none}.timeline-toolbar>button{font-size:16px}.statusbar{gap:8px}.statusbar #position{display:none}.viewport{padding:20px}.zoom-controls button{padding-inline:3px}.menu-popup{min-width:220px}.app-menu:nth-last-child(-n+3) .menu-popup{left:auto;right:0}}
@container editor (max-width:480px){.workbench{--left:96px;--layer-width:142px;--timeline-height:184px}.menubar{height:28px}.app-menu>summary{padding-inline:4px;font-size:16px}.tabsbar select{width:100px}.document-tab{min-width:125px;max-width:180px;font-size:18px}.palette-actions button:nth-child(2){display:none}.brush-context{gap:4px}.brush-context .alpha-context{display:none}.brush-size{font-size:16px}.palette{grid-template-columns:repeat(3,minmax(0,1fr))}.sv-picker{height:70px}.timeline-toolbar{height:60px;min-height:60px;flex-wrap:wrap;align-content:center}.duration-control{margin-left:0}.layer-heading>.pixel-icon:nth-child(2){display:none}.layer-lock{width:6px}.layer-name{font-size:16px}.help-columns{grid-template-columns:1fr;gap:0}.foreground span{font-size:14px}.statusbar #status{font-size:14px}.statusbar{gap:2px}.preview-window{width:140px;right:6px;bottom:6px}.preview-content{height:110px}}

/* Fixed side inventory keeps advertising separate from editing and reserves space before loading. */
.editor-layout{display:grid;grid-template-columns:minmax(180px,1fr) minmax(0,1440px) minmax(180px,1fr);flex:1;min-height:0;min-width:0}
.editor-shell{container-name:editor;container-type:inline-size;min-width:0;min-height:0}
.workbench{display:flex;flex-direction:column;height:100%;min-width:0;min-height:0;background:var(--face)}
.ad-rail{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;padding:14px 10px;min-width:0;min-height:0;background:#b8afa4}
.ad-rail-left{border-right:1px solid var(--shade)}
.ad-rail-right{border-left:1px solid var(--shade)}
.ad-label{font-size:14px;line-height:18px;color:#554d4a;white-space:nowrap}
.ad-slot{display:grid;place-items:center;position:relative;width:160px;height:600px;max-height:calc(100dvh - 64px);flex-shrink:1;min-height:0;overflow:hidden;background:#c6bdb2;outline:1px solid var(--shade);box-shadow:inset 1px 1px #ded6c9,inset -1px -1px #b0a397}
.ad-placeholder{color:#655b55;font-size:18px;pointer-events:none}
.ad-slot:has(iframe)>.ad-placeholder{display:none}
/* The editor keeps the full width when two side banners cannot fit comfortably. */
@media(max-width:1099px){.editor-layout{grid-template-columns:minmax(0,1fr)}.ad-rail{display:none}}

/* The bee is drawn on a 24-pixel grid and stays crisp at integer icon sizes. */
.brand-tab{width:auto;display:flex;align-items:center;gap:7px;flex-shrink:0;padding:0 8px 1px 5px;color:#332b29}
.bee-mark{width:24px;height:24px;image-rendering:pixelated;flex-shrink:0}
.brand-wordmark{font-size:20px;line-height:24px}
.about-brand{display:flex;align-items:center;gap:18px;padding:10px 0 15px;border-bottom:2px solid var(--shade);margin-bottom:18px}
.about-brand img{image-rendering:pixelated;flex-shrink:0}
.about-wordmark{font-size:38px;color:#332b29;line-height:1}
.about-brand p{margin:5px 0 0;color:#655561}
@container editor (max-width:480px){.brand-tab{width:35px;padding:0 4px}.brand-wordmark{display:none}}

.about-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.about-dialog-heading button{width:25px;height:25px;min-height:25px;padding:0;line-height:20px;color:#332b29;flex-shrink:0}

.tool-options{display:flex;align-items:center;gap:16px;flex-shrink:0;min-height:34px;max-width:100%;overflow-x:auto;padding:3px 10px;border-bottom:2px solid var(--shade);background:var(--face);font-size:16px;white-space:nowrap}
.tool-options label{display:flex;align-items:center;gap:5px;flex-shrink:0}
#tool-hint{max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@container editor (max-width:760px){#tool-hint{max-width:85px;min-width:55px}}
.tool-options select{font-size:16px;height:25px;padding-block:0}
.tool-options input[type=number]{width:62px;height:25px;font-size:16px}
#tool-tip,#selection-info{color:#554951;font-size:14px}
#selection-overlay{position:absolute;inset:0;pointer-events:none;width:100%;height:100%;overflow:visible}
.marching-ants{animation:march 1s linear infinite}
@keyframes march{to{stroke-dashoffset:-8}}
@media(prefers-reduced-motion:reduce){.marching-ants{animation:none}}
[hidden]{display:none!important}

.transform-bar{display:flex;align-items:center;gap:8px;flex-shrink:0;overflow:hidden;max-width:100%;min-height:40px;padding:3px 8px;background:#c4d0d5;border-bottom:2px solid #536069;font-size:16px;white-space:nowrap}
.transform-fields{display:flex;align-items:center;gap:10px;flex:1;min-width:0;overflow-x:auto;padding:1px 0 3px}
.transform-actions{display:flex;gap:6px;align-items:center;flex-shrink:0}
.transform-bar label{display:flex;align-items:center;gap:4px;flex-shrink:0}
.transform-bar input[type=number]{width:62px;font-size:16px;height:26px}
.transform-bar button{font-size:16px;height:26px;flex-shrink:0}
.transform-method{font-size:14px;color:#3b4651}
#transform-overlay{position:absolute;inset:0;pointer-events:none;z-index:4}
.transform-outline{position:absolute;inset:0;overflow:visible;width:100%;height:100%;pointer-events:none}
.transform-handle{position:absolute;pointer-events:auto;width:9px;height:9px;min-height:9px;padding:0;border:1px solid #15121b;background:#fff;box-shadow:0 0 0 1px #fff;transform:translate(-50%,-50%);touch-action:none}
.transform-handle.nw,.transform-handle.se{cursor:nwse-resize}.transform-handle.ne,.transform-handle.sw{cursor:nesw-resize}.transform-handle.n,.transform-handle.s{cursor:ns-resize}.transform-handle.e,.transform-handle.w{cursor:ew-resize}
.transform-handle.rotate{border-radius:50%;width:12px;height:12px;min-height:12px;background:#ffda85;cursor:grab}
.transform-handle.pivot{width:11px;height:11px;min-height:11px;border-radius:50%;background:#7d929e;cursor:move;box-shadow:0 0 0 1px #fff}
.transform-handle.pivot::after{content:'+';position:absolute;inset:-5px;font:18px/18px monospace;color:#fff;text-align:center}
.menu-popup{max-height:calc(100dvh - 50px);overflow-y:auto}
