/* ===============================
   OPEN STORIES — BASE
   =============================== */

.open-story-page {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
  color: #eaeaea;
  font-family: Georgia, "Times New Roman", serif;
}

/* Story cover */
.story-cover {
  max-width: 52ch;
  margin: 0 auto 3rem;
  text-align: center;
}

.story-cover h1 {
  font-size: 2.6rem;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.story-cover .byline {
  font-style: italic;
  opacity: 0.9;
}

/* Frontispiece image */
.open-story-image {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 2rem auto 0;
  border-radius: 4px;
}

/* Frontispiece video (used instead of cover image when present) */
.open-story-video {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 2rem auto 0;

  border-radius: 4px;
  aspect-ratio: 16 / 9; /* teaser, not book */
  object-fit: cover;

  filter: saturate(0.9) contrast(0.95);
  pointer-events: none;
}


/* Story text */
.story-text {
  max-width: 68ch;
  margin: 0 auto;
}

.story-text p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.35rem;
}

/* Part headings */
.story-text .story-part {
  margin: 4rem 0 2rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
  border-top: 1px solid rgba(255,255,255,0.18);
  padding-top: 2rem;
}

/* Reader controls */
.reading-controls {
  text-align: right;
  margin: 1.5rem 0 1rem;
  position: relative;
  z-index: 50;
}

