@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@500;600;700&family=Comic+Neue:wght@400;700&display=swap");

:root {
  --paper: #fdf8ee;
  --paper-shadow: #eadfcf;
  --ink: #171513;
  --red: #c94f42;
  --yellow: #f1c84b;
  --blue: #a9cddd;
  --page-width: min(45vw, 560px);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  height: 100vh;
  height: 100svh;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(23, 21, 19, 0.045) 0.7px, transparent 0.7px),
    linear-gradient(135deg, rgba(201, 79, 66, 0.04), transparent 35%);
  background-size: 7px 7px, 100% 100%;
  font-family: "Comic Neue", "Comic Sans MS", sans-serif;
}

body.viewer-open {
  overflow: hidden;
}

button {
  font: inherit;
}

.story-shell {
  display: flex;
  flex-direction: column;
  width: min(1180px, 100%);
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: clamp(1rem, 3vh, 2rem) 1rem clamp(0.75rem, 2vh, 1.5rem);
}

.site-header {
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--red);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Caveat, cursive;
  font-size: clamp(2.1rem, 5.5vw, 4.1rem);
  line-height: 0.95;
  white-space: nowrap;
}

.header-note {
  margin: 0.6rem 0 1.4rem;
  font-family: Caveat, cursive;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

.book-stage {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  justify-content: center;
  align-items: center;
  perspective: 1800px;
}

.book {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) auto;
  width: calc(var(--page-width) * 2);
  max-width: 100%;
  height: min(100%, 590px);
  min-height: 0;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(23, 21, 19, 0.055) 0.7px, transparent 0.7px);
  background-size: 8px 8px;
  box-shadow: 9px 10px 0 var(--ink);
  transform-style: preserve-3d;
}

.book-cover {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  border: 0;
  padding: 2rem;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(201, 79, 66, 0.38) 0%, rgba(201, 79, 66, 0.08) 42%, rgba(23, 21, 19, 0.58) 100%),
    url("img/cover.webp") center 58% / cover no-repeat;
  cursor: pointer;
  transform-origin: left center;
  transition: filter 180ms ease;
}

.book-cover::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0.9rem;
  border: 2px solid rgba(253, 248, 238, 0.72);
  border-radius: 4px;
  box-shadow: inset 0 0 0 5px rgba(201, 79, 66, 0.25);
  pointer-events: none;
}

.book-cover > span {
  position: relative;
  z-index: 1;
  text-shadow: 2px 2px 0 var(--ink);
}

.book-cover:hover {
  filter: brightness(1.08) saturate(1.04);
}

