
/* Keep forced-colors rules ahead of the authored control layers. */
@layer north-wildwood-forced-colors {
  @media (forced-colors: active) {
    body[data-shorelysafe-ui] [role="switch"] {
      forced-color-adjust:none;
      box-sizing:border-box;
      border:1px solid ButtonText !important;
      background:ButtonFace !important;
      transition:none !important;
    }
    body[data-shorelysafe-ui] [role="switch"]::after {
      background:ButtonText !important;
      transition:none !important;
    }
    body[data-shorelysafe-ui] [role="switch"][aria-checked="true"] {
      border-color:Highlight !important;
      background:Highlight !important;
    }
    body[data-shorelysafe-ui] [role="switch"][aria-checked="true"]::after {
      background:HighlightText !important;
    }
    body[data-shorelysafe-ui] [role="switch"]:focus-visible {
      outline-color:Highlight !important;
    }

    body[data-shorelysafe-ui] :is(button[aria-pressed="true"],[role="tab"][aria-selected="true"],.timeline-day[aria-current="true"]) {
      text-decoration:underline !important;
      text-decoration-thickness:2px !important;
    }

    /* These paints encode the same water categories as the map raster. */
    #legendDock :is(.depth-legend-gradient,.stage-legend-green,.stage-legend-gradient),
    #timelineDock :is(.timeline-key-swatch,.road-impacts-swatch) {
      forced-color-adjust:none;
      border:1px solid CanvasText !important;
    }
    #timelineDock .timeline-day {
      position:relative !important;
      background-image:none !important;
    }
    #timelineDock .timeline-day::after {
      forced-color-adjust:none;
      content:"" !important;
      position:absolute !important;
      inset:auto 1px 1px !important;
      height:4px !important;
      border:0 !important;
      background:var(--fleet-day-gradient,var(--timeline-day-gradient,none)) !important;
      pointer-events:none;
    }
    #timelineDock #hourSlider {
      forced-color-adjust:none;
      background-image:var(--nww-stage-gradient,linear-gradient(CanvasText,CanvasText)),
        linear-gradient(CanvasText,CanvasText) !important;
      background-position:center !important;
      background-repeat:no-repeat !important;
      background-size:calc(100% - var(--nww-thumb-size,26px)) 5px,
        calc(100% - var(--nww-thumb-size,26px)) 7px !important;
      outline-color:Highlight !important;
    }
    #timelineDock #hourSlider::-webkit-slider-thumb {
      background:Highlight !important;
      border-color:HighlightText !important;
      box-shadow:none !important;
    }
    #timelineDock #hourSlider::-moz-range-thumb {
      background:Highlight !important;
      border-color:HighlightText !important;
      box-shadow:none !important;
    }

    #timelineDock #playBtn .playTriangle {
      forced-color-adjust:none;
      width:13px !important;
      height:16px !important;
      border:0 !important;
      background:ButtonText !important;
      clip-path:polygon(0 0,100% 50%,0 100%);
      filter:none !important;
    }
    #timelineDock #playBtn .pauseIcon::before,
    #timelineDock #playBtn .pauseIcon::after {
      forced-color-adjust:none;
      background:ButtonText !important;
    }
    :is(.centered-close-control,.leaflet-popup-close-button,.maplibregl-popup-close-button)::before,
    :is(.centered-close-control,.leaflet-popup-close-button,.maplibregl-popup-close-button)::after {
      forced-color-adjust:none;
      --nww-close-ink:ButtonText;
    }
  }
}

/* Shared click-depth card. Keep the existing heading, depth, units and query states. */
@layer shorely-depth-pill {
  :is(.leaflet-popup,.maplibregl-popup):has(:is(.depth-query-popup,.shorely-v11-depth-query)) {
    --depth-pill-width:min(320px,calc(100vw - 32px));
    --depth-pill-bg:rgba(11,18,32,.96);
    max-width:var(--depth-pill-width) !important;
  }
  :is(.leaflet-popup,.maplibregl-popup):has(:is(.depth-query-popup,.shorely-v11-depth-query))
  :is(.leaflet-popup-content-wrapper,.maplibregl-popup-content) {
    box-sizing:border-box !important;
    width:var(--depth-pill-width) !important;
    min-width:0 !important;
    max-width:var(--depth-pill-width) !important;
    margin:0 !important;
    padding:0 !important;
    overflow:visible !important;
    border:1px solid rgba(125,249,255,.42) !important;
    border-radius:20px !important;
    background:var(--depth-pill-bg) !important;
    color:#c9d8ee !important;
    box-shadow:0 10px 26px rgba(2,6,23,.24) !important;
  }
  .leaflet-popup:has(:is(.depth-query-popup,.shorely-v11-depth-query)) .leaflet-popup-content {
    box-sizing:border-box !important;
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
  }
  :is(.leaflet-popup,.maplibregl-popup) :is(.depth-query-popup,.shorely-v11-depth-query) {
    box-sizing:border-box !important;
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
    padding:18px 24px 20px !important;
    color:#c9d8ee !important;
    font:16px/1.25 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
    text-align:center !important;
  }
  :is(.leaflet-popup,.maplibregl-popup) :is(.depth-query-popup,.shorely-v11-depth-query) h3 {
    display:block !important;
    width:auto !important;
    margin:0 0 10px !important;
    padding:0 !important;
    color:#c9d8ee !important;
    font-size:20px !important;
    font-weight:750 !important;
    line-height:1.2 !important;
    letter-spacing:0 !important;
    text-align:center !important;
    white-space:normal !important;
    overflow-wrap:normal !important;
  }
  :is(.leaflet-popup,.maplibregl-popup) :is(.depth-query-value,.shorely-v11-depth-value) {
    display:block !important;
    width:auto !important;
    min-width:0 !important;
    margin:0 !important;
    padding:0 !important;
    color:#7df9ff !important;
    font-size:48px !important;
    font-weight:900 !important;
    line-height:1.08 !important;
    letter-spacing:-.035em !important;
    font-variant-numeric:tabular-nums !important;
    text-align:center !important;
    white-space:nowrap !important;
  }
  :is(.leaflet-popup,.maplibregl-popup) :is(.depth-query-number,.depth-query-unit) {
    color:inherit !important;
    font-size:inherit !important;
    font-weight:inherit !important;
    line-height:inherit !important;
    letter-spacing:inherit !important;
  }
  .leaflet-popup:has(:is(.depth-query-popup,.shorely-v11-depth-query)) .leaflet-popup-tip {
    border:1px solid rgba(125,249,255,.42) !important;
    border-top:0 !important;
    border-left:0 !important;
    background:var(--depth-pill-bg) !important;
    box-shadow:none !important;
  }
  .maplibregl-popup:has(:is(.depth-query-popup,.shorely-v11-depth-query)) .maplibregl-popup-tip {
    border-top-color:transparent !important;
    border-right-color:transparent !important;
    border-bottom-color:transparent !important;
    border-left-color:transparent !important;
  }
  .maplibregl-popup:is(.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right):has(:is(.depth-query-popup,.shorely-v11-depth-query)) .maplibregl-popup-tip {border-top-color:var(--depth-pill-bg) !important;}
  .maplibregl-popup:is(.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right):has(:is(.depth-query-popup,.shorely-v11-depth-query)) .maplibregl-popup-tip {border-bottom-color:var(--depth-pill-bg) !important;}
  .maplibregl-popup.maplibregl-popup-anchor-left:has(:is(.depth-query-popup,.shorely-v11-depth-query)) .maplibregl-popup-tip {border-right-color:var(--depth-pill-bg) !important;}
  .maplibregl-popup.maplibregl-popup-anchor-right:has(:is(.depth-query-popup,.shorely-v11-depth-query)) .maplibregl-popup-tip {border-left-color:var(--depth-pill-bg) !important;}
  @media (max-width:360px) {
    :is(.leaflet-popup,.maplibregl-popup) :is(.depth-query-popup,.shorely-v11-depth-query) {padding:18px 18px 20px !important;}
    :is(.leaflet-popup,.maplibregl-popup) :is(.depth-query-popup,.shorely-v11-depth-query) h3 {font-size:18px !important;}
    :is(.leaflet-popup,.maplibregl-popup) :is(.depth-query-value,.shorely-v11-depth-value) {font-size:44px !important;}
  }
}
@layer floodmapper-unified-polish,floodmapper-unified-base-polish,floodmapper-unified-base;
@layer floodmapper-unified-base-polish,floodmapper-unified-base;

@layer floodmapper-unified-base {
  html body[data-shorelysafe-ui] {
    --fleet-panel:rgba(11,18,32,.94);
    --fleet-line:rgba(191,219,254,.16);
    --fleet-text:#eaf0ff;
    --fleet-accent:#60a5fa;
    color:var(--fleet-text) !important;
    font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
  }
  body[data-shorelysafe-ui] .brick-nav {display:none !important;}
  body[data-shorelysafe-ui] :is(#leftPanel,#rightRail,#mobileRailMount) {
    gap:8px !important;overflow-x:hidden !important;scrollbar-width:thin !important;
    scrollbar-color:rgba(125,249,255,.5) transparent !important;
  }
  body[data-shorelysafe-ui] :is(#leftPanel,#rightRail,#mobileRailMount) > :is(.panel-card,.rail-card) {
    box-sizing:border-box !important;background:var(--fleet-panel) !important;
    color:var(--fleet-text) !important;border:1px solid var(--fleet-line) !important;
    border-radius:16px !important;padding:10px 12px !important;margin:0 !important;
    min-width:0 !important;box-shadow:0 12px 24px rgba(15,23,42,.20) !important;
  }
  body[data-shorelysafe-ui] :is(#leftPanel,#rightRail,#mobileRailMount) :is(h2,h3,.section-title) {
    font-size:14px !important;line-height:1.25 !important;letter-spacing:0 !important;
  }
  body[data-shorelysafe-ui] :is(#leftPanel,#rightRail,#mobileRailMount) .section-title {
    margin:0 0 8px !important;gap:8px !important;align-items:center !important;
  }
  body[data-shorelysafe-ui] :is(#leftPanel,#rightRail,#mobileRailMount) .title-with-help {
    gap:7px !important;min-width:0 !important;
  }
  body[data-shorelysafe-ui] :is(#leftPanel,#rightRail,#mobileRailMount) :is(.button-grid-2,.button-grid-3,.segmented-control,.data-source-options) {
    gap:6px !important;min-width:0 !important;
  }
  body[data-shorelysafe-ui] #leftPanel :is(.button-grid-2,.segmented-control) {display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
  body[data-shorelysafe-ui] #leftPanel .data-source-options:has(#returnIntervalDataBtn) {grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
  body[data-shorelysafe-ui] :is(#leftPanel,#rightRail,#mobileRailMount) button:not(.help-btn):not(.centered-close-control):not(.calendar-day):not(.calendar-nav-btn) {
    box-sizing:border-box !important;min-height:40px !important;border-radius:12px !important;
    font-size:12px !important;line-height:1.15 !important;font-weight:750 !important;
    background:rgba(255,255,255,.06) !important;color:var(--fleet-text) !important;
    white-space:normal !important;overflow-wrap:normal !important;
  }
  body[data-shorelysafe-ui] :is(#leftPanel,#rightRail,#mobileRailMount) button.active:not(.help-btn):not(.centered-close-control):not(.calendar-day):not(.calendar-nav-btn) {
    color:var(--fleet-accent) !important;border-color:var(--fleet-accent) !important;
    background:rgba(96,165,250,.16) !important;
  }
  body[data-shorelysafe-ui] :is(#leftPanel,#rightRail,#mobileRailMount) .help-btn {
    width:26px !important;min-width:26px !important;height:26px !important;min-height:26px !important;
    border-radius:50% !important;font-size:16px !important;display:grid !important;place-items:center !important;
  }
  body[data-shorelysafe-ui] :is(#leftPanel,#rightRail,#mobileRailMount) .pill {
    max-width:58% !important;padding:3px 9px !important;font-size:13px !important;
    line-height:1.1 !important;border-radius:999px !important;white-space:normal !important;
    background:#29576c !important;color:#eafaff !important;border:1px solid #84d9ee !important;
  }
  body[data-shorelysafe-ui] #leftPanel > .data-source-card {order:1 !important;}
  body[data-shorelysafe-ui] #leftPanel > :is(#calendarCard,.return-interval-card) {order:2 !important;}
  body[data-shorelysafe-ui] #leftPanel > .overlay-card {order:3 !important;}
  body[data-shorelysafe-ui] #leftPanel > .datum-card {order:4 !important;}
  body[data-shorelysafe-ui] #leftPanel > .opacity-card {order:5 !important;}
  body[data-shorelysafe-ui] #leftPanel > :is(.overlay-card,.datum-card) {
    --pj-equal-card-h:auto !important;
    height:auto !important;min-height:0 !important;max-height:none !important;flex:0 0 auto !important;
  }
  body[data-shorelysafe-ui] #leftPanel > #timelineIntervalCard {order:6 !important;}
  body[data-shorelysafe-ui] #leftPanel > #legendDock {order:7 !important;}
  body[data-shorelysafe-ui] #leftPanel > .snapshot-card {order:8 !important;}
  body[data-shorelysafe-ui] #leftPanel > .mobile-top-tides-card {order:9 !important;}
  body[data-shorelysafe-ui] #leftPanel > #mobileRailMount {order:10 !important;}
  body[data-shorelysafe-ui] #rightRail > .layers-card {order:1 !important;}
  body[data-shorelysafe-ui] #rightRail > :is(.town-address-card,.penns-grove-address-card) {order:2 !important;}
  body[data-shorelysafe-ui] #rightRail > #downloadCard {order:3 !important;}
  body[data-shorelysafe-ui] #rightRail > .top-tides-card {order:4 !important;}
  body[data-shorelysafe-ui] #rightRail > #mapperTutorialBtn {order:5 !important;}
  body[data-shorelysafe-ui] #leftPanel > #legendDock {
    position:static !important;inset:auto !important;transform:none !important;width:100% !important;
    max-width:none !important;min-height:0 !important;flex:0 0 auto !important;
  }
  body[data-shorelysafe-ui] :is(#leftPanel,#rightRail,#mobileRailMount) .layer-list {
    display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:6px !important;
  }
  body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount) .layer-item {
    display:grid !important;grid-template-columns:34px minmax(0,1fr) !important;gap:6px !important;align-items:center !important;
    min-width:0 !important;min-height:40px !important;height:auto !important;
    padding:7px !important;border-radius:12px !important;
  }
  body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount) .layer-name {
    font-size:10.5px !important;line-height:1.1 !important;white-space:normal !important;overflow-wrap:anywhere !important;word-break:normal !important;
  }
  body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount) .layer-item:has(#nsiStructuresToggle) {grid-column:1 / -1 !important;}
  body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount) .layer-meta {min-width:0 !important;}
  body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount) .toggle {
    width:34px !important;min-width:34px !important;height:20px !important;border-radius:999px !important;
  }
  body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount) .toggle::after {
    width:14px !important;height:14px !important;top:3px !important;left:3px !important;transform:none !important;
  }
  body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount) .toggle.on::after {left:17px !important;transform:none !important;}
  body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount) .top-tide-item {
    display:grid !important;grid-template-columns:20px minmax(0,1fr) auto !important;gap:5px !important;
    align-items:center !important;min-height:34px !important;padding:6px 7px !important;text-align:left !important;
  }
  body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount) .top-tide-item > * {
    grid-row:1 !important;font-size:11px !important;line-height:1.2 !important;margin:0 !important;
  }
  body[data-shorelysafe-ui] #downloadCard :is(.rail-head,.download-launch-meta) {display:none !important;}
  body[data-shorelysafe-ui] #downloadCard {height:auto !important;min-height:0 !important;max-height:none !important;}
  body[data-shorelysafe-ui] #openDownloadModalBtn {width:100% !important;margin:0 !important;}
  body[data-shorelysafe-ui] #mapperTutorialBtn#mapperTutorialBtn {
    background:var(--fleet-panel) !important;color:var(--fleet-text) !important;
    border:1px solid var(--fleet-line) !important;
  }
  body[data-shorelysafe-ui] :is(button,input,select,a):focus-visible {
    outline:3px solid #7df9ff !important;outline-offset:3px !important;
  }
  body[data-shorelysafe-ui] :is(#downloadModal,#infoModal,#datumModal) .modal-card {
    border-radius:18px !important;background:var(--fleet-panel) !important;color:var(--fleet-text) !important;
  }
  @media (min-width:901px) and (min-height:561px) and (not (any-pointer:coarse)), (min-width:1367px) and (min-height:561px), (min-width:901px) and (pointer:fine) and (not (any-pointer:coarse)), (min-width:1367px) and (pointer:fine), (min-width:901px) and (pointer:none) and (not (any-pointer:coarse)), (min-width:1367px) and (pointer:none) {
    /* Keep the first slider thumb outside the play button's column. */
    body[data-shorelysafe-ui]:not(.mobile-optimized) #timelineDock .timeline-trackRow {
      box-sizing:border-box !important;min-width:0 !important;padding:0 !important;
      margin-left:64px !important;width:calc(100% - 64px) !important;
    }
    body[data-shorelysafe-ui]:not(.mobile-optimized) #timelineDock .timeline-trackRow #hourSlider {
      box-sizing:border-box !important;min-width:0 !important;width:100% !important;margin:0 !important;
    }
    body[data-shorelysafe-ui]:not(.mobile-optimized) #leftPanel {
      width:356px !important;max-width:calc(100vw - 520px) !important;
      top:16px !important;left:16px !important;bottom:180px !important;
      padding:0 4px 8px 0 !important;overflow-y:auto !important;
    }
    body[data-shorelysafe-ui]:not(.mobile-optimized) #rightRail {
      width:260px !important;top:16px !important;right:16px !important;left:auto !important;
      bottom:156px !important;max-height:calc(100dvh - 172px) !important;overflow-y:auto !important;
    }
  }
  @media (min-width:901px) and (max-width:1199px) and (min-height:561px) and (not (any-pointer:coarse)), (min-width:901px) and (max-width:1199px) and (pointer:fine) and (not (any-pointer:coarse)), (min-width:901px) and (max-width:1199px) and (pointer:none) and (not (any-pointer:coarse)) {
    body[data-shorelysafe-ui]:not(.mobile-optimized) #leftPanel {width:286px !important;max-width:286px !important;}
    body[data-shorelysafe-ui]:not(.mobile-optimized) #rightRail {width:224px !important;}
  }
  @media (max-width:900px), (max-width:1366px) and (any-pointer:coarse), (max-height:560px) and (pointer:coarse) {
    body[data-shorelysafe-ui].mobile-optimized #leftPanel {
      gap:8px !important;overflow-y:auto !important;overflow-x:hidden !important;
    }
    body[data-shorelysafe-ui].mobile-optimized :is(#leftPanel,#mobileRailMount) > :is(.panel-card,.rail-card) {
      border-radius:18px !important;box-shadow:none !important;
    }
    body[data-shorelysafe-ui].mobile-optimized :is(#leftPanel,#mobileRailMount) button:not(.help-btn):not(.centered-close-control):not(.calendar-day):not(.calendar-nav-btn) {
      min-height:44px !important;font-size:13px !important;
    }
    body[data-shorelysafe-ui].mobile-optimized :is(#townAddressInput,#observedDateInput,#calendarPopover select) {font-size:16px !important;}
  }
  @media (prefers-reduced-motion:reduce) {
    body[data-shorelysafe-ui] :is(.panel-card,.rail-card,button) {transition:none !important;}
  }
}

/* Avalon timeline layout, scoped to North Wildwood. Share the WordPress layer
   so old inline stylesheets cannot split the day strip from the native range. */
