/* ═══════════════════════════════════════════════════════════════
   EIGHT TEARS · 八泪为引
   Built on 幽墨 Yōu Mò (Ghost Ink).

   The novel takes the folk figure at the bridge — Meng Po, 孟婆, who
   ladles the soup of forgetting — and moves her downstream: a stall
   under a highway arch on Shoubei Street, opening at 3:14, run by a
   woman whose soup does not make you forget. It remembers. And its
   form is a recipe: eight tears as the base, take away the
   bitterness, keep what is sweet, simmer a whole lifetime.

   So this page is a night stall's paper: a recipe card pasted inside
   the arch, the shelf of labelled jars behind the counter, the pot
   itself (which sounds, because the whole system can synthesize a
   night without a single audio file), and the cloth account book
   the stall keeps — forty-seven entries, in the order they were
   entered.

   The volume's accent in the catalogue is qing (indigo). 幽墨 is
   hue-free by law — 墨分五色，夜分十色 — so the only colour on this
   page stays where the novel keeps it: on the cover, in the arch,
   in one warm thing.

   Every class here is new to this volume and prefixed et- (eight
   tears). The two exceptions are the ledger row classes the build
   emits for a volume's contents — .night, .night__link, .night__no,
   .night__text, .night__words — which this page must dress itself,
   because the scaffold's book.css is not loaded here.
   ═══════════════════════════════════════════════════════════════ */

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

.et-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  text-align: left;
  width: 100%;
  padding: 150px clamp(20px, 5vw, 56px) 200px;
}
@media (max-width: 900px) {
  .et-hero { grid-template-columns: 1fr; padding-bottom: 190px; }
}
.et-hero__text { min-width: 0; }

.et-title { margin: 0 0 18px; }

/* the title glyph. It also carries .ym-hero-title so youmo.js gives it
   the spectral brush-slip — something moved your hand, once in a while.
   These rules load after the framework's, so the size here is the size. */
.et-title__glyph {
  display: block;
  font-family: var(--ym-font-brush);
  font-size: clamp(84px, 13vw, 152px);
  line-height: .94;
  letter-spacing: .06em;
  color: var(--ym1);
  text-shadow: 0 0 60px rgba(244, 242, 236, .14);
}
.et-title__en {
  display: block;
  font-family: var(--ym-font-brush);
  font-size: clamp(30px, 5vw, 54px);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: .02em;
  color: var(--ym2);
  margin-top: 6px;
}
.et-title__cn {
  display: block;
  font-family: var(--ym-font-brush);
  font-size: clamp(15px, 2vw, 19px);
  line-height: 1.6;
  letter-spacing: .5em;
  color: var(--ym5);
  margin-top: 14px;
}

.et-hero .ym-hero-lede { max-width: 46ch; margin-left: 0; }
.et-hero .ym-hero-actions { justify-content: flex-start; }

/* after Meng Po · Shoubei Street · 49,331 words · 47 sections */
.et-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin-top: 30px;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ym5);
}
.et-dot { color: var(--ym6); }

/* the cover — the one warm thing */
.et-plate { margin: 0; justify-self: end; }
.et-plate img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 17rem;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid var(--ym-border-strong);
  box-shadow: 0 0 0 1px var(--ym-bg), 0 30px 70px -30px rgba(0, 0, 0, .9);
}
.et-plate figcaption {
  margin-top: 14px;
  max-width: 17rem;
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ym5);
}
@media (max-width: 900px) {
  .et-plate { justify-self: center; max-width: 13rem; margin: 0 auto; }
  .et-plate figcaption { margin-inline: auto; text-align: center; }
}

/* ─── Nav: on a phone the shelf link is the one that must survive ─ */

@media (max-width: 720px) {
  .et-nav .ym-nav-links li:nth-child(3),
  .et-nav .ym-nav-links li:nth-child(4) { display: none; }
  .et-nav .ym-nav-links li:last-child { display: list-item; }
}

/* ─── Section furniture ────────────────────────────────────────── */

.et-sec-sub {
  display: block;
  font-family: var(--ym-font-serif);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ym5);
  margin-top: 10px;
}

