/* <audio> 只负责出声，界面用自己的播放条；即使被加了 controls 也不显示 */
#audio { display: none; }

:root {
  --bg: #0c0f14;
  --bg-soft: #11151c;
  --card: #161b23;
  --card-hover: #1b212b;
  --line: #242b36;
  --text: #e9eef6;
  --sub: #8c97a8;
  --brand: #4c8dff;
  --brand-soft: rgba(76, 141, 255, .14);
  --brand-2: #7d5cff;
  --danger: #ff5c5c;
  --danger-soft: rgba(255, 92, 92, .12);
  --radius: 14px;
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
  --player-h: 84px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6fa;
    --bg-soft: #eef1f6;
    --card: #ffffff;
    --card-hover: #f7f9fc;
    --line: #e3e7ee;
    --text: #151b24;
    --sub: #6b7686;
    --brand: #2563eb;
    --brand-soft: rgba(37, 99, 235, .1);
    --brand-2: #6d28d9;
    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, .08);
    --shadow: 0 16px 36px rgba(15, 23, 42, .12);
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

/* 有些手机浏览器（安卓 Chrome、微信内核）会自作主张把文字整体放大，
   看着就是「界面比屏幕大一点、点哪儿都不准」，这里明确告诉它别动。 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 24px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.i { width: 20px; height: 20px; fill: currentColor; display: block; flex: none; }

img { max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; border: none; background: none; padding: 0; }

a { color: var(--brand); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: var(--player-h, 0px); z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

body.no-player .topbar { top: 0; }

.topbar-in {
  max-width: 720px; margin: 0 auto;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.logo {
  width: 36px; height: 36px; flex: none; border-radius: 11px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 18px rgba(76, 141, 255, .3);
}

.brand-text { display: flex; flex-direction: column; min-width: 0; }

.brand-title { font-size: 16px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.brand-sub { font-size: 11.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.search {
  flex: 1 1 auto; min-width: 0; position: relative;
  display: flex; align-items: center;
  height: 32px; padding: 0 12px; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .15s, box-shadow .15s;
}

.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.search-icon { width: 17px; height: 17px; color: var(--sub); }

.search input {
  flex: 1 1 auto; min-width: 0; border: none; background: none; outline: none;
  font-size: 14px;
}

.search input::-webkit-search-cancel-button { display: none; }

.search-clear { color: var(--sub); font-size: 18px; line-height: 1; padding: 0 2px; }

.btn {
  height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  white-space: nowrap; font-size: 14px; transition: background .15s, border-color .15s, opacity .15s;
}

.btn:hover { background: var(--card-hover); }

.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }

.btn.primary:hover { filter: brightness(1.08); }

.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }

.btn.danger:hover { background: var(--danger-soft); }

.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }

.btn.ghost { background: transparent; }

/* 有些按钮是用 <a> 做的（要带 target=_blank 才能跳出内嵌框去下载） */
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }

/* ---------- 列表 ---------- */
.wrap { max-width: 720px; margin: 0 auto; padding: 16px 16px 0; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 2px 10px; font-size: 13px; flex-wrap: wrap; }

.count { font-weight: 600; margin-left: auto; white-space: nowrap; }

/* 「全部曲库 / 我的歌单」切换 */
.seg { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); }
/* 左右留白收到 16px：这样「共 N 首」才能跟这行挤在同一条线上（手机上不换行） */
.seg-btn { border: 0; background: transparent; color: var(--sub); height: 26px; padding: 0 16px; border-radius: 999px; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.seg-btn.on { background: var(--brand-soft); color: var(--text); font-weight: 600; }
.badge { min-width: 18px; padding: 0 5px; height: 18px; border-radius: 999px; background: var(--line); color: var(--sub); font-size: 11px; line-height: 18px; text-align: center; }

/* 已经加进「我的歌单」的提示（纯展示，点了没反应） */
.saved-mark { display: inline-flex; align-items: center; color: var(--brand); opacity: .85; flex: none; }
.saved-mark .i { width: 14px; height: 14px; }
.seg-btn.on .badge { background: var(--brand); color: #fff; }

/* 曲库切换 + 下载：并排一行，不要再撑出一大块 */
.tabs-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tabs-row #btnDownload {
  width: 30px; height: 30px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--card); color: var(--sub);
}
.tabs-row #btnDownload:hover { color: var(--text); border-color: var(--brand); }
.tabs-row #btnDownload.done { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }

.muted { color: var(--sub); font-size: 12.5px; }

.state { padding: 40px 8px; text-align: center; color: var(--sub); font-size: 14px; }

.state.err { color: var(--danger); }

/* 加载失败那条里的小按钮（微信里被平台拦掉接口时给个「复制链接」） */
.state-acts { margin-top: 12px; display: flex; justify-content: center; gap: 8px; }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

.row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: var(--radius);
  border: 1px solid transparent; background: var(--card);
  transition: background .15s, border-color .15s;
}

.row:hover { background: var(--card-hover); }

.row.playing { border-color: color-mix(in srgb, var(--brand) 55%, transparent); background: var(--brand-soft); }

.row-main { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; text-align: left; }

.idx { width: 22px; flex: none; text-align: center; font-size: 12.5px; color: var(--sub); font-variant-numeric: tabular-nums; }

.row.playing .idx { color: var(--brand); font-weight: 700; }

.cover {
  width: 46px; height: 46px; flex: none; border-radius: 10px; overflow: hidden;
  background: var(--bg-soft) center/cover no-repeat;
  display: grid; place-items: center; color: var(--sub);
  border: 1px solid var(--line);
}

.cover .i { width: 20px; height: 20px; }

.row-text { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }

.row-title { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.row-sub { font-size: 12.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dur { flex: none; font-size: 12.5px; color: var(--sub); font-variant-numeric: tabular-nums; }

.row-acts { display: flex; align-items: center; gap: 4px; flex: none; }

.icon-btn {
  position: relative;
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  color: var(--sub); transition: background .15s, color .15s;
}

.icon-btn:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }

.icon-btn.on { color: var(--brand); background: var(--brand-soft); }

/* 已经下载到本机：图标变成一个蓝色的勾「✓」 */
.icon-btn.done { color: var(--brand); }

.icon-btn .i { width: 18px; height: 18px; }

.row-menu { position: relative; }

.menu {
  position: absolute; right: 0; top: 40px; z-index: 50;
  min-width: 168px; padding: 6px;
  background: var(--card); border: 1.5px solid var(--brand); border-radius: 12px;
  box-shadow: var(--shadow), 0 0 0 4px var(--brand-soft);
}

.menu button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border-radius: 8px; font-size: 13.5px; text-align: left;
}

.menu button:hover { background: var(--card-hover); }

.menu button.danger { color: var(--danger); }

.menu button.danger:hover { background: var(--danger-soft); }

.menu .i { width: 16px; height: 16px; }

/* ---------- 播放条 ---------- */
.player {
  position: sticky; top: 0; z-index: 45;
  background: color-mix(in srgb, var(--bg-soft) 94%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0);
}

.player-in {
  max-width: 720px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 14px;
}

.np { display: flex; align-items: center; gap: 10px; flex: 0 1 220px; min-width: 0; }

.np-cover {
  width: 44px; height: 44px; flex: none; border-radius: 10px; overflow: hidden;
  background: var(--card) center/cover no-repeat; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--sub);
}

.np-text { min-width: 0; display: flex; flex-direction: column; }

.np-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.np-artist { font-size: 12px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.controls { display: flex; align-items: center; gap: 6px; flex: none; }

.play-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  box-shadow: 0 6px 16px rgba(76, 141, 255, .35);
  transition: transform .12s;
}

.play-btn:active { transform: scale(.94); }

.play-btn .i { width: 20px; height: 20px; }

.progress { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }

.time { font-size: 12px; color: var(--sub); font-variant-numeric: tabular-nums; flex: none; }

input[type="range"] { -webkit-appearance: none; appearance: none; background: none; outline: none; height: 20px; cursor: pointer; }

input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--text) 16%, transparent); }

input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--text) 16%, transparent); }

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 13px; height: 13px; margin-top: -4.5px;
  border-radius: 50%; background: var(--brand); border: 2px solid var(--bg-soft);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 60%, transparent);
}

input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--brand); border: 2px solid var(--bg-soft); }

.seek { flex: 1 1 auto; min-width: 60px; }

.extra { display: flex; align-items: center; gap: 8px; flex: none; }

.pill {
  height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px;
  border: 1px solid var(--line); color: var(--sub); background: var(--card);
  white-space: nowrap;
}

.pill:hover { color: var(--text); }

/* 播放方式按钮（顺序播放 / 随机播放 / 单曲循环）：做得醒目一点，一眼就能看到 */
.pill-mode {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border: 0;
  font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 14px rgba(76, 141, 255, .38);
}

.pill-mode:hover { color: #fff; filter: brightness(1.07); }

.pill-mode:active { transform: scale(.96); }

.pill-mode .i { width: 15px; height: 15px; }

.vol-wrap { display: flex; align-items: center; gap: 6px; color: var(--sub); }

.vol-wrap .i { width: 16px; height: 16px; }

.vol { width: 70px; }

.player-err.info { color: var(--sub); }

.player-err { max-width: 720px; margin: 0 auto; padding: 0 16px 10px; font-size: 12.5px; color: var(--danger); }

/* ---------- 弹窗 ---------- */
.modal-root:empty { display: none; }

.mask {
  position: fixed; inset: 0; z-index: 80; background: rgba(6, 9, 14, .6);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fade .16s ease;
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%; max-width: 460px; max-height: 88vh; overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); padding: 20px;
}

.modal.wide { max-width: 720px; }

/* 弹窗的标题行（标题 + 关闭）一直贴在最上面：说明再长，也随时找得到「关闭」。
   负 margin 让这块背景铺满弹窗宽度，滚上来的字被它盖住，不会露出来。 */
.modal-head {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: -20px -20px 16px; padding: 20px 20px 10px;
  background: var(--card); border-radius: 18px 18px 0 0;
}

.modal-title { font-size: 17px; font-weight: 700; }

/* 弹窗标题右边的一排小按钮（例如「曲库管理」旁边的「退出登录」） */
.head-acts { display: flex; align-items: center; gap: 6px; }

.tabs { display: flex; gap: 6px; padding: 4px; background: var(--bg-soft); border-radius: 12px; margin-bottom: 16px; }

.tab { flex: 1 1 0; height: 34px; border-radius: 9px; font-size: 13.5px; color: var(--sub); display: grid; place-items: center; }

.tab.active { background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.12); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }

.field label { font-size: 12.5px; color: var(--sub); }

.input, textarea.input {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}

textarea.input { height: auto; padding: 10px 12px; resize: vertical; }

.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.drop {
  border: 1.5px dashed var(--line); border-radius: 14px; padding: 22px 16px;
  text-align: center; color: var(--sub); font-size: 13.5px;
  background: var(--bg-soft); transition: border-color .15s, background .15s;
}

.drop.hot { border-color: var(--brand); background: var(--brand-soft); color: var(--text); }

.drop strong { color: var(--text); }

.drop .i { width: 26px; height: 26px; margin: 0 auto 8px; color: var(--brand); }

.file-chip {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  font-size: 13px; margin-top: 10px;
}

.file-chip .i { width: 18px; height: 18px; color: var(--brand); }

.file-chip .name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.file-chip .size { color: var(--sub); font-size: 12px; flex: none; }

