/* 如在 · asifpresent.com
   Ink on xuan paper. One vermilion ember; everything else is ink and ash. */

:root {
  color-scheme: light;
  --paper: oklch(0.948 0.017 80);
  --paper-deep: oklch(0.915 0.021 78);
  --paper-lift: oklch(0.972 0.012 82);
  --ink: oklch(0.27 0.012 55);
  --ink-soft: oklch(0.43 0.014 58);
  --ink-faint: oklch(0.58 0.014 62);
  --rule: oklch(0.27 0.012 55 / 0.14);
  --rule-strong: oklch(0.27 0.012 55 / 0.28);
  --ember: oklch(0.55 0.165 33);
  --ember-glow: oklch(0.7 0.17 45 / 0.55);
  --teal: oklch(0.52 0.04 185);
  --ash: oklch(0.76 0.008 70);
  --wood: oklch(0.42 0.05 55);
  --shadow: 0 1px 2px oklch(0.27 0.02 55 / 0.08), 0 6px 20px -8px oklch(0.27 0.02 55 / 0.22);
  --img-blend: multiply;
  --img-filter: none;

  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --brush: "Ma Shan Zheng", "Kaiti SC", "STKaiti", "KaiTi", var(--serif);
  --measure: 36rem;
  --gutter: 16px;
  --r-s: 4px;
  --r-m: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: oklch(0.19 0.009 60);
    --paper-deep: oklch(0.225 0.011 60);
    --paper-lift: oklch(0.245 0.012 60);
    --ink: oklch(0.9 0.014 80);
    --ink-soft: oklch(0.76 0.014 75);
    --ink-faint: oklch(0.62 0.012 70);
    --rule: oklch(0.9 0.014 80 / 0.12);
    --rule-strong: oklch(0.9 0.014 80 / 0.24);
    --ember: oklch(0.68 0.16 38);
    --ember-glow: oklch(0.72 0.17 45 / 0.6);
    --teal: oklch(0.7 0.045 185);
    --ash: oklch(0.5 0.008 70);
    --wood: oklch(0.6 0.05 60);
    --shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 8px 24px -8px oklch(0 0 0 / 0.5);
    --img-blend: normal;
    --img-filter: brightness(0.72) contrast(0.95) sepia(0.12);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: oklch(0.19 0.009 60);
  --paper-deep: oklch(0.225 0.011 60);
  --paper-lift: oklch(0.245 0.012 60);
  --ink: oklch(0.9 0.014 80);
  --ink-soft: oklch(0.76 0.014 75);
  --ink-faint: oklch(0.62 0.012 70);
  --rule: oklch(0.9 0.014 80 / 0.12);
  --rule-strong: oklch(0.9 0.014 80 / 0.24);
  --ember: oklch(0.68 0.16 38);
  --ember-glow: oklch(0.72 0.17 45 / 0.6);
  --teal: oklch(0.7 0.045 185);
  --ash: oklch(0.5 0.008 70);
  --wood: oklch(0.6 0.05 60);
  --shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 8px 24px -8px oklch(0 0 0 / 0.5);
  --img-blend: normal;
  --img-filter: brightness(0.72) contrast(0.95) sepia(0.12);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.95;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
@media (min-width: 720px) { body { font-size: 18px; } }

a { color: inherit; text-decoration-color: var(--rule-strong); text-underline-offset: 4px; text-decoration-thickness: 1px; }
@media (hover: hover) { a:hover { text-decoration-color: var(--ember); } }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 2px; }
button { font: inherit; color: inherit; touch-action: manipulation; }
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1.1em; text-wrap: pretty; }
strong { font-weight: 700; }
em { font-style: normal; text-emphasis: dot var(--ember); -webkit-text-emphasis: dot var(--ember); text-emphasis-position: under right; -webkit-text-emphasis-position: under; }
.nb { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- masthead ---------- */
.mast {
  position: absolute; inset: 0 0 auto 0; z-index: 3;
  display: flex; align-items: center; gap: 12px;
  padding: max(18px, env(safe-area-inset-top)) var(--gutter) 0;
  font-size: 14px; color: var(--ink-soft);
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--serif); font-weight: 900; font-size: 22px; color: var(--ink); text-decoration: none; letter-spacing: 0.12em; line-height: 1; }
/* the mark: one stick of incense, ember lit, a curl of smoke */
.mark { width: 0.5em; height: 1.55em; flex: none; overflow: visible; fill: currentColor; }
.mark .mark-smoke { fill: none; stroke: currentColor; stroke-opacity: 0.45; stroke-width: 1.6; stroke-linecap: round; }
.mark .mark-ember { fill: var(--ember); }
.mast .domain { letter-spacing: 0.06em; font-size: 12px; }
@media (min-width: 720px) { .mast { padding-inline: 40px; } }

