/* 华人福音影音资源库 — site stylesheet (generated site; edit here, then run build_site.py) */
:root {
  --bg: #fbf7f0;
  --paper: #ffffff;
  --ink: #2b2118;
  --muted: #6f6253;
  --line: #eadfce;
  --red: #8b1e24;
  --red-dark: #5e1217;
  --gold: #c9a14a;
  --gold-soft: #f3e6c4;
  --shadow: 0 6px 24px rgba(60, 30, 10, .10);
  --radius: 14px;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", system-ui, sans-serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #17120e; --paper: #221b15; --ink: #f2e9dc; --muted: #b6a690; --line: #3a2f25;
          --gold-soft: #3b3020; --shadow: 0 6px 24px rgba(0,0,0,.45); }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.75; font-size: 16px; }
a { color: var(--red); text-decoration: none; }
@media (prefers-color-scheme: dark) { a { color: #e9a3a6; } }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.cross { color: var(--gold); font-family: "Segoe UI Symbol", "Noto Sans Symbols", serif; font-weight: 400; margin-right: .2em; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.35; margin: 0 0 .5em; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 10px; top: 10px; background: #fff; padding: 8px 12px; z-index: 99; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: linear-gradient(90deg, var(--red-dark), var(--red)); color: #fff;
  border-bottom: 3px solid var(--gold); box-shadow: 0 2px 12px rgba(0,0,0,.25); }
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; max-width: 1400px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--serif); font-size: 1.25rem; font-weight: 700; white-space: nowrap; }
.brand img { width: 34px; height: 34px; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.nav a { color: #fbeee0; padding: 8px 9px; border-radius: 9px; font-size: .93rem; white-space: nowrap; }
.nav a:hover, .nav a.active { background: rgba(255,255,255,.14); color: #fff; text-decoration: none; }
.nav a.active { box-shadow: inset 0 -2px 0 var(--gold); }
.tools { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.btn-icon { background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 9px; padding: 8px 12px; cursor: pointer; font: inherit; font-size: .92rem; white-space: nowrap; }
.brand { flex-shrink: 0; }
@media (max-width: 1440px) { .tools .lbl { display: none; } }
.btn-icon:hover { background: rgba(255,255,255,.25); text-decoration: none; }
.nav .nav-extra { display: none; }
@media (max-width: 1280px) { .nav .nav-extra { display: block; } .about-link { display: none; } }
.nav { flex-wrap: nowrap; justify-content: center; }
.menu-toggle { display: none; }
@media (max-width: 1280px) {
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 67px; background: var(--red-dark); flex-direction: column; padding: 10px 20px 16px; }
  .nav.open { display: flex; }
  .site-header .wrap { justify-content: space-between; }
}
@media (max-width: 700px) {
  .tools .lbl { display: none; }
  .brand { font-size: 1.05rem; }
  .btn-icon { padding: 8px 10px; }
}

/* ---------- hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,10,5,.15), rgba(20,10,5,.72)); }
.hero .wrap { position: relative; z-index: 1; padding: 110px 20px 70px; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); text-shadow: 0 3px 18px rgba(0,0,0,.5); margin-bottom: .25em; }
.hero p.tagline { font-size: clamp(1rem, 2vw, 1.25rem); max-width: 780px; opacity: .95; }
.hero .verse { margin-top: 18px; font-family: var(--serif); font-size: 1.05rem; color: var(--gold-soft); max-width: 760px; }
.hero .verse small { display: block; opacity: .85; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-weight: 600; border: 0; cursor: pointer; font: inherit; }
.btn-gold { background: var(--gold); color: #2b1a05; }
.btn-ghost { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.45); }
.btn:hover { text-decoration: none; filter: brightness(1.07); }
.stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 34px; }
.stats div { font-size: .95rem; opacity: .95; }
.stats b { display: block; font-size: 1.7rem; font-family: var(--serif); color: var(--gold); }

.page-banner { position: relative; color: #fff; }
.page-banner img { width: 100%; height: 270px; object-fit: cover; }
.page-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(25,10,5,.82), rgba(25,10,5,.25)); }
.page-banner .wrap { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; left: 0; right: 0; }
.page-banner h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
.page-banner p { max-width: 720px; opacity: .95; margin: 0; }

/* ---------- content ---------- */
main { padding: 34px 0 60px; }
.section-title { display: flex; align-items: baseline; gap: 12px; margin: 34px 0 16px; border-bottom: 2px solid var(--line); padding-bottom: 8px; }
.section-title h2 { margin: 0; font-size: 1.55rem; }
.section-title a { margin-left: auto; font-size: .95rem; }
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease; color: var(--ink); }
a.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(60,30,10,.18); text-decoration: none; }
.card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; background: #ddd; }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { font-size: 1.12rem; margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: .85rem; margin-top: auto; }
.tag { display: inline-block; background: var(--gold-soft); color: #6b4b0c; border-radius: 999px; padding: 1px 10px; font-size: .8rem; }
@media (prefers-color-scheme: dark) { .tag { color: #f1d38a; } }
.tag.warn { background: #fde4dc; color: #8a2b14; }
.notice { background: var(--gold-soft); border-left: 4px solid var(--gold); padding: 12px 16px; border-radius: 10px; margin: 16px 0; }

.section-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.section-card { position: relative; border-radius: var(--radius); overflow: hidden; color: #fff; min-height: 170px; box-shadow: var(--shadow); }
.section-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.section-card:hover img { transform: scale(1.05); }
.section-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(20,8,4,.82)); }
.section-card .txt { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; }
.section-card h3 { margin: 0; font-size: 1.25rem; color: #fff; }
.section-card span { font-size: .85rem; opacity: .9; }
a.section-card:hover { text-decoration: none; }

/* ---------- collection page ---------- */
.coll-head { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 28px; align-items: start; }
@media (max-width: 800px) { .coll-head { grid-template-columns: 1fr; } }
.coll-head img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.coll-head .facts { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); margin: 10px 0; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.links a { background: var(--paper); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; font-size: .9rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 26px 0 14px; }
.filter { flex: 1; min-width: 220px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; }
.btn-small { background: var(--red); color: #fff; border: 0; border-radius: 8px; padding: 7px 12px; cursor: pointer; font: inherit; font-size: .9rem; }
.btn-small.alt { background: var(--paper); color: var(--red); border: 1px solid var(--line); }

.vgrid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.vcard { background: var(--paper); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; scroll-margin-top: 90px; }
.vcard .thumb { position: relative; cursor: pointer; border: 0; padding: 0; background: #000; display: block; width: 100%; }
.vcard .thumb img { aspect-ratio: 4/3; object-fit: cover; width: 100%; opacity: .95; }
.vcard .thumb .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.6); opacity: .85; transition: opacity .2s, transform .2s; }
.vcard .thumb:hover .play { opacity: 1; transform: scale(1.1); }
.vcard .thumb .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.72); color: #fff; font-size: .78rem; padding: 1px 7px; border-radius: 6px; }
.vcard .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.vcard h3 { font-size: 1.02rem; margin: 0; font-family: var(--sans); font-weight: 700; }
.vcard .en { color: var(--muted); font-size: .85rem; }
.vcard .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; font-size: .88rem; }

.alist { list-style: none; margin: 0; padding: 0; background: var(--paper); border-radius: 12px; box-shadow: var(--shadow); }
.alist li { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.alist li:last-child { border-bottom: 0; }
.alist li.playing { background: var(--gold-soft); }
.alist .pbtn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--red); color: #fff; cursor: pointer; font-size: .95rem; }
.alist .t { min-width: 0; }
.alist .t b { font-weight: 600; display: block; overflow-wrap: anywhere; }
.alist .t small { color: var(--muted); }
.alist .r { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.doc-icon { font-size: 1.5rem; text-align: center; }
.lyrics { grid-column: 2 / -1; white-space: pre-wrap; background: var(--bg); border-radius: 8px; padding: 10px 14px; font-family: var(--serif); display: none; }
.lyrics.open { display: block; }

details.book { background: var(--paper); border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 10px; }
details.book summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
details.book summary::-webkit-details-marker { display: none; }
details.book summary::after { content: "＋"; color: var(--red); }
details.book[open] summary::after { content: "－"; }
.chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; padding: 4px 16px 16px; }
.chapters button, .chapters a { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; padding: 6px 0; cursor: pointer; text-align: center; font: inherit; font-size: .9rem; }
.chapters button:hover { border-color: var(--red); color: var(--red); }
.chapters button.playing { background: var(--red); color: #fff; }
.testaments h3 { margin: 18px 0 10px; }
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; align-items: start; }
.books details.book { margin-bottom: 0; }

details.more { background: var(--paper); border-radius: 12px; box-shadow: var(--shadow); padding: 4px 18px; margin: 18px 0; }
details.more summary { cursor: pointer; font-weight: 600; padding: 10px 0; }

/* ---------- players ---------- */
.player-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--red-dark); color: #fff; border-top: 3px solid var(--gold);
  padding: 8px 16px; display: none; align-items: center; gap: 14px; box-shadow: 0 -4px 18px rgba(0,0,0,.3); }
.player-bar.show { display: flex; }
.player-bar .now { flex: 0 1 34%; min-width: 0; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-bar audio { flex: 1; min-width: 160px; height: 40px; }
.player-bar button { background: rgba(255,255,255,.15); color: #fff; border: 0; border-radius: 8px; padding: 7px 11px; cursor: pointer; font-size: 1rem; }
body.has-player { padding-bottom: 70px; }
@media (max-width: 700px) { .player-bar { flex-wrap: wrap; } .player-bar .now { flex-basis: 100%; } }

.modal { position: fixed; inset: 0; z-index: 60; background: rgba(10,5,2,.86); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.show { display: flex; }
.modal .box { width: min(1000px, 100%); }
.modal video { width: 100%; max-height: 78vh; background: #000; border-radius: 10px; }
.modal .bar { display: flex; justify-content: space-between; align-items: center; color: #fff; margin-bottom: 8px; gap: 12px; }
.modal .bar a { color: var(--gold); }
.modal .close { background: none; border: 0; color: #fff; font-size: 1.8rem; cursor: pointer; }

/* ---------- search ---------- */
.search-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(20,10,5,.6); display: none; padding: 70px 16px; }
.search-overlay.show { display: block; }
.search-box { max-width: 820px; margin: 0 auto; background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.search-box input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 18px 20px; font: inherit; font-size: 1.15rem; background: var(--paper); color: var(--ink); outline: none; }
.search-results { max-height: 65vh; overflow: auto; }
.search-results a { display: block; padding: 10px 20px; border-bottom: 1px solid var(--line); color: var(--ink); }
.search-results a:hover, .search-results a.sel { background: var(--gold-soft); text-decoration: none; }
.search-results small { color: var(--muted); display: block; }
.search-results mark { background: #ffe08a; color: inherit; border-radius: 3px; }
.search-hint { padding: 14px 20px; color: var(--muted); font-size: .9rem; }

/* ---------- footer ---------- */
.site-footer { background: #1d130d; color: #d9c9b2; padding: 40px 0 30px; margin-top: 40px; border-top: 3px solid var(--gold); }
.site-footer a { color: var(--gold); }
.site-footer .cols { display: grid; gap: 26px; grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 800px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h4 { font-family: var(--serif); color: #fff; margin: 0 0 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer .verse { font-family: var(--serif); color: var(--gold-soft); }
.site-footer .fine { margin-top: 26px; font-size: .82rem; opacity: .75; }
