/* Dashboard layout owner. Legacy compatibility is scoped here; never styles the banner or backend. */
body.dashboard-experience {
  --dash-gutter: 24px;
  --dash-gap: 24px;
  --dash-line: #e2e5e8;
  --dash-yellow: #fff3b0;
  --dash-ink: #262633;
  --dash-muted: #606573;
  --dash-teal: #177b83;
  --t-xs: 12px; --t-sm: 14px; --t-md: 16px; --t-lg: 20px; --t-xl: 24px;
  --fw-body: 400; --fw-note: 400; --fw-strong: 700; --fw-black: 800;
  background: #fff; color: var(--dash-ink);
  font: 400 16px/1.55 system-ui, -apple-system, "Segoe UI", "Microsoft JhengHei", sans-serif;
  letter-spacing: 0;
}
body.dashboard-experience :is(#dashboard, #ntpcDashboard) {
  width: 100% !important; max-width: 1560px !important; margin: 0 auto !important;
  padding: 20px var(--dash-gutter) 40px !important;
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: #fff !important;
}
body.dashboard-experience :is(#dashboard, #ntpcDashboard) * { min-width: 0; box-sizing: border-box; letter-spacing: 0; }
body.dashboard-experience .footer-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 24px; }
body.dashboard-experience .footer-column { min-width: 0; overflow-wrap: break-word; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(h2, h3, h4, p, label) { word-break: normal; overflow-wrap: break-word; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(h2, h3, h4) { line-height: 1.4; text-wrap: pretty; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) h2 { font-size: 20px !important; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(h3, h4) { font-size: 17px !important; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.chart-smart-note, .area-title-note, .map-card-note) {
  margin: 4px 0; font-size: 13px !important; font-weight: 400 !important; line-height: 1.5; color: var(--dash-muted);
}
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.dashboard-area, .dashboard-panel, .ntpc-panel, .ntpc-mini-card,
  .traffic-cause-card, .traffic-time-card, .population-care-card, .population-care-grid, .ntpc-shell,
  .youbike-overview, .youbike-supply-layout, .youbike-supply-main, .youbike-supply-side, .ntpc-district-layout, .ntpc-side-cards) {
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important;
  padding: 0 !important; min-height: 0 !important; height: auto;
}
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.dashboard-area, .ntpc-shell, .dashboard-module-grid) { width: 100% !important; margin: 0 !important; gap: var(--dash-gap); }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.dashboard-section-heading, .ntpc-data-heading) {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
  height: auto !important; min-height: 48px !important; padding: 10px 12px !important; margin: 0 0 16px;
  background: var(--dash-yellow) !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
}
body.dashboard-experience #dashboard :is(.dashboard-section-heading, .dashboard-section-title)::before,
body.dashboard-experience #dashboard .dashboard-section-heading::after { display: none; }
body.dashboard-experience #ntpcDashboard .ntpc-data-heading::before,
body.dashboard-experience #ntpcDashboard .ntpc-data-heading::after { display: none; }
body.dashboard-experience #dashboard .dashboard-section-title { margin: 0; padding: 0; min-height: 0; gap: 8px; }
body.dashboard-experience #dashboard .dashboard-section-title img { width: 28px; height: 28px; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.dashboard-section-title h2, .ntpc-data-heading h2) { margin: 0; font-size: 20px !important; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.dashboard-section-heading p, .ntpc-data-heading p) { margin: 0; font-size: 14px !important; }
body.dashboard-experience #dashboard .traffic-area > .area-header { padding: 0 !important; margin: 0 0 16px; gap: 16px; background: none; }
body.dashboard-experience #dashboard .traffic-summary-controls { align-items: start; gap: 12px; }
body.dashboard-experience #ntpcDashboard .ntpc-cause-control { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 12px; width: min(100%, 420px); align-items: center; }
body.dashboard-experience #ntpcDashboard .ntpc-cause-control > label { white-space: nowrap; }
body.dashboard-experience #ntpcDashboard .ntpc-cause-control > select { grid-column: 1 / -1; width: 100%; border-radius: 4px; }
body.dashboard-experience #ntpcDashboard .ntpc-cause-control > .chart-smart-note { margin: 0; }
body.dashboard-experience #dashboard #dataFreshness { display: grid; gap: 2px; padding: 0; margin: 0; font-size: 13px !important; line-height: 1.5; font-weight: 400; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) time { display: inline-block; white-space: nowrap; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.traffic-actual-range-highlight, .ntpc-period-range) {
  background: none; border: 0; padding: 0; color: var(--dash-teal); font-size: 13px !important; box-shadow: none; font-weight: 500;
}
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.dashboard-range-buttons, .ntpc-filter-tabs) {
  display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 4px; width: 100% !important;
}
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.dashboard-range-buttons, .ntpc-filter-tabs) button {
  min-height: 44px !important; padding: 8px 6px !important; font-size: 14px !important; white-space: nowrap;
  border-radius: 4px; font-weight: 600; box-shadow: none;
}
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.dashboard-range-buttons, .ntpc-filter-tabs) button.active {
  background: var(--dash-yellow) !important; border-color: #d6bd58 !important; color: var(--dash-ink) !important;
}
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(button, select, summary, [tabindex]):focus-visible { outline: 3px solid #216c9d; outline-offset: 3px; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(input, select) { max-width: 100%; font-size: 16px !important; min-height: 44px; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.ntpc-custom-range, .ntpc-safety-month-filter, .ntpc-child-safety-year-filter) { display: flex; flex-wrap: wrap; gap: 8px; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) [hidden], body.dashboard-experience [data-dashboard-legacy] { display: none !important; }
body.dashboard-experience #dashboard :is(.traffic-overview-grid, .traffic-time-layout, .population-care-grid) { gap: var(--dash-gap); align-items: stretch; }
body.dashboard-experience #dashboard .traffic-overview-grid > * { order: 0 !important; margin: 0; }
body.dashboard-experience #dashboard .traffic-map-panel { display: flex; flex-direction: column; gap: 12px; }
body.dashboard-experience #dashboard #mapCanvas { flex: 1; height: 420px !important; min-height: 360px !important; border-radius: 4px; }
body.dashboard-experience #dashboard #dashboardCards {
  display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 0; min-height: 80px;
  padding: 10px 0; border: 0; border-block: 1px solid var(--dash-line); background: #fffbea;
}
body.dashboard-experience #dashboard #dashboardCards .dashboard-v2-kpi {
  display: block !important; padding: 0 6px !important; min-height: 0; background: none !important;
  border: 0 !important; border-radius: 0; box-shadow: none; text-align: center;
}
body.dashboard-experience #dashboard #dashboardCards .dashboard-v2-kpi + .dashboard-v2-kpi { border-left: 1px solid var(--dash-line) !important; }
body.dashboard-experience #dashboard #dashboardCards .dashboard-kpi-icon { display: none; }
body.dashboard-experience #dashboard #dashboardCards span { font-size: 13px !important; font-weight: 500; white-space: nowrap; }
body.dashboard-experience #dashboard #dashboardCards strong { display: block; font-size: 24px !important; line-height: 1.5; white-space: nowrap; font-variant-numeric: tabular-nums; }
body.dashboard-experience #dashboard #dashboardCards strong small { font-size: 12px !important; padding-left: 2px; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.traffic-time-panel, .ntpc-trend-panel) { padding-top: 20px !important; margin-top: 24px; border-top: 1px solid var(--dash-line) !important; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.traffic-time-card-head strong, .ntpc-section-head h3) { font-size: 17px !important; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.panel-heading, .ntpc-panel-head, .ntpc-section-head) { margin-bottom: 12px; padding: 0; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.ntpc-mini-card, .ntpc-cause-panel-inline) .ntpc-section-head { display: block; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.traffic-cause-pie-wrap, .ntpc-cause-pie-wrap, .ntpc-child-safety-pie-wrap) {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; height: auto; min-height: 0;
  align-content: start; justify-items: center; padding: 0; overflow: visible !important;
}
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.traffic-cause-donut, .ntpc-interactive-donut) { width: 160px; height: 160px; max-width: 100%; margin: 8px auto; }
body.dashboard-experience .dashboard-chart-values { width: 100%; min-width: 0; text-align: left; }
body.dashboard-experience .dashboard-chart-readout { margin: 0; padding: 8px; min-height: 44px; background: #eef7f7; border: 0; color: #24505a; font-size: 13px !important; line-height: 1.5; font-weight: 600; }
body.dashboard-experience .dashboard-chart-value {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center;
  width: 100%; min-height: 44px; margin: 0; padding: 7px 4px; border: 0; border-bottom: 1px solid var(--dash-line);
  border-radius: 0; background: none; box-shadow: none; transform: none; color: var(--dash-ink); text-align: left; font: inherit; line-height: 1.4; cursor: pointer;
}
body.dashboard-experience .dashboard-chart-value i { width: 10px; height: 10px; border-radius: 2px; }
body.dashboard-experience .dashboard-chart-value span { font-size: 13px !important; font-weight: 500; overflow-wrap: break-word; }
body.dashboard-experience .dashboard-chart-value strong { grid-column: auto; font-size: 12px !important; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Legacy annual-bar spans must not split the clause label into three tracks. */
body.dashboard-experience #ntpcDashboard .ntpc-child-safety-pie-card .dashboard-chart-value > span { display: block; }
@media (min-width: 981px) {
  body.dashboard-experience #ntpcDashboard .ntpc-child-safety-grid { grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  body.dashboard-experience #ntpcDashboard .ntpc-child-safety-pie-card .dashboard-chart-value { grid-template-columns: 10px minmax(0, 1fr); gap: 4px 8px; align-items: start; }
  body.dashboard-experience #ntpcDashboard .ntpc-child-safety-pie-card .dashboard-chart-value > i { margin-top: 4px; }
  body.dashboard-experience #ntpcDashboard .ntpc-child-safety-pie-card .dashboard-chart-value > strong { grid-column: 2; justify-self: end; }
}
body.dashboard-experience .dashboard-chart-value[aria-pressed="true"] { background: #eef7f7; box-shadow: inset 2px 0 var(--dash-teal); }
body.dashboard-experience :is(.ntpc-donut-segment, .traffic-cause-donut-segment)[aria-pressed="true"] { stroke-width: 43; }
body.dashboard-experience :is(.dashboard-chart-value, .ntpc-donut-segment, .traffic-cause-donut-segment) { touch-action: manipulation; }
body.dashboard-experience :is(.dashboard-chart-more, .dashboard-trend-data) summary { min-height: 44px; padding: 10px 2px; cursor: pointer; font-size: 14px; font-weight: 600; color: #60458c; }
body.dashboard-experience .dashboard-hour-picker { display: flex; align-items: center; gap: 12px; font-size: 14px; }
body.dashboard-experience .dashboard-hour-picker select { flex: 1; min-width: 0; min-height: 44px; padding: 8px; font-size: 16px; border: 1px solid #bfc6cc; border-radius: 4px; background: white; }
body.dashboard-experience .dashboard-trend-viewport { overflow-x: auto; max-width: 100%; }
body.dashboard-experience .dashboard-trend-data { margin-top: 8px; }
body.dashboard-experience .dashboard-trend-data section { padding: 8px 0; border-top: 1px solid var(--dash-line); }
body.dashboard-experience .dashboard-trend-data h4 { margin: 0 0 8px; font-size: 15px !important; }
body.dashboard-experience .dashboard-trend-data ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 6px; padding: 0; margin: 0; list-style: none; }
body.dashboard-experience .dashboard-trend-data li { font-size: 13px !important; }
body.dashboard-experience .dashboard-ranking-toggle { display: block; width: 100%; min-height: 44px; margin-top: 8px; border: 0; border-radius: 4px; background: #fffbea; color: #60458c; font-size: 14px; }
body.dashboard-experience #ntpcDashboard .ntpc-bars-scroll { max-height: none; overflow: visible !important; padding: 0; }
body.dashboard-experience #ntpcDashboard .ntpc-bars-scroll:not(.dashboard-ranking-expanded) .ntpc-bar-row:nth-child(n+9) { display: none; }
body.dashboard-experience #ntpcDashboard .ntpc-bar-row { grid-template-columns: 64px minmax(0, 1fr) 130px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--dash-line); }
body.dashboard-experience #ntpcDashboard .ntpc-bar-value small { white-space: normal; font-size: 12px !important; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.ntpc-kpi, .traffic-time-band-card) { border: 0; box-shadow: none; padding: 10px; border-radius: 4px; background: #fffbea; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.ntpc-kpi, .traffic-time-band-card) strong { font-size: 24px !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(table, th, td) { border: 0 !important; border-bottom: 1px solid var(--dash-line) !important; box-shadow: none !important; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(th, td) { padding: 8px 10px !important; font-size: 14px; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.traffic-hour-content-grid, .population-care-side, .youbike-supply-detail) { gap: 16px; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.ntpc-trend-lines, .traffic-hour-detail, .traffic-trend-bars) { padding-inline: 0; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) * { animation: none !important; }
body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(button, a, .dashboard-panel, .ntpc-panel) { transition: none !important; }

/* Resource panels have one outer gutter; records use only a bottom divider. */
body.dashboard-experience #dashboard :is(.youbike-top-controls, .youbike-zone-heatmap-card, .youbike-zone-detail,
  .population-growth-card, .population-trend-card, .care-resource-metric, .care-resource-subcard,
  .childcare-card-head, .childcare-card-body, .childcare-card-summary, .childcare-card-main,
  .care-ratio-compact-card, .youbike-station-table, .childcare-detail-table) {
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important;
  padding: 0 !important; min-height: 0; height: auto;
}
body.dashboard-experience #dashboard .dashboard-module-grid { padding: 0 !important; }
body.dashboard-experience #dashboard .youbike-top-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
body.dashboard-experience #dashboard .youbike-sample-range { width: 300px; max-width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.dashboard-experience #dashboard .youbike-sample-range button { min-height: 44px; padding: 8px; font-size: 14px; border-radius: 4px; }
body.dashboard-experience #dashboard .youbike-section-head { display: flex; flex-wrap: wrap; align-items: start; gap: 8px 16px; margin-bottom: 12px; }
body.dashboard-experience #dashboard .youbike-section-head > div:first-child { flex: 1 1 200px; }
body.dashboard-experience #dashboard .youbike-section-head .youbike-kpi-grid { flex: 1 1 260px; width: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.dashboard-experience #dashboard .youbike-kpi-grid > div { padding: 8px; min-height: 60px; border-radius: 4px; background: #fffbea; border: 0; box-shadow: none; }
body.dashboard-experience #dashboard .youbike-zone-heatmap-card { margin-block: 16px; }
body.dashboard-experience #dashboard :is(.youbike-zone-status, .youbike-zone-summary-row) { padding: 0; }
body.dashboard-experience #dashboard .youbike-zone-detail { margin-top: 12px; padding-top: 12px !important; border-top: 1px solid var(--dash-line) !important; }
body.dashboard-experience #dashboard :is(.youbike-onepage-grid, .care-pressure-layout, .population-change-grid) { gap: 20px; }
body.dashboard-experience #dashboard .youbike-onepage { gap: 12px; }
body.dashboard-experience #dashboard .population-growth-item { padding: 10px 0; }
body.dashboard-experience #dashboard .population-growth-head > strong { background: none; border-radius: 0; box-shadow: none; padding: 0; color: var(--dash-ink); }
body.dashboard-experience #dashboard .population-growth-head em { background: none; border-radius: 0; box-shadow: none; padding: 0; color: #60458c; font-style: normal; }
body.dashboard-experience .dashboard-zone-picker { display: none; }
body.dashboard-experience #dashboard .population-trend-legend { display: flex; flex-wrap: wrap; gap: 8px 12px; }
body.dashboard-experience #dashboard .population-change-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: stretch; }
body.dashboard-experience #dashboard .population-growth-head { flex-wrap: wrap; }
body.dashboard-experience #dashboard .population-trend-card { display: grid; grid-template-rows: auto minmax(300px, 1fr) auto; gap: 12px; }
body.dashboard-experience #dashboard .population-trend-head { flex-wrap: wrap; margin: 0; }
body.dashboard-experience #dashboard .population-trend-toggle button { min-height: 44px; box-shadow: none; }
body.dashboard-experience #dashboard .population-trend-plot { position: relative; min-height: 300px; }
body.dashboard-experience #dashboard .population-trend-svg { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; }
body.dashboard-experience #dashboard .population-trend-legend { margin: 0; }
body.dashboard-experience #dashboard .childcare-facts { grid-template-columns: minmax(0, 1fr); }
body.dashboard-experience #dashboard .childcare-total-grid em { padding: 8px 4px; border: 0; border-bottom: 1px solid var(--dash-line); border-radius: 0; background: none; }
body.dashboard-experience #dashboard .childcare-total-grid strong { display: block; white-space: nowrap; line-height: 1.4; }
body.dashboard-experience #dashboard .care-pressure-layout { align-items: stretch; }
body.dashboard-experience #dashboard .care-pressure-layout > .population-care-map { min-height: 420px; height: auto; }
/* Overlay geometry is owned here, not by legacy card or global text rules. */
#dashboard :is(.leaflet-pane, .leaflet-tooltip, .leaflet-popup, .leaflet-control-zoom) { transition: none !important; animation: none !important; }
#dashboard .map-overlay-open .leaflet-control-zoom { visibility: hidden; }
#dashboard .leaflet-tooltip {
  width: var(--map-tooltip-width, 280px); min-width: 0; max-width: none;
  max-height: var(--map-tooltip-height, 320px); overflow: auto;
  padding: 10px 12px; border-radius: 6px; font-size: 14px !important; line-height: 1.55;
  color: var(--dash-ink); background: #fff; white-space: normal; word-break: normal; overflow-wrap: anywhere;
}
#dashboard .leaflet-tooltip::before, #dashboard .map-overlay-shifted .leaflet-popup-tip-container { display: none; }
#dashboard .leaflet-popup-content-wrapper { padding: 1px; border-radius: 6px; }
#dashboard .leaflet-popup-content {
  margin: 38px 12px 12px; font-size: 14px !important; line-height: 1.55;
  white-space: normal; word-break: normal; overflow-wrap: anywhere;
  overscroll-behavior: contain; scrollbar-gutter: stable;
}
#dashboard .leaflet-popup-scrolled { border: 0; padding-right: 8px; }
#dashboard .leaflet-popup-close-button {
  width: 40px; height: 40px; line-height: 40px; font-size: 24px;
  color: var(--dash-ink); border-radius: 4px;
}
#dashboard .leaflet-popup :is(.civic-data-point-title, .traffic-popup dl) {
  display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; align-items: start;
}
#dashboard .leaflet-popup .civic-data-point-actions { width: auto; }
#dashboard .leaflet-popup .traffic-popup dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#dashboard .leaflet-popup .traffic-popup dl div { padding: 6px; border-radius: 4px; }
#dashboard .leaflet-popup .traffic-incident-detail small { grid-template-columns: 60px minmax(0, 1fr); }
#dashboard .leaflet-popup .traffic-popup-details ul { max-height: none; overflow: visible; }
#dashboard .leaflet-popup :is(.traffic-popup strong, .civic-data-point-title > strong) {
  font-size: 16px !important; line-height: 1.5; overflow-wrap: anywhere;
}
body.dashboard-experience #dashboard .care-resource-row { padding: 12px 0 !important; border: 0 !important; border-bottom: 1px solid var(--dash-line) !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; }
body.dashboard-experience #dashboard :is(.care-resource-sufficiency, .care-pressure-side) { padding: 0 !important; border: 0 !important; background: none !important; }
body.dashboard-experience #dashboard .childcare-detail-row { padding: 8px 0 !important; border: 0; border-bottom: 1px solid var(--dash-line); border-radius: 0; background: none; }
body.dashboard-experience #dashboard :is(.youbike-supply-map, .population-care-map) { min-height: 360px; border: 0; border-radius: 4px; }
body.dashboard-experience #dashboard .traffic-trend-bars { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; height: auto; min-height: 0; padding: 12px 0; overflow: visible; }
body.dashboard-experience #dashboard .traffic-trend-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 8px; width: 100%; min-width: 0; height: auto; gap: 6px; }
body.dashboard-experience #dashboard .traffic-trend-bar b { grid-column: 1; grid-row: 1; font-size: 14px !important; text-align: left; white-space: normal; }
body.dashboard-experience #dashboard .traffic-trend-bar::after { content: attr(data-count); grid-column: 2; grid-row: 1; font-size: 14px; }
body.dashboard-experience #dashboard .traffic-trend-bar i { grid-column: 1 / -1; grid-row: 2; width: var(--bar); height: 8px; min-height: 0; border-radius: 3px; background: var(--dash-teal); }

