.weather-app {
  isolation: isolate;
  contain: paint;
  clip-path: inset(0 round 7% / 10%);
  border: 0;
  min-width: 0;
  padding-right: clamp(0.55rem, 1.45vw, 1.45rem);
  color: var(--amber);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  pointer-events: none;
}

.weather-app__wind {
  position: absolute;
  z-index: -2;
  right: 17%;
  top: 23%;
  width: 36%;
  height: 54%;
  object-fit: contain;
  opacity: 0.44;
  filter: sepia(1) saturate(1.35) hue-rotate(348deg) brightness(0.62) contrast(0.96) blur(0.75px);
  image-rendering: pixelated;
  pointer-events: none;
}

.weather-app::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 1px,
      rgba(0, 0, 0, 0.46) 2px 4px
    ),
    linear-gradient(
      90deg,
      rgba(18, 12, 2, 0.96) 0%,
      rgba(18, 12, 2, 0.82) 42%,
      rgba(14, 9, 1, 0.24) 72%,
      rgba(9, 6, 1, 0.08) 100%
    );
  content: "";
  pointer-events: none;
}

.weather-app > :not(.weather-app__wind) {
  position: relative;
  z-index: 1;
  max-width: 56%;
}

.ui-active .weather-app {
  pointer-events: auto;
}

.ui-active .weather-app.is-unavailable {
  pointer-events: none;
}

.weather-info {
  top: calc(5.55% + clamp(4px, 0.65vw, 10px));
  right: auto;
  left: calc(42.05% - clamp(46px, 3.3vw, 58px));
  border-color: rgba(233, 184, 94, 0.72);
  box-shadow:
    2px 2px 0 rgba(3, 2, 4, 0.88),
    inset 0 0 8px rgba(233, 184, 94, 0.18);
  pointer-events: none;
}

.ui-active .weather-info {
  pointer-events: auto;
}

.weather-info:hover,
.weather-info:focus-visible {
  border-color: #51d6ff;
  color: #51d6ff;
}

.weather-app::after {
  position: absolute;
  z-index: 2;
  right: 8%;
  bottom: 10%;
  width: clamp(4px, 0.58vw, 9px);
  aspect-ratio: 1;
  background: #e1a946;
  box-shadow:
    0 0 0 2px rgba(12, 8, 2, 0.84),
    0 0 0.65rem #e1a946;
  content: "";
  animation: weather-app-lamp 2.8s steps(2, end) infinite;
}

.weather-app:hover,
.weather-app:focus-visible {
  color: #ffe6a0;
  outline: 2px solid #e1a946;
  outline-offset: -6px;
  filter: brightness(1.2);
}

.weather-app:hover::after,
.weather-app:focus-visible::after {
  background: #51d6ff;
  box-shadow:
    0 0 0 2px rgba(12, 8, 2, 0.84),
    0 0 0.85rem #51d6ff;
}

@keyframes weather-app-lamp {
  0%, 72%, 100% { opacity: 0.94; }
  76%, 90% { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  .weather-app::after {
    animation: none;
  }
}
