:root {
  --dashboard-design-width: 1920px;
  --dashboard-design-height: 1080px;
  --dashboard-canvas-padding: 32px;
  --dashboard-card-gap: 16px;
  --dashboard-content-inset: 16px;
}

html, body { width: 100%; height: 100%; overflow: hidden; }
.scale-wrapper { width: var(--dashboard-design-width); height: var(--dashboard-design-height); }
.tv-dashboard {
  width: 100%; height: 100%; min-width: 0; min-height: 0;
  padding: var(--dashboard-canvas-padding); box-sizing: border-box;
  overflow: hidden;
}
.tv-dashboard, .tv-grid { gap: var(--dashboard-card-gap); }
.tv-grid { display: grid; min-width: 0; min-height: 0; }
.tv-card { min-width: 0; min-height: 0; overflow: hidden; }
.tv-content-fit { min-width: 0; min-height: 0; overflow: hidden; overflow-wrap: anywhere; }
.tv-chart { display: block; width: 100%; height: 100%; min-width: 0; min-height: 120px; }
.tv-icon, svg.tv-icon, svg.lucide, [data-lucide] {
  display: inline-block; width: 24px; height: 24px; min-width: 24px; min-height: 24px;
  box-sizing: border-box; flex: 0 0 auto; overflow: visible;
  vertical-align: middle; stroke: currentColor; stroke-width: 2; fill: none;
}
.tv-icon-fallback { display: inline-flex; align-items: center; justify-content: center; }

/* The existing pages keep their data DOM; these rules replace their layout layer. */
.scale-wrapper > .dashboard-container,
.scale-wrapper > .w-full { height: 100%; min-height: 0; overflow: hidden; }
.scale-wrapper .dashboard-container > *, .scale-wrapper section, .scale-wrapper article {
  min-width: 0; min-height: 0;
}
.scale-wrapper [id$="Chart"], .scale-wrapper [id$="chart"],
.scale-wrapper [id*="-chart"], .scale-wrapper [id*="Chart-"] {
  max-width: none !important; min-width: 0; box-sizing: border-box;
}

/* Energy: KPI row + requested three equal columns with two stacked cards. */
.page-energy .dashboard-container { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: 74px 132px repeat(2, minmax(0, 1fr)); gap: 16px; }
.page-energy .dashboard-container > :nth-child(1),
.page-energy .dashboard-container > :nth-child(2) { margin: 0 !important; grid-column: 1 / -1; }
.page-energy .energy-grid { display: contents; }
.page-energy .energy-grid > :first-child { grid-column: 1; grid-row: 3; }
.page-energy .energy-right-stack { display: contents; }
.page-energy .energy-right-stack > :nth-child(1) { grid-column: 3; grid-row: 3; }
.page-energy .energy-right-stack > :nth-child(2) { grid-column: 3; grid-row: 4; }
.page-energy .dashboard-container > :nth-child(4) { display: contents; }
.page-energy .dashboard-container > :nth-child(4) > :nth-child(1) { grid-column: 1; grid-row: 4; }
.page-energy .dashboard-container > :nth-child(4) > :nth-child(2) { grid-column: 2; grid-row: 3; }
.page-energy .dashboard-container > :nth-child(4) > :nth-child(3) { grid-column: 2; grid-row: 4; }
.page-energy #energyChart, .page-energy #weekChart, .page-energy #sleepChart { width: 100% !important; height: calc(100% - 36px) !important; min-height: 0; }

/* Risk: requested width rebalance and bounded rows. */
.page-risk .dashboard-container { display: grid; grid-template-rows: 74px 286px 340px 1fr; gap: 16px; }
.page-risk .dashboard-container > * { margin: 0 !important; }
.page-risk .dashboard-container > :nth-child(2) { grid-template-columns: 1.15fr 1.25fr 1.6fr !important; gap: 16px !important; }
.page-risk .dashboard-container > :nth-child(2) > section { min-height: 0 !important; }
.page-risk .dashboard-container > :nth-child(2) > section:nth-child(2) > .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.page-risk .dashboard-container > :nth-child(3) { grid-template-columns: 1.65fr 1.15fr .8fr !important; gap: 16px !important; min-height: 0 !important; }
.page-risk .dashboard-container > :nth-child(4) { gap: 16px !important; min-height: 0; }
.page-risk #risk-trend { width: 100% !important; height: calc(100% - 64px) !important; }

