/* ============================================================
   弘善佛教網 · 完整样式（去重版）
   ============================================================ */
* { margin:0; padding:0; box-sizing:border-box; }

:root {
  --bg: #ffffff;
  --bg-side: #f7f7f5;
  --bg-hover: #f0f0ee;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-2: #4a4a4a;
  --text-3: #999999;
  --border: #eaeaea;
  --accent: #8b6f47;
  --primary: #2c3e50;
  --font-family: "PingFang SC","Hiragino Sans GB","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",-apple-system,BlinkMacSystemFont,sans-serif;
  --font-size: 17px;
  --line-height: 1.9;
  --letter-spacing: 0.02em;
  --para-spacing: 0.6em;
  --sidebar-w: 260px;
}
html.dark, body.dark {
  --bg: #0a0a0a;
  --bg-side: #151515;
  --bg-hover: #1f1f1f;
  --bg-card: #151515;
  --text: #e8e8e8;
  --text-2: #b8b8b8;
  --text-3: #7a7a7a;
  --border: #262626;
}
html[data-theme="light-cream"] { --bg:#fdfaf3; --bg-side:#f5efe2; --bg-hover:#ebe4d4; }
html[data-theme="light-green"] { --bg:#f2f7f2; --bg-side:#e6efe6; --bg-hover:#d8e6d8; }
html[data-theme="light-blue"]  { --bg:#f2f6fb; --bg-side:#e6eef7; --bg-hover:#d8e2ef; }
html[data-theme="light-rose"]  { --bg:#fcf4f6; --bg-side:#f7e8ec; --bg-hover:#efd8dd; }

html, body { height:100%; }
body {
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* ============ 整体 ============ */
.app { display: flex; min-height: 100vh; }

/* ============ 左侧栏 ============ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-side);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 0 30px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.side-head {
  padding: 0 18px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.side-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600;
  color: var(--text);
}
.logo-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.side-search {
  display: flex; align-items: center; gap: 8px;
  margin: 0 18px 14px;
  padding: 0 12px;
  height: 38px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color .15s;
}
.side-search:focus-within { border-color: var(--accent); }
.side-search i { color: var(--text-3); font-size: 13px; flex-shrink: 0; }
.side-search input {
  flex: 1; min-width: 0;
  border: none; background: transparent; outline: none;
  font-size: 13.5px; color: var(--text); font-family: inherit;
}
.side-search input::placeholder { color: var(--text-3); }
.side-nav {
  display: flex; flex-direction: column; gap: 2px;
  padding: 0 10px;
}
.side-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  font-size: 14px; color: var(--text-2);
  transition: all .15s;
}
.side-nav a i { width: 16px; text-align: center; font-size: 13px; color: var(--text-3); }
.side-nav a:hover { background: var(--bg-hover); color: var(--text); }
.side-nav a:hover i { color: var(--accent); }
.side-nav a.active { background: var(--bg-hover); color: var(--accent); }
.side-nav a.active i { color: var(--accent); }

/* ============ 右侧 ============ */
.content {
  flex: 1; min-width: 0;
  background: var(--bg);
  display: flex; flex-direction: column;
  position: relative;
}
.content-top {
  display: flex; justify-content: flex-end; align-items: center;
  padding: 12px 28px 0; min-height: 44px;
}

/* 语言选择器 */
.language-selector { position:relative; }
.language-current {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 18px;
  background: transparent; border: 1px solid var(--border);
  cursor: pointer; transition: all .2s; height: 34px;
}
.language-current:hover { border-color: var(--accent); }
.language-flag {
  width: 18px; height: 12px;
  background-size: cover; background-position: center;
  border-radius: 2px; flex-shrink: 0;
}
.language-name { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.language-current .fa-chevron-down { font-size: 9px; color: var(--text-3); }
.language-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 360px; max-height: 480px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.1);
  z-index: 1000;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: .2s;
  padding: 14px; overflow: hidden;
  display: flex; flex-direction: column;
}
.language-selector.active .language-dropdown { opacity:1; visibility:visible; transform:none; }
.language-regions-container { overflow-y: auto; flex: 1; padding-right: 4px; }
.language-regions-container::-webkit-scrollbar { width: 4px; }
.language-regions-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.language-region { margin-bottom: 14px; }
.language-region:last-child { margin-bottom: 0; }
.region-title {
  font-size: 12px; font-weight: 600; color: var(--accent);
  padding-bottom: 6px; margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.region-languages { display:grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap:2px; }
.language-option {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 8px; font-size: 13px;
  color: var(--text-2); border-radius: 4px;
  cursor: pointer; transition: .15s;
}
.language-option:hover { background: var(--bg-hover); color: var(--text); }
.language-option.active { background: rgba(139,111,71,.12); color: var(--accent); }
.language-option .language-flag { width: 16px; height: 11px; }
.language-option span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mobile-language-toggle {
  display: none; background: none; border: none;
  color: var(--text-2); font-size: 18px;
  padding: 4px; cursor: pointer;
}
.mobile-language-modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 2000;
  justify-content: center; align-items: center; padding: 20px;
}
.mobile-language-modal.active { display: flex; }
.mobile-language-content {
  background: var(--bg-card);
  width: 100%; max-width: 420px; max-height: 75vh;
  border-radius: 16px; overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
}
.mobile-language-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.mobile-language-header h3 { font-size: 15px; font-weight: 600; color: var(--text); }
.mobile-language-close { background: none; border: none; color: var(--text-3); font-size: 18px; cursor: pointer; }
.mobile-language-list { overflow-y: auto; padding: 12px 18px; }
.mobile-language-option {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 6px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.mobile-language-option:last-child { border-bottom: none; }
.mobile-language-option.active { color: var(--accent); }
.mobile-language-flag {
  width: 20px; height: 14px;
  background-size: cover; background-position: center;
  border-radius: 2px; flex-shrink: 0;
}
.mobile-language-name { font-size: 14px; }

/* ============ 主内容 ============ */
.wrap { max-width: 100%; padding: 20px 60px 80px; }

.crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-3); margin-bottom: 20px;
}
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--accent); }
.crumbs .cur { color: var(--text); }

/* ============ 正文页 ============ */
.card-read { max-width: 100%; }
.read-title {
  font-size: 26px; font-weight: 600; line-height: 1.4;
  color: var(--text); margin-bottom: 10px;
}
.read-translator { font-size: 13.5px; color: var(--text-3); margin-bottom: 20px; }

.read-tools {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 24px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.tool-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  border: 1px solid var(--border); background: var(--bg);
  border-radius: 6px; font-size: 13.5px;
  color: var(--text-2);
  transition: all .2s; position: relative;
}
.tool-btn:hover { border-color: var(--accent); color: var(--accent); }
.tool-btn i { font-size: 13px; }
.like-btn.liked { background: var(--accent); border-color: var(--accent); color: #fff; }
.like-btn.liked i { color: #fff; }
.like-count {
  position: absolute; top: -8px; right: -8px;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: #e74c3c; color: #fff;
  font-size: 11px; line-height: 20px; text-align: center; font-weight: 600;
  display: none;
  box-shadow: 0 2px 6px rgba(231,76,60,.4);
}
.like-count.show { display: block; }

#ttsBtn.tts-playing {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
#ttsBtn.tts-playing i { color: #fff; }
#ttsBtn.tts-playing:hover { background: #75593a; border-color: #75593a; color: #fff; }

.read-chapter {
  font-size: 15px; font-weight: 500; color: var(--text-2);
  margin: 20px 0 14px; padding-left: 10px;
  border-left: 3px solid var(--accent);
}
.read-body {
  font-size: var(--font-size);
  line-height: var(--line-height);
  letter-spacing: var(--letter-spacing);
  color: var(--text);
}
.read-body p {
  margin: 0 0 var(--para-spacing);
  text-indent: 2em; text-align: justify; word-break: break-word;
}
.read-body p:last-child { margin-bottom: 0; }
.read-body .simple-tts-active { background: #fff3b8; border-radius: 3px; }
html.dark .read-body .simple-tts-active { background: rgba(200,170,100,.35); color: #fff; }

/* ============ 卷次列表 ============ */
.card-list { max-width: 100%; }
.list-title { font-size: 26px; font-weight: 600; margin-bottom: 8px; }
.list-sub {
  font-size: 13px; color: var(--text-3);
  margin-bottom: 24px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.chapter-list { list-style: none; }
.chapter-list li { border-bottom: 1px dashed var(--border); }
.chapter-list a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0;
  transition: color .15s;
}
.chapter-list a:hover { color: var(--accent); }
.chapter-list a i { color: var(--accent); font-size: 12px; width: 14px; flex-shrink: 0; }
.chapter-list a span { flex: 1; font-size: 14.5px; }
.chapter-list a em {
  font-style: normal; font-family: Consolas, monospace;
  font-size: 12px; color: var(--text-3);
}

/* ============ 本經全部卷次 ============ */
.siblings-box {
  max-width: 100%;
  margin: 40px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.siblings-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: .05em;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.siblings-title i { color: var(--accent); font-size: 12px; }
.siblings-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.siblings-list a {
  padding: 7px 16px;
  font-size: 13.5px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-2);
  transition: all .2s;
  background: var(--bg);
}
.siblings-list a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(139,111,71,.06);
}
.siblings-list a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
html.dark .siblings-list a:hover { background: rgba(139,111,71,.15); }

/* ============ 浮動按鈕 ============ */
.float-btn {
  position: fixed; right: 28px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text-2); font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  z-index: 900;
}
.float-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.float-btn.hidden { opacity: 0; visibility: hidden; }
#settingsToggle { bottom: 28px; }
#backTop { bottom: 84px; }

/* ============ 設置抽屜 ============ */
.drawer-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0; visibility: hidden;
  transition: .25s;
  z-index: 990;
}
.drawer-mask.active { opacity: 1; visibility: visible; }
.settings-drawer {
  position: fixed; top: 0; right: 0;
  width: 340px; height: 100vh;
  background: var(--bg);
  border-left: 1px solid var(--border);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.settings-drawer.active { transform: translateX(0); }
.settings-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.settings-head h3 {
  margin: 0; font-size: 15px; font-weight: 600;
  color: var(--text);
  display: inline-flex; align-items: center; gap: 8px;
}
.settings-head h3 i { color: var(--accent); font-size: 13px; }
.icon-btn {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: transparent;
  color: var(--text-3); font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: .2s;
}
.icon-btn:hover { color: var(--accent); background: var(--bg-hover); }
.settings-body { flex: 1; overflow-y: auto; padding: 24px; }
.setting-block { margin-bottom: 28px; }
.setting-block:last-of-type { margin-bottom: 0; }
.setting-block > label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-2); font-weight: 600;
  margin-bottom: 12px; letter-spacing: .05em;
}
.setting-block > label i { color: var(--accent); font-size: 12px; }
.setting-block > label .val {
  margin-left: auto; font-size: 12px; color: var(--text-3);
  font-family: Consolas, monospace; font-weight: 400;
}
.theme-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; }
.theme-swatch {
  aspect-ratio: 1; border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer; transition: all .2s; position: relative;
}
.theme-swatch:hover { transform: scale(1.08); }
.theme-swatch.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,111,71,.15); }
.theme-swatch.dark-swatch { background: linear-gradient(135deg, #1a1a1a 50%, #0a0a0a 50%); }
.theme-swatch.dark-swatch::after {
  content: "\f186";
  font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #f5f5f5; font-size: 11px;
}
.font-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.font-btn {
  padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text);
  font-size: 13px; transition: all .2s; text-align: center;
}
.font-btn:hover { border-color: var(--accent); color: var(--accent); }
.font-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.settings-body input[type="range"] { width: 100%; accent-color: var(--accent); height: 4px; }
.reset-btn {
  width: 100%; margin-top: 20px; padding: 12px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text-3);
  font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .2s;
}
.reset-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ============ 網站地圖 ============ */
.card-sitemap { max-width: 100%; padding: 8px 0; }
.sitemap-title {
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.sitemap-sub {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.letter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 32px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.letter-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--bg-side);
  transition: all .15s;
}
.letter-nav a:hover {
  background: var(--accent);
  color: #fff;
}
.letter-block { margin-bottom: 36px; }
.letter-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  letter-spacing: .05em;
}
.sutra-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 4px 24px;
}
.sutra-list li { border-bottom: 1px dashed var(--border); }
.sutra-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  font-size: 14px;
  color: var(--text);
  transition: color .15s;
}
.sutra-list a:hover { color: var(--accent); }
.sutra-list a i {
  color: var(--accent);
  font-size: 11px;
  width: 12px;
  flex-shrink: 0;
}
.sutra-list a .s-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sutra-list a .s-count {
  font-style: normal;
  font-size: 11.5px;
  color: var(--text-3);
  flex-shrink: 0;
}

