:root {
  --apc-sound-red: #d20a11;
  --apc-sound-black: #0d0f12;
  --apc-sound-white: #ffffff;
  --apc-sound-muted: #a8adb4;
  --apc-sound-line: rgba(255, 255, 255, 0.15);
}

.apc-sound,
.apc-sound * {
  box-sizing: border-box;
}

.apc-sound[hidden] {
  display: none !important;
}

.apc-sound {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99990;
  width: min(340px, calc(100vw - 28px));
  color: var(--apc-sound-white);
  font-family: inherit;
  transition: width 0.2s ease, right 0.2s ease;
}

.apc-sound audio {
  display: none;
}

.apc-sound__panel {
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid var(--apc-sound-red);
  border-radius: 9px;
  background: rgba(13, 15, 18, 0.96);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
}

.apc-sound__head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  min-height: 18px;
}

.apc-sound__mark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--apc-sound-red);
}

.apc-sound__head strong {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.apc-sound__head [data-apc-status] {
  margin-left: auto;
  color: var(--apc-sound-muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.apc-sound__collapse,
.apc-sound__close {
  display: inline-flex;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: 3px;
  padding: 0;
  border: 1px solid var(--apc-sound-line);
  border-radius: 50%;
  background: transparent;
  color: var(--apc-sound-muted);
  font: inherit;
  font-size: 17px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.apc-sound__collapse:hover,
.apc-sound__collapse:focus-visible,
.apc-sound__close:hover,
.apc-sound__close:focus-visible {
  border-color: var(--apc-sound-red);
  color: var(--apc-sound-white);
}

.apc-sound.is-collapsed {
  right: 0;
  width: 46px;
}

.apc-sound.is-collapsed .apc-sound__panel {
  padding: 8px 7px;
  border-right: 0;
  border-radius: 8px 0 0 8px;
}

.apc-sound.is-collapsed .apc-sound__head {
  justify-content: center;
  margin: 0;
}

.apc-sound.is-collapsed .apc-sound__mark,
.apc-sound.is-collapsed .apc-sound__head strong,
.apc-sound.is-collapsed .apc-sound__head [data-apc-status],
.apc-sound.is-collapsed .apc-sound__close,
.apc-sound.is-collapsed .apc-sound__playlists,
.apc-sound.is-collapsed .apc-sound__controls {
  display: none;
}

.apc-sound.is-collapsed .apc-sound__collapse {
  flex-basis: 30px;
  width: 30px;
  height: 30px;
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--apc-sound-white);
  font-size: 22px;
}

.apc-sound.is-playing .apc-sound__mark {
  box-shadow: 0 0 0 4px rgba(227, 6, 19, 0.16);
}

.apc-sound__playlists {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.apc-sound__playlists button {
  min-width: 0;
  padding: 7px 5px;
  border: 1px solid var(--apc-sound-line);
  border-radius: 5px;
  background: transparent;
  color: #d5d8dc;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.apc-sound__playlists button.is-active {
  border-color: var(--apc-sound-red);
  background: var(--apc-sound-red);
  color: var(--apc-sound-white);
}

.apc-sound__controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.apc-sound__play {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 78px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--apc-sound-red);
  border-radius: 5px;
  background: transparent;
  color: var(--apc-sound-white);
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  cursor: pointer;
}

.apc-sound__play:hover,
.apc-sound__play:focus-visible,
.apc-sound.is-playing .apc-sound__play {
  background: var(--apc-sound-red);
}

.apc-sound__play [data-apc-play-icon] {
  font-size: 10px;
}

.apc-sound__volume {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.apc-sound__volume > span[aria-hidden='true'] {
  color: var(--apc-sound-muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.apc-sound__volume input {
  width: 100%;
  min-width: 70px;
  height: 3px;
  accent-color: var(--apc-sound-red);
  cursor: pointer;
}

.apc-sound button {
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.apc-sound button:focus-visible,
.apc-sound input:focus-visible,
.apc-sound-prompt__button:focus-visible {
  outline: 2px solid rgba(210, 10, 17, 0.4);
  outline-offset: 2px;
}

.apc-sound-prompt {
  display: block;
  margin: 0;
  padding: clamp(22px, 2.6vw, 32px) 0;
  color: var(--apc-sound-black);
}

.apc-sound-prompt__kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--apc-sound-red);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.apc-sound-prompt h2 {
  max-width: 980px;
  margin: 0;
  color: var(--apc-sound-black);
  font-size: clamp(30px, 3.5vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.apc-sound-prompt__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  min-height: 50px;
  padding: 11px 24px;
  border: 2px solid var(--apc-sound-red);
  border-radius: 0;
  background: var(--apc-sound-red);
  color: var(--apc-sound-white);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.apc-sound-prompt__button:hover {
  background: var(--apc-sound-black);
  border-color: var(--apc-sound-black);
}

@media (max-width: 600px) {
  .apc-sound {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }

  .apc-sound__panel {
    padding: 11px;
  }

  .apc-sound-prompt {
    padding: 24px 0;
  }

  .apc-sound-prompt__kicker {
    margin-bottom: 8px;
    font-size: 12px;
  }

  .apc-sound-prompt h2 {
    font-size: clamp(28px, 8.5vw, 36px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .apc-sound,
  .apc-sound button,
  .apc-sound-prompt__button {
    transition: none;
  }
}