@layer floodmapper-unified-base {
  html[data-nww-avalon-timeline] body #timelineDock {
    display:block !important; position:fixed !important; left:16px !important; right:16px !important; bottom:16px !important;
    width:auto !important; min-width:0 !important; max-width:none !important;
    height:112px !important; min-height:112px !important; max-height:112px !important;
    padding:0 !important; margin:0 !important; transform:none !important;
    border-radius:16px !important; background:rgba(11,18,32,.97) !important;
  }
  html[data-nww-avalon-timeline] body #timelineDock .timeline-top,
  html[data-nww-avalon-timeline] body #timelineDock .timeline-controls { display:contents !important; }
  html[data-nww-avalon-timeline] body #timelineDock #playBtn {
    position:absolute !important; top:34px !important; bottom:auto !important; left:20px !important; right:auto !important;
    display:grid !important; place-items:center !important; width:42px !important; height:42px !important;
    min-width:42px !important; max-width:42px !important; min-height:42px !important; max-height:42px !important;
    padding:0 !important; margin:0 !important; border:1px solid #e2e8f0 !important; border-radius:12px !important;
    background:linear-gradient(#fff,#edf2f7) !important; color:#ef4444 !important;
    transform:none !important; touch-action:manipulation !important;
  }
  html[data-nww-avalon-timeline] body #timelineDock #playBtn .playTriangle { border-left-color:#ef4444 !important; }
  html[data-nww-avalon-timeline] body #timelineDock #playBtn .pauseIcon::before,
  html[data-nww-avalon-timeline] body #timelineDock #playBtn .pauseIcon::after { background:#ef4444 !important; }
  html[data-nww-avalon-timeline] body #timelineDock #timelineFloodKey {
    display:flex !important; visibility:visible !important; opacity:1 !important;
    flex-direction:row !important; flex-wrap:nowrap !important; align-items:center !important; justify-content:center !important;
    gap:12px !important; pointer-events:none !important;
    position:absolute !important; left:84px !important; right:20px !important; top:12px !important; bottom:auto !important;
    width:auto !important; max-width:none !important; height:20px !important; min-height:20px !important; max-height:20px !important;
    padding:0 !important; margin:0 !important; transform:none !important;
  }
  html[data-nww-avalon-timeline] body #timelineDock #timelineFloodKey .timeline-key-item {
    display:flex !important; flex:0 0 auto !important; align-items:center !important; gap:4px !important;
    width:auto !important; min-width:0 !important; max-width:none !important;
  }
  html[data-nww-avalon-timeline] body #timelineDock #timelineFloodKey .timeline-key-label {
    display:inline !important; visibility:visible !important; color:#f1f5f9 !important;
    font-size:11px !important; line-height:16px !important; white-space:nowrap !important;
  }
  html[data-nww-avalon-timeline] body #timelineDock #timelineFloodKey .timeline-key-swatch {
    display:block !important; width:9px !important; height:9px !important; flex:0 0 9px !important; border-radius:50% !important;
  }
  html[data-nww-avalon-timeline] body #timelineDock #timelineFloodKey .timeline-key-item::after { content:none !important; }
  html[data-nww-avalon-timeline] body #timelineDock #timelineDayTabs {
    position:absolute !important; left:97px !important; right:33px !important; top:42px !important; bottom:auto !important;
    display:flex !important; width:auto !important; min-width:0 !important; max-width:none !important;
    height:20px !important; min-height:20px !important; max-height:20px !important;
    padding:0 !important; margin:0 !important; border:0 !important; gap:0 !important; transform:none !important;
  }
  html[data-nww-avalon-timeline] body #timelineDock .timeline-day {
    min-width:0 !important; padding:0 !important; margin:0 !important; border:0 !important;
    height:20px !important; min-height:20px !important; max-height:20px !important; font-size:12px !important; line-height:20px !important;
    box-sizing:border-box !important;
  }
  html[data-nww-avalon-timeline] body #timelineDock #timelineDayTabs .timeline-day {
    background-image:var(--timeline-day-gradient,none) !important;
    background-size:100% 100% !important;
    text-shadow:0 1px 3px #000,0 0 6px #000 !important;
  }
  html[data-nww-avalon-timeline] body #timelineDock .timeline-trackRow {
    position:absolute !important; left:84px !important; right:20px !important; top:70px !important; bottom:auto !important;
    display:block !important; grid-area:auto !important; align-self:stretch !important; justify-self:stretch !important; grid-template-columns:minmax(0,1fr) !important;
    width:auto !important; min-width:0 !important; max-width:none !important;
    height:24px !important; min-height:24px !important; max-height:24px !important;
    padding:0 !important; margin:0 !important; gap:0 !important; transform:none !important;
  }
  html[data-nww-avalon-timeline] body #timelineDock #hourSlider {
    --nww-thumb-size:26px;
    position:relative !important; inset:auto !important; display:block !important;
    width:100% !important; min-width:0 !important; max-width:100% !important;
    height:24px !important; min-height:24px !important; max-height:24px !important;
    padding:0 !important; margin:0 !important; border:0 !important; transform:none !important;
    background:var(--nww-stage-gradient,linear-gradient(#94a3b8,#94a3b8)) center / calc(100% - 26px) 5px no-repeat !important;
    touch-action:none !important;
  }
  html[data-nww-avalon-timeline] body #timelineDock #hourSlider::-webkit-slider-runnable-track {
    height:5px !important; border:0 !important; background:transparent !important; box-shadow:none !important;
  }
  html[data-nww-avalon-timeline] body #timelineDock #hourSlider::-moz-range-track,
  html[data-nww-avalon-timeline] body #timelineDock #hourSlider::-moz-range-progress {
    height:5px !important; border:0 !important; background:transparent !important; box-shadow:none !important;
  }
  html[data-nww-avalon-timeline] body #timelineDock #hourSlider::-webkit-slider-thumb {
    box-sizing:border-box !important; width:26px !important; height:26px !important;
    margin-top:-10.5px !important; border:2px solid white !important; background:#2563eb !important;
  }
  html[data-nww-avalon-timeline] body #timelineDock #hourSlider::-moz-range-thumb {
    box-sizing:border-box !important; width:26px !important; height:26px !important;
    border:2px solid white !important; background:#2563eb !important;
  }
  html[data-nww-avalon-timeline] body #timelineDock #timelineStart,
  html[data-nww-avalon-timeline] body #timelineDock #timelineEnd,
  html[data-nww-avalon-timeline] body #timelineDock #pjBlueSliderExactTrackLine { display:none !important; }
  html[data-nww-avalon-timeline] body #timelineDock #timelineTimeBounds { display:none !important; }
  @media (max-width:900px), (max-width:1366px) and (any-pointer:coarse), (max-height:560px) and (pointer:coarse) {
    html[data-nww-avalon-timeline] body #timelineDock {
      left:8px !important; right:8px !important; bottom:calc(8px + env(safe-area-inset-bottom)) !important;
      height:188px !important; min-height:188px !important; max-height:188px !important;
      background:#152132 !important;
    }
    html[data-nww-avalon-timeline] body #timelineDock #playBtn {
      top:8px !important; left:8px !important; width:44px !important; height:44px !important;
      min-width:44px !important; max-width:44px !important; min-height:44px !important; max-height:44px !important;
      border-radius:50% !important;
    }
    html[data-nww-avalon-timeline] body #timelineDock #timelineBubble {
      position:absolute !important; left:62px !important; right:8px !important; top:8px !important; bottom:auto !important;
      width:auto !important; min-width:0 !important; max-width:none !important;
      height:44px !important; min-height:44px !important; max-height:44px !important;
      padding:0 !important; margin:0 !important; border:0 !important; border-radius:0 !important;
      background:transparent !important; box-shadow:none !important; transform:none !important;
      display:flex !important; align-items:center !important; justify-content:space-between !important; gap:8px !important;
    }
    html[data-nww-avalon-timeline] body #timelineDock #timelineBubble .timeline-bubble-current { font-size:15px !important; white-space:nowrap !important; }
    html[data-nww-avalon-timeline] body #timelineDock #timelineBubble .timeline-bubble-stage {
      font-size:15px !important; white-space:nowrap !important; color:white !important;
      padding:1px 6px !important; background:#0b1220 !important; border:1px solid #526277 !important; border-radius:999px !important;
    }
    html[data-nww-avalon-timeline] body #timelineDock #timelineDayTabs {
      top:58px !important; left:86px !important; right:86px !important;
      height:44px !important; min-height:44px !important; max-height:44px !important;
    }
    html[data-nww-avalon-timeline] body #timelineDock .timeline-day { height:44px !important; min-height:44px !important; max-height:44px !important; font-size:15px !important; line-height:44px !important; }
    html[data-nww-avalon-timeline] body #timelineDock .timeline-day-arrow {
      position:absolute !important; top:58px !important; bottom:auto !important; width:72px !important;
      height:44px !important; min-height:44px !important; max-height:44px !important;
      padding:4px !important; margin:0 !important; transform:none !important;
    }
    html[data-nww-avalon-timeline] body #timelineDock #timelinePreviousDay { top:58px !important; left:8px !important; right:auto !important; }
    html[data-nww-avalon-timeline] body #timelineDock #timelineNextDay { top:58px !important; left:auto !important; right:8px !important; }
    html[data-nww-avalon-timeline] body #timelineDock #timelineFloodKey {
      top:108px !important; left:8px !important; right:8px !important;
      height:14px !important; min-height:14px !important; max-height:14px !important; gap:8px !important;
    }
    html[data-nww-avalon-timeline] body #timelineDock #timelineFloodKey .timeline-key-label { font-size:9px !important; line-height:12px !important; }
    html[data-nww-avalon-timeline] body #timelineDock #timelineFloodKey .timeline-key-swatch { width:7px !important; height:7px !important; flex-basis:7px !important; }
    html[data-nww-avalon-timeline] body #timelineDock .timeline-trackRow {
      top:122px !important; left:8px !important; right:8px !important;
      height:44px !important; min-height:44px !important; max-height:44px !important;
    }
    html[data-nww-avalon-timeline] body #timelineDock #hourSlider { height:44px !important; min-height:44px !important; max-height:44px !important; }
    html[data-nww-avalon-timeline] body #timelineDock #timelineTimeBounds {
      position:absolute !important; top:166px !important; left:21px !important; right:21px !important;
      display:flex !important; justify-content:space-between !important; height:14px !important;
      color:#cbd5e1 !important; font-size:10px !important; line-height:14px !important;
      pointer-events:none !important;
    }
    /* A daily peak has no hours to scrub; the day arrows remain available. */
    html[data-nww-avalon-timeline] body #timelineDock[data-single-timeline-time="true"] {
      height:132px !important; min-height:132px !important; max-height:132px !important;
    }
    html[data-nww-avalon-timeline] body #timelineDock[data-single-timeline-time="true"] .timeline-trackRow,
    html[data-nww-avalon-timeline] body #timelineDock[data-single-timeline-time="true"] #timelineTimeBounds { display:none !important; }
  }
  @media (max-width:360px) {
    html[data-nww-avalon-timeline] body #timelineDock #timelineBubble .timeline-bubble-current,
    html[data-nww-avalon-timeline] body #timelineDock #timelineBubble .timeline-bubble-stage { font-size:13px !important; }
  }
  @media (max-width:600px) {
    html[data-nww-avalon-timeline] body:not(.mobile-legend-open) #legendDock {
      top:60px !important; left:8px !important; right:auto !important;
      width:88px !important; min-width:88px !important; max-width:88px !important;
    }
  }
  html[data-nww-avalon-timeline] body #mapTitlePartnerLogo,
  html[data-nww-avalon-timeline] body #rightRailLogo,
  html[data-nww-avalon-timeline] body #topBanner { display:none !important; }
  html[data-nww-avalon-timeline] body #toastCloseBtn {
    --centered-close-x-color:#78350f !important;
    --centered-close-x-size:18px !important;
    width:44px !important; min-width:44px !important; max-width:44px !important;
    height:44px !important; min-height:44px !important; max-height:44px !important;
    border:1px solid #92400e !important; background:#fef3c7 !important;
    flex:0 0 44px !important; touch-action:manipulation !important;
  }
  html[data-nww-avalon-timeline] body #toastCloseBtn:focus-visible {
    outline:3px solid #78350f !important; outline-offset:2px !important;
  }

}

/* North Wildwood phone layout. Share the hosting layer so one stylesheet owns
   mobile geometry without fighting the older global styles or desktop fitter. */
