.weather-widget {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 76px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 999px;
  color: #fff;
  background: rgba(15,24,21,.16);
  backdrop-filter: blur(8px);
  transition: background .2s, transform .2s;
}

.weather-widget:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); }
.weather-widget[hidden] { display: none !important; }
.weather-icon { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 auto; }
.weather-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.weather-reading { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.weather-temp { font-family: var(--serif); font-size: 18px; line-height: 1; }
.weather-place { font-size: 9px; letter-spacing: .09em; text-transform: uppercase; opacity: .7; }

.header-live-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 999px;
  background: rgba(15,24,21,.16);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.header-live-button i { width: 7px; height: 7px; border-radius: 50%; background: #ef6653; box-shadow: 0 0 0 4px rgba(239,102,83,.16); }
.header-live-button:hover,.header-live-button[aria-expanded="true"] { border-color: rgba(255,255,255,.56); background: rgba(255,255,255,.13); }
.header-live-button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.webcam-popover { position: fixed; z-index: 1200; top: 96px; right: 4vw; width: min(540px,calc(100vw - 32px)); padding: 0; border: 1px solid rgba(255,255,255,.18); background: #0c1512; box-shadow: 0 24px 70px rgba(5,12,9,.48); }
.webcam-popover[hidden] { display: none; }
.webcam-popover-viewer { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; background: #0c1512; }
.webcam-popover iframe { display: block; width: 100%; height: 100%; border: 0; background: #0c1512; }
.webcam-popover button { position: absolute; z-index: 3; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: rgba(8,16,13,.76); color: #fff; backdrop-filter: blur(8px); cursor: pointer; }
.webcam-popover-close { top: 10px; right: 10px; font: 300 25px/1 sans-serif; }
.webcam-popover-fullscreen { right: 10px; bottom: 10px; }
.webcam-popover-fullscreen svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.webcam-popover small { position: absolute; z-index: 2; bottom: 10px; left: 12px; padding: 5px 7px; border-radius: 2px; background: rgba(8,16,13,.7); color: rgba(255,255,255,.66); font-size: 9px; backdrop-filter: blur(6px); }
.webcam-popover small a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.webcam-popover-viewer:fullscreen,.webcam-popover-viewer.is-maximized { width: 100vw; height: 100vh; aspect-ratio: auto; background: #000; }
.webcam-popover-viewer.is-maximized { position: fixed; z-index: 1400; inset: 0; }
.webcam-popover-viewer:fullscreen iframe,.webcam-popover-viewer.is-maximized iframe { width: 100%; height: 100%; }

@media (min-width: 1280px) and (max-width: 1599px) {
  .site-header {
    grid-template-columns: auto minmax(0,1fr) auto;
    gap: 14px;
    padding-right: 2vw;
    padding-left: 2vw;
  }
  .site-header .brand-cluster { gap: 13px; }
  .site-header .brand-logo.brand-wordmark { width: 118px; }
  .site-header .social-links { gap: 5px; padding-left: 12px; }
  .site-header .social-links a { width: 26px; height: 26px; }
  .site-header #main-nav { justify-content: center; gap: clamp(15px,1.4vw,22px); min-width: 0; }
  .site-header.site-header #main-nav a { font-size: 14px; white-space: nowrap; }
  .site-header .header-actions { gap: 8px; }
  .site-header .weather-place { display: none; }
  .site-header .weather-widget { min-width: 66px; padding-right: 9px; padding-left: 9px; }
  .site-header .header-live-button { padding-right: 10px; padding-left: 10px; }
  .site-header .language-picker select { font-size: 14px; }
  .site-header .button-small { padding-right: 16px; padding-left: 16px; }
}

@media (min-width: 981px) and (max-width: 1279px) {
  .site-header {
    grid-template-columns: auto minmax(0,1fr) auto;
    gap: 11px;
    padding-right: 18px;
    padding-left: 18px;
  }
  .site-header .brand-cluster > .social-links { display: none; }
  .site-header .brand-logo.brand-wordmark { width: 102px; }
  .site-header #main-nav { justify-content: center; gap: 13px; min-width: 0; }
  .site-header.site-header #main-nav a { font-size: 13px; white-space: nowrap; }
  .site-header .header-actions { gap: 6px; }
  .site-header .weather-place { display: none; }
  .site-header .weather-widget { min-width: 60px; padding-right: 7px; padding-left: 7px; }
  .site-header .header-live-button { gap: 6px; padding-right: 8px; padding-left: 8px; font-size: 9px; }
  .site-header .language-picker select { font-size: 13px; }
  .site-header .button-small { padding-right: 12px; padding-left: 12px; }
}

@media (max-width: 980px) {
  .header-actions { display: block; position: absolute; right: 76px; top: 50%; transform: translateY(-50%); }
  .header-actions > :not(.weather-widget):not(.header-live-button) { display: none; }
  .header-actions > .header-live-button { display: inline-flex; }
}

@media (max-width: 680px) {
  .header-actions { right: 72px; }
  .header-live-button { min-height: 36px; padding: 0 10px; }
  .weather-widget { min-width: 58px; min-height: 36px; padding: 0 9px; }
  .weather-place { display: none; }
  .webcam-popover { top: 80px; right: 12px; left: 12px; width: auto; }
}

@media (max-width: 420px) {
  .weather-widget { min-width: 62px; width: auto; padding: 0 8px; justify-content: center; gap: 6px; }
  .weather-reading { display: flex; }
  .weather-temp { font-size: 17px; }
  .header-live-button { gap: 6px; padding: 0 9px; font-size: 9px; }
}
