.weather-open {
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.weather-open:hover,
.weather-open:focus-visible { color: var(--accent); text-decoration: underline; }
.weather-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(26, 34, 39, .26);
  backdrop-filter: blur(1px);
}
.weather-drawer {
  position: fixed;
  z-index: 1100;
  top: 0;
  right: 0;
  width: min(88vw, 430px);
  height: 100dvh;
  padding: 20px 18px 24px;
  overflow-y: auto;
  background: #fbfbf8;
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 50px rgba(32, 40, 46, .16);
  transform: translateX(103%);
  transition: transform .22s ease-out;
  overscroll-behavior: contain;
}
.weather-drawer.is-open { transform: translateX(0); }
.weather-drawer-open { overflow: hidden; }
.weather-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.weather-drawer-head h2 {
  margin: 2px 0 0;
  font-size: 1.34rem;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.weather-kicker {
  color: var(--accent);
  font-size: .66rem;
  font-weight: 780;
  letter-spacing: .13em;
}
.weather-close {
  width: 38px;
  height: 38px;
  margin: -4px -5px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.8rem;
  line-height: 1;
}
.weather-hint {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.42;
}
.weather-content { min-height: 240px; }
.weather-message {
  padding: 16px 0;
  color: var(--muted);
  font-size: .88rem;
}
.weather-message p { margin: 0 0 9px; }
.weather-retry { margin: 0; }
.weather-place {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 14px 0 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}
.weather-place-label,
.weather-place strong,
.weather-place-separator {
  font-size: .88rem;
  line-height: 1.3;
  letter-spacing: 0;
}
.weather-place-label,
.weather-place-separator {
  color: var(--muted);
  font-weight: 600;
}
.weather-place strong {
  color: var(--text);
  font-weight: 600;
}
.weather-now {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 0 0 9px;
}
.weather-now > div:first-child {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
}
.weather-now > div:first-child .weather-kicker { font-size: .60rem; }
.weather-now strong {
  margin-top: 0;
  font-size: 1.55rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -.04em;
}
.weather-now-meta {
  max-width: none;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.3;
  text-align: right;
}
.weather-summary {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  margin-bottom: 16px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 7px;
}
.weather-summary strong { font-size: .88rem; line-height: 1.38; }
.weather-summary span { color: var(--muted); font-size: .76rem; line-height: 1.4; }
.aurora-alert {
  display: grid;
  gap: 3px;
  margin: 0 0 12px;
  padding: 12px 13px;
  border: 1px solid #c8dfd1;
  border-left: 3px solid #4f8064;
  border-radius: 7px;
  background: #eef7f1;
}
.aurora-alert .weather-kicker { color: #3f7054; }
.aurora-alert strong { font-size: .92rem; line-height: 1.35; }
.aurora-alert > span:last-child { color: var(--muted); font-size: .76rem; line-height: 1.4; }
.night-info {
  margin: 0 0 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.night-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
}
.night-info-row > div { display: grid; gap: 1px; }
.night-info-label {
  color: var(--muted);
  font-size: .70rem;
  letter-spacing: 0;
  text-transform: none;
}
.night-info-row strong { font-size: .83rem; line-height: 1.35; }
.night-info-row > span {
  max-width: 58%;
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.38;
  text-align: right;
}
.weather-legend,
.weather-hour {
  display: grid;
  grid-template-columns: 47px minmax(74px, 1fr) minmax(66px, .9fr) 48px;
  gap: 6px;
  align-items: center;
}
.weather-legend {
  margin-bottom: 5px;
  padding: 0 4px;
  color: var(--muted);
  font-size: .65rem;
  line-height: 1.2;
  text-align: center;
}
.weather-legend span:first-child { text-align: left; }
.weather-hours {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.weather-hour {
  min-height: 43px;
  padding: 5px 4px;
  border-top: 1px solid #edf0ee;
  font-size: .78rem;
}
.weather-hour:first-child { border-top: 0; }
.weather-hour-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.weather-rain-cell,
.weather-cloud-cell {
  position: relative;
  min-height: 29px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 5px;
  font-variant-numeric: tabular-nums;
}
.weather-rain-cell {
  background: rgba(73, 128, 157, calc(.08 + var(--rain) * .62));
  box-shadow: inset 0 -3px 0 rgba(44, 103, 135, calc(var(--rain) * .7));
}
.weather-cloud-cell {
  background: rgba(112, 122, 128, calc(.05 + var(--cloud) * .38));
}
.weather-rain-cell span,
.weather-cloud-cell span { position: relative; z-index: 1; }
.weather-temp-cell {
  text-align: right;
  font-size: .88rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.weather-source {
  margin-top: 14px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.4;
}
.weather-source a { font-weight: 650; }

@media (min-width: 701px) {
  .weather-drawer { width: 410px; }
}
@media (max-width: 600px) {
  .weather-open {
    position: fixed;
    z-index: 900;
    top: 82px;
    right: 0;
    padding: 5px 7px 6px;
    border: 1px solid var(--line);
    border-right: 0;
    border-radius: 7px 0 0 7px;
    background: rgba(251, 251, 248, .96);
    box-shadow: -2px 2px 10px rgba(32, 40, 46, .06);
    font-size: .72rem;
    text-decoration: none;
  }
  .weather-drawer-open .weather-open { visibility: hidden; }
  .weather-drawer { width: min(90vw, 410px); padding: 18px 15px 22px; }
  .weather-hint { margin-bottom: 14px; }
  .weather-place {
    margin: 12px 0 12px;
    padding: 0 0 10px;
  }
  .weather-place-label,
  .weather-place strong,
  .weather-place-separator { font-size: .84rem; }
  .weather-now { gap: 8px; }
  .weather-now-meta { font-size: .68rem; }
  .weather-legend,
  .weather-hour { grid-template-columns: 44px minmax(70px, 1fr) minmax(62px, .88fr) 44px; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .weather-drawer { transition: none; }
}
