/* Only the mobile player owns these generated elements. */
.landing-mobile-video { display: none; }
@media (max-width: 899px) {
  [data-mobile-video-replaced] { display: none !important; }
  [data-mobile-video-host] {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
  }
  .simulation-card-image[data-mobile-video-host] .simulation-card-mobile-mode {
    pointer-events: none;
  }
  .landing-mobile-video {
    display: block;
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 16px auto;
    color: var(--navy);
    background: transparent;
  }
  .pa-hero + .landing-mobile-video,
  .research-hero-refresh + .landing-mobile-video,
  .home-hero-refresh + .landing-mobile-video {
    width: calc(100% - 48px);
  }
  .landing-mobile-video video {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: var(--radius-lg);
    background: var(--white);
  }
  .landing-mobile-video[data-portrait="true"] video { aspect-ratio: 9 / 16; }
  .landing-mobile-video__sound {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 48px;
    height: 48px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--white) 60%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--navy) 65%, transparent);
    color: var(--white);
    cursor: pointer;
  }
  .landing-mobile-video__sound svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .landing-mobile-video__sound:focus-visible,
  .landing-mobile-video video:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
  }
  .landing-mobile-video-dialog {
    width: calc(100vw - 24px);
    max-width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 40px 0 0;
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--navy);
    color: var(--white);
  }
  .landing-mobile-video-dialog::backdrop {
    background: color-mix(in srgb, var(--navy) 85%, transparent);
  }
  .landing-mobile-video-dialog video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--navy);
    max-height: calc(100dvh - 80px);
    object-fit: contain;
  }
  .landing-mobile-video-dialog[data-portrait="true"] video { aspect-ratio: 9 / 16; }
  .landing-mobile-video-dialog__close {
    position: absolute;
    inset: 0 0 auto auto;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--white);
    font-size: var(--text-3xl);
    cursor: pointer;
  }
  .landing-mobile-video-dialog__error { padding: 12px; }
  .landing-mobile-video__error { font-size: var(--text-sm); }
  .home-tpl__track > .landing-mobile-video {
    flex: 0 0 min(78vw, 320px);
  }
  .landing-mobile-video-card {
    flex: 0 0 min(78vw, 320px);
    scroll-snap-align: start;
    min-width: 0;
  }
  .landing-mobile-video-card > .home-tpl__card { width: 100%; }
  /* Planning uses the same snug frame as Assessment and Research. */
  .planning-aligned:not(.assessment-aligned) .pa-trust-frame[data-mobile-video-host] {
    overflow: hidden !important;
  }
  .planning-aligned:not(.assessment-aligned) .pa-trust-frame > .landing-mobile-video {
    margin: 0;
  }
  .planning-aligned:not(.assessment-aligned) .pa-trust-frame > .landing-mobile-video video {
    border-radius: 0;
  }
  .planning-aligned:not(.assessment-aligned) .pa-trust-frame .landing-mobile-video__error {
    position: absolute;
    inset: auto 10px 10px;
    margin: 0;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--navy);
    pointer-events: none;
  }
  .landing-mobile-video__poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-lg);
    background: var(--white);
    pointer-events: none;
  }
  .landing-mobile-video[data-ready] .landing-mobile-video__poster { display: none; }
  .pa-trust-frame > .landing-mobile-video .landing-mobile-video__poster,
  .research-accuracy__player .landing-mobile-video .landing-mobile-video__poster { border-radius: 0; }
}