@layer floodmapper-unified-base {
  #nwwMobileControlHeader { display:none !important; }
  @media (max-width:900px), (max-width:1366px) and (any-pointer:coarse), (max-height:560px) and (pointer:coarse) {
    html[data-nww-mobile-layout] body { --nww-key-extra:0px; --nww-mobile-timeline:calc(168px + var(--nww-key-extra)); }
    html[data-nww-mobile-layout] body #mapTitleBadge {
      position:fixed !important; top:calc(8px + env(safe-area-inset-top)) !important;
      left:calc(8px + env(safe-area-inset-left)) !important; right:calc(8px + env(safe-area-inset-right)) !important;
      width:auto !important; min-width:0 !important; max-width:none !important; height:52px !important; min-height:52px !important;
      padding:7px 174px 7px 12px !important; margin:0 !important; transform:none !important;
      display:flex !important; align-items:center !important; justify-content:flex-start !important;
      background:rgba(11,18,32,.88) !important; border:1px solid var(--line) !important; border-radius:14px !important; z-index:6100 !important;
    }
    html[data-nww-mobile-layout] body #mapTitleBadge #mapTitleText {
      width:100% !important; min-width:0 !important; max-width:none !important; margin:0 !important;
      white-space:normal !important; text-align:left !important; font:750 15px/1.18 system-ui !important; max-width:156px !important;
      overflow:visible !important; text-overflow:clip !important;
    }
    html[data-nww-mobile-layout] body #mapTitleLogo { display:none !important; }
    html[data-nww-mobile-layout] body #mobileControlsToggle,
    html[data-nww-mobile-layout] body:not(.mobile-legend-open) #legendDock {
      position:fixed !important; top:calc(12px + env(safe-area-inset-top)) !important;
      left:auto !important; bottom:auto !important; height:44px !important; min-height:44px !important; max-height:44px !important;
      margin:0 !important; padding:0 !important; transform:none !important; border-radius:10px !important;
      background:rgba(255,255,255,.05) !important; border:1px solid var(--line) !important; z-index:6200 !important;
    }
    html[data-nww-mobile-layout] body #mobileControlsToggle { right:calc(12px + env(safe-area-inset-right)) !important; width:94px !important; min-width:94px !important; max-width:94px !important; }
    html[data-nww-mobile-layout] body #mobileControlsToggle::after { font:700 14px/44px system-ui !important; }
    html[data-nww-mobile-layout] body:not(.mobile-legend-open) #legendDock { right:calc(112px + env(safe-area-inset-right)) !important; width:62px !important; min-width:62px !important; max-width:62px !important; }
    html[data-nww-mobile-layout] body:not(.mobile-legend-open) #legendDock::after { content:'Key' !important; font:700 14px/44px system-ui !important; }
    html[data-nww-mobile-layout] body.mobile-legend-open #legendDock {
      position:fixed !important; top:calc(68px + env(safe-area-inset-top)) !important;
      left:calc(8px + env(safe-area-inset-left)) !important; right:calc(8px + env(safe-area-inset-right)) !important;
      width:auto !important; min-width:0 !important; max-width:none !important; height:auto !important;
      max-height:calc(100dvh - 252px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
      padding:14px !important; margin:0 !important; overflow:auto !important; z-index:6250 !important;
    }
    html[data-nww-mobile-layout] body #nwDefaultNavControl {
      position:fixed !important; top:calc(68px + env(safe-area-inset-top)) !important; right:calc(8px + env(safe-area-inset-right)) !important;
      left:auto !important; bottom:auto !important; width:60px !important; height:auto !important; max-height:none !important;
      display:flex !important; flex-direction:column !important; gap:6px !important; overflow:visible !important; transform:none !important;
    }
    html[data-nww-mobile-layout] body #nwDefaultNavControl .nw-direction-wheel { width:60px !important; height:60px !important; border-width:2px !important; }
    html[data-nww-mobile-layout] body #nwDefaultNavControl .nw-wheel-cardinal { font-size:8px !important; }
    html[data-nww-mobile-layout] body #nwDefaultNavControl .nw-wheel-knob { width:22px !important; height:22px !important; margin:-11px 0 0 -11px !important; }
    html[data-nww-mobile-layout] body #nwDefaultNavControl .nw-simple-view { width:44px !important; height:44px !important; min-height:44px !important; border-radius:12px !important; font-size:13px !important; }
    html[data-nww-mobile-layout] body #nwDefaultNavControl .nw-simple-zoom { width:44px !important; height:88px !important; flex-direction:column !important; }
    html[data-nww-mobile-layout] body #nwDefaultNavControl .nw-simple-zoom-button { width:44px !important; height:44px !important; min-height:44px !important; font-size:24px !important; }
    html[data-nww-mobile-layout] body #timelineDock {
      left:calc(8px + env(safe-area-inset-left)) !important; right:calc(8px + env(safe-area-inset-right)) !important;
      bottom:calc(8px + env(safe-area-inset-bottom)) !important; width:auto !important; min-width:0 !important; max-width:none !important;
      height:var(--nww-mobile-timeline) !important; min-height:var(--nww-mobile-timeline) !important; max-height:var(--nww-mobile-timeline) !important;
      padding:0 !important; border:1px solid rgba(191,219,254,.38) !important; border-radius:16px !important; background:rgba(11,18,32,.97) !important;
    }
    html[data-nww-mobile-layout] body #timelineDock #timelineBubble { top:6px !important; left:62px !important; right:10px !important; width:auto !important; height:44px !important; }
    html[data-nww-mobile-layout] body #timelineDock #playBtn { top:6px !important; left:8px !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelinePreviousDay,
    html[data-nww-mobile-layout] body #timelineDock #timelineNextDay,
    html[data-nww-mobile-layout] body #timelineDock #timelineDayTabs { top:52px !important; height:44px !important; min-height:44px !important; max-height:44px !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineFloodKey { top:99px !important; height:calc(16px + var(--nww-key-extra)) !important; min-height:16px !important; max-height:none !important; gap:0 10px !important; }
    html[data-nww-mobile-layout] body:has(#roadImpactsKey:not([hidden])) { --nww-key-extra:20px; }
    html[data-nww-mobile-layout] body #timelineDock #timelineFloodKey:has(#roadImpactsKey:not([hidden])) { flex-wrap:wrap !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineFloodKey #roadImpactsKey:not([hidden]) { flex:0 0 100% !important; justify-content:center !important; font-size:11px !important; height:16px !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineFloodKey .timeline-key-label { font:500 11px/16px system-ui !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineFloodKey .timeline-key-swatch { width:8px !important; height:8px !important; flex-basis:8px !important; }
    html[data-nww-mobile-layout] body #timelineDock .timeline-trackRow { top:calc(112px + var(--nww-key-extra)) !important; left:8px !important; right:8px !important; height:44px !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineTimeBounds { top:calc(148px + var(--nww-key-extra)) !important; font:500 10px/14px system-ui !important; }
    html[data-nww-mobile-layout] body #timelineDock[data-single-timeline-time="true"] { --nww-mobile-timeline:calc(122px + var(--nww-key-extra)); }
    html[data-nww-mobile-layout] body .leaflet-bottom { bottom:calc(var(--nww-mobile-timeline) + 16px + env(safe-area-inset-bottom)) !important; }
    html[data-nww-mobile-layout] body #toast { bottom:calc(var(--nww-mobile-timeline) + 20px + env(safe-area-inset-bottom)) !important; }
    html[data-nww-mobile-layout] body #mapClickModeControl:not([hidden]) { bottom:calc(var(--nww-mobile-timeline) + 18px + env(safe-area-inset-bottom)) !important; }
    html[data-nww-mobile-layout] body.mobile-controls-open #leftPanel {
      position:fixed !important; top:calc(8px + env(safe-area-inset-top)) !important; bottom:calc(8px + env(safe-area-inset-bottom)) !important;
      left:calc(8px + env(safe-area-inset-left)) !important; right:calc(8px + env(safe-area-inset-right)) !important;
      width:auto !important; min-width:0 !important; max-width:none !important; height:auto !important; min-height:0 !important; max-height:none !important;
      display:flex !important; flex-direction:column !important; gap:8px !important; padding:12px !important; margin:0 !important; transform:none !important;
      overflow-x:hidden !important; overflow-y:auto !important; overscroll-behavior:contain !important;
      background:var(--bg) !important; border:1px solid rgba(191,219,254,.38) !important; border-radius:18px !important; z-index:7100 !important; scroll-padding-top:124px;
    }
    html[data-nww-mobile-layout] body.mobile-controls-open #mobileControlsToggle { visibility:hidden !important; pointer-events:none !important; }
    html[data-nww-mobile-layout] body.mobile-controls-open #mapTitleBadge { visibility:hidden !important; }
    html[data-nww-mobile-layout] body.mobile-controls-open #timelineDock { opacity:0 !important; pointer-events:none !important; }
    html[data-nww-mobile-layout] body #leftPanel #mobileControlsClose {
      position:fixed !important; top:calc(20px + env(safe-area-inset-top)) !important; right:calc(20px + env(safe-area-inset-right)) !important;
      left:auto !important; bottom:auto !important; width:44px !important; height:44px !important; margin:0 !important;
      display:block !important; border:1px solid rgba(255,255,255,.18) !important; border-radius:12px !important; background:rgba(255,255,255,.075) !important; z-index:12 !important;
    }
    html[data-nww-mobile-layout] body #nwwMobileControlHeader {
      position:sticky !important; top:-12px !important; order:-100 !important; flex:0 0 auto !important; display:block !important;
      margin:-12px -12px 0 !important; padding:12px !important; background:var(--bg) !important; border-bottom:1px solid var(--line) !important; z-index:10 !important;
    }
    html[data-nww-mobile-layout] body #nwwMobileControlHeader .nww-drawer-heading { min-height:44px; padding-right:56px; }
    html[data-nww-mobile-layout] body #nwwMobileControlHeader h2 { margin:0 !important; font:750 19px/24px system-ui !important; }
    html[data-nww-mobile-layout] body #nwwMobileControlHeader p { margin:2px 0 0; color:var(--muted); font:500 12px/16px system-ui; }
    html[data-nww-mobile-layout] body #nwwMobileControlHeader .nww-control-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin-top:12px; }
    html[data-nww-mobile-layout] body #nwwMobileControlHeader button { min-width:0 !important; min-height:44px !important; height:auto !important; overflow-wrap:anywhere; padding:6px !important; font:650 14px/1.2 system-ui !important; background:rgba(255,255,255,.05) !important; border:1px solid var(--line) !important; border-radius:10px !important; }
    html[data-nww-mobile-layout] body #nwwMobileControlHeader button[aria-selected="true"] { color:var(--nw-ui-blue) !important; background:var(--accent-soft) !important; border-color:var(--nw-ui-blue) !important; box-shadow:none !important; }
    html[data-nww-mobile-layout] body #leftPanel:is(#leftPanel)[data-nww-section="forecast"] [data-nww-group]:not([data-nww-group="forecast"]),
    html[data-nww-mobile-layout] body #leftPanel:is(#leftPanel)[data-nww-section="map"] [data-nww-group]:not([data-nww-group="map"]),
    html[data-nww-mobile-layout] body #leftPanel:is(#leftPanel)[data-nww-section="tools"] [data-nww-group]:not([data-nww-group="tools"]) { display:none !important; }
    html[data-nww-mobile-layout] body #leftPanel .panel-card,
    html[data-nww-mobile-layout] body #leftPanel .rail-card { padding:10px !important; border-radius:12px !important; gap:8px !important; }
    html[data-nww-mobile-layout] body #leftPanel .section-title { min-height:36px !important; margin:0 !important; gap:6px !important; }
    html[data-nww-mobile-layout] body #leftPanel .section-title .title-with-help { flex:1 1 auto !important; min-width:0 !important; }
    html[data-nww-mobile-layout] body #leftPanel .section-title .pill { display:none !important; }
    html[data-nww-mobile-layout] body #leftPanel .data-source-options { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
    html[data-nww-mobile-layout] body #leftPanel .data-source-options button { grid-column:auto !important; white-space:normal !important; padding:6px 4px !important; font-size:14px !important; }
    html[data-nww-mobile-layout] body #leftPanel #forecastScenarioCard { order:2 !important; }
    html[data-nww-mobile-layout] body #leftPanel #returnIntervalCard { order:3 !important; }
    html[data-nww-mobile-layout] body #leftPanel #timelineIntervalCard { order:4 !important; }
    html[data-nww-mobile-layout] body #leftPanel #calendarCard { order:5 !important; }
    html[data-nww-mobile-layout] body #leftPanel #mobileRailMount { gap:8px !important; order:6 !important; }
    html[data-nww-mobile-layout] body #leftPanel #mobileRailMount:empty { display:none !important; }
    html[data-nww-mobile-layout] body #leftPanel .layer-item { min-height:48px !important; padding:4px 0 !important; }
    html[data-nww-mobile-layout] body #leftPanel .toggle { min-width:44px !important; min-height:28px !important; }
    html[data-nww-mobile-layout] body #leftPanel #townAddressCard { order:36 !important; }
    html[data-nww-mobile-layout] body #leftPanel #townAddressInput { width:100% !important; min-width:0 !important; font-size:16px !important; }
    html[data-nww-mobile-layout] body #leftPanel button:focus-visible { outline:2px solid var(--nw-ui-blue) !important; outline-offset:2px !important; }
    html[data-nww-mobile-layout] body #leftPanel #timelineIntervalCard { display:flex !important; flex-direction:column !important; gap:8px !important; }
    html[data-nww-mobile-layout] body #leftPanel #timelineIntervalCard .section-title { flex:0 0 44px !important; }
    html[data-nww-mobile-layout] body #leftPanel #dayNavCenter { display:flex !important; align-items:center !important; height:44px !important; min-height:44px !important; max-height:none !important; overflow:visible !important; }
    html[data-nww-mobile-layout] body #leftPanel #observedDateInput { box-sizing:border-box !important; height:44px !important; min-height:44px !important; max-height:44px !important; padding:6px !important; font:600 16px/1.2 system-ui !important; }
    html[data-nww-mobile-layout] body #leftPanel #timelineIntervalToggle { display:flex !important; position:static !important; width:100% !important; height:44px !important; min-height:44px !important; max-height:none !important; padding:0 !important; gap:6px !important; overflow:visible !important; border:0 !important; background:none !important; }
    html[data-nww-mobile-layout] body #leftPanel #timelineIntervalToggle button { position:static !important; flex:1 1 0 !important; min-width:0 !important; height:44px !important; margin:0 !important; padding:4px !important; border-radius:10px !important; font-size:14px !important; }
    html[data-nww-mobile-layout] body:not(.tutorial-active) #leftPanel .snapshot-card { display:none !important; }
    html[data-nww-mobile-layout] body #leftPanel .datum-card .segmented-control { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:6px !important; height:auto !important; padding:0 !important; background:none !important; border:0 !important; }
    html[data-nww-mobile-layout] body #leftPanel .datum-card .segmented-control button { width:100% !important; border-radius:10px !important; }
    html[data-nww-mobile-layout] body #leftPanel #opacityText { display:inline-flex !important; }
    html[data-nww-mobile-layout] body #leftPanel .layer-item:has(#nsiStructuresToggle) { grid-column:1 / -1 !important; }
    html[data-nww-mobile-layout] body #leftPanel .layer-item .layer-meta { min-width:0 !important; overflow-wrap:normal !important; word-break:normal !important; }
    html[data-nww-mobile-layout] body #leftPanel .layer-item .layer-meta * { overflow-wrap:normal !important; word-break:normal !important; }
    /* Reuse the desktop palette; older shared mobile rules supplied teal states. */
    html[data-nww-mobile-layout] body #mapTitleBadge,
    html[data-nww-mobile-layout] body #mapTitleBadge #mapTitleText { color:#dbeafe !important; }
    html[data-nww-mobile-layout] body #leftPanel button,
    html[data-nww-mobile-layout] body #mobileControlsToggle,
    html[data-nww-mobile-layout] body #mobileControlsToggle::after,
    html[data-nww-mobile-layout] body:not(.mobile-legend-open) #legendDock::after { color:var(--text) !important; -webkit-text-fill-color:currentColor !important; }
    html[data-nww-mobile-layout] body #leftPanel button.active { color:var(--nw-ui-blue) !important; background:var(--accent-soft) !important; border-color:var(--nw-ui-blue) !important; }
    html[data-nww-mobile-layout] body #leftPanel #timelineIntervalToggle button.active { color:white !important; border-color:transparent !important; }
    html[data-nww-mobile-layout] body #leftPanel .help-btn { color:white !important; }
    html[data-nww-mobile-layout] body #leftPanel .layers-card { background:rgba(11,18,32,.97) !important; border-color:rgba(191,219,254,.38) !important; }
    html[data-nww-mobile-layout] body #leftPanel .layer-item { background:rgba(255,255,255,.05) !important; }
    html[data-nww-mobile-layout] body.mobile-legend-open #legendDock { color:var(--text) !important; background:rgba(11,18,32,.94) !important; border-color:rgba(191,219,254,.16) !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineBubble .timeline-bubble-stage { background:rgba(var(--nw-ui-blue-rgb),.26) !important; border-color:rgba(191,219,254,.64) !important; box-shadow:inset 0 1px rgba(255,255,255,.16),0 7px 16px rgba(0,0,0,.18) !important; }
    html[data-nww-mobile-layout] body #timelineDock .timeline-day-arrow { color:var(--text) !important; background:rgba(255,255,255,.05) !important; border-color:var(--line) !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineDayTabs .timeline-day.active { background-color:var(--accent-soft) !important; color:#f8fbff !important; border-color:#f8fbff !important; }
    html[data-nww-mobile-layout] body #leftPanel #calendarGrid { gap:3px !important; }
    html[data-nww-mobile-layout] body #leftPanel #calendarGrid button { min-width:0 !important; padding:2px !important; }
  }
  @media (max-width:360px) {
    html[data-nww-mobile-layout] body #mapTitleBadge { padding-right:157px !important; padding-left:8px !important; }
    html[data-nww-mobile-layout] body #mapTitleBadge #mapTitleText { font-size:13px !important; }
    html[data-nww-mobile-layout] body #mobileControlsToggle { width:84px !important; min-width:84px !important; max-width:84px !important; }
    html[data-nww-mobile-layout] body:not(.mobile-legend-open) #legendDock { right:102px !important; width:54px !important; min-width:54px !important; max-width:54px !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineFloodKey { gap:7px !important; }
    html[data-nww-mobile-layout] body #leftPanel .button-grid-3 button { font-size:14px !important; padding:4px !important; }
  }
  @media (max-width:900px) and (max-height:560px) and (orientation:landscape), (max-width:1366px) and (any-pointer:coarse) and (max-height:560px) and (orientation:landscape) {
    html[data-nww-mobile-layout] body { --nww-mobile-timeline:calc(120px + var(--nww-key-extra)); }
    html[data-nww-mobile-layout] body #timelineDock #timelineBubble { width:calc(43% - 76px) !important; right:auto !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelinePreviousDay { top:6px !important; left:43% !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineNextDay { top:6px !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineDayTabs { top:6px !important; left:calc(43% + 78px) !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineFloodKey { top:52px !important; }
    html[data-nww-mobile-layout] body #timelineDock .timeline-trackRow { top:calc(64px + var(--nww-key-extra)) !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineTimeBounds { top:calc(102px + var(--nww-key-extra)) !important; }
    html[data-nww-mobile-layout] body #nwDefaultNavControl { width:158px !important; display:grid !important; grid-template-columns:60px 44px 44px !important; align-items:start !important; }
    html[data-nww-mobile-layout] body #nwDefaultNavControl .nw-direction-wheel { grid-area:auto !important; }
    html[data-nww-mobile-layout] body #nwDefaultNavControl .nw-simple-view,
    html[data-nww-mobile-layout] body #nwDefaultNavControl .nw-simple-zoom { grid-area:auto !important; }
    html[data-nww-mobile-layout] body.mobile-controls-open #leftPanel { left:auto !important; width:min(460px, calc(100vw - 32px)) !important; }
    html[data-nww-mobile-layout] body.mobile-legend-open #legendDock { right:auto !important; width:min(430px,calc(100vw - 24px)) !important; max-height:calc(100dvh - 80px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important; }
  }
}

/* Full-width time rail, direct day navigation, and a separate transport row. */
@layer floodmapper-unified-base {
  html[data-nww-mobile-layout] body #timelineDock .timeline-step { display:none !important; }
  html[data-nww-mobile-layout] body #timelineDock .timeline-sr-date { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; clip-path:inset(50%) !important; white-space:nowrap !important; }
  html[data-nww-mobile-layout] body #timelineDock #hourSlider:focus-visible { outline:2px solid var(--nw-ui-blue) !important; outline-offset:3px !important; border-radius:8px !important; }
  @media (max-width:900px), (max-width:1366px) and (any-pointer:coarse), (max-height:560px) and (pointer:coarse) {
    html[data-nww-mobile-layout] body { --nww-mobile-timeline:calc(180px + var(--nww-key-extra)); }
    html[data-nww-mobile-layout] body:has(#timelineDock[data-single-timeline-time="true"]) { --nww-mobile-timeline:calc(126px + var(--nww-key-extra)); }
    html[data-nww-mobile-layout] body #timelineDock[data-single-timeline-time="true"] {
      --nww-mobile-timeline:calc(126px + var(--nww-key-extra));
      height:var(--nww-mobile-timeline) !important; min-height:var(--nww-mobile-timeline) !important; max-height:var(--nww-mobile-timeline) !important;
    }
    html[data-nww-mobile-layout] body #timelineDock #timelineBubble {
      top:6px !important; left:12px !important; right:158px !important; width:auto !important;
      flex-direction:column !important; align-items:flex-start !important; justify-content:center !important; gap:2px !important;
    }
    html[data-nww-mobile-layout] body #timelineDock #timelineBubble .timeline-bubble-current { font:750 18px/22px system-ui !important; font-variant-numeric:tabular-nums !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineBubble .timeline-bubble-stage { font:650 12px/16px system-ui !important; padding:0 6px !important; }
    html[data-nww-mobile-layout] body #timelineDock #playBtn { left:auto !important; right:58px !important; top:6px !important; border-radius:12px !important; }
    html[data-nww-mobile-layout] body #timelineDock .timeline-step {
      position:absolute !important; top:6px !important; bottom:auto !important; left:auto !important;
      display:grid !important; place-items:center !important;
      width:44px !important; min-width:44px !important; max-width:44px !important;
      height:44px !important; min-height:44px !important; max-height:44px !important;
      padding:0 !important; margin:0 !important; border-radius:10px !important;
      color:var(--text) !important; background:rgba(255,255,255,.05) !important; border:1px solid var(--line) !important;
      font:700 13px/1 system-ui !important; font-variant-numeric:tabular-nums !important;
      touch-action:manipulation !important; user-select:none !important; transform:none !important;
    }
    html[data-nww-mobile-layout] body #timelineDock #timelineStepBack { right:108px !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineStepForward { right:8px !important; }
    html[data-nww-mobile-layout] body #timelineDock .timeline-step:disabled { opacity:.35 !important; cursor:default !important; }
    html[data-nww-mobile-layout] body #timelineDock .timeline-step:active:not(:disabled) { background:var(--accent-soft) !important; border-color:var(--nw-ui-blue) !important; }
    html[data-nww-mobile-layout] body #timelineDock .timeline-step:focus-visible,
    html[data-nww-mobile-layout] body #timelineDock .timeline-day:focus-visible { outline:2px solid var(--nw-ui-blue) !important; outline-offset:-3px !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelinePreviousDay,
    html[data-nww-mobile-layout] body #timelineDock #timelineNextDay { display:none !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineDayTabs {
      left:8px !important; right:8px !important; top:54px !important; height:44px !important;
      display:flex !important; gap:5px !important; border-radius:0 !important; overflow-x:auto !important; overflow-y:hidden !important;
      justify-content:flex-start !important; scrollbar-width:none !important; touch-action:pan-x !important; overscroll-behavior-x:contain !important;
    }
    html[data-nww-mobile-layout] body #timelineDock #timelineDayTabs::-webkit-scrollbar { display:none; }
    html[data-nww-mobile-layout] body #timelineDock #timelineDayTabs .timeline-day {
      position:relative !important; display:block !important; flex:1 0 52px !important;
      min-width:52px !important; height:44px !important; border-radius:9px !important;
      padding:0 4px 3px !important; font:650 13px/39px system-ui !important;
      background:rgba(255,255,255,.05) !important; color:var(--text) !important;
      border:1px solid var(--line) !important; overflow:hidden !important; box-shadow:none !important;
    }
    html[data-nww-mobile-layout] body #timelineDock #timelineDayTabs .timeline-day::after {
      content:'' !important; position:absolute !important; bottom:0 !important; left:0 !important; right:0 !important;
      height:4px !important; width:auto !important; transform:none !important; opacity:1 !important;
      background:var(--timeline-day-gradient,#94a3b8) !important; border:0 !important;
    }
    html[data-nww-mobile-layout] body #timelineDock #timelineDayTabs .timeline-day.active {
      background:var(--accent-soft) !important; border-color:var(--nw-ui-blue) !important; color:#f8fbff !important;
    }
    html[data-nww-mobile-layout] body #timelineDock .timeline-trackRow {
      display:block !important; top:100px !important; left:8px !important; right:8px !important; height:44px !important;
    }
    html[data-nww-mobile-layout] body #timelineDock #hourSlider {
      --nww-thumb-size:30px;
      background-size:calc(100% - 30px) 8px !important; cursor:ew-resize !important;
    }
    html[data-nww-mobile-layout] body #timelineDock #hourSlider::-webkit-slider-runnable-track { height:8px !important; }
    html[data-nww-mobile-layout] body #timelineDock #hourSlider::-moz-range-track,
    html[data-nww-mobile-layout] body #timelineDock #hourSlider::-moz-range-progress { height:8px !important; }
    html[data-nww-mobile-layout] body #timelineDock #hourSlider::-webkit-slider-thumb {
      width:30px !important; height:30px !important; margin-top:-11px !important; box-shadow:0 0 0 4px rgba(96,165,250,.14) !important;
    }
    html[data-nww-mobile-layout] body #timelineDock #hourSlider::-moz-range-thumb {
      width:30px !important; height:30px !important; box-shadow:0 0 0 4px rgba(96,165,250,.14) !important;
    }
    html[data-nww-mobile-layout] body #timelineDock #timelineTimeBounds {
      display:block !important; top:138px !important; left:23px !important; right:23px !important; font-size:11px !important;
    }
    html[data-nww-mobile-layout] body #timelineDock #timelineTimeBounds span { position:absolute; white-space:nowrap; }
    html[data-nww-mobile-layout] body #timelineDock #timelineFirstTime { left:0; transform:translateX(-50%); }
    html[data-nww-mobile-layout] body #timelineDock #timelineMiddleTime { transform:translateX(-50%); }
    html[data-nww-mobile-layout] body #timelineDock #timelineLastTime { right:0; transform:translateX(50%); }
    html[data-nww-mobile-layout] body #timelineDock #timelineTimeBounds span::before { content:''; position:absolute; left:50%; top:-8px; height:4px; width:1px; background:var(--muted); opacity:.6; }
    html[data-nww-mobile-layout] body #timelineDock #timelineFloodKey { top:156px !important; }
    html[data-nww-mobile-layout] body #timelineDock[data-single-timeline-time="true"] #timelineFloodKey { top:102px !important; }
    html[data-nww-mobile-layout] body #timelineDock[data-single-timeline-time="true"] .timeline-trackRow,
    html[data-nww-mobile-layout] body #timelineDock[data-single-timeline-time="true"] #timelineTimeBounds { display:none !important; }
  }
  @media (max-width:360px) {
    html[data-nww-mobile-layout] body #timelineDock #timelineBubble .timeline-bubble-current { font-size:16px !important; }
  }
  @media (max-width:900px) and (max-height:560px) and (orientation:landscape), (max-width:1366px) and (any-pointer:coarse) and (max-height:560px) and (orientation:landscape) {
    html[data-nww-mobile-layout] body { --nww-mobile-timeline:calc(126px + var(--nww-key-extra)); }
    html[data-nww-mobile-layout] body:has(#timelineDock[data-single-timeline-time="true"]),
    html[data-nww-mobile-layout] body #timelineDock[data-single-timeline-time="true"] { --nww-mobile-timeline:calc(80px + var(--nww-key-extra)); }
    html[data-nww-mobile-layout] body #timelineDock #timelineBubble { width:142px !important; right:auto !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineStepBack { left:160px !important; right:auto !important; }
    html[data-nww-mobile-layout] body #timelineDock #playBtn { left:210px !important; right:auto !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineStepForward { left:260px !important; right:auto !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineDayTabs { left:314px !important; top:6px !important; }
    html[data-nww-mobile-layout] body #timelineDock .timeline-trackRow { top:50px !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineTimeBounds { top:88px !important; }
    html[data-nww-mobile-layout] body #timelineDock #timelineFloodKey { top:106px !important; }
    html[data-nww-mobile-layout] body #timelineDock[data-single-timeline-time="true"] #timelineFloodKey { top:56px !important; }
  }
}