/* ============ 搜索页 ============ */
.card-search { max-width: 100%; padding: 8px 0; }
.search-title {
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
}
.big-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 8px 0 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 20px;
  transition: border-color .2s;
}
.big-search:focus-within { border-color: var(--accent); }
.big-search > i { color: var(--text-3); font-size: 15px; flex-shrink: 0; }
.big-search input {
  flex: 1; min-width: 0;
  border: none; background: transparent; outline: none;
  font-size: 15px; color: var(--text); font-family: inherit;
}
.big-search input::placeholder { color: var(--text-3); }
.big-search button {
  padding: 0 24px;
  height: 40px;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s;
}
.big-search button:hover { background: #75593a; }

.search-meta {
  font-size: 13.5px;
  color: var(--text-3);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.search-meta strong { color: var(--accent); font-weight: 600; }

.search-list { list-style: none; }
.search-list > li {
  padding: 16px 0;
  border-bottom: 1px dashed var(--border);
}
.search-list > li > a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text);
  transition: color .15s;
}
.search-list > li > a:hover { color: var(--accent); }
.search-list > li > a i {
  color: var(--accent);
  font-size: 12px;
  width: 14px;
  flex-shrink: 0;
}
.search-list .r-name { flex: 1; min-width: 0; }
.search-list .r-count {
  font-style: normal;
  font-size: 12px;
  color: var(--text-3);
  flex-shrink: 0;
}
.vol-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-left: 24px;
}
.vol-list a {
  padding: 4px 12px;
  font-size: 12.5px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-2);
  transition: all .15s;
  background: var(--bg);
}
.vol-list a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(139,111,71,.06);
}