.reading-controls button {
  background: none;
  border: 1px solid #444;
  color: #ccc;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}

.reading-controls button:hover {
  border-color: #777;
}

@media print {
  header.site-header,
  .reading-controls,
  .page-arrows,
  .page-zones,
  .reader-elsewhere {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .open-story-page {
    padding: 0;
    max-width: 100%;
  }
}
@media print {

  /* Kill all site chrome */
  header.site-header,
  footer.site-footer,
  .reading-controls,
  .page-arrows,
  .page-zones,
  .reader-elsewhere,
  .story-cover,
  .open-story-image {
    display: none !important;
  }

  /* Remove backgrounds everywhere */
  html,
  body,
  .open-story-page {
    background: #ffffff !important;
    color: #000000 !important;
  }

  /* Constrain print to story text only */
  .open-story-page {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  .story-text {
    max-width: 6.5in; /* readable book width */
    margin: 0 auto;
  }

  /* Typography for print */
  .story-text p {
    font-size: 11.5pt;
    line-height: 1.6;
    margin-bottom: 0.8em;
    color: #000 !important;
  }

  .story-text h2,
  .story-text .chapter-heading {
    page-break-before: always;
    margin-top: 0;
  }

  /* Prevent awkward splits */
  p {
    orphans: 3;
    widows: 3;
  }
}
/* ===============================
   READING MODE — LIGHT / BOOK
   =============================== */

.open-story-page.reading-mode {
  background-color: #fdfdf9;
  color: #1a1a1a;
}

/* Constrain reading column */
.open-story-page.reading-mode .story-text {
  max-width: 38rem;
  margin: 4rem auto 6rem;
  padding: 0 1.5rem;
}

/* Title */
.open-story-page.reading-mode .story-cover h1 {
  font-size: 2.8rem;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 0.8rem;
  color: #111;
}

/* Byline */
.open-story-page.reading-mode .story-cover .byline {
  text-align: center;
  font-style: italic;
  color: #555;
  margin-bottom: 3.5rem;
  font-size: 1.1rem;
  opacity: 1;
}

/* Chapter headings */
.open-story-page.reading-mode .chapter-heading {
  font-size: 1.6rem;
  margin: 3.5rem 0 1.5rem;
  text-align: center;
  letter-spacing: 0.05em;
  color: #333;
  border: none;
  padding: 0;
}

/* Paragraphs */
.open-story-page.reading-mode .story-body p {
  margin-bottom: 1.6em;
  line-height: 1.78;
  font-size: 1.125rem;
  text-align: justify;
  hyphens: auto;
  color: #1a1a1a;
}

/* Drop cap */
.open-story-page.reading-mode
  .chapter-heading + p::first-letter {
  float: left;
  font-size: 3.8em;
  line-height: 0.75;
  margin: 0.08em 0.12em 0 0;
  font-weight: bold;
  color: #111;
}

/* Scene breaks (manual *** or * * *) */
.open-story-page.reading-mode .scene-break {
  text-align: center;
  margin: 4rem 0;
  color: #888;
  font-size: 1.5rem;
  letter-spacing: 0.6em;
}

/* Mobile tuning */
@media (max-width: 768px) {
  .open-story-page.reading-mode .story-text {
    margin: 2rem auto 4rem;
    padding: 0 1rem;
  }

  .open-story-page.reading-mode .story-body p {
    font-size: 1.05rem;
  }

  .open-story-page.reading-mode .story-cover h1 {
    font-size: 2.2rem;
  }
}
/* ===============================
   READING MODE — PART HEADINGS
   =============================== */

.open-story-page.reading-mode .story-part {
  color: #333;
  font-size: 1.6rem;
  margin: 4rem 0 2rem;
  text-align: center;
  letter-spacing: 0.05em;
  border: none;
  padding: 0;
}
.continue-reading {
  text-align: center;
  margin: 4rem 0 2rem;
}

.continue-button {
  display: inline-block;
  padding: 0.9rem 1.9rem;
  margin-top: 2.25rem;

  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;

  color: #f3f0eb;                 /* warm paper white */
  background: rgba(0,0,0,0.45);   /* dark plate */

  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 2px;

  text-decoration: none;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

.continue-button:hover {
  background: rgba(0,0,0,0.65);
  border-color: rgba(255,255,255,0.6);
  transform: translateY(-1px);
}

.continue-button:active {
  transform: translateY(0);
}


.continue-note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #d8d3c9; /* warm, readable, not bright */
}
.open-story-video {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 2rem auto 0;

  border-radius: 4px;
  aspect-ratio: 2 / 3;
  object-fit: cover;

  /* Keep it restrained */
  filter: saturate(0.9) contrast(0.95);
}
.open-story-video {
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .open-story-video {
    display: none;
  }
  .open-story-image {
    display: block;
  }
}
/* =========================================
   Open Stories — Elsewhere Block (Canonical)
   ========================================= */

.reader-elsewhere {
  margin: 6rem auto 0;
  text-align: center;
  max-width: 42ch;
}

/* Title line — treated as content by Reader Mode */
.reader-elsewhere-title {
  font-size: 0.95rem;
  font-weight: 600;       /* CRITICAL */
  line-height: 1.4;
  margin: 0;
  color: currentColor;
}

/* Link container */
.reader-elsewhere-link {
  margin-top: 1rem;
}

/* Link itself */
.reader-elsewhere-link a {
  font-size: 0.9rem;
  font-weight: 500;       /* CRITICAL */
  text-decoration: underline;
  color: currentColor;
}

/* Hover (normal mode only) */
.reader-elsewhere-link a:hover {
  opacity: 0.85;
}

/* Dark mode tuning */
@media (prefers-color-scheme: dark) {
  .reader-elsewhere-title,
  .reader-elsewhere-link a {
    opacity: 0.95;
  }
}
.open-story-page.reading-mode .reader-elsewhere-title,
.open-story-page.reading-mode .reader-elsewhere-link a {
  color: #1a1a1a;
  opacity: 1;
}
.open-stories-search {
  max-width: 420px;
  margin: 1.5rem auto 2.5rem;
  text-align: center;
}

.open-stories-search input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: #eee;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  outline: none;
}

.open-stories-search input::placeholder {
  color: rgba(255,255,255,0.55);
}

.open-stories-search input:focus {
  border-color: rgba(255,255,255,0.55);
}
.open-story-item {
  display: none;
}

.open-story-item.page-visible {
  display: block;
}
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  border-color: rgba(255,255,255,0.5);
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
/* Epilogue cover (artifact, not frontispiece) */
.story-epilogue {
  margin: 4rem auto 3rem;
  text-align: center;
}

.story-epilogue-note {
  font-size: 0.9rem;
  opacity: 0.75;
  margin-bottom: 1.25rem;
}

.story-epilogue-cover {
  display: block;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  border-radius: 2px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
/* Reading mode — optically center the teaser */
.open-story-page.reading-mode .story-teaser video {
  max-width: 100%;
  opacity: 0.75;
}

.open-story-page.reading-mode .story-teaser video {
  position: relative;
  left: -0.75rem;   /* pull it back toward true center */
}

