/* Single management surface; map chrome stays subordinate to the mountain. */
#topbar { height: 48px; gap: 12px; padding: 0 12px; }
#topbar .brand { min-width: 0; max-width: 175px; padding: 3px 0; font-size: 14px; }
#topbar .brand .ic { width: 23px; height: 23px; }
#topbar .brand span { overflow: hidden; text-overflow: ellipsis; }
#clock { gap: 6px; font-size: 12px; }
#clock > .ic, #clock .sep { display: none; }
#openState { padding: 2px 6px; font-size: 10px; }
#weather { gap: 6px; font-size: 12px; }
#weatherTrigger { font-size: 12px; gap: 4px; padding: 2px; }
#weatherTrigger .ic { width: 18px; height: 18px; }
#counters { gap: 16px; }
#counters .hud-number { display: flex; flex-direction: column; gap: 0; align-items: flex-start; line-height: 1.3; }
#counters .hud-label { color: var(--ink-2); font-weight: 500; font-size: 10px; }
#counters .hud-number b { color: var(--ink); font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
#counters #bIncidents { padding: 3px 5px; min-height: 34px; }
#counters #sMoney.neg, #counters #sNetHour.neg, #counters #bIncidents.has-incidents b { color: var(--bad); }
#resortStatus .stars { display: inline-flex; }
#main { grid-template-columns: 68px 1fr; }
#rail { padding: 6px; gap: 2px; }
#rail button { flex-basis: 43px; height: 43px; font-size: 10px; }
#rail button .ic { width: 20px; height: 20px; }
#rail #bFinance { font-size: 9px; }
#hud { gap: 4px; }
#hud > .group button { min-height: 30px; }
#hud .icon-btn { width: 30px; }

