/* One set of logical CSS-pixel metrics, independent of workspace density. */
:root{--property-height:20px;--property-spacing:2px;--property-label-width:45%;--ui-font-size:12px;--button-height:20px;--toggle-size:16px}
body{font-size:var(--ui-font-size)!important}
body [hidden]{display:none!important}
body label{font-size:12px!important;line-height:20px!important}
body :is(input:not([type=hidden]):not([type=button]):not([type=submit]):not([type=reset]):not([type=checkbox]):not([type=radio]),select,textarea):not(:where(.generation-form-panel *)):not(#elementChatMessage){
 box-sizing:border-box!important;min-width:0;min-height:var(--property-height)!important;
 height:var(--property-height)!important;max-height:var(--property-height)!important;
 padding:0 4px!important;border-radius:2px!important;font-size:12px!important;line-height:16px!important;
 vertical-align:middle;
}
body :is(input[type=checkbox],input[type=radio]){
 box-sizing:border-box!important;font-size:12px!important;
 width:var(--toggle-size)!important;min-width:var(--toggle-size);height:var(--toggle-size)!important;
 min-height:var(--toggle-size)!important;max-height:var(--toggle-size)!important;padding:0!important;
 margin:0!important;flex:none!important;accent-color:var(--accent,#54dcca);
}
body input[type=range]{padding:0!important}
body input[type=color]{padding:1px 2px!important}
body input[type=file]::file-selector-button{height:16px;padding:0 4px;font:inherit;line-height:14px}
body textarea{resize:none!important;overflow:auto;white-space:pre-wrap}
body .property-row{
 display:grid!important;grid-template-columns:minmax(0,var(--property-label-width)) repeat(var(--property-value-count,1),minmax(0,1fr))!important;
 align-items:start!important;gap:var(--property-spacing)!important;box-sizing:border-box!important;
 width:100%;min-width:0!important;max-width:none!important;min-height:var(--property-height)!important;
 margin:0 0 var(--property-spacing)!important;padding:0!important;border:0!important;border-radius:0!important;
 background:transparent!important;font-size:12px!important;line-height:var(--property-height)!important;
}
body .property-row>.property-label{
 grid-column:1!important;grid-row:1!important;display:block!important;align-self:start!important;
 box-sizing:border-box;min-width:0;width:auto!important;height:var(--property-height)!important;
 margin:0!important;padding:0!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
 color:var(--muted,#b9c6d6);font-size:12px!important;line-height:var(--property-height)!important;
 font-weight:400;text-align:left;
}
body .property-row>.property-value{
 grid-column:auto!important;grid-row:1!important;align-self:start!important;width:100%!important;
 min-width:0!important;margin:0!important;box-sizing:border-box;
}
body .property-row>input:is([type=checkbox],[type=radio]){align-self:center!important}
body .property-row>:is(input[type=checkbox],input[type=radio]){width:var(--toggle-size)!important;justify-self:start;align-self:center!important}
body .property-row>.property-value:not(input):not(select):not(textarea){display:flex;align-items:center;gap:var(--property-spacing)}
body .property-value :is(input,select,textarea){margin:0!important;flex:1;min-width:0;width:100%}
body .property-row:has(>.property-accessory){grid-template-columns:minmax(0,var(--property-label-width)) repeat(var(--property-value-count,1),minmax(0,1fr)) repeat(var(--property-accessory-count,1),auto)!important}
body .property-row>.property-accessory{grid-row:1!important;grid-column:auto!important;margin:0!important;float:none}
body .property-row>.property-hint{grid-column:2/-1!important;grid-row:auto!important;margin:0!important;font-size:10px;line-height:15px}
/* Default buttons and property/toolbar buttons share a 20px height.
   Image previews and illustrated choices keep their content dimensions. */
body button:not(:has(img,canvas)):not(.selection-mode-choice){
 box-sizing:border-box!important;min-height:var(--button-height)!important;height:var(--button-height)!important;
 max-height:var(--button-height)!important;padding:0 6px!important;border-radius:2px!important;
 font-size:var(--ui-font-size)!important;line-height:18px!important;white-space:nowrap;
}
body button:not(:has(img,canvas)):not(.selection-mode-choice)>:is(span,strong,small){font-size:inherit!important;line-height:inherit!important}
body :is(.property-row,.property-value,.toolbar,.canvas-toolstrip,.studio-grid-controls,.filters,.layer-order-buttons,.add-component,.inspector-section>summary) button,
body button[role=tab],body .dock-tabs button{
 --button-height:20px;padding-inline:4px!important;line-height:18px!important;
}
body :is(.property-row,.property-value) button{max-height:20px!important}
body .property-row output{font-size:12px;line-height:20px;white-space:nowrap}
/* Rows supply their own 2px spacing; parent layouts must not add it again. */
body .property-fields{row-gap:0!important;column-gap:var(--property-spacing)!important}
body .property-fields>.property-row{align-self:start}
/* Short related values share a row, with each caption next to its control. */
body :is(.coords,.slice-grid,.color-rgba,.board-crop-fields:not(:has(>select,>button)),.design-dimensions),
body .region-tools-row:has(>.region-number){
 display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
 align-items:center;gap:var(--property-spacing)!important;
}
body .design-dimensions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
body .design-dimensions>span{display:none}
body .region-tools-row>.region-tools-caption{grid-column:1/-1}
body :is(.coords,.slice-grid,.color-rgba,.board-crop-fields,.design-dimensions)>.property-row,
body .region-tools-row>.region-number.property-row{
 grid-template-columns:max-content minmax(0,1fr)!important;width:auto!important;
 flex:1 1 0;min-width:0!important;margin:0!important;
}
body :is(.coords,.slice-grid,.color-rgba,.board-crop-fields,.design-dimensions)>.property-row>.property-label,
body .region-tools-row>.region-number.property-row>.property-label{max-width:none}
body :is(input,select,textarea):is(:focus,:focus-visible){outline:none!important;box-shadow:none!important;border-color:var(--line,#343e4e)!important}
body .property-row:focus-within{outline:none!important;box-shadow:none!important}
body .property-standalone{flex:1 1 160px;min-width:100px!important}
body .property-standalone:has(>.property-value[hidden]){display:none!important}
body :is(.search-wrap,.resource-search-wrap)::before{display:none}
body :is(.search-wrap,.resource-search-wrap){gap:var(--property-spacing);padding-block:0}
body #searchFilterBtn{height:20px!important;min-height:20px!important;padding-block:0!important}
body .resource-tools>.property-standalone{grid-column:1/-1}
body .chat-composer-footer>.property-standalone{max-width:100%;flex-basis:230px}
body .chat-composer-footer #elementChatModel{max-width:none;min-width:0;flex:1}
body .studio-grid-controls>.property-row{width:auto;flex:none;min-width:130px!important}
body .coordinate-space-row:has(>select[hidden]){display:none!important}
body .api-key-input #imageModelKey{padding-right:25px!important}
body .api-key-input #imageModelKeyToggle{width:22px;height:16px!important;right:1px}
body :is(.dock-tab,.sidebar-tabs button,.layer-name,.project-name-tag,.panel-title h2,.inspector-section>summary,.account-section>summary){font-size:var(--ui-font-size)!important;line-height:18px!important}
