/* ── READER LAYOUT ──────────────────────────────────── */
.reader-main {
  padding: 80px 40px 100px;
  min-height: calc(100vh - 200px);
}

.reader-container {
  max-width: 860px;
  margin: 0 auto;
}

/* ── BROWSE PAGE ─────────────────────────────────────── */
.browse-header {
  margin-bottom: 56px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--cream-dark);
}

.browse-header h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 12px;
}

.browse-sub {
  font-family: var(--font-ui);
  font-size: 16px;
  color: var(--fg-muted);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
}

.story-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--cream-dark);
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.story-card:hover {
  border-color: var(--bronze);
  box-shadow: 0 4px 20px rgba(123, 45, 38, 0.08);
}

.story-cover {
  height: 200px;
  background: var(--bg-alt);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-cover--default {
  background: var(--bg-alt);
}

.story-cover--default span {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 300;
  color: var(--bronze);
  opacity: 0.4;
}

.story-cover--large {
  height: 320px;
}

.story-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.story-genre {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bronze);
}

.story-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  margin: 4px 0;
}

.story-author {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--fg-muted);
}

.story-synopsis {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-top: 8px;
}

.story-meta {
  margin-top: auto;
  padding-top: 12px;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--fg-muted);
  border-top: 1px solid var(--cream-dark);
}

.empty-state {
  text-align: center;
  padding: 80px 0;
  color: var(--fg-muted);
}

/* ── STORY DETAIL ────────────────────────────────────── */
.story-detail {
  padding-bottom: 80px;
}

.story-detail-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--cream-dark);
}

.story-detail-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.story-detail-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 400;
  line-height: 1.15;
}

.story-detail-author {
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--fg-muted);
}

.story-detail-synopsis {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 600px;
}

.story-detail-meta {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--fg-muted);
}

.chapter-list-header {
  margin-bottom: 24px;
}

.chapter-list-header h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
}

.chapter-list-hint {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--fg-muted);
  margin-top: 4px;
}

.chapter-list {
  display: flex;
  flex-direction: column;
}

.chapter-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--cream-dark);
}

.chapter-number {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--fg-muted);
  font-weight: 300;
  text-align: center;
}

.chapter-title {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--fg);
}

.chapter-date {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 2px;
}

.chapter-btn {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, color 0.2s;
}

.chapter-btn--free {
  background: var(--accent);
  color: #fff;
}

.chapter-btn--free:hover {
  background: var(--accent-light);
}

.chapter-btn--locked {
  background: var(--bg-alt);
  color: var(--fg-muted);
  border: 1px solid var(--cream-dark);
  cursor: pointer;
}

.chapter-btn--locked:hover {
  background: var(--cream-dark);
  color: var(--fg);
}

/* ── SUBSCRIBE CTA ───────────────────────────────────── */
.subscribe-cta {
  margin-top: 64px;
  padding: 64px 48px;
  background: var(--fg);
  color: var(--bg);
  text-align: center;
}

.subscribe-cta-inner {
  max-width: 480px;
  margin: 0 auto;
}

.subscribe-cta h3 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  color: var(--bg);
  margin-bottom: 16px;
}

.subscribe-cta p {
  font-size: 16px;
  color: rgba(251,247,242,0.65);
  margin-bottom: 32px;
  line-height: 1.7;
}

/* ── SHARED CTA BUTTON ───────────────────────────────── */
.cta-btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.cta-btn:hover { background: var(--accent-light); }

.cta-btn--large {
  font-size: 16px;
  padding: 16px 36px;
}

/* ── AD OVERLAY ──────────────────────────────────────── */
.ad-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 24, 20, 0.85);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-modal {
  background: var(--bg);
  border: 1px solid var(--cream-dark);
  padding: 48px;
  text-align: center;
  max-width: 380px;
  width: 90%;
}

.ad-modal h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 24px;
}

.ad-timer {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 16px;
}

.ad-message {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 24px;
}

