/* ============================================================
   Spiritual Sound Space — design system v2
   Sans body · serif display · terracotta accent · light/dark
   ============================================================ */

:root {
  --bg: #FAF8F4;
  --surface: #FFFFFF;
  --ink: #2C2416;
  --muted: #7A6C58;
  --accent: #C47A3C;
  --accent-deep: #A05F28;
  --accent-soft: #F5EAD9;
  --line: #E4DCC8;
  --header-bg: rgba(250, 248, 244, .94);
  --shadow-sm: 0 1px 2px rgba(60, 42, 10, .05), 0 2px 10px rgba(60, 42, 10, .05);
  --shadow-md: 0 2px 6px rgba(60, 42, 10, .07), 0 14px 34px rgba(60, 42, 10, .10);
  --btn-shadow: 0 2px 8px rgba(196, 122, 60, .25);
  --radius: 14px;
  --serif: Georgia, 'Times New Roman', 'Noto Serif', serif;
  --sans: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --wrap: 1120px;
  --prose: 44rem;
  --footer-bg: #2C2416;
  --footer-text: rgba(255, 255, 255, .65);
  --footer-link: rgba(255, 255, 255, .55);
  --footer-copy: rgba(255, 255, 255, .35);
}
[data-theme="dark"] {
  --bg: #14100A;
  --surface: #1D1811;
  --ink: #ECE4D4;
  --muted: #A3947D;
  --accent: #D99A55;
  --accent-deep: #E6B173;
  --accent-soft: #2E2415;
  --line: #352C1E;
  --header-bg: rgba(20, 16, 10, .94);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 10px rgba(0, 0, 0, .25);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, .4), 0 14px 34px rgba(0, 0, 0, .35);
  --btn-shadow: 0 2px 8px rgba(0, 0, 0, .4);
  --footer-bg: #0E0B06;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; border-radius: 12px; }
a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; color: var(--ink); text-wrap: balance; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 2.4rem 0 .9rem; }
h3 { font-size: 1.3rem; margin: 1.9rem 0 .6rem; }
h4 { font-family: var(--sans); font-size: .78rem; margin: 1.6rem 0 .4rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
h1 em, h2 em { font-style: italic; color: var(--accent); }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-in {
  max-width: var(--wrap); margin: 0 auto; padding: 0 1.1rem;
  display: flex; align-items: center; gap: .9rem; min-height: 62px;
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); margin-right: auto; flex: none; }
.brand svg.logo { width: 36px; height: 36px; display: block; }
.brand b { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; white-space: nowrap; letter-spacing: -.01em; }
.brand b::first-letter { letter-spacing: 0; }
@media (max-width: 899px) { .brand b { display: none; } }

