@page {
  size: 210mm 210mm;
  margin: 0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  background: #fff;
  color: #2d3436;
}

.page {
  width: 210mm;
  height: 210mm;
  page-break-after: always;
  overflow: hidden;
  position: relative;
  background: #fffdf8;
}

.page:last-child {
  page-break-after: auto;
}

/* Cover */
.page-cover {
  background: linear-gradient(180deg, #e8f4fd 0%, #fff9e6 100%);
}

.page-cover .cover-image {
  width: 100%;
  height: 72%;
  object-fit: cover;
  display: block;
}

.page-cover .cover-text {
  height: 28%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8mm;
  background: linear-gradient(180deg, #fff9e6 0%, #ffeaa7 100%);
}

.page-cover .series-name {
  font-size: 11pt;
  color: #6c5ce7;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 2mm;
}

.page-cover h1 {
  font-size: 26pt;
  color: #e17055;
  line-height: 1.1;
}

.page-cover .book-number {
  font-size: 12pt;
  color: #636e72;
  margin-top: 3mm;
}

/* Title page */
.page-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20mm;
  background: linear-gradient(135deg, #dfe6e9 0%, #ffeaa7 50%, #fab1a0 100%);
}

.page-title h1 {
  font-size: 32pt;
  color: #d63031;
  margin-bottom: 8mm;
}

.page-title .subtitle {
  font-size: 14pt;
  color: #2d3436;
  max-width: 140mm;
  line-height: 1.5;
}

.page-title .characters {
  margin-top: 12mm;
  font-size: 12pt;
  color: #636e72;
}

/* Story spread */
.page-story {
  display: grid;
  grid-template-rows: 58% 42%;
}

.page-story .story-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-story .story-text {
  padding: 8mm 12mm;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fffdf8;
  border-top: 3px solid #ffeaa7;
}

.page-story .story-text p {
  font-size: 15pt;
  line-height: 1.55;
  margin-bottom: 3mm;
}

.page-story .story-text p:last-child {
  margin-bottom: 0;
}

.page-story .colour-label {
  display: inline-block;
  font-size: 13pt;
  font-weight: bold;
  color: #fff;
  padding: 1mm 4mm;
  border-radius: 4mm;
  margin-bottom: 4mm;
}

.colour-red { background: #d63031; }
.colour-orange { background: #e17055; }
.colour-yellow { background: #fdcb6e; color: #2d3436; }
.colour-green { background: #00b894; }
.colour-blue { background: #0984e3; }
.colour-purple { background: #6c5ce7; }

/* Song page */
.page-song {
  display: grid;
  grid-template-rows: 40% 60%;
  background: linear-gradient(180deg, #e8f4fd 0%, #fff9e6 100%);
}

.page-song .song-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-song .song-content {
  padding: 8mm 12mm;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-song h2 {
  font-size: 20pt;
  color: #6c5ce7;
  margin-bottom: 4mm;
  text-align: center;
}

.page-song .sing-note {
  font-size: 10pt;
  color: #636e72;
  text-align: center;
  font-style: italic;
  margin-bottom: 5mm;
}

.page-song .lyrics {
  font-size: 13pt;
  line-height: 1.6;
  text-align: center;
}

.page-song .lyrics p {
  margin-bottom: 2mm;
}

.page-song .chorus {
  font-weight: bold;
  color: #e17055;
  margin-top: 4mm;
}

/* Continued page */
.page-continued {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18mm;
  background: linear-gradient(180deg, #a29bfe 0%, #ffeaa7 100%);
}

.page-continued h2 {
  font-size: 24pt;
  color: #2d3436;
  margin-bottom: 8mm;
}

.page-continued p {
  font-size: 14pt;
  line-height: 1.6;
  max-width: 150mm;
  margin-bottom: 5mm;
}

.page-continued .bookshop-list {
  font-size: 13pt;
  color: #2d3436;
  background: rgba(255, 255, 255, 0.7);
  padding: 6mm 10mm;
  border-radius: 6mm;
  margin-top: 6mm;
}

.page-continued .series-footer {
  margin-top: 10mm;
  font-size: 11pt;
  color: #636e72;
}

@media screen {
  body {
    padding: 20px;
    background: #f0f0f0;
  }

  .page {
    margin: 0 auto 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
  }
}

@media print {
  body {
    background: #fff;
    padding: 0;
  }

  .page {
    margin: 0;
    box-shadow: none;
    border-radius: 0;
  }
}
