/* Generated from styles/*.css by scripts/build-css.mjs. */

/* ==========================================================================
   清淨覺 · 經藏
   A quiet reading surface for the Chinese Buddhist canon.
   ========================================================================== */

@font-face {
  font-family: 'Qingjing Serif';
  src: url('assets/NotoSerifTC-subset.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Qingjing Serif';
  src: url('assets/NotoSerifTC-SemiBold-subset.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Qingjing Serif Extra';
  src: url('assets/NotoSerifTC-extra.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Qingjing Serif Extra';
  src: url('assets/NotoSerifTC-extra-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Qingjing Serif Rare';
  src: url('assets/NotoSerifTC-rare.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #04070d;
  --bg-deep: #020409;
  --paper: #e8dfcc;
  --paper-bright: #f4ebd8;
  --ink-dim: #b8af9e;
  --ink-faint: #817b70;
  --gold: #d8c38f;
  --gold-bright: #f1dfb2;
  --gold-dim: rgba(216, 195, 143, .58);
  --line: rgba(216, 195, 143, .16);
  --line-soft: rgba(232, 223, 204, .09);
  --red: #9b392e;
  --red-bright: #b54838;
  --serif: 'Qingjing Serif', 'Qingjing Serif Extra', 'Qingjing Serif Rare', 'Noto Serif CJK TC', 'Source Han Serif TC', 'Songti TC', 'STSong', 'SimSun', serif;
  --sans: 'Noto Sans CJK TC', 'Source Han Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --reading-size: 19px;
  --reading-leading: 2.08;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --header-h: 78px;
}

html[data-font="s"] { --reading-size: 17px; }
html[data-font="m"] { --reading-size: 19px; }
html[data-font="l"] { --reading-size: 22px; }
html[data-font="xl"] { --reading-size: 26px; }
html[data-font="l"] .sutra-panel,
html[data-font="xl"] .sutra-panel { max-width: 780px; }

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-width: 300px;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--serif);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-loading { overflow: hidden; }
body.overlay-open { overflow: hidden; }

::selection { background: rgba(216, 195, 143, .25); color: var(--paper-bright); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
em { font-style: normal; }

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  left: 16px;
  top: 14px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--paper);
  color: #111;
  font-family: var(--sans);
  font-size: 12px;
  transform: translateY(-160%);
  transition: transform .25s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------- the living ground -------------------------------------------- */

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg);
}
.stage canvas { display: block; width: 100%; height: 100%; }

.stage-wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(110% 80% at 50% 44%, transparent 0%, transparent 46%, rgba(2, 4, 9, .28) 76%, rgba(2, 4, 9, .58) 100%),
    linear-gradient(180deg, rgba(2, 4, 9, .42) 0%, transparent 20%, transparent 70%, rgba(2, 4, 9, .55) 100%);
}

.grain {
  position: fixed;
  inset: -40%;
  z-index: 2;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.75'/%3E%3C/svg%3E");
  animation: grainShift 18s steps(6) infinite;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 4, 9, .62) 0%, transparent 16%, transparent 82%, rgba(2, 4, 9, .76) 100%),
    radial-gradient(120% 100% at 50% 50%, transparent 54%, rgba(2, 4, 9, .46) 100%);
}

body.no-webgl .stage {
  background:
    radial-gradient(60% 60% at 60% 38%, rgba(78, 101, 131, .24), transparent 70%),
    radial-gradient(50% 50% at 25% 75%, rgba(122, 88, 50, .12), transparent 72%),
    #04070d;
}

@keyframes grainShift {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-1.5%, 1%, 0); }
  50% { transform: translate3d(.8%, -1.4%, 0); }
  75% { transform: translate3d(1.2%, .8%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* ---------- loader ------------------------------------------------------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: var(--bg-deep);
  transition: opacity 1s var(--ease), visibility 1s;
}
.loader-mark {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 195, 143, .55);
  color: var(--gold);
  font-size: 30px;
  position: relative;
  animation: sealBreathe 2.6s ease-in-out infinite;
}
.loader-mark::before,
.loader-mark::after {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(216, 195, 143, .14);
}
.loader-mark::after { inset: -10px; border-color: rgba(216, 195, 143, .08); }
.loader p {
  margin: 0;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .5em;
  color: var(--ink-faint);
}
body.is-ready .loader { opacity: 0; visibility: hidden; pointer-events: none; }

@keyframes sealBreathe {
  0%, 100% { opacity: .68; transform: scale(.98); }
  50% { opacity: 1; transform: scale(1); }
}

/* ---------- header ------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(18px, 3.6vw, 46px);
  transition: background .55s var(--ease), border-color .55s, backdrop-filter .55s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(3, 6, 12, .66);
  border-bottom-color: var(--line-soft);
  -webkit-backdrop-filter: blur(18px) saturate(.85);
  backdrop-filter: blur(18px) saturate(.85);
}
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--red);
  color: #f2e6d2;
  font-size: 18px;
  line-height: 1;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 236, 206, .18), 0 2px 14px rgba(0, 0, 0, .24);
  transform: rotate(-1.2deg);
}
.brand-word { display: flex; align-items: baseline; gap: 10px; }
.brand-word strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--paper-bright);
  white-space: nowrap;
}
.brand-word small {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .34em;
  color: var(--gold-dim);
  white-space: nowrap;
}
.now-reading {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) translateY(6px);
  margin: 0;
  max-width: min(46vw, 520px);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .28em;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  pointer-events: none;
}
.site-header.has-chapter .now-reading,
body.is-reader .now-reading { opacity: 1; transform: translate(-50%, -50%); }
body.is-reader .now-reading { max-width: min(34vw, 280px); }

.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 30px); }
.nav-text {
  position: relative;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .26em;
  color: var(--ink-dim);
  padding: 6px 0;
  transition: color .3s;
}
.nav-text::after {
  content: '';
  position: absolute;
  left: 0;
  right: .26em;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}
.nav-text:hover { color: var(--gold-bright); }
.nav-text:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-icon {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 13px;
  color: var(--gold-dim);
  transition: border-color .3s, color .3s, background .3s;
}
.nav-icon:hover, .nav-icon[aria-expanded="true"] {
  border-color: rgba(216, 195, 143, .46);
  color: var(--gold-bright);
  background: rgba(216, 195, 143, .06);
}

.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  pointer-events: none;
  background: rgba(255, 255, 255, .025);
}
.read-progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, rgba(155, 57, 46, .5), var(--gold), var(--gold-bright));
  box-shadow: 0 0 16px rgba(216, 195, 143, .35);
}

/* ---------- cover -------------------------------------------------------- */

.cover {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + 26px) clamp(22px, 5vw, 72px) clamp(24px, 4vh, 48px);
}
.cover-grid {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(150px, .7fr) auto minmax(90px, .55fr);
  align-items: center;
  gap: clamp(24px, 5vw, 90px);
}
.cover-left { justify-self: start; align-self: center; padding-bottom: 5vh; }
.cover-kicker, .cover-translator {
  margin: 0;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .25em;
  color: var(--ink-dim);
}
.cover-kicker { color: var(--gold-dim); margin-bottom: 9px; }
.cover-translator { color: var(--ink-faint); }
.cover-seal {
  width: 62px;
  height: 62px;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: var(--red);
  color: #f2e6d2;
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: .08em;
  box-shadow: inset 0 0 0 1px rgba(255, 235, 205, .2), inset 0 0 18px rgba(52, 5, 2, .18), 0 6px 28px rgba(0, 0, 0, .2);
  transform: rotate(-2deg);
}
.cover-line { width: 54px; height: 1px; background: var(--line); margin: 30px 0 18px; }
.cover-source {
  margin: 0;
  font-family: var(--sans);
  font-size: 9px;
  line-height: 2;
  letter-spacing: .16em;
  color: var(--ink-faint);
}

.cover-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  animation: coverIn 1.6s var(--ease) .2s both;
}
.cover-title {
  margin: 0;
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  gap: clamp(20px, 3.2vw, 48px);
  font-weight: 600;
  line-height: 1;
  color: var(--paper-bright);
  text-shadow: 0 0 50px rgba(216, 195, 143, .16), 0 2px 30px rgba(0, 0, 0, .5);
}
.cover-title span {
  display: block;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: clamp(44px, 9.2vh, 86px);
  letter-spacing: .13em;
}
.cover-title-main { color: var(--gold-bright); }
.cover-title-rest { color: var(--paper); }
.cover-sub {
  margin: clamp(26px, 4.2vh, 42px) 0 0;
  padding-left: .55em;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .55em;
  color: var(--ink-faint);
}

.cover-right {
  justify-self: end;
  align-self: center;
  display: flex;
  align-items: flex-start;
  gap: 30px;
  padding-bottom: 5vh;
}
.cover-number {
  margin: 0;
  writing-mode: vertical-rl;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .3em;
  color: var(--ink-faint);
}

.cover-bottom {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 20px;
  padding-top: clamp(20px, 3vh, 34px);
  border-top: 1px solid rgba(232, 223, 204, .07);
}
.cover-index { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cover-index span {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .24em;
  color: var(--ink-faint);
}
.cover-index i { width: 1px; height: 11px; background: var(--line); }
.cover-index p {
  flex-basis: 100%;
  margin: 4px 0 0;
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--ink-dim);
}
.enter-link {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .46em;
  color: var(--gold);
  transition: color .3s;
}
.enter-link svg { width: 18px; height: 18px; opacity: .7; animation: descend 2.6s ease-in-out infinite; }
.enter-link:hover { color: var(--gold-bright); }
.cover-note {
  justify-self: end;
  margin: 0;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .2em;
  color: rgba(129, 123, 112, .7);
}

@keyframes coverIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
@keyframes descend {
  0%, 100% { transform: translateY(-2px); opacity: .45; }
  50% { transform: translateY(5px); opacity: .9; }
}

/* ---------- chapters ----------------------------------------------------- */

