/* RailwaySTL Studio VC49 — primary responsive workbench layout.
   Existing controls retain their original IDs and event handlers. */
:root{--studio-bg:#0d1216;--studio-panel:#171f25;--studio-surface:#1e292f;--studio-deep:#111a20;--studio-border:#33434b;--studio-border-muted:#27343c;--studio-text:#edf1f2;--studio-subtle:#a9bac1;--studio-muted:#7e939e;--studio-amber:#f7be59;--studio-copper:#e78662;--studio-cyan:#8dc9cf;--studio-radius:12px;--studio-shadow:0 14px 42px rgba(0,0,0,.28)}
html,body{height:100%;min-height:100%;background:var(--studio-bg);color:var(--studio-text)}body{overflow:hidden}button,input,select,textarea{accent-color:var(--studio-amber)}button,.buttonlike{min-height:32px;border:1px solid var(--studio-border);border-radius:8px;color:var(--studio-text);background:#23313a;padding:7px 11px;font-size:12px;font-weight:540;transition:background .14s,border-color .14s,transform .14s}button:hover:not(:disabled),.buttonlike:hover{background:#30414a;border-color:#5b707b}button:active:not(:disabled){transform:translateY(1px)}button:focus-visible,.pane-tab:focus-visible,.tool-family-button:focus-visible,summary:focus-visible,a:focus-visible{outline:2px solid var(--studio-amber);outline-offset:2px}button.primary,.primary{background:var(--studio-amber);border-color:var(--studio-amber);color:#192025;font-weight:750}button.primary:hover:not(:disabled){background:#ffd284;border-color:#ffd284}button:disabled{opacity:.43}input,select,textarea{background:#101a20;border:1px solid #3a4e58;border-radius:7px;color:#f3f6f7;padding:8px 9px;font-size:12px}input:focus,select:focus{border-color:var(--studio-amber)}label{font-size:11.5px;color:#b8c7cd;line-height:1.4;margin:10px 0}.row{gap:7px}
.studio-header{height:72px;min-height:72px;max-height:72px;padding:10px 18px;gap:12px;background:#151d22;border-bottom:1px solid var(--studio-border);display:flex;flex-wrap:nowrap;position:relative;z-index:20}.studio-brand{display:grid;grid-template-columns:42px auto 1fr;grid-template-rows:24px 24px;column-gap:9px;align-items:center;flex-shrink:0;gap:0;max-width:325px}.rsd-logo{grid-row:1/3;grid-column:1;width:38px;height:38px;background:linear-gradient(150deg,#303d42,#12191e);border:1px solid #526169;border-radius:10px;display:flex;align-items:center;justify-content:center;gap:4px;transform:skewX(-3deg);position:relative;overflow:hidden}.rsd-logo i{width:5px;height:19px;background:var(--studio-amber);border-radius:2px;transform:rotate(-18deg)}.rsd-logo i:nth-child(2){height:23px;background:#e98765}.rsd-logo:after{content:"";position:absolute;bottom:6px;width:30px;height:2px;background:#ccd7d7;transform:rotate(-8deg)}.studio-brand strong{grid-column:2;grid-row:1;font-size:16px;color:#fff;white-space:nowrap;letter-spacing:-.035em}.brand-subtitle{grid-column:3;grid-row:1;font-size:11px;color:#d4e1e6;margin-left:3px;letter-spacing:.05em;text-transform:uppercase}.studio-brand .badge{display:none}.studio-brand #projectName{grid-column:2/4;grid-row:2;margin:0;width:210px;max-width:100%;background:transparent;border:1px solid transparent;border-radius:4px;min-height:0;font-size:12px;color:var(--studio-subtle);padding:4px 0}.studio-brand #projectName:hover,.studio-brand #projectName:focus{border-color:#4c646f;background:#203039;padding:4px 6px}.topbar-cluster{display:flex;align-items:center;gap:7px;flex:0 0 auto}.header-divider{width:1px;height:27px;background:#35464d}.header-spacer{flex:1;min-width:0}.topbar-project{flex-shrink:0}.topbar-cluster button,.menubutton{white-space:nowrap}.history-actions button{padding:7px 9px}.workspace-actions .quiet,.command-launch{background:transparent;border-color:#37464d;color:#cddae0}.command-launch kbd{margin-left:8px;color:#80959f;border-radius:3px;font-size:10px}.output-actions{padding-left:11px;border-left:1px solid var(--studio-border)}.output-actions .inline-label{font-size:10px;color:var(--studio-muted);gap:7px}.output-actions #exportScope{max-width:155px;min-width:100px}.output-actions #exportKit{min-height:40px;padding:10px 16px}.rsd-dropdown{position:relative}.rsd-dropdown summary{list-style:none;display:inline-flex;align-items:center;gap:10px;cursor:pointer;padding:8px 12px;border:1px solid var(--studio-border);background:#253139;border-radius:8px;font-size:12px}.rsd-dropdown summary::-webkit-details-marker{display:none}.dropdown-content{position:absolute;top:42px;left:0;min-width:220px;max-height:75vh;overflow:auto;padding:7px;background:#1e2930;border:1px solid #50606a;border-radius:12px;box-shadow:var(--studio-shadow);display:flex;flex-direction:column;gap:4px}.dropdown-content button,.dropdown-content label.buttonlike{margin:0;text-align:left;display:block;background:transparent;border-color:transparent;color:#e9eef2;width:100%;min-height:35px}.dropdown-content button:hover,.dropdown-content label.buttonlike:hover{background:#344953}
.workspace{height:calc(100dvh - 72px);min-height:0;display:grid;grid-template-columns:294px minmax(0,1fr) 342px;grid-template-rows:minmax(0,1fr);overflow:hidden;transition:grid-template-columns .2s}.workspace>.sidebar{height:100%;min-height:0;padding:0;overflow:hidden;display:flex;flex-direction:column;background:var(--studio-panel);border-color:var(--studio-border)}.workspace>.sidebar.left{border-right:1px solid var(--studio-border)}.workspace>.sidebar.right{border-left:1px solid var(--studio-border);border-right:0;grid-column:auto}.left-collapsed .workspace{grid-template-columns:0 minmax(0,1fr) 342px}.right-collapsed .workspace{grid-template-columns:294px minmax(0,1fr) 0}.left-collapsed.right-collapsed .workspace{grid-template-columns:0 minmax(0,1fr) 0}.left-collapsed .sidebar.left,.right-collapsed .sidebar.right{visibility:hidden;pointer-events:none}.pane-heading{min-height:76px;display:flex;align-items:center;justify-content:space-between;padding:16px 20px 13px;border-bottom:1px solid var(--studio-border-muted)}.pane-heading .eyebrow,.stage-header .eyebrow{font-size:9px;font-weight:750;letter-spacing:.16em;color:var(--studio-cyan);display:block;margin-bottom:5px}.pane-heading h2,.sidebar .pane-heading h2{font-size:18px;text-transform:none;letter-spacing:-.02em;color:var(--studio-text);margin:0;line-height:1.1;font-weight:720}.pane-icon{font-size:20px;color:#718e9a}.pane-tabs{display:flex;gap:5px;margin:10px 14px;padding:4px;background:#10191e;border:1px solid #25363d;border-radius:10px;flex-shrink:0}.pane-tab{flex:1;min-width:0;padding:8px 5px;font-size:11px;color:#91a7b3;border-radius:7px;border:0;background:transparent;white-space:nowrap}.pane-tab.active{background:#30424b;color:#fff;box-shadow:0 2px 7px rgba(0,0,0,.2)}.pane-description{font-size:11.5px;line-height:1.55;color:#92a8b3;margin:9px 0 13px}.left-page,.inspector-page{display:none;min-height:0;overflow-y:auto;overflow-x:hidden;flex:1;padding:0 15px 18px;scrollbar-width:thin;scrollbar-color:#435962 transparent}.left-page.active,.inspector-page.active{display:block}#leftLibrary.active{display:flex;flex-direction:column;overflow:hidden;padding-bottom:0}.asset-scroll{overflow-y:auto;overflow-x:hidden;flex:1;min-height:0;padding:0 1px 10px;scrollbar-width:thin;scrollbar-color:#435962 transparent}.pane-bottom{background:#172027;border-top:1px solid var(--studio-border);margin:0 -15px;padding:12px 15px;flex:none;box-shadow:0 -8px 24px rgba(0,0,0,.18)}.pane-bottom #addAsset{margin:0;width:100%;min-height:43px;font-size:12px}.asset-scroll #assetSearch{border-radius:9px;height:38px;margin:0 0 13px;padding-left:13px}.asset-tabs{flex-wrap:nowrap;overflow:auto;scrollbar-width:thin;margin:0 0 8px;gap:5px}.asset-tab{border:1px solid #354b55;background:#1a282e;padding:7px 9px;border-radius:20px;color:#afc0c9}.asset-tab.active{background:#644827;color:#ffe3ad;border-color:#aa7b42}.asset-section{border:1px solid #32424a;border-radius:10px;background:#142026;overflow:hidden;margin:8px 0}.asset-section summary{padding:11px 12px;font-weight:700;color:#bacdd6;font-size:11px}.asset-section .asset{font-size:12px;color:#d6e1e5;background:transparent;padding:10px 12px;border-top:1px solid #293c45;margin:0;min-height:37px}.asset-section .asset:hover{background:#2a3d44}.asset-section .asset.active{background:#59442d;color:#ffe3b2;border-left:3px solid var(--studio-amber)}.sidebar-fold,.settings-group{border:1px solid #364951;border-radius:10px;background:#152128;margin:9px 0;overflow:hidden}.sidebar-fold>summary,.settings-group>summary{cursor:pointer;padding:13px 12px;font-size:12px;font-weight:700;color:#cddbe0}.sidebar-fold[open]>summary,.settings-group[open]>summary{background:#23343d;color:#fff;border-bottom:1px solid #41565f}.sidebar-fold .wall-legend{padding:9px}.settings-group-body{padding:10px 12px 16px}.settings-group-body .rule-note{margin:10px 0}.settings-group-body label{margin:10px 0}.settings-group-body .grid2{gap:0 9px}.settings-group-body h2{margin:9px 0}.rule-note{border-radius:6px;border-left-color:#987449;background:#16242b;color:#9fb0b9;line-height:1.55}.sidebar.right .objectlist{max-height:195px;border-radius:9px;border-color:#364852;scrollbar-width:thin}.sidebar.right h2:not(.pane-heading h2){font-size:11px;margin:17px 0 9px;color:#97aeb8;letter-spacing:.11em}.sidebar.right #propertyTitle{font-size:15px;letter-spacing:-.01em;color:#e8eff1;text-transform:none;padding-top:13px;border-top:1px solid var(--studio-border)}.sidebar.right #propertySearch{margin:8px 0 12px;height:37px}.sidebar.right .property-section{border:1px solid #354a55;border-radius:9px;background:#15232a;margin:10px 0}.sidebar.right .property-section>summary{background:#23343e;padding:12px}.sidebar.right #properties{min-width:0}.sidebar.right .row{margin:10px 0}.sidebar.right button{max-width:100%}.sidebar.right .grid2 button{font-size:11px;padding:11px 5px}.sidebar.right .objectitem{background:#17242a;padding:9px;border-color:#2c3d46}.sidebar.right .objectitem.active,.sidebar.right .component-head.active{background:#654b2b;color:#fff}.sidebar.right #placement{padding-bottom:6px}
.centre{min-height:0;height:100%;display:flex;flex-direction:column;overflow:hidden;background:#0f171b}.stage-header{min-height:64px;padding:12px 18px;display:flex;justify-content:space-between;align-items:center;background:#131c21;border-bottom:1px solid #2c3d45;flex-shrink:0}.stage-header strong{font-size:16px;letter-spacing:-.018em}.stage-pills{display:flex;gap:7px;align-items:center}.stage-pills span{border:1px solid #334851;border-radius:20px;padding:5px 10px;font-size:10px;color:#a5b8c0;background:#17252b}.draw-toolbar{min-height:0;flex:0 0 auto;padding:9px 14px 8px;gap:9px;background:#1a252b;border-bottom:1px solid var(--studio-border);display:flex;flex-direction:column;align-items:stretch}.tool-family-tabs{display:flex;gap:5px;align-items:center}.tool-family-button{border:0;background:transparent;border-radius:7px;font-size:11px;font-weight:680;color:#91a7b1;padding:7px 14px}.tool-family-button.active{background:#3b4a4b;color:#ffe2aa;box-shadow:inset 0 -2px 0 var(--studio-amber)}.tool-families{min-height:40px}.tool-family-panel{display:none;flex-wrap:wrap;gap:6px;align-items:center}.tool-family-panel.active{display:flex}.drawtool{padding:9px 12px;min-height:36px;border-radius:8px;background:#22313a}.drawtool.active{background:#705030;border-color:#c58f4c;color:#ffedca;box-shadow:inset 0 0 0 1px #9b743d}.drawing-options{display:flex;align-items:center;gap:11px;flex-wrap:wrap;padding-top:2px}.drawing-options .inline-label{font-size:10px;gap:6px}.drawing-options select{min-width:120px;max-width:220px;padding:6px}.drawing-options .wall-swatch{width:19px;height:19px;border-radius:5px}.draw-hint{display:flex;align-items:center;gap:7px;min-height:24px;font-size:11px;color:#99aeb7}.hint-dot{width:6px;height:6px;border-radius:50%;background:#dba34e;flex-shrink:0}.draw-hint .tool-hint{min-width:0;color:#9bb0bc;font-size:11px}.centre .tabs{display:flex;flex:none;gap:5px;background:#141f25;padding:6px 14px;border-bottom:1px solid #33434c}.centre .tabs .tab{border:1px solid transparent;border-radius:8px;background:transparent;color:#93acb7;font-size:11.5px;font-weight:650;padding:8px 15px}.centre .tabs .tab:hover{background:#2a3c45;color:#eff8f8}.centre .tabs .tab.active{background:#354850;color:#fff;border-color:#5b747c}.centre>.panel{position:relative;min-height:0;flex:1}.centre>.panel.active{display:block}.centre>.inspector-panel.active{display:flex}.centre #status{flex:none;min-height:34px;padding:9px 14px;font-size:11px;background:#19262d;border-top:1px solid #354750;color:#b1c2cb}.canvas-overlay{position:absolute;right:18px;bottom:18px;pointer-events:none;background:#17252bd9;backdrop-filter:blur(4px);border:1px solid #40545c;display:flex;flex-direction:column;gap:3px;padding:10px 12px;border-radius:9px;font-size:10px;color:#a6b8c0}.canvas-overline{font-size:9px;color:#efc47d;letter-spacing:.09em;font-weight:700}.inspection-toolbar{background:#18262c;padding:10px;gap:7px}.inspection-toolbar button{font-size:11px}.inspection-note{background:#17242b;color:#99b2bd}.scrollpanel{background:#101a20}.modal-card{background:#1b2930;border-color:#4a6370;border-radius:16px;padding:28px;box-shadow:var(--studio-shadow)}.modal-card h1{font-size:23px;color:#f2f5f7}.modal-card .primary{min-height:40px}.modal{background:rgba(1,9,13,.82);backdrop-filter:blur(7px)}
.command-overlay{position:fixed;inset:0;z-index:150;display:grid;place-items:start center;padding-top:min(19vh,170px)}.command-overlay[hidden]{display:none}.command-backdrop{position:absolute;inset:0;background:rgba(1,8,10,.72);backdrop-filter:blur(4px)}.command-modal{position:relative;width:min(620px,calc(100% - 32px));background:#1a272f;border-radius:16px;box-shadow:0 28px 120px #0009;border:1px solid #597079;overflow:hidden}.command-search{display:flex;align-items:center;gap:10px;padding:13px 18px;border-bottom:1px solid #3b4c53}.command-search>span{font-size:26px;color:var(--studio-amber)}#commandSearch{background:transparent;border:0;outline:0;box-shadow:none;font-size:17px;flex:1;margin:0;padding:6px}.command-search kbd,.command-launch kbd{font-family:inherit;font-size:10px;padding:3px 5px;background:#293940;color:#9caeb5;border:1px solid #3f545d;border-radius:4px}.command-results{max-height:min(400px,50vh);overflow-y:auto;padding:8px}.command-item{display:flex;justify-content:space-between;align-items:center;text-align:left;width:100%;border:0;background:transparent;padding:12px 14px;color:#dce5e8;border-radius:8px}.command-item:hover,.command-item.is-current{background:#394c55;color:#fff}.command-item small{color:#88a4b0;font-size:10px}.command-empty{padding:22px;color:#a5b7bf;text-align:center;font-size:12px}.command-footer{font-size:10px;color:#7f9da9;border-top:1px solid #32454f;padding:10px 17px}.skip-link{position:fixed;top:-80px;left:12px;z-index:400;background:#fff;color:#111;padding:10px}.skip-link:focus{top:10px}
@media(max-width:1510px){.workspace{grid-template-columns:266px minmax(0,1fr) 306px}.left-collapsed .workspace{grid-template-columns:0 minmax(0,1fr) 306px}.right-collapsed .workspace{grid-template-columns:266px minmax(0,1fr) 0}.studio-header{gap:8px;padding:9px 12px}.studio-brand{max-width:255px}.output-actions #exportScope{max-width:115px}.command-launch kbd{display:none}}
@media(max-width:1170px){.studio-brand #projectName{width:150px}.brand-subtitle{display:none}.command-launch span,.output-actions .inline-label{display:none}.workspace{grid-template-columns:250px minmax(0,1fr) 290px}.left-collapsed .workspace{grid-template-columns:0 minmax(0,1fr) 290px}.right-collapsed .workspace{grid-template-columns:250px minmax(0,1fr) 0}.workspace-actions #projectSetup{display:none}.workspace-actions .quiet{padding:7px 8px}}
@media(max-width:890px){body{overflow:auto}.studio-header{height:auto;min-height:68px;max-height:none;flex-wrap:wrap}.studio-brand{margin-right:auto}.header-spacer{display:none}.workspace{height:auto;min-height:calc(100dvh - 100px);display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(520px,72dvh) auto auto;overflow:visible}.workspace>.centre{grid-row:1;grid-column:1;min-height:500px}.workspace>.sidebar.left,.workspace>.sidebar.right{grid-column:1;min-height:310px;max-height:500px;border-top:1px solid var(--studio-border)}.workspace>.sidebar.left{grid-row:2}.workspace>.sidebar.right{grid-row:3}.left-collapsed .sidebar.left,.right-collapsed .sidebar.right{display:none}.left-collapsed .workspace,.right-collapsed .workspace,.left-collapsed.right-collapsed .workspace{grid-template-columns:minmax(0,1fr)}.output-actions{margin-left:auto}.command-launch span{display:inline}}
@media(max-width:590px){.studio-header{padding:8px;gap:5px}.studio-brand{max-width:100%;width:100%;grid-template-columns:38px auto 1fr}.studio-brand #projectName{width:100%}.history-actions button{padding:5px 7px}.output-actions{padding:0;border:0;gap:3px}.output-actions #exportKit{padding:8px 11px;min-height:35px}.topbar-project .menubutton{padding:7px}.workspace-actions .quiet{font-size:11px}.command-launch span{display:none}.stage-header{padding:10px 12px}.stage-pills{display:none}.tool-family-button{padding:7px 9px}.draw-toolbar{padding:8px}.drawtool{padding:8px}.drawing-options .inline-label{flex:1}.centre .tabs{padding:5px}.centre .tabs .tab{padding:8px 9px;font-size:10px}.canvas-overlay{display:none}}
@media(prefers-reduced-motion:reduce){button,.workspace{transition:none}}
/* Respect controls the existing modeller hides while generation or export runs. */
[hidden]{display:none !important}

/* Make the model, print and validation views as large as possible. */
body[data-stage="preview"] .draw-toolbar,body[data-stage="print"] .draw-toolbar,body[data-stage="controls"] .draw-toolbar{display:none}