/* ─── Prose — the only place the page speaks in sentences ──────── */

.et-prose { min-width: 0; }
.et-prose p {
  font-size: 14.5px;
  line-height: 2;
  color: var(--ym4);
  max-width: 62ch;
  margin-bottom: 22px;
}
.et-prose strong { color: var(--ym2); font-weight: 500; }
.et-prose em { font-style: italic; }
.et-prose a { color: var(--ym3); }
.et-prose a:hover { color: var(--ym1); }

/* pulled from the book, not written for the page */
.et-pull {
  margin: 32px 0 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--ym5);
  font-family: var(--ym-font-brush);
  font-size: clamp(19px, 2.5vw, 25px);
  line-height: 1.75;
  color: var(--ym1);
  max-width: 44ch;
}
.et-pull cite {
  display: block;
  margin-top: 14px;
  font-family: var(--ym-font-serif);
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ym5);
}

/* ─── 壹 · The recipe ──────────────────────────────────────────── */

.et-recipe-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 70px);
  align-items: start;
}
@media (max-width: 940px) { .et-recipe-grid { grid-template-columns: 1fr; } }

/* the card pasted inside the arch */
.et-card {
  position: relative;
  border: 1px solid var(--ym-border-strong);
  background: linear-gradient(180deg, var(--ym-card), var(--ym-bg-alt));
  padding: clamp(22px, 3.4vw, 38px);
}
/* the folded corner of a paper that has been up a long time */
.et-card::after {
  content: "";
  position: absolute;
  top: -1px; right: -1px;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 22px 22px 0;
  border-color: transparent var(--ym-bg) transparent transparent;
}
.et-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--ym-border);
}
.et-card__tag {
  font-size: 10.5px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--ym3);
}
.et-card__src {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ym5);
}
.et-card__note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--ym-border-strong);
  font-size: 13px;
  font-style: italic;
  line-height: 1.95;
  color: var(--ym5);
}
.et-card__attr {
  margin-top: 10px;
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ym6);
}

.et-recipe { list-style: none; margin: 0; padding: 0; }
.et-recipe__line {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  gap: 6px 14px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--ym-border);
}
.et-recipe__line:last-child { border-bottom: 0; }
.et-recipe__no {
  font-family: var(--ym-font-brush);
  font-size: 17px;
  color: var(--ym6);
}
.et-recipe__what { font-size: 13.5px; color: var(--ym4); }
.et-recipe__measure {
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ym6);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* the eighth ingredient is nobody's to sell, so it is not measured */
.et-recipe__line--last .et-recipe__no { color: var(--ym1); }
.et-recipe__line--last .et-recipe__what { color: var(--ym2); }
.et-recipe__line--last .et-recipe__measure { color: var(--ym5); }

/* the pot: CSS only, no image, no file */
.et-pot {
  position: relative;
  height: 152px;
  margin-top: 38px;
  display: grid;
  place-items: end center;
}
.et-pot__body {
  position: relative;
  width: 156px;
  height: 74px;
  border: 1px solid var(--ym-border-strong);
  border-top: none;
  border-radius: 0 0 70px 70px / 0 0 46px 46px;
  background: linear-gradient(180deg, var(--ym-card), var(--ym-bg));
  box-shadow: inset 0 -18px 30px -18px rgba(0, 0, 0, .9);
}
.et-pot__body::before {
  content: "";
  position: absolute;
  top: -9px; left: -11px; right: -11px;
  height: 10px;
  border: 1px solid var(--ym-border-strong);
  background: var(--ym8);
}
.et-pot__steam {
  position: absolute;
  left: 50%;
  bottom: 98px;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  align-items: flex-end;
}
.et-pot__steam span {
  display: block;
  width: 2px;
  height: 66px;
  background: linear-gradient(to top, rgba(217, 214, 205, .3), transparent);
  filter: blur(1px);
  animation: etSteam 7s ease-in-out infinite;
}
.et-pot__steam span:nth-child(2) { height: 80px; animation-delay: -2.3s; }
.et-pot__steam span:nth-child(3) { height: 56px; animation-delay: -4.7s; }