.prologue, .chapter { position: relative; padding: clamp(100px, 14vh, 170px) 0 clamp(90px, 12vh, 150px); }
.prologue { min-height: 100svh; display: flex; align-items: center; padding-top: clamp(90px, 12vh, 150px); }
.prologue .chapter-inner { width: min(1090px, calc(100% - clamp(36px, 8vw, 120px))); }
.prologue .chapter-aside { position: static; }
.chapter + .chapter { padding-top: clamp(70px, 10vh, 120px); }

.chapter-inner {
  width: min(1090px, calc(100% - clamp(36px, 8vw, 120px)));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 250px minmax(0, 760px);
  gap: clamp(34px, 5vw, 80px);
  align-items: start;
}

.chapter-aside {
  position: sticky;
  top: calc(var(--header-h) + 44px);
  padding-top: 4px;
}
.chapter-volume {
  margin: 0 0 20px;
  padding-top: 15px;
  width: 72px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .38em;
  color: var(--gold-dim);
}
.chapter-index {
  margin: 0;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .34em;
  color: var(--ink-faint);
}
.chapter-index span { color: var(--gold); }
.chapter h2, .prologue h2 {
  margin: 18px 0 24px;
  font-size: clamp(26px, 2.6vw, 35px);
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: .09em;
  color: var(--paper-bright);
  text-shadow: 0 0 34px rgba(0, 0, 0, .35);
}
.chapter-aside::after {
  content: '';
  display: block;
  width: 1px;
  height: clamp(62px, 12vh, 130px);
  margin: 34px 0 0 5px;
  background: linear-gradient(180deg, var(--line), transparent);
}

.sutra-wrap { min-width: 0; }

.sutra-panel {
  position: relative;
  padding: clamp(30px, 4.4vw, 58px) clamp(24px, 4.4vw, 62px) 28px;
  background:
    linear-gradient(180deg, rgba(5, 9, 15, .54), rgba(4, 7, 12, .70)),
    radial-gradient(120% 90% at 30% 0%, rgba(216, 195, 143, .045), transparent 55%);
  border: 1px solid rgba(216, 195, 143, .17);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, .30),
    inset 0 0 0 1px rgba(255, 255, 255, .015);
  -webkit-backdrop-filter: blur(9px) saturate(.85);
  backdrop-filter: blur(9px) saturate(.85);
}
.sutra-panel::before,
.sutra-panel::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
  opacity: .55;
}
.sutra-panel::before {
  top: 9px;
  left: 9px;
  border-top: 1px solid var(--gold);
  border-left: 1px solid var(--gold);
}
.sutra-panel::after {
  right: 9px;
  bottom: 9px;
  border-bottom: 1px solid var(--gold);
  border-right: 1px solid var(--gold);
}

.panel-head, .panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .30em;
  color: rgba(184, 175, 158, .54);
}
.panel-head {
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line-soft);
}
.panel-head span:first-child { color: var(--gold-dim); }
.panel-foot {
  margin-top: clamp(32px, 5vw, 48px);
  padding-top: 17px;
  border-top: 1px solid var(--line-soft);
}
.panel-foot span:last-child { text-align: right; }

.sutra {
  padding-top: clamp(30px, 4vw, 42px);
  font-size: var(--reading-size);
  line-height: var(--reading-leading);
  letter-spacing: .015em;
  color: #e7dfce;
  text-align: justify;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .32);
  text-justify: inter-ideograph;
  overflow-wrap: anywhere;
}
.sutra p {
  margin: 0 0 1.28em;
  text-indent: 2em;
}
.sutra p:last-child { margin-bottom: 0; }
.sutra p:first-of-type { text-indent: 0; }
.sutra p:first-of-type::first-letter { color: var(--gold-bright); }
.sutra p.is-quote { text-indent: 2em; }
.sutra p.is-quote::first-letter { color: var(--gold); }

.verse-block {
  margin: clamp(38px, 6vw, 58px) 0 0;
  padding-top: clamp(24px, 3.5vw, 34px);
  border-top: 1px solid var(--line);
}
.verse-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 clamp(22px, 3.5vw, 34px);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .44em;
  color: var(--gold-dim);
}
.verse-label::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }
.verse-lines { width: fit-content; max-width: 100%; margin: 0 auto; }
.verse-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.9em;
  margin: 0;
  padding: .10em 0;
  color: #eee5d3;
  font-size: 1.03em;
  line-height: 2.02;
  letter-spacing: .04em;
  text-align: left;
}
.verse-row span { display: block; white-space: nowrap; }
.verse-row span:first-child { text-align: right; }
.verse-row span:last-child { text-align: left; }
.verse-block + p { margin-top: 1.4em; }

.chapter-pending {
  margin: 36px 0 8px;
  text-align: center;
  font-size: 14px;
  letter-spacing: .18em;
  color: var(--ink-faint);
}
.textual-note {
  margin: 26px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--line-soft);
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.9;
  letter-spacing: .08em;
  color: rgba(184, 175, 158, .68);
}
.textual-note span {
  display: inline-block;
  margin-right: 10px;
  color: var(--gold-dim);
  letter-spacing: .18em;
}

.scene-caption {
  margin: 16px 0 0;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .22em;
  color: rgba(184, 175, 158, .52);
  text-align: right;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chapter-end {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: clamp(36px, 5vw, 52px);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .4em;
  color: rgba(184, 175, 158, .44);
}
.chapter-end::before, .chapter-end::after {
  content: '';
  width: 34px;
  height: 1px;
  background: var(--line-soft);
}
.chapter-end i {
  width: 5px;
  height: 5px;
  display: block;
  background: var(--gold-dim);
  transform: rotate(45deg);
  margin-right: -.4em;
}

/* reveal */

/* ---------- chapter dots ------------------------------------------------- */

.chapter-dots {
  position: fixed;
  z-index: 40;
  right: clamp(12px, 1.7vw, 28px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 5px;
}
.chapter-dots button {
  position: relative;
  width: 28px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.chapter-dots button::before {
  content: '';
  width: 10px;
  height: 1px;
  background: rgba(232, 223, 204, .22);
  transition: width .35s var(--ease), background .35s;
}
.chapter-dots button::after {
  content: attr(data-label);
  position: absolute;
  right: 29px;
  top: 50%;
  transform: translateY(-50%) translateX(5px);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .18em;
  color: var(--ink-dim);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.chapter-dots button:hover::before,
.chapter-dots button.is-active::before { width: 22px; background: var(--gold); }
.chapter-dots button:hover::after { opacity: 1; transform: translateY(-50%); }
.chapter-dots button.is-active::before { box-shadow: 0 0 12px rgba(216, 195, 143, .45); }

/* ---------- colophon ----------------------------------------------------- */

.colophon {
  position: relative;
  padding: clamp(90px, 13vh, 160px) 0 42px;
  margin-top: 4vh;
  background:
    linear-gradient(180deg, rgba(3, 6, 11, .38), rgba(3, 6, 11, .9) 18%, rgba(3, 6, 11, .97)),
    radial-gradient(70% 50% at 50% 0%, rgba(216, 195, 143, .05), transparent 70%);
  border-top: 1px solid var(--line-soft);
}
.colophon-inner {
  width: min(1060px, calc(100% - clamp(36px, 8vw, 120px)));
  margin: 0 auto;
}
.section-eyebrow {
  margin: 0 0 20px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .44em;
  color: var(--gold-dim);
}
.colophon h2 {
  margin: 0 0 26px;
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.35;
  letter-spacing: .07em;
  font-weight: 600;
  color: var(--paper-bright);
}
.colophon-lead {
  max-width: 760px;
  margin: 0 0 clamp(48px, 8vw, 82px);
  font-size: 15px;
  line-height: 2.05;
  color: var(--ink-dim);
}
.colophon-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px clamp(36px, 7vw, 90px);
  padding-top: 38px;
  border-top: 1px solid var(--line);
}
.colophon-block h3 {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .38em;
  color: var(--gold);
}
.colophon-block p, .colophon-block li {
  margin: 0 0 9px;
  font-size: 13px;
  line-height: 2;
  color: var(--ink-dim);
}
.colophon-block ul { margin: 0; padding: 0; list-style: none; }
.colophon-block li { position: relative; padding-left: 14px; }
.colophon-block li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .95em;
  width: 4px;
  height: 4px;
  border: 1px solid var(--gold-dim);
  transform: rotate(45deg);
}
.colophon-block a {
  color: var(--gold);
  border-bottom: 1px solid rgba(216, 195, 143, .28);
  transition: color .3s, border-color .3s;
}
.colophon-block a:hover { color: var(--gold-bright); border-color: var(--gold); }
.colophon-foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 70px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .24em;
  color: rgba(129, 123, 112, .62);
}
.colophon-foot p { margin: 0; }

/* ---------- toc dialog --------------------------------------------------- */

.toc-dialog {
  width: min(1060px, calc(100% - 32px));
  max-height: 88svh;
  margin: auto;
  padding: 0;
  border: 1px solid rgba(216, 195, 143, .22);
  background: #070b12;
  color: var(--paper);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .65);
  overflow: hidden;
}
.toc-dialog::backdrop {
  background: rgba(2, 4, 8, .74);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.toc-shell { display: flex; flex-direction: column; max-height: 88svh; }
.toc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: clamp(28px, 4vw, 48px) clamp(24px, 5vw, 58px) 24px;
  border-bottom: 1px solid var(--line);
}
.toc-head .section-eyebrow { margin-bottom: 12px; }
.toc-head h2 {
  margin: 0;
  font-size: clamp(27px, 3.4vw, 42px);
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--paper-bright);
}
.toc-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-dim);
  transition: border-color .3s, color .3s, transform .4s var(--ease);
}
.toc-close svg { width: 17px; height: 17px; }
.toc-close:hover { border-color: var(--gold); color: var(--gold-bright); transform: rotate(90deg); }
.toc-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 clamp(30px, 6vw, 78px);
  padding: 18px clamp(24px, 5vw, 58px) 46px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.toc-group { min-width: 0; }
