/* Scriveno Fixed-Layout EPUB CSS
 * For picture books and illustrated books exported with --fixed-layout flag.
 * Apple Books compatible: requires rendition:layout=pre-paginated in OPF.
 *
 * CSS property: -epub-layout (EPUB3 fixed-layout CSS declaration)
 */

@namespace epub "http://www.idpf.org/2007/ops";

/* Fixed-layout body: each spine item is one pre-paginated page */
body {
  margin: 0;
  padding: 0;
  -epub-layout: pre-paginated;
  overflow: hidden;
}

/* Full-page image: cover and spread images fill the page exactly */
.full-page-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Text overlay: positioned over a spread image */
.text-overlay {
  position: absolute;
  bottom: 10%;
  left: 5%;
  right: 5%;
  font-size: 1.4em;
  line-height: 1.6;
  color: #1a1a1a;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.5em 1em;
  border-radius: 0.25em;
}

/* Spread container: two-page spreads use this wrapper */
.spread {
  display: flex;
  width: 200%;
  height: 100%;
}

.spread-page {
  width: 50%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Typography: large, readable for picture books */
p {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.4em;
  line-height: 1.6;
  text-align: center;
  margin: 0.5em 1em;
}

h1 {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 2em;
  font-weight: bold;
  text-align: center;
  margin: 0.5em 0;
}

h2 {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.6em;
  font-weight: bold;
  text-align: center;
  margin: 0.4em 0;
}
