/* Talevara Story Detail — reader decision and navigation surface */
.story-page {
  background:
    radial-gradient(circle at 82% 8%, rgba(239, 193, 166, .14), transparent 28rem),
    linear-gradient(180deg, #fffaf6 0%, #fffdfb 55%, #fffaf6 100%);
}

.story-page .primary-nav a[aria-current="page"] { color: var(--coral-dark); }
.story-page .primary-nav a[aria-current="page"]::after { width: 100%; }

.story-page svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.story-hero {
  padding: 38px 0 54px;
}

.back-to-explore {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 30px;
  color: #626865;
  font-size: var(--type-secondary);
  font-weight: 600;
  text-decoration: none;
  transition: color 150ms ease, transform 150ms ease;
}
.back-to-explore svg { width: 18px; height: 18px; }
.back-to-explore:hover { color: var(--coral-dark); transform: translateX(-2px); }

.story-hero-grid {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: clamp(44px, 6vw, 82px);
  align-items: center;
}

.story-cover-column {
  display: flex;
  justify-content: center;
}

.detail-cover {
  position: relative;
  width: min(100%, 290px);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px 27px 24px;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 58% 28%, rgba(255,255,255,.3), transparent 17%),
    radial-gradient(circle at 72% 79%, transparent 0 28%, rgba(255,255,255,.12) 28.3% 28.8%, transparent 29.2% 36%, rgba(255,255,255,.08) 36.3% 36.8%, transparent 37.2%),
    linear-gradient(145deg, var(--cover-a, #c87458), var(--cover-b, #6a4b56));
  box-shadow: 0 28px 70px rgba(70, 45, 34, .18), 0 6px 20px rgba(70,45,34,.08);
}
.detail-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 36%, rgba(17,21,20,.13));
  pointer-events: none;
}
.detail-cover-kicker,
.detail-cover-title,
.detail-cover-mark { position: relative; z-index: 1; }
.detail-cover-kicker {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .88;
}
.detail-cover-title {
  max-width: 90%;
  margin: auto 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: .98;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.detail-cover-mark {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  opacity: .72;
}

.story-hero-copy { max-width: 760px; }
.story-classification {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--coral-dark);
  font-size: var(--type-eyebrow);
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.story-status-inline { color: #52635f; }
.story-hero h1 {
  max-width: 800px;
  margin: 0;
  color: #222827;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 5.4vw, 5.4rem);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: .93;
  text-wrap: balance;
}
.story-byline {
  margin: 14px 0 0;
  color: #656a67;
  font-size: 1rem;
}
.story-byline a { color: #363c3a; font-weight: 600; text-decoration: none; }
.story-byline a:hover { color: var(--coral-dark); }

.rating-summary {
  width: fit-content;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
  color: #5d625f;
  font-size: var(--type-secondary);
  text-decoration: none;
}
.rating-summary .rating-star { color: #b36f30; font-size: 1.1rem; }
.rating-summary strong { color: #303634; font-size: 1rem; }
.rating-divider { color: #b4ada8; }
.rating-summary:hover strong { color: var(--coral-dark); }

.story-genres {
  margin: 18px 0 0;
  color: #515754;
  font-size: var(--type-secondary);
  font-weight: 600;
}
.story-synopsis {
  max-width: 690px;
  margin: 18px 0 0;
  color: #5c625f;
  font-size: 1.05rem;
  line-height: 1.72;
}
.story-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 27px;
}
.story-read-button,
.story-save-button { min-width: 168px; }
.story-follow-button{min-width:154px}.story-follow-button.is-following{border-color:#b65443;background:#fff2ed;color:#954435}.story-follow-button.is-following svg{fill:currentColor}
.story-primary-actions svg { width: 19px; height: 19px; }
.story-save-button.is-saved,
.mobile-save.is-saved {
  color: var(--coral-dark);
  border-color: #ddb7a8;
  background: #fff1ea;
}
.story-save-button.is-saved svg,
.mobile-save.is-saved svg { fill: currentColor; }
.story-quick-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 17px 0 0;
  color: #777c79;
  font-size: var(--type-meta);
}

.story-section-nav {
  position: sticky;
  top: 78px;
  z-index: 20;
  border-top: 1px solid rgba(233,223,216,.75);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 252, 249, .94);
  backdrop-filter: blur(16px);
}
.story-section-nav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.story-section-nav-inner::-webkit-scrollbar { display: none; }
.story-section-nav a {
  position: relative;
  flex: 0 0 auto;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 18px;
  color: #666c69;
  font-size: var(--type-ui);
  font-weight: 600;
  text-decoration: none;
}
.story-section-nav a::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: transparent;
}
.story-section-nav a:hover { color: #333937; }
.story-section-nav a[aria-current="true"] { color: var(--coral-dark); }
.story-section-nav a[aria-current="true"]::after { background: var(--coral); }

.section-story { padding: 72px 0; scroll-margin-top: 145px; }
.story-overview { padding-top: 78px; }
.chapters-section,
.creator-section { border-top: 1px solid var(--line); }
.reviews-section { border-top: 1px solid var(--line); background: rgba(255,255,255,.44); }
.recommendation-section { border-top: 1px solid var(--line); padding-bottom: 94px; }

.story-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, .72fr);
  gap: clamp(46px, 7vw, 92px);
  align-items: start;
}
.story-section-heading .eyebrow,
.creator-card .eyebrow {
  margin: 0 0 7px;
  color: var(--coral-dark);
  font-size: var(--type-eyebrow);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.story-section-heading h2,
.creator-card h2 {
  margin: 0;
  color: #262c2a;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.7rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.025em;
}
.story-long-description {
  max-width: 740px;
  margin: 24px 0 0;
  color: #555c59;
  font-size: 1.03rem;
  line-height: 1.78;
}
.detail-block { margin-top: 42px; }
.detail-block h3,
.reviews-list-heading h3 {
  margin: 0 0 15px;
  color: #333936;
  font-size: 1rem;
  font-weight: 700;
}
.genre-links { display: flex; flex-wrap: wrap; gap: 9px; }
.genre-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #e1d5cd;
  border-radius: 999px;
  color: #555b58;
  background: rgba(255,255,255,.7);
  font-size: var(--type-meta);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}
.genre-links a:hover { color: var(--coral-dark); border-color: #d4afa0; background: #fff; }
.format-feature-card {
  max-width: 740px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid #eadfd8;
  border-radius: 14px;
  background: rgba(255,255,255,.62);
}
.format-feature-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(185,85,61,.12);
  border-radius: 13px;
  color: var(--coral-dark);
  background:
    radial-gradient(circle at 28% 18%, rgba(255,255,255,.85), transparent 42%),
    #fff0e8;
}
.format-feature-icon svg { width: 21px; height: 21px; }
.format-feature-card strong { display: block; color: #343a38; font-size: .93rem; }
.format-feature-card p { margin: 4px 0 0; color: #6e7471; font-size: var(--type-secondary); line-height: 1.55; }

.story-detail-rail { display: grid; gap: 16px; }
.detail-panel {
  padding: 24px;
  border: 1px solid #e5d9d1;
  border-radius: 17px;
  background: rgba(255,255,255,.74);
  box-shadow: 0 14px 35px rgba(72,47,34,.035);
}
.detail-panel h2 {
  margin: 0 0 16px;
  color: #363c39;
  font-size: .96rem;
  font-weight: 700;
}
.story-facts,
.disclosure-list { margin: 0; }
.story-facts > div,
.disclosure-list > div {
  display: grid;
  grid-template-columns: minmax(98px, .8fr) minmax(0, 1.2fr);
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid #eee5df;
}
.story-facts > div:first-child,
.disclosure-list > div:first-child { border-top: 0; padding-top: 0; }
.story-facts > div:last-child,
.disclosure-list > div:last-child { padding-bottom: 0; }
.story-facts dt,
.disclosure-list dt { color: #858987; font-size: var(--type-meta); }
.story-facts dd,
.disclosure-list dd { margin: 0; color: #434946; font-size: var(--type-meta); font-weight: 600; text-align: right; }
.detail-panel-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.detail-panel-title-row h2 { margin: 0; }
.disclosure-status {
  color: #4c6a62;
  font-size: .72rem;
  font-weight: 700;
}
.content-notes-panel p { margin: 0; color: #666c69; font-size: var(--type-secondary); line-height: 1.6; }
.warning-list { display: flex; flex-wrap: wrap; gap: 7px; }
.warning-list span {
  padding: 6px 9px;
  border-radius: 8px;
  color: #664c43;
  background: #faeee7;
  font-size: .76rem;
  font-weight: 600;
}

.story-section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.heading-count { color: #8a8e8b; font-family: var(--font-ui); font-size: .48em; font-weight: 600; vertical-align: middle; }

.chapter-list {
  margin-top: 30px;
  border-top: 1px solid #e5dbd5;
}
.chapter-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 64px;
  border-bottom: 1px solid #eee5df;
}
.chapter-number { color: #9a9d9b; font-size: .76rem; font-variant-numeric: tabular-nums; }
.chapter-link {
  min-width: 0;
  padding: 10px 0;
  color: #363c39;
  font-size: .94rem;
  font-weight: 600;
  text-decoration: none;
}
.chapter-link:hover { color: var(--coral-dark); }
.chapter-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #8a8f8c;
  font-size: .75rem;
}
.chapter-length { min-width: 64px; text-align: right; }
.chapter-more-wrap { display: flex; justify-content: center; margin-top: 28px; }

.reviews-summary-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 580px);
  gap: clamp(40px, 8vw, 95px);
  align-items: center;
  margin-top: 34px;
  padding: 30px;
  border: 1px solid #e6dbd4;
  border-radius: 18px;
  background: rgba(255,255,255,.72);
}
.rating-overview { text-align: center; }
.rating-large { display: flex; align-items: baseline; justify-content: center; gap: 9px; }
.rating-large span { color: #b36f30; font-size: 1.5rem; }
.rating-large strong { color: #272d2b; font-family: var(--font-display); font-size: 4rem; font-weight: 400; line-height: 1; }
.rating-overview p { margin: 8px 0 20px; color: #747a77; font-size: var(--type-meta); }
.rating-bars { display: grid; gap: 9px; }
.rating-bar-row { display: grid; grid-template-columns: 35px minmax(0,1fr) 42px; gap: 10px; align-items: center; color: #747a77; font-size: .77rem; }
.rating-bar-track { height: 7px; overflow: hidden; border-radius: 99px; background: #eee6e0; }
.rating-bar-fill { height: 100%; border-radius: inherit; background: #c7795f; }
.rating-bar-row strong { color: #666c69; font-weight: 600; text-align: right; }

.reviews-list-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: baseline;
  margin-top: 45px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e7ddd6;
}
.reviews-list-heading h3 { margin: 0; }
.reviews-list-heading span { color: #969996; font-size: .75rem; }
.reviews-list { display: grid; }
.review-card {
  display: grid;
  grid-template-columns: 170px minmax(0,1fr);
  gap: 30px;
  padding: 27px 0;
  border-bottom: 1px solid #eee5df;
}
.review-author { color: #454b48; font-size: .86rem; font-weight: 700; }
.review-context { margin-top: 4px; color: #929693; font-size: .74rem; line-height: 1.5; }
.review-stars { color: #b36f30; letter-spacing: .08em; font-size: .82rem; }
.review-body h4 { margin: 7px 0 7px; color: #353b38; font-size: .96rem; }
.review-body p { max-width: 720px; margin: 0; color: #676d6a; font-size: var(--type-secondary); line-height: 1.65; }
.spoiler-review {
  margin-top: 9px;
  padding: 15px 16px;
  border-radius: 10px;
  color: #747976;
  background: #f8f3ef;
  font-size: var(--type-secondary);
}
.spoiler-review button { margin-left: 8px; padding: 0; color: var(--coral-dark); background: transparent; font-weight: 700; cursor: pointer; }

.creator-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 30px 32px;
  border: 1px solid #e5d9d1;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,244,237,.92), rgba(255,255,255,.82));
}
.creator-avatar {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #b96d55, #6f6d66);
  font-family: var(--font-display);
  font-size: 1.6rem;
}
.creator-avatar-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.creator-card h2 { font-size: 2rem; }
.creator-stats { margin: 6px 0 0; color: #6c716f; font-size: var(--type-meta); }
.creator-note { max-width: 650px; margin: 10px 0 0; color: #717673; font-size: var(--type-secondary); line-height: 1.55; }
.creator-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.creator-actions .button { min-height: 42px; padding: 0 16px; }

.recommendation-heading > a {
  color: var(--coral-dark);
  font-size: var(--type-secondary);
  font-weight: 700;
  text-decoration: none;
}
.recommendation-heading > a:hover { text-decoration: underline; }
.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 20px;
  margin-top: 30px;
}
.recommend-card { min-width: 0; }
.recommend-cover-link { display: block; text-decoration: none; }
.recommend-cover {
  aspect-ratio: 2 / 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border-radius: 13px;
  color: #fff;
  background:
    radial-gradient(circle at 62% 27%, rgba(255,255,255,.27), transparent 15%),
    linear-gradient(145deg, var(--cover-a), var(--cover-b));
  box-shadow: 0 13px 28px rgba(62,40,27,.08);
}
.recommend-cover span:first-child { font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.recommend-cover strong { font-family: var(--font-display); font-size: clamp(1.3rem, 2vw, 1.7rem); font-weight: 400; line-height: 1.02; }
.recommend-info { padding: 12px 2px 0; }
.recommend-info a { color: #343a37; font-weight: 700; font-size: .91rem; text-decoration: none; }
.recommend-info a:hover { color: var(--coral-dark); }
.recommend-info p { margin: 4px 0 0; color: #858a87; font-size: .74rem; }

.mobile-story-actions { display: none; }
.story-toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 24px;
  max-width: min(440px, calc(100% - 32px));
  padding: 11px 15px;
  border: 1px solid #ded2ca;
  border-radius: 10px;
  color: #fff;
  background: #313735;
  box-shadow: 0 14px 34px rgba(40,27,20,.18);
  font-size: var(--type-secondary);
  transform: translateX(-50%);
}

@media (max-width: 980px) {
  .story-hero-grid { grid-template-columns: 220px minmax(0,1fr); gap: 38px; }
  .story-content-grid { grid-template-columns: minmax(0,1fr) 300px; gap: 38px; }
  .recommendation-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 780px) {
  .story-hero { padding-top: 28px; }
  .back-to-explore { margin-bottom: 24px; }
  .story-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .story-cover-column { justify-content: flex-start; }
  .detail-cover { width: 190px; border-radius: 14px; padding: 21px 18px 18px; }
  .detail-cover-title { font-size: 1.8rem; }
  .story-hero h1 { font-size: clamp(2.8rem, 12vw, 4.5rem); }
  .story-content-grid { grid-template-columns: 1fr; gap: 46px; }
  .story-detail-rail { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .story-detail-rail .content-notes-panel { grid-column: 1 / -1; }
  .story-section-nav { top: 70px; }
  .section-story { scroll-margin-top: 134px; padding: 58px 0; }
  .reviews-summary-grid { grid-template-columns: 180px 1fr; gap: 34px; padding: 24px; }
  .creator-card { grid-template-columns: 64px minmax(0,1fr); }
  .creator-avatar { width: 64px; height: 64px; }
  .creator-actions { grid-column: 2; justify-content: flex-start; }
  .recommendation-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 560px) {
  .story-page { padding-bottom: 78px; }
  .story-hero { padding-bottom: 40px; }
  .story-cover-column { justify-content: center; }
  .detail-cover { width: min(52vw, 190px); }
  .story-classification { margin-bottom: 8px; }
  .story-hero h1 { font-size: clamp(2.65rem, 14vw, 4rem); }
  .story-primary-actions { display: none; }
  .story-synopsis { font-size: .98rem; line-height: 1.65; }
  .story-section-nav a { min-height: 54px; padding: 0 13px; }
  .story-section-nav a::after { left: 13px; right: 13px; }
  .story-detail-rail { grid-template-columns: 1fr; }
  .story-detail-rail .content-notes-panel { grid-column: auto; }
  .detail-panel { padding: 20px; }
  .story-section-heading-row { align-items: flex-start; flex-direction: column; }
  .chapter-row { grid-template-columns: 42px minmax(0,1fr); gap: 9px; padding: 7px 0; }
  .chapter-meta { grid-column: 2; margin-top: -8px; padding-bottom: 8px; }
  .chapter-length { text-align: left; min-width: 0; }
  .reviews-summary-grid { grid-template-columns: 1fr; gap: 28px; padding: 22px 18px; }
  .rating-overview { text-align: left; }
  .rating-large { justify-content: flex-start; }
  .rating-overview .button { width: 100%; }
  .review-card { grid-template-columns: 1fr; gap: 12px; }
  .reviews-list-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .creator-card { grid-template-columns: 52px minmax(0,1fr); gap: 16px; padding: 22px 20px; }
  .creator-avatar { width: 52px; height: 52px; font-size: 1.2rem; }
  .creator-actions { grid-column: 1 / -1; }
  .creator-actions .button { flex: 1; }
  .recommendation-grid { gap: 14px; }
  .recommend-cover { padding: 14px; }
  .recommend-cover strong { font-size: 1.25rem; }
  .recommendation-heading { align-items: flex-start; }
  .mobile-story-actions {
    position: fixed;
    z-index: 45;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: grid;
    grid-template-columns: minmax(0,1fr) 50px;
    gap: 9px;
    padding: 8px;
    border: 1px solid rgba(221,208,199,.95);
    border-radius: 14px;
    background: rgba(255,252,249,.94);
    box-shadow: 0 14px 34px rgba(54,37,27,.13);
    backdrop-filter: blur(18px);
  }
  .mobile-story-actions .button { min-height: 48px; }
  .mobile-save {
    width: 50px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid #ddd2ca;
    border-radius: 10px;
    color: #545a57;
    background: #fff;
  }
  .mobile-save svg { width: 20px; height: 20px; }
  .story-toast { bottom: 84px; }
}

@media (max-width: 390px) {
  .story-hero h1 { font-size: 2.75rem; }
  .story-quick-meta { gap: 5px; }
  .recommendation-grid { grid-template-columns: 1fr 1fr; }
}

/* v17 Story Detail refinement — denser rhythm, card-based grouping, no page-wide separators */
.story-hero { padding: 32px 0 46px; }
.back-to-explore { margin-bottom: 22px; }
.story-genres { color: #454b48; font-size: .9rem; }
.story-quick-meta { color: #666c69; font-size: .8rem; }

.story-section-nav {
  border: 0;
  background: rgba(255, 252, 249, .96);
  box-shadow: 0 10px 28px rgba(69, 45, 33, .035);
}
.story-section-nav a { min-height: 54px; }

.section-story {
  padding: 54px 0;
  scroll-margin-top: 138px;
}
.story-overview { padding-top: 58px; }
.chapters-section,
.reviews-section,
.creator-section,
.recommendation-section {
  border-top: 0;
  background: transparent;
}
.creator-section { padding-top: 42px; padding-bottom: 42px; }
.recommendation-section { padding-top: 48px; padding-bottom: 78px; }

.story-overview-flow { max-width: 1040px; }
.story-section-heading h2,
.creator-card h2 {
  font-size: clamp(1.85rem, 2.5vw, 2.35rem);
}
.story-long-description {
  max-width: 780px;
  margin-top: 18px;
  font-size: 1rem;
  line-height: 1.7;
}
.detail-block { margin-top: 30px; }
.detail-block h3,
.reviews-list-heading h3 { margin-bottom: 12px; }
.genre-links { gap: 8px; }
.genre-links a { min-height: 34px; padding: 0 11px; }

.format-block { max-width: 780px; }
.format-feature-card {
  max-width: none;
  min-height: 72px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 13px;
}
.format-feature-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border-radius: 12px;
}
.format-feature-icon svg { width: 19px; height: 19px; }
.format-feature-card strong { font-size: .92rem; }
.format-feature-card p { margin-top: 2px; font-size: .8rem; line-height: 1.45; }

.story-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 16px;
  align-items: stretch;
  max-width: 920px;
  margin-top: 30px;
}
.story-meta-side { display: grid; gap: 16px; align-content: start; }
.detail-panel {
  padding: 20px 22px;
  border-radius: 15px;
  box-shadow: none;
}
.detail-panel h2 { margin-bottom: 13px; font-size: .94rem; }
.story-facts,
.disclosure-list { display: grid; gap: 9px; }
.story-facts > div,
.disclosure-list > div {
  grid-template-columns: minmax(110px, .82fr) minmax(0, 1.18fr);
  gap: 16px;
  padding: 0;
  border: 0;
}
.story-facts dt,
.disclosure-list dt { color: #7a807d; font-size: .77rem; }
.story-facts dd,
.disclosure-list dd { color: #3e4542; font-size: .78rem; line-height: 1.45; }
.content-notes-panel { min-height: 0; }
.warning-list { gap: 6px; }
.warning-list span { padding: 5px 8px; }

.story-section-heading-row { align-items: center; }
.heading-count { font-size: .42em; }
.chapter-list {
  max-width: 1000px;
  margin-top: 22px;
  border: 0;
}
.chapter-row {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  min-height: 54px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  transition: background 140ms ease;
}
.chapter-row:hover { background: rgba(255, 247, 242, .72); }
.chapter-number { color: #a0a3a1; font-size: .74rem; }
.chapter-link { padding: 9px 0; font-size: .91rem; }
.chapter-meta {
  gap: 7px;
  color: #777d79;
  font-size: .76rem;
}
.chapter-meta > span + span::before {
  content: "·";
  margin-right: 7px;
  color: #b3aaa4;
}
.chapter-length { min-width: 0; text-align: left; }
.chapter-more-wrap { justify-content: flex-start; margin-top: 18px; }
.chapter-more-wrap .button { min-height: 40px; }

.reviews-section { padding-top: 56px; }
.reviews-summary-grid {
  grid-template-columns: 180px minmax(0, 520px);
  gap: 34px;
  max-width: 780px;
  margin-top: 24px;
  padding: 24px 26px;
  border-radius: 16px;
}
.rating-large { gap: 7px; }
.rating-large span { font-size: 1.3rem; }
.rating-large strong { font-size: 3.45rem; }
.rating-overview p { margin: 6px 0 16px; }
.rating-bars { gap: 8px; }
.rating-bar-row { grid-template-columns: 34px minmax(0,1fr) 36px; gap: 9px; font-size: .76rem; }
.rating-bar-track { height: 9px; }

.reviews-list-heading {
  max-width: 780px;
  margin-top: 32px;
  padding-bottom: 0;
  border: 0;
}
.reviews-list { max-width: 780px; }
.reviews-empty {
  margin-top: 13px;
  padding: 20px 22px;
  border: 1px solid #e7dcd4;
  border-radius: 14px;
  background: rgba(255,255,255,.6);
}
.reviews-empty strong { color: #3d4441; font-size: .92rem; }
.reviews-empty p { margin: 5px 0 0; color: #747a77; font-size: .82rem; line-height: 1.55; }
.review-card { grid-template-columns: 150px minmax(0,1fr); gap: 26px; padding: 23px 0; }
.review-author { font-size: .9rem; }
.review-context { font-size: .76rem; }
.review-body h4 { font-size: 1rem; }

.creator-card {
  grid-template-columns: 60px minmax(0, 1fr) auto;
  gap: 18px;
  max-width: 1040px;
  padding: 22px 24px;
  border-radius: 16px;
}
.creator-avatar { width: 60px; height: 60px; font-size: 1.25rem; }
.creator-card .eyebrow { margin-bottom: 4px; }
.creator-card h2 { font-size: 1.65rem; }
.creator-stats { margin-top: 4px; }
.creator-note { margin-top: 6px; }
.creator-actions { align-items: center; gap: 14px; }
.creator-actions .button { min-height: 40px; padding: 0 15px; }
.creator-profile-link {
  color: var(--coral-dark);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
}
.creator-profile-link:hover { text-decoration: underline; }

.recommendation-grid { margin-top: 22px; gap: 18px; }
.recommend-cover { padding: 16px; border-radius: 12px; }
.recommend-info { padding-top: 10px; }
.recommend-info a { font-size: .94rem; }
.recommend-info p { color: #747a77; font-size: .77rem; }

@media (max-width: 980px) {
  .story-meta-grid { grid-template-columns: 1fr 1fr; max-width: none; }
  .recommendation-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 780px) {
  .story-overview-flow { max-width: none; }
  .story-meta-grid { grid-template-columns: 1fr; }
  .story-meta-side { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .section-story { padding: 46px 0; }
  .story-overview { padding-top: 48px; }
  .reviews-summary-grid { grid-template-columns: 160px minmax(0,1fr); gap: 26px; padding: 22px; }
  .creator-card { grid-template-columns: 54px minmax(0,1fr) auto; }
  .creator-avatar { width: 54px; height: 54px; }
  .creator-actions { grid-column: auto; justify-content: flex-end; }
}

@media (max-width: 560px) {
  .story-hero { padding-bottom: 34px; }
  .story-section-nav a { min-height: 50px; }
  .story-overview { padding-top: 42px; }
  .story-meta-side { grid-template-columns: 1fr; }
  .detail-panel { padding: 18px; }
  .story-facts > div,
  .disclosure-list > div { grid-template-columns: 1fr auto; }
  .story-section-heading-row { align-items: flex-start; }
  .chapter-list { margin-top: 18px; }
  .chapter-row { grid-template-columns: 36px minmax(0,1fr); min-height: 52px; padding: 5px 4px; }
  .chapter-meta { grid-column: 2; margin-top: -9px; padding-bottom: 7px; }
  .chapter-meta > span + span::before { margin-right: 6px; }
  .chapter-more-wrap { justify-content: stretch; }
  .chapter-more-wrap .button { width: 100%; }
  .reviews-summary-grid { grid-template-columns: 1fr; gap: 22px; padding: 20px 18px; }
  .rating-overview { text-align: left; }
  .rating-large { justify-content: flex-start; }
  .creator-card { grid-template-columns: 48px minmax(0,1fr); gap: 14px; padding: 19px 18px; }
  .creator-avatar { width: 48px; height: 48px; }
  .creator-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .creator-actions .button { flex: 0 0 auto; }
  .recommendation-grid { gap: 14px; }
}

/* v17 final recommendation density */
@media (min-width: 781px) and (max-width: 980px) {
  .recommendation-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* v18 Story Detail balance correction — restore one alignment axis and balanced overview rail */
.story-overview-flow { max-width: none; }

.story-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(290px, .72fr);
  gap: clamp(44px, 6vw, 78px);
  align-items: start;
}

.story-overview-main { min-width: 0; }
.story-overview-main .story-long-description,
.story-overview-main .format-block,
.story-overview-main .format-feature-card {
  max-width: none;
}
.story-overview-main .story-long-description { max-width: 760px; }
.story-overview-main .genres-block { max-width: 760px; }
.story-overview-main .format-block { max-width: 760px; }
.story-overview-main .format-feature-card { width: 100%; }

.story-detail-rail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-content: start;
  width: 100%;
  max-width: 340px;
  justify-self: end;
}

.overview-content-notes {
  max-width: 760px;
  margin-top: 16px;
  padding: 16px 18px;
}
.overview-content-notes h2 { margin-bottom: 10px; }

.story-details-panel,
.disclosure-panel { width: 100%; }

/* Keep every primary section on the exact same container axis. */
.story-overview > .container,
.chapters-section > .container,
.reviews-section > .container,
.creator-section > .container,
.recommendation-section > .container {
  max-width: 1228px;
}

/* The rail should feel like a counterweight, not a detached sidebar. */
.story-detail-rail .detail-panel {
  padding: 20px 21px;
  background: rgba(255,255,255,.68);
}
.story-detail-rail .story-facts,
.story-detail-rail .disclosure-list { gap: 10px; }

@media (max-width: 980px) {
  .story-overview-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(270px, .76fr);
    gap: 34px;
  }
  .story-detail-rail { max-width: 310px; }
}

@media (max-width: 780px) {
  .story-overview-layout { grid-template-columns: 1fr; gap: 24px; }
  .story-detail-rail {
    grid-template-columns: repeat(2, minmax(0,1fr));
    max-width: none;
    justify-self: stretch;
  }
  .overview-content-notes { max-width: none; }
}

@media (max-width: 560px) {
  .story-overview-layout { gap: 20px; }
  .story-detail-rail { grid-template-columns: 1fr; gap: 12px; }
  .overview-content-notes { margin-top: 14px; }
}


/* v19 Story Detail width + review cleanup */
.reviews-summary-grid {
  width: 100%;
  max-width: none;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(38px, 5vw, 68px);
}
.rating-bars {
  width: 100%;
  max-width: 720px;
  justify-self: end;
}
.reviews-list-heading,
.reviews-list {
  width: 100%;
  max-width: none;
}
.reviews-empty {
  margin-top: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.creator-card {
  width: 100%;
  max-width: none;
}

@media (max-width: 780px) {
  .reviews-summary-grid {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 26px;
  }
  .rating-bars { max-width: none; }
}

@media (max-width: 560px) {
  .reviews-summary-grid { grid-template-columns: 1fr; }
}

/* v22 managed cover assets */
.detail-cover {
  padding: 0;
  background: #eee8e1;
}
.detail-cover::before { display: none; }
.detail-cover-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.detail-cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  color: #fff;
  background: linear-gradient(145deg,#c87458,#6a4b56);
}
.detail-cover-fallback .detail-cover-title { position: static; margin: 0; }
.recommend-cover {
  padding: 0;
  overflow: hidden;
  background: #eee8e1;
}
.recommend-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.rating-summary.is-unrated .rating-star,.rating-large.is-unrated>span[aria-hidden="true"]{display:none;}

/* Step 14 — account-backed ratings and reviews */
.your-review-region { margin-top: 22px; }
.your-review-card {
  display:flex; align-items:center; justify-content:space-between; gap:24px;
  padding:20px 22px; border:1px solid #e6dbd4; border-radius:15px;
  background:rgba(255,255,255,.68);
}
.your-review-main { display:flex; align-items:flex-start; gap:18px; min-width:0; }
.your-review-main > .review-stars { flex:0 0 auto; margin-top:2px; }
.your-review-label { margin:0 0 4px; color:#3c423f; font-size:.78rem; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.your-review-preview { margin:0; max-width:760px; color:#656b68; font-size:var(--type-secondary); line-height:1.55; overflow-wrap:anywhere; }
.your-review-actions { display:flex; align-items:center; gap:13px; flex:0 0 auto; }
.review-text-action { border:0; padding:5px 2px; background:transparent; color:#7d6257; font:inherit; font-size:.78rem; font-weight:700; cursor:pointer; }
.review-text-action:hover { color:var(--coral-dark); text-decoration:underline; }
.review-delete-action { color:#93675c; }
.reviews-list-heading { align-items:flex-end; }
.reviews-list-heading > div > p { margin:5px 0 0; color:#858a87; font-size:.78rem; line-height:1.45; }
.reviews-sort { display:flex; align-items:center; gap:8px; color:#7e8380; font-size:.76rem; font-weight:700; white-space:nowrap; }
.reviews-sort select { min-height:38px; padding:0 32px 0 11px; border:1px solid #ddd2ca; border-radius:9px; background:#fff; color:#4d5350; font:inherit; }
.review-author-column { display:flex; align-items:flex-start; gap:11px; min-width:0; }
.review-author-avatar { width:38px; height:38px; flex:0 0 38px; display:grid; place-items:center; border-radius:50%; background:#eee2da; color:#765b50; font-size:.72rem; font-weight:800; letter-spacing:.03em; }
.review-author-name { color:#454b48; font-size:.86rem; font-weight:800; text-decoration:none; }
a.review-author-name:hover { color:var(--coral-dark); text-decoration:underline; }
.review-own-badge { display:inline-block; margin-top:7px; padding:3px 7px; border-radius:999px; background:#f2e8e2; color:#805d50; font-size:.64rem; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.review-actions { display:flex; align-items:center; flex-wrap:wrap; gap:14px; margin-top:14px; }
.review-helpful { min-height:34px; padding:0 10px; border:1px solid #ded4cd; border-radius:999px; background:#fff; color:#666d69; font:inherit; font-size:.75rem; font-weight:700; cursor:pointer; }
.review-helpful:hover:not(:disabled), .review-helpful.is-active { border-color:#c8907d; color:#8e5847; background:#fff7f2; }
.review-helpful:disabled, .review-text-action:disabled { opacity:.48; cursor:not-allowed; text-decoration:none; }
.spoiler-review { display:block; }
.spoiler-review > strong { color:#5e625f; font-size:.78rem; }
.spoiler-review [data-review-spoiler-content] { margin-top:12px; padding-top:12px; border-top:1px solid #e7ddd6; }
.reviews-loading { padding:24px 0; color:#858a87; font-size:.82rem; }
.review-more-wrap { display:flex; justify-content:center; padding-top:20px; }
.review-dialog { width:min(640px,calc(100vw - 28px)); max-height:calc(100vh - 32px); padding:0; overflow:auto; border:1px solid #ddd2ca; border-radius:18px; background:#fffdfa; color:#393f3c; box-shadow:0 24px 70px rgba(45,35,30,.22); }
.review-dialog::backdrop { background:rgba(31,28,26,.48); backdrop-filter:blur(2px); }
.review-form { display:grid; gap:18px; padding:25px; }
.review-dialog-head { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; }
.review-dialog-head h2 { margin:2px 0 0; font-family:var(--font-display); font-size:1.8rem; font-weight:500; }
.dialog-close { width:38px; height:38px; display:grid; place-items:center; border:0; border-radius:12px; background:#f3ece7; color:#626763; cursor:pointer; }
.dialog-close svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; }
.dialog-close:hover { background:#eaded7; }
.review-form-help { margin:-4px 0 0; color:#777d79; font-size:.82rem; line-height:1.5; }
.review-star-field { margin:0; padding:0; border:0; }
.review-star-field legend { margin-bottom:8px; color:#555b58; font-size:.78rem; font-weight:800; }
.review-star-picker { display:flex; gap:4px; }
.review-star-picker button { width:42px; height:42px; border:1px solid transparent; border-radius:9px; background:transparent; color:#c7b8ad; font-size:1.7rem; line-height:1; cursor:pointer; }
.review-star-picker button:hover, .review-star-picker button.is-selected, .review-star-picker button[aria-checked="true"] { color:#b36f30; background:#fff4e9; }
.review-field { display:grid; gap:7px; color:#565c59; font-size:.78rem; font-weight:800; }
.review-field small { color:#929693; font-weight:500; }
.review-field input, .review-field textarea, .review-field select { width:100%; border:1px solid #ddd2ca; border-radius:10px; background:#fff; color:#373d3a; font:inherit; font-size:.9rem; }
.review-field input, .review-field select { min-height:42px; padding:0 11px; }
.review-field textarea { min-height:120px; padding:11px; resize:vertical; line-height:1.55; }
.review-character-count { justify-self:end; color:#9b9e9b; font-size:.68rem; font-weight:600; }
.review-form-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:18px; align-items:end; }
.review-spoiler-check { min-height:42px; display:flex; align-items:center; gap:9px; color:#5f6562; font-size:.8rem; font-weight:700; }
.review-spoiler-check input { width:18px; height:18px; }
.review-dialog-actions { display:flex; justify-content:flex-end; gap:10px; padding-top:4px; }
.review-form-status { min-height:1.2em; margin:0; }
.review-form-status.is-error { color:#a14f43; }
.review-report-dialog { width:min(540px,calc(100vw - 28px)); }
.review-signin-card { margin-top:22px; padding:18px 20px; border:1px solid #e6dbd4; border-radius:14px; background:rgba(255,255,255,.62); }
.review-signin-card strong { display:block; color:#444a47; font-size:.9rem; }
.review-signin-card p { margin:5px 0 0; color:#777d79; font-size:.8rem; line-height:1.5; }

@media (max-width:700px) {
  .your-review-card { align-items:flex-start; flex-direction:column; }
  .your-review-actions { width:100%; }
  .review-card { grid-template-columns:1fr; gap:13px; }
  .reviews-list-heading { align-items:flex-start; flex-direction:column; }
  .reviews-sort { width:100%; justify-content:space-between; }
  .reviews-sort select { flex:1; max-width:220px; }
  .review-form-row { grid-template-columns:1fr; gap:12px; }
  .review-dialog-actions { flex-direction:column-reverse; }
  .review-dialog-actions .button { width:100%; }
}

/* Step 28: public sharing stays visually secondary to reading/following. */
.story-share-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.story-share-button:disabled{opacity:.72;cursor:wait}