.lang { display: flex; gap: .25rem; font-size: .74rem; flex: none; }
.lang a { text-decoration: none; color: var(--muted); padding: .3rem .55rem; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.lang a:hover { color: var(--accent-deep); border-color: var(--accent); }
.lang a[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.theme-toggle {
  flex: none; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); padding: 0;
}
.theme-toggle:hover { color: var(--accent-deep); border-color: var(--accent); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }

/* nav */
.nav-toggle-box { display: none; }
.nav-toggle {
  display: none; flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-toggle i { display: block; width: 17px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .15rem; }
.site-nav > ul > li { position: relative; }
.site-nav a {
  display: block; text-decoration: none; color: var(--muted); font-size: .9rem; font-weight: 500;
  padding: .55rem .7rem; border-radius: 8px; white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: var(--accent-soft); }
.site-nav a[aria-current="page"] { color: var(--accent-deep); background: var(--accent-soft); }
.site-nav .sub {
  display: none; position: absolute; top: 100%; left: 0; min-width: 250px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md);
  padding: .4rem; flex-direction: column; align-items: stretch;
}
.site-nav li:hover > .sub, .site-nav li:focus-within > .sub { display: flex; }
.site-nav .sub a { white-space: normal; font-weight: 400; }
.site-nav .caret { display: inline-block; margin-left: .3rem; font-size: .55rem; transform: translateY(-2px); color: var(--muted); }

@media (max-width: 1023px) {
  .nav-toggle { display: inline-flex; order: 6; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    max-height: calc(100dvh - 62px); overflow: auto; padding: .6rem 1rem 1.2rem;
  }
  .nav-toggle-box:checked ~ .site-nav { display: block; }
  .nav-toggle-box:checked ~ .nav-toggle i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-box:checked ~ .nav-toggle i:nth-child(2) { opacity: 0; }
  .nav-toggle-box:checked ~ .nav-toggle i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav a { font-size: 1rem; padding: .8rem .6rem; }
  .site-nav .sub {
    display: flex; position: static; box-shadow: none; border: 0; border-left: 2px solid var(--accent-soft);
    border-radius: 0; margin: 0 0 .3rem .8rem; padding: 0;
  }
}

/* ---------- Hero (home) ---------- */
.hero-plain { max-width: 900px; margin: 0 auto; padding: 4.2rem 1.2rem 1rem; text-align: center; }
.eyebrow {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent); font-weight: 600; margin: 0 0 1.2rem;
}
.hero-plain h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); line-height: 1.1; margin: 0 0 1.2rem; }
.hero-sub { color: var(--muted); max-width: 40rem; margin: 0 auto 1.8rem; font-size: 1.06rem; }
.hero-cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.hero-img {
  max-width: 620px; margin: 2.8rem auto 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: var(--shadow-md);
}
.hero-img img { display: block; border-radius: 10px; width: 100%; }

/* page header (non-home) */
.page-head { max-width: var(--wrap); margin: 0 auto; padding: 2.8rem 1.1rem 0; }
.page-head.narrow { max-width: calc(var(--prose) + 2.2rem); }
.page-head .crumb {
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin: 0 0 .5rem;
}
.page-head h1 { margin: 0 0 .5rem; }

/* ---------- Layout ---------- */
.content { max-width: var(--wrap); margin: 0 auto; padding: 1.1rem 1.1rem 4rem; }
.prose { max-width: var(--prose); margin-left: auto; margin-right: auto; }
.prose p { margin: 0 0 1.15em; }
.prose img { display: block; margin: 2rem auto; max-width: min(100%, 480px); box-shadow: var(--shadow-sm); }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.5rem 0; padding: .8rem 1.2rem; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--accent); color: #fff !important; text-decoration: none;
  font-family: var(--sans); font-weight: 600; font-size: .92rem;
  padding: .7rem 1.4rem; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  box-shadow: var(--btn-shadow); transition: background .18s, transform .18s;
}
.btn:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn.ghost {
  background: var(--surface); color: var(--ink) !important; border: 1px solid var(--line); box-shadow: none;
}
.btn.ghost:hover { border-color: var(--accent); color: var(--accent-deep) !important; background: var(--accent-soft); }
.btn-row { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.5rem 0; }

/* ---------- Cards ---------- */
.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.4rem; margin: 2rem 0; }
.covers a {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; text-align: center; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
}
.covers a:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.covers img { border-radius: 8px; margin: 0 auto; box-shadow: none; display: block; }
.covers .cap { font-size: .85rem; font-weight: 600; margin-top: .7rem; line-height: 1.35; }

