/* Theme contract supplied for the FireMap GUI uplift. */
.pager-unit-code {
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

:root, [data-theme="light"] {
  color-scheme: light;
  --fm-brand: #a20e00;
  --fm-brand-on: #ffffff;
  --fm-page: #f5f8fa;
  --fm-panel: #ffffff;
  --fm-panel-alt: #ededed;
  --fm-sidebar: #f5f8fa;
  --fm-sidebar-alt: #ededed;
  --fm-sidebar-text: #182127;
  --fm-sidebar-subtle: #59636b;
  --fm-sidebar-border: #cdcdd2;
  --fm-text: #182127;
  --fm-text-subtle: #59636b;
  --fm-text-on-dark: #f5f8fa;
  --fm-border: #cdcdd2;
  --fm-accent: #12a0ce;
  --fm-link: #086077;
  --fm-plum: #66344b;
  --fm-plum-active: #5c2f43;
  --fm-olive: #5b792f;
  --fm-olive-active: #516c2a;
  --fm-amber: #e48525;
  --fm-amber-active: #cd7721;
  --fm-teal: #086077;
  --fm-teal-active: #07566b;
  --fm-radius-control: 8px;
  --fm-radius-panel: 12px;
  --fm-header-height: 56px;
  --fm-sidebar-width: 280px;
  --fm-sidebar-collapsed-width: 64px;
  --fm-weather-height: 96px;
  --fm-shadow: 0 4px 20px rgba(24, 33, 39, .16);
  --fm-overlay-bg: rgba(255, 255, 255, .98);
}
[data-theme="dark"] {
  color-scheme: dark;
  --fm-sidebar: #182127;
  --fm-sidebar-alt: #283640;
  --fm-sidebar-text: #f5f8fa;
  --fm-sidebar-subtle: #cdd9e2;
  --fm-sidebar-border: #41515c;
  --fm-page: #182127;
  --fm-panel: #283640;
  --fm-panel-alt: #223039;
  --fm-text: #f5f8fa;
  --fm-text-subtle: #cdcdd2;
  --fm-border: #41515c;
  --fm-link: #61cbea;
  --fm-overlay-bg: rgba(24, 33, 39, .98);
  --fm-shadow: 0 4px 22px rgba(0, 0, 0, .3);
}
:root {
  --header-h: var(--fm-header-height);
  --bg: var(--fm-page);
  --panel: var(--fm-panel);
  --panel2: var(--fm-panel-alt);
  --fg: var(--fm-text);
  --muted: var(--fm-text-subtle);
  --line: var(--fm-border);
}
[hidden] { display: none !important; }
.fm-shell {
  --fm-sidebar-current: var(--fm-sidebar-width);
  grid-template-columns: var(--fm-sidebar-current) minmax(0, 1fr);
  grid-template-rows: var(--fm-header-height) minmax(0, 1fr) auto;
  background: var(--fm-page);
  transition: none;
}
.fm-shell.fm-sidebar-collapsed { --fm-sidebar-current: var(--fm-sidebar-collapsed-width); }
.fm-shell .fm-header {
  grid-column: 1 / -1;
  grid-row: 1;
  min-height: 0;
  padding: 0 16px 0 8px;
  gap: 16px;
  background: var(--fm-brand);
  border: 0;
  color: var(--fm-brand-on);
  z-index: 30;
}
.fm-header .brand { min-width: 0; gap: 12px; color: #fff; }
.fm-header .brand img { width: 30px; height: 30px; flex-shrink: 0; }
.fm-header .brand strong { font-size: 26px; letter-spacing: -.5px; }
.fm-workspace-title { padding-left: 18px; border-left: 1px solid #ffffff66; font-size: 14px; }
.fm-time { display: flex; align-items: center; gap: 18px; white-space: nowrap; }
.fm-header .clock { display: block; color: #fff; font-size: 26px; font-weight: 600; }
#fmDate { font-size: 11px; letter-spacing: .3px; }
.fm-layer-search {
  flex-shrink: 0; width: calc(100% - 16px); min-height: 40px; margin: 0 8px 4px; padding: 8px 10px;
  border: 1px solid var(--fm-sidebar-border); border-radius: var(--fm-radius-control);
  color: var(--fm-sidebar-text); background: var(--fm-panel); font: inherit;
}
.fm-layer-search-status { padding: 0 12px; color: var(--fm-sidebar-subtle); font-size: 11px; }
.fm-icon-button, .fm-button {
  font: inherit; cursor: pointer; min-height: 40px; border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-control); background: var(--fm-panel-alt); color: var(--fm-text);
  padding: 8px 12px;
}
.fm-icon-button { min-width: 40px; padding: 4px 8px; font-size: 22px; }
.fm-icon { width: 22px; height: 22px; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.fm-icon-button { display: inline-flex; align-items: center; justify-content: center; }
.fm-button .fm-icon { width: 18px; height: 18px; margin-right: 8px; }
.fm-header .fm-icon-button { background: transparent; color: #fff; border-color: #ffffff55; }
.fm-shell button:focus-visible, .fm-shell input:focus-visible, .fm-shell a:focus-visible,
.fm-shell summary:focus-visible, .fm-shell [tabindex]:focus-visible {
  outline: 3px solid var(--fm-accent); outline-offset: 2px;
}
.fm-header button:focus-visible { outline-color: #fff; }
.fm-sidebar {
  grid-column: 1; grid-row: 2 / 4; min-height: 0; overflow-y: auto; overflow-x: hidden;
  background: var(--fm-sidebar); color: var(--fm-sidebar-text); border-right: 1px solid var(--fm-sidebar-border);
  scrollbar-width: thin; z-index: 20;
  display: flex; flex-direction: column;
}
.fm-sidebar-backdrop {
  position: absolute; inset: var(--fm-header-height) 0 0; z-index: 19;
  border: 0; border-radius: 0; padding: 0; background: rgba(10, 18, 24, .55);
}
.fm-primary-nav { padding: 8px; display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.fm-primary-nav button, .fm-primary-nav > a {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; text-align: left;
  color: var(--fm-sidebar-text); background: transparent; border: 0; border-radius: 7px; padding: 8px 12px; font: inherit; flex-shrink: 0;
  text-decoration: none; box-sizing: border-box;
}
.fm-primary-nav button > span:first-child, .fm-primary-nav > a > span:first-child { width: 22px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fm-primary-nav button:hover, .fm-primary-nav > a:hover, .fm-sidebar-footer button:hover { background: var(--fm-sidebar-alt); }
.fm-primary-nav button[aria-pressed="true"] { background: var(--fm-brand); color: var(--fm-brand-on); }
.fm-primary-nav > a[aria-current="page"] { background: var(--fm-brand); color: var(--fm-brand-on); }
.fm-category-button::after { content: ""; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); margin-left: auto; flex-shrink: 0; }
.fm-category-button[aria-expanded="true"]::after { transform: rotate(135deg); }
.fm-primary-nav button:disabled { opacity: .65; cursor: wait; }
.fm-tree { padding: 0 8px 8px; font-size: 12px; border-left: 2px solid var(--fm-accent); margin: 4px 4px 8px 12px; flex-shrink: 0; }
.fm-tree-group { margin: 4px 0; }
.fm-tree-heading { display: flex; gap: 7px; align-items: center; min-height: 40px; }
.fm-tree-heading input, .fm-tree .row input[type="checkbox"] { width: 16px; height: 16px; flex-shrink: 0; accent-color: #12a0ce; }
.fm-tree-disclosure { display: flex; align-items: center; gap: 8px; flex: 1; min-height: 40px; color: var(--fm-sidebar-text); background: transparent; border: 0; text-align: left; font: inherit; font-weight: 600; padding: 4px; }
.fm-tree-disclosure::before { content: ""; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); margin-right: 3px; flex-shrink: 0; }
.fm-tree-disclosure[aria-expanded="true"]::before { transform: rotate(135deg); }
.fm-tree-children { margin-left: 9px; padding-left: 8px; border-left: 1px solid var(--fm-sidebar-border); }
.fm-tree .menu { position: static; }
.fm-tree .dropdown {
  position: static; display: block; padding: 0; margin: 0; min-width: 0 !important; max-width: none;
  border: 0; box-shadow: none; color: var(--fm-sidebar-text); background: transparent; width: auto; border-radius: 0;
}
.fm-tree .dd-title { display: none; }
.fm-tree .row { min-height: 34px; margin: 0; padding: 5px 0; font-size: 12px; gap: 8px; }
.fm-tree .row label { flex: 1; }
.fm-tree .row a, .fm-tree .muted { color: var(--fm-sidebar-subtle); }
.fm-tree input[type="range"] { min-width: 0; width: 100px; }
.fm-tree .sep { background: var(--fm-sidebar-border); }
.fm-sidebar-footer { padding: 12px; display: grid; gap: 8px; flex-shrink: 0; }
.fm-sidebar-footer button { color: var(--fm-sidebar-text); background: transparent; border-color: var(--fm-sidebar-border); font-size: 12px; }
.fm-panel-visibility-controls { display: grid; gap: 8px; }
.fm-sidebar-footer .fm-panel-toggle { display: flex; align-items: center; width: 100%; text-align: left; }
.fm-sidebar-footer .fm-panel-toggle[aria-pressed="true"] { background: var(--fm-sidebar-alt); }
.fm-panel-toggle-label { min-width: 0; }
.fm-account-menu { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--fm-sidebar-border); }
.fm-account-menu .fm-button { display: flex; align-items: center; width: 100%; text-align: left; font-size: 12px; }
.fm-settings-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: min(720px, calc(100dvh - 32px)); margin: auto;
  padding: 0; border: 1px solid var(--fm-border); border-radius: var(--fm-radius-panel);
  background: var(--fm-panel); color: var(--fm-text); box-shadow: var(--fm-shadow);
}
.fm-settings-dialog::backdrop { background: rgba(10, 18, 24, .66); backdrop-filter: blur(2px); }
.fm-settings-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; border-bottom: 1px solid var(--fm-border); background: var(--fm-panel-alt);
}
.fm-settings-heading h2, .fm-settings-heading p { margin: 0; }
.fm-settings-heading h2 { font-size: 24px; }
.fm-settings-kicker { color: var(--fm-brand); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.fm-settings-content { display: grid; gap: 20px; padding: 24px; overflow-y: auto; }
.fm-settings-content section { display: grid; gap: 14px; }
.fm-settings-content h3 { margin: 0; font-size: 16px; }
.fm-settings-toggle { display: flex; align-items: flex-start; gap: 12px; }
.fm-settings-toggle input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--fm-brand); }
.fm-settings-toggle span { display: grid; gap: 3px; }
.fm-settings-toggle small, .fm-settings-field > small { color: var(--fm-text-subtle); }
.fm-settings-field { display: grid; gap: 6px; }
.fm-settings-field > label { font-weight: 600; }
.fm-settings-tone-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.fm-settings-tone-control select, .fm-tree .row select {
  min-width: 0; min-height: 40px; padding: 7px 10px; border: 1px solid var(--fm-border);
  border-radius: var(--fm-radius-control); background: var(--fm-panel); color: var(--fm-text); font: inherit;
}
.fm-settings-status { margin: 0; color: var(--fm-text-subtle); font-size: 12px; }
.fm-settings-label { font-weight: 600; }
.fm-settings-view-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-settings-view-actions .fm-button:disabled { opacity: .55; cursor: not-allowed; }
.fm-sidebar-collapsed .fm-nav-label, .fm-sidebar-collapsed .fm-tree,
.fm-sidebar-collapsed .fm-layer-search, .fm-sidebar-collapsed .fm-layer-search-status,
.fm-sidebar-collapsed .fm-sidebar-footer { display: none; }
.fm-sidebar-collapsed .fm-primary-nav { padding: 8px 4px; }
.fm-sidebar-collapsed .fm-primary-nav button, .fm-sidebar-collapsed .fm-primary-nav > a { justify-content: center; padding: 8px; }
.fm-sidebar-collapsed .fm-category-button::after { display: none; }
.fm-shell #map { grid-column: 2; grid-row: 2; min-height: 0; min-width: 0; position: relative; }
.fm-map-toolbar { position: absolute; top: 12px; right: 54px; z-index: 6; }
.fm-map-toolbar .menu > button { color: var(--fm-text); background: var(--fm-overlay-bg); border: 1px solid var(--fm-border); border-radius: 8px; min-height: 40px; }
.fm-map-toolbar .menu > button { display: inline-flex; align-items: center; gap: 8px; }
.fm-map-toolbar .menu > button .fm-icon:last-child { width: 16px; height: 16px; }
.fm-map-toolbar .dropdown { left: auto; right: 0; min-width: 270px; max-height: min(440px, 65vh); overflow: auto; background: var(--fm-overlay-bg); color: var(--fm-text); margin-inline: 0; }
.fm-map-toolbar .row { min-height: 36px; }
.fm-shell .maplibregl-ctrl-top-right { top: 2px; right: 2px; }
.fm-panel { color: var(--fm-text); background: var(--fm-overlay-bg); border: 1px solid var(--fm-border); border-radius: 12px; box-shadow: var(--fm-shadow); overflow: hidden; }
.fm-panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; gap: 8px; border-bottom: 1px solid var(--fm-border); }
.fm-panel h2 { font-size: 14px; margin: 0; font-weight: 700; }
.fm-panel h2 { display: flex; align-items: center; gap: 8px; }
.fm-panel h2 .fm-icon { width: 18px; height: 18px; }
.fm-panel-heading .fm-icon-button { min-height: 32px; min-width: 32px; border: 0; font-size: 18px; background: transparent; }
.fm-panel-heading .fm-icon-button .fm-icon { width: 18px; height: 18px; }
.fm-pager-panel { position: absolute; z-index: 5; top: 16px; bottom: 16px; left: 16px; width: 310px; display: flex; flex-direction: column; background: #1c242a; }
.fm-map-feed-stack { position: absolute; z-index: 5; top: 16px; bottom: 16px; left: 16px; width: 310px; display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
.fm-map-feed-stack > .fm-panel { pointer-events: auto; }
.fm-map-feed-stack > .fm-pager-panel { position: static; width: auto; flex: 1; min-height: 0; }
.fm-map-feed-stack > .fm-pager-panel:has(> #fmPagerBody[hidden]) { flex: none; }
.fm-dispatch-panel { flex: none; transition: background-color .15s, border-color .15s, box-shadow .15s, color .15s; }
.fm-dispatch-panel:has(#fmDispatchPlay[aria-pressed="true"]) { color: #182127; background: #f5f8fa; border-color: var(--fm-olive); box-shadow: 0 0 0 1px var(--fm-olive), var(--fm-shadow); }
.fm-dispatch-panel:has(#fmDispatchPlay[aria-pressed="true"]) .fm-panel-heading { border-color: #cdcdd2; }
.fm-dispatch-panel:has(#fmDispatchPlay[aria-pressed="true"]) .fm-button { color: #182127; background: #ededed; border-color: #cdcdd2; }
.fm-dispatch-panel:has(#fmDispatchPlay[aria-pressed="true"]) input { accent-color: var(--fm-olive); }
.fm-dispatch-panel[data-traffic="true"] { border-color: var(--fm-amber); box-shadow: 0 0 0 1px var(--fm-amber), var(--fm-shadow); }
.fm-dispatch-traffic-icon { display: none; width: 20px; height: 20px; color: var(--fm-amber); flex: none; }
.fm-dispatch-panel[data-traffic="true"] .fm-dispatch-traffic-icon { display: block; }
.fm-dispatch-body { padding: 8px 12px; display: flex; align-items: center; gap: 8px; font-size: 11px; }
.fm-dispatch-body .fm-button { min-height: 32px; min-width: 56px; padding: 4px 8px; font-size: 12px; }
.fm-dispatch-panel .fm-dispatch-body .fm-button[data-state="error"] { border-color: var(--fm-amber); }
.fm-dispatch-body input { flex: 1; min-width: 0; width: 60px; accent-color: var(--fm-link); }
.fm-dispatch-body output { min-width: 32px; text-align: right; }
.fm-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
#fmPagerBody { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.fm-pager-panel:has(> #fmPagerBody[hidden]) { bottom: auto; }
.fm-pager-filters { display: flex; gap: 6px; padding: 8px 12px 4px; }
.fm-pager-filters .fm-pager-filter { min-height: 30px; padding: 4px 10px; font-size: 11px; font-weight: 600; color: var(--fm-text-subtle); background: transparent; }
.fm-pager-filters .fm-pager-filter[aria-pressed="true"] { color: var(--fm-sidebar-text); background: var(--fm-sidebar-alt); border-color: var(--fm-sidebar-border); }
#fmPagerMount, .fm-pager-panel .pager-section { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.fm-panel-caption { font-size: 11px; color: var(--fm-text-subtle); padding: 10px 12px 4px; }
.fm-pager-panel .pager-header { padding: 4px 12px 10px; }
.fm-pager-panel .pager-title { display: none; }
.fm-pager-panel .pager-meta { color: var(--fm-text-subtle); font-size: 11px; }
.fm-pager-panel .pager-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 12px; scrollbar-width: thin; }
.fm-pager-panel .pager-item { border-top: 1px solid var(--fm-border); padding: 12px 0; font-size: 12px; }
.fm-pager-item-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 -12px; padding: 6px 12px; background: #283640; }
.fm-pager-group { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.fm-pager-alias { font-size: 11px; font-weight: 600; color: var(--fm-link); }
.fm-pager-agency { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; border: 0; border-radius: 3px; padding: 1px 5px; font-size: 9px; font-weight: 800; line-height: 1.35; letter-spacing: .03em; color: var(--fm-brand-on); background: #a20e00; }
.fm-pager-agency--ses { color: var(--fm-text-on-dark); background: #e48525; }
.fm-pager-time { flex-shrink: 0; font-size: 10px; color: var(--fm-text-subtle); }
.fm-pager-panel .message { padding-top: 8px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.fm-pager-panel .attributes { color: var(--fm-link); padding-top: 4px; }
.fm-pager-panel .timestamp { color: var(--fm-text-subtle); font-size: 11px; padding-top: 4px; }
.fm-status-rail { position: absolute; top: 120px; right: 16px; width: 288px; z-index: 5; max-height: calc(100% - 160px); overflow-y: auto; display: grid; gap: 12px; scrollbar-width: thin; }
.fm-status-body { padding: 12px; font-size: 12px; line-height: 1.5; }
.fm-status-body p { margin: 8px 0; }
.fm-source { color: var(--fm-text-subtle); font-size: 11px; }
.fm-rating { display: block; font-size: 22px; }
#fmFdrBody { display: grid; grid-template-columns: 100px minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 10px 12px; }
#fmFdrRegion { grid-column: 2; grid-row: 1; margin: 0; }
#fmFdrImage { grid-column: 1; grid-row: 1 / 3; width: 100px; height: 68px; object-fit: contain; margin: 0; display: block; }
#fmFdrRating { grid-column: 2; grid-row: 2; font-size: 17px; line-height: 1.3; }
#fmTfb { grid-column: 1 / -1; margin: 6px 0 0; font-size: 11px; }
.fm-fbi { grid-column: 1 / -1; border-top: 1px solid var(--fm-border); margin-top: 8px; padding-top: 8px; font-size: 12px; }
.fm-fbi-heading { display: flex; justify-content: space-between; font-weight: 600; }
.fm-fbi-heading span { font-weight: 400; color: var(--fm-text-subtle); font-size: 11px; }
#fmFbiValues { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
#fmFbiValues .fm-fbi-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
  border-radius: var(--fm-radius-control); background: var(--fm-panel-alt); color: var(--fm-text);
  font-weight: 600; border: 1px solid var(--fm-border);
}
#fmFbiValues .fm-fbi-pill[data-band="dark-purple"] { background: #552d85; color: #ffffff; border-color: #552d85; }
#fmFbiValues .fm-fbi-pill[data-band="mid-purple"] { background: #9c97bf; color: #182127; border-color: #9c97bf; }
#fmFbiValues .fm-fbi-pill[data-band="light-purple"] { background: #dadbec; color: #182127; border-color: #dadbec; }
#fmFbiValues .fm-fbi-pill[data-band="yellow"] { background: #ffe3ad; color: #182127; border-color: #ffe3ad; }
#fmFbiValues .fm-fbi-pill[data-band="orange"] { background: #f18a5b; color: #182127; border-color: #f18a5b; }
#fmFbiValues .fm-fbi-pill[data-band="red"] { background: #b51b2a; color: #ffffff; border-color: #b51b2a; }
#fmFbiValues strong { font-size: 17px; margin-left: 4px; }
#fmFdrBody:has(#fmFdrImage[hidden]) { grid-template-columns: minmax(0, 1fr); }
#fmFdrBody:has(#fmFdrImage[hidden]) #fmFdrRegion,
#fmFdrBody:has(#fmFdrImage[hidden]) #fmFdrRating { grid-column: 1; }
.fm-threshold-symbol { color: var(--fm-text-subtle); width: 42px; height: 42px; display: grid; place-items: center; margin: 2px auto 12px; }
.fm-threshold-symbol .fm-icon { width: 42px; height: 42px; stroke-width: 1.5; }
.fm-threshold-label { display: block; text-align: center; font-size: 15px; }
#fmPddBody { padding: 10px 12px; }
#fmPddBody .fm-threshold-symbol { width: 32px; height: 32px; margin-bottom: 8px; }
#fmPddBody .fm-threshold-symbol .fm-icon { width: 32px; height: 32px; }
#fmPddDetail { font-size: 11px; text-align: center; }
#fmPddBody[data-pdd-state="active"] .fm-threshold-symbol { color: var(--fm-olive); }
#fmPddBody[data-pdd-state="suspended"] .fm-threshold-symbol { color: var(--fm-link); }
[data-theme="dark"] #fmPddBody[data-pdd-state="active"] .fm-threshold-symbol { color: #9acb65; }
.fm-status-body a { color: var(--fm-link); }
.fm-shell .hud { color: var(--fm-text); background: var(--fm-overlay-bg); bottom: 12px; max-width: calc(100% - 160px); font-size: 10px; }
.fm-shell .hud .fm-utm-emphasis { color: #ffffff; font-size: 1.2em; font-weight: 700; line-height: 1; }
.fm-shell .dock { grid-column: 2; grid-row: 3; display: flex; flex-direction: column; min-height: 0; background: var(--fm-panel); border-color: var(--fm-border); }
.fm-shell .dock .bar { flex: 0 0 auto; height: auto; min-height: 44px; gap: 12px; padding: 0 14px; color: var(--fm-text); background: #182127; }
.fm-shell .pager-content {
  display: block; min-width: 0; margin-right: 0;
  color: #cdcdde; background: #182127; padding: 6px 12px; border-radius: 6px;
  font-size: 20px; font-weight: 700; line-height: 1.4;
  white-space: normal; overflow-wrap: anywhere; overflow: visible; text-overflow: clip;
}
.fm-shell .pager-alert-icon { display: inline-flex; vertical-align: middle; margin-right: 12px; width: 24px; height: 24px; color: #a20e00; }
.fm-shell .pager-alert-icon svg { width: 100%; height: 100%; fill: currentColor; }
.fm-shell .pager-alert-mark { fill: #182127; }
.fm-shell .pager-timestamp { color: #cdcdde; font-size: 14px; margin-left: 12px; white-space: nowrap; }
.fm-shell .dock-right { flex-shrink: 0; }
.fm-shell .toggle { color: var(--fm-text); border-color: var(--fm-border); min-height: 32px; font-size: 11px; }
.fm-shell .dock .wx-host { flex: 0 0 var(--fm-weather-height); width: 100%; min-height: 0; height: var(--fm-weather-height); overflow: hidden; }
.fm-weather-collapsed .dock .wx-host { display: none; }
.fm-weather-collapsed .dock-right .muted { display: none; }
.fm-shell.fm-map-only .fm-pager-panel, .fm-shell.fm-map-only .fm-status-rail { display: none; }
.fm-shell #toast { top: calc(var(--fm-header-height) + 8px); background: var(--fm-panel); color: var(--fm-text); z-index: 35; }
.fm-shell .popup-dark .maplibregl-popup-content { background: var(--fm-panel); color: var(--fm-text); }
.fm-shell .popup-dark .sub, .fm-shell .popup-dark .lbl { color: var(--fm-text-subtle); }
.fm-shell .popup-dark code { color: var(--fm-text); }
.fm-shell .popup-dark .popup-links a { color: var(--fm-link); background: var(--fm-panel-alt); border-color: var(--fm-border); }
.fm-shell .popup-dark .vic-warning-body { background: var(--fm-panel-alt); }
@media (max-width: 1439px) {
  .fm-workspace-title { display: none; }
  .fm-pager-panel { width: 270px; }
  .fm-status-rail { width: 260px; }
  #fmDate { max-width: 190px; white-space: normal; }
}
@media (max-width: 1023px) {
  .fm-shell .fm-header { gap: 8px; padding-inline: 8px; }
  .fm-workspace-title, .fm-header #fmDate { display: none; }
  .fm-time { gap: 0; }
  .fm-header .brand strong { font-size: 21px; }
  .fm-shell { --fm-sidebar-current: 0px; }
  .fm-shell.fm-sidebar-collapsed { --fm-sidebar-current: 0px; }
  .fm-sidebar { position: absolute; top: var(--fm-header-height); bottom: 0; left: 0; width: min(300px, 85vw); box-shadow: var(--fm-shadow); }
  .fm-sidebar-collapsed .fm-sidebar { display: none; }
  .fm-status-rail { display: none; width: min(310px, calc(100% - 32px)); }
  .fm-shell.fm-show-weather .fm-status-rail { display: grid; }
  .fm-shell.fm-show-weather .fm-pager-panel { display: none; }
  .fm-pager-panel { width: min(310px, calc(100% - 32px)); }
  .fm-shell .dock-right .muted { display: none; }
  .fm-sidebar { overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom); }
  .fm-primary-nav { flex: none; overflow: visible; }
  .fm-primary-nav button, .fm-sidebar-footer button, .fm-tree-disclosure,
  .fm-map-toolbar .menu > button, .fm-map-toolbar .row { min-height: 44px; }
  .fm-tree .row { min-height: 44px; font-size: 14px; }
  .fm-tree .row label, .fm-tree .row a { padding-block: 8px; overflow-wrap: anywhere; }
  .fm-tree .row a { display: block; }
  .fm-tree-heading input, .fm-tree .row input[type="checkbox"] { width: 20px; height: 20px; }
  .fm-map-toolbar .dropdown { max-width: calc(100vw - 70px); max-height: calc(100dvh - var(--fm-header-height) - 80px); }
}
@media (max-width: 1200px) {
  :root { --fm-weather-height: 110px; }
}
@media (max-width: 700px) {
  :root { --fm-weather-height: 135px; }
}
@media (max-width: 600px) {
  :root { --fm-header-height: 52px; }
  .fm-shell .fm-header { gap: 8px; padding-right: 8px; }
  .fm-header .brand { gap: 6px; }
  .fm-header .brand strong { font-size: 19px; }
  .fm-header .brand img { width: 22px; height: 22px; }
  .fm-header .clock { font-size: 18px; }
  #fmDate { display: none; }
  .fm-time { gap: 0; }
  .fm-pager-panel { top: 64px; right: 12px; bottom: 12px; left: 12px; }
  .fm-map-feed-stack { top: 64px; right: 12px; bottom: 12px; left: 12px; width: auto; }
  .fm-status-rail { right: 12px; }
  .fm-shell .hud { display: none; }
  .fm-shell .dock .bar { padding-inline: 8px; gap: 8px; }
  .fm-shell .pager-content { font-size: 18px; }
  .fm-map-toolbar .dropdown { min-width: 250px; left: auto !important; right: 0 !important; }
}
@media (max-width: 767px), (max-width: 1023px) and (max-height: 500px) {
  :root { --fm-header-height: 80px; }
  .fm-shell .fm-header {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px;
    grid-template-rows: 44px 24px; gap: 0 8px; padding: 6px 8px;
  }
  .fm-header .spacer { display: none; }
  .fm-header #sidebarToggle { grid-column: 1; grid-row: 1; }
  .fm-header .brand { grid-column: 2; grid-row: 1; gap: 6px; }
  .fm-header .brand strong { font-size: 19px; white-space: nowrap; }
  .fm-header .brand img { width: 22px; height: 22px; }
  .fm-header #themeToggle { grid-column: 3; grid-row: 1; }
  .fm-header .fm-time { grid-column: 1 / -1; grid-row: 2; gap: 0; justify-self: center; }
  .fm-header .clock { font-size: 18px; }
  .fm-header #fmDate { display: none; }
  .fm-header .fm-icon-button { min-width: 44px; min-height: 44px; }
  .fm-shell .dock, .fm-shell .fm-map-feed-stack, .fm-shell .fm-pager-panel, .fm-shell .fm-status-rail,
  .fm-panel-visibility-controls { display: none !important; }
  .fm-shell.fm-mobile-pager-open .fm-map-feed-stack {
    display: flex !important; inset: 0; width: auto; z-index: 30; gap: 0;
    padding-bottom: env(safe-area-inset-bottom); background: var(--fm-page); pointer-events: auto;
  }
  .fm-shell.fm-mobile-pager-open .fm-pager-panel { display: flex !important; flex: 1; border: 0; border-radius: 0; box-shadow: none; }
  .fm-shell.fm-mobile-pager-open .fm-pager-panel .fm-panel-heading { display: none; }
  .fm-shell.fm-mobile-pager-open .fm-pager-filters .fm-pager-filter { min-height: 44px; padding-inline: 16px; font-size: 13px; }
  .fm-shell.fm-mobile-pager-open .fm-pager-panel .pager-item { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .fm-shell *, .fm-shell *::before { transition: none !important; animation: none !important; }
}
@media (max-height: 650px) {
  .fm-sidebar { display: block; }
  .fm-tree { overflow: visible; }
}