.toc-group-title {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 15px 0 8px;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .4em;
  color: var(--gold-dim);
}
.toc-group-title::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }
.toc-link {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: baseline;
  gap: 13px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
  transition: color .3s, padding .35s var(--ease);
}
.toc-link:hover { color: var(--gold-bright); padding-left: 6px; }
.toc-link.is-current { color: var(--gold-bright); }
.toc-link .toc-num {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .12em;
  color: var(--gold-dim);
}
.toc-link .toc-name { font-size: 16px; letter-spacing: .08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toc-foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: auto;
  padding: 18px clamp(24px, 5vw, 58px) 22px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .22em;
  color: var(--ink-faint);
}

/* ---------- settings ----------------------------------------------------- */

.settings {
  position: fixed;
  top: calc(var(--header-h) - 4px);
  right: clamp(14px, 3vw, 38px);
  z-index: 70;
  width: min(336px, calc(100vw - 28px));
  padding: 20px 21px 18px;
  background: rgba(7, 11, 18, .96);
  border: 1px solid rgba(216, 195, 143, .22);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  animation: panelIn .35s var(--ease) both;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.settings-head p {
  margin: 0;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .34em;
  color: var(--gold);
}
.settings-head button { color: var(--ink-faint); font-size: 20px; line-height: 1; padding: 0 3px; }
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
}
.setting-row > span {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .24em;
  color: var(--ink-dim);
}
.segmented { display: flex; border: 1px solid var(--line); }
.segmented button {
  min-width: 36px;
  height: 27px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .04em;
  white-space: nowrap;
  color: var(--ink-faint);
  border-left: 1px solid var(--line-soft);
  transition: color .25s, background .25s;
}
.segmented button:first-child { border-left: 0; }
.segmented button:hover { color: var(--paper); }
.segmented button[aria-pressed="true"] { color: #151008; background: var(--gold); }
.settings-note {
  margin: 14px 0 0;
  font-size: 10px;
  line-height: 1.8;
  color: rgba(129, 123, 112, .8);
}

/* ---------- noscript ----------------------------------------------------- */

.noscript {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 30px;
  background: var(--bg);
  color: var(--paper);
  font-size: 15px;
  line-height: 2;
  text-align: center;
}
.noscript a { color: var(--gold); border-bottom: 1px solid var(--gold-dim); }

/* 古德註疏：章首入口與可對讀的側欄。 */
.chapter-notes {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  min-height: 34px;
  padding: 2px 10px;
  border: 1px solid rgba(138, 94, 42, .28);
  border-radius: 999px;
  background: var(--panel-bg);
  color: var(--gold);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: .12em;
  cursor: pointer;
}
.chapter-notes:hover { border-color: var(--gold); background: var(--dialog); }
.chapter-notes:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.chapter-notes-count { color: var(--ink-faint); font-size: 11px; letter-spacing: .02em; }
.notes-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  width: min(470px, 100vw);
  color: var(--text);
  background: var(--dialog);
  border-left: 1px solid rgba(138, 94, 42, .2);
  box-shadow: -18px 0 60px rgba(53, 38, 20, .14);
}
.notes-drawer[hidden], .notes-scrim[hidden] { display: none; }
.notes-scrim {
  position: fixed;
  inset: 0;
  z-index: 89;
  background: rgba(30, 25, 18, .3);
}
.notes-shell { display: flex; flex-direction: column; height: 100%; }
.notes-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 26px 24px 18px;
  border-bottom: 1px solid rgba(138, 94, 42, .14);
}
.notes-head .section-eyebrow { margin: 0 0 8px; }
.notes-head h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: .08em; }
.notes-source { margin: 8px 0 0; color: var(--text-dim); font-size: 13px; line-height: 1.6; }
.notes-sources { display: flex; gap: 8px; overflow-x: auto; padding: 12px 24px; border-bottom: 1px solid rgba(138, 94, 42, .1); }
.notes-sources[hidden] { display: none; }
.notes-source-button {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: max-content;
  padding: 8px 11px;
  border: 1px solid rgba(138, 94, 42, .18);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.notes-source-button small { color: var(--ink-faint); font-size: 11px; }
.notes-source-button[aria-pressed="true"] { border-color: var(--gold); background: var(--panel-bg); color: var(--gold); }
.notes-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 24px 22px; }
.notes-body > .quiet-empty { padding: 22px 0; }
.note-card { padding: 22px 0; border-bottom: 1px solid rgba(138, 94, 42, .12); }
.note-card:last-child { border-bottom: 0; }
.note-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--gold); font-size: 11px; letter-spacing: .16em; }
.note-unlocated, .note-review { color: var(--ink-faint); letter-spacing: .04em; }
.note-source-ref { color: var(--ink-faint); font-size: 10px; letter-spacing: .03em; white-space: nowrap; }
.note-quote {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-left: 2px solid rgba(138, 94, 42, .4);
  background: color-mix(in srgb, var(--gold) 6%, transparent);
}
.note-quote-label { display: block; margin-bottom: 6px; color: var(--ink-faint); font-size: 11px; letter-spacing: .12em; }
.note-quote p { margin: 0; font-size: 15px; line-height: 1.85; }
.note-jump { margin-top: 8px; padding: 2px 0; font-size: 12px; }
.note-text p { margin: 0 0 10px; font-size: 15px; line-height: 1.92; color: var(--text); }
.note-text p:last-child { margin-bottom: 0; }
.notes-foot { padding: 14px 24px 20px; border-top: 1px solid rgba(138, 94, 42, .14); color: var(--ink-faint); font-size: 11px; line-height: 1.7; }
.notes-foot p { margin: 0 0 4px; }
.notes-foot a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(138, 94, 42, .3); }
[data-para].is-noted { background: rgba(196, 151, 75, .18); box-shadow: 0 0 0 8px rgba(196, 151, 75, .18); transition: background .2s ease, box-shadow .2s ease; }
@media (min-width: 901px) {
  .notes-scrim { background: transparent; pointer-events: none; }
}
@media (max-width: 900px) {
  .notes-drawer { width: 100%; border-left: 0; }
  .notes-head { padding: max(20px, env(safe-area-inset-top)) 18px 16px; }
  .notes-sources { padding: 10px 18px; }
  .notes-body { padding: 0 18px 18px; }
  .notes-foot { padding: 12px 18px max(18px, env(safe-area-inset-bottom)); }
  .note-quote p, .note-text p { font-size: 16px; }
}

/* ---------- responsive --------------------------------------------------- */

@media (max-width: 1180px) {
  .chapter-dots { display: none; }
  .cover-grid { grid-template-columns: minmax(130px, .55fr) auto minmax(60px, .4fr); gap: 34px; }
}

@media (max-width: 1080px) {
  :root { --header-h: 68px; }
  .chapter-inner {
    grid-template-columns: minmax(0, 1fr);
    width: min(760px, calc(100% - clamp(30px, 8vw, 80px)));
    gap: 34px;
  }
  .chapter-aside { position: static; padding-top: 0; }
  .chapter-aside::after { display: none; }
  .chapter h2, .prologue h2 { margin-top: 14px; }
  .chapter-volume { width: 60px; margin-bottom: 16px; }
  .cover-grid { grid-template-columns: 1fr auto; }
  .cover-left { display: none; }
  .cover-center { grid-column: 1 / -1; }
  .cover-right { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
  .cover-bottom { grid-template-columns: 1fr auto 1fr; }
  .cover-note { display: none; }
  .colophon-grid { gap: 36px; }
}

@media (max-width: 720px) {
  .brand-word small { display: none; }
  body.is-reader .brand-word small { display: inline; }
  .now-reading { display: none; }
  .site-nav { gap: 17px; }
  .cover { padding-left: 20px; padding-right: 20px; }
  .cover-title span { font-size: clamp(43px, 8.6vh, 66px); }
  .cover-right { display: none; }
  .cover-sub { margin-top: 26px; font-size: 9px; }
  .cover-bottom { grid-template-columns: 1fr; justify-items: center; gap: 22px; text-align: center; }
  .cover-index { justify-content: center; }
  .cover-index p { text-align: center; }
  .cover-bottom .enter-link { order: -1; }
  .sutra-panel { padding-left: clamp(19px, 5vw, 32px); padding-right: clamp(19px, 5vw, 32px); }
  .panel-head, .panel-foot { font-size: 7px; letter-spacing: .2em; }
  .sutra { line-height: 2; letter-spacing: 0; }
  .chapter h2, .prologue h2 { font-size: clamp(27px, 7vw, 34px); }
  .toc-body { grid-template-columns: 1fr; padding-top: 8px; }
  .toc-group + .toc-group { margin-top: 8px; }
  .toc-link .toc-name { font-size: 15px; }
  .colophon-grid { grid-template-columns: 1fr; }
  .colophon-foot { flex-direction: column; gap: 5px; }
  .settings { left: 12px; right: 12px; width: auto; top: calc(var(--header-h) + 6px); }
}

@media (max-width: 520px) {
  .cover-title { gap: 16px; }
  .cover-title span { font-size: clamp(39px, 8.2vh, 58px); letter-spacing: .08em; }
  .cover-seal { display: none; }
  .chapter-inner { width: calc(100% - 26px); }
  .sutra-panel { border-left: 0; border-right: 0; }
  .verse-row { gap: 1.25em; font-size: .96em; }
  .verse-row span { white-space: normal; }
  .chapter-dots { display: none; }
  .toc-dialog { width: calc(100% - 16px); max-height: 92svh; }
  .toc-shell { max-height: 92svh; }
  .toc-link { grid-template-columns: 20px minmax(0, 1fr); gap: 9px; }
  .loader-mark { width: 58px; height: 58px; font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .enter-link svg, .loader-mark { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* Explicit "quiet" setting: stop decorative CSS motion as well. */
html[data-motion="off"] { scroll-behavior: auto; }
html[data-motion="off"] .grain,
html[data-motion="off"] .enter-link svg,
html[data-motion="off"] .loader-mark { animation: none; }
html[data-motion="off"] .cover-center { animation: none; }

:where(a, button):focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}
.chapter-dots button:focus-visible::after { opacity: 1; transform: translateY(-50%); }

/* ==========================================================================
   Dunhuang direction — mineral pigments, moonlight, a wall of faded fresco
   ========================================================================== */

:root {
  --bg: #04080e;
  --bg-deep: #02050a;
  --paper: #e7ddc9;
  --paper-bright: #f2e7d2;
  --ink-dim: #b9ac96;
  --ink-faint: #8f8270;
  --gold: #c8a96b;
  --gold-bright: #ead3a2;
  --gold-dim: rgba(200, 169, 107, .60);
  --line: rgba(200, 169, 107, .19);
  --line-soft: rgba(231, 221, 201, .09);
  --red: #9e4a3d;
}

.patina {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .55;
  mix-blend-mode: soft-light;
  background:
    radial-gradient(45% 55% at 18% 35%, rgba(158, 74, 61, .14), transparent 70%),
    radial-gradient(40% 50% at 64% 28%, rgba(72, 111, 133, .15), transparent 72%),
    radial-gradient(50% 45% at 45% 88%, rgba(94, 124, 104, .10), transparent 74%),
    linear-gradient(180deg, rgba(26, 34, 39, .18), transparent 35%, rgba(38, 25, 18, .12) 100%);
}

.mural-frame {
  position: fixed;
  inset: 13px;
  z-index: 4;
  pointer-events: none;
  border: 1px solid rgba(200, 169, 107, .22);
  box-shadow: inset 0 0 70px rgba(2, 4, 8, .35);
}
.mural-frame::before,
.mural-frame::after {
  content: '';
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: rgba(200, 169, 107, .42);
  border-style: solid;
}
.mural-frame::before {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}
.mural-frame::after {
  right: -1px;
  bottom: -1px;
  border-width: 0 1px 1px 0;
}

.stage-wash {
  background:
    linear-gradient(90deg, rgba(3, 6, 10, .36) 0%, rgba(3, 6, 10, .10) 20%, transparent 38%, rgba(3, 6, 10, .16) 56%, rgba(2, 4, 9, .58) 78%, rgba(2, 4, 9, .78) 100%),
    linear-gradient(180deg, rgba(2, 4, 9, .58) 0%, transparent 18%, transparent 70%, rgba(2, 4, 9, .62) 100%),
    radial-gradient(120% 100% at 48% 46%, transparent 48%, rgba(2, 4, 9, .30) 82%, rgba(2, 4, 9, .55) 100%);
}

.cover { isolation: isolate; }
.cover::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 30%, rgba(3, 6, 10, .08) 47%, rgba(3, 6, 10, .52) 68%, rgba(3, 6, 10, .76) 100%);
}
.cover-grid, .cover-bottom { position: relative; z-index: 1; }
.cover::after {
  content: '';
  position: absolute;
  left: clamp(22px, 5vw, 72px);
  bottom: clamp(82px, 10vh, 120px);
  width: 1px;
  height: 90px;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(200, 169, 107, .24), transparent);
  pointer-events: none;
}