/* App-owned layer controls, identical on standalone and hosted pages. */
@layer floodmapper-unified-base {
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card {
    padding:12px !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .rail-head {
    margin:0 0 6px !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .layer-list {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:0 !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .layer-item {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 36px !important;
    grid-column:1 / -1 !important;
    align-items:center !important;
    gap:12px !important;
    height:auto !important;
    min-height:34px !important;
    max-height:none !important;
    padding:6px 6px !important;
    margin:0 !important;
    border:0 !important;
    border-bottom:1px solid rgba(191,219,254,.10) !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    overflow:visible !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .layer-item:last-child {
    border-bottom:0 !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .layer-meta {
    grid-area:1 / 1 !important;
    min-width:0 !important;
    gap:2px !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .layer-name {
    font-size:12px !important;
    font-weight:650 !important;
    line-height:1.25 !important;
    letter-spacing:0 !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:normal !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .nww-layer-detail {
    color:#b6c4d6;
    font-size:10px;
    font-weight:450;
    line-height:1.3;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .toggle {
    grid-area:1 / 2 !important;
    justify-self:end !important;
    width:36px !important;
    min-width:36px !important;
    height:22px !important;
    min-height:22px !important;
    flex:none !important;
    margin:0 !important;
    border:0 !important;
    border-radius:999px !important;
    background:rgba(148,163,184,.36) !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .toggle::before {
    content:"";
    position:absolute;
    inset:-6px;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .toggle::after {
    width:16px !important;
    height:16px !important;
    top:3px !important;
    left:3px !important;
    transform:none !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .toggle.on {
    background:var(--nw-ui-blue,#60a5fa) !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .toggle.on::after {
    left:17px !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .toggle:focus-visible {
    outline:2px solid #bfdbfe !important;
    outline-offset:3px !important;
  }
  @media (min-width:901px) and (min-height:561px) and (max-height:760px) and (not (any-pointer:coarse)), (min-width:1367px) and (min-height:561px) and (max-height:760px), (min-width:901px) and (pointer:fine) and (max-height:760px) and (not (any-pointer:coarse)), (min-width:1367px) and (pointer:fine) and (max-height:760px), (min-width:901px) and (pointer:none) and (max-height:760px) and (not (any-pointer:coarse)), (min-width:1367px) and (pointer:none) and (max-height:760px) {
    html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card { padding:9px !important; }
    html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .layer-item { min-height:26px !important; padding:1px 6px !important; }
    html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .layer-name { font-size:11px !important; }
    html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount,#leftPanel) section.nww-layers-card.layers-card .toggle::before { inset:-2px -6px; }
  }
  @media (max-width:900px), (max-width:1366px) and (any-pointer:coarse), (max-height:560px) and (pointer:coarse) {
    html[data-nww-mobile-layout] body[data-shorelysafe-ui] #leftPanel section.nww-layers-card.layers-card { padding:12px !important; }
    html[data-nww-mobile-layout] body[data-shorelysafe-ui] #leftPanel section.nww-layers-card.layers-card .layer-item { min-height:48px !important; padding:8px 6px !important; }
    html[data-nww-mobile-layout] body[data-shorelysafe-ui] #leftPanel section.nww-layers-card.layers-card .layer-name { font-size:15px !important; }
    html[data-nww-mobile-layout] body[data-shorelysafe-ui] #leftPanel section.nww-layers-card.layers-card .nww-layer-detail { font-size:12px; }
    html[data-nww-mobile-layout] body[data-shorelysafe-ui] #leftPanel section.nww-layers-card.layers-card .toggle::before { inset:-13px -6px; }
  }
}

/* Desktop control cards share one spacing system. Mobile drawer visibility and
   geometry remain in north-wildwood-mobile.css. The unified layer owns app UI
   on both standalone and hosted pages. */
@layer floodmapper-unified-base {
  /* Forecast scenarios belong only to Forecast mode, including in the drawer. */
  html body[data-shorelysafe-ui] #leftPanel #forecastScenarioCard[hidden] {
    display:none !important;
  }
  /* Active buttons communicate the selection without duplicate header badges. */
  html body[data-shorelysafe-ui] #leftPanel .nww-status-value[hidden] {
    display:none !important;
  }
  html body[data-shorelysafe-ui] #leftPanel .opacity-card .control-row.opacity-control {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:20px auto !important;
    justify-items:center !important;
    align-items:center !important;
    gap:2px !important;
    height:auto !important;
    min-height:0 !important;
    padding:0 !important;
    margin:0 !important;
  }
  html body[data-shorelysafe-ui] #leftPanel .opacity-control #opacityText {
    display:block !important;
    position:static !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
    background:none !important;
    color:var(--fleet-text) !important;
    font-size:var(--nww-pane-font) !important;
    font-weight:600 !important;
    line-height:1.25 !important;
    text-align:center !important;
    font-variant-numeric:tabular-nums !important;
  }
  /* An uncertainty swatch is separate from the three discrete severity bands. */
  html body[data-shorelysafe-ui]:not(.mobile-optimized) #legendDock[data-legend-mode="dynamic"] :is(#legendBody,#legendList),
  html body[data-shorelysafe-ui].mobile-legend-open #legendDock[data-legend-mode="dynamic"] :is(#legendBody,#legendList),
  html body[data-shorelysafe-ui] #exportLegendDock[data-export-legend-mode="dynamic"] .legend-list {
    display:block !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    padding:0 !important;
    margin:0 !important;
  }
  html body[data-shorelysafe-ui] :is(#legendDock,#exportLegendDock) .stage-legend-scale {
    display:flex !important;
    align-items:end !important;
    gap:10px !important;
    width:100% !important;
    font-size:var(--nww-pane-detail) !important;
    line-height:1.25 !important;
    font-weight:600 !important;
    letter-spacing:0 !important;
    text-transform:none !important;
    color:var(--fleet-text) !important;
  }
  html body[data-shorelysafe-ui] :is(#legendDock,#exportLegendDock) .stage-legend-uncertainty {
    flex:0 0 25% !important;
  }
  html body[data-shorelysafe-ui] :is(#legendDock,#exportLegendDock) .stage-legend-levels {
    flex:1 1 auto !important;
    min-width:0 !important;
  }
  html body[data-shorelysafe-ui] :is(#legendDock,#exportLegendDock) .stage-legend-labels {
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    text-align:center !important;
    gap:0 !important;
  }
  html body[data-shorelysafe-ui] :is(#legendDock,#exportLegendDock) :is(.stage-legend-green,.stage-legend-gradient) {
    box-sizing:border-box !important;
    height:12px !important;
    margin-top:4px !important;
    border:1px solid rgba(255,255,255,.48) !important;
    border-radius:999px !important;
  }
  html body[data-shorelysafe-ui] :is(#legendDock,#exportLegendDock) .stage-legend-green {
    background:#63d471 !important;
  }
  html body[data-shorelysafe-ui] :is(#legendDock,#exportLegendDock) .stage-legend-gradient {
    background:linear-gradient(90deg,#f4a742 0%,#f4a742 33.333333%,#e74c3c 33.333333%,#e74c3c 66.666667%,#7d3c98 66.666667%,#7d3c98 100%) !important;
  }
  html body[data-shorelysafe-ui].mobile-legend-open #legendDock[data-legend-mode="dynamic"] #legendHeader {
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:8px !important;
    height:auto !important;
    min-height:28px !important;
    margin:0 0 8px !important;
  }
  html body[data-shorelysafe-ui].mobile-legend-open #legendDock[data-legend-mode="dynamic"] :is(.legend-header-text,.legend-header-actions,#legendTitle) {
    position:static !important;
    flex:0 1 auto !important;
    width:auto !important;
    margin:0 !important;
  }
  /* A scrollable rail must not clip its last button into a second pill shape.
     Card shadows otherwise accumulate in the gaps as a gray rectangular strip. */
  html body[data-shorelysafe-ui] #rightRail {
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    filter:none !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
  }
  html body[data-shorelysafe-ui] :is(#rightRail,#mobileRailMount) > .rail-card {
    box-shadow:none !important;
    filter:none !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
  }
  html body[data-shorelysafe-ui] #mapperTutorialBtn#mapperTutorialBtn.mapper-tutorial-launch {
    box-sizing:border-box !important;
    align-items:center !important;
    justify-content:center !important;
    flex:0 0 auto !important;
    width:100% !important;
    height:auto !important;
    min-height:44px !important;
    max-height:none !important;
    padding:10px 14px !important;
    margin:0 !important;
    border:1px solid var(--fleet-line) !important;
    border-radius:12px !important;
    background:var(--fleet-panel) !important;
    box-shadow:none !important;
    font-size:13px !important;
    font-weight:600 !important;
    line-height:1.3 !important;
    letter-spacing:0 !important;
    text-align:center !important;
    text-transform:none !important;
    white-space:normal !important;
  }
  html body[data-shorelysafe-ui] #mapperTutorialBtn#mapperTutorialBtn.mapper-tutorial-launch:hover {
    background:#12213a !important;
    border-color:var(--fleet-accent) !important;
  }
  @media (min-width:901px) and (min-height:561px) and (not (any-pointer:coarse)), (min-width:1367px) and (min-height:561px), (min-width:901px) and (pointer:fine) and (not (any-pointer:coarse)), (min-width:1367px) and (pointer:fine), (min-width:901px) and (pointer:none) and (not (any-pointer:coarse)), (min-width:1367px) and (pointer:none) {
    html {
      --nww-left-width:356px;
      --nww-right-width:288px;
    }
    html body[data-shorelysafe-ui]:not(.mobile-optimized) #nwDefaultNavControl {
      right:calc(var(--nww-right-width) + 28px) !important;
    }
    @media (max-width:1120px) and (max-height:560px) {
      html body[data-shorelysafe-ui]:not(.mobile-optimized) #nwDefaultNavControl {
        top:clamp(82px, calc(100dvh - 348px), 96px) !important;
      }
    }
    /* Reveal the title once its available lane, including the compass, is known. */
    html body[data-shorelysafe-ui] #mapTitleBadge:not([data-viewport-contained]) {
      visibility:hidden !important;
    }
    /* CSS owns pane geometry from the first paint. Only the timeline-aware
       fitter may adjust available height when the viewport changes. */
    html body[data-shorelysafe-ui]:not(.mobile-optimized) :is(#leftPanel,#rightRail) {
      position:fixed !important;
      top:16px !important;
      display:flex !important;
      flex-direction:column !important;
      box-sizing:border-box !important;
      min-height:0 !important;
      height:auto !important;
      margin:0 !important;
      overflow-x:hidden !important;
      overflow-y:auto !important;
      transform:none !important;
      translate:none !important;
      scale:1 !important;
      zoom:1 !important;
      transition:none !important;
      animation:none !important;
    }
    html body[data-shorelysafe-ui]:not(.mobile-optimized) #leftPanel {
      left:16px !important;
      right:auto !important;
      bottom:188px !important;
      width:var(--nww-left-width) !important;
      min-width:var(--nww-left-width) !important;
      max-width:var(--nww-left-width) !important;
      max-height:calc(100dvh - 204px) !important;
      gap:6px !important;
      padding:0 4px 0 0 !important;
      scrollbar-gutter:auto !important;
      overflow-anchor:none !important;
      overscroll-behavior:contain !important;
    }
    html body[data-shorelysafe-ui]:not(.mobile-optimized) #leftPanel > .data-source-card {
      position:sticky !important;
      top:0 !important;
      z-index:3 !important;
    }
    html body[data-shorelysafe-ui]:not(.mobile-optimized) #rightRail {
      left:auto !important;
      right:16px !important;
      bottom:auto !important;
      width:var(--nww-right-width) !important;
      min-width:var(--nww-right-width) !important;
      max-width:var(--nww-right-width) !important;
      max-height:calc(100dvh - 156px) !important;
      gap:8px !important;
      padding:0 !important;
      scrollbar-gutter:auto !important;
    }
    html body[data-shorelysafe-ui]:not(.mobile-optimized) #rightRail > .right-logo-card {
      display:none !important;
    }
    html body[data-shorelysafe-ui]:not(.mobile-optimized) #rightRail > .top-tides-card {
      height:auto !important;
      min-height:0 !important;
      max-height:none !important;
    }
    /* Reserve the two flood rows and Show More button while archive data loads. */
    html body[data-shorelysafe-ui]:not(.mobile-optimized) #topTideList {
      min-height:116px !important;
    }
    html body[data-shorelysafe-ui]:not(.mobile-optimized) #leftPanel #legendDock {
      position:static !important;
      inset:auto !important;
      width:100% !important;
      max-width:100% !important;
      transform:none !important;
      margin:0 !important;
    }
    html body[data-shorelysafe-ui]:not(.mobile-optimized) #leftPanel :is(.day-nav-center,.observed-date-input) {
      min-width:0 !important;
      width:100% !important;
      max-width:100% !important;
      overflow:hidden !important;
      text-overflow:ellipsis !important;
      white-space:nowrap !important;
      box-sizing:border-box !important;
    }
    html body[data-shorelysafe-ui] #leftPanel {
      --nww-control-padding:12px;
      --nww-control-gap:10px;
      --nww-control-header:24px;
      --nww-control-button:40px;
      --nww-control-slider:20px;
    }

    html body[data-shorelysafe-ui] #leftPanel > :is(.data-source-card,.forecast-scenario-card,.overlay-card,.datum-card,.opacity-card,#timelineIntervalCard,#calendarCard,#legendDock):not([hidden]) {
      box-sizing:border-box !important;
      display:flex !important;
      flex-direction:column !important;
      flex:0 0 auto !important;
      height:auto !important;
      min-height:0 !important;
      max-height:none !important;
      padding:var(--nww-control-padding) 12px !important;
      gap:var(--nww-control-gap) !important;
      overflow:visible !important;
    }

    html body[data-shorelysafe-ui] #leftPanel > :is(.data-source-card,.forecast-scenario-card,.overlay-card,.datum-card,.opacity-card,#timelineIntervalCard,#calendarCard) > .section-title,
    html body[data-shorelysafe-ui] #leftPanel #legendHeader {
      display:flex !important;
      align-items:center !important;
      justify-content:space-between !important;
      flex:0 0 auto !important;
      height:var(--nww-control-header) !important;
      min-height:var(--nww-control-header) !important;
      max-height:none !important;
      padding:0 !important;
      margin:0 !important;
      gap:8px !important;
    }

    html body[data-shorelysafe-ui] #leftPanel :is(.section-title,.legend-header) :is(h2,.legend-header-text) {
      margin:0 !important;
      padding:0 !important;
      font-size:14px !important;
      font-weight:700 !important;
      line-height:20px !important;
    }

    html body[data-shorelysafe-ui] #leftPanel .title-with-help {
      display:flex !important;
      align-items:center !important;
      gap:8px !important;
    }

    html body[data-shorelysafe-ui] #leftPanel .help-btn {
      box-sizing:border-box !important;
      flex:0 0 24px !important;
      width:24px !important;
      min-width:24px !important;
      height:24px !important;
      min-height:24px !important;
      padding:0 !important;
      margin:0 !important;
      font-size:14px !important;
      line-height:1 !important;
    }

    html body[data-shorelysafe-ui] #leftPanel .section-title > .pill {
      box-sizing:border-box !important;
      display:inline-flex !important;
      align-items:center !important;
      justify-content:center !important;
      flex:0 0 auto !important;
      height:24px !important;
      min-height:24px !important;
      padding:0 9px !important;
      margin:0 !important;
      font-size:12px !important;
      font-weight:600 !important;
      line-height:1 !important;
      white-space:nowrap !important;
    }

    html body[data-shorelysafe-ui] #leftPanel > :is(.data-source-card,.forecast-scenario-card,.overlay-card,.datum-card,#timelineIntervalCard) > :is(.button-grid-2,.button-grid-3,.segmented-control,#timelineIntervalToggle) {
      display:grid !important;
      grid-template-columns:repeat(2,minmax(0,1fr)) !important;
      align-items:stretch !important;
      flex:0 0 auto !important;
      width:100% !important;
      height:auto !important;
      min-height:0 !important;
      max-height:none !important;
      gap:6px !important;
      padding:0 !important;
      margin:0 !important;
      border:0 !important;
      border-radius:0 !important;
      background:transparent !important;
      box-shadow:none !important;
      overflow:visible !important;
    }
    html body[data-shorelysafe-ui] #leftPanel > :is(.data-source-card,.forecast-scenario-card,#timelineIntervalCard) > :is(.data-source-options,.button-grid-3,#timelineIntervalToggle) {
      grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    }

    html body[data-shorelysafe-ui] #leftPanel > :is(.data-source-card,.forecast-scenario-card,.overlay-card,.datum-card,#timelineIntervalCard) > :is(.button-grid-2,.button-grid-3,.segmented-control,#timelineIntervalToggle) > button {
      box-sizing:border-box !important;
      display:flex !important;
      align-items:center !important;
      justify-content:center !important;
      width:100% !important;
      min-width:0 !important;
      height:var(--nww-control-button) !important;
      min-height:var(--nww-control-button) !important;
      max-height:none !important;
      margin:0 !important;
      padding:4px !important;
      border:1px solid var(--fleet-line) !important;
      border-radius:10px !important;
      font-size:12px !important;
      font-weight:650 !important;
      line-height:1.2 !important;
    }
    html body[data-shorelysafe-ui] #leftPanel > :is(.data-source-card,.forecast-scenario-card,.overlay-card,.datum-card,#timelineIntervalCard) > :is(.button-grid-2,.button-grid-3,.segmented-control,#timelineIntervalToggle) > button.active {
      border-color:var(--fleet-accent) !important;
    }
    html body[data-shorelysafe-ui] #leftPanel > :is(.data-source-card,.forecast-scenario-card,#timelineIntervalCard) > :is(.data-source-options,.button-grid-3,#timelineIntervalToggle) > button {
      font-size:11.5px !important;
      white-space:nowrap !important;
    }

    html body[data-shorelysafe-ui] #leftPanel .opacity-card .control-row {
      flex:0 0 auto !important;
      height:var(--nww-control-slider) !important;
      min-height:0 !important;
      padding:0 !important;
      margin:0 !important;
      display:flex !important;
      align-items:center !important;
    }
    html body[data-shorelysafe-ui] #leftPanel #opacitySlider {
      width:100% !important;
      margin:0 !important;
    }

    html body[data-shorelysafe-ui] #leftPanel #legendHeader { justify-content:flex-start !important; }
    html body[data-shorelysafe-ui] #leftPanel #legendHeader .legend-header-actions { margin:0 !important; }
    html body[data-shorelysafe-ui] #leftPanel #legendBody,
    html body[data-shorelysafe-ui] #leftPanel #legendList { margin:0 !important; padding:0 !important; }
    html body[data-shorelysafe-ui] #leftPanel .depth-legend-labels {
      font-size:10px !important;
      font-weight:600 !important;
      line-height:14px !important;
      letter-spacing:.04em !important;
    }
  }
  @media (min-width:901px) and (max-width:1320px) and (min-height:561px) and (not (any-pointer:coarse)), (min-width:901px) and (max-width:1320px) and (pointer:fine) and (not (any-pointer:coarse)), (min-width:901px) and (max-width:1320px) and (pointer:none) and (not (any-pointer:coarse)) {
    html { --nww-left-width:340px; --nww-right-width:272px; }
  }
  @media (min-width:901px) and (max-width:1120px) and (min-height:561px) and (not (any-pointer:coarse)), (min-width:901px) and (max-width:1120px) and (pointer:fine) and (not (any-pointer:coarse)), (min-width:901px) and (max-width:1120px) and (pointer:none) and (not (any-pointer:coarse)) {
    html { --nww-left-width:320px; --nww-right-width:256px; }
  }
  @media (min-width:901px) and (min-height:561px) and (max-height:800px) and (not (any-pointer:coarse)), (min-width:1367px) and (min-height:561px) and (max-height:800px), (min-width:901px) and (pointer:fine) and (max-height:800px) and (not (any-pointer:coarse)), (min-width:1367px) and (pointer:fine) and (max-height:800px), (min-width:901px) and (pointer:none) and (max-height:800px) and (not (any-pointer:coarse)), (min-width:1367px) and (pointer:none) and (max-height:800px) {
    html body[data-shorelysafe-ui] #leftPanel {
      --nww-control-padding:6px;
      --nww-control-gap:4px;
      --nww-control-button:36px;
      --nww-control-slider:16px;
    }
  }
}

