/* 以用户确认的像素参考图为视觉基线。独立覆盖，避免旧编辑器尺寸规则干扰。 */
.pixel-editor{display:block;height:100dvh;min-height:700px;overflow:auto;padding:14px 18px;background-color:#fff9ee;color:#211b2d}
.pixel-shell{position:relative;height:calc(100dvh - 88px);min-height:510px;display:flex;flex-direction:column;padding:0 10px 10px;border:12px solid transparent;border-image:var(--frame) 12 fill / 12px;filter:drop-shadow(0 5px 0 #f0b7cf);background:#ede5f4;isolation:isolate}
.pixel-shell>header{display:flex;flex-shrink:0;align-items:center;gap:18px;height:58px;min-height:58px;padding:0 10px 8px;border:0;border-bottom:2px solid #c8b9db;filter:none;background:#fffaf0}
.pixel-shell h1{font-size:28px;letter-spacing:1px;gap:10px;margin-right:14px}.pixel-flower{width:30px;height:30px;flex-shrink:0;vertical-align:middle}.pixel-shell h1>.pixel-flower{width:38px;height:38px}.pixel-nav{height:100%;align-items:center;gap:8px}.pixel-nav button{font-size:15px;min-height:42px;padding:8px 18px;font-weight:700;border-radius:0;color:#211b2d}.pixel-nav .active{background:#f9c6d6;border:1px solid #784052;box-shadow:0 4px 0 #e88ca8}.pixel-header-actions{gap:12px}.pixel-shell #identity{font-size:10px;color:#635266;max-width:80px}.pixel-shell #save{border-radius:2px;min-height:34px;padding:6px 12px}.pixel-shell #export-png{min-height:34px;border-radius:2px;font-weight:700}.pixel-shell #message{position:absolute;z-index:60;bottom:14px;left:190px;right:345px;box-shadow:0 2px 6px #49333d15}.pixel-shell #message:empty{display:none}.pixel-shell .intro{display:none}
.pixel-shell .pixel-more{position:absolute;right:16px;top:64px;z-index:20;font-size:10px}.pixel-shell .pixel-more:not([open]){opacity:.45}.pixel-shell .pixel-more:not([open]):hover{opacity:1}.pixel-shell .pixel-more summary{font-size:10px;padding:4px;min-height:20px}.pixel-shell .pixel-more[open]{width:360px;background:#fffaf0;box-shadow:3px 4px 0 #d7bedb}.pixel-shell #workspace{display:grid;flex:1;height:0;min-height:0;grid-template-columns:162px minmax(0,1fr) 340px;gap:12px;margin-top:10px;padding:0}.pixel-shell #workspace>.frame{border-width:7px;border-image-width:7px;filter:none;padding:10px}.pixel-shell #workspace>.pixel-rail{padding:9px!important;background:#fff9ed}.pixel-rail section+section{border-top:1px solid #e6d9dc;margin-top:10px;padding-top:3px}.pixel-rail h3{margin:3px 0 7px;font-size:13px;font-weight:800}.pixel-rail h3 span{display:inline-block;color:#e57096;text-shadow:1px 0 #654455}.pixel-rail button{min-height:36px;margin:0 0 6px;padding:5px 7px;gap:10px;font-size:13px;justify-content:flex-start;border-color:#d9c9ca;box-shadow:1px 2px 0 #e7dcd4}.pixel-rail button .pixel-icon{width:23px;height:23px;border:1px solid #e3d7dc;background:#fffaf7;padding:2px;box-sizing:content-box}
.pixel-shell #workspace>.drawing{padding:0 5px 8px;background:#f0eafa;border-image:none;border:0;filter:none}.pixel-shell .drawing>.heading{min-height:52px;height:52px;padding:8px 10px;gap:8px;background:#fffaf0;border:7px solid transparent;border-image:var(--frame) 12 fill / 7px;flex-wrap:nowrap}.pixel-shell .drawing>.heading>div:first-child{max-width:40%;min-width:0}.pixel-shell #title{font-size:18px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pixel-shell #title:before{content:' ';display:inline-block;width:23px;height:28px;background:url('assets/pixel-bunny.svg') center/contain no-repeat;vertical-align:middle;margin-right:6px}.pixel-shell #save-state{display:none}.pixel-mode-tabs{gap:6px;margin:auto;flex-shrink:0}.pixel-mode-tabs button{font-size:12px;padding:5px 13px;min-height:31px;min-width:84px;border-radius:2px}.pixel-undo{gap:6px;flex-shrink:0}.pixel-undo button{min-height:30px;padding:4px}.pixel-undo .pixel-icon{width:19px;height:19px}.pixel-extra-tools{font-size:10px!important}.pixel-shell .tools{display:none}.pixel-editor[data-panel=tools] .pixel-shell .tools{display:flex;position:absolute;z-index:18;left:190px;right:370px;top:125px;padding:10px;max-height:170px;background:#fffaf0;border:2px solid #49333d;box-shadow:3px 4px 0 #e3c1d9}.pixel-shell #stage{margin:12px 26px 7px;border:0;min-height:100px;background:linear-gradient(#d2c5e744 1px,transparent 1px),linear-gradient(90deg,#d2c5e744 1px,transparent 1px),#f0eafa;background-size:10px 10px}.pixel-shell #view-controls{border:1px solid #715565;border-radius:2px;background:#fffaf0;min-height:36px;padding:2px 8px}.pixel-shell #view-controls button{font-size:11px;min-height:28px}.pixel-shell #position{display:none}.pixel-shell #empty{display:flex;flex-direction:column;justify-content:center;gap:5px;padding:4px}.pixel-shell #empty img{height:85%;max-width:90%;object-fit:contain;image-rendering:pixelated}.pixel-shell #empty>span{font-size:14px;font-weight:700;color:#685169}.pixel-shell #empty small{font-size:10px;color:#978299}
.pixel-shell #workspace>.colors{padding:8px 10px;background:#fff9ee}.pixel-shell .colors h2{font-size:19px;display:flex;align-items:center;gap:7px;padding:0;margin:0 0 10px;border:0;color:#392330}.colors h2 .pixel-flower{width:23px;height:23px}.pixel-shell #selected{min-height:39px;margin:0 0 9px;padding:7px 10px;font-weight:600;font-size:12px;border-color:#9f8290}.pixel-shell #selected i{width:27px;height:27px;border-radius:3px}.pixel-shell #color-search{height:32px;font-size:11px;padding:6px 9px}.pixel-shell #swatches{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;max-height:200px;margin:8px 0;padding:2px;align-content:start}.pixel-shell .color{font-size:9px;padding:4px 2px;min-height:49px;line-height:1.2;background:#fffaf5;border-color:#eadce1}.pixel-shell .color span{width:28px;height:28px;margin-bottom:3px;border:0;border-radius:0}.pixel-shell #counts{font-size:12px;padding:8px 3px;border-color:#e1d4dc}.pixel-shell .pixel-stock h3{font-size:12px;margin:11px 0 8px}.pixel-shell .pixel-stock h3 small{font-size:9px;display:inline}.pixel-shell .pixel-stock i{border-radius:0;box-shadow:inset 3px 3px 0 #ffffff66}.pixel-shell .pixel-start{min-height:41px;font-size:15px;margin:12px 0 11px;border-radius:2px;background:#f17da0;position:relative}.pixel-shell .pixel-start:before,.pixel-shell .pixel-start:after{content:'♥';position:absolute;font-size:10px;color:#ffe4ee;top:12px}.pixel-shell .pixel-start:before{left:12px}.pixel-shell .pixel-start:after{right:12px}.pixel-shell .pixel-accordion{padding:11px 0;font-size:13px}.pixel-shell .pixel-accordion summary{list-style:none;display:flex;justify-content:space-between}.pixel-shell .pixel-accordion summary:after{content:'⌄';font-size:18px;line-height:1}.pixel-shell .pixel-accordion[open] summary:after{content:'⌃'}
.pixel-dashboard{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;margin-top:16px;height:153px}.pixel-dashboard>.frame{padding:8px 11px;border-width:8px;border-image-width:8px;filter:drop-shadow(2px 4px 0 #ebbad1);overflow:hidden;min-width:0}.pixel-dashboard h2{font-size:13px;font-weight:800;display:flex;align-items:center;justify-content:space-between;margin:0 0 7px}.pixel-dashboard h2 button{border:0;box-shadow:none;font-size:10px;min-height:20px;padding:0;background:none;color:#8c7c93}.pixel-recent{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}.pixel-recent button{display:flex;flex-direction:column;min-width:0;padding:3px;font-size:9px;box-shadow:none;gap:3px;background:#fff9ef;border-color:#e5d6da}.pixel-recent canvas{width:100%;height:auto;image-rendering:pixelated}.pixel-recent span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pixel-empty-card{grid-column:1/-1;min-height:80px!important;font-size:13px!important;border-style:dashed!important;color:#936b83!important}.pixel-empty-card small{font-size:10px;color:#b49aaa}.pixel-inventory-list>div{display:grid;grid-template-columns:30px 1fr 1fr;align-items:center;gap:10px;height:19px;font-size:10px}.pixel-inventory-list i{display:block;width:15px;height:15px;border:1px solid #dbcbd1}.pixel-inventory-list b{font-weight:500;text-align:right}.inventory-table-head{color:#95829b}.pixel-empty-note{font-size:11px;color:#9d8698;line-height:1.9;margin:8px 0}.pixel-empty-note button{border:0;box-shadow:none;background:none;font-size:11px;min-height:25px;padding:0}.pixel-job-list button{display:flex;flex-direction:column;align-items:flex-start;gap:5px;width:100%;font-size:12px;min-height:45px;box-shadow:none;border:0;background:none}.pixel-job-list small{color:#a78597;font-size:10px}.pixel-brand-footer{display:flex;align-items:center;gap:12px;padding:14px 8px 8px}.pixel-brand-footer .pixel-flower{width:37px;height:37px}.pixel-brand-footer strong{font-size:20px;letter-spacing:1px;color:#482733}.pixel-brand-footer small{display:block;font-size:11px;color:#99869d;letter-spacing:1px;margin-top:2px}.pixel-brand-footer p{margin:0 0 0 30px;padding-left:24px;border-left:1px solid #c5a9ba;font-size:12px;color:#6c536c}
@media(min-width:1600px){.pixel-shell #workspace{grid-template-columns:180px minmax(0,1fr) 370px}.pixel-shell h1{font-size:30px}.pixel-shell .pixel-rail button{min-height:40px}.pixel-shell #swatches{max-height:260px}.pixel-shell .color{min-height:60px;font-size:10px}.pixel-shell .color span{width:34px;height:34px}.pixel-shell #stage{margin:15px 40px 10px}.pixel-dashboard{height:163px}.pixel-shell{height:calc(100dvh - 88px)}}
@media(max-width:1199px){.pixel-editor{padding:10px;min-height:680px}.pixel-shell{padding:0 5px 7px;min-height:490px;border-width:9px;border-image-width:9px}.pixel-shell>header{gap:8px;padding:0 3px 7px;height:53px;min-height:53px}.pixel-shell h1{font-size:22px;margin-right:0}.pixel-shell h1>.pixel-flower{width:30px;height:30px}.pixel-nav{gap:3px}.pixel-nav button{font-size:12px;padding:7px 9px;min-height:36px}.pixel-header-actions{gap:7px}.pixel-shell #workspace{grid-template-columns:133px minmax(0,1fr) 270px;gap:8px}.pixel-shell .drawing>.heading{padding:6px;gap:4px}.pixel-shell #title{font-size:14px}.pixel-shell #title:before{width:17px;margin-right:3px}.pixel-mode-tabs button{min-width:65px;padding:4px 6px;font-size:10px}.pixel-extra-tools{max-width:29px;overflow:hidden;font-size:0!important}.pixel-extra-tools:after{content:'⋯';font-size:17px}.pixel-undo .pixel-icon{width:16px;height:16px}.pixel-shell #stage{margin:10px 10px 7px}.pixel-shell #workspace>.colors{padding:8px}.pixel-shell .color span{width:24px;height:24px}.pixel-shell #counts{font-size:10px}.pixel-brand-footer strong{font-size:17px}.pixel-dashboard{height:150px}.pixel-shell .pixel-stock span{grid-template-columns:17px 1fr}.pixel-shell .pixel-stock h3 small{display:none}.pixel-shell .pixel-stock b{font-size:13px}}
@media(max-width:899px){.pixel-shell #workspace{grid-template-columns:100px minmax(0,1fr)}.pixel-shell #workspace>.colors{display:none}.pixel-shell .pixel-rail button{flex-direction:column;font-size:11px;gap:2px;min-height:45px}.pixel-shell .pixel-rail h3{font-size:12px}.pixel-editor[data-panel=colors] .pixel-shell #workspace>.colors{display:block;position:fixed;z-index:50;right:7px;top:70px;bottom:7px;height:auto;width:290px;filter:drop-shadow(-3px 0 0 #ddc8dd)}.pixel-editor[data-panel=library] .pixel-shell #workspace>.library{top:70px;bottom:7px;left:7px;width:300px}.pixel-shell #message{left:120px;right:20px}.pixel-dashboard{grid-template-columns:1fr 1fr}.pixel-dashboard>article:last-child{display:none}.pixel-brand-footer p{display:none}.pixel-editor[data-panel=tools] .pixel-shell .tools{left:120px;right:20px;top:110px}}
@media(max-width:599px){.pixel-editor{padding:6px 5px calc(74px + env(safe-area-inset-bottom));height:100dvh;min-height:0;overflow:hidden}.pixel-shell{height:100%;min-height:0;padding:0 0 6px;border-width:6px;border-image-width:6px;filter:none}.pixel-shell>header{min-height:46px;height:46px;padding:0 3px 4px;gap:5px}.pixel-shell h1{font-size:18px;gap:5px}.pixel-shell h1>.pixel-flower{width:24px;height:24px}.pixel-shell #workspace{grid-template-columns:minmax(0,1fr);margin-top:6px;gap:0}.pixel-shell #workspace>.drawing{grid-column:1;padding:0 2px 4px}.pixel-shell #workspace>.pixel-rail{display:none}.pixel-shell .drawing>.heading{height:43px;min-height:43px;flex-wrap:nowrap;border-width:4px;border-image-width:4px;padding:5px}.pixel-shell .drawing>.heading>div:first-child{width:auto;max-width:44%;display:block}.pixel-shell #title{font-size:12px}.pixel-shell #title:before{display:none}.pixel-mode-tabs{margin-left:auto;gap:4px}.pixel-mode-tabs button{font-size:9px;min-width:53px;padding:3px;min-height:25px}.pixel-undo{gap:3px}.pixel-undo button{padding:3px;min-height:25px}.pixel-undo .pixel-icon{width:13px;height:13px}.pixel-shell .pixel-more{top:48px;right:7px}.pixel-shell .pixel-more:not([open]){opacity:0;pointer-events:none}.pixel-shell .pixel-more[open]{width:calc(100vw - 36px)}.pixel-shell #stage{margin:7px 4px;min-height:80px}.pixel-shell #view-controls{padding:2px;width:auto;max-width:100%;gap:2px;min-height:33px}.pixel-shell #view-controls button{font-size:9px;padding:3px 5px}.pixel-shell #message{left:5px;right:5px;bottom:50px;font-size:10px}.pixel-dashboard,.pixel-brand-footer{display:none}.pixel-editor[data-panel=colors] .pixel-shell #workspace>.colors,.pixel-editor[data-panel=library] .pixel-shell #workspace>.library{position:fixed;top:auto;left:2px;right:2px;bottom:0;width:auto;height:49dvh;max-height:65dvh;z-index:50;filter:drop-shadow(0 -3px 0 #c7aec6)}.pixel-shell .pixel-sheet-close{font-size:10px;min-height:24px;padding:3px 8px;float:right}.pixel-shell .colors h2{margin:4px 0 10px}.pixel-editor[data-panel=tools] .pixel-shell .tools{position:absolute;top:auto;bottom:43px;left:4px;right:4px;z-index:25;max-height:150px}.pixel-shell #empty img{height:77%;max-width:90%}.pixel-shell #empty>span{font-size:12px}.pixel-shell #empty small{font-size:9px}.pixel-mobile-tools{border:0;border-top:2px solid #5e485b;box-shadow:0 -3px 0 #efdfed}.pixel-shell .colors #swatches{max-height:160px}.pixel-shell .pixel-more .editor-entry{display:flex}}

.pixel-dashboard>.frame{background:#fffaf0;border-image-slice:12;border-image-width:8px}.pixel-color-families{display:flex;gap:3px;align-items:center;margin:8px 0 2px;overflow:auto;padding:1px 0 3px}.pixel-color-families button{font-size:9px!important;min-height:22px!important;white-space:nowrap;border:1px solid #e6d9df!important;box-shadow:none!important;padding:2px 4px!important;border-radius:3px;background:#f5f0f4;color:#8f8499}.pixel-color-families [aria-pressed=true]{background:#f18aa8!important;color:white!important;border-color:#d8658b!important}.pixel-shell #workspace .drawing{min-height:0}.pixel-shell #view-controls{flex-shrink:0;margin:0 0 3px}.pixel-shell #stage{min-height:50px}.pixel-shell .pixel-rail section:last-child{padding-bottom:10px}
@media(min-width:1200px){.pixel-editor{font-family:'Microsoft YaHei',sans-serif}.pixel-shell #workspace>.colors{font-family:'Microsoft YaHei',sans-serif}.pixel-shell #swatches{max-height:230px}.pixel-shell .color{min-height:55px}.pixel-shell .color span{width:29px;height:29px}}

.pixel-shell #message:not(:empty){bottom:auto;top:65px;left:205px;right:365px;max-height:45px;font-size:10px;opacity:.96}.pixel-shell #message:not(:empty):hover{opacity:1}@media(max-width:1199px){.pixel-shell #message:not(:empty){left:150px;right:290px}}@media(max-width:899px){.pixel-shell #message:not(:empty){left:115px;right:12px}}@media(max-width:599px){.pixel-shell #message:not(:empty){top:auto;bottom:50px;left:5px;right:5px}}

/* 空白工作区提供真实入口，不覆盖已有图纸的编辑事件。 */
.pixel-shell #empty{pointer-events:none}.pixel-shell #empty .pixel-empty-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:14px;pointer-events:auto}.pixel-shell #empty[hidden]{display:none!important}.pixel-shell #empty .pixel-empty-actions button{min-height:40px;font-size:12px}

/* 图纸库抽屉使用不透明实底；不能依赖border-image填充遮挡下层。 */
.pixel-editor[data-panel=library] .pixel-shell #workspace>.library{background-color:#fffaf0;background-image:none;border-image:var(--frame) 12 fill / 8px;isolation:isolate;z-index:70;overflow:auto;padding:14px;filter:drop-shadow(4px 4px 0 #d9b7ce)}
.pixel-editor[data-panel=library] .pixel-shell #workspace>.library::before{content:'';position:absolute;inset:5px;background:#fffaf0;z-index:-1;pointer-events:none}
.pixel-editor[data-panel=library] .library>.heading{clear:both;padding:8px 0;background:#fffaf0}
.pixel-editor[data-panel=library] .library>.pixel-sheet-close{float:none;margin:0 0 8px;position:relative}
.pixel-editor[data-panel=library] .library #projects{position:relative;background:#fffaf0;min-height:80px}

/* 编辑工具常驻，不再通过更多工具展开。 */
.pixel-editor .pixel-shell .drawing>.tools,.pixel-editor[data-panel=tools] .pixel-shell .drawing>.tools{display:flex;position:static;left:auto;right:auto;top:auto;bottom:auto;z-index:auto;flex-wrap:wrap;gap:6px;margin:8px 0 0;padding:5px 0 4px;max-height:none;overflow:visible;background:transparent;border:0;box-shadow:none;flex-shrink:0}.pixel-editor .pixel-shell .drawing>.tools button{min-height:31px;padding:5px 8px;font-size:11px}.pixel-extra-tools{display:none!important}@media(max-width:599px){.pixel-editor .pixel-shell .drawing>.tools{gap:4px;padding:3px 0;max-height:110px;overflow:auto}.pixel-editor .pixel-shell .drawing>.tools button{font-size:9px;padding:4px 6px;min-height:29px;flex:0 0 auto}.pixel-editor .pixel-shell .drawing>.tools .pixel-icon{width:14px;height:14px}}