/* ============ 首页 ============ */
.home-hero {
  text-align: center;
  padding: 40px 20px 48px;
  margin-bottom: 48px;
  background: linear-gradient(135deg, #fdfaf3 0%, #f7f2e8 100%);
  border-radius: 16px;
  border: 1px solid var(--border);
}
html.dark .home-hero {
  background: linear-gradient(135deg, #151515 0%, #1f1f1f 100%);
}
.hero-logo {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(139,111,71,.25);
}
.hero-title {
  font-size: 34px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .08em;
  margin-bottom: 10px;
}
.hero-sub {
  font-size: 14px;
  color: var(--accent);
  letter-spacing: .3em;
  margin-bottom: 18px;
}
.hero-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.9;
  max-width: 620px;
  margin: 0 auto 28px;
}
.hero-search {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 580px;
  margin: 0 auto 18px;
  padding: 6px 6px 6px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  height: 54px;
  transition: border-color .2s, box-shadow .2s;
}
.hero-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(139,111,71,.12);
}
.hero-search > i { color: var(--text-3); font-size: 15px; flex-shrink: 0; }
.hero-search input {
  flex: 1; min-width: 0;
  border: none; background: transparent; outline: none;
  font-size: 15px; color: var(--text); font-family: inherit;
}
.hero-search input::placeholder { color: var(--text-3); }
.hero-search button {
  padding: 0 26px;
  height: 42px;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s;
}
.hero-search button:hover { background: #75593a; }
.hero-hot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: 12.5px;
}
.hero-hot a {
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(139,111,71,.08);
  color: var(--text-2);
  transition: all .15s;
}
.hero-hot a:hover { background: var(--accent); color: #fff; }

.home-h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: .05em;
}
.home-h2 i { color: var(--accent); font-size: 14px; }