/* Keep the selected date in the rail; the month grid has its own bounded dialog. */
@layer floodmapper-unified-base {
  html body[data-shorelysafe-ui] #leftPanel #calendarCard:not(.active),
  html body[data-shorelysafe-ui] #observedCalendarModal[hidden] {
    display:none !important;
  }
  html body[data-shorelysafe-ui] #leftPanel #calendarCard .day-nav {
    display:grid !important;
    grid-template-columns:36px minmax(0,1fr) 36px !important;
    gap:6px !important;
    margin:0 !important;
    padding:0 !important;
  }
  html body[data-shorelysafe-ui] #leftPanel #calendarCard :is(.calendar-nav-btn,.day-nav-center,.observed-date-input) {
    position:static !important;
    box-sizing:border-box !important;
    width:100% !important;
    min-width:0 !important;
    height:var(--nww-control-button,44px) !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 !important;
    padding:0 !important;
    border-radius:10px !important;
    transform:none !important;
    font-size:var(--nww-pane-font) !important;
    line-height:1.25 !important;
  }
  html body[data-shorelysafe-ui] #leftPanel #calendarCard .observed-date-input {
    padding:0 4px !important;
    text-align:center !important;
    background:transparent !important;
    border:0 !important;
  }
  html body[data-shorelysafe-ui] #leftPanel #calendarCard #observedCalendarOpenBtn {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:6px !important;
    min-width:0 !important;
    height:28px !important;
    min-height:28px !important;
    padding:2px 10px !important;
    border:1px solid var(--fleet-accent) !important;
    border-radius:8px !important;
    background:var(--accent-soft) !important;
    color:var(--fleet-text) !important;
    font-weight:600 !important;
    white-space:nowrap !important;
    cursor:pointer !important;
  }
  html body[data-shorelysafe-ui] #observedCalendarOpenBtn .nww-calendar-icon {
    width:16px;
    height:16px;
    flex:0 0 16px;
    fill:none;
    stroke:var(--fleet-accent);
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
  }
  html body[data-shorelysafe-ui] #observedCalendarModal {
    position:fixed !important;
    inset:0 !important;
    z-index:11000 !important;
    display:grid !important;
    place-items:center !important;
    box-sizing:border-box !important;
    padding:16px !important;
    background:rgba(3,9,18,.55) !important;
  }
  html body[data-shorelysafe-ui] #observedCalendarModal .nww-calendar-dialog {
    box-sizing:border-box !important;
    width:min(420px,100%) !important;
    min-width:0 !important;
    max-height:calc(100dvh - 32px) !important;
    overflow:auto !important;
    overscroll-behavior:contain !important;
    display:grid !important;
    gap:12px !important;
    padding:16px !important;
    border:1px solid var(--fleet-line) !important;
    border-radius:18px !important;
    background:#0b1220 !important;
    color:var(--fleet-text) !important;
    box-shadow:0 16px 60px rgba(0,0,0,.35) !important;
    font:var(--nww-pane-font)/1.25 Inter,system-ui,sans-serif !important;
  }
  html body[data-shorelysafe-ui] #observedCalendarModal .nww-calendar-heading {
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:12px !important;
  }
  html body[data-shorelysafe-ui] #observedCalendarModal h2 {
    margin:0 !important;
    font-size:18px !important;
    line-height:1.25 !important;
  }
  html body[data-shorelysafe-ui] #observedCalendarModal button {
    box-sizing:border-box !important;
    min-width:0 !important;
    min-height:44px !important;
    padding:4px !important;
    border-radius:10px !important;
    font-size:var(--nww-pane-font) !important;
    line-height:1.25 !important;
    transform:none !important;
  }
  html body[data-shorelysafe-ui] #observedCalendarCloseBtn {
    flex:0 0 44px !important;
    width:44px !important;
    font-size:24px !important;
  }
  html body[data-shorelysafe-ui] #observedCalendarModal .calendar-toolbar {
    display:grid !important;
    grid-template-columns:44px minmax(0,1fr) 44px !important;
    gap:6px !important;
    margin:0 !important;
  }
  html body[data-shorelysafe-ui] #observedCalendarModal :is(.calendar-head,.calendar-grid) {
    position:static !important;
    display:grid !important;
    grid-template-columns:repeat(7,minmax(0,1fr)) !important;
    gap:6px !important;
    margin:0 !important;
    padding:0 !important;
  }
  html body[data-shorelysafe-ui] #observedCalendarModal .calendar-head div {
    font-size:var(--nww-pane-detail) !important;
    text-align:center !important;
  }
  html body[data-shorelysafe-ui] #observedCalendarModal .calendar-day {
    height:44px !important;
    min-height:44px !important;
    max-height:none !important;
  }
  html body[data-shorelysafe-ui] #observedCalendarModal .calendar-key {
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:6px !important;
    margin:0 !important;
  }
  html body[data-shorelysafe-ui] #observedCalendarModal .calendar-key-item {
    min-width:0 !important;
    gap:5px !important;
    padding:6px 2px !important;
    font-size:var(--nww-pane-detail) !important;
    white-space:nowrap !important;
  }
  @media (max-width:900px), (max-width:1366px) and (any-pointer:coarse), (max-height:560px) and (pointer:coarse) {
    html body[data-shorelysafe-ui] #leftPanel #calendarCard.calendar-card { order:2 !important; }
    html body[data-shorelysafe-ui] #leftPanel #calendarCard .day-nav {
      grid-template-columns:44px minmax(0,1fr) 44px !important;
    }
    html body[data-shorelysafe-ui] #leftPanel #calendarCard #observedCalendarOpenBtn {
      height:44px !important;
      min-height:44px !important;
    }
    html body[data-shorelysafe-ui] #leftPanel #calendarCard #observedDateInput {
      font-size:16px !important;
    }
    html body[data-shorelysafe-ui] #observedCalendarModal { padding:8px !important; }
    html body[data-shorelysafe-ui] #observedCalendarModal .nww-calendar-dialog {
      padding:12px !important;
      max-height:calc(100dvh - 16px) !important;
    }
  }
}

/* One text scale in the same canonical layer on every host. */
html {
  --nww-pane-font:14px;
  --nww-pane-heading:15px;
  --nww-pane-detail:13px;
}
@media (min-width:1400px) {
  html { --nww-pane-font:15px; --nww-pane-heading:16px; --nww-pane-detail:14px; }
}
@media (min-width:1800px) {
  html { --nww-pane-font:16px; --nww-pane-heading:17px; --nww-pane-detail:15px; }
}
@media (max-width:900px), (max-width:1366px) and (any-pointer:coarse), (max-height:560px) and (pointer:coarse) {
  html { --nww-pane-font:15px; --nww-pane-heading:16px; --nww-pane-detail:14px; }
}

@layer floodmapper-unified-base {
  html body[data-shorelysafe-ui] :is(#leftPanel#leftPanel,#rightRail#rightRail,#mobileRailMount#mobileRailMount) :is(.section-title h2,.legend-header-text,.legend-title,.rail-head h3) {
    font-size:var(--nww-pane-heading) !important;
    line-height:1.25 !important;
    white-space:normal !important;
    overflow-wrap:normal !important;
  }
  html body[data-shorelysafe-ui] :is(#leftPanel#leftPanel,#rightRail#rightRail,#mobileRailMount#mobileRailMount) :is(button:not(.help-btn):not(.centered-close-control):not(.calendar-day):not(.calendar-nav-btn),.pill,.layer-name,.top-tide-main,.top-tide-sub,.top-tide-rank,.town-address-input,.town-address-label,select,.observed-date-input) {
    font-size:var(--nww-pane-font) !important;
    line-height:1.25 !important;
    letter-spacing:0 !important;
  }
  html body[data-shorelysafe-ui] :is(#leftPanel#leftPanel,#rightRail#rightRail,#mobileRailMount#mobileRailMount) :is(.nww-layer-detail,.right-rail-note,.town-address-status,.depth-legend-labels,.legend-row,.legend-label) {
    font-size:var(--nww-pane-detail) !important;
    line-height:1.25 !important;
    letter-spacing:0 !important;
  }
  html body[data-shorelysafe-ui] #mapperTutorialBtn#mapperTutorialBtn.mapper-tutorial-launch {
    font-size:var(--nww-pane-font) !important;
    line-height:1.25 !important;
  }
  html body[data-shorelysafe-ui] :is(#leftPanel#leftPanel,#rightRail#rightRail,#mobileRailMount#mobileRailMount) section.nww-layers-card.layers-card .layer-name {
    font-size:var(--nww-pane-font) !important;
    line-height:1.25 !important;
  }
  html body[data-shorelysafe-ui] :is(#leftPanel#leftPanel,#rightRail#rightRail,#mobileRailMount#mobileRailMount) .top-tide-item {
    grid-template-columns:2.2ch minmax(0,1fr) auto !important;
    gap:4px !important;
  }
  /* Keep the disclosure as compact as the flood rows above it. */
  html body[data-shorelysafe-ui] :is(#leftPanel#leftPanel,#rightRail#rightRail,#mobileRailMount#mobileRailMount) .top-tide-more-btn {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:6px !important;
    box-sizing:border-box !important;
    height:auto !important;
    min-height:34px !important;
    padding:4px 10px !important;
    border:1px solid var(--fleet-line) !important;
    border-radius:10px !important;
    background:rgba(255,255,255,.055) !important;
    color:var(--fleet-text) !important;
    font-weight:600 !important;
    box-shadow:none !important;
    transform:none !important;
  }
  html body[data-shorelysafe-ui] :is(#leftPanel#leftPanel,#rightRail#rightRail,#mobileRailMount#mobileRailMount) .top-tide-more-btn:hover:not(:disabled) {
    border-color:var(--fleet-accent) !important;
    background:rgba(96,165,250,.12) !important;
  }
  html body[data-shorelysafe-ui] .top-tide-more-icon {
    display:block !important;
    width:14px !important;
    height:14px !important;
    flex:0 0 14px !important;
    color:var(--fleet-accent) !important;
  }
  html body[data-shorelysafe-ui] :is(#leftPanel#leftPanel,#rightRail#rightRail,#mobileRailMount#mobileRailMount) .top-tide-main {
    white-space:normal !important;
    overflow-wrap:normal !important;
    word-break:normal !important;
  }
  html body[data-shorelysafe-ui] :is(#leftPanel#leftPanel,#rightRail#rightRail,#mobileRailMount#mobileRailMount) .town-address-actions > * {
    height:auto !important;
    min-height:36px !important;
    white-space:normal !important;
    overflow-wrap:normal !important;
  }
  html body[data-shorelysafe-ui] :is(#leftPanel#leftPanel,#rightRail#rightRail,#mobileRailMount#mobileRailMount) .town-address-input {
    font-size:var(--nww-pane-font) !important;
    line-height:1.25 !important;
  }
  @media (min-width:901px) and (min-height:561px) and (not (any-pointer:coarse)), (min-width:1367px) and (min-height:561px), (min-width:901px) and (pointer:fine) and (not (any-pointer:coarse)), (min-width:1367px) and (pointer:fine), (min-width:901px) and (pointer:none) and (not (any-pointer:coarse)), (min-width:1367px) and (pointer:none) {
    html body[data-shorelysafe-ui] #rightRail#rightRail section.nww-layers-card.layers-card .layer-list { gap:0 !important; }
    html body[data-shorelysafe-ui] #rightRail#rightRail section.nww-layers-card.layers-card .layer-item {
      min-height:34px !important;
      padding:4px 6px !important;
    }
    html body[data-shorelysafe-ui] #leftPanel { --nww-control-button:44px; }
    html body[data-shorelysafe-ui] #leftPanel > :is(.data-source-card,.forecast-scenario-card,.overlay-card,.datum-card,#timelineIntervalCard) > :is(.button-grid-2,.button-grid-3,.segmented-control,#timelineIntervalToggle) > button {
      font-size:var(--nww-pane-font) !important;
      white-space:normal !important;
      overflow-wrap:normal !important;
      word-break:normal !important;
    }
    @media (max-height:800px) {
      /* Short desktop windows keep the same text size with less empty padding. */
      html body[data-shorelysafe-ui]:not(.mobile-optimized) #leftPanel {
        --nww-control-padding:3px;
        --nww-control-gap:2px;
        --nww-control-button:36px;
        gap:4px !important;
      }
    }
    html body[data-shorelysafe-ui] #leftPanel .section-title > .pill {
      font-size:var(--nww-pane-font) !important;
    }
    html body[data-shorelysafe-ui] #leftPanel .depth-legend-labels {
      font-size:var(--nww-pane-detail) !important;
      line-height:1.25 !important;
    }
  }
  @media (max-width:900px), (max-width:1366px) and (any-pointer:coarse), (max-height:560px) and (pointer:coarse) {
    html body[data-shorelysafe-ui] #leftPanel#leftPanel > :is(.data-source-card,.forecast-scenario-card,.overlay-card,.datum-card,#timelineIntervalCard) > :is(.button-grid-2,.button-grid-3,.segmented-control,#timelineIntervalToggle) > button {
      height:auto !important;
      min-height:48px !important;
      padding:4px !important;
      white-space:normal !important;
    }
    html body[data-shorelysafe-ui] #leftPanel#leftPanel .top-tide-more-btn { min-height:44px !important; }
    html body[data-shorelysafe-ui] #leftPanel#leftPanel .town-address-input {
      font-size:16px !important;
    }
  }
}

