.site-head-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.ambient-player {
  display: grid;
  grid-template-columns: 34px minmax(118px, 158px) 78px;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 4px 9px 4px 5px;
  color: #f9edcf;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .07), transparent 32%),
    rgba(2, 5, 6, .78);
  border: 1px solid rgba(230, 191, 115, .3);
  border-radius: 8px;
  box-shadow:
    inset 0 0 18px rgba(104, 243, 238, .035),
    0 8px 30px rgba(0, 0, 0, .26);
  backdrop-filter: blur(16px);
  transition: border-color 220ms ease, box-shadow 220ms ease, opacity 220ms ease;
}

.ambient-player audio {
  display: none;
}

.ambient-player.is-playing {
  border-color: rgba(104, 243, 238, .42);
  box-shadow:
    inset 0 0 22px rgba(104, 243, 238, .07),
    0 0 18px rgba(104, 243, 238, .08),
    0 8px 30px rgba(0, 0, 0, .3);
}

.ambient-player.is-ducked {
  opacity: .82;
}

.ambient-toggle {
  position: relative;
  width: 32px;
  height: 32px;
  padding: 0;
  color: #ffe8a9;
  background: rgba(230, 191, 115, .08);
  border: 1px solid rgba(230, 191, 115, .4);
  border-radius: 50%;
  box-shadow: inset 0 0 12px rgba(230, 191, 115, .08);
}

.ambient-toggle:hover,
.ambient-toggle:focus-visible {
  color: #06100d;
  background: #e6bf73;
  border-color: #ffe8a9;
  outline: none;
}

.ambient-play-glyph,
.ambient-play-glyph::before,
.ambient-play-glyph::after {
  position: absolute;
  display: block;
  content: "";
}

.ambient-play-glyph {
  top: 50%;
  left: 50%;
  width: 12px;
  height: 14px;
  transform: translate(-45%, -50%);
}

.ambient-play-glyph::before {
  top: 1px;
  left: 2px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid currentColor;
}

.ambient-player.is-playing .ambient-play-glyph {
  transform: translate(-50%, -50%);
}

.ambient-player.is-playing .ambient-play-glyph::before,
.ambient-player.is-playing .ambient-play-glyph::after {
  top: 1px;
  width: 3px;
  height: 12px;
  background: currentColor;
  border: 0;
  border-radius: 1px;
}

.ambient-player.is-playing .ambient-play-glyph::before {
  left: 2px;
}

.ambient-player.is-playing .ambient-play-glyph::after {
  right: 2px;
}

.ambient-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
  text-align: left;
}

.ambient-state {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(104, 243, 238, .76);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.ambient-state::before {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  content: "";
  background: rgba(249, 237, 207, .36);
  border-radius: 50%;
}

.ambient-player.is-playing .ambient-state::before {
  background: #68f3ee;
  box-shadow: 0 0 8px rgba(104, 243, 238, .8);
}

.ambient-copy strong {
  overflow: hidden;
  color: rgba(249, 237, 207, .94);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ambient-volume {
  display: flex;
  align-items: center;
}

.ambient-volume input {
  width: 78px;
  height: 20px;
  margin: 0;
  padding: 0;
  background: transparent;
  accent-color: #e6bf73;
}

.ambient-volume input:focus-visible {
  outline: 1px solid rgba(104, 243, 238, .8);
  outline-offset: 3px;
}

@media (max-width: 1040px) {
  .ambient-player {
    grid-template-columns: 34px minmax(104px, 132px);
  }

  .ambient-volume {
    display: none;
  }
}

@media (max-width: 780px) {
  .site-head-actions {
    width: 154px;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 6px;
  }

  .ambient-player {
    width: 100%;
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 38px;
    padding-block: 2px;
  }

  .ambient-copy strong {
    font-size: 10px;
  }

  .site-head-actions .nav {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 420px) {
  .site-head-actions {
    width: 138px;
  }

  .ambient-copy strong {
    display: none;
  }
}