.teasers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.1rem; margin: 3rem 0 2.6rem; }
.teasers a {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.25rem;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.teasers a:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.teasers b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.15rem; margin-bottom: .35rem; }
.teasers span { font-size: .86rem; color: var(--muted); line-height: 1.5; display: block; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: start; margin: 2rem 0; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }
.gallery a { display: block; margin: 0 0 1rem; break-inside: avoid; border-radius: 10px; }
.gallery img { display: block; width: 100%; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.gallery a:hover img { transform: scale(1.015); box-shadow: var(--shadow-md); }

dialog.lightbox { border: 0; border-radius: 12px; padding: 0; background: transparent; max-width: min(94vw, 1100px); }
dialog.lightbox::backdrop { background: rgba(14, 10, 3, .85); }
dialog.lightbox img { display: block; max-width: 100%; max-height: 88vh; margin: 0 auto; border-radius: 12px; }

/* ---------- Unified audio player ---------- */
.track {
  display: flex; align-items: center; gap: .9rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .8rem 1rem; margin: .9rem 0; box-shadow: var(--shadow-sm);
}
.track.playing { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-sm); }
.t-play {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center;
  transition: background .18s, transform .1s;
}
.t-play:hover { background: var(--accent-deep); }
.t-play:active { transform: scale(.94); }
.t-play svg { width: 16px; height: 16px; fill: currentColor; }
.t-body { flex: 1; min-width: 0; }
.t-title { font-weight: 600; font-size: .92rem; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-ctrl { display: flex; align-items: center; gap: .6rem; margin-top: .3rem; }
.t-time { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.t-seek {
  flex: 1; -webkit-appearance: none; appearance: none; height: 5px; border-radius: 999px; outline-offset: 3px;
  background: linear-gradient(to right, var(--accent) var(--p, 0%), var(--line) var(--p, 0%)); cursor: pointer;
}
.t-seek::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 2.5px solid var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.t-seek::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2.5px solid var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.t-dl {
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); border: 1px solid var(--line); background: var(--bg); text-decoration: none;
}
.t-dl:hover { color: var(--accent-deep); border-color: var(--accent); background: var(--accent-soft); }
.t-dl svg { width: 14px; height: 14px; fill: currentColor; }
.track audio { display: none; }
.no-js .track audio { display: block; width: 100%; }
.no-js .t-play, .no-js .t-ctrl { display: none; }
@media (max-width: 480px) {
  .track { padding: .7rem .75rem; gap: .65rem; }
  .t-play { width: 40px; height: 40px; }
  .t-dl { width: 34px; height: 34px; }
}

.playlist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: .6rem; margin: 2rem 0; }
.playlist .track { border: 0; box-shadow: none; margin: 0; border-radius: 10px; background: transparent; }
.playlist .track + .track { border-top: 1px solid var(--line); border-radius: 0; }
.playlist .track.playing { background: var(--accent-soft); box-shadow: none; }

