/* Layout only; the original Sylva scene remains unmodified. */
body #recognitionPage,body #library,body #nameplates,body #historyPanel{top:115px;bottom:68px;margin:0}
body #recognitionPage{grid-template-columns:minmax(275px,28%) minmax(0,1fr);align-items:stretch;gap:12px;padding:0 1.6vw}
body #library,body #nameplates,body #historyPanel{position:fixed;left:1.6vw;right:1.6vw;width:auto;max-width:none;max-height:none;overflow:auto;padding:22px;z-index:7}
.card,.page-surface{background:rgba(248,252,247,.97);border-radius:22px;box-shadow:0 15px 50px #12251935}
body #library,body #nameplates,body #historyPanel{height:calc(100dvh - 183px);box-sizing:border-box}
.card h2,.page-surface h2{font-size:21px;font-weight:600}.card,.page-surface{font-size:14px}.card label,.page-surface label{font-size:13px}select[multiple] option:checked{background:#d4e9db linear-gradient(#d4e9db,#d4e9db);color:#163e2b}
#library[data-view=schedule] #records button{display:inline-block!important}#library[data-view=schedule] td,#library[data-view=schedule] th{display:table-cell!important}
#recognitionPage aside{overflow:auto}#recognitionPage .results{display:flex;flex-direction:column;min-width:0}#recognitionPage .results .tablewrap{flex:1;max-height:none;min-height:150px}
#cables{min-height:145px;resize:vertical}.result-filters input{flex:1;min-width:150px}.recognition-progress{border-top:1px solid #cfdbd1;margin-top:20px;padding-top:16px;font-size:13px}.recognition-progress progress{width:100%;margin-top:12px;accent-color:#07835c}
.stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}.stat-tile{padding:16px;border-radius:16px;border:1px solid #d4e4d9;background:linear-gradient(130deg,#f0faf3,#ffffffa8);font-size:13px}.stat-tile strong{display:block;font-size:26px;color:#126242;margin-top:6px}
.plate-workflow{display:grid;grid-template-columns:minmax(280px,35%) minmax(0,1fr);gap:18px}.plate-settings,.plate-preview{border:1px solid #dce5da;border-radius:18px;padding:18px;min-width:0;background:#ffffffa3}.plate-preview .tablewrap{max-height:48vh}.plate-preview td{white-space:pre-line}.plate-preview td:last-child{min-width:240px}.filter-grid select{min-height:65px;height:82px}#nameplatesSummary{white-space:pre-wrap;font-size:12px}#plateFilters{margin:14px 0}#library .register-section{margin-top:24px}#libraryStats{grid-template-columns:repeat(4,minmax(0,1fr))}
#historyPanel .tablewrap{max-height:42vh}#historyPanel input[type=checkbox]{width:18px}#historyEditor{width:min(900px,92vw)}#historyEditText{width:100%;height:55vh;font:13px/1.5 monospace}#historyQueryResult{white-space:pre-wrap;max-height:35vh;overflow:auto}.history-controls{border-top:1px solid #cdd7cb;margin-top:20px;padding-top:15px}#historyMessage{font-size:13px}
@media(max-width:1150px){body #recognitionPage,body #library,body #nameplates,body #historyPanel{top:172px}}
@media(max-width:1150px){body #library,body #nameplates,body #historyPanel{height:calc(100dvh - 240px)}}
@media(max-width:800px){body #recognitionPage,body #library,body #nameplates,body #historyPanel{top:152px;bottom:78px}.plate-workflow,body #recognitionPage{grid-template-columns:1fr}.stat-grid,#libraryStats{grid-template-columns:repeat(2,1fr)}#recognitionPage aside{overflow:visible}.filter-grid{grid-template-columns:1fr 1fr}.card{padding:16px}}

/* V3.3 revision — real data layouts aligned with the supplied four references. */
body #recognitionPage,body #library,body #nameplates{bottom:48px}body #library,body #nameplates{height:calc(100dvh - 163px)}
.icon-heading{display:flex;gap:12px;align-items:center}.icon-heading:before{content:'▤';display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:linear-gradient(135deg,#05aa70,#006742);color:#fff;box-shadow:0 3px 10px #007a4924;font-size:23px;font-weight:400}
.section-subtitle{margin:6px 0 17px 50px;color:#7d8686;font-size:12px;line-height:1.6}.input-tools{display:flex;gap:6px;float:right;margin-top:-7px}.input-tools button{font-size:12px;padding:5px 9px}.drop-input{width:100%;margin-top:12px;border:1px dashed #b7d6c8;background:#f3faf7!important;min-height:62px;color:#1f7651!important;box-shadow:none!important}
#recognitionPage aside label{margin-top:16px}#cables{min-height:140px}#query{background:linear-gradient(110deg,#00986a,#006542);border-color:#0d956b;box-shadow:0 5px 12px #05825422;font-size:16px;font-weight:600}
.recognition-progress{background:#fff9;margin:20px -12px -8px;padding:15px 12px;border-radius:14px}.recognition-progress .toolbar{margin-bottom:10px}.recognition-progress h3{margin:0;font-size:14px;flex:1}.recognition-progress button{padding:3px 7px;font-size:12px}.recognition-steps{display:flex;justify-content:space-between;gap:6px;font-size:10px;margin-top:12px;color:#4d7862}.progress-log{font-size:11px;line-height:1.9;max-height:120px;overflow:auto;margin-top:12px;color:#657577}
.results>.toolbar:first-child{flex-wrap:wrap}.results>.toolbar:first-child h2{white-space:nowrap;font-size:19px}.results #resultSearch{flex:1;min-width:150px;max-width:400px;margin:0;font-size:12px}.results>.toolbar:first-child button{padding:9px 12px}.field-filter-panel{border:1px solid #dce9e3;background:#edf5f1b0;border-radius:13px;padding:13px 16px;margin-bottom:12px}.field-filter-panel h3{font-size:13px;margin:0}.field-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.field-filter-grid label{font-size:11px;margin-top:8px}.field-filter-grid input{font-size:12px;padding:9px}.quick-filters{font-size:12px;gap:7px}.quick-filters button{border-radius:25px;padding:5px 12px;font-size:12px}.quick-filters button.active,.type-tabs button.active{background:#087b54;color:white;border-color:#087b54}
.results td,.results th{font-size:12px;padding:11px 9px}.results td{min-width:65px}.results td:first-child{min-width:24px}.results input[type=checkbox],#records input[type=checkbox]{width:16px;height:16px;padding:0;margin:2px;accent-color:#098659}.result-badge{display:inline-block;white-space:nowrap;color:#0a8860;background:#e0f7eb;border-radius:20px;padding:3px 8px;font-size:11px}.result-badge.warning{color:#b57413;background:#fff2d9}.results .tablewrap{border:1px solid #dfebe4;border-radius:12px}.results td button{font-size:11px;white-space:nowrap}
#library>.toolbar:first-child{flex-wrap:wrap}#library>.toolbar:first-child h2{margin-right:auto}#library>.toolbar:first-child button{font-size:12px;padding:10px 12px}.zone-toolbar{justify-content:flex-start;background:#ffffff80;border-radius:10px;padding:8px;font-size:12px}.zone-toolbar button{font-size:11px;padding:6px 9px}.zone-toolbar select{min-width:160px}.surface-section{border:1px solid #e0eae4;border-radius:17px;padding:16px;background:#ffffffb8;margin-top:16px}.surface-section .toolbar h3{margin:0 auto 0 0}.surface-section #search{margin:0;width:40%;font-size:12px}.surface-section table{font-size:12px}.surface-section td,.surface-section th{padding:10px;min-width:45px}.surface-section h3{font-size:17px}.surface-section .tablewrap{border:1px solid #e0eae4;border-radius:12px}.record-actions{position:relative;display:inline-block}.record-actions summary{cursor:pointer;font-size:19px;padding:0 10px;list-style:none}.record-actions[open]{background:#f3faf6;border-radius:10px}.record-actions button{display:block!important;width:100%;text-align:left}.stat-tile:nth-child(2){background:linear-gradient(120deg,#edf4ff,#fff)}.stat-tile:nth-child(3){background:linear-gradient(120deg,#f5f1ff,#fff)}.stat-tile:nth-child(2) strong{color:#306dbd}.stat-tile:nth-child(3) strong{color:#7454bd}.stat-grid{margin:16px 0}.stat-tile{padding:16px 20px}
.workflow-steps{display:flex;list-style:none;padding:15px 18px;margin:16px 0;background:#ffffffa0;border:1px solid #e2ebe6;border-radius:16px;justify-content:space-between;gap:12px}.workflow-steps li{display:flex;gap:14px;align-items:center;font-size:13px;font-weight:600}.workflow-steps b{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#edf1ef;border:1px solid #d4ddd8}.workflow-steps li:first-child b{background:#008b60;color:#fff;border-color:#008b60}.plate-workflow{grid-template-columns:minmax(280px,35%) minmax(0,1fr)}.plate-settings h3,.plate-preview h3{font-size:16px;margin:0 0 16px}.plate-settings label{margin-top:10px}.plate-settings>.hint{font-size:11px;line-height:1.6;margin:8px 0}.filter-title{margin-top:20px!important;padding-top:18px;border-top:1px solid #e1e9e4}.plate-settings #loadPlateFilters{float:right;margin-top:-48px;font-size:12px}.filter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.filter-grid label:last-child{grid-column:1/-1}.filter-grid select{font-size:12px;height:65px;min-height:65px;padding:4px}.plate-settings #nameplatesGenerate{margin-top:10px;width:100%}.plate-settings #clearPlateFilters{font-size:12px}.type-tabs{display:flex;gap:12px;border-bottom:1px solid #dde8e2;margin:12px 0}.type-tabs button{border:0;border-radius:8px 8px 0 0;font-size:12px}.plate-preview .tablewrap{max-height:40vh;border:1px solid #dfeae3;border-radius:12px}.plate-preview td,.plate-preview th{font-size:11px;padding:10px 8px}.plate-export{justify-content:flex-end;margin-top:12px}.plate-preview .stat-tile{padding:14px}.plate-preview .stat-tile strong{font-size:27px}
@media(max-width:1150px){body #library,body #nameplates{height:calc(100dvh - 220px)}.workflow-steps li{font-size:11px;gap:5px}.results>.toolbar:first-child h2{width:100%}.field-filter-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:800px){body #library,body #nameplates{height:calc(100dvh - 210px)}.plate-workflow{grid-template-columns:1fr}.workflow-steps{overflow:auto}.workflow-steps li{min-width:130px}.section-subtitle{margin-left:0}.results>.toolbar:first-child #resultSearch{max-width:none}.surface-section #search{width:100%}}
#nameplates .plate-workflow{max-height:calc(100dvh - 350px)}#nameplates .plate-settings,#nameplates .plate-preview{overflow:auto}#nameplatesSummary{max-height:64px;overflow:auto}#nameplates .plate-settings .hint{margin:5px 0}.plate-settings #filter-kind{height:50px;min-height:50px}#nameplates .filter-grid{gap:8px}
#nameplates .plate-workflow{height:calc(100dvh - 350px);grid-template-rows:minmax(0,1fr);min-height:0}#nameplates .plate-settings,#nameplates .plate-preview{min-height:0}#nameplates{scroll-padding-top:20px}
#nameplates>.toolbar,#nameplates>p{margin-bottom:9px}#nameplates .workflow-steps{margin:12px 0}#library .record-actions:not([open]) button{display:none!important}#library .record-actions[open]{display:block}
@media(max-width:1150px){#nameplates .plate-workflow{max-height:calc(100dvh - 405px)}}@media(max-width:800px){#nameplates .plate-workflow{max-height:none}#nameplates .plate-settings,#nameplates .plate-preview{overflow:visible}}
@media(max-width:800px){#nameplates .plate-workflow{height:auto;grid-template-rows:auto}}
.multi-trigger{display:block;text-align:left;width:100%;margin-top:7px;height:40px;overflow:hidden;text-overflow:ellipsis;padding:8px 12px!important;background:#fff9!important;box-shadow:none!important;font-size:12px!important}.multi-trigger:after{content:'⌄';float:right}.multi-picker{width:min(560px,94vw)}.multi-options{max-height:45vh;overflow:auto;margin:14px 0}.multi-options label{display:flex;align-items:center;gap:12px;margin:0;padding:9px 4px;font-weight:400}.multi-options input{width:17px;height:17px;margin:0;accent-color:#098253}.multi-picker .toolbar{justify-content:flex-end;margin-top:15px}.plate-settings .filter-title{margin-top:14px!important;padding-top:10px}.plate-settings h3{margin-bottom:10px}.plate-settings #loadPlateFilters{margin-top:-41px}.plate-settings .filter-grid label{margin:0}.plate-settings #nameplatesSummary{max-height:40px;font-size:11px}.plate-settings #filter-kind+button{max-width:100%}
/* Device aliases are a separate layer below register management. */
/* Mapping-only layout: retain the existing site palette and button styles. */
.device-mappings .mapping-manual{border:1px solid #dce6dd;border-radius:16px;background:#ffffffb8;overflow:hidden}
.device-mappings .mapping-manual>summary{padding:18px 22px;font-weight:600;background:linear-gradient(110deg,#edf6ef,#ffffffa6);border-bottom:1px solid transparent}
.device-mappings .mapping-manual[open]>summary{border-bottom-color:#dce6dd}
.device-mappings .mapping-manual>.hint{margin:18px 22px 0;color:#6b7d72}
.device-mappings .mapping-manual .mapping-form{padding:0 22px;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:18px;margin:16px 0 22px}
.device-mappings .mapping-manual-card{min-width:0;padding:18px;border:1px solid #dce6dd;border-radius:12px;background:#fff;align-self:stretch;gap:12px}
.device-mappings .mapping-manual-card>strong{color:#244d38;font-size:14px;margin-bottom:2px}
.device-mappings .mapping-manual-card input,.device-mappings .mapping-manual-card select{width:100%;box-sizing:border-box;margin:0}
.device-mappings .mapping-manual-card select{min-height:200px;padding:8px}
.device-mappings .mapping-manual-card option{padding:7px 9px;border-radius:6px}
.device-mappings .mapping-manual-card button{align-self:flex-start;margin-top:auto;min-width:150px}
.device-mappings .mapping-selection-count{color:#78877d;font-size:12px}
.device-mappings .mapping-saved{border-top:1px solid #e1e9e2;padding:20px 22px;background:#f7faf8}
.device-mappings .mapping-saved>.toolbar{margin-bottom:12px!important}
.device-mappings .mapping-saved .tablewrap{border:1px solid #e0e8e2;border-radius:10px;max-height:300px;background:white}
.device-mappings .mapping-saved td{white-space:normal;overflow-wrap:anywhere}
.device-mappings .mapping-saved th{position:sticky;top:0;z-index:1}
.device-mappings .mapping-target-cell{min-width:220px}
.device-mappings .mapping-target-cell input,.device-mappings .mapping-target-cell select{width:100%;box-sizing:border-box;margin:4px 0;min-width:0;font-size:12px}
@media(max-width:760px){.device-mappings .mapping-manual .mapping-form{grid-template-columns:1fr;padding:0 14px}.device-mappings .mapping-saved{padding:16px 14px}.device-mappings .mapping-manual>summary{padding:16px}.device-mappings .mapping-target-cell{min-width:180px}}
/* Library composition follows the supplied reference; the animated scene is unchanged. */
#library>.toolbar:first-child{gap:9px;align-items:center;margin-bottom:20px}.library-intro{flex:1 1 360px;min-width:260px}.library-intro h2{font-size:28px;margin:0 0 7px!important}.library-intro .hint{font-size:12px;line-height:1.7;margin:0 0 0 50px;color:#78857e}.section-heading-group{margin-right:auto}.section-heading-group .section-subtitle{margin:4px 0 0 50px;font-size:12px}#libraryStats .stat-tile{position:relative;padding:20px 20px 20px 92px;min-height:104px;box-sizing:border-box;overflow:hidden}#libraryStats .stat-tile:before{content:'▤';position:absolute;left:22px;top:24px;border-radius:50%;width:52px;height:52px;display:grid;place-items:center;color:#0a8457;background:#d8f5e2;font-size:29px}#libraryStats .stat-tile:nth-child(2):before{content:'▧';color:#296dde;background:#ddeaff}#libraryStats .stat-tile:nth-child(3):before{content:'↗';color:#8650ce;background:#eee1ff}#libraryStats .stat-tile:nth-child(4){background:linear-gradient(120deg,#fffaf0,#fff)}#libraryStats .stat-tile:nth-child(4):before{content:'!';color:#de921c;background:#fff0d2}#libraryStats strong{font-size:30px}#library .surface-section{padding:18px;margin-top:15px}#library .surface-section>.toolbar{margin-bottom:18px;gap:10px}#library .surface-section #search{width:280px;max-width:35%;flex:1}#recordsPager{margin-top:14px!important;margin-bottom:0!important}#recordsPager .page-size{margin:0 0 0 auto;display:flex;align-items:center;gap:8px;font-size:12px}#recordsPager select{width:90px;margin:0;padding:8px}#library th{background:#eaf1eb;color:#344d40}#registerRows td:last-child{white-space:nowrap}#registerRows select{width:260px;max-width:28vw;display:inline-block;margin-right:8px}#registerRows button{margin-left:6px}#library input[type=checkbox]{accent-color:#0b825b;width:17px;height:17px}#library .register-section>.section-subtitle{margin-top:-12px}#library .surface-section td{padding:13px 10px}#library .surface-section th{padding:12px 10px}#library .record-actions[open]{display:inline-block;position:relative}#library .record-actions[open] button{white-space:nowrap;padding:8px 12px}.surface-section .toolbar .icon-heading:before{width:34px;height:34px;background:#e1f0e5;color:#0c8150;box-shadow:none}@media(max-width:1100px){#libraryStats .stat-tile{padding-left:64px}#libraryStats .stat-tile:before{left:12px;width:40px;height:40px}.library-intro{flex-basis:100%}#library .surface-section #search{max-width:none;width:180px}.section-heading-group{flex-basis:100%}}@media(max-width:700px){#libraryStats .stat-tile{padding:15px 10px 15px 62px}#libraryStats strong{font-size:24px}#registerRows select{max-width:none}.library-intro .hint{margin-left:0}}
body #manualsPage{position:fixed;top:115px;bottom:45px;left:1.6vw;right:1.6vw;width:auto;height:calc(100dvh - 160px);max-height:none;max-width:none;margin:0;padding:16px;box-sizing:border-box;z-index:7;overflow:hidden}#manualsPage [data-shelf]{height:calc(100% - 60px)}#manualsPage iframe{width:100%;height:100%;border:0;border-radius:16px}#manualsPage select{max-width:35vw}#manualsPage .toolbar{gap:10px}
.mapping-form{display:grid;grid-template-columns:minmax(0,2fr) minmax(220px,1fr);gap:24px;margin:18px 0}.mapping-form label{display:flex;flex-direction:column;gap:10px}.mapping-form select{min-height:150px}.device-mappings .tablewrap{max-height:250px}.device-mappings h3{margin-right:auto}@media(max-width:760px){.mapping-form{grid-template-columns:1fr}}
body #threePage [data-host]{height:100%}body #threePage iframe{display:block;width:100%;height:100%;border:0;border-radius:0}body #threePage{overflow:hidden;position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:#07101c;z-index:30}body #threePage>.toolbar{display:none}body[data-view=three] #homeReturn{display:none}
body #manualsPage{inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:#202127;z-index:30}body #manualsPage [data-shelf],body #manualsPage iframe{height:100%;width:100%;border:0;border-radius:0;display:block}body[data-view=manuals] #homeReturn{display:none}
.mapping-workbench{display:grid;grid-template-columns:1fr 1.1fr;gap:16px;margin:20px 0}.mapping-pane{padding:18px;border:1px solid #dce6dd;border-radius:16px;background:#ffffffc9;min-width:0}.mapping-pane .tablewrap{max-height:410px;overflow:auto}.mapping-pane td{white-space:normal;overflow-wrap:anywhere}.mapping-stats.stat-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:20px}.mapping-stats .stat-tile{padding:20px;background:#f2faf6;border:1px solid #d6e6df;border-radius:14px}.mapping-stats strong{display:block;font-size:28px}.mapping-pane input[type=checkbox]{width:18px;height:18px;accent-color:#297251}.mapping-pane label{display:block;margin:12px 0}.mapping-pane .toolbar input{max-width:100%}.device-mappings details{margin-top:16px}.device-mappings summary{cursor:pointer;padding:10px;color:#365441}@media(max-width:1000px){.mapping-workbench{grid-template-columns:1fr}.mapping-stats.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.cable-instance-heading td{background:#e8f4ee;color:#174d39;font-weight:600;white-space:normal;padding:12px 16px;border-top:2px solid #c6e2d4}

#schemePanel{position:fixed;inset:clamp(82px,12dvh,125px) 0 28px;width:min(1380px,96vw);height:auto;max-height:none;margin:0 auto;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
#schemeForm,#schemePreview{min-width:0}
#schemePreviewGroups{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-top:12px}
#schemePreviewGroups .scheme-paper-title{margin:0;font-family:SimSun,serif;font-size:17px;text-align:center;color:#171717}
#schemePreviewGroups .tablewrap{background:white;max-height:none;min-width:0;width:100%;overflow-x:auto;border-radius:0}
#schemePreviewGroups table{table-layout:fixed;min-width:790px;border-collapse:collapse;font-family:SimSun,"宋体",serif;color:#171717}
#schemePreviewGroups td,#schemePreviewGroups th{position:static;min-width:0;padding:6px;border:1px solid #262626;white-space:pre-wrap;overflow-wrap:anywhere;vertical-align:middle;background:white}
