.cosmos {
  background: #21313c !important;
}

/*
 * The cosmic background normally owns a promoted compositor layer. That
 * isolates the photographic wallpaper from the cards' backdrop-filter in
 * Chromium, so the cards stay translucent but cannot blur the image behind
 * them. Remove that isolation only while the beach wallpaper is active.
 */
.cosmos.beach-wallpaper-active {
  transform: none;
}

/*
 * Keep beach-mode glass surfaces on the same backdrop sampling path. The
 * default scale(1) promotes every card to its own compositor layer, which can
 * make Chromium display only the translucent fill without the blur. A stronger
 * blur is intentional here because the beach photography contains much finer
 * texture than the original gradient background.
 */
body.beach-wallpaper-active .cards {
  background-color: rgba(4, 18, 30, .42);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
  backdrop-filter: blur(22px) saturate(120%);
  transform: none;
}

body.beach-wallpaper-active .cards:hover {
  transform: scale(1.01);
}

body.beach-wallpaper-active .utility-card:hover {
  transform: scale(1.02);
}

body.beach-wallpaper-active .cards:active {
  transform: scale(.98);
}

body.beach-wallpaper-active .utility-card:active {
  transform: scale(1);
}

.beach-wallpaper {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-color: #21313c;
  background-image: var(--beach-image);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: var(--beach-position-x, 50%) center;
  opacity: 0;
  transition: opacity .42s ease;
}

.beach-wallpaper::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 10, 16, var(--beach-veil-top, .24)), rgba(4, 10, 16, var(--beach-veil-bottom, .42))),
    radial-gradient(ellipse at 50% 34%, transparent 24%, rgba(3, 8, 14, .22) 100%);
}

.beach-wallpaper.is-ready {
  opacity: 1;
}

.cosmos.beach-wallpaper-active > .cosmos-sky,
.cosmos.beach-wallpaper-active > .cosmos-glow,
.cosmos.beach-wallpaper-active > .cosmos-nebula,
.cosmos.beach-wallpaper-active > .cosmos-vignette,
.cosmos.beach-wallpaper-active > .parallax-layer {
  opacity: 0 !important;
  visibility: hidden !important;
  animation: none !important;
}

@media (max-aspect-ratio: 9 / 16) {
  .beach-wallpaper {
    background-position-x: var(--beach-position-mobile-x, var(--beach-position-x, 50%));
  }
}

@media (prefers-reduced-motion: reduce) {
  .beach-wallpaper {
    transition: none;
  }
}