/* Intervention: channel/effect positions are swapped visually; channel spans both rows. */
.page-intervention .scale-wrapper > .w-full { display: grid; grid-template-rows: 74px 190px 1fr; gap: 16px; }
.page-intervention .scale-wrapper > .w-full > * { margin: 0 !important; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) { height: auto !important; min-height: 0 !important; gap: 16px !important; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div { min-height: 0; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(3) { grid-column: 3; grid-row: 2; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(5) { grid-column: 3; grid-row: 1 / span 2; }
.page-intervention #trendChart, .page-intervention #typeChart, .page-intervention #ageChart { width: 100% !important; min-height: 0; }

/* Population: stacked gender/activity column and equal outer columns. */
.page-population .dashboard-container { display: grid; grid-template-rows: 74px 1fr; gap: 16px; }
.page-population .dashboard-grid {
  display: grid !important; grid-template-columns: 1fr 1fr 2fr; grid-template-rows: 330px 330px 1fr; gap: 16px !important; min-height: 0;
}
.page-population .pop-top-1 { grid-column: 1; grid-row: 1 / span 2; }
.page-population .pop-top-2 { grid-column: 2; grid-row: 1; }
.page-population .pop-top-3 { grid-column: 3; grid-row: 1 / span 2; }
.page-population .dashboard-grid > :nth-child(6) { grid-column: 2; grid-row: 2; }
.page-population .dashboard-grid > :nth-child(4) { grid-column: 1; grid-row: 3; }
.page-population .dashboard-grid > :nth-child(5) { grid-column: 2; grid-row: 3; }
.page-population .dashboard-grid > :nth-child(7) { grid-column: 3; grid-row: 3; }
.page-population #tags-cloud { display: flex !important; flex-wrap: wrap !important; align-content: center; gap: 10px !important; overflow: hidden; }
.page-population #tags-cloud > * { position: static !important; transform: none !important; white-space: nowrap; }

/* Body twin keeps its special inset but receives larger side-column gaps. */
.page-body-twin .dashboard-container { gap: 20px !important; }
.page-body-twin .dashboard-container > div:first-child,
.page-body-twin .dashboard-container > div:last-child { gap: 20px !important; }
.page-body-twin .body-twin-side-stack { display: flex !important; flex-direction: column; gap: 24px !important; min-height: 0; }
.page-body-twin .body-twin-side-stack > .system-card { flex: 1 1 0; min-height: 0; }

/* AI health: health KPI row before recommendation imagery and full-width trend. */
.page-ai-health .dashboard-container { display: grid; grid-template-rows: 74px 112px 300px 1fr; gap: 16px !important; }
.page-ai-health .dashboard-container > * { margin: 0 !important; }
.page-ai-health .dashboard-container > :nth-child(2) { grid-row: 3; gap: 16px !important; }
.page-ai-health .kpi-grid { grid-row: 2; gap: 16px !important; }
.page-ai-health .middle-grid { grid-row: 4; gap: 16px !important; min-height: 0; }
.page-ai-health #healthTrendChart { width: 100% !important; height: 100% !important; }

/* Chronic risk and chronic management use explicit bounded rows. */
.page-chronic-risk .dashboard-container { display: grid; grid-template-rows: 74px 410px 1fr; gap: 16px !important; }
.page-chronic-risk .dashboard-container > * { margin: 0 !important; }
.page-chronic-risk .risk-grid { gap: 16px !important; min-height: 0; }
.page-chronic-risk .risk-grid .gauge-chart { height: 185px !important; min-height: 0 !important; }
.page-chronic-risk .risk-grid .risk-bar-chart { min-height: 165px !important; }
.page-chronic-risk .dashboard-container > :last-child { gap: 16px !important; min-height: 0; }
.page-chronic-risk .risk-grid + .rounded-xl { padding-top: 12px !important; padding-bottom: 12px !important; }
.page-chronic .dashboard-container { display: grid; grid-template-rows: 74px 170px 330px 1fr; gap: 16px !important; }
.page-chronic .dashboard-container > * { margin: 0 !important; gap: 16px !important; min-height: 0; }
.page-chronic .dashboard-container > :nth-child(4) { margin-top: 0 !important; }
.page-chronic .dashboard-container > :nth-child(2),
.page-chronic .dashboard-container > :nth-child(3),
.page-chronic .dashboard-container > :nth-child(4) { row-gap: 16px !important; column-gap: 16px !important; }
.page-chronic .chronic-chart-card { display: grid !important; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; min-height: 0; }
.page-chronic .chronic-chart-card #trendChart,
.page-chronic .chronic-chart-card #adherenceChart,
.page-chronic .chronic-chart-card #visitChart,
.page-chronic .chronic-chart-card #ageChart { display: block; width: 100% !important; height: 100% !important; min-height: 120px !important; }

/* Executive: taller balanced regions fill the canvas. */
.page-executive .dashboard-container { display: grid; grid-template-rows: 74px 562px minmax(0, 1fr); gap: 16px !important; }
.page-executive .dashboard-container > * { margin: 0 !important; }
.page-executive .executive-main-grid { height: 100%; gap: 16px !important; grid-template-rows: 322px 224px !important; }
.page-executive .executive-main-grid > * { min-height: 0; overflow: hidden; }
.page-executive .executive-ai-full { grid-column: 1 / -1; grid-row: 3; margin-top: 0 !important; align-self: stretch; }
.page-executive .score-card { padding: 7px 10px !important; }
.page-executive .trend-card { padding: 10px !important; }
.page-executive .score-card #scoreChart, .page-executive .trend-card #trendChart { max-height: 120px !important; }

/* Family: smaller middle/bottom detail row to keep final analytics visible. */
.page-family .dashboard-container { display: grid; grid-template-rows: 74px 205px 360px 1fr; gap: 16px !important; }
.page-family .dashboard-container > * { margin: 0 !important; gap: 16px !important; min-height: 0; }
/* family-dashboard-reorder: flatten the two legacy groups into the requested rows. */
.page-family .bottom-grid, .page-family .dashboard-container > :nth-child(4) { display: contents !important; }
.page-family .bottom-grid > :first-child { grid-column: 1 / -1; grid-row: 4; overflow: hidden; }
.page-family .bottom-grid > :last-child { grid-column: 3; grid-row: 3; overflow: hidden; }
.page-family .dashboard-container > :nth-child(4) > :first-child { grid-column: 1; grid-row: 3; overflow: hidden; }
.page-family .dashboard-container > :nth-child(4) > :last-child { grid-column: 2; grid-row: 3; overflow: hidden; }
.page-family .dashboard-container { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.page-family .dashboard-container > :nth-child(1), .page-family .dashboard-container > :nth-child(2) { grid-column: 1 / -1; }
.page-family #familyTrendChart { height: calc(100% - 36px) !important; }
.page-family #familyRiskChart { height: 145px !important; }
.page-family .reminder-list { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px !important; }

/* Individual vitals: all chart hosts fill width; sleep visual is 120%. */
.page-individual-vitals .dashboard-container { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: 74px 130px 290px 225px minmax(0, 1fr); gap: 16px !important; padding-bottom: 2px; }
.page-individual-vitals .dashboard-container > * { margin: 0 !important; gap: 16px !important; min-height: 0; }
.page-individual-vitals .dashboard-container > :nth-child(1), .page-individual-vitals .kpi-grid { grid-column: 1 / -1; }
/* vitals-four-column-layout: flatten the legacy middle/bottom groups into row two. */
.page-individual-vitals .middle-grid, .page-individual-vitals .dashboard-container > :nth-child(4),
.page-individual-vitals .dashboard-container > :nth-child(5) { display: contents !important; }
.page-individual-vitals .middle-grid > :nth-child(1) { grid-column: 1 / span 2; grid-row: 3; overflow: hidden; }
/* vitals-glucose-sleep-swap: sleep takes glucose's former second-row slot. */
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(1) { grid-column: 3 / span 2; grid-row: 3; overflow: hidden; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(3) { grid-column: 5 / span 2; grid-row: 3; overflow: hidden; }
.page-individual-vitals .middle-grid > :nth-child(2) { grid-column: 7 / span 2; grid-row: 3; overflow: hidden; }
/* vitals-bottom-layout: sleep + score above stats, alerts on the right spanning both rows. */
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(2) { grid-column: 1 / span 3; grid-row: 4; overflow: hidden; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(3) { grid-column: 4 / span 3; grid-row: 4; overflow: hidden; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(2) { grid-column: 1 / span 6; grid-row: 5; overflow: hidden; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(1) { grid-column: 7 / span 2; grid-row: 4 / span 2; overflow: hidden; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(2) > .grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 10px !important; }
/* vitals-sleep-compact: sleep spans two columns and score uses the third column. */
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(1) > .flex:last-child {
  display: grid !important; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 12px !important; height: calc(100% - 24px); min-height: 0;
}
.page-individual-vitals #sleepChart { width: 115px !important; height: 115px !important; min-height: 0 !important; justify-self: center; transform: none !important; }
.page-individual-vitals #sleepChart > div,
.page-individual-vitals #sleepChart canvas { transform: none !important; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(1) .space-y-2\.5 {
  display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 12px !important; align-content: center; line-height: 1.2;
}
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(1) .space-y-2\.5 > * { margin: 0 !important; min-width: 0; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(1) .space-y-2\.5 > p { grid-column: 1 / -1; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(1) { display: block !important; padding-top: 8px !important; padding-bottom: 8px !important; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(3) { display: flex; flex-direction: column; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(3) #healthScoreChart { flex: 1 1 auto; min-height: 90px; }
.page-individual-vitals #activityChart { min-height: 140px !important; height: 140px !important; }
.page-individual-vitals #glucoseChart, .page-individual-vitals #weightChart, .page-individual-vitals #hrTrendChart { height: 210px !important; }
.page-individual-vitals .dashboard-container > :nth-child(n+3) .rounded-xl { padding: 10px !important; }
.page-individual-vitals .dashboard-container > :nth-child(n+3) h3 { font-size: 13px; line-height: 1.2; }
.page-individual-vitals #activityChart { min-height: 105px !important; height: 105px !important; }
.page-individual-vitals #glucoseChart, .page-individual-vitals #weightChart, .page-individual-vitals #hrTrendChart { height: 175px !important; }
.page-individual-vitals .middle-grid > :first-child .grid { gap: 6px !important; }
.page-individual-vitals .middle-grid > :first-child .grid > div { padding: 6px !important; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(2) > p,
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(3) > div:last-child { margin-top: 4px !important; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :first-child > div:last-child { gap: 4px !important; font-size: 11px; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :first-child .space-y-3 { gap: 5px !important; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :first-child .space-y-3 > div { padding: 6px !important; gap: 7px !important; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(2) .grid > div { padding: 8px !important; }
.page-individual-vitals #healthScoreChart { height: 105px !important; }
.page-individual-vitals .dashboard-container > :nth-child(n+3) { overflow: hidden; }
.page-individual-vitals #hrTrendChart { width: 100% !important; height: 185px !important; }
.page-individual-vitals #glucoseChart, .page-individual-vitals #weightChart { width: 100% !important; height: 200px !important; min-height: 0 !important; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :first-child { overflow: hidden; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :first-child > * { max-width: 100%; }

/* Medical: bounded middle allows bottom visuals to remain on screen. */
.page-medical .dashboard-container { display: grid; grid-template-rows: 74px 280px 300px 1fr; gap: 16px !important; }
.page-medical .dashboard-container > * { margin: 0 !important; gap: 16px !important; min-height: 0; }
.page-medical .top-grid, .page-medical .middle-grid { gap: 16px !important; min-height: 0; }
.page-medical .top-grid > article { min-height: 0 !important; padding: 12px !important; }
.page-medical .top-grid > article .text-4xl { font-size: 2rem !important; line-height: 1.1 !important; }
.page-medical [id$="Chart"], .page-medical [id$="chart"], .page-medical [id*="map"] { width: 100% !important; max-width: none !important; min-height: 0; }

/* Operations and overview use all available vertical space. */
.page-operations .operations-container { display: grid; grid-template-rows: 74px 370px 250px 1fr; gap: 16px !important; }
.page-operations .operations-container > * { margin: 0 !important; gap: 16px !important; min-height: 0; }
.page-operations [data-lucide], .page-operations svg.lucide { visibility: visible !important; opacity: 1 !important; }
.page-operations .bottom-grid > :last-child { padding: 8px !important; }
.page-operations #chart-cost { height: 145px !important; }
.page-overview .dashboard-container { display: grid; grid-template-rows: 74px 118px 390px 1fr; gap: 16px !important; }
.page-overview .dashboard-container > * { margin: 0 !important; gap: 16px !important; min-height: 0; }
.page-overview #chinaMap, .page-overview #mapChart, .page-overview [id*="map"] { width: 100% !important; height: calc(100% - 36px) !important; }

/* Personal service: move the original three-column service row to the bottom. */
.page-personal-service .dashboard-container { display: grid; grid-template-rows: 74px 250px 220px 1fr; gap: 16px !important; }
.page-personal-service .dashboard-container > * { margin: 0 !important; gap: 16px !important; min-height: 0; }
.page-personal-service .dashboard-container > :nth-child(2) { grid-row: 4; }
.page-personal-service .dashboard-container > :nth-child(3) { grid-row: 2; }
.page-personal-service .dashboard-container > :nth-child(4) { grid-row: 3; }
.page-personal-service #serviceTrend, .page-personal-service #satisfactionChart { width: 100% !important; height: calc(100% - 40px) !important; }
.page-personal-service .dashboard-container > :nth-child(2) > section { padding: 10px 12px !important; gap: 8px !important; }
.page-personal-service .dashboard-container > :nth-child(2) > section .space-y-3 { gap: 6px !important; }
.page-personal-service .dashboard-container > :nth-child(2) > section:first-child { font-size: 12px; }

/* Realtime: stable top/bottom rows and full card visual hosts. */
.page-realtime .dashboard-container { display: grid; grid-template-rows: 74px 430px 1fr; gap: 16px !important; }
.page-realtime .dashboard-container > * { margin: 0 !important; gap: 16px !important; min-height: 0; }
.page-realtime .realtime-top-grid { gap: 16px !important; }
.page-realtime [id$="Chart"], .page-realtime [id$="chart"] { width: 100% !important; height: calc(100% - 42px) !important; max-width: none !important; }

.page-intervention #typeChart { width: 44% !important; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(2) article { padding: 12px !important; }
.page-risk .dashboard-container > :nth-child(2) > section:nth-child(2) { padding: 10px !important; }
.page-risk .dashboard-container > :nth-child(2) > section:nth-child(2) .grid { gap: 8px !important; }
.page-risk .dashboard-container > :nth-child(3) > section:first-child { padding: 8px 12px !important; font-size: 12px; }
.page-risk .dashboard-container > :nth-child(3) > section:first-child td,
.page-risk .dashboard-container > :nth-child(3) > section:first-child th { padding-top: 4px !important; padding-bottom: 4px !important; }
.page-risk .dashboard-container > :nth-child(4) > section:last-child { padding: 6px 8px !important; }
.page-risk .dashboard-container > :nth-child(4) > section:last-child .space-y-4 { gap: 8px !important; }
.page-risk .dashboard-container table { font-size: 11px !important; line-height: 1.15 !important; }
.page-risk .dashboard-container table th,
.page-risk .dashboard-container table td { padding-top: 3px !important; padding-bottom: 3px !important; }
.page-risk .dashboard-container table .h-8,
.page-risk .dashboard-container table .w-8 { width: 24px !important; height: 24px !important; }

/* Keep legacy content from expanding bounded rewrite rows. */
.page-chronic-risk .dashboard-container > *, .page-family .dashboard-container > *,
.page-operations .dashboard-container > *, .page-personal-service .dashboard-container > *,
.page-population .dashboard-container > *, .page-risk .dashboard-container > * { overflow: hidden; }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .backdrop-filter { background-color: rgba(15, 26, 48, .98); }
}

/* layout-round-3 */
/* AI blocks use the same 16px rhythm as all other cards. */
.page-ai-health .dashboard-container { grid-template-rows: 74px 112px 300px minmax(0, 1fr) 74px !important; }
.page-ai-health .dashboard-container > :last-child { grid-row: 5; margin: 0 !important; align-self: stretch; padding: 14px 24px !important; }
.page-ai-health .dashboard-container > :nth-child(2) .ai-card-content { padding: 8px 12px !important; }
.page-ai-health .dashboard-container > :nth-child(2) .ai-card-content img { max-height: 92px !important; object-fit: contain; }
.page-executive .executive-ai-full {
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
  margin: 0 !important;
  align-self: stretch !important;
  transform: none !important;
  position: relative !important;
  top: auto !important;
}

/* Chronic risk: controls/trend before AI; AI matches the compact AI analysis height. */
.page-chronic-risk .dashboard-container { grid-template-rows: 74px 400px 300px 1fr !important; }
.page-chronic-risk .dashboard-container > :nth-child(4) { grid-row: 3; margin: 0 !important; }
.page-chronic-risk .dashboard-container > :nth-child(3) { grid-row: 4; height: 130px; margin: 0 !important; padding: 14px 18px !important; }
.page-chronic-risk .risk-grid > :first-child .gauge-chart { height: 230px !important; }
.page-chronic-risk .risk-grid > :first-child { min-width: 360px; }
.page-chronic-risk .risk-grid > :first-child [class*="text-"] { white-space: normal; }
.page-chronic-risk .risk-grid > :first-child .gauge-chart + * { margin-top: 14px !important; }

/* Chronic management: bounded cards and explicit non-overlapping rows. */
.page-chronic .dashboard-container { grid-template-rows: 74px 160px 315px 1fr !important; }
.page-chronic .dashboard-container > :nth-child(3) { grid-template-columns: 1.15fr .85fr 1fr !important; }
.page-chronic .dashboard-container > :nth-child(4) { grid-template-columns: 1.15fr 1fr .85fr !important; }
.page-chronic .dashboard-container > :nth-child(n+3) > * { overflow: hidden; min-width: 0; min-height: 0; }
.page-chronic .dashboard-container > :nth-child(n+3) > * { padding: 12px !important; }
.page-chronic #trendChart, .page-chronic #adherenceChart, .page-chronic #visitChart { height: 220px !important; }
.page-chronic #visitChart { height: 195px !important; }

/* Energy: wider curve, narrower cost; sleep and cost exchange positions. */
.page-energy .dashboard-container { grid-template-columns: 1.3fr .9fr .8fr .8fr !important; }
.page-energy .energy-grid > :first-child { grid-column: 1 / span 2 !important; }
.page-energy .dashboard-container > :nth-child(4) > :nth-child(1) { grid-column: 1 !important; grid-row: 4 !important; }
.page-energy .dashboard-container > :nth-child(4) > :nth-child(3) { grid-column: 2 !important; grid-row: 4 !important; }
.page-energy .dashboard-container > :nth-child(4) > :nth-child(2) { grid-column: 3 !important; grid-row: 4 !important; }
.page-energy .energy-right-stack > :nth-child(1), .page-energy .energy-right-stack > :nth-child(2) { grid-column: 4 !important; }

/* Family: plan spans both lower rows; reminder matches trend+risk combined width. */
.page-family .dashboard-container { grid-template-columns: 1fr 1fr .72fr !important; grid-template-rows: 74px 205px 330px 1fr !important; }
.page-family .bottom-grid > :last-child { grid-column: 3; grid-row: 3 / span 2; }
.page-family .bottom-grid > :first-child { grid-column: 1 / span 2; grid-row: 4; }
.page-family .dashboard-container > :nth-child(4) > :first-child { grid-column: 1; grid-row: 3; }
.page-family .dashboard-container > :nth-child(4) > :last-child { grid-column: 2; grid-row: 3; }

/* Intervention: age takes the old trend slot; trend spans the two upper peer widths. */
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(1) { grid-column: 1 / span 2; grid-row: 1; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(4) { grid-column: 1; grid-row: 2; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(2) { grid-column: 2; grid-row: 2; }

/* Medical: restore backup geometry, retaining only shared TV bounds. */
.page-medical .dashboard-container { grid-template-rows: 74px 280px 275px 1fr !important; }
.page-medical .top-grid { grid-template-columns: repeat(4, 1fr) 320px !important; grid-template-rows: repeat(2, minmax(0, 1fr)) !important; gap: 16px !important; }
.page-medical .middle-grid { grid-template-columns: 1fr 2fr !important; gap: 16px !important; }
.page-medical .top-grid > article { padding: 16px !important; }
.page-medical .coverage-card, .page-medical .middle-grid > *, .page-medical .dashboard-container > :last-child > * { overflow: hidden; min-height: 0; }
.page-medical .coverage-card { padding: 12px !important; }
.page-medical .coverage-card .space-y-4 { gap: 8px !important; }
.page-medical .middle-grid > *, .page-medical .dashboard-container > :last-child > * { padding: 10px !important; }
.page-medical .dashboard-container > :last-child [id$="Chart"] { height: 135px !important; }
.page-medical .coverage-card { font-size: 12px; }
.page-medical .middle-grid > :first-child { font-size: 12px; }
.page-medical .dashboard-container > :last-child > :last-child { font-size: 12px; }

/* Operations: shorter first row and vertical ROI footer details. */
.page-operations .operations-container { grid-template-rows: 74px 310px 280px 1fr !important; }
.page-operations .top-grid { grid-template-columns: 1fr 1fr 1fr 1.55fr !important; }
.page-operations .top-grid > :last-child > .flex:last-child { flex-direction: column !important; align-items: stretch !important; gap: 6px !important; }

/* Overview: anomaly spans middle+bottom; bottom pair aligns to the two upper modules. */
.page-overview .dashboard-container { grid-template-columns: 1fr 2.2fr 1fr; grid-template-rows: 74px 118px 390px 1fr; }
.page-overview .dashboard-container > :nth-child(1), .page-overview .kpi-grid { grid-column: 1 / -1; }
.page-overview .middle-grid, .page-overview .bottom-grid { display: contents !important; }
.page-overview .middle-grid > :nth-child(1) { grid-column: 1; grid-row: 3; }
.page-overview .middle-grid > :nth-child(2) { grid-column: 2; grid-row: 3; }
.page-overview .middle-grid > :nth-child(3) { grid-column: 3; grid-row: 3 / span 2; }
.page-overview .bottom-grid > :nth-child(1) { grid-column: 1; grid-row: 4; }
.page-overview .bottom-grid > :nth-child(2) { grid-column: 2; grid-row: 4; }

/* Personal service: analytics in one row; workload + appointment stack beside records. */
.page-personal-service .dashboard-container { grid-template-columns: 1fr 1.35fr .85fr; grid-template-rows: 74px 350px 260px 1fr !important; }
.page-personal-service .dashboard-container > :nth-child(2),
.page-personal-service .dashboard-container > :nth-child(3),
.page-personal-service .dashboard-container > :nth-child(4) { display: contents !important; }
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(1) { grid-column: 1; grid-row: 2; }
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(2) { grid-column: 2; grid-row: 2 / span 2; }
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(3) { grid-column: 3; grid-row: 2; }
.page-personal-service .dashboard-container > :nth-child(4) > :nth-child(2) { grid-column: 3; grid-row: 3; }
.page-personal-service .dashboard-container > :nth-child(3),
.page-personal-service .dashboard-container > :nth-child(4) { display: contents !important; }
.page-personal-service .dashboard-container > :nth-child(3) > :nth-child(1) { grid-column: 1; grid-row: 4; }
.page-personal-service .dashboard-container > :nth-child(4) > :nth-child(1) { grid-column: 2; grid-row: 4; }
.page-personal-service .dashboard-container > :nth-child(3) > :nth-child(2) { grid-column: 3; grid-row: 4; }
.page-personal-service .dashboard-container > :nth-child(4) > :nth-child(2) { grid-column: 3; grid-row: 3; }
.page-personal-service .dashboard-container > :nth-child(3) > *,
.page-personal-service .dashboard-container > :nth-child(4) > * { min-width: 0; min-height: 0; overflow: hidden; padding: 12px !important; }
.page-personal-service #serviceTrend, .page-personal-service #satisfactionChart { height: 150px !important; }
.page-personal-service #serviceDonut { width: 125px !important; height: 125px !important; }
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(1),
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(3) { overflow: hidden; min-height: 0; }
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(1) .team-list,
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(2) .record-list { gap: 6px !important; }
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(1) .team-item,
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(2) .record-item { padding-top: 6px !important; padding-bottom: 6px !important; }
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(3) { gap: 8px !important; }
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(3) > * { padding: 8px !important; min-height: 0; }
.page-personal-service .dashboard-container > :nth-child(4) > :nth-child(2) .space-y-4 { gap: 8px !important; }

/* Population: shorter top blocks and deterministic playing-card tag fan. */
.page-population .dashboard-grid { grid-template-rows: 270px 270px 1fr !important; }
.page-population #tags-cloud { display: flex !important; flex-wrap: nowrap !important; justify-content: center; align-items: center; overflow: hidden; padding: 24px 34px; }
.page-population #tags-cloud > * { margin-left: -18px !important; padding: 8px 12px !important; box-shadow: 0 8px 18px rgba(0,0,0,.28); transform-origin: bottom center !important; }
.page-population #tags-cloud > :nth-child(3n+1) { transform: rotate(-6deg) translateY(5px) !important; }
.page-population #tags-cloud > :nth-child(3n+2) { transform: rotate(4deg) translateY(-4px) !important; }
.page-population #tags-cloud > :nth-child(3n) { transform: rotate(-1deg) translateY(2px) !important; }

/* Realtime: six vitals first; devices left, distribution/trend center stack, events right. */
.page-realtime .dashboard-container { grid-template-rows: 74px 150px minmax(0, 1fr) minmax(0, 1fr) !important; }
.page-realtime .realtime-top-grid, .page-realtime .dashboard-container > :nth-child(3) { display: contents !important; }
.page-realtime .vital-card:nth-of-type(2) { grid-column: 1; grid-row: 2; }
.page-realtime .vital-card:nth-of-type(3) { grid-column: 2; grid-row: 2; }
.page-realtime .vital-card:nth-of-type(4) { grid-column: 3; grid-row: 2; }
.page-realtime .vital-card:nth-of-type(5) { grid-column: 4; grid-row: 2; }
.page-realtime .vital-card:nth-of-type(6) { grid-column: 5; grid-row: 2; }
.page-realtime .vital-card:nth-of-type(7) { grid-column: 6; grid-row: 2; }
.page-realtime .dashboard-container { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.page-realtime .dashboard-container > :nth-child(1) { grid-column: 1 / -1; }
.page-realtime .devices-card { grid-column: 1 / span 2 !important; grid-row: 3 / span 2 !important; }
.page-realtime .dashboard-container > :nth-child(3) > :nth-child(2) { grid-column: 3 / span 2; grid-row: 3; }
.page-realtime .dashboard-container > :nth-child(3) > :nth-child(3) { grid-column: 3 / span 2; grid-row: 4; }
.page-realtime .dashboard-container > :nth-child(3) > :nth-child(1) { grid-column: 5 / span 2; grid-row: 3 / span 2; }

/* Risk cards are physically swapped by the ES5 adapter for old-WebView safety. */

/* layout-round-4 */
/* round4-risk: compact model tiles and equal-width trend/control cards. */
.page-risk .dashboard-container > :nth-child(2) > :nth-child(2) .grid { align-items: center !important; gap: 10px !important; }
.page-risk .dashboard-container > :nth-child(2) > :nth-child(2) .grid > div { padding: 8px !important; align-self: center; }
.page-risk .dashboard-container > :nth-child(2) > :nth-child(2) .grid > div > div:first-child { width: 32px !important; height: 32px !important; margin-bottom: 5px !important; }
.page-risk .dashboard-container > :nth-child(2) > :nth-child(2) .grid > div .text-sm { font-size: 12px !important; line-height: 1.2; }
.page-risk .dashboard-container > :nth-child(3) { grid-template-columns: 1.35fr 1.35fr 1fr !important; }
.page-risk .dashboard-container > :nth-child(4) { grid-template-columns: 1.4fr 1fr !important; }

/* round4-realtime: distribution and trends share row three; events span below devices+distribution. */
.page-realtime .dashboard-container { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: 74px 150px 310px minmax(0, 1fr) !important; }
.page-realtime .devices-card { grid-column: 1 / span 2 !important; grid-row: 3 !important; }
.page-realtime .dashboard-container > :nth-child(3) > :nth-child(2) { grid-column: 3 / span 2; grid-row: 3; }
.page-realtime .dashboard-container > :nth-child(3) > :nth-child(3) { grid-column: 5 / span 2; grid-row: 3; }
.page-realtime .dashboard-container > :nth-child(3) > :nth-child(1) { grid-column: 1 / span 4; grid-row: 4; }

/* round4-population: paired upper cards and two-column lower composition. */
.page-population .dashboard-grid { grid-template-columns: 1fr 1fr 2fr !important; grid-template-rows: 270px 250px minmax(0, 1fr) !important; }
.page-population .pop-top-1 { grid-column: 1; grid-row: 1; }
.page-population .pop-top-2 { grid-column: 2; grid-row: 1; }
.page-population .pop-top-3 { grid-column: 3; grid-row: 1 / span 2; }
.page-population .dashboard-grid > :nth-child(4) { grid-column: 1; grid-row: 2; }
.page-population .dashboard-grid > :nth-child(6) { grid-column: 2; grid-row: 2; }
.page-population .dashboard-grid > :nth-child(5) { grid-column: 1 / span 2; grid-row: 3; }
.page-population .dashboard-grid > :nth-child(7) { grid-column: 3; grid-row: 3; }
.page-population #tags-cloud { position: relative !important; display: block !important; height: calc(100% - 48px); padding: 0 !important; overflow: hidden; }
.page-population #tags-cloud > * { position: absolute !important; margin: 0 !important; padding: 7px 11px !important; }
.page-population #tags-cloud > :nth-child(1) { left: 5%; top: 12%; transform: rotate(-8deg) !important; }
.page-population #tags-cloud > :nth-child(2) { left: 29%; top: 5%; transform: rotate(5deg) !important; }
.page-population #tags-cloud > :nth-child(3) { left: 55%; top: 16%; transform: rotate(-3deg) !important; }
.page-population #tags-cloud > :nth-child(4) { left: 72%; top: 4%; transform: rotate(9deg) !important; }
.page-population #tags-cloud > :nth-child(5) { left: 14%; top: 43%; transform: rotate(4deg) !important; }
.page-population #tags-cloud > :nth-child(6) { left: 41%; top: 34%; transform: rotate(-7deg) !important; }
.page-population #tags-cloud > :nth-child(7) { left: 66%; top: 45%; transform: rotate(2deg) !important; }
.page-population #tags-cloud > :nth-child(8) { left: 3%; top: 70%; transform: rotate(7deg) !important; }
.page-population #tags-cloud > :nth-child(9) { left: 35%; top: 67%; transform: rotate(-4deg) !important; }
.page-population #tags-cloud > :nth-child(10) { left: 67%; top: 72%; transform: rotate(6deg) !important; }

/* round4-personal-service: analytics first; team and appointment span the two service rows. */
.page-personal-service .dashboard-container { grid-template-columns: 1fr 1.35fr 1fr; grid-template-rows: 74px 250px 270px minmax(0, 1fr) !important; }
.page-personal-service .dashboard-container > :nth-child(3) > :nth-child(1) { grid-column: 1; grid-row: 2; }
.page-personal-service .dashboard-container > :nth-child(4) > :nth-child(1) { grid-column: 2; grid-row: 2; }
.page-personal-service .dashboard-container > :nth-child(3) > :nth-child(2) { grid-column: 3; grid-row: 2; }
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(1) { grid-column: 1; grid-row: 3 / span 2; }
.page-personal-service .dashboard-container > :nth-child(4) > :nth-child(2) { grid-column: 2; grid-row: 3; }
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(2) { grid-column: 2; grid-row: 4; }
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(3) { grid-column: 3; grid-row: 3 / span 2; }
.page-personal-service #serviceTrend, .page-personal-service #satisfactionChart { height: 170px !important; }
.page-personal-service #serviceDonut { width: 140px !important; height: 140px !important; }

/* round4-overview: map beside status; trend uses the wide lower area and right cards align. */
.page-overview .dashboard-container { grid-template-columns: 1fr 2.2fr 1fr; grid-template-rows: 74px 118px 350px 250px minmax(0, 1fr); }
.page-overview .middle-grid > :nth-child(1) { grid-column: 1; grid-row: 3; }
.page-overview .middle-grid > :nth-child(2) { grid-column: 2 / span 2; grid-row: 3; }
.page-overview .middle-grid > :nth-child(3) { grid-column: 3; grid-row: 4; }
.page-overview .bottom-grid > :nth-child(1) { grid-column: 1 / span 2; grid-row: 4 / span 2; }
.page-overview .bottom-grid > :nth-child(2) { grid-column: 3; grid-row: 5; }
.page-overview .middle-grid > :nth-child(3), .page-overview .bottom-grid > :nth-child(2) { min-width: 0; }

/* round4-operations: compact top, two-up service metrics, channel beside cost spanning both lower rows. */
.page-operations .operations-container { grid-template-columns: 1.2fr 1fr; grid-template-rows: 74px 270px 250px minmax(0, 1fr) !important; }
.page-operations .operations-container > :nth-child(1), .page-operations .top-grid { grid-column: 1 / -1; }
.page-operations .bottom-grid, .page-operations .operations-container > :nth-child(4) { display: contents !important; }
.page-operations .bottom-grid > :nth-child(1) { grid-column: 1; grid-row: 3; }
.page-operations .bottom-grid > :nth-child(2) { grid-column: 1; grid-row: 4; }
.page-operations .bottom-grid > :nth-child(1) > .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
.page-operations .bottom-grid > :nth-child(1) > .grid > div { padding: 8px !important; }
.page-operations .operations-container > :nth-child(4) > :nth-child(1),
.page-operations .operations-container > :nth-child(4) > :nth-child(2) { display: none !important; }
.page-operations .operations-container > :nth-child(4) > :nth-child(3) { grid-column: 2; grid-row: 3 / span 2; }
.page-operations #chart-cost { height: calc(100% - 40px) !important; }

/* layout-round-5 */
/* Operations: compact header row; service, cost and channel share the second content row. */
.page-operations .operations-container { grid-template-columns: 1fr 1.35fr 1fr; grid-template-rows: 74px 230px 330px minmax(0, 1fr) !important; }
.page-operations .bottom-grid > :nth-child(1) { grid-column: 1; grid-row: 3; }
.page-operations .bottom-grid > :nth-child(2) { grid-column: 2; grid-row: 3; }
.page-operations .operations-container > :nth-child(4) > :nth-child(3) { grid-column: 3; grid-row: 3; display: block !important; }
.page-operations .operations-container > :nth-child(4) > :nth-child(1) { grid-column: 1; grid-row: 4; display: block !important; }
.page-operations .operations-container > :nth-child(4) > :nth-child(2) { grid-column: 2 / span 2; grid-row: 4; display: block !important; }
.page-operations .bottom-grid > :nth-child(1) > .grid { gap: 6px !important; }
.page-operations .bottom-grid > :nth-child(1) > .grid > div { padding: 5px 7px !important; }
.page-operations .bottom-grid > :nth-child(1) > .grid > div > div:first-child { width: 24px !important; height: 24px !important; margin-bottom: 3px !important; }
.page-operations .bottom-grid > :nth-child(1) .text-xl { font-size: 15px !important; line-height: 1.1; }
.page-operations #chart-cost { height: 245px !important; }
.page-operations .top-grid > :last-child { padding: 8px !important; }
.page-operations .top-grid > :last-child #chart-revenue { height: 72px !important; }
.page-operations .top-grid > :last-child .space-y-2 { gap: 3px !important; }

/* Risk: two compact detail rows, equal left cards, AI advice spans both. */
.page-risk .dashboard-container { grid-template-columns: 1.1fr 1.25fr .85fr; grid-template-rows: 74px 270px 250px minmax(0, 1fr) !important; }
.page-risk .dashboard-container > :nth-child(1), .page-risk .dashboard-container > :nth-child(2) { grid-column: 1 / -1; }
.page-risk .dashboard-container > :nth-child(3), .page-risk .dashboard-container > :nth-child(4) { display: contents !important; }
.page-risk .dashboard-container > :nth-child(3) > :nth-child(1) { grid-column: 1; grid-row: 3; }
.page-risk .dashboard-container > :nth-child(4) > :nth-child(1) { grid-column: 1; grid-row: 4; }
.page-risk .dashboard-container > :nth-child(3) > :nth-child(2) { grid-column: 2; grid-row: 3; }
.page-risk .dashboard-container > :nth-child(4) > :nth-child(2) { grid-column: 2; grid-row: 4; }
.page-risk .dashboard-container > :nth-child(3) > :nth-child(3) { grid-column: 3; grid-row: 3 / span 2; }
.page-risk .dashboard-container > :nth-child(3) > *, .page-risk .dashboard-container > :nth-child(4) > * { min-width: 0; min-height: 0; overflow: hidden; }
.page-risk .dashboard-container > :nth-child(2) > :nth-child(2) .grid { row-gap: 5px !important; column-gap: 8px !important; }
.page-risk .dashboard-container > :nth-child(2) > :nth-child(2) .grid > div { padding: 5px !important; }
.page-risk #risk-trend { height: calc(100% - 58px) !important; }
.page-risk .dashboard-container > :nth-child(3) > :nth-child(2) { padding: 10px !important; }
.page-risk #risk-trend { height: calc(100% - 64px) !important; }

/* Realtime: devices span both rows; taller analysis row and compact event row on the right. */
.page-realtime .dashboard-container { grid-template-rows: 74px 150px 350px minmax(0, 1fr) !important; }
.page-realtime .devices-card { grid-column: 1 / span 2 !important; grid-row: 3 / span 2 !important; }
.page-realtime .dashboard-container > :nth-child(3) > :nth-child(2) { grid-column: 3 / span 2; grid-row: 3; }
.page-realtime .dashboard-container > :nth-child(3) > :nth-child(3) { grid-column: 5 / span 2; grid-row: 3; }
.page-realtime .dashboard-container > :nth-child(3) > :nth-child(1) { grid-column: 3 / span 4; grid-row: 4; }

/* Population: taller demographic pair and compact lower row with clustered labels. */
.page-population .dashboard-grid { grid-template-rows: 310px 250px minmax(0, 1fr) !important; }
.page-population #tags-cloud { width: 72%; height: 72%; margin: 10px auto 0; overflow: visible; }
.page-population #tags-cloud > :nth-child(1) { left: 8%; top: 15%; }
.page-population #tags-cloud > :nth-child(2) { left: 28%; top: 8%; }
.page-population #tags-cloud > :nth-child(3) { left: 49%; top: 17%; }
.page-population #tags-cloud > :nth-child(4) { left: 63%; top: 7%; }
.page-population #tags-cloud > :nth-child(5) { left: 16%; top: 39%; }
.page-population #tags-cloud > :nth-child(6) { left: 38%; top: 34%; }
.page-population #tags-cloud > :nth-child(7) { left: 58%; top: 42%; }
.page-population #tags-cloud > :nth-child(8) { left: 10%; top: 64%; }
.page-population #tags-cloud > :nth-child(9) { left: 34%; top: 61%; }
.page-population #tags-cloud > :nth-child(10) { left: 57%; top: 66%; }
.page-population .pop-top-1 { padding: 10px !important; }
.page-population .pop-top-1 .mb-3 { margin-bottom: 5px !important; }
.page-population .pop-top-1 .border-t { padding-top: 5px !important; }
.page-population #age-chart { height: 165px !important; }

/* Personal service: ensure the full appointment/contact stack fills its spanning card. */
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(3) { display: flex !important; flex-direction: column; justify-content: space-between; overflow: hidden; }
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(3) > * { flex: 0 0 auto; }

/* Overview: lower trend/anomaly ratio is exactly 6:4. */
.page-overview .dashboard-container { grid-template-columns: 3fr 3fr 4fr; }
.page-overview .middle-grid > :nth-child(2) { grid-column: 2 / span 2; }
.page-overview .bottom-grid > :nth-child(1) { grid-column: 1 / span 2; }
.page-overview .middle-grid > :nth-child(3), .page-overview .bottom-grid > :nth-child(2) { grid-column: 3; }
.page-overview .middle-grid > :nth-child(3) { padding: 8px !important; font-size: 11px; }
.page-overview .middle-grid > :nth-child(3) .space-y-3 { gap: 4px !important; }
.page-overview .middle-grid > :nth-child(3) .space-y-3 > * { padding: 5px !important; }

/* Medical: explicit third-row placement overrides legacy margins and auto placement. */
.page-medical .dashboard-container > :nth-child(3) { display: grid !important; grid-template-columns: 1.6fr 1.4fr 1fr !important; grid-row: 3; gap: 16px !important; margin: 0 !important; min-height: 0; }
.page-medical .dashboard-container > :nth-child(3) > :nth-child(1) { grid-column: 1; }
.page-medical .dashboard-container > :nth-child(3) > :nth-child(2) { grid-column: 2; }
.page-medical .dashboard-container > :nth-child(3) > :nth-child(3) { grid-column: 3; }
.page-medical .dashboard-container > :nth-child(3) > * { min-width: 0; min-height: 0; overflow: hidden; }
.page-medical .coverage-card .coverage-stat { padding: 5px 7px !important; margin-bottom: 4px !important; }
.page-medical .coverage-card .coverage-stat-icon { width: 28px !important; height: 28px !important; }
.page-medical .coverage-card .mt-4 { margin-top: 5px !important; padding: 5px !important; }
.page-medical .coverage-card #coverageGauge { width: 45px !important; height: 45px !important; }
.page-medical .dashboard-container > :nth-child(4) .space-y-4 { gap: 6px !important; }
.page-medical .dashboard-container > :nth-child(4) .space-y-4 > * { padding: 6px !important; }
.page-medical .dashboard-container { grid-template-rows: 74px 380px minmax(0, 1fr) !important; }
.page-medical .dashboard-container > :nth-child(3) { font-size: 11px; }
.page-medical .dashboard-container > :nth-child(3) .mt-2 { margin-top: 4px !important; }
.page-medical .dashboard-container > :nth-child(3) [class*="py-"] { padding-top: 4px !important; padding-bottom: 4px !important; }
.page-overview .bottom-grid > :nth-child(2) { padding: 8px !important; font-size: 11px; }
.page-overview .bottom-grid > :nth-child(2) .space-y-3 { gap: 4px !important; }

/* Family plan content flows top-to-bottom. */
.page-family .plan-card { display: flex !important; flex-direction: column !important; align-items: stretch !important; justify-content: flex-start !important; gap: 18px !important; }
.page-family .plan-card .plan-date { margin-top: auto; }
.page-family .plan-card .plan-btn { width: 100%; }

/* Energy: equal half-width pairs and a right column matching the sleep summary width. */
.page-energy .dashboard-container { grid-template-columns: 1fr 1fr .72fr .72fr !important; }
.page-energy .energy-grid > :first-child { grid-column: 1 / span 2 !important; }
.page-energy .energy-right-stack > :nth-child(1), .page-energy .energy-right-stack > :nth-child(2) { grid-column: 4 !important; }
.page-energy .dashboard-container > :nth-child(4) > :nth-child(1) { grid-column: 1 / span 2 !important; grid-row: 4 !important; }
.page-energy .dashboard-container > :nth-child(4) > :nth-child(2) { grid-column: 3 / span 2 !important; grid-row: 4 !important; }
.page-energy .dashboard-container > :nth-child(4) > :nth-child(3) { grid-column: 3 !important; grid-row: 3 !important; }

/* Chronic: bound the first two content rows and neutralize legacy oversized padding. */
.page-chronic .dashboard-container { grid-template-rows: 74px 150px 300px minmax(0, 1fr) !important; }
.page-chronic .dashboard-container > :nth-child(2) > * { padding: 10px 12px !important; min-height: 0; overflow: hidden; }
.page-chronic .dashboard-container > :nth-child(2) .text-4xl { font-size: 28px !important; line-height: 1; }
.page-chronic .dashboard-container > :nth-child(2) .mt-4 { margin-top: 6px !important; }
.page-chronic .dashboard-container > :nth-child(3) > * { min-height: 0; overflow: hidden; }
.page-chronic #trendChart, .page-chronic #adherenceChart { height: 205px !important; }
.page-chronic #visitChart { height: 175px !important; }

/* layout-round-6 */
/* Chronic risk: the three primary modules use identical widths. */
.page-chronic-risk .risk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.page-chronic-risk .risk-grid > * { min-width: 0 !important; }

/* Energy: two equal page halves; equal cards within each half. */
.page-energy .dashboard-container { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.page-energy .energy-grid > :first-child { grid-column: 1 / span 2 !important; grid-row: 3 !important; }
.page-energy .dashboard-container > :nth-child(4) > :nth-child(1) { grid-column: 1 / span 2 !important; grid-row: 4 !important; }
.page-energy .dashboard-container > :nth-child(4) > :nth-child(2) { grid-column: 3 / span 2 !important; grid-row: 4 !important; }
.page-energy .dashboard-container > :nth-child(4) > :nth-child(3) { grid-column: 3 !important; grid-row: 3 !important; }
.page-energy .energy-right-stack > :nth-child(1), .page-energy .energy-right-stack > :nth-child(2) { grid-column: 4 !important; }

/* Executive: more room for score/trend, less for risk reminder. */
.page-executive .dashboard-container { grid-template-rows: 74px 562px minmax(0, 1fr); }
.page-executive .executive-main-grid { grid-template-rows: 382px 164px !important; }
.page-executive .score-ring { width: 250px !important; height: 250px !important; }
.page-executive .score-ring svg { width: 250px !important; height: 250px !important; }
.page-executive .score-card #scoreChart, .page-executive .trend-card #trendChart { max-height: 180px !important; }
.page-executive .risk-card { padding: 10px 14px !important; }
.page-executive .risk-card .flex-wrap { gap: 8px !important; }
.page-executive .risk-card .flex-wrap > span { padding: 6px 12px !important; font-size: 13px !important; }

/* Individual vitals: left circular visual + legend, right vertical metrics. */
.page-individual-vitals .middle-grid > :nth-child(1) > .flex-col {
  display: grid !important; grid-template-columns: minmax(0, 1.1fr) minmax(120px, .9fr); gap: 12px !important; align-items: stretch; height: calc(100% - 28px);
}
.page-individual-vitals .middle-grid > :nth-child(1) #activityChart { grid-column: 1; width: 100% !important; height: 100% !important; min-height: 0 !important; }
.page-individual-vitals .middle-grid > :nth-child(1) .grid { grid-column: 2; display: flex !important; flex-direction: column; gap: 7px !important; }
.page-individual-vitals .middle-grid > :nth-child(1) .grid > div { flex: 1 1 0; min-height: 0; padding: 6px 9px !important; }
.page-individual-vitals .middle-grid > :nth-child(1) .grid .text-lg { font-size: 15px !important; line-height: 1.1; }
.page-individual-vitals .middle-grid > :nth-child(2) { display: flex; flex-direction: column; }
.page-individual-vitals .middle-grid > :nth-child(2) #hrTrendChart { flex: 1 1 auto; width: 100% !important; height: auto !important; min-height: 0 !important; }

/* Sleep: chart left, its legend below; score and week comparison remain on the right. */
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(1) > .flex:last-child {
  grid-template-columns: minmax(110px, .85fr) minmax(0, 1.15fr) !important; gap: 10px !important;
}
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(1) .space-y-2\.5 { display: flex !important; flex-direction: column; gap: 5px !important; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(1) .space-y-2\.5 > p { order: -1; padding: 6px 8px; border-radius: 7px; background: var(--dashboard-surface); font-weight: 600; }
.page-individual-vitals #sleepChart { width: 125px !important; height: 125px !important; align-self: center; }

/* Health score: circular chart left and three metrics stacked on the right. */
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(3) {
  display: grid !important; grid-template-columns: minmax(0, 1.1fr) minmax(110px, .9fr); grid-template-rows: auto auto minmax(0, 1fr); column-gap: 10px;
}
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(3) > h3,
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(3) > p { grid-column: 1 / -1; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(3) #healthScoreChart { grid-column: 1; grid-row: 3; width: 100% !important; height: 100% !important; min-height: 0 !important; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(3) > .grid { grid-column: 2; grid-row: 3; display: flex !important; flex-direction: column; gap: 6px !important; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(3) > .grid > div { flex: 1 1 0; padding: 5px !important; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(1) { padding: 7px 9px !important; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(1) > .flex:last-child { height: calc(100% - 20px) !important; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(1) .space-y-2\.5 { font-size: 10px !important; line-height: 1.05; gap: 3px !important; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(1) .space-y-2\.5 > p { padding: 4px 6px; margin: 0 !important; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(1) > .flex:first-child { margin-bottom: 2px !important; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(1) > .flex:last-child { overflow: hidden; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(2) { padding: 8px !important; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(2) #glucoseChart { height: 160px !important; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(2) > p { margin-top: 2px !important; font-size: 10px; line-height: 1.15; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(3) { padding: 7px 9px !important; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(3) > p { margin: 0 !important; line-height: 1.1; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(3) > .grid { margin-top: 0 !important; }

/* layout-round-7 */
/* Vitals: matching circular visuals; activity legend stays below the ring. */
.page-individual-vitals .middle-grid > :nth-child(1) > .flex-col { grid-template-columns: 145px minmax(0, 1fr) !important; }
.page-individual-vitals .middle-grid > :nth-child(1) #activityChart { width: 145px !important; height: 145px !important; justify-self: center; align-self: start; }
.page-individual-vitals #sleepChart { width: 145px !important; height: 145px !important; justify-self: center; align-self: start; }
.page-individual-vitals .dashboard-container > :nth-child(4) > :nth-child(1) > .flex:last-child { grid-template-columns: 145px minmax(0, 1fr) !important; }

/* AI health: keep the same vertical KPI rhythm used by the Energy page. */
.page-ai-health .kpi-grid > * { display: flex !important; flex-direction: column; justify-content: space-between; padding: 10px 12px !important; }
.page-ai-health .kpi-grid > * > :first-child { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.page-ai-health .kpi-grid > * > :last-child { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.page-ai-health .dashboard-container > :nth-child(2) .ai-card-content { padding: 8px !important; }
.page-ai-health .dashboard-container > :nth-child(2) .ai-card-content img { width: 100% !important; max-width: 100% !important; height: 112px !important; max-height: 112px !important; object-fit: contain; }

/* Executive: profile/status column and score column have identical width. */
.page-executive .executive-main-grid { grid-template-columns: 380px 380px minmax(0, 1fr) !important; }

/* Family plan: date and action remain in the upper content flow. */
.page-family .plan-card { justify-content: flex-start !important; gap: 12px !important; }
.page-family .plan-card .plan-date { margin-top: 0 !important; }
.page-family .plan-card .plan-btn { margin-top: 0 !important; }

/* Medical: shorter third row; service donut/legend left-right; emergency card matches coverage rhythm. */
.page-medical .dashboard-container { grid-template-rows: 74px 400px minmax(0, 1fr) !important; gap: 16px !important; }
.page-medical .medical-row-layout { grid-row: 3; margin-top: 0 !important; grid-template-columns: 1.6fr 1.4fr 1fr !important; gap: 16px !important; align-self: stretch; min-height: 0; }
.page-medical .top-grid > :nth-child(6) > .card:first-child .flex.gap-3 { display: grid !important; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 10px !important; }
.page-medical #donutChart { width: 150px !important; height: 150px !important; }
.page-medical .dashboard-container > :nth-child(3) > :nth-child(3) { padding: 12px !important; }
.page-medical .dashboard-container > :nth-child(3) > :nth-child(3) .space-y-4 { gap: 7px !important; }
.page-medical .dashboard-container > :nth-child(3) > :nth-child(3) .space-y-4 > * { padding: 6px 8px !important; }
.page-medical .medical-middle-content { min-height: 0; overflow: hidden; }
.page-medical .medical-middle-content > .card { box-sizing: border-box; height: 100%; min-height: 0; overflow: hidden; padding: 10px !important; }
.page-medical .medical-middle-content > .card:first-child { display: flex; flex-direction: column; }
.page-medical .medical-middle-content > .card:first-child > .flex { flex: 1 1 auto; min-height: 0; }
.page-medical .medical-middle-content #donutChart { width: 118px !important; height: 118px !important; }
.page-medical .medical-middle-content > .card:first-child .legend-row { padding-top: 4px !important; padding-bottom: 4px !important; }
.page-medical .medical-middle-content > .card:first-child .space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 2px !important; }
.page-medical .medical-map-card { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.page-medical .medical-map-card #mapChart { width: 100% !important; height: auto !important; min-height: 80px !important; align-self: stretch; }

/* Operations: channel spans both lower rows; gender and cost share the middle track. */
.page-operations .operations-container { grid-template-columns: 1fr 1.35fr 1fr; grid-template-rows: 74px 230px 330px minmax(0, 1fr) !important; }
.page-operations .bottom-grid > :nth-child(1) { grid-column: 1; grid-row: 3; }
.page-operations .bottom-grid > :nth-child(2) { grid-column: 2; grid-row: 3; }
.page-operations .operations-container > :nth-child(4) > :nth-child(1) { grid-column: 1; grid-row: 4; }
.page-operations .operations-container > :nth-child(4) > :nth-child(2) { grid-column: 2; grid-row: 4; }
.page-operations .operations-container > :nth-child(4) > :nth-child(3) { grid-column: 3; grid-row: 3 / span 2; }

/* Personal service: appointment, online consultation and hotline are one top-down stack. */
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(3) { justify-content: flex-start !important; gap: 10px !important; }
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(3) > * { margin: 0 !important; }
.page-personal-service .personal-service-record-list { gap: 20px !important; justify-content: space-between; min-height: 0; }
.page-personal-service .personal-service-record-list > .record-item { padding-top: 18px !important; padding-bottom: 18px !important; }
.page-personal-service .personal-service-workload { display: flex !important; flex-direction: column; gap: 20px !important; min-height: 0; }
.page-personal-service .personal-service-workload > * { margin-top: 0 !important; }

/* Risk: normalize card padding/rhythm while keeping dense internals within fixed rows. */
.page-risk .dashboard-container > :nth-child(3) > :nth-child(1),
.page-risk .dashboard-container > :nth-child(3) > :nth-child(2),
.page-risk .dashboard-container > :nth-child(4) > :nth-child(1),
.page-risk .dashboard-container > :nth-child(4) > :nth-child(2) { padding: 12px !important; border-radius: 12px; }
.page-risk .dashboard-container > :nth-child(3) > :nth-child(1) > :first-child,
.page-risk .dashboard-container > :nth-child(3) > :nth-child(2) > :first-child,
.page-risk .dashboard-container > :nth-child(4) > :nth-child(1) > :first-child,
.page-risk .dashboard-container > :nth-child(4) > :nth-child(2) > :first-child { margin-bottom: 8px !important; }
.page-risk .dashboard-container > :nth-child(4) > :nth-child(1) .grid { gap: 8px !important; }
.page-risk .dashboard-container > :nth-child(4) > :nth-child(1) .grid > * { padding: 8px !important; border-radius: 8px; }
.page-risk .dashboard-container > :nth-child(4) > :nth-child(2) .space-y-4 { gap: 8px !important; }
.page-risk #risk-trend { height: calc(100% - 60px) !important; }

/* Risk semantic-card repair: module styles follow meaning after DOM reordering. */
.page-risk .dashboard-container { grid-template-rows: 74px 270px 290px minmax(0, 1fr) !important; }
.page-risk .dashboard-container .risk-high-list-card,
.page-risk .dashboard-container .risk-trend-card,
.page-risk .dashboard-container .risk-control-card,
.page-risk .dashboard-container .risk-model-performance-card { padding: 12px !important; overflow: hidden; min-width: 0; min-height: 0; }
html.page-risk body.page-risk .dashboard-container section.risk-control-card,
html.page-risk body.page-risk .dashboard-container section.risk-model-performance-card { padding: 12px !important; }
.page-risk .risk-high-list-card > :first-child,
.page-risk .risk-trend-card > :first-child,
.page-risk .risk-control-card > :first-child,
.page-risk .risk-model-performance-card > :first-child { margin-bottom: 8px !important; }
.page-risk .risk-high-list-card table { font-size: 11px !important; line-height: 1.15 !important; }
.page-risk .risk-high-list-card th,
.page-risk .risk-high-list-card td { padding-top: 3px !important; padding-bottom: 3px !important; }
.page-risk .risk-trend-card #risk-trend { width: 100% !important; height: calc(100% - 62px) !important; }
.page-risk .risk-trend-card { display: grid !important; grid-template-rows: auto minmax(120px, 1fr); }
.page-risk .risk-trend-card #risk-trend { height: 100% !important; min-height: 120px !important; }
.page-risk .risk-bottom-layout { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) !important; gap: 16px !important; min-height: 0; }
.page-risk .risk-control-card > .grid { gap: 10px !important; }
.page-risk .risk-control-card > .grid > * { padding: 0 !important; }
.page-risk .risk-model-performance-card .space-y-4 { gap: 10px !important; }
.page-risk .risk-model-performance-card .space-y-4 > * { margin-top: 0 !important; }
.page-risk .risk-model-performance-card .grid > * { padding: 8px !important; }
.page-risk .risk-model-performance-card .space-y-4 > :last-child { padding: 8px !important; }

/* risk-spacing-tune */
/* Prediction tiles use one consistent horizontal/vertical gap. */
html.page-risk body.page-risk .dashboard-container > :nth-child(2) > :nth-child(2) .grid {
  row-gap: 10px !important;
  column-gap: 10px !important;
}
/* Control metrics get clearer separation between their two rows. */
.page-risk .risk-control-card > .grid {
  row-gap: 18px !important;
  column-gap: 14px !important;
}
.page-risk .risk-control-card > .grid > div > :first-child { margin-bottom: 7px !important; }
.page-risk .risk-control-card > .grid > div > p { margin-top: 7px !important; }
/* The people table keeps its compact typography but restores readable row height. */
html.page-risk body.page-risk .dashboard-container .risk-high-list-card th { padding-top: 6px !important; padding-bottom: 8px !important; }
html.page-risk body.page-risk .dashboard-container .risk-high-list-card td { padding-top: 7px !important; padding-bottom: 7px !important; }

/* chronic-spacing-tune */
/* 参照大屏排版规范，优化模块内边距与行距（不改布局结构） */
/* 1. KPI 统计卡：内容不贴边，标题/数字/底部信息间距舒展 */
.page-chronic .dashboard-container > :nth-child(2) > * { padding: 12px 16px !important; }
.page-chronic .dashboard-container > :nth-child(2) .mb-3 { margin-bottom: 8px !important; }
.page-chronic .dashboard-container > :nth-child(2) .text-4xl { font-size: 30px !important; }
.page-chronic .dashboard-container > :nth-child(2) .mt-4 { margin-top: 8px !important; }
.page-chronic .dashboard-container > :nth-child(2) .mt-1\.5 { margin-top: 5px !important; }

/* 2. 图表卡：加大内边距，图表与边框留白，标题下方留白 */
.page-chronic .dashboard-container > :nth-child(3) > *,
.page-chronic .dashboard-container > :nth-child(4) > * { padding: 14px 16px !important; }
.page-chronic .chronic-chart-card .mb-2 { margin-bottom: 12px !important; }

/* 3. 质量指标：行距舒展（保持 20px 间隔），说明块更透气 */
.page-chronic .dashboard-container > :nth-child(4) > :nth-child(2) .rounded-lg { padding: 12px 14px !important; }

/* 4. 重点人群干预：列表项行距加大，内边距加大 */
.page-chronic .dashboard-container > :nth-child(4) > :nth-child(3) .space-y-3 > * + * { margin-top: 14px !important; }
.page-chronic .dashboard-container > :nth-child(4) > :nth-child(3) .rounded-lg { padding: 14px 16px !important; }

/* ten-page-tv-tuning: batch A */
/* AI health: narrower recommendation cards, wider breathing room and centered task summary. */
html.page-ai-health body.page-ai-health .suggestion-grid { width: 92%; justify-self: center; gap: 28px !important; }
.page-ai-health .suggestion-card .suggestion-body { padding: 8px 10px 14px !important; gap: 9px !important; }
.page-ai-health .suggestion-card .suggestion-body img {
  width: calc(100% + 20px) !important; max-width: none !important; height: 124px !important; max-height: 124px !important;
  margin-left: -10px; margin-right: -10px; border-radius: 0; background: var(--dashboard-card); object-fit: contain;
}
.page-ai-health .suggestion-card .suggestion-body .suggestion-title { margin-top: 5px; }
.page-ai-health .task-layout { width: min(620px, 100%); margin: 0 auto; justify-content: center; gap: 22px !important; }
.page-ai-health .task-chart-wrap { flex: 0 0 250px; }
.page-ai-health .task-stats { flex: 0 0 220px; }

/* Body twin: side cards use half their previous equal-share height and 30% larger vertical gaps. */
.page-body-twin .body-twin-side-stack { justify-content: center !important; gap: 31.2px !important; }
.page-body-twin .body-twin-side-stack > .system-card {
  box-sizing: border-box; flex: 0 0 calc((100% - 62.4px) / 6) !important; min-height: 0 !important;
  padding-top: 10px !important; padding-bottom: 10px !important; overflow: hidden;
}
.page-body-twin .body-twin-side-stack .card-icon-img { width: 64px; height: 64px; }
.page-body-twin .body-twin-side-stack .card-score { font-size: 28px; }

/* Chronic risk: rebalance columns, top-align dense cards and equalize the final two rows. */
.page-chronic-risk .dashboard-container { grid-template-rows: 74px 400px 247px 247px !important; }
.page-chronic-risk .risk-grid { grid-template-columns: 1.08fr .84fr 1.08fr !important; }
.page-chronic-risk .risk-grid > :first-child .gauge-chart { height: 253px !important; }
.page-chronic-risk .risk-grid > :nth-child(2),
.page-chronic-risk .risk-grid > :nth-child(3) { justify-content: flex-start !important; }
.page-chronic-risk .risk-grid > :nth-child(2) .card-body,
.page-chronic-risk .risk-grid > :nth-child(3) .card-body { flex: 0 1 auto; justify-content: flex-start; }
.page-chronic-risk .bottom-grid { grid-template-columns: 1.2fr 1.8fr !important; }
.page-chronic-risk .control-card .card-body { display: flex; align-items: center; justify-content: center; }
.page-chronic-risk .control-card .control-grid { width: 80%; margin-left: auto; margin-right: auto; }
.page-chronic-risk .dashboard-container > :nth-child(3) { height: auto !important; align-self: stretch; }

/* ten-page-tv-tuning: batch B */
.page-chronic .dashboard-container { grid-template-rows: 74px 165px 315px minmax(0, 1fr) !important; }
.page-chronic #visitChart { height: 220px !important; min-height: 0 !important; }

.page-intervention .scale-wrapper > .w-full > :nth-child(3) { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; grid-template-rows: 1.2fr .8fr !important; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(1) { grid-column: 1 / span 2; grid-row: 1; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(2) { grid-column: 3; grid-row: 1; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(3) { grid-column: 2; grid-row: 2; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(4) { grid-column: 1; grid-row: 2; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(5) { grid-column: 3; grid-row: 2; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(5) article { padding: 10px 12px !important; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(5) .space-y-3 { gap: 5px !important; }

.page-executive .dashboard-container { grid-template-rows: 74px 736px 174px !important; }
.page-executive .executive-main-grid { grid-template-columns: 418px 418px minmax(0, 1fr) !important; grid-template-rows: 420px 300px !important; }
.page-executive .executive-ai-full { min-height: 0; overflow: hidden; padding: 10px 14px !important; }
.page-executive .executive-ai-full .grid > * { padding: 9px 12px !important; }

.page-family .dashboard-container { grid-template-columns: 1fr 1fr .72fr !important; grid-template-rows: 74px 215px 314px minmax(0, 1fr) !important; }
.page-family .bottom-grid > :last-child { grid-column: 3; grid-row: 3 / span 2; }
.page-family .plan-card { gap: 10px !important; padding: 14px !important; overflow: hidden; }
.page-family .plan-card .plan-business-list { display: grid; gap: 7px; margin-top: 2px; }
.page-family .plan-card .plan-business-item { padding: 7px 9px; border: 1px solid var(--dashboard-border); border-radius: 8px; background: var(--dashboard-surface); }
.page-family .plan-card .plan-business-item strong { display: block; color: var(--dashboard-heading); font-size: 12px; }
.page-family .plan-card .plan-business-item span { display: block; margin-top: 2px; color: var(--dashboard-text-muted); font-size: 10px; line-height: 1.25; }

/* ten-page-tv-tuning: batch C */
/* Individual vitals: centered activity chart, sleep-style score layout, larger statistics. */
.page-individual-vitals .middle-grid > :nth-child(1) > .flex-col {
  grid-template-columns: 1fr !important; grid-template-rows: 145px minmax(0, 1fr) !important; justify-items: center;
}
.page-individual-vitals .middle-grid > :nth-child(1) #activityChart { grid-column: 1; grid-row: 1; width: 145px !important; height: 145px !important; justify-self: center; align-self: center; }
.page-individual-vitals .middle-grid > :nth-child(1) .grid { grid-column: 1; grid-row: 2; width: 100%; display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(3) .split-layout { display: grid !important; grid-template-columns: 145px minmax(0, 1fr) !important; gap: 10px !important; min-height: 0 !important; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(3) .split-chart-wrap { width: 145px !important; height: 145px !important; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(3) #healthScoreChart { width: 145px !important; height: 145px !important; min-height: 0 !important; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(3) .split-stats { padding-top: 0 !important; gap: 3px !important; }
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(2) .stat-value { font-size: 22px !important; line-height: 1.15; }

/* Medical: second row +20%, final row -20%, coverage width equals emergency width. */
.page-medical .dashboard-container { grid-template-rows: 74px 480px 408px !important; }
.page-medical .top-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) 472px !important; }
.page-medical .medical-row-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr) 504px !important; }
.page-medical .medical-row-layout #visitTrendChart,
.page-medical .medical-row-layout #referralChart { height: 176px !important; min-height: 0 !important; }

/* Operations: equal top cards and centered, narrower service metrics. */
.page-operations .top-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.page-operations .top-grid > :last-child #chart-revenue { width: 100% !important; height: 75px !important; }
.page-operations .bottom-grid > :nth-child(1) { display: flex; flex-direction: column; }
.page-operations .bottom-grid > :nth-child(1) > .grid { width: 88%; flex: 1 1 auto; margin: 0 auto; align-content: center; align-items: center; }

/* first-row-vitals-standard: shared visual rhythm for the four health KPI rows. */
.page-ai-health .dashboard-container { grid-template-rows: 74px 130px 300px minmax(0, 1fr) !important; }
.page-overview .dashboard-container { grid-template-rows: 74px 130px 390px minmax(0, 1fr) !important; }

.page-ai-health .kpi-grid > *,
.page-energy .dashboard-container > :nth-child(2) > *,
.page-overview .kpi-grid > *,
.page-individual-vitals .kpi-grid > * {
  box-sizing: border-box;
  height: 100%;
  min-height: 0 !important;
  padding: 12px !important;
  border: 1px solid var(--dashboard-border) !important;
  border-radius: 12px !important;
  background: var(--dashboard-card) !important;
  display: flex !important;
  flex-direction: column;
}

.page-ai-health .kpi-grid > * > :first-child,
.page-energy .dashboard-container > :nth-child(2) > * > :first-child,
.page-individual-vitals .kpi-grid > * > :first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0 !important;
}

.page-overview .kpi-grid > * > :first-child {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0 !important;
}

.page-energy .dashboard-container > :nth-child(2) > * > :first-child > div,
.page-overview .kpi-grid .section-icon {
  width: 36px !important;
  height: 36px !important;
  flex: 0 0 36px;
  border-radius: 8px !important;
}

.page-ai-health .kpi-grid .kpi-value,
.page-energy .dashboard-container > :nth-child(2) > * > p:nth-child(2),
.page-overview .kpi-grid .kpi-num,
.page-individual-vitals .kpi-grid .kpi-value {
  margin-top: 6px !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: var(--dashboard-heading) !important;
}

.page-ai-health .kpi-grid > * > :last-child,
.page-energy .dashboard-container > :nth-child(2) > * > p:last-child,
.page-overview .kpi-grid > * > p:last-child,
.page-individual-vitals .kpi-grid > * > :last-child {
  box-sizing: border-box;
  margin-top: auto !important;
  padding-top: 8px !important;
  border-top: 1px solid var(--dashboard-border) !important;
}

.page-ai-health .kpi-grid > * > :last-child,
.page-individual-vitals .kpi-grid > * > :last-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* realtime-vitals-standard: match Individual Vitals while retaining live sparklines. */
.page-realtime .dashboard-container { grid-template-rows: 74px 130px 310px minmax(0, 1fr) !important; }
.page-realtime .vital-card {
  box-sizing: border-box;
  height: 100%;
  min-height: 0 !important;
  padding: 12px !important;
  border: 1px solid var(--dashboard-border) !important;
  border-radius: 12px !important;
  background: var(--dashboard-card) !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.page-realtime .vital-card > :first-child { margin: 0 !important; align-items: flex-start; }
.page-realtime .realtime-vital-icon { display: flex; width: 36px; height: 36px; flex: 0 0 36px; align-items: center; justify-content: center; border-radius: 8px; }
.page-realtime .vital-card > .flex.items-baseline { margin-top: 6px; }
.page-realtime .vital-card > .flex.items-baseline > :first-child { font-size: 24px !important; line-height: 1.25 !important; }
.page-realtime .realtime-vital-footer { display: flex; min-height: 30px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--dashboard-border); align-items: center; justify-content: space-between; gap: 8px; }
.page-realtime .realtime-vital-status { flex: 0 0 auto; padding: 2px 9px; border-radius: 9999px; background: rgba(34, 197, 94, .12); color: var(--dashboard-green); font-size: 10px; font-weight: 500; white-space: nowrap; }
.page-realtime .realtime-vital-status-cyan { background: rgba(6, 182, 212, .12); color: var(--dashboard-cyan); }
.page-realtime .realtime-vital-spark { width: 72px !important; height: 26px !important; min-height: 0 !important; flex: 0 1 72px; }

/* intervention-first-row-standard: shared KPI shell, type scale and spacing. */
.page-chronic .dashboard-container > :nth-child(2) > *,
.page-medical .top-grid > article:nth-child(-n+4),
.page-operations .top-grid > *,
.page-intervention .scale-wrapper > .w-full > :nth-child(2) > article {
  box-sizing: border-box;
  min-width: 0;
  min-height: 0 !important;
  padding: 16px !important;
  border: 1px solid var(--dashboard-border) !important;
  border-radius: 12px !important;
  background: var(--dashboard-card) !important;
  box-shadow: none !important;
  overflow: hidden;
}

.page-chronic .dashboard-container > :nth-child(2) > *,
.page-medical .top-grid > article:nth-child(-n+4),
.page-intervention .scale-wrapper > .w-full > :nth-child(2) > article {
  display: flex !important;
  flex-direction: column;
  justify-content: flex-start !important;
}

.page-chronic .dashboard-container > :nth-child(2) > * > :first-child,
.page-medical .top-grid > article:nth-child(-n+4) > :first-child,
.page-operations .top-grid > * > :first-child,
.page-intervention .scale-wrapper > .w-full > :nth-child(2) > article > :first-child {
  margin-bottom: 12px !important;
}

.page-chronic .dashboard-container > :nth-child(2) .text-4xl,
.page-medical .top-grid > article:nth-child(-n+4) .text-3xl,
.page-operations .top-grid > * > .text-xl,
.page-intervention .scale-wrapper > .w-full > :nth-child(2) > article .text-3xl {
  font-size: 30px !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  color: var(--dashboard-heading) !important;
}

.page-medical .top-grid > article:nth-child(-n+4) > :last-child,
.page-intervention .scale-wrapper > .w-full > :nth-child(2) > article > :last-child {
  margin-top: auto;
  flex: 0 0 8px;
}

/* Chronic keeps its comparison text and renders control rate as the same progress rhythm. */
.page-chronic .dashboard-container > :nth-child(2) > * { --standard-progress: 65%; position: relative; }
.page-chronic .dashboard-container > :nth-child(2) > :nth-child(2) { --standard-progress: 62%; }
.page-chronic .dashboard-container > :nth-child(2) > :nth-child(3) { --standard-progress: 71%; }
.page-chronic .dashboard-container > :nth-child(2) > :nth-child(4) { --standard-progress: 66%; }
.page-chronic .dashboard-container > :nth-child(2) > :nth-child(5) { --standard-progress: 56%; }
.page-chronic .dashboard-container > :nth-child(2) > *::after {
  content: "";
  display: block;
  width: 100%;
  height: 8px;
  margin-top: auto;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--dashboard-cyan) 0 var(--standard-progress), var(--dashboard-surface) var(--standard-progress) 100%);
}

/* Operations retains charts and its ROI composition while matching the card shell. */
.page-operations .top-grid > * { display: flex !important; flex-direction: column; }
.page-operations .top-grid > * > [id^="chart-"] { margin-top: auto !important; }

/* intervention-progress-bar-standard: exact geometry from Intervention cards 2 and 3. */
.page-intervention .scale-wrapper > .w-full > :nth-child(2) > article > div:last-child,
.page-medical .top-grid > article:nth-child(-n+4) > div:last-child {
  display: block !important;
  box-sizing: border-box;
  width: 100% !important;
  height: 8px !important;
  min-height: 8px !important;
  max-height: 8px !important;
  flex: 0 0 8px !important;
  margin-top: auto !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 9999px !important;
  background: var(--dashboard-surface) !important;
}
.page-intervention .scale-wrapper > .w-full > :nth-child(2) > article > div:last-child > div,
.page-medical .top-grid > article:nth-child(-n+4) > div:last-child > div {
  display: block !important;
  height: 100% !important;
  min-height: 0 !important;
  border-radius: 9999px !important;
}
.page-intervention .scale-wrapper > .w-full > :nth-child(2) > article > div:nth-last-child(2),
.page-medical .top-grid > article:nth-child(-n+4) > div:nth-last-child(2) {
  margin-bottom: 8px !important;
}

/* responsive-medical-metric-tiles: Medical-style tiles with WebView-safe wrapping. */
.page-chronic-risk .responsive-metric-grid,
.page-individual-vitals .responsive-metric-grid,
.page-intervention .responsive-metric-grid,
.page-medical .responsive-metric-grid,
.page-risk .responsive-metric-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  gap: 12px !important;
  align-content: flex-start;
  align-items: stretch;
}
.page-chronic-risk .responsive-metric-grid > *,
.page-individual-vitals .responsive-metric-grid > *,
.page-intervention .responsive-metric-grid > *,
.page-medical .responsive-metric-grid > *,
.page-risk .responsive-metric-grid > * {
  box-sizing: border-box;
  flex: 1 1 calc(50% - 6px) !important;
  min-width: 150px;
  min-height: 0 !important;
  padding: 12px !important;
  border: 1px solid var(--dashboard-border) !important;
  border-radius: 8px !important;
  background: var(--dashboard-surface) !important;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start !important;
  justify-content: center !important;
  text-align: left !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.page-chronic-risk .responsive-metric-grid > * > :first-child,
.page-individual-vitals .responsive-metric-grid > * > :first-child,
.page-intervention .responsive-metric-grid > * > :first-child,
.page-medical .responsive-metric-grid > * > :first-child,
.page-risk .responsive-metric-grid > * > :first-child {
  margin: 0 !important;
  color: var(--dashboard-text-muted) !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  line-height: 1.3;
}
.page-chronic-risk .responsive-metric-grid > * > :nth-child(2),
.page-individual-vitals .responsive-metric-grid > * > :nth-child(2),
.page-intervention .responsive-metric-grid > * > :nth-child(2),
.page-medical .responsive-metric-grid > * > :nth-child(2),
.page-risk .responsive-metric-grid > * > :nth-child(2) {
  margin: 4px 0 0 !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.2;
}
.page-chronic-risk .responsive-metric-grid > * > :nth-child(3),
.page-individual-vitals .responsive-metric-grid > * > :nth-child(3),
.page-intervention .responsive-metric-grid > * > :nth-child(3),
.page-medical .responsive-metric-grid > * > :nth-child(3) {
  margin: 3px 0 0 !important;
  font-size: 10px !important;
  line-height: 1.3;
}

/* adaptive-circular-components: hosts fill their live module allocation. */
[data-adaptive-circle="true"] {
  box-sizing: border-box !important;
  min-width: 0 !important;
  min-height: 96px !important;
  max-width: 100% !important;
  max-height: 100% !important;
  align-self: stretch;
}
[data-adaptive-circle="true"] > div,
[data-adaptive-circle="true"] canvas,
[data-adaptive-circle="true"] svg {
  max-width: 100% !important;
  max-height: 100% !important;
}
[data-adaptive-circle="true"] ~ * {
  min-width: 0 !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}
[data-adaptive-score-ring="true"] {
  max-width: 100% !important;
  max-height: 100% !important;
  flex: 0 1 auto;
}
[data-adaptive-score-ring="true"] svg {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
}

/* component-spacing-standard: consistent rhythm for equivalent dashboard content. */
:root {
  --dashboard-title-line: 1.35;
  --dashboard-label-line: 1.3;
  --dashboard-value-line: 1.15;
  --dashboard-meta-line: 1.4;
  --dashboard-legend-line: 1.3;
  --dashboard-content-gap: 8px;
}
.scale-wrapper h3,
.scale-wrapper .card-title {
  line-height: var(--dashboard-title-line) !important;
}
.scale-wrapper .kpi-label,
.scale-wrapper .stat-label,
.scale-wrapper .control-label,
.scale-wrapper .coverage-stat-label,
.scale-wrapper .responsive-metric-grid > * > :first-child {
  line-height: var(--dashboard-label-line) !important;
}
.scale-wrapper .kpi-value,
.scale-wrapper .stat-value,
.scale-wrapper .control-value,
.scale-wrapper .coverage-stat-value,
.scale-wrapper .responsive-metric-grid > * > :nth-child(2) {
  line-height: var(--dashboard-value-line) !important;
}
.scale-wrapper .stat-change,
.scale-wrapper .control-change,
.scale-wrapper .card-subtitle,
.scale-wrapper .task-stat-label,
.scale-wrapper .responsive-metric-grid > * > :nth-child(3) {
  line-height: var(--dashboard-meta-line) !important;
}
.scale-wrapper .legend-row,
.scale-wrapper [data-adaptive-circle-legend="true"] {
  line-height: var(--dashboard-legend-line) !important;
}
.scale-wrapper [data-adaptive-circle-legend="true"] {
  display: flex !important;
  min-width: 0 !important;
  flex-direction: column;
  justify-content: center;
  gap: var(--dashboard-content-gap) !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.scale-wrapper [data-adaptive-circle-legend="true"] > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  line-height: var(--dashboard-legend-line) !important;
}
.scale-wrapper .responsive-metric-grid > * > :first-child { margin-bottom: 0 !important; }
.scale-wrapper .responsive-metric-grid > * > :nth-child(2) { margin-top: 4px !important; }
.scale-wrapper .responsive-metric-grid > * > :nth-child(3) { margin-top: 3px !important; }

/* Hide the unscaled 1920x1080 frame until the adapter applies its first scale. */
html:not(.dashboard-scale-ready) .scale-wrapper {
  visibility: hidden;
  opacity: 0;
  animation: dashboard-scale-failsafe 0.01s linear 1.5s forwards;
}
html.dashboard-scale-ready .scale-wrapper {
  visibility: visible;
  opacity: 1;
  animation: none;
}
@keyframes dashboard-scale-failsafe {
  to { visibility: visible; opacity: 1; }
}
@media (max-width: 960px) and (max-height: 540px) {
  html:not(.dashboard-scale-ready) .scale-wrapper {
    width: 1920px;
    height: 1080px;
    transform: scale(0.5);
    transform-origin: left top;
  }
}

/* four-page-detail-tuning: scoped refinements for the 1920x1080 canvas / 960x540 TV view. */
html.page-ai-health body.page-ai-health .suggestion-grid {
  box-sizing: border-box;
  width: 100% !important;
  justify-self: stretch;
}

/* Visual rows: primary risks, management metrics (+20%), then the compact AI strip. */
.page-chronic-risk .dashboard-container {
  grid-template-rows: 74px 400px 296px 74px !important;
}
.page-chronic-risk .dashboard-container > :nth-child(4) { grid-row: 3; }
.page-chronic-risk .dashboard-container > :nth-child(3) {
  grid-row: 4;
  height: auto !important;
  min-height: 0;
  align-self: stretch;
}
.page-chronic-risk .risk-summary-value {
  font-size: 24px !important;
  line-height: 1.1 !important;
}
.page-chronic-risk .risk-grid > :nth-child(2) .risk-bar-chart {
  height: 248px !important;
  min-height: 248px !important;
  flex: 0 0 248px !important;
}

/* Let the chart-and-legend group use the card's remaining height and center as one unit. */
.page-energy .dashboard-container > :nth-child(4) > :nth-child(3) {
  display: flex !important;
  flex-direction: column;
}
.page-energy .dashboard-container > :nth-child(4) > :nth-child(3) > .flex.items-center {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  justify-content: center;
}
.page-energy #energySplitChart {
  margin: auto 0 !important;
}

/* nine-page-tv-detail-tuning: final scoped layer for TV Bro/WebView. */

/* Executive: headings stay left while score/chart content uses the available center. */
.page-executive .executive-main-grid {
  grid-template-rows: minmax(0, 1fr) 150px !important;
}
.page-executive .score-card,
.page-executive .trend-card { min-height: 0; overflow: hidden; }
.page-executive .score-card { justify-content: flex-start !important; }
.page-executive .score-card > h3,
.page-executive .trend-card h3,
.page-executive .risk-card h3 { width: 100%; align-self: stretch; text-align: left !important; }
.page-executive .score-card .score-ring { margin: auto !important; }
.page-executive .score-card > p { margin-top: 2px !important; margin-bottom: 8px !important; }
.page-executive .trend-card { display: grid !important; grid-template-rows: auto minmax(0, 1fr); }
.page-executive #trendChart {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  align-self: stretch;
}
.page-executive .risk-card { padding-top: 10px !important; padding-bottom: 12px !important; }
.page-executive .risk-card > :last-child { margin-bottom: 6px; }

/* Family: relationship follows the larger name; grade follows the score. */
.page-family .family-member-identity,
.page-family .member-score-row { display: flex !important; align-items: center; flex-wrap: nowrap; }
.page-family .family-member-identity { gap: 8px; }
.page-family .member-score-row { gap: 6px !important; }
.page-family .family-member-name { margin: 0 !important; font-size: 18px !important; line-height: 1.2; }
.page-family .family-member-role { position: static !important; margin: 0 !important; flex: 0 0 auto; }
.page-family .family-score-grade { position: static !important; margin-left: 6px !important; flex: 0 0 auto; }

/* Individual vitals: bounded circular hosts and a single-row statistics grid. */
.page-individual-vitals .middle-grid > :first-child .card-body,
.page-individual-vitals .dashboard-container > :nth-child(5) > :nth-child(3) .card-body { min-height: 0; }
.page-individual-vitals #activityChart {
  box-sizing: border-box;
  width: 150px !important;
  height: 150px !important;
  max-width: 150px !important;
  max-height: 150px !important;
  min-height: 96px !important;
  margin: auto !important;
  align-self: center;
  justify-self: center;
}
.page-individual-vitals #healthScoreChart,
.page-individual-vitals .split-chart-wrap {
  box-sizing: border-box;
  width: 145px !important;
  height: 145px !important;
  max-width: 145px !important;
  max-height: 145px !important;
  min-height: 96px !important;
  align-self: center;
  justify-self: center;
}
.page-individual-vitals .stat-grid.responsive-metric-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  align-content: stretch;
}
.page-individual-vitals .stat-grid.responsive-metric-grid > * { min-width: 0 !important; width: auto !important; }

/* Intervention: three equal base columns; second track is 10% shorter. */
.page-intervention .scale-wrapper > .w-full > :nth-child(3) {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-template-rows: minmax(0, 1fr) minmax(0, .9fr) !important;
}
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(1) { grid-column: 1; grid-row: 1; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(2) { grid-column: 2; grid-row: 1; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(4) { grid-column: 3; grid-row: 1; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(5) { grid-column: 1 / span 2; grid-row: 2; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(3) { grid-column: 3; grid-row: 2; }

/* Medical: break the gauge resize feedback loop and rebalance the two content rows. */
.page-medical .dashboard-container { grid-template-rows: 74px 528px 360px !important; }
.page-medical .coverage-card .mt-4.flex { justify-content: center; min-height: 0; }
.page-medical #coverageGauge {
  box-sizing: border-box;
  flex: 0 0 112px !important;
  width: 112px !important;
  height: 112px !important;
  min-width: 96px !important;
  min-height: 96px !important;
  max-width: 112px !important;
  max-height: 112px !important;
  align-self: center;
}

/* Operations: equal page columns and more breathing room inside service metrics. */
.page-operations .operations-container { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.page-operations .top-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.page-operations .bottom-grid > :first-child > .grid {
  row-gap: 18px !important;
  column-gap: 12px !important;
  align-content: center;
}

/* Overview: compact status/map columns; anomaly and warning occupy distinct full tracks. */
.page-overview .dashboard-container {
  grid-template-columns: .85fr 1.75fr 1.15fr !important;
  grid-template-rows: 74px 130px 390px minmax(0, 1fr) !important;
}
.page-overview .middle-grid > :nth-child(1) { grid-column: 1; grid-row: 3; }
.page-overview .middle-grid > :nth-child(2) { grid-column: 2; grid-row: 3; }
.page-overview .middle-grid > :nth-child(3) { grid-column: 3; grid-row: 3; }
.page-overview .bottom-grid > :nth-child(1) { grid-column: 1 / span 2; grid-row: 4; }
.page-overview .bottom-grid > :nth-child(2) { grid-column: 3; grid-row: 4; }
.page-overview #statusChart {
  width: 100% !important;
  height: 260px !important;
  max-width: 300px !important;
  max-height: 260px !important;
  margin: auto !important;
}

/* Personal service: first two columns match; first content track is 10% taller. */
.page-personal-service .dashboard-container {
  grid-template-columns: 1fr 1fr .85fr !important;
  grid-template-rows: 74px 385px 260px minmax(0, 1fr) !important;
}
html.page-personal-service body.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(1) { grid-column: 1; grid-row: 2; }
html.page-personal-service body.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(2) { grid-column: 2; grid-row: 2; }
html.page-personal-service body.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(3) { grid-column: 3; grid-row: 4; }
html.page-personal-service body.page-personal-service .dashboard-container > :nth-child(3) > :nth-child(1) { grid-column: 1 / span 2; grid-row: 3; }
html.page-personal-service body.page-personal-service .dashboard-container > :nth-child(3) > :nth-child(2) { grid-column: 3; grid-row: 3; }
html.page-personal-service body.page-personal-service .dashboard-container > :nth-child(4) > :nth-child(1) { grid-column: 1 / span 2; grid-row: 4; }
html.page-personal-service body.page-personal-service .dashboard-container > :nth-child(4) > :nth-child(2) { grid-column: 3; grid-row: 2; align-self: stretch; }

/* Risk: reserve legend room, densify model tiles, and favor the high-risk list. */
.page-risk .dashboard-container { grid-template-columns: 1.35fr 1fr .85fr !important; }
.page-risk .dashboard-container > :nth-child(2) { grid-template-columns: 1.2fr 1.15fr 1.65fr !important; }
.page-risk .dashboard-container > :nth-child(2) > :first-child > .flex-1 { gap: 12px !important; }
.page-risk #risk-donut { flex: 0 0 42% !important; width: 42% !important; max-width: 230px !important; }
.page-risk #risk-donut + * { flex: 1 1 58% !important; min-width: 150px; gap: 10px !important; }
.page-risk .dashboard-container > :nth-child(2) > :nth-child(2) .grid { grid-template-columns: repeat(2, minmax(0, .82fr)) !important; gap: 6px !important; justify-content: center; }
.page-risk .dashboard-container > :nth-child(3) { grid-template-columns: 1.9fr 1.05fr .75fr !important; }
.page-risk .risk-high-list-card tbody tr:nth-child(n+6) { display: none !important; }
html.page-risk body.page-risk .dashboard-container .risk-bottom-layout { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr) !important; }
.page-risk .risk-control-card > .grid { gap: 12px !important; }
.page-risk .risk-control-card > .grid > div {
  box-sizing: border-box;
  padding: 12px !important;
  border: 1px solid var(--dashboard-border);
  border-radius: 8px;
  background: var(--dashboard-surface);
}
.page-risk .risk-control-card > .grid > div > :first-child { margin-bottom: 8px !important; }
.page-risk .risk-control-card > .grid > div > p { margin-top: 6px !important; line-height: 1.3; }
.page-risk .risk-model-performance-card .responsive-metric-grid {
  width: 82% !important;
  margin: 18px auto 0 !important;
  gap: 10px !important;
}
.page-risk .risk-model-performance-card .responsive-metric-grid > * { min-width: 0 !important; padding: 7px !important; }

/* twelve-page-tv-refinement */
html.page-ai-health body.page-ai-health .suggestion-grid{width:100%!important;gap:16px!important}.page-ai-health .suggestion-card .suggestion-body img{width:100%!important;max-width:100%!important;margin-left:0!important;margin-right:0!important}.page-ai-health .task-chart-wrap{flex-basis:205px!important}
.page-chronic-risk .risk-grid>:nth-child(2),.page-chronic-risk .risk-grid>:nth-child(2) .card-body,.page-chronic-risk .risk-grid>:nth-child(2) .risk-bar-chart{width:100%!important}
.page-energy #energySplitChart{flex:0 1 150px!important}.page-executive .metric-cards{margin-top:18px!important}.page-executive .score-card{height:90%!important;align-self:center!important;transform:none!important}.page-executive .score-ring{max-width:100%;max-height:calc(100% - 58px);height:auto!important;aspect-ratio:1/1!important;position:relative!important}.page-executive .score-ring svg{width:100%!important;height:100%!important}.page-executive .score-content{position:absolute!important;inset:0!important;display:flex!important;align-items:center!important;justify-content:center!important}
.page-intervention #typeChart{flex:0 1 145px!important}.page-intervention .scale-wrapper>.w-full>:nth-child(3)>div:nth-child(5) .space-y-3{gap:12px!important}.page-intervention .scale-wrapper>.w-full>:nth-child(3)>div:nth-child(5) .mb-1{margin-bottom:6px!important}
.page-medical .dashboard-container{grid-template-rows:74px 548px 340px!important}.page-medical .medical-row-layout>:nth-child(-n+2){display:grid!important;grid-template-rows:auto minmax(0,1fr)}.page-medical #visitTrendChart,.page-medical #referralChart{width:100%!important;height:100%!important;min-height:0!important}.page-medical .coverage-card .space-y-4>:last-child{text-align:left!important;align-items:flex-start!important}
.page-operations .operations-service-metrics{min-height:190px;align-items:stretch}.page-operations .operations-service-metrics>*{min-height:170px;justify-content:center}.page-operations #chart-gender{flex:0 0 135px!important;max-width:135px!important}.page-operations #chart-gender+*{flex:1 1 auto!important;min-width:190px}
.page-overview .middle-grid>:first-child{display:flex;flex-direction:column}.page-overview #statusChart{max-width:260px!important;align-self:center}.page-overview .dashboard-container{grid-template-columns:.9fr 1.1fr 1.3fr!important}.page-overview .bottom-grid>:first-child{grid-column:1/span 2;display:grid!important;grid-template-rows:auto minmax(0,1fr);overflow:hidden}.page-overview .bottom-grid>:last-child{grid-column:3}.page-overview .bottom-grid>:first-child>.flex{height:auto!important;min-height:0!important;align-self:stretch}.page-overview .bottom-grid>:first-child>.flex>:first-child{min-width:150px!important}.page-overview #trendChart{height:100%!important;min-height:0!important}
.page-personal-service .dashboard-container{grid-template-columns:repeat(3,minmax(0,1fr))!important}html.page-personal-service body.page-personal-service .dashboard-container>:nth-child(2)>:nth-child(1){grid-column:1;grid-row:2}html.page-personal-service body.page-personal-service .dashboard-container>:nth-child(3)>:nth-child(2){grid-column:2;grid-row:2}html.page-personal-service body.page-personal-service .dashboard-container>:nth-child(4)>:nth-child(2){grid-column:3;grid-row:2}html.page-personal-service body.page-personal-service .dashboard-container>:nth-child(2)>:nth-child(2){grid-column:1;grid-row:3/span 2}html.page-personal-service body.page-personal-service .dashboard-container>:nth-child(3)>:nth-child(1){grid-column:2;grid-row:3}html.page-personal-service body.page-personal-service .dashboard-container>:nth-child(4)>:nth-child(1){grid-column:2;grid-row:4}html.page-personal-service body.page-personal-service .dashboard-container>:nth-child(2)>:nth-child(3){grid-column:3;grid-row:3/span 2}
.page-population .pop-top-2{grid-column:1!important;grid-row:2!important}.page-population .dashboard-grid>:nth-child(4){grid-column:2!important;grid-row:1!important}.page-population #region-chart{transform:translate(-18px,14px)}.page-population #tags-cloud{width:94%!important;height:80%!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));align-content:center;gap:8px!important;overflow:hidden!important}.page-population #tags-cloud>*{position:static!important;transform:none!important;box-sizing:border-box;text-align:center;font-size:11px!important;padding:7px 8px!important;white-space:nowrap}
.page-realtime .event-table table{line-height:1.4!important}.page-realtime .event-table th,.page-realtime .event-table td{padding-top:9px!important;padding-bottom:9px!important}
.page-realtime .realtime-device-list{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px!important}.page-realtime .realtime-device-list>.flex{padding:7px!important}.page-realtime .wearable-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:8px}.page-realtime .wearable-extra-metric{padding:6px 8px;border-radius:7px;background:var(--dashboard-surface);color:var(--dashboard-text-muted);font-size:10px}.page-realtime #alert-donut{max-width:145px!important;float:left}
.page-risk .dashboard-container>:nth-child(2)>:nth-child(2) .grid>div{min-height:92px!important;padding:7px!important}.page-risk .risk-control-card>.grid{display:grid!important;grid-template-columns:1fr!important;gap:11px!important}.page-risk .risk-control-card>.grid>div{padding:0!important;border:0!important;background:transparent!important}.page-risk .risk-model-performance-card .responsive-metric-grid,.page-risk .risk-model-performance-card .responsive-metric-grid>*,.page-risk .risk-model-performance-card .space-y-4>:last-child{text-align:left!important;align-items:flex-start!important}.page-risk .risk-model-performance-card .space-y-4{gap:12px!important}
/* overview-status-layout */

/* fourteen-page-tv-refinement */
/* ai-suggestion-image-fullbleed */
.page-ai-health .suggestion-card .suggestion-body { overflow: hidden; }
.page-ai-health .suggestion-card .suggestion-body img {
  box-sizing: border-box;
  width: calc(100% + 20px) !important;
  max-width: none !important;
  margin-left: -10px !important;
  margin-right: -10px !important;
  object-fit: cover !important;
}

/* chronic-risk-equal-secondary-columns */
.page-chronic-risk .risk-grid { grid-template-columns: 1.08fr 1fr 1fr !important; }
.page-chronic-risk .risk-grid > :nth-child(2),
.page-chronic-risk .risk-grid > :nth-child(3) { min-width: 0 !important; width: auto !important; }

/* energy-legend-compact */
.page-energy .dashboard-container > :nth-child(4) > :nth-child(3) > .flex.items-center > :last-child {
  flex: 0 1 190px !important;
  width: 190px !important;
}
.page-energy .dashboard-container > :nth-child(4) > :nth-child(3) > .flex.items-center > :last-child > * {
  justify-content: flex-start !important;
  gap: 14px !important;
}
.page-energy .dashboard-container > :nth-child(4) > :nth-child(3) > .flex.items-center > :last-child > * > :last-child { margin-left: auto; }

/* executive-equal-score-trend */
.page-executive .executive-main-grid { grid-template-columns: 360px repeat(2, minmax(0, 1fr)) !important; }
.page-executive .wang-card { gap: 10px !important; align-self: start; }
.page-executive .wang-card > * { padding: 12px !important; }
.page-executive .wang-card > :last-child .space-y-3 { gap: 7px !important; }
.page-executive .wang-card > :last-child .space-y-3 > * { padding: 8px 10px !important; }

/* vitals-score-centered */
.page-individual-vitals .health-score-card { display: grid !important; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.page-individual-vitals .health-score-card > .card-header { align-self: start; }
.page-individual-vitals .health-score-card > .card-body { display: grid !important; min-height: 0; place-items: center; }
.page-individual-vitals .health-score-layout { width: 100%; min-height: 0 !important; height: 100%; align-items: center !important; justify-content: center !important; }
.page-individual-vitals .health-score-layout .split-chart-wrap { align-self: center !important; }
.page-individual-vitals .health-score-layout .split-stats { align-self: center !important; padding-top: 0 !important; gap: 5px !important; }
.page-individual-vitals .health-score-layout .split-item { min-height: 42px !important; padding-top: 5px !important; padding-bottom: 5px !important; }

/* intervention-type-centered */
.page-intervention .intervention-type-card > .flex.items-center { min-height: 0; justify-content: center !important; align-content: center; }
.page-intervention .intervention-type-card #typeChart { align-self: center; }
.page-intervention .intervention-type-card #typeChart + * { flex: 0 1 190px !important; width: 190px; }
.page-intervention .intervention-type-card #typeChart + * > * { justify-content: flex-start !important; gap: 10px !important; }
.page-intervention .intervention-type-card #typeChart + * > * > :last-child { margin-left: auto; }
.page-intervention .intervention-channel-card > h3 { margin-bottom: 16px !important; }

/* medical-kpi-standard */
.page-medical .top-grid { grid-template-rows: 190px minmax(0, 1fr) !important; }
.page-medical .top-grid > article:nth-child(-n+4) { min-height: 0 !important; height: 190px; padding: 12px 14px !important; }
.page-medical .medical-row-layout > :nth-child(-n+2) { grid-template-rows: auto minmax(0, 1fr) !important; }
.page-medical #visitTrendChart,
.page-medical #referralChart { width: 100% !important; height: 100% !important; min-height: 215px !important; align-self: center; }
.page-medical .medical-row-layout #visitTrendChart,
.page-medical .medical-row-layout #referralChart { height: 215px !important; min-height: 215px !important; align-self: center; }

/* operations-service-compact */
.page-operations .operations-service-metrics { min-height: 0 !important; height: 112px !important; align-self: center; }
.page-operations .operations-service-metrics > * { min-height: 0 !important; height: 112px !important; padding-top: 10px !important; padding-bottom: 10px !important; justify-content: center; overflow: hidden; }
.page-operations .operations-service-metrics > * > :first-child { margin-bottom: 4px !important; }

/* overview-balanced-middle */
.page-overview .dashboard-container { grid-template-columns: .8fr 1.4fr .8fr !important; }
.page-overview #statusChart { width: 92% !important; max-width: 230px !important; margin: auto !important; }
/* overview-trend-ratio */
.page-overview .bottom-grid > :first-child > .flex:first-child { display: flex !important; }
.page-overview .bottom-grid > :first-child > .flex:last-child { display: grid !important; grid-template-columns: minmax(0, 3.5fr) minmax(0, 6.5fr); gap: 8px !important; }
.page-overview .bottom-grid > :first-child > .flex:last-child > :first-child { min-width: 0 !important; width: auto; }
.page-overview .bottom-grid > :first-child .section-icon { flex: 0 0 28px !important; width: 28px !important; }
.page-overview .bottom-grid > :first-child > .flex:first-child > .section-icon { min-width: 0 !important; width: 28px !important; flex-basis: 28px !important; }

/* personal-service-spacing */
.page-personal-service .team-list { gap: 20px !important; }
.page-personal-service .personal-service-record-list { gap: 26px !important; }
.page-personal-service #serviceDonut { align-self: center; }
.page-personal-service #serviceDonut + * { align-self: center; }
.page-personal-service .personal-service-workload { margin-top: 14px !important; }

/* population-backup-tags */
.page-population .pop-top-1 { overflow: hidden !important; }
.page-population .pop-top-1 > :last-child { height: calc(100% - 96px) !important; padding-top: 6px !important; }
.page-population #age-chart { height: 100% !important; min-height: 0 !important; }
.page-population .pop-bottom-sm { display: grid !important; grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden !important; }
.page-population #bmi-chart,
.page-population #exercise-chart { width: 100% !important; height: 100% !important; min-height: 0 !important; align-self: center; }
.page-population #tags-cloud { position: relative !important; display: block !important; width: 94% !important; height: calc(100% - 48px) !important; margin: 4px auto 0 !important; overflow: hidden !important; }
.page-population #tags-cloud .population-backup-tag { position: absolute !important; display: inline-flex !important; align-items: center; border: 0 !important; border-radius: 999px; font-weight: 600; line-height: 1; white-space: nowrap; box-shadow: 0 8px 18px rgba(0,0,0,.28); }
.page-population #tags-cloud > :nth-child(1){left:4%;top:8%;transform:rotate(-8deg)!important}.page-population #tags-cloud > :nth-child(2){left:27%;top:4%;transform:rotate(5deg)!important}.page-population #tags-cloud > :nth-child(3){left:52%;top:10%;transform:rotate(-3deg)!important}.page-population #tags-cloud > :nth-child(4){left:75%;top:5%;transform:rotate(9deg)!important}.page-population #tags-cloud > :nth-child(5){left:10%;top:34%;transform:rotate(4deg)!important}.page-population #tags-cloud > :nth-child(6){left:35%;top:31%;transform:rotate(-7deg)!important}.page-population #tags-cloud > :nth-child(7){left:62%;top:36%;transform:rotate(2deg)!important}.page-population #tags-cloud > :nth-child(8){left:3%;top:59%;transform:rotate(7deg)!important}.page-population #tags-cloud > :nth-child(9){left:28%;top:57%;transform:rotate(-4deg)!important}.page-population #tags-cloud > :nth-child(10){left:55%;top:61%;transform:rotate(6deg)!important}.page-population #tags-cloud > :nth-child(11){left:76%;top:55%;transform:rotate(-5deg)!important}.page-population #tags-cloud > :nth-child(12){left:11%;top:78%;transform:rotate(4deg)!important}.page-population #tags-cloud > :nth-child(13){left:37%;top:77%;transform:rotate(-3deg)!important}.page-population #tags-cloud > :nth-child(14){left:64%;top:79%;transform:rotate(5deg)!important}.page-population #tags-cloud > :nth-child(15){left:80%;top:76%;transform:rotate(-2deg)!important}

/* realtime-content-spacing */
.page-realtime .devices-card > :first-child { margin-bottom: 16px !important; }
.page-realtime .event-table th,
.page-realtime .event-table td { padding-top: 11px !important; padding-bottom: 11px !important; }

/* risk-row-rebalance */
.page-risk .dashboard-container { grid-template-rows: 74px 270px 320px minmax(0, 1fr) !important; }

/* controlled-card-content-gap */
.page-medical .card > .card-header,
.page-individual-vitals .card > .card-header { margin-bottom: 10px !important; }
.page-medical .medical-row-layout .card > .card-header { margin-bottom: 14px !important; }

/* tv-refinement-round-two */
/* executive-balanced-total-height */
.page-executive .executive-main-grid { grid-template-rows: minmax(0, 1fr) 150px !important; }
.page-executive .wang-card { height: 100%; align-self: stretch; display: grid !important; grid-template-rows: .9fr 1.1fr; gap: 10px !important; }
.page-executive .wang-card > * { min-height: 0; overflow: hidden; }
.page-executive .score-card,
.page-executive .trend-card { height: 100% !important; align-self: stretch !important; }

/* vitals-centered-content */
.page-individual-vitals .health-score-card > .card-body { justify-items: center !important; }
.page-individual-vitals .health-score-layout { width: auto !important; max-width: 92%; margin-left: auto; margin-right: auto; }
.page-individual-vitals .stat-grid.responsive-metric-grid > * { text-align: center !important; align-items: center !important; justify-content: center !important; }

/* intervention-channel-60-40 */
.page-intervention .scale-wrapper > .w-full > :nth-child(3) { grid-template-columns: repeat(30, minmax(0, 1fr)) !important; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(1) { grid-column: 1 / span 10 !important; grid-row: 1; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(2) { grid-column: 11 / span 10 !important; grid-row: 1; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(4) { grid-column: 21 / span 10 !important; grid-row: 1; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(5) { grid-column: 1 / span 18 !important; grid-row: 2; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(3) { grid-column: 19 / span 12 !important; grid-row: 2; }
.page-intervention .intervention-trend-card > :first-child { justify-content: flex-start !important; gap: 12px; }
.page-intervention .intervention-trend-card > :first-child > :last-child { margin-left: auto; }
.page-intervention .intervention-type-card > :last-child { width: fit-content; max-width: 94%; margin-left: auto; margin-right: auto; }
.page-intervention .intervention-type-card #typeChart + * { flex-basis: 165px !important; width: 165px !important; }

/* medical-coverage-90px */
.page-medical .medical-middle-content > .card:first-child > :last-child { justify-content: center !important; }
.page-medical .coverage-card .mt-4.flex { justify-content: flex-start !important; }
.page-medical #coverageGauge { flex: 0 0 90px !important; width: 90px !important; height: 90px !important; min-width: 90px !important; min-height: 90px !important; max-width: 90px !important; max-height: 90px !important; margin-left: 0 !important; }

/* chronic-risk-row-rebalance-2 */
.page-chronic-risk .dashboard-container { grid-template-rows: 74px 358px 338px 74px !important; }
.page-chronic-risk #coverageChart { height: 275px !important; min-height: 275px !important; }

/* chronic-row-rebalance-2 */
.page-chronic .dashboard-container { grid-template-rows: 74px 165px 335px minmax(0, 1fr) !important; }

/* operations-gender-equal */
.page-operations #chart-gender { flex: 0 0 50% !important; width: 50% !important; max-width: 50% !important; align-self: center; }
.page-operations #chart-gender + * { flex: 0 0 50% !important; width: 50% !important; min-width: 0 !important; align-self: center; }
.page-operations #chart-gender.parent-placeholder,
.page-operations #chart-gender ~ * { box-sizing: border-box; }
.page-operations #chart-gender { margin-top: auto !important; margin-bottom: auto !important; }

/* overview-trend-30-70 */
.page-overview .bottom-grid > :first-child > .flex:last-child { grid-template-columns: minmax(0, 3fr) minmax(0, 7fr) !important; }
.page-overview #statusChart { width: 100% !important; max-width: 238px !important; }

/* personal-service-equal-tracks */
.page-personal-service .dashboard-container { grid-template-rows: 74px repeat(6, minmax(0, 1fr)) !important; }
html.page-personal-service body.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(1) { grid-column: 1; grid-row: 2 / span 3; }
html.page-personal-service body.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(2) { grid-column: 1; grid-row: 5 / span 3; }
html.page-personal-service body.page-personal-service .dashboard-container > :nth-child(3) > :nth-child(2) { grid-column: 2; grid-row: 2 / span 2; }
html.page-personal-service body.page-personal-service .dashboard-container > :nth-child(3) > :nth-child(1) { grid-column: 2; grid-row: 4 / span 2; }
html.page-personal-service body.page-personal-service .dashboard-container > :nth-child(4) > :nth-child(1) { grid-column: 2; grid-row: 6 / span 2; }
html.page-personal-service body.page-personal-service .dashboard-container > :nth-child(4) > :nth-child(2) { grid-column: 3; grid-row: 2 / span 2; }
html.page-personal-service body.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(3) { grid-column: 3; grid-row: 4 / span 4; display: grid !important; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 10px !important; }
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(3) { grid-template-columns: minmax(0, 1fr) !important; }
.page-personal-service .dashboard-container > :nth-child(2) > :nth-child(3) > * { height: auto !important; min-height: 0; }

/* population-compact-legends */
.page-population .population-gender-content,
.page-population .population-gender-bar { width: 90% !important; margin-left: auto !important; margin-right: auto !important; }
.page-population #age-chart,
.page-population #bmi-chart,
.page-population #exercise-chart { margin-left: auto !important; margin-right: auto !important; }
/* population-layered-tags */
.page-population #tags-cloud { width: 82% !important; height: 84% !important; overflow: hidden !important; }
.page-population #tags-cloud .tag-lg { z-index: 40; }
.page-population #tags-cloud .tag-md { z-index: 30; }
.page-population #tags-cloud .tag-sm { z-index: 20; }
.page-population #tags-cloud .tag-xs { z-index: 10; }
.page-population #tags-cloud > :nth-child(1){left:34%;top:4%;}.page-population #tags-cloud > :nth-child(2){left:18%;top:15%;}.page-population #tags-cloud > :nth-child(3){left:48%;top:17%;}.page-population #tags-cloud > :nth-child(4){left:29%;top:29%;}.page-population #tags-cloud > :nth-child(5){left:53%;top:32%;}.page-population #tags-cloud > :nth-child(6){left:12%;top:39%;}.page-population #tags-cloud > :nth-child(7){left:40%;top:44%;}.page-population #tags-cloud > :nth-child(8){left:62%;top:47%;}.page-population #tags-cloud > :nth-child(9){left:22%;top:56%;}.page-population #tags-cloud > :nth-child(10){left:50%;top:60%;}.page-population #tags-cloud > :nth-child(11){left:8%;top:68%;}.page-population #tags-cloud > :nth-child(12){left:33%;top:72%;}.page-population #tags-cloud > :nth-child(13){left:57%;top:75%;}.page-population #tags-cloud > :nth-child(14){left:24%;top:84%;}.page-population #tags-cloud > :nth-child(15){left:49%;top:87%;}

/* realtime-narrow-single-column */
.page-realtime .dashboard-container { grid-template-columns: repeat(18, minmax(0, 1fr)) !important; }
.page-realtime .vital-card:nth-of-type(2){grid-column:1/span 3}.page-realtime .vital-card:nth-of-type(3){grid-column:4/span 3}.page-realtime .vital-card:nth-of-type(4){grid-column:7/span 3}.page-realtime .vital-card:nth-of-type(5){grid-column:10/span 3}.page-realtime .vital-card:nth-of-type(6){grid-column:13/span 3}.page-realtime .vital-card:nth-of-type(7){grid-column:16/span 3}
.page-realtime .devices-card { grid-column: 1 / span 4 !important; }
.page-realtime .dashboard-container > :nth-child(3) > :nth-child(2) { grid-column: 5 / span 7 !important; }
.page-realtime .dashboard-container > :nth-child(3) > :nth-child(3) { grid-column: 12 / span 7 !important; }
.page-realtime .dashboard-container > :nth-child(3) > :nth-child(1) { grid-column: 5 / span 14 !important; }
.page-realtime .realtime-device-list,
.page-realtime .wearable-metrics { grid-template-columns: 1fr !important; }
.page-realtime .dashboard-container > :nth-child(3) > :nth-child(2) { display: flex; flex-direction: column; }
.page-realtime #alert-donut { margin-top: auto !important; margin-bottom: auto !important; align-self: center; }

/* risk-compact-legend-and-spacing */
.page-risk #risk-donut + * { gap: 6px !important; }
.page-risk #risk-donut + * > * { gap: 5px !important; }
.page-risk .dashboard-container > :nth-child(2) > :nth-child(2) .grid { width: 95% !important; margin-left: auto; margin-right: auto; }
.page-risk .risk-model-performance-card .space-y-4 { display: flex !important; flex-direction: column; gap: 12px !important; }
.page-risk .risk-model-performance-card .responsive-metric-grid { margin-top: 0 !important; margin-bottom: 0 !important; }
html.page-risk body.page-risk .dashboard-container .risk-high-list-card td { padding-top: 9px !important; padding-bottom: 9px !important; }

/* tv-refinement-round-three */
/* Titles keep the shared left-aligned header rhythm; only content bodies center. */
.page-individual-vitals .health-score-card > .card-header,
.page-medical .medical-middle-content > .card:first-child > .card-header,
.page-operations .operations-gender-content { text-align: left; }
.page-individual-vitals .health-score-card { grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: auto minmax(0, 1fr) !important; }
.page-individual-vitals .health-score-card > .card-header { justify-content: flex-start !important; width: 100%; }

/* Individual score follows the intervention distribution pattern: ring + compact legend. */
.page-individual-vitals .health-score-card > .card-body { display: flex !important; align-items: center; justify-content: center !important; }
.page-individual-vitals .health-score-distribution-content {
  display: flex !important;
  flex: 0 1 auto !important;
  width: fit-content !important;
  max-width: 96% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: auto !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
}
.page-individual-vitals .health-score-distribution-content .split-chart-wrap {
  flex: 0 0 145px !important;
  width: 145px !important;
  height: 145px !important;
  min-width: 145px !important;
  max-width: 145px !important;
  min-height: 145px !important;
  max-height: 145px !important;
}
.page-individual-vitals .health-score-distribution-content #healthScoreChart { width: 145px !important; height: 145px !important; max-width: 145px !important; max-height: 145px !important; }
.page-individual-vitals .health-score-distribution-content .split-stats {
  flex: 0 1 165px !important;
  width: 165px !important;
  max-width: 165px !important;
  gap: 7px !important;
  padding: 0 !important;
}
.page-individual-vitals .health-score-distribution-content .split-item {
  min-height: 0 !important;
  padding: 2px 0 !important;
  gap: 10px;
}
.page-individual-vitals .health-score-distribution-content .split-score { margin-top: 4px !important; }

/* Medical content centers independently from its title; coverage rows share one height. */
.page-medical .medical-service-type-content {
  width: fit-content;
  max-width: 96%;
  margin: auto;
  align-items: center !important;
  justify-content: center !important;
}
.page-medical .medical-service-type-content #donutChart { flex: 0 0 145px; width: 145px !important; }
.page-medical .medical-service-type-content #donutChart + * { flex: 0 1 190px !important; width: 190px; }
.page-medical .coverage-card .coverage-stat,
.page-medical .medical-coverage-summary { min-height: 40px !important; box-sizing: border-box; }
.page-medical .medical-coverage-summary { margin-top: 4px !important; padding: 5px 7px !important; justify-content: flex-start !important; }
.page-medical .medical-coverage-summary-icon { width: 28px !important; height: 28px !important; }

/* Operations gender distribution uses the same centered ring + legend group. */
.page-operations .operations-gender-content {
  width: fit-content;
  max-width: 96%;
  margin-left: auto;
  margin-right: auto;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
}
.page-operations .operations-gender-content #chart-gender { flex: 0 0 145px !important; width: 145px !important; max-width: 145px !important; height: 170px !important; }
.page-operations .operations-gender-content #chart-gender + * { flex: 0 1 245px !important; width: 245px !important; max-width: 245px !important; }

/* Overview gives the donut and its legend separate horizontal zones. */
.page-overview .overview-status-card { display: flex; flex-direction: column; overflow: hidden; }
.page-overview .overview-status-card #statusChart { width: 100% !important; max-width: none !important; flex: 1 1 auto; min-height: 0; }
.page-overview .overview-trend-content { display: grid !important; grid-template-columns: 2fr 8fr !important; gap: 10px !important; min-height: 0; }
.page-overview .overview-trend-content > :first-child { min-width: 0 !important; width: auto !important; }

/* Population cards remain equal; map shifts left/down and ranked tags form a tight heap. */
.page-population .dashboard-grid { grid-template-rows: 280px 280px minmax(0, 1fr) !important; }
.page-population .population-health-indicator-card,
.page-population .population-activity-card { height: 100% !important; align-self: stretch; }
.page-population #china-map { transform: translate(-28px, 22px) !important; }
.page-population #tags-cloud { width: 74% !important; height: 78% !important; overflow: visible !important; }
.page-population #tags-cloud .tag-lg { font-size: 16px !important; padding: 9px 14px !important; }
.page-population #tags-cloud .tag-md { font-size: 13px !important; padding: 8px 12px !important; }
.page-population #tags-cloud .tag-sm { font-size: 11px !important; padding: 7px 10px !important; }
.page-population #tags-cloud .tag-xs { font-size: 10px !important; padding: 6px 9px !important; }
.page-population #tags-cloud > :nth-child(1){left:30%;top:3%;}.page-population #tags-cloud > :nth-child(2){left:18%;top:14%;}.page-population #tags-cloud > :nth-child(3){left:43%;top:15%;}.page-population #tags-cloud > :nth-child(4){left:27%;top:26%;}.page-population #tags-cloud > :nth-child(5){left:48%;top:28%;}.page-population #tags-cloud > :nth-child(6){left:14%;top:36%;}.page-population #tags-cloud > :nth-child(7){left:35%;top:39%;}.page-population #tags-cloud > :nth-child(8){left:54%;top:41%;}.page-population #tags-cloud > :nth-child(9){left:22%;top:50%;}.page-population #tags-cloud > :nth-child(10){left:43%;top:52%;}.page-population #tags-cloud > :nth-child(11){left:10%;top:61%;}.page-population #tags-cloud > :nth-child(12){left:29%;top:63%;}.page-population #tags-cloud > :nth-child(13){left:48%;top:65%;}.page-population #tags-cloud > :nth-child(14){left:22%;top:74%;}.page-population #tags-cloud > :nth-child(15){left:41%;top:76%;}

/* Risk performance metrics start at the card's left edge with a larger top gap. */
.page-risk .risk-performance-metrics {
  width: 78% !important;
  margin: 18px 0 0 0 !important;
  justify-content: flex-start !important;
  justify-items: stretch;
  align-self: flex-start;
}
.page-risk .risk-performance-metrics > * { text-align: left !important; }

/* tv-refinement-round-four */

/* tv-refinement-round-five */
.metric-inline-row {
  justify-content: flex-start !important;
  gap: 6px !important;
}
.metric-inline-row > :last-child { margin-left: 0 !important; }

html.page-risk body.page-risk .dashboard-container .risk-high-list-card table {
  line-height: 1.4 !important;
}
html.page-risk body.page-risk .dashboard-container .risk-high-list-card th,
html.page-risk body.page-risk .dashboard-container .risk-high-list-card td {
  padding-top: 11px !important;
  padding-bottom: 11px !important;
}
.page-risk .risk-distribution-content {
  display: grid !important;
  grid-template-columns: minmax(0, 42%) minmax(0, 58%);
  column-gap: 8px !important;
}
.page-risk .risk-distribution-content #risk-donut {
  width: 100% !important;
  max-width: none !important;
}
.page-risk .risk-distribution-legend { min-width: 0; }
.page-risk .risk-distribution-legend > div {
  justify-content: flex-start !important;
  gap: 5px !important;
  white-space: nowrap;
}
.page-risk .risk-distribution-legend .ml-auto { margin-left: 4px !important; }
.page-risk .risk-distribution-legend .w-14 {
  width: auto !important;
  text-align: left !important;
}
.page-risk .risk-performance-pair {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  text-align: left !important;
}
.page-risk .risk-performance-pair > * { margin-top: 0 !important; }

.page-realtime .realtime-alert-content {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 58%);
  align-items: center;
  column-gap: 8px;
  min-height: 176px;
}
.page-realtime .realtime-alert-content #alert-donut {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  float: none;
}
.page-realtime .realtime-alert-legend {
  min-width: 0;
  margin-top: 0 !important;
}
.page-realtime .realtime-alert-legend > div {
  justify-content: flex-start !important;
  gap: 6px;
  white-space: nowrap;
}
.page-realtime .realtime-alert-legend > div > :last-child { margin-left: 2px; }

.page-personal-service .personal-service-type-content {
  display: grid !important;
  grid-template-columns: 42% 58%;
  align-items: center;
  gap: 0 !important;
  padding-left: 8px;
  min-width: 0;
}
.page-personal-service .personal-service-type-content #serviceDonut {
  width: 100% !important;
  max-width: 190px !important;
  justify-self: center;
}
.page-personal-service .personal-service-type-legend {
  min-width: 0;
  padding-left: 8px;
}
/* Executive: keep both main-group totals equal while reducing the region by five percent. */
.page-executive .executive-main-grid {
  height: 95% !important;
  align-self: start;
}
.page-executive .score-ring {
  transform: scale(.9) !important;
  transform-origin: center center !important;
}

/* Individual vitals visual order: activity, heart rate, sleep, glucose; weight moves down. */
.page-individual-vitals .vitals-heart-rate-card { grid-column: 3 / span 2 !important; grid-row: 3 !important; }
.page-individual-vitals .vitals-sleep-card { grid-column: 5 / span 2 !important; grid-row: 3 !important; }
.page-individual-vitals .vitals-glucose-card { grid-column: 7 / span 2 !important; grid-row: 3 !important; }
.page-individual-vitals .vitals-weight-card { grid-column: 1 / span 3 !important; grid-row: 4 !important; }

/* Family: tighten the chart/archive gap and give the follow-up recommendation more width. */
.page-family .family-risk-archive-content {
  display: grid !important;
  grid-template-columns: 42% minmax(0, 58%) !important;
  gap: 4px !important;
  align-items: center !important;
}
.page-family .family-risk-archive-content #familyRiskChart { width: 100% !important; height: 135px !important; }
.page-family .family-risk-archive-content > :last-child { width: 100% !important; min-width: 0; }
.page-family .family-followup-notice { width: 100% !important; box-sizing: border-box; line-height: 1.45; }
.page-family .family-risk-archive-content + .mt-4 { margin-top: 8px !important; }

/* Intervention: side cards widen equally, type distribution narrows, progress sits closer. */
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(1) { grid-column: 1 / span 11 !important; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(2) { grid-column: 12 / span 8 !important; }
.page-intervention .scale-wrapper > .w-full > :nth-child(3) > div:nth-child(4) { grid-column: 20 / span 11 !important; }
.page-intervention .intervention-first-row > article > div:last-child { margin-top: 4px !important; }
.page-intervention .intervention-first-row > article > div:nth-last-child(2) { margin-bottom: 0 !important; }
.page-intervention .intervention-channel-notice {
  box-sizing: border-box;
  width: 100%;
  margin-top: 12px !important;
  padding: 10px !important;
  border: 1px solid var(--dashboard-border) !important;
  background: rgba(15, 26, 48, .5) !important;
  color: var(--dashboard-text-muted);
  font-size: 11px !important;
  line-height: 1.45;
}

/* tv-refinement-round-six */
/* AI Health: increase the image-card row by ten percent; the flexible row absorbs the difference. */
.page-ai-health .dashboard-container {
  grid-template-rows: 74px 112px 330px minmax(0, 1fr) 74px !important;
}
.page-ai-health .ai-health-image-row .ai-card-content {
  min-height: 0;
}
.page-ai-health .ai-health-image-row .ai-card-content img {
  width: 100% !important;
  max-height: 122px !important;
  object-fit: contain;
}

/* Chronic Risk: exchange the two lower-row modules without changing source order. */
.page-chronic-risk .chronic-risk-control-card { grid-column: 2 !important; grid-row: 1 !important; }
.page-chronic-risk .chronic-risk-trend-card { grid-column: 1 !important; grid-row: 1 !important; }

/* Chronic: move the first chart card to the right and shift its siblings left. */
.page-chronic .chronic-second-first { grid-column: 3 !important; grid-row: 1 !important; }
.page-chronic .chronic-second-middle { grid-column: 1 !important; grid-row: 1 !important; }
.page-chronic .chronic-second-last { grid-column: 2 !important; grid-row: 1 !important; }

/* Energy: align the upper six-column region with two equal lower charts and a spanning right stack. */
.page-energy .dashboard-container { grid-template-columns: repeat(8, minmax(0, 1fr)) !important; }
.page-energy .energy-grid { display: contents !important; }
.page-energy .energy-grid > :first-child { grid-column: 1 / span 4 !important; grid-row: 3 !important; }
.page-energy .energy-right-stack {
  display: grid !important;
  grid-column: 7 / span 2 !important;
  grid-row: 3 / span 2 !important;
  grid-template-rows: minmax(0, 1.25fr) minmax(0, .75fr) !important;
  gap: 16px !important;
  min-height: 0;
}
.page-energy .energy-best-window { min-height: 0; overflow: hidden; }
.page-energy .energy-lower-charts { display: contents !important; }
.page-energy .energy-week-trend { grid-column: 1 / span 3 !important; grid-row: 4 !important; }
.page-energy .energy-sleep-correlation { grid-column: 4 / span 3 !important; grid-row: 4 !important; }
.page-energy .energy-lower-charts > :nth-child(3) { grid-column: 5 / span 2 !important; grid-row: 3 !important; }

/* Executive: reduce the top cards while keeping the left and right totals identical. */
.page-executive .executive-main-grid {
  height: 100% !important;
  grid-template-rows: minmax(0, 1fr) 240px !important;
  gap: 16px !important;
}
.page-executive .wang-card {
  height: 100% !important;
  grid-template-rows: minmax(0, 1fr) 240px !important;
  gap: 16px !important;
}
.page-executive .score-card #scoreChart,
.page-executive .trend-card #trendChart { max-height: none !important; }
.page-executive .executive-ai-full { margin-top: 0 !important; }

/* Individual Vitals: match the Intervention channel notice box rhythm. */
.page-individual-vitals .vitals-monitoring-notice {
  box-sizing: border-box;
  width: 100%;
  min-height: 38px;
  margin-top: 12px !important;
  padding: 10px !important;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 11px !important;
  line-height: 1.45;
}

/* tv-refinement-round-seven */
/* Energy: best window spans two columns; the following two rows share identical tracks. */
.page-energy .dashboard-container {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-rows: 74px 130px 184px 224px 224px 132px !important;
  gap: 16px !important;
}
.page-energy .energy-grid,
.page-energy .energy-right-stack,
.page-energy .energy-lower-charts { display: contents !important; }
.page-energy .energy-best-window { grid-column: 1 / -1 !important; grid-row: 3 !important; }
.page-energy .energy-curve-card { grid-column: 1 !important; grid-row: 4 !important; }
.page-energy .energy-consumption-card { grid-column: 2 !important; grid-row: 4 !important; }
.page-energy .energy-week-trend { grid-column: 1 !important; grid-row: 5 !important; }
.page-energy .energy-sleep-correlation { grid-column: 2 !important; grid-row: 5 !important; }
.page-energy .energy-recommendation-card { grid-column: 1 / -1 !important; grid-row: 6 !important; overflow: hidden; }
.page-energy .energy-recommendation-card .suggestion-list { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px !important; }
.page-energy .energy-recommendation-card .suggestion-list li { padding: 6px 8px !important; min-height: 0; }
.page-energy .energy-best-window > .space-y-3 { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px !important; }
.page-energy #energyChart,.page-energy #weekChart,.page-energy #sleepChart { height: calc(100% - 36px) !important; min-height: 0 !important; }

/* Keep titles at the top while centering the metric groups below them. */
.page-intervention .intervention-effect-card,
.page-medical .medical-emergency-card { display: flex !important; flex-direction: column; }
.page-intervention .intervention-effect-content,
.page-medical .medical-emergency-content { flex: 1 1 auto; align-content: center; justify-content: center; min-height: 0; }

/* Shared safe donut/legend composition. */
.distribution-content {
  display: grid !important;
  grid-template-columns: 42% 58% !important;
  align-items: center !important;
  align-content: center;
  gap: 0 !important;
  min-height: 0;
  padding-left: 8px;
  box-sizing: border-box;
}
.distribution-content > :first-child { width: 100% !important; max-width: 190px !important; justify-self: center; margin: 0 !important; float: none !important; }
.distribution-content > :last-child { min-width: 0; padding-left: 8px; }
.distribution-content > :last-child > div { justify-content: flex-start !important; gap: 6px !important; white-space: nowrap; }
.distribution-content > :last-child > div > :last-child { margin-left: 0 !important; width: auto !important; }
.page-personal-service .personal-service-type-card,
.page-realtime .realtime-alert-card { display: flex !important; flex-direction: column; }
.page-personal-service .personal-service-type-content,
.page-realtime .realtime-alert-content { flex: 1 1 auto; align-content: center; }
.page-overview .overview-status-content { height: calc(100% - 44px); }
.page-overview .overview-status-legend > div { gap: 6px; }

/* Risk: transfer ten percent of the first content row to the second. */
.page-risk .dashboard-container { grid-template-rows: 74px 243px 347px minmax(0, 1fr) !important; }

/* Energy specificity guard: override the legacy direct-child placement map. */
html.page-energy body.page-energy .energy-best-window { grid-column: 1 / -1 !important; grid-row: 3 !important; }
html.page-energy body.page-energy .energy-curve-card { grid-column: 1 !important; grid-row: 4 !important; }
html.page-energy body.page-energy .energy-consumption-card { grid-column: 2 !important; grid-row: 4 !important; }
html.page-energy body.page-energy .energy-week-trend { grid-column: 1 !important; grid-row: 5 !important; }
html.page-energy body.page-energy .energy-sleep-correlation { grid-column: 2 !important; grid-row: 5 !important; }
html.page-energy body.page-energy .energy-recommendation-card { grid-column: 1 / -1 !important; grid-row: 6 !important; }
html.page-energy body.page-energy .dashboard-container > .energy-grid > .energy-curve-card { grid-column: 1 !important; grid-row: 4 !important; }
html.page-energy body.page-energy .dashboard-container > .energy-grid > .energy-right-stack > .energy-best-window { grid-column: 1 / -1 !important; grid-row: 3 !important; }
html.page-energy body.page-energy .dashboard-container > .energy-grid > .energy-right-stack > .energy-recommendation-card { grid-column: 1 / -1 !important; grid-row: 6 !important; }
html.page-energy body.page-energy .dashboard-container > .energy-lower-charts > .energy-week-trend { grid-column: 1 !important; grid-row: 5 !important; }
html.page-energy body.page-energy .dashboard-container > .energy-lower-charts > .energy-sleep-correlation { grid-column: 2 !important; grid-row: 5 !important; }
html.page-energy body.page-energy .dashboard-container > .energy-lower-charts > .energy-consumption-card { grid-column: 2 !important; grid-row: 4 !important; }
.page-personal-service .personal-service-type-card { overflow: hidden !important; }
.page-personal-service .personal-service-type-legend > div { white-space: normal !important; }
.page-risk .dashboard-container > :nth-child(2) > section { min-height: 0 !important; overflow: hidden !important; }
.page-risk .dashboard-container > :nth-child(2) > section { padding: 8px !important; }
.page-risk .dashboard-container > :nth-child(2) > section > :first-child { margin-bottom: 4px !important; }
.page-risk .dashboard-container > :nth-child(2) .risk-distribution-legend { gap: 6px !important; }
.page-operations .operations-roi-card { overflow: hidden !important; padding: 12px !important; }
.page-operations .operations-roi-card #chart-revenue { height: 87px !important; min-height: 0 !important; }
.page-operations .operations-roi-card > .mb-2 { margin-bottom: 4px !important; }

/* tv-refinement-round-eight */
/* Chronic Risk cross-row semantic layout. */
.dashboard-container.page-chronic-risk { grid-template-columns:repeat(4,minmax(0,1fr)) !important; grid-template-rows:74px 326px 370px 74px !important; gap:16px !important; }
.page-chronic-risk .risk-grid,.page-chronic-risk .chronic-risk-second-row { display: contents !important; }
.page-chronic-risk .chronic-risk-overview-card { grid-column:1;grid-row:2; }
.page-chronic-risk .chronic-risk-coverage-card { grid-column:2/span 2 !important;grid-row:2 !important; }
.page-chronic-risk .chronic-risk-factor-card { grid-column:4;grid-row:2; }
.page-chronic-risk .chronic-risk-disease-card { grid-column:1/span 2;grid-row:3; }
.page-chronic-risk .chronic-risk-control-card { grid-column:3/span 2 !important;grid-row:3 !important; }
.page-chronic-risk .ai-banner { grid-column:1/-1;grid-row:4; }
.page-chronic-risk .chronic-risk-overview-card > .grid { transform:translateY(-12px); }
.page-chronic-risk .chronic-risk-control-card .control-grid { width:90% !important; margin:auto !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
.page-chronic .chronic-equal-chart-row { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
.page-chronic .chronic-equal-chart-row > * { grid-column:auto !important; width:auto !important; }

/* Realtime: devices occupy the right side of both vital rows. */
.page-realtime .realtime-top-grid { display:grid !important; grid-template-columns:repeat(4,minmax(0,1fr)) !important; grid-template-rows:repeat(2,minmax(0,1fr)) !important; gap:16px !important; }
.page-realtime .realtime-top-grid .devices-card { grid-column:4 !important; grid-row:1/span 2 !important; }
.page-realtime .realtime-top-grid .vital-card { grid-column:auto !important; grid-row:auto !important; }

/* Medical: four KPIs fill row one; coverage joins the right of row two. */
.page-medical .medical-kpi-row { grid-template-columns:repeat(4,minmax(0,1fr)) !important; grid-template-rows:150px minmax(0,1fr) !important; gap:16px !important; }
.page-medical .medical-kpi-row > article:nth-of-type(-n+4) { grid-row:1 !important; grid-column:auto !important; }
.page-medical .medical-middle-content { grid-column:1/span 3 !important; grid-row:2 !important; }
.page-medical .coverage-card { grid-column:4 !important; grid-row:2 !important; }

/* Individual Vitals requested visual order. */
.page-individual-vitals .vitals-activity-card { grid-column:1/span 2 !important;grid-row:3 !important; }
.page-individual-vitals .vitals-glucose-card { grid-column:3/span 2 !important;grid-row:3 !important; }
.page-individual-vitals .vitals-weight-card { grid-column:5/span 2 !important;grid-row:3 !important; }
.page-individual-vitals .health-score-card { grid-column:7/span 2 !important;grid-row:3 !important; }
.page-individual-vitals .vitals-heart-rate-card { grid-column:1/span 4 !important;grid-row:4 !important; }
.page-individual-vitals .vitals-sleep-card { grid-column:5/span 4 !important;grid-row:4 !important; }
.page-individual-vitals .vitals-second-row { grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
.page-individual-vitals .vitals-sleep-card .card-body { display:flex !important;align-items:center;justify-content:center;min-height:0; }

/* Distribution reference and centered content. */
.page-operations .operations-gender-content,.page-overview .overview-status-content { grid-template-columns:145px minmax(0,190px) !important;justify-content:center!important;gap:8px!important;padding-left:8px!important; }
.page-operations .operations-gender-content > :first-child,.page-overview .overview-status-content > :first-child { width:145px!important;height:145px!important;max-width:145px!important; }
.page-overview .overview-trend-content { grid-template-columns:1.5fr 8.5fr !important; }
.page-population .pop-top-2 { display:flex!important;flex-direction:column; }
.page-population .population-gender-content { flex:1 1 auto;align-content:center;align-items:center;justify-content:center; }
.page-intervention .intervention-type-title { text-align:left!important;justify-self:start; }
.page-intervention .intervention-effect-content { width:90%!important;margin:auto!important;align-content:center!important;justify-content:center!important; }
.page-operations .operations-roi-card { padding:16px!important; }
.page-operations .operations-roi-card > .mb-2 { margin-bottom:0!important; }

/* Personal Service, Family and AI refinements. */
.page-personal-service .service-layout { grid-template-columns:.8fr .8fr 1.4fr !important; }
.page-personal-service .personal-online-consultation,.page-personal-service .personal-appointment-stack > .appointment-card:nth-child(2) { order:2; }
.page-family .dashboard-container { grid-template-rows:74px 215px 280px minmax(0,1fr)!important; }
.page-family .family-reminder-card .reminder-list { grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:1fr!important;gap:8px!important; }
.page-family .dashboard-container > :last-child { min-height:0; }
.page-ai-health .ai-health-image-row .ai-card-content img { max-height:134px!important; }
html.page-chronic body.page-chronic .dashboard-container.page-chronic .chronic-equal-chart-row { grid-template-columns:repeat(3,minmax(0,1fr))!important; }
html.page-realtime body.page-realtime .dashboard-container.page-realtime .realtime-top-grid { grid-column:1/-1!important; }

/* tv-refinement-round-nine */
/* Energy: one full-width curve, a 2:1 second row, and three equal cards below. */
html.page-energy body.page-energy .dashboard-container.page-energy { grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:74px 130px 260px 246px 240px!important;gap:16px!important; }
html.page-energy body.page-energy .dashboard-container.page-energy > :nth-child(1) { grid-column:1/-1!important;grid-row:1!important; }
html.page-energy body.page-energy .dashboard-container.page-energy > :nth-child(2) { grid-column:1/-1!important;grid-row:2!important; }
html.page-energy body.page-energy .energy-grid,html.page-energy body.page-energy .energy-right-stack,html.page-energy body.page-energy .energy-lower-charts { display:contents!important; }
html.page-energy body.page-energy .energy-curve-card { grid-column:1/-1!important;grid-row:3!important; }
html.page-energy body.page-energy .energy-consumption-card { grid-column:1/span 2!important;grid-row:4!important; }
html.page-energy body.page-energy .energy-best-window { grid-column:3!important;grid-row:4!important; }
html.page-energy body.page-energy .energy-week-trend { grid-column:1!important;grid-row:5!important; }
html.page-energy body.page-energy .energy-sleep-correlation { grid-column:2!important;grid-row:5!important; }
html.page-energy body.page-energy .energy-recommendation-card { grid-column:3!important;grid-row:5!important; }
html.page-energy body.page-energy .energy-best-window > .space-y-3,html.page-energy body.page-energy .energy-recommendation-card .suggestion-list { display:flex!important;flex-direction:column!important;gap:8px!important; }

/* Executive: compact upper cards, 4:6 right-side width, equal total column heights. */
html.page-executive body.page-executive .executive-main-grid { grid-template-columns:360px minmax(0,4fr) minmax(0,6fr)!important;grid-template-rows:280px 240px!important;height:536px!important;gap:16px!important;align-self:start!important; }
html.page-executive body.page-executive .executive-main-grid > .wang-card { grid-column:1!important;grid-row:1/span 2!important;grid-template-rows:240px 280px!important;height:536px!important;gap:16px!important; }
html.page-executive body.page-executive .executive-main-grid > .score-card { grid-column:2!important;grid-row:1!important; }
html.page-executive body.page-executive .executive-main-grid > .trend-card { grid-column:3!important;grid-row:1!important; }
html.page-executive body.page-executive .executive-main-grid > .risk-card { grid-column:2/span 2!important;grid-row:2!important; }

/* Risk alignment. */
.page-risk .risk-model-performance-card { text-align:left!important;align-items:flex-start!important; }
.page-risk .risk-model-performance-card .risk-performance-metric { text-align:center!important;align-items:center!important; }
.page-risk .risk-high-list-card .risk-score-cell { text-align:center!important; }

/* Population: make population taller and gender shorter without changing the row envelope. */
.page-population .population-primary-stack { grid-template-rows:1.2fr .8fr;min-height:330px!important;align-self:start!important; }
.page-population .pop-top-2 { min-height:0!important;height:270px!important;align-self:start!important; }

/* Personal service ratios. */
html.page-personal-service body.page-personal-service .service-layout { grid-template-columns:.8fr .8fr 1.4fr!important; }
.page-personal-service .personal-service-data-row { grid-template-columns:4fr 6fr!important; }
.page-personal-service .personal-service-lower-grid { grid-template-columns:6fr 4fr!important; }

/* Overview: middle/bottom height ratio 6:4; status narrows while region widens. */
html.page-overview body.page-overview .dashboard-container.page-overview { grid-template-rows:74px 150px 6fr 4fr!important;gap:16px!important; }
.page-overview .overview-main-rows { grid-template-rows:6fr 4fr!important; }
.page-overview .overview-middle-grid { grid-template-columns:.8fr 1.4fr 1fr!important;min-height:0!important; }
.page-overview .overview-bottom-grid { min-height:0!important; }

/* Medical: remove the 190px child minimum that overflowed a 150px row. */
html.page-medical body.page-medical .medical-kpi-row { grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:150px minmax(0,1fr)!important;row-gap:16px!important;column-gap:16px!important; }
html.page-medical body.page-medical .medical-kpi-row > article { min-height:0!important;overflow:hidden!important; }
html.page-medical body.page-medical .medical-kpi-row > .medical-middle-content,html.page-medical body.page-medical .medical-kpi-row > .coverage-card { min-height:0!important;margin:0!important; }

/* Realtime stable layout: one parent column and one internal four-column grid. */
html.page-realtime body.page-realtime .dashboard-container.page-realtime { grid-template-columns:minmax(0,1fr)!important;grid-template-rows:74px 410px minmax(0,1fr)!important;gap:16px!important; }
html.page-realtime body.page-realtime .dashboard-container.page-realtime > :nth-child(1) { grid-column:1!important;grid-row:1!important; }
html.page-realtime body.page-realtime .dashboard-container.page-realtime > .realtime-top-grid { display:grid!important;grid-column:1!important;grid-row:2!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;gap:16px!important; }
html.page-realtime body.page-realtime .realtime-top-grid > .devices-card { grid-column:4!important;grid-row:1/span 2!important;min-height:0!important; }
html.page-realtime body.page-realtime .realtime-top-grid > .vital-card { grid-column:auto!important;grid-row:auto!important;min-height:0!important; }
html.page-realtime body.page-realtime .dashboard-container.page-realtime > :nth-child(3) { grid-column:1!important;grid-row:3!important;min-height:0!important; }
.page-realtime .realtime-layout-stable { min-height:0; }

/* AI Health image region: natural width, taller crop inside its card. */
html.page-ai-health body.page-ai-health .ai-health-image-row { min-height:220px!important; }
html.page-ai-health body.page-ai-health .ai-health-image-row .ai-card-content { min-height:180px!important; }
html.page-ai-health body.page-ai-health .ai-health-image-row .ai-card-content img { width:auto!important;max-width:100%!important;height:150px!important;max-height:150px!important;object-fit:cover!important;align-self:stretch!important; }
html.page-energy body.page-energy .dashboard-container.page-energy > .energy-grid > .energy-curve-card { grid-column:1/-1!important;grid-row:3!important; }

/* tv-refinement-round-ten */
/* Keep every override CSS-only so the 1920x1080 canvas / 960x540 TV Bro scaler stays untouched. */
html.page-ai-health body.page-ai-health .ai-health-image-row .ai-card-content {display:flex!important;align-items:center!important;justify-content:center!important;}
html.page-ai-health body.page-ai-health .ai-health-image-row .ai-card-content img {display:block!important;margin-left:auto!important;margin-right:auto!important;object-position:center center!important;}

html.page-chronic-risk body.page-chronic-risk .dashboard-container.page-chronic-risk {grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:74px 360px 386px 74px!important;gap:16px!important;}
html.page-chronic-risk body.page-chronic-risk .risk-grid,html.page-chronic-risk body.page-chronic-risk .chronic-risk-second-row {display:contents!important;}
html.page-chronic-risk body.page-chronic-risk .chronic-risk-overview-card {grid-column:1!important;grid-row:2!important;}
html.page-chronic-risk body.page-chronic-risk .chronic-risk-disease-card {grid-column:2/span 2!important;grid-row:2!important;}
html.page-chronic-risk body.page-chronic-risk .chronic-risk-factor-card {grid-column:1!important;grid-row:3!important;}
html.page-chronic-risk body.page-chronic-risk .chronic-risk-coverage-card {grid-column:2/span 2!important;grid-row:3!important;}
html.page-chronic-risk body.page-chronic-risk .chronic-risk-control-card {grid-column:4!important;grid-row:2/span 2!important;}
html.page-chronic-risk body.page-chronic-risk .ai-banner {grid-column:1/-1!important;grid-row:4!important;}

html.page-chronic body.page-chronic .chronic-equal-chart-row {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;}
html.page-chronic body.page-chronic .chronic-second-first {grid-column:2!important;}
html.page-chronic body.page-chronic .chronic-second-middle {grid-column:1!important;}
html.page-chronic body.page-chronic .chronic-second-last {grid-column:3!important;}
html.page-chronic body.page-chronic .chronic-equal-chart-row + div {grid-template-columns:repeat(3,minmax(0,1fr))!important;}

html.page-energy body.page-energy .dashboard-container.page-energy {grid-template-columns:repeat(14,minmax(0,1fr))!important;grid-template-rows:74px 130px 270px 246px!important;gap:16px!important;}
html.page-energy body.page-energy .energy-grid,html.page-energy body.page-energy .energy-right-stack,html.page-energy body.page-energy .energy-lower-charts {display:contents!important;}
html.page-energy body.page-energy .energy-curve-card {grid-column:1/span 6!important;grid-row:3!important;}
html.page-energy body.page-energy .energy-consumption-card {grid-column:7/span 4!important;grid-row:3!important;}
html.page-energy body.page-energy .energy-best-window {grid-column:11/span 4!important;grid-row:3!important;}
html.page-energy body.page-energy .energy-week-trend {grid-column:1/span 5!important;grid-row:4!important;}
html.page-energy body.page-energy .energy-sleep-correlation {grid-column:6/span 5!important;grid-row:4!important;}
html.page-energy body.page-energy .energy-recommendation-card {grid-column:11/span 4!important;grid-row:4!important;}

html.page-executive body.page-executive .dashboard-container.page-executive {display:grid!important;grid-template-rows:74px 570px 150px!important;gap:16px!important;}
html.page-executive body.page-executive .executive-main-grid {grid-row:2!important;grid-template-rows:320px 234px!important;height:570px!important;gap:16px!important;}
html.page-executive body.page-executive .executive-main-grid>.wang-card {grid-template-rows:276px 278px!important;height:570px!important;gap:16px!important;}
html.page-executive body.page-executive .executive-ai-full {grid-row:3!important;margin-top:0!important;position:static!important;}

html.page-family body.page-family .family-chart-row {height:120%!important;min-height:0!important;}
html.page-family body.page-family .family-reminder-card {max-height:150px!important;overflow:hidden!important;}

html.page-individual-vitals body.page-individual-vitals .vitals-heart-rate-card {grid-column:1/span 4!important;}
html.page-individual-vitals body.page-individual-vitals .vitals-sleep-card {grid-column:5/span 4!important;}

html.page-intervention body.page-intervention .intervention-type-title {text-align:left!important;justify-self:start!important;align-self:start!important;width:100%!important;}
html.page-intervention body.page-intervention .intervention-trend-card {grid-column:1!important;grid-row:2!important;min-height:0!important;}

html.page-medical body.page-medical .medical-region-legend {justify-content:flex-start!important;justify-items:start!important;text-align:left!important;}

html.page-operations body.page-operations .operations-service-cost-row {grid-template-columns:4fr 6fr!important;}
html.page-operations body.page-operations .operations-age-gender-row {grid-template-columns:6fr 4fr minmax(0,3.6fr)!important;}
html.page-operations body.page-operations .operations-gender-content {height:100%!important;align-content:center!important;align-items:center!important;justify-content:center!important;}
html.page-operations body.page-operations .operations-age-gender-row>:last-child {width:90%!important;justify-self:end!important;}

html.page-overview body.page-overview .overview-anomaly-row>:last-child,html.page-overview body.page-overview .overview-warning-row>:last-child {width:100%!important;height:100%!important;min-height:0!important;align-self:stretch!important;}

html.page-personal-service body.page-personal-service .dashboard-container.page-personal-service {display:grid!important;grid-template-columns:.8fr 1fr 1fr!important;grid-template-rows:74px repeat(3,minmax(0,1fr))!important;gap:16px!important;}
html.page-personal-service body.page-personal-service .service-layout,html.page-personal-service body.page-personal-service .personal-service-data-row,html.page-personal-service body.page-personal-service .personal-service-lower-grid {display:contents!important;}
html.page-personal-service body.page-personal-service .personal-team-card {grid-column:1!important;grid-row:2!important;}
html.page-personal-service body.page-personal-service .personal-records-card {grid-column:1!important;grid-row:3/span 2!important;}
html.page-personal-service body.page-personal-service .personal-service-data-row>:first-child {grid-column:2!important;grid-row:2!important;}
html.page-personal-service body.page-personal-service .personal-service-type-card {grid-column:3!important;grid-row:2!important;}
html.page-personal-service body.page-personal-service .personal-service-lower-grid>:first-child {grid-column:2!important;grid-row:3!important;}
html.page-personal-service body.page-personal-service .personal-service-lower-grid>:last-child {grid-column:2!important;grid-row:4!important;}
html.page-personal-service body.page-personal-service .personal-appointment-stack {grid-column:3!important;grid-row:3/span 2!important;min-height:0!important;}

html.page-population body.page-population .dashboard-grid {grid-template-columns:repeat(12,minmax(0,1fr))!important;grid-template-rows:210px 120px 210px!important;gap:16px!important;}
html.page-population body.page-population .pop-top-1 {grid-column:1/span 3!important;grid-row:1/span 2!important;height:auto!important;min-height:0!important;}
html.page-population body.page-population .pop-top-2 {grid-column:4/span 3!important;grid-row:1!important;height:auto!important;min-height:0!important;}
html.page-population body.page-population .pop-top-3 {grid-column:7/span 6!important;grid-row:1/span 2!important;}
html.page-population body.page-population .population-health-indicator-card {grid-column:1/span 3!important;grid-row:3!important;}
html.page-population body.page-population .population-activity-card {grid-column:7/span 3!important;grid-row:3!important;}
html.page-population body.page-population #age-chart {width:100%!important;height:100%!important;min-height:150px!important;transition:none!important;animation:none!important;}

html.page-realtime body.page-realtime .dashboard-container.page-realtime {display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;grid-template-rows:74px 150px 250px 250px!important;gap:16px!important;}
html.page-realtime body.page-realtime .dashboard-container.page-realtime>.realtime-top-grid {display:contents!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;}
html.page-realtime body.page-realtime .realtime-top-grid>.vital-card {grid-row:2!important;grid-column:auto!important;min-height:0!important;}
html.page-realtime body.page-realtime .realtime-top-grid>.devices-card {grid-column:5/span 2!important;grid-row:3/span 2!important;min-height:0!important;}
html.page-realtime body.page-realtime .dashboard-container.page-realtime>:nth-child(3) {display:contents!important;}
html.page-realtime body.page-realtime .dashboard-container.page-realtime>:nth-child(3)>:first-child {grid-column:1/span 4!important;grid-row:4!important;}
html.page-realtime body.page-realtime .realtime-alert-card {grid-column:1/span 2!important;grid-row:3!important;}
html.page-realtime body.page-realtime .dashboard-container.page-realtime>:nth-child(3)>:nth-child(3) {grid-column:3/span 2!important;grid-row:3!important;}

html.page-risk body.page-risk .risk-equal-row {grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;}
html.page-risk body.page-risk .risk-bottom-layout {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
html.page-energy body.page-energy .dashboard-container.page-energy > .energy-grid > .energy-right-stack > .energy-best-window { grid-column:3!important;grid-row:4!important; }
html.page-energy body.page-energy .dashboard-container.page-energy > .energy-grid > .energy-right-stack > .energy-recommendation-card { grid-column:3!important;grid-row:5!important; }
html.page-energy body.page-energy .dashboard-container.page-energy > .energy-lower-charts > .energy-consumption-card { grid-column:1/span 2!important;grid-row:4!important; }
html.page-energy body.page-energy .dashboard-container.page-energy > .energy-lower-charts > .energy-week-trend { grid-column:1!important;grid-row:5!important; }
html.page-energy body.page-energy .dashboard-container.page-energy > .energy-lower-charts > .energy-sleep-correlation { grid-column:2!important;grid-row:5!important; }
html.page-realtime body.page-realtime .dashboard-container.page-realtime > :nth-child(3) { display:grid!important;grid-template-columns:1.15fr .85fr 1.2fr!important;gap:16px!important;grid-column:1!important;grid-row:3!important; }
html.page-realtime body.page-realtime .dashboard-container.page-realtime > :nth-child(3) > * { grid-column:auto!important;grid-row:auto!important;min-width:0!important; }

html.page-personal-service body.page-personal-service .dashboard-container.page-personal-service { grid-template-columns:minmax(0,1fr)!important;grid-template-rows:74px 330px 260px 260px!important;gap:16px!important; }
html.page-personal-service body.page-personal-service .dashboard-container.page-personal-service > :nth-child(1) { grid-column:1!important;grid-row:1!important; }
html.page-personal-service body.page-personal-service .service-layout { display:grid!important;grid-column:1!important;grid-row:2!important;grid-template-columns:.8fr .8fr 1.4fr!important;gap:16px!important; }
html.page-personal-service body.page-personal-service .personal-service-data-row { display:grid!important;grid-column:1!important;grid-row:3!important;grid-template-columns:4fr 6fr!important;gap:16px!important; }
html.page-personal-service body.page-personal-service .personal-service-lower-grid { display:grid!important;grid-column:1!important;grid-row:4!important;grid-template-columns:6fr 4fr!important;gap:16px!important; }
html.page-personal-service body.page-personal-service .service-layout > *,html.page-personal-service body.page-personal-service .personal-service-data-row > *,html.page-personal-service body.page-personal-service .personal-service-lower-grid > * { grid-column:auto!important;grid-row:auto!important;min-width:0!important;min-height:0!important; }

html.page-overview body.page-overview .dashboard-container.page-overview { grid-template-columns:minmax(0,1fr)!important;grid-template-rows:74px 150px 6fr 4fr!important;gap:16px!important; }
html.page-overview body.page-overview .dashboard-container.page-overview > :nth-child(1) { grid-column:1!important;grid-row:1!important; }
html.page-overview body.page-overview .dashboard-container.page-overview > :nth-child(2) { grid-column:1!important;grid-row:2!important; }
html.page-overview body.page-overview .overview-middle-grid { display:grid!important;grid-column:1!important;grid-row:3!important;grid-template-columns:.8fr 1.4fr 1fr!important;gap:16px!important; }
html.page-overview body.page-overview .overview-bottom-grid { display:grid!important;grid-column:1!important;grid-row:4!important;grid-template-columns:2.5fr 1fr!important;gap:16px!important; }
html.page-overview body.page-overview .overview-middle-grid > *,html.page-overview body.page-overview .overview-bottom-grid > * { grid-column:auto!important;grid-row:auto!important;min-width:0!important;min-height:0!important; }

html.page-ai-health body.page-ai-health .ai-health-image-row .suggestion-card .suggestion-body { min-height:210px!important; }
html.page-ai-health body.page-ai-health .ai-health-image-row .suggestion-card .suggestion-body img { width:auto!important;max-width:100%!important;height:180px!important;max-height:180px!important;object-fit:cover!important; }
html.page-medical body.page-medical .medical-kpi-row > article { height:100%!important;max-height:150px!important;min-height:0!important; }

/* tv-refinement-round-ten-final: must remain the last compatibility layer. */
html.page-energy body.page-energy .dashboard-container.page-energy {grid-template-columns:repeat(14,minmax(0,1fr))!important;grid-template-rows:74px 130px 270px 246px!important;gap:16px!important;}
html.page-energy body.page-energy .dashboard-container.page-energy>:nth-child(1),html.page-energy body.page-energy .dashboard-container.page-energy>:nth-child(2){grid-column:1/-1!important;}
html.page-energy body.page-energy .energy-grid,html.page-energy body.page-energy .energy-right-stack,html.page-energy body.page-energy .energy-lower-charts{display:contents!important;}
html.page-energy body.page-energy .dashboard-container.page-energy .energy-curve-card{grid-column:1/span 6!important;grid-row:3!important;}
html.page-energy body.page-energy .dashboard-container.page-energy .energy-consumption-card{grid-column:7/span 4!important;grid-row:3!important;}
html.page-energy body.page-energy .dashboard-container.page-energy .energy-best-window{grid-column:11/span 4!important;grid-row:3!important;}
html.page-energy body.page-energy .dashboard-container.page-energy .energy-week-trend{grid-column:1/span 5!important;grid-row:4!important;}
html.page-energy body.page-energy .dashboard-container.page-energy .energy-sleep-correlation{grid-column:6/span 5!important;grid-row:4!important;}
html.page-energy body.page-energy .dashboard-container.page-energy .energy-recommendation-card{grid-column:11/span 4!important;grid-row:4!important;}

html.page-realtime body.page-realtime .dashboard-container.page-realtime{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;grid-template-rows:74px 150px 250px 250px!important;gap:16px!important;}
html.page-realtime body.page-realtime .dashboard-container.page-realtime>:nth-child(1){grid-column:1/-1!important;grid-row:1!important;}
html.page-realtime body.page-realtime .dashboard-container.page-realtime>.realtime-top-grid{display:contents!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;}
html.page-realtime body.page-realtime .realtime-top-grid>.vital-card{grid-row:2!important;grid-column:auto!important;}
html.page-realtime body.page-realtime .realtime-top-grid>.devices-card{grid-column:5/span 2!important;grid-row:3/span 2!important;}
html.page-realtime body.page-realtime .dashboard-container.page-realtime>:nth-child(3){display:contents!important;}
html.page-realtime body.page-realtime .dashboard-container.page-realtime>:nth-child(3)>:first-child{grid-column:1/span 4!important;grid-row:4!important;}
html.page-realtime body.page-realtime .dashboard-container.page-realtime .realtime-alert-card{grid-column:1/span 2!important;grid-row:3!important;}
html.page-realtime body.page-realtime .dashboard-container.page-realtime>:nth-child(3)>:nth-child(3){grid-column:3/span 2!important;grid-row:3!important;}

html.page-personal-service body.page-personal-service .dashboard-container.page-personal-service{display:grid!important;grid-template-columns:.8fr 1fr 1fr!important;grid-template-rows:74px repeat(3,minmax(0,1fr))!important;gap:16px!important;}
html.page-personal-service body.page-personal-service .dashboard-container.page-personal-service>:nth-child(1){grid-column:1/-1!important;grid-row:1!important;}
html.page-personal-service body.page-personal-service .service-layout,html.page-personal-service body.page-personal-service .personal-service-data-row,html.page-personal-service body.page-personal-service .personal-service-lower-grid{display:contents!important;}
html.page-personal-service body.page-personal-service .personal-team-card{grid-column:1!important;grid-row:2!important;}
html.page-personal-service body.page-personal-service .personal-records-card{grid-column:1!important;grid-row:3/span 2!important;}
html.page-personal-service body.page-personal-service .personal-service-data-row>:first-child{grid-column:2!important;grid-row:2!important;}
html.page-personal-service body.page-personal-service .personal-service-type-card{grid-column:3!important;grid-row:2!important;}
html.page-personal-service body.page-personal-service .personal-service-lower-grid>:first-child{grid-column:2!important;grid-row:3!important;}
html.page-personal-service body.page-personal-service .personal-service-lower-grid>:last-child{grid-column:2!important;grid-row:4!important;}
html.page-personal-service body.page-personal-service .personal-appointment-stack{grid-column:3!important;grid-row:3/span 2!important;}

html.page-overview body.page-overview .overview-anomaly-row>:last-child,html.page-overview body.page-overview .overview-warning-row>:last-child{width:100%!important;height:100%!important;align-self:stretch!important;min-height:0!important;}
html.page-ai-health body.page-ai-health .ai-health-image-row .suggestion-card .suggestion-body{display:flex!important;align-items:center!important;justify-content:center!important;}
html.page-ai-health body.page-ai-health .ai-health-image-row .suggestion-card .suggestion-body img{display:block!important;margin:auto!important;object-position:center center!important;}

/* Specificity guards against legacy direct-child maps. */
html.page-energy.page-energy body.page-energy.page-energy .dashboard-container.page-energy>.energy-grid>.energy-curve-card{grid-column:1/span 6!important;grid-row:3!important;}
html.page-energy.page-energy body.page-energy.page-energy .dashboard-container.page-energy>.energy-grid>.energy-right-stack>.energy-best-window{grid-column:11/span 4!important;grid-row:3!important;}
html.page-energy.page-energy body.page-energy.page-energy .dashboard-container.page-energy>.energy-grid>.energy-right-stack>.energy-recommendation-card{grid-column:11/span 4!important;grid-row:4!important;}
html.page-energy.page-energy body.page-energy.page-energy .dashboard-container.page-energy>.energy-lower-charts>.energy-consumption-card{grid-column:7/span 4!important;grid-row:3!important;}
html.page-energy.page-energy body.page-energy.page-energy .dashboard-container.page-energy>.energy-lower-charts>.energy-week-trend{grid-column:1/span 5!important;grid-row:4!important;}
html.page-energy.page-energy body.page-energy.page-energy .dashboard-container.page-energy>.energy-lower-charts>.energy-sleep-correlation{grid-column:6/span 5!important;grid-row:4!important;}
html.page-realtime.page-realtime body.page-realtime.page-realtime .dashboard-container.page-realtime>:nth-child(3){display:contents!important;}
html.page-personal-service.page-personal-service body.page-personal-service.page-personal-service .dashboard-container.page-personal-service>.service-layout,html.page-personal-service.page-personal-service body.page-personal-service.page-personal-service .dashboard-container.page-personal-service>.personal-service-data-row,html.page-personal-service.page-personal-service body.page-personal-service.page-personal-service .dashboard-container.page-personal-service>.personal-service-lower-grid{display:contents!important;}
html.page-realtime.page-realtime body.page-realtime.page-realtime .dashboard-container.page-realtime{grid-template-rows:74px 150px 250px 330px!important;}

/* tv-layout-refinement-2026-08-15: final TV Bro-safe layout contracts. */
html.page-ai-health body.page-ai-health .ai-health-image-row .suggestion-body img{
  display:block!important;
  width:100%!important;
  min-width:100%!important;
  max-width:100%!important;
  height:180px!important;
  max-height:180px!important;
  margin:0!important;
  object-fit:cover!important;
  object-position:center center!important;
  align-self:stretch!important;
}

html.page-chronic-risk body.page-chronic-risk .dashboard-container.page-chronic-risk{
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:74px 360px 386px 74px!important;
  gap:16px!important;
}
html.page-chronic-risk body.page-chronic-risk .risk-grid{
  display:grid!important;
  grid-column:1!important;
  grid-row:2!important;
  grid-template-columns:minmax(0,1fr) minmax(0,2fr) minmax(0,1fr)!important;
  gap:16px!important;
  align-items:stretch!important;
}
html.page-chronic-risk body.page-chronic-risk .risk-grid>.chronic-risk-overview-card,
html.page-chronic-risk body.page-chronic-risk .risk-grid>.chronic-risk-disease-card,
html.page-chronic-risk body.page-chronic-risk .risk-grid>.chronic-risk-factor-card{
  grid-row:1!important;
  min-width:0!important;
  min-height:0!important;
  height:100%!important;
}
html.page-chronic-risk body.page-chronic-risk .risk-grid>.chronic-risk-overview-card{grid-column:1!important;}
html.page-chronic-risk body.page-chronic-risk .risk-grid>.chronic-risk-disease-card{grid-column:2!important;}
html.page-chronic-risk body.page-chronic-risk .risk-grid>.chronic-risk-factor-card{grid-column:3!important;}
html.page-chronic-risk body.page-chronic-risk .chronic-risk-second-row{
  display:grid!important;
  grid-column:1!important;
  grid-row:3!important;
  grid-template-columns:minmax(0,11fr) minmax(0,9fr)!important;
  gap:16px!important;
  align-items:stretch!important;
}
html.page-chronic-risk body.page-chronic-risk .chronic-risk-second-row>.chronic-risk-coverage-card{
  grid-column:1!important;
  grid-row:1!important;
  width:auto!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
}
html.page-chronic-risk body.page-chronic-risk .chronic-risk-second-row>.chronic-risk-control-card{
  grid-column:2!important;
  grid-row:1!important;
  width:auto!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
}
html.page-chronic-risk body.page-chronic-risk .ai-banner{
  grid-column:1!important;
  grid-row:4!important;
}

html.page-chronic body.page-chronic .dashboard-container.page-chronic .chronic-equal-chart-row{
  display:grid!important;
  grid-template-columns:minmax(0,4fr) minmax(0,3fr) minmax(0,4fr)!important;
}
html.page-chronic body.page-chronic .dashboard-container.page-chronic .chronic-equal-chart-row>.chronic-second-first,
html.page-chronic body.page-chronic .dashboard-container.page-chronic .chronic-equal-chart-row>.chronic-second-middle,
html.page-chronic body.page-chronic .dashboard-container.page-chronic .chronic-equal-chart-row>.chronic-second-last{
  grid-column:auto!important;
  grid-row:auto!important;
  min-width:0!important;
}
html.page-chronic body.page-chronic .dashboard-container.page-chronic .chronic-third-row{
  display:grid!important;
  grid-template-columns:minmax(0,4fr) minmax(0,4fr) minmax(0,3fr)!important;
}

html.page-energy body.page-energy .dashboard-container.page-energy{
  grid-template-rows:74px 130px 324px 295px!important;
}

html.page-executive body.page-executive .dashboard-container.page-executive{
  grid-template-rows:74px 627px 150px!important;
}
html.page-executive body.page-executive .executive-main-grid{
  grid-template-rows:384px 211px!important;
  height:627px!important;
}
html.page-executive body.page-executive .executive-main-grid>.wang-card{
  grid-template-rows:304px 307px!important;
  height:627px!important;
}

html.page-family body.page-family .dashboard-container.page-family{
  grid-template-rows:74px 258px 336px minmax(0,1fr)!important;
}

html.page-individual-vitals body.page-individual-vitals .vitals-sleep-card,
.page-individual-vitals .vitals-weight-card{
  grid-column:span 2!important;
}

/* tv-layout-refinement-round-two-2026-08-15: exact cross-row TV dimensions. */
html.page-chronic-risk body.page-chronic-risk .dashboard-container.page-chronic-risk .risk-grid{
  grid-template-columns:456px minmax(0,1fr) 560px!important;
}
html.page-chronic-risk body.page-chronic-risk .dashboard-container.page-chronic-risk .chronic-risk-second-row{
  grid-template-columns:minmax(0,1fr) 560px!important;
}

html.page-energy body.page-energy .dashboard-container.page-energy{
  grid-template-rows:74px 130px 324px 324px!important;
}

html.page-executive body.page-executive .dashboard-container.page-executive{
  grid-template-rows:74px 600px 150px!important;
}
html.page-executive body.page-executive .dashboard-container.page-executive .executive-main-grid{
  grid-template-rows:384px 200px!important;
  height:600px!important;
}
html.page-executive body.page-executive .dashboard-container.page-executive .executive-main-grid>.wang-card{
  grid-template-rows:304px 280px!important;
  height:600px!important;
}
html.page-executive body.page-executive .score-card .score-ring,
html.page-executive body.page-executive .score-card .score-ring svg{
  width:216px!important;
  height:216px!important;
}
html.page-executive body.page-executive .score-card .score-ring svg{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  transform:translate(-50%,-50%) rotate(-90deg)!important;
  transform-origin:center center!important;
}

html.page-individual-vitals body.page-individual-vitals .dashboard-container.page-individual-vitals{
  grid-template-rows:74px 130px 319px 225px 150px!important;
}
html.page-individual-vitals body.page-individual-vitals .dashboard-container.page-individual-vitals .vitals-monitoring-card{
  grid-column:1/span 6!important;
  grid-row:5!important;
  height:150px!important;
  min-height:0!important;
  padding:10px!important;
}
html.page-individual-vitals body.page-individual-vitals .vitals-monitoring-card .card-header{
  min-height:22px!important;
}
html.page-individual-vitals body.page-individual-vitals .vitals-monitoring-card .card-body{
  min-height:0!important;
}
html.page-individual-vitals body.page-individual-vitals .vitals-monitoring-card .stat-grid{
  gap:8px!important;
}
html.page-individual-vitals body.page-individual-vitals .vitals-monitoring-card .stat-item{
  min-height:52px!important;
  padding:3px 8px!important;
  line-height:1!important;
}
html.page-individual-vitals body.page-individual-vitals .vitals-monitoring-card .stat-value{
  margin-top:1px!important;
  font-size:17px!important;
  line-height:1!important;
}
html.page-individual-vitals body.page-individual-vitals .vitals-monitoring-card .stat-change{
  margin-top:1px!important;
  font-size:11px!important;
  line-height:1!important;
}
html.page-individual-vitals body.page-individual-vitals .vitals-monitoring-card .vitals-monitoring-notice{
  margin-top:4px!important;
  padding:4px 8px!important;
  line-height:1.2!important;
}

html.page-family body.page-family .dashboard-container.page-family .family-reminder-card{
  height:150px!important;
  min-height:150px!important;
  max-height:150px!important;
}

/* tv-five-page-layout-round-three-2026-08-15 */
html.page-family body.page-family .dashboard-container.page-family .family-reminder-card{
  height:180px!important;
  min-height:180px!important;
  max-height:180px!important;
}

html.page-operations body.page-operations .operations-container{
  display:grid!important;
  grid-template-columns:minmax(0,4fr) minmax(0,6fr) minmax(0,4fr)!important;
  grid-template-rows:74px 230px 330px 330px!important;
  gap:16px!important;
}
html.page-operations body.page-operations .operations-container>:nth-child(1),
html.page-operations body.page-operations .operations-container>.top-grid{
  grid-column:1/-1!important;
}
html.page-operations body.page-operations .operations-service-cost-row,
html.page-operations body.page-operations .operations-age-gender-row{
  display:contents!important;
}
html.page-operations body.page-operations .operations-service-card{
  grid-column:1!important;
  grid-row:3!important;
  min-width:0!important;
}
html.page-operations body.page-operations .operations-cost-card{
  grid-column:2!important;
  grid-row:3!important;
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
html.page-operations body.page-operations .operations-gender-card{
  grid-column:1!important;
  grid-row:4!important;
  min-width:0!important;
}
html.page-operations body.page-operations .operations-age-card{
  grid-column:2!important;
  grid-row:4!important;
  min-width:0!important;
}
html.page-operations body.page-operations .operations-service-channel-card{
  grid-column:3!important;
  grid-row:3/span 2!important;
  width:100%!important;
  min-width:0!important;
}
html.page-operations body.page-operations .operations-service-metrics{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  height:260px!important;
  gap:8px!important;
}
html.page-operations body.page-operations .operations-service-metrics>*{
  height:126px!important;
  min-height:0!important;
  padding:8px!important;
}
html.page-operations body.page-operations #chart-cost,
html.page-operations body.page-operations #chart-age{
  flex:1 1 auto!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
}

html.page-overview body.page-overview .dashboard-container.page-overview{
  grid-template-rows:74px 135px minmax(0,11fr) minmax(0,9fr)!important;
}
html.page-overview body.page-overview .overview-middle-grid,
html.page-overview body.page-overview .overview-bottom-grid{
  grid-template-columns:minmax(0,4fr) minmax(0,7fr) minmax(0,5fr)!important;
}
html.page-overview body.page-overview .overview-bottom-grid>:first-child{
  grid-column:1/span 2!important;
}
html.page-overview body.page-overview .overview-bottom-grid>:last-child{
  grid-column:3!important;
}

html.page-personal-service body.page-personal-service .dashboard-container.page-personal-service{
  grid-template-columns:minmax(0,4fr) minmax(0,5fr) minmax(0,5fr)!important;
  grid-template-rows:74px repeat(3,minmax(0,1fr))!important;
}
html.page-personal-service body.page-personal-service .personal-team-card{
  grid-column:1!important;
  grid-row:2!important;
}
html.page-personal-service body.page-personal-service .personal-records-card{
  grid-column:1!important;
  grid-row:3!important;
}
html.page-personal-service body.page-personal-service .personal-appointment-records{
  display:flex!important;
  flex-direction:column!important;
  gap:12px!important;
}
html.page-personal-service body.page-personal-service .personal-online-consultation{
  border-top:1px solid var(--dashboard-border)!important;
  padding-top:12px!important;
}
html.page-personal-service body.page-personal-service .personal-service-workload{
  display:flex!important;
  flex-direction:column!important;
  height:calc(100% - 34px)!important;
  min-height:0!important;
  margin-top:0!important;
}
html.page-personal-service body.page-personal-service .personal-workload-summary{
  margin-top:auto!important;
  margin-bottom:auto!important;
}

html.page-family body.page-family .dashboard-container.page-family .family-reminder-card{
  padding:12px!important;
  overflow:hidden!important;
}
html.page-family body.page-family .dashboard-container.page-family .family-reminder-card .card-title{
  margin-bottom:6px!important;
}
html.page-family body.page-family .dashboard-container.page-family .family-reminder-card .reminder-list{
  height:118px!important;
  min-height:0!important;
  align-items:stretch!important;
}
html.page-family body.page-family .dashboard-container.page-family .family-reminder-card .reminder-list>*{
  min-height:0!important;
  height:118px!important;
  padding:8px!important;
  overflow:hidden!important;
}

html.page-operations body.page-operations .operations-gender-card{
  overflow:hidden!important;
}
html.page-operations body.page-operations .operations-gender-content{
  gap:8px!important;
  min-height:0!important;
}
html.page-operations body.page-operations .operations-gender-content>:last-child>*+*{
  margin-top:6px!important;
}

html.page-personal-service body.page-personal-service .personal-team-card,
html.page-personal-service body.page-personal-service .personal-records-card,
html.page-personal-service body.page-personal-service .personal-service-lower-grid>:last-child{
  overflow:hidden!important;
}
html.page-personal-service.page-personal-service body.page-personal-service.page-personal-service .dashboard-container.page-personal-service .team-list,
html.page-personal-service.page-personal-service body.page-personal-service.page-personal-service .dashboard-container.page-personal-service .record-list{
  gap:8px!important;
}
html.page-personal-service body.page-personal-service .team-item,
html.page-personal-service body.page-personal-service .record-item{
  padding:8px!important;
}
html.page-personal-service body.page-personal-service .personal-service-workload{
  gap:10px!important;
}

html.page-operations body.page-operations .operations-gender-card{
  padding:10px!important;
}
html.page-operations body.page-operations .operations-gender-card>.mb-3{
  margin-bottom:6px!important;
}
html.page-operations body.page-operations #chart-gender{
  height:160px!important;
  max-height:160px!important;
}

html.page-personal-service body.page-personal-service .personal-team-card,
html.page-personal-service body.page-personal-service .personal-records-card{
  padding:12px!important;
}
html.page-personal-service.page-personal-service body.page-personal-service.page-personal-service .dashboard-container.page-personal-service .team-list,
html.page-personal-service.page-personal-service body.page-personal-service.page-personal-service .dashboard-container.page-personal-service .record-list{
  gap:6px!important;
}
html.page-personal-service body.page-personal-service .team-item,
html.page-personal-service body.page-personal-service .record-item{
  padding:6px!important;
}
html.page-personal-service body.page-personal-service .personal-service-workload{
  gap:8px!important;
}

/* Intervention: channel follows the first two upper tracks; effect matches age. */
html.page-intervention body.page-intervention .scale-wrapper>.w-full>:nth-child(3)>div:nth-child(5){
  grid-column:1/span 19!important;
  grid-row:2!important;
}
html.page-intervention body.page-intervention .scale-wrapper>.w-full>:nth-child(3)>div:nth-child(3){
  grid-column:20/span 11!important;
  grid-row:2!important;
}

/* tv-five-page-layout-round-four-2026-08-15 */
html.page-risk body.page-risk .dashboard-container.page-risk{
  grid-template-rows:74px 231px 359px minmax(0,1fr)!important;
}
html.page-risk body.page-risk .risk-trend-card{
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  padding:12px!important;
}
html.page-risk body.page-risk .risk-trend-summary{
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  gap:12px!important;
  margin-left:auto!important;
  white-space:nowrap!important;
}
html.page-risk body.page-risk .risk-trend-card #risk-trend{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
}

/* individual-vitals-stat-height-final-2026-08-18 */
html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals .dashboard-container.page-individual-vitals .vitals-monitoring-card .stat-grid>.stat-item{
  min-height:74px!important;
  height:74px!important;
  max-height:74px!important;
}

/* carousel-viewport-containment-2026-08-19 */
.page-energy .energy-recommendation-card,
.page-risk .risk-high-list-card,
.page-realtime .realtime-event-card,
.page-personal-service .personal-team-card,
.page-personal-service .personal-records-card,
.page-overview .overview-warning-card,
.page-medical .coverage-card{
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
  overflow:hidden!important;
}
.page-energy .energy-recommendation-card>:first-child,
.page-risk .risk-high-list-card>:first-child,
.page-realtime .realtime-event-card>:first-child,
.page-personal-service .personal-team-card>.card-title,
.page-personal-service .personal-records-card>.card-title,
.page-overview .overview-warning-card>:first-child,
.page-medical .coverage-card>.card-header,
.page-medical .coverage-card>.medical-coverage-summary{
  flex:0 0 auto!important;
  position:relative!important;
  z-index:2!important;
}
.page-energy .energy-suggestion-viewport,
.page-risk .risk-people-viewport,
.page-realtime .realtime-event-viewport,
.page-personal-service .personal-team-viewport,
.page-personal-service .personal-record-viewport,
.page-overview .overview-warning-viewport,
.page-medical .medical-coverage-viewport{
  flex:1 1 auto!important;
  height:auto!important;
  max-height:none!important;
  min-height:0!important;
  overflow:hidden!important;
  position:relative!important;
  z-index:1!important;
}
.page-personal-service .personal-team-track,
.page-personal-service .personal-record-track,
.page-overview .overview-warning-list,
.page-medical .medical-coverage-track{
  display:flex!important;
  flex-direction:column!important;
  height:auto!important;
  overflow:visible!important;
}
.page-personal-service .personal-team-track{gap:2px!important;}
.page-personal-service .personal-team-track>.team-item{height:32px!important;min-height:32px!important;margin:0!important;padding:3px 6px!important;box-sizing:border-box!important;}
.page-personal-service .personal-record-track{gap:7px!important;}
.page-personal-service .personal-record-track>.record-item{height:48px!important;min-height:48px!important;margin:0!important;padding:5px 7px!important;box-sizing:border-box!important;}
.page-overview .overview-warning-list{gap:7px!important;}
.page-overview .overview-warning-list>.warning-item{display:flex!important;width:100%!important;height:48px!important;min-height:48px!important;margin:0!important;padding:5px 8px!important;box-sizing:border-box!important;}
.page-medical .medical-coverage-track{gap:7px!important;}
.page-medical .medical-coverage-track>.coverage-stat{height:48px!important;min-height:48px!important;max-height:48px!important;margin:0!important;padding:6px 8px!important;box-sizing:border-box!important;}
[data-dashboard-carousel].is-sliding{
  animation:none!important;
  transform:translateY(calc(-1 * var(--dashboard-carousel-step,60px)))!important;
  transition:transform .42s ease!important;
}

/* shared-energy-style-list-carousel-2026-08-19 */
[data-dashboard-carousel]{will-change:transform;}
[data-dashboard-carousel].is-sliding{
  animation:dashboard-list-carousel-up .42s ease both!important;
  transition:none!important;
}
@keyframes dashboard-list-carousel-up{
  from{transform:translateY(0)}
  to{transform:translateY(calc(-1 * var(--dashboard-carousel-step,60px)))}
}
.page-energy .energy-suggestion-track{--dashboard-carousel-step:60px;}
.page-risk .risk-people-track{--dashboard-carousel-step:44px;}
.page-realtime .realtime-event-track{--dashboard-carousel-step:55px;}
.page-personal-service .personal-team-track{--dashboard-carousel-step:34px;}
.page-personal-service .personal-record-track{--dashboard-carousel-step:55px;}
.page-overview .overview-warning-list{--dashboard-carousel-step:55px;}
.page-medical .medical-coverage-track{--dashboard-carousel-step:55px;}
html.page-risk body.page-risk .risk-people-viewport{
  height:264px!important;
  overflow:hidden!important;
}
html.page-risk body.page-risk .risk-people-track>tr{
  display:table-row!important;
  height:44px!important;
  min-height:44px!important;
}

/* twelve-page-scroll-semantics-tail-2026-08-18 */
html.page-realtime.page-realtime.page-realtime body.page-realtime.page-realtime.page-realtime .realtime-event-viewport{height:230px!important;overflow:hidden!important;}
html.page-realtime.page-realtime.page-realtime body.page-realtime.page-realtime.page-realtime .realtime-event-track tr{height:55px!important;min-height:55px!important;}
html.page-realtime.page-realtime.page-realtime body.page-realtime.page-realtime.page-realtime .realtime-event-track.is-sliding{transform:translateY(-55px)!important;transition:transform .42s ease!important;}

html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals #activityChart{width:170px!important;height:170px!important;max-width:170px!important;max-height:170px!important;min-height:170px!important;margin:auto!important;}
html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals .vitals-warning-carousel{gap:7px!important;}
html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals .vitals-warning-carousel .alert-item{height:48px!important;min-height:48px!important;margin:0!important;}
html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals .vitals-warning-carousel.is-sliding{animation:none!important;transform:translateY(-55px)!important;transition:transform .42s ease!important;}

html.page-chronic body.page-chronic .chronic-quality-card{display:flex!important;flex-direction:column!important;min-height:0!important;}
html.page-chronic body.page-chronic .chronic-quality-list{display:flex!important;flex:1 1 auto!important;flex-direction:column!important;min-height:0!important;}
html.page-chronic body.page-chronic .chronic-quality-summary{margin-top:auto!important;flex:0 0 auto!important;}

html.page-executive.page-executive.page-executive body.page-executive.page-executive.page-executive .executive-ai-grid>.executive-ai-item{border:1px solid var(--dashboard-border)!important;background:var(--dashboard-surface)!important;box-sizing:border-box!important;}
.page-intervention.page-intervention.page-intervention.page-intervention .intervention-type-content{transform:translateY(14px)!important;}

html.page-medical.page-medical.page-medical body.page-medical.page-medical.page-medical .medical-coverage-track{height:268px!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;gap:7px!important;}
html.page-medical.page-medical.page-medical body.page-medical.page-medical.page-medical .medical-coverage-track>.coverage-stat{height:48px!important;min-height:48px!important;max-height:48px!important;margin:0!important;padding:6px 8px!important;box-sizing:border-box!important;}
html.page-medical.page-medical.page-medical body.page-medical.page-medical.page-medical .medical-coverage-track.is-sliding{transform:translateY(-55px)!important;transition:transform .42s ease!important;}

html.page-overview.page-overview.page-overview body.page-overview.page-overview.page-overview .overview-warning-row .overview-warning-viewport{height:158px!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;grid-template-columns:1fr!important;gap:7px!important;}
html.page-overview.page-overview.page-overview body.page-overview.page-overview.page-overview .overview-warning-row .overview-warning-viewport>.warning-item{display:flex!important;width:100%!important;height:48px!important;min-height:48px!important;margin:0!important;padding:5px 8px!important;box-sizing:border-box!important;}
html.page-overview.page-overview.page-overview body.page-overview.page-overview.page-overview .overview-warning-list.is-sliding{transform:translateY(-55px)!important;transition:transform .42s ease!important;}

html.page-personal-service.page-personal-service.page-personal-service body.page-personal-service.page-personal-service.page-personal-service .personal-team-viewport{height:270px!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;gap:2px!important;}
html.page-personal-service.page-personal-service.page-personal-service body.page-personal-service.page-personal-service.page-personal-service .personal-team-track>.team-item{height:32px!important;min-height:32px!important;margin:0!important;padding:3px 6px!important;box-sizing:border-box!important;}
html.page-personal-service.page-personal-service.page-personal-service body.page-personal-service.page-personal-service.page-personal-service .personal-team-track.is-sliding{transform:translateY(-34px)!important;transition:transform .42s ease!important;}
html.page-personal-service.page-personal-service.page-personal-service body.page-personal-service.page-personal-service.page-personal-service .personal-record-viewport{height:378px!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;gap:7px!important;}
html.page-personal-service.page-personal-service.page-personal-service body.page-personal-service.page-personal-service.page-personal-service .personal-record-track>.record-item{height:48px!important;min-height:48px!important;margin:0!important;padding:5px 7px!important;box-sizing:border-box!important;}
html.page-personal-service.page-personal-service.page-personal-service body.page-personal-service.page-personal-service.page-personal-service .personal-record-track.is-sliding{transform:translateY(-55px)!important;transition:transform .42s ease!important;}
html.page-personal-service.page-personal-service body.page-personal-service.page-personal-service .personal-service-workload{display:flex!important;flex-direction:column!important;gap:5px!important;}
html.page-personal-service.page-personal-service body.page-personal-service.page-personal-service .personal-service-workload>.personal-workload-summary{order:99!important;margin-top:4px!important;}

html.page-operations body.page-operations .operations-service-channel-list{gap:7px!important;}
html.page-operations body.page-operations .operations-service-channel-item{margin:0!important;}

/* population-guide-font-fix */
html.page-population.page-population.page-population body.page-population.page-population.page-population [data-header-legend="population-age"] .chart-header-legend-item,html.page-population.page-population.page-population body.page-population.page-population.page-population [data-header-legend="population-bmi"] .chart-header-legend-item,html.page-population.page-population.page-population body.page-population.page-population.page-population [data-header-legend="population-activity"] .chart-header-legend-item{font-size:11px!important;line-height:14px!important;font-weight:400!important;}
html.page-population.page-population.page-population body.page-population.page-population.page-population [data-header-legend^="population-"] .chart-header-legend-dot{width:8px!important;height:8px!important;min-width:8px!important;}
@keyframes population-tag-float{0%,100%{filter:brightness(1);box-shadow:0 8px 18px rgba(0,0,0,.28)}50%{filter:brightness(1.14);box-shadow:0 10px 24px rgba(34,211,238,.22)}}
html.page-population body.page-population #tags-cloud>.population-backup-tag{animation:population-tag-float 4.8s ease-in-out infinite!important;will-change:filter,box-shadow;}
html.page-population body.page-population #tags-cloud>.population-backup-tag:nth-child(3n+2){animation-delay:-1.6s!important;}html.page-population body.page-population #tags-cloud>.population-backup-tag:nth-child(3n){animation-delay:-3.2s!important;}
@media (prefers-reduced-motion:reduce){html.page-population body.page-population #tags-cloud>.population-backup-tag{animation:none!important;}}

/* map-list-layout-tail-2026-08-18 */
html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals .vitals-warning-carousel{
  display:flex!important;
  flex-direction:column!important;
  grid-template-columns:1fr!important;
  gap:8px!important;
}
html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals .vitals-warning-carousel .alert-item{
  min-height:56px!important;
  padding:10px 12px!important;
  gap:10px!important;
}
html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals .vitals-warning-carousel .alert-title{font-size:12px!important;line-height:1.3!important;}
html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals .vitals-warning-carousel .alert-desc{font-size:10px!important;line-height:1.35!important;}

html.page-realtime.page-realtime.page-realtime body.page-realtime.page-realtime.page-realtime .realtime-device-list{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:7px!important;
}
html.page-realtime.page-realtime.page-realtime body.page-realtime.page-realtime.page-realtime .realtime-device-list>div{padding:6px 8px!important;}

html.page-risk.page-risk body.page-risk.page-risk .risk-ai-grid{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:4px!important;
  font-size:11px!important;
  line-height:1.2!important;
}
html.page-risk.page-risk body.page-risk.page-risk .risk-ai-grid>li{align-items:center!important;min-height:20px!important;gap:7px!important;}
html.page-risk.page-risk body.page-risk.page-risk .risk-ai-grid>li>span:first-child{width:20px!important;height:20px!important;font-size:10px!important;}

html.page-overview.page-overview body.page-overview.page-overview .overview-warning-list{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:2px!important;
}
html.page-overview.page-overview body.page-overview.page-overview .overview-status-content>#statusChart{
  width:145px!important;
  height:145px!important;
  max-width:180px!important;
}

/* shared-guide-legend-and-chronic-scroll-2026-08-18 */
.dashboard-guide-legend{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  margin-left:auto!important;
  white-space:nowrap!important;
  flex-wrap:nowrap!important;
  color:var(--dashboard-text-muted)!important;
  font-size:9px!important;
  line-height:1!important;
  gap:8px!important;
}
html body .dashboard-guide-legend.dashboard-guide-legend.dashboard-guide-legend .chart-header-legend-item{
  display:inline-flex!important;
  align-items:center!important;
  gap:3px!important;
  margin-left:0!important;
  color:var(--dashboard-text-muted)!important;
  font-size:9px!important;
  line-height:1!important;
  white-space:nowrap!important;
}
html body .dashboard-guide-legend.dashboard-guide-legend.dashboard-guide-legend .chart-header-legend-dot{
  display:inline-block!important;
  width:8px!important;
  height:8px!important;
  min-width:8px!important;
  min-height:8px!important;
  margin-right:0!important;
  flex:0 0 8px!important;
  border-radius:50%!important;
}
.page-chronic .chronic-priority-viewport{height:274px!important;overflow:hidden!important;}
.page-chronic .chronic-priority-list{display:flex!important;flex-direction:column!important;gap:6px!important;will-change:transform;}
.page-chronic .chronic-priority-list>*+*{margin-top:0!important;}
html.page-chronic.page-chronic body.page-chronic.page-chronic .chronic-priority-list>*+*{margin-top:0!important;}
.page-chronic .chronic-priority-item{height:50px!important;min-height:50px!important;padding:6px 10px!important;box-sizing:border-box!important;}
.page-chronic .chronic-priority-item .chronic-intervention-icon{width:32px!important;height:32px!important;}
.page-chronic .chronic-priority-item p{line-height:1.2!important;}
.page-chronic .chronic-priority-list.is-sliding{animation:chronic-priority-slide-up .42s ease both;}
@keyframes chronic-priority-slide-up{from{transform:translateY(0)}to{transform:translateY(-56px)}}
.page-energy .energy-suggestion-viewport{height:296px!important;overflow:hidden!important;}
.page-energy .energy-suggestion-track{display:flex!important;flex-direction:column!important;gap:6px!important;will-change:transform;}
.page-energy .energy-suggestion-track>*+*{margin-top:0!important;}
.page-energy .energy-suggestion-item{height:56px!important;min-height:56px!important;margin-bottom:0!important;padding:6px 8px!important;box-sizing:border-box!important;overflow:hidden!important;}
.page-energy .energy-suggestion-track.is-sliding{animation:energy-suggestion-slide-up .42s ease both;}
@keyframes energy-suggestion-slide-up{from{transform:translateY(0)}to{transform:translateY(-60px)}}

/* four-page-layout-specificity-guard-2026-08-18 */
html.page-intervention.page-intervention body.page-intervention.page-intervention .scale-wrapper>.w-full>.intervention-first-row>article>div:last-child{
  margin-top:0!important;
}
html.page-intervention.page-intervention body.page-intervention.page-intervention .scale-wrapper>.w-full>.intervention-first-row>article>div:nth-last-child(2){
  margin-bottom:8px!important;
}
html.page-operations.page-operations body.page-operations.page-operations .operations-gender-copy{
  margin-left:-5px!important;
}
html.page-overview.page-overview body.page-overview.page-overview .overview-status-content>#statusChart{
  flex:0 0 132px!important;
  width:132px!important;
  height:132px!important;
  max-width:132px!important;
  min-width:132px!important;
}
html.page-overview.page-overview body.page-overview.page-overview .overview-status-content>.overview-status-chart-shell{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 150px!important;
  width:150px!important;
  height:150px!important;
  min-width:150px!important;
  max-width:150px!important;
  overflow:visible!important;
}
html.page-overview.page-overview body.page-overview.page-overview .overview-status-chart-shell>#statusChart{
  width:150px!important;
  height:150px!important;
  max-width:150px!important;
  max-height:150px!important;
}

/* family-vitals-refinement-2026-08-18 */
html.page-family.page-family body.page-family.page-family .family-reminders-static{height:156px!important;overflow:visible!important;}
html.page-family.page-family body.page-family.page-family .family-reminders-static .reminder-list{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(2,74px)!important;gap:8px!important;height:156px!important;transform:none!important;transition:none!important;}
html.page-family.page-family body.page-family.page-family .family-reminders-static .reminder-list>*{height:74px!important;min-height:74px!important;padding:7px 8px!important;overflow:hidden!important;}
html.page-family.page-family body.page-family.page-family .family-reminders-static .reminder-icon{width:26px!important;height:26px!important;}
html.page-family.page-family body.page-family.page-family .family-reminders-static .reminder-title{font-size:11px!important;line-height:1.25!important;}
html.page-family.page-family body.page-family.page-family .family-reminders-static .reminder-desc{font-size:9px!important;line-height:1.25!important;margin-top:2px!important;}
html.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals .vitals-monitoring-card .stat-item{min-height:76px!important;height:76px!important;padding:8px!important;}
html.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals [data-live-list="warnings"]{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(3,minmax(0,1fr))!important;gap:6px 8px!important;}
html.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals [data-live-list="warnings"] .alert-item{min-height:48px!important;padding:6px 8px!important;gap:6px!important;}
html.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals [data-live-list="warnings"] .alert-title{font-size:10px!important;line-height:1.2!important;}
html.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals [data-live-list="warnings"] .alert-desc{font-size:9px!important;line-height:1.2!important;}

/* realtime-family-scroll-batches-2026-08-18 */
html.page-realtime body.page-realtime .realtime-device-list{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
}
html.page-realtime body.page-realtime .realtime-device-list>div{
  min-height:0!important;
  padding:8px!important;
}
html.page-realtime body.page-realtime .realtime-device-list>div>div:first-child{
  width:34px!important;
  height:34px!important;
}
html.page-realtime body.page-realtime .event-table{
  overflow:hidden!important;
}
@keyframes realtime-alert-slide-up{
  from{transform:translateY(14px);opacity:.55;}
  to{transform:translateY(0);opacity:1;}
}
html.page-family body.page-family .family-reminder-viewport{
  height:154px!important;
  overflow:hidden!important;
}
html.page-family body.page-family .family-reminder-card .family-reminder-viewport .reminder-list{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  grid-template-rows:154px 154px!important;
  grid-auto-flow:row!important;
  gap:8px!important;
  height:316px!important;
  transition:transform .45s ease!important;
  will-change:transform;
}
html.page-family body.page-family .family-reminder-card .family-reminder-viewport .reminder-list>*{
  height:154px!important;
  min-height:154px!important;
}
html.page-family body.page-family .family-plan-viewport{
  height:166px!important;
  overflow:hidden!important;
}
html.page-family body.page-family .family-plan-viewport .plan-business-list{
  display:grid!important;
  grid-template-columns:1fr!important;
  grid-template-rows:repeat(6,50px)!important;
  gap:8px!important;
  margin-top:0!important;
  transition:transform .45s ease!important;
  will-change:transform;
}
html.page-family body.page-family .family-plan-viewport .plan-business-item{
  min-height:50px!important;
  height:50px!important;
}

/* four-page-layout-refinement-2026-08-18 */
html.page-intervention body.page-intervention .intervention-first-row>article>div:last-child{margin-top:0!important;}
html.page-intervention body.page-intervention .intervention-first-row>article>div:nth-last-child(2){margin-bottom:8px!important;}
html.page-intervention body.page-intervention .intervention-type-content{align-items:center!important;align-content:center!important;min-height:0!important;}
html.page-intervention body.page-intervention .intervention-channel-list{display:flex!important;flex-direction:column!important;gap:7px!important;}
html.page-intervention body.page-intervention .intervention-channel-list>div{margin:0!important;}
html.page-intervention body.page-intervention .intervention-channel-notice{margin-top:4px!important;padding:7px!important;}
html.page-operations body.page-operations .operations-service-channel-list{display:flex!important;flex-direction:column!important;gap:11px!important;}
html.page-operations body.page-operations .operations-service-channel-list>div{margin:0!important;}
html.page-operations body.page-operations .operations-gender-content{justify-content:flex-start!important;padding-left:0!important;}
html.page-operations body.page-operations .operations-gender-copy{text-align:left!important;margin-left:0!important;}
html.page-overview body.page-overview .overview-status-content #statusChart{width:132px!important;height:132px!important;max-width:132px!important;}
html.page-overview body.page-overview .overview-warning-row>:last-child>.flex.flex-col.gap-1{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:2px 12px!important;}
html.page-overview body.page-overview .overview-warning-row .warning-item{min-height:40px!important;padding:3px 0!important;}
html.page-overview body.page-overview .overview-warning-row .warning-item>div:first-child{width:30px!important;height:30px!important;}

/* tv-six-page-layout-round-nine-final-2026-08-16 */
html.page-chronic-risk.page-chronic-risk.page-chronic-risk body.page-chronic-risk.page-chronic-risk.page-chronic-risk .dashboard-container.page-chronic-risk{grid-template-rows:74px 396px 386px 74px!important;}
html.page-chronic-risk.page-chronic-risk.page-chronic-risk body.page-chronic-risk.page-chronic-risk.page-chronic-risk .chronic-risk-control-card .control-grid.responsive-metric-grid>*{height:92px!important;min-height:92px!important;flex-basis:calc(50% - 6px)!important;}
html.page-chronic-risk.page-chronic-risk.page-chronic-risk body.page-chronic-risk.page-chronic-risk.page-chronic-risk .chronic-risk-coverage-card .card-body{display:flex!important;flex-direction:column!important;justify-content:flex-end!important;}
html.page-chronic-risk.page-chronic-risk.page-chronic-risk body.page-chronic-risk.page-chronic-risk.page-chronic-risk .chronic-risk-coverage-card #coverageChart{flex:0 0 auto!important;margin-top:auto!important;}

html.page-energy.page-energy.page-energy body.page-energy.page-energy.page-energy .energy-best-window>.space-y-3,
html.page-energy.page-energy.page-energy body.page-energy.page-energy.page-energy .energy-recommendation-card .suggestion-list{gap:6px!important;row-gap:6px!important;}
html.page-energy.page-energy.page-energy body.page-energy.page-energy.page-energy .energy-best-window>.space-y-3>*+*,
html.page-energy.page-energy.page-energy body.page-energy.page-energy.page-energy .energy-recommendation-card .suggestion-list>*+*{margin-top:0!important;}

html.page-executive.page-executive.page-executive body.page-executive.page-executive.page-executive .dashboard-container.page-executive{grid-template-rows:74px 636px 150px!important;}
html.page-executive.page-executive.page-executive body.page-executive.page-executive.page-executive .dashboard-container.page-executive .executive-main-grid,
html.page-executive.page-executive.page-executive body.page-executive.page-executive.page-executive .dashboard-container.page-executive .executive-main-grid>.wang-card{grid-template-rows:422px 198px!important;height:636px!important;}
html.page-executive.page-executive.page-executive body.page-executive.page-executive.page-executive .wang-card .mt-5.grid{margin-top:32px!important;}
html.page-executive.page-executive.page-executive body.page-executive.page-executive.page-executive .score-card>p.mt-4{transform:translateY(-12px)!important;}

html.page-family.page-family.page-family body.page-family.page-family.page-family .dashboard-container.page-family{grid-template-rows:74px 284px 370px 216px!important;}
html.page-family.page-family.page-family body.page-family.page-family.page-family .dashboard-container.page-family .family-reminder-card{height:216px!important;min-height:216px!important;max-height:216px!important;align-self:stretch!important;}
html.page-family.page-family.page-family body.page-family.page-family.page-family .family-reminder-card .reminder-list,
html.page-family.page-family.page-family body.page-family.page-family.page-family .family-reminder-card .reminder-list>*{height:154px!important;}

html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals .dashboard-container.page-individual-vitals{grid-template-rows:74px 117px 351px 248px 165px!important;}
html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals .dashboard-container.page-individual-vitals .vitals-second-row>:first-child{grid-row:4/span 2!important;height:auto!important;min-height:0!important;align-self:stretch!important;}

html.page-intervention.page-intervention.page-intervention body.page-intervention.page-intervention.page-intervention .scale-wrapper>.w-full{grid-template-rows:74px 171px 739px!important;}
html.page-intervention.page-intervention.page-intervention body.page-intervention.page-intervention.page-intervention .intervention-effect-content.responsive-metric-grid>*{height:92px!important;min-height:92px!important;flex:0 0 calc(50% - 6px)!important;}

/* tv-six-page-layout-round-nine-2026-08-16 */
html.page-chronic-risk.page-chronic-risk body.page-chronic-risk.page-chronic-risk .dashboard-container.page-chronic-risk{
  grid-template-rows:74px 396px 386px 74px!important;
}
html.page-chronic-risk.page-chronic-risk body.page-chronic-risk.page-chronic-risk .chronic-risk-control-card .control-grid.responsive-metric-grid>*{
  height:92px!important;
  min-height:92px!important;
  flex-basis:calc(50% - 6px)!important;
}
html.page-chronic-risk.page-chronic-risk body.page-chronic-risk.page-chronic-risk .chronic-risk-coverage-card .card-body{
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-end!important;
}
html.page-chronic-risk.page-chronic-risk body.page-chronic-risk.page-chronic-risk .chronic-risk-coverage-card #coverageChart{
  flex:0 0 auto!important;
  margin-top:auto!important;
}

html.page-energy.page-energy body.page-energy.page-energy .energy-best-window>.space-y-3,
html.page-energy.page-energy body.page-energy.page-energy .energy-recommendation-card .suggestion-list{
  gap:6px!important;
  row-gap:6px!important;
}
html.page-energy.page-energy body.page-energy.page-energy .energy-best-window>.space-y-3>*+*,
html.page-energy.page-energy body.page-energy.page-energy .energy-recommendation-card .suggestion-list>*+*{
  margin-top:0!important;
}

html.page-executive.page-executive body.page-executive.page-executive .dashboard-container.page-executive{
  grid-template-rows:74px 636px 150px!important;
}
html.page-executive.page-executive body.page-executive.page-executive .dashboard-container.page-executive .executive-main-grid,
html.page-executive.page-executive body.page-executive.page-executive .dashboard-container.page-executive .executive-main-grid>.wang-card{
  grid-template-rows:422px 198px!important;
  height:636px!important;
}
html.page-executive.page-executive body.page-executive.page-executive .wang-card .mt-5.grid{
  margin-top:32px!important;
}
html.page-executive.page-executive body.page-executive.page-executive .score-card>p.mt-4{
  transform:translateY(-12px)!important;
}

html.page-family.page-family body.page-family.page-family .dashboard-container.page-family{
  grid-template-rows:74px 284px 370px 216px!important;
}
html.page-family.page-family body.page-family.page-family .dashboard-container.page-family .family-reminder-card{
  height:216px!important;
  min-height:216px!important;
  max-height:216px!important;
  align-self:stretch!important;
}
html.page-family.page-family body.page-family.page-family .family-reminder-card .reminder-list,
html.page-family.page-family body.page-family.page-family .family-reminder-card .reminder-list>*{
  height:154px!important;
}

html.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals .dashboard-container.page-individual-vitals{
  grid-template-rows:74px 117px 351px 248px 165px!important;
}
html.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals .dashboard-container.page-individual-vitals .vitals-second-row>:first-child{
  grid-row:4/span 2!important;
  height:auto!important;
  min-height:0!important;
  align-self:stretch!important;
}

/* five-page-period-scroll-2026-08-18 */
.page-chronic .chronic-priority-viewport{height:330px!important;overflow:hidden!important;}
html.page-family body.page-family .family-plan-viewport{height:224px!important;overflow:hidden!important;}
html.page-family body.page-family .family-plan-viewport .plan-business-list.is-sliding{animation:family-plan-slide-up .42s ease both!important;}
@keyframes family-plan-slide-up{from{transform:translateY(0)}to{transform:translateY(-58px)}}
html.page-executive.page-executive body.page-executive.page-executive .executive-ai-icon{width:28px!important;height:28px!important;min-width:28px!important;flex:0 0 28px!important;border-radius:8px!important;margin:0 10px 0 0!important;line-height:28px!important;align-self:flex-start!important;}

/* vitals-layout-period-scroll-2026-08-18 */
html.page-individual-vitals.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals.page-individual-vitals .dashboard-container.page-individual-vitals{grid-template-rows:74px 117px 351px 268px 145px!important;}
html.page-individual-vitals body.page-individual-vitals .vitals-warning-viewport{height:100px!important;overflow:hidden!important;min-height:0!important;}
html.page-individual-vitals body.page-individual-vitals .vitals-warning-carousel{display:flex!important;flex-direction:column!important;gap:4px!important;will-change:transform;}
html.page-individual-vitals body.page-individual-vitals .vitals-warning-carousel .alert-item{height:48px!important;min-height:48px!important;padding:6px 9px!important;box-sizing:border-box!important;}
html.page-individual-vitals body.page-individual-vitals .vitals-warning-carousel.is-sliding{animation:vitals-warning-slide-up .42s ease both!important;}
@keyframes vitals-warning-slide-up{from{transform:translateY(0)}to{transform:translateY(-52px)}}

/* multi-page-density-objectivity-2026-08-18 */
html body [data-header-legend="overall-risk"],html body [data-header-legend="realtime-alert-type"],html body [data-header-legend="population-age"],html body [data-header-legend="population-bmi"]{display:flex!important;align-items:center!important;justify-content:flex-end!important;flex-wrap:wrap!important;gap:8px!important;font-size:11px!important;line-height:1.2!important;color:var(--dashboard-text-muted)!important;}
html body [data-header-legend="overall-risk"] .chart-header-legend-item,html body [data-header-legend="realtime-alert-type"] .chart-header-legend-item,html body [data-header-legend="population-age"] .chart-header-legend-item,html body [data-header-legend="population-bmi"] .chart-header-legend-item{display:inline-flex!important;align-items:center!important;gap:4px!important;font-size:11px!important;line-height:1.2!important;white-space:nowrap!important;}
html body [data-header-legend="overall-risk"] .chart-header-legend-dot,html body [data-header-legend="realtime-alert-type"] .chart-header-legend-dot,html body [data-header-legend="population-age"] .chart-header-legend-dot,html body [data-header-legend="population-bmi"] .chart-header-legend-dot{width:8px!important;height:8px!important;flex:0 0 8px!important;border-radius:50%!important;}

html.page-risk.page-risk body.page-risk.page-risk .risk-ai-grid{display:grid!important;grid-template-columns:1fr!important;gap:12px!important;}
html.page-risk.page-risk body.page-risk.page-risk .risk-ai-grid>li{display:flex!important;align-items:flex-start!important;gap:12px!important;line-height:24px!important;min-height:24px!important;}
html.page-risk.page-risk body.page-risk.page-risk .risk-ai-grid>li>span:first-child{width:24px!important;height:24px!important;min-width:24px!important;font-size:12px!important;}

html.page-realtime body.page-realtime .realtime-event-viewport{height:214px!important;overflow:hidden!important;}
html.page-realtime body.page-realtime .realtime-event-track{transition:transform .42s ease!important;will-change:transform;}
html.page-realtime body.page-realtime .realtime-event-track.is-sliding{transform:translateY(-43px)!important;}

.page-population .population-region-bars{gap:4px!important;}
.page-population #region-chart{height:250px!important;}

html.page-personal-service body.page-personal-service .personal-team-viewport{height:272px!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;gap:4px!important;}
html.page-personal-service body.page-personal-service .personal-team-track>.team-item{height:42px!important;min-height:42px!important;padding:5px 7px!important;box-sizing:border-box!important;}
html.page-personal-service body.page-personal-service .personal-team-track.is-sliding{transform:translateY(-46px)!important;transition:transform .42s ease!important;}
html.page-personal-service body.page-personal-service .personal-record-viewport{height:276px!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;gap:4px!important;}
html.page-personal-service body.page-personal-service .personal-record-track>.record-item{height:36px!important;min-height:36px!important;padding:4px 6px!important;box-sizing:border-box!important;}
html.page-personal-service body.page-personal-service .personal-record-track.is-sliding{transform:translateY(-40px)!important;transition:transform .42s ease!important;}
html.page-personal-service body.page-personal-service .personal-service-workload{gap:6px!important;margin-top:4px!important;}
html.page-personal-service.page-personal-service.page-personal-service.page-personal-service body.page-personal-service.page-personal-service.page-personal-service.page-personal-service #serviceTrend,html.page-personal-service.page-personal-service.page-personal-service.page-personal-service body.page-personal-service.page-personal-service.page-personal-service.page-personal-service #satisfactionChart{transform:translateY(8px)!important;}

html.page-overview.page-overview.page-overview.page-overview body.page-overview.page-overview.page-overview.page-overview #mapChart{transform:translateY(-10px)!important;}
html.page-overview.page-overview.page-overview.page-overview body.page-overview.page-overview.page-overview.page-overview #statusChart,html.page-medical.page-medical.page-medical.page-medical body.page-medical.page-medical.page-medical.page-medical #donutChart{width:140px!important;height:140px!important;max-width:140px!important;max-height:140px!important;}
html.page-overview body.page-overview .overview-warning-viewport{height:212px!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;gap:4px!important;}
html.page-overview body.page-overview .overview-warning-viewport>.warning-item{height:32px!important;min-height:32px!important;padding:4px 7px!important;box-sizing:border-box!important;}
html.page-overview body.page-overview .overview-warning-list.is-sliding{transform:translateY(-36px)!important;transition:transform .42s ease!important;}

html.page-medical body.page-medical .medical-coverage-track{height:216px!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;gap:4px!important;}
html.page-medical body.page-medical .medical-coverage-track>.coverage-stat{height:40px!important;min-height:40px!important;margin:0!important;box-sizing:border-box!important;}
html.page-medical body.page-medical .medical-coverage-track.is-sliding{transform:translateY(-44px)!important;transition:transform .42s ease!important;}

.page-intervention.page-intervention.page-intervention.page-intervention .intervention-type-content{transform:translateY(8px)!important;}
html.page-individual-vitals body.page-individual-vitals .vitals-warning-carousel{gap:7px!important;}
html.page-individual-vitals body.page-individual-vitals .vitals-warning-carousel.is-sliding{animation:none!important;transform:translateY(-55px)!important;transition:transform .42s ease!important;}

html.page-intervention.page-intervention body.page-intervention.page-intervention .scale-wrapper>.w-full{
  grid-template-rows:74px 171px 739px!important;
}
html.page-intervention.page-intervention body.page-intervention.page-intervention .intervention-effect-content.responsive-metric-grid>*{
  height:92px!important;
  min-height:92px!important;
  flex:0 0 calc(50% - 6px)!important;
}

/* tv-browser-fixes-round-eight-2026-08-16 */
html.page-risk.page-risk.page-risk body.page-risk.page-risk.page-risk .dashboard-container.page-risk{
  grid-template-rows:74px 254px 323px minmax(0,1fr)!important;
  grid-template-columns:minmax(0,1.15fr) minmax(0,1.20fr) minmax(0,.85fr)!important;
}
html.page-risk.page-risk.page-risk body.page-risk.page-risk.page-risk .dashboard-container.page-risk>:nth-child(2){
  grid-template-columns:minmax(0,1.2fr) minmax(0,1.15fr) minmax(0,1.65fr)!important;
}
html.page-risk.page-risk.page-risk body.page-risk.page-risk.page-risk .dashboard-container.page-risk>:nth-child(3){
  grid-template-columns:minmax(0,1.7fr) minmax(0,1.25fr) minmax(0,.75fr)!important;
}

html.page-realtime.page-realtime.page-realtime body.page-realtime.page-realtime.page-realtime .realtime-device-list{
  gap:0!important;
}
html.page-realtime.page-realtime.page-realtime body.page-realtime.page-realtime.page-realtime .realtime-device-list>*+*{
  margin-top:8px!important;
}
html.page-realtime.page-realtime.page-realtime body.page-realtime.page-realtime.page-realtime .realtime-top-grid>.vital-card{
  border:1px solid var(--dashboard-border)!important;
  border-radius:12px!important;
  background:var(--dashboard-card)!important;
  padding:16px!important;
  box-shadow:none!important;
}
html.page-realtime.page-realtime.page-realtime body.page-realtime.page-realtime.page-realtime .vital-card>.flex.items-baseline>:first-child{
  font-size:24px!important;
  line-height:1.3!important;
}
html.page-realtime.page-realtime.page-realtime body.page-realtime.page-realtime.page-realtime .realtime-vital-footer{
  margin-top:auto!important;
  padding-top:12px!important;
  border-top:1px solid var(--dashboard-border)!important;
}

html.page-population.page-population.page-population body.page-population.page-population.page-population .dashboard-grid{
  grid-template-rows:308px 252px minmax(0,1fr)!important;
}
html.page-population.page-population.page-population body.page-population.page-population.page-population .dashboard-grid>.pop-top-2{
  grid-column:1!important;
  grid-row:2!important;
}
html.page-population.page-population.page-population body.page-population.page-population.page-population .dashboard-grid>.population-health-indicator-card{
  grid-column:2!important;
  grid-row:1!important;
}

html.page-personal-service.page-personal-service.page-personal-service body.page-personal-service.page-personal-service.page-personal-service .personal-appointment-stack{
  grid-column:3!important;
  grid-row:4/span 4!important;
  min-height:0!important;
}

html.page-operations.page-operations.page-operations body.page-operations.page-operations.page-operations .operations-roi-card .space-y-2>*+*{
  margin-top:5px!important;
}
html.page-operations.page-operations.page-operations body.page-operations.page-operations.page-operations .operations-roi-card .border-t{
  padding-top:5px!important;
}

/* round-seven final specificity guard for legacy realtime rules */
html.page-realtime.page-realtime.page-realtime body.page-realtime.page-realtime.page-realtime .dashboard-container.page-realtime{
  grid-template-rows:74px 180px 275px 399px!important;
}

/* tv-browser-fixes-round-seven-2026-08-16 */
html.page-body-twin.page-body-twin body.page-body-twin.page-body-twin .body-twin-side-stack{
  gap:0!important;
}
html.page-body-twin.page-body-twin body.page-body-twin.page-body-twin .body-twin-side-stack>.system-card+.system-card{
  margin-top:24px!important;
}

html.page-energy.page-energy body.page-energy.page-energy .dashboard-container.page-energy{
  grid-template-rows:74px 130px 356px 356px!important;
}

html.page-executive.page-executive body.page-executive.page-executive .dashboard-container.page-executive{
  grid-template-rows:74px 658px 150px!important;
}
html.page-executive.page-executive body.page-executive.page-executive .dashboard-container.page-executive .executive-main-grid{
  grid-template-rows:422px 220px!important;
  height:658px!important;
}
html.page-executive.page-executive body.page-executive.page-executive .dashboard-container.page-executive .executive-main-grid>.wang-card{
  grid-template-rows:334px 308px!important;
  height:658px!important;
}

html.page-family.page-family body.page-family.page-family .dashboard-container.page-family{
  grid-template-rows:74px 284px 370px minmax(0,1fr)!important;
}

html.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals .dashboard-container.page-individual-vitals{
  grid-template-rows:74px 117px 319px 225px 165px!important;
}
html.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals .dashboard-container.page-individual-vitals .vitals-monitoring-card{
  height:165px!important;
}
html.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals .vitals-monitoring-card .stat-item{
  min-height:57px!important;
}

html.page-medical.page-medical body.page-medical.page-medical .medical-map-card #mapChart{
  transform:translateY(30px)!important;
}
html.page-medical.page-medical body.page-medical.page-medical .medical-map-card .medical-region-legend{
  justify-content:flex-start!important;
  justify-items:start!important;
  grid-template-columns:repeat(5,max-content)!important;
  width:100%!important;
}

html.page-overview.page-overview body.page-overview.page-overview .overview-middle-grid #mapChart{
  transform:translateY(30px)!important;
}

html.page-personal-service.page-personal-service body.page-personal-service.page-personal-service .dashboard-container.page-personal-service .team-list,
html.page-personal-service.page-personal-service body.page-personal-service.page-personal-service .dashboard-container.page-personal-service .record-list{
  gap:0!important;
}
html.page-personal-service.page-personal-service body.page-personal-service.page-personal-service .dashboard-container.page-personal-service .team-item+.team-item,
html.page-personal-service.page-personal-service body.page-personal-service.page-personal-service .dashboard-container.page-personal-service .record-item+.record-item{
  margin-top:8px!important;
}

html.page-population.page-population body.page-population.page-population .dashboard-container.page-population #china-map{
  transform:translate(-28px,94px)!important;
}
html.page-population.page-population body.page-population.page-population .dashboard-container.page-population #tags-cloud{
  width:68%!important;
  height:72%!important;
}

html.page-realtime.page-realtime body.page-realtime.page-realtime .dashboard-container.page-realtime{
  grid-template-rows:74px 180px 275px 399px!important;
}
html.page-realtime.page-realtime body.page-realtime.page-realtime .dashboard-container.page-realtime{
  grid-template-rows:74px 150px 250px 363px!important;
}
html.page-risk body.page-risk .dashboard-container.page-risk .risk-trend-card.risk-equal-row{
  grid-template-columns:minmax(0,1fr)!important;
}
html.page-risk body.page-risk .dashboard-container.page-risk .risk-trend-card.risk-equal-row>.risk-chronic-trend-content,
html.page-risk body.page-risk .dashboard-container.page-risk .risk-trend-card.risk-equal-row>#risk-trend{
  grid-column:1!important;
}

/* tv-browser-fixes-round-six-2026-08-16 */
html.page-chronic-risk body.page-chronic-risk .chronic-risk-overview-card>#gaugeChart{
  width:230px!important;
  height:230px!important;
  min-width:230px!important;
  min-height:230px!important;
  max-width:230px!important;
  max-height:230px!important;
  flex:0 0 230px!important;
  align-self:center!important;
  position:relative!important;
}
html.page-chronic-risk body.page-chronic-risk .chronic-risk-overview-card>#gaugeChart>div,
html.page-chronic-risk body.page-chronic-risk .chronic-risk-overview-card>#gaugeChart canvas{
  position:absolute!important;
  inset:0!important;
}

/* chronic-risk overview content is centered as one visual group. */
html.page-chronic-risk body.page-chronic-risk .chronic-risk-overview-card{
  justify-content:center!important;
}
html.page-chronic-risk body.page-chronic-risk .chronic-risk-overview-card > .grid{
  transform:none!important;
}

html.page-executive body.page-executive .score-card .score-ring{
  width:216px!important;
  height:216px!important;
  min-width:216px!important;
  min-height:216px!important;
  max-width:216px!important;
  max-height:216px!important;
  flex:0 0 216px!important;
  position:relative!important;
  overflow:visible!important;
}
html.page-executive body.page-executive .score-card .score-ring svg{
  position:static!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  transform:rotate(-90deg)!important;
  transform-origin:center center!important;
}
html.page-executive body.page-executive .risk-card>.flex.flex-wrap{
  display:flex!important;
  flex-wrap:wrap!important;
  row-gap:12px!important;
  column-gap:12px!important;
  margin-right:-12px!important;
  margin-bottom:-12px!important;
}
html.page-executive body.page-executive .risk-card>.flex.flex-wrap>span{
  margin-right:12px!important;
  margin-bottom:12px!important;
}
@supports (gap:12px){
  html.page-executive body.page-executive .risk-card>.flex.flex-wrap>span{
    margin-right:0!important;
    margin-bottom:0!important;
  }
}

html.page-personal-service body.page-personal-service .team-list,
html.page-personal-service body.page-personal-service .record-list{
  gap:0!important;
}
html.page-personal-service body.page-personal-service .team-item+.team-item,
html.page-personal-service body.page-personal-service .record-item+.record-item{
  margin-top:7px!important;
}
html.page-personal-service body.page-personal-service .personal-annual-exam-record>:first-child,
html.page-personal-service body.page-personal-service .personal-online-consultation>:first-child{
  width:44px!important;
  height:44px!important;
  flex:0 0 44px!important;
}
html.page-personal-service body.page-personal-service .personal-annual-exam-record>:first-child svg,
html.page-personal-service body.page-personal-service .personal-online-consultation>:first-child svg{
  width:20px!important;
  height:20px!important;
}

html.page-population.page-population body.page-population.page-population #china-map{
  transform:translate(-28px,58px)!important;
}
html.page-risk body.page-risk .risk-model-performance-card .risk-performance-metrics{
  margin-top:20px!important;
  margin-bottom:auto!important;
}
html.page-risk body.page-risk .risk-performance-metrics{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
  width:100%!important;
  margin-top:auto!important;
  margin-bottom:auto!important;
}

/* TV Bro ignores flex gap on some older Chromium builds. */
html.page-personal-service.page-personal-service body.page-personal-service.page-personal-service .dashboard-container.page-personal-service .team-list,
html.page-personal-service.page-personal-service body.page-personal-service.page-personal-service .dashboard-container.page-personal-service .record-list{
  gap:0!important;
}
html.page-risk body.page-risk .risk-performance-pair{
  border:0!important;
  background:var(--dashboard-surface)!important;
  border-radius:8px!important;
  padding:12px!important;
  text-align:center!important;
  align-items:center!important;
  justify-content:center!important;
}

html.page-population body.page-population .dashboard-container.page-population{
  grid-template-rows:74px minmax(0,1fr)!important;
}
html.page-population body.page-population .dashboard-grid{
  display:grid!important;
  grid-template-columns:1fr 1fr 2fr!important;
  grid-template-rows:280px 280px minmax(0,1fr)!important;
  grid-auto-flow:row!important;
  gap:16px!important;
}
html.page-population body.page-population .pop-top-1{grid-column:1!important;grid-row:1!important;height:auto!important;}
html.page-population body.page-population .pop-top-2{grid-column:2!important;grid-row:1!important;height:auto!important;}
html.page-population body.page-population .pop-top-3{grid-column:3!important;grid-row:1/span 2!important;height:auto!important;}
html.page-population body.page-population .dashboard-grid>:nth-child(4){grid-column:1!important;grid-row:2!important;}
html.page-population body.page-population .dashboard-grid>:nth-child(6){grid-column:2!important;grid-row:2!important;}
html.page-population body.page-population .dashboard-grid>:nth-child(5){grid-column:1/span 2!important;grid-row:3!important;}
html.page-population body.page-population .dashboard-grid>:nth-child(7){grid-column:3!important;grid-row:3!important;}
html.page-population body.page-population #age-chart{
  width:100%!important;
  height:165px!important;
  min-height:0!important;
}
html.page-population body.page-population #china-map{
  transform:translate(-28px,22px)!important;
}
html.page-population body.page-population #tags-cloud{
  position:relative!important;
  display:block!important;
  width:74%!important;
  height:78%!important;
  margin:4px auto 0!important;
  overflow:visible!important;
}

html.page-personal-service body.page-personal-service .dashboard-container.page-personal-service{
  grid-template-columns:minmax(0,4fr) minmax(0,5fr) minmax(0,5fr)!important;
  grid-template-rows:74px repeat(6,minmax(0,1fr))!important;
  gap:16px!important;
}
html.page-personal-service body.page-personal-service .personal-team-card{
  grid-column:1!important;
  grid-row:2/span 3!important;
}
html.page-personal-service body.page-personal-service .personal-records-card{
  grid-column:1!important;
  grid-row:5/span 3!important;
}
html.page-personal-service body.page-personal-service .personal-service-data-row>:first-child{
  grid-column:2!important;
  grid-row:2/span 2!important;
}
html.page-personal-service body.page-personal-service .personal-service-type-card{
  grid-column:3!important;
  grid-row:2/span 2!important;
}
html.page-personal-service body.page-personal-service .personal-service-lower-grid>:first-child{
  grid-column:2!important;
  grid-row:4/span 2!important;
}
html.page-personal-service body.page-personal-service .personal-service-lower-grid>:last-child{
  grid-column:2!important;
  grid-row:6/span 2!important;
}
html.page-personal-service body.page-personal-service .personal-appointment-stack{
  grid-column:3!important;
  grid-row:4/span 2!important;
  min-height:0!important;
}

html.page-operations body.page-operations .operations-container{
  display:grid!important;
  grid-template-columns:repeat(14,minmax(0,1fr))!important;
  grid-template-rows:74px 230px 330px 330px!important;
  gap:16px!important;
}
html.page-operations body.page-operations .operations-container>:nth-child(1){grid-column:1/-1!important;grid-row:1!important;}
html.page-operations body.page-operations .top-grid,
html.page-operations body.page-operations .operations-service-cost-row,
html.page-operations body.page-operations .operations-age-gender-row{display:contents!important;}
html.page-operations body.page-operations .top-grid>:nth-child(1){grid-column:1/span 3!important;grid-row:2!important;}
html.page-operations body.page-operations .top-grid>:nth-child(2){grid-column:4/span 3!important;grid-row:2!important;}
html.page-operations body.page-operations .top-grid>:nth-child(3){grid-column:7/span 4!important;grid-row:2!important;}
html.page-operations body.page-operations .operations-roi-card{grid-column:11/span 4!important;grid-row:2!important;}
html.page-operations body.page-operations .operations-service-card{grid-column:1/span 4!important;grid-row:3!important;}
html.page-operations body.page-operations .operations-cost-card{grid-column:5/span 6!important;grid-row:3!important;}
html.page-operations body.page-operations .operations-gender-card{grid-column:1/span 4!important;grid-row:4!important;}
html.page-operations body.page-operations .operations-age-card{grid-column:5/span 6!important;grid-row:4!important;}
html.page-operations body.page-operations .operations-service-channel-card{
  grid-column:11/span 4!important;
  grid-row:3/span 2!important;
  width:100%!important;
}

html.page-medical body.page-medical .scale-wrapper .medical-row-layout{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) 560px!important;
  gap:16px!important;
}

html.page-population body.page-population .dashboard-grid>.pop-top-2{
  height:100%!important;
  min-height:0!important;
  align-self:stretch!important;
}
html.page-operations body.page-operations .operations-age-gender-row>.operations-service-channel-card{
  justify-self:stretch!important;
  width:auto!important;
  max-width:none!important;
}

/* tv-three-page-layout-round-five-2026-08-15 */
html.page-realtime.page-realtime body.page-realtime.page-realtime .dashboard-container.page-realtime{
  grid-template-rows:74px 150px 250px 363px!important;
}
html.page-risk body.page-risk .dashboard-container.page-risk .risk-trend-card.risk-equal-row{
  grid-template-columns:minmax(0,1fr)!important;
}
html.page-risk body.page-risk .dashboard-container.page-risk .risk-trend-card.risk-equal-row>.risk-chronic-trend-content,
html.page-risk body.page-risk .dashboard-container.page-risk .risk-trend-card.risk-equal-row>#risk-trend{
  grid-column:1!important;
}
html.page-personal-service body.page-personal-service .personal-appointment-stack{
  grid-column:3!important;
  grid-row:4/span 4!important;
  min-height:0!important;
}
html.page-realtime body.page-realtime .dashboard-container.page-realtime{
  grid-template-rows:74px 150px 250px 363px!important;
}
html.page-risk body.page-risk .risk-trend-card{
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  padding:16px!important;
}
html.page-risk body.page-risk .risk-chronic-trend-content{
  margin-bottom:8px!important;
}
html.page-risk body.page-risk .risk-chronic-trend-content>.mt-2\.5{
  margin-top:10px!important;
}
html.page-risk body.page-risk .risk-trend-card #risk-trend{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
}

/* individual-vitals-stat-height-tail-2026-08-18 */
html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals .dashboard-container.page-individual-vitals .vitals-monitoring-card .stat-grid>.stat-item{
  min-height:74px!important;
  height:74px!important;
  max-height:74px!important;
}

/* carousel-viewport-containment-tail-2026-08-19 */
.page-energy .energy-recommendation-card,.page-risk .risk-high-list-card,.page-realtime .realtime-event-card,.page-personal-service .personal-team-card,.page-personal-service .personal-records-card,.page-overview .overview-warning-card,.page-medical .coverage-card{display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important;}
.page-energy .energy-recommendation-card>:first-child,.page-risk .risk-high-list-card>:first-child,.page-realtime .realtime-event-card>:first-child,.page-personal-service .personal-team-card>.card-title,.page-personal-service .personal-records-card>.card-title,.page-overview .overview-warning-card>:first-child,.page-medical .coverage-card>.card-header,.page-medical .coverage-card>.medical-coverage-summary{flex:0 0 auto!important;position:relative!important;z-index:2!important;}
.page-energy .energy-suggestion-viewport,.page-risk .risk-people-viewport,.page-realtime .realtime-event-viewport,.page-personal-service .personal-team-viewport,.page-personal-service .personal-record-viewport,.page-overview .overview-warning-viewport,.page-medical .medical-coverage-viewport{flex:1 1 auto!important;height:auto!important;max-height:none!important;min-height:0!important;overflow:hidden!important;position:relative!important;z-index:1!important;}
.page-personal-service .personal-team-track,.page-personal-service .personal-record-track,.page-overview .overview-warning-list,.page-medical .medical-coverage-track{display:flex!important;flex-direction:column!important;height:auto!important;overflow:visible!important;}
.page-personal-service .personal-team-track{gap:2px!important;}.page-personal-service .personal-team-track>.team-item{height:32px!important;min-height:32px!important;margin:0!important;padding:3px 6px!important;box-sizing:border-box!important;}
.page-personal-service .personal-record-track{gap:7px!important;}.page-personal-service .personal-record-track>.record-item{height:48px!important;min-height:48px!important;margin:0!important;padding:5px 7px!important;box-sizing:border-box!important;}
.page-overview .overview-warning-list{gap:7px!important;}.page-overview .overview-warning-list>.warning-item{display:flex!important;width:100%!important;height:48px!important;min-height:48px!important;margin:0!important;padding:5px 8px!important;box-sizing:border-box!important;}
.page-medical .medical-coverage-track{gap:7px!important;}.page-medical .medical-coverage-track>.coverage-stat{height:48px!important;min-height:48px!important;max-height:48px!important;margin:0!important;padding:6px 8px!important;box-sizing:border-box!important;}
[data-dashboard-carousel].is-sliding{animation:none!important;transform:translateY(calc(-1 * var(--dashboard-carousel-step,60px)))!important;transition:transform .42s ease!important;}

/* backup-record-style-tail-2026-08-19 */
.page-realtime .event-table table{line-height:1.4!important;}
.page-realtime .event-table .realtime-event-track>tr{height:auto!important;min-height:0!important;}
.page-realtime .event-table th,.page-realtime .event-table td{padding-top:9px!important;padding-bottom:9px!important;}
.page-realtime .realtime-event-track{--dashboard-carousel-step:38px;}
.page-personal-service .personal-team-track{gap:1.1rem!important;--dashboard-carousel-step:97px;}
.page-personal-service .personal-team-track>.team-item{height:auto!important;min-height:0!important;padding:1.1rem!important;gap:.625rem!important;border-radius:12px!important;}
.page-personal-service .personal-team-track .team-avatar{width:2.75rem!important;height:2.75rem!important;}
.page-personal-service .personal-record-track{gap:1.1rem!important;--dashboard-carousel-step:93px;}
.page-personal-service .personal-record-track>.record-item{height:auto!important;min-height:0!important;padding:1.1rem!important;gap:.625rem!important;border-radius:12px!important;}
.page-personal-service .personal-record-track .record-icon{width:2.5rem!important;height:2.5rem!important;}
.page-family .family-plan-status{margin-left:8px!important;vertical-align:middle!important;}
.page-family .family-plan-viewport .plan-business-list.is-sliding{animation:chronic-priority-slide-up .42s ease both!important;}

/* four-page-objective-scroll-tail-2026-08-19 */
.page-individual-vitals .kpi-grid>*{overflow:hidden!important;}
.page-individual-vitals .kpi-grid>*>:last-child{height:30px!important;min-height:30px!important;padding-top:4px!important;overflow:hidden!important;}
.page-individual-vitals .kpi-grid .sparkline{width:72px!important;height:22px!important;min-height:22px!important;max-height:22px!important;flex:0 1 72px!important;overflow:hidden!important;}
.page-individual-vitals .kpi-grid .sparkline>div,.page-individual-vitals .kpi-grid .sparkline canvas{height:22px!important;max-height:22px!important;}
.page-chronic-risk .ai-banner{overflow:hidden!important;}
.page-chronic-risk .chronic-risk-advice-viewport{flex:1 1 auto!important;height:26px!important;min-width:0!important;overflow:hidden!important;}
.page-chronic-risk .chronic-risk-advice-track{display:flex!important;flex-direction:column!important;gap:0!important;--dashboard-carousel-step:26px;}
.page-chronic-risk .chronic-risk-advice-track>.ai-text{height:26px!important;min-height:26px!important;line-height:26px!important;margin:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}

/* tv960-layout-motion-tail-2026-08-19 */
html.page-risk body.page-risk .risk-high-list-card,
html.page-realtime body.page-realtime .realtime-event-card{
  isolation:isolate!important;
  overflow:hidden!important;
}
html.page-risk body.page-risk .risk-people-viewport,
html.page-realtime body.page-realtime .realtime-event-viewport{
  position:relative!important;
  overflow:hidden!important;
  contain:paint;
  isolation:isolate!important;
}
html.page-risk body.page-risk .risk-people-table-head,
html.page-realtime body.page-realtime .realtime-event-table-head{
  position:sticky!important;
  top:0!important;
  z-index:4!important;
  background:#122040!important;
}
html.page-risk body.page-risk .risk-people-table-head th,
html.page-realtime body.page-realtime .realtime-event-table-head th{
  position:relative!important;
  z-index:4!important;
  background:#122040!important;
  box-shadow:0 1px 0 var(--dashboard-border)!important;
}
html.page-risk body.page-risk .risk-people-track,
html.page-realtime body.page-realtime .realtime-event-track{
  position:relative!important;
  z-index:1!important;
}

html.page-risk body.page-risk .risk-model-performance-card{
  display:flex!important;
  flex-direction:column!important;
}
html.page-risk body.page-risk .risk-performance-stack{
  display:flex!important;
  flex:1 1 auto!important;
  min-height:0!important;
  flex-direction:column;
  gap:12px!important;
}
html.page-risk body.page-risk .risk-performance-footer{
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  width:100%!important;
  margin-top:auto!important;
}
html.page-risk body.page-risk .risk-performance-footer .risk-performance-metrics{
  margin:0!important;
}
html.page-risk body.page-risk .risk-performance-coverage{
  width:100%!important;
  margin:0!important;
}

html.page-personal-service body.page-personal-service .personal-team-viewport{
  flex:0 0 380px!important;
  height:380px!important;
  max-height:380px!important;
  overflow:hidden!important;
}
html.page-personal-service body.page-personal-service .personal-team-track{
  gap:20px!important;
  --dashboard-carousel-step:100px;
}
html.page-personal-service body.page-personal-service .personal-team-track>.team-item{
  height:80px!important;
  min-height:80px!important;
  max-height:80px!important;
  padding:12px 14px!important;
  box-sizing:border-box!important;
}
html.page-personal-service body.page-personal-service .personal-workload-card{
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
}
html.page-personal-service body.page-personal-service .personal-workload-card>.personal-service-workload{
  display:flex!important;
  flex:1 1 auto!important;
  min-height:0!important;
  flex-direction:column!important;
}
html.page-personal-service body.page-personal-service .personal-workload-summary{
  flex:0 0 auto!important;
  min-height:66px!important;
  margin-top:auto!important;
  padding-top:8px!important;
}
html.page-personal-service body.page-personal-service .personal-workload-summary>div{
  min-height:66px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
}
html.page-personal-service body.page-personal-service .personal-appointment-stack{
  min-height:0!important;
}
html.page-personal-service body.page-personal-service .personal-appointment-stack>.appointment-card{
  display:flex!important;
  height:100%!important;
  min-height:0!important;
  flex-direction:column!important;
}
html.page-personal-service body.page-personal-service .personal-appointment-records{
  display:grid!important;
  flex:1 1 auto!important;
  min-height:0!important;
  grid-template-rows:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
}
html.page-personal-service body.page-personal-service .personal-appointment-records>div{
  min-height:0!important;
  padding:10px!important;
  border-radius:10px!important;
  background:rgba(15,26,48,.72)!important;
}
html.page-personal-service body.page-personal-service .personal-appointment-records>div>:first-child{
  width:44px!important;
  height:44px!important;
  flex:0 0 44px!important;
}

html.page-population body.page-population #tags-cloud.population-drift-field{
  position:relative!important;
  display:block!important;
  overflow:hidden!important;
}
html.page-population body.page-population #tags-cloud>.population-backup-tag.population-leaf-drift{
  position:absolute!important;
  margin:0!important;
  animation:population-leaf-drift var(--leaf-duration,11s) ease-in-out var(--leaf-delay,0s) infinite!important;
  transform:translate3d(0,0,0) rotate(0deg)!important;
  transform-origin:center!important;
  will-change:transform;
}
@keyframes population-leaf-drift{
  0%,100%{transform:translate3d(0,0,0) rotate(0deg)}
  32%{transform:translate3d(var(--leaf-x1),var(--leaf-y1),0) rotate(var(--leaf-r1))}
  68%{transform:translate3d(var(--leaf-x2),var(--leaf-y2),0) rotate(var(--leaf-r2))}
}
@media (prefers-reduced-motion:reduce){
  html.page-population body.page-population #tags-cloud>.population-backup-tag.population-leaf-drift{animation:none!important;}
}
.page-family .family-archive-card{display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important;}
.page-family .family-risk-progress-pane{display:flex!important;flex:1 1 auto!important;flex-direction:column!important;min-height:0!important;}
.page-family .family-archive-summary{margin-top:auto!important;flex:0 0 auto!important;}

/* medical-intervention-tv960-tail-2026-08-19 */
html.page-medical body.page-medical .medical-map-card{
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  min-height:0!important;
  overflow:hidden!important;
}
html.page-medical body.page-medical .medical-map-viewport{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  position:relative!important;
}
html.page-medical body.page-medical .medical-map-card #mapChart{
  width:100%!important;
  height:calc(100% - 16px)!important;
  min-height:0!important;
  transform:translateY(14px)!important;
  transform-origin:center center!important;
}
html.page-medical body.page-medical .medical-coverage-summary{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  width:100%!important;
  height:48px!important;
  min-height:48px!important;
  max-height:48px!important;
  margin:7px 0 0!important;
  padding:6px 8px!important;
  box-sizing:border-box!important;
}
html.page-medical body.page-medical .medical-coverage-summary-copy{
  min-width:0!important;
  flex:1 1 auto!important;
}
html.page-medical body.page-medical .medical-coverage-summary-value-row{
  display:flex!important;
  align-items:baseline!important;
  gap:12px!important;
  min-width:0!important;
  white-space:nowrap!important;
}
html.page-medical body.page-medical .medical-coverage-summary-value{
  line-height:18px!important;
}
html.page-medical body.page-medical .medical-coverage-summary-change{
  flex:0 0 auto!important;
}
html.page-intervention body.page-intervention .intervention-type-card > .intervention-type-content{
  transform:translateY(14px)!important;
}

/* individual-vitals-row-balance-tail-2026-08-19 */
html.page-individual-vitals body.page-individual-vitals .dashboard-container.page-individual-vitals{
  grid-template-rows:74px 117px 319px 255px 165px!important;
  row-gap:16px!important;
  column-gap:16px!important;
}
html.page-individual-vitals body.page-individual-vitals .middle-grid,
html.page-individual-vitals body.page-individual-vitals .vitals-third-row{
  height:100%!important;
  min-height:0!important;
  align-items:stretch!important;
  row-gap:16px!important;
  column-gap:16px!important;
}
html.page-individual-vitals body.page-individual-vitals .middle-grid>.card,
html.page-individual-vitals body.page-individual-vitals .vitals-third-row>.card{
  height:100%!important;
  min-height:0!important;
  align-self:stretch!important;
  box-sizing:border-box!important;
}

/* individual-vitals-row-visibility-tail-2026-08-19 */
html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals .dashboard-container.page-individual-vitals{
  grid-template-rows:74px 117px 319px 275px 195px!important;
  row-gap:16px!important;
  column-gap:16px!important;
}
html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals .dashboard-container.page-individual-vitals .middle-grid,
html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals .dashboard-container.page-individual-vitals .vitals-third-row,
html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals .dashboard-container.page-individual-vitals .vitals-second-row{
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  align-items:stretch!important;
}
html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals .dashboard-container.page-individual-vitals .middle-grid>.card,
html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals .dashboard-container.page-individual-vitals .vitals-third-row>.card,
html.page-individual-vitals.page-individual-vitals.page-individual-vitals body.page-individual-vitals.page-individual-vitals.page-individual-vitals .dashboard-container.page-individual-vitals .vitals-second-row>.card{
  height:100%!important;
  min-height:0!important;
  align-self:stretch!important;
  box-sizing:border-box!important;
}
html.page-individual-vitals body.page-individual-vitals .kpi-grid>*>:last-child{
  height:36px!important;
  min-height:36px!important;
  padding-top:3px!important;
  overflow:visible!important;
}
html.page-individual-vitals body.page-individual-vitals .kpi-grid .sparkline{
  width:76px!important;
  height:28px!important;
  min-height:28px!important;
  max-height:28px!important;
  flex:0 1 76px!important;
  overflow:visible!important;
}
html.page-individual-vitals body.page-individual-vitals .kpi-grid .sparkline>div,
html.page-individual-vitals body.page-individual-vitals .kpi-grid .sparkline canvas{
  height:28px!important;
  max-height:28px!important;
  overflow:visible!important;
}
html.page-individual-vitals body.page-individual-vitals .health-score-card>.card-body{
  overflow:visible!important;
}
html.page-individual-vitals body.page-individual-vitals .health-score-distribution-content{
  width:100%!important;
  max-width:100%!important;
  min-height:0!important;
  gap:12px!important;
  overflow:visible!important;
}
html.page-individual-vitals body.page-individual-vitals .health-score-distribution-content .split-chart-wrap{
  flex:0 0 220px!important;
  width:220px!important;
  min-width:220px!important;
  max-width:220px!important;
  height:145px!important;
  min-height:145px!important;
  max-height:145px!important;
  overflow:visible!important;
}
html.page-individual-vitals body.page-individual-vitals .health-score-distribution-content #healthScoreChart{
  width:220px!important;
  min-width:220px!important;
  max-width:220px!important;
  height:145px!important;
  min-height:145px!important;
  max-height:145px!important;
  overflow:visible!important;
}

/* realtime-alert-scroll-stability-2026-08-19 */
html.page-realtime body.page-realtime .realtime-event-viewport{
  height:230px!important;
  overflow:hidden!important;
}
html.page-realtime body.page-realtime .realtime-event-track{
  --dashboard-carousel-step:55px!important;
  display:block!important;
  position:relative!important;
  width:100%!important;
  transition:transform .42s ease!important;
  will-change:transform!important;
  transform:translateY(0);
}
html.page-realtime body.page-realtime .realtime-event-track>tr{
  height:55px!important;
  min-height:55px!important;
  max-height:55px!important;
  display:table-row!important;
}
html.page-realtime body.page-realtime .event-table table{
  width:100%!important;
  table-layout:fixed!important;
  border-collapse:collapse!important;
}
html.page-realtime body.page-realtime .realtime-event-table-head{
  position:sticky!important;
  top:0!important;
  z-index:4!important;
}
html.page-realtime body.page-realtime .realtime-event-table-head th{
  position:relative!important;
  z-index:4!important;
  white-space:nowrap!important;
}
html.page-realtime body.page-realtime .event-table .realtime-event-track>tr{
  display:table-row!important;
}
html.page-realtime body.page-realtime .realtime-event-track.is-sliding{
  transform:translateY(-55px)!important;
}
/* realtime-alert-scroll-fix-2026-08-20 */
html.page-realtime body.page-realtime .realtime-event-card{
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
html.page-realtime body.page-realtime .realtime-event-card > div:first-child{
  flex:0 0 auto!important;
  position:relative!important;
  z-index:3!important;
}
html.page-realtime body.page-realtime .realtime-event-card .realtime-event-viewport{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow:hidden!important;
  display:block!important;
}
html.page-realtime body.page-realtime .realtime-event-card .realtime-event-table-head{
  position:relative!important;
  top:auto!important;
  z-index:2!important;
}
html.page-realtime body.page-realtime .realtime-event-card .realtime-event-table-head th{
  z-index:2!important;
  background:#122040!important;
}
html.page-realtime body.page-realtime .realtime-event-card .event-table .realtime-event-track>tr{
  display:table-row!important;
}
html.page-realtime body.page-realtime .realtime-event-card .event-table{
  display:block!important;
  width:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}
html.page-realtime body.page-realtime .realtime-event-card .event-table table{
  display:block!important;
  width:100%!important;
  min-width:100%!important;
  table-layout:fixed!important;
}
html.page-realtime body.page-realtime .realtime-event-card .event-table thead,
html.page-realtime body.page-realtime .realtime-event-card .event-table tbody{
  display:table!important;
  width:100%!important;
}
html.page-realtime body.page-realtime .realtime-event-card .realtime-event-track{
  will-change:transform!important;
  transform:translateY(0);
}
html.page-realtime body.page-realtime .realtime-event-card .realtime-event-track.is-sliding{
  transform:translateY(calc(-1 * var(--dashboard-carousel-step,55px)) )!important;
}
