/* Blueprint workspace: host framing changes apply only to the live Structures route. */
body:has(#playground-root .structures-studio) .page>.topbar,
body:has(#playground-root .structures-studio) .page>.page-footer,
#playground-root:has(.structures-studio)>.page-heading,
#playground-root:has(.structures-studio)>#pg-brief{display:none}
body:has(#playground-root .structures-studio) .main-content{padding:0;max-width:none;margin:0;height:100dvh;overflow:hidden}
body:has(#playground-root .structures-studio) .page{position:relative;z-index:0}
#playground-root:has(.structures-studio),#pg-view-workspace:has(.structures-studio),.idea-experiment:has(.structures-studio),#pg-experiment:has(.structures-studio){height:100%;min-height:0;min-width:0}
#pg-view-workspace:has(.structures-studio){gap:0;align-items:stretch}
#pg-experiment:has(.structures-studio){overflow:hidden}
.world-studio.structures-studio{display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:100dvh;max-height:100%;min-width:0;overflow:hidden;margin:0;padding:0;border:0;border-radius:0;background:#edf2f5;color:#203649;font:13px/1.4 system-ui,sans-serif}
.structures-studio *{box-sizing:border-box}
.structures-studio [hidden]{display:none!important}
.structures-studio .ws-heading{flex-wrap:nowrap;display:flex;align-items:center;gap:9px;position:relative;z-index:30;min-height:48px;padding:6px 10px;margin:0;border-bottom:1px solid #c5d2dc;background:#f5f8fa}
.structures-studio .ws-heading h2{margin:0;font-size:17px;line-height:1.2;white-space:nowrap}
.structures-studio .ws-heading h2 small{font-size:11px;font-weight:500;color:#48667d;margin-left:6px;letter-spacing:0}
.structures-studio .ws-active{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#48667d;font-size:12px}
.structures-studio button,.structures-studio .ws-menu>summary{min-height:36px;padding:7px 10px;border:1px solid #b9cbd8;border-radius:5px;background:#fff;color:#203649;font:inherit;font-size:12px;cursor:pointer}
.structures-studio button:hover,.structures-studio summary:hover{background:#e2edf5}
.structures-studio button[aria-expanded=true]{background:#dce9f3;border-color:#7195af}
.structures-studio :focus-visible{outline:3px solid #3d8fc7;outline-offset:2px}
.structures-studio .ws-menu{position:relative;flex-shrink:0}
.structures-studio .ws-menu>summary{list-style:none}
.structures-studio .ws-menu>summary::after{content:' ▾'}
.structures-studio .ws-menu-content{position:absolute;right:0;top:calc(100% + 8px);width:320px;max-width:calc(100vw - 20px);max-height:calc(100dvh - 80px);overflow:auto;display:grid;gap:8px;padding:12px;background:#f5f8fa;border:1px solid #b9cbd8;border-radius:7px;box-shadow:0 12px 32px #102c2630;white-space:normal}
.structures-studio .ws-menu-content summary,.structures-studio .ws-advanced>summary{cursor:pointer;min-height:38px;padding:10px 0;font-weight:600}
.structures-studio .ws-menu-content details{border-top:1px solid #c5d2dc}
.structures-studio .ws-menu-content p{font-size:12px;margin:0;color:#48667d}
.structures-studio .ws-menu-content .idea-common-actions,.structures-studio .ws-menu-content .scenario-maker-bar{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:6px 0;border:0;background:transparent}
.structures-studio .ws-menu-content button{white-space:normal}
.structures-studio .ws-layout{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:0;position:relative;gap:0;overflow:hidden}
.structures-studio:has(.ws-controls[hidden]) .ws-layout{grid-template-columns:minmax(0,1fr)}
.structures-studio .ws-controls{display:flex;flex-direction:column;gap:12px;align-content:start;overflow:auto;padding:14px;margin:0;background:#eef4f8;border:0;border-right:1px solid #c5d2dc;min-height:0;overscroll-behavior:contain}
.structures-studio .ws-controls h3{font-size:13px;margin:0}
.structures-studio label{display:flex;flex-direction:column;gap:4px;font-size:12px;margin:0}
.structures-studio input:not([type=checkbox]),.structures-studio select,.structures-studio textarea{width:100%;min-width:0;min-height:36px;padding:7px;border:1px solid #b9cbd8;border-radius:4px;background:#fff;color:#203649;font:inherit}
.structures-studio input:disabled{opacity:.55}
.structures-studio .ws-controls>button{background:#315f80;color:white}
.structures-studio .ws-advanced{border-top:1px solid #c5d2dc}
.structures-studio .ws-advanced label{margin-bottom:10px}
.structures-studio .ws-source{margin:0;padding:0}
.structures-studio .ws-source textarea{height:220px;resize:vertical;margin-bottom:8px;font:12px/1.5 ui-monospace,monospace}
.structures-studio .ws-view{height:100%;display:flex;flex-direction:column;position:relative;min-height:0;min-width:0;border:0;border-radius:0;overflow:hidden;background:#101e2c}
.structures-studio .ws-viewport{position:relative;flex:1;min-height:0;min-width:0;overflow:hidden}
.world-studio.structures-studio .ws-view .ws-viewport canvas{position:absolute;inset:0;display:block;width:100%;height:100%;min-height:0;max-width:none;max-height:none;aspect-ratio:auto;object-fit:fill;border-radius:0;cursor:grab;touch-action:none}
.structures-studio .ws-view canvas:active{cursor:grabbing}
.structures-studio .ws-toolbar{display:flex;flex:none;align-items:center;gap:12px;padding:8px;margin:0;background:#243c50;color:#edf4fa;border-top:1px solid #405e75;flex-wrap:wrap}
.structures-studio .ws-toolbar label{flex-direction:row;align-items:center;min-height:36px}
.structures-studio .ws-toolbar span{font-size:11px;color:#c2d4e3}
.structures-studio .ws-height-presets,.structures-studio .ws-navigation,.structures-studio .ws-move{display:flex;gap:4px;flex-wrap:wrap}
.structures-studio .ws-toolbar{gap:7px}
.structures-studio .ws-toolbar button{min-height:36px;padding:6px 9px;font-size:11px}
.structures-studio .ws-toolbar button[aria-pressed=true]{background:#d6eaf6;color:#173d56;border-color:#93bdd4}
.structures-studio .ws-toolbar output{font-size:11px;color:#c2d4e3;font-variant-numeric:tabular-nums}
.structures-studio .ws-move[hidden]{display:none}
.structures-studio .ws-status{min-height:29px;padding:5px 10px;background:#f5f8fa;border-top:1px solid #c5d2dc;font-size:11px}
.structures-studio .ws-summary{padding:0;font-size:11px;margin:0;color:#48667d}
.structures-studio .ws-error{margin:0;color:#a12c20;font-size:12px}
.structures-studio .ws-error:empty{display:none}
@media(max-width:799px){
 .structures-studio .ws-heading{gap:6px;padding:5px 7px}
 .structures-studio .ws-heading h2{font-size:15px;flex:1}
 .structures-studio .ws-heading h2 small{display:block;font-size:10px;margin:3px 0 0}
 .structures-studio .ws-active{display:none}
 .structures-studio .ws-layout{grid-template-columns:minmax(0,1fr)}
 .structures-studio .ws-controls{position:absolute;inset:0 auto 0 0;width:min(280px,88%);z-index:20;box-shadow:5px 0 24px #102c2640}
 .structures-studio .ws-menu{position:static}
 .structures-studio .ws-menu-content{right:7px}
 .structures-studio .ws-summary{padding:0;font-size:10px}
}
.structures-studio .ws-capability-note{margin:0;font-size:11px;color:#48667d}
/* Compact controls stay scoped to Structures, including native slider appearance. */
.structures-studio .ws-layout{grid-template-columns:320px minmax(0,1fr)}
.structures-studio .ws-controls{gap:8px;padding:10px}
.structures-studio .ws-control-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.structures-studio .ws-control-options>summary{cursor:pointer;font-size:12px;padding:8px;color:#315f80}
.structures-studio .ws-control-options>div{display:grid;gap:5px;padding:7px;border:1px solid #b9cbd8;background:#f5f8fa}
.structures-studio .ws-control-section{border:1px solid #c5d2dc;border-radius:6px;background:#f8fafb;flex-shrink:0;overflow:hidden}
.structures-studio .ws-control-section>summary{cursor:pointer;min-height:40px;padding:11px 10px;font-size:12px;font-weight:650;background:#e7eef3}
.structures-studio .ws-control-section>summary:hover{background:#dce8f0}
.structures-studio .ws-section-content{display:grid;gap:12px;padding:10px}
.structures-studio [data-terrain-edit-controls]{display:grid;gap:12px}
.structures-studio .ws-section-content p,.structures-studio [data-controls-status]{margin:0;font-size:11px;line-height:1.45;color:#48667d}
.structures-studio .ws-number-control{display:grid;gap:3px;min-width:0}
.structures-studio .ws-slider-row{display:grid;grid-template-columns:minmax(0,1fr) 72px;align-items:center;gap:6px}
.structures-studio .ws-controls input[type=range]{appearance:auto;width:100%;min-width:0;min-height:32px;margin:0;padding:0;border:0;background:transparent;accent-color:#426c88;cursor:pointer}
.structures-studio .ws-slider-row button{min-height:30px;padding:4px 6px;font-size:11px;font-variant-numeric:tabular-nums}
.structures-studio .ws-slider-row input[type=number]{grid-column:2;width:72px;min-height:30px;padding:4px;font-size:12px}
.structures-studio .ws-slider-row .ws-auto{grid-column:2;font-size:10px;background:transparent;border-style:dashed;min-height:24px}
.structures-studio .ws-reset{justify-self:end;background:transparent;font-size:10px;min-height:28px;padding:4px 7px;color:#48667d}
.structures-studio .ws-advanced label{margin:0}
.structures-studio button:disabled{cursor:default;opacity:.55}
@media(max-width:799px){.structures-studio .ws-layout{grid-template-columns:minmax(0,1fr)}.structures-studio .ws-controls{width:min(320px,90%)}}

/* Keep the preview track within its pane even after the older shared styles load. */
:root .world-studio.structures-studio .ws-layout{height:100%;min-height:0;grid-template-rows:minmax(0,1fr);align-items:stretch;gap:0}
.structures-studio .ws-view{align-self:stretch}
.structures-studio .ws-controls>.ws-reset-all{background:#fff;color:#315f80;border-color:#7195af;font-weight:600;min-height:36px}

/* Starters are direct actions; the selector belongs only to named saved recipes. */
.structures-studio .ws-profile-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.structures-studio .ws-profile-buttons button{min-height:40px;padding:7px 6px;white-space:normal;overflow-wrap:anywhere;line-height:1.25}
.structures-studio .ws-profile-buttons button[aria-pressed=true]{background:#315f80;border-color:#315f80;color:#fff;font-weight:650}
.structures-studio .ws-profile-buttons button strong{display:block;font-size:12px;font-weight:650}
.structures-studio .ws-profile-buttons button small{display:block;margin-top:4px;font-size:10px;font-weight:400;line-height:1.35;opacity:.85}
.structures-studio .ws-profile-buttons button small:empty{display:none}
.structures-studio .ws-technology-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.structures-studio .ws-technology-buttons button{min-height:36px;padding:6px;font-size:11px;white-space:normal;line-height:1.25}
.structures-studio .ws-technology-buttons button[aria-pressed=true]{background:#315f80;border-color:#315f80;color:#fff}
.structures-studio .ws-group-label{font-weight:650;color:#203649}
.structures-studio .ws-major-action{display:grid;gap:6px;padding-top:10px;border-top:1px solid #c5d2dc}
.structures-studio [data-toggle-major]{min-height:42px;padding:8px;font-weight:650;white-space:normal}
.structures-studio [data-toggle-major][aria-pressed=true]{background:#315f80;border-color:#315f80;color:#fff}
.structures-studio [data-profile-current]{font-weight:650;color:#203649}
.structures-studio [data-profile-context]{font-size:10px;color:#5a7080}
.structures-studio .ws-saved-profiles{border-top:1px solid #c5d2dc}
.structures-studio .ws-saved-profiles>summary{min-height:34px;padding:8px 0;cursor:pointer;font-weight:600;font-size:12px}
.structures-studio .ws-saved-profile-fields{display:grid;gap:8px;padding-top:3px}
.structures-studio .ws-saved-profile-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.structures-studio [data-saved-profile-status][data-state=error]{color:#a12c20}
.structures-studio [data-section=terrain] [data-section=paths]{background:#f8fafb}
.structures-studio [data-section=terrain] [data-section=paths]>.ws-section-content{padding:9px}
.structures-studio [data-pathing-controls],.structures-studio [data-boundary-guide-editor]{display:grid;gap:10px;min-width:0}
.structures-studio [data-pathing-controls][hidden],.structures-studio [data-boundary-guide-editor][hidden],.structures-studio [data-compound-smoothing-label][hidden]{display:none}
.structures-studio [data-boundary-editor]{display:block;width:100%;height:auto;max-height:240px;background:#f5f8f3;border:1px solid #a7bbb0;border-radius:4px;cursor:crosshair;touch-action:manipulation;user-select:none}
.structures-studio [data-boundary-editor]:focus-visible{outline:3px solid #315f80;outline-offset:2px}
.structures-studio .ws-boundary-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.structures-studio .ws-boundary-actions button{min-height:36px;padding:5px;font-size:11px;white-space:normal}
.structures-studio [data-compound-smoothing-value]{font-variant-numeric:tabular-nums;font-size:11px;color:#48667d}
