/**
 * Mobile player layout, including iOS Safari and WeChat WKWebView.
 * Lead with the service introduction, then show the player and its controls.
 */

.cz-hero__mobile-actions,
.cz-hero__works-heading {
  display: none;
}

@media (max-width: 767.98px) {
  /* The legacy reduced-motion rule must not animate responsive geometry. */
  .cz-hero__stage,
  .cz-hero__showcase,
  .cz-hero__showcase .cz-hero__media,
  .cz-hero__showcase .cz-hero__controls,
  .cz-hero__stage > .cz-works {
    transition-property: none;
  }

  .cz-hero {
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .cz-hero__status {
    display: none;
  }

  .cz-hero__stage {
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-box-orient: vertical !important;
    -webkit-box-direction: normal !important;
    -webkit-flex-direction: column !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 24px 0 36px !important;
  }

  .cz-hero__showcase {
    position: relative !important;
    -webkit-box-ordinal-group: 4 !important;
    -webkit-order: 3 !important;
    order: 3 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto;
    align-items: start !important;
    justify-items: center;
    gap: 12px !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
  }

  .cz-hero__showcase[data-orientation='landscape'] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .cz-hero__showcase::before {
    grid-column: 1 / -1 !important;
    grid-row: 1;
    justify-self: start;
    margin-bottom: 0;
  }

  .cz-hero__showcase .cz-hero__media,
  .cz-hero__showcase[data-orientation] .cz-hero__media {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    z-index: auto !important;
    grid-column: 1 !important;
    grid-row: 2;
    display: block !important;
    width: min(100%, calc(clamp(280px, 52vh, 420px) * 9 / 16)) !important;
    width: min(100%, calc(clamp(280px, 52svh, 420px) * 9 / 16)) !important;
    height: auto !important;
    aspect-ratio: 9 / 16;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .cz-hero__showcase[data-orientation='landscape'] .cz-hero__media {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
  }

  .cz-hero__media-frame,
  .cz-hero__showcase .cz-hero__media video,
  .cz-hero__showcase .cz-hero__media img,
  .cz-hero__showcase .cz-hero__slot {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .cz-hero__showcase .cz-hero__controls,
  .cz-hero__showcase[data-orientation] .cz-hero__controls {
    position: relative !important;
    grid-column: 1 !important;
    grid-row: 3;
    align-self: start !important;
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-box-orient: horizontal !important;
    -webkit-box-direction: normal !important;
    -webkit-flex-direction: row !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .cz-hero__showcase .cz-play {
    width: 44px;
    height: 44px;
  }

  .cz-hero__showcase .cz-hero__reel {
    gap: 4px;
  }

  .cz-hero__showcase .cz-hero__reel-label--mobile {
    font-size: 12px;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .cz-hero__showcase .cz-hero__progress {
    margin-top: 8px;
  }

  .cz-hero__showcase .cz-hero__expand {
    min-height: 44px;
  }

  .cz-hero__stage > .cz-works {
    -webkit-box-ordinal-group: 5 !important;
    -webkit-order: 4 !important;
    order: 4 !important;
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    margin: 16px 0 0 !important;
  }

  .cz-hero__stage .cz-hero__copy {
    -webkit-box-ordinal-group: 2 !important;
    -webkit-order: 1 !important;
    order: 1 !important;
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    margin-top: 0 !important;
    text-align: center;
  }

  .cz-hero__eyebrow {
    justify-content: center;
    margin-bottom: 18px;
  }

  .cz-hero__eyebrow::before {
    display: none;
  }

  .cz-hero__eyebrow::after {
    font-size: 12px;
    letter-spacing: .08em;
  }

  .cz-hero__title {
    font-size: clamp(36px, 11.8vw, 56px);
    line-height: 1.15;
  }

  .cz-hero__title em {
    margin: 0 .06em;
  }

  .cz-hero__intro {
    max-width: 32em;
    margin: 18px auto 0;
    font-size: 14px;
    line-height: 1.8;
    text-wrap: balance;
  }

  /* Render the actual published introduction instead of legacy generated copy. */
  .cz-hero__intro::after {
    content: none;
  }

  .cz-hero__creds {
    width: 100%;
    justify-content: center;
    margin-top: 18px;
    padding: 10px 0;
  }

  .cz-hero__price {
    justify-content: center;
    margin-top: 18px;
  }

  .cz-hero__price-num {
    padding: 14px 16px 14px 0;
    font-size: 38px;
  }

  .cz-hero__price-notes {
    min-width: 0;
    padding: 14px 0 14px 16px;
    text-align: left;
  }

  .cz-hero__mobile-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
  }

  .cz-hero__mobile-actions a {
    min-width: 0;
    min-height: 48px;
    padding: 12px;
    font-size: 14px;
    text-align: center;
  }

  .cz-hero__mobile-actions .cz-btn {
    color: #fff;
  }

  .cz-hero__works-heading {
    -webkit-box-ordinal-group: 3;
    -webkit-order: 2;
    order: 2;
    display: block;
    width: 100%;
    margin: 32px 0 20px;
    padding-top: 28px;
    border-top: 1px solid var(--cz-line-strong);
  }

  .cz-hero__works-heading h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.3;
    color: var(--cz-text-strong);
  }

  .cz-hero__works-heading p {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--cz-text-muted);
  }

  .cz-hero__works-heading,
  #apply {
    scroll-margin-top: 84px;
  }

  .cz-hero__mobile-actions a:focus-visible,
  .cz-hero__works-heading:focus-visible {
    outline: 2px solid var(--cz-accent);
    outline-offset: 4px;
  }

  .cz-viewer__dialog,
  .cz-viewer[data-orientation='portrait'] .cz-viewer__dialog {
    width: 100% !important;
    height: 88vh !important;
    height: 88dvh !important;
  }

  .cz-viewer {
    -webkit-backdrop-filter: blur(18px);
  }
}
