@font-face {
  font-family: "Logic Monospace";
  src: url("/public/fonts/logicmonospace-light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Logic Monospace";
  src: url("/public/fonts/logicmonospace-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Logic Monospace";
  src: url("/public/fonts/logicmonospace-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

.story-book,
.story-book *,
.story-book *::before,
.story-book *::after {
  box-sizing: border-box;
}

.story-book {
  --story-paper: #f7efe3;
  --story-paper-2: #fcf8f1;
  --story-ink: #221912;
  --story-muted: rgba(34, 25, 18, 0.68);
  --story-line: rgba(59, 44, 31, 0.14);
  --story-focus: rgba(34, 25, 18, 0.34);
  --story-shadow: 0 28px 70px rgba(34, 25, 18, 0.08);
  --story-title: #000000;
  --story-subtitle: #000000;
  --story-footer: rgba(34, 25, 18, 0.6);
  --story-arrow-muted: rgba(34, 25, 18, 0.42);
  --story-nav-muted: rgba(34, 25, 18, 0.72);
  --story-arrow-hover: rgba(34, 25, 18, 0.72);
  --story-accent: #c72c17;
  --story-v2-border: rgba(59, 44, 31, 0.11);
  --story-v2-shadow: 0 16px 36px rgba(34, 25, 18, 0.05);
  --story-v2-frame-border: rgba(59, 44, 31, 0.08);
  --story-v2-frame-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0)),
    rgba(252, 248, 241, 0.92);
  --story-v2-subtitle: rgba(34, 25, 18, 0.84);
  --story-v2-subtitle-cta: rgba(34, 25, 18, 0.76);
  --story-v2-arrow: rgba(34, 25, 18, 0.48);
  --story-v2-arrow-word: rgba(34, 25, 18, 0.52);
  --story-v2-arrow-word-hover: rgba(34, 25, 18, 0.66);
  --story-v2-arrow-hover: rgba(34, 25, 18, 0.62);
  --story-card-height: 716px;
  --story-image-zone-height: 480px;
  --story-caption-zone-height: 140px;
  --story-nav-zone-height: 60px;
  --story-media-inset: 18px;
  --story-media-radius: 20px;
  --story-image-radius: 10px;
  --story-caption-font-size: 23px;
  --story-caption-line-height: 1.4;
  --story-count-font-size: 12px;
  --story-nav-font-size: 12px;
  --story-arrow-font-size: 16px;

  width: 100%;
  max-width: var(--story-book-max-width, 700px);
  margin: 0 auto;
  padding: 18px;
  height: var(--story-card-height);
  border: 1px solid var(--story-line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, var(--story-paper-2) 0%, var(--story-paper) 100%);
  box-shadow: var(--story-shadow);
  outline: none;
  overflow: hidden;
  font-family: "EB Garamond", Georgia, serif;
  color: var(--story-ink);
  display: flex;
  flex-direction: column;
  container-type: inline-size;
  container-name: story-book;
  position: relative;
}

@media (prefers-color-scheme: dark) {
  .story-book {
    --story-paper: #1E1A16;
    --story-paper-2: #25211D;
    --story-ink: #E6DED4;
    --story-muted: rgba(230, 222, 212, 0.68);
    --story-line: rgba(232, 225, 216, 0.14);
    --story-focus: rgba(255, 107, 112, 0.34);
    --story-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
    --story-title: #F5EFE7;
    --story-subtitle: #ECE4DB;
    --story-footer: rgba(230, 222, 212, 0.62);
    --story-arrow-muted: rgba(230, 222, 212, 0.46);
    --story-nav-muted: rgba(230, 222, 212, 0.72);
    --story-arrow-hover: rgba(230, 222, 212, 0.8);
    --story-accent: #FF6B70;
    --story-v2-border: rgba(232, 225, 216, 0.14);
    --story-v2-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    --story-v2-frame-border: rgba(232, 225, 216, 0.12);
    --story-v2-frame-bg:
      linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
      rgba(36, 31, 27, 0.96);
    --story-v2-subtitle: rgba(230, 222, 212, 0.9);
    --story-v2-subtitle-cta: rgba(230, 222, 212, 0.76);
    --story-v2-arrow: rgba(230, 222, 212, 0.52);
    --story-v2-arrow-word: rgba(230, 222, 212, 0.56);
    --story-v2-arrow-word-hover: rgba(230, 222, 212, 0.82);
    --story-v2-arrow-hover: rgba(230, 222, 212, 0.74);
  }
}

.story-book img {
  display: block;
  max-width: 100%;
}

.story-book button {
  font: inherit;
  color: inherit;
}

.story-book--wide {
  --story-book-max-width: 1120px;
}

.story-book--inline {
  --story-book-max-width: 700px;
}

.story-book--narrow {
  --story-book-max-width: 400px;
}

.story-book__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.story-book__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0;
  position: absolute;
  inset: 18px 18px auto 18px;
  z-index: 2;
  pointer-events: none;
}

.story-book--story-page .story-book__meta {
  justify-content: flex-end;
}

.story-book--top-label-hidden .story-book__meta {
  justify-content: flex-end;
}

.story-book__label {
  margin: 0;
  font-family: "Logic Monospace", monospace;
  font-size: var(--story-count-font-size);
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--story-muted);
}

