/* ===========================================================
   音乐库 · 样式
   变量集中在 :root，改主题只动这里
   注意：列表行高固定 60px，必须和 js/config.js 的 ROW_H 一致
   =========================================================== */

/* 主题：默认浅色；<html data-theme="dark"> 时切深色（菜单里可切，存 localStorage） */
:root {
  --bg: #f4f6fb;
  --bg-soft: #eceff6;
  --bg-elev: #ffffff;
  --line: #dfe3ec;
  --text: #171a21;
  --muted: #6b7385;
  --muted-2: #9aa2b4;
  --accent: #6244f5;
  --accent-2: #8a6bff;
  --accent-soft: rgba(98, 68, 245, .10);
  --accent-line: #cfc4f7;
  --danger: #d92d3f;
  --ok: #128a55;
  --header-bg: rgba(255, 255, 255, .86);
  --player-bg: rgba(255, 255, 255, .96);
  --card-bg: rgba(255, 255, 255, .82);
  --shadow: 0 12px 40px rgba(20, 28, 48, .16);
  --shadow-sm: 0 8px 24px rgba(20, 28, 48, .12);
  --shadow-lg: 0 18px 40px rgba(20, 28, 48, .18);
  --scrim: rgba(20, 28, 48, .42);
  --scroll: #c8cfdd;
  --track: #d9dee9;
  --thumb: #ffffff;
  --dash: #c9d0df;
  --sk1: #e8ecf5;
  --sk2: #f5f8fd;
  --warn-bg: #fff6da;
  --warn-fg: #8a5b00;
  --warn-line: #efd9a3;
  --err-fg: #b3232f;
  --err-line: #f0c2c7;
  --ok-fg: #0d7a4a;
  --ok-line: #bfe6d2;
  --r: 12px;
  --row-h: 60px;
}

:root[data-theme="dark"] {
  --bg: #0f1115;
  --bg-soft: #171a21;
  --bg-elev: #1e222b;
  --line: #2a2f3a;
  --text: #e6e8ee;
  --muted: #8b93a5;
  --muted-2: #4a5163;
  --accent: #7c5cff;
  --accent-2: #7a5cff;
  --accent-soft: rgba(124, 92, 255, .15);
  --accent-line: #3a3160;
  --danger: #ff5d6c;
  --ok: #35d07f;
  --header-bg: rgba(15, 17, 21, .85);
  --player-bg: rgba(23, 26, 33, .96);
  --card-bg: rgba(15, 17, 21, .82);
  --shadow: 0 12px 40px rgba(0, 0, 0, .55);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, .4);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, .45);
  --scrim: rgba(0, 0, 0, .6);
  --scroll: #2c3140;
  --track: #333949;
  --thumb: #ffffff;
  --dash: #343a48;
  --sk1: #1b1f27;
  --sk2: #242935;
  --warn-bg: #3a2f16;
  --warn-fg: #ffcf70;
  --warn-line: #5a4620;
  --err-fg: #ffb3bb;
  --err-line: #5a2a33;
  --ok-fg: #9ff0c4;
  --ok-line: #24503a;
}

* { box-sizing: border-box; }
/* hidden 属性要压过作者样式里的 display:flex/grid，否则切页时旧区块会留在屏幕上 */
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input { font: inherit; color: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 6px; border: 2px solid var(--bg); }

/* ---------- 登录 ---------- */
#auth {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}
.card {
  width: min(380px, 100%);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}
