/* Keep the catalog in place: this is a separate, non-modal style tool. */
body aside.settingsOpen>.inspectorBody{display:block!important}
body #styleInspector{position:fixed!important;inset:auto;transform:none!important;min-width:0!important;min-height:0;flex:none;width:328px;max-width:calc(100vw - 24px);border:1px solid var(--studio-edge,var(--line2))!important;border-radius:10px!important;background:var(--studio-surface,var(--panel));box-shadow:0 12px 32px #0005;z-index:70;overflow:hidden;display:none!important}
body #styleInspector[hidden]{display:none!important}
body #styleInspector.open:not([hidden]){display:flex!important;flex-direction:column;animation:styleToolIn 160ms ease-out!important}
body #styleInspector #siHead{box-sizing:border-box;display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex:none;gap:8px;padding:6px 12px!important;min-height:44px;cursor:default;border-radius:0;background:var(--studio-surface,var(--panel));border-bottom:1px solid var(--line)}
body #styleInspector #siHead>div{order:0;min-width:0;display:grid;gap:3px}
body #styleInspector #siTitle{display:none}
body #styleInspector #siContext{font-size:15px;line-height:1.3;font-weight:600;color:var(--ink)}
body #styleInspector #siClose{order:1;flex:none;width:32px;height:32px;min-height:32px;border:1px solid var(--line2);border-radius:6px;font-size:22px;line-height:1;background:transparent;color:var(--ink)}
body #styleInspector #siClose:focus-visible,body .styleSettingsGear:focus-visible{outline:2px solid var(--ux-action,var(--accent));outline-offset:2px}
body #styleInspector #siBody{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:4px 12px 10px!important;gap:0!important}
body #styleInspector #siTabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:6px 12px;border-bottom:1px solid var(--line);flex:none}
body #styleInspector #siTabs button{min-height:34px;padding:6px 10px;border:1px solid transparent;border-radius:5px;background:transparent;color:var(--dim);font-size:12px}
body #styleInspector #siTabs button[aria-pressed=true]{background:var(--studio-surface,var(--panel));border-color:var(--line2);color:var(--ink);box-shadow:inset 0 -2px var(--ux-action,var(--accent))}
body #styleInspector #siTabs button:focus-visible{outline:2px solid var(--ux-action,var(--accent));outline-offset:1px}
body #styleInspector #siBody>.group[data-section-hidden]{display:none!important}
body #styleInspector #siBody>.group{flex-shrink:0;margin:0!important;padding:6px 0!important;background:transparent!important;border:0;border-bottom:1px solid var(--line);border-radius:0}
body #styleInspector #siBody>.group.closed{padding:0!important}
body #styleInspector #siBody>.group>h2{min-height:0;margin:0!important;padding:0!important;font-size:12px!important;background:transparent!important;color:var(--ink)!important}
body #styleInspector .settingsDisclosure{min-height:34px;padding:4px 0;font-size:12px!important}
body #styleInspector .ctl{margin-bottom:6px!important}
body #styleInspector #paramsGroup{display:block}
body #styleInspector #siBody>#paramsGroup{padding:2px 0 6px!important}
body #styleInspector #paramsGroup>h2{display:none!important}
body #styleInspector .parameterSection{margin:0 0 6px;padding:0;border:0}
body #styleInspector .parameterSection[hidden],body #styleInspector .ctl[hidden]{display:none!important}
body #styleInspector .parameterSection h3{font-size:11px;font-weight:400;line-height:14px;color:var(--dim);margin:8px 0 2px}
body #styleInspector .parameterSection .ctl{display:grid;grid-template-columns:minmax(78px,1fr) minmax(70px,1.3fr) 42px;column-gap:9px;row-gap:0;align-items:center;min-height:34px;margin:0!important;padding:0!important}
body #styleInspector .parameterSection .ctl>label{display:contents}
body #styleInspector .parameterSection .ctl>label>span{grid-column:1;grid-row:1;font-size:12px;line-height:1.3;overflow-wrap:anywhere}
body #styleInspector .parameterSection .ctl output{grid-column:3;grid-row:1;box-sizing:border-box;width:42px;min-width:0;padding:4px;font-size:12px;font-variant-numeric:tabular-nums}
body #styleInspector .parameterSection .ctl input[type=range]{grid-column:2;grid-row:1;width:100%;min-width:0;min-height:34px;margin:0;padding:0}
body #styleInspector input[type=range]{appearance:none;background:transparent!important;border:0!important;box-shadow:none!important;height:34px!important;min-height:34px!important}
body #styleInspector input[type=range]::-webkit-slider-runnable-track{height:4px;border:0;border-radius:3px;background:var(--line2)}
body #styleInspector input[type=range]::-webkit-slider-thumb{appearance:none;width:14px;height:14px;margin-top:-5px;border:1px solid var(--ink);border-radius:50%;background:var(--ux-action,var(--accent));box-shadow:none}
body #styleInspector input[type=range]::-moz-range-track{height:4px;border:0;border-radius:3px;background:var(--line2)}
body #styleInspector input[type=range]::-moz-range-thumb{width:14px;height:14px;border:1px solid var(--ink);border-radius:50%;background:var(--ux-action,var(--accent));box-shadow:none}
body #styleAccess #btnStyleParams{width:34px;min-height:34px;padding:6px;justify-content:center;flex:none;background:var(--studio-surface,var(--panel));color:var(--ink);border-color:var(--line2)}
body #styleAccess #btnStyleParams #lBtnStyleParams{display:none}
body #styleAccess #btnStyleParams svg,body .styleSettingsGear svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round}
body #presets .styleCard{position:relative;display:grid;min-width:0}
body #presets .styleCard[hidden]{display:none!important}
body #presets .styleCard>.preset{width:100%;height:100%;box-sizing:border-box}
body #presets .styleCard .styleCardName{padding-right:32px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body #presets .styleSettingsGear{position:absolute;right:5px;bottom:5px;width:30px;height:30px;display:grid;place-items:center;padding:5px;border:1px solid var(--studio-edge,var(--line2));border-radius:5px;background:var(--studio-surface,var(--panel));color:var(--ink);cursor:pointer;z-index:1}
body #presets .styleSettingsGear:hover,body #presets .styleSettingsGear[aria-expanded=true]{border-color:var(--ux-action,var(--accent));color:var(--ux-action,var(--accent))}
html[data-theme=light] body #presets .styleSettingsGear:is(:hover,[aria-expanded=true]),html[data-theme=light] body #styleAccess #btnStyleParams.on{color:#415b19;border-color:#657d35;background:#eef2e5}
@media(max-width:680px){
  /* The controller measures this preview before placing the sheet below it. */
  body.style-tools-mobile:is([data-ux-step=style],[data-ux-step=make]):not(.source-empty) .stage{right:0;height:var(--style-preview-height,36dvh);min-height:0;padding:8px!important}
  body.style-tools-mobile:is([data-ux-step=style],[data-ux-step=make]):not(.source-empty) .stage :is(#out,#posterOut){max-height:calc(var(--style-preview-height,36dvh) - 16px)}
  body.style-tools-mobile .stage>:is(#canvasTools,.variationBar,#tlOpen,.canvasMeta){display:none!important}
  body.style-tools-mobile:is([data-ux-step=style],[data-ux-step=make]):not(.source-empty) aside{top:calc(var(--mobile-header-h,62px) + var(--style-preview-height,36dvh));left:0;right:0;width:auto;height:auto}
  body #styleInspector{max-width:calc(100vw - 16px);padding-bottom:env(safe-area-inset-bottom,0px);box-sizing:border-box}
  body #styleInspector.open:not([hidden]){animation:none!important}
  body #styleInspector #siHead{min-height:48px;padding:2px 10px!important}
  body #styleInspector #siClose{width:44px;height:44px;min-height:44px}
  body #styleInspector #siTabs{padding:3px 10px}
  body #styleInspector #siTabs button{min-height:38px}
  body #presets .styleSettingsGear{width:38px;height:38px}
}
@keyframes styleToolIn{from{opacity:0;transform:translateX(10px)}to{opacity:1;transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){body #styleInspector.open:not([hidden]){animation:none!important}}
