/* Floating studio panels, based on the supplied layout reference. */
:root{--bg:#141e25;--panel:#1c272e;--line:#34414a;--text:#f0f3f5;--muted:#a9b3ba;--shadow:0 12px 28px #0003}
body{background:radial-gradient(ellipse at 50% 35%,#25343c 0,#141e25 75%)}
header{height:64px;padding:12px 28px;background:transparent;border:0}header .brand{font-size:20px}.header-actions{color:#e1e7e9}.header-actions button{border:0;border-radius:24px;background:#35414a}
main{height:calc(100dvh - 64px);min-height:0;padding:8px 14px 14px;gap:14px;grid-template-columns:275px minmax(350px,1fr) 300px}
main:has(>.right[hidden]){grid-template-columns:275px minmax(350px,1fr)}
aside.left,aside.right{background:linear-gradient(135deg,#202c34e8,#19232be8);border:0;border-radius:24px;box-shadow:var(--shadow);min-height:0}
.workspace{gap:14px;grid-template-rows:minmax(260px,1fr) 270px}.workspace .viewport{border-radius:24px;overflow:hidden;border:0;outline:0;box-shadow:none}.gallery{border:0;border-radius:24px;padding:12px 14px 0;background:#1b272ee8;box-shadow:var(--shadow)}
.left section,.right section{border:0}.left .asset-header{padding:18px 19px 14px}.left .asset-header h2{font-size:16px;margin-top:9px}.left .asset-overview{padding:0 8px 12px!important}.viewer-version{border:0;padding:14px 20px}
.info-block,.info-file{margin:0 0 8px;border-radius:18px;background:linear-gradient(125deg,#2b3740bb,#1d2830bb);overflow:hidden}
.info-block>summary{list-style:none;display:flex;align-items:center;gap:11px;padding:12px 16px;cursor:pointer;font-size:14px;font-weight:600;user-select:none}.info-block>summary::-webkit-details-marker{display:none}.info-block>summary:hover{background:#ffffff05}.info-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex:none}.info-chevron{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;margin-left:auto;transition:transform 140ms}.info-block[open] .info-chevron{transform:rotate(180deg)}
.info-content{padding:0 16px 12px}.info-content .stat-row{padding:3px 0;border:0}.info-content .stat-row dt,.info-content .stat-row dd{font-size:13px;color:#e0e7eb}.info-file{display:flex;gap:10px;align-items:center;padding:12px 16px;font-size:13px}.info-file strong{font-weight:600;white-space:nowrap}.info-file #fileStats{margin-left:auto;white-space:nowrap;font-size:12px}
.info-content>label{margin:4px 0 6px;font-size:13px}.info-content>select,.info-content>input[type=number]{width:100%;font-size:13px;padding:9px 11px;border:0;background:#2a3740;border-radius:13px;margin-bottom:8px}.info-content>input:last-child{margin-bottom:0}
#textureStats .texture-stat{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:3px 9px;align-items:center;background:#26333b80;border:0;border-radius:12px;padding:8px 2px;margin-top:6px}.texture-stat-swatch{grid-column:1;grid-row:1/3;width:36px;height:36px;border-radius:9px;object-fit:cover;image-rendering:pixelated}.texture-stat-title{grid-column:2/4;font-size:13px;color:#edf1f3}.texture-stat-material{grid-column:2;grid-row:2;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}.texture-stat-size{grid-column:3;grid-row:2;white-space:nowrap;font-size:12px}.texture-stat-summary{font-size:13px}
.left .selection-stats{border-radius:16px;margin:0 8px 10px;padding:14px;background:#2a3a40;border-left:2px solid #8bb9a0}
.surface-toolbar{border:0;border-radius:26px;background:#26343de8;box-shadow:0 5px 14px #0004;padding:6px}.surface-toolbar button{border-radius:50%}.camera-actions .float-button{border:0;border-radius:24px;background:#293943e8;padding:10px 14px;box-shadow:0 5px 14px #0003;font-size:13px}.view-controls button{border-radius:20px}.visualization-menu>.visualization-trigger{border:0;border-radius:24px;background:#26343df2}.visualization-options{border:0;border-radius:20px 20px 0 0}.visualization-menu[open]>.visualization-trigger{border-radius:0 0 20px 20px}.viewport-bottom>span{opacity:.55}
.gallery-heading{margin-bottom:0;letter-spacing:.3px;color:#eef2f4}.gallery-body{height:calc(100% - 23px);gap:12px}.gallery-add-column{flex-basis:132px;padding:10px 0 8px;gap:3px}.gallery-add-column .gallery-add-fixed{padding:12px 10px;gap:7px;border-radius:24px;background:#29394399;border:1px dashed #62727b}.gallery-add-column .gallery-add-fixed strong{font-size:14px}.gallery-add-column .gallery-add-fixed p{font-size:12px;line-height:1.4}.gallery-example{font-size:12px;padding:5px 0;color:#e2e8ec}.gallery-track{padding:10px 0 12px;gap:14px}
.asset-card.active{flex:0 0 680px;grid-template-columns:116px 190px minmax(0,1fr);grid-template-rows:36px minmax(0,1fr);border:1px solid #ffffff05;border-radius:24px;box-shadow:0 8px 20px #0002}.asset-card,.asset-card.active .asset-heading,.asset-card .hierarchy,.asset-card .properties{background:#26343dbb}.asset-card.active .asset-heading{background:#34424b99;border-bottom:0}.asset-card .asset-heading{padding:5px 14px}.asset-title{font-size:14px}.asset-card .asset-remove{font-size:21px}.asset-card .asset-preview{padding:10px 0 10px 10px}.asset-card .asset-preview .asset-select{border-radius:14px;overflow:hidden}.asset-card .asset-preview .asset-select img{width:116px;height:140px;object-fit:contain}.asset-card .hierarchy{padding:12px 10px;border:0}.parts-heading{font-size:13px;margin:0 0 6px}.part-row{font-size:12px;padding-block:4px}.part-name{font-size:12px}.part-eye{width:23px;min-width:23px}.asset-card .properties{padding:10px 12px 10px 4px;overflow:auto}.editor-heading{display:flex;gap:8px;margin-bottom:14px}.editor-heading>select{width:0;flex:1;padding:7px 30px 7px 12px;border-radius:14px;font-size:13px;background-color:#202d35;background-position:right 10px center}.properties .icon-button{width:28px;height:28px;font-size:22px}.visual-material{gap:12px}.texture-slots{grid-template-columns:repeat(2,56px);width:124px;flex:0 0 124px;gap:12px}.graphic-slot,.tile-wrap{width:56px}.tile-wrap{height:56px}.properties .graphic-slot>label,.properties .material-controls label{font-size:12px;margin-bottom:8px;white-space:nowrap;color:#e2e8ec}.properties .texture-tile{border-radius:12px}.properties .texture-remove{width:18px;height:18px;line-height:14px;font-size:16px;right:-5px;top:-5px}.material-controls{display:grid;grid-template-columns:54px minmax(75px,1fr);gap:12px;min-width:141px;align-items:start}.properties .color-control{display:block;margin:0}.properties .color-control label{display:block}.properties .color-control input[type=color]{width:36px;height:28px;padding:2px;border:0;border-radius:9px}.properties .slider-control{padding:0;min-width:0}.properties .slider-control .range-label{display:flex;flex-wrap:wrap;justify-content:space-between}.properties .slider-control output{font-size:12px}.properties .slider-control input{width:100%;accent-color:#edf3f6}.texture-tile .tile-empty b{font-size:24px}.texture-tile .tile-empty span{font-size:10px}
.right .validation-panel{padding:18px 18px 8px}.validation-panel>.section-heading{font-size:12px;letter-spacing:0;color:#edf2f4}#validationSummary{font-size:12px;line-height:1.5}.validation-row{padding:6px 0;border-top:1px solid #ffffff05}.validation-title{font-size:14px;line-height:1.35;color:#edf2f4}.check-icon{width:20px;height:17px;line-height:17px;font-size:13px}.check-icon.pass{background:#58ad49;color:white}.check-icon.review{background:#f3c245;color:white}.check-icon.fail{background:#e75a59;color:white}.validation-detail{font-size:12px}.right .hint{border:0;padding:12px 0 0;margin-top:8px;font-size:12px;color:#a9b3ba;line-height:1.5}.submission-footer{padding:18px 20px 24px;background:transparent;border:0}.submission-footer #sendAsset:not(:disabled){background:#3986f5;color:white;border:0;border-radius:28px;box-shadow:0 5px 15px #1670ec33;font-weight:600}.submission-footer #sendAsset:not(:disabled):hover{background:#5599fa}.submission-footer #sendAsset:disabled{background:#35414a;color:#7f909a;border-radius:28px}
@media(max-width:1250px){main{grid-template-columns:240px minmax(320px,1fr) 270px;gap:10px;padding-inline:10px}main:has(>.right[hidden]){grid-template-columns:240px minmax(320px,1fr)}.info-file{padding-inline:12px;gap:7px}.info-file strong{font-size:12px}.right .validation-panel{padding-inline:14px}.camera-actions{gap:5px}.camera-actions .float-button{padding:9px 10px;font-size:12px}}
@media(max-width:900px){main{grid-template-columns:220px minmax(320px,1fr);height:auto;min-height:calc(100dvh - 64px)}main:has(>.right[hidden]){grid-template-columns:220px minmax(320px,1fr)}.workspace{grid-template-rows:65dvh 270px}.right{grid-column:1/-1;max-height:60dvh;display:flex}.left{max-height:calc(65dvh + 284px)}.camera-actions{flex-wrap:wrap;justify-content:flex-end}.viewport-top{align-items:flex-start}}
@media(max-width:580px){header{padding-inline:16px}main,main:has(>.right[hidden]){display:block;padding:8px}.left{max-height:300px;margin-bottom:12px}.workspace{grid-template-rows:60dvh 270px}.right{margin-top:12px}.left section{display:block;width:auto}.header-actions>span{display:none}}
/* Keep material labels distinct even in the compact card. */
.asset-card.active{flex-basis:720px}.material-controls{grid-template-columns:66px minmax(80px,1fr);gap:14px;min-width:160px}.properties .color-control input[type=color]{height:28px}.properties .slider-control .range-label{min-height:34px;align-content:space-between}.properties .slider-control .range-label label{margin-bottom:0}.asset-card .part-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.asset-header .asset-file-size{font-size:12px;color:var(--muted);margin-top:4px;line-height:1.5}
/* Match the colour swatch to the texture previews and shorten material sliders. */
.properties .color-control input[type=color]{width:56px;height:56px;padding:0;border:0;border-radius:12px;overflow:hidden;cursor:pointer;background:transparent;appearance:none;-webkit-appearance:none}
.properties .color-control input[type=color]::-webkit-color-swatch-wrapper{padding:0}
.properties .color-control input[type=color]::-webkit-color-swatch{border:0;border-radius:12px}
.properties .color-control input[type=color]::-moz-color-swatch{border:0;border-radius:12px}
.material-controls{grid-template-columns:66px 80px;min-width:160px;flex:0 0 160px}
.properties .slider-control{width:80px;max-width:80px}
.properties .slider-control .range-label{min-height:50px}
/* One shared corner radius for texture and base-colour previews. */
.properties{--material-preview-radius:16px}
.properties .texture-tile,.properties .texture-tile.has-texture,.properties .color-control input[type=color]{border-radius:var(--material-preview-radius)}
.properties .color-control input[type=color]::-webkit-color-swatch{border-radius:var(--material-preview-radius)}
.properties .color-control input[type=color]::-moz-color-swatch{border-radius:var(--material-preview-radius)}
/* Give the base colour a clear gap after the texture maps. */
.properties .visual-material{gap:24px}
/* Equal spacing between both maps and the base-colour control. */
.properties .texture-slots{gap:24px;width:136px;flex-basis:136px}

/* Emission slider: 20 percent longer than the compact 80px control. */
.material-controls:has(#emissionControls:not([hidden])){grid-template-columns:66px 96px;min-width:176px;flex-basis:176px}
.properties #emissionControls{width:96px;max-width:96px}
/* Keep each material slider label and value together on one line. */
.properties .material-controls,.properties .material-controls:has(#emissionControls:not([hidden])){grid-template-columns:66px 132px;min-width:212px;flex-basis:212px}
.properties .slider-control,.properties #emissionControls{width:132px;max-width:132px}
.properties .slider-control .range-label{flex-wrap:nowrap;align-items:flex-start;gap:8px}
.properties .slider-control .range-label label,.properties .slider-control output{white-space:nowrap;flex:none}

.left .selection-stats{border-left:0}
/* Align the material reset with the right edge of the slider below. */
.properties .editor-heading{width:372px;max-width:100%}
/* Wider preview with matching 10px inner gutters at left, bottom and right. */
.asset-card.active{grid-template-columns:140px 192px minmax(0,1fr)}
.asset-card.active .asset-preview{padding:10px 0 10px 10px}
.asset-card.active .asset-preview .asset-select{width:100%;height:100%;min-height:0}
.asset-card.active .asset-preview .asset-select img{width:100%;height:100%;object-fit:contain}
.asset-card.active .properties{padding-right:10px}
/* Leave the slider end inside the reset icon, with more space under the selector. */
.properties .material-controls,.properties .material-controls:has(#emissionControls:not([hidden])){grid-template-columns:66px 124px;min-width:204px;flex-basis:204px}
.properties .slider-control,.properties #emissionControls{width:124px;max-width:124px}
.properties .editor-heading{margin-bottom:22px}
/* Give names 30px more room without narrowing the preview or materials. */
.asset-card.active{flex-basis:750px;grid-template-columns:140px 222px minmax(0,1fr)}
.asset-card #tree{gap:2px}
.asset-card .part-row{padding-top:1px;padding-bottom:1px}
.asset-card .part-name{padding-top:4px;padding-bottom:4px}
.asset-card .part-eye{height:27px}
/* Validation summary and expandable categories. */
.right .validation-panel{padding:22px 14px 12px}.validation-panel>.section-heading{font-size:18px;font-weight:600;letter-spacing:0;margin:0 4px 20px;align-items:center}.validation-panel #runValidation{font-size:12px;font-weight:400}
.validation-key{display:none}
#validationSummary.validation-overview{background:linear-gradient(140deg,#35404a88,#222c3588);border:1px solid #ffffff12;border-radius:22px;padding:18px 14px;margin-bottom:18px;color:#eef1f4}
.validation-result{display:flex;align-items:center;gap:12px}.result-badge{width:42px;height:42px;flex:none;border-radius:50%;display:grid;place-items:center;font-size:29px;font-weight:600;border:1px solid #ffffff24}.result-badge.pass{background:#347451;color:#eaffef}.result-badge.review{background:#6e5c2e;color:#ffdf90}.result-badge.fail{background:#8a4044;color:#ffe5e6}.validation-result>div{min-width:0}.validation-result strong{display:block;font-size:17px;font-weight:600;line-height:1.25}.validation-result span:not(.result-badge){display:block;font-size:12px;color:#bec7d1;margin-top:5px}
.validation-progress{display:flex;overflow:hidden;height:10px;border-radius:10px;background:#ffffff08;margin:20px 0 16px;gap:1px}.validation-progress .pass{background:#53daa2}.validation-progress .review{background:#f0cb7d}.validation-progress .fail{background:#ef6e74}
.validation-counts{display:flex;justify-content:space-between;gap:5px;font-size:11px;color:#d4dce3;white-space:nowrap}.validation-counts b{font-size:16px;vertical-align:-1px;margin-right:2px}.validation-counts .pass{color:#67dda5}.validation-counts .review{color:#f0cb7d}.validation-counts .fail{color:#f17780}
#validationList{background:linear-gradient(135deg,#303b4480,#202a3380);border:1px solid #ffffff10;border-radius:22px;overflow:hidden}
.validation-category>summary{display:flex;align-items:center;gap:9px;list-style:none;padding:17px 12px;cursor:pointer;border-bottom:1px solid #ffffff0c}.validation-category:last-child>summary{border-bottom:0}.validation-category>summary::-webkit-details-marker{display:none}.validation-category>summary:hover{background:#ffffff04}.validation-category>summary>svg{width:22px;height:22px;flex:none;fill:none;stroke:#d3dce4;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.validation-category>summary>svg:last-child{width:12px;height:12px;transition:transform 140ms}.validation-category[open]>summary>svg:last-child{transform:rotate(90deg)}.category-name{font-size:14px;flex:1;line-height:1.4}.category-score{font-size:12px;white-space:nowrap;color:#c7d1dc;min-width:23px;text-align:right}.validation-category>summary>.check-icon{width:17px;height:17px;line-height:17px;font-size:12px}.category-checks{padding:0 12px 10px;background:#17222a66}.category-checks .validation-row{padding:10px 0}.category-checks .validation-title{font-size:13px}.category-checks .check-icon{width:17px;height:17px;line-height:17px;font-size:12px}.category-checks .validation-detail{padding-left:26px}.validation-category[open]>summary{border-bottom-color:#ffffff0a}.validation-category[open]:not(:last-child){border-bottom:1px solid #ffffff10}
.validation-counts{font-size:12px;flex-wrap:wrap;row-gap:6px}
.validation-counts{margin-inline:-7px}
/* Keep measurements on the right when the viewport hint is hidden. */
.viewport-bottom #measureToggle{margin-left:auto}

.visualization-options #measureToggle{margin:3px 3px 3px 4px}

.validation-confirmation{display:flex;align-items:center;gap:8px;margin:12px 0 2px;color:var(--text);font-size:13px;cursor:pointer}
.validation-confirmation input{flex:none;margin:0}

.validation-confirmation{justify-content:space-between;width:100%}
.validation-confirmation input{margin-left:auto}
.validation-detail .validation-confirmation{display:flex;justify-content:space-between;align-items:center}

.orientation-options{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0 3px;white-space:normal}
.validation-row .orientation-choice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:100%;min-width:0;padding:8px 3px;margin:0;border:1px solid #66768166;background:#ffffff04;border-radius:16px;color:#e6eef1;font-size:12px;line-height:1.3}
.orientation-choice svg{display:block;width:100%;height:78px;max-width:92px}.orientation-choice span{white-space:nowrap}.validation-row .orientation-choice:hover{background:#ffffff0b;border-color:#9caeb5}
.validation-row .orientation-choice[data-pose=upright][aria-pressed=true]{border-color:#71d7a0;background:#2d6b4b55;color:#b3ebca}
.validation-row .orientation-choice[data-pose=horizontal][aria-pressed=true]{border-color:#ed8085;background:#7c394455;color:#ffb7bd}

/* Centre the title/version independently from the logo and header actions. */
header{display:grid;grid-template-columns:1fr auto 1fr;gap:20px}
header .brand{justify-self:start}
.header-title{display:flex;align-items:center;justify-content:center;gap:10px;white-space:nowrap;font-size:20px;font-weight:600;color:var(--text)}
.header-title .viewer-version{font:inherit;color:inherit;margin:0;padding:0;border:0}
header .header-actions{justify-self:end}
aside.right[hidden]{display:none!important}
@media(max-width:800px){header{gap:10px;padding-inline:16px}.header-title{font-size:16px;gap:8px}.header-actions>span{display:none}.header-actions button{margin-left:0}}
/* Empty galleries show only the workspace; keep the version quiet beside the title. */
main:not(:has(.asset-card))>aside.left{display:none}
main:not(:has(.asset-card)){grid-template-columns:minmax(0,1fr)}
.header-title .viewer-version{font-size:12px;font-weight:400;line-height:1.5;color:#8e9a9f}
main:not(:has(.asset-card)){grid-template-columns:minmax(0,1fr)!important}
main:not(:has(.asset-card))>.workspace{grid-column:1;grid-row:1}
/* Align the version with the title's text baseline. */
.header-title{align-items:baseline}

header .brand-logo{width:250px;height:auto;max-height:36px;object-fit:contain;filter:none}
@media(max-width:800px){header .brand-logo{width:160px}}

/* Global messages sit directly beneath the centred application title. */
body>#notice,body>#loading{position:fixed;top:72px;bottom:auto;left:50%;transform:translateX(-50%);z-index:50;max-width:min(560px,calc(100vw - 32px));padding:12px 18px;font-size:14px;border-radius:16px}
/* Match the top camera-action capsules and their vertical centre. */
body>#notice,body>#loading{top:92px;border:0;outline:0;border-radius:999px;padding:10px 18px;background:#293943f2;color:var(--text);line-height:19.5px;box-shadow:0 5px 14px #0003}

/* Action-required errors stand out while keeping the capsule treatment. */
body>#notice[data-critical=true],body>#loading[data-startup-error]{background:#853e49f5;color:#fff0f2;box-shadow:0 5px 18px #45141c55;font-weight:500}
/* Equal gutters around the preview of an unselected asset. */
.asset-card:not(.active) .asset-preview{padding:10px}
.asset-card:not(.active) .asset-preview .asset-select{width:100%;height:100%;min-height:0}
.asset-card:not(.active) .asset-preview .asset-select img{width:100%;height:100%;object-fit:contain}