/* ---------- hero ---------- */
/* Phones: the painting on top (censer in frame), the words below on paper.
   Wide screens: the title stands vertically beside the incense, like an inscription. */
.hero { position: relative; overflow: hidden; }
.hero-art { position: relative; height: 60svh; min-height: 360px; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 86% 82%; mix-blend-mode: var(--img-blend); filter: var(--hero-filter, var(--img-filter)); }
.hero-art::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(to bottom, transparent, var(--paper)); }
.hero-copy { position: relative; z-index: 2; padding: 8px var(--gutter) 40px; max-width: 34rem; }
.hero h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(38px, 10.5vw, 60px); line-height: 1.15; letter-spacing: 0.02em;
  margin: 0 0 16px; text-wrap: balance;
}
.hero h1 .ember-char { color: var(--ember); }
.hero .lead { font-size: 18px; color: var(--ink-soft); margin: 0 0 18px; max-width: 26em; }
.hero .meta { font-size: 13px; color: var(--ink-faint); letter-spacing: 0.04em; margin: 0; }
.hero .meta span + span::before { content: "·"; margin: 0 8px; }
@media (min-width: 900px) {
  .hero { height: min(100svh, 920px); min-height: 640px; }
  .hero-art { position: absolute; inset: 0; height: auto; }
  .hero-art img { object-position: 70% 60%; }
  .hero-art::after { display: none; }
  .hero-copy {
    position: absolute; right: 27%; bottom: 7%; max-width: none; padding: 0;
    display: flex; flex-direction: row-reverse; align-items: flex-end; gap: 36px;
  }
  .hero h1 {
    writing-mode: vertical-rl; text-orientation: upright;
    font-size: clamp(48px, 4.6vw, 68px); letter-spacing: 0.1em; line-height: 1.1; margin: 0;
  }
  .hero .copy-side { width: 19em; padding-bottom: 6px; }
  .hero .lead { font-size: 17px; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --hero-filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.92); } }
:root[data-theme="dark"] { --hero-filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.92); }

/* ---------- reading column ---------- */
main { position: relative; }
.col { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }
.wide { max-width: 64rem; margin: 0 auto; padding: 0 var(--gutter); }
section.chapter { padding: 72px 0 24px; position: relative; }
@media (min-width: 720px) { section.chapter { padding-top: 112px; } }

.ch-head { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: end; margin-bottom: 32px; }
.ch-num {
  font-family: var(--brush); font-size: 64px; line-height: 0.9; color: var(--ink);
  grid-row: span 2;
}
.ch-kicker { font-size: 13px; letter-spacing: 0.18em; color: var(--ink-faint); }
.ch-head h2 { margin: 0; font-size: clamp(26px, 6vw, 34px); font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; text-wrap: balance; }

h3 { font-size: 21px; font-weight: 700; line-height: 1.45; margin: 2.2em 0 0.7em; letter-spacing: -0.005em; text-wrap: balance; }

