/* ============================================================
   英语磨耳朵 · 内容管理后台
   现代设计语言：柔和阴影 / 16~18px 圆角 / 无边框分隔 / 强调色渐变
   响应式：桌面侧栏常驻 → 平板收起 → 手机抽屉 + 卡片化列表
   ============================================================ */

/* ---------------- design tokens ---------------- */
:root {
  --accent: #FF2E54;
  --accent-2: #FF6B8A;
  --accent-soft: #FFF0F4;
  --accent-ring: rgba(255, 46, 84, .18);

  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --surface-2: #FAFAFC;
  --surface-3: #F1F2F5;
  --line: rgba(17, 17, 26, .075);
  --line-strong: rgba(17, 17, 26, .14);

  --fg: #17171C;
  --fg-2: #55555F;
  --muted: #9A9AA5;

  --ok: #12A150;
  --ok-soft: #E9F7EF;
  --warn: #C77800;
  --warn-soft: #FEF5E5;
  --danger: #E5484D;
  --danger-soft: #FDECEC;

  --r-xl: 20px;
  --r-lg: 16px;
  --r: 12px;
  --r-sm: 9px;

  --sh-1: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
  --sh-2: 0 2px 6px rgba(16, 24, 40, .05), 0 10px 26px rgba(16, 24, 40, .07);
  --sh-3: 0 10px 20px rgba(16, 24, 40, .08), 0 24px 60px rgba(16, 24, 40, .12);

  --sidebar-w: 238px;
  --topbar-h: 62px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

[data-theme="dark"] {
  --accent-soft: rgba(255, 46, 84, .15);
  --accent-ring: rgba(255, 46, 84, .3);

  --bg: #0C0D11;
  --surface: #15161C;
  --surface-2: #1B1D24;
  --surface-3: #23252D;
  --line: rgba(255, 255, 255, .075);
  --line-strong: rgba(255, 255, 255, .16);

  --fg: #F3F3F6;
  --fg-2: #B6B6C0;
  --muted: #7C7C88;

  --ok-soft: rgba(18, 161, 80, .16);
  --warn-soft: rgba(199, 120, 0, .16);
  --danger-soft: rgba(229, 72, 77, .16);

  --sh-1: 0 1px 2px rgba(0, 0, 0, .5);
  --sh-2: 0 4px 16px rgba(0, 0, 0, .45);
  --sh-3: 0 16px 50px rgba(0, 0, 0, .6);
}

/* ---------------- base ---------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14.5px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
        "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
[v-cloak] { display: none !important; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-ring); }
/* 图标统一尺寸（SVG 无 width/height 属性，必须由 CSS 约束） */
svg { width: 1em; height: 1em; display: block; flex: none; }
.btn svg { width: 15px; height: 15px; }
.nav-item svg, .brand-mark svg { width: 17px; height: 17px; }
.play-mini svg { width: 12px; height: 12px; }
.empty .ico svg { width: 25px; height: 25px; }
.drop .ic svg { width: 27px; height: 27px; }
.trow .handle svg { width: 15px; height: 15px; }
.publish-bar .brand-mark svg { width: 19px; height: 19px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: var(--line-strong); border-radius: 99px; border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-clip: padding-box; background-color: var(--muted); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 基础控件 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 15px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .16s var(--ease), border-color .16s, transform .12s, box-shadow .16s;
  box-shadow: var(--sh-1);
}
.btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn:active { transform: scale(.975); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent; color: #fff;
  box-shadow: 0 2px 8px rgba(255, 46, 84, .28);
}
.btn-primary:hover { filter: brightness(1.06); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--fg-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--fg); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: rgba(229, 72, 77, .3); }
.btn-sm { height: 31px; padding: 0 11px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: var(--r-sm); }
.btn-block { width: 100%; }

