body {
  --weather-drift-speed: 1;
  --weather-pulse-power: 1;
}

.weather-dock {
  position: fixed;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 90;
  width: min(360px, calc(100% - 1.2rem));
  border-radius: 12px;
  border: 1px solid rgba(226, 194, 136, 0.26);
  background: linear-gradient(160deg, rgba(10, 12, 24, 0.88), rgba(18, 21, 40, 0.82));
  color: rgba(245, 235, 216, 0.95);
  padding: 0.66rem 0.74rem;
  box-shadow: 0 18px 34px -24px rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
}

.weather-dock h4 {
  margin: 0;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.weather-dock p {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
}

.weather-dock-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.55rem;
  flex-wrap: wrap;
}

.weather-dock-actions button {
  border: 1px solid rgba(228, 197, 139, 0.34);
  border-radius: 999px;
  background: rgba(228, 197, 139, 0.11);
  color: rgba(248, 239, 223, 0.95);
  font-family: "Source Code Pro", monospace;
  padding: 0.26rem 0.6rem;
  cursor: pointer;
}

.weather-viewer {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
}

.weather-viewer.is-hidden {
  display: none;
}

.weather-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 24, 0.9);
}

.weather-viewer-panel {
  position: relative;
  z-index: 2;
  width: min(1040px, calc(100% - 1rem));
  max-height: calc(100vh - 1rem);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(232, 198, 130, 0.28);
  background: linear-gradient(170deg, rgba(8, 12, 28, 0.96), rgba(16, 23, 44, 0.9));
  color: rgba(244, 236, 223, 0.95);
  padding: 0.85rem;
}

.weather-viewer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}

.weather-close {
  border: 1px solid rgba(232, 198, 130, 0.34);
  border-radius: 999px;
  background: rgba(232, 198, 130, 0.12);
  color: rgba(246, 236, 217, 0.96);
  padding: 0.28rem 0.68rem;
  cursor: pointer;
}

.weather-viewer-meta {
  margin: 0.45rem 0;
  color: rgba(236, 228, 215, 0.86);
}

.weather-viewer-body {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(220px, 460px) 1fr;
}

.weather-image-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(224, 195, 141, 0.25);
  min-height: 240px;
  background: rgba(12, 16, 30, 0.86);
}

.weather-image-wrap img {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 520px;
}

.weather-image-wrap.is-empty {
  display: grid;
  place-items: center;
  color: rgba(236, 227, 214, 0.7);
}

.weather-viewer-copy p {
  margin: 0.42rem 0;
}

.weather-viewer-copy a {
  color: rgba(243, 214, 157, 0.95);
}

.weather-viewer-copy a.is-disabled {
  pointer-events: none;
  opacity: 0.58;
}

body.weather-cycle-storm {
  --weather-drift-speed: 1.28;
  --weather-pulse-power: 1.2;
}

body.weather-cycle-fog {
  --weather-drift-speed: 0.82;
  --weather-pulse-power: 0.78;
}

body.weather-cycle-heat {
  --weather-drift-speed: 1.02;
  --weather-pulse-power: 1.15;
}

body.weather-cycle-cold {
  --weather-drift-speed: 0.9;
  --weather-pulse-power: 0.84;
}

body.weather-cycle-wind {
  --weather-drift-speed: 1.14;
  --weather-pulse-power: 0.98;
}

body.weather-cycle-cosmic {
  --weather-drift-speed: 1.06;
  --weather-pulse-power: 1.08;
}

body.weather-cycle-storm .map-cosmos {
  animation: weatherStormShake 360ms steps(2) infinite;
}

body.weather-cycle-fog .map-cosmos {
  filter: blur(0.8px) saturate(0.9);
}

body.weather-cycle-wind .map-cosmos .chamber-node {
  transform: translateX(2px);
}

body.weather-cycle-heat .map-cosmos .node-core {
  box-shadow: 0 0 18px rgba(247, 153, 86, 0.42);
}

body.weather-cycle-cold .map-cosmos .node-core {
  opacity: 0.82;
}

body.weather-cycle-cosmic .map-cosmos .chamber-node {
  filter: hue-rotate(24deg);
}

body.weather-cycle-fog .dialogue-shell {
  filter: saturate(0.92) brightness(0.94);
}

body.weather-cycle-storm .dialogue-shell .portal {
  box-shadow: 0 0 0 1px rgba(145, 179, 248, 0.28), 0 14px 32px -24px rgba(56, 89, 158, 0.74);
}

body.weather-cycle-heat .invitation-section,
body.weather-cycle-heat .ethos-shell {
  filter: brightness(1.04) saturate(1.06);
}

body.weather-cycle-cold .invitation-section,
body.weather-cycle-cold .ethos-shell {
  filter: brightness(0.95) saturate(0.92);
}

body.weather-cycle-cosmic .mythology-underlay,
body.weather-cycle-cosmic .ethos-underlay {
  filter: hue-rotate(18deg) saturate(1.12);
}

body.weather-cycle-wind .mythology-underlay {
  transform: translateX(4px);
}

body.weather-cycle-fog .mythology-underlay {
  opacity: 0.88;
}

body.weather-cycle-storm .mythology-underlay {
  filter: brightness(calc(1.08 * var(--weather-pulse-power)));
}

@keyframes weatherStormShake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1px, 1px); }
  50% { transform: translate(1px, -1px); }
  75% { transform: translate(-1px, -1px); }
  100% { transform: translate(0, 0); }
}

@media (max-width: 840px) {
  .weather-viewer-body {
    grid-template-columns: 1fr;
  }
}