.home-letters { margin-bottom: 48px; }
.letter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}
.letter-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  transition: all .15s;
  background: var(--bg);
}
.letter-grid a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139,111,71,.12);
}
.letter-grid a span {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-3);
  margin-top: 4px;
}

.home-recommend { margin-bottom: 20px; }
.recommend-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 4px 24px;
}
.recommend-list li { border-bottom: 1px dashed var(--border); }
.recommend-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text);
  transition: color .15s;
}
.recommend-list a:hover { color: var(--accent); }
.recommend-list a i { color: var(--accent); font-size: 11px; width: 12px; flex-shrink: 0; }
.recommend-list .r-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recommend-list .r-count { font-style: normal; font-size: 11.5px; color: var(--text-3); flex-shrink: 0; }
.recommend-list .r-like {
  font-style: normal;
  font-size: 11.5px;
  color: #e74c3c;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.recommend-list .r-like i { font-size: 10px; }

/* ============ 首页 · 关于 ============ */
.home-about {
  margin: 48px 0 20px;
  padding: 28px 32px;
  background: var(--bg-side);
  border: 1px solid var(--border);
  border-radius: 12px;
}
html.dark .home-about { background: var(--bg-side); }
.about-text {
  font-size: 14px;
  color: var(--text-2);
  line-height: 2;
}
.about-text p { margin: 0 0 12px; }
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--accent); font-weight: 600; }
.about-text b { color: var(--accent); font-weight: 500; }

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 20px;
  margin-top: 40px;
  background: var(--bg-side);
}
.footer-inner {
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}
.footer-copy {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.9;
  letter-spacing: 0;
}
.footer-copy a,
.footer-copy a:visited {
  color: var(--text-3);
  transition: color .15s;
}
.footer-copy a:hover {
  color: var(--accent);
}
.footer-divider {
  display: inline-block;
  margin: 0 6px;
  color: var(--text-3);
  opacity: .5;
}

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%; position: static; height: auto;
    border-right: none; border-bottom: 1px solid var(--border);
    padding: 14px 0;
  }
  .side-head { padding: 0 14px 12px; }
  .side-search { margin: 0 14px 10px; }
  .side-nav { flex-direction: row; flex-wrap: wrap; padding: 0 10px; }
  .side-nav a { padding: 8px 12px; font-size: 13px; }
  .side-nav a i { display: none; }

  .content-top {
    position: fixed;
    top: 10px;
    right: 14px;
    z-index: 200;
    padding: 0;
    min-height: auto;
    justify-content: flex-end;
  }
  .language-selector { display: none; }
  .mobile-language-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
  }
  .wrap { padding: 56px 18px 60px; }
  .read-title { font-size: 21px; }
  .settings-drawer {
    width: 100%; max-width: 100%; top: auto; bottom: 0;
    height: 82vh;
    border-left: none; border-top: 1px solid var(--border);
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
  }
  .settings-drawer.active { transform: translateY(0); }
  .float-btn { width: 42px; height: 42px; right: 16px; }
  #settingsToggle { bottom: 16px; }
  #backTop { bottom: 66px; }

  .sutra-list { grid-template-columns: 1fr; }
  .letter-nav { gap: 3px; }
  .letter-nav a { width: 28px; height: 28px; font-size: 12px; }

  .big-search { height: 46px; padding: 0 6px 0 14px; }
  .big-search button { padding: 0 16px; height: 36px; font-size: 13px; }
  .vol-list { padding-left: 20px; }

  .home-hero { padding: 28px 16px 32px; border-radius: 12px; }
  .hero-logo { width: 52px; height: 52px; font-size: 22px; }
  .hero-title { font-size: 24px; }
  .hero-sub { font-size: 12px; }
  .hero-desc { font-size: 13px; }
  .hero-search { height: 46px; padding: 5px 5px 5px 14px; }
  .hero-search button { padding: 0 16px; height: 36px; font-size: 13px; }
  .letter-grid { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
  .letter-grid a { padding: 10px 4px; font-size: 15px; }
  .recommend-list { grid-template-columns: 1fr; }

  .site-footer { padding: 16px 14px; margin-top: 28px; }
  .footer-copy { font-size: 11.5px; line-height: 1.8; }
  .footer-divider { display: inline; margin: 0 4px; }
}
@media (max-width: 640px) {
  .region-languages { grid-template-columns: 1fr; }
}/* ============ 地图 · 字母折叠 ============ */
.letter-title {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color .15s;
}
.letter-title:hover { color: var(--accent); opacity: .85; }
.letter-title .letter-arrow {
  font-size: 14px;
  color: var(--text-3);
  transition: transform .2s;
  width: 14px;
}
.letter-title.active .letter-arrow {
  transform: rotate(90deg);
  color: var(--accent);
}
.letter-title .letter-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
  margin-left: 4px;
}