.location-weather-preferences {
  margin: 1rem 0;
  padding: 0.8rem;
  background: var(--surface, #f3f7f6);
  border: 1px solid #cbd8d3;
  border-radius: 10px;
}
.location-weather-preferences .helper {
  margin: 0.4rem 0 0;
}
.location-weather {
  padding: 0.75rem 0;
  border-top: 1px solid #d5ded9;
  margin-top: 0.65rem;
  overflow-wrap: anywhere;
}
.location-weather strong,
.location-weather small,
.weather-freshness {
  display: block;
}
.location-weather small,
.weather-freshness {
  font-size: 0.78rem;
  margin-top: 0.35rem;
  line-height: 1.5;
}
.weather-freshness {
  color: #40564c;
}
.location-weather p {
  font-size: 0.85rem;
  margin: 0.5rem 0;
}
.weather-alert-pill {
  padding: 0.55rem 0.65rem;
  background: #fff4cf;
  color: #59440b;
  border: 1px solid #bca75a;
  border-radius: 6px;
  font-weight: 600;
}
.weather-alert-pill.is-warning {
  background: #ffe7df;
  color: #752c15;
  border-color: #b65b3c;
}
.location-weather details {
  font-size: 0.85rem;
}
.location-weather summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.location-weather button {
  min-height: 44px;
}
.brief-weather-context {
  padding: 0.8rem;
  border: 1px solid #b8cfc6;
  border-radius: 8px;
  background: #f4f8f6;
  margin: 0.6rem 0;
}
.brief-weather-context h4 {
  margin: 0 0 0.5rem;
}
.brief-weather-context small {
  display: block;
}
.brief-weather-context .preserve,
.location-weather .preserve {
  white-space: pre-wrap;
  font-size: 0.85rem;
}
.weather-alert-banner {
  border-color: #bca75a;
  background: #fff4cf;
  color: #59440b;
}
.field-mode .weather-freshness {
  color: inherit;
}
.field-mode .location-weather-preferences,
.field-mode .brief-weather-context {
  background: inherit;
  color: inherit;
  border-color: currentColor;
}
@media (max-width: 600px) {
  .location-weather-preferences {
    padding: 0.65rem;
  }
  .location-weather-preferences .ack {
    align-items: flex-start;
  }
  .location-weather small {
    font-size: 0.78rem;
  }
}
.weather-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  vertical-align: middle;
}
.weather-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  margin-bottom: 0.65rem;
}
.weather-metric {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 100px;
}
.weather-metric small {
  margin: 0;
  font-size: 0.72rem;
  color: #40564c;
}
.weather-metric strong {
  font-size: 1.05rem;
  line-height: 1.4;
}
.weather-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}
.weather-rate {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
}
.weather-rate select {
  width: auto;
  min-height: 44px;
  max-width: 100%;
  padding: 0.5rem;
}
.weather-refresh-help {
  font-size: 0.8rem;
  margin-top: 0.4rem;
}
.weather-refresh-help summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.weather-refresh-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.weather-refresh-actions button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.weather-refresh-actions [role='status'] {
  font-size: 0.8rem;
}
.weather-refresh-status {
  font-size: 0.8rem;
  color: #40564c;
}
.weather-alert-pill .weather-icon {
  margin-right: 0.4rem;
}
.field-mode .weather-metric small,
.field-mode .weather-refresh-status {
  color: inherit;
}
@media (max-width: 600px) {
  .weather-settings {
    display: block;
  }
  .weather-rate {
    margin-top: 0.4rem;
    justify-content: space-between;
  }
  .weather-metrics {
    gap: 0.65rem;
  }
  .weather-metric {
    min-width: calc(50% - 0.65rem);
  }
}
.location-weather-preferences {
  background: #f5f7f2;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 12px 0;
}
.location-weather-preferences .weather-settings {
  display: flex;
  align-items: center;
  gap: 8px 16px;
  flex-wrap: wrap;
}
.location-weather-preferences .ack {
  margin: 0;
  flex: 1;
  font-size: 12px;
  min-width: 200px;
}
.location-weather-preferences .weather-rate {
  margin: 0;
  font-size: 12px;
}
.location-weather-preferences .weather-refresh-help {
  margin: 0;
  position: relative;
}
.weather-refresh-help > p {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 11;
  background: #fff;
  border: 1px solid #cbd8d3;
  box-shadow: 0 6px 20px #173d3526;
  border-radius: 6px;
  padding: 14px;
  width: 280px;
  max-width: 70vw;
}
.weather-refresh-help summary {
  font-size: 12px;
}
.weather-summary-chip {
  display: block;
  padding: 10px 12px;
  background: #eef4ec;
  border: 1px solid #ccdcca;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.weather-summary-chip.is-stale,
.weather-metrics.is-stale {
  background: #efefed;
  color: #4b4e4a;
}
.weather-summary-chip.is-stale {
  border-color: #bbbdb9;
}
.weather-metrics.is-stale {
  border-radius: 7px;
  padding: 0.6rem;
}
.weather-metrics.is-stale small {
  color: inherit;
}
.location-weather:not(.has-stale-weather)
  .weather-card-details:not([open])
  + .weather-refresh-actions:not(:focus-within) {
  display: none;
}
.weather-chip-notice {
  display: block;
  font-size: 11px;
  line-height: 1.5;
  color: #77552f;
  margin-top: 6px;
}
.weather-chip-notice.is-alert {
  padding: 7px;
  background: #fff4cf;
  border: 1px solid #bca75a;
  border-radius: 4px;
}
.weather-card-details > summary {
  font-size: 12px;
  color: #24543d;
  gap: 6px;
  padding: 5px 0;
  min-height: 44px;
}
.weather-card-details > summary::before {
  content: '▸';
}
.weather-card-details[open] > summary::before {
  content: '▾';
}
.location-weather {
  margin-top: 10px;
  padding: 10px 0 4px;
}
.location-card-actions > [data-location-edit] {
  flex: 0 0 auto;
}
.location-card-actions {
  gap: 6px;
}
.location-card-actions > .button {
  padding: 10px 12px;
}
.sidebar .field-status {
  display: block;
  padding: 10px 0;
  margin: 0 0 14px;
  border-top: 1px solid #607e70;
  border-bottom: 1px solid #607e70;
  background: transparent;
  color: #eef4e9;
  font-size: 11px;
}
.sidebar .field-status button {
  color: inherit;
  white-space: normal;
  text-align: left;
  line-height: 1.6;
  font-size: 11px;
}
.sidebar .field-status [data-device-summary] {
  width: 100%;
  padding: 6px 0;
}
.sidebar .field-status [data-device-details] {
  max-height: 40dvh;
  overflow: auto;
  padding: 8px 0;
}
.sidebar .field-status .helper {
  color: #d1dece;
}
.sidebar .field-status .button {
  border-color: #789280;
  padding: 8px;
  min-height: 44px;
}
.sidebar .field-status [data-save-warning] {
  color: #ffe0ac;
}
.sidebar .sidebar-bottom {
  min-width: 0;
  padding: 0 8px;
}
.sidebar .sidebar-bottom > p {
  font-size: 15px;
  margin: 14px 0 0;
}
.sidebar nav small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #49685b;
  color: #f0f6ea;
  border-radius: 12px;
  padding: 2px 7px;
  min-width: 24px;
  font-size: 11px;
  opacity: 1;
}
@media (min-width: 851px) {
  .sidebar {
    padding-top: 24px;
    padding-bottom: 20px;
  }
  .sidebar .workspace {
    margin: 24px 8px 12px;
  }
  .sidebar #main-navigation {
    overflow-y: auto;
    min-height: 0;
    flex: 1;
    margin-bottom: 16px;
    display: block;
    scrollbar-width: thin;
  }
  .sidebar #main-navigation > button {
    display: flex;
    width: 100%;
    min-height: 40px;
    padding: 9px 8px;
    margin-bottom: 3px;
  }
  .sidebar #main-navigation button span {
    font-size: 12px;
  }
  .sidebar .sidebar-bottom {
    flex-shrink: 0;
    margin-top: auto;
  }
}
@media (max-width: 850px) {
  .sidebar.nav-open .sidebar-bottom {
    display: block;
    grid-column: 1/-1;
    width: 100%;
    padding: 8px 0 0;
  }
  .sidebar.nav-open .sidebar-bottom > p,
  .sidebar.nav-open .sidebar-bottom > .region-dot {
    display: none;
  }
  .sidebar .field-status {
    margin: 0;
  }
  .sidebar nav small {
    display: inline-flex;
  }
  .location-weather-preferences .weather-settings {
    gap: 2px 10px;
  }
  .location-weather-preferences .ack {
    flex-basis: 100%;
    min-width: 0;
  }
  .location-weather-preferences .weather-rate {
    flex: 1;
  }
  .location-card-actions {
    flex-wrap: wrap;
  }
  .location-card-actions > [data-location-use] {
    flex-basis: 100%;
  }
  .location-card-actions > [data-location-edit] {
    flex: 1;
  }
  .location-action-menu {
    flex: 0 0 44px;
  }
}
.location-identifier {
  font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', monospace;
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: normal;
}
.location-identity-editor {
  min-width: 0;
  border: 1px solid #c6d4c0;
  border-radius: 6px;
  padding: 16px;
  margin: 0 0 20px;
  background: #f6f8f3;
}
.location-identity-editor legend {
  font-weight: 600;
  padding: 0 6px;
}
.location-identity-editor output {
  display: block;
  background: #fff;
  border: 1px solid #d7e1d4;
  border-radius: 4px;
  padding: 10px;
}
.brief-location-identity {
  background: #fff;
  border: 1px solid #c6d4c0;
  border-radius: 7px;
  padding: 18px 22px;
  margin-bottom: 18px;
}
.brief-location-identity h2 {
  margin: 0;
  font-size: 23px;
  overflow-wrap: anywhere;
}
.brief-location-identity p {
  margin: 8px 0;
}
.brief-location-identity small {
  font-size: 12px;
  color: #51684f;
}
.location-navigation-preference {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.location-navigation-preference select {
  font-size: 14px;
  min-height: 44px;
  padding: 8px;
  max-width: 180px;
  border: 1px solid #c6d4c0;
  border-radius: 5px;
  background: #fff;
}
.location-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
}
.location-card-actions > [data-location-use] {
  grid-column: 1/-1;
}
.location-card-actions > [data-location-navigate],
.location-card-actions > [data-location-edit] {
  min-width: 0;
  padding: 10px 8px;
}
.location-card-actions .location-action-menu {
  grid-column: 3;
}
.location-navigation-dialog .export-actions {
  flex-wrap: wrap;
}
.location-navigation-dialog .button {
  white-space: normal;
}
dialog[data-device-details] {
  width: min(600px, calc(100vw - 32px));
  max-width: 600px;
  max-height: 85dvh;
  padding: 0;
  background: #fff;
  color: #24362f;
  border: 1px solid #bacbb9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 80px #112a2440;
}
dialog[data-device-details][open] {
  display: flex;
  flex-direction: column;
}
.device-details-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid #d7e1d4;
  background: #f5f7f2;
  flex-shrink: 0;
}
#device-details .device-details-heading h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
  margin: 0;
  color: #173d35;
}
#device-details .device-details-heading button {
  color: #173d35;
  font-size: 13px;
}
.device-details-content {
  padding: 12px 22px 22px;
  overflow: auto;
  min-height: 0;
}
#device-details .device-details-content p {
  font-size: 14px;
  line-height: 1.7;
  margin: 12px 0;
}
#device-details .device-details-content button {
  color: #173d35;
  font-size: 13px;
  min-height: 44px;
}
#device-details .device-details-content .helper {
  color: #51684f;
  font-size: 12px;
}
#device-details .device-details-content small {
  font-size: 12px;
  color: #51684f;
}
#device-details .device-details-content .export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
body.field-contrast dialog[data-device-details],
body.field-contrast .device-details-heading {
  background: #fff;
  color: #111;
}
body.field-contrast dialog[data-device-details] * {
  color: #111;
}
@media (max-width: 600px) {
  .device-details-heading {
    padding: 14px 16px;
  }
  #device-details .device-details-heading h2 {
    font-size: 18px;
  }
  .device-details-content {
    padding: 8px 16px 18px;
  }
  #device-details .device-details-content .export-actions .button {
    flex: 1;
  }
}
.device-details-heading > button {
  flex: 0 0 auto;
  min-width: 70px;
  white-space: nowrap;
}
