/* Text layout and character scale for the seven-scene journey. */
.hero-copy,
.chapter-copy,
.arrange-copy {
  min-width: 0;
}

.chapter-copy > .scene-story:not(.sr-only) {
  max-width: 44ch;
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* FAQ grows naturally when opened; no fixed height or text truncation. */
.faq-list summary {
  align-items: baseline;
}
.faq-list summary span {
  flex: 0 0 auto;
}

@media (max-width: 800px) {
  .chapter-copy > .scene-story:not(.sr-only) {
    max-width: 48ch;
    line-height: 1.5;
  }
}

/* Video cells share a fixed stage, so enlarging a short clip cannot stretch the room. */
@media (min-width: 801px) {
  .steam .sprite-holder {
    transform: translateX(16px);
  }

  .steam .sprite-holder img,
  .steam .sprite-holder canvas {
    transform: scale(1.7);
    transform-origin: 50% 96%;
  }

  .leaf .sprite-holder img,
  .leaf .sprite-holder canvas {
    transform: scale(1.15);
    transform-origin: 50% 96%;
  }

  .kvass .sprite-holder img,
  .kvass .sprite-holder canvas {
    transform: scale(1.15);
    transform-origin: 50% 96%;
  }

  .brooms .sprite-holder img,
  .brooms .sprite-holder canvas {
    transform: scale(1.75);
    transform-origin: 50% 96%;
  }

  .arrange-inner {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center;
    min-height: calc(100dvh - var(--header-height) - 4px);
    padding-top: 48px;
    padding-bottom: 44px;
  }

  .arrange h2 {
    font-size: clamp(26px, 2.4vw, 34px);
    line-height: 1.45;
    margin-bottom: 20px;
  }

  .arrange-copy > p:not(.arrange-lead) {
    line-height: 1.55;
    margin-bottom: 20px;
  }

  .final-character {
    align-items: center;
    align-self: center;
  }
}

/* Further questions are a separate block below the invitation. */
.faq-section {
  background: #1c3025;
  border-top: 1px solid #edbc6538;
}

.faq-inner {
  padding-top: 46px;
  padding-bottom: 46px;
}

.faq-section .faq-list {
  max-width: 800px;
  margin: 0;
}

@media (min-width: 801px) and (max-height: 680px) {
  .arrange-inner {
    padding-top: 24px;
    padding-bottom: 24px;
    gap: 36px;
  }

  .arrange h2 {
    font-size: 25px;
    line-height: 1.4;
    margin-bottom: 12px;
  }

  .arrange-lead {
    font-size: 17px;
    line-height: 1.45;
    margin-bottom: 12px;
  }

  .arrange-copy > p:not(.arrange-lead) {
    font-size: 16px;
    line-height: 1.45;
    margin-bottom: 14px;
  }

  .final-sprite {
    width: min(420px, 100%);
  }
}

@media (max-width: 800px) {
  .arrange-inner {
    min-height: calc(100dvh - var(--header-height) - 4px);
  }

  .faq-inner {
    padding-top: 30px;
    padding-bottom: 30px;
  }
}

@media (min-width: 801px) and (max-width: 1100px) and (min-height: 621px) {
  .steam .chapter-copy,
  .brooms .chapter-copy {
    max-width: 350px;
  }

  .steam .sprite-holder {
    transform: translateX(48px);
  }

  .brooms .sprite-holder img,
  .brooms .sprite-holder canvas {
    transform: translateX(-24px) scale(1.75);
  }
}

@media (min-width: 801px) and (max-width: 900px) and (min-height: 621px) {
  .brooms .chapter-copy {
    max-width: 270px;
  }

  .steam .sprite-holder {
    transform: translateX(8px);
  }

  .kvass .sprite-holder img,
  .kvass .sprite-holder canvas {
    transform: translateX(-16px) scale(1.15);
  }

  .brooms .sprite-holder img,
  .brooms .sprite-holder canvas {
    transform: translateX(-36px) scale(1.65);
  }
}

/* Keep the full enlarged broom arc clear of copy on narrow desktop screens. */
@media (min-width: 801px) and (max-width: 900px) and (min-height: 621px) {
  .leaf .sprite-holder img, .leaf .sprite-holder canvas {
    transform: translateX(12px) scale(1.15);
  }
  .leaf .chapter-copy { padding-left: 24px; }
}


/* Mobile sizes follow the visible people, rather than each clip's empty margins. */
@media (max-width: 800px) {
  .hero-character {
    min-width: 0;
  }

  .hero .welcome-sprite {
    width: calc(var(--welcome-character) * 1.15);
    height: calc(var(--welcome-character) * 1.15);
  }

  .steam .sprite-holder img,
  .steam .sprite-holder canvas {
    transform: scale(1.76);
    transform-origin: 50% 96%;
  }

  .leaf .sprite-holder img,
  .leaf .sprite-holder canvas {
    transform: scale(1.188);
    transform-origin: 50% 96%;
  }

  .brooms {
    --ritual-character: calc(clamp(300px, 122vw, 512px) * 1.1);
  }

  .brooms .sprite-holder {
    height: calc(var(--ritual-character) * .65);
  }

  .brooms .sprite-holder img,
  .brooms .sprite-holder canvas {
    inset: auto 0 0;
    width: var(--ritual-character);
    height: var(--ritual-character);
  }
}


/* The short landscape layout has a smaller side column for the two guests. */
@media (max-width: 800px) and (min-width: 501px) and (max-height: 620px) {
  .brooms {
    --ritual-character: calc(clamp(288px, calc(100svh - 70px), 384px) * 1.1);
  }
}


/* Reserve only the visible scene height on short portrait phones. */
@media (max-width: 500px) and (max-height: 700px) and (orientation: portrait) {
  .brooms .sprite-holder {
    height: calc(var(--ritual-character) * .495);
  }

  .brooms .room-inner {
    padding-top: 14px;
    gap: 16px;
  }

  .brooms .chapter-copy h2 {
    margin-bottom: 8px;
  }

  .brooms .chapter-copy > .scene-story:not(.sr-only) {
    line-height: 1.4;
    margin-bottom: 14px;
  }
}

/* Keep the full two-broom animation in view on short 320px phones. */
@media (max-width: 360px) and (max-height: 620px) and (orientation: portrait) {
  .brooms .sprite-holder { transform: translateY(-10px); }
}
