/* Shared inspector rhythm across all six modeling workspaces. */
.ceramic-app .mobile-tools{display:none}

:is(.editor-app,.ceramic-app){--inspector-line:#dce4dd;--inspector-ink:#294f3f;--inspector-muted:#607368}
:is(.editor-app,.ceramic-app) aside{scrollbar-width:thin;scrollbar-color:#b9c9bc transparent;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;scroll-padding:12px}
:is(.editor-app,.ceramic-app) aside :is(input,select,button){font-size:14px;min-width:0}
:is(.editor-app,.ceramic-app) aside :is(input[type=number],select){min-height:36px;border:1px solid var(--inspector-line);background:#fafbf8;color:var(--inspector-ink);border-radius:5px;padding:7px 9px}
:is(.editor-app,.ceramic-app) aside :is(label,.field>label){font-size:14px;line-height:1.4;color:var(--inspector-ink)}
:is(.editor-app,.ceramic-app) aside h2{font-size:16px;line-height:1.35;margin-bottom:14px}
:is(.editor-app,.ceramic-app) aside :is(.hint,.cer-hint,.cer-note,.cut-help){font-size:12px;line-height:1.55}
:is(.editor-app,.ceramic-app) aside :is(.panel,[data-panel]){padding:14px;flex:0 0 auto}
:is(.editor-app,.ceramic-app) .inspector-group{min-width:0;padding:0;border:0;margin:14px 0 0}
:is(.editor-app,.ceramic-app) .inspector-group>legend{padding:0;width:100%;font-size:12px;font-weight:700;line-height:1.4;color:var(--inspector-muted);margin-bottom:4px}
:is(.editor-app,.ceramic-app) .inspector-fields{min-width:0}
:is(.editor-app,.ceramic-app) .inspector-fields .field{display:block;margin:10px 0}
:is(.editor-app,.ceramic-app) .inspector-fields .field>label{display:block;margin-bottom:5px}
:is(.editor-app,.ceramic-app) .inspector-fields .field :is(input,select){width:100%;max-width:none}
:is(.editor-app,.ceramic-app) .inspector-extra{border-top:1px solid var(--inspector-line);margin-top:14px;padding-top:2px}
:is(.editor-app,.ceramic-app) :is(.inspector-extra,.tool-help)>summary{cursor:pointer;padding:10px 0;font-size:13px;font-weight:600;color:var(--inspector-ink);line-height:1.4}
:is(.editor-app,.ceramic-app) .tool-help{margin-top:12px;border-top:1px solid var(--inspector-line)}
:is(.editor-app,.ceramic-app) aside :is(.pour-pair,.cer-pair){gap:10px}
:is(.editor-app,.ceramic-app) aside :is(.pour-pair,.cer-pair)>label{margin:6px 0}
:is(.editor-app,.ceramic-app) aside :is(.pour-pair,.cer-pair) input{margin-top:4px}
:is(.editor-app,.ceramic-app) aside :is(.editor-sections,.cer-tabs){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:4px;gap:3px;background:#e8eee7;border-radius:7px;flex:none}
:is(.editor-app,.ceramic-app) aside :is(.editor-sections,.cer-tabs) button{display:flex;align-items:center;justify-content:center;gap:3px;font-size:12px;line-height:1.25;min-height:34px;white-space:normal;padding:6px 3px;letter-spacing:0}
:is(.editor-app,.ceramic-app) aside :is(.editor-sections,.cer-tabs) button:is([data-section=info],[data-tab=info]){grid-column:auto}
:is(.editor-app,.ceramic-app) aside :is([aria-selected=true],[aria-pressed=true]){color:#16583f;font-weight:700}
.editor-app .workspace{grid-template-columns:320px minmax(0,1fr)}
.editor-app main{grid-template-rows:minmax(0,1fr) auto}
.editor-app aside .panel-switcher{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:0;background:transparent}
.editor-app aside .panel-switcher[hidden]{display:none}
.editor-app aside .panel-switcher button{font-size:13px;min-height:34px;padding:6px 3px;white-space:normal;line-height:1.3}
.editor-app aside .panel-switcher button[aria-selected=true]{border-color:#8fae99;background:#e4eee4}
.editor-app aside .field small{font-size:12px;line-height:1.35}
.editor-app aside :is(.pour-add,.pour-actions,.cut-inspector-tabs) button{font-size:13px;min-height:36px}
.editor-app #pour-list{max-width:none;width:100%}
.editor-app .viewer-bar,.ceramic-app .cer-viewbar{min-height:42px;gap:8px;padding:6px 10px;flex-wrap:wrap;flex-shrink:0}
.editor-app .viewer-bar button,.ceramic-app .cer-viewbar button{font-size:13px;min-height:32px;padding:6px 9px}
.editor-app .viewer-bar .preview-quality,.ceramic-app .cer-viewbar .viewer-check{font-size:12px}
.editor-app .action-dock{min-height:50px}
.editor-app .action-dock :is(.build-button,#download),.ceramic-app .cer-actions>button,.ceramic-app .cer-download :is(button,select){font-size:13px;min-height:36px}
.editor-app .action-dock #status,.ceramic-app .cer-actions #cer-status{font-size:12px;line-height:1.4;max-height:36px}
.editor-app header{height:auto;min-height:50px;flex-wrap:wrap;gap:6px 12px;padding:6px 12px}
.editor-app header .project-toolbar{flex:1 1 auto;max-width:none;min-width:0}
.editor-app header .project-actions button,.ceramic-app .header-project-actions button{font-size:12px;min-height:32px}
.editor-app header .tool-nav a,.ceramic-app header .tool-nav a{font-size:12px}
.editor-app header .tool-nav a[aria-current],.ceramic-app header .tool-nav a[aria-current]{font-size:14px;font-weight:800}
.ceramic-app .cer-workspace{grid-template-columns:320px minmax(0,1fr)}
.ceramic-app .cer-workspace aside{min-width:0;overflow-y:auto;overflow-x:hidden;gap:8px}
.ceramic-app .cer-workspace aside select{font-size:14px}
.ceramic-app .cer-kind{flex:none}
.ceramic-app .cer-kind button{font-size:15px;min-height:58px;padding:6px}
.ceramic-app .cer-kind small{font-size:12px}
.ceramic-app header{height:auto;min-height:50px;flex-wrap:wrap;padding:6px 12px;gap:6px 12px}
.ceramic-app footer{padding:0 12px 8px}
.ceramic-app .cer-actions{flex-wrap:wrap;align-items:center}
.ceramic-app .cer-download{min-width:0;flex-wrap:wrap}
.ceramic-app .cer-viewbar>.cer-explode{flex-wrap:wrap;min-width:0}
:is(.editor-app,.ceramic-app) :focus-visible{outline:2px solid #377e5c;outline-offset:3px}
@media(min-width:1800px){.editor-app .workspace,.ceramic-app .cer-workspace{grid-template-columns:360px minmax(0,1fr)}}
@media(max-width:1360px){.editor-app header .project-toolbar{flex-basis:100%}.editor-app header .project-title{max-width:180px;flex:1}.editor-app header .project-actions{margin-left:auto}.editor-app header .tool-nav,.ceramic-app header .tool-nav{flex:1;min-width:0;overflow-x:auto;white-space:nowrap}.editor-app header .tool-nav a,.ceramic-app header .tool-nav a{flex:none}.ceramic-app .cer-workspace{grid-template-columns:300px minmax(0,1fr)!important}}
@media(max-width:760px){
 body.ceramic-app{height:100dvh;min-height:0;overflow:hidden}
 .editor-app header,.ceramic-app header{padding:4px 8px;gap:4px 8px}
 .ceramic-app header .tool-nav a:not([aria-current]){display:block}
 .editor-app header .tool-nav,.ceramic-app header .tool-nav{margin-left:0}
 .editor-app header .project-toolbar{padding:0;gap:4px}
 .editor-app header .project-title{max-width:90px}
 .editor-app header .project-actions button,.ceramic-app .header-project-actions button{font-size:12px;padding:5px 7px}
 .ceramic-app .header-project-actions{width:100%;justify-content:flex-end}
 .editor-app main{padding:5px 6px;gap:5px}
 .editor-app .workspace{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,2fr) minmax(160px,3fr)}
 .ceramic-app .cer-workspace{display:grid;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,2fr) minmax(160px,3fr);padding:5px 6px;gap:6px}
 .ceramic-app .cer-workspace aside{grid-row:1;min-height:0;overflow-y:auto}
 .ceramic-app .cer-viewer{grid-row:2;min-width:0}
 .ceramic-app .cer-canvas{height:auto;min-height:0;flex:1}
 .ceramic-app .mobile-tools{display:block}
 .ceramic-app.tools-collapsed .cer-workspace{grid-template-rows:minmax(0,1fr)}
 .ceramic-app.tools-collapsed .cer-workspace aside{display:none}
 .ceramic-app.tools-collapsed .cer-viewer{grid-row:1}
 .editor-app .viewer-bar,.ceramic-app .cer-viewbar{gap:4px;padding:4px 6px}
 .editor-app .viewer-bar>.shell-view,.ceramic-app .cer-viewbar>.cer-explode{flex-wrap:wrap;gap:4px}
 .editor-app .viewer-bar>.shell-view label,.ceramic-app .cer-viewbar>.cer-explode label{font-size:12px}
 .editor-app .action-dock{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px;padding:5px}
 .editor-app .action-dock .build-actions{min-width:0;flex-wrap:wrap}
 .editor-app .action-dock .export-actions{min-width:0;justify-content:flex-end}
 .editor-app .action-dock :is(.build-button,#download){max-width:100%;font-size:12px;padding:6px;white-space:normal;line-height:1.25;overflow:visible}
 .editor-app .action-dock #status{grid-column:1/-1;order:3;max-height:32px;font-size:12px;padding:0 2px}
 .editor-app .action-dock #status:empty{display:none}
 .ceramic-app footer{padding:0 6px 5px}
 .ceramic-app .cer-actions{gap:4px;padding:5px}
 .ceramic-app .cer-download{flex-basis:100%;margin:0;gap:4px;justify-content:stretch}
 .ceramic-app .cer-download select{flex:1;min-width:0;max-width:none;width:1px}
 .ceramic-app .cer-actions #cer-status{order:3;max-height:32px;font-size:12px}
 .ceramic-app .cer-legend{max-width:calc(100% - 20px);font-size:10px}
}
@media(max-height:550px) and (orientation:landscape){
 .editor-app main{grid-template-rows:minmax(0,1fr) auto}
 .editor-app .workspace,.ceramic-app .cer-workspace{display:grid;grid-template-columns:280px minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)}
 .editor-app aside,.ceramic-app .cer-workspace aside{grid-row:1;grid-column:1;min-height:0;overflow-y:auto}
 .editor-app .viewer-wrap,.ceramic-app .cer-viewer{grid-row:1;grid-column:2}
 .ceramic-app .cer-canvas{min-height:0;height:auto;flex:1}
 .ceramic-app .mobile-tools{display:block}
 .editor-app.tools-collapsed .workspace,.ceramic-app.tools-collapsed .cer-workspace{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)}
 .editor-app.tools-collapsed .viewer-wrap,.ceramic-app.tools-collapsed .cer-viewer{grid-row:1;grid-column:1}
 .ceramic-app.tools-collapsed aside{display:none}
 .editor-app .action-dock{display:flex;flex-wrap:wrap;gap:3px 7px;min-height:42px}
 .editor-app .action-dock #status{flex-basis:auto;max-height:28px}
 .editor-app .viewer-bar>.shell-view,.ceramic-app .cer-viewbar>.cer-explode{width:auto;order:initial;flex:1}
 .ceramic-app .cer-download{flex-basis:auto;margin-left:auto}
}
/* Existing compact-header glyphs must not duplicate the button text. */
.editor-app header :is(#undo,#redo)::before{display:none}
@media(max-width:760px){.editor-app header #undo,.editor-app header #redo{font-size:0}.editor-app header #undo::before{display:inline;content:'↶';font-size:16px}.editor-app header #redo::before{display:inline;content:'↷';font-size:16px}}

/* On a phone, the view tools use one swipeable row instead of covering 3D. */
@media(max-width:760px),(max-height:550px) and (orientation:landscape){
 .editor-app .viewer-bar,.ceramic-app .cer-viewbar{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;min-height:46px;scrollbar-width:thin;justify-content:flex-start}
 .editor-app .viewer-bar>*,.ceramic-app .cer-viewbar>*{flex:none!important;order:initial!important;width:auto!important;margin-left:0!important}
 .editor-app .viewer-bar>.shell-view,.ceramic-app .cer-viewbar>.cer-explode{flex-wrap:nowrap;white-space:nowrap}
 .ceramic-app .cer-viewbar>div{flex-wrap:nowrap}
 .ceramic-app .cer-viewbar>.cer-explode label{white-space:nowrap}
 .editor-app .viewer-bar button,.ceramic-app .cer-viewbar button{white-space:nowrap}
}

/* Compact numeric inspector: captions stay beside the editable value.
   Preserve native labels, IDs and input events, including generated editors. */
:is(.editor-app,.ceramic-app) aside .field:has(>input[type=number]){
 display:grid;grid-template-columns:minmax(0,1fr) 84px;align-items:center;gap:8px;margin:6px 0;min-height:34px
}
:is(.editor-app,.ceramic-app) aside .field:has(>input[type=number])>label{display:block;margin:0;min-width:0;line-height:1.3}
:is(.editor-app,.ceramic-app) aside .field:has(>input[type=number])>input{
 width:100%;min-width:0;max-width:none;margin:0;min-height:34px;padding:6px 7px;text-align:right
}
:is(.editor-app,.ceramic-app) aside label:has(>input[type=number]){
 display:grid;grid-template-columns:minmax(0,1fr) 84px;align-items:center;gap:8px;margin:6px 0;line-height:1.3;min-width:0
}
:is(.editor-app,.ceramic-app) aside label:has(>input[type=number])>input{
 width:100%;min-width:0;max-width:none;margin:0;min-height:34px;padding:6px 7px;text-align:right
}
:is(.editor-app,.ceramic-app) aside :is(.cer-pair,.pour-pair){gap:6px}
:is(.editor-app,.ceramic-app) aside :is(.cer-pair,.pour-pair) label:has(>input[type=number]){
 grid-template-columns:minmax(0,1fr) 58px;gap:4px;margin:4px 0
}
/* Grid editors use the same caption/value rhythm, even when built dynamically. */
#manufacturing-panel label:has(>input[type=number]),#inspection-panel label:has(>input[type=number]){
 display:grid;grid-template-columns:minmax(0,1fr) 84px;align-items:center;gap:8px;margin:6px 0;line-height:1.3
}
#manufacturing-panel :is(.mf-grid,.mf-triple) label:has(>input[type=number]),
:is(.editor-app,.ceramic-app) aside .pose-triple label:has(>input[type=number]){
 grid-template-columns:minmax(0,1fr) 58px;gap:4px;margin:4px 0!important
}

:is(.editor-app,.ceramic-app) aside .pose-triple{gap:6px}
:is(.editor-app,.ceramic-app) aside .pose-triple label:has(>input[type=number]){display:grid!important}
:is(.editor-app,.ceramic-app) aside .pose-triple input{padding:6px 4px}
@media(max-width:760px){
 :is(.editor-app,.ceramic-app) aside :is(.editor-sections,.cer-tabs) button{min-height:40px}
 :is(.editor-app,.ceramic-app) aside input[type=number]{font-size:16px;min-height:36px}
}

.editor-app aside .cut-origin{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 6px}
.editor-app aside .cut-origin label:has(>input[type=number]){grid-template-columns:minmax(0,1fr) 58px;gap:4px}
.editor-app aside .cut-origin>button{grid-column:1/-1}