.ad-cancel {
  background: none;
  border: 1px solid var(--cream-dark);
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--fg-muted);
  padding: 8px 20px;
  cursor: pointer;
}

/* ── READING PAGE ────────────────────────────────────── */
.reading-header {
  background: rgba(251, 247, 242, 0.96);
}

.reading-nav {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--fg-muted);
}

.reading-nav a {
  text-decoration: none;
  color: var(--fg-muted);
  transition: color 0.2s;
}

.reading-nav a:hover { color: var(--accent); }

.reading-main {
  padding-top: 48px;
}

.chapter-article {
  max-width: 680px;
  margin: 0 auto;
}

.chapter-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--cream-dark);
}

.chapter-meta-top {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 16px;
}

.chapter-num-label {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 12px;
}

.chapter-title-display {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 24px;
}

.chapter-rule {
  width: 48px;
  height: 1px;
  background: var(--bronze);
  opacity: 0.5;
}

/* Prose content */
.prose {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.85;
  color: var(--fg);
  white-space: pre-wrap;
}

/* Locked content */
.content-blurred {
  filter: blur(6px);
  user-select: none;
  max-height: 200px;
  overflow: hidden;
}

.locked-content {
  margin-top: -40px;
  padding: 40px 0;
}

.locked-gate {
  background: var(--bg-alt);
  border: 1px solid var(--cream-dark);
  padding: 48px;
  text-align: center;
}

.locked-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.locked-gate h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 12px;
}

.locked-gate p {
  font-size: 15px;
  color: var(--fg-muted);
  margin-bottom: 28px;
}

.locked-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.unlock-ad-btn {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 24px;
  background: none;
  border: 1px solid var(--cream-dark);
  color: var(--fg-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.unlock-ad-btn:hover {
  border-color: var(--bronze);
  color: var(--fg);
}

.unlock-success {
  background: var(--bg-alt);
  border: 1px solid var(--cream-dark);
  padding: 12px 20px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--fg-muted);
  text-align: center;
  margin-bottom: 24px;
}

/* Chapter footer navigation */
.chapter-footer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--cream-dark);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.chapter-nav-btn {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--fg-muted);
  text-decoration: none;
  max-width: 45%;
  transition: color 0.2s;
}

.chapter-nav-btn:hover { color: var(--accent); }

/* ── SUBSCRIBE PAGE ──────────────────────────────────── */
.subscribe-page {
  max-width: 640px;
  margin: 0 auto;
}

.subscribe-header {
  text-align: center;
  margin-bottom: 56px;
}

.subscribe-header h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 400;
  margin-bottom: 16px;
}

.subscribe-sub {
  font-size: 18px;
  color: var(--fg-muted);
}

.pricing-card {
  background: var(--bg-alt);
  border: 1px solid var(--cream-dark);
  padding: 56px 48px;
  text-align: center;
  position: relative;
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 16px;
}

.pricing-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 20px;
}

.pricing-price {
  margin-bottom: 28px;
}

.price-amount {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 400;
  color: var(--accent);
}

.price-period {
  font-family: var(--font-ui);
  font-size: 18px;
  color: var(--fg-muted);
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.pricing-features li {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--fg);
}

.pricing-note {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 16px;
}

.subscribe-faq {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--cream-dark);
}

.subscribe-faq h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 32px;
}

.subscribe-faq dl {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.subscribe-faq dt {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 4px;
}

.subscribe-faq dd {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* ── UTILITIES ──────────────────────────────────────── */
.hidden { display: none; }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 768px) {
  .reader-main { padding: 48px 24px 72px; }

  .story-detail-header {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .story-cover--large { height: 200px; }

  .chapter-item {
    grid-template-columns: 36px 1fr auto;
    gap: 12px;
  }

  .subscribe-cta { padding: 48px 28px; }
  .pricing-card { padding: 48px 28px; }

  .chapter-footer {
    flex-direction: column;
    gap: 12px;
  }

  .chapter-nav-btn { max-width: 100%; }
}