/* A persistent model and one compact tool panel, including on phones. */
body[data-screen="editor"] main{max-width:1440px;padding-top:16px;padding-bottom:12px}
body[data-screen="editor"] footer{display:none}
.editor-top{margin-bottom:12px;min-height:34px}
.editor-top h1{font-size:24px}
.editor-layout{height:calc(100dvh - 155px);min-height:420px;grid-template-columns:minmax(0,1fr) 360px;gap:24px;align-items:stretch}
.model-area{position:relative;top:auto;align-self:stretch;min-height:0;display:flex;flex-direction:column;overflow:hidden}
#viewer{flex:1;min-height:0!important;height:auto!important;max-height:none!important}
.view-tools{flex:none;margin:6px 0;font-size:12px}
.view-tools button{min-height:36px}
.layer-view{flex:none;margin:0!important;padding:0!important;border:0!important}
.layer-view .slider-label{margin:0;font-size:12px}
.layer-view .range-ends{display:none}
.layer-view input{margin:0;min-height:30px}
.controls{align-self:stretch;padding-top:0;display:flex;flex-direction:column;min-height:0;overflow:hidden}
#editControls{display:flex;flex-direction:column;flex:1;min-height:0}
.setup-line{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:28px;font-size:12px;color:#526e7c}
.setup-line button{white-space:nowrap;font-size:12px;padding:4px}
#editorTabs{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;border-bottom:1px solid #dbe7ed;padding:7px 0}
#editorTabs button{border:0;background:transparent;color:#587280;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;padding:7px 2px;min-height:52px;border-radius:8px;font-size:12px}
#editorTabs button[aria-selected="true"]{color:#087ea5;background:#e8f6fc;font-weight:700}
#editorTabs svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.editor-panels{overflow:auto;overscroll-behavior:contain;min-height:0;flex:1;scrollbar-width:thin;padding:0 7px 8px 0}
.editor-panel{padding-top:12px}
.editor-panel .slider-label{margin:12px 0 3px;font-size:14px}
.editor-panel input[type="range"]{min-height:38px;margin:0;width:100%;touch-action:pan-y}
.editor-panel input[type="range"]{scroll-margin-block:30px}
.editor-panel input[type="range"]:focus-visible{outline:2px solid #159ec9;outline-offset:2px;border-radius:5px}
.editor-panel .range-ends{margin:0 0 15px;font-size:11px}
.editor-panel .check{margin:13px 0 6px;font-size:14px;min-height:32px}
.editor-panel select{padding:10px 12px;min-height:44px;font-size:14px}
.editor-panel .micro,.editor-panel .quiet{font-size:12px;line-height:1.5;margin:6px 0 12px}
.editor-panel details{margin:12px 0;padding:12px 0;border:0;border-top:1px solid #dbe7ed;background:transparent;border-radius:0}
.editor-panel summary{font-size:14px;min-height:28px}
.editor-panel .secondary{padding:10px 12px;min-height:42px;font-size:13px}
.editor-panel .paint-bar{gap:6px;flex-wrap:wrap}
.editor-panel #poseControls{margin:0;padding:0;border:0}
#poseControls legend{display:none}
#poseControls .slider-label:has(+ input:focus-visible){color:#087ea5}
.editor-actions{flex:none;border-top:1px solid #dbe7ed;padding-top:8px;background:white}
.editor-actions #previewStatus{font-size:12px;margin:0 0 7px;min-height:18px;line-height:1.4}
.editor-actions .primary,.editor-actions .secondary{position:static!important;margin:0;min-height:48px;padding:12px}
.editor-actions #remixBtn{margin-top:8px}
.pose-hint{position:absolute;top:12px;left:50%;transform:translateX(-50%);margin:0;padding:8px 12px;border:1px solid #cbdfe8;border-radius:20px;background:#fffef5ee;color:#17313e;font-size:12px;white-space:nowrap;pointer-events:none}
.editor-panel button:focus-visible,#editorTabs button:focus-visible{outline:3px solid #1aabdc;outline-offset:2px}
@media(max-width:760px){
 body[data-screen="editor"] .top{height:58px;min-height:58px;padding:10px 16px}
 body[data-screen="editor"] main{padding:4px 14px 0}
 .editor-top{margin-bottom:6px;min-height:30px}.editor-top h1{font-size:20px}
 .editor-layout{height:calc(100dvh - 104px - env(safe-area-inset-bottom));min-height:440px;display:grid;grid-template-columns:1fr;grid-template-rows:minmax(180px,43%) minmax(0,1fr);gap:6px}
 .model-area{position:relative}.view-tools{margin:0;line-height:1.2}.view-tools button{min-height:28px;padding:2px 0}
 .layer-view .slider-label{font-size:11px}.layer-view input{min-height:24px}
 .setup-line{min-height:22px;font-size:11px}.setup-line:has(#editorSetupStatus:empty){display:none}
 #editorTabs{padding:3px 0;gap:3px}#editorTabs button{min-height:45px;padding:3px 2px;font-size:11px}#editorTabs svg{width:19px;height:19px}
 .editor-panel{padding-top:3px}.editor-panel .slider-label{margin-top:8px}.editor-panel .range-ends{margin-bottom:8px}
 .editor-actions{padding-top:5px;padding-bottom:max(5px,env(safe-area-inset-bottom))}.editor-actions #previewStatus{font-size:11px;margin-bottom:4px;min-height:15px}
 .editor-actions .primary{min-height:44px;padding:9px}.editor-panels{padding-right:4px}
 .editor-panel .swatches{gap:5px;margin-top:5px}.editor-panel .swatches button{min-width:34px;min-height:34px}
}
@media(max-height:540px) and (min-width:580px){
 body[data-screen="editor"] .top{height:48px;min-height:48px;padding:6px 16px}
 .editor-top{min-height:24px;margin:0}.editor-top h1{font-size:18px}
 .editor-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;grid-template-rows:minmax(0,1fr);height:calc(100dvh - 91px);min-height:240px;gap:14px}
 .setup-line{font-size:10px;min-height:20px}#editorTabs button{min-height:39px}#editorTabs svg{width:16px;height:16px}
}
[hidden]{display:none!important}

body[data-screen="editor"] .screen.editor{padding:0}

@media(max-width:760px){.editor-layout{height:calc(100dvh - 112px - env(safe-area-inset-bottom));min-height:0}}
@media(max-height:540px) and (min-width:580px){.editor-layout{height:calc(100dvh - 95px);min-height:0}}
body[data-screen="editor"]{overflow:hidden}
.editor-layout{height:var(--editor-available,calc(100dvh - 155px));min-height:0}
