/* Compact layouts keep business content reachable on tablet and phone screens. */
@media (max-width: 1366px) {
  #dashboardScene .commerce-card { padding: 16px; }
  #dashboardScene .monetization-overview { display: grid; gap: 16px; min-width: 0; padding-top: 8px; }
  #dashboardScene .monetization-overview-cycle { display: grid; gap: 5px; font-size: 11px; line-height: 1.6; color: #91a3a7; }
  #dashboardScene .monetization-overview-cycle > b { font-size: 14px; font-weight: 600; letter-spacing: .02em; color: #e0e9e9; }
  #dashboardScene .monetization-overview-cycle > span:last-child { margin: 0; font-size: 10px; }
  #dashboardScene .monetization-overview-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; width: 100%; margin: 0; padding: 12px 0 0; border: 1px solid rgba(200,166,106,.2); border-radius: 10px; background: rgba(200,166,106,.05); color: #9fb0b2; cursor: pointer; text-align: center; }
  #dashboardScene .monetization-overview-counts > span { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 0 4px 12px; font-size: 10px; line-height: 1.5; }
  #dashboardScene .monetization-overview-counts > span + span { border-left: 1px solid rgba(200,166,106,.12); }
  #dashboardScene .monetization-overview-counts b { color: #e4c892; font-size: 23px; line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums; }
  #dashboardScene .monetization-overview-counts > strong { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; min-height: 44px; margin: 0; border-top: 1px solid rgba(200,166,106,.12); color: #d5bc8d; font-size: 11px; font-weight: 500; }
  #dashboardScene .monetization-overview-counts:focus-visible { outline: 2px solid #e4c892; outline-offset: 3px; }
  #dashboardScene .monetization-overview-list { display: grid; gap: 0; }
  #dashboardScene .monetization-overview-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.07); line-height: 1.5; }
  #dashboardScene .monetization-overview-list b { grid-row: 1 / 3; align-self: center; color: #dce6e6; font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
  #dashboardScene .monetization-overview-list span { color: #b7a174; font-size: 11px; text-align: right; }
  #dashboardScene .monetization-overview-list strong { color: #82979c; font-size: 10px; font-weight: 400; text-align: right; }
  #dashboardScene .monetization-overview-list p { margin: 0; font-size: 12px; line-height: 1.7; color: #91a3a7; }
  #dashboardScene .monetization-overview > small { color: #82979c; font-size: 10px; line-height: 1.7; }
  html:has(#dashboardScene.is-active) body { display: block; }
  body:has(#dashboardScene.is-active) #app { height: auto; overflow: visible; }
  #dashboardScene.is-active { position: relative; inset: auto; }
  body:has(#dashboardScene.is-active) .beian-footer { position: relative; display: block; height: auto; min-height: 28px; padding: 8px 16px; text-align: center; font-size: 11px; line-height: 1.5; color: #829096; }
  body:has(#dashboardScene.is-active) .beian-footer a { color: inherit; text-decoration: none; }
  #huimaiAiDock { position: relative; inset: auto !important; transform: none !important; flex: 0 0 48px; z-index: auto; }
  #huimaiAiDock .huimai-ai-launcher { width: 48px; padding: 0; gap: 0; border-radius: 12px; cursor: pointer; touch-action: manipulation; }
  #huimaiAiDock .huimai-ai-launcher span { display: none; }
  #dashboardScene .update-ticker { position: relative; inset: auto; width: 100%; max-width: 100%; height: auto; min-height: 44px; margin-top: 12px; }
  #dashboardScene .update-ticker span { white-space: normal; overflow-wrap: anywhere; }
  html.analysis-gallery #compareToggle { position: relative; inset: auto; margin: 12px 16px; max-width: calc(100% - 32px); }
  #dashboardScene .metric-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 11px; line-height: 1.5; }
  #dashboardScene .metric-legend span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
  #dashboardScene .metric-legend b { font-weight: 500; }
  #dashboardScene .metric-legend i { flex: none; width: 10px; height: 2px; background: #62c9b2; }
  #dashboardScene .metric-legend i.is-comparison { background: #819499; }
}
@media (max-width: 1366px) {
  html, html body, html.analysis-gallery body { min-width: 0; }
  body :is(.workspace-main, .workspace-content, .workspace-panel, .training-panel) { min-width: 0; }
  .workspace-topbar { grid-template-columns: minmax(0, 1fr); position: relative; gap: 12px; }
  .workspace-brand strong { white-space: normal; }
  .workspace-actions { flex-wrap: wrap; justify-content: flex-start; }
  .workspace-switcher { max-width: 100%; overflow-x: auto; justify-content: flex-start; }
  .workspace-switcher > a, .workspace-switcher > button { flex-shrink: 0; }
  .workspace-sidebar { max-width: 100%; }
  .workspace-nav a { flex-shrink: 0; }
  .workspace-app :is(.table-wrap, .data-table-wrap, .workspace-table-wrap) { max-width: 100%; overflow: auto; }
  html.analysis-gallery { --header-h: 0px; --side-w: 0px; }
  html.analysis-gallery .analysis-header { position: relative; display: flex; flex-wrap: wrap; min-height: 0; padding: 16px; gap: 16px; }
  html.analysis-gallery .analysis-brand { flex-basis: 100%; }
  html.analysis-gallery .analysis-scope { display: grid; flex: 1 1 100%; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html.analysis-gallery .analysis-scope label { width: auto; min-width: 0; grid-column: auto; }
  html.analysis-gallery .analysis-actions { display: flex; flex-wrap: wrap; width: 100%; justify-content: flex-start; gap: 8px; }
  html.analysis-gallery .analysis-actions > * { flex-shrink: 0; }
  html.analysis-gallery .analysis-index { position: relative; inset: auto; width: auto; margin: 12px 16px; flex-direction: row; overflow-x: auto; }
  html.analysis-gallery .analysis-index a { height: auto; min-height: 48px; flex: 0 0 auto; padding: 8px 16px; border: 0; }
  html.analysis-gallery .analysis-index a span { writing-mode: horizontal-tb; }
  html.analysis-gallery .analysis-main { margin: 0; padding: 0 16px; width: 100%; }
  html.analysis-gallery :is(.overview-grid, .organization-grid, .merchandise-grid, .risk-grid, .trend-calendar-layout, .company-unit-browser, .drill-hero) { grid-template-columns: minmax(0, 1fr); height: auto; }
  html.analysis-gallery :is(.overview-grid, .organization-grid, .merchandise-grid, .risk-grid) > * { grid-column: auto; grid-row: auto; min-width: 0; }
  html.analysis-gallery :is(.analysis-update-ticker, .section-heading, .card-title, .analysis-footer) { flex-wrap: wrap; height: auto; gap: 12px; }
  html.analysis-gallery :is(.analysis-kpis, .commercialization-kpis, .contribution-summary, .settlement-kpis) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.analysis-gallery :is(.analysis-card, .trend-chart, .analysis-section) { min-width: 0; max-width: 100%; }
  html.analysis-gallery :is(.anchor-table, .merchandise-top-table, .heatmap, .drill-table-wrap, .data-table-wrap) { max-width: 100%; overflow-x: auto; }
  html.analysis-gallery .drill-overlay { padding: 12px; }
  html.analysis-gallery .drill-panel { width: 100%; max-width: 100%; height: calc(100dvh - 24px); }
  html.analysis-gallery :is(.drill-header, .drill-navigation, .drill-actions) { flex-wrap: wrap; }
  html.analysis-gallery .drill-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.analysis-gallery body .streamer-dossier-layer { padding: 12px; }
  html.analysis-gallery body :is(.streamer-dossier-directory-surface, .streamer-dossier-profile-surface) { width: 100%; height: calc(100dvh - 24px); grid-template-rows: auto minmax(0, 1fr); }
  html.analysis-gallery body :is(.streamer-dossier-directory-header, .streamer-dossier-profile-header) { padding: 16px; flex-wrap: wrap; display: flex; gap: 12px; }
  html.analysis-gallery body .streamer-dossier-profile-body { grid-template-columns: 180px minmax(0, 1fr); overflow: auto; }
  html.analysis-gallery body .streamer-dossier-directory-body { grid-template-columns: 200px minmax(0, 1fr); }
  html.analysis-gallery body :is(.streamer-dossier-profile-body, .streamer-dossier-directory-body) > * { min-width: 0; }
  .page-switcher-panel { max-height: calc(100dvh - 24px); }
}

@media (max-width: 1366px) {
  html:has(#dashboardScene), html:has(#dashboardScene) body { height: auto; overflow: auto; }
  #dashboardScene { height: auto; min-height: 100dvh; overflow: visible; padding: 12px; }
  #dashboardScene .topbar { display: flex; flex-wrap: wrap; height: auto; gap: 12px; padding: 12px; }
  #dashboardScene .topbar-brand { flex: 1 1 100%; }
  #dashboardScene .scope-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); flex: 1 1 100%; width: 100%; overflow: visible; }
  #dashboardScene .scope-filters label { min-width: 0; height: auto; }
  #dashboardScene .scope-filters select { max-width: 100%; width: 100%; }
  #dashboardScene .time-filters { flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-start; }
  #dashboardScene .topbar-actions { flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-start; }
  #dashboardScene .dashboard-main { display: block; height: auto; }
  #dashboardScene .metric-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 12px 0; }
  #dashboardScene .metric-card { grid-column: auto; min-height: 130px; }
  #dashboardScene .content-grid { display: flex; flex-direction: column; gap: 12px; }
  #dashboardScene :is(.left-rail, .right-rail) { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; height: auto; gap: 12px; }
  #dashboardScene .module-card { height: auto; min-height: 260px; margin: 0; }
  #dashboardScene .digital-stage { height: auto; min-height: 400px; }
  #dashboardScene .operating-brief { position: relative; inset: auto; width: auto; max-width: 100%; }
  #dashboardScene .operating-brief nav { display: flex; flex-wrap: wrap; }
  #dashboardScene .bottom-dock { margin-top: 12px; }
  .detail-drawer { width: min(640px, 100%); max-height: 100dvh; }
  .maintenance-app :is(.tree-panel, .summary-panel, .catalog-layout > aside, .permission-layout > aside, .overview-main-grid > .panel) { display: block; }
  .maintenance-app :is(.management-layout, .catalog-layout, .permission-layout, .overview-main-grid) { grid-template-columns: minmax(0, 1fr); }
  .maintenance-app .overview-layout { grid-template-rows: auto; }
  .maintenance-app .context-drawer { width: min(520px, 100vw); }
}

@media (max-width: 700px) {
  body :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { font-size: 16px; }
  body :is(.topbar-actions, .workspace-actions, .analysis-actions, .page-switcher-panel) :is(button, a),
  body :is(.scope-filters, .analysis-scope) select { min-height: 44px; }
  .page-switcher-entry { min-height: 44px; }
  .workspace-topbar { padding: 12px; }
  .workspace-brand { max-width: 100%; }
  .workspace-actions { width: 100%; }
  .workspace-actions [data-hide-mobile] { display: inline-flex; }
  .workspace-app :is(.panel-header, .heading-actions, .training-filter-actions) { flex-wrap: wrap; }
  .workspace-app :is(.hero-side, .report-form-grid, .form-grid) { grid-template-columns: minmax(0, 1fr); }
  #dashboardScene .scope-filters { grid-template-columns: minmax(0, 1fr); }
  #dashboardScene .scope-filters label { display: flex; align-items: center; }
  #dashboardScene .scope-filters label span { display: block; flex: 0 0 76px; }
  #dashboardScene .time-filters > button { min-width: 44px; min-height: 44px; }
  #dashboardScene .custom-date-panel { position: fixed; inset: auto 12px 12px; flex-wrap: wrap; }
  html.analysis-gallery .analysis-scope { grid-template-columns: minmax(0, 1fr); }
  html.analysis-gallery .analysis-scope label { display: flex; align-items: center; padding: 8px 12px; }
  html.analysis-gallery .analysis-scope label span { flex: 0 0 106px; }
  html.analysis-gallery .analysis-scope select { width: 100%; min-width: 0; }
  html.analysis-gallery :is(.analysis-period, .analysis-time, .period-switch) { flex-wrap: wrap; max-width: 100%; }
  html.analysis-gallery :is(.company-unit-list, .settlement-comparison-grid, .conclusion-evidence-grid) { grid-template-columns: minmax(0, 1fr); }
  html.analysis-gallery .section-heading { display: block; }
  html.analysis-gallery .analysis-breadcrumb { flex-wrap: wrap; }
  html.analysis-gallery .drill-overlay { padding: 0; }
  html.analysis-gallery .drill-panel { height: 100dvh; border-radius: 0; }
  html.analysis-gallery body .streamer-dossier-profile-body, html.analysis-gallery body .streamer-dossier-directory-body { display: block; overflow: auto; }
  html.analysis-gallery body :is(.streamer-dossier-profile-body, .streamer-dossier-directory-body) > * { height: auto; max-height: none; overflow: visible; }
  html.analysis-gallery body .streamer-dossier-directory-body .streamer-dossier-directory-list { overflow-x: auto; }
  html.analysis-gallery body .streamer-dossier-profile-header > * { min-width: 0; max-width: 100%; }
  .huimai-ai-panel { max-height: 100dvh; padding-bottom: env(safe-area-inset-bottom, 0px); }
}
@media (max-width: 1366px) {
  html.analysis-gallery .analysis-index { display: flex; height: auto; }
  html.analysis-gallery .analysis-index a { flex-direction: row; min-width: max-content; }
  html.analysis-gallery .analysis-index a :is(i, b) { width: auto; }
  html.analysis-gallery .analysis-brand strong { font-size: 22px; line-height: 1.4; }
  html.analysis-gallery .analysis-brand span { font-size: 12px; line-height: 1.5; white-space: normal; }
  html.analysis-gallery .overview-grid { grid-template-rows: auto; }
  html.analysis-gallery .overview-contribution-card { grid-template-columns: minmax(0, 1fr); }
  html.analysis-gallery :is(.operating-calendar, .category-price-heatmap, .policy-heatmap) { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; }
  .commercial-filter { flex-wrap: wrap; }
  .co-quick-ranges { flex-wrap: wrap; height: auto; }
  .commercial-heading, .commercial-heading-actions { flex-wrap: wrap; gap: 12px; }
  .commercial-app .workspace-shell { display: block; }
  .commercial-sidebar { position: relative; top: auto; min-height: 0; height: auto; padding: 12px 16px; }
  .commercial-sidebar .workspace-nav { display: flex; flex-wrap: wrap; }
  .commercial-sidebar-bottom { padding-top: 16px; margin: 0; }
  .commercial-main { padding: 20px 16px; }
  .co-overview-grid, .co-effects-grid { grid-template-columns: minmax(0, 1fr); }
  .training-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  html.analysis-gallery .analysis-scope label { flex-direction: row; height: auto; }
  html.analysis-gallery .analysis-period-field { width: 100%; height: auto; flex: 1 1 100%; }
  html.analysis-gallery .period-switch { height: auto; display: flex; flex-wrap: nowrap; }
  html.analysis-gallery .period-switch button { width: auto; min-width: 0; min-height: 44px; flex: 1; padding: 8px; }
  .co-metrics, .co-capability-grid, .co-entry-grid, .co-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .commercial-filter { padding: 12px; }
  .commercial-filter > label { flex: 1 1 100%; min-width: 0; }
  .commercial-filter :is(input, select) { max-width: 100%; width: 100%; min-width: 0; }
  .training-filter-bar, .training-archive-layout, .training-pool-layout, .training-approval-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  html:has(#dashboardScene) body { display: block; }
  html body #app { height: auto; min-height: 100dvh; overflow: visible; }
}
@media (max-width: 700px) {
  .training-panel > header { flex-wrap: wrap; }
  .training-panel > header > * { min-width: 0; max-width: 100%; }
  .training-action-layer { padding: 12px; }
  .training-action-dialog { width: 100%; max-height: calc(100dvh - 24px); }
  .training-action-form { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  html.analysis-gallery body .streamer-dossier-chapter { min-height: 0; padding: 24px 16px; }
  html.analysis-gallery body .streamer-dossier-chapter-heading { grid-template-columns: 42px minmax(0, 1fr); gap: 12px; }
  html.analysis-gallery body .streamer-dossier-chapter-number { font-size: 40px; }
  html.analysis-gallery body .streamer-dossier-chapter-heading h3 { font-size: 26px; }
  html.analysis-gallery body .streamer-dossier-profile-surface { grid-template-rows: auto minmax(0, 1fr) auto; }
  html.analysis-gallery body :is(.streamer-dossier-profile-metrics, .streamer-dossier-bi-grid) { grid-template-columns: minmax(0, 1fr); }
  html.analysis-gallery body .streamer-dossier-context-panel { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  #dashboardScene .topbar { display: flex !important; }
  #dashboardScene .topbar > * { grid-column: auto !important; grid-row: auto !important; min-width: 0; }
  #dashboardScene .metric-strip { display: grid !important; }
  #dashboardScene .scope-filters .scope-context-line { grid-column: 1 / -1; height: auto; white-space: normal; flex-wrap: wrap; }
  #dashboardScene .scope-filters > i { display: none; }
  #dashboardScene .scope-filters > .permission-root-button { position: static; }
  #dashboardScene .time-filters { width: 100%; }
}
@media (max-width: 700px) {
  .co-date-field { width: 100%; min-width: 0; }
  .co-date-field > div { flex-wrap: wrap; }
  .training-panel :is(span, p) { overflow-wrap: anywhere; }
}
@media (max-width: 1100px) {
  #dashboardScene :is(#pageSwitcher, #operationGuideButton) { width: auto !important; min-width: 110px !important; padding-inline: 12px !important; }
  #dashboardScene .topbar-brand { order: 0; }
  #dashboardScene .scope-filters { order: 1; }
  #dashboardScene .time-filters { order: 2; }
  #dashboardScene .topbar-actions { order: 3; }
}
@media (max-width: 700px) {
  #dashboardScene .metric-strip { grid-template-columns: minmax(0, 1fr); }
  #dashboardScene .metric-card { width: 100%; min-width: 0; max-width: 100%; min-height: 170px; }
}
@media (max-width: 1366px) {
  html.analysis-gallery body .streamer-dossier-directory-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.analysis-gallery body .streamer-dossier-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.analysis-gallery body .streamer-dossier-global-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.analysis-gallery body .streamer-dossier-context-panel { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  html.analysis-gallery body .streamer-dossier-layer { padding: 0; }
  html.analysis-gallery body :is(.streamer-dossier-directory-surface, .streamer-dossier-profile-surface) { height: 100dvh; border-radius: 0; }
  html.analysis-gallery body :is(.streamer-dossier-directory-toolbar, .streamer-dossier-card-grid) { grid-template-columns: minmax(0, 1fr); }
  html.analysis-gallery body .streamer-dossier-directory-main { padding: 16px; }
  html.analysis-gallery body .streamer-dossier-directory-header h2 { font-size: 24px; }
  html.analysis-gallery body :is(.streamer-dossier-directory-meta, .streamer-dossier-pagination, .streamer-dossier-profile-footer) { flex-wrap: wrap; gap: 8px; }
  html.analysis-gallery body .streamer-dossier-profile-body { display: flex; flex-direction: column; overflow: hidden; }
  html.analysis-gallery body .streamer-dossier-chapter-nav { display: flex; gap: 8px; max-height: none; overflow-x: auto; }
  html.analysis-gallery body .streamer-dossier-chapter-link { flex: 0 0 auto; min-width: 120px; }
  html.analysis-gallery body .streamer-dossier-global-metrics { width: 100%; gap: 4px; }
  html.analysis-gallery body .streamer-dossier-global-metric { padding: 6px 10px; }
  html.analysis-gallery body .streamer-dossier-global-metric strong { font-size: 20px; }
}
@media (max-width: 700px) {
  html.analysis-gallery body .streamer-dossier-profile-actions { display: flex; flex-wrap: wrap; width: 100%; gap: 8px; }
  html.analysis-gallery body .streamer-dossier-profile-actions button { white-space: nowrap; min-width: 60px; min-height: 44px; flex: 0 0 auto; }
  html.analysis-gallery body .streamer-dossier-profile-footer { padding: 8px 12px; min-height: 0; font-size: 11px; }
  html.analysis-gallery body .streamer-dossier-profile-footer > * { min-width: 0; }
}
@media (max-width: 700px) {
  html.analysis-gallery body .streamer-dossier-profile-header { padding: 12px; gap: 8px; }
  html.analysis-gallery body .streamer-dossier-profile-heading h2 { font-size: 24px; margin: 4px 0; }
  html.analysis-gallery body .streamer-dossier-profile-heading p { font-size: 11px; line-height: 1.5; }
  html.analysis-gallery body .streamer-dossier-global-metric small { font-size: 10px; line-height: 1.4; }
  html.analysis-gallery body .streamer-dossier-profile-actions { gap: 4px; }
  html.analysis-gallery body .streamer-dossier-profile-actions button { padding-inline: 6px; min-width: 44px; font-size: 12px; }
  html.analysis-gallery body .streamer-dossier-chapter-nav { display: flex !important; width: 100%; }
  html.analysis-gallery body .streamer-dossier-chapter-nav .streamer-dossier-chapter-link { width: auto; flex: 0 0 auto; }
  html.analysis-gallery body .streamer-dossier-profile-footer { flex-wrap: nowrap; }
  html.analysis-gallery body .streamer-dossier-profile-footer > :first-child { flex: 1 1 auto; }
}
@media (min-width: 701px) and (max-width: 1366px) {
  html.analysis-gallery body .streamer-dossier-profile-body { grid-template-rows: minmax(0, 1fr) auto; }
  html.analysis-gallery body .streamer-dossier-profile-heading { flex: 1 1 260px; min-width: 0; }
  html.analysis-gallery body .streamer-dossier-global-metrics { flex: 1 1 300px; }
  html.analysis-gallery body .streamer-dossier-profile-actions { flex: 1 1 100%; flex-wrap: wrap; }
  html.analysis-gallery body .streamer-dossier-chapter { padding: 28px 24px; }
  html.analysis-gallery body .streamer-dossier-chapter-heading { grid-template-columns: 48px minmax(0, 1fr); gap: 16px; }
  html.analysis-gallery body .streamer-dossier-chapter-number { font-size: 44px; }
  html.analysis-gallery body .streamer-dossier-chapter-heading h3 { font-size: 30px; }
  html.analysis-gallery body .streamer-dossier-chapter-link { grid-template-columns: 24px minmax(0, 1fr); }
  html.analysis-gallery body .streamer-dossier-chapter-link b { grid-column: 2; }
}
@media (max-width: 1100px) {
  .maintenance-app .data-table-wrap { width: 100%; min-width: 0; max-width: 100%; overflow: auto; }
  .maintenance-app .data-table { min-width: 780px; table-layout: auto; }
  .maintenance-app .data-table :is(th, td) { white-space: nowrap; }
  .maintenance-app .data-table button { min-height: 44px; }
}
@media (max-width: 1100px) {
  .maintenance-app :is(.catalog-main, .panel) { min-width: 0; max-width: 100%; }
  .maintenance-app .catalog-main { grid-template-columns: minmax(0, 1fr); }
}

/* Dynamic analysis content must size itself before the next module is placed. */
@media (max-width: 1366px) {
  html.analysis-gallery .analysis-kpis { align-items: start; grid-auto-rows: auto; }
  html.analysis-gallery .analysis-kpis .analysis-kpi { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 12px; height: auto; min-height: 0; padding: 16px; grid-column: auto; grid-row: auto; }
  html.analysis-gallery .analysis-kpi .kpi-copy { align-self: stretch; min-width: 0; }
  html.analysis-gallery .analysis-kpi .kpi-copy > strong { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; line-height: 1.3; white-space: normal; }
  html.analysis-gallery .analysis-kpi .kpi-copy strong b { font-size: 26px; overflow-wrap: anywhere; }
  html.analysis-gallery .analysis-kpi .kpi-copy strong small { margin: 0; font-size: 12px; }
  html.analysis-gallery .analysis-kpi .micro-chart { flex: none; width: 100%; height: 48px; min-height: 0; margin: 0; }
  html.analysis-gallery .analysis-kpi .kpi-secondary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; align-self: stretch; min-width: 0; padding: 8px 0 0; border-left: 0; border-top: 1px solid rgba(169,121,56,.16); }
  html.analysis-gallery .analysis-kpi footer { width: 100%; margin: 0; min-width: 0; white-space: normal; }
  html.analysis-gallery .analysis-kpi footer span { white-space: normal; overflow-wrap: anywhere; line-height: 1.6; }
  html.analysis-gallery .daily-trend-panel { grid-template-rows: auto auto; gap: 16px; height: auto; }
  html.analysis-gallery .risk-event-meta { grid-template-columns: repeat(2,minmax(0,1fr)); }
  html.analysis-gallery .risk-event-meta > span { min-width: 0; }
  html.analysis-gallery .risk-event-meta :is(b,em) { white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 700px) {
  html.analysis-gallery .analysis-kpis { grid-template-columns: minmax(0,1fr); }
  html.analysis-gallery .analysis-main { padding: 0 12px; }
  html.analysis-gallery .analysis-section { padding-left: 0; padding-right: 0; }
  html.analysis-gallery .risk-event-meta { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 1366px) {
  html.analysis-gallery body :is(.overview-grid,.organization-grid,.merchandise-grid,.risk-grid,.commercialization-bi-grid,.overview-summary) { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: auto; grid-auto-rows: auto; height: auto; gap: 16px; }
  html.analysis-gallery body :is(.overview-grid,.organization-grid,.merchandise-grid,.risk-grid,.commercialization-bi-grid,.overview-summary) > * { grid-area: auto; min-width: 0; width: 100%; max-width: 100%; height: auto; }
  html.analysis-gallery body .overview-summary > .analysis-kpis { grid-area: auto; }
  html.analysis-gallery body .analysis-card { min-width: 0; }
}
@media (max-width: 1366px) {
  html.analysis-gallery .commercial-trend-bar span { transform: none; white-space: nowrap; line-height: 1.5; height: auto; font-size: 10px; }
  html.analysis-gallery .commercial-trend-bar { padding-bottom: 0; gap: 8px; }
}
@media (max-width: 1366px) {
  body .workspace-topbar { display: flex; flex-wrap: wrap; align-items: center; height: auto; gap: 12px; }
  body .workspace-brand { flex: 1 1 100%; width: 100%; min-width: 0; }
  body .workspace-brand > div { min-width: 0; }
  body .workspace-brand strong { white-space: normal; }
  body .workspace-switcher { flex: 1 1 100%; width: 100%; }
  body .workspace-actions { flex: 1 1 100%; flex-wrap: wrap; }
  body .workspace-topbar > * { grid-area: auto; }
  body .president-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
  body :is(.president-dashboard-primary,.president-dashboard-secondary) { grid-template-columns: minmax(0,1fr); }
  body .president-overview-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  body .president-overview-filters :is(label,input,select) { width: 100%; min-width: 0; }
  body .president-overview-filters p { margin: 0; grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  body .president-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body .president-kpi { padding: 14px; min-width: 0; }
  body .president-kpi > strong { font-size: 24px; overflow-wrap: anywhere; }
  body .president-overview-filters { grid-template-columns: minmax(0,1fr); padding: 14px; }
  body .president-dashboard-panel { padding: 16px; }
}
@media (max-width: 1366px) {
  body .workspace-readonly-boundary { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
  body .workspace-readonly-boundary > strong { flex: 1 1 100%; }
  body .workspace-readonly-boundary > small { flex: 1 1 100%; white-space: normal; }
  body :is(.training-overview-hero,.training-overview-grid) { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; height: auto; }
  body :is(.training-overview-hero,.training-overview-grid) > * { grid-area: auto; min-width: 0; max-width: 100%; }
  body .training-metric-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  body .training-hero-seal { width: 100%; }
}
@media (max-width: 700px) {
  body .training-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body .training-overview-hero { padding: 20px; }
  body .training-role-switch { width: 100%; }
}
@media (max-width: 1366px) {
  body .workspace-unavailable-summary { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; }
  body .workspace-unavailable-actions { display: flex; flex-wrap: wrap; min-width: 0; width: 100%; }
  body .workspace-unavailable-actions > * { max-width: 100%; white-space: normal; }
  body .report-workspace { min-width: 0; grid-template-columns: minmax(0,1fr); }
  body .report-workspace > * { min-width: 0; max-width: 100%; }
  body .report-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  body .report-filters :is(label,input,select) { width: 100%; min-width: 0; }
  body .report-task-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body .report-table-wrap { overflow: auto; overscroll-behavior-inline: contain; }
  body .report-table { min-width: 980px; }
  body .report-table:has(.report-select-column) th:nth-child(1) { width: 44px; }
  body .report-table:has(.report-select-column) th:nth-child(2) { width: 260px; }
  body .report-table:has(.report-select-column) th:nth-child(3) { width: 176px; }
  body .report-table:has(.report-select-column) th:nth-child(4) { width: 140px; }
  body .report-table:has(.report-select-column) th:nth-child(5) { width: 164px; }
  body .report-table :is(th,.report-status,button) { white-space: nowrap; }
  body .report-select-column input { width: 18px; height: 18px; accent-color: #376f91; }
  body .report-selection-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: #526c75; font-size: 12px; }
  body .report-selection-bar[hidden] { display: none; }
  body :is(.report-table,.report-selection-bar) :is(.report-action,.report-download,.report-gap-toggle) { min-height: 40px; padding: 8px 12px; margin: 3px 5px 3px 0; border: 1px solid #cbdce5; border-radius: 7px; background: #f5f9fb; color: #376f91; font: inherit; font-size: 12px; cursor: pointer; }
  body .report-table [data-report-delete], body .report-selection-bar [data-report-batch-delete] { color: #a34d4d; border-color: #e4cece; background: #fffafa; }
  body :is(.report-table,.report-selection-bar) button:disabled { opacity: .5; cursor: default; }
}
@media (max-width: 700px) {
  body :is(.report-filters,.report-task-grid) { grid-template-columns: minmax(0,1fr); }
  body .report-table-wrap::before { content: '左右滑动查看业务周期、状态和操作'; display: block; position: sticky; left: 0; width: fit-content; padding: 12px 16px; color: #72858c; font-size: 11px; }
  body .report-gap-panel { width: calc(100vw - 88px); max-width: 100%; }
  body .report-gap-panel > header { flex-wrap: wrap; gap: 8px; }
  body .report-gap-groups { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 1366px) {
  body .co-ops-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  body .co-cycle-card { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  body :is(.co-ops-metrics,.co-cycle-card) > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
}
@media (max-width: 700px) {
  body .co-ops-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body .co-cycle-card { grid-template-columns: minmax(0,1fr); }
}
@media (min-width: 1101px) and (max-width: 1366px) {
  html.analysis-gallery body #drillOverlay [data-drill-view]:not([data-drill-view="violationScope"]) .drill-layout:has(> .drill-block:not([hidden]) > .drill-detail-scroll) { overflow: hidden; }
  html.analysis-gallery body #drillOverlay [data-drill-view]:not([data-drill-view="violationScope"]) .drill-layout > .drill-block:not([hidden]):has(> .drill-detail-scroll) { height: 100% !important; }
}
@media (max-width: 1366px) {
  body .maintenance-topbar { display: flex; flex-wrap: wrap; height: auto; min-height: 0; gap: 12px; padding: 12px; }
  body .maintenance-brand { flex: 1 1 100%; min-width: 0; width: 100%; }
  body .maintenance-topbar .topbar-actions { display: flex; flex: 1 1 100%; flex-wrap: wrap; width: 100%; min-width: 0; }
}
@media (max-width: 700px) {
  body .president-comparison > button { grid-template-columns: minmax(0,1fr) 60px; }
  body .president-comparison .president-bar-track { grid-column: 1; grid-row: 2; }
  body .president-unit-rates { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
}
@media (max-width: 1366px) {
  body .daily-review-body { grid-template-columns: minmax(0,1fr); }
  body :is(.daily-review-list,.daily-review-detail) { min-width: 0; width: 100%; max-width: 100%; }
  body .daily-review-list { overflow-x: auto; }
  body .daily-review-toolbar :is(input,select) { min-width: 0; max-width: 100%; }
}
@media (max-width: 1366px) {
  html.analysis-gallery body :is(.overview-grid,.organization-grid,.merchandise-grid,.risk-grid,.commercialization-bi-grid,.overview-summary,.drill-layout) { grid-template-columns: minmax(0,1fr) !important; grid-template-rows: auto !important; grid-template-areas: none !important; height: auto !important; }
  html.analysis-gallery body :is(.overview-grid,.organization-grid,.merchandise-grid,.risk-grid,.commercialization-bi-grid,.overview-summary,.drill-layout) > * { grid-area: auto !important; height: auto !important; }
  html.analysis-gallery body .analysis-update-ticker { display: flex; flex-wrap: wrap; gap: 8px; }
  html.analysis-gallery body .analysis-update-ticker > * { min-width: 0; max-width: 100%; flex: 1 1 100%; white-space: normal; }
  html.analysis-gallery body .analysis-update-state { width: auto; }
  html.analysis-gallery body .bi-dumbbell-row { grid-template-columns: minmax(0,1fr); gap: 10px; }
  html.analysis-gallery body .bi-row-values { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-start; }
  html.analysis-gallery body :is(.operating-calendar-card,.company-composition-table,.commercial-unit-table,.monetization-action-table,.anchor-table) { min-width: 0; max-width: 100%; overflow-x: auto; }
  html.analysis-gallery body .drill-panel { grid-template-rows: auto minmax(0, 1fr); }
  html.analysis-gallery body .drill-header { flex-direction: column; align-items: stretch; gap: 12px; padding: 12px; }
  html.analysis-gallery body :is(.drill-navigation,.drill-actions) { flex-wrap: wrap; width: 100%; min-width: 0; }
  html.analysis-gallery body .drill-navigation button { min-width: 70px; white-space: nowrap; }
  html.analysis-gallery body .drill-content { width: 100%; padding: 16px; }
}
@media (max-width: 1366px) {
  html body[data-workspace="president"] :is(.president-dashboard-primary,.president-dashboard-secondary,.daily-review-body) { grid-template-columns: minmax(0,1fr); }
  html.analysis-gallery body #vicePresidentRanking :is(.vice-president-head,.vice-president-row) { min-width: 1000px !important; }
  html.analysis-gallery body #anchorTable :is(.anchor-table-head,.anchor-row) { min-width: 1500px !important; }
  html.analysis-gallery body :is(.commercial-unit-head,.commercial-unit-row) { min-width: 540px; }
  html.analysis-gallery body :is(.monetization-head,.monetization-row) { min-width: 1100px; }
  html.analysis-gallery body :is(.company-composition-head,.company-composition-row) { min-width: 660px; }
  html.analysis-gallery body .analysis-update-state { display: flex; flex-wrap: wrap; width: 100%; height: auto; gap: 8px; }
  html.analysis-gallery body .analysis-update-state > * { min-width: 0; white-space: normal; }
}
@media (max-width: 700px) {
  html.analysis-gallery body .risk-event-list-head { display: none; }
  html.analysis-gallery body .risk-event-header { grid-template-columns: 32px minmax(0,1fr); }
  html.analysis-gallery body .risk-event-header > :nth-child(n+3) { grid-column: 1 / -1; min-width: 0; white-space: normal; }
  html.analysis-gallery body .risk-event-header .risk-disposition { display: flex; flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 1366px) {
  body .daily-review-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  body .daily-review-metrics > * { min-width: 0; overflow-wrap: anywhere; }
}
@media (max-width: 700px) {
  body .daily-review-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1366px) {
  html.analysis-gallery body :is(.company-composition,.commercialization-health) { min-width: 0; max-width: 100%; overflow-x: auto; }
  html.analysis-gallery body #analysisUpdateTicker .analysis-update-state { flex-direction: column; align-items: flex-start; flex-basis: 100%; width: 100%; max-width: 100%; }
  html.analysis-gallery body #analysisUpdateTicker .analysis-update-state > * { width: auto; max-width: 100%; margin: 0; }
}
@media (max-width: 1366px) {
  html.analysis-gallery body .streamer-dossier-section-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); }
  html.analysis-gallery body .streamer-dossier-section-card .streamer-dossier-section-grid { grid-template-columns: minmax(0,1fr); }
  html.analysis-gallery body .streamer-dossier-section-card { min-width: 0; }
  html.analysis-gallery body .bi-coverage-matrix { max-width: 100%; overflow-x: auto; }
}
@media (max-width: 1366px) {
  html.analysis-gallery body .drill-kpis { grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); }
}
@media (max-width: 1366px) {
  html.analysis-gallery body :is(.calendar-card,.operating-calendar-card) { height: auto !important; min-height: 0; }
  html.analysis-gallery body .trend-calendar-layout { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: auto; padding: 16px; gap: 16px; height: auto; }
  html.analysis-gallery body .trend-calendar-layout > *,
  html.analysis-gallery body .daily-trend-panel > * { grid-area: auto !important; min-width: 0; }
  html.analysis-gallery body .daily-trend-panel { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto; gap: 12px; }
  html.analysis-gallery body #trendGrid { display: block; height: auto !important; max-height: none; min-height: 0; padding: 0; overflow: visible; }
  html.analysis-gallery body #trendGrid .payment-rate-chart { width: 100%; min-width: 0; height: auto; max-height: none; overflow-x: auto; }
  html.analysis-gallery body #trendGrid .payment-rate-plot { display: block; min-width: 640px; width: 100%; height: auto; max-height: none; margin: 0; }
  html.analysis-gallery body #trendGrid .payment-rate-chart::after { content: '左右滑动查看全部日期，点击图形查看明细'; display: block; padding: 8px 0; font-size: 11px; color: #718187; }
  html.analysis-gallery body .payment-rate-legend { max-width: 100%; }
  html.analysis-gallery body .trend-summary-panel { display: block; margin: 0; padding: 16px; }
  html.analysis-gallery body .trend-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  html.analysis-gallery body .trend-summary > div { padding: 8px; }
  html.analysis-gallery body .calendar-heading-actions { flex-wrap: wrap; }
  html.analysis-gallery body .calendar-month-controls { flex-wrap: wrap; gap: 8px; }
  html.analysis-gallery body .operating-calendar-card .calendar-week { display: none; }
  html.analysis-gallery body #operatingCalendar { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); width: 100%; min-width: 0 !important; max-width: 100%; height: auto !important; max-height: 75svh; overflow-y: auto; overflow-x: hidden; gap: 10px; padding: 8px; align-content: start; }
  html.analysis-gallery body #operatingCalendar .calendar-day { width: 100%; min-width: 0; height: auto !important; min-height: 0; padding: 14px; }
  html.analysis-gallery body #operatingCalendar .calendar-day.is-empty { display: none; }
  html.analysis-gallery body #operatingCalendar .calendar-day header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
  html.analysis-gallery body #operatingCalendar .calendar-day header span { display: block; }
  html.analysis-gallery body #operatingCalendar .calendar-metric { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0; padding: 5px 0; }
  html.analysis-gallery body #operatingCalendar .calendar-metric :is(span,b) { white-space: normal; overflow-wrap: anywhere; }
  html.analysis-gallery body :is(.vice-president-ranking,.anchor-table,.merchandise-top-products,.commercialization-health,.monetization-action-table,.risk-event-list,.category-price-heatmap,.policy-heatmap) { height: auto !important; min-height: 0; max-height: 65svh; overflow: auto; }
  html.analysis-gallery body :is(.merchandise-top-card,.merchandise-bi-card,.commercial-unit-card,.risk-events-card,.policy-heatmap-card) { height: auto !important; min-height: 0; }
  html.analysis-gallery body :is(.category-treemap,.price-bands) { height: auto !important; min-height: 300px; }
}
@media (max-width: 1366px) {
  html.analysis-gallery body #trendGrid .payment-rate-plot { min-width: 0; width: 100%; height: auto; }
  html.analysis-gallery body #trendGrid .payment-rate-chart { overflow: visible; }
  html.analysis-gallery body #trendGrid .payment-rate-chart::after { content: '点击柱形或折线数据点查看当天明细'; }
}
@media (max-width: 1366px) {
  html.analysis-gallery body :is(.commercialization-overview-card,.commercialization-bi-card,.conclusion-card,.verification-card) { height: auto !important; min-height: 0; }
  html.analysis-gallery body :is(.bi-module-surface,.driver-attribution,.verification-queue) { height: auto !important; min-height: 0; max-height: 65svh; overflow: auto; }
  html.analysis-gallery body .quadrant-chart { height: 360px !important; min-height: 360px; }
  html.analysis-gallery body :is(.monetization-anchor-table,.risk-events) { height: auto !important; max-height: none; overflow: visible; }
}
@media (max-width: 1366px) {
  html.analysis-gallery body .analysis-main .analysis-card { height: auto !important; min-height: 0 !important; }
  html.analysis-gallery body .conclusion-evidence-grid { height: auto !important; grid-template-rows: auto !important; align-items: start; }
  html.analysis-gallery body .risk-events { height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; }
}
@media (max-width: 1366px) {
  html.analysis-gallery body #operatingCalendar .calendar-day:not(.is-empty) { display: block; }
}

.simulation-ribbon { position: static; width: fit-content; max-width: calc(100% - 32px); margin: 12px 16px; }
.streamer-dossier-context-panel > summary { display: none; }
.streamer-dossier-context-toggle { display: none; }
html:has(.streamer-dossier-layer.is-open), html.analysis-gallery body:has(.streamer-dossier-layer.is-open) { overflow: hidden !important; }
.profit-detail-total { font-size: 28px; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.profit-detail-table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 12px; }
.profit-detail-table :is(th,td) { padding: 12px 8px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.08); }
.profit-detail-table :is(th,td):nth-child(2) { text-align: right; font-variant-numeric: tabular-nums; }
.composition-bars .bar-chart-item { grid-template-columns: minmax(80px,1fr) minmax(40px,1fr) 60px minmax(100px,auto); }
.composition-bars .bar-chart-item small { display: block; font-variant-numeric: tabular-nums; }
[data-workspace-page-title][tabindex="-1"]:focus { outline: none; }
.management-ledger-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 16px 0; }
.management-ledger-filter label { display: grid; gap: 6px; min-width: 0; font-size: 12px; color: var(--muted,#758984); }
.management-ledger-filter :is(input,button) { min-height: 44px; max-width: 100%; border: 1px solid #d4dedb; border-radius: 8px; padding: 8px 12px; font: inherit; }
.management-ledger-filter input { background: #fff; color: #163b35; }
.management-ledger-filter button { background: #173f38; color: #fff; cursor: pointer; }
@media (max-width: 1366px) {
  #dashboardScene .scope-context-line { display: flex; flex-wrap: wrap; grid-column: 1 / -1; grid-row: auto; width: 100%; height: auto; min-height: 32px; white-space: normal; }
  #dashboardScene .scope-context-line > b { max-width: none; white-space: normal; }
  #dashboardScene .scope-context-line { font-size: 12px; gap: 8px; }
  #dashboardScene .scope-context-line :is(b,span,button) { font-size: 12px; }
  #dashboardScene .scope-filters { grid-template-columns: repeat(4,minmax(0,1fr)); }
  #dashboardScene .scope-filters > i { display: none; }
  #dashboardScene .scope-filters > label { grid-row: auto; }
  #dashboardScene .scope-filters :is(label,select) { min-height: 44px; font-size: 13px; }
  #dashboardScene .metric-strip { display: grid !important; overflow: visible; }
  #dashboardScene .metric-strip .metric-card { min-width: 0; }
  #dashboardScene .ranking-card { height: auto !important; min-height: 360px; }
  #dashboardScene .ranking-list { height: 240px !important; max-height: 240px; overflow-y: auto; }
  #dashboardScene .ranking-list .rank-item { height: 60px; min-height: 60px; }
  #dashboardScene :is(.daily-card,.commerce-card) { height: auto !important; }
  #dashboardScene :is(.daily-layout,.monetization-overview) { height: auto; }
  #dashboardScene .topbar-actions .maintenance-button { min-width: 64px !important; white-space: nowrap; }
  body[data-workspace] .workspace-shell { display: block; }
  body[data-workspace] .workspace-shell .workspace-sidebar { position: static; inset: auto; display: block; width: 100%; height: auto; min-height: 0; padding: 12px; }
  body[data-workspace] .workspace-sidebar nav.workspace-nav { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; margin: 8px 0; padding: 4px 0; }
  body[data-workspace] .workspace-sidebar nav.workspace-nav > a { display: flex; flex: 0 0 auto; width: auto; min-height: 44px; white-space: nowrap; padding: 10px 14px; }
  body[data-workspace] .commercial-sidebar-bottom { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 8px 0 0; }
  body[data-workspace] .commercial-sidebar-bottom > :is(strong,p) { flex: 1 1 100%; margin: 0; }
  body[data-workspace] .commercial-sidebar-bottom > button { width: auto; min-height: 44px; }
  html.analysis-gallery body .streamer-dossier-profile-surface { grid-template-rows: auto minmax(0,1fr) auto; border-radius: 16px; }
  html.analysis-gallery body .streamer-dossier-profile-header { display: flex; align-items: center; justify-content: space-between; padding: 12px; gap: 8px; }
  html.analysis-gallery body .streamer-dossier-profile-heading { flex: 1 1 200px; }
  html.analysis-gallery body .streamer-dossier-profile-actions { width: auto; flex: 0 0 auto; }
  html.analysis-gallery body .streamer-dossier-profile-heading > span { display: none; }
  html.analysis-gallery body .streamer-dossier-profile-heading h2 { font-size: 23px; margin: 0 0 4px; }
  html.analysis-gallery body .streamer-dossier-profile-actions button { min-height: 44px; }
  html.analysis-gallery body .streamer-dossier-profile-body { display: block; min-height: 0; overflow: auto; overscroll-behavior: contain; }
  html.analysis-gallery body .streamer-dossier-profile-body > * { height: auto; max-height: none; overflow: visible; }
  html.analysis-gallery body .streamer-dossier-chapter-panel { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 8px 12px; border: 0; }
  html.analysis-gallery body .streamer-dossier-context-toggle { display: block; min-height: 44px; padding: 8px; border: 1px solid var(--dossier-ash); border-radius: 8px; color: var(--dossier-blue); background: var(--dossier-paper); font: inherit; font-size: 12px; cursor: pointer; }
  html.analysis-gallery body .streamer-dossier-chapter-panel > .streamer-dossier-panel-label { display: none; }
  html.analysis-gallery body .streamer-dossier-chapter-nav { display: flex; flex-wrap: nowrap; max-height: none; overflow-x: auto; overflow-y: hidden; gap: 6px; padding: 0 0 4px; }
  html.analysis-gallery body .streamer-dossier-chapter-link { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; min-height: 44px; white-space: nowrap; }
  html.analysis-gallery body .streamer-dossier-global-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; padding: 8px 12px; }
  html.analysis-gallery body .streamer-dossier-global-metric { border-radius: 14px; padding: 10px; }
  html.analysis-gallery body .streamer-dossier-global-metric strong { font-size: 19px; }
  html.analysis-gallery body .streamer-dossier-context-panel { padding: 12px; border: 0; scroll-margin-top: 72px; }
  html.analysis-gallery body .streamer-dossier-context-panel > summary { display: list-item; min-height: 44px; padding: 12px 0; cursor: pointer; font-size: 13px; }
  html.analysis-gallery body .streamer-dossier-metric-rail { min-height: 0; grid-template-rows: none; grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 8px; }
  html.analysis-gallery body .streamer-dossier-rail-metric { padding: 12px; border-radius: 14px; }
  html.analysis-gallery body .streamer-dossier-chapter { min-height: 0; padding: 28px 18px; }
  html.analysis-gallery body .streamer-dossier-chapter-detail { scroll-margin-top: 76px; }
  html.analysis-gallery body .streamer-dossier-profile-footer { padding: 8px 12px; min-height: 36px; }
}
@media (max-width: 700px) {
  #dashboardScene .scope-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #dashboardScene .scope-filters label { display: grid; }
  #dashboardScene .scope-filters label span { flex: auto; }
  #dashboardScene .scope-context-line { font-size: 11px; }
  html.analysis-gallery body .streamer-dossier-global-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  html.analysis-gallery body .streamer-dossier-profile-actions { flex: 0 0 auto; }
  .composition-bars .bar-chart-item { grid-template-columns: minmax(0,1fr) 64px; }
  .composition-bars .bar-chart-item i { grid-column: 1; grid-row: 2; }
  .composition-bars .bar-chart-item b { grid-column: 2; grid-row: 1; text-align: right; }
  .composition-bars .bar-chart-item small { grid-column: 1 / -1; font-size: 11px; }
}
@media (min-width: 1367px) {
  #dashboardScene .ranking-card { display: flex; flex-direction: column; }
  #dashboardScene .ranking-card > :is(.module-header, .tab-row, .ranking-scroll-hint) { flex: none; }
  #dashboardScene .ranking-list { flex: 1; min-height: 0; height: auto !important; }
}
.maintenance-app [data-maintenance-history-filter] { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.maintenance-app [data-maintenance-history-filter] > label { display: grid; gap: 5px; flex: 1 1 150px; min-width: 0; }
.maintenance-app [data-maintenance-history-filter]::before { content: ''; flex: 0 0 100%; order: 1; }
.maintenance-app [data-maintenance-history-filter] > .action-button { flex: none; order: 2; min-width: 70px; min-height: 44px; white-space: nowrap; }
.maintenance-app [data-maintenance-history-filter] > small { flex-basis: 100%; order: 3; }