@media (max-width: 980px) {
  body.dashboard-experience { --dash-gutter: 12px; --dash-gap: 20px; }
  body.dashboard-experience :is(#dashboard, #ntpcDashboard) { padding-top: 16px !important; }
  body.dashboard-experience #dashboard .traffic-first-screen { padding: 0 !important; margin: 0 !important; }
  body.dashboard-experience #dashboard .youbike-top-controls { display: grid; grid-template-columns: minmax(0, 1fr); }
  body.dashboard-experience #dashboard .dashboard-zone-buttons { display: none !important; }
  body.dashboard-experience .dashboard-zone-picker { display: grid; gap: 4px; font-size: 14px; }
  body.dashboard-experience .dashboard-zone-picker select { width: 100%; padding: 8px; border: 1px solid #bfc6cc; border-radius: 4px; background: white; }
  body.dashboard-experience #dashboard .youbike-section-head { display: grid; grid-template-columns: minmax(0, 1fr); }
  body.dashboard-experience #dashboard .youbike-section-head .youbike-kpi-grid { width: 100%; }
  body.dashboard-experience #dashboard :is(.population-change-grid, .youbike-onepage-grid, .care-pressure-layout) { grid-template-columns: minmax(0, 1fr); }
  body.dashboard-experience #dashboard .care-pressure-layout > .population-care-map { height: 380px; min-height: 380px; }
  body.dashboard-experience #dashboard .population-trend-card { grid-template-rows: auto 300px auto; }
  body.dashboard-experience #dashboard .childcare-total-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.dashboard-experience #dashboard .care-pressure-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; }
  body.dashboard-experience #dashboard .care-pressure-tools button { min-height: 44px; font-size: 14px; padding: 8px; }
  body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.dashboard-analysis-grid, .traffic-cause-grid, .traffic-time-layout, .traffic-hour-content-grid, .population-care-grid) { grid-template-columns: minmax(0, 1fr) !important; gap: 20px; }
  body.dashboard-experience #dashboard .traffic-overview-grid > .traffic-map-panel { order: -2 !important; }
  body.dashboard-experience #dashboard .traffic-overview-grid > .traffic-cause-panel { order: -1 !important; }
  body.dashboard-experience #dashboard :is(.area-header, .traffic-summary-controls) { display: grid; gap: 10px; }
  body.dashboard-experience #dashboard :is(.dashboard-v2-filter, .traffic-summary-controls) { width: 100%; max-width: none; }
  body.dashboard-experience #dashboard #mapCanvas { flex: none; height: 300px !important; min-height: 300px !important; }
  body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.traffic-cause-panel, .traffic-time-card, .population-care-card, .ntpc-side-cards, .ntpc-mini-card, .ntpc-cause-panel-inline) { border-top: 1px solid var(--dash-line) !important; padding-top: 16px !important; margin-top: 0; }
  body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.ntpc-kpis, .ntpc-child-safety-kpis, .traffic-time-band-grid) { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  body.dashboard-experience #dashboard .traffic-day-band-card { grid-column: 1 / -1; }
  body.dashboard-experience #ntpcDashboard .ntpc-bar-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; grid-template-rows: auto 8px; align-items: start; gap: 6px 12px; padding: 10px 0; }
  body.dashboard-experience #ntpcDashboard .ntpc-bar-label { grid-column: 1; grid-row: 1; white-space: normal; font-size: 15px !important; }
  body.dashboard-experience #ntpcDashboard .ntpc-bar-value { grid-column: 2; grid-row: 1; text-align: right; white-space: normal; font-size: 15px !important; }
  body.dashboard-experience #ntpcDashboard .ntpc-bar-track { grid-column: 1 / -1; grid-row: 2; height: 8px; width: 100%; }
  body.dashboard-experience #ntpcDashboard .ntpc-bar-fill { height: 8px; }
  body.dashboard-experience #dashboard .traffic-hour-bars { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; overflow: visible; padding: 8px 0 0; min-height: 140px; }
  body.dashboard-experience #dashboard .traffic-hour-bar { min-width: 0; width: 100%; min-height: 0; padding: 0; grid-template-rows: 104px 20px; box-shadow: none; }
  body.dashboard-experience #dashboard .traffic-hour-bar b { font-size: 11px !important; text-align: left; }
  body.dashboard-experience #dashboard .traffic-hour-bar i { border-radius: 3px 3px 0 0; }
  body.dashboard-experience #dashboard .traffic-hour-detail li span { white-space: normal; overflow: visible; }
  body.dashboard-experience #ntpcDashboard .ntpc-trend-lines { overflow: visible !important; padding: 0; }
  body.dashboard-experience #ntpcDashboard .ntpc-trend-lines svg { min-width: 560px; }
  body.dashboard-experience #ntpcDashboard .ntpc-line-legend { display: flex; flex-wrap: wrap; gap: 6px; overflow: visible !important; }
  body.dashboard-experience #ntpcDashboard .ntpc-line-legend button { min-height: 44px; font-size: 14px !important; }
  body.dashboard-experience #dashboard .youbike-zone-heatmap { width: 100%; min-width: 0; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  body.dashboard-experience #dashboard .youbike-zone-heatmap > :is(div, .youbike-heatmap-hour) { display: none; }
  body.dashboard-experience #dashboard .youbike-zone-heatmap > strong { grid-column: 1 / -1; min-height: 44px; margin-top: 8px; white-space: normal; font-size: 16px !important; }
  body.dashboard-experience #dashboard .youbike-zone-heatmap > i { display: grid; align-content: center; gap: 4px; min-height: 52px; padding: 4px 0; background: white !important; border-bottom: 4px solid var(--cell-color); border-radius: 0; font-style: normal; text-align: center; color: var(--dash-ink); }
  body.dashboard-experience #dashboard .youbike-zone-heatmap > i::before { content: attr(data-youbike-hour) ":00"; font-size: 12px; }
  body.dashboard-experience #dashboard .youbike-zone-heatmap > i::after { content: attr(data-status); font-size: 11px; }
  body.dashboard-experience #dashboard .childcare-detail-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  body.dashboard-experience #dashboard .childcare-detail-row > :first-child { grid-column: 1 / -1; }
  body.dashboard-experience #dashboard .childcare-detail-row > span { white-space: normal; }
}
@media (max-width: 359px) {
  body.dashboard-experience #dashboard #dashboardCards strong { font-size: 21px !important; }
  body.dashboard-experience :is(#dashboard, #ntpcDashboard) :is(.dashboard-range-buttons, .ntpc-filter-tabs) button { font-size: 13px !important; padding-inline: 2px !important; }
}
@media (prefers-reduced-motion: reduce) {
  body.dashboard-experience { scroll-behavior: auto; }
}
