/* A short phone still shows a full scene between the masthead and transport.
   Once an answer or FAQ is expanded, the scene can use its normal scrolling. */
@media (max-width: 640px) and (max-height: 650px) {
  .story-ready #shelf,
  .story-ready #inside,
  .story-ready #purchase,
  .story-ready #exercise {
    padding-block: clamp(9px, 2.4cqh, 15px);
  }

  .story-ready .shelf-caption {
    position: relative;
    display: block;
  }

  .story-ready .shelf-caption > .textlink {
    position: absolute;
    inset: 0 0 auto auto;
    margin: 0;
  }

  .story-ready .shelf-caption h2,
  .story-ready .question h2,
  .story-ready .section-intro h2,
  .story-ready .closing h2 {
    font-size: clamp(30px, min(9.9vw, 7.5cqh), 43px);
    line-height: 1.04;
  }

  .story-ready .shelf-caption h2 {
    margin-top: 5px;
  }

  .story-ready .shelf-scroll {
    --folio-height: clamp(138px, 35cqh, 198px);
    --folio-depth: clamp(26px, 7.7vw, 34px);
    margin-block: 5px;
  }

  .story-ready .shelf-row {
    padding-block: 9px;
  }

  .story-ready .folio-spine {
    padding-block: 8px;
  }

  .story-ready .folio-name {
    font-size: 15px;
  }

  .story-ready .shelf-description h3 {
    font-size: clamp(21px, 6.2vw, 26px);
  }

  .story-ready .shelf-description p {
    line-height: 1.4;
  }

  .story-ready .shelf-info {
    gap: 8px;
    padding-top: 8px;
  }

  .story-ready #inside .section-intro {
    margin: 7px 0 12px;
  }

  .story-ready .preview-grid {
    gap: 7px;
  }

  .story-ready .preview-card {
    grid-template-rows: auto auto;
    column-gap: 12px;
    padding-top: 7px;
  }

  .story-ready .preview-name {
    font-size: clamp(20px, 5.8vw, 26px);
    line-height: 1.08;
  }

  .story-ready .mini-stage {
    height: clamp(48px, 11.5cqh, 64px);
  }

  .story-ready .snapshot-body {
    padding-top: 12px;
  }

  .story-ready .stream {
    height: clamp(44px, 10cqh, 60px);
  }

  .story-ready .final-grid {
    gap: 10px;
  }

  .story-ready .final-grid img {
    height: clamp(76px, 22cqh, 122px);
  }
}

@media (max-width: 640px) and (max-height: 650px) {
  .story-ready #book .book-stage:not(.interior, .inspecting) .book-position {
    top: 46%;
    height: min(43cqh, 80cqw);
  }

  .story-ready #book .cover-gallery figcaption {
    bottom: 80px;
  }

  .story-ready #book .edition {
    flex-wrap: wrap;
    row-gap: 0;
  }

  .story-ready #book .stage-count,
  .story-ready #book .drag-label,
  .story-ready #book .open-volume {
    white-space: nowrap;
  }

  .story-ready #book .gallery-controls {
    gap: 5px;
  }
}

@media (max-width: 360px) and (max-height: 650px) {
  .story-store .mast-in,
  .story-store .mast .nav-end {
    gap: 4px;
  }

  .story-store .mast .brand {
    font-size: 18px;
    gap: 6px;
  }

  .story-store .mast .nav-buy {
    padding-inline: 7px;
  }

  .story-ready #book .gallery-offer .buy {
    padding: 10px;
    white-space: nowrap;
  }

  .story-ready #book .gallery-offer .textlink {
    font-size: 12px;
    line-height: 1.25;
  }
}

@media (max-width: 640px) and (max-height: 540px) {
  .story-ready #faq {
    padding-block: 11px;
    row-gap: 14px;
  }

  .story-ready .shelf-scroll {
    --folio-height: clamp(125px, 33cqh, 155px);
  }

  .story-ready .final-grid img {
    height: clamp(58px, 18cqh, 90px);
  }
}

/* On the short 375 × 667 form factor, preserve the standard phone typography
   while letting the folio sit above even the longest workshop summary. */
@media (max-width: 640px) and (min-height: 651px) and (max-height: 680px) {
  .story-ready .shelf-caption {
    position: relative;
    display: block;
  }

  .story-ready .shelf-caption > .textlink {
    position: absolute;
    inset: 0 0 auto auto;
    margin: 0;
  }

  .story-ready .shelf-scroll {
    --folio-height: min(32cqh, 200px);
    margin-block: 6px;
  }

  .story-ready .shelf-row {
    padding-block: 9px;
  }
}