#financeDialog { width: min(1040px, calc(100vw - 40px)); max-width: calc(100vw - 40px); height: min(860px, 92dvh); max-height: 92dvh; padding: 20px 24px; border-radius: 8px; }
#financeDialog > .dialog-head { justify-content: space-between; align-items: center; margin-bottom: 12px; }
#financeDialog h2 { font-size: 21px; font-weight: 650; letter-spacing: -0.035em; }
.dashboard-eyebrow { margin: 0 0 2px; color: var(--ink-2); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
#financeDialog #fClose { align-self: flex-start; }
#financeTabs { margin: 0 0 16px; gap: 16px; }
#financeTabs button { min-height: 38px; padding: 6px 4px 10px; font-size: 13px; }
#financeTabs button[aria-selected="true"] { border-bottom-color: var(--blue); color: var(--blue); }
#financeDialog > .fin-page { flex: 1; padding: 0 6px 8px 0; }
#financeDialog h3 { font-size: 13px; font-weight: 650; margin: 18px 0 10px; }
#financeDialog h4 { font-size: 12px; }
.dashboard-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
#financeDialog .dashboard-section-head h3 { margin: 0; }
.dash-caption { font-size: 11px; color: var(--ink-2); line-height: 1.5; }
p.dash-caption { margin: 8px 0 16px; }
.dash-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.dash-metrics-small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-metric { min-width: 0; }
.dash-metric dt { color: var(--ink-2); font-size: 11px; margin: 0 0 4px; }
.dash-metric dd { margin: 0; font-size: clamp(16px, 2vw, 23px); font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.dashboard-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin-bottom: 18px; }
.dash-chart { min-width: 0; margin: 0; padding: 10px 0 12px; border-top: 1px solid var(--line); }
.dash-chart figcaption { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
#financeDialog .dash-chart h3 { margin: 0; font-size: 12px; }
.dash-chart figcaption > span { color: var(--ink-2); font-size: 10px; }
.dash-trend-svg { display: block; width: 100%; height: auto; margin: 6px 0 0; overflow: visible; touch-action: pan-y; }
.dash-trend-svg text { fill: var(--ink-2); font: 10px var(--font); font-variant-numeric: tabular-nums; }
.dash-grid { stroke: var(--line); stroke-width: 0.7; fill: none; }
.dash-trend-line { stroke: var(--blue); stroke-width: 2; stroke-linejoin: round; fill: none; }
.dash-trend-dot { fill: var(--blue); stroke: var(--paper); stroke-width: 1; }
.dash-cursor { stroke: var(--blue); stroke-width: 0.8; opacity: 0.55; }
.dash-event path { stroke: var(--ink-3); stroke-width: 0.8; stroke-dasharray: 3 4; opacity: 0.6; }
.dash-event circle { fill: var(--paper); stroke: var(--ink-3); stroke-width: 1; }
#financeDialog label.dash-sample-label { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; color: var(--ink-2); font-size: 10px; margin: 4px 0 0; }
.dash-sample-label output { color: var(--ink); font-variant-numeric: tabular-nums; }
.dash-sample { display: block; width: 100%; height: 18px; margin: 0; accent-color: var(--blue); }
#financeDialog .dash-chart > .disclosure { margin-top: 3px; padding-top: 0; border-top: 0; }
#financeDialog .dash-chart > .disclosure > summary { min-height: 24px; padding: 3px 0; font-size: 10px; color: var(--ink-2); font-weight: 500; }
.dash-chart .dash-empty { min-height: 150px; display: grid; place-content: center; text-align: center; }
.dash-empty { color: var(--ink-2); margin: 8px 0 16px; font-size: 12px; }
.dash-table-scroll { max-width: 100%; overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.dash-table :is(th, td) { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.dash-table thead th { color: var(--ink-2); font-size: 10px; font-weight: 500; }
.dash-table :is(th, td):first-child { text-align: left; padding-left: 0; }
.dash-table tbody th { font-weight: 500; }
.dash-table .dash-entity { padding: 0; min-height: 26px; text-align: left; justify-content: flex-start; font-size: 12px; font-weight: 500; color: var(--blue); }
.dash-entity > span { color: var(--ink-3); font-size: 11px; }
.dash-alert { color: var(--bad); font-weight: 650; }
.dash-count { color: var(--ink-2); font-size: 11px; font-weight: 500; margin-left: 6px; font-variant-numeric: tabular-nums; }
.dash-incidents { padding: 0; margin: 0 0 18px; list-style: none; }
.dash-incidents li { display: flex; gap: 12px; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.dash-incidents .dash-entity { padding: 6px 0; font-weight: 500; font-size: 12px; color: var(--blue); }
.dash-incidents b { font-size: 11px; color: var(--bad); font-weight: 600; }
.dash-event-list { margin: 8px 0; padding-left: 16px; font-size: 11px; color: var(--ink-2); }
#financeDialog > .fin-page > details.management { border-top: 1px solid var(--line); margin: 0; padding: 0; }
#financeDialog details.management > summary { padding: 11px 0; font-size: 12px; }
#financeDialog details.management[open] > summary { color: var(--blue); }
#financeDialog .management .management { margin-top: 10px; }
#financeDialog .management .fin-top { margin: 8px 0 14px; gap: 20px; font-size: 12px; }
#financeDialog .fin-top .stat b { font-size: 14px; }
#financeDialog .fin-ticket-controls { padding: 8px 0 16px; }
#financeDialog #fExpansion { margin-top: 0; padding: 0 0 12px; border-top: 0; }
#financeDialog .fin-page > details > .guest-insights-grid { margin: 10px 0; }
#financeDialog #fOverview { margin: 12px 0 20px; }
#financeDialog .report-kpi b { font-size: 17px; }
#financeDialog .report-kpis { margin: 10px 0 16px; gap: 16px; }
#financeDialog .price output { font-size: 15px; }
#financeDialog .biz { margin-bottom: 16px; }
#financeDialog .biz-row { grid-template-columns: 110px 1fr; }
#financeDialog .management-status:empty { display: none; }
.dash-needs { display: grid; gap: 4px; margin: 16px 0 6px; }
.dash-need { display: grid; grid-template-columns: 85px minmax(70px, 1fr) 65px 100px; gap: 16px; width: 100%; min-height: 42px; padding: 8px 10px; border-color: transparent; border-radius: 3px; background: transparent; text-align: left; font-size: 12px; font-weight: 500; }
.dash-need[aria-pressed="true"] { background: #e8eff4; border-color: var(--blue); }
.dash-need-track { display: block; height: 7px; background: #e4e8ec; border-radius: 2px; overflow: hidden; }
.dash-need-track i { display: block; height: 100%; background: #718eaa; }
.dash-need b { font-variant-numeric: tabular-nums; text-align: right; }
.dash-need small { color: var(--ink-2); font-weight: 400; }
.dash-need-facilities { color: var(--ink-2); font-size: 10px; text-align: right; }
#needFocusChip { position: absolute; left: 12px; top: 52px; z-index: 3; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 8px; padding: 4px 6px 5px 10px; max-width: calc(100% - 24px); border: 1px solid var(--line-2); box-shadow: none; border-radius: 4px; }
#needFocusStatus { justify-content: flex-start; padding: 0; min-height: 25px; background: transparent; border-color: transparent; font-size: 12px; text-align: left; }
#needFocusText { font-variant-numeric: tabular-nums; }
#needFocusLegend { grid-column: 1; font-size: 10px; color: var(--ink-2); }
#needFocusClear { grid-column: 2; grid-row: 1 / 3; width: 28px; min-height: 28px; font-size: 18px; }
.need-ring-key { display: inline-block; width: 9px; height: 9px; border: 2px solid #498eaa; border-radius: 50%; }
#stage.drawer #needFocusChip { left: 344px; max-width: calc(100% - 356px); }

@media (max-width: 1180px) {
  #topbar { gap: 10px; }
  #topbar .brand { max-width: 120px; }
  #counters { gap: 12px; }
  #weatherTrigger #wToday { display: none; }
}
@media (max-width: 950px) {
  #topbar { padding: 0 8px; gap: 8px; }
  #topbar .brand { max-width: 95px; font-size: 12px; gap: 4px; }
  #clock { font-size: 11px; gap: 4px; }
  #clock #cWeekday { display: none; }
  #counters { gap: 10px; }
  #counters .hud-number b { font-size: 12px; }
  .dash-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  #financeDialog { padding: 16px 20px; }
}
@media (max-width: 760px) {
  #topbar .brand span { display: none; }
  #topbar .brand { flex: none; }
  #counters { gap: 8px; }
  #counters .hud-label { font-size: 9px; }
  #financeDialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); padding: 14px; height: 94dvh; max-height: 94dvh; }
  #financeTabs { gap: 8px; }
  #financeTabs button { flex: 1; padding-inline: 2px; font-size: 12px; }
  .dashboard-charts { gap: 12px; }
  .dash-need { grid-template-columns: 70px minmax(50px, 1fr) 55px; gap: 8px; }
  .dash-need-facilities { grid-column: 2 / 4; text-align: left; }
  .dashboard-section-head { flex-wrap: wrap; gap: 2px; }
}
@media (max-width: 540px) {
  #topbar { flex-wrap: wrap; height: auto; min-height: 74px; gap: 2px 10px; padding: 3px 8px; }
  #counters { order: 3; width: 100%; justify-content: space-between; }
  #weather { margin-left: auto; }
  #main { grid-template-columns: 56px 1fr; }
  #rail { padding: 4px; }
  #rail #bFinance { font-size: 8px; }
  .dashboard-charts { grid-template-columns: 1fr; }
  #financeDialog .biz-row { grid-template-columns: 1fr; gap: 5px; }
  #financeDialog .biz-row .sub { grid-column: 1; }
  #needFocusChip { left: 8px; max-width: calc(100% - 16px); }
  #needFocusText { font-size: 11px; }
}
.dash-table td.dash-facility-state { text-align: left; }

/* Observer-backed gameplay rows share the existing four-tab dashboard and inspectors. */
.dash-gameplay { min-width: 0; padding: 12px 0; border-top: 1px solid var(--line); }
.dash-gameplay .dashboard-section-head { flex-wrap: wrap; gap: 4px 12px; }
.dash-gameplay .dashboard-section-head h3 { margin: 0; font-size: 13px; }
.dash-gameplay h4 { margin: 12px 0 6px; font-size: 11px; }
.dash-gameplay .dash-metrics { gap: 10px; margin: 10px 0 6px; padding-bottom: 10px; }
.dash-gameplay .dash-metric dd { font-size: 17px; letter-spacing: -0.025em; }
.dash-gameplay .dash-caption { margin: 6px 0; }
.dash-gameplay .dash-table { font-size: 11px; }
.dash-gameplay .dash-table :is(th, td) { padding: 5px 7px; }
.dash-gameplay .dash-table-scroll:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.dash-gameplay .dash-entity { padding: 0; min-height: 28px; font-size: 11px; color: var(--blue); }
.dash-constraint { margin: 8px 0; font-size: 11px; line-height: 1.5; }
.dash-constraint-row { background: #f4e8e3; }
.dash-responses { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0; }
.dash-responses .dash-response, .dash-responses .dash-entity { min-height: 30px; padding: 2px 0; color: var(--blue); font-size: 11px; text-align: left; }
.dash-responses button:disabled { color: var(--ink-3); }
.dash-budget-track { display: block; width: 100%; min-width: 48px; height: 7px; background: #e4e8ec; border-radius: 2px; overflow: hidden; }
.dash-budget-track i { display: block; height: 100%; background: #718eaa; }
.dash-budget-track:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.dash-load-alert i { background: var(--bad); }
.dash-day-budget .dash-table th:first-child { width: 20%; }
.dash-day-budget .dash-table td:nth-child(2) { width: 48%; }
.dash-density { display: flex; gap: 8px; align-items: center; }
.dash-density .dash-budget-track { width: 65px; }
.dash-density b { min-width: 42px; font-weight: 500; }
#panel .dash-gameplay { margin-top: 12px; }
#panel .dash-gameplay .dash-metrics-small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#panel .dash-gameplay .dash-metric dt { font-size: 10px; }
#panel .dash-gameplay .dash-metric dd { font-size: 14px; overflow-wrap: anywhere; }
#panel .dash-gameplay .dash-table { font-size: 10px; }
#panel .dash-gameplay .dash-table .dash-entity { font-size: 10px; }
#panel .dash-gameplay .dash-table th:first-child { max-width: 140px; white-space: normal; }
@media (max-width: 540px) {
  .dash-gameplay .dash-metrics-small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-gameplay .dash-metric dd { font-size: 15px; }
}

/* Native arrival controls are never replaced by live metric refreshes. */
.demand-policy-form { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(210px, 1.5fr) auto; align-items: end; gap: 10px 14px; margin: 12px 0 6px; }
#financeDialog .demand-policy-form label { display: grid; gap: 5px; min-width: 0; margin: 0; color: var(--ink-2); font-size: 11px; }
.demand-policy-form :is(input, select) { width: 100%; min-width: 0; min-height: 34px; font-size: 12px; }
.demand-policy-form button { min-height: 34px; font-size: 12px; white-space: nowrap; }
.dash-demand .dash-metric dd { font-size: 17px; }
.dash-demand .dash-table td .dash-entity { text-align: right; }
#arrivalPolicyStatus { margin: 6px 0; font-size: 11px; }
.dash-demand .dash-budget-track { margin: 8px 0; }
@media (max-width: 900px) {
  .demand-policy-form { grid-template-columns: minmax(130px, 1fr) minmax(200px, 1.5fr); gap: 8px 12px; }
  .demand-policy-form button { justify-self: start; }
}
@media (max-width: 540px) {
  .demand-policy-form { grid-template-columns: minmax(0, 1fr); }
}

/* The cartographic transport dashboard is local to the classic modal UI. */
.dashboard-network { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
#dashboardTransportMap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 12px 18px; align-items: start; }
#dashboardTransportMap > .transport-map-summary { grid-column: 1 / -1; margin: 0; font-size: 11px; color: var(--ink-2); }
#dashboardTransportMap > .transport-map-canvas { grid-column: 1; grid-row: 2 / span 3; border-radius: 4px; }
#dashboardTransportMap > .transport-map-inspector { grid-column: 2; grid-row: 2; padding: 10px 12px; border: 1px solid var(--line); background: var(--paper); border-radius: 4px; min-width: 0; }
#dashboardTransportMap > .transport-map-index { grid-column: 2; grid-row: 3 / span 2; min-width: 0; }
#dashboardTransportMap > .transport-map-legend { grid-column: 1; }
#dashboardTransportMap > :is(.transport-map-empty, .transport-map-note) { grid-column: 1 / -1; margin: 0; font-size: 11px; color: var(--ink-2); }
.transport-map-inspector .transport-map-note { color: var(--ink-2); line-height: 1.5; }
.transport-map-reading dt { color: var(--ink-2); font-size: 10px; }
.transport-map-reading dd { font-weight: 600; }
.transport-map-index-group { border-bottom: 1px solid var(--line); padding: 6px 0; }
.transport-map-index-group > summary { font-size: 11px; cursor: pointer; padding: 4px 0; }
.transport-map-index button { text-align: left; white-space: normal; font-size: 11px; padding: 7px 9px; width: 100%; }
.transport-map-index button.is-selected { color: var(--blue); border-color: var(--blue); background: #e7eef4; }
.transport-map-index button small { display: block; font-size: 10px; margin-top: 3px; color: var(--ink-2); }
.transport-map-inspect { font-size: 11px; min-height: 30px; }
@media (max-width: 720px) {
  #dashboardTransportMap { grid-template-columns: minmax(0, 1fr); }
  #dashboardTransportMap > :is(.transport-map-canvas, .transport-map-inspector, .transport-map-index, .transport-map-legend) { grid-column: 1; grid-row: auto; }
}
