.demo-block {
    display: grid;
    gap: 0.95rem;
  }

  .demo-player {
    position: relative;
    border: 1px solid rgba(224, 184, 74, 0.28);
    border-radius: 14px;
    overflow: hidden;
    background: #020805;
    isolation: isolate;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  }

  .demo-player::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    z-index: 5;
    background: var(--rainbow);
    opacity: 0.7;
    pointer-events: none;
  }

  .demo-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #050a07;
    overflow: hidden;
  }

  @media (max-width: 720px) {
    .demo-stage {
      aspect-ratio: auto;
      height: min(72svh, 36rem);
      min-height: 16rem;
    }
  }

  .demo-poster {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    background: #050a07;
  }

  .demo-poster picture {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
  }

  .demo-poster-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
  }

  .demo-veil {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at center, rgba(3, 10, 6, 0.15), rgba(3, 10, 6, 0.62));
    transition: opacity 0.3s ease;
  }

  .demo-start {
    position: relative;
    z-index: 4;
    min-width: 11rem;
    min-height: 3.25rem;
    font-size: 1rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  }

  .demo-player[data-state='live'] .demo-poster,
  .demo-player[data-state='live'] .demo-veil,
  .demo-player[data-state='error'] .demo-veil,
  .demo-player[data-state='loading'] .demo-start {
    opacity: 0;
    pointer-events: none;
  }

  .demo-player[data-state='loading'] .demo-start {
    position: absolute;
    visibility: hidden;
  }

  .demo-player[data-state='loading'] .demo-veil::after {
    content: attr(data-loading);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1rem;
    font-size: 0.95rem;
    color: var(--mist);
    z-index: 5;
    text-align: center;
  }

  .demo-player[data-state='loading'] .demo-chrome [data-demo-reload],
  .demo-player[data-state='loading'] .demo-chrome [data-demo-fullscreen],
  .demo-player[data-state='loading'] .demo-chrome [data-demo-external] {
    display: none;
  }

  .demo-fallback {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-content: center;
    gap: 0.85rem;
    padding: 1.25rem;
    text-align: center;
    background: rgba(3, 10, 6, 0.88);
  }

  .demo-fallback[hidden] {
    display: none !important;
  }

  .demo-fallback p {
    margin: 0;
    color: var(--mist);
  }

  .demo-frame {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    border: 0;
    opacity: 0;
    pointer-events: none;
  }

  .demo-player[data-state='loading'] .demo-frame {
    opacity: 0;
    z-index: 1;
    pointer-events: none;
  }

  .demo-player[data-state='live'] .demo-frame {
    opacity: 1;
    z-index: 4;
    pointer-events: auto;
  }

  .demo-chrome {
    display: none;
    gap: 0.45rem;
    padding: 0.55rem 0.7rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    background: rgba(3, 10, 6, 0.96);
    border-top: 1px solid rgba(224, 184, 74, 0.16);
    flex-wrap: wrap;
  }

  .demo-player[data-state='live'] .demo-chrome,
  .demo-player[data-state='loading'] .demo-chrome {
    display: flex;
  }

  .demo-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.75rem;
    min-width: 2.75rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
  }

  .demo-tool-icon {
    display: inline-flex;
    line-height: 0;
  }

  @media (max-width: 720px) {
    .demo-tool {
      min-height: 2.75rem;
      min-width: 2.75rem;
      padding: 0.55rem;
    }

    .demo-tool-label {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      border: 0;
    }
  }

  .demo-meta {
    font-size: 0.85rem;
    color: rgba(197, 221, 204, 0.8);
  }

  .demo-player.immersive {
    position: fixed;
    inset: 0;
    z-index: 100;
    border-radius: 0;
    max-height: none;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .demo-player.immersive .demo-stage {
    width: 100%;
    height: calc(100svh - 3.6rem - env(safe-area-inset-bottom));
    max-height: none;
    aspect-ratio: auto;
  }

  .demo-player[data-state='live'] .demo-frame {
    opacity: 1 !important;
    z-index: 4 !important;
    pointer-events: auto !important;
  }

  .demo-player[data-state='loading'] .demo-frame {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body.demo-immersive {
    overflow: hidden;
  }

  .demo-below-cta {
    display: flex;
    justify-content: center;
    margin-top: 0.35rem;
  }