.story-book__panel {
  display: flex;
  height: calc(var(--story-image-zone-height) + var(--story-caption-zone-height));
  flex: 0 0 auto;
  min-height: 0;
}

.story-book__stage {
  width: 100%;
  margin: 0;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.story-book__sheet {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
}

.story-book__sheet--cover {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  text-align: center;
  flex: 1 1 auto;
  height: 100%;
}

.story-book__sheet--cover-has-media {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: center;
  align-content: stretch;
}

.story-book--hide-cover-text .story-book__sheet--cover-has-media.story-book__sheet--cover-no-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-content: stretch;
}

.story-book--hide-cover-text .story-book__sheet--cover-has-media {
  align-content: start;
}

.story-book__cover-media {
  width: 100%;
  margin: 0;
  height: var(--story-image-zone-height);
  aspect-ratio: auto;
  padding: var(--story-media-inset);
  border-radius: var(--story-media-radius);
  border: 1px solid var(--story-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
    var(--story-paper-2);
  overflow: hidden;
}

.story-book__cover-media picture,
.story-book__cover-media img {
  display: block;
  width: 100%;
  height: 100%;
}

.story-book__cover-media img {
  object-fit: cover;
  object-position: center;
  border-radius: var(--story-image-radius);
}

.story-book__sheet--cover-has-media .story-book__cover-copy {
  padding-top: 0;
}

.story-book--hide-cover-text .story-book__sheet--cover-no-text .story-book__cover-media {
  flex: 0 0 auto;
  min-height: 0;
  align-self: stretch;
}

.story-book--hide-cover-text .story-book__sheet--cover-no-text .story-book__cover-media picture,
.story-book--hide-cover-text .story-book__sheet--cover-no-text .story-book__cover-media img {
  height: 100%;
}

.story-book__cover-copy {
  width: min(100%, 34rem);
  height: var(--story-caption-zone-height);
  flex: 0 0 var(--story-caption-zone-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 clamp(2px, 0.5vw, 6px);
  text-align: center;
  box-sizing: border-box;
}

.story-book--cover-caption-single-line .story-book__cover-copy {
  gap: 0;
}

.story-book--cover-caption-single-line .story-book__subtitle {
  font-size: 20px;
  font-style: italic;
  line-height: 1.25;
}

.story-book--cover-caption-single-line .story-book__title,
.story-book--cover-caption-single-line .story-book__footer {
  display: none;
}

.story-book__cover-spacer {
  height: var(--story-caption-zone-height);
  min-height: var(--story-caption-zone-height);
  width: 100%;
}

.story-book__sheet--story {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.story-book__frame {
  margin: 0;
  height: var(--story-image-zone-height);
  padding: var(--story-media-inset);
  border-radius: var(--story-media-radius);
  border: 1px solid var(--story-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
    var(--story-paper-2);
  overflow: hidden;
}

.story-book__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: var(--story-image-radius);
}

.story-book__title {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 400;
  color: var(--story-title);
  text-wrap: balance;
}

.story-book__subtitle {
  margin: 0;
  max-width: 30rem;
  font-size: 16px;
  line-height: 1.35;
  color: var(--story-subtitle);
  text-wrap: balance;
}

.story-book__footer {
  margin: 1rem 0 0;
  font-family: "Logic Monospace", monospace;
  font-size: 0.7rem;
  line-height: 1.25;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--story-footer);
}

.story-book__sentence {
  margin: 0;
  width: min(78%, 620px);
  margin-inline: 0 auto;
  font-family: "EB Garamond", Georgia, serif !important;
  font-size: var(--story-caption-font-size) !important;
  line-height: var(--story-caption-line-height) !important;
  text-wrap: balance;
  text-align: center !important;
}

.story-book__story-copy {
  height: var(--story-caption-zone-height);
  min-height: var(--story-caption-zone-height);
  flex: 0 0 var(--story-caption-zone-height);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: visible;
  padding: 0 clamp(2px, 0.5vw, 6px) 24px;
}

.story-book__sheet--caption-short .story-book__sentence {
  width: min(88%, 620px);
}

.story-book__sheet--caption-medium .story-book__sentence {
  width: min(88%, 620px);
}

.story-book__sheet--caption-long .story-book__sentence,
.story-book__sheet--caption-too-long .story-book__sentence {
  width: min(88%, 620px);
}

.story-book__nav {
  display: grid;
  grid-template-columns: auto minmax(0, max-content) auto;
  justify-content: center;
  align-items: center;
  gap: clamp(4px, 0.9vw, 10px);
  height: var(--story-nav-zone-height);
  margin-top: 0;
  overflow: hidden;
  white-space: nowrap;
  flex: 0 0 auto;
}

.story-book__nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.story-book__pages {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2px, 0.65vw, 6px);
  white-space: nowrap;
}

.story-book__arrow,
.story-book__page,
.story-book__cover {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--story-ink);
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, opacity 140ms ease;
}

