/* Give discovery and complete-set previews the whole work surface. */
body.workbench.focused-studio:has(:is(#templateGallery,#templateDetails)[open]) #studio .workspace{grid-template-columns:minmax(0,1fr)!important}
body.workbench.focused-studio:has(:is(#templateGallery,#templateDetails)[open]) #studio :is(.preview-head,.canvas-editing-tools,.studio-panel-resize){display:none!important}
body.workbench.focused-studio:has(:is(#templateGallery,#templateDetails)[open]) #studio .canvas-resources{width:100%!important;max-width:none!important;min-width:0!important;border-left:0!important}
body.workbench.focused-studio:has(:is(#templateGallery,#templateDetails)[open]) #studio :is(.shared-tool-dock,.shared-docked-dialog){width:100%!important;max-width:none!important;box-sizing:border-box}
body.workbench.focused-studio .shared-tool-dock #templateGallery .template-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:22px}
body.workbench.focused-studio #templateGallery .template-card{padding:16px!important;background:#1b3024!important;border:1px solid #b7c6a32b!important;border-radius:12px!important;text-align:left!important;min-width:0;display:flex;flex-direction:column;gap:12px}
body.workbench.focused-studio #templateGallery .template-card canvas{max-height:290px;width:100%;object-fit:contain}
body.workbench.focused-studio #templateGallery .template-card strong{font:400 20px/1.3 Georgia,serif;color:#eee6cf}
body.workbench.focused-studio #templateGallery .template-card span{font:12px/1.6 Inter,Arial,sans-serif;color:#b9c6b0}
body.workbench.focused-studio .shared-tool-dock #templateGallery .template-filters{display:grid!important;grid-template-columns:2fr repeat(4,minmax(0,1fr));gap:10px;margin:20px 0}
body.workbench.focused-studio .shared-tool-dock #templateDetails .template-details-body{display:grid!important;grid-template-columns:minmax(0,1.2fr) minmax(280px,1fr);gap:32px;align-items:start}
body.workbench.focused-studio #templateDetails .template-details-visual{position:sticky;top:16px}
body.workbench.focused-studio #templateDetails canvas{display:block;width:100%;height:auto;max-height:650px;object-fit:contain}
body.workbench.focused-studio #templateDetails .template-details-form textarea{min-height:96px;width:100%}
body.workbench.focused-studio #templateDetails .template-details-actions{display:flex;justify-content:space-between;gap:16px;margin-top:28px;padding-top:20px;border-top:1px solid #b7c6a32b}
@media(max-width:1000px){body.workbench.focused-studio .shared-tool-dock #templateGallery .template-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}body.workbench.focused-studio .shared-tool-dock #templateGallery .template-filters{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:700px){body.workbench.focused-studio .shared-tool-dock #templateGallery .template-grid,body.workbench.focused-studio .shared-tool-dock #templateDetails .template-details-body{grid-template-columns:minmax(0,1fr)!important}body.workbench.focused-studio #templateDetails .template-details-visual{position:static}body.workbench.focused-studio #templateDetails canvas{max-height:480px}}

body.workbench.focused-studio:has(:is(#templateGallery,#templateDetails)[open]) #studio .canvas-editor{display:block!important;grid-template-columns:minmax(0,1fr)!important}
body.workbench.focused-studio:has(:is(#templateGallery,#templateDetails)[open]) #studio .canvas-editor>:not(.canvas-resources){display:none!important}