@layer floodmapper-unified-base-polish {
/* Reference: approved Highlands desktop interface, with responsive town labels. */
html body[data-floodmapper-reference] {--fleet-panel:rgba(17,24,38,.97);--fleet-text:#eaf0ff;--fleet-line:rgba(191,219,254,.22);--fleet-accent:#60a5fa;--nw-ui-blue:#60a5fa;--nw-ui-blue-rgb:96,165,250;--accent-soft:rgba(96,165,250,.16);--text:#eaf0ff;--bg:#0b1220;--line:rgba(191,219,254,.22);}
html body[data-floodmapper-reference] :is(#leftPanel,#rightRail,#mobileRailMount) {background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;filter:none!important;}
html body[data-floodmapper-reference] :is(#leftPanel,#rightRail,#mobileRailMount) > :is(.panel-card,.rail-card,#legendDock),
html body[data-floodmapper-reference] #legendDock {background:var(--fleet-panel)!important;border:1px solid var(--fleet-line)!important;border-radius:16px!important;box-shadow:none!important;backdrop-filter:none!important;}
html body[data-floodmapper-reference] :is(#leftPanel,#rightRail,#mobileRailMount) .right-logo-card {display:none!important;}
html body[data-floodmapper-reference] :is(#leftPanel,#rightRail) .section-title>.pill:not(#opacityText) {display:none!important;}
html body[data-floodmapper-reference] :is(#leftPanel,#rightRail,#mobileRailMount) button:not(.help-btn):not(.centered-close-control):not(.calendar-day):not(.calendar-nav-btn) {color:var(--fleet-text)!important;}
html body[data-floodmapper-reference] :is(#leftPanel,#rightRail,#mobileRailMount) button.active {color:var(--fleet-accent)!important;border-color:var(--fleet-accent)!important;background:var(--accent-soft)!important;}
html body[data-floodmapper-reference] :is(#leftPanel,#rightRail) .snapshot-card {display:none!important;}
html body[data-floodmapper-reference] #mapTitleBadge {visibility:visible!important;opacity:1!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:10px!important;background:#171f2e!important;border:1px solid var(--fleet-line)!important;border-radius:999px!important;box-shadow:0 12px 26px rgba(2,6,23,.15)!important;z-index:1100!important;overflow:hidden!important;box-sizing:border-box!important;}
html body[data-floodmapper-reference] #mapTitleBadge #mapTitleText {display:block!important;min-width:0!important;max-width:100%!important;white-space:normal!important;text-align:center!important;font:850 clamp(19px,2.4vw,36px)/1.08 system-ui!important;letter-spacing:-1px!important;color:#dbeafe!important;overflow-wrap:normal!important;}
html body[data-floodmapper-reference] #mapTitleBadge #mapTitleLogo[src]:not([src=""]) {display:block!important;width:46px!important;height:46px!important;min-width:46px!important;object-fit:contain!important;background:#fff!important;border-radius:50%!important;padding:3px!important;}
html body[data-floodmapper-reference] #mapTitleBadge #mapTitlePartnerLogo {display:block!important;width:104px!important;min-width:104px!important;max-width:104px!important;height:42px!important;max-height:42px!important;object-fit:contain!important;background:white!important;border-radius:6px!important;padding:3px 5px!important;}
html body[data-floodmapper-reference] #leftPanel>.data-source-card .button-grid-2 {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
html body[data-floodmapper-reference] #leftPanel>.data-source-card .button-grid-2:has(>button:nth-child(3)) {grid-template-columns:repeat(3,minmax(0,1fr))!important;}
html body[data-floodmapper-reference] #leftPanel #forecastScenarioCard[hidden],html body[data-floodmapper-reference] #leftPanel #calendarCard:not(.active) {display:none!important;}
html body[data-floodmapper-reference] .opacity-card .control-row {display:grid!important;grid-template-columns:minmax(0,1fr)!important;justify-items:center!important;}
html body[data-floodmapper-reference] #opacityText {position:static!important;display:block!important;align-self:center!important;text-align:center!important;background:none!important;border:0!important;width:100%!important;padding:0!important;}
html body[data-floodmapper-reference] #timelineBubble {translate:none!important;scale:none!important;transform:none!important;}
html body[data-floodmapper-reference] #timelineBubble .timeline-bubble-stage {background:rgba(96,165,250,.25)!important;border:1px solid #bfdbfe!important;border-radius:999px!important;color:#f8fbff!important;white-space:nowrap!important;}
html body[data-floodmapper-reference] #timelineDock .timeline-day {background-image:var(--fleet-day-gradient,var(--timeline-day-gradient,var(--county-day-gradient,none)))!important;background-size:100% 100%!important;text-shadow:0 1px 3px #000,0 0 6px #000!important;}
html body[data-floodmapper-reference] #timelineDock .timeline-key-item::after {content:none!important;}
html body[data-floodmapper-reference] #timelineDock .timeline-key-label {color:#eaf0ff!important;}
html body[data-floodmapper-reference] #timelineDock :is(#stopBtn,#reloadBtn,#timelineMeta) {display:none!important;}
html body[data-floodmapper-reference] #timelineDock :is(.timeline-top,.timeline-controls) {display:contents!important;}
html body[data-floodmapper-reference] #rightRail #downloadCard :is(.rail-head,.download-launch-meta) {display:none!important;}
html body[data-floodmapper-reference] :is(#mapperTutorialBtn,#avalonTourBtn) {background:var(--fleet-panel)!important;border:1px solid var(--fleet-line)!important;border-radius:12px!important;color:#eaf0ff!important;min-height:44px!important;width:100%!important;box-sizing:border-box!important;}
html body[data-floodmapper-reference] :is(button,input,select,[role="switch"]):focus-visible {outline:2px solid #7dd3fc!important;outline-offset:3px!important;}
html body[data-floodmapper-reference] #nwDefaultNavControl {filter:drop-shadow(0 8px 12px rgba(2,6,23,.2))!important;}
html body[data-floodmapper-reference] #nwDefaultNavControl .nw-direction-wheel {background:#142238!important;border-color:#60a5fa!important;}
html body[data-floodmapper-reference] #nwDefaultNavControl :is(.nw-simple-view,.nw-simple-zoom) {background:#142238!important;border-color:#60a5fa!important;color:#60a5fa!important;}
@media(min-width:901px) and (not (any-pointer:coarse)), (min-width:1367px) {
 html body[data-floodmapper-reference] :is(#leftPanel,#rightRail){position:absolute!important;display:flex!important;flex-direction:column!important;gap:6px!important;padding:0!important;margin:0!important;border:0!important;}
 html body[data-floodmapper-reference] #leftPanel {width:300px!important;left:16px;top:16px;}
 html body[data-floodmapper-reference] #rightRail {width:280px!important;right:16px;top:16px;}
 html body[data-floodmapper-reference] #leftPanel>#legendDock {position:relative!important;inset:auto!important;width:100%!important;transform:none!important;}
 html body[data-floodmapper-reference] #leftPanel>.mobile-top-tides-card {display:none!important;}
 html body[data-floodmapper-reference] #rightRail .top-tide-list {max-height:180px!important;overflow:auto!important;}
 html body[data-floodmapper-reference] #timelineBubble {position:absolute!important;top:auto!important;bottom:120px!important;left:24px!important;right:auto!important;width:max-content!important;min-width:0!important;max-width:calc(100vw - 48px)!important;height:auto!important;min-height:44px!important;margin:0!important;padding:9px 14px!important;display:flex!important;align-items:center!important;gap:6px!important;background:#111827!important;border:1px solid #7594ad!important;border-radius:999px!important;box-sizing:border-box!important;}
 html body[data-floodmapper-reference] #timelineBubble .timeline-bubble-current {font:800 23px/1.1 system-ui!important;white-space:nowrap!important;}
 html body[data-floodmapper-reference] #timelineBubble .timeline-bubble-stage {font:800 22px/1.1 system-ui!important;padding:3px 8px!important;}
 html body[data-floodmapper-reference] #timelineDock .timeline-day {flex:1 1 0!important;width:0!important;max-width:none!important;}
 html body[data-floodmapper-reference] #mobileControlsClose {display:none!important;}
 html body[data-floodmapper-reference] #townAddressCard {height:auto!important;min-height:0!important;max-height:none!important;}
}
@media(max-width:1100px) and (min-width:901px) and (not (any-pointer:coarse)) {html body[data-floodmapper-reference] #mapTitleBadge #mapTitlePartnerLogo {width:64px!important;min-width:64px!important;height:28px!important;}html body[data-floodmapper-reference] #mapTitleBadge #mapTitleLogo[src]:not([src=""]){width:30px!important;min-width:30px!important;height:30px!important;}}
@media(max-width:900px), (max-width:1366px) and (any-pointer:coarse), (max-height:560px) and (pointer:coarse) {
 html body[data-floodmapper-reference] #mapTitleBadge {z-index:6100!important;gap:5px!important;}
 html body[data-floodmapper-reference] #mapTitleBadge #mapTitleText {font:750 14px/1.15 system-ui!important;letter-spacing:0!important;text-align:left!important;}
 html body[data-floodmapper-reference] #mapTitleBadge #mapTitleLogo {display:none!important;}
 html body[data-floodmapper-reference] #mapTitleBadge #mapTitlePartnerLogo {display:none!important;}
 html body[data-floodmapper-reference].mobile-controls-open #mobileControlsToggle {display:none!important;}
 html body[data-floodmapper-reference] #leftPanel #mobileControlsClose {position:fixed!important;top:calc(var(--cm-top,8px) + 12px)!important;right:calc(var(--cm-right,8px) + 12px)!important;left:auto!important;bottom:auto!important;transform:none!important;margin:0!important;z-index:100005!important;}
 html body[data-floodmapper-reference] #leftPanel #nwwMobileControlHeader {top:0!important;margin:0!important;padding:14px 12px 12px!important;}
 html body[data-floodmapper-reference] #nwwMobileControlHeader .nww-drawer-heading {padding-right:52px!important;}
 html body[data-floodmapper-reference] #timelineDock #timelineBubble {left:62px!important;right:106px!important;width:auto!important;min-width:0!important;max-width:none!important;height:44px!important;min-height:44px!important;padding:0 3px!important;display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:center!important;gap:5px!important;overflow:hidden!important;}
 html body[data-floodmapper-reference] #timelineDock #timelineBubble .timeline-bubble-current {min-width:0!important;white-space:normal!important;text-align:center!important;font:700 12px/15px system-ui!important;}
 html body[data-floodmapper-reference] #timelineDock #timelineBubble .timeline-bubble-stage {flex:0 0 auto!important;font:650 12px/16px system-ui!important;padding:3px 5px!important;margin:0!important;}
 html body[data-floodmapper-reference] #timelineDock #timelineStepBack {left:auto!important;right:54px!important;top:8px!important;width:38px!important;height:44px!important;}
 html body[data-floodmapper-reference] #timelineDock #timelineStepForward {left:auto!important;right:8px!important;top:8px!important;width:38px!important;height:44px!important;}
}
html body[data-floodmapper-reference] #mapTitleLogo[hidden] {display:none!important;}
html body[data-floodmapper-reference] #rightRail .top-tide-item {height:auto!important;min-height:34px!important;max-height:none!important;padding:7px 8px!important;}
html body[data-floodmapper-reference] #rightRail .top-tide-list {min-height:0!important;gap:5px!important;}
html body[data-floodmapper-reference] #rightRail .top-tide-more-btn {height:auto!important;min-height:34px!important;padding:6px!important;}
@media(min-width:901px) and (not (any-pointer:coarse)), (min-width:1367px) {
html body[data-floodmapper-reference] #leftPanel>.data-source-card{order:1!important;}
html body[data-floodmapper-reference] #leftPanel>#forecastScenarioCard{order:2!important;}
html body[data-floodmapper-reference] #leftPanel>#calendarCard{order:3!important;}
html body[data-floodmapper-reference] #leftPanel>#returnIntervalCard{order:3!important;}
html body[data-floodmapper-reference] #leftPanel>.overlay-card{order:4!important;}
html body[data-floodmapper-reference] #leftPanel>.datum-card{order:5!important;}
html body[data-floodmapper-reference] #leftPanel>.opacity-card{order:6!important;}
html body[data-floodmapper-reference] #leftPanel>#timelineIntervalCard{order:7!important;}
html body[data-floodmapper-reference] #leftPanel>#legendDock{order:8!important;}
html body[data-floodmapper-reference] #timelineDock .timeline-day{background-image:var(--fleet-day-gradient,var(--timeline-day-gradient,var(--county-day-gradient,none)))!important;}
html body[data-floodmapper-reference] .leaflet-control-zoom {overflow:hidden!important;border:1px solid #60a5fa!important;border-radius:10px!important;box-shadow:0 8px 18px #0003!important;}
html body[data-floodmapper-reference] .leaflet-control-zoom a {width:38px!important;height:38px!important;line-height:38px!important;background:#142238!important;color:#60a5fa!important;border-color:#60a5fa!important;}
}
@media(max-width:900px), (max-width:1366px) and (any-pointer:coarse), (max-height:560px) and (pointer:coarse) {
 html body[data-floodmapper-reference].mobile-controls-open #leftPanel {background:#0b1220!important;border:1px solid #7594ad!important;border-radius:18px!important;box-shadow:0 18px 60px #0008!important;}
 html body[data-floodmapper-reference] #leftPanel #nwwMobileControlHeader {background:#0b1220!important;}
 html body[data-floodmapper-reference] #leftPanel .snapshot-card {display:none!important;}
 html body[data-floodmapper-reference] #leftPanel .data-source-card{order:1!important;}
 html body[data-floodmapper-reference] #leftPanel #forecastScenarioCard{order:2!important;}
 html body[data-floodmapper-reference] #leftPanel #timelineIntervalCard{order:4!important;}
}
html body[data-floodmapper-reference] :is(#leftPanel,#rightRail,#mobileRailMount) button.active:not(.help-btn):not(.centered-close-control):not(.calendar-day):not(.calendar-nav-btn) {color:#60a5fa!important;}
html body[data-floodmapper-reference] #rightRail #downloadCard #openDownloadModalBtn {color:#60a5fa!important;}
@media(max-width:900px), (max-width:1366px) and (any-pointer:coarse), (max-height:560px) and (pointer:coarse) {
 html body[data-floodmapper-reference]:not(.observed-mode):not(.return-interval-mode) #leftPanel[data-nww-section="forecast"] #forecastScenarioCard:not([hidden]) {display:flex!important;}
}
html body[data-floodmapper-reference] #timelineDock .timeline-trackRow {width:auto!important;}
html body[data-floodmapper-reference] #timelineDock #hourSlider {width:100%!important;box-sizing:border-box!important;}
html body[data-floodmapper-reference] #timelineBubble :is(.timeline-bubble-start,.timeline-bubble-end,.timeline-bubble-first,.timeline-bubble-last) {display:none!important;}
@media(min-width:901px) and (not (any-pointer:coarse)), (min-width:1367px) {html body[data-floodmapper-reference] #timelineDock :is(#timelinePreviousDay,#timelineNextDay){display:none!important;}}
@media(max-width:900px), (max-width:1366px) and (any-pointer:coarse), (max-height:560px) and (pointer:coarse) {
 html body[data-floodmapper-reference] #timelineDock #timelineDayTabs .timeline-day:not(.active){display:none!important;}
 html body[data-floodmapper-reference]:not(.mobile-legend-open) #legendDock {position:fixed!important;top:calc(12px + env(safe-area-inset-top))!important;right:calc(112px + env(safe-area-inset-right))!important;left:auto!important;bottom:auto!important;width:62px!important;min-width:62px!important;max-width:62px!important;height:44px!important;min-height:44px!important;max-height:44px!important;padding:0!important;margin:0!important;border-radius:10px!important;z-index:6200!important;overflow:hidden!important;cursor:pointer!important;}
 html body[data-floodmapper-reference]:not(.mobile-legend-open) #legendDock>* {display:none!important;}
 html body[data-floodmapper-reference]:not(.mobile-legend-open) #legendDock::after {content:'Key'!important;position:absolute!important;inset:0!important;display:grid!important;place-items:center!important;font:700 14px/1 system-ui!important;color:#eaf0ff!important;}
 html body[data-floodmapper-reference].mobile-controls-open #legendDock {visibility:hidden!important;}
}
@media(max-width:900px), (max-width:1366px) and (any-pointer:coarse), (max-height:560px) and (pointer:coarse) {
 html body[data-floodmapper-reference][data-fleet-legacy-phone] #timelineDock #timelineBubble {left:12px!important;right:66px!important;}
 html body[data-floodmapper-reference][data-fleet-legacy-phone] #timelineDock #playBtn {left:auto!important;right:8px!important;top:8px!important;}
 html body[data-floodmapper-reference][data-fleet-legacy-phone] #timelineDock :is(#timelinePreviousDay,#timelineNextDay) {position:absolute!important;top:60px!important;display:flex!important;align-items:center!important;justify-content:center!important;width:64px!important;min-width:64px!important;max-width:64px!important;height:44px!important;margin:0!important;padding:4px!important;background:#172336!important;color:#eaf0ff!important;border:1px solid #64748b!important;border-radius:10px!important;z-index:4!important;font:600 12px system-ui!important;}
 html body[data-floodmapper-reference][data-fleet-legacy-phone] #timelineDock #timelinePreviousDay {left:8px!important;right:auto!important;}
 html body[data-floodmapper-reference][data-fleet-legacy-phone] #timelineDock #timelineNextDay {left:auto!important;right:8px!important;}
 html body[data-floodmapper-reference][data-fleet-legacy-phone] #timelineDock #timelineDayTabs {left:80px!important;right:80px!important;}
 html body[data-floodmapper-reference][data-fleet-legacy-phone] #timelineBubble .timeline-bubble-edge {display:none!important;}
 html body[data-floodmapper-reference][data-fleet-legacy-phone] .leaflet-top.leaflet-right {top:76px!important;right:8px!important;}
 html body[data-floodmapper-reference][data-fleet-legacy-phone] #mobileControlsToggle {font-size:0!important;}
 html body[data-floodmapper-reference][data-fleet-legacy-phone] #mobileControlsToggle::after {content:'Controls'!important;font:650 14px/44px system-ui!important;}
}
@media(min-width:901px) and (not (any-pointer:coarse)), (min-width:1367px) {
 html body[data-floodmapper-reference] #timelineDock .timeline-trackRow {position:absolute!important;left:84px!important;right:20px!important;top:70px!important;bottom:auto!important;width:auto!important;height:24px!important;padding:0!important;margin:0!important;}
 html body[data-floodmapper-reference] #timelineDock #hourSlider {position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;padding:0!important;margin:0!important;transform:none!important;height:24px!important;background:var(--nww-stage-gradient,linear-gradient(#94a3b8,#94a3b8)) center / calc(100% - 26px) 5px no-repeat!important;}
 html body[data-floodmapper-reference] #timelineDock #hourSlider::-webkit-slider-runnable-track {height:5px!important;background:transparent!important;box-shadow:none!important;border:0!important;}
 html body[data-floodmapper-reference] #timelineDock #hourSlider::-moz-range-track {height:5px!important;background:transparent!important;box-shadow:none!important;border:0!important;}
}

}
/* One ordering and one set of dimensions for every renderer. */
@layer floodmapper-unified-polish {
 /* Native minimum font sizes can wrap every choice group onto more lines.
    Keep each control's normal minimum size while its row grows with its text. */
 html body[data-floodmapper-unified] #leftPanel :is(.button-grid-2,.button-grid-3,.segmented-control,#timelineIntervalToggle,.return-interval-grid) {
   height:auto!important;max-height:none!important;align-items:stretch!important;
 }
 html body[data-floodmapper-unified] #leftPanel :is(.button-grid-2,.button-grid-3,.segmented-control,#timelineIntervalToggle,.return-interval-grid) > button {
   height:auto!important;max-height:none!important;min-width:0!important;
   white-space:normal!important;overflow-wrap:anywhere!important;overflow:visible!important;
 }
 @media(max-width:900px), (max-width:1366px) and (any-pointer:coarse), (max-height:560px) and (pointer:coarse), (max-height:560px) {
  html body[data-floodmapper-unified] #leftPanel #timelineIntervalToggle,
  html body[data-floodmapper-unified] #leftPanel :is(.button-grid-2,.button-grid-3,.segmented-control,#timelineIntervalToggle) > button {
    min-height:48px!important;
  }
  html body[data-floodmapper-unified] #nwwMobileControlHeader h2 {line-height:1.714285714!important;}
  html body[data-floodmapper-unified] #nwwMobileControlHeader p {line-height:1.333333333!important;}
 }
 html body[data-floodmapper-unified] #nativeRoadNamesHint {display:none!important;}
 html body[data-floodmapper-unified] #roadImpactsKey[hidden] {display:none!important;}
 html body[data-floodmapper-unified] .top-tide-more-btn .unified-more-plus {color:#60a5fa!important;background:transparent!important;border:0!important;box-shadow:none!important;width:auto!important;height:auto!important;}
 html body[data-floodmapper-unified] #legendCollapseBtn {display:none!important;}
 html body[data-floodmapper-unified].return-interval-mode #forecastScenarioCard {display:none!important;}
 html body[data-floodmapper-unified].return-interval-mode #returnIntervalCard {display:flex!important;}
 html body[data-floodmapper-unified] :is(#leftPanel,#rightRail,#mobileRailMount) > :is(.panel-card,.rail-card,#legendDock) {background:#171e2a!important;backdrop-filter:none!important;isolation:isolate;}
 html body[data-floodmapper-unified] #leftPanel>.data-source-card {order:10!important;}
 html body[data-floodmapper-unified] #leftPanel>#forecastScenarioCard {order:20!important;}
 html body[data-floodmapper-unified] #leftPanel>:is(#calendarCard,#returnIntervalCard,.return-interval-card) {order:30!important;}
 html body[data-floodmapper-unified] #leftPanel>.overlay-card {order:40!important;}
 html body[data-floodmapper-unified] #leftPanel>.datum-card {order:50!important;}
 html body[data-floodmapper-unified] #leftPanel>.opacity-card {order:60!important;}
 html body[data-floodmapper-unified] #leftPanel>#timelineIntervalCard {order:70!important;}
 html body[data-floodmapper-unified] #leftPanel>#legendDock {order:80!important;}
 html body[data-floodmapper-unified] #leftPanel>.mobile-top-tides-card {order:80!important;}
 html body[data-floodmapper-unified] #leftPanel>#mobileRailMount {order:90!important;}
 html body[data-floodmapper-unified] #rightRail>.layers-card {order:10!important;}
 html body[data-floodmapper-unified] #rightRail>#townAddressCard {order:20!important;}
 html body[data-floodmapper-unified] #rightRail>#downloadCard {order:30!important;}
 html body[data-floodmapper-unified] #rightRail>.top-tides-card {order:40!important;}
 html body[data-floodmapper-unified] #rightRail>:is(#mapperTutorialBtn,#avalonTourBtn) {order:0!important;}
 html body[data-floodmapper-unified] :is(#leftPanel,#rightRail,#mobileRailMount) .layers-card .layer-list {display:flex!important;flex-direction:column!important;gap:0!important;}
 html body[data-floodmapper-unified] :is(#leftPanel,#rightRail,#mobileRailMount) .layers-card .layer-item {display:grid!important;grid-template-columns:minmax(0,1fr) 40px!important;min-height:36px!important;gap:10px!important;padding:6px 0!important;margin:0!important;border:0!important;border-bottom:1px solid rgba(191,219,254,.12)!important;border-radius:0!important;}
 html body[data-floodmapper-unified] .layers-card .layer-item:last-child {border-bottom:0!important;}
 html body[data-floodmapper-unified] .layers-card .layer-meta {grid-column:1!important;grid-row:1!important;}
 html body[data-floodmapper-unified] .layers-card .toggle {grid-column:2!important;grid-row:1!important;justify-self:end!important;}
 html body[data-floodmapper-unified] .layers-card .layer-name {font-size:14px!important;line-height:1.2!important;overflow-wrap:normal!important;}
 html body[data-floodmapper-unified] .layers-card [aria-disabled="true"]:focus-visible {outline:2px solid #94a8bf!important;outline-offset:3px!important;}
 html body[data-floodmapper-unified] #exportPartnerLogo[src]:not([src=""]) {display:block!important;}
 html body[data-floodmapper-unified] :is(#leftPanel,#rightRail) {scroll-behavior:auto!important;}
 html body[data-floodmapper-unified] :is(#map,#map3d,#countyStandalone3d) .leaflet-image-layer {animation:none!important;transition:none!important;}
 html body[data-floodmapper-unified] #mapTitleBadge #mapTitleText {min-width:0!important;overflow-wrap:normal!important;}
 html body[data-floodmapper-unified] #timelineBubble:has(.timeline-bubble-startup-placeholder),html body[data-floodmapper-unified] #timelineBubble:not(:has(.timeline-bubble-current)),html body[data-floodmapper-unified] #timelineBubble:not(:has(.timeline-bubble-stage)) {visibility:hidden!important;}
 html body[data-floodmapper-unified]:not(:has(#nwDefaultNavControl)) .leaflet-control-zoom {position:static!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;transform:none!important;float:none!important;margin:0!important;display:block!important;}
 @media(min-width:901px) and (not (any-pointer:coarse)), (min-width:1367px) {
  html body[data-floodmapper-unified]:not(:has(#nwDefaultNavControl)) .leaflet-top.leaflet-right {position:absolute!important;left:auto!important;right:var(--county-nav-right,310px)!important;top:16px!important;margin:0!important;}
  html body[data-floodmapper-unified]:has(#countyStandaloneView) .leaflet-top.leaflet-right {top:140px!important;}

  html body[data-floodmapper-unified] #nwwMobileControlHeader {display:none!important;}
  html body[data-floodmapper-unified] #leftPanel,html body[data-floodmapper-unified] #rightRail {zoom:1!important;gap:6px!important;scrollbar-gutter:stable;}
  /* Match the controller's finished desktop geometry before its script loads. */
  html body[data-floodmapper-unified] :is(#leftPanel,#rightRail) {position:absolute!important;top:16px!important;bottom:auto!important;height:auto!important;min-height:0!important;min-width:0!important;padding:0!important;}
  html body[data-floodmapper-unified] #leftPanel {left:16px!important;right:auto!important;width:300px!important;max-width:300px!important;}
  html body[data-floodmapper-unified] #rightRail {left:auto!important;right:16px!important;width:280px!important;max-width:280px!important;}
  html body[data-floodmapper-unified] #leftPanel>:is(.panel-card,#legendDock),html body[data-floodmapper-unified] #rightRail>.rail-card {flex:0 0 auto!important;}
  html body[data-floodmapper-unified] #timelineDock {position:fixed!important;left:16px!important;right:16px!important;bottom:16px!important;height:112px!important;min-height:112px!important;max-height:112px!important;margin:0!important;padding:0!important;}
  html body[data-floodmapper-unified] #timelineBubble {left:24px!important;right:auto!important;top:auto!important;bottom:120px!important;width:max-content!important;max-width:calc(100vw - 48px)!important;}
  /* Static controls already use their finished layout while data is loading. */
  html body[data-floodmapper-unified] :is(#leftPanel,#rightRail) {max-height:max(100px,calc(100dvh - 217.2px))!important;overflow-y:auto!important;overflow-x:hidden!important;}
  html body[data-floodmapper-unified] #mapTitleBadge {left:calc(50% - 40px)!important;right:auto!important;top:16px!important;max-width:max(100px,calc(100vw - 752px))!important;transform:translateX(-50%)!important;}
  html body[data-floodmapper-unified] #nwDefaultNavControl {left:auto!important;right:310px!important;top:16px!important;}
  html body[data-floodmapper-unified] #rightRail #topTideList:not(:has(.top-tide-item)) {min-height:118px!important;}
  @media(min-height:961px) {
    html body[data-floodmapper-unified] #rightRail #topTideList:not(:has(.top-tide-item)) {min-height:calc(max(34px,calc(1.25 * var(--nww-pane-font) + 16px)) + max(34px,calc(1.25 * var(--nww-pane-font) + 16px)) + max(34px,calc(1.25 * var(--nww-pane-font) + 14px)) + 10px)!important;}
  }
  @media(max-height:800px) {
    html body[data-floodmapper-unified] #rightRail #topTideList:not(:has(.top-tide-item)) {min-height:92px!important;}
  }
  html body[data-floodmapper-unified] #timelineBubble:not(:has(.timeline-bubble-stage))::after {content:"--"!important;position:static!important;inset:auto!important;display:block!important;transform:none!important;width:auto!important;height:auto!important;margin:0!important;flex:0 0 auto!important;font:800 22px/1.1 system-ui!important;padding:3px 8px!important;border:1px solid transparent!important;white-space:nowrap!important;background:none!important;}
  html body[data-floodmapper-unified] #timelineDock :is(#timelinePreviousDay,#timelineNextDay) {display:none!important;}
 }
 @media(min-width:901px) and (max-width:1200px) and (not (any-pointer:coarse)) {
  html body[data-floodmapper-unified] #mapTitleBadge #mapTitleText {font-size:22px!important;line-height:1.15!important;letter-spacing:-.5px!important;}
  html body[data-floodmapper-unified] #mapTitleBadge {gap:6px!important;padding:8px!important;}
  html body[data-floodmapper-unified] #mapTitleBadge #mapTitleLogo {width:28px!important;min-width:28px!important;height:28px!important;}
  html body[data-floodmapper-unified] #mapTitleBadge #mapTitlePartnerLogo {width:58px!important;min-width:58px!important;height:28px!important;}
 }
 @media(max-width:900px), (max-width:1366px) and (any-pointer:coarse), (max-height:560px) and (pointer:coarse), (max-height:560px) {
  html body[data-floodmapper-unified]:not(:has(#nwDefaultNavControl)) .leaflet-top.leaflet-right {position:absolute!important;left:auto!important;right:var(--cm-right,8px)!important;top:calc(var(--cm-top,8px) + 60px)!important;}
  html body[data-floodmapper-unified]:has(#countyStandaloneView) .leaflet-top.leaflet-right {top:calc(var(--cm-top,8px) + 112px)!important;}
  html body[data-floodmapper-unified] #mobileControlsToggle {position:fixed!important;top:var(--cm-top,8px)!important;right:var(--cm-right,8px)!important;left:auto!important;bottom:auto!important;width:96px!important;height:44px!important;min-height:44px!important;padding:0 10px!important;display:flex!important;align-items:center!important;justify-content:center!important;z-index:8000!important;font:650 14px system-ui!important;background:#142238!important;color:#eaf0ff!important;border:1px solid #60a5fa!important;border-radius:10px!important;}
  html body[data-floodmapper-unified].mobile-controls-open #mobileControlsToggle {display:none!important;}
  html body[data-floodmapper-unified] #mapTitleBadge :is(#mapTitleLogo,#mapTitlePartnerLogo) {display:none!important;}
  html body[data-floodmapper-unified] #mapTitleBadge #mapTitleText {font:700 clamp(16px,4.4vw,17px)/1.2 system-ui!important;letter-spacing:0!important;white-space:normal!important;}
  html body[data-floodmapper-unified] #mapTitleBadge {display:flex!important;padding:6px 10px!important;position:fixed!important;left:var(--cm-left,8px)!important;top:var(--cm-top,8px)!important;right:196px!important;max-width:calc(100vw - 204px)!important;min-height:44px!important;height:auto!important;transform:none!important;}
  html body[data-floodmapper-unified] #leftPanel {position:fixed!important;flex-direction:column!important;gap:8px!important;padding:0 12px 16px!important;box-sizing:border-box!important;border-radius:16px!important;z-index:10000!important;background:#101827!important;overflow-y:auto!important;overflow-x:hidden!important;}
  html body[data-floodmapper-unified]:not(.mobile-controls-open) #leftPanel {display:none!important;visibility:hidden!important;pointer-events:none!important;}
  html body[data-floodmapper-unified].mobile-controls-open #leftPanel {display:flex!important;visibility:visible!important;pointer-events:auto!important;}
  html body[data-floodmapper-unified] #mobileRailMount {display:contents!important;}
  html body[data-floodmapper-unified] #mobileRailMount>.layers-card {order:35!important;}
  html body[data-floodmapper-unified] #mobileRailMount>#townAddressCard {order:36!important;}
  html body[data-floodmapper-unified] #mobileRailMount>#downloadCard {order:37!important;}
  html body[data-floodmapper-unified] #mobileRailMount>.top-tides-card {order:38!important;}
  html body[data-floodmapper-unified] #mobileRailMount>:is(#mapperTutorialBtn,#avalonTourBtn) {order:39!important;}
  html body[data-floodmapper-unified] #nwwMobileControlHeader {position:sticky!important;top:0!important;order:0!important;z-index:40!important;display:block!important;background:#101827!important;padding:14px 0 10px!important;flex:0 0 auto!important;}
  html body[data-floodmapper-unified] #leftPanel>#nwwMobileControlHeader .nww-drawer-heading {padding-right:48px!important;}
  html body[data-floodmapper-unified] #mobileControlsClose {position:fixed!important;top:calc(var(--cm-top,8px) + 10px)!important;right:calc(var(--cm-right,8px) + 10px)!important;left:auto!important;bottom:auto!important;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;z-index:10020!important;}
  html body[data-floodmapper-unified] #leftPanel[data-nww-section="forecast"] [data-nww-group]:not([data-nww-group="forecast"]),html body[data-floodmapper-unified] #leftPanel[data-nww-section="map"] [data-nww-group]:not([data-nww-group="map"]),html body[data-floodmapper-unified] #leftPanel[data-nww-section="tools"] [data-nww-group]:not([data-nww-group="tools"]) {display:none!important;}
  html body[data-floodmapper-unified] #leftPanel [data-nww-group] {flex:0 0 auto!important;}
  html body[data-floodmapper-unified] #timelineDock {position:fixed!important;height:180px!important;min-height:180px!important;max-height:180px!important;margin:0!important;padding:0!important;}
  html body[data-floodmapper-unified] #timelineTimeBounds {display:none!important;}
  html body[data-floodmapper-unified] #timelineDock #timelineBubble {position:absolute!important;left:12px!important;right:66px!important;top:8px!important;bottom:auto!important;width:auto!important;max-width:none!important;height:44px!important;min-height:44px!important;display:flex!important;flex-direction:row!important;justify-content:center!important;align-items:center!important;gap:6px!important;}
  html body[data-floodmapper-unified]:has(#timelineStepBack) #timelineDock #timelineBubble {right:160px!important;}
  html body[data-floodmapper-unified] #timelineDock :is(#timelineStepBack,#timelineStepForward) {position:absolute!important;left:auto!important;top:8px!important;bottom:auto!important;width:44px!important;min-width:44px!important;max-width:44px!important;height:44px!important;min-height:44px!important;padding:2px!important;font-size:12px!important;}
  html body[data-floodmapper-unified] #timelineDock #timelineStepBack {right:108px!important;}
  html body[data-floodmapper-unified] #timelineDock #timelineStepForward {right:58px!important;}
  html body[data-floodmapper-unified] #timelineDock #playBtn {position:absolute!important;left:auto!important;right:8px!important;top:8px!important;width:44px!important;height:44px!important;}
  html body[data-floodmapper-unified] #timelineDock #timelineDayTabs {position:absolute!important;left:80px!important;right:80px!important;top:60px!important;bottom:auto!important;height:44px!important;display:flex!important;}
  html body[data-floodmapper-unified] #timelineDock .timeline-day {height:44px!important;min-height:44px!important;}
  html body[data-floodmapper-unified] #timelineDock .timeline-day:not(.active) {display:none!important;}
  html body[data-floodmapper-unified] #timelineDock :is(#timelinePreviousDay,#timelineNextDay) {position:absolute!important;display:flex!important;align-items:center!important;justify-content:center!important;top:60px!important;bottom:auto!important;width:64px!important;min-width:64px!important;height:44px!important;min-height:44px!important;padding:4px!important;}
  html body[data-floodmapper-unified] #timelineDock #timelinePreviousDay {left:8px!important;right:auto!important;}
  html body[data-floodmapper-unified] #timelineDock #timelineNextDay {left:auto!important;right:8px!important;}
  html body[data-floodmapper-unified] #timelineDock #timelineFloodKey {position:absolute!important;left:8px!important;right:8px!important;top:112px!important;bottom:auto!important;height:16px!important;min-height:16px!important;display:flex!important;justify-content:center!important;align-items:center!important;gap:8px!important;}
  html body[data-floodmapper-unified] #timelineDock .timeline-trackRow {position:absolute!important;left:8px!important;right:8px!important;top:132px!important;bottom:auto!important;width:auto!important;height:36px!important;}
  html body[data-floodmapper-unified] #timelineDock #hourSlider {width:100%!important;height:36px!important;min-height:36px!important;margin:0!important;}
  html body[data-floodmapper-unified] #timelineDock .timeline-key-label {font-size:10px!important;white-space:nowrap!important;}
  html body[data-floodmapper-unified] #nwDefaultNavControl {right:calc(var(--cm-right,8px))!important;left:auto!important;top:calc(var(--cm-top,8px) + 60px)!important;}
  html body[data-floodmapper-unified] #countyStandaloneView {right:calc(var(--cm-right,8px))!important;left:auto!important;top:calc(var(--cm-top,8px) + 60px)!important;}
 }
 @media(max-width:900px) and (max-height:500px), (max-width:1366px) and (any-pointer:coarse) and (max-height:500px), (max-height:500px) and (pointer:coarse), (min-width:901px) and (max-height:560px){
  html:root body[data-floodmapper-unified] #nwDefaultNavControl {display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;width:auto!important;height:44px!important;min-height:44px!important;}
  html:root body[data-floodmapper-unified] #nwDefaultNavControl .nw-direction-wheel {width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;font-size:8px!important;}
  html:root body[data-floodmapper-unified] #nwDefaultNavControl .nw-simple-view {width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;margin:0!important;}
  html:root body[data-floodmapper-unified] #nwDefaultNavControl .nw-simple-zoom {display:flex!important;flex-direction:row!important;width:88px!important;height:44px!important;margin:0!important;}
  html:root body[data-floodmapper-unified] #nwDefaultNavControl .nw-simple-zoom-button {width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;}
  html:root body[data-floodmapper-unified]:has(#countyStandaloneView) .leaflet-top.leaflet-right {top:calc(var(--cm-top,8px) + 60px)!important;right:calc(var(--cm-right,8px) + 60px)!important;}
  html:root body[data-floodmapper-unified]:has(#countyStandaloneView) .leaflet-control-zoom {display:flex!important;flex-direction:row!important;margin:0!important;}
  html:root body[data-floodmapper-unified]:has(#countyStandaloneView) .leaflet-control-zoom a {width:44px!important;height:44px!important;line-height:44px!important;}
 }
}


/* Fit the familiar sidebars to shorter desktop windows without scaling text. */
@layer floodmapper-unified-polish {
 html body[data-floodmapper-unified] #nwwCompactReturnPeriod {display:none!important;}
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) {
  --sidebar-card-pad:7px;
  --sidebar-gap:4px;
  --sidebar-inner-gap:4px;
  --sidebar-button:32px;
  --sidebar-heading:13px;
  --sidebar-text:13px;
  --sidebar-layer-row:30px;
  --sidebar-layer-pad:3px;
 }
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) {
  --sidebar-card-pad:4px;
  --sidebar-gap:3px;
  --sidebar-inner-gap:3px;
  --sidebar-button:28px;
  --sidebar-heading:12px;
  --sidebar-text:12px;
  --sidebar-layer-row:28px;
  --sidebar-layer-pad:2px;
 }
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) :is(#leftPanel#leftPanel,#rightRail#rightRail) {
  gap:var(--sidebar-gap)!important;
  --nww-control-padding:var(--sidebar-card-pad);
  --nww-control-gap:var(--sidebar-inner-gap);
  --nww-control-header:24px;
  --nww-control-button:var(--sidebar-button);
  --nww-control-slider:24px;
  --nww-pane-font:var(--sidebar-text);
  --nww-pane-heading:var(--sidebar-heading);
  --nww-pane-detail:12px;
 }
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) :is(#leftPanel#leftPanel,#rightRail#rightRail) > :is(.panel-card,.rail-card,#legendDock) {
  padding:var(--sidebar-card-pad) 8px!important;
  gap:var(--sidebar-inner-gap)!important;
  border-radius:12px!important;
  min-height:0!important;
 }
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) :is(#leftPanel#leftPanel,#rightRail#rightRail) :is(h2,h3,.legend-title,.legend-header-text) {
  font-size:var(--sidebar-heading)!important;
  line-height:1.2!important;
  margin:0!important;
 }
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) :is(#leftPanel#leftPanel,#rightRail#rightRail) :is(.section-title,.rail-head,.legend-header) {
  margin:0!important;
  gap:4px!important;
 }
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) :is(#leftPanel#leftPanel,#rightRail#rightRail) :is(button:not(.help-btn):not(.centered-close-control),input,select,.layer-name,.top-tide-main,.top-tide-sub,.top-tide-rank,.town-address-label,.depth-legend-labels) {
  font-size:var(--sidebar-text)!important;
  line-height:1.2!important;
 }
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) :is(#leftPanel#leftPanel,#rightRail#rightRail) button:not(.help-btn):not(.centered-close-control) {
  min-height:var(--sidebar-button)!important;
  padding:4px!important;
  border-radius:8px!important;
 }
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) #leftPanel#leftPanel .help-btn {
  width:24px!important;min-width:24px!important;height:24px!important;min-height:24px!important;
 }
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) #rightRail#rightRail .layer-item {
  min-height:var(--sidebar-layer-row)!important;
  padding:var(--sidebar-layer-pad) 0!important;
  gap:6px!important;
  grid-template-columns:minmax(0,1fr) 34px!important;
 }
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) #rightRail#rightRail .toggle {
  box-sizing:border-box!important;width:34px!important;min-width:34px!important;height:24px!important;min-height:24px!important;
 }
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) #rightRail#rightRail .toggle::after {
  width:16px!important;height:16px!important;top:3px!important;left:3px!important;
 }
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) #rightRail#rightRail .toggle.on::after {left:13px!important;}
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) #rightRail#rightRail #topTideList {
  display:flex!important;flex-direction:column!important;gap:3px!important;min-height:0!important;margin:0!important;padding:0!important;
 }
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) #rightRail#rightRail #topTideList:not(:has(.top-tide-item)) {min-height:calc(3 * var(--sidebar-button) + 6px)!important;}
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) #rightRail#rightRail .top-tide-item {
  min-height:28px!important;padding:3px 4px!important;gap:3px!important;
 }
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) #rightRail#rightRail .top-tide-more-btn {
  min-height:28px!important;padding:3px 4px!important;margin:0!important;
 }
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) #rightRail#rightRail .town-address-form {gap:4px!important;margin:0!important;}
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) #rightRail#rightRail .town-address-input {
  height:var(--sidebar-button)!important;min-height:var(--sidebar-button)!important;padding:4px 6px!important;margin:0!important;
 }
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) #rightRail#rightRail .town-address-actions {gap:4px!important;margin:0!important;}
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) #rightRail#rightRail .town-address-status:empty {display:none!important;}
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) #leftPanel#leftPanel #observedCalendarOpenBtn {
  min-height:var(--sidebar-button)!important;height:auto!important;padding:3px 5px!important;
 }
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) #leftPanel#leftPanel #calendarCard :is(.calendar-nav-btn,.day-nav-center,.observed-date-input) {
  height:var(--sidebar-button)!important;min-height:var(--sidebar-button)!important;
 }
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) #leftPanel#leftPanel #legendDock .depth-legend-gradient {height:12px!important;min-height:12px!important;}
 html body[data-floodmapper-unified]:is([data-sidebar-density="compact"],[data-sidebar-density="tight"]):not(.mobile-optimized) #leftPanel#leftPanel #legendDock :is(.depth-legend-labels,.stage-legend-row,.legend-row) {font-size:12px!important;line-height:1.2!important;}
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #rightRail#rightRail {
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:stretch!important;
 }
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #rightRail#rightRail > * {grid-column:1 / -1!important;min-width:0!important;}
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #rightRail#rightRail > .layers-card {grid-row:1!important;}
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #rightRail#rightRail > #townAddressCard {grid-row:2!important;}
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #rightRail#rightRail > #downloadCard {grid-row:3!important;grid-column:1!important;padding:3px!important;}
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #rightRail#rightRail > .top-tides-card {grid-row:4!important;}
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #rightRail#rightRail > #mapperTutorialBtn#mapperTutorialBtn {
  grid-row:3!important;grid-column:2!important;min-height:36px!important;height:auto!important;padding:3px!important;font-size:12px!important;line-height:1.2!important;
 }
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #rightRail#rightRail #downloadCard #openDownloadModalBtn {min-height:28px!important;height:100%!important;padding:3px!important;font-size:12px!important;}
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #rightRail#rightRail .layers-card .layer-list {
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;column-gap:8px!important;row-gap:0!important;
 }
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #rightRail#rightRail .layer-item {grid-column:auto!important;}
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #rightRail#rightRail .layer-item:has(#nsiStructuresToggle) {grid-column:auto!important;}
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #rightRail#rightRail .layer-item:has(#roadImpactsToggle) {grid-column:1 / -1!important;}
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #rightRail#rightRail #topTideList:not(:has(.top-tide-item)) {min-height:78px!important;}
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #rightRail#rightRail #topTideList :is(.top-tide-item,.top-tide-more-btn) {min-height:24px!important;padding:2px 4px!important;}
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #rightRail#rightRail .town-address-label {
  position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;
 }
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #leftPanel#leftPanel > :is(.overlay-card,.datum-card,.opacity-card,#timelineIntervalCard) {
  display:grid!important;grid-template-columns:82px minmax(0,1fr)!important;grid-template-rows:auto!important;grid-auto-rows:auto!important;align-items:center!important;column-gap:5px!important;row-gap:0!important;height:auto!important;min-height:0!important;max-height:none!important;
 }
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #leftPanel#leftPanel > :is(.overlay-card,.datum-card,.opacity-card,#timelineIntervalCard) > .section-title {
  width:auto!important;min-width:0!important;height:auto!important;min-height:24px!important;grid-column:1!important;grid-row:1!important;
 }
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #leftPanel#leftPanel > :is(.overlay-card,.datum-card,#timelineIntervalCard) > :is(.button-grid-2,.segmented-control,#timelineIntervalToggle) {
  width:100%!important;gap:3px!important;grid-column:2!important;grid-row:1!important;
 }
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #leftPanel#leftPanel .opacity-card .control-row {
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:4px!important;height:24px!important;min-height:24px!important;grid-column:2!important;grid-row:1!important;
 }
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #leftPanel#leftPanel #opacityText {width:auto!important;min-width:0!important;margin:0!important;text-align:right!important;}
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #leftPanel#leftPanel #returnIntervalCard .return-interval-grid {display:none!important;}
 html body[data-floodmapper-unified][data-sidebar-density="tight"]:not(.mobile-optimized) #leftPanel#leftPanel #returnIntervalCard #nwwCompactReturnPeriod {
  display:block!important;width:100%!important;max-width:100%!important;box-sizing:border-box!important;min-height:32px!important;padding:4px 6px!important;font-family:Inter,system-ui,sans-serif!important;font-size:12px!important;line-height:1.2!important;background:var(--fleet-panel,#171e2a)!important;color:var(--fleet-text,#eaf0ff)!important;border:1px solid var(--fleet-line,#3b485b)!important;border-radius:8px!important;color-scheme:dark!important;
 }
}