.story-book__arrow {
  width: 44px;
  padding: 0;
  flex: 0 0 auto;
  border-radius: 0;
  box-shadow: none;
  text-decoration: none !important;
}

.story-book__arrow span {
  display: inline-block;
  font-family: var(--font-mono, "Logic Monospace", monospace);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  color: var(--story-arrow-muted);
  transform: translateY(-1px);
  text-decoration: none !important;
}

.story-book__cover,
.story-book__page {
  padding: 0 0.38rem;
  min-width: 2.4rem;
  border-radius: 0;
  font-family: "Logic Monospace", monospace;
  font-size: var(--story-nav-font-size);
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--story-nav-muted);
  box-shadow: none;
  text-decoration: none;
}

.story-book__cover {
  min-width: 3rem;
}

.story-book__arrow:hover,
.story-book__cover:hover,
.story-book__page:hover {
  background: transparent;
}

.story-book__arrow:hover span {
  color: var(--story-arrow-hover);
  text-decoration: none !important;
}

.story-book__arrow:focus-visible,
.story-book__cover:focus-visible,
.story-book__page:focus-visible {
  outline: none;
  color: var(--story-accent);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.19em;
}

.story-book__page--active,
.story-book__page[aria-current="page"],
.story-book__cover[aria-current="page"] {
  color: var(--story-accent);
  background: transparent;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.19em;
}

.story-book__page--active:hover,
.story-book__page[aria-current="page"]:hover,
.story-book__cover[aria-current="page"]:hover {
  background: transparent;
}

.story-book__arrow:disabled {
  opacity: 0.18;
  cursor: not-allowed;
}

.story-book__arrow:disabled:hover {
  background: transparent;
}

.story-book__arrow {
  background-clip: border-box;
}

@media (max-width: 720px) {
  .story-book {
    border-radius: 20px;
  }

  .story-book__title {
    font-size: clamp(2.35rem, 11vw, 3.65rem);
  }

  .story-book__subtitle,
  .story-book__sentence {
    width: 100%;
  }

  .story-book__cover-copy {
    padding: 10px;
  }

  .story-book__cover,
  .story-book__page {
    font-size: 12px;
  }

  .story-book__arrow span {
    font-size: 14px;
  }
}

