.phyto-story-page {
  overflow-x: clip;
}

.phyto-story-page .lore-chapter-layout {
  max-width: 1040px;
}

.phyto-story-page .lore-chapter-article > h1 {
  max-width: none;
  margin-bottom: 16px;
}

.phyto-story-page .article-title-breadcrumb {
  margin: 0 0 16px;
  font: 0.875rem/1.5 Inter, system-ui, sans-serif;
}

.story-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.875rem;
  order: 3;
}

.story-byline span {
  color: var(--ink);
}

.story-byline time {
  padding-inline-start: 16px;
  border-inline-start: 1px solid var(--hairline-bright);
}

.story-hero {
  margin-bottom: 24px;
  box-shadow: none;
}

.story-hero::after {
  inset: 0;
}

.story-hero img {
  max-height: 386px;
  object-position: center 53%;
}

.phyto-story-page .lore-reader-tools {
  margin: 0 0 14px;
  box-shadow: none;
  order: 6;
}

.phyto-story-page .lore-reader-progress-copy {
  align-items: center;
  color: var(--muted);
  font: 0.875rem/1.5 Inter, system-ui, sans-serif;
}

.phyto-story-page .lore-reader-actions button {
  min-height: 42px;
  min-width: 42px;
  font: 0.875rem/1.5 Inter, system-ui, sans-serif;
}

.story-contents {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--hairline);
  order: 7;
}

.story-contents ol {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-contents a,
.story-return a {
  display: inline-block;
  padding: 5px 0;
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.story-contents a:hover,
.story-return a:hover {
  color: var(--cyan);
}

.phyto-story-page .lore-chapter-body {
  width: 100%;
  max-width: none;
}

.phyto-story-page .lore-chapter-body h2 {
  margin: 0 0 22px;
  scroll-margin-top: 172px;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  line-height: 1.6;
  text-transform: none;
  text-wrap: balance;
}

.phyto-story-page .lore-chapter-body p {
  margin-block: 0 1em;
  color: var(--ink);
  font: calc(1.09rem * var(--lore-reading-scale))/1.8 Inter, system-ui, sans-serif;
}

.phyto-story-page .lore-chapter-body section {
  padding-block: 32px;
}

.phyto-story-page .lore-chapter-body section + section {
  border-top: 1px solid var(--hairline);
}

.phyto-story-page .lore-chapter-body section > p:last-child {
  margin-bottom: 0;
}

.story-scene-break {
  width: 44px;
  margin: 28px auto;
  border: 0;
  border-top: 1px solid var(--hairline-bright);
}

.story-return {
  display: flex;
  justify-content: space-between;
  padding-block: 16px 28px;
  border-top: 1px solid var(--hairline);
  order: 9;
}

@media (max-width: 620px) {
  .phyto-story-page .lore-chapter-layout {
    width: calc(100% - 32px);
  }

  .phyto-story-page .article-title-breadcrumb {
    font-size: 0.8125rem;
  }

  .story-hero,
  .story-byline {
    margin-bottom: 18px;
  }

  .phyto-story-page .lore-reader-tools {
    gap: 8px;
    padding: 8px;
  }

  .phyto-story-page .lore-reader-progress-copy {
    flex-wrap: wrap;
    gap: 2px 6px;
  }

  .phyto-story-page .lore-chapter-body section {
    padding-block: 26px;
  }
}

@media (max-width: 360px) {
  .phyto-story-page .lore-reader-progress-copy > span {
    display: none;
  }
}