/* ---------- Video ---------- */
video.vid { display: block; width: 100%; max-width: 760px; margin: 2rem auto; border-radius: var(--radius); background: #000; box-shadow: var(--shadow-md); }
.yt {
  position: relative; display: block; aspect-ratio: 16 / 9; max-width: 100%;
  background: #000 center / cover no-repeat; border-radius: var(--radius); overflow: hidden;
  margin: 2rem auto; cursor: pointer; border: 0; padding: 0; width: 100%;
  box-shadow: var(--shadow-md);
}
.yt::after { content: ""; position: absolute; inset: 0; margin: auto; width: 72px; height: 50px; background: rgba(20, 14, 4, .8); border-radius: 14px; }
.yt::before {
  content: ""; position: absolute; inset: 0; margin: auto; z-index: 1;
  width: 0; height: 0; border-style: solid; border-width: 11px 0 11px 19px;
  border-color: transparent transparent transparent #fff;
}
.yt:hover::after { background: var(--accent); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Forms / notices ---------- */
.form-card {
  max-width: 560px; margin: 2rem auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm);
}
.form-card label { display: block; font-size: .84rem; font-weight: 600; margin: 1rem 0 .3rem; }
.form-card input, .form-card textarea {
  width: 100%; padding: .7rem .85rem; font: inherit; font-size: .95rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
}
.form-card input:focus, .form-card textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.form-card .hp { position: absolute; left: -5000px; opacity: 0; height: 0; overflow: hidden; }
.notice { border-radius: 12px; padding: .9rem 1.1rem; font-size: .92rem; margin: 1.2rem 0; display: none; }
.notice.ok { background: #EAF5E4; border: 1px solid #BBD6A8; color: #2F5D1F; }
.notice.err { background: #FBEAE6; border: 1px solid #EFC4B8; color: #8A3320; }
[data-theme="dark"] .notice.ok { background: #1E2B16; border-color: #3E5A2C; color: #B9DBA1; }
[data-theme="dark"] .notice.err { background: #33170F; border-color: #6E3323; color: #F0B7A8; }

.pp-wrap { text-align: center; margin: 1.8rem 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); margin-top: 2rem; }
.footer-min { max-width: var(--wrap); margin: 0 auto; padding: 2.6rem 1.1rem 2rem; text-align: center; }
.f-brand { display: inline-flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; }
.f-brand svg.logo { width: 32px; height: 32px; }
.f-brand b { font-family: var(--serif); font-weight: 400; font-size: 1.05rem; letter-spacing: -.01em; }
.f-links { margin: 1.1rem 0 .2rem; display: flex; gap: 1.4rem; justify-content: center; flex-wrap: wrap; }
.f-links a { color: var(--footer-link); text-decoration: none; font-size: .86rem; }
.f-links a:hover { color: #fff; }
.f-legal { margin-top: .2rem; }
.f-legal a { font-size: .78rem; }
.f-lang { margin-top: .7rem; display: flex; gap: 1rem; justify-content: center; }
.f-lang a { color: var(--footer-copy); text-decoration: none; font-size: .78rem; }
.f-lang a:hover { color: var(--footer-text); }
.copyright { color: var(--footer-copy); font-size: .76rem; margin: 1.1rem 0 0; }

/* ---------- Logo & wordmark ---------- */
svg.logo .ln { stroke: var(--accent); }
svg.logo .dt { fill: var(--accent); }
.f-brand svg.logo .ln { stroke: #D99A55; }
.f-brand svg.logo .dt { fill: #D99A55; }
.brand b span { color: var(--accent); }
.f-brand b span { color: #D99A55; }

/* ---------- Hero v3: glow, ornament, entrance ---------- */
.hero-plain { position: relative; padding: 5rem 1.2rem 2.2rem; }
.hero-plain::before {
  content: ""; position: absolute; inset: -62px 0 auto 0; height: 420px; z-index: -1;
  background: radial-gradient(620px 300px at 50% 0%, var(--accent-soft) 0%, transparent 72%);
  pointer-events: none;
}
.hero-orn { margin: 3rem auto 0; }
.hero-orn svg { width: 46px; height: 46px; opacity: .95; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-plain > * { animation: rise .7s cubic-bezier(.2,.7,.3,1) both; }
.hero-plain > .eyebrow { animation-delay: .05s; }
.hero-plain > h1 { animation-delay: .15s; }
.hero-plain > .hero-sub { animation-delay: .3s; }
.hero-plain > .hero-cta { animation-delay: .45s; }
.hero-plain > .hero-orn { animation-delay: .6s; }
@media (prefers-reduced-motion: reduce) { .hero-plain > * { animation: none; } }

/* ---------- Lightbox controls ---------- */
dialog.lightbox { outline: none; }
.lb-btn {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center; font-family: var(--sans);
}
.lb-btn:hover { background: rgba(255, 255, 255, .3); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-close { top: 16px; right: 16px; transform: none; font-size: 17px; width: 40px; height: 40px; }
.lb-count {
  position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%);
  color: rgba(255, 255, 255, .8); font-size: .8rem; font-family: var(--sans);
}

/* ---------- Centered CTAs in prose ---------- */
.prose .btn-row { justify-content: center; }

/* ---------- Donation card ---------- */
.pp-wrap {
  max-width: 380px; margin: 2rem auto; padding: 1.6rem 1.4rem; text-align: center;
  background: var(--surface); border: 1.5px solid var(--accent); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ---------- Video grid ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem 1.2rem; margin: 2.2rem 0 1rem; }
.video-grid .yt { margin: 0; }
.vtitle { font-size: .88rem; font-weight: 600; margin: .6rem 0 0; color: var(--ink); }

/* ---------- In-page PDF reader ---------- */
dialog.pdf-modal {
  border: 0; padding: 0; background: #1a1a1a; border-radius: 12px;
  width: min(94vw, 1000px); height: 92vh; overflow: hidden;
}
dialog.pdf-modal::backdrop { background: rgba(14, 10, 3, .85); }
dialog.pdf-modal iframe { width: 100%; height: 100%; border: 0; display: block; }
dialog.pdf-modal .lb-close { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.5); }

/* ---------- Footer simplification + mobile donate ---------- */
.f-quick { display: none; }
.m-donate { display: none; }
@media (max-width: 1023px) {
  .f-quick { display: flex; }
  .m-donate { display: inline-flex; }
}

/* ---------- Utilities ---------- */
.center { text-align: center; }
.note-box { background: var(--accent-soft); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; font-size: .92rem; margin: 1.6rem 0; }
.lead { font-size: 1.12rem; line-height: 1.7; color: var(--muted); }

/* ---------- v10: brand image, hero dots, clean footer row, facade fix ---------- */
img.logo { border-radius: 50%; display: block; }
.brand img.logo { width: 36px; height: 36px; }
.hero-dots { display: flex; gap: .7rem; justify-content: center; align-items: center; margin-top: 2.8rem; }
.hero-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .85; }
.hero-dots i:nth-child(2) { width: 9px; height: 9px; }
.yt.on::before, .yt.on::after { display: none; }
.f-row { display: flex; gap: 1.3rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.f-row a { color: var(--footer-link); text-decoration: none; font-size: .82rem; }
.f-row a:hover { color: #fff; }
.f-row .copyright { margin: 0; }
.footer-min { padding: 1.7rem 1.1rem; }

/* ---------- Playlist controls ---------- */
.pl-bar { display: flex; gap: .55rem; justify-content: center; padding: .55rem; border-bottom: 1px solid var(--line); }
.pl-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg); color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.pl-btn:hover { color: var(--accent-deep); border-color: var(--accent); background: var(--accent-soft); }
.pl-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pl-btn svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------- Lightbox centering (flex, bulletproof) ---------- */
dialog.lightbox[open] {
  position: fixed; inset: 0; margin: 0; padding: 0; border: 0;
  width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh;
  background: transparent; display: flex; align-items: center; justify-content: center;
}
dialog.lightbox img { display: block; max-width: 92vw; max-height: 88vh; width: auto; height: auto; }

/* ---------- Library reader ---------- */
.reader { font-size: 1.07rem; line-height: 1.95; }
.reader p { margin: 0 0 1.3em; }
.reader .verse { font-style: italic; text-align: center; line-height: 1.75; color: var(--ink); }
.reader h3 { font-family: var(--serif); font-size: 1.35rem; margin: 2.3em 0 .7em; }
.crumb-link { color: var(--accent); text-decoration: none; }
.crumb-link:hover { text-decoration: underline; }
.book-head { display: flex; gap: 1.6rem; align-items: flex-start; margin: 1rem 0 2rem; }
.book-head img { flex: none; width: 180px; border-radius: 10px; box-shadow: var(--shadow-md); margin: 0; }
@media (max-width: 560px) { .book-head { flex-direction: column; align-items: center; text-align: center; } }
.book-toc { list-style: none; padding: 0; margin: 1rem 0 2rem; counter-reset: ch; }
.book-toc a {
  display: block; padding: .62rem .95rem; margin: .45rem 0; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: .95rem;
}
.book-toc a:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }
.ch-nav { display: flex; justify-content: space-between; gap: .8rem; margin: 3rem 0 0; }

/* ---------- v16: sticky footer + glass lightbox ---------- */
body{display:flex;flex-direction:column;min-height:100vh}
main{flex:1 0 auto}
.site-footer{margin-top:auto}
dialog.lightbox[open]{position:fixed;inset:0;margin:0;padding:0;border:0;width:100vw;height:100vh;max-width:100vw;max-height:100vh;background:transparent;display:flex;align-items:center;justify-content:center}
dialog.lightbox img{display:block;max-width:min(92vw,1200px);max-height:86vh;width:auto;height:auto;border-radius:14px;box-shadow:0 24px 64px rgba(0,0,0,.55)}
.lb-btn{position:fixed;top:50%;transform:translateY(-50%);width:52px;height:52px;border-radius:50%;border:1px solid rgba(255,255,255,.28);cursor:pointer;background:rgba(28,24,18,.55);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 16px rgba(0,0,0,.35);transition:background .18s,transform .18s,border-color .18s;padding:0;font-size:0}
.lb-btn svg{width:22px;height:22px;display:block}
.lb-btn:hover{background:var(--accent);border-color:transparent;transform:translateY(-50%) scale(1.08)}
.lb-prev{left:20px}
.lb-next{right:20px}
.lb-close{top:18px;right:18px;transform:none;width:46px;height:46px}
.lb-close:hover{transform:scale(1.08)}
.lb-count{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);color:#fff;font-size:.82rem;font-family:var(--sans);letter-spacing:.06em;background:rgba(28,24,18,.55);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.22);border-radius:999px;padding:.35rem .95rem}
@media(max-width:560px){.lb-btn{width:44px;height:44px}.lb-prev{left:10px}.lb-next{right:10px}.lb-close{top:12px;right:12px}}

/* ---------- v17: library sidebar (Notion-style chapter nav) ---------- */
.lib-wrap{display:grid;grid-template-columns:272px minmax(0,1fr);gap:2.4rem;align-items:start}
.lib-side{position:sticky;top:82px;max-height:calc(100vh - 102px);overflow:auto;font-family:var(--sans);padding:.2rem .5rem .6rem 0;scrollbar-width:thin}
.lib-side-t{margin:0 0 .55rem;font-size:.76rem;letter-spacing:.09em;text-transform:uppercase}
.lib-side-t a{color:var(--muted);text-decoration:none}
.lib-side-t a:hover{color:var(--accent)}
.lib-side nav{display:flex;flex-direction:column;gap:2px;border-left:1px solid var(--line)}
.lib-side nav a{display:block;padding:.3rem .75rem;font-size:.855rem;line-height:1.4;color:var(--muted);text-decoration:none;border-left:2px solid transparent;margin-left:-1px;border-radius:0 8px 8px 0}
.lib-side nav a:hover{color:var(--ink);background:var(--surface)}
.lib-side nav a.on{color:var(--accent);border-left-color:var(--accent);font-weight:600;background:var(--surface)}
.lib-fab{display:none}
.lib-back{display:none}
@media(max-width:1020px){
.lib-wrap{display:block}
.lib-side{position:fixed;left:0;top:0;bottom:0;z-index:70;width:min(82vw,330px);max-height:none;background:var(--bg);border-right:1px solid var(--line);padding:1.1rem 1rem 2rem;transform:translateX(-103%);transition:transform .25s ease;box-shadow:0 12px 44px rgba(0,0,0,.3)}
body.lib-open .lib-side{transform:none}
.lib-fab{display:flex;position:fixed;bottom:18px;right:18px;z-index:69;width:52px;height:52px;border-radius:50%;border:0;background:var(--accent);color:#fff;align-items:center;justify-content:center;box-shadow:0 6px 20px rgba(0,0,0,.35);cursor:pointer}
.lib-fab svg{width:23px;height:23px}
body.lib-open .lib-back{display:block;position:fixed;inset:0;z-index:68;background:rgba(10,8,4,.5)}
}

/* ---------- reading progress (book chapters) ---------- */
.read-progress{position:fixed;top:0;left:0;height:3px;width:0;background:var(--accent);z-index:120;border-radius:0 2px 2px 0;box-shadow:0 1px 4px rgba(0,0,0,.18);pointer-events:none}