.card h1 { margin: 0 0 4px; font-size: 20px; letter-spacing: .5px; }
.card p.sub { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 12px; border-radius: 10px;
  background: var(--bg-elev); border: 1px solid var(--line); outline: none;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; background: var(--accent); color: #fff;
  font-weight: 600; transition: filter .15s, opacity .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.full { width: 100%; }
.btn.ghost { background: var(--bg-elev); border: 1px solid var(--line); color: var(--text); font-weight: 500; }
.btn.small { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn.danger { background: transparent; border: 1px solid var(--err-line); color: var(--danger); }
/* 纯图标按钮：正方形，图标垂直居中 */
.btn.iconbtn { padding: 0; width: 30px; height: 30px; border-radius: 8px; }
.btn.iconbtn .ico { width: 15px; height: 15px; }
.btn.iconbtn.danger { color: var(--danger); }
.btn.iconbtn.danger:hover { background: rgba(217, 45, 63, .10); color: var(--danger); }
.ico { flex: none; display: block; }
.switch { margin-top: 16px; text-align: center; font-size: 13px; color: var(--muted); }
.switch a { color: var(--accent); text-decoration: none; cursor: pointer; }
.msg { margin-top: 14px; font-size: 13px; min-height: 18px; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }

/* ---------- 主界面 ---------- */
#app { display: none; height: 100%; flex-direction: column; overflow: hidden; }
#app.on { display: flex; }
header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px max(20px, calc((100% - 1080px) / 2 + 20px));
  border-bottom: 1px solid var(--line);
  background: var(--header-bg); backdrop-filter: blur(10px);
  flex: none; z-index: 20;
}
.logo { font-weight: 700; letter-spacing: .3px; white-space: nowrap; }
.logo span { color: var(--accent); }
.search {
  flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
}
.search input { flex: 1; background: none; border: 0; outline: none; min-width: 0; }
.spacer { flex: 1; }
.badge {
  font-size: 11px; padding: 2px 7px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); white-space: nowrap;
}
.badge.draft { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-line); }

/* 用户区：一个头像，点开才是菜单 */
.userbox { position: relative; flex: none; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; padding: 0; cursor: pointer;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 1px solid rgba(255,255,255,.35); color: #fff;
  font: 600 14px/1 inherit; text-transform: uppercase;
}
.avatar:hover { filter: brightness(1.08); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 208px; padding: 6px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow);
}
.menuHead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menuHead .tswitch { flex: none; }
.menuEmail { color: var(--muted); font-size: 13px; word-break: break-all; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mitem {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; border-radius: 8px; padding: 9px 10px;
  color: var(--text); font: inherit; font-size: 14px;
}
.mitem:hover { background: var(--bg-soft); }
.mitem:disabled { opacity: .55; cursor: default; }
.mitem:disabled:hover { background: none; }

/* 关键：main 不许滚动，滚动交给 #listWrap，虚拟滚动才有稳定的视口高度 */
main {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  width: min(1080px, 100%); margin: 0 auto; padding: 18px 20px 0; overflow: hidden;
}
/* 三个分区各自撑满 main，内部再决定谁滚动（否则高度=内容高度，被 main 裁掉后无法滚动） */
#praisePane, #sermonPane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; flex: none; }
.toolbar .count { color: var(--muted); font-size: 13px; }
select {
  background: var(--bg-soft); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px; outline: none;
}

/* 滚动容器 + 撑高的内层，行绝对定位 */
#listWrap {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  position: relative; padding-bottom: 110px;
}
#list { position: relative; width: 100%; }

.row {
  position: absolute; left: 0; right: 0;
  height: var(--row-h);
  display: grid; grid-template-columns: 44px 1fr 84px 136px; align-items: center;
  gap: 12px; padding: 8px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent;
  will-change: transform;
}
.row:hover { background: var(--bg-soft); }
.row.active { background: var(--accent-soft); border-color: var(--accent-line); box-shadow: inset 0 0 0 var(--accent); }
.row.active .t b { color: var(--accent); }
.row .idx { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; }
.row.active .idx { color: var(--accent); }
.row .pp {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; margin-right: -2px; border-radius: 6px;
  color: var(--accent); vertical-align: middle;
}
.row .pp:hover { background: var(--accent-soft); }
.row .pp svg { display: block; }

/* 批量选择：行内换成一个勾选框，操作列收起 */
.row.sel .acts { display: none; }
.row.sel { grid-template-columns: 44px 1fr 84px 20px; }
.row.picked { background: var(--accent-soft); border-color: var(--accent-line); }
.pick {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--line); background: var(--bg-elev);
  color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
}
.row.picked .pick { background: var(--accent); border-color: var(--accent); }
.row.picked .idx { color: var(--accent); }

/* 批量操作条：浮在播放器上方 */
.selbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 50;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg-elev); box-shadow: var(--shadow-lg);
  font-size: 13px;
}
.selbar #selCount { color: var(--muted); margin-right: 4px; white-space: nowrap; }
.selbar .btn:disabled { opacity: .45; cursor: default; }