.cover-title-main {
  color: transparent;
  background: linear-gradient(180deg, #f3e1b7 0%, #d9bb82 52%, #a7824d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 26px rgba(0, 0, 0, .52));
}
.cover-title-rest { color: #ece2ce; text-shadow: 0 2px 26px rgba(0, 0, 0, .62); }
.cover-kicker, .cover-translator, .cover-source, .cover-index span, .cover-index p {
  text-shadow: 0 1px 12px rgba(0, 0, 0, .75);
}
.cover-seal { box-shadow: inset 0 0 0 1px rgba(255, 235, 205, .22), inset 0 0 22px rgba(52, 5, 2, .28), 0 8px 30px rgba(0, 0, 0, .35); }

.chapter-aside, .prologue .chapter-aside {
  text-shadow: 0 1px 16px rgba(0, 0, 0, .72);
}
.chapter h2, .prologue h2 { text-shadow: 0 2px 24px rgba(0, 0, 0, .60); }

.sutra-panel {
  background:
    linear-gradient(180deg, rgba(7, 11, 16, .72), rgba(5, 8, 12, .82)),
    radial-gradient(120% 90% at 30% 0%, rgba(200, 169, 107, .055), transparent 58%);
  border-color: rgba(200, 169, 107, .22);
  box-shadow:
    0 34px 100px rgba(0, 0, 0, .36),
    inset 0 0 0 1px rgba(255, 245, 224, .018),
    inset 0 0 70px rgba(0, 0, 0, .12);
}

.sutra { color: #e8dfcd; }
.verse-label, .panel-head span:first-child { color: var(--gold); }

.site-header.is-scrolled {
  background: rgba(4, 8, 13, .72);
  border-bottom-color: rgba(200, 169, 107, .14);
}

@media (max-width: 980px) {
  .mural-frame { inset: 9px; }
  .cover::before {
    background: radial-gradient(78% 62% at 50% 44%, rgba(3, 6, 10, .36), transparent 78%),
      linear-gradient(180deg, rgba(3, 6, 10, .22), transparent 30%, rgba(3, 6, 10, .24));
  }
}
@media (max-width: 720px) {
  .stage-wash {
    background:
      linear-gradient(180deg, rgba(2, 4, 9, .32) 0%, transparent 20%, transparent 66%, rgba(2, 4, 9, .42) 100%),
      radial-gradient(120% 100% at 50% 40%, transparent 42%, rgba(2, 4, 9, .28) 100%);
  }
  .cover::before {
    background: linear-gradient(180deg, rgba(3, 6, 10, .20) 0%, transparent 28%, rgba(3, 6, 10, .12) 66%, rgba(3, 6, 10, .36) 100%);
  }
  .patina { opacity: .34; }
}
@media (max-width: 520px) {
  .mural-frame { inset: 6px; }
  .patina { opacity: .40; }
  .cover-title-main { filter: drop-shadow(0 1px 14px rgba(0, 0, 0, .55)); }
  .cover-title-rest { text-shadow: 0 1px 16px rgba(0, 0, 0, .65); }
}

.cover-left { position: relative; isolation: isolate; padding: 18px 26px 18px 0; }
.cover-left::before {
  content: '';
  position: absolute;
  inset: -12px -40px -18px -22px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(65% 78% at 22% 48%, rgba(3, 6, 10, .48), transparent 74%);
}
.cover-kicker { color: rgba(234, 211, 162, .78); }
.cover-translator { color: rgba(231, 221, 201, .78); }
.cover-source { color: rgba(185, 172, 150, .82); }


@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .cover-title-main { color: var(--gold-bright); background: none; }
}

.chapter-aside { isolation: isolate; }
.chapter-aside::before {
  content: '';
  position: absolute;
  inset: -26px -48px -30px -34px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(72% 72% at 18% 36%, rgba(3, 6, 10, .48), transparent 76%);
}
.scene-caption {
  font-size: 9px;
  letter-spacing: .16em;
  color: rgba(198, 184, 162, .66);
}

.loader-fallback {
  max-width: 460px;
  padding: 0 28px;
  text-align: center;
  font-family: var(--sans);
  color: var(--ink-dim);
}
.loader-fallback p { margin: 0 0 12px; font-size: 12px; line-height: 2; letter-spacing: .08em; }
.loader-fallback code {
  display: inline-block;
  margin: 4px 0 14px;
  padding: 8px 12px;
  color: var(--gold-bright);
  background: rgba(0, 0, 0, .35);
  border: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: .02em;
}
.loader-fallback a { color: var(--gold); border-bottom: 1px solid var(--gold-dim); }

/* editorial labels removed from scripture; only chapter titles and verbatim excerpts */
.toc-link { grid-template-columns: 24px minmax(0, 1fr); }
@media (max-width: 520px) {
  .toc-link { grid-template-columns: 20px minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .brand-word small { letter-spacing: .18em; }
}

/* ==========================================================================
   Readability pass — auxiliary labels set a little larger
   ========================================================================== */

.site-nav .nav-text { font-size: 11px; letter-spacing: .20em; }
.brand-word small { font-size: 9.5px; letter-spacing: .20em; }
.now-reading { font-size: 11px; letter-spacing: .20em; }
.cover-kicker, .cover-translator { font-size: 12px; letter-spacing: .20em; }
.cover-source { font-size: 10.5px; line-height: 1.9; }
.cover-sub { font-size: 11.5px; letter-spacing: .38em; }
.cover-number { font-size: 10px; }
.cover-index span { font-size: 10.5px; letter-spacing: .16em; }
.cover-index p { font-size: 13px; letter-spacing: .12em; }
.cover-note { font-size: 10px; letter-spacing: .14em; }
.chapter-volume { font-size: 11px; letter-spacing: .28em; }
.chapter-index { font-size: 12px; letter-spacing: .24em; }
.panel-head, .panel-foot { font-size: 10px; letter-spacing: .22em; }
.verse-label { font-size: 10px; letter-spacing: .34em; }
.chapter-end { font-size: 10px; letter-spacing: .28em; }
.scene-caption { font-size: 10.5px; letter-spacing: .12em; color: rgba(211, 197, 175, .78); }
.chapter-dots button::after { font-size: 10px; }
.toc-head .section-eyebrow { font-size: 11px; letter-spacing: .30em; }
.toc-group-title, .toc-foot { font-size: 10px; letter-spacing: .26em; }
.toc-link .toc-num { font-size: 10px; }
.toc-link .toc-name { font-size: 17px; }
.settings-head p { font-size: 10px; letter-spacing: .26em; }
.setting-row > span { font-size: 10.5px; letter-spacing: .18em; }
.segmented button { font-size: 10.5px; }
.settings-note { font-size: 11.5px; line-height: 1.8; }
.colophon .section-eyebrow { font-size: 10.5px; letter-spacing: .32em; }
.colophon-block h3 { font-size: 10.5px; letter-spacing: .28em; }
.colophon-block p, .colophon-block li { font-size: 14px; line-height: 1.95; }
.colophon-lead { font-size: 15.5px; line-height: 1.95; }
.colophon-foot { font-size: 10px; letter-spacing: .18em; }
.loader p { font-size: 11px; letter-spacing: .36em; }
.loader-fallback p { font-size: 13px; }
.loader-fallback code { font-size: 12px; }

.cover-title span { font-size: clamp(42px, 8.6vh, 80px); }
@media (max-width: 720px) {
  .site-nav .nav-text { font-size: 10.5px; }
  .panel-head, .panel-foot { font-size: 9px; letter-spacing: .16em; }
  .toc-link .toc-name { font-size: 16px; }
  .colophon-block p, .colophon-block li { font-size: 13.5px; }
  .cover-title span { font-size: clamp(42px, 8.2vh, 58px); letter-spacing: .08em; }
}
@media (max-width: 520px) {
  .cover-title span { font-size: clamp(42px, 8.0vh, 56px); }
  .panel-head, .panel-foot { font-size: 9px; }
}

.enter-link { font-size: 12px; letter-spacing: .32em; }
.brand-word small { font-size: 10.5px; }
.cover-source { font-size: 11px; }
.cover-index span { font-size: 11px; }
.cover-note { font-size: 10.5px; }
@media (max-width: 720px) {
  .cover-sub { display: none; }
  .enter-link { font-size: 11px; }
}

@media (max-width: 720px) {
  .site-header.is-scrolled {
    background: rgba(4, 8, 13, .94);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ==========================================================================
   清淨覺 · 光明色
   Day is the canon: warm white, pale gold, sky blue, lotus pink.
   Night keeps the same forms in a lower key.
   ========================================================================== */

:root {
  --bg: #f3eee3;
  --bg-deep: #e9e1d3;
  --text: #211c15;
  --text-bright: #14110d;
  --text-dim: #5b5145;
  --text-faint: #7b6f61;
  --paper: var(--text);
  --paper-bright: var(--text-bright);
  --ink-dim: var(--text-dim);
  --ink-faint: var(--text-faint);
  --gold: #7a5a2e;
  --gold-bright: #543a1a;
  --gold-dim: rgba(122, 90, 46, .82);
  --line: rgba(122, 90, 46, .22);
  --line-soft: rgba(90, 64, 32, .12);
  --red: #8a3028;
  --sutra-ink: #211c15;
  --verse-ink: #211c15;
  --panel-bg: rgba(250, 246, 237, .82);
  --header-bg: rgba(243, 238, 227, .9);
  --dialog: #faf6ed;
  --settings-bg: rgba(250, 246, 237, .97);
  color-scheme: light;
}

html { color-scheme: light; }
body { color: var(--text); }
::selection { background: rgba(166, 124, 58, .22); color: var(--text-bright); }

.stage-wash {
  background:
    linear-gradient(180deg, rgba(255, 250, 242, .42) 0%, transparent 16%, transparent 74%, rgba(255, 248, 240, .35) 100%),
    radial-gradient(80% 60% at 72% 42%, rgba(255, 252, 247, .18), transparent 70%);
}
.vignette {
  background: radial-gradient(125% 100% at 50% 42%, transparent 58%, rgba(176, 132, 78, .07) 100%);
}
.patina {
  opacity: .55;
  mix-blend-mode: soft-light;
  background:
    radial-gradient(42% 36% at 50% 30%, rgba(255, 244, 214, .9), transparent 72%),
    radial-gradient(28% 32% at 16% 72%, rgba(232, 170, 178, .45), transparent 74%),
    radial-gradient(26% 30% at 84% 68%, rgba(150, 196, 206, .4), transparent 74%);
}
.mural-frame {
  border-color: rgba(166, 124, 58, .32);
  box-shadow: none;
}
.mural-frame::before,
.mural-frame::after { border-color: rgba(138, 94, 42, .55); }

body.no-webgl .stage {
  background:
    radial-gradient(ellipse at 50% 32%, #fff5d9 0%, rgba(255, 245, 217, .45) 28%, transparent 62%),
    linear-gradient(180deg, #d1dbd3 0%, #f1e9d6 52%, #e3d5bd 100%);
}

.site-header.is-scrolled,
.site-header.is-scrolled {
  background: var(--header-bg);
  border-bottom-color: var(--line-soft);
}
.cover::before {
  background: radial-gradient(48% 42% at 46% 46%, rgba(255, 252, 247, .35), transparent 72%);
}
.cover::after { background: linear-gradient(180deg, transparent, rgba(122, 84, 32, .28), transparent); }
.cover-left::before,
.chapter-aside::before { background: none; }
.cover-title { color: #3a3126; text-shadow: none; }
.cover-title-main {
  background: linear-gradient(180deg, #b1843e 0%, #5c3d16 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: none;
}
.cover-title-rest { color: #3a3126; text-shadow: none; }
.cover-title[data-long] span { font-size: clamp(32px, 6.2vh, 62px); letter-spacing: .06em; }
.cover-kicker, .cover-translator, .cover-source,
.cover-index span, .cover-index p,
.chapter-aside, .prologue .chapter-aside,
.chapter h2, .prologue h2 { text-shadow: none; }
.cover-kicker { color: var(--gold); }
.cover-translator, .cover-source { color: var(--text-dim); }

.sutra-panel {
  background: var(--panel-bg);
  border-color: rgba(138, 94, 42, .28);
  box-shadow: 0 18px 50px rgba(92, 62, 24, .08), inset 0 0 0 1px rgba(255, 255, 255, .65);
}
.sutra { color: var(--sutra-ink); text-shadow: none; }
.verse-row { color: var(--verse-ink); }
.panel-head, .panel-foot, .chapter-end, .scene-caption, .textual-note { color: var(--text-faint); }
.panel-head span:first-child, .verse-label { color: var(--gold); }
.textual-note span { color: var(--gold); }

.colophon {
  background:
    linear-gradient(180deg, rgba(246, 241, 230, .2), rgba(251, 247, 239, .92) 14%, rgba(251, 247, 239, .96)),
    radial-gradient(70% 40% at 50% 0%, rgba(255, 244, 220, .45), transparent 70%);
}
.toc-dialog {
  background: var(--dialog);
  color: var(--text);
  border-color: rgba(138, 94, 42, .28);
  box-shadow: 0 30px 80px rgba(70, 46, 16, .16);
}
.toc-dialog::backdrop { background: rgba(70, 50, 24, .28); }
.settings {
  background: var(--settings-bg);
  border-color: rgba(138, 94, 42, .28);
  box-shadow: 0 18px 50px rgba(70, 46, 16, .12);
}
.segmented button[aria-pressed="true"] { color: #fffaf3; background: var(--gold); }
.loader-fallback code { background: rgba(255, 252, 247, .8); color: var(--text); }
.read-progress { background: rgba(90, 60, 20, .06); }
.chapter-dots button::before { background: rgba(90, 60, 20, .28); }

.mantra {
  margin: 0;
  text-align: center;
  text-indent: 0;
  font-size: 1.16em;
  letter-spacing: .2em;
  line-height: 2.1;
  color: var(--gold);
}
.sutra-close {
  margin: 1.8em 0 0;
  text-align: center;
  text-indent: 0;
  letter-spacing: .42em;
  color: var(--text-dim);
}

/* ---------- homepage ----------------------------------------------------- */

.home .now-reading { opacity: 1; transform: translate(-50%, -50%); }
.home-hero {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-h) + 36px) 22px 28px;
}
.home-halo {
  position: absolute;
  width: min(560px, 86vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 250, 236, .78) 0%, rgba(255, 236, 196, .28) 42%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.home-kicker, .home-title, .home-lede, .home-meta, .home-enter { position: relative; z-index: 1; }
.home-kicker {
  margin: 0 0 18px;
  padding-left: .42em;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .46em;
  color: var(--gold);
}
.home-title {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3vw, 42px);
  margin: 0;
  font-weight: 600;
  font-size: clamp(64px, 10vw, 120px);
  line-height: .92;
  letter-spacing: .08em;
}
.home-title span {
  background: linear-gradient(180deg, #c4964a 0%, #6a4718 72%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home-lede {
  margin: 22px 0 0;
  font-size: clamp(18px, 2vw, 22px);
  letter-spacing: .28em;
  color: var(--text);
}
.home-meta {
  margin: 12px 0 0;
  max-width: 34em;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .16em;
  line-height: 1.8;
  color: var(--text-dim);
}
.home-enter { margin-top: 36px; }

.home-catalog {
  position: relative;
  padding: clamp(48px, 8vh, 88px) 0 clamp(36px, 6vh, 64px);
  background: linear-gradient(180deg, rgba(255, 250, 242, 0), rgba(255, 250, 242, .78) 10%, rgba(255, 250, 242, .9));
}
.home-catalog-inner, .home-close-inner {
  width: min(1040px, calc(100% - clamp(28px, 6vw, 80px)));
  margin: 0 auto;
}
.home-catalog-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 22px;
}
.home-catalog-head h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: .18em;
  font-weight: 600;
}
.home-catalog-head p:last-child {
  margin: 0 0 0 auto;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--text-faint);
}
.catalog-filters { display: flex; flex-direction: column; gap: 14px; margin: 6px 0 28px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.filter-row > p {
  margin: 0;
  min-width: 5.5em;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--text-faint);
}
.filter-options { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-options button {
  padding: 7px 12px;
  border: 1px solid rgba(138, 94, 42, .28);
  background: rgba(255, 252, 247, .55);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--text-dim);
}
.filter-options button[aria-pressed="true"] {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(255, 252, 247, .92);
}
.sutra-list { display: flex; flex-direction: column; gap: 16px; }
.sutra-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: clamp(16px, 3vw, 32px);
  align-items: center;
  padding: clamp(18px, 3vw, 28px) clamp(18px, 3vw, 32px);
  background: rgba(255, 252, 247, .84);
  border: 1px solid rgba(138, 94, 42, .24);
  box-shadow: 0 16px 40px rgba(92, 62, 24, .06);
  color: var(--text);
  transition: transform .45s var(--ease), border-color .3s;
}
.sutra-card:hover { transform: translateY(-3px); border-color: rgba(138, 94, 42, .5); }
.sutra-card-seal {
  margin: 0;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 26px;
  letter-spacing: .22em;
  color: #6e4a1c;
}
.sutra-card-kicker {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--gold);
}
.sutra-card h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.35;
}
.sutra-card-division {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--text);
}
.sutra-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.sutra-card-tags span {
  padding: 3px 8px;
  border: 1px solid rgba(138, 94, 42, .28);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--text-dim);
}
.sutra-card-blurb {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text-dim);
}
.sutra-card-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--text-faint);
}
.sutra-card-aside span:last-child { color: var(--gold); letter-spacing: .28em; }