@layer floodmapper-unified-polish {
 @media(min-width:901px) and (max-height:560px) {
  html body[data-floodmapper-unified].mobile-controls-open #leftPanel#leftPanel {scroll-padding-top:136px!important;scroll-padding-bottom:24px!important;overscroll-behavior:contain!important;}
  html body[data-floodmapper-unified].mobile-controls-open #leftPanel#leftPanel #mobileRailMount {visibility:visible!important;pointer-events:auto!important;}
  html body[data-floodmapper-unified].mobile-controls-open #leftPanel#leftPanel #mobileControlsClose {display:grid!important;visibility:visible!important;pointer-events:auto!important;}
  html body[data-floodmapper-unified].mobile-controls-open #leftPanel#leftPanel #nwwMobileControlHeader [role="tab"] {min-height:44px!important;height:auto!important;}
  html body[data-floodmapper-unified] #mobileControlsToggle#mobileControlsToggle {width:96px!important;min-width:96px!important;max-width:96px!important;height:44px!important;min-height:44px!important;max-height:44px!important;font-size:0!important;}
  html body[data-floodmapper-unified] #mobileControlsToggle#mobileControlsToggle > * {display:none!important;}
  html body[data-floodmapper-unified] #mobileControlsToggle#mobileControlsToggle::before {content:none!important;}
  html body[data-floodmapper-unified] #mobileControlsToggle#mobileControlsToggle::after {content:'Controls'!important;position:static!important;display:block!important;width:auto!important;height:auto!important;transform:none!important;font:650 14px/1 Inter,system-ui,sans-serif!important;color:#eaf0ff!important;-webkit-text-fill-color:currentColor!important;}
  html body[data-floodmapper-unified]:not(.mobile-legend-open) #legendDock#legendDock {position:fixed!important;top:var(--cm-top,8px)!important;right:calc(var(--cm-right,8px) + 104px)!important;left:auto!important;bottom:auto!important;width:62px!important;min-width:62px!important;max-width:62px!important;height:44px!important;min-height:44px!important;max-height:44px!important;padding:0!important;margin:0!important;transform:none!important;border-radius:10px!important;overflow:hidden!important;cursor:pointer!important;z-index:6200!important;}
  html body[data-floodmapper-unified]:not(.mobile-legend-open) #legendDock#legendDock > * {display:none!important;}
  html body[data-floodmapper-unified] #legendDock#legendDock::before {content:none!important;}
  html body[data-floodmapper-unified]:not(.mobile-legend-open) #legendDock#legendDock::after {content:'Key'!important;position:absolute!important;inset:0!important;display:grid!important;place-items:center!important;width:auto!important;height:auto!important;transform:none!important;background:none!important;font:700 14px/1 Inter,system-ui,sans-serif!important;color:#eaf0ff!important;}
  html body[data-floodmapper-unified].mobile-legend-open #legendDock#legendDock {position:fixed!important;top:calc(var(--cm-top,8px) + 52px)!important;right:auto!important;left:var(--cm-left,8px)!important;bottom:auto!important;display:block!important;width:360px!important;min-width:0!important;max-width:calc(100vw - 16px)!important;height:auto!important;min-height:0!important;max-height:calc(100dvh - 260px)!important;padding:12px!important;margin:0!important;transform:none!important;overflow:auto!important;background:#171e2a!important;z-index:6250!important;}
  html body[data-floodmapper-unified].mobile-legend-open #legendDock#legendDock::after {content:none!important;}
  html body[data-floodmapper-unified].mobile-controls-open #legendDock#legendDock {visibility:hidden!important;pointer-events:none!important;}
  html body[data-floodmapper-unified] #timelineDock#timelineDock #timelineDayTabs {height:44px!important;min-height:44px!important;max-height:44px!important;overflow:hidden!important;}
  html body[data-floodmapper-unified] #timelineDock#timelineDock #timelineDayTabs .timeline-day {position:relative!important;flex:1 1 0!important;width:0!important;min-width:0!important;max-width:none!important;height:44px!important;min-height:44px!important;max-height:44px!important;box-sizing:border-box!important;padding:0 8px 4px!important;border:1px solid var(--fleet-line)!important;border-radius:9px!important;overflow:hidden!important;background:var(--accent-soft)!important;color:#f8fbff!important;font:650 14px/39px Inter,system-ui,sans-serif!important;text-align:center!important;text-shadow:none!important;}
  html body[data-floodmapper-unified] #timelineDock#timelineDock #timelineDayTabs .timeline-day::after {content:''!important;position:absolute!important;top:auto!important;bottom:0!important;left:0!important;right:0!important;width:auto!important;height:4px!important;transform:none!important;opacity:1!important;background:var(--fleet-day-gradient,var(--timeline-day-gradient,#94a3b8))!important;border:0!important;}
 }
}

