/* MENAI_STORY_RESPONSIVE_V8
   The earlier rotateX() applied 3D perspective to the FULL story, often many
   thousands of pixels tall. That magnified the text until it crossed both
   edges of narrow screens. The text is now a safely bounded 2D crawl.
   The moonlit pirate scene, cinematic fades and after-credits remain intact.
*/
.pirate-story-page .crawl-stage {
  perspective: none !important;
  overflow: hidden;
  max-width: 100%;
}
.pirate-story-page .crawl-track {
  box-sizing: border-box;
  left: 50%;
  width: min(720px, calc(100% - 40px));
  max-width: calc(100% - 40px);
  min-width: 0;
  padding: 0 6px 34px;
  transform: translate3d(-50%, var(--crawl-y, 0px), 0) !important;
  transform-origin: center top !important;
  font-size: clamp(20px, 2.2vw, 27px);
  line-height: 1.5;
  letter-spacing: .008em;
  overflow-wrap: anywhere;
  word-break: normal;
}
.pirate-story-page .crawl-track :is(h2,h3,p,li,blockquote,div,strong,em) {
  box-sizing: border-box;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}
.pirate-story-page .crawl-track h2 {
  font-size: clamp(27px, 3.6vw, 42px);
  line-height: 1.2;
}
.pirate-story-page .crawl-track h3 {
  font-size: 1.18em;
}
.pirate-story-page .crawl-track p,
.pirate-story-page .crawl-track li {
  line-height: 1.48;
}
.pirate-story-page .crawl-track .story-opener {
  font-size: 1.08em;
}
/* Move the website audio widget into the story player on this page only. */
.pirate-story-page .crawl-controls .menai-sound-ui {
  position: static !important;
  inset: auto !important;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  margin: 14px auto 0;
  box-shadow: none;
}
.pirate-story-page .crawl-controls { min-width: 0; }
.pirate-story-page .crawl-primary-controls {min-width: 0; flex-wrap: wrap;}
.pirate-story-page .progress-line {min-width: 0;}
.pirate-story-page .progress-line input {min-width: 40px;}
@media (max-width: 640px) {
  .pirate-story-page .tale-shell {padding-left: 9px; padding-right: 9px;}
  .pirate-story-page .crawl-track {
    width: calc(100% - 30px);
    max-width: calc(100% - 30px);
    padding: 0 3px 30px;
    font-size: clamp(17px, 4.65vw, 20px);
    line-height: 1.44;
    letter-spacing: 0;
  }
  .pirate-story-page .crawl-track h2 {font-size: clamp(23px, 6vw, 30px);}
  .pirate-story-page .crawl-track p,
  .pirate-story-page .crawl-track li {line-height: 1.46;}
  .pirate-story-page .crawl-track .story-opener {font-size: 1.04em;}
  .pirate-story-page .crawl-controls {padding: 14px 10px 17px;}
  .pirate-story-page .crawl-primary-controls {gap: 9px;}
  .pirate-story-page .crawl-primary-controls .pill {min-width: 0;}
  .pirate-story-page .speed-control {flex-basis:100%;}
  .pirate-story-page .progress-line {gap:8px;}
}
@media (max-width: 350px) {
  .pirate-story-page .crawl-track {font-size: 16px;}
  .pirate-story-page .crawl-track h2 {font-size: 22px;}
  .pirate-story-page .progress-line label {font-size: 11px;}
}