.book-cover.opening {
  animation: open-cover 680ms cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.book-cover.closing {
  visibility: visible;
  pointer-events: none;
  animation: close-cover 680ms cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes close-cover {
  0% { transform: rotateY(-165deg); }
  100% { transform: rotateY(0); }
}

.book.is-open .book-cover {
  visibility: hidden;
  pointer-events: none;
}

.book.is-open .book-cover.closing {
  visibility: visible;
}

@keyframes open-cover {
  0% { transform: rotateY(0); }
  100% { transform: rotateY(-165deg); }
}

.cover-kicker,
.cover-date,
.cover-hint {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cover-kicker {
  color: var(--yellow);
  font-size: 0.9rem;
}

.cover-title {
  max-width: 8ch;
  color: var(--paper);
  font-family: Caveat, cursive;
  font-size: clamp(3.4rem, 7.5vw, 5.8rem);
  font-weight: 700;
  line-height: 0.8;
  text-align: center;
  text-shadow: 4px 4px 0 var(--ink);
}

.cover-date {
  color: var(--paper);
  font-size: 0.95rem;
}

.cover-heart {
  color: var(--yellow);
  font-size: 3rem;
  line-height: 1;
  text-shadow: 2px 2px 0 var(--ink);
}

.cover-hint {
  margin-top: 1rem;
  color: var(--paper);
  font-size: 0.75rem;
  opacity: 0.85;
}

.cover-version {
  color: var(--paper);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.page {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  overflow-x: hidden;
  overflow: hidden;
  background-color: transparent;
}

.page[hidden] {
  display: none;
}

.page.turning-next {
  z-index: 4;
  transform-origin: left center;
  backface-visibility: hidden;
  animation: turn-next 900ms cubic-bezier(0.48, 0.02, 0.18, 1);
  box-shadow: -18px 0 24px rgba(23, 21, 19, 0.18);
}

.page.turning-previous {
  z-index: 4;
  transform-origin: right center;
  backface-visibility: hidden;
  animation: turn-previous 900ms cubic-bezier(0.48, 0.02, 0.18, 1);
  box-shadow: 18px 0 24px rgba(23, 21, 19, 0.18);
}

@keyframes turn-next {
  0% { transform: rotateY(0) translateZ(0); filter: brightness(1); }
  18% { transform: rotateY(-18deg) translateZ(14px) scaleX(0.99); filter: brightness(0.94); }
  48% { transform: rotateY(-92deg) translateZ(26px) scaleX(0.97); filter: brightness(0.82); }
  78% { transform: rotateY(-158deg) translateZ(12px) scaleX(0.99); filter: brightness(0.94); }
  100% { transform: rotateY(-180deg) translateZ(0); filter: brightness(1); }
}

@keyframes turn-previous {
  0% { transform: rotateY(0) translateZ(0); filter: brightness(1); }
  18% { transform: rotateY(18deg) translateZ(14px) scaleX(0.99); filter: brightness(0.94); }
  48% { transform: rotateY(92deg) translateZ(26px) scaleX(0.97); filter: brightness(0.82); }
  78% { transform: rotateY(158deg) translateZ(12px) scaleX(0.99); filter: brightness(0.94); }
  100% { transform: rotateY(180deg) translateZ(0); filter: brightness(1); }
}

.heart-particle,
.star-particle,
.icon-particle {
  position: fixed;
  z-index: 80;
  pointer-events: none;
  text-shadow: 1px 1px 0 rgba(253, 248, 238, 0.7);
  animation: particle-burst 2800ms cubic-bezier(0.16, 0.61, 0.32, 1) forwards;
  will-change: transform, opacity;
}

.star-particle {
  color: var(--particle-color);
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1.4px var(--particle-color);
  text-shadow: none;
}

.icon-particle {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  filter: drop-shadow(1px 2px 1px rgba(23, 21, 19, 0.2));
}

.icon-particle img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes particle-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35) rotate(0deg);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--particle-x)), calc(-50% + var(--particle-y))) scale(var(--particle-scale)) rotate(var(--particle-rotate));
  }
}

.page-content {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  animation: reveal-content 560ms ease both;
}

