/* V121 — mobile project hierarchy and taller About presentation. */

@media (max-width: 767px) and (orientation: portrait) {
  /* Keep the project name immediately above the primary action. */
  .project-gothic-title-v56 {
    top: var(--project-mobile-title-top-v58, 25%) !important;
    left: 50vw !important;
    transform: translate3d(-50%, -50%, 0) !important;
    width: min(94vw, 680px) !important;
    max-width: min(94vw, 680px) !important;
    margin: 0 !important;
    padding: 0 12px !important;
    z-index: 64 !important;
    font-size: clamp(1rem, 5.2vw, 1.78rem) !important;
    line-height: .94 !important;
    letter-spacing: .018em !important;
    text-align: center !important;
    text-wrap: balance;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
  }

  /* Give About more usable vertical space and move it above bottom controls. */
  html.v105-about-open .v98-about-panel,
  html.v98-about-open .v98-about-panel {
    width: min(92vw, 680px) !important;
    height: min(84dvh, 840px) !important;
    min-height: min(74dvh, 690px) !important;
    max-height: calc(100dvh - 104px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    transform: translate3d(0, -3.4dvh, 0) !important;
    justify-content: flex-start !important;
    padding-top: 10px !important;
    padding-bottom: max(18px, env(safe-area-inset-bottom, 0px)) !important;
    scroll-padding-top: 72px;
    scroll-padding-bottom: 32px;
    scrollbar-gutter: stable;
    overscroll-behavior-y: contain;
  }

  html.v105-about-open .v98-about-panel h1,
  html.v98-about-open .v98-about-panel h1 {
    flex: 0 0 auto;
    margin-top: -18px !important;
    margin-bottom: 4px !important;
    line-height: 1 !important;
  }

  html.v105-about-open .v98-about-panel > section,
  html.v98-about-open .v98-about-panel > section {
    flex: 0 0 auto;
    padding-bottom: 14px;
  }
}

@media (max-width: 390px) and (max-height: 720px) and (orientation: portrait) {
  html.v105-about-open .v98-about-panel,
  html.v98-about-open .v98-about-panel {
    height: calc(100dvh - 92px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    min-height: 0 !important;
    transform: translate3d(0, -2dvh, 0) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-gothic-title-v56,
  .v98-about-panel {
    transition: none !important;
  }
}