/* 一次传好几首：一首一行，只改「歌名」和「歌词 / 乐谱」（歌词点一下才展开） */
.up-item {
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft);
  padding: 10px 12px; margin-top: 10px;
}
.up-item .up-item-name { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--sub); }
.up-item .up-item-name .i { width: 16px; height: 16px; flex: none; color: var(--brand); }
.up-item .up-item-name .nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-item .up-item-name .sz { flex: none; }
.up-item .up-item-name .icon-btn { width: 26px; height: 26px; flex: none; }
.up-item > .input { margin-top: 8px; height: 38px; }
.up-item .up-lyric-btn { margin-top: 8px; }
.up-item .up-lyric-box { margin-top: 8px; }
.up-item .up-lyric-box .input { min-height: 84px; }

.progressbar { height: 8px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; margin-top: 12px; }

.progressbar > span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .2s; }

.hint { font-size: 12.5px; color: var(--sub); line-height: 1.6; }

.hint.err { color: var(--danger); }

/* 登录弹窗里的默认口令提示：写清楚、看得见 */
.pwd-hint {
  font-size: 14px; color: var(--text); line-height: 1.6;
  padding: 10px 12px; border-radius: 10px;
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
}

.pwd-hint strong { font-size: 16px; letter-spacing: .4px; color: var(--brand); }

.row-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 4px; }

.manage-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }

.manage-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); }

.manage-item .idx-num { font-size: 12px; color: var(--sub); width: 20px; text-align: center; flex: none; }

.manage-item .meta { flex: 1 1 auto; min-width: 0; }

.manage-item .meta .t { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.manage-item .meta .s { font-size: 12px; color: var(--sub); }

input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--brand); flex: none; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 12px 0; }

.link-box { display: flex; gap: 8px; align-items: center; }

/* 「云端」页签里，把「传到云端」和「备份到本机」两块分开 */
.cloud-sep { height: 1px; background: var(--line); margin: 20px 0 14px; }

.link-box .input { flex: 1 1 auto; font-size: 12.5px; }

/* 分享弹窗：两条网址各用一个框框住，别和说明挤在一起 */
.share-card {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); padding: 12px 12px 10px; margin-bottom: 12px;
}
.share-card label { font-size: 13.5px; font-weight: 700; color: var(--text); }
.share-card .hint { margin-top: 6px; }

/* 分享弹窗：第一条（微信和浏览器都能打开）做得显眼一点 */
.share-card.main { border-color: color-mix(in srgb, var(--brand) 50%, transparent); }
.share-card.main label { color: var(--brand); }
.share-card.main .link-box .input { color: var(--brand); font-weight: 700; }

.toast-root { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }

.toast {
  padding: 10px 18px; border-radius: 999px; font-size: 13.5px;
  background: rgba(20, 24, 32, .94); color: #fff; box-shadow: var(--shadow);
  animation: fade .16s ease; max-width: 82vw; text-align: center;
}

@media (prefers-color-scheme: light) {
  .toast { background: rgba(24, 30, 40, .92); }
}

/* ---------- 手机排版：电脑上也照这一套（整页收成一个 720px 宽的中间栏） ---------- */
:root { --player-h: 138px; }
.topbar-in { padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
.brand-sub { display: none; }
.search-row { order: 3; flex-basis: 100%; }
.wrap { padding: 12px 12px 0; }
.row { padding: 8px 10px; gap: 10px; }
.cover { width: 42px; height: 42px; }
.player-in { flex-wrap: wrap; padding: 10px 12px; gap: 8px; }
.np { flex: 1 1 100%; }
.controls { order: 2; }
.progress { order: 3; flex: 1 1 calc(100% - 150px); }
.extra { order: 4; }
.vol-wrap { display: none; }
.grid-2 { grid-template-columns: 1fr; }

/* 只有真正的窄屏（手机）才把弹窗铺满 */
@media (max-width: 720px) {
  .modal { max-width: 100%; }
}



/* 微信内置浏览器提示条 */
.wx-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--brand-soft);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  border-bottom: 1px solid var(--line);
}

.wx-tip span { flex: 1 1 auto; }