/* reveal: ink spreading into paper */
.reveal { opacity: 0; transform: translateY(14px); filter: blur(4px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- classical quotes ---------- */
.verse {
  margin: 2em 0; padding: 0 0 0 1.4em; position: relative;
  font-size: 1.08em; line-height: 2.05; color: var(--ink);
}
.verse::before {
  content: ""; position: absolute; left: 0; top: 0.95em; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ember); box-shadow: 0 0 0 4px var(--ember-glow);
}
.verse p { margin: 0 0 0.4em; }
.verse cite { display: block; font-style: normal; font-size: 14px; color: var(--ink-faint); margin-top: 0.4em; letter-spacing: 0.02em; }
.verse cite a { color: inherit; }
.verse .plain { font-size: 15px; line-height: 1.85; color: var(--ink-soft); margin-top: 0.5em; }

.pull {
  margin: 2.4em 0; text-align: center; font-size: clamp(22px, 5.4vw, 28px); line-height: 1.6; font-weight: 600; text-wrap: balance;
}
.pull small { display: block; font-size: 14px; font-weight: 400; color: var(--ink-faint); margin-top: 8px; }

/* ---------- footnote refs & evidence badges ---------- */
a.fn {
  font-size: 0.68em; vertical-align: super; line-height: 0; text-decoration: none;
  color: var(--ember); padding: 0 1px; font-variant-numeric: tabular-nums;
}
a.fn::before { content: "["; } a.fn::after { content: "]"; }
.ev {
  display: inline-flex; align-items: center; gap: 5px; vertical-align: 0.1em;
  font-size: 12px; line-height: 1; padding: 4px 8px 4px 7px; border-radius: 99px; white-space: nowrap;
  background: var(--paper-deep); color: var(--ink-soft); letter-spacing: 0.02em;
}
.ev::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ev-strong::before { background: var(--ink); }
.ev-mid::before { background: var(--teal); }
.ev-weak::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-faint); }
.ev-void { text-decoration: line-through; text-decoration-color: var(--ember); }
.ev-void::before { background: var(--ember); }

/* ---------- figures ---------- */
figure { margin: 2.4em 0; }
figure.art { margin: 56px auto; max-width: 72rem; }
figure.art img { width: 100%; mix-blend-mode: var(--img-blend); filter: var(--img-filter); }
figcaption { font-size: 14px; color: var(--ink-faint); line-height: 1.7; margin-top: 10px; padding: 0 var(--gutter); }
.col figcaption { padding: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) figure.art img { border-radius: var(--r-m); } }