@container story-book (max-width: 760px) {
  .story-book__sheet--caption-short .story-book__sentence,
  .story-book__sheet--caption-medium .story-book__sentence,
  .story-book__sheet--caption-long .story-book__sentence,
  .story-book__sheet--caption-too-long .story-book__sentence {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
  }

  .story-book__arrow,
  .story-book__cover,
  .story-book__page {
    transition: none;
  }
}

/* V2 approved model */
.story-book--v2 {
  padding: 12px;
  height: 716px;
  border-radius: 18px;
  border-color: var(--story-v2-border);
  box-shadow: var(--story-v2-shadow);
}

.story-book--v2[data-view="cover"] {
  cursor: pointer;
}

.story-book--v2[data-view="story"] .story-book__panel {
  cursor: pointer;
}

.story-book--v2 .story-book__meta {
  inset: 12px 12px auto 12px;
}

.story-book--v2 .story-book__panel {
  height: calc(var(--story-image-zone-height) + var(--story-caption-zone-height));
}

.story-book--v2 .story-book__nav {
  height: var(--story-nav-zone-height);
}

.story-book--v2 .story-book__cover-copy {
  display: flex;
}

.story-book--v2 .story-book__frame,
.story-book--v2 .story-book__cover-media {
  border-color: var(--story-v2-frame-border);
  background: var(--story-v2-frame-bg);
  box-shadow: none;
}

.story-book--v2 .story-book__frame {
  border-radius: 16px;
}

.story-book--v2 .story-book__frame img,
.story-book--v2 .story-book__cover-media img {
  border-radius: 10px;
}

.story-book--v2 .story-book__sheet--story .story-book__sentence {
  font-size: 23px !important;
  line-height: 1.42 !important;
  width: min(78%, 620px);
  max-width: 620px;
  margin-inline: auto;
  align-self: center;
  text-align: center;
}

.story-book--v2 .story-book__sheet--caption-short .story-book__sentence,
.story-book--v2 .story-book__sheet--caption-medium .story-book__sentence,
.story-book--v2 .story-book__sheet--caption-long .story-book__sentence,
.story-book--v2 .story-book__sheet--caption-too-long .story-book__sentence {
  width: min(78%, 620px);
  max-width: 620px;
  margin-inline: auto;
  align-self: center;
  text-align: center;
}

.story-book--v2 .story-book__sheet--cover-has-media.story-book__sheet--cover-no-text {
  justify-content: flex-start;
}

.story-book--v2 .story-book__sheet--cover-no-text .story-book__cover-media {
  height: calc(var(--story-image-zone-height) + var(--story-caption-zone-height));
  padding-bottom: var(--story-media-inset);
}

.story-book--v2 .story-book__sheet--cover-no-text .story-book__cover-media picture,
.story-book--v2 .story-book__sheet--cover-no-text .story-book__cover-media img {
  height: 100%;
}

.story-book--v2 .story-book__cover-copy {
  width: 100%;
  height: var(--story-caption-zone-height);
  flex: 0 0 var(--story-caption-zone-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-align: center;
}

.story-book--v2 .story-book__subtitle {
  margin: 0;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--story-v2-subtitle);
  text-align: center;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.62em;
  white-space: normal;
  cursor: pointer;
  user-select: none;
}

.story-book--v2 .story-book__subtitle--cover-cue {
  animation: none;
}

.story-book--v2 .story-book__subtitle-cta {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--story-v2-subtitle-cta);
  animation: story-book-v2-cover-cta-fade 10.4s ease-in-out 1.5s infinite;
  will-change: opacity;
}

.story-book--v2 .story-book__subtitle-text {
  display: inline-block;
  white-space: nowrap;
}

.story-book--v2 .story-book__arrow {
  position: relative;
  width: 44px;
  min-width: 44px;
  padding: 0;
  font-size: 0;
  line-height: 0;
  color: var(--story-v2-arrow);
}