/* 调整顺序：行可拖拽，序号可点 */
.row[draggable="true"] { cursor: grab; }
.row[draggable="true"]:active { cursor: grabbing; }
.row[draggable="true"] .idx { cursor: pointer; color: var(--accent); font-weight: 600; }
.row[draggable="true"] { grid-template-columns: 44px 1fr 84px 132px; }
.row[draggable="true"] .acts .btn { padding: 0; }
.row.dragging { opacity: .4; }
.row.drop-b { box-shadow: inset 0 2px 0 var(--accent); }
.row.drop-a { box-shadow: inset 0 -2px 0 var(--accent); }

/* 讲道集内排序（.srow 是 grid，规则同上） */
.srow[draggable="true"] { cursor: grab; }
.srow[draggable="true"]:active { cursor: grabbing; }
.srow[draggable="true"] .sidx { cursor: pointer; color: var(--accent); font-weight: 600; }
.srow[draggable="true"] .sacts { grid-template-columns: repeat(4, auto); }
.srow[draggable="true"] .sacts .btn { padding: 2px 6px; }
.srow.dragging { opacity: .4; }
.srow.drop-b { box-shadow: inset 0 2px 0 var(--accent); }
.srow.drop-a { box-shadow: inset 0 -2px 0 var(--accent); }
.cov {
  width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none;
  background: var(--bg-elev); display: grid; place-items: center; color: var(--muted-2); font-size: 18px;
}
.mid { display: flex; align-items: center; gap: 10px; min-width: 0; }
.meta { min-width: 0; }
.t { display: flex; align-items: center; gap: 8px; }
.t b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dur { color: var(--text); opacity: .56; text-align: right; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.acts { display: flex; gap: 5px; justify-content: flex-end; opacity: 0; transition: opacity .15s; }
.acts .btn.iconbtn { width: 29px; height: 29px; }
.row:hover .acts, .row.active .acts { opacity: 1; }
.empty { text-align: center; color: var(--muted); padding: 80px 20px; }
.empty b { display: block; color: var(--text); margin-bottom: 6px; font-size: 15px; }

/* 骨架屏：数据没到之前先占位，避免白屏 */
.row.sk { pointer-events: none; }
.row.sk .cov, .sk-lines i {
  background: linear-gradient(90deg, var(--sk1) 25%, var(--sk2) 37%, var(--sk1) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
.sk-lines { flex: 1; min-width: 0; }
.sk-lines i { display: block; height: 10px; border-radius: 6px; margin: 2px 0; }
.sk-lines i:first-child { width: 55%; }
.sk-lines i:last-child { width: 32%; height: 8px; }
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* ---------- 播放器 ---------- */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr) minmax(0,1fr);
  align-items: center; gap: 16px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: var(--player-bg); border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.now img, .now .cov { width: 46px; height: 46px; border-radius: 8px; }
.now .txt { min-width: 0; }
.now .txt b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now .txt span { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ctr { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.btns { display: flex; align-items: center; gap: 6px; }
.icon {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  color: var(--text); transition: background .15s;
}
.icon:hover { background: var(--bg-elev); }
.icon.play { background: var(--accent); width: 42px; height: 42px; color: #fff; }
.icon.play:hover { filter: brightness(1.1); background: var(--accent); }
.icon:disabled { opacity: .35; }
.seek { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
input[type=range] {
  -webkit-appearance: none; appearance: none; height: 4px; border-radius: 999px;
  background: linear-gradient(to right, var(--accent) var(--p, 0%), var(--track) var(--p, 0%));
  flex: 1; outline: none; cursor: pointer; min-width: 0;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--thumb);
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
}
.vol { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.vol input[type=range] { width: 90px; flex: none; }
.vol .icon { width: 30px; height: 30px; }

/* ---------- 上传弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: none; }
.modal.on { display: grid; place-items: center; padding: 24px; }
.modal .scrim { position: absolute; inset: 0; background: var(--scrim); }
.sheet {
  position: relative; width: min(720px, 100%); max-height: 85vh; overflow: auto;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; padding: 22px;
}
.sheet h2 { margin: 0 0 4px; font-size: 16px; }
.sheet .hint { color: var(--muted); font-size: 12.5px; margin-bottom: 16px; }
/* 自绘的文件选择：原生控件文案是浏览器语言，没法翻译 */
.filepick { display: flex; align-items: center; gap: 10px; min-width: 0; }
.filepick .fname {
  flex: 1; min-width: 0; font-size: 13px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.drop {
  border: 1.5px dashed var(--dash); border-radius: 12px; padding: 26px; text-align: center;
  color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.uprow { display: grid; grid-template-columns: 1fr 1fr 64px 130px; gap: 8px; align-items: center; padding: 6px 0; }
.uprow input {
  width: 100%; padding: 7px 9px; border-radius: 8px; background: var(--bg-elev);
  border: 1px solid var(--line); outline: none; font-size: 13px;
}
.uprow .size { color: var(--muted); font-size: 12px; text-align: right; }
.cellst { min-width: 0; }
.uprow .st { display: block; font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uprow .st.ok { color: var(--ok); }
.uprow .st.err { color: var(--danger); }
.upbar { height: 4px; border-radius: 999px; background: var(--track); margin-top: 4px; overflow: hidden; }
.upbar i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.sheet .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 104px; z-index: 100;
  transform: translate(-50%, 10px); opacity: 0; pointer-events: none;
  background: var(--bg-elev); border: 1px solid var(--line); color: var(--text);
  padding: 10px 16px; border-radius: 10px; font-size: 13px;
  max-width: min(560px, 90vw); box-shadow: var(--shadow-sm);
  transition: opacity .2s, transform .2s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: var(--err-line); color: var(--err-fg); }
.toast.ok { border-color: var(--ok-line); color: var(--ok-fg); }

/* ---------- 小屏 ---------- */
@media (max-width: 720px) {
  header { padding: 10px 12px; gap: 8px; }
  .avatar { width: 30px; height: 30px; font-size: 13px; }
  .menu { min-width: 190px; }
  .logo { display: none; }
  .search { max-width: none; flex: 1; }
  .tabs { padding: 2px; }
  .tab { padding: 5px 10px; font-size: 12.5px; }

  main { padding: 12px 12px 0; }
  .subtabs { flex-wrap: nowrap; row-gap: 0; gap: 5px; }
  .subtabs .search { flex: 1 1 90px; min-width: 0; max-width: none; margin-left: 4px; order: 0; }
  .subtabs .nlbl { display: none; }
  #uploadBtn { padding: 5px 8px; font-size: 12px; }
  #listWrap { padding-bottom: 150px; }
  .selbar { left: 10px; right: 10px; transform: none; padding: 8px 10px; gap: 6px; flex-wrap: wrap; }
  .selbar .btn { padding: 5px 8px; font-size: 12px; }
  .up-txt { display: none; }
  .up-ico { font-weight: 700; }

  .row { grid-template-columns: 26px 1fr 44px auto; gap: 8px; padding: 8px 4px; }
  .row .cov { width: 40px; height: 40px; }
  .row .acts { opacity: 1; gap: 2px; }
  .row .acts .btn { padding: 4px 6px; font-size: 11px; }
  .row .acts .btn.iconbtn { width: 22px; height: 22px; padding: 0; border-radius: 7px; }
  .row .acts .btn.iconbtn .ico { width: 13px; height: 13px; }
  .row .acts .edge { display: none; }   /* 小屏只留 ↑↓，远距离用点序号 */
  .row .dur { font-size: 11.5px; }

  .player { grid-template-columns: 1fr; gap: 6px; padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); }
  .vol { display: none; }
  .now { gap: 10px; }
  .now img, .now .cov { width: 38px; height: 38px; }
  .btns .icon { width: 34px; height: 34px; }
  .btns .icon.play { width: 40px; height: 40px; }

  .uprow { grid-template-columns: 1fr 1fr 56px; }
  .uprow .cellst { grid-column: 1 / -1; }
  .toast { bottom: 150px; }
}

/* ---------- 顶部标签（歌曲 / 合集） ---------- */
.tabs {
  display: flex; gap: 3px; padding: 0; flex: none;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
}
.tab {
  padding: 6px 14px; border-radius: 8px; color: var(--muted); text-decoration: none;
  font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s;
}
.tab:hover { color: var(--text); }
.tab.on { background: var(--accent); color: #fff; box-shadow: none; }

/* 二级 tab：全部 / 合集（集合），右侧挂当前视图的搜索框 */
.subtabs {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-bottom: 12px;
  flex: none;
}
.subtabs .search {
  margin-left: 8px;
  flex: 1 1 200px;
  min-width: 0;
  max-width: 420px;
  padding: 7px 11px;
}
#uploadBtn { flex: none; margin-left: 2px; }
.sub {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  transition: background .15s, color .15s, border-color .15s;
}
.sub:hover { color: var(--text); }
.sub.on {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: none;
}
/* 子 tab 与右侧按钮都不许被搜索框挤扁（否则中文会被压成竖排、看着像圆点） */
.subtabs > .sub { flex: none; white-space: nowrap; }
.subtabs > .btn { flex: none; }

/* ---------- 合集详情头 ---------- */
.hero { flex: none; margin-bottom: 14px; }
/* 面包屑行：左边 ‹ 合集，右端放分类/年份 */
.hmeta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  color: var(--muted); font-size: 12.5px;
}
.crumb { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 13px; text-decoration: none; }
.crumb:hover { color: var(--accent); }
/* 返回箭头用图标，笔画重一些，和文字同高 */
.crumb .arr { display: inline-flex; width: 14px; height: 14px; }
.crumb .arr svg { width: 14px; height: 14px; }
.hcats { margin-left: auto; color: var(--muted-2); }
.heroBody { display: flex; gap: 18px; align-items: center; margin-top: 8px; }
.hcover {
  width: 104px; height: 104px; border-radius: 12px; flex: none;
  background: var(--bg-elev); display: grid; place-items: center;
  color: var(--muted-2); font-size: 34px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.hcover img { width: 100%; height: 100%; object-fit: cover; }
.hinfo { min-width: 0; }
.hnameRow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.hnameRow h2 { margin: 0; font-size: 26px; line-height: 1.2; }
.hcount { color: var(--muted); font-size: 13px; }
.hinfo p { margin: 0 0 10px; color: var(--muted); font-size: 13px; max-width: 62ch; }
.heroActs { display: flex; gap: 8px; flex-wrap: wrap; }
/* 宽屏给排序按钮，窄屏收进「⋯」 */
.hero-more { display: none; }
/* 「⋯」不要边框，hover 才出底色，避免看起来像第三个按钮 */
.hero-more { border-color: transparent; background: transparent; color: var(--muted); }
.hero-more:hover { background: var(--bg-soft); color: var(--text); }
@media (max-width: 720px) {
  .hero-order { display: none; }
  .hero-more { display: inline-flex; }
}

/* ---------- 合集墙 ---------- */
#albumsPane { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 110px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 16px; }
.acard {
  position: relative; padding: 10px; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  transition: transform .12s, border-color .12s;
}
.acard:hover { transform: translateY(-2px); border-color: var(--accent-line); }
.acard .acover {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden;
  background: var(--bg-elev); display: grid; place-items: center; color: var(--muted-2); font-size: 30px;
}
.acard .acover img { width: 100%; height: 100%; object-fit: cover; }
.acard .aname { margin-top: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acard .acover.ph { display: grid; place-items: center; color: var(--muted-2); font-size: 32px; background: var(--bg-soft); }
.acard .asub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acard .aacts { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.acard:hover .aacts, .acard.touched .aacts { opacity: 1; }
.acard .aacts .btn { background: var(--card-bg); backdrop-filter: blur(4px); }

/* ---------- 表单补齐（textarea / select / 双列） ---------- */
.field textarea, .field select {
  width: 100%; padding: 10px 12px; border-radius: 10px; font: inherit;
  background: var(--bg-elev); border: 1px solid var(--line); outline: none; color: inherit;
  resize: vertical;
}
.field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chk { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin: 6px 0 2px; cursor: pointer; }

/* ---------- 选歌加入合集 ---------- */
.picklist { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.pickrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pickrow:last-child { border-bottom: 0; }
.pickrow:hover { background: var(--bg-elev); }
.pickrow .cov { width: 32px; height: 32px; border-radius: 6px; font-size: 13px; }
.pickrow .pm { min-width: 0; flex: 1; }
.pickrow .pm b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pickrow .pm span { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.pickrow .said { color: var(--muted); font-size: 11.5px; }
.picklist .none { padding: 30px; text-align: center; color: var(--muted); font-size: 13px; }

@media (max-width: 720px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
  .heroBody { align-items: center; gap: 12px; }
  .hcover { width: 92px; height: 92px; border-radius: 12px; font-size: 28px; }
  .hinfo h2 { font-size: 20px; }
  .hnameRow { gap: 8px; }
  .hnameRow h2 { font-size: 20px; }
  .hinfo p { display: none; }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  /* 触屏没有 hover，管理按钮常显 */
  .acard .aacts { opacity: 1; }
  .aacts .btn { padding: 4px 7px; font-size: 11px; }
}


/* ---------- 歌词 ---------- */
#lyricsPanel {
  position: fixed; right: 18px; bottom: 96px; z-index: 40;
  width: min(360px, calc(100vw - 36px)); max-height: min(60vh, 520px);
  display: flex; flex-direction: column;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg);
  overflow: hidden;
}
#lyricsPanel[hidden] { display: none; }
.lyrHead {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13px;
}
.lyrHead b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lyrBody { overflow-y: auto; padding: 14px 16px 18px; scroll-behavior: smooth; }
.lyrLine {
  color: var(--muted); font-size: 14px; line-height: 1.9; text-align: center;
  padding: 2px 0; transition: color .2s, transform .2s;
}
.lyrLine.on { color: var(--text); font-weight: 600; transform: scale(1.02); }
.lyrEmpty { color: var(--muted); text-align: center; padding: 26px 10px; font-size: 13px; line-height: 1.9; }
.lyrEmpty span { font-size: 12px; opacity: .75; }
#promptInput {
  width: 100%; padding: 10px 12px; margin-bottom: 6px; font-size: 15px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 10px; outline: none;
}
#promptInput:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

#lyricsModal .sheet { width: min(560px, 100%); }
#lyricsModal textarea { min-height: 220px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; line-height: 1.7; }

/* ---------- 讲道 ---------- */
#sermonPane .toolbar { padding: 10px 0 6px; }
#sermonList { flex: 1; min-height: 0; overflow-y: auto; padding: 0 4px 110px; }
#seriesPane { flex: 1; min-height: 0; overflow-y: auto; padding: 0 4px 110px; }
.srow {
  display: grid; grid-template-columns: 34px 1fr 54px auto; gap: 10px; align-items: center;
  padding: 10px 8px; border-bottom: 1px solid var(--line);
  cursor: pointer; border-radius: 8px;
}
.srow:hover { background: var(--bg-soft); }
.srow.on { background: var(--accent-soft); }
.srow.sel .sacts { display: none; }
.srow.sel { grid-template-columns: 34px 1fr 54px 20px; }
.srow.picked { background: var(--accent-soft); }
.srow.picked .sidx { color: var(--accent); }
.sidx { color: var(--muted-2); font-size: 12px; text-align: right; }
.smeta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.smeta b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smeta span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdur { font-size: 12px; color: var(--text); opacity: .56; text-align: right; font-variant-numeric: tabular-nums; }
.sacts { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.moreWrap { display: flex; justify-content: center; padding: 16px 0 24px; }

@media (max-width: 720px) {
  .srow { grid-template-columns: 26px 1fr 44px auto; gap: 8px; }
  .sacts .btn { padding: 4px 8px; }
}

@media (max-width: 720px) {
  #lyricsPanel {
    right: 10px; left: 10px; width: auto;
    bottom: calc(84px + env(safe-area-inset-bottom)); max-height: 50vh;
  }
}

/* ---------- 圣经 ---------- */
#biblePane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.bbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; flex: none; }
.bbar select { padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--text); font-size: 13px; }
.bchips { display: flex; gap: 4px; flex-wrap: wrap; }
.bchip { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); font-size: 12px; }
.bchip.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.bmodes { display: flex; gap: 4px; }
.bmain { flex: 1; min-height: 0; display: flex; gap: 12px; }
.bscroll { flex: 1; min-width: 0; overflow-y: auto; background: var(--card-bg); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; }
.bcol { --bfs: 19px; font-size: var(--bfs); line-height: 1.95; color: var(--text); }
.bv { margin: 0 0 10px; }
.bvn { color: var(--muted-2); font-size: .62em; margin-right: .5em; vertical-align: super; }
#bcolA .brow { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
#bcolA .brow .bvn { align-self: start; margin-top: .55em; }
.bt { margin: 0; }
.bt.en { color: var(--muted); }
#biblePane.quiet .bvn { display: none; }
#biblePane.quiet .bscroll { background: transparent; border-color: transparent; padding-left: 6px; padding-right: 6px; }
#biblePane.quiet .bv { margin-bottom: 1.05em; }
.wd { cursor: pointer; border-radius: 4px; padding: 0 1px; transition: background .12s; }
.wd:hover { background: var(--accent-soft); }
.wd.on { background: var(--accent-soft); color: var(--accent); }
.wd.f2 { color: var(--accent); }
.wd.f3 { color: var(--muted); border-bottom: 1px dotted var(--muted-2); }
.wd.unk { border-bottom: 1px dashed var(--accent-line); }
/* 词典浮层：桌面上浮在右侧，窄屏从底部升起 */
.bdict {
  position: fixed; z-index: 60; right: 24px; top: 96px;
  width: 300px; max-height: min(58vh, 420px);
  border: 1px solid var(--line); border-radius: 14px; background: var(--card-bg);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto;
}
.bdict[hidden] { display: none !important; }
.bdHead { display: flex; align-items: center; gap: 8px; }
.bdHead b { font-size: 20px; }
.bdHead .icon { margin-left: auto; }
.bdPhon { color: var(--accent); font-size: 14px; }
.bdPos { color: var(--muted-2); font-size: 12px; }
.bdTr { font-size: 13.5px; line-height: 1.7; color: var(--text); white-space: pre-wrap; }
.bdFoot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding-top: 8px; }
.bdFreq { color: var(--muted-2); font-size: 11.5px; }
.bnav { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 0; color: var(--muted); font-size: 13px; flex: none; }

@media (max-width: 900px) {
  .bdict {
    left: 12px; right: 12px; top: auto; width: auto;
    bottom: calc(12px + env(safe-area-inset-bottom));
    max-height: 46vh; border-radius: 16px;
  }
}

@media (max-width: 720px) {
  .bmain { flex-direction: column; }
  #bcolA .brow { grid-template-columns: 22px 1fr; }
  #bcolA .brow .bt.en { grid-column: 2; }
  .bbar .bmodes .sub { padding: 4px 10px; font-size: 12px; }
}

/* ---------- 圣经页：底部播放条自动收放 ---------- */
body.in-bible .player {
  transform: translateY(calc(100% - 10px));
  transition: transform .24s cubic-bezier(.4, 0, .2, 1);
}
body.in-bible .player:hover,
body.in-bible .player.peek { transform: none; }

/* 收起时只剩一条边：中间一个小把手 */
body.in-bible .player::before {
  content: "";
  position: absolute; left: 50%; top: -2px;
  width: 44px; height: 5px; margin-left: -22px;
  border-radius: 3px; background: var(--muted-2); opacity: .5;
  transition: opacity .2s;
}
body.in-bible .player:hover::before,
body.in-bible .player.peek::before { opacity: 0; }

/* 收起后正文可以用到底部 */
body.in-bible #biblePane { padding-bottom: 12px; }

/* 章按钮多时横向滚动；章数 > 40 的卷改用下拉 */
.bchips { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 2px; }
.bchips .bchip { flex: none; }
.bchsel { height: 28px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); font-size: 12.5px; }

/* page-level action buttons: icon only, label in tooltip */
.btn.icononly { padding: 0; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; }
.btn.icononly .ico { display: block; }
.btn.small.icononly { width: 28px; height: 28px; }


/* menu rows: theme switch + language + accent, tab-style pills */
.menu { min-width: 236px; }
.mrow { display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding: 8px 10px; }
.tswitch {
  position: relative; flex: none; align-self: center;
  width: 46px; height: 24px; padding: 0; border: 0; border-radius: 999px;
  background: var(--accent-soft); cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--accent-line);
  transition: background .18s, box-shadow .18s;
}
.tswitch .swico {
  position: absolute; top: 50%; width: 12px; height: 12px;
  transform: translateY(-50%); color: var(--accent); pointer-events: none;
}
/* 关（浅色）时圆钮在左、露出右边的太阳；开（深色）时圆钮在右、露出左边的月亮 */
.tswitch .sun { right: 5px; }
.tswitch .moon { left: 5px; }
.tswitch .knob {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(15, 18, 25, .25); transition: transform .18s;
}
.tswitch.on { background: var(--accent); box-shadow: inset 0 0 0 1px transparent; }
.tswitch.on .swico { color: rgba(255, 255, 255, .92); }
.tswitch.on .knob { transform: translateX(22px); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.segbtn {
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--muted);
  font-size: 12px; line-height: 1.4;
}
.segbtn.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); font-weight: 600; }
.sw { width: 20px; height: 20px; padding: 0; border-radius: 6px; border: 2px solid transparent; cursor: pointer; }
.sw[data-accent="indigo"] { background: #6244f5; }
.sw[data-accent="blue"]   { background: #2563eb; }
.sw[data-accent="teal"]   { background: #0d9488; }
.sw[data-accent="green"]  { background: #16a34a; }
.sw[data-accent="rose"]   { background: #e11d48; }
.sw[data-accent="amber"]  { background: #d97706; }
.sw.on { border-color: var(--bg-elev); box-shadow: 0 0 0 2px var(--text); }

:root[data-accent="blue"]  { --accent:#2563eb; --accent-2:#60a5fa; --accent-soft:rgba(37,99,235,.10); --accent-line:#bfdbfe; }
:root[data-accent="teal"]  { --accent:#0d9488; --accent-2:#2dd4bf; --accent-soft:rgba(13,148,136,.12); --accent-line:#99f6e4; }
:root[data-accent="green"] { --accent:#16a34a; --accent-2:#4ade80; --accent-soft:rgba(22,163,74,.12);  --accent-line:#bbf7d0; }
:root[data-accent="rose"]  { --accent:#e11d48; --accent-2:#fb7185; --accent-soft:rgba(225,29,72,.10);  --accent-line:#fecdd3; }
:root[data-accent="amber"] { --accent:#d97706; --accent-2:#fbbf24; --accent-soft:rgba(217,119,6,.12);  --accent-line:#fde68a; }

/* small-screen row actions menu */
.actMenu {
  position: fixed; z-index: 90;
  display: flex; flex-direction: column; gap: 2px; min-width: 138px; padding: 6px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg);
}
.aitem {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border: 0; border-radius: 8px; background: none;
  color: var(--accent); font-size: 13px; text-align: left; cursor: pointer;
}
.aitem:hover { background: var(--accent-soft); }
.aitem.danger { color: var(--accent); }
.aitem .ico { width: 15px; height: 15px; }

/* 列表「加载中」占位：先给明确反馈，别让空态文案闪一下 */
#albumsPane, #sermonPane, #seriesPane { position: relative; }
.listload {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-items: center;
  color: var(--muted); font-size: 13px; letter-spacing: .02em;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  pointer-events: none;
}

/* 「移出 / 删除」确认框里勾上「同时删除歌曲本身」时，字变红提醒这是不可恢复的 */
#confirmCheck .chk { margin: 12px 0 4px; }
#confirmCheck .danger-check { color: var(--danger); }
#confirmCheck .danger-check input { accent-color: var(--danger); }

/* 文案里夹的小图标（点「⬆ 上传」…）跟着文字基线走 */
#empty .ico-inline, #emptyText .ico-inline {
  display: inline-flex; align-items: center; vertical-align: -2px; margin: 0 2px;
}

/* 上传弹窗：已配歌词的小标签 + 未匹配提示 */
.upnote {
  margin-top: 10px; padding: 8px 10px; border-radius: 10px;
  border: 1px dashed var(--dash); color: var(--muted); font-size: 12.5px; line-height: 1.5;
}
.ltag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 600;
}

/* 上传列表：标题单元格里可以带一个「歌词」小标签 */
.uprow .tcell { display: flex; align-items: center; gap: 6px; min-width: 0; }
.uprow .tcell input { flex: 1; min-width: 0; }

/* 上传弹窗：本批信息三列（艺人 / 年份 / 备注） */
.row3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 128px 96px; gap: 8px; }
@media (max-width: 720px) {
  .row3 { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

/* 上传弹窗：本批信息可折叠 */
.fold { margin-top: 4px; }
.fold > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--muted);
  user-select: none;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before {
  content: '›';
  font-size: 15px;
  line-height: 1;
  transition: transform .15s ease;
}
.fold[open] > summary::before { transform: rotate(90deg); }
.fold > summary:hover { color: var(--text); }
.fold .row3 { margin-top: 8px; }

/* 合集表单封面：点方块即选图 */
.coverslot { width: 72px; height: 72px; padding: 0; overflow: hidden; border-radius: 12px;
  border: 1px dashed var(--line); background: var(--bg-soft); display: flex;
  align-items: center; justify-content: center; cursor: pointer; transition: border-color .15s, background .15s; }
.coverslot:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.coverslot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.coverslot .coverslot-ph { color: var(--muted-2); display: flex; align-items: center; justify-content: center; }
.coverslot .coverslot-ph[hidden] { display: none; }
