@media (max-width: 640px) {
  /* Use a stable first viewport so the browser toolbar cannot shift the story
     boundary or the guide's starting point while the reader scrolls. */
  body { --be-phone-header-height: 64px; }
  body > .bar { height: var(--be-phone-header-height); }
  main > .hero:not(.playing) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    --be-hero-art-size: clamp(70px, 22vw, 108px);
    min-block-size: calc(100vh - var(--be-phone-header-height));
    min-block-size: calc(100svh - var(--be-phone-header-height));
    padding-block: clamp(18px, 4svh, 40px) max(17px, env(safe-area-inset-bottom));
    padding-inline: clamp(16px, 5.5vw, 30px);
  }
  .hero:not(.playing) > .intro {
    grid-template-columns: minmax(0, 1fr) var(--be-hero-art-size);
    column-gap: clamp(8px, 2.8vw, 16px);
    width: 100%;
    max-width: 440px;
    margin-block: auto 0;
  }
  .hero:not(.playing) .intro > .eyebrow {
    grid-area: 1 / 1 / 2 / -1;
    margin-block: 0 10px;
  }
  .hero:not(.playing) .intro > :is(h1, .mascot-dock) { grid-row: 2; }
  .hero:not(.playing) .intro > h1 {
    font-size: clamp(32px, 9.6vw, 48px);
    line-height: 1.03;
  }
  .hero:not(.playing) .intro > .mascot-dock {
    width: var(--be-hero-art-size);
  }
  .hero:not(.playing) .intro > .lede {
    grid-row: 3;
    max-width: 35ch;
    justify-self: start;
    margin-top: 15px;
    font-size: clamp(14px, 3.7vw, 16px);
    line-height: 1.55;
  }
  .hero:not(.playing) > .demo {
    width: 100%;
    max-width: 440px;
    margin-top: 19px;
  }
  .hero:not(.playing) .hero-actions a { min-height: 48px; }
  .hero:not(.playing) .hero-try { margin-top: 3px; }
  .hero:not(.playing) > .hero-controls {
    margin-block: auto 0;
    padding-block-start: 10px;
  }
  .hero:not(.playing) > .hero-controls :is(a, button) { min-block-size: 44px; }
}