.story-book--v2 .story-book__arrow--word {
  width: auto;
  min-width: 88px;
  padding: 0 4px;
  gap: 12px;
  color: var(--story-v2-arrow-word);
  white-space: nowrap;
}

.story-book--v2 .story-book__arrow--word span {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 9px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: currentColor;
  text-decoration: none !important;
  transform: none;
}

.story-book--v2 .story-book__arrow--word .story-book__arrow-line {
  display: inline-block;
  width: 50px;
  height: 1px;
  background: currentColor;
  flex: 0 0 auto;
  align-self: center;
  font-size: 0;
  line-height: 0;
}

.story-book--v2 .story-book__arrow--word[data-step="prev"] {
  justify-content: flex-start;
  justify-self: start;
}

.story-book--v2 .story-book__arrow--word[data-step="next"] {
  justify-content: flex-end;
  justify-self: end;
}

.story-book--v2 .story-book__arrow--word:hover {
  color: var(--story-v2-arrow-word-hover);
}

.story-book--v2 .story-book__arrow[aria-disabled="true"],
.story-book--v2 .story-book__arrow:disabled {
  opacity: 0.28;
}

.story-book--v2 .story-book__arrow:hover {
  color: var(--story-v2-arrow-hover);
}

.story-book--v2 .story-book__arrow svg {
  display: block;
  width: 30px;
  height: 12px;
  color: currentColor;
}

.story-book--v2 .story-book__arrow[data-step="prev"] svg {
  transform: scaleX(-1);
  transform-origin: center;
}

.story-book--v2 .story-book__nav {
  gap: clamp(10px, 1.5vw, 18px);
  width: calc(100% - 80px);
  margin-inline: auto;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content) minmax(0, 1fr);
}

.story-book--v2[data-v2-nav-mode="cover"] .story-book__nav {
  width: max-content;
  grid-template-columns: minmax(0, max-content);
  gap: 0;
}

.story-book--v2[data-v2-nav-mode="cover"] .story-book__arrow {
  display: none;
}

.story-book--v2 .story-book__pages {
  gap: clamp(4px, 0.9vw, 10px);
}

.story-book--v2 .story-book__cover,
.story-book--v2 .story-book__page {
  font-size: 14px;
}

.story-book--v2 .story-book__page--active,
.story-book--v2 .story-book__page[aria-current="page"],
.story-book--v2 .story-book__cover[aria-current="page"] {
  color: var(--story-accent);
  text-decoration-thickness: 1px;
}

.story-book--v2.is-nav-stacked[data-view="story"] .story-book__nav {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(0, max-content) minmax(0, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "pages pages pages"
    "prev . next";
  justify-content: stretch;
  align-items: center;
  justify-items: center;
  align-content: center;
  gap: 6px 0;
  height: 60px;
  overflow: visible;
  white-space: normal;
  transform: translateY(-24px);
}

.story-book--v2.is-nav-stacked[data-view="story"] .story-book__nav-center {
  grid-area: pages;
  width: 100%;
}

.story-book--v2.is-nav-stacked[data-view="story"] .story-book__arrow[data-step="prev"] {
  grid-area: prev;
  justify-self: start;
}

.story-book--v2.is-nav-stacked[data-view="story"] .story-book__arrow[data-step="next"] {
  grid-area: next;
  justify-self: end;
}

.story-book--v2.is-nav-stacked[data-view="story"] .story-book__pages {
  justify-content: center;
}

@media (max-width: 720px) {
  .story-book--v2 .story-book__sheet--story .story-book__sentence,
  .story-book--v2 .story-book__sheet--caption-short .story-book__sentence,
  .story-book--v2 .story-book__sheet--caption-medium .story-book__sentence,
  .story-book--v2 .story-book__sheet--caption-long .story-book__sentence,
  .story-book--v2 .story-book__sheet--caption-too-long .story-book__sentence {
    width: min(86%, 520px);
    font-size: 21px !important;
    line-height: 1.4 !important;
  }

  .story-book--v2 .story-book__cover,
  .story-book--v2 .story-book__page {
    font-size: 14px;
  }
}