/* chart frame */
.chart { margin: 2.2em 0; }
.chart h4 { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.chart .sub { font-size: 13px; color: var(--ink-faint); margin: 0 0 14px; line-height: 1.6; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart svg text { font-family: var(--serif); fill: var(--ink-soft); font-size: 13px; }
.chart svg .val { fill: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.chart svg .bar { fill: var(--ink); opacity: 0.82; }
.chart svg .bar.hot { fill: var(--ember); opacity: 1; }
.chart svg .bar.soft { fill: var(--ash); opacity: 1; }
.chart svg .axis { stroke: var(--rule-strong); stroke-width: 1; }
.chart svg .grid { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 2 4; }
.chart svg .dot { fill: var(--ink); }
.chart svg .dot.hot { fill: var(--ember); }

/* aside: honesty box */
aside.note {
  margin: 2.4em 0; padding: 22px 22px 6px; border-radius: var(--r-m);
  background: var(--paper-deep); font-size: 16px; line-height: 1.85;
}
aside.note h4 { margin: 0 0 8px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
aside.note h4::before { content: ""; width: 18px; height: 1px; background: var(--ember); }

/* ---------- shared controls ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; padding: 0; list-style: none; }
.chip {
  appearance: none; border: 0; cursor: pointer;
  min-height: 40px; padding: 7px 16px; border-radius: 99px;
  background: var(--paper-lift); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--rule-strong);
  font-size: 16px; line-height: 1.4;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.15s var(--ease);
}
.chip:active { transform: scale(0.96); }
@media (hover: hover) { .chip:hover { box-shadow: inset 0 0 0 1px var(--ink-soft); } }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }

.btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 9px 20px; border-radius: var(--r-s);
  background: var(--ink); color: var(--paper); font-size: 16px; line-height: 1.3;
  transition: transform 0.15s var(--ease), opacity 0.2s var(--ease);
}
.btn:active { transform: scale(0.96); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.btn[disabled] { opacity: 0.45; cursor: default; }
.btn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 3px var(--ember-glow); }

.lab {
  margin: 2.4em calc(-1 * var(--gutter)); padding: 24px var(--gutter) 22px;
  background: var(--paper-lift); box-shadow: var(--shadow);
}
@media (min-width: 720px) { .lab { margin-inline: -28px; padding: 28px 28px 24px; border-radius: var(--r-m); } }
.lab-title { font-size: 13px; letter-spacing: 0.16em; color: var(--ember); margin: 0 0 4px; }
.lab h4 { font-size: 19px; margin: 0 0 8px; line-height: 1.5; }
.lab .hint { font-size: 14px; color: var(--ink-faint); line-height: 1.7; margin: 0 0 14px; }
.lab .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lab output, .lab .readout { font-variant-numeric: tabular-nums; }

/* ---------- 序：选愿望 ---------- */
[data-w] { transition: color 0.4s var(--ease); }
[data-w].fresh { color: var(--ember); }

/* ---------- 账本 ---------- */
.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: var(--r-m); overflow: hidden; box-shadow: inset 0 0 0 1px var(--rule-strong); margin: 1.4em 0 1em; }
.ledger > div { padding: 16px 16px 12px; }
.ledger > div + div { box-shadow: inset 1px 0 0 var(--rule-strong); }
.ledger h5 { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.14em; color: var(--ink-faint); font-weight: 400; }
.ledger ul { list-style: none; margin: 0; padding: 0; font-size: 16px; line-height: 2; }
.ledger .q { color: var(--ink-faint); }
.ledger .answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--ease); }
.ledger .answer > div { overflow: hidden; }
.ledger.open .answer { grid-template-rows: 1fr; }
.ledger.open .q { display: none; }
.ledger .answer p { font-size: 15px; line-height: 1.8; color: var(--ink-soft); margin: 0; }

/* ---------- 还愿墙 ---------- */
.wall { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; margin: 16px 0 10px; }
@media (max-width: 480px) { .wall { gap: 3px; } }
.plaque {
  aspect-ratio: 2 / 3; border-radius: 2px; position: relative;
  background: var(--wood); opacity: 0.92;
  transition: opacity 0.5s var(--ease), background-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.plaque::after { content: ""; position: absolute; left: 50%; top: 8%; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: var(--paper); opacity: 0.7; }
.plaque.miss { background: transparent; box-shadow: inset 0 0 0 1px var(--rule-strong); opacity: 0; }
.plaque.miss::after { display: none; }
.wall.reveal-all .plaque.miss { opacity: 1; }
.wall-legend { font-size: 14px; color: var(--ink-soft); line-height: 1.8; min-height: 3.6em; }
.wall-legend b { font-variant-numeric: tabular-nums; color: var(--ink); }
input[type="range"] { width: 100%; max-width: 22rem; accent-color: var(--ember); min-height: 40px; }

/* ---------- 鸽子箱 ---------- */
.skinner { display: grid; gap: 18px; }
@media (min-width: 620px) { .skinner { grid-template-columns: 1fr 1fr; align-items: center; } }
.box {
  position: relative; aspect-ratio: 1; border-radius: var(--r-m);
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule-strong);
  overflow: hidden;
}
.box .hopper { position: absolute; right: 10%; bottom: 10%; width: 22%; height: 8%; border-radius: 3px; background: var(--paper-deep); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.box .grain { position: absolute; right: 18%; bottom: 13%; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); opacity: 0; transform: translateY(-30px); }
.box .grain.drop { animation: grain 0.9s var(--ease) forwards; }
@keyframes grain { 0% { opacity: 0; transform: translateY(-40px); } 30% { opacity: 1; } 100% { opacity: 1; transform: none; } }
.pigeon { position: absolute; left: 38%; top: 34%; width: 30%; transition: transform 0.6s var(--ease); transform-origin: 50% 70%; }
.pigeon svg { width: 100%; height: auto; overflow: visible; }
.pigeon .body { fill: var(--ink-soft); }
.pigeon .wing { fill: var(--ink); opacity: 0.55; }
.pigeon .eye { fill: var(--paper); }
.pigeon .beak { fill: var(--ember); }
.pigeon.turn { animation: p-turn 0.7s var(--ease); }
.pigeon.head { animation: p-head 0.7s var(--ease); }
.pigeon.bob { animation: p-bob 0.7s var(--ease); }
.pigeon.peck { animation: p-peck 0.7s var(--ease); }
.pigeon.sway { animation: p-sway 0.7s var(--ease); }
@keyframes p-turn { to { transform: rotate(-360deg); } }
@keyframes p-head { 50% { transform: translate(-18%, -22%) rotate(-12deg); } }
@keyframes p-bob { 25%, 75% { transform: translateY(-10%); } 50% { transform: translateY(4%); } }
@keyframes p-peck { 40% { transform: rotate(28deg) translateY(6%); } }
@keyframes p-sway { 25% { transform: translateX(-14%) rotate(-8deg); } 75% { transform: translateX(14%) rotate(8deg); } }
.acts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.acts li { display: grid; grid-template-columns: 6.5em 1fr 2.8em; gap: 8px; align-items: center; }
.acts .track { display: block; height: 8px; border-radius: 99px; background: var(--paper-deep); overflow: hidden; }
.acts .fill { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--ink-soft); transform-origin: left; transform: scaleX(0.2); transition: transform 0.5s var(--ease), background-color 0.3s; }
.acts li.top .fill { background: var(--ember); }
.acts .pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-faint); }
.skinner-status { font-size: 14px; color: var(--ink-soft); min-height: 3.6em; margin-top: 10px; line-height: 1.75; }

