/* North Wildwood's compact layout keeps the original controls and map state. */
@layer north-wildwood-phone {
  :is(#mapCredits, #nwwDrawerViewMode, #nwwMobileUtilities, .nww-mobile-title) { display: none; }
  :is(#mapperTutorialBtn, #mobileMapperTutorialBtn):not(:focus-visible) {
    animation: none !important;
    outline: none !important;
  }

  html[data-nww-phone] body #timelineDock {
    --nww-key-width: 128px;
  }

  html[data-nww-phone] body #timelineDock #timelineFloodKey {
    position: absolute !important;
    inset: 8px 20px 8px auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 3px !important;
    box-sizing: border-box !important;
    width: var(--nww-key-width) !important;
    max-width: var(--nww-key-width) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 12px !important;
    border-inline-start: 1px solid #304055;
  }

  #timelineFloodKey .timeline-key-title {
    flex: 0 0 auto;
    align-self: stretch;
    text-align: center;
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 750;
    line-height: 18px;
    margin-bottom: 2px;
  }

  html[data-nww-phone] body #timelineDock #timelineFloodKey .timeline-key-label {
    font: 700 12px/14px Inter, system-ui, sans-serif !important;
  }

  html[data-nww-phone] body #timelineDock #timelineFloodKey .timeline-key-item {
    gap: 6px !important;
    height: 14px !important;
    min-height: 14px !important;
    max-height: 14px !important;
  }

  html[data-nww-phone] body #timelineDock #timelineFloodKey #roadImpactsKey:not([hidden]) {
    position: absolute;
    right: calc(100% + 12px);
    bottom: 0;
    width: max-content;
    max-width: 320px;
    white-space: normal;
  }

  html[data-nww-phone]:not(.county-compact) body #timelineDock #timelineDayTabs {
    top: 29px !important;
    right: var(--nww-desktop-slider-edge, 168px) !important;
  }

  html[data-nww-phone]:not(.county-compact) body #timelineDock .timeline-trackRow {
    top: 57px !important;
    left: 126px !important;
    right: 155px !important;
  }

  html[data-nww-phone] body #timelineDock :is(#playBtn, #timelineSpeedBtn) {
    background: #1b293d !important;
    border: 1px solid #405570 !important;
    color: #ecf4ff !important;
    box-shadow: none !important;
  }

  html[data-nww-phone] body #timelineDock #playBtn {
    background: #243651 !important;
    border-color: #526d91 !important;
  }

  html[data-nww-phone] body #timelineDock #playBtn::before,
  html[data-nww-phone] body #timelineDock #playBtn::after {
    content: none !important;
  }

  html[data-nww-phone] body #timelineDock :is(#playBtn, #timelineSpeedBtn):hover {
    background: #2b405f !important;
    border-color: #6d8eb9 !important;
  }

  html[data-nww-phone] body #timelineDock :is(#playBtn.is-playing, #timelineSpeedBtn[aria-pressed="true"]) {
    background: #274463 !important;
    border-color: #679aca !important;
    color: #e9f5ff !important;
  }

  html[data-nww-phone] body #timelineDock #timelineSpeedBtn[aria-pressed="true"] {
    border-color: #8db5df !important;
  }

  html[data-nww-phone] body #timelineDock #playBtn .playTriangle {
    border-left-color: currentColor !important;
    filter: none !important;
  }

  html[data-nww-phone] body #timelineDock #playBtn .pauseIcon::before,
  html[data-nww-phone] body #timelineDock #playBtn .pauseIcon::after {
    background: currentColor !important;
  }

  html[data-nww-phone] body #timelineDock #timelineSpeedBtn {
    position: absolute;
    top: 34px;
    left: 70px;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 42px;
    height: 42px;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 0;
    border-radius: 12px;
    font: 800 15px/1 Inter, system-ui, sans-serif;
    cursor: pointer;
    touch-action: manipulation;
  }

  html[data-nww-phone] body #timelineDock :is(#playBtn, #timelineSpeedBtn):focus-visible {
    outline: 2px solid #93c5fd !important;
    outline-offset: 3px;
  }

  html[data-nww-phone] body #timelineDock[data-single-timeline-time="true"] #timelineDayTabs {
    left: 126px !important;
  }

  html[data-nww-phone] body #timelineDock #timelineBubble[data-nww-thumb-follow] {
    overflow: visible !important;
    box-sizing: border-box !important;
    width: min(320px, calc(100% - 16px)) !important;
    max-width: calc(100% - 16px) !important;
    justify-content: center !important;
    font-variant-numeric: tabular-nums;
    transform: none !important;
  }

  html[data-nww-phone] body #timelineDock #timelineBubble[data-nww-thumb-follow] :is(.timeline-bubble-current, .timeline-bubble-stage-gauge) {
    min-width: 0 !important;
    white-space: normal !important;
    text-align: center !important;
  }

  html[data-nww-phone] body #timelineDock #timelineBubble[data-nww-thumb-follow]::after {
    display: none !important;
  }

  html[data-nww-phone] body #timelineDock #timelineBubble[data-nww-thumb-follow]::before {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 8px;
    height: 8px;
    border-right: 1px solid #526277;
    border-bottom: 1px solid #526277;
    background: #111826;
    transform: translateX(-50%) rotate(45deg);
    pointer-events: none;
  }

  html[data-nww-phone] body #timelineDock[data-nww-centered-slider] {
    --nww-desktop-pill-width: 320px;
    --nww-desktop-thumb-size: 26px;
    --nww-desktop-slider-edge: calc(var(--nww-desktop-pill-width) / 2 + 8px);
  }

  html[data-nww-phone] body #timelineDock[data-nww-centered-slider] .timeline-trackRow {
    left: calc(var(--nww-desktop-slider-edge) - var(--nww-desktop-thumb-size) / 2) !important;
    right: calc(var(--nww-desktop-slider-edge) - var(--nww-desktop-thumb-size) / 2) !important;
    width: auto !important;
    margin: 0 !important;
  }

  html[data-nww-phone] body #timelineDock[data-nww-centered-slider] #timelineDayTabs {
    left: var(--nww-desktop-slider-edge) !important;
  }

  html[data-nww-phone] body #timelineDock[data-nww-centered-slider] #hourSlider {
    --nww-thumb-size: var(--nww-desktop-thumb-size) !important;
  }

  html[data-nww-phone] body #timelineDock[data-nww-centered-slider] #timelineBubble[data-nww-thumb-follow] {
    width: var(--nww-desktop-pill-width) !important;
  }

  html[data-nww-phone] body:has(#timelineDock[data-nww-centered-slider]):not(:has(#downloadModal.open)) #toast {
    bottom: var(--nww-timeline-notice-bottom, 200px) !important;
  }

  html[data-nww-phone] body:has(#timelineDock[data-nww-centered-slider]) #floodFrameStatus {
    bottom: max(var(--flood-status-bottom, 0px), var(--nww-timeline-notice-bottom, 200px)) !important;
  }

  @media (min-height: 641px) {
    html[data-nww-phone]:not(.county-compact) body #timelineDock #timelineBubble {
      bottom: calc(100% + 8px) !important;
    }
  }

  @media (max-height: 640px) {
    html[data-nww-phone] body #timelineDock[data-nww-centered-slider] #timelineBubble {
      top: 4px !important;
      bottom: auto !important;
      height: 30px !important;
      min-height: 30px !important;
      padding-block: 0 !important;
      box-shadow: none !important;
    }
    html[data-nww-phone] body #timelineDock[data-nww-centered-slider] #timelineBubble[data-nww-thumb-follow] {
      padding-inline: 10px !important;
    }
    html[data-nww-phone] body #timelineDock[data-nww-centered-slider] #timelineBubble .timeline-bubble-current {
      font-size: 18px !important;
    }
    html[data-nww-phone] body #timelineDock[data-nww-centered-slider] #timelineBubble .timeline-bubble-stage {
      font-size: 16px !important;
    }
    html[data-nww-phone] body #timelineDock[data-nww-centered-slider] #timelineDayTabs {
      top: 40px !important;
    }
    html[data-nww-phone] body #timelineDock[data-nww-centered-slider] .timeline-trackRow {
      top: 63px !important;
    }
    html[data-nww-phone]:not(.county-compact) body #timelineDock #timelineFloodKey {
      top: 38px !important;
      bottom: 5px !important;
      gap: 0 !important;
    }
    html[data-nww-phone]:not(.county-compact) body #timelineDock #timelineFloodKey .timeline-key-title {
      line-height: 16px !important;
      margin-bottom: 1px;
    }
    html[data-nww-phone]:not(.county-compact) body #timelineDock #timelineFloodKey .timeline-key-label {
      line-height: 12px !important;
    }
    html[data-nww-phone]:not(.county-compact) body #timelineDock #timelineFloodKey .timeline-key-item {
      height: 12px !important;
      min-height: 12px !important;
      max-height: 12px !important;
    }
    html[data-nww-phone]:not(.county-compact) body #timelineDock #timelineFloodKey #roadImpactsKey:not([hidden]) {
      font-size: 10.5px !important;
      line-height: 10px !important;
    }
  }

  @media (max-width: 900px), (max-height: 560px), (max-width: 1366px) and (any-pointer: coarse) {
    html[data-nww-phone] body {
      --phone-surface: #111826;
      --phone-raised: rgba(255, 255, 255, .05);
      --phone-line: rgba(191, 219, 254, .22);
      --phone-label: var(--fleet-text);
      --phone-accent: var(--fleet-accent);
      --phone-shadow: 0 12px 26px rgba(2, 6, 23, .15);
      --phone-header-height: 50px;
      --phone-dock-max: 580px;
      --phone-dock-edge: calc(var(--cm-bottom, 8px) + var(--nww-phone-dock-height));
      --phone-popup-top: calc(var(--cm-top, 8px) + var(--phone-header-height) + 8px);
      --phone-legend-width: min(340px, 100%);
      --phone-dock-base: 154px;
      --phone-road-space: 0px;
      --nww-phone-dock-height: calc(var(--phone-dock-base) + var(--phone-road-space));
      --nww-mobile-timeline: var(--nww-phone-dock-height) !important;
      --nww-drawer-max: 480px;
    }

    html[data-nww-phone] body:has(#roadImpactsKey:not([hidden])) { --phone-road-space: 17px; }
    html[data-nww-phone] body:has(#timelineDock[data-single-timeline-time="true"]) {
      --phone-dock-base: 119px;
    }

    html[data-nww-phone] body #timelineDock {
      --nww-key-width: 104px;
      --phone-timeline-end: calc(var(--nww-key-width) + 18px);
    }

    html[data-nww-phone] body:not(.nw-app-loading, .mobile-controls-open) #nwwMobileUtilities {
      position: fixed;
      inset: var(--cm-top, 8px) var(--cm-right, 8px) auto var(--cm-left, 8px);
      z-index: 6200;
      display: flex;
      align-items: stretch;
      justify-content: space-between;
      gap: 8px;
      box-sizing: border-box;
      max-width: 520px;
      min-height: var(--phone-header-height);
      margin-inline: auto;
      pointer-events: none;
    }

    html[data-nww-phone] body #nwwMobileUtilities :is(#mapTitleBadge, .nww-mobile-actions) {
      box-sizing: border-box !important;
      border: 1px solid var(--phone-line) !important;
      border-radius: 12px !important;
      background: var(--phone-surface) !important;
      color: var(--phone-label) !important;
      box-shadow: 0 2px 7px rgba(2, 6, 23, .22) !important;
    }

    html[data-nww-phone] body #nwwMobileUtilities #mapTitleBadge {
      position: static !important;
      display: flex !important;
      align-items: center !important;
      justify-content: flex-start !important;
      width: auto !important;
      min-width: 0 !important;
      max-width: none !important;
      height: auto !important;
      min-height: 0 !important;
      margin: 0 !important;
      padding: 4px clamp(8px, 2.6vw, 12px) !important;
      transform: none !important;
    }

    html[data-nww-phone] body #nwwMobileUtilities :is(#mapTitleText, #mapTitlePartnerLogo) {
      display: none !important;
    }

    html[data-nww-phone] body #nwwMobileUtilities .nww-mobile-title {
      display: grid;
      gap: 1px;
      color: var(--phone-label);
      font: 550 12px/1.15 var(--nww-ui-font-family);
      text-align: start;
      white-space: normal;
    }

    html[data-nww-phone] body .nww-mobile-title strong {
      font-size: clamp(16px, 4.3vw, 18px);
      font-weight: 730;
      letter-spacing: -.025em;
    }
    html[data-nww-phone] body .nww-mobile-title > span { color: #b9c9df; }

    html[data-nww-phone] body #nwwMobileUtilities .nww-mobile-actions {
      display: flex;
      align-items: center;
      flex: none;
      gap: 2px;
      padding: 2px;
      pointer-events: auto;
    }

    html[data-nww-phone] body #nwwMobileUtilities .nww-mobile-actions > button {
      position: relative !important;
      inset: auto !important;
      display: grid !important;
      grid-template-rows: 17px 14px !important;
      justify-items: center !important;
      align-items: center !important;
      align-content: center !important;
      gap: 1px !important;
      box-sizing: border-box !important;
      min-width: 44px !important;
      width: clamp(47px, 13vw, 54px) !important;
      max-width: none !important;
      min-height: 44px !important;
      height: auto !important;
      margin: 0 !important;
      padding: 0 !important;
      transform: none !important;
      border: 1px solid transparent !important;
      border-radius: 9px !important;
      background: transparent !important;
      color: var(--phone-label) !important;
      box-shadow: none !important;
      font: 650 11px/14px var(--nww-ui-font-family) !important;
      letter-spacing: 0 !important;
      text-shadow: none !important;
      -webkit-text-fill-color: currentColor !important;
      white-space: nowrap;
      cursor: pointer;
      touch-action: manipulation;
    }

    html[data-nww-phone] body #nwwMobileUtilities .nww-mobile-actions > button::before,
    html[data-nww-phone] body #nwwMobileUtilities .nww-mobile-actions > button::after {
      content: none !important;
    }

    html[data-nww-phone] body #nwwMobileUtilities .nww-mobile-actions > button > span {
      visibility: visible !important;
      opacity: 1 !important;
    }

    html[data-nww-phone] body #nwwMobileUtilities .nww-mobile-actions > button > span:last-child {
      display: block !important;
    }

    html[data-nww-phone] body #nwwMobileUtilities .nww-mobile-icon {
      display: grid !important;
      place-content: center;
      box-sizing: border-box;
      width: 16px;
      height: 16px;
      color: currentColor;
    }

    html[data-nww-phone] body #nwwMobileUtilities .nww-mobile-icon--tour {
      border: 1.5px solid;
      border-radius: 50%;
    }

    html[data-nww-phone] body #nwwMobileUtilities .nww-mobile-icon--tour::before {
      content: "?";
      font: 700 11px/1 var(--nww-ui-font-family);
    }

    html[data-nww-phone] body #nwwMobileUtilities .nww-mobile-icon i {
      position: relative;
      display: block;
      height: 1px;
      border-top: 1.5px solid;
      width: 14px;
      margin: 2px 0;
    }

    html[data-nww-phone] body #nwwMobileUtilities .nww-mobile-icon i::after {
      content: "";
      position: absolute;
      box-sizing: border-box;
      width: 4px;
      height: 4px;
      inset: -3px auto auto 3px;
      border: 1px solid;
      border-radius: 50%;
      background: var(--phone-surface);
    }

    html[data-nww-phone] body #nwwMobileUtilities .nww-mobile-icon--controls {
      color: var(--phone-accent);
    }

    html[data-nww-phone] body #nwwMobileUtilities .nww-mobile-icon--controls i:nth-child(2)::after {
      left: 8px;
    }

    html[data-nww-phone] body #nwwMobileUtilities .nww-mobile-icon--legend i {
      width: 9px;
      margin-left: 6px;
    }

    html[data-nww-phone] body #nwwMobileUtilities .nww-mobile-icon--legend i::after {
      left: -6px;
      width: 3px;
      height: 3px;
      top: -2.5px;
    }

    html[data-nww-phone] body #nwwMobileUtilities .nww-mobile-actions > button:is(:active, [aria-expanded="true"]) {
      border-color: var(--phone-line) !important;
      background: var(--accent-soft) !important;
      color: var(--phone-accent) !important;
    }

    html[data-nww-phone] body:not(.mobile-legend-open) #nwwMobileUtilities #legendDock {
      display: none !important;
    }

    html[data-nww-phone] body.mobile-legend-open #legendDock {
      position: absolute !important;
      inset: calc(100% + 6px) 0 auto !important;
      margin-inline: auto !important;
      box-sizing: border-box !important;
      width: var(--phone-legend-width) !important;
      min-width: 0 !important;
      height: auto !important;
      min-height: 0 !important;
      max-height: max(55px, calc(100dvh - var(--phone-popup-top) - var(--phone-dock-edge) - 8px)) !important;
      padding: 14px !important;
      overflow-y: auto !important;
      pointer-events: auto;
      border-radius: 14px !important;
      box-shadow: var(--phone-shadow) !important;
      background: var(--phone-surface) !important;
    }

    @media (any-pointer: coarse) {
      /* Keep the map draggable through the read-only key. A clipped key still scrolls. */
      html[data-nww-phone] body.mobile-legend-open #legendDock:not([data-nww-legend-scrollable]) {
        pointer-events: none !important;
      }

      html[data-nww-phone] body.mobile-legend-open #legendDock :is(button, a[href], summary) {
        pointer-events: auto !important;
      }
    }

    html[data-nww-phone] body.mobile-legend-open #legendDock[data-legend-mode="depth"] #legendList {
      display: flex !important;
      flex-direction: column;
      gap: 6px !important;
      height: auto !important;
      min-height: 0 !important;
    }

    html[data-nww-phone] body.mobile-legend-open #legendDock[data-legend-mode="depth"] .depth-legend-scale {
      height: auto !important;
    }

    html[data-nww-phone] body.mobile-legend-open #legendDock[data-legend-mode="depth"] .depth-legend-labels {
      display: grid !important;
      grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
      gap: 8px !important;
      align-items: baseline !important;
      font: 700 13px/1.25 Inter, system-ui, sans-serif !important;
      letter-spacing: 0 !important;
      text-transform: none !important;
      margin: 0 0 5px !important;
    }

    html[data-nww-phone] body #toast {
      bottom: calc(var(--phone-dock-edge) + 12px) !important;
    }

    html[data-nww-phone] body > .nw-mobile-popup,
    html[data-nww-phone] body #app > .nw-short-leaflet-popup {
      top: var(--phone-popup-top) !important;
    }

    html[data-nww-phone] body > .nw-mobile-popup .maplibregl-popup-content,
    html[data-nww-phone] body #app > .nw-short-leaflet-popup .leaflet-popup-content {
      box-sizing: border-box;
      max-height: max(55px, calc(100dvh - var(--phone-popup-top) - var(--phone-dock-edge) - 8px)) !important;
    }

    html[data-nww-phone] body[data-nww-credits-ready] #leftPanel #mapCredits {
      display: block;
      order: 40 !important;
      color: var(--phone-label);
      font: 550 13px/1.5 var(--nww-ui-font-family);
    }

    html[data-nww-phone] body #mapCredits summary {
      box-sizing: border-box;
      align-content: center;
      min-height: 44px;
      padding-inline: 8px;
      cursor: pointer;
      font-weight: 650;
    }

    html[data-nww-phone] body #mapCredits > div {
      padding: 4px 8px 8px;
      overflow-wrap: anywhere;
    }

    html[data-nww-phone] body #mapCredits a { color: var(--phone-accent); }
    html[data-nww-phone] body #mapCredits > div > a { display: inline-block; padding-block-start: 8px; }
    html[data-nww-phone] body[data-nww-credits-ready] #map .leaflet-control-attribution {
      display: none !important;
    }

    html[data-nww-phone] body :is(.leaflet-control-zoom, #nwDefaultNavControl .nw-direction-wheel, #nwDefaultNavControl .nw-simple-zoom) {
      display: none !important;
    }

    html[data-nww-phone] body #nwwDrawerViewMode:has(.nw-simple-view) {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 5px 12px;
      margin: 9px 0 0;
      border: 1px solid var(--phone-line);
      border-radius: 12px;
      background: var(--phone-surface);
      color: var(--phone-label);
      font: 650 14px/1.2 Inter, system-ui, sans-serif;
    }

    html[data-nww-phone] body #nwwDrawerViewMode #nwDefaultNavControl {
      position: static !important;
      inset: auto !important;
      transform: none !important;
      visibility: visible !important;
      pointer-events: auto !important;
      opacity: 1 !important;
      width: auto !important;
      height: auto !important;
      filter: none !important;
    }

    html[data-nww-phone] body #nwwMobileControlHeader #nwwDrawerViewMode .nw-simple-view {
      min-width: 54px !important;
      min-height: 44px !important;
      border-radius: 9px !important;
      transform: none !important;
      background: #171e2a !important;
    }

    html[data-nww-phone] body #nwwMobileControlHeader #nwwDrawerViewMode .nw-simple-view[aria-pressed="true"] {
      background: #23344b !important;
    }

    html[data-nww-phone] body #timelineDock {
      width: min(var(--phone-dock-max), calc(100% - var(--cm-left, 8px) - var(--cm-right, 8px))) !important;
      margin-inline: auto !important;
      border: 1px solid var(--phone-line) !important;
      border-radius: 17px !important;
      background: var(--phone-surface) !important;
      box-shadow: var(--phone-shadow) !important;
      overflow: visible !important;
    }

    html[data-nww-phone] body #timelineDock #timelineBubble {
      top: auto !important;
      bottom: calc(100% + 8px) !important;
      left: 8px !important;
      right: auto !important;
      box-sizing: border-box !important;
      width: min(180px, calc(100% - 16px)) !important;
      max-width: calc(100% - 16px) !important;
      height: auto !important;
      min-height: 34px !important;
      padding: 4px 9px !important;
      border: 1px solid #414b59 !important;
      border-radius: 999px !important;
      background: var(--phone-surface) !important;
      justify-content: center !important;
      align-items: center !important;
      flex-direction: row !important;
      gap: 6px !important;
      font-variant-numeric: tabular-nums;
      pointer-events: none !important;
    }

    html[data-nww-phone] body #timelineDock #timelineBubble .timeline-bubble-current {
      flex: 0 1 auto !important;
      font: 700 15px/18px Inter, system-ui, sans-serif !important;
      color: #fff !important;
      text-align: left !important;
      text-shadow: none !important;
    }

    html[data-nww-phone] body #timelineDock #timelineBubble .timeline-bubble-stage {
      padding: 0 !important;
      min-height: 0 !important;
      background: transparent !important;
      border: 0 !important;
      box-shadow: none !important;
      font: 700 14px/18px Inter, system-ui, sans-serif !important;
      color: #f8fbff !important;
    }

    html[data-nww-phone] body #timelineDock #timelineBubble::before,
    html[data-nww-phone] body #timelineDock #timelineBubble::after {
      display: none !important;
    }

    html[data-nww-phone] body #timelineDock #timelineBubble[data-nww-thumb-follow] {
      width: min(180px, calc(100% - 16px)) !important;
    }

    html[data-nww-phone] body #timelineDock :is(.timeline-step, #playBtn, #timelineSpeedBtn) {
      top: 4px !important;
      width: 44px !important;
      height: 44px !important;
      border-radius: 11px !important;
    }

    html[data-nww-phone] body #timelineDock .timeline-step {
      background: var(--phone-raised) !important;
      border: 1px solid var(--phone-line) !important;
      box-shadow: none !important;
    }

    html[data-nww-phone] body #timelineDock #timelineStepBack { right: 57px !important; }
    html[data-nww-phone] body #timelineDock #timelineStepForward { right: 7px !important; }
    html[data-nww-phone] body #timelineDock #playBtn {
      right: auto !important;
      left: 8px !important;
    }
    html[data-nww-phone] body #timelineDock #timelineSpeedBtn {
      left: 58px;
      min-height: 44px !important;
      max-height: 44px !important;
    }

    html[data-nww-phone] body #timelineDock :is(#timelineDayTabs, .timeline-day-arrow) {
      top: 51px !important;
      height: 44px !important;
      min-height: 44px !important;
      max-height: 44px !important;
    }

    html[data-nww-phone] body #timelineDock .timeline-day-arrow { display: none !important; }

    html[data-nww-phone] body #timelineDock #timelineDayTabs,
    html[data-nww-phone] body #timelineDock[data-single-timeline-time="true"] #timelineDayTabs {
      left: 8px !important;
      right: var(--phone-timeline-end) !important;
      width: auto !important;
      display: flex !important;
      justify-content: flex-start !important;
      gap: 5px !important;
      overflow: auto hidden !important;
      scrollbar-width: none !important;
      touch-action: pan-x !important;
    }

    html[data-nww-phone] body #timelineDock #timelineDayTabs .timeline-day {
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      flex: 1 0 60px !important;
      min-width: 60px !important;
      background: var(--accent-soft) !important;
      background-image: var(--fleet-day-gradient, var(--timeline-day-gradient, none)) !important;
      border: 1px solid var(--phone-line) !important;
      border-radius: 10px !important;
      color: #f8fbff !important;
      text-shadow: 0 1px 3px #000, 0 0 6px #000 !important;
      font: 720 13px/1 Inter, system-ui, sans-serif !important;
    }

    html[data-nww-phone] body #timelineDock #timelineDayTabs .timeline-day.active {
      border-color: #f8fbff !important;
      box-shadow: inset 0 0 0 1px #f8fbff !important;
    }

    html[data-nww-phone] body #timelineDock #timelineDayTabs .timeline-day::after {
      content: none !important;
    }

    html[data-nww-phone] body #timelineDock .timeline-trackRow {
      top: 96px !important;
      left: 13px !important;
      right: var(--phone-timeline-end) !important;
      height: 44px !important;
    }

    html[data-nww-phone] body #timelineDock #hourSlider { --nww-thumb-size: 25px !important; }
    html[data-nww-phone] body #timelineDock #hourSlider::-webkit-slider-thumb { margin-top: -8.5px !important; }
    html[data-nww-phone] body #timelineDock #hourSlider::-webkit-slider-thumb {
      width: var(--nww-thumb-size) !important;
      height: var(--nww-thumb-size) !important;
      border: 2px solid #f8fbff !important;
      box-shadow: 0 0 0 3px #a6d6ff38 !important;
    }
    html[data-nww-phone] body #timelineDock #hourSlider::-moz-range-thumb {
      width: var(--nww-thumb-size) !important;
      height: var(--nww-thumb-size) !important;
      border: 2px solid #f8fbff !important;
      box-shadow: 0 0 0 3px #a6d6ff38 !important;
    }

    html[data-nww-phone] body #timelineDock #timelineTimeBounds { display: none !important; }
    html[data-nww-phone] body #timelineDock #timelineFloodKey {
      top: 50px !important;
      right: 8px !important;
      bottom: 5px !important;
      padding-inline: 8px !important;
      gap: 2px !important;
      color: var(--phone-label) !important;
    }

    html[data-nww-phone] body #timelineDock #timelineFloodKey .timeline-key-title {
      font-size: 14px;
      line-height: 16px;
    }

    html[data-nww-phone] body #timelineDock[data-single-timeline-time="true"] #timelineFloodKey {
      top: 49px !important;
      gap: 0 !important;
    }

    html[data-nww-phone] body #timelineDock[data-single-timeline-time="true"] #timelineFloodKey .timeline-key-title {
      line-height: 14px;
      margin-bottom: 0;
    }

    html[data-nww-phone] body #timelineDock[data-single-timeline-time="true"] #timelineFloodKey .timeline-key-item {
      height: 12px !important;
      min-height: 12px !important;
      max-height: 12px !important;
    }

    html[data-nww-phone] body #timelineDock[data-single-timeline-time="true"] #timelineFloodKey .timeline-key-label {
      line-height: 12px !important;
    }

    html[data-nww-phone] body #timelineDock #timelineFloodKey #roadImpactsKey:not([hidden]) {
      max-width: min(220px, calc(100vw - var(--nww-key-width) - 56px));
      font: 650 10px/12px Inter, system-ui, sans-serif !important;
    }

    html[data-nww-phone] body #timelineDock #timelineFloodKey .timeline-key-label {
      font-size: 11px !important;
    }

    html[data-nww-phone] body #downloadModal .download-modal-card {
      border-color: var(--phone-line) !important;
    }

    html[data-nww-phone] body.mobile-controls-open #leftPanel {
      padding: 12px !important;
      gap: 9px !important;
      background: var(--phone-surface) !important;
      border-color: var(--phone-line) !important;
      border-radius: 18px !important;
      box-shadow: var(--phone-shadow) !important;
    }

    html[data-nww-phone] body #leftPanel #nwwMobileControlHeader {
      top: 0 !important;
      padding-block: 6px 10px !important;
      background: var(--phone-surface) !important;
      border-color: var(--phone-line) !important;
    }

    html[data-nww-phone] body #leftPanel #nwwMobileControlHeader h2 {
      font: 700 20px/1.3 Inter, system-ui, sans-serif !important;
    }

    html[data-nww-phone] body #leftPanel #nwwMobileControlHeader p { display: none !important; }

    html[data-nww-phone] body #leftPanel #nwwMobileControlHeader .nww-control-tabs {
      gap: 6px !important;
      margin-top: 11px !important;
    }

    html[data-nww-phone] body #leftPanel #nwwMobileControlHeader button {
      background: var(--phone-raised) !important;
      border-color: var(--phone-line) !important;
      font: 620 13px/1.15 Inter, system-ui, sans-serif !important;
      transition: none !important;
    }

    html[data-nww-phone] body #leftPanel #nwwMobileControlHeader button[aria-selected="true"] {
      color: var(--phone-accent) !important;
      border-color: var(--phone-accent) !important;
      background: var(--accent-soft) !important;
    }

    html[data-nww-phone] body #leftPanel :is(.panel-card,.rail-card) {
      padding: 12px !important;
      border-color: var(--phone-line) !important;
      border-radius: 12px !important;
    }

    html[data-nww-phone] body #leftPanel[data-nww-section="map"] .layers-card { order: 1 !important; }
    html[data-nww-phone] body #leftPanel[data-nww-section="map"] #townAddressCard { order: 2 !important; }
    html[data-nww-phone] body #leftPanel[data-nww-section="map"] #downloadCard { order: 3 !important; }

    html[data-nww-phone] body #leftPanel .layer-item {
      min-height: 48px !important;
      gap: 10px !important;
      border-bottom: 1px solid var(--phone-line) !important;
      background: transparent !important;
      cursor: pointer;
    }

    html[data-nww-phone] body #leftPanel .layer-item:last-child { border-color: transparent !important; }
    html[data-nww-phone] body #leftPanel .layer-name { font-size: 14px !important; line-height: 1.3 !important; }
    html[data-nww-phone] body #leftPanel #townAddressInput { font-size: 16px !important; min-height: 44px !important; }
    html[data-nww-phone] body #timelineDock #timelineDayTabs { touch-action: pan-x !important; }

    html[data-nww-phone] body :is(#mapCredits summary,#nwwMobileUtilities button):focus-visible {
      outline: 2px solid #e0f1ff !important;
      outline-offset: 2px !important;
    }
  }

  @media (orientation: landscape) and (max-height: 560px) and (min-width: 540px) {
    html[data-nww-phone] body {
      --phone-dock-base: 106px;
      --phone-dock-max: 650px;
    }
    html[data-nww-phone] body:has(#timelineDock[data-single-timeline-time="true"]) {
      --phone-dock-base: 72px;
    }
    html[data-nww-phone] body #timelineDock #timelineStepBack { left: 108px !important; right: auto !important; }
    html[data-nww-phone] body #timelineDock #timelineStepForward { left: 158px !important; right: auto !important; }
    html[data-nww-phone] body #timelineDock #timelineDayTabs,
    html[data-nww-phone] body #timelineDock[data-single-timeline-time="true"] #timelineDayTabs {
      left: 212px !important; top: 4px !important;
    }
    html[data-nww-phone] body #timelineDock #timelineFloodKey { top: 8px !important; }
    html[data-nww-phone] body #timelineDock[data-single-timeline-time="true"] #timelineFloodKey {
      top: 4px !important;
      bottom: 4px !important;
    }
    html[data-nww-phone] body #timelineDock .timeline-day-arrow { display: none !important; }
    html[data-nww-phone] body #timelineDock .timeline-trackRow { top: 47px !important; }
  }

  @media (forced-colors: active) {
    html[data-nww-phone] body #timelineDock #timelineDayTabs .timeline-day.active { border: 2px solid Highlight !important; }
    html.county-compact[data-nww-phone] body :is(#legendDock, #nwwMobileUtilities #mapTitleBadge, #nwwMobileUtilities .nww-mobile-actions) { border-color: ButtonText !important; }
    html[data-nww-phone] body #nwwMobileUtilities .nww-mobile-actions > button[aria-expanded="true"] { border-color: Highlight !important; }
    html[data-nww-phone] body #timelineDock #playBtn .playTriangle { border-left-color: ButtonText !important; }
    html[data-nww-phone] body #timelineDock #playBtn .pauseIcon::before,
    html[data-nww-phone] body #timelineDock #playBtn .pauseIcon::after { background: ButtonText !important; }
    html[data-nww-phone] body #timelineDock :is(#playBtn.is-playing, #timelineSpeedBtn[aria-pressed="true"]) {
      border-color: Highlight !important;
      outline: 1px solid Highlight;
      outline-offset: -3px;
    }
  }
}