.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px;
  background: var(--surface); color: var(--fg);
  border: 1px solid var(--line-strong); border-radius: var(--r);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3.5px var(--accent-ring);
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.7; }
.select { appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.field { margin-bottom: 15px; }
.field > label { display: block; font-size: 12.5px; font-weight: 500; color: var(--fg-2); margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* switch */
.switch { position: relative; display: inline-block; width: 40px; height: 23px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i {
  position: absolute; inset: 0; border-radius: 99px; background: var(--line-strong);
  transition: background .18s var(--ease); pointer-events: none;
}
.switch i::after {
  content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .2s var(--ease);
}
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(17px); }

/* checkbox */
.cbx { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; flex: none; }

/* pill / badge */
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px;
  border-radius: 99px; font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  background: var(--surface-3); color: var(--fg-2);
}
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-accent { background: var(--accent-soft); color: var(--accent); }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------------- 登录 ---------------- */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; }
.login-wrap::before, .login-wrap::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; pointer-events: none;
}
.login-wrap::before { width: 420px; height: 420px; background: #FF5C7A; top: -140px; right: -100px; }
.login-wrap::after { width: 380px; height: 380px; background: #7C8CFF; bottom: -160px; left: -110px; opacity: .32; }
[data-theme="dark"] .login-wrap::before { opacity: .26; }
[data-theme="dark"] .login-wrap::after { opacity: .18; }
.login-card {
  position: relative; width: 100%; max-width: 384px; padding: 34px 30px 28px;
  background: var(--surface); border-radius: var(--r-xl);
  box-shadow: var(--sh-3); border: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  box-shadow: 0 4px 14px rgba(255, 46, 84, .34);
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-text b { display: block; font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }
.brand-text span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.login-card h2 { font-size: 22px; margin: 26px 0 4px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.login-err {
  display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; margin-bottom: 14px;
  background: var(--danger-soft); color: var(--danger); border-radius: var(--r); font-size: 12.5px;
}
.login-foot { margin-top: 18px; text-align: center; font-size: 11.5px; color: var(--muted); }

/* ---------------- 骨架布局 ---------------- */
.shell { display: flex; min-height: 100dvh; }
.sidebar {
  width: var(--sidebar-w); flex: none; position: fixed; inset: 0 auto 0 0; z-index: 60;
  display: flex; flex-direction: column; padding: 16px 12px 12px;
  background: var(--surface); border-right: 1px solid var(--line);
  transition: transform .26s var(--ease);
}
.sidebar .brand { padding: 4px 8px 0; }
.nav { margin-top: 20px; display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .06em; padding: 14px 10px 6px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 11px;
  border-radius: var(--r); color: var(--fg-2); font-size: 13.5px; font-weight: 500;
  cursor: pointer; border: none; background: none; width: 100%; text-align: left;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--surface-3); color: var(--fg); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item svg { width: 17px; height: 17px; flex: none; }
.nav-item .count { margin-left: auto; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.nav-item.active .count { color: var(--accent); }
.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r); cursor: pointer; }
.user-chip:hover { background: var(--surface-3); }
.avatar {
  width: 30px; height: 30px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px;
}
.user-chip .name { font-size: 13px; font-weight: 550; }
.user-chip .role { font-size: 11px; color: var(--muted); }

.content { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: 12px; padding: 0 22px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 17px; }
.topbar .crumb { font-size: 12px; color: var(--muted); margin-top: 1px; }
.topbar .spacer { flex: 1; }
.main { padding: 22px; max-width: 1400px; width: 100%; }
.hamburger { display: none; }

.scrim {
  position: fixed; inset: 0; z-index: 55; background: rgba(9, 9, 14, .42);
  backdrop-filter: blur(2px); animation: fade .18s var(--ease);
}

/* ---------------- 通用块 ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1); padding: 18px;
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { font-size: 14.5px; }
.card-head .spacer { flex: 1; }
.section-title { font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 26px 0 12px; }
.section-title:first-child { margin-top: 0; }
.grid { display: grid; gap: 14px; }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
.grid-albums { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; }

/* 发布条 */
.publish-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 15px 18px; border-radius: var(--r-lg); border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--sh-1);
}
.publish-bar.dirty {
  border-color: rgba(255, 46, 84, .32);
  background: linear-gradient(135deg, var(--accent-soft), transparent 65%), var(--surface);
}
.publish-bar .big { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.publish-bar .hint { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 统计卡 */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 15px 16px; box-shadow: var(--sh-1); }
.stat .k { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 25px; font-weight: 650; letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* 专辑卡 */
.album-card {
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--sh-1); cursor: pointer; overflow: hidden; position: relative;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.album-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-strong); }
.album-card .cover { aspect-ratio: 1; width: 100%; display: block; object-fit: cover; background: var(--surface-3); }
.album-card .ph {
  aspect-ratio: 1; width: 100%; display: grid; place-items: center; color: #fff;
  font-size: 34px; font-weight: 700; letter-spacing: -.03em;
}
.album-card .meta { padding: 11px 12px 13px; }
.album-card .t { font-size: 13.5px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.album-card .m { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.album-card .quick {
  position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; opacity: 0;
  transition: opacity .18s var(--ease);
}
.album-card:hover .quick { opacity: 1; }
.album-card .quick .btn { background: rgba(20, 20, 26, .62); color: #fff; border-color: transparent;
  backdrop-filter: blur(8px); box-shadow: none; width: 31px; height: 31px; padding: 0; }
.album-card .quick .btn:hover { background: rgba(20, 20, 26, .82); }

/* 列表行 */
.list { display: flex; flex-direction: column; }
.trow {
  display: grid; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r);
  grid-template-columns: 24px 38px 30px minmax(0, 1fr) 74px 62px 52px 118px;
  transition: background .14s; position: relative;
}
.trow.head {
  padding: 6px 10px; font-size: 11.5px; color: var(--muted); font-weight: 600;
  letter-spacing: .03em; border-bottom: 1px solid var(--line); border-radius: 0;
}
.trow.head .c-acts { text-align: right; }
.trow:not(.head):hover { background: var(--surface-2); }
.trow.drag-over { box-shadow: inset 0 2px 0 var(--accent); }
.trow.dragging { opacity: .4; }
.trow .handle { cursor: grab; color: var(--muted); display: grid; place-items: center; height: 26px; }
.trow .handle:active { cursor: grabbing; }
.trow .idx { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; }
.trow .tt { min-width: 0; }
.trow .tt .n { font-size: 13.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .tt .sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .dur { font-size: 12.5px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.trow .acts { display: flex; gap: 4px; justify-content: flex-end; }
.trow .acts .btn { width: 31px; height: 31px; padding: 0; box-shadow: none; border-color: transparent; }
.thumb {
  width: 34px; height: 34px; border-radius: 9px; object-fit: cover; display: block;
  background: var(--surface-3); flex: none;
}
.thumb-ph { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  color: #fff; font-size: 12px; font-weight: 700; flex: none; }
.play-mini {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--fg-2);
  transition: all .15s; flex: none; padding: 0;
}
.play-mini:hover { border-color: var(--accent); color: var(--accent); }
.play-mini.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.arrow-btns { display: none; gap: 2px; }
.arrow-btns .btn { width: 27px; height: 27px; padding: 0; box-shadow: none; border-color: transparent; font-size: 12px; }

/* 空状态 */
.empty { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty .ico {
  width: 54px; height: 54px; border-radius: 17px; margin: 0 auto 14px; display: grid; place-items: center;
  background: var(--surface-3); color: var(--muted);
}
.empty b { display: block; color: var(--fg); font-size: 14.5px; font-weight: 600; margin-bottom: 5px; }
.empty p { margin: 0 0 16px; font-size: 13px; }

/* 骨架 */
.skel { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%);
  background-size: 400% 100%; animation: shimmer 1.3s ease-in-out infinite; border-radius: var(--r); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 抽屉 / 弹层 ---------------- */
.drawer-mask {
  position: fixed; inset: 0; z-index: 80; background: rgba(9, 9, 14, .45);
  backdrop-filter: blur(3px); animation: fade .18s var(--ease);
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 81; width: min(620px, 96vw);
  background: var(--surface); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; animation: slideL .28s var(--ease);
  box-shadow: var(--sh-3);
}
@keyframes slideL { from { transform: translateX(26px); opacity: .4; } to { transform: none; opacity: 1; } }
.drawer-head, .modal-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px; flex: none;
  border-bottom: 1px solid var(--line);
}
.drawer-head h3, .modal-head h3 { font-size: 15.5px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; -webkit-overflow-scrolling: touch; }
.drawer-foot, .modal-foot {
  flex: none; padding: 13px 20px; border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-end; align-items: center;
  background: var(--surface-2);
}
.drawer-foot .spacer { flex: 1; }

.modal-mask {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px;
  background: rgba(9, 9, 14, .45); backdrop-filter: blur(3px); animation: fade .18s var(--ease);
}
.modal {
  width: 100%; max-width: 480px; max-height: 88dvh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3);
  border: 1px solid var(--line); animation: pop .24s var(--ease); overflow: hidden;
}
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal.wide { max-width: 660px; }

/* tabs */
.tabs { display: flex; gap: 3px; padding: 3px; background: var(--surface-3); border-radius: var(--r); }
.tabs button {
  flex: 1; height: 32px; border: none; background: none; border-radius: var(--r-sm); cursor: pointer;
  font-size: 13px; font-weight: 550; color: var(--fg-2); transition: all .16s var(--ease); white-space: nowrap;
}
.tabs button:hover { color: var(--fg); }
.tabs button.on { background: var(--surface); color: var(--fg); box-shadow: var(--sh-1); }

/* 拖放区 */
.drop {
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); padding: 26px 18px;
  text-align: center; cursor: pointer; transition: all .18s var(--ease); background: var(--surface-2);
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .ic { color: var(--muted); margin-bottom: 8px; }
.drop b { display: block; font-size: 13.5px; font-weight: 600; }
.drop span { font-size: 12px; color: var(--muted); }

.media-row {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--line);
}
.media-row .info { flex: 1; min-width: 0; }
.media-row .info b { display: block; font-size: 13px; font-weight: 550; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.media-row .info span { font-size: 11.5px; color: var(--muted); }
.bar { height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .2s; }

/* 歌词编辑器 */
.lrc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.lrc-lines { max-height: 330px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); }
.lrc-line {
  display: grid; grid-template-columns: 76px 1fr 30px; gap: 8px; align-items: center;
  padding: 5px 8px; border-bottom: 1px solid var(--line);
}
.lrc-line:last-child { border-bottom: none; }
.lrc-line input { height: 30px; border: 1px solid transparent; background: transparent; border-radius: var(--r-sm);
  padding: 0 7px; font-size: 12.5px; width: 100%; outline: none; }
.lrc-line input:hover { background: var(--surface-2); }
.lrc-line input:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.lrc-line .tm { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600; font-size: 12px; }
.lrc-prev {
  border-radius: var(--r-lg); padding: 16px; min-height: 240px; max-height: 330px; overflow-y: auto;
  background: #17130F; color: rgba(255, 255, 255, .34); text-align: center;
}
.lrc-prev .ln { font-size: 14px; line-height: 2; transition: color .2s, transform .2s; }
.lrc-prev .ln.on { color: #fff; font-weight: 600; font-size: 15px; transform: scale(1.03); }
.lrc-prev .empty-lrc { color: rgba(255, 255, 255, .3); font-size: 12.5px; padding-top: 80px; }

/* toast */
.toasts { position: fixed; z-index: 200; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast {
  display: flex; align-items: center; gap: 9px; padding: 10px 15px; border-radius: 99px;
  background: rgba(24, 24, 30, .94); color: #fff; font-size: 13px; font-weight: 500;
  box-shadow: var(--sh-2); animation: pop .22s var(--ease); backdrop-filter: blur(10px);
}
[data-theme="dark"] .toast { background: rgba(240, 240, 245, .96); color: #16161B; }
.toast.ok { color: #6EE7A8; } .toast.err { color: #FF9B9B; }
[data-theme="dark"] .toast.ok { color: #0F7A42; } [data-theme="dark"] .toast.err { color: #C0262B; }

/* 曲库工具条 */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .search { position: relative; flex: 1; min-width: 190px; max-width: 330px; }
.toolbar .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.toolbar .search .input { padding-left: 34px; }
.toolbar .select { width: auto; min-width: 116px; }
.bulkbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px;
  border-radius: var(--r); background: var(--accent-soft); border: 1px solid rgba(255, 46, 84, .22);
  animation: pop .2s var(--ease);
}
.bulkbar b { color: var(--accent); font-size: 13px; }

/* 日志 */
.log-row { display: grid; grid-template-columns: 92px 1fr 168px; gap: 12px; padding: 9px 10px;
  border-radius: var(--r); font-size: 13px; align-items: baseline; }
.log-row:nth-child(odd) { background: var(--surface-2); }
.log-row .act { font-size: 11.5px; font-weight: 600; }
.log-row .dt { color: var(--muted); font-size: 11.5px; text-align: right; font-variant-numeric: tabular-nums; }

/* 其它 */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.flex { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
.right { text-align: right; }
.center { text-align: center; }
.hide-sm { display: initial; }
.back-btn { display: none; }
@media (min-width: 861px) { .only-sm { display: none !important; } }

/* ============================================================
   响应式：≤1024 收窄、≤860 侧栏抽屉化、≤640 全面卡片化
   ============================================================ */
@media (max-width: 1024px) {
  .main { padding: 18px; }
  .trow { grid-template-columns: 24px 38px 28px minmax(0, 1fr) 66px 56px 48px 104px; gap: 9px; }
}

@media (max-width: 860px) {
  :root { --topbar-h: 56px; }
  .sidebar { transform: translateX(-100%); box-shadow: var(--sh-3); width: 264px; }
  .sidebar.open { transform: none; }
  .content { margin-left: 0; }
  .hamburger { display: inline-flex; }
  .main { padding: 14px 14px 40px; }
  .topbar { padding: 0 14px; gap: 8px; }
  .topbar h1 { font-size: 15.5px; }
  .lrc-grid { grid-template-columns: 1fr; }
  .lrc-prev { min-height: 150px; max-height: 220px; }
  .log-row { grid-template-columns: 84px 1fr; }
  .log-row .dt { grid-column: 2; text-align: left; }
  .back-btn { display: inline-flex; }
  .drawer { width: 100vw; max-width: 100vw; border-left: none; }
  .drawer-foot, .modal-foot { padding-bottom: max(13px, env(safe-area-inset-bottom)); }

  /* 曲目行 → 卡片式 */
  .trow.head { display: none; }
  .trow {
    grid-template-columns: 38px 30px minmax(0, 1fr) 50px 88px; gap: 9px;
    padding: 10px 8px; border-bottom: 1px solid var(--line); border-radius: 0;
  }
  .trow .c-handle, .trow .c-type, .trow .c-dur { display: none; }
  .arrow-btns { display: flex; }
  .trow .c-acts { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .grid-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .grid-albums { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat { padding: 12px; }
  .stat .v { font-size: 21px; }
  .card { padding: 14px; border-radius: var(--r); }
  .publish-bar { padding: 13px 14px; }
  .row2 { grid-template-columns: 1fr; }
  .hide-sm { display: none !important; }
  .modal { max-width: 100%; border-radius: var(--r-lg) var(--r-lg) 0 0; align-self: end; max-height: 92dvh; }
  .modal-mask { padding: 0; align-items: end; }
  .drawer-foot, .modal-foot { position: sticky; bottom: 0; }
}