@keyframes etSteam {
  0%, 100% { opacity: .3; transform: translateY(6px) scaleY(.9); }
  50%      { opacity: .85; transform: translateY(-10px) scaleY(1.06); }
}

.et-pot__cap {
  margin-top: 14px;
  font-size: 10.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ym6);
  text-align: center;
}

/* ─── 贰 · The shelf of jars ───────────────────────────────────── */

.et-tears {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 22px;
}
@media (max-width: 620px) { .et-tears { grid-template-columns: 1fr; } }

.et-tear {
  position: relative;
  border: 1px solid var(--ym-border);
  background: var(--ym-card);
  padding: 30px 26px 26px;
  transition: border-color .4s, transform .4s;
}
.et-tear:hover { border-color: var(--ym5); transform: translateY(-4px); }

/* the droplet — a jar of the stuff, holding its numeral */
.et-drop {
  position: relative;
  width: 52px;
  height: 62px;
  margin-bottom: 20px;
}
.et-drop::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--ym-border-strong);
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: linear-gradient(180deg, rgba(244, 242, 236, .16), rgba(244, 242, 236, .03) 58%, transparent);
  transition: background .4s;
}
.et-tear:hover .et-drop::before {
  background: linear-gradient(180deg, rgba(244, 242, 236, .26), rgba(244, 242, 236, .06) 58%, transparent);
}
/* the catchlight that makes it a liquid and not a shape */
.et-drop::after {
  content: "";
  position: absolute;
  left: 36%;
  top: 15%;
  width: 6px;
  height: 10px;
  border-radius: 50%;
  background: rgba(244, 242, 236, .34);
  filter: blur(1px);
}
.et-drop__num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: 9px;
  font-family: var(--ym-font-brush);
  font-size: 22px;
  line-height: 1;
  color: var(--ym2);
}

.et-tear__name {
  font-family: var(--ym-font-brush);
  font-size: 25px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--ym1);
  margin-bottom: 8px;
}
/* only the three jars the novel actually labels carry a jar label */
.et-tear__jar {
  font-family: var(--ym-font-brush);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ym3);
  margin-bottom: 10px;
}
.et-tear__measure {
  font-size: 10.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ym6);
}
.et-tear__note {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.95;
  color: var(--ym4);
}
.et-tear__note em { font-style: italic; color: var(--ym2); }

/* the eighth jar: bottom shelf, left corner, facing the wall */
.et-tear--maker {
  border-style: dashed;
  border-color: var(--ym-border-strong);
  background: linear-gradient(180deg, var(--ym-bg-alt), #09090b);
}
.et-tear--maker::after {
  content: "bottom shelf · left corner";
  position: absolute;
  top: 18px; right: 20px;
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ym6);
}
.et-tear--maker .et-drop::before {
  background: linear-gradient(180deg, rgba(244, 242, 236, .05), transparent 72%);
}
.et-tear--maker .et-drop::after { opacity: .35; }

.et-shelf { margin-top: 38px; }
.et-shelf .ym-alert-msg { line-height: 1.95; }
.et-shelf .ym-alert-msg strong { color: var(--ym2); font-weight: 500; }

/* ─── 叁 · The stove (generative player) ───────────────────────── */

/* the framework pads the player's side panel only, and its tracklist carries
   a gutter of its own — inside this wrapper that would double up. So the rows
   are pulled back to run edge to edge of the panel, and their own 36px padding
   puts every label on the same line as the transport above it. */
.et-player-body {
  padding: 44px 36px 0;
  min-width: 0;
}
.et-player-body .ym-playlist { margin-inline: -36px; }
@media (max-width: 620px) {
  .et-player-body { padding: 32px 22px 0; }
  .et-player-body .ym-playlist { margin-inline: -22px; }
}
.et-spacer { flex: 1; }