/* ---------- 你把香当什么 ---------- */
.stance-out { margin-top: 14px; min-height: 7.5em; }
.stance-out .verse { margin: 0.6em 0 0; }

/* ---------- 原典香案 ---------- */
.shelf { display: grid; gap: 14px; margin-top: 18px; }
@media (min-width: 760px) { .shelf { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .wide { max-width: 72rem; } .shelf { grid-template-columns: 1fr 1fr 1fr; } }
.card {
  position: relative; padding: 20px 20px 16px; border-radius: var(--r-m);
  background: var(--paper-lift); box-shadow: var(--shadow);
}
.card[hidden] { display: none; }
.card .trad { font-size: 12px; letter-spacing: 0.16em; color: var(--ember); margin: 0 0 8px; }
.card blockquote { margin: 0 0 10px; font-size: 16.5px; line-height: 1.9; font-weight: 600; }
.card .plain { font-size: 15px; line-height: 1.8; color: var(--ink-soft); margin: 0 0 10px; }
.card .src { font-size: 13px; color: var(--ink-faint); margin: 0; line-height: 1.6; }
.card .src a { color: inherit; }
.shelf-count { font-size: 13px; color: var(--ink-faint); margin-top: 10px; }

/* ---------- 愿望转换器 ---------- */
.convert { display: grid; gap: 12px; margin-top: 14px; }
@media (min-width: 620px) { .convert { grid-template-columns: 1fr 1fr; } }
.convert > div { padding: 16px 18px; border-radius: var(--r-m); background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.convert h5 { margin: 0 0 6px; font-size: 13px; font-weight: 400; letter-spacing: 0.14em; color: var(--ink-faint); }
.convert p { margin: 0; font-size: 17px; line-height: 1.85; }
.convert .deal p { color: var(--ink-faint); text-decoration: line-through; text-decoration-color: var(--rule-strong); }
.convert .wen { box-shadow: inset 0 0 0 1px var(--ink-soft); }

/* ---------- checklist (五分法身香) ---------- */
.fivefold { list-style: none; padding: 0; margin: 1.4em 0; counter-reset: f; }
.fivefold li { position: relative; padding: 10px 0 10px 52px; box-shadow: inset 0 -1px 0 var(--rule); }
.fivefold li::before {
  counter-increment: f; content: counter(f, cjk-ideographic);
  position: absolute; left: 0; top: 8px; width: 36px; text-align: center;
  font-family: var(--brush); font-size: 24px; color: var(--ink-faint);
}
.fivefold b { display: block; font-size: 17px; }
.fivefold span { font-size: 15px; color: var(--ink-soft); line-height: 1.75; }

/* ---------- 心香一瓣 ---------- */
.ending { position: relative; }
.altar { display: grid; gap: 18px; justify-items: center; text-align: center; margin: 24px auto 0; max-width: 30rem; }
.altar label { font-size: 15px; color: var(--ink-soft); }
.altar textarea {
  width: 100%; min-height: 96px; resize: vertical; padding: 14px 16px; border-radius: var(--r-m); border: 0;
  background: var(--paper-lift); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-strong);
  font: 17px/1.8 var(--serif);
}
.altar textarea:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
.altar .privacy { font-size: 13px; color: var(--ink-faint); margin: 0; }
.censer { position: relative; width: 160px; height: 260px; margin: 8px auto 0; }
.censer svg { width: 100%; height: 100%; overflow: visible; }
.censer .bowl { fill: var(--ink); opacity: 0.85; }
.censer .ashbed { fill: var(--ash); }
.censer .stick { fill: var(--wood); }
.censer .burnt { fill: var(--ash); }
.censer .ember { fill: var(--ember); filter: drop-shadow(0 0 6px var(--ember-glow)); opacity: 0; }
.censer.lit .ember { opacity: 1; }
.censer .smoke path { fill: none; stroke: var(--ink-faint); stroke-width: 1.4; stroke-linecap: round; opacity: 0; }
.censer.lit .smoke path { animation: rise 4.5s linear infinite; }
.censer.lit .smoke path:nth-child(2) { animation-delay: 1.5s; }
.censer.lit .smoke path:nth-child(3) { animation-delay: 3s; }
@keyframes rise { 0% { opacity: 0; transform: translateY(8px) scaleY(0.8); } 25% { opacity: 0.55; } 100% { opacity: 0; transform: translateY(-46px) scaleY(1.2) translateX(6px); } }
.wish-smoke { font-size: 17px; color: var(--ink-soft); min-height: 2em; transition: opacity 3s var(--ease), filter 3s var(--ease), transform 3s var(--ease); }
.wish-smoke.gone { opacity: 0; filter: blur(8px); transform: translateY(-40px); }
.after { font-size: 17px; line-height: 1.95; opacity: 0; transition: opacity 1.4s var(--ease); }
.after.in { opacity: 1; }

/* ---------- FAQ ---------- */
.faq details { box-shadow: inset 0 -1px 0 var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 32px 16px 0; position: relative;
  font-size: 18px; font-weight: 600; line-height: 1.55;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 1.5px solid var(--ink-faint); border-bottom: 1.5px solid var(--ink-faint); transform: rotate(45deg); transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding: 0 0 12px; font-size: 16px; line-height: 1.9; color: var(--ink-soft); }

/* ---------- references ---------- */
.refs { font-size: 14px; line-height: 1.75; color: var(--ink-soft); padding-left: 2.2em; }
.refs li { margin-bottom: 8px; padding-left: 4px; }
.refs li::marker { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.refs li:target { background: var(--paper-deep); border-radius: var(--r-s); }
.refs .back { text-decoration: none; color: var(--ember); margin-left: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 18px; font-size: 13px; color: var(--ink-faint); }

footer.site { padding: 64px 0 max(56px, env(safe-area-inset-bottom)); font-size: 14px; color: var(--ink-faint); line-height: 1.8; }
footer.site .brand { font-size: 26px; margin-bottom: 12px; }

/* ---------- the incense: reading progress ---------- */
.incense-rail { position: fixed; z-index: 20; pointer-events: none; opacity: 0; transition: opacity 0.6s var(--ease); }
.incense-rail.on { opacity: 1; }
.incense-rail a, .incense-rail button { pointer-events: auto; }
/* phones: a thin horizontal stick under the top edge */
.incense-rail { left: 0; right: 0; top: 0; height: 3px; }
.incense-rail .stick { position: absolute; inset: 0; background: color-mix(in oklch, var(--wood) 55%, transparent); }
.incense-rail .burnt { position: absolute; inset: 0; background: var(--ash); transform-origin: left; transform: scaleX(var(--p, 0)); }
.incense-rail .ember { position: absolute; top: -2px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 10px 2px var(--ember-glow); transform: translateX(calc(var(--p, 0) * (100vw - 7px))); }
.incense-rail .smoke, .incense-rail .marks, .incense-rail .censer-mini { display: none; }
@media (min-width: 1180px) {
  .incense-rail { left: 36px; right: auto; top: 12vh; height: 72vh; width: 24px; }
  .incense-rail .stick { left: 10px; width: 3px; inset-inline: auto; border-radius: 2px; background: var(--wood); }
  .incense-rail .stick { left: 10.5px; }
  .incense-rail .burnt { left: 10.5px; width: 3px; inset-inline: auto; right: auto; border-radius: 2px; transform-origin: top; transform: scaleY(var(--p, 0)); background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); }
  .incense-rail .ember { left: 8.5px; top: -3px; transform: translateY(calc(var(--p, 0) * 72vh)); width: 7px; height: 7px; }
  .incense-rail .smoke { display: block; position: absolute; left: -8px; top: -60px; width: 40px; height: 60px; transform: translateY(calc(var(--p, 0) * 72vh)); }
  .incense-rail .smoke path { fill: none; stroke: var(--ink-faint); stroke-width: 1.2; stroke-linecap: round; opacity: 0; animation: rise 5s linear infinite; }
  .incense-rail .smoke path:nth-child(2) { animation-delay: 1.7s; }
  .incense-rail .smoke path:nth-child(3) { animation-delay: 3.4s; }
  .incense-rail .censer-mini { display: block; position: absolute; left: -6px; bottom: -26px; width: 36px; height: 20px; border-radius: 0 0 14px 14px; background: var(--ink); opacity: 0.8; }
  .incense-rail .marks { display: block; position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; }
  .incense-rail .marks li { position: absolute; left: 0; transform: translateY(-50%); }
  .incense-rail .marks a {
    display: flex; align-items: center; gap: 10px; text-decoration: none;
    width: 40px; height: 28px; padding-left: 7px;
  }
  .incense-rail .marks a::before { content: ""; width: 10px; height: 1px; background: var(--ink-faint); transition: width 0.2s var(--ease), background-color 0.2s; }
  .incense-rail .marks span {
    font-size: 13px; white-space: nowrap; color: var(--ink-soft); opacity: 0; transform: translateX(-4px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
    background: var(--paper); padding: 0 6px; border-radius: 3px;
  }
  .incense-rail .marks a:hover span, .incense-rail .marks a:focus-visible span, .incense-rail .marks li.here span { opacity: 1; transform: none; }
  .incense-rail .marks li.here a::before { width: 16px; background: var(--ember); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .incense-rail .smoke path, .censer.lit .smoke path { animation: none; opacity: 0.35; }
  .pigeon { animation: none !important; }
  .wish-smoke, .after, .ledger .answer, .plaque { transition: none; }
  html { scroll-behavior: auto; }
}
@media print {
  .incense-rail, .lab, .altar { display: none; }
  .reveal { opacity: 1; transform: none; filter: none; }
}

/* ---------- 要点 (also the snippet search engines and AI answers lift) ---------- */
.keypoints { padding: 56px 0 0; }
.keypoints h2 { font-size: 13px; letter-spacing: 0.2em; color: var(--ember); font-weight: 400; margin: 0 0 10px; }
.keypoints ul { margin: 0; padding: 0; list-style: none; }
.keypoints li { position: relative; padding: 10px 0 10px 22px; font-size: 16px; line-height: 1.85; box-shadow: inset 0 -1px 0 var(--rule); }
.keypoints li::before { content: ""; position: absolute; left: 2px; top: 1.3em; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); }

/* ---------- series home ---------- */
.home-head { padding: max(56px, env(safe-area-inset-top)) 0 8px; }
.home-head .domain { font-size: 12px; letter-spacing: 0.08em; color: var(--ink-faint); margin: 0 0 18px; }
.home-head h1 { margin: 0 0 10px; line-height: 1; }
.lockup { display: flex; align-items: flex-end; gap: 0.18em; font-size: clamp(64px, 17vw, 104px); }
.brand-big { writing-mode: vertical-rl; text-orientation: upright; font-family: var(--serif); font-weight: 900; letter-spacing: 0.14em; line-height: 1; }
.lockup .mark { width: 0.36em; height: 1.92em; margin-bottom: 0.08em; }
.home-head .lead { font-size: 20px; font-weight: 600; margin: 18px 0 18px; text-wrap: balance; }
.home-head p { color: var(--ink-soft); }
.issues h2 { font-size: 13px; letter-spacing: 0.2em; color: var(--ember); font-weight: 400; margin: 48px 0 14px; }
.issue { display: grid; gap: 6px; text-decoration: none; border-radius: var(--r-m); padding: 0 0 18px; transition: transform 0.2s var(--ease); }
.issue img { border-radius: var(--r-m); mix-blend-mode: var(--img-blend); filter: var(--hero-filter, var(--img-filter)); margin-bottom: 10px; }
.issue-no { font-size: 13px; color: var(--ink-faint); letter-spacing: 0.04em; }
.issue-title { font-size: 28px; font-weight: 700; line-height: 1.3; }
.issue-sum { font-size: 16px; color: var(--ink-soft); line-height: 1.85; }
@media (hover: hover) { .issue:hover .issue-title { color: var(--ember); } }
.issue:active { transform: scale(0.99); }
.next { list-style: none; margin: 0; padding: 0; }
.next li { padding: 10px 0; box-shadow: inset 0 -1px 0 var(--rule); color: var(--ink-soft); }
