/* LANGKAH KUDA — SERIAL UI-R3 | READABILITY & SOFT MOTION
   Additive enhancement after serial-editorial-r1.css and serial-editorial-r2.css.
   Intentionally scoped to a single shared serial detail template.
   Original DB descriptions and chapter content remain unchanged.
*/
.serial-detail-page.lk-serial-editorial-r3 {
  --ser-r3-accent: #9d342f;
  --ser-r3-ink: #332620;
  --ser-r3-body: #594338;
  --ser-r3-rule: rgba(157, 52, 47, .32);
  --ser-r3-focus: #bd7a33;
  min-width: 0;
}

/* Serial: retain R1 hero but make its descriptive prose easier to scan. */
.serial-detail-page.lk-serial-editorial-r3 .serial-detail-description {
  max-width: none;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
  overflow-wrap: break-word;
  word-break: normal;
}
.serial-detail-page.lk-serial-editorial-r3 .serial-detail-description > p {
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
  overflow-wrap: break-word;
  word-break: normal;
}

/* PART — use available width, not an artificial 75ch column. */
.serial-detail-page.lk-serial-editorial-r3 .serial-public-volume-head {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: clamp(15px, 2.2vw, 25px);
  padding: clamp(25px, 3.2vw, 44px);
}
.serial-detail-page.lk-serial-editorial-r3 .serial-public-volume-head > div:last-child {
  min-width: 0;
  max-width: none;
  width: 100%;
}
.serial-detail-page.lk-serial-editorial-r3 .serial-public-volume-head h3 {
  display: table;
  max-width: 100%;
  padding-bottom: .14em;
  background-image: linear-gradient(var(--ser-r3-rule), var(--ser-r3-rule));
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: min(80px, 35%) 2px;
  overflow-wrap: break-word;
  word-break: normal;
}
/* The subtitle is italic; textual chapter links below carry subtle underlining. */
.serial-detail-page.lk-serial-editorial-r3 .serial-public-volume-head > div:last-child > p {
  max-width: none;
  font-style: italic;
  line-height: 1.67;
}
.serial-detail-page.lk-serial-editorial-r3 .serial-volume-description {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin-top: clamp(20px, 2.5vw, 30px);
  padding-left: clamp(15px, 2vw, 23px);
  border-left: 2px solid var(--ser-r3-rule);
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
  overflow-wrap: break-word;
  word-break: normal;
}
.serial-detail-page.lk-serial-editorial-r3 .serial-volume-description > p {
  max-width: none;
  margin: 0 0 1.15em;
  font-size: clamp(1.06rem, 1.35vw, 1.22rem);
  line-height: 1.85;
  color: var(--ser-r3-body);
  font-weight: 400;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
  overflow-wrap: break-word;
  word-break: normal;
}
.serial-detail-page.lk-serial-editorial-r3 .serial-volume-description > p:first-child::first-line {
  font-weight: 650;
  color: var(--ser-r3-ink);
}
.serial-detail-page.lk-serial-editorial-r3 .serial-volume-description > p:last-child { margin-bottom: 0; }

/* CHAPTER — consistent reading rhythm and unmistakable clickable titles. */
.serial-detail-page.lk-serial-editorial-r3 .serial-chapter-excerpt {
  max-width: none;
  width: 100%;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}
.serial-detail-page.lk-serial-editorial-r3 .serial-chapter-excerpt > p {
  color: var(--ser-r3-body);
  font-size: clamp(1.05rem, 1.2vw, 1.16rem);
  line-height: 1.84;
  margin-bottom: .98em;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
  overflow-wrap: break-word;
  word-break: normal;
}
.serial-detail-page.lk-serial-editorial-r3 .serial-public-chapter-copy h5 a {
  text-decoration-line: underline;
  text-decoration-color: rgba(157, 52, 47, .37);
  text-decoration-thickness: 1px;
  text-underline-offset: .17em;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}
.serial-detail-page.lk-serial-editorial-r3 .serial-public-chapter-copy h5 a:hover,
.serial-detail-page.lk-serial-editorial-r3 .serial-public-chapter-copy h5 a:focus-visible {
  text-decoration-color: currentColor;
}
.serial-detail-page.lk-serial-editorial-r3 .serial-public-section-label strong {
  font-weight: 750;
}

/* Subtle entry transitions (never loop). Content stays visible without JS. */
@keyframes lkSerialR3Enter {
  from { opacity: .65; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.serial-detail-page.lk-serial-editorial-r3 .serial-detail-hero,
.serial-detail-page.lk-serial-editorial-r3 .serial-public-volume {
  animation: lkSerialR3Enter 500ms cubic-bezier(.21,.61,.35,1) both;
}
.serial-detail-page.lk-serial-editorial-r3 .serial-public-volume:nth-child(2) { animation-delay: 90ms; }
.serial-detail-page.lk-serial-editorial-r3 .serial-public-volume:nth-child(3) { animation-delay: 140ms; }
.serial-detail-page.lk-serial-editorial-r3 .serial-public-chapters li {
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .serial-detail-page.lk-serial-editorial-r3 .serial-public-chapters li:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(54, 30, 25, .055);
  }
  .serial-detail-page.lk-serial-editorial-r3 .serial-volume-roman {
    transition: transform 220ms ease, box-shadow 220ms ease;
  }
  .serial-detail-page.lk-serial-editorial-r3 .serial-public-volume:hover .serial-volume-roman {
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(157,52,47,.08);
  }
}

/* Night theme: same treatment with contrast-aware tokens. */
html[data-theme="malam"] .serial-detail-page.lk-serial-editorial-r3 {
  --ser-r3-accent: #f1a59a;
  --ser-r3-ink: #ffefe0;
  --ser-r3-body: #ead7c5;
  --ser-r3-rule: rgba(241, 165, 154, .46);
}
html[data-theme="malam"] .serial-detail-page.lk-serial-editorial-r3 .serial-public-chapter-copy h5 a {
  text-decoration-color: rgba(241,165,154,.5);
}

@media (max-width: 760px) {
  .serial-detail-page.lk-serial-editorial-r3 .serial-public-volume-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
    padding: 25px 23px 30px;
  }
  .serial-detail-page.lk-serial-editorial-r3 .serial-volume-description { width: 100%; }
}
@media (max-width: 480px) {
  .serial-detail-page.lk-serial-editorial-r3 .serial-public-volume-head { padding: 23px 18px 28px; }
  .serial-detail-page.lk-serial-editorial-r3 .serial-volume-description {
    padding-left: 12px;
  }
  .serial-detail-page.lk-serial-editorial-r3 .serial-volume-description > p {
    font-size: 1.055rem;
    line-height: 1.82;
  }
  .serial-detail-page.lk-serial-editorial-r3 .serial-chapter-excerpt > p {
    font-size: 1.04rem;
    line-height: 1.78;
  }
}
@media (prefers-reduced-motion: reduce) {
  .serial-detail-page.lk-serial-editorial-r3 .serial-detail-hero,
  .serial-detail-page.lk-serial-editorial-r3 .serial-public-volume {
    animation: none !important;
  }
  .serial-detail-page.lk-serial-editorial-r3 .serial-public-chapters li,
  .serial-detail-page.lk-serial-editorial-r3 .serial-public-chapter-copy h5 a,
  .serial-detail-page.lk-serial-editorial-r3 .serial-volume-roman {
    transition: none !important;
    transform: none !important;
  }
}
