/* Story reading pages: layout polish for the core stories (/<lang>/stories/<id>/) and the series episodes
   (Panchatantra, Ramayana, Vedas). Linked by tools/storypolish.js. Layout only: no story text or feature changes. */

/* ---- core stories ---- */
/* the last page of the story has no divider under it (the card edge closes it) */
html.rang .rg main > article.story > section:last-child, main > article.story > section:last-child { border-bottom: 0; }
/* "More stories": every card in a row is the same height, even when one title wraps to an extra line */
main > ul.grid > li { display: flex; }
main > ul.grid > li > a { flex: 1 1 auto; min-width: 0; }
/* desktop and tablet: the story column sits centred under the full-width hero card instead of hugging its left edge */
@media (min-width: 900px) {
  main > article.story:not(.ot-story) { margin-left: auto; margin-right: auto; }
}

/* ---- series episodes ---- */
/* the shared white story background showed through the gaps and rounded corners of the dark page cards */
html.rang body.ott article.story.ot-story, body.ott article.story.ot-story { background: transparent; box-shadow: none; border: 0; }
/* desktop: the cover image is 2px wider than its frame; keep it inside so the character film covers it exactly */
body.ott .ot-ep-art > img { box-sizing: border-box; max-width: 100%; }

/* phones: the swipe viewer keeps the picture the same size on every page (it used to grow and shrink with the
   length of each page's text), and the text starts at the same line under it */
@media (max-width: 760px) {
  body.ott .ot-story .ot-pages li .pp-artw { flex: 0 1 54%; }
  body.ott .ot-story .ot-pages li .pp-tx { flex: 1 1 auto; align-content: start; }
}
