@layer components {
  .site-video-bg {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
  }
  
  .site-bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    min-width: 100vw;
    min-height: 100vh;
    object-fit: cover;
    transform: translate(-50%, -50%) scale(1.05);
    pointer-events: none;
  }
  
  .site-video-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
      linear-gradient(
        180deg,
        rgba(11, 15, 20, 0.45) 0%,
        rgba(11, 15, 20, 0.62) 55%,
        rgba(11, 15, 20, 0.82) 100%
      );
  }
  
  body > :not(.site-video-bg):not(.site-video-overlay):not(.bg-video-sound-toggle):not(script) {
    transition:
      opacity 0.4s ease,
      filter 0.4s ease;
  }
  
  body.background-audio-focus > :not(.site-video-bg):not(.site-video-overlay):not(.bg-video-sound-toggle):not(script) {
    opacity: 0.01;
    filter: blur(1.2px);
    pointer-events: none;
    user-select: none;
  }
  
  body.background-audio-focus .site-video-overlay {
    background:
      linear-gradient(
        180deg,
        rgba(10, 14, 18, 0.08) 0%,
        rgba(10, 14, 18, 0.14) 55%,
        rgba(10, 14, 18, 0.22) 100%
      );
  }
  
  body.background-audio-focus .site-bg-video {
    transform: translate(-50%, -50%) scale(1.01);
    filter: saturate(1.08) contrast(1.04) brightness(1.02);
  }
  
  .bg-video-sound-toggle {
    position: fixed;
    top: 58%;
    right: clamp(10px, 1.8vw, 28px);
    z-index: var(--layer-floating);
    display: flex;
    align-items: center;
    gap: 14px;
    width: min(356px, calc(100vw - 24px));
    padding: 14px 16px;
    border: 1px solid rgba(255, 198, 122, 0.42);
    border-right: 0;
    border-radius: 26px 0 0 26px;
    background:
      radial-gradient(circle at top left, rgba(255, 214, 135, 0.28), transparent 56%),
      linear-gradient(160deg, rgba(255, 113, 56, 0.94), rgba(18, 25, 34, 0.92) 68%);
    box-shadow:
      0 22px 54px rgba(0, 0, 0, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: #fff8eb;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    transform: translate3d(0, -50%, 0);
    transition:
      transform 0.24s ease,
      box-shadow 0.24s ease,
      border-color 0.24s ease,
      background 0.24s ease;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
  }
  
  .bg-video-sound-toggle[hidden] {
    display: none !important;
  }
  
  .bg-video-sound-toggle::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 34%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 65%);
    z-index: -2;
  }
  
  .bg-video-sound-toggle::after {
    content: "";
    position: absolute;
    inset: auto 22px 11px 74px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 233, 194, 0.52), transparent 82%);
    opacity: 0.72;
  }
  
  .bg-video-sound-toggle:hover,
  .bg-video-sound-toggle:focus-visible {
    transform: translate3d(-6px, -50%, 0);
    box-shadow:
      0 26px 62px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.24);
  }
  
  .bg-video-sound-toggle:focus-visible {
    outline: 2px solid rgba(255, 231, 176, 0.85);
    outline-offset: 3px;
  }
  
  .bg-video-sound-toggle.is-active {
    border-color: rgba(114, 232, 191, 0.52);
    background:
      radial-gradient(circle at top left, rgba(103, 209, 255, 0.24), transparent 52%),
      linear-gradient(165deg, rgba(22, 167, 231, 0.92), rgba(16, 24, 33, 0.94) 74%);
  }
  
  .bg-video-sound-toggle-orbit {
    position: absolute;
    top: 50%;
    right: -28px;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    transform: translateY(-50%);
    background:
      radial-gradient(circle, rgba(255, 232, 193, 0.32) 0%, rgba(255, 232, 193, 0.08) 38%, transparent 72%);
    opacity: 0.55;
    mix-blend-mode: screen;
    animation: bg-video-sound-orbit 8s linear infinite;
  }
  
  .bg-video-sound-toggle.is-active .bg-video-sound-toggle-orbit {
    opacity: 0.72;
  }
  
  .bg-video-sound-toggle-icon {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }
  
  .bg-video-sound-toggle-icon::before {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 14px;
    background:
      radial-gradient(circle at 50% 18%, rgba(255, 244, 214, 0.8), rgba(255, 179, 71, 0.2) 48%, transparent 74%);
    opacity: 0.92;
  }
  
  .bg-video-sound-toggle-bar {
    position: relative;
    width: 6px;
    border-radius: 999px;
    background: linear-gradient(180deg, #fff5d2, #ff9f45);
    box-shadow: 0 0 18px rgba(255, 179, 71, 0.42);
    transform-origin: 50% 100%;
    animation: bg-video-sound-bars 1.15s ease-in-out infinite;
  }
  
  .bg-video-sound-toggle-bar:nth-child(1) {
    height: 15px;
    animation-delay: -0.28s;
  }
  
  .bg-video-sound-toggle-bar:nth-child(2) {
    height: 24px;
    animation-delay: -0.08s;
  }
  
  .bg-video-sound-toggle-bar:nth-child(3) {
    height: 19px;
    animation-delay: -0.2s;
  }
  
  .bg-video-sound-toggle.is-active .bg-video-sound-toggle-bar {
    background: linear-gradient(180deg, #fff8d8, #67d1ff 45%, #39d98a 100%);
    box-shadow: 0 0 18px rgba(103, 209, 255, 0.34);
    animation-duration: 0.78s;
  }
  
  .bg-video-sound-toggle-copy {
    position: relative;
    display: grid;
    gap: 4px;
    text-align: left;
    min-width: 0;
    flex: 1 1 auto;
  }
  
  .bg-video-sound-toggle-title {
    display: block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1.15;
  }
  
  .bg-video-sound-toggle-note {
    display: block;
    max-width: 170px;
    font-size: 11px;
    line-height: 1.35;
    color: rgba(255, 245, 229, 0.84);
  }
  
  .bg-video-volume {
    display: grid;
    grid-template-columns: auto minmax(84px, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    max-width: 188px;
  }
  
  .bg-video-volume-label,
  .bg-video-volume-value {
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 245, 229, 0.82);
  }
  
  .bg-video-volume-slider {
    width: 100%;
    height: 18px;
    margin: 0;
    accent-color: #ffd166;
    cursor: pointer;
  }
  
  .bg-video-sound-toggle.is-active .bg-video-volume-slider {
    accent-color: #67d1ff;
  }
  
  .bg-video-playback-toggle {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    gap: 0;
    min-width: 54px;
    margin-left: auto;
    padding: 8px 12px;
    border: 1px solid rgba(255, 244, 214, 0.18);
    border-radius: 999px;
    background: rgba(13, 18, 25, 0.28);
    color: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  }
  
  .bg-video-playback-toggle:hover,
  .bg-video-playback-toggle:focus-visible {
    border-color: rgba(255, 225, 170, 0.42);
    background: rgba(255, 255, 255, 0.08);
  }
  
  .bg-video-playback-toggle:focus-visible {
    outline: 2px solid rgba(255, 231, 176, 0.85);
    outline-offset: 2px;
  }
  
  .bg-video-playback-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #effcff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  
  .bg-video-sound-toggle.is-disabled .bg-video-playback-toggle {
    border-color: rgba(255, 159, 69, 0.36);
  }
  
  .bg-video-sound-toggle.is-disabled .bg-video-playback-state {
    color: #fff2df;
  }
  
  .bg-video-sound-toggle.is-disabled .bg-video-volume {
    opacity: 0.56;
  }
  
  body.background-audio-focus .bg-video-sound-toggle {
    transform: translate3d(-6px, -50%, 0) scale(1.02);
  }
  
  @keyframes bg-video-sound-bars {
    0%,
    100% {
      transform: scaleY(0.62);
      opacity: 0.7;
    }
  
    50% {
      transform: scaleY(1.2);
      opacity: 1;
    }
  }
  
  @keyframes bg-video-sound-orbit {
    from {
      transform: translateY(-50%) rotate(0deg);
    }
  
    to {
      transform: translateY(-50%) rotate(360deg);
    }
  }
}
