/* Layout only: all colors map to the canonical semantic theme. */
.module-panel{background:var(--c-surface);border:1px solid var(--c-line);border-radius:14px;min-width:0;overflow:hidden}
.module-page-head,.module-panel-head,.module-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.module-page-head{margin:8px 0 24px}.module-page-head h2{font-size:28px;margin:0 0 8px}.module-page-head p,.module-panel-head p{color:var(--c-muted);line-height:1.65;margin:4px 0 0}
.module-panel-head{padding:20px}.module-panel h3,.module-section-head h3{font-size:15px;margin:0;font-weight:650}.module-section-head h3 span{color:var(--c-muted);font-weight:400;margin-left:8px}
.module-panel table{border-collapse:collapse;width:100%;font-size:14px}.module-panel th,.module-panel td{padding:12px 16px;text-align:left;border:0;border-bottom:1px solid var(--c-line)}.module-panel th{background:var(--c-surface2);color:var(--c-muted);font-size:12px;white-space:nowrap;font-weight:550}.module-panel td small{display:block;color:var(--c-muted);font-size:12px;margin-top:4px}.module-panel tbody tr:hover{background:var(--c-surface2)}
.module-panel .scroll{min-width:0;max-width:100%;overflow:auto}.module-panel strong,.module-record-link b{font-weight:600}.module-panel td strong{display:block;max-width:240px;overflow-wrap:anywhere}
.module-foot{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:12px 16px;color:var(--c-muted);font-size:12px}.module-foot label{display:flex;gap:6px;align-items:center}.module-foot input{width:180px;min-width:0}.module-foot select{width:auto}
.module-state{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--c-muted);white-space:nowrap}.module-state::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.module-state.good{color:var(--c-good)}.module-state.warn{color:var(--c-warn)}
.module-empty{padding:20px;color:var(--c-muted);font-size:13px;line-height:1.7}.module-scope-note{font-size:12px;line-height:1.7;color:var(--c-muted);margin:0;padding:0 20px 16px;overflow-wrap:anywhere}
.module-record-link{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;gap:12px;background:transparent;border:0;border-bottom:1px solid var(--c-line);color:var(--c-ink);padding:14px 0;cursor:pointer;min-width:0}.module-record-link span:first-child{min-width:0}.module-record-link b{display:block;font-size:13px;line-height:1.55;overflow-wrap:anywhere}.module-record-link small{display:block;color:var(--c-muted);font-size:12px;margin-top:4px;line-height:1.55}.module-record-link:hover{background:var(--c-surface2)}.module-record-link>span:last-child{color:var(--c-primary)}
.module-attention{border-top:1px solid var(--c-line);padding:16px;color:var(--c-muted);font-size:12px;line-height:1.7}.module-attention b{font-size:13px;color:var(--c-ink)}.module-attention p{margin:6px 0 0}.module-context-return{margin-bottom:12px}
#view-region .geo-main-grid{grid-template-columns:minmax(0,7fr) minmax(260px,3fr);gap:20px;align-items:start}#view-region .geo-side{gap:20px;height:auto;grid-template-rows:auto auto}#view-region .geo-panel,#view-region .geo-globe-card{box-shadow:none;background:var(--c-surface);border:1px solid var(--c-line);border-radius:14px}#view-region .geo-globe-card{min-height:470px}#view-region .geo-globe-card canvas{max-width:100%}#view-region .geo-detail{padding:16px}
.geo-record-layout{display:grid;grid-template-columns:minmax(0,7fr) minmax(260px,3fr);gap:20px;margin-top:20px;align-items:start}.geo-record-column{display:grid;gap:20px;min-width:0}.geo-related-panel #geo-related-events{padding:0 20px 16px}.geo-record-panel table{min-width:580px}#view-region .geo-table-card{margin:0;box-shadow:none}
#chan-editor .channel-profile-layout{display:grid;grid-template-columns:minmax(205px,25fr) minmax(280px,43fr) minmax(230px,32fr);gap:20px;align-items:start;background:transparent;border:0;box-shadow:none}
#chan-editor .channel-tree-panel,#chan-editor .channel-detail-panel,#chan-editor .channel-related-panel{min-width:0;background:var(--c-surface);border:1px solid var(--c-line);border-radius:14px;box-shadow:none;overflow:hidden}
#chan-editor .channel-detail-panel{position:static;top:auto;max-height:none}#chan-editor .channel-tree-panel{position:sticky;top:96px}#chan-editor .channel-tree{max-height:calc(100vh - 360px);overflow:auto}#chan-editor .channel-panel-head{padding:16px 20px;border-bottom:1px solid var(--c-line);background:transparent;flex-wrap:wrap;gap:6px}#chan-editor .channel-panel-head .meta{font-size:11px}
#chan-editor .channel-toolbar{margin:0;padding:16px;display:grid;grid-template-columns:minmax(0,1fr);gap:12px;border:0;background:transparent;border-radius:0}#chan-editor .channel-toolbar input,#chan-editor .channel-toolbar select{width:100%;min-width:0}#chan-editor .channel-tree-actions{display:flex;gap:8px;padding:0 16px 12px}#chan-editor .channel-context-bar{margin:0;padding:16px 20px;background:transparent;border:0;border-bottom:1px solid var(--c-line);border-radius:0;display:block}#chan-editor .channel-context-help{display:none}#chan-editor .channel-breadcrumb{flex-wrap:wrap;overflow-wrap:anywhere}
#chan-editor .channel-detail-body{padding:20px;max-height:none;overflow:visible}#chan-editor .channel-detail-header{padding:0;background:transparent;border:0;box-shadow:none}#chan-editor .channel-form-grid{grid-template-columns:minmax(0,1fr)}#chan-editor .channel-detail-body .fld{min-width:0}#chan-editor .channel-detail-body input,#chan-editor .channel-detail-body select,#chan-editor .channel-detail-body textarea{min-width:0;max-width:100%}#chan-editor .channel-actions{flex-wrap:wrap}#chan-editor .channel-detail-body .channel-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#chan-editor .channel-related-panel .module-scope-note{padding-top:16px}.channel-related-group{padding:16px 20px;border-top:1px solid var(--c-line)}.channel-related-group .module-empty{padding:12px 0 0}.channel-related-group .module-section-head{align-items:center;gap:8px}.channel-related-group .toolbtn{font-size:11px;padding:5px 8px}.channel-mobile-panes{display:none}
/* Original config nodes are reparented to the actual page, keeping event handlers and IDs. */
#view-ai-console .ai-console-embedded{position:static;transform:none;width:100%;max-width:none;height:auto;max-height:none;border:0;box-shadow:none;background:transparent;visibility:visible;display:block;inset:auto;z-index:auto;overflow:visible}
#view-ai-console .event-ai-drawer-head{padding:0 0 16px;border:0;background:transparent;justify-content:flex-end}#view-ai-console .event-ai-drawer-head>div:first-child{display:none}#view-ai-console .event-ai-drawer-body{padding:0;display:block;overflow:visible}
.ai-console-layout{display:grid;grid-template-columns:minmax(160px,17fr) minmax(300px,43fr) minmax(290px,40fr);gap:20px;align-items:start}.ai-console-modules{background:var(--c-surface);border:1px solid var(--c-line);border-radius:14px;padding:16px 12px;position:sticky;top:96px;min-width:0}.ai-console-modules h3{font-size:13px;margin:4px 12px 12px;color:var(--c-muted)}
#view-ai-console .event-ai-scope-tabs{display:flex;flex-direction:column;border:0;padding:0;margin:0;gap:6px;background:transparent;overflow:visible}#view-ai-console .event-ai-scope-tabs button{width:100%;display:flex;flex-direction:column;align-items:flex-start;text-align:left;border:0;border-radius:8px;padding:12px;font-size:13px;color:var(--c-ink);background:transparent;white-space:normal;height:auto;min-height:56px}#view-ai-console .event-ai-scope-tabs button.active{background:var(--c-primary-soft);color:var(--c-primary);box-shadow:none}#view-ai-console .event-ai-scope-tabs button small{font-size:11px;margin-top:4px;color:var(--c-muted)}#view-ai-console [hidden]{display:none}
#view-ai-console .event-ai-scope-pane{display:none;padding:0 20px 20px;border:0;background:transparent}#view-ai-console .event-ai-scope-pane.active{display:block}#view-ai-console .event-ai-panel{padding:0 0 16px;border:0;background:transparent;box-shadow:none}#view-ai-console .event-ai-panel h3{font-size:13px}#view-ai-console .event-ai-panel p{font-size:12px;color:var(--c-muted);line-height:1.65}
#view-ai-console .event-ai-connection-group{border:0;border-top:1px solid var(--c-line);border-radius:0;background:transparent;padding:16px 0;margin:0}#view-ai-console .event-ai-keyrow{display:flex;gap:8px;min-width:0}#view-ai-console .event-ai-keyrow input{flex:1;width:0;min-width:0}#view-ai-console .event-ai-connection-head{flex-wrap:wrap}#view-ai-console input,#view-ai-console select,#view-ai-console textarea{max-width:100%;min-width:0}#view-ai-console .event-ai-status{background:var(--c-surface2);color:var(--c-ink);border:0;font-size:12px;padding:12px;overflow-wrap:anywhere}#view-ai-console .event-ai-status.bad{color:var(--c-bad)}#view-ai-console .event-ai-status.good{color:var(--c-good)}
#view-ai-console .event-ai-drawer-actions{padding:16px 20px;display:flex;flex-wrap:wrap;border-top:1px solid var(--c-line);gap:8px}#view-ai-console .event-ai-security{margin:0;padding:0 20px 20px;font-size:11px;color:var(--c-muted);overflow-wrap:anywhere}#view-ai-console .ai-console-prompts>[data-ai-prompt-pane]{padding:0 20px}#view-ai-console .ai-console-prompts textarea{min-height:260px;line-height:1.65;font-size:13px;resize:vertical}#ai-console-prompt-save{margin:16px 20px}#ai-console-prompt-feedback{font-size:12px;color:var(--c-muted);padding:0 20px 16px;margin:0}.ai-console-history{margin-top:20px}.ai-console-history table{min-width:680px}
@media(max-width:1180px){#chan-editor .channel-profile-layout{grid-template-columns:minmax(210px,1fr) minmax(0,2fr)}#chan-editor .channel-related-panel{grid-column:2}.ai-console-layout{grid-template-columns:160px minmax(0,1fr)}.ai-console-prompts{grid-column:2}#view-region .geo-main-grid,.geo-record-layout{grid-template-columns:minmax(0,2fr) minmax(240px,1fr)}}
@media(max-width:900px){#view-region .geo-main-grid,.geo-record-layout{grid-template-columns:minmax(0,1fr)}#view-region .geo-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}#view-region .geo-globe-card{min-height:420px}.module-page-head h2{font-size:24px}.channel-profile-layout .channel-panel-head .meta{display:none}.ai-console-modules{position:static}.ai-console-layout{gap:16px}}
@media(max-width:680px){#chan-editor .channel-profile-layout{display:block}#chan-editor .channel-tree-panel{position:static}#chan-editor .channel-profile-layout>div,#chan-editor .channel-profile-layout>aside{display:none}#chan-editor .channel-profile-layout[data-mobile-pane="tree"]>.channel-tree-panel,#chan-editor .channel-profile-layout[data-mobile-pane="profile"]>.channel-detail-panel,#chan-editor .channel-profile-layout[data-mobile-pane="related"]>.channel-related-panel{display:block}.channel-mobile-panes{display:flex;gap:8px;margin-bottom:16px}.channel-mobile-panes button.active{color:var(--c-primary);background:var(--c-primary-soft);border-color:var(--c-primary)}#chan-editor .channel-tree{max-height:60vh}#view-region .geo-side{grid-template-columns:minmax(0,1fr)}#view-region .geo-globe-card{min-height:360px}.ai-console-layout{grid-template-columns:minmax(0,1fr)}.ai-console-prompts{grid-column:auto}#view-ai-console .event-ai-scope-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}#view-ai-console .event-ai-scope-tabs button{padding:10px}.ai-console-modules{padding:12px}.module-page-head{flex-direction:column;gap:12px}.module-panel-head{padding:16px}.module-panel td,.module-panel th{padding:10px 12px}.module-foot input{width:145px}.module-page-head p{font-size:13px}.geo-record-layout{gap:16px}.module-context-return{max-width:100%}}
#view-ai-console .event-ai-drawer-head{display:none}#view-ai-console #event-ai-done{display:inline-flex}.ai-console-advanced{margin:12px 0;border-top:1px solid var(--c-line);padding-top:12px}.ai-console-advanced summary{color:var(--c-primary);font-size:13px;cursor:pointer;margin-bottom:8px}
#view-ai-console #event-ai-scope-tabs button[hidden]{display:none}#view-ai-console #event-ai-scope-tabs{position:static;backdrop-filter:none}#view-ai-console .event-ai-drawer-actions{display:flex}#view-region .geo-rank{max-height:260px}#view-region .geo-side>.geo-panel:first-child{grid-template-rows:auto auto}#view-region .geo-detail-item span{font-size:11px}
#view-channels .channel-page-card{background:transparent;border:0;box-shadow:none;overflow:visible}#view-channels .channel-page-card>.hd{padding:0 0 16px;min-height:40px;background:transparent}#chan-editor .channel-profile-layout{padding:0}
#view-region.resource-loading .geo-main-grid::before{content:"正在加载地图与区域数据…";color:var(--c-muted);font-size:13px;padding:16px}
