/* Scoped to the stacked Soroban on narrow portrait phones. */
@media (max-width: 480px) and (orientation: portrait) {
  .brand-hero .hero-experience {
    gap: 16px;
  }

  .brand-hero .hero-experience .hero-art {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 12px;
    width: 100%;
    height: auto;
    margin: 0;
    transform: none;
  }

  .brand-hero .hero-art :is(.top-label, .number-card, .art-caption) {
    position: relative;
    inset: auto;
    margin: 0;
    max-width: 100%;
    transform: none;
  }

  .brand-hero .hero-art .top-label {
    justify-self: start;
    animation: none;
  }

  .brand-hero .hero-art .interactive-stage {
    width: 96%;
    height: auto;
    aspect-ratio: 2372 / 1219;
    transform: none;
  }

  .brand-hero .hero-art .number-card {
    justify-content: center;
    flex-wrap: wrap;
  }

  .brand-hero .hero-art .art-caption {
    text-align: center;
  }
}

/* Reserve a real content-free lane for the red chapter's travelling character.
   The lane exists only when animation is mounted on a narrow portrait phone. */
@media (max-width: 480px) and (orientation: portrait) and (prefers-reduced-motion: no-preference) {
  .ids-superhero-pose:is([data-order="22"], [data-order="23"], [data-order="24"], [data-order="25"], [data-order="26"], [data-order="27"], [data-order="28"]) {
    width: 32vw;
    max-width: 32vw !important;
    object-fit: contain;
  }
  body:has(.ids-superhero-actor) #about-soroban .soroban-editorial > :is(.soroban-intro-row, .soroban-benefits, .soroban-history, .soroban-endnote),
  body:has(.ids-superhero-actor) #about-soroban .soroban-title-block > :is(.soroban-roman, .soroban-tagline, .soroban-scroll-cue) {
    box-sizing: border-box;
    width: 64%;
    max-width: 64%;
    margin-left: 0;
    margin-right: auto;
  }
  body:has(.ids-superhero-actor) #about-soroban .soroban-roman {
    margin-top: 18vw;
  }
  body:has(.ids-superhero-actor) #about-soroban .soroban-title-block {
    margin-bottom: 24px;
  }
  body:has(.ids-superhero-actor) #about-soroban .soroban-tagline {
    font-size: clamp(18px, 4.6vw, 22px);
  }
  body:has(.ids-superhero-actor) #about-soroban .soroban-benefit-detail summary {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px 12px;
  }
  body:has(.ids-superhero-actor) #about-soroban .soroban-benefit-detail .soroban-glyph {
    grid-row: auto;
    margin-bottom: 12px;
  }
  body:has(.ids-superhero-actor) #about-soroban .soroban-benefit-detail .soroban-expand {
    top: 17px;
    right: 12px;
    translate: none;
  }
  body:has(.ids-superhero-actor) #about-soroban .soroban-endnote {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  body:has(.ids-superhero-actor) #about-soroban .soroban-endnote > * {
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
  }
}