.home-close { position: relative; padding: 20px 0 64px; }
.home-close h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: .08em;
  font-weight: 600;
}
.home-close p { margin: 0 0 12px; max-width: 46em; font-size: 15px; line-height: 1.95; color: var(--text-dim); }
.home-close-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--text-faint);
}

@media (max-width: 720px) {
  .cover-sub { display: block; font-size: 11px; letter-spacing: .22em; }
  .site-header.is-scrolled {
    background: rgba(246, 241, 230, .94);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .home-title { font-size: clamp(64px, 18vw, 92px); gap: 10px; }
  .home-lede { letter-spacing: .16em; font-size: 16px; }
  .home-meta { letter-spacing: .06em; }
  .home-catalog-head { flex-wrap: wrap; }
  .home-catalog-head p:last-child { margin-left: 0; }
  .sutra-card { grid-template-columns: 1fr auto; }
  .sutra-card-seal {
    writing-mode: horizontal-tb;
    grid-column: 1 / -1;
    font-size: 15px;
    letter-spacing: .32em;
  }
  .home-close-foot { flex-direction: column; }
  .stage-wash {
    background: linear-gradient(180deg, rgba(255, 250, 242, .3), transparent 22%, transparent 70%, rgba(255, 248, 240, .28));
  }
}

/* ---------- night ------------------------------------------------------- */

html[data-theme="night"] {
  --bg: #111619;
  --bg-deep: #0a0e11;
  --text: #e7decc;
  --text-bright: #f4ead8;
  --text-dim: #bcae97;
  --text-faint: #918472;
  --paper: var(--text);
  --paper-bright: var(--text-bright);
  --ink-dim: var(--text-dim);
  --ink-faint: var(--text-faint);
  --gold: #c7a86a;
  --gold-bright: #ead3a2;
  --gold-dim: rgba(199, 168, 106, .82);
  --line: rgba(224, 196, 138, .26);
  --line-soft: rgba(231, 221, 201, .12);
  --red: #a35348;
  --sutra-ink: #f3eadc;
  --verse-ink: #f7f0e4;
  --panel-bg: rgba(10, 14, 20, .8);
  --header-bg: rgba(8, 12, 18, .84);
  --dialog: #141b24;
  --settings-bg: rgba(16, 20, 28, .96);
  color-scheme: dark;
}
html[data-theme="night"] { color-scheme: dark; }
html[data-theme="night"] .stage-wash {
  background:
    linear-gradient(180deg, rgba(6, 10, 16, .45), transparent 18%, transparent 70%, rgba(6, 10, 16, .55)),
    radial-gradient(90% 80% at 50% 40%, transparent 40%, rgba(6, 10, 16, .35) 100%);
}
html[data-theme="night"] .vignette {
  background: radial-gradient(120% 100% at 50% 50%, transparent 50%, rgba(4, 6, 10, .45) 100%);
}
html[data-theme="night"] .patina { opacity: .28; }
html[data-theme="night"] body.no-webgl .stage {
  background:
    radial-gradient(ellipse at 50% 32%, rgba(180, 143, 76, .18), transparent 62%),
    linear-gradient(180deg, #17232a, #10161c 58%, #181d1d);
}
html[data-theme="night"] .cover::before {
  background: linear-gradient(90deg, transparent 20%, rgba(6, 10, 16, .2) 70%, rgba(6, 10, 16, .45));
}
html[data-theme="night"] .cover-title-rest { color: #f0e6d4; }
html[data-theme="night"] .cover-title-main,
html[data-theme="night"] .home-title span {
  background: linear-gradient(180deg, #fff6e4 0%, #e4c78a 58%, #b8894a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-theme="night"] .home-halo {
  background: radial-gradient(circle, rgba(255, 236, 196, .16), transparent 68%);
}
html[data-theme="night"] .colophon {
  background: linear-gradient(180deg, rgba(8, 12, 18, .2), rgba(8, 12, 18, .92) 16%, rgba(8, 12, 18, .96));
}
html[data-theme="night"] .toc-dialog::backdrop { background: rgba(2, 4, 8, .62); }
html[data-theme="night"] .segmented button[aria-pressed="true"] { color: #1a140c; background: var(--gold); }
html[data-theme="night"] .home-catalog {
  background: linear-gradient(180deg, transparent, rgba(10, 14, 20, .78) 12%, rgba(10, 14, 20, .9));
}
html[data-theme="night"] .sutra-card {
  background: rgba(16, 20, 28, .78);
  border-color: rgba(224, 196, 138, .24);
  box-shadow: none;
}
html[data-theme="night"] .sutra-card-seal { color: var(--gold); }
html[data-theme="night"] .filter-options button {
  background: rgba(16, 20, 28, .45);
  border-color: rgba(224, 196, 138, .28);
}
html[data-theme="night"] .filter-options button[aria-pressed="true"] {
  background: rgba(16, 20, 28, .86);
  color: var(--gold);
}
html[data-theme="night"] .sutra-card-tags span { border-color: rgba(224, 196, 138, .28); }
html[data-theme="night"] .loader-fallback code { background: rgba(0, 0, 0, .35); color: var(--gold-bright); }
@media (max-width: 720px) {
  html[data-theme="night"] .site-header.is-scrolled { background: rgba(8, 12, 18, .94); }
}

/* ---------- library ------------------------------------------------------ */

.home-panel { position: relative; padding: 8px 0 28px; }
.home-panel-inner, .dedication-inner {
  width: min(1040px, calc(100% - clamp(28px, 6vw, 80px)));
  margin: 0 auto;
}
.home-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 64px);
}
.home-panel h2, .dedication h2, .practice-main h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  letter-spacing: .14em;
}
.stack { display: flex; flex-direction: column; gap: 12px; }
.quiet-empty, .quiet-note, .privacy {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-dim);
}
.privacy { max-width: 48em; font-size: 13px; }
.resume-card, .bookmark-row, .verse-card, .dedication-inner, .practice-main .home-panel-inner {
  background: rgba(255, 252, 247, .84);
  border: 1px solid rgba(138, 94, 42, .22);
  box-shadow: 0 16px 40px rgba(92, 62, 24, .05);
}
.practice-main .home-panel-inner {
  padding: clamp(22px, 4.5vw, 40px);
}
.resume-card, .bookmark-row {
  display: block;
  padding: 14px 16px;
  color: var(--text);
}
.resume-kicker, .bookmark-title, .verse-source, .gloss-source, .sutra-card-count {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--gold);
}
.resume-place { margin: 4px 0; font-size: 16px; letter-spacing: .08em; }
.resume-excerpt, .bookmark-excerpt { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.7; }
.bookmark-row { display: flex; align-items: center; gap: 12px; }
.bookmark-link { display: flex; flex-direction: column; gap: 4px; min-width: 0; color: inherit; }
.bookmark-remove, .text-button {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--gold);
  border-bottom: 1px solid rgba(138, 94, 42, .35);
  padding-bottom: 2px;
}
.verse-card { padding: clamp(22px, 4vw, 40px); }
.verse-card blockquote {
  margin: 0 0 14px;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.7;
  letter-spacing: .08em;
}
.shelf { margin-top: 34px; }
.shelf h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .28em;
}
.shelf-note, .shelf-empty { margin: 0 0 12px; color: var(--text-dim); font-size: 14px; }
.shelf:has(.sutra-card) .shelf-empty { display: none; }
.sutra-card-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--text-faint);
}
.sutra-card-count { margin: 0; }
.home-actions { display: flex; align-items: center; gap: 18px; margin: 18px 0; }
.site-total { font-size: 18px; letter-spacing: .16em; }
.wall {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 30px;
  padding: clamp(22px, 3.4vw, 40px) clamp(20px, 3.8vw, 48px) clamp(12px, 2vw, 22px);
  border: 1px solid rgba(138, 94, 42, .2);
  border-radius: 3px;
  background: var(--panel-bg);
  box-shadow: none;
}
.wall::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  inset: 8px;
  border: 1px solid var(--line);
  background: none;
  opacity: .8;
}
.wall::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -130px;
  width: min(72%, 620px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  pointer-events: none;
  display: none;
}
.wall > * { position: relative; z-index: 1; }
.wall h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  letter-spacing: .22em;
  font-size: 20px;
}
.wall h3::before {
  content: '';
  width: 27px;
  height: 1px;
  flex: 0 0 auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.wall-line { margin: 0 0 8px; }
html[data-theme="night"] .wall {
  border-color: rgba(224, 196, 138, .2);
  background: var(--panel-bg);
  box-shadow: none;
}
@media (max-width: 600px) {
  .wall { padding: 22px 18px 12px; background-size: auto, cover; }
}
.day-total { margin: 0 0 8px; letter-spacing: .12em; }
.day-fold { margin: 0; border-bottom: 1px solid rgba(138, 94, 42, .16); }
.day-fold-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 0;
  text-align: left;
  letter-spacing: .06em;
  cursor: pointer;
}
.day-fold-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.day-fold-mark {
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  flex: 0 0 auto;
}
.day-fold-toggle[aria-expanded="true"] .day-fold-mark { transform: rotate(45deg); }
.day-fold-label { flex: 1; min-width: 0; }
.day-fold-count {
  margin-left: auto;
  color: var(--gold);
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: .04em;
  white-space: nowrap;
}
.day-fold ul { margin: 0 0 8px; padding: 0 0 0 18px; list-style: none; }
.day-fold li { margin: 0; line-height: 1.85; }
.day-fold-panel { padding-bottom: 8px; }
.day-fold-panel .quiet-note { margin: 2px 0 8px 18px; }
.practice-more { margin: 0 0 4px 18px; }
.pager { display: flex; gap: 18px; margin: 12px 0 0; }
.pager .text-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  font-size: 14px;
}
.remembered-name { color: var(--text-faint); letter-spacing: .12em; }

