/* Andy Stories v8: fluid layout. Loaded after original stylesheet and Mobile v6.
   Deliberately leaves mobile reader internals / desktop PageFlip dimensions untouched. */
:root{--site-gutter:clamp(12px,3.2vw,38px)}
html{min-width:0}
body{min-width:0;width:100%;overflow-x:clip}
header{width:100%;max-width:100%;padding-inline:var(--site-gutter)}
header .brand{min-width:0;overflow-wrap:anywhere}
header .top{min-width:0}
header #language{max-width:min(46vw,190px)}
main{width:100%;max-width:1600px;padding-inline:var(--site-gutter)}
.hero{max-width:min(100%,760px);padding-block:clamp(28px,5vw,72px) clamp(20px,3.5vw,44px)}
.hero h1{font-size:clamp(31px,4.7vw,62px);overflow-wrap:break-word}
.hero>p:last-child{font-size:clamp(15px,1.6vw,18px)}
.sectionTitle{gap:12px;min-width:0}
.books{width:100%;grid-template-columns:repeat(auto-fill,minmax(min(100%,clamp(145px,16vw,190px)),1fr));gap:clamp(12px,2vw,28px);align-items:start}
.bookCard{min-width:0;max-width:230px;width:100%}
.books .bookCard .cover{width:100%;height:auto;aspect-ratio:3/4}
.books .bookCard .cover img{width:100%;height:100%;object-fit:contain}
.readerTop{min-width:0}
.readerTop .bookName{min-width:0;overflow-wrap:anywhere;text-align:center}
.readingStage{width:100%;max-width:100%;min-width:0}
.flipFrame{max-width:100%;min-width:0}
.controls{max-width:100%;min-width:0}
footer{width:100%;max-width:100%;overflow-wrap:anywhere}
@media (min-width:701px) and (max-width:1100px){
  .hero{padding-top:clamp(32px,5vw,52px)}
  .readerTop .bookName{font-size:clamp(17px,2.2vw,23px)}
  .readingStage{padding:clamp(7px,1.7vw,18px);min-height:0}
  .flipFrame{height:clamp(350px,63dvh,650px)}
  .controls{gap:clamp(6px,1vw,14px)}
  .books{grid-template-columns:repeat(auto-fill,minmax(min(100%,160px),1fr))}
}
@media (max-width:700px){
  :root{--site-gutter:clamp(10px,3.3vw,18px)}
  header{gap:8px;row-gap:10px}
  header #language{max-width:min(47vw,158px)}
  .hero{padding-block:clamp(20px,6vw,36px) 20px}
  .books{grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(10px,3vw,16px)}
  .bookCard{max-width:none}
  .readerTop{min-width:0}
  /* Mobile v6 controls, illustrated page, overlays and interactions stay unchanged. */
}
@media (max-width:350px){
  .top{width:100%;justify-content:flex-start}
  header #language{max-width:100%}
  .books{gap:9px}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
