/* ================================================================
   LANGKAH KUDA | SERIAL UI-R2 | EDITORIAL PART & CHAPTER POLISH
   Adds to (does not replace) serial-editorial-r1.css.
   Scope: only /serial/<slug>/ pages with lk-serial-editorial-r2.
   Uses the existing database content, permissions and reading progress.
   ================================================================ */
.serial-detail-page.lk-serial-editorial-r2 {
  --ser-r2-paper: #fffdfa;
  --ser-r2-ink: #30231f;
  --ser-r2-copy: #62483c;
  --ser-r2-soft: #796154;
  --ser-r2-line: rgba(97, 60, 45, .16);
  --ser-r2-accent: #9d342f;
  --ser-r2-tint: #faf3eb;
  --ser-r2-chapter: #fffaf4;
  min-width: 0;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-public-volume {
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--ser-r2-line);
  border-top: 3px solid var(--ser-r2-accent);
  border-radius: 21px;
  background: var(--ser-r2-paper);
  box-shadow: 0 17px 46px rgba(65, 37, 24, .075);
}
/* Part's number is a discreet marker, not the visual focus. */
.serial-detail-page.lk-serial-editorial-r2 .serial-public-volume-head {
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr);
  align-items: start;
  gap: clamp(18px, 2.8vw, 30px);
  padding: clamp(27px, 4vw, 50px);
  border-bottom: 1px solid var(--ser-r2-line);
  background: linear-gradient(135deg, #fbf5ec, var(--ser-r2-paper) 74%);
}
.serial-detail-page.lk-serial-editorial-r2 .serial-volume-roman {
  display: grid;
  place-items: center;
  width: 53px;
  height: 53px;
  min-width: 0;
  border: 1px solid rgba(157, 52, 47, .22);
  border-radius: 13px;
  background: rgba(157, 52, 47, .09);
  color: var(--ser-r2-accent);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-public-volume-head > div:last-child {
  min-width: 0;
  max-width: 100%;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-public-volume-head > div:last-child > span {
  display: block;
  margin: 2px 0 10px;
  color: var(--ser-r2-accent);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .09em;
  line-height: 1.35;
  text-transform: uppercase;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-public-volume-head h3 {
  margin: 0 0 11px;
  color: var(--ser-r2-ink);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2.1rem, 3.65vw, 3.25rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-public-volume-head > div:last-child > p {
  max-width: 66ch;
  margin: 0;
  color: var(--ser-r2-soft);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.07rem, 1.3vw, 1.24rem);
  font-style: italic;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
/* Preserve database paragraph boundaries. Do not clamp, collapse or justify. */
.serial-detail-page.lk-serial-editorial-r2 .serial-volume-description {
  max-width: 75ch;
  min-width: 0;
  margin-top: clamp(20px, 2.5vw, 29px);
  padding-left: clamp(14px, 2vw, 22px);
  border-left: 2px solid rgba(157, 52, 47, .35);
  color: var(--ser-r2-copy);
  overflow-wrap: anywhere;
  text-align: left;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-volume-description > p {
  margin: 0 0 1.05em;
  color: inherit;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.06rem, 1.3vw, 1.16rem);
  font-style: normal;
  font-weight: 400;
  line-height: 1.87;
  letter-spacing: 0;
  text-align: left;
  overflow-wrap: anywhere;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-volume-description > p:last-child {
  margin-bottom: 0;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-public-parts {
  padding: clamp(15px, 2.8vw, 30px);
  background: var(--ser-r2-paper);
}
.serial-detail-page.lk-serial-editorial-r2 .serial-public-part {
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid var(--ser-r2-line);
  border-radius: 17px;
  background: var(--ser-r2-chapter);
}
.serial-detail-page.lk-serial-editorial-r2 .serial-public-part:last-child { margin-bottom: 0; }
.serial-detail-page.lk-serial-editorial-r2 .serial-public-section-label {
  margin: 0;
  padding: 14px clamp(17px, 2.7vw, 27px);
  border-bottom: 1px solid var(--ser-r2-line);
  background: var(--ser-r2-tint);
  color: var(--ser-r2-soft);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: .88rem;
  line-height: 1.55;
  letter-spacing: 0;
  text-transform: none;
  overflow-wrap: anywhere;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-public-section-label strong {
  color: var(--ser-r2-ink);
  font-weight: 700;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-public-chapters {
  min-width: 0;
  margin: 0;
  padding: 0;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-public-chapters li {
  display: grid;
  grid-template-columns: minmax(82px, 100px) minmax(0, 1fr) 42px;
  align-items: start;
  column-gap: clamp(16px, 2.5vw, 28px);
  row-gap: 12px;
  padding: clamp(20px, 2.7vw, 31px);
  border-bottom: 1px solid var(--ser-r2-line);
  background: transparent;
  min-width: 0;
  transition: background-color 180ms ease;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-public-chapters li:last-child { border-bottom: 0; }
.serial-detail-page.lk-serial-editorial-r2 .serial-public-chapters li:hover { background: rgba(157,52,47,.035); }
.serial-detail-page.lk-serial-editorial-r2 .serial-public-chapter-number {
  width: fit-content;
  max-width: 100%;
  margin: 3px 0 0;
  padding: 8px 12px;
  border: 1px solid rgba(157, 52, 47, .18);
  border-radius: 9px;
  background: rgba(157, 52, 47, .07);
  color: var(--ser-r2-accent);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.05rem, 1.4vw, 1.28rem);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-public-chapter-copy {
  min-width: 0;
  max-width: 100%;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-chapter-meta {
  display: block;
  color: var(--ser-r2-soft);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: .77rem;
  font-weight: 650;
  line-height: 1.6;
  letter-spacing: .012em;
  text-transform: none;
  overflow-wrap: anywhere;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-public-chapter-copy h5 {
  margin: 9px 0 12px;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.32rem, 2vw, 1.72rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-public-chapter-copy h5 a {
  color: var(--ser-r2-ink);
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-public-chapter-copy h5 a:hover,
.serial-detail-page.lk-serial-editorial-r2 .serial-public-chapter-copy h5 a:focus-visible {
  color: var(--ser-r2-accent);
  text-decoration: underline;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-chapter-excerpt {
  max-width: 76ch;
  margin: 0 0 13px;
  color: var(--ser-r2-copy);
  overflow-wrap: anywhere;
  text-align: left;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-chapter-excerpt > p {
  margin: 0 0 .75em;
  color: inherit;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.03rem, 1.2vw, 1.13rem);
  font-weight: 400;
  line-height: 1.79;
  text-align: left;
  overflow-wrap: anywhere;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-chapter-excerpt > p:last-child { margin-bottom: 0; }
.serial-detail-page.lk-serial-editorial-r2 .serial-public-chapter-copy small {
  display: block;
  margin-top: 12px;
  color: var(--ser-r2-soft);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: .76rem;
  line-height: 1.6;
  letter-spacing: 0;
  text-transform: none;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-chapter-open {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(157, 52, 47, .3);
  border-radius: 12px;
  background: var(--ser-r2-paper);
  color: var(--ser-r2-accent);
  font-size: 1.18rem;
  transition: background-color 180ms ease, color 180ms ease;
}
.serial-detail-page.lk-serial-editorial-r2 .serial-chapter-open:hover {
  background: var(--ser-r2-accent);
  color: #fff;
}
.serial-detail-page.lk-serial-editorial-r2 a:focus-visible {
  outline: 3px solid #ce9654;
  outline-offset: 3px;
}
/* Night theme: make typography and surface contrast explicit. */
html[data-theme="malam"] .serial-detail-page.lk-serial-editorial-r2 {
  --ser-r2-paper: #24201f;
  --ser-r2-ink: #f8ecdf;
  --ser-r2-copy: #ead7c5;
  --ser-r2-soft: #d6bfb0;
  --ser-r2-line: rgba(255, 236, 216, .18);
  --ser-r2-accent: #f1a59a;
  --ser-r2-tint: #322923;
  --ser-r2-chapter: #292322;
}
html[data-theme="malam"] .serial-detail-page.lk-serial-editorial-r2 .serial-public-volume-head {
  background: linear-gradient(135deg, #302721, var(--ser-r2-paper));
}
@media (max-width: 980px) {
  .serial-detail-page.lk-serial-editorial-r2 .serial-public-volume-head { padding: 30px; }
  .serial-detail-page.lk-serial-editorial-r2 .serial-public-parts { padding: 19px; }
}
@media (max-width: 760px) {
  .serial-detail-page.lk-serial-editorial-r2 .serial-public-volume-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
    padding: 25px 23px 30px;
  }
  .serial-detail-page.lk-serial-editorial-r2 .serial-volume-roman {
    width: 43px; height: 43px; border-radius: 11px; font-size: 1.32rem;
  }
  .serial-detail-page.lk-serial-editorial-r2 .serial-public-volume-head h3 { font-size: clamp(2.05rem, 6.5vw, 2.8rem); }
  .serial-detail-page.lk-serial-editorial-r2 .serial-public-parts { padding: 15px; }
  .serial-detail-page.lk-serial-editorial-r2 .serial-public-chapters li {
    grid-template-columns: minmax(76px, 85px) minmax(0, 1fr) 42px;
    gap: 14px;
    padding: 19px;
  }
}
@media (max-width: 600px) {
  .serial-detail-page.lk-serial-editorial-r2 .serial-public-chapters li {
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 10px;
    padding: 20px 17px;
  }
  .serial-detail-page.lk-serial-editorial-r2 .serial-public-chapter-number {
    grid-column: 1 / -1;
    grid-row: 1;
    font-size: 1.11rem;
  }
  .serial-detail-page.lk-serial-editorial-r2 .serial-public-chapter-copy {
    grid-column: 1;
    grid-row: 2;
  }
  .serial-detail-page.lk-serial-editorial-r2 .serial-chapter-open {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }
}
@media (max-width: 480px) {
  .serial-detail-page.lk-serial-editorial-r2 .serial-public-volume { border-radius: 17px; }
  .serial-detail-page.lk-serial-editorial-r2 .serial-public-volume-head { padding: 23px 18px 26px; }
  .serial-detail-page.lk-serial-editorial-r2 .serial-public-volume-head > div:last-child > p { font-size: 1.08rem; }
  .serial-detail-page.lk-serial-editorial-r2 .serial-volume-description {
    padding-left: 13px;
    margin-top: 18px;
  }
  .serial-detail-page.lk-serial-editorial-r2 .serial-volume-description > p { font-size: 1.05rem; line-height: 1.82; }
  .serial-detail-page.lk-serial-editorial-r2 .serial-public-parts { padding: 10px; }
  .serial-detail-page.lk-serial-editorial-r2 .serial-public-chapter-copy h5 { font-size: 1.32rem; }
  .serial-detail-page.lk-serial-editorial-r2 .serial-chapter-excerpt > p { font-size: 1.03rem; }
  .serial-detail-page.lk-serial-editorial-r2 .serial-public-section-label { padding: 13px 16px; }
}
@media (max-width: 340px) {
  .serial-detail-page.lk-serial-editorial-r2 .serial-public-volume-head { padding: 20px 15px 24px; }
  .serial-detail-page.lk-serial-editorial-r2 .serial-public-chapters li { padding: 16px 13px; }
  .serial-detail-page.lk-serial-editorial-r2 .serial-volume-description > p { font-size: 1.02rem; }
}
@media (prefers-reduced-motion: reduce) {
  .serial-detail-page.lk-serial-editorial-r2 .serial-public-chapters li,
  .serial-detail-page.lk-serial-editorial-r2 .serial-chapter-open {
    transition: none;
  }
}