.dedication {
  position: relative;
  padding: clamp(48px, 8vh, 88px) 0;
}
.dedication-inner { padding: clamp(22px, 4vw, 40px); }
.dedication-verse { margin: 0 0 16px; font-size: clamp(20px, 2.4vw, 28px); letter-spacing: .12em; line-height: 1.8; }
.dedication-verse p { margin: 0; }
.dedicate-form, .practice-main .dedicate-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 18px;
}
.dedicate-form label { display: flex; flex-direction: column; gap: 6px; width: min(100%, 460px); }
.dedicate-form label span { font-family: var(--sans); font-size: 12px; letter-spacing: .18em; color: var(--text-faint); }
.dedicate-form input[type="text"], .dedicate-form input:not([type="checkbox"]) {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(138, 94, 42, .28);
  background: rgba(255, 252, 247, .9);
  color: var(--text);
  font: inherit;
  letter-spacing: .04em;
}
.wall-opt { flex-direction: row !important; align-items: flex-start; width: min(100%, 36em) !important; gap: 8px !important; }
.wall-opt span { letter-spacing: .04em !important; line-height: 1.7; color: var(--text-dim) !important; }
.passphrase-hint {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .04em;
  color: rgba(92, 72, 48, .58);
}
.dedicate-submit {
  width: min(100%, 460px);
  min-height: 48px;
  margin-top: 6px;
  padding: 12px 20px;
  border: 1px solid #6e4a22;
  background: #8d6233;
  color: #fffaf3;
  font-family: var(--sans);
  font-size: 17px;
  letter-spacing: .24em;
  text-indent: .24em;
}
.dedicate-submit:hover { background: #744f28; }
.dedicate-submit:active { background: #634322; }
.dedicate-submit:focus-visible {
  outline: 2px solid #8d6233;
  outline-offset: 3px;
}
.form-message, .dedicate-result { margin: 0; min-height: 1.4em; color: var(--gold); }
.practice-main { padding: calc(var(--header-h) + 28px) 0 64px; }
.practice-main .day-folds { margin-top: 0; }
.day-folds { margin-top: 18px; }
.practice-sum { color: var(--text-dim); letter-spacing: .08em; }
.practice-tabs {
  display: flex;
  gap: 28px;
  margin: 8px 0 0;
  border-bottom: 1px solid rgba(138, 94, 42, .16);
}
.practice-tab {
  min-height: 44px;
  padding: 8px 0 10px;
  letter-spacing: .18em;
  color: var(--text-dim);
}
.practice-tab[aria-selected="true"] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--gold);
}
.practice-tab:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.has-pin { position: relative; }
.sutra p.has-pin, .verse-block.has-pin { padding-right: 2.4em; }
.bookmark-pin {
  position: absolute;
  right: 0;
  top: .2em;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--text-faint);
  opacity: .35;
}
.has-pin:hover .bookmark-pin,
.bookmark-pin[aria-pressed="true"],
.bookmark-pin:focus-visible { opacity: 1; }
.bookmark-pin[aria-pressed="true"] { color: var(--gold); }
.gloss-term {
  border-bottom: 1px dotted rgba(138, 94, 42, .7);
  letter-spacing: inherit;
}
.gloss-term:hover, .gloss-term:focus-visible { color: var(--gold); }
.gloss-dialog {
  width: min(520px, calc(100% - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid rgba(138, 94, 42, .28);
  background: #fbf7ef;
  color: var(--text);
}
.gloss-dialog::backdrop { background: rgba(42, 36, 28, .28); }
.gloss-shell { position: relative; padding: 28px 28px 24px; }
.gloss-reading {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--gold);
}
.gloss-shell h2 { margin: 0 0 12px; font-size: 28px; letter-spacing: .12em; font-weight: 600; }
.gloss-shell p { margin: 0 0 12px; line-height: 1.85; }
.gloss-shell .toc-close { position: absolute; top: 12px; right: 12px; }

@media (max-width: 720px) {
  .home-split { grid-template-columns: 1fr; }
  .home-title { font-size: clamp(56px, 16vw, 84px); }
  body.is-reader .site-header { gap: 10px; padding-inline: 14px; }
  body.is-reader .brand { gap: 8px; }
  body.is-reader .brand-word { gap: 6px; }
  body.is-reader .brand-word strong { font-size: 14px; letter-spacing: .1em; }
  body.is-reader .brand-word small { font-size: 10px; letter-spacing: .12em; }
  body.is-reader .site-nav { gap: 12px; }
}

html[data-theme="night"] .resume-card,
html[data-theme="night"] .bookmark-row,
html[data-theme="night"] .verse-card,
html[data-theme="night"] .dedication-inner,
html[data-theme="night"] .practice-main .home-panel-inner,
html[data-theme="night"] .gloss-dialog {
  background: rgba(16, 20, 28, .86);
  border-color: rgba(224, 196, 138, .24);
  box-shadow: none;
  color: var(--text);
}
html[data-theme="night"] .dedicate-form input:not([type="checkbox"]) {
  background: rgba(8, 12, 18, .7);
  border-color: rgba(224, 196, 138, .28);
  color: var(--text);
}
html[data-theme="night"] .passphrase-hint { color: rgba(224, 196, 138, .55); }
html[data-theme="night"] .dedicate-submit {
  background: #c6a36a;
  border-color: #e4c98a;
  color: #24180e;
}
html[data-theme="night"] .dedicate-submit:hover { background: #d4b57e; }
html[data-theme="night"] .dedicate-submit:focus-visible { outline-color: #e4c98a; }
html[data-theme="night"] .day-fold { border-bottom-color: rgba(224, 196, 138, .2); }
html[data-theme="night"] .practice-tabs { border-bottom-color: rgba(224, 196, 138, .2); }


/* A remembered session should feel like returning to one's own desk. */
.practice-session {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  margin: 2px 0 8px;
  color: var(--text-dim);
  font-size: 14px;
  letter-spacing: .06em;
}
.practice-session strong {
  color: var(--text);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600;
  letter-spacing: .16em;
}
.practice-session .text-button { margin-left: auto; }


.dedicate-link {
  display: inline-block;
  margin-left: 4px;
  color: var(--gold);
  border-bottom: 1px solid var(--gold-dim);
  letter-spacing: .08em;
}
.dedicate-link:hover { color: var(--gold-bright); }

.dedicate-action {
  position: relative;
  width: min(100%, 460px);
}
.dedicate-action .dedicate-submit { width: 100%; }
.dedication .dedicate-submit:disabled,
.dedication .dedicate-form.is-pending .dedicate-submit:hover,
.dedication .dedicate-form.is-pending .dedicate-submit:active {
  opacity: 1;
  cursor: default;
  background: #8d6233;
  border-color: #6e4a22;
  color: #fffaf3;
}
.dedication .dedicate-result {
  width: min(100%, 460px);
  margin-top: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--panel-bg);
  color: var(--text);
}
.dedicate-seal-title,
.dedicate-seal-line,
.dedication .dedicate-result .dedicate-link { display: block; }
.dedication .dedicate-result[hidden],
.dedication .form-message[hidden] { display: none; }
.dedicate-seal-title {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: .22em;
  color: #6e4a22;
}
.dedicate-seal-line {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: .06em;
}
.dedication .dedicate-result .dedicate-link {
  margin: 10px 0 0;
}
.dedication .dedicate-form.is-failed .form-message {
  width: min(100%, 460px);
  min-height: 0;
  padding: 14px 16px;
  border: 1px solid rgba(120, 72, 48, .4);
  background: rgba(255, 248, 240, .94);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: .04em;
}
.dedicate-status-title {
  display: block;
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .2em;
  color: #6e4a22;
}
.dedicate-status-detail { display: block; }
html[data-theme="night"] .dedication .dedicate-result,
html[data-theme="night"] .dedication .dedicate-form.is-failed .form-message {
  background: rgba(16, 20, 28, .78);
  border-color: rgba(224, 196, 138, .34);
  color: var(--text);
}
html[data-theme="night"] .dedicate-seal-title,
html[data-theme="night"] .dedicate-status-title { color: #e4c98a; }
html[data-theme="night"] .dedication .dedicate-submit:disabled,
html[data-theme="night"] .dedication .dedicate-form.is-pending .dedicate-submit:hover,
html[data-theme="night"] .dedication .dedicate-form.is-pending .dedicate-submit:active {
  background: #c6a36a;
  border-color: #e4c98a;
  color: #24180e;
}

/* ==========================================================================
   清淨覺 · 紙與版心
   Aniconic ground: paper, ink, mineral accents, and a single ruled frame.
   No figurative image, no AI illustration, no ambient particles.
   ========================================================================== */

:root {
  --stage-paper: var(--bg);
  --accent: #365d63;
  --accent-soft: rgba(54, 93, 99, .16);
  --seal: #8a3028;
  --frame: rgba(122, 90, 46, .2);
  --field-moon: #fbf4df;
}
html[data-theme="night"] {
  --accent: #839ba0;
  --accent-soft: rgba(131, 155, 160, .16);
  --seal: #b65348;
  --frame: rgba(199, 168, 106, .22);
  --field-moon: #d8c5a0;
}
html[data-sutra="xinjing"] { --sutra-accent: #3f6270; --sutra-light: rgba(63, 98, 112, .10); }
html[data-sutra="jingang"] { --sutra-accent: #7a5a2e; --sutra-light: rgba(122, 90, 46, .10); }
html[data-sutra="dizang"] { --sutra-accent: #86623b; --sutra-light: rgba(134, 98, 59, .10); }
html[data-sutra="yuanjue"] { --sutra-accent: #9a7636; --sutra-light: rgba(154, 118, 54, .10); }
html[data-sutra="lengqie"] { --sutra-accent: #3e5d66; --sutra-light: rgba(62, 93, 102, .10); }
html[data-sutra="lengyan"] { --sutra-accent: #566c68; --sutra-light: rgba(86, 108, 104, .10); }
html[data-theme="night"][data-sutra] { --sutra-accent: #b9a071; --sutra-light: rgba(185, 160, 113, .12); }

.stage, body.no-webgl .stage {
  background: var(--stage-paper);
}
.stage::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Flat paper; no dark wash at the top. The only top light comes from the
     aniconic teaching field, which fades out before reading. */
  background:
    linear-gradient(180deg, transparent 0 82%, color-mix(in srgb, var(--bg-deep) 10%, transparent) 100%);
  opacity: .82;
}
.stage::after {
  content: '';
  position: fixed;
  inset: calc(var(--header-h) + 14px) clamp(14px, 3.2vw, 46px) 16px;
  z-index: 0;
  pointer-events: none;
  border: 1px solid var(--frame);
  border-width: 0 0 1px;
  opacity: .52;
}
.stage canvas { display: none; }
.stage-wash, html[data-theme="night"] .stage-wash { background: none; }
.patina, .home-halo, .mural-frame { display: none; }
.grain { animation: none; opacity: .026; mix-blend-mode: multiply; }
html[data-theme="night"] .grain { opacity: .035; mix-blend-mode: screen; }
.vignette { background: none; }

/* ---------- homepage ----------------------------------------------------- */

.home-hero {
  position: relative;
  width: min(100%, 1120px);
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(var(--header-h) + 48px) clamp(20px, 4vw, 48px) 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.home-hero::before {
  content: '';
  position: absolute;
  width: min(420px, 70vw);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}
.home-hero::after {
  content: '';
  position: absolute;
  width: min(356px, 60vw);
  aspect-ratio: 1;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  pointer-events: none;
}
.home-kicker,
.home-title,
.home-lede,
.home-meta,
.home-enter { position: relative; z-index: 1; }
.home-kicker { margin: 0 0 22px; }
.home-title {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  font-weight: 600;
  font-size: clamp(58px, 8.4vw, 104px);
  line-height: 1.02;
  letter-spacing: .08em;
}
.home-title span {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: var(--text);
}
.home-lede { margin: 22px 0 0; letter-spacing: .42em; }
.home-meta { margin: 14px 0 0; max-width: 32em; }
.home-enter { margin-top: 34px; }

.home-panel, .home-catalog, .home-close {
  background: var(--bg);
}
.home-panel { border-top: 1px solid var(--line-soft); }
.home-catalog { border-top: 1px solid var(--line-soft); }
.home-catalog {
  background: var(--bg);
}
.practice-page .home-panel { border-top: 0; }

/* ---------- reader cover ------------------------------------------------ */

.is-reader .cover {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - var(--header-h));
  padding: calc(var(--header-h) + 34px) clamp(18px, 5vw, 64px) 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg);
}
.is-reader .cover::before,
.is-reader .cover::after { display: none; }
.is-reader .cover { background: linear-gradient(180deg, var(--sutra-light, transparent), transparent 34%); }
.is-reader .cover-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.5fr) minmax(0, .55fr);
  align-items: center;
  gap: clamp(22px, 5vw, 64px);
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}
.is-reader .cover-left {
  justify-self: start;
  align-self: center;
  padding: 0;
  text-align: left;
}
.is-reader .cover-left .cover-seal,
.is-reader .cover-line,
.is-reader .cover-right { display: block; }
.is-reader .cover-center { width: auto; text-align: center; }
.is-reader .cover-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.is-reader .cover-kicker { color: var(--sutra-accent, var(--gold)); }
.is-reader .cover-title span {
  color: var(--text);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  text-shadow: none;
  font-size: clamp(38px, 6.2vh, 66px);
}
.is-reader .cover-title[data-long] span { font-size: clamp(30px, 5.2vh, 54px); }
.is-reader .cover-sub { margin: 18px 0 0; text-align: center; line-height: 1.8; }
.is-reader .panel-head span:first-child { color: var(--sutra-accent, var(--gold)); }
.is-reader .cover-right {
  justify-self: end;
  align-self: center;
  position: static;
  transform: none;
}
.is-reader .cover-bottom {
  width: 100%;
  max-width: 1180px;
  margin: clamp(28px, 5vh, 52px) auto 0;
  grid-template-columns: 1fr auto;
}
.is-reader .chapter, .is-reader .prologue { background: transparent; }

@media (max-width: 980px) {
  .home-hero { padding-top: calc(var(--header-h) + 30px); }
  .home-title { font-size: clamp(46px, 11vw, 76px); }
  .is-reader .cover { padding-top: calc(var(--header-h) + 20px); }
  .is-reader .cover-grid { grid-template-columns: 1fr; gap: 20px; }
  .is-reader .cover-left { order: 2; justify-self: center; text-align: center; }
  .is-reader .cover-left .cover-line { margin-left: auto; margin-right: auto; }
  .is-reader .cover-center { order: 1; }
  .is-reader .cover-right { order: 3; justify-self: center; }
  .is-reader .cover-left .cover-seal { margin-left: auto; margin-right: auto; }
}
@media (max-width: 600px) {
  .stage::after { inset: calc(var(--header-h) + 10px) 10px 10px; }
  .home-hero::before { width: min(310px, 78vw); }
  .home-hero::after { width: min(250px, 64vw); }
  .home-title { font-size: clamp(42px, 13vw, 64px); }
  .home-hero { padding-bottom: 38px; }
  .is-reader .cover { padding-left: 18px; padding-right: 18px; }
  .is-reader .cover-title span { font-size: clamp(34px, 8.8vh, 48px); }
  .is-reader .cover-bottom { grid-template-columns: 1fr; gap: 18px; }
  .is-reader .cover-bottom .enter-link { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
}

/* The dedication verse is a common liturgical verse, not part of the sutra. */
.dedication-label {
  margin: 30px 0 8px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .32em;
  color: var(--ink-faint);
}

/* ---------- abstract teaching field ------------------------------------- */
/* 靈山 · 空座 · 光明：a soft moon, an almost-empty seat, sparse listening
   marks, one low ridge and mist. An aniconic field, not a reconstruction. */

.teaching-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  color: var(--sutra-accent, var(--gold));
  opacity: .6;
  transition: opacity 1.1s var(--ease);
}
body.is-reading .teaching-field { opacity: 0; }
.teaching-field svg { display: block; width: 100%; height: 100%; }

.field-sky { transform-box: view-box; transform-origin: 720px 306px; animation: field-breathe 32s ease-in-out infinite; }
.field-moon-glow {
  fill: var(--field-moon, #fbf4df);
  opacity: .34;
  filter: blur(22px);
}
.field-moon {
  fill: var(--field-moon, #fbf4df);
  opacity: .26;
  filter: blur(2.5px);
}
.field-moon-ring {
  fill: none;
  stroke: var(--gold);
  stroke-width: .7;
  stroke-opacity: .55;
  filter: drop-shadow(0 0 10px rgba(196, 158, 92, .28));
}
.field-moon-ring-b {
  fill: none;
  stroke: var(--gold);
  stroke-width: .55;
  stroke-opacity: .24;
  stroke-dasharray: 1 12;
}
html[data-theme="night"] .field-moon-glow { opacity: 0; }
html[data-theme="night"] .field-moon-ring { filter: drop-shadow(0 0 14px rgba(210, 178, 112, .35)); }
html[data-theme="night"] .field-moon-ring { stroke-opacity: .58; }
html[data-theme="night"] .field-moon { fill: transparent; opacity: 0; filter: none; }

.field-light {
  fill: var(--field-moon);
  opacity: .15;
  filter: blur(24px);
}
html[data-theme="night"] .field-light, html[data-theme="night"] .field-mist { display: none; }

.field-mist-band {
  fill: var(--field-moon);
  opacity: .1;
  filter: blur(24px);
  animation: field-mist 42s ease-in-out infinite alternate;
}
.field-mist-b { animation-duration: 54s; animation-delay: -12s; }
.field-mist-c { animation-duration: 48s; animation-delay: -24s; opacity: .12; }

.field-seat-top {
  fill: none;
  stroke: var(--gold);
  stroke-width: .8;
  stroke-opacity: .2;
}
.field-seat-line {
  fill: none;
  stroke: var(--gold);
  stroke-width: .55;
  stroke-opacity: .1;
}

.field-assembly circle {
  fill: currentColor;
  opacity: .28;
  transform-box: fill-box;
  transform-origin: center;
  animation: field-listen 12s ease-in-out infinite;
}
.field-assembly circle:nth-child(3n) { animation-delay: -4s; }
.field-assembly circle:nth-child(3n + 1) { animation-delay: -8s; }

.field-ripples .field-ripple {
  fill: none;
  stroke: var(--gold);
  stroke-width: .65;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: field-ripple 30s cubic-bezier(.22, .61, .36, 1) infinite;
}
.field-ripple-b { animation-delay: 10s; }
.field-ripple-c { animation-delay: 20s; }

@keyframes field-breathe {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(1.012); opacity: 1; }
}
@keyframes field-ripple {
  0% { transform: scale(.78); opacity: 0; }
  24% { opacity: .12; }
  72% { opacity: .05; }
  100% { transform: scale(1.22); opacity: 0; }
}
@keyframes field-listen {
  0%, 100% { opacity: .25; }
  50% { opacity: .58; }
}
@keyframes field-mist {
  from { transform: translateX(-18px); }
  to { transform: translateX(18px); }
}

@media (max-width: 700px) {
  .teaching-field { opacity: .62; }
  .field-mist-a, .field-mist-b { display: none; }
  .field-ripples { display: none; }
}
html[data-motion="off"] .field-sky,
html[data-motion="off"] .field-mist-band,
html[data-motion="off"] .field-ripple,
html[data-motion="off"] .field-assembly circle { animation: none; }
html[data-motion="off"] .field-ripple { opacity: .1; }
@media (prefers-reduced-motion: reduce) {
  .field-sky,
  .field-mist-band,
  .field-ripple,
  .field-assembly circle { animation: none; }
  .field-ripple { opacity: .1; }
}
@media (max-width: 700px) {
  .teaching-field { opacity: .48; }
  .field-rays { display: none; }
}
html[data-motion="off"] .field-halo,
html[data-motion="off"] .field-ripple,
html[data-motion="off"] .field-assembly circle { animation: none; }
html[data-motion="off"] .field-ripple { opacity: .12; }
@media (prefers-reduced-motion: reduce) {
  .field-halo,
  .field-ripple,
  .field-assembly circle { animation: none; }
  .field-ripple { opacity: .12; }
}