.wx-tip .icon-btn { flex: none; width: 34px; height: 34px; color: var(--sub); }


/* 本机曲库 / 云端曲库 来源提示条 */
.src-tip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 9px 14px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  border-bottom: 1px solid var(--line);
}

.src-tip span { flex: 1 1 240px; }
.src-tip b { color: var(--brand); }
.src-tip a { color: var(--brand); word-break: break-all; }
.src-tip .btn { flex: none; }
.src-tip .icon-btn { flex: none; width: 24px; height: 24px; color: var(--sub); }

/* 公告栏：页最上面那条滚动公告（内容在「管理 → 设置 → 公告栏」里改） */
.notice-bar {
  overflow: hidden;
  max-height: 60px;
  background: var(--brand);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.4;
  padding: 7px 0;
  transition: opacity .35s, max-height .35s, padding .35s;
}

/* 滚够几遍收起来（见 app.js 里的 NOTICE_ROLLS） */
.notice-bar-out { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; }

.notice-bar .notice-roll {
  display: inline-flex;
  gap: 60px;
  white-space: nowrap;
  animation: notice-roll 12s linear infinite;
  will-change: transform;
}

@keyframes notice-roll {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 30px)); }
}

@media (prefers-reduced-motion: reduce) {
  .notice-bar .notice-roll { animation: none; padding-left: 12px; }
}

/* ---------- 使用说明 ---------- */
/* 搜索 + 使用说明：挤在同一行，高度跟搜索框一样；搜索占前 2/3，使用说明占后 1/3。
   min-width:0 很关键：不然这一行不肯收缩，窄屏上会把整页顶宽（手机上就被缩放了）。 */
.search-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.search-row .search { flex: 2 1 0; min-width: 0; }
.search-row .search input { width: 100%; min-width: 0; }
.help-btn {
  flex: 1 1 0; min-width: 0; height: 32px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  border-radius: 999px; white-space: nowrap; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--brand) 42%, var(--line));
  background: var(--brand-soft); color: var(--brand);
  font-size: 12px; font-weight: 700;
}
.help-btn:hover { background: color-mix(in srgb, var(--brand) 22%, transparent); }
.help-btn .i { width: 14px; height: 14px; flex: none; }

.help-sec { margin-bottom: 22px; }
.help-sec:last-child { margin-bottom: 4px; }
.help-sec-title {
  font-size: 17px; font-weight: 800; letter-spacing: .2px; color: var(--text);
  padding: 7px 10px 7px 12px; margin-bottom: 10px;
  border-left: 4px solid var(--brand); border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, var(--brand-soft), transparent 78%);
}
.help-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 7px; font-size: 15px; line-height: 1.7; }
.help-list li::marker { color: var(--brand); }

/* 大标题下面的小标题（找歌 / 我的歌单 / 存歌 这种），也要一眼看得出来 */
.help-sub {
  font-size: 14.5px; font-weight: 800; color: var(--brand); letter-spacing: .2px;
  margin: 15px 0 7px; padding: 4px 8px 4px 10px;
  border-left: 3px solid var(--brand); border-radius: 0 7px 7px 0;
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}
.help-sec-title + .help-sub { margin-top: 4px; }
@media (max-width: 425px) {
  .help-main strong { font-size: 13px; }
  .help-main em { font-size: 11.5px; }
  .help-list { font-size: 14.5px; }
}

/* ---------- 播放条右侧的操作按钮 ---------- */
/* 上传 / 分享 跟着「顺序播放」那一行；在线人数 / 留言 / 管理 单独一行（手机），做小一点防止老人误触 */

.act {
  display: inline-flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 13px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
}

.act:hover { background: var(--card-hover); }
.act:active { transform: scale(.96); }
.act .i { width: 15px; height: 15px; }