/* Enlarged browser text keeps a full-width, scrollable desktop arrangement. */
@layer floodmapper-unified-polish {
 html body[data-floodmapper-unified][data-sidebar-fit="bounded"][data-sidebar-density="normal"] #leftPanel#leftPanel :is(.section-title,#legendHeader) {
  height:auto!important;min-height:min-content!important;max-height:none!important;
 }
 html body[data-floodmapper-unified][data-sidebar-fit="bounded"][data-sidebar-density="normal"] #leftPanel#leftPanel :is(.section-title,#legendHeader) :is(h2,h3) {
  line-height:1.5!important;
 }
 html body[data-floodmapper-unified][data-sidebar-fit="bounded"][data-sidebar-density="normal"] #leftPanel#leftPanel #legendDock {
  height:auto!important;min-height:0!important;max-height:none!important;grid-template-rows:auto auto!important;overflow:visible!important;
 }
 html body[data-floodmapper-unified][data-sidebar-fit="bounded"][data-sidebar-density="normal"] #leftPanel#leftPanel #legendDock :is(#legendBody,#legendList,.depth-legend-scale,.stage-legend-scale) {
  height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;
 }
 html body[data-floodmapper-unified][data-sidebar-fit="bounded"][data-sidebar-density="normal"] #leftPanel#leftPanel #legendDock :is(.depth-legend-labels,.stage-legend-labels) {
  display:flex!important;flex-wrap:wrap!important;justify-content:flex-start!important;align-items:baseline!important;gap:6px 12px!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;line-height:1.25!important;
 }
 html body[data-floodmapper-unified][data-sidebar-fit="bounded"][data-sidebar-density="normal"] #leftPanel#leftPanel #legendDock :is(.depth-legend-labels,.stage-legend-labels) > * {
  flex:0 1 auto!important;width:auto!important;min-width:0!important;max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.25!important;
 }
 html body[data-floodmapper-unified][data-sidebar-fit="bounded"][data-sidebar-density="normal"] #rightRail#rightRail #townAddressCard .town-address-actions {
  grid-template-columns:minmax(0,1fr)!important;gap:8px!important;
 }
 html body[data-floodmapper-unified][data-sidebar-fit="bounded"][data-sidebar-density="normal"] #rightRail#rightRail #townAddressCard .town-address-actions > * {
  width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:44px!important;max-height:none!important;padding:8px!important;white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.25!important;
 }
 html body[data-floodmapper-unified][data-sidebar-fit="bounded"][data-sidebar-density="normal"] #rightRail#rightRail #townAddressInput {
  height:auto!important;min-height:calc(1lh + 12px)!important;max-height:none!important;padding:6px!important;
 }
}

@layer shorelysafe-brand;
@layer shorelysafe-brand {
/* Persistent product identity inside the existing, measured title lane. */
html body #mapTitleBadge #mapTitlePartnerLogo{display:block!important;visibility:visible!important;opacity:1!important;width:104px!important;min-width:104px!important;max-width:104px!important;height:42px!important;max-height:42px!important;object-fit:contain!important;flex:0 0 104px!important;background:#fff!important;border-radius:6px!important;padding:3px 5px!important;margin:0!important}
@media(max-width:1100px){html body #mapTitleBadge #mapTitlePartnerLogo{width:76px!important;min-width:76px!important;max-width:76px!important;height:32px!important;max-height:32px!important;flex-basis:76px!important}}
@media(max-width:900px), (max-width:1366px) and (any-pointer:coarse) {html body #mapTitleBadge{gap:6px!important}html body #mapTitleBadge #mapTitlePartnerLogo{width:58px!important;min-width:58px!important;max-width:58px!important;height:25px!important;max-height:25px!important;flex-basis:58px!important;padding:2px!important}html body #mapTitleText{min-width:0!important;flex:1 1 auto!important}}
}
@layer county-safari-mobile {
  #countySafeAreaProbe {position:fixed!important;visibility:hidden!important;pointer-events:none!important;width:0!important;height:0!important;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)!important;}
  @media(max-width:900px), (max-width:1366px) and (any-pointer:coarse), (max-height:560px) and (pointer:coarse) {
    html body[data-county-mobile] #leftPanel {overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;scroll-padding-top:136px!important;scroll-padding-bottom:24px!important;}
    html body[data-county-mobile]:not(.observed-mode):not(.return-interval-mode) #leftPanel[data-nww-section="forecast"] #forecastScenarioCard:not([hidden]),
    html body[data-county-mobile].observed-mode #leftPanel[data-nww-section="forecast"] #calendarCard.active,
    html body[data-county-mobile].return-interval-mode #leftPanel[data-nww-section="forecast"] #returnIntervalCard:not([hidden]) {display:flex!important;flex-direction:column!important;height:auto!important;min-height:0!important;max-height:none!important;}
    html body[data-county-mobile] :is(#leftPanel,#downloadModal) :is(input,select,textarea) {font-size:16px!important;}
    html body[data-county-mobile] #leftPanel :is(button,[role="tab"]) {min-height:44px!important;}
    html body[data-county-mobile] #leftPanel :is(.calendar-day,.calendar-nav-btn) {min-height:36px!important;}
    html body[data-county-mobile] #mapTitleBadge {top:var(--cm-top,8px)!important;left:var(--cm-left,8px)!important;right:var(--cm-right,8px)!important;}
    html body[data-county-mobile] #mobileControlsToggle {top:calc(var(--cm-top,8px) + 4px)!important;right:calc(var(--cm-right,8px) + 4px)!important;}
    html body[data-county-mobile]:not(.mobile-legend-open) #legendDock {top:calc(var(--cm-top,8px) + 4px)!important;right:calc(var(--cm-right,8px) + 104px)!important;}
    html body[data-county-mobile] #leftPanel #mobileControlsClose {top:calc(var(--cm-top,8px) + 12px)!important;right:calc(var(--cm-right,8px) + 12px)!important;}
    html body[data-county-mobile] #nwDefaultNavControl {top:calc(var(--cm-top,8px) + 60px)!important;right:var(--cm-right,8px)!important;}
    html body[data-county-mobile] #countyStandaloneView {top:calc(var(--cm-top,8px) + 60px)!important;right:var(--cm-right,8px)!important;}
    html body[data-county-mobile] #countyStandalone3d .maplibregl-ctrl-top-right {top:calc(var(--cm-top,8px) + 110px)!important;right:calc(var(--cm-right,8px) - 10px)!important;}
    html body[data-county-mobile] .leaflet-bottom {bottom:calc(var(--cm-bottom,8px) + 188px)!important;}
    html body[data-county-mobile] #toast {bottom:calc(var(--cm-bottom,8px) + 190px)!important;max-height:calc(var(--cm-height,100dvh) - 230px)!important;overflow:auto!important;}
    html body[data-county-mobile] #downloadModal:not([hidden]) {top:var(--cm-top,8px)!important;bottom:var(--cm-bottom,8px)!important;left:var(--cm-left,8px)!important;right:var(--cm-right,8px)!important;width:auto!important;height:auto!important;min-height:0!important;padding:0!important;}
    html body[data-county-mobile] #downloadModal .download-modal-card {max-height:var(--cm-height,calc(100dvh - 16px))!important;width:min(100%,620px)!important;overflow-y:auto!important;overscroll-behavior:contain!important;}
    html body[data-county-mobile] #downloadModal .download-modal-head {position:sticky!important;top:0!important;z-index:2!important;background:var(--bg,#0b1220)!important;}
    @media(max-height:500px){
      html body[data-county-mobile] #nwDefaultNavControl {flex-direction:row!important;width:auto!important;height:44px!important;align-items:center!important;}
      html body[data-county-mobile] #nwDefaultNavControl .nw-direction-wheel {width:44px!important;height:44px!important;}
      html body[data-county-mobile] #nwDefaultNavControl .nw-simple-zoom {flex-direction:row!important;width:88px!important;height:44px!important;}
      html body[data-county-mobile] #countyStandalone3d .maplibregl-ctrl-top-right {top:calc(var(--cm-top,8px) + 60px)!important;right:calc(var(--cm-right,8px) + 48px)!important;}
      html body[data-county-mobile] #countyStandalone3d .maplibregl-ctrl-group {display:flex!important;}
    }
  }
}
@layer shorelysafe-unified {
  html body[data-county-viewport] :is(#leftPanel,#rightRail) {flex-shrink:0!important;}
  html body[data-county-viewport] #rightRail .top-tide-list {max-height:180px!important;overflow-y:auto!important;scrollbar-width:thin;}
  html body[data-county-viewport] #rightRail .rail-card {flex-shrink:0!important;}
  html body[data-county-viewport] :is(#rightRail,#leftPanel) #townAddressCard {height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;}
  html body[data-county-viewport] #countyStandalone3d {position:absolute!important;inset:0!important;z-index:2!important;display:none!important;}
  html body.county-standalone-3d #countyStandalone3d {display:block!important;}
  html body.county-standalone-3d #map {z-index:0!important;}
  html body[data-county-viewport] #countyStandalone3d .maplibregl-ctrl-top-right {top:140px!important;right:var(--county-nav-right,320px)!important;}
  html body[data-county-viewport] #countyStandaloneView {position:absolute!important;z-index:800!important;top:90px!important;right:320px;min-height:44px!important;min-width:52px!important;background:#101b2d!important;color:#eaf0ff!important;border:1px solid #60a5fa!important;border-radius:20px!important;font:700 14px system-ui!important;cursor:pointer!important;}
  @media(max-width:900px), (max-width:1366px) and (any-pointer:coarse), (max-height:560px) and (pointer:coarse) {
    html body[data-county-viewport] #countyStandaloneView {position:fixed!important;top:120px!important;right:12px!important;}
    html body[data-county-viewport] #countyStandalone3d .maplibregl-ctrl-top-right {top:170px!important;right:2px!important;}
  }
}
@layer shorelysafe-unified, shorelysafe-pane-fit, shorely-fleet-ui, avalon-mobile;