/* One distance drives the header, sticky reader and the two existing frame corners. */
@property --reader-retraction {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

.uxa-v2-footer__bottom .hero-motion-controls[hidden] { display: none; }
.uxa-v2-footer__bottom .hero-motion-controls > span { display: none; }
.uxa-v2-footer__bottom .hero-motion-toggle {
  background: transparent;
  border: 0;
  padding: .35em 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}
@media (max-width: 700px) {
  body.console-site[data-console-site="packy"][data-console-page-label] #console-content .uxav2 .shared-case-hero :is(.site-delivered-stage:has(.site-delivered-phone), .delivered-stage:has(.delivered-phone)),
  #console-content .gc-hero .gc-device-stage:has(.gc-hero-phones) {
    padding-bottom: clamp(2rem, 4vw, 3.75rem) !important;
    position: relative;
  }
  #console-content .shared-case-hero :is(.site-delivered-phone, .delivered-phone),
  #console-content .gc-hero .gc-hero-phones {
    inset-block-start: auto !important;
    inset-block-end: 0 !important;
  }
  #console-content .shared-case-hero :is(.site-delivered-chrome, .delivered-chrome) {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    padding-block: 6px !important;
    row-gap: 0;
    align-items: center;
  }
  #console-content .shared-case-hero :is(.site-delivered-chrome, .delivered-chrome) > p {
    min-width: 0;
    margin: 0;
  }
  #console-content .shared-case-hero :is(.site-delivered-browser, .delivered-browser) {
    container-type: inline-size;
  }
  #console-content .shared-case-hero :is(.site-homepage-window, .delivered-screen-viewport) {
    aspect-ratio: auto;
    height: auto;
    max-height: 75cqi;
  }
  .uxa-v2-footer__bottom .hero-motion-toggle { min-height: 44px; }
  html.mobile-reading {
    --reader-travel: calc((env(safe-area-inset-top, 0px) - var(--console-top)) * var(--reader-retraction));
    --reader-edge: calc(var(--console-top) + var(--reader-travel));
    transition: --reader-retraction 280ms cubic-bezier(.22,.68,.25,1);
    scroll-padding-top: calc(var(--reader-edge) + 8px) !important;
  }
  html.mobile-reading.header-away {
    --reader-retraction: 1;
    transition-duration: 240ms;
  }
  .mobile-reading body.console-site #stickyheaders.console-header {
    translate: 0 var(--reader-travel);
    background: #fff !important;
  }
  .mobile-reading .console-casing :is(.console-corner--tl, .console-corner--tr) {
    top: calc(var(--reader-edge) - 1px);
    height: 16px;
    width: 16px;
    background: linear-gradient(145deg,#fff,#eef2f5);
  }
  .mobile-reading .console-casing .console-rail {
    top: calc(var(--reader-edge) - 5px);
  }
  .mobile-reading body.console-site #console-content :is(.guide-progress-wrap, .gc-nav-wrap) {
    top: var(--reader-edge) !important;
    background: #fff !important;
    backdrop-filter: none;
  }
  .mobile-reading #console-content .camera-reading-progress {
    position: absolute;
    inset: auto 24px 2px;
    height: 2px;
    width: auto;
    margin: 0;
    border-radius: 3px;
    background: #e8edf4;
    overflow: hidden;
  }
  .mobile-reading #console-content .guide-progress-line[role="progressbar"] > span {
    display: block;
    width: 100% !important;
    height: 100%;
    background: #a8d9ed !important;
    box-shadow: inset 0 -1px #669dbb;
    transform: scaleX(var(--page-read, 0));
    transform-origin: left center;
    transition: none !important;
  }
  /* These lists reserved a left lane for desktop connector artwork. */
  .mobile-reading #console-content .guide-chapter :is(.wa-voices__people, .wi-voices__people, .kfi-voices__people, .ktd-voices__people, .uxa-research-cards) {
    padding-inline-start: 0 !important;
  }
  /* Use the same chapter gutter for standalone copy, captions and artwork. */
  .mobile-reading #console-content .guide-chapter :is(.wa-case-media, .wa-case-mobile, .wa-case-build-image, .ww8-demo) {
    width: 100% !important;
    max-width: 100%;
    margin-inline: 0 !important;
    box-sizing: border-box;
  }
  .mobile-reading #console-content .guide-chapter :is(.wa-case-build-image, .gbt-case-build-image) {
    padding-inline: 0 !important;
    border: 0 !important;
    box-shadow: none;
  }
  /* The chapter selector, count, arrows, padding and progress line keep their
     original styles. Only the reading-mode link moves out of the sticky bar. */
  .mobile-reading #console-content .chapter-reading-choice {
    width: calc(100% - 36px);
    margin-inline: auto;
    padding-block: 4px;
  }
  .mobile-reading #console-content .chapter-reading-choice > button {
    display: inline-flex !important;
    position: static !important;
    align-items: center;
    min-height: 44px;
    padding: 4px 0;
    background: transparent;
    border: 0;
    color: var(--console-ink);
    font: inherit;
    font-size: .9375rem;
    text-decoration: underline;
    text-underline-offset: .2em;
    cursor: pointer;
  }
  .mobile-reading #console-content :is(.uxa-chapter-menu, .gc-menu-list) {
    max-height: min(60dvh, calc(100dvh - var(--reader-edge) - var(--reader-bar-height, 110px) - var(--console-bottom) - 16px)) !important;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .mobile-reading body.console-site #console-content :is(.guide-chapter, .chapter-opening, .gc-chapter, .gc-chapter-opening) {
    scroll-margin-top: var(--reader-bar-height, 110px) !important;
  }
  html.mobile-reading.reduce-motion { transition-duration: 0s; }
  @media (prefers-reduced-motion: reduce) {
    html.mobile-reading { transition-duration: 0s; }
  }
}