/* 「歌词」点开后亮起来（再点一下就把歌词界面关掉） */
.act.on {
  color: #fff; border-color: transparent; font-weight: 700;
  background: var(--brand);
  box-shadow: 0 4px 12px rgba(76, 141, 255, .35);
}
.act.on:hover { color: #fff; background: var(--brand); }

.mini-row { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.mini-btn {
  display: inline-flex; align-items: center; gap: 3px;
  height: 24px; padding: 0 7px; border-radius: 8px; border: 1px solid transparent;
  font-size: 11px; color: var(--sub); background: transparent;
}

.mini-btn:hover { color: var(--text); background: var(--bg-soft); }
.mini-btn .i { width: 13px; height: 13px; }

/* 留言：比旁边两个稍微醒目一点，但整体还是小按钮，防误触 */
.mini-btn.msg {
  position: relative;
  color: var(--brand); font-weight: 600;
  background: var(--brand-soft);
  border-color: color-mix(in srgb, var(--brand) 28%, transparent);
  height: 26px; padding: 0 9px; font-size: 11.5px;
}

/* 有新留言：右上角一颗蓝色小圆点，看过就消失 */
.mini-btn.msg.unread::after {
  content: ''; position: absolute; top: -3px; right: -3px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 2px var(--card);
}

.mini-btn.msg:hover { color: var(--brand); background: color-mix(in srgb, var(--brand) 18%, transparent); }
.mini-btn.msg .i { width: 14px; height: 14px; }

/* 在线人数固定在这一行最左边，后面几个小按钮靠右 */
.mini-row #onlineChip { margin-right: auto; }

/* 上传：跟「留言」一样是重点小按钮，但换成青绿色，跟蓝色搭配起来不打架 */
.mini-btn.upload {
  height: 26px; padding: 0 9px; font-size: 11.5px; font-weight: 600;
  color: #1eb0a0;
  background: color-mix(in srgb, #1eb0a0 15%, transparent);
  border-color: color-mix(in srgb, #1eb0a0 34%, transparent);
}
.mini-btn.upload:hover { color: #1eb0a0; background: color-mix(in srgb, #1eb0a0 24%, transparent); }
.mini-btn.upload .i { width: 14px; height: 14px; }

.mini-chip {
  font-size: 11px; color: var(--sub); background: var(--bg-soft);
  border-radius: 8px; padding: 3px 7px; white-space: nowrap;
}

/* ---------- 选择歌曲界面（我的歌单的挑歌页）---------- */
/* 这个界面里点一行就是勾选/取消，没有播放按钮，
   所以不会出现「想听歌却点成了勾选」的误触 */
.picker-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  position: sticky; top: 0; z-index: 3;
  background: var(--card); padding: 2px 0 10px;
}

.picker-list {
  list-style: none; margin: 0; padding: 0; max-height: 52vh; overflow: auto;
  display: flex; flex-direction: column; gap: 6px;
}

.pick-row {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--card);
  cursor: pointer; transition: background .15s, border-color .15s;
}

.pick-row.on { border-color: var(--brand); background: var(--brand-soft); }

.pick-box {
  width: 28px; height: 28px; flex: none; border-radius: 9px;
  border: 2px solid var(--line); background: var(--card);
  display: grid; place-items: center; color: transparent;
}

.pick-row.on .pick-box { border-color: var(--brand); background: var(--brand); color: #fff; }

.pick-box .i { width: 17px; height: 17px; }

@media (max-width: 425px) {
  .picker-list { max-height: 46vh; }
  .pick-row { gap: 8px; padding: 10px; }
  /* 小屏上把序号让给歌名 */
  .pick-row .idx { display: none; }
}

/* ---------- 我的歌单顶部的操作教程 ---------- */
.guide {
  background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
  border-radius: 10px; padding: 9px 12px; margin-bottom: 8px;
}

.guide-line { font-size: 13px; line-height: 1.65; color: var(--text); }
.guide-line b { color: var(--brand); }
.guide .guide-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

/* ---------- 上传弹窗：按钮做大做醒目 ---------- */
.btn.big { width: 100%; height: 56px; font-size: 17.5px; font-weight: 700; border-radius: 14px; }
.drop-big { padding: 26px 16px; }
.drop-big strong { font-size: 16px; }

/* ---------- 留言板 ---------- */
.msg-intro { font-size: 15px; line-height: 1.9; color: var(--text); margin-bottom: 4px; }

/* 「愿荣耀颂赞归给神」：留言板里最醒目的一句（不要外框，省地方） */
.msg-intro strong {
  display: block; text-align: center;
  font-size: 19px; font-weight: 800; letter-spacing: 2px; color: var(--brand);
  margin: 2px 0 6px;
}
.msg-list { display: flex; flex-direction: column; gap: 10px; max-height: 42vh; overflow: auto; margin-top: 12px; }
.msg { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.msg-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--sub); margin-bottom: 4px; }
.msg-text { font-size: 14.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.msg-acts { display: flex; gap: 8px; margin-top: 8px; }

/* 留言列表在上、写留言在下 */
.msg-send { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- 歌名尽量显示完整 + 操作按钮换行（手机、电脑一致） ---------- */
.extra { flex-wrap: wrap; justify-content: flex-end; }
/* 在线人数 / 留言 / 管理：单独占一行，靠右 */
.mini-row { order: 5; flex-basis: 100%; justify-content: flex-end; }
.np-title, .row-title {
  white-space: normal; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.row-sub .sub-size { display: none; }
/* 行尾那列时长和歌名下面的时长重复，收掉它，把宽度让给歌名 */
.row .dur { display: none; }
.row { gap: 8px; }
.act { height: 32px; padding: 0 11px; font-size: 13px; }


/* ---------- 很窄的手机（≤380px）：按钮组再收紧一点，保证不挤出屏幕 ---------- */
@media (max-width: 380px) {
  .extra { gap: 6px; }
  .act { padding: 0 9px; font-size: 12.5px; }
  .mini-row { gap: 4px; }
  .mini-btn { padding: 0 5px; }
}

/* ---------- 超窄手机（≤350px）：歌名下面的歌手名收掉，只留时长 ---------- */
@media (max-width: 350px) {
  .row-sub .sub-artist { display: none; }
}

/* ---------- 管理面板 · 用量统计 ---------- */
.stat-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 12px 14px;
}

.stat-label { font-size: 12.5px; color: var(--sub); margin-bottom: 4px; }

.stat-big { font-size: 26px; font-weight: 700; line-height: 1.25; color: var(--brand); }
.stat-big span { font-size: 14px; font-weight: 600; color: var(--sub); }

.stat-card .hint { margin-top: 4px; }

.usage-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.usage-table th, .usage-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.usage-table th { font-size: 12.5px; color: var(--sub); font-weight: 600; }
.usage-table td.num, .usage-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.usage-table tr:last-child td { border-bottom: none; }

/* 用量统计里的设备明细（IP / 是不是我的）；IP 只显示个大概，点一下才展开完整的 */
.ip-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ip-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft);
}
.ip-row.is-mine { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: var(--brand-soft); }
.ip-row[hidden] { display: none; }
.ip-addr { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ip-meta {
  flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--sub);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.ip-tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--brand); color: #fff; }
.ip-tag.other { background: var(--line); color: var(--sub); }

@media (max-width: 425px) {
  .stat-big { font-size: 22px; }
  .usage-table th, .usage-table td { padding: 6px 4px; font-size: 12.5px; }
}

/* ---------- 下载完成弹窗 ---------- */
.saved-name { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.saved-q { font-size: 15px; font-weight: 600; color: var(--brand); margin-bottom: 6px; }
.saved-list { font-size: 14.5px; }
.saved-file { margin-top: 10px; font-size: 14px; color: var(--sub); }
.saved-file b { color: var(--text); word-break: break-all; }

/* ---------- 管理 · 编辑曲目弹窗里的封面 ---------- */
.cover-edit { display: flex; align-items: center; gap: 12px; }
.cover-edit .cover { width: 56px; height: 56px; border-radius: 12px; }
.cover-edit .cover .i { width: 22px; height: 22px; }

/* 管理后台「下载」页：一首歌一行，点右边的按钮就开始下载 */
.dl-list { list-style: none; margin: 12px 0 0; padding: 0; }
.dl-row { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.dl-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.dl-empty { color: var(--sub); font-size: 13px; padding: 12px 2px; }

/* ---------- 曲目备注：详情弹窗里的歌词 / 乐谱 ---------- */
.detail-title { font-size: 18px; font-weight: 800; line-height: 1.35; }
.detail-meta { font-size: 12.5px; color: var(--sub); margin-top: 4px; }
.note-text {
  margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  background: var(--bg-soft); border: 1px solid var(--line);
  white-space: pre-wrap; word-break: break-word; font-size: 15px; line-height: 1.75;
}
.note-imgs { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.note-imgs { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.note-img { display: flex; justify-content: center; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--card-hover); }
.note-img img { display: block; width: auto; max-width: 100%; max-height: 42vh; height: auto; }
.note-admin-hint { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--sub); }

/* 歌词 / 乐谱板块：长在页面里（使用说明下面、歌单上面），不是浮层。
   所以放大乐谱的时候，播放条和顶栏都还在最上面，不会被盖住。 */
.note-panel {
  margin: 0 0 14px; padding: 12px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line);
}
.note-panel .detail-close { margin: 0 0 10px 10px; }
/* 乐谱点一下在本页放大（再点缩回去），不开新窗口 */
.note-img { width: 100%; padding: 0; cursor: zoom-in; }
.note-img.big { cursor: zoom-out; }
.note-img.big img { max-height: none; width: 100%; }

/* 管理里编辑备注（歌词文字 + 乐谱图片） */
.note-box {
  margin-top: 14px; padding: 12px; border-radius: 12px;
  background: var(--bg-soft); border: 1px dashed var(--line);
}
.note-box-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.note-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.note-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 4px 6px 4px 8px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-size: 12.5px;
}
.note-chip .nm { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-chip .i { width: 16px; height: 16px; color: var(--brand); }
.note-chip .icon-btn { width: 22px; height: 22px; }


/* 歌词 / 乐谱窗最上面那条又长又醒目的「关闭」 */
/* 歌词 / 乐谱板块的「关闭」：飘到右上角当一个小长方形，不再整条占满屏幕 */
.detail-close {
  float: right;
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; min-width: 76px; min-height: 34px; border-radius: 10px;
  font-size: 14.5px; font-weight: 700; letter-spacing: 1px; padding: 0 14px;
}
/* 每个弹窗右上角的「关闭」：做成长条大按钮，老人机也好按 */
.modal-head { flex-wrap: wrap; row-gap: 8px; }
.btn.close-btn {
  flex: none; min-width: 86px; height: 42px; padding: 0 18px;
  font-size: 15px; font-weight: 700; border-radius: 999px;
  background: var(--bg-soft);
}
.btn.close-btn:hover { background: var(--card-hover); border-color: var(--brand); }

/* ---------- 手机上「界面被自动放大、点不准」的两个坑，都在这里堵掉 ---------- */

/* 坑一：输入框里的字小于 16px 时，iOS / 安卓会在手指点进输入框的一刹那
   把整页放大一档（就是那种「微微放大」，得手动缩回去才全屏）。
   所以手机上所有输入框一律 16px —— 只要够 16px，浏览器就不会再放大。 */
@media (max-width: 720px) {
  .search input,
  .input,
  .link-box .input,
  textarea.input,
  select.input { font-size: 16px; }
}

/* 坑二：第一下没按到、又补一下，很容易被浏览器当成「双击放大」。
   能点的东西一律只当普通点击处理，不参与双击缩放。 */
button, a, label, .btn, .tab, .act, .row, .row-main, .close-btn, [data-close],
input:not([type="range"]), select, textarea {
  touch-action: manipulation;
}
