/* ============================================================
   以琳团契 · 全站样式
   配色以「以琳」的意象为底：水泉的青、棕树的绿、旷野的暖沙
   ============================================================ */

/* ---------- 主题变量 ---------- */
:root {
  --bg: #faf6ef;
  --bg-soft: #f3ece1;
  --surface: #ffffff;
  --surface-2: #fbf8f3;
  --border: #e6dccc;
  --border-soft: #efe7db;

  --text: #2c2721;
  --text-soft: #5d564c;
  --text-mute: #8a8175;

  --accent: #1f5d54;
  --accent-soft: #2d7a6e;
  --accent-bg: #e8f2ef;
  --gold: #b08422;
  --gold-bg: #f8f0dc;

  --shadow-sm: 0 1px 2px rgba(44, 39, 33, .06), 0 2px 8px rgba(44, 39, 33, .04);
  --shadow-md: 0 4px 12px rgba(44, 39, 33, .08), 0 12px 32px rgba(44, 39, 33, .06);

  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1080px;

  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

html[data-theme="dark"] {
  --bg: #16191b;
  --bg-soft: #1b1f21;
  --surface: #202527;
  --surface-2: #262c2e;
  --border: #333b3d;
  --border-soft: #2b3234;

  --text: #e8e4dc;
  --text-soft: #b3ada2;
  --text-mute: #857f75;

  --accent: #6bbfaf;
  --accent-soft: #86d0c1;
  --accent-bg: #1d2f2c;
  --gold: #d7ab52;
  --gold-bg: #2c2618;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .25);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin: 0 0 .6em;
}

h1 { font-size: 2rem; letter-spacing: .01em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; margin: 0 auto; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 30px; height: 30px;
  flex: none;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--accent), var(--accent-soft));
  display: grid; place-items: center;
  color: #fff;
  font-size: .82rem;
  font-family: var(--serif);
  letter-spacing: -.02em;
}
html[data-theme="dark"] .brand-mark { color: #10201d; }

.nav-links {
  display: flex;
  gap: 2px;
  margin-left: auto;
  align-items: center;
}

.nav-links a {
  padding: 7px 13px;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: .93rem;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--accent); background: var(--accent-bg); font-weight: 500; }

.icon-btn {
  width: 36px; height: 36px;
  flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  border-radius: 9px;
  cursor: pointer;
  font-size: 1rem;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }

.nav-toggle { display: none; }