/* classes youmo.js queries by name; the system styles only their parent */
.ym-prev, .ym-next { font-size: 14px; }
.ym-time-now, .ym-time-total { font-variant-numeric: tabular-nums; }
.ym-vol-val {
  min-width: 2.2ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ─── 肆 · The night ledger (the build's .night rows) ──────────── */

.et-ledger { border-top: 1px solid var(--ym-border-strong); }

.et-ledger__cap {
  display: flex;
  justify-content: space-between;
  gap: 8px 20px;
  flex-wrap: wrap;
  padding: 16px 6px 14px;
  border-bottom: 1px solid var(--ym-border-strong);
  font-size: 10.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ym6);
}

.et-ledger__list { list-style: none; margin: 0; padding: 0; }

.night { border-bottom: 1px solid var(--ym-border); }
.night__link {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) auto;
  gap: 6px 18px;
  align-items: baseline;
  padding: 15px 6px;
  text-decoration: none;
  color: var(--ym4);
  transition: background .3s, color .3s;
}
.night__link:hover { background: rgba(244, 242, 236, .03); color: var(--ym2); }
.night__no {
  font-family: var(--ym-font-brush);
  font-size: 19px;
  line-height: 1;
  color: var(--ym6);
  font-variant-numeric: tabular-nums;
  transition: color .3s;
}
.night__link:hover .night__no { color: var(--ym1); }
.night__text { font-size: 14px; line-height: 1.85; }
.night__words {
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--ym6);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 600px) {
  .night__link { grid-template-columns: 2.4rem minmax(0, 1fr); gap: 4px 12px; }
  .night__words { grid-column: 2; }
}

.et-ledger__foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px 24px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.et-more {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ym3);
  text-decoration: none;
  transition: color .25s;
}
.et-more:hover { color: var(--ym1); }
.et-ledger__hint {
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ym6);
}

/* ─── 伍 · The keeper ──────────────────────────────────────────── */

.et-keeper {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 70px);
  align-items: start;
}
@media (max-width: 940px) { .et-keeper { grid-template-columns: 1fr; } }

/* the recipe band sets the Chinese in brush and the pinyin in caps;
   the English wants to be a sentence, not a label */
.et-quote-en {
  font-style: italic;
  text-transform: none;
  letter-spacing: .02em;
  font-size: 13.5px;
  line-height: 2;
  color: var(--ym4);
  max-width: 46ch;
  margin: 18px auto 0;
}

.et-note { margin-top: 36px; }
.et-note .ym-alert-msg { line-height: 1.95; }
.et-note em { font-style: italic; color: var(--ym2); }
.et-note strong { color: var(--ym1); font-weight: 500; }

/* ─── 陆 · The companions ──────────────────────────────────────── */

.et-lot--here { border-color: var(--ym5); }
.et-lot__here {
  position: absolute;
  top: 0; right: 0;
  padding: 6px 12px 5px;
  background: var(--ym1);
  color: var(--ym-bg);
  font-size: 9.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.et-series-note {
  margin-top: 40px;
  max-width: 64ch;
  font-size: 13px;
  line-height: 2;
  color: var(--ym5);
}
.et-series-note a { color: var(--ym3); text-decoration: none; }
.et-series-note a:hover { color: var(--ym1); }

/* ─── Licence slot ─────────────────────────────────────────────── */

.et-lic { max-width: 62ch; }

/* ─── The brush face vs. the language tag ────────────────────────
   a11y.css hands every [lang="zh-Hans"] run Noto Serif SC, so a
   screen reader and the browser both get a Chinese voice and a
   Chinese font. That is right in prose and wrong on the display
   faces: the ghost numerals, the seal glyphs, the tracklist
   numerals and the recipe band are brushed in Ma Shan Zheng, and a
   bare attribute selector would quietly hand them back to a serif.
   So every brush context is re-declared here at class+attribute
   specificity, which beats the bare [lang] rule. */

.ym-sec-num [lang="zh-Hans"],
.ym-quote-text[lang="zh-Hans"],
.ym-player-glyph [lang="zh-Hans"],
.ym-alert-icon [lang="zh-Hans"],
.ym-track-no[lang="zh-Hans"],
.ym-lot-tag [lang="zh-Hans"],
.et-title__cn[lang="zh-Hans"],
.et-tear__jar[lang="zh-Hans"] {
  font-family: var(--ym-font-brush);
}

/* ─── Reduced motion: the pot stops steaming, nothing else moves ── */

@media (prefers-reduced-motion: reduce) {
  .et-pot__steam span { opacity: .4; }
}