.to-be-continued {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.to-be-continued::before {
  content: "\2665";
  margin-bottom: 0.35rem;
  color: var(--red);
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 1;
  text-shadow: 3px 3px 0 var(--yellow);
}

.to-be-continued .page-date {
  margin-bottom: 0.65rem;
}

.to-be-continued .page-title {
  max-width: none;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  line-height: 1;
}

.to-be-continued .page-text {
  max-width: 24ch;
  margin-top: 1rem;
  text-align: center;
}

@keyframes reveal-content {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-date {
  margin: 0 0 0.65rem;
  color: var(--red);
  font-weight: 700;
}

.page-title {
  max-width: 100%;
  margin: 0;
  font-family: Caveat, cursive;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  line-height: 0.95;
}

.page-text {
  max-width: 34ch;
  margin: 0.75rem 0 0;
  font-size: clamp(1rem, 1.25vw, 1.1rem);
  line-height: 1.4;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.countdown {
  margin-top: 0.75rem;
  padding: 0.5rem;
  border: 2px solid var(--red);
  border-radius: 6px;
  background: rgba(241, 200, 75, 0.18);
  text-align: center;
}

.countdown-label,
.countdown-value,
.countdown-target {
  margin: 0;
}

.countdown-label {
  color: var(--red);
  font-weight: 700;
  text-transform: uppercase;
}

.countdown-value {
  margin-top: 0.2rem;
  font-family: Caveat, cursive;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1;
}

.countdown-target {
  margin-top: 0.3rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.image-placeholder {
  width: 100%;
  margin-top: auto;
  padding-top: 1.2rem;
  border-top: 2px dashed rgba(23, 21, 19, 0.25);
}

.page-photo {
  width: min(72%, 210px);
  height: clamp(90px, 14vh, 140px);
  margin: 0.45rem auto 0.5rem;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-1deg);
}

.page-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 42%;
  cursor: zoom-in;
}

.page-video {
  width: min(100%, 420px);
  margin: 0.55rem auto 0.7rem;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

.video-chapter {
  justify-content: flex-start;
}

.video-chapter .image-placeholder {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  flex-direction: column;
  margin-top: 0.65rem;
  padding-top: 0.5rem;
}

.video-chapter .page-video {
  position: relative;
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  flex-direction: column;
  width: 100%;
  margin: 0 auto 0.25rem;
}

.page-video video {
  display: block;
  width: 100%;
  max-height: min(42vh, 360px);
  background: var(--ink);
}

.video-chapter .page-video video {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.video-fullscreen-button {
  position: absolute;
  z-index: 2;
  top: 0.5rem;
  right: 0.5rem;
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.video-fullscreen-button:focus-visible {
  outline: 3px solid var(--paper);
  outline-offset: 3px;
}

.video-fullscreen-status {
  position: absolute;
  z-index: 3;
  right: 0.5rem;
  bottom: 0.5rem;
  left: 0.5rem;
  margin: 0;
  border-radius: 4px;
  padding: 0.45rem 0.6rem;
  color: var(--ink);
  background: var(--paper);
  font-size: 0.85rem;
  text-align: center;
}

.page-video:fullscreen,
.page-video:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}

.page-video:fullscreen video,
.page-video:-webkit-full-screen video,
.page-video video:fullscreen,
.page-video video:-webkit-full-screen {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #000;
}

.favorite-photos {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.favorite-photos-button {
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.6rem 1rem;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  font: 700 1rem/1.2 "Comic Neue", sans-serif;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.favorite-photos-button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.favorite-photos-button:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.favorite-photos-gallery {
  width: 100%;
}

.favorite-photos-gallery[hidden] {
  display: none;
}

.favorite-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.6rem;
  max-height: min(38vh, 300px);
  overflow: auto;
  padding: 0.25rem 0.35rem 0.5rem;
}

.favorite-photo {
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
}

.favorite-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.favorite-photos-empty {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
}

.page-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: clamp(95px, 15vh, 125px);
  gap: 0.6rem;
  width: 100%;
  margin-top: 0.55rem;
}

.gallery-photo {
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  margin: 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-1deg);
}

.gallery-photo:nth-child(2) {
  transform: rotate(1deg);
}

.gallery-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  cursor: zoom-in;
}

.image-viewer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(23, 21, 19, 0.88);
  backdrop-filter: blur(5px);
}

.image-viewer[hidden] {
  display: none;
}

.image-viewer img {
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  object-fit: contain;
  border: 3px solid var(--paper);
  border-radius: 6px;
  background: var(--ink);
  box-shadow: 9px 9px 0 rgba(253, 248, 238, 0.18);
  animation: viewer-reveal 220ms ease both;
}

.image-viewer-close {
  position: fixed;
  z-index: 101;
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

@keyframes viewer-reveal {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.book-navigation {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  grid-column: 1 / -1;
  height: 3rem;
  margin: 0 1rem 1rem;
}

.corner-button {
  display: grid;
  flex: 0 0 3rem;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.corner-button:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.chapter-jump {
  flex: 1 1 17rem;
  width: 17rem;
  max-width: 17rem;
  min-width: 0;
  height: 3rem;
}

.chapter-jump select {
  width: 100%;
  height: 100%;
  min-width: 0;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  font: 700 0.85rem/1.2 "Comic Neue", sans-serif;
  cursor: pointer;
}

.chapter-jump select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.chapter-jump select:focus-visible {
  outline: 3px solid var(--paper);
  outline-offset: 3px;
}

.corner-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.password-gate {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(23, 21, 19, 0.72);
  backdrop-filter: blur(4px);
}

.password-gate[hidden] {
  display: none;
}

.password-card {
  width: min(100%, 390px);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 7px 7px 0 var(--ink);
}

.password-card h2 {
  margin: 0;
  font-family: Caveat, cursive;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 0.95;
}

.password-card label {
  display: block;
  margin-top: 1.25rem;
  font-weight: 700;
}

.password-card input {
  width: 100%;
  margin-top: 0.5rem;
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 0.65rem 0.75rem;
  color: var(--ink);
  background: #fffdf8;
  font-size: 1.2rem;
  letter-spacing: 0.2em;
}

.password-card input:focus {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.password-error {
  min-height: 1.4em;
  margin: 0.5rem 0 0;
  color: var(--red);
  font-weight: 700;
}

.password-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.password-actions button {
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 0.55rem 0.8rem;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.password-cancel {
  background: var(--paper-shadow);
}

.password-submit {
  background: var(--yellow);
}

@media (max-width: 680px) {
  :root { --page-width: 100%; }

  body {
    min-width: 0;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
  }

  .story-shell {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0.45rem 0.5rem 0.65rem;
  }

  .eyebrow {
    margin-bottom: 0.15rem;
  }

  h1 {
    font-size: clamp(1.55rem, 8.5vw, 2.55rem);
  }

  .header-note {
    margin: 0.25rem 0 0.4rem;
  }

  .book-stage {
    width: 100%;
  }

  .book {
    width: 100%;
    height: 100%;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    box-shadow: 6px 7px 0 var(--ink);
  }

  .book-cover {
    justify-content: space-evenly;
    gap: 0.45rem;
    padding: 1.5rem;
    background-position: center 58%;
  }

  .book-cover::after {
    inset: 0.55rem;
  }

  .cover-kicker {
    font-size: 0.72rem;
  }

  .cover-title {
    font-size: clamp(2.75rem, 15vw, 4.2rem);
    line-height: 0.82;
  }

  .cover-date {
    font-size: 0.78rem;
  }

  .cover-heart {
    font-size: 2.35rem;
  }

  .cover-hint {
    margin-top: 0.35rem;
    font-size: 0.68rem;
  }

  .cover-version {
    font-size: 0.62rem;
  }

  .page {
    flex-basis: 100%;
    border: 0;
    justify-content: flex-start;
    padding: 0.8rem 0.9rem 0.65rem;
    overflow: hidden;
  }

  .page-content {
    min-height: 100%;
    justify-content: center;
  }

  .page-date {
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
  }

  .page-title {
    max-width: 100%;
    font-size: clamp(1.65rem, 6.6vw, 2.15rem);
    line-height: 0.92;
  }

  .page-text {
    max-width: none;
    width: 100%;
    margin-top: 0.5rem;
    font-size: clamp(1rem, 4vw, 1.08rem);
    line-height: 1.4;
  }

  .image-placeholder {
    margin-top: 0.65rem;
    padding-top: 0.45rem;
  }

  .page-photo {
    width: min(86%, 280px);
    height: clamp(90px, 17svh, 145px);
    margin: 0.35rem auto 0.45rem;
  }

  .page-video {
    width: min(100%, 320px);
    margin: 0.35rem auto 0.45rem;
  }

  .page-video video {
    max-height: 22svh;
  }

  .countdown {
    margin-top: 0.55rem;
    padding: 0.5rem;
  }

  .page-gallery {
    gap: 0.35rem;
    height: clamp(90px, 17svh, 145px);
    margin-top: 0.35rem;
  }

  .book-navigation {
    gap: 0.45rem;
    height: 2.65rem;
    margin: 0 0.55rem 0.55rem;
  }

  .corner-button {
    flex-basis: 2.65rem;
    width: 2.65rem;
    height: 2.65rem;
  }

  .chapter-jump {
    height: 2.65rem;
  }

  .chapter-jump select {
    padding: 0.35rem 0.55rem;
    font-size: 0.8rem;
  }

}

@media (max-width: 680px) and (max-height: 700px) {
  .story-shell {
    padding-top: 0.25rem;
    padding-bottom: 0.4rem;
  }

  .eyebrow {
    font-size: 0.72rem;
  }

  h1 {
    font-size: clamp(1.4rem, 7vw, 2rem);
  }

  .header-note {
    margin: 0.1rem 0 0.25rem;
    font-size: 1.1rem;
  }

  .page {
    padding: 0.55rem 0.75rem 0.45rem;
  }

  .page-title {
    font-size: clamp(1.4rem, 5.5vw, 1.75rem);
  }

  .page-text {
    margin-top: 0.35rem;
    font-size: 0.9rem;
    line-height: 1.24;
  }

  .page-photo {
    height: clamp(64px, 12svh, 88px);
  }

  .image-placeholder {
    padding-top: 0.3rem;
  }

  .page-gallery {
    height: clamp(64px, 12svh, 88px);
  }

  .page-video video {
    max-height: 17svh;
  }

}

@media (prefers-reduced-motion: reduce) {
  .page.turning-next,
  .page.turning-previous {
    animation-duration: 180ms;
  }

  .heart-particle,
  .star-particle,
  .icon-particle {
    animation-duration: 300ms;
  }
}