/* 移动端 */
@media (max-width: 820px) {
  .nav { height: 56px; gap: 10px; }
  .nav-toggle { display: grid; margin-left: auto; }
  .nav-links {
    position: absolute;
    top: 56px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: 6px 12px 14px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 1rem; border-radius: 10px; }
  h1 { font-size: 1.65rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 74px 0 66px;
  background:
    radial-gradient(900px 380px at 12% -10%, var(--accent-bg), transparent 65%),
    radial-gradient(700px 320px at 92% 8%, var(--gold-bg), transparent 62%),
    var(--bg);
  border-bottom: 1px solid var(--border-soft);
}

.hero-inner { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(2rem, 5.2vw, 3.1rem);
  margin-bottom: .35em;
  letter-spacing: .02em;
}

.hero-sub {
  font-family: var(--serif);
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  color: var(--text-soft);
  max-width: 620px;
  margin-bottom: 1.6em;
}

.hero-palms {
  position: absolute;
  right: -30px; bottom: -20px;
  width: min(330px, 42vw);
  opacity: .16;
  pointer-events: none;
  color: var(--accent);
}

/* 每日金句 */
.verse-card {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 24px;
  border-left: 3px solid var(--gold);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: var(--shadow-sm);
  max-width: 560px;
}
.verse-card .vt {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}
.verse-card .vr { font-size: .85rem; color: var(--text-mute); letter-spacing: .04em; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: .95rem;
  font-family: inherit;
  cursor: pointer;
  transition: transform .12s, box-shadow .15s, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
html[data-theme="dark"] .btn-primary { color: #10201d; }
.btn-primary:hover { background: var(--accent-soft); }

.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- 区块 ---------- */
.section { padding: 56px 0; }
.section + .section { padding-top: 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-head .more { font-size: .9rem; color: var(--accent); }

.eyebrow {
  display: inline-block;
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 10px;
}

/* ---------- 卡片 ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border); }

.card h3 { margin-bottom: .4em; }
.card p { color: var(--text-soft); font-size: .93rem; margin-bottom: 0; }

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: .82rem;
  color: var(--text-mute);
  margin-bottom: 10px;
}
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }

.card-link { cursor: pointer; }

/* 快捷入口卡 */
.quick {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.quick:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.quick .qi {
  width: 40px; height: 40px; flex: none;
  border-radius: 10px;
  background: var(--accent-bg);
  color: var(--accent);
  display: grid; place-items: center;
}
.quick strong { display: block; font-family: var(--serif); font-size: 1.05rem; margin-bottom: 2px; }
.quick small { color: var(--text-mute); font-size: .86rem; line-height: 1.6; display: block; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: .76rem;
  background: var(--accent-bg);
  color: var(--accent);
  letter-spacing: .02em;
}
.tag-gold { background: var(--gold-bg); color: var(--gold); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* ---------- 筛选条 ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 26px;
}

.search-box {
  flex: 1 1 240px;
  position: relative;
  min-width: 200px;
}
.search-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  font-size: .94rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.search-box svg {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-mute);
  pointer-events: none;
}

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  font-size: .87rem;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
html[data-theme="dark"] .chip.active { color: #10201d; }

/* ---------- 列表条目（讲道/诗歌） ---------- */
.item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .16s, border-color .16s;
}
.item:hover { box-shadow: var(--shadow-md); }
.item.open { border-color: var(--accent); }

.item-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 22px;
  cursor: pointer;
  user-select: none;
}

.item-date {
  flex: none;
  width: 58px;
  text-align: center;
  padding-top: 3px;
}
.item-date .d { font-family: var(--serif); font-size: 1.5rem; line-height: 1; color: var(--accent); }
.item-date .m { font-size: .72rem; color: var(--text-mute); letter-spacing: .05em; margin-top: 3px; }

.item-body { flex: 1; min-width: 0; }
.item-body h3 { margin: 0 0 6px; font-size: 1.12rem; }
.item-body .meta { font-size: .84rem; color: var(--text-mute); margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.item-body .excerpt { font-size: .92rem; color: var(--text-soft); margin: 0; }

.item-caret {
  flex: none;
  color: var(--text-mute);
  transition: transform .2s;
  margin-top: 4px;
}
.item.open .item-caret { transform: rotate(180deg); color: var(--accent); }

.item-detail {
  display: none;
  padding: 4px 22px 26px;
  border-top: 1px dashed var(--border);
  margin: 0 22px;
  padding-left: 0; padding-right: 0;
}
.item.open .item-detail { display: block; }

.outline {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 18px 0;
  border-left: 3px solid var(--accent);
}
.outline h4 { margin: 0 0 8px; font-size: .9rem; color: var(--accent); letter-spacing: .05em; }
.outline ul { margin: 0; padding-left: 18px; }
.outline li { font-size: .92rem; color: var(--text-soft); margin-bottom: 5px; }

.prose { font-size: .97rem; line-height: 1.95; color: var(--text-soft); }
.prose p { margin: 0 0 1.05em; }
.prose h4 {
  font-size: 1.02rem;
  color: var(--text);
  margin: 1.6em 0 .5em;
}
.prose blockquote {
  margin: 1.2em 0;
  padding: 12px 20px;
  border-left: 3px solid var(--gold);
  background: var(--gold-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--serif);
  color: var(--text);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 600; }

/* 歌词 */
.lyrics {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 2.15;
  white-space: pre-wrap;
  color: var(--text);
  background: var(--surface-2);
  padding: 22px 24px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
}

/* ---------- 读经计划 ---------- */
.today-card {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 30px 32px;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
html[data-theme="dark"] .today-card { color: #0f1e1b; }
.today-card .eyebrow { color: rgba(255, 255, 255, .8); }
html[data-theme="dark"] .today-card .eyebrow { color: rgba(15, 30, 27, .7); }
.today-card h2 { color: inherit; margin-bottom: .3em; }
.today-readings { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 16px; }
.today-readings div { min-width: 160px; }
.today-readings .rl { font-size: .78rem; opacity: .8; letter-spacing: .1em; text-transform: uppercase; }
.today-readings .rv { font-family: var(--serif); font-size: 1.3rem; margin-top: 2px; }

.progress-wrap { margin: 22px 0 8px; }
.progress-bar {
  height: 8px;
  background: var(--bg-soft);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 99px;
  transition: width .4s ease;
}
.progress-text { font-size: .86rem; color: var(--text-mute); margin-top: 8px; display: flex; justify-content: space-between; }

.plan-list { display: grid; gap: 8px; }
.plan-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  transition: border-color .15s, background .15s;
}
.plan-row:hover { border-color: var(--border); }
.plan-row.done { opacity: .55; }
.plan-row.done .pr-text { text-decoration: line-through; }
.plan-row.is-today { border-color: var(--accent); background: var(--accent-bg); }

.plan-check {
  width: 22px; height: 22px; flex: none;
  border: 1.8px solid var(--border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  display: grid; place-items: center;
  color: transparent;
  transition: all .15s;
  padding: 0;
}
.plan-check:hover { border-color: var(--accent); }
.plan-row.done .plan-check { background: var(--accent); border-color: var(--accent); color: #fff; }
html[data-theme="dark"] .plan-row.done .plan-check { color: #10201d; }

.plan-day { flex: none; width: 54px; font-size: .82rem; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.pr-text { flex: 1; font-size: .93rem; min-width: 0; }
.pr-text .ot { color: var(--text); }
.pr-text .nt { color: var(--accent); }
.pr-sep { color: var(--text-mute); margin: 0 8px; }

@media (max-width: 560px) {
  .plan-row { flex-wrap: wrap; gap: 8px 12px; }
  .pr-text { flex: 1 1 100%; padding-left: 36px; }
  .today-card { padding: 24px 20px; }
}

/* ---------- 聚会时间表 ---------- */
.gather-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.gather {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  border-top: 3px solid var(--accent);
  box-shadow: var(--shadow-sm);
}
.gather h4 { margin: 0 0 8px; font-family: var(--serif); font-size: 1.08rem; }
.gather .t { color: var(--accent); font-size: .94rem; font-weight: 500; }
.gather .p, .gather .n { font-size: .87rem; color: var(--text-mute); margin-top: 4px; }

/* ---------- 空状态 ---------- */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-mute);
}
.empty svg { opacity: .35; margin-bottom: 14px; }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 70px;
  padding: 44px 0 34px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-soft);
  font-size: .89rem;
  color: var(--text-mute);
}
.footer-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: 1.4fr 1fr 1fr;
  margin-bottom: 30px;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h5 {
  font-family: var(--serif);
  font-size: .98rem;
  color: var(--text);
  margin: 0 0 10px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--text-soft); }
.site-footer a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .84rem;
}

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  box-shadow: var(--shadow-md);
  display: grid; place-items: center;
  cursor: pointer;
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: all .22s;
  z-index: 40;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- 动画 ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .5s ease both; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 打印（方便打印讲道稿/读经表） ---------- */
@media print {
  .site-header, .site-footer, .to-top, .toolbar, .item-caret, .btn-row { display: none !important; }
  body { background: #fff; color: #000; }
  .item, .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .item-detail { display: block !important; }
}

/* ---------- 头部登录态 ---------- */
.auth-area { display: flex; align-items: center; gap: 8px; margin-left: 6px; }
.auth-user { font-size: .86rem; color: var(--text-mute); max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-sm { padding: 6px 12px; font-size: .82rem; }

/* ---------- 登录页 ---------- */
.auth-wrap { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px 28px; box-shadow: var(--shadow); }
.auth-card h1 { font-family: var(--serif); font-size: 1.5rem; margin: 0 0 6px; }
.auth-card .sub { color: var(--text-mute); font-size: .9rem; margin: 0 0 22px; }
.auth-card label { display: block; font-size: .85rem; margin: 14px 0 6px; color: var(--text-soft); }
.auth-card input { width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font-size: .95rem; }
.auth-card .btn { width: 100%; margin-top: 20px; }
.auth-msg { margin-top: 14px; font-size: .88rem; min-height: 1.2em; }
.auth-msg.err { color: #d9534f; }
.auth-msg.ok { color: var(--brand); }
.auth-back { text-align: center; margin-top: 16px; font-size: .85rem; }
.auth-back a { color: var(--brand); }

/* ---------- 会员专区 / 后台 ---------- */
.tabs { display: flex; gap: 8px; margin: 0 0 22px; flex-wrap: wrap; }
.tab { padding: 8px 18px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-soft); cursor: pointer; font-size: .9rem; }
.tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.gallery .ph { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.gallery .ph img, .gallery .ph video { width: 100%; height: 160px; object-fit: cover; display: block; background: #000; }
.gallery .ph .cap { padding: 10px 12px; }
.gallery .ph .cap .t { font-size: .92rem; font-family: var(--serif); }
.gallery .ph .cap .d { font-size: .8rem; color: var(--text-mute); margin-top: 3px; }
.gallery .ph .watch { display: inline-block; margin-top: 8px; color: var(--brand); font-size: .85rem; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.video-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.video-card video, .video-card iframe { width: 100%; aspect-ratio: 16/9; display: block; background: #000; border: 0; }
.video-card .cap { padding: 12px 14px; }
.video-card .cap .t { font-family: var(--serif); font-size: 1rem; }

/* 灯箱 */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.86); display: none; align-items: center; justify-content: center; z-index: 999; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; }
.lightbox .close { position: absolute; top: 18px; right: 22px; color: #fff; font-size: 30px; cursor: pointer; line-height: 1; }

/* 后台表单与表格 */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; margin-bottom: 22px; box-shadow: var(--shadow); }
.panel h3 { font-family: var(--serif); margin: 0 0 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: .82rem; color: var(--text-soft); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font-size: .92rem; }
.field textarea { min-height: 70px; resize: vertical; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tag-pick { display: inline-flex; gap: 6px; align-items: center; margin-right: 10px; font-size: .85rem; }

.dtable { width: 100%; border-collapse: collapse; font-size: .9rem; }
.dtable th, .dtable td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.dtable th { color: var(--text-mute); font-weight: 600; font-size: .8rem; }
.dtable td .role { font-size: .78rem; padding: 2px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.dtable td .role.member { background: var(--surface-2, #eee); color: var(--text-mute); }

/* 受限提示 */
.locked { text-align: center; padding: 60px 20px; color: var(--text-mute); }
.locked .big { font-size: 2.4rem; margin-bottom: 12px; }

/* ---------- 登录/注册 模态框 ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 20px;
}
.modal-box {
  width: 100%; max-width: 400px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
  overflow: hidden;
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal-title { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; }
.modal-close {
  background: none; border: none; font-size: 26px; cursor: pointer;
  color: var(--text-mute); line-height: 1; padding: 0 4px;
}
.modal-close:hover { color: var(--text); }
.modal-tabs { display: flex; border-bottom: 1px solid var(--border); }
.modal-tabs .tab {
  flex: 1; text-align: center; padding: 12px; cursor: pointer;
  font-size: .95rem; font-weight: 600; color: var(--text-mute);
  border-bottom: 2px solid transparent; transition: all .2s;
  background: none; border-top: none; border-left: none; border-right: none;
}
.modal-tabs .tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.modal-body { padding: 22px 24px 26px; }
.auth-form label { display: block; font-size: .85rem; color: var(--text-soft); margin: 12px 0 5px; }
.auth-form label small { font-weight: 400; color: var(--text-mute); margin-left: 4px; }
.auth-form input {
  width: 100%; padding: 10px 13px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); color: var(--text);
  font-size: .95rem; box-sizing: border-box;
}
.auth-form input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(31,93,84,.15); }
.btn-block { width: 100%; margin-top: 18px; }

/* ---------- 登录/注册 模态框 ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 20px;
}
.modal-box {
  width: 100%; max-width: 400px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
  overflow: hidden;
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal-title { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; }
.modal-close {
  background: none; border: none; font-size: 26px; cursor: pointer;
  color: var(--text-mute); line-height: 1; padding: 0 4px;
}
.modal-close:hover { color: var(--text); }
.modal-tabs { display: flex; border-bottom: 1px solid var(--border); }
.modal-tabs .tab {
  flex: 1; text-align: center; padding: 12px; cursor: pointer;
  font-size: .95rem; font-weight: 600; color: var(--text-mute);
  border-bottom: 2px solid transparent; transition: all .2s;
  background: none; border-top: none; border-left: none; border-right: none;
}
.modal-tabs .tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.modal-body { padding: 22px 24px 26px; }
.auth-form label { display: block; font-size: .85rem; color: var(--text-soft); margin: 12px 0 5px; }
.auth-form label small { font-weight: 400; color: var(--text-mute); margin-left: 4px; }
.auth-form input {
  width: 100%; padding: 10px 13px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); color: var(--text);
  font-size: .95rem; box-sizing: border-box;
}
.auth-form input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(31,93,84,.15); }
.btn-block { width: 100%; margin-top: 18px; }
