/* ═══════════════════════════════════════════════════════════════
   THE PAINTED SKIN
   Built on Ink Line (墨韵).

   The tale turns on one object: a human skin with a face painted on
   it. The demon holds a brush. So this page is ink — warm Xuan paper,
   carbon strokes, and edges that are cut rather than blurred.

   The register is the woodblock print, not the handscroll: square
   corners, hairlines, and a hard offset shadow that reads as a stamp
   pressed onto the sheet. Anything soft would be the wrong book.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Hero ─────────────────────────────────────────────────── */

.pt-title {
  font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
  font-size: clamp(2.4rem, 6.4vw, 4.4rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: .01em;
  margin: .9rem 0 1rem;
  text-wrap: balance;
}

/* the cover, as a plate pinned to the sheet */
.pt-plate {
  display: inline-block;
  padding: .5rem;
  border: 1px solid currentColor;
  background: transparent;
}
.pt-plate img {
  display: block;
  width: clamp(11rem, 15vw, 15rem);
  /* the width/height ATTRIBUTES on <img> are definite, which makes
     the browser ignore aspect-ratio entirely and hand object-fit a
     tall box to crop into. height:auto gives the ratio back. */
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  /* hard, never blurred — the woodblock press, not a drop shadow */
  box-shadow: 8px 8px 0 0 rgba(32, 33, 36, .14);
}
[data-theme="dark"] .pt-plate img { box-shadow: 8px 8px 0 0 rgba(0, 0, 0, .55); }

@media (max-width: 900px) {
  .pt-plate { margin-top: 2rem; }
}

/* ─── The chapters, as a ruled list ────────────────────────────
   Each row is a stroke on the sheet: hairline rule, square corners,
   and on contact the row is *stamped* — it lifts by two pixels and
   takes a hard offset shadow. No fade, no blur. */

.pt-scroll {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid currentColor;
}

.pt-scroll .entry {
  border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent);
}

.pt-scroll .entry__link {
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr) auto;
  grid-template-areas:
    "no title words"
    ".  open  open";
  gap: .25rem 1.3rem;
  align-items: baseline;
  padding: 1.15rem 1.2rem;
  text-decoration: none;
  color: inherit;
  transition: transform .16s cubic-bezier(.2,.7,.3,1),
              box-shadow .16s ease,
              background-color .16s ease;
}
.pt-scroll .entry__link:hover,
.pt-scroll .entry__link:focus-visible {
  transform: translate(-3px, -3px);
  box-shadow: 3px 3px 0 0 currentColor;
  background: color-mix(in srgb, currentColor 5%, transparent);
}

.pt-scroll .entry__no {
  grid-area: no;
  font-family: "Noto Serif SC", serif;
  font-size: .78rem;
  letter-spacing: .1em;
  opacity: .5;
  font-variant-numeric: tabular-nums;
  padding-top: .2rem;
}

.pt-scroll .entry__title {
  grid-area: title;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 1.22rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: .005em;
}

.pt-scroll .entry__open {
  grid-area: open;
  font-size: .92rem;
  line-height: 1.68;
  opacity: .68;
  max-width: 68ch;
}

.pt-scroll .entry__words {
  grid-area: words;
  font-size: .72rem;
  letter-spacing: .06em;
  opacity: .45;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .pt-scroll .entry__link {
    grid-template-columns: 2.7rem minmax(0, 1fr);
    grid-template-areas: "no title" ". open" ". words";
    padding: 1rem .9rem;
  }
  /* the stamp lift would overflow a narrow sheet */
  .pt-scroll .entry__link:hover { transform: none; box-shadow: none; }
  .pt-scroll .entry__words { padding-top: .25rem; }
}

/* ─── Provenance ───────────────────────────────────────────── */

.pt-prov {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 860px) { .pt-prov { grid-template-columns: 1fr; } }

.pt-quote-en {
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent);
}

.pt-prose p {
  font-size: 1.02rem;
  line-height: 1.82;
  margin: 0 0 1.2rem;
  max-width: 58ch;
}

/* the marginal note — a cinnabar annotation down the side */
.pt-fine {
  font-size: .92rem;
  line-height: 1.7;
  opacity: .72;
  padding-left: 1.1rem;
  border-left: 2px solid #b93a32;
}

/* ─── Footer note ──────────────────────────────────────────── */

.ink-footer__brand p { opacity: .72; }

@media (prefers-reduced-motion: reduce) {
  .pt-scroll .entry__link { transition: none; }
  .pt-scroll .entry__link:hover { transform: none; }
}

