.tools-wrap > .road-weather-control { order: 6; }
.tools-wrap .road-weather-button .wx-toolbar-button-icon,
#roadWeatherMenu .road-weather-action .wx-toolbar-button-icon {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif;
  font-size: 20px !important;
}
.road-weather-button.is-enabled { box-shadow: inset 0 0 0 2px #328dca, var(--shadow); }
#roadWeatherMenu {
  width: min(362px, calc(100vw - 22px));
  max-height: min(710px, calc(100dvh - 20px));
  padding: 12px;
  overflow-y: auto;
}
.road-weather-menu .factual-action-grid { margin-bottom: 8px; }
.road-weather-heading .precipitation-info-button { flex: 0 0 auto; }
.road-weather-status { margin: 6px 0; font-size: 12px; }
.road-weather-note {
  margin: 5px 0 0;
  font-size: 11px;
  line-height: 1.35;
}
.road-weather-style { display: grid; gap: 8px; margin-top: 10px; }
.road-weather-style fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 8px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
}
.road-weather-style legend { font-size: 12px; font-weight: 700; }
.road-weather-style label { display: flex; align-items: center; justify-content: space-between; gap: 9px; font-size: 12px; }
.road-weather-style input[type="range"] { width: 41%; min-width: 74px; }
.road-weather-style input[type="color"] { width: 43px; min-height: 28px; padding: 2px; }
.road-weather-style select { min-width: 106px; max-width: 54%; color: inherit; background: var(--panel-strong, #fff); border-radius: 6px; }
body.ui-dark .road-weather-style select { background: #1e293b; color: #f1f5f9; }
.road-weather-style .road-outline-toggle { justify-content: flex-start; margin-top: 2px; }
.road-weather-style output { opacity: .78; white-space: nowrap; }
.road-weather-style :disabled { opacity: .5; }
.road-weather-attribution a { color: inherit; text-underline-offset: 2px; }
.road-legend-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.road-weather-legend .legend-title { margin: 0; }
.road-legend-time { font-size: 10px; font-variant-numeric: tabular-nums; opacity: .8; }
.road-legend-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 12px; }
.road-weather-legend[data-mode="difficulty"] .road-legend-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.road-legend-item { display: flex; align-items: center; gap: 7px; font-size: 11px; line-height: 1.2; }
.road-legend-item.is-unavailable { grid-column: 1 / -1; }
.road-legend-swatch { display: inline-block; flex: 0 0 19px; width: 19px; height: 5px; border-radius: 5px; box-shadow: 0 0 0 1px #657282; }

.road-help-scroll h3 { margin: 16px 0 5px; font-size: 15px; }
.road-help-scroll p { margin-bottom: 8px; }
.road-help-list { margin: 0 0 12px; }
.road-help-list > div { display: grid; grid-template-columns: minmax(114px, 24%) 1fr; gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid rgba(148,163,184,.22); }
.road-help-list dt { display: flex; align-items: baseline; gap: 7px; font-weight: 750; }
.road-help-list dt .road-legend-swatch { align-self: start; margin-top: .56em; }
.road-help-list dd { margin: 0; }

@media (min-width: 821px) and (min-height: 601px), (min-width: 961px) {
  #legendDock.desktop-collapsed #roadWeatherLegend,
  body.desktop-screen-focus-mode #roadWeatherLegend { display: none; }
}

@media (max-width: 820px), (max-height: 600px) and (max-width: 960px) {
  #roadWeatherMenu.is-mobile-portal { width: auto; }
  body.road-weather-layer-active #quickMapTools { display: none !important; }
  #legendDock.road-weather-legend-active {
    left: calc(var(--phone-safe-left) + 7px);
    right: calc(var(--phone-safe-right) + 7px);
    bottom: var(--phone-panel-bottom);
    width: auto;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "options options" "road layers";
    align-items: end;
    gap: 7px;
  }
  #legendDock.road-weather-legend-active .legend-controls {
    grid-area: options;
    box-sizing: border-box;
    max-width: 100%;
  }
  #legendDock.road-weather-legend-active #roadWeatherLegend {
    grid-area: road;
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 44px;
    padding: 5px 8px 3px;
    margin: 0;
    box-shadow: var(--shadow);
  }
  #legendDock.road-weather-legend-active .mobile-legend-actions {
    grid-area: layers;
    width: auto;
    align-self: end;
  }
  #legendDock.road-weather-legend-active .mobile-legend-button {
    flex: 0 0 82px;
    min-width: 82px;
  }
  .road-legend-heading { margin-bottom: 2px; }
  .road-weather-legend .legend-title { font-size: 10px; line-height: 1.25; }
  .road-legend-time { font-size: 9px; }
  .road-legend-strip {
    display: flex;
    max-width: 100%;
    width: auto;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    padding: 2px 1px 3px;
    gap: 9px;
  }
  .road-legend-item { flex: 0 0 auto; white-space: nowrap; }
}

@media (max-width: 450px) {
  .road-help-list > div { grid-template-columns: minmax(0, 1fr); }
}
