* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --y: #FDEE01;
  --y-lt: #FFF85C;
  --y-dk: #E4D400;
  --ink: #111110;
  --ink2: #3A3A36;
  --muted: #8C8A80;
  --bg: #F7F6F1;
  --line: #E6E2D5;
  --white: #fff;
  --r: 14px;
  --shadow: 0 12px 28px rgba(17, 17, 16, .08);
}

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ---------- 通用组件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 10px; padding: 11px 18px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: .16s; white-space: nowrap;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
/* 禁用的主按钮必须一眼看出「点不了」：整体灰显，不能再是亮黄色 */
.btn-primary:disabled { background: #DBD8CC; color: #8C8A80; opacity: 1; cursor: not-allowed; }
.btn-primary { background: var(--y); color: var(--ink); }
.btn-primary:hover:not(:disabled) { background: var(--y-lt); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover:not(:disabled) { background: #2A2A28; }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 8px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink2); }
/* 导入时自动降级到「统一放进一个分类」后，把分类选择框高亮出来，指明下一步 */
.field.attn label { color: #C0392B; }
.field.attn .input { border-color: #C0392B; box-shadow: 0 0 0 3px rgba(192,57,43,.15); }
.input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink); transition: .16s;
}
.input:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(253, 238, 1, .38); }

.tag {
  display: inline-block; padding: 3px 9px; border-radius: 6px;
  font-size: 12px; font-weight: 600; background: #F2F0E8; color: var(--ink2);
  white-space: nowrap;
}
.tag-y { background: var(--y); color: var(--ink); }
/* 课程格式徽标（MP4 / MP3 / WAV / PNG / PDF / DOCX…）：
   固定五列，缺格式时保留空槽；不同课件上下逐列对齐。 */
.tag-fmt { background: var(--y); color: var(--ink); }
.fmt-chips {
  display: grid; grid-template-columns: repeat(5, 38px);
  justify-content: end; align-items: center; gap: 3px;
  width: max-content; min-width: 0; margin-left: auto;
}
.fmt-slot {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 24px; flex: 0 0 38px; padding: 0 4px; border-radius: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 10px; line-height: 1; letter-spacing: 0;
}
.fmt-slot.is-empty {
  border: 1px dashed #DED9CB; background: #F7F5EF; color: #C5C0B4;
  font-weight: 500;
}

.hint { font-size: 12px; color: var(--muted); }

/* ---------- 弹窗 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(17,17,16,.46);
  display: none; align-items: center; justify-content: center; z-index: 300; padding: 20px;
}
.mask.open { display: flex; }
.dlg {
  background: #fff; border-radius: 16px; width: 100%; max-width: 520px;
  max-height: 84vh; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.3);
}
.dlg.wide { max-width: 980px; }
.dlg-head {
  display: flex; align-items: center; gap: 12px;
  padding: 17px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.dlg-head h3 { font-size: 16px; font-weight: 700; flex: 1; }
.dlg-x {
  width: 30px; height: 30px; border: 0; border-radius: 8px; background: #F2F0E8;
  color: var(--ink2); cursor: pointer; font-size: 14px;
}
.dlg-x:hover { background: #E8E5D9; }
.dlg-body { padding: 18px 20px 22px; overflow-y: auto; }

.dev-item {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 0; border-bottom: 1px solid #F2EFE5;
}
.dev-item:last-of-type { border-bottom: 0; }
.dev-dot {
  width: 34px; height: 34px; border-radius: 9px; background: #F2F0E8;
  display: flex; align-items: center; justify-content: center; font-size: 11px;
  font-weight: 800; color: var(--ink2); flex-shrink: 0;
}
.dev-meta { flex: 1; min-width: 0; }
.dev-meta b { display: block; font-size: 13.5px; font-weight: 600; }
.dev-meta span {
  display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dev-limit {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px; background: #FBFAF4; border: 1px solid var(--line);
  border-radius: 10px; margin-top: 16px;
}
.dev-limit b { font-size: 13px; }
.dev-limit input {
  width: 72px; padding: 7px 10px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; font-family: inherit; text-align: center;
}
.dev-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 0; }

.dev-chip {
  border: 1px solid var(--line); background: #fff; border-radius: 7px;
  padding: 4px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  font-family: inherit; color: var(--ink2); white-space: nowrap;
}
.dev-chip:hover { border-color: var(--ink); background: var(--bg); }
.dev-chip.full { background: #FDF1EF; border-color: #F2C9C2; color: #A5342A; }
.err { color: #C0392B; font-size: 13px; min-height: 20px; }
.err-strong {
  background: #FDF1EF; border: 1px solid #F2C9C2; border-left: 3px solid #C0392B;
  border-radius: 8px; padding: 10px 13px; margin-top: 10px; line-height: 1.65;
}

/* ---------- 登录页 ---------- */
.auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }

.auth-brand {
  background: var(--y); padding: 52px; display: flex; flex-direction: column;
  justify-content: center; position: relative; overflow: hidden;
}
.auth-brand::after {
  content: ""; position: absolute; right: -150px; bottom: -180px;
  width: 540px; height: 540px; border-radius: 50%; border: 96px solid rgba(17,17,16,.055);
}
.auth-brand img { width: 200px; }
.auth-brand h1 { font-size: 42px; line-height: 1.22; font-weight: 800; letter-spacing: -.6px; margin: 26px 0 14px; }
.auth-brand p { font-size: 15px; color: rgba(17,17,16,.72); max-width: 390px; }
.auth-brand .foot {
  position: absolute; left: 52px; bottom: 44px; z-index: 1;
  font-size: 12px; color: rgba(17,17,16,.66); letter-spacing: .3px;
}

.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-box { width: 100%; max-width: 360px; }
.auth-box h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.auth-box .sub { color: var(--muted); margin-bottom: 28px; font-size: 13px; }

.login-foot { margin-top: 22px; text-align: center; font-size: 12px; color: var(--muted); }
.login-metronome-entry {
  display: flex; align-items: center; gap: 11px;
  margin-top: 11px; padding: 11px 13px; text-decoration: none;
  border: 1px solid #DAD5C7; border-radius: 11px;
  background: #F8F6EF; color: var(--ink);
  transition: border-color .16s, background .16s, transform .16s;
}
.login-metronome-entry:hover {
  border-color: #D2BB00; background: #FFFCE6; transform: translateY(-1px);
}
.lme-icon {
  display: grid; place-items: center; flex: 0 0 34px;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--y); color: #171711;
}
.lme-icon svg { width: 20px; height: 20px; }
.lme-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; text-align: left; }
.lme-copy b { font-size: 13px; }
.lme-copy small { color: var(--muted); font-size: 10.5px; }
.login-metronome-entry i {
  flex: none; color: #807000; font-size: 11px; font-style: normal; font-weight: 700;
}
.auth-help {
  display: block; margin: 18px auto 0; padding: 4px 0; border: 0; background: transparent;
  color: #6f6b61; font: 600 12px/1.5 inherit; text-decoration: underline; cursor: pointer;
}
.auth-help:hover { color: var(--ink); }
.auth-recovery {
  margin-top: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 12px;
  background: #faf9f4; box-shadow: 0 10px 30px rgba(20,20,15,.06);
}
.auth-recovery[hidden] { display: none; }
.auth-recovery-head { display: flex; align-items: center; justify-content: space-between; }
.auth-recovery-head b { font-size: 13px; }
.auth-recovery-head button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.auth-recovery p { margin: 7px 0 12px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.auth-recovery .field { margin-bottom: 10px; }
.auth-recovery code { background: #efede5; padding: 1px 4px; border-radius: 4px; }

/* ---------- 顶栏 ---------- */
.topbar {
  height: 64px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 20px; padding: 0 24px;
  position: sticky; top: 0; z-index: 30;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; letter-spacing: -.2px; }
.topbar .brand img { width: 34px; height: 34px; border-radius: 9px; }
.topbar .brand small { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); letter-spacing: .5px; }

.search {
  flex: 1; max-width: 440px; position: relative;
}
.search input {
  width: 100%; padding: 9px 14px 9px 36px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 13.5px; font-family: inherit; background: var(--bg);
}
.search input:focus { outline: 0; background: #fff; border-color: var(--ink); }
.search::before {
  content: ""; position: absolute; left: 13px; top: 50%; width: 13px; height: 13px;
  margin-top: -7px; border: 2px solid var(--muted); border-radius: 50%;
}
.search::after {
  content: ""; position: absolute; left: 24px; top: 50%; width: 6px; height: 2px;
  margin-top: 4px; background: var(--muted); transform: rotate(45deg);
}

.user-chip { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--y);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.user-chip .meta { line-height: 1.3; }
.user-chip .meta b { font-size: 13px; display: block; }
.user-chip .meta span { font-size: 11.5px; color: var(--muted); }

/* ---------- 客户端布局 ---------- */
.layout { display: grid; grid-template-columns: 258px minmax(0, 1fr); height: calc(100vh - 64px); }

.sidebar {
  background: #fff; border-right: 1px solid var(--line);
  padding: 9px 8px 18px; overflow-y: auto; min-height: 0;
}
.sidebar h3 { font-size: 10.5px; letter-spacing: 1.1px; color: var(--muted); font-weight: 700; padding: 0 8px; margin: 9px 0 6px; }
.sidebar h3:first-child { margin-top: 0; }
.client-tree-tools {
  position: sticky; top: -9px; z-index: 7;
  display: flex; gap: 4px; align-items: center; justify-content: flex-end;
  padding: 7px 5px; margin: -9px -8px 4px;
  background: rgba(255,255,255,.98); border-bottom: 1px solid var(--line);
}
.client-tree-tools button {
  height: 29px; padding: 0 7px; border: 1px solid var(--line);
  border-radius: 7px; background: #fff; color: var(--ink2);
  font: 700 10.5px/1 inherit; cursor: pointer; white-space: nowrap;
}
.client-tree-tools button:hover { border-color: var(--y-dk); background: #FFFAD2; }
.cat-item {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 32px; padding: 6px 8px; border-radius: 7px;
  cursor: pointer; font-size: 12.5px; transition: .14s; gap: 5px;
}
.cat-item:hover { background: var(--bg); }
.cat-item.active { background: var(--y); font-weight: 600; }
.cat-item .n { font-size: 11.5px; color: var(--muted); }
.cat-item.active .n { color: rgba(17,17,16,.6); }
.cat-label { display: flex; align-items: center; min-width: 0; gap: 7px; flex: 1; }
.tree-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-meta { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.tree-state {
  padding: 2px 5px; border-radius: 5px; background: #EFEBDD; color: #777164;
  font-style: normal; font-size: 9px; font-weight: 700; white-space: nowrap;
}
.cat-item.expanded .tree-state { background: #F7E886; color: #5F4E00; }
.tree-root-card {
  margin-bottom: 5px; padding-top: 7px; padding-bottom: 7px;
  border: 1px solid #E5DFCA; background: #FBFAF4; font-weight: 800;
}
.tree-root-static {
  cursor: default; color: #77736A;
}
.tree-root-static:hover { background: #FBFAF4; }
.tree-root-icon {
  display: grid; place-items: center; width: 20px; height: 20px;
  border-radius: 5px; background: var(--y); color: #111; font-style: normal; font-size: 11px;
}
.tree-caret { font-style: normal; width: 12px; color: #77736A; }
.tree-caret.has-kids {
  display: grid; place-items: center; width: 21px; height: 21px; flex: none;
  border: 1px solid #D9D2B8; border-radius: 5px;
  background: #fff; color: #7D6500; font-weight: 900; font-size: 13px;
  cursor: pointer; user-select: none; box-shadow: 0 1px 2px rgba(60,50,10,.06);
}
.tree-caret.has-kids:hover { border-color: #A98400; background: #FFFCE6; }
.tree-dot { width: 7px; height: 7px; border-radius: 50%; background: #C8C3B4; flex: none; }
.cat-item.active .tree-dot { background: #171711; }
.sidebar .cat-item.has-kids {
  margin: 2px 0; padding-top: 6px; padding-bottom: 6px;
  border: 1px solid #E9E5D7; background: #F8F6EF; font-weight: 750;
}
.sidebar .cat-item.has-kids.expanded { background: #FFFDF4; border-color: #DED5B6; }
.sidebar .cat-item.active.has-kids { background: var(--y); border-color: var(--y-dk); }
.sidebar .cat-item.leaf { min-height: 31px; }
@media (min-width: 901px) {
  .sidebar .cat-item.tree-root { font-weight: 800; margin-bottom: 7px; }
  .sidebar .cat-item.level-1,
  .sidebar .cat-item.level-2,
  .sidebar .cat-item.level-3,
  .sidebar .cat-item.level-4,
  .sidebar .cat-item.level-5,
  .sidebar .cat-item.level-6 { position: relative; }
  .sidebar .cat-item.level-1::before,
  .sidebar .cat-item.level-2::before,
  .sidebar .cat-item.level-3::before,
  .sidebar .cat-item.level-4::before,
  .sidebar .cat-item.level-5::before,
  .sidebar .cat-item.level-6::before {
    content: ""; position: absolute;
    left: calc(8px + (var(--depth) - 1) * 20px);
    top: 0; bottom: 0;
    border-left: 1px solid #DDD9CC;
  }
  .sidebar .cat-item.level-1::after,
  .sidebar .cat-item.level-2::after,
  .sidebar .cat-item.level-3::after,
  .sidebar .cat-item.level-4::after,
  .sidebar .cat-item.level-5::after,
  .sidebar .cat-item.level-6::after {
    content: ""; position: absolute;
    left: calc(8px + (var(--depth) - 1) * 20px);
    top: 50%; width: 8px;
    border-top: 1px solid #DDD9CC;
  }
}

.main { padding: 26px 32px 60px; overflow-y: auto; }
.main-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.main-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.main-head p { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- 课件库：标题＋经典/列表 固定，只有课件区滚动 ---------- */
.main-courses {
  padding: 0; overflow: hidden;
  display: flex; flex-direction: column; min-height: 0; position: relative;
}
.main-courses .main-head {
  flex: 0 0 auto; margin: 0;
  padding: 22px 32px 15px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  z-index: 5;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 0;
}
.main-courses .main-head > div:first-child { order: 1; min-width: 160px; }
.main-courses .main-head h2 { font-size: 21px; }
.main-courses .grid-scroll {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  padding: 22px 32px 60px;
  overscroll-behavior: contain;
}
.welcome-player {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 82px; margin: 0 0 20px; padding: 13px 16px;
  overflow: hidden; border: 1px solid #E0D8A1; border-radius: 14px;
  background:
    radial-gradient(circle at 88% 20%, rgba(255,200,30,.20), transparent 34%),
    linear-gradient(120deg, #FFFDF2 0%, #FFF8CF 100%);
  box-shadow: 0 5px 18px rgba(80,67,8,.07);
  transition: min-height .25s, padding .25s, opacity .25s;
}
.welcome-player.quiet { min-height: 58px; padding-top: 9px; padding-bottom: 9px; }
.welcome-mark {
  width: 50px; height: 50px; flex: 0 0 auto; border-radius: 13px;
  display: grid; place-items: center; background: #171712; overflow: hidden;
}
.welcome-mark img { width: 42px; height: 42px; object-fit: contain; }
.welcome-copy { flex: 1; min-width: 0; }
.welcome-kicker {
  display: block; margin-bottom: 3px; color: #8A7410;
  font-size: 10px; line-height: 1; font-weight: 900; letter-spacing: 1.4px;
}
.welcome-copy h3 { font-size: 16px; line-height: 1.3; font-weight: 800; color: #282619; }
.welcome-copy p { margin-top: 3px; color: #726C50; font-size: 12px; line-height: 1.45; }
.welcome-player.quiet .welcome-kicker { display: none; }
.welcome-player.quiet .welcome-copy h3 { font-size: 14px; }
.welcome-replay {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 11px; border: 1px solid #D8C94E; border-radius: 8px;
  background: rgba(255,255,255,.75); color: #695800;
  font: 800 11px/1 inherit; cursor: pointer;
}
.welcome-replay:hover { background: #fff; }
.welcome-wave {
  width: 34px; height: 30px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 3px;
}
.welcome-wave i {
  width: 3px; height: 8px; border-radius: 3px; background: #D2B200;
  opacity: .35; transform-origin: center;
}
.welcome-player.playing .welcome-wave i {
  opacity: 1; animation: welcome-wave .72s ease-in-out infinite alternate;
}
.welcome-player.playing .welcome-wave i:nth-child(2) { animation-delay: -.48s; }
.welcome-player.playing .welcome-wave i:nth-child(3) { animation-delay: -.24s; }
.welcome-player.playing .welcome-wave i:nth-child(4) { animation-delay: -.58s; }
.welcome-player.playing .welcome-wave i:nth-child(5) { animation-delay: -.36s; }
@keyframes welcome-wave { from { height: 6px; } to { height: 25px; } }
.folder-skeleton { display: grid; grid-template-columns: repeat(auto-fill,minmax(248px,1fr)); gap: 18px; }
.folder-skeleton i {
  height: 218px; border-radius: var(--r); border: 1px solid var(--line);
  background: linear-gradient(100deg,#F6F3EA 20%,#FFFDF7 40%,#F6F3EA 60%);
  background-size: 240% 100%; animation: skeleton-sweep 1.15s linear infinite;
}
@keyframes skeleton-sweep { to { background-position: -240% 0; } }
.course-selection-bar {
  position: static; left: auto; right: auto; bottom: auto; z-index: 8;
  order: 2; flex: 1 1 390px; max-width: 680px; margin: 0 14px;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 9px; background: rgba(255,249,201,.82);
  border: 1px solid #D8C44A; border-radius: 11px;
  box-shadow: none;
  color: #5F5009; font-size: 12.5px;
}
.main-courses .view-switch { order: 3; flex: none; }
.course-selection-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.course-selection-bar b { color: var(--ink); }
.card.selected, .clist-row.selected {
  outline: 3px solid var(--y-dk); outline-offset: -3px;
  box-shadow: 0 8px 26px rgba(126,104,0,.16);
}
.card.selected::after, .clist-row.selected::after {
  content: "已选择"; position: absolute; left: 9px; top: 9px; z-index: 5;
  padding: 2px 7px; border-radius: 5px; background: var(--y); color: #171711;
  font-size: 10.5px; font-weight: 800;
}
.card, .clist-row { position: relative; }
.card, .clist-row, .card *, .clist-row * {
  -webkit-user-select: none;
  user-select: none;
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 18px; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; cursor: pointer; transition: .18s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #D8D4C4; }

.card-cover {
  aspect-ratio: 16 / 9; background: linear-gradient(135deg, #1A1A18 0%, #2E2E2A 100%);
  position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-cover .ph {
  width: 100%; height: 100%; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1.45; font-weight: 700; color: var(--y); letter-spacing: .3px;
  text-align: center; padding: 12px 14px; opacity: .92;
  white-space: normal; overflow-wrap: anywhere; word-break: break-word;
}
.card-cover .play-dot {
  position: absolute; right: 12px; bottom: 12px; width: 32px; height: 32px;
  border-radius: 50%; background: var(--y); display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.85); transition: .18s;
}
.card:hover .card-cover .play-dot { opacity: 1; transform: scale(1); }
.play-dot::after {
  content: ""; width: 0; height: 0; border-left: 9px solid var(--ink);
  border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px;
}
.dur {
  position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.72); color: #fff;
  font-size: 11px; padding: 2px 7px; border-radius: 5px; font-variant-numeric: tabular-nums;
}
.card-body { padding: 13px 15px 15px; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.card-body h4 { font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.card-body .sub { font-size: 12px; color: var(--muted); }
.card-foot {
  display: grid; grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center; gap: 6px; margin-top: auto; padding-top: 4px;
}
.card-status {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; min-height: 24px; border-radius: 6px;
  background: #F2F0E8; color: var(--ink2); font-size: 10.5px; font-weight: 600;
}
.card-status.is-empty { visibility: hidden; }

.empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty b { display: block; font-size: 15px; color: var(--ink2); margin-bottom: 6px; }

/* ---------- 客户端 ---------- */
.player-mask {
  position: fixed; inset: 0; background: #0B0B0A; z-index: 200;
  display: none; flex-direction: column;
}
.player-mask.open { display: flex; }
.player-mask.pip {
  inset: auto 18px auto auto;
  top: 74px;
  width: min(560px, calc(100vw - 24px));
  height: min(380px, calc(100vh - 92px));
  overflow: hidden;
  border: 1px solid rgba(253,238,1,.55);
  border-radius: 14px;
  box-shadow: 0 20px 56px rgba(0,0,0,.48);
  z-index: 240;
}
.player-mask.pip .pl-top {
  height: 46px; gap: 8px; padding: 0 10px;
  cursor: move; touch-action: none; user-select: none;
  background: #191917;
}
.player-mask.pip .pl-top h3 { min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-mask.pip .badge-live,
.player-mask.pip #manageCourseBtn,
.player-mask.pip #sideToggleBtn,
.player-mask.pip #dupReturnBtn { display: none !important; }
.player-mask.pip .pl-action { padding: 5px 8px; font-size: 10.5px; }
.player-mask.pip .pl-body { grid-template-columns: 1fr; }
.player-mask.pip .pl-side,
.player-mask.pip .pl-split { display: none; }
.player-mask.pip .pl-stage { aspect-ratio: auto; height: 100%; }
.player-mask.pip .pl-controls { gap: 8px; padding: 18px 10px 7px; }
.player-mask.pip #cur { display: none; }
.player-mask.pip .icon-btn { width: 29px; height: 29px; font-size: 13px; }
.player-mask.pip .ab-btn { font-size: 9px; }
.player-mask.pip .time { font-size: 10px; }
body.mg-player-pip { overflow: auto !important; }
.pip-resize { display: none; position: absolute; z-index: 35; touch-action: none; }
.player-mask.pip .pip-resize { display: block; }
.player-mask.pip .pip-n,
.player-mask.pip .pip-s { left: 14px; right: 14px; height: 7px; cursor: ns-resize; }
.player-mask.pip .pip-e,
.player-mask.pip .pip-w { top: 14px; bottom: 14px; width: 7px; cursor: ew-resize; }
.player-mask.pip .pip-n { top: 0; }
.player-mask.pip .pip-s { bottom: 0; }
.player-mask.pip .pip-e { right: 0; }
.player-mask.pip .pip-w { left: 0; }
.player-mask.pip .pip-ne,
.player-mask.pip .pip-nw,
.player-mask.pip .pip-se,
.player-mask.pip .pip-sw { width: 16px; height: 16px; }
.player-mask.pip .pip-ne { right: 0; top: 0; cursor: nesw-resize; }
.player-mask.pip .pip-nw { left: 0; top: 0; cursor: nwse-resize; }
.player-mask.pip .pip-se { right: 0; bottom: 0; cursor: nwse-resize; }
.player-mask.pip .pip-sw { left: 0; bottom: 0; cursor: nesw-resize; }
.player-mask.pip .pip-se::after {
  content: ""; position: absolute; right: 3px; bottom: 3px; width: 8px; height: 8px;
  border-right: 2px solid rgba(253,238,1,.8); border-bottom: 2px solid rgba(253,238,1,.8);
}

.pl-top {
  height: 60px; display: flex; align-items: center; gap: 16px; padding: 0 22px;
  border-bottom: 1px solid rgba(255,255,255,.08); flex-shrink: 0;
}
.pl-top h3 { color: #fff; font-size: 15px; font-weight: 600; flex: 1; }
.pl-top .badge-live {
  font-size: 11px; color: var(--y); border: 1px solid rgba(253,238,1,.45);
  padding: 2px 8px; border-radius: 5px; letter-spacing: .5px;
}
.icon-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 0; background: rgba(255,255,255,.08);
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.icon-btn:hover { background: rgba(255,255,255,.16); }

.pl-body { flex: 1; display: grid; grid-template-columns: 1fr var(--side-w, 320px); min-height: 0; position: relative; }
.pl-stage { position: relative; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.stage-preview {
  position: absolute; inset: 0; z-index: 1; display: none;
  background: #111 center/contain no-repeat;
  filter: saturate(.85) brightness(.72);
}
.stage-preview.on { display: block; }
.pl-stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }

/* ---------- 音频课件：黑屏换成一张会转的唱片 ----------
   音频课的 mp4 没有画面轨，video 元素只负责出声。
   这里让画面透明但仍占满区域，双击视频（音频）照样能铺满/还原。 */
.audio-face { display: none; }
.pl-stage.is-audio { background: radial-gradient(130% 120% at 50% 0%, #2b2417 0%, #0d0d0c 62%); }
.pl-stage.is-audio video { opacity: 0; }
.pl-stage.is-audio .audio-face {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  display: flex; align-items: center; justify-content: center; gap: 26px; padding: 0 8%;
}
.af-meta { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.af-meta b {
  color: #fff; font-size: 20px; font-weight: 800; line-height: 1.35;
  max-width: 48vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.af-meta span { color: rgba(255,255,255,.5); font-size: 13px; }

.pl-controls {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 20px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.86));
  display: flex; align-items: center; gap: 14px; transition: opacity .25s;
  z-index: 7;   /* 控件永远在最上层，不被谱子画面盖住 */
}
.pl-stage.hide-cursor .pl-controls { opacity: 0; }
.pl-stage.hide-cursor { cursor: none; }

.progress { flex: 1; height: 4px; background: rgba(255,255,255,.2); border-radius: 2px; cursor: pointer; position: relative; }
.progress .bar { height: 100%; background: var(--y); border-radius: 2px; width: 0; }
.progress .bar::after {
  content: ""; position: absolute; right: -5px; top: -4px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--y);
}
/* A-B 循环区间：画在进度条上，两端各一条黄线，一眼看出反复的是哪一段 */
.progress .loop-band {
  position: absolute; top: -3px; height: 10px; display: none; pointer-events: none;
  background: rgba(253,238,1,.26); border-left: 2px solid var(--y);
  border-right: 2px solid var(--y); border-radius: 2px;
}
/* A-B 按钮：设好 A 点变黄字，循环生效变黄底 */
.icon-btn.ab-btn { font-size: 11px; font-weight: 800; letter-spacing: -0.3px; }
.icon-btn.ab-btn.half { color: var(--y); background: rgba(253,238,1,.16); }
.icon-btn.ab-btn.on { background: var(--y); color: #14140F; }
.icon-btn.loop-btn { font-size: 18px; font-weight: 800; }
.icon-btn.loop-btn.on { background: var(--y); color: #14140F; }
.pl-volume { display: flex; align-items: center; gap: 6px; flex: none; }
.pl-volume .icon-btn { width: 30px; height: 30px; font-size: 14px; }
.pl-volume .icon-btn.on { background: rgba(253,238,1,.24); color: var(--y); }
.pl-volume input {
  width: 88px; accent-color: var(--y); cursor: pointer;
}
.player-mask.pip .pl-volume input { width: 58px; }
.time { color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; opacity: .8; white-space: nowrap; }

.pl-side { background: #141412; border-left: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; min-height: 0; position: relative; }

/* 侧栏与画面之间的拖动条：拖左边就窄、拖右边就宽，双击复位 */
.pl-split {
  position: absolute; left: -5px; top: 0; bottom: 0; width: 10px;
  cursor: col-resize; z-index: 20; touch-action: none;
}
.pl-split::after {
  content: ""; position: absolute; left: 3.5px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 56px; border-radius: 2px; background: rgba(255,255,255,.28);
  transition: background .15s, height .15s;
}
.pl-split:hover::after { background: var(--y); height: 88px; }
body.col-resizing { cursor: col-resize; user-select: none; }
body.col-resizing .pl-split::after { background: var(--y); }

/* ---------- 全屏（F / 右下角按钮）----------
   只把客户端这一层铺满窗口：藏掉标题栏和右侧栏，画面独占整个屏幕。
   走纯 CSS 而不是 Fullscreen API —— 客户端里没有地址栏可藏，CSS 已经等于满屏，
   而 Fullscreen API 在 WebView2 里会跟原生窗口抢状态，按 Esc 容易卡在两套状态之间。 */
.player-mask.fs .pl-top { display: none; }
.player-mask.fs .pl-body { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.player-mask.fs .pl-side { display: none; }
.player-mask.fs .pl-stage { aspect-ratio: auto; height: 100%; }
.player-mask.fs #fsBtn { background: rgba(253,238,1,.9); color: #111; }
/* 侧栏整条藏掉时（纯视频课 + 关闭下载），画面占满剩余宽度，不留一条黑边 */
.player-mask.no-side .pl-body { grid-template-columns: 1fr; }
.player-mask.no-side .pl-side { display: none; }
.pl-side-tabs { display: flex; border-bottom: 1px solid rgba(255,255,255,.08); flex-shrink: 0; }
.pl-side-tabs button {
  flex: 1; padding: 13px; background: 0; border: 0; color: rgba(255,255,255,.5);
  font-size: 13px; cursor: pointer; border-bottom: 2px solid transparent; font-weight: 600;
}
.pl-side-tabs button.on { color: var(--y); border-bottom-color: var(--y); }
/* 关闭下载后只剩一个标签，别让它平分半个侧栏 */
.pl-side-tabs.solo button { flex: 0 0 auto; padding: 13px 20px; }
.pl-side-body { flex: 1; overflow-y: auto; padding: 16px; }
.sheet-img { width: 100%; border-radius: 8px; margin-bottom: 12px; background: #fff; }

.dl-box { color: #fff; }
.dl-box h4 { font-size: 14px; margin-bottom: 8px; }
.dl-box p { font-size: 12.5px; color: rgba(255,255,255,.55); line-height: 1.7; margin-bottom: 16px; }
.dl-note { font-size: 11.5px; color: rgba(255,255,255,.4); margin-top: 12px; line-height: 1.7; }

/* 下载面板的文件清单：视频、每一页谱子、每一份 PDF 各自一行，可单独存 */
.file-list { margin-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.file-row {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.06);
}
.ftype {
  flex-shrink: 0; width: 38px; text-align: center; font-size: 9.5px; font-weight: 700;
  padding: 3px 0; border-radius: 4px; letter-spacing: .3px;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.62);
}
.ftype.ft-video { background: rgba(242,194,48,.16); color: #F2C230; }
.ftype.ft-audio { background: rgba(242,194,48,.16); color: #F2C230; }
.ftype.ft-doc { background: rgba(255,255,255,.14); color: #fff; }
.ftype.ft-word { background: rgba(93,137,247,.2); color: #AFC5FF; }
.fname {
  flex: 1; min-width: 0; font-size: 12.5px; color: rgba(255,255,255,.82);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fsize { flex-shrink: 0; font-size: 11px; color: rgba(255,255,255,.38); }
.fget {
  flex-shrink: 0; font-size: 11.5px; padding: 5px 10px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,.18); background: transparent;
  color: rgba(255,255,255,.8); cursor: pointer; font-family: inherit;
}
.fget:hover { border-color: var(--y); color: var(--y); }
.fget:disabled { opacity: .45; cursor: default; }
/* 文件面板的直接操作：播放 / 查看。和「保存」同样式，一眼知道都能点 */
.fact {
  flex-shrink: 0; font-size: 11.5px; padding: 5px 10px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,.18); background: transparent;
  color: rgba(255,255,255,.8); cursor: pointer; font-family: inherit;
}
.fact:hover { border-color: var(--y); color: var(--y); }
/* 不能下载的那些行：不给按钮，只标「仅在线」，免得反复点 */
.file-row.locked .fname, .file-row.locked .fsize { opacity: .6; }
.fonly {
  flex-shrink: 0; font-size: 11px; padding: 4px 8px; border-radius: 6px;
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.42); white-space: nowrap;
}

.pl-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; color: #fff; background: rgba(10,10,9,.68); z-index: 5;
}
.spin {
  width: 30px; height: 30px; border: 2.5px solid rgba(255,255,255,.18);
  border-top-color: var(--y); border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pl-loading .hint { color: rgba(255,255,255,.55); }

/* ---------- 后台 ---------- */
.admin-layout { display: grid; grid-template-columns: 216px 1fr; height: calc(100vh - 64px); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 20px; }
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.panel-head h3 { font-size: 15px; font-weight: 700; }
.panel-body { padding: 20px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; padding: 11px 16px; font-size: 11.5px; letter-spacing: .6px;
  color: var(--muted); font-weight: 700; background: #FBFAF6; border-bottom: 1px solid var(--line);
}
td { padding: 12px 16px; border-bottom: 1px solid #F0EDE2; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #FDFCF7; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.8px; line-height: 1.2; }
.stat span { font-size: 12px; color: var(--muted); }
.stat.hl { background: var(--y); border-color: var(--y); }
.stat.hl span { color: rgba(17,17,16,.62); }

.upload-zone {
  border: 2px dashed var(--line); border-radius: var(--r); padding: 34px;
  text-align: center; transition: .18s; cursor: pointer; background: #FDFCF7;
}
.upload-zone:hover, .upload-zone.over { border-color: var(--y-dk); background: #FFFCEB; }
.upload-zone b { display: block; font-size: 14.5px; margin-bottom: 5px; }
.upload-zone span { font-size: 12.5px; color: var(--muted); }

.progress-line { height: 6px; background: #F0EDE2; border-radius: 3px; overflow: hidden; margin-top: 14px; display: none; }
.progress-line.on { display: block; }
.progress-line i { display: block; height: 100%; background: var(--y); width: 0; transition: width .3s; }
.import-progress { margin-top: 12px; }

/* ---------- 批量导入 ---------- */
.up-tabs { display: flex; gap: 6px; }
.up-tab {
  border: 1px solid var(--line); background: var(--white); color: var(--muted);
  padding: 6px 13px; border-radius: 9px; font-size: 13px; cursor: pointer; transition: .16s;
}
.up-tab:hover { color: var(--ink); }
.up-tab.active { background: var(--y); border-color: var(--y); color: var(--ink); font-weight: 700; }

.import-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow: auto; }
.import-report {
  display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding: 12px 13px; border: 1px solid #F0B9AE;
  border-radius: 10px; background: #FFF4F1;
}
.import-report.ok { border-color: #B8D9C4; background: #F1FAF4; }
.import-report-main { flex: 1 1 230px; min-width: 0; }
.import-report-main b { display: block; color: #8D2C1E; font-size: 13px; }
.import-report.ok .import-report-main b { color: #1D7242; }
.import-report-main p { margin: 3px 0 0; color: #7B5A52; font-size: 11.5px; line-height: 1.65; }
.import-report.ok .import-report-main p { color: #4F6E5B; }
.import-report-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.import-viewbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 10px; padding: 7px; border: 1px solid var(--line);
  border-radius: 9px; background: #FAF9F4;
}
.imp-view {
  border: 1px solid transparent; background: transparent; color: var(--muted);
  padding: 4px 9px; border-radius: 7px; font: 600 11.5px/1.5 inherit; cursor: pointer;
}
.imp-view b { color: inherit; font-variant-numeric: tabular-nums; }
.imp-view:hover { background: #fff; border-color: var(--line); color: var(--ink2); }
.imp-view.active { background: var(--y); border-color: var(--y); color: var(--ink); }
.import-viewbar .hint { margin-left: auto; }
.imp-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--white);
}
.imp-main { flex: 1; min-width: 0; }
.imp-main b {
  display: block; font-size: 13.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.imp-main span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.imp-state { flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.imp-state.run { color: #A67C00; }
.imp-state.ok { color: #1E7A46; }
.imp-state.bad { color: #B03A2E; }
.imp-err-detail {
  display: block; margin-top: 4px; color: #A53B2C; font-size: 11px;
  line-height: 1.55; overflow-wrap: anywhere;
}
.tag-wait { background: #FFF3C4; color: #8A6D00; }
.tag-bad { background: #FBE3E0; color: #B03A2E; }


.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 10px;
  font-size: 13.5px; opacity: 0; pointer-events: none; transition: .25s; z-index: 500;
  box-shadow: 0 14px 36px rgba(0,0,0,.24); max-width: 80vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: #1E7A46; }
.toast.bad { background: #B03A2E; }

/* ---------- 平板：侧栏转横向滚动条 ---------- */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 32px; min-height: 220px; }
  .auth-brand h1 { font-size: 28px; }
  .admin-layout { grid-template-columns: minmax(0, 1fr); height: auto; }

  .layout { grid-template-columns: minmax(0, 1fr); height: auto; }

  /* 窄屏标题行允许换行，避免 h2+p 一行撑破 */
  .main-head { flex-wrap: wrap; }

  /* 分类不再隐藏，改为可橫滑的胶囊条，手机上仍能筛选 */
  .sidebar {
    display: flex; align-items: center; gap: 8px;
    overflow-x: auto; overflow-y: hidden;
    padding: 10px 14px; background: #fff;
    border-right: 0; border-bottom: 1px solid var(--line);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar h3 { display: none; }
  .sidebar .client-tree-tools {
    position: static; order: -1; flex: 1 0 100%;
    margin: 0 0 2px; padding: 3px 0 7px;
    border-bottom: 1px solid var(--line);
  }
  .client-tree-tools button { flex: none; }
  .cat-item {
    flex: 0 0 auto; white-space: nowrap; gap: 6px;
    padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px;
    font-size: 13px; background: #fff;
  }
  .cat-item:hover { background: var(--bg); }
  .cat-item.active { border-color: var(--y-dk); }

  .main { padding: 18px 16px 48px; overflow: visible; }
  /* 窄屏恢复整页滚动，否则课件库的内部滚动区会塌成 0 高 */
  .main-courses { display: block; overflow: visible; padding: 0; }
  .main-courses .main-head { padding: 15px 16px 12px; }
  .course-selection-bar {
    order: 3; flex: 1 0 100%; max-width: none;
    margin: 2px 0 0; padding: 7px 9px; flex-wrap: wrap;
  }
  .main-courses .view-switch { order: 2; margin-left: auto; }
  .course-selection-bar span { flex: 1 0 100%; }
  .main-courses .grid-scroll { overflow: visible; padding: 16px 16px 48px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 13px; }
  .card-body { padding: 11px 12px 13px; gap: 5px; }
  .card-body h4 { font-size: 13.5px; }
  .welcome-player { gap: 10px; padding: 11px 12px; }
  .welcome-mark { width: 42px; height: 42px; }
  .welcome-mark img { width: 36px; height: 36px; }
  .welcome-wave { display: none; }
  .welcome-copy h3 { font-size: 14px; }
  .welcome-copy p { font-size: 11px; }
  .welcome-replay { padding: 7px 9px; }
  .folder-skeleton { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 13px; }
  .main-head { margin-bottom: 16px; }
  .main-head h2 { font-size: 19px; }
  .main-courses .main-head h2 { font-size: 19px; }

  /* 客户端：竖屏改为上下结构，谱子不再被隐藏 */
  .pl-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .pl-stage { aspect-ratio: 16 / 9; }
  .pl-side { border-left: 0; border-top: 1px solid rgba(255,255,255,.08); }
  .pl-side-tabs button { padding: 11px; }
  /* 上下结构没有左右分界，拖动条没意义 */
  .pl-split { display: none; }

  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 手机 ---------- */
@media (max-width: 720px) {
  html, body { height: auto; }
  .admin-layout, .admin-layout > .main { min-width: 0; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .stat { padding: 13px 14px; min-width: 0; }
  .stat b { font-size: 24px; }
  .sidebar { flex-wrap: wrap; overflow-x: visible; }
  .net-row { flex-wrap: wrap; align-items: flex-start; }
  .net-row code {
    flex: 1 1 calc(100% - 58px);
    order: 2;
    line-height: 1.5;
  }
  .net-row span { flex: 1 1 100%; order: 3; margin-left: 56px; }
  .net-row button { order: 4; }
  .review-alert { flex-wrap: wrap; align-items: flex-start; }
  .review-alert > div { flex: 1 1 calc(100% - 50px); }
  .review-alert button { width: 100%; }

  .topbar {
    height: auto; padding: 9px 14px; gap: 10px; flex-wrap: wrap;
    row-gap: 8px;
  }
  .topbar .brand { font-size: 14px; }
  .topbar .brand img { width: 30px; height: 30px; border-radius: 8px; }
  .topbar .brand small { display: none; }
  .search { order: 3; flex: 1 0 100%; max-width: none; }
  .search input { padding: 8px 12px 8px 34px; font-size: 16px; } /* 16px 防 iOS 聚焦放大 */
  .user-chip { gap: 8px; }
  .user-chip .meta {
    display: block; max-width: 92px; min-width: 0;
  }
  .user-chip .meta b,
  .user-chip .meta span {
    display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .user-chip .meta #utenant { display: none; }
  .user-chip .btn { padding: 8px 12px; font-size: 12.5px; }
  .avatar { width: 30px; height: 30px; font-size: 12px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 11px; }
  .card-cover { aspect-ratio: 16 / 10; }
  .card-body h4 { font-size: 13px; line-height: 1.35; }
  .card-body .sub { font-size: 11px; }
  .card-foot { grid-template-columns: minmax(0, 1fr); gap: 2px; font-size: 11px; }
  .card-status { justify-self: end; }
  .fmt-chips { grid-template-columns: repeat(5, 24px); gap: 2px; }
  .fmt-slot { width: 24px; flex-basis: 24px; padding: 0 2px; font-size: 8px; }

  /* 客户端全屏利用 */
  .pl-top { height: 52px; padding: 0 8px 0 14px; gap: 8px; }
  .pl-top h3 { font-size: 13.5px; }
  .pl-top .badge-live { display: none; }
  .icon-btn { width: 40px; height: 40px; font-size: 17px; }

  .pl-controls { padding: 20px 12px calc(8px + env(safe-area-inset-bottom)); gap: 8px; }
  /* 手机上控件本来就不宽，A-B 又占一个位：藏掉「当前时间」，进度条本身就能看出来 */
  .pl-controls #cur { display: none; }
  .icon-btn.ab-btn { width: 38px; height: 38px; font-size: 10.5px; }
  .pl-stage.hide-cursor .pl-controls { opacity: 1; } /* 手机上不要自动隐藏 */
  .pl-stage.hide-cursor { cursor: default; }
  .pl-stage { aspect-ratio: 16 / 9; }
  .pl-side-body { padding: 12px; }
  .sheet-img { border-radius: 6px; }


  /* 登录页：压缩品牌区，让表单进入首屏 */
  .auth { min-height: 0; }
  .auth-brand { padding: 26px 24px 30px; min-height: auto; }
  .auth-brand img { width: 118px; }
  .auth-brand h1 { font-size: 25px; margin: 16px 0 10px; letter-spacing: -.3px; }
  .auth-brand p { font-size: 13px; }
  .auth-brand .foot { display: none; }
  .auth-brand::after { display: none; }
  .auth-form { padding: 26px 22px 44px; }
  .auth-box h2 { font-size: 21px; }
  .auth-box .sub { margin-bottom: 20px; }
  .input { font-size: 16px; padding: 12px 14px; } /* 16px 防 iOS 聚焦缩放 */

  /* 后台表格：手机上压缩内边距，避免内容被挤成竖排 */
  table { font-size: 12.5px; }
  th { padding: 9px 8px; font-size: 11px; white-space: nowrap; }
  td { padding: 10px 8px; }
  td:first-child { white-space: nowrap; }
  .panel { overflow-x: auto; }

  /* 校区表 7 列在手机上放不下，隐藏次要列，保留校区/账号/名额/状态 */
  #view-tenants table th:nth-child(2), #view-tenants table td:nth-child(2),
  #view-tenants table th:nth-child(3), #view-tenants table td:nth-child(3),
  #view-tenants table th:nth-child(6), #view-tenants table td:nth-child(6) { display: none; }

  .dev-item { gap: 9px; }
  .dlg { max-width: none; }
  .dlg-head { padding: 15px 16px; }
  .dlg-body { padding: 14px 16px 18px; }
  .table-wrap, .card-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  .toast { bottom: calc(20px + env(safe-area-inset-bottom)); font-size: 13px; padding: 11px 18px; max-width: 88vw; }

  .modal-box { padding: 20px; }
}

/* 手机横屏：视频独占，谱子临时收起 */
@media (max-width: 900px) and (orientation: landscape) {
  .pl-body { grid-template-columns: 1fr; grid-template-rows: 1fr; }
  .pl-stage { aspect-ratio: auto; height: auto; }
  .pl-side { display: none; }
}

/* ================= 客户端：视频 / 谱子 切换 ================= */
.sheet-view {
  position: absolute; inset: 0; background: #14140f; display: none; z-index: 2;
}
.sheet-view.on { display: block; }

.sheet-jump {
  position: absolute; top: 14px; right: 16px; z-index: 8;
  display: none; align-items: center; gap: 7px;
  padding: 6px 9px; border-radius: 9px;
  color: rgba(255,255,255,.62); background: rgba(0,0,0,.68);
  border: 1px solid rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 11.5px;
}
.sheet-jump select {
  height: 28px; max-width: 132px; padding: 0 24px 0 8px;
  border-radius: 7px; border: 1px solid rgba(255,255,255,.16);
  background: #24241f; color: #fff; font: 600 12px/1 inherit;
}
.sheet-img.load-failed {
  min-height: 120px; padding: 20px; object-fit: contain;
  border: 1px dashed rgba(255,255,255,.18); color: rgba(255,255,255,.55);
}

.sheet-canvas {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: grab; touch-action: none;
}
.sheet-canvas.dragging { cursor: grabbing; }
.sheet-canvas img {
  max-width: 100%; max-height: 100%; display: block;
  transform-origin: center center;
  /* 不要加 will-change: transform：它会把图片提前栅格化成一个位图纹理，
     之后放大就是把这张纹理拉伸，字和符头立刻变糊。缩放一律走真实宽高。 */
  user-select: none; -webkit-user-drag: none; background: #fff;
  box-shadow: 0 8px 40px rgba(0,0,0,.55);
}
/* PDF 页和谱子图走同一套缩放逻辑，视觉上也保持一致 */
.sheet-canvas canvas {
  max-width: 100%; max-height: 100%; display: block;
  transform-origin: center center;
  background: #fff;
  box-shadow: 0 8px 40px rgba(0,0,0,.55);
}

.word-view {
  position: absolute; inset: 0; overflow: auto; padding: 24px;
  background: #2b2b27; color: #20201c; z-index: 3;
  -webkit-overflow-scrolling: touch;
}
.word-doc {
  width: min(900px, 100%); min-height: calc(100% - 10px); margin: 0 auto;
  padding: 54px 64px; background: #fff; color: #20201c;
  box-shadow: 0 8px 40px rgba(0,0,0,.42); line-height: 1.72;
  font-family: "Songti SC", "STSong", "Microsoft YaHei", serif;
  font-size: 15px; overflow-wrap: anywhere;
}
.word-doc h1, .word-doc h2, .word-doc h3 { color: #161612; line-height: 1.35; margin: 1.2em 0 .6em; }
.word-doc h1 { font-size: 1.8em; text-align: center; }
.word-doc h2 { font-size: 1.4em; }
.word-doc h3 { font-size: 1.15em; }
.word-doc p { margin: .65em 0; }
.word-doc img { max-width: 100%; height: auto; }
.word-doc table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .92em; }
.word-doc th, .word-doc td { border: 1px solid #bbb; padding: 6px 8px; vertical-align: top; }
.word-doc ul, .word-doc ol { padding-left: 1.8em; margin: .7em 0; }
.word-empty {
  width: min(620px, 100%); margin: 12vh auto; padding: 28px;
  color: rgba(255,255,255,.82); background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12); border-radius: 14px; text-align: center;
}
.word-empty b { display: block; margin-bottom: 8px; font-size: 16px; }
.word-empty p { margin: 0; color: rgba(255,255,255,.5); font-size: 13px; line-height: 1.7; }

.team-dlg { width: min(760px, calc(100vw - 28px)); }
.team-dlg .dlg-body { padding-bottom: 22px; }
.team-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.team-head p { margin: 4px 0 0; color: #8c8a80; font-size: 12px; }
.team-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.team-note { margin-top: 12px; color: #8c8a80; font-size: 11.5px; line-height: 1.65; }

@media (max-width: 720px) {
  .word-view { padding: 10px; }
  .word-doc { padding: 28px 20px; min-height: 100%; font-size: 14px; }
}

.sheet-tools {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; z-index: 8;
  background: rgba(0,0,0,.74); border: 1px solid rgba(255,255,255,.1);
  padding: 6px 10px; border-radius: 12px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.sbtn {
  min-width: 32px; height: 30px; padding: 0 8px; border: 0; border-radius: 7px;
  background: rgba(255,255,255,.08); color: #fff; font-size: 15px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.sbtn:hover:not(:disabled) { background: rgba(255,255,255,.2); }
.sbtn:disabled { opacity: .3; cursor: default; }
.sbtn.sfit { font-size: 12px; padding: 0 10px; white-space: nowrap; }
.spage, .spct {
  color: rgba(255,255,255,.82); font-size: 12px; padding: 0 6px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ssep { width: 1px; height: 18px; background: rgba(255,255,255,.16); margin: 0 6px; }

.mode-switch {
  position: absolute; left: 14px; top: 14px; z-index: 6; display: flex;
  background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px; padding: 3px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.mode-switch button {
  border: 0; background: 0; color: rgba(255,255,255,.62); font-size: 12.5px;
  padding: 5px 14px; border-radius: 6px; cursor: pointer; font-weight: 600;
}
.mode-switch button.on { background: var(--y); color: #1a1a14; }
.mode-switch button:disabled { opacity: .32; cursor: default; }

/* ---------- 音频 + 谱子 双联模式 ----------
   MP3/WAV 播放时主区自动显示谱子，音频不停。
   唱片封面让位给谱子画面，播放控制条保留在最上层。 */
.pl-stage.is-duet .audio-face { display: none; }
.pl-stage.is-duet.is-sheet { background: #14140f; }
.mode-switch.duet button[data-mode="sheet"] { outline: 1px solid rgba(255,255,255,.35); }

/* ================= 倍速面板 ================= */
.rate-pop {
  position: absolute; right: 18px; bottom: 74px; z-index: 9; width: 236px;
  background: rgba(22,22,18,.97); border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 14px; display: none;
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
}
.rate-pop.on { display: block; }
.rate-head {
  color: #fff; font-size: 12.5px; margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.rate-head b { color: var(--y); font-variant-numeric: tabular-nums; font-size: 13px; }
.rate-pop input[type=range] {
  width: 100%; accent-color: var(--y); cursor: pointer; margin: 2px 0 0;
}
.rate-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.rate-quick button {
  padding: 6px 0; border-radius: 6px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05); color: rgba(255,255,255,.8);
  font-size: 12px; cursor: pointer; font-variant-numeric: tabular-nums;
}
.rate-quick button:hover { background: rgba(255,255,255,.12); }
.rate-quick button.on {
  background: var(--y); color: #1a1a14; border-color: var(--y); font-weight: 700;
}
.rate-tip { color: rgba(255,255,255,.38); font-size: 11px; margin-top: 10px; }

/* 后台：浅色背景上的说明文字（.dl-note 是深色客户端里用的，白底会看不见） */
.tip { font-size: 12.5px; color: #5f5d54; line-height: 2; }

/* 没有分类时的上锁提示：必须显眼，不能让人点了上传才发现传错地方 */
.cat-gate {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 12px 14px;
  background: #FCF3DC; border: 1px solid #EFD9A6; border-radius: 10px;
  font-size: 13px; color: #7A5A10; line-height: 1.7;
}
.cat-gate b { color: #6A4B00; }
.cat-gate span { flex: 1; min-width: 200px; }
.cat-gate .btn { flex: none; }

/* ================= 后台：课件与分类 工作台 =================
   左边分类树，右边课件列表；上传从右侧抽屉分三步走。 */
.wb-layout {
  --tree-w: 340px;
  display: grid; grid-template-columns: minmax(280px, var(--tree-w)) minmax(0, 1fr);
  gap: 10px; align-items: stretch;
}
.wb-tree {
  position: sticky; top: 10px; margin-bottom: 0;
  height: calc(100vh - 92px); min-height: 520px;
  display: flex; flex-direction: column; overflow: visible;
}
.wb-tree .panel-head { padding: 11px 12px; flex: none; }
.wb-tree-head-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.wb-tree-head-actions .btn { padding: 3px 7px; }
.tree-selection {
  padding: 5px 8px 3px; color: var(--muted);
  font-size: 10.5px; line-height: 1.45; flex: none;
}
.tree-selection.on { color: #7a5a10; font-weight: 600; }
.wb-tree-body {
  padding: 5px 6px 8px; overflow: auto; flex: 1 1 auto;
  min-height: 0; max-height: none; overscroll-behavior: contain;
}
.tree-help {
  flex: none; border-top: 1px solid var(--line); padding: 7px 9px;
  color: var(--muted); font-size: 10.5px; line-height: 1.55;
}
.tree-help summary { cursor: pointer; font-weight: 700; color: var(--ink2); }
.tree-help p { margin: 6px 0 1px; }
.wb-tree-resizer {
  position: absolute; top: 0; right: -6px; bottom: 0; width: 10px;
  cursor: col-resize; z-index: 8; touch-action: none;
}
.wb-tree-resizer::after {
  content: ""; position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  width: 2px; height: 64px; border-radius: 2px; background: #D9D4C3;
}
.wb-tree-resizer:hover::after, body.tree-resizing .wb-tree-resizer::after { background: #9D8500; }
body.tree-resizing { cursor: col-resize; user-select: none; }
.wb-node {
  display: flex; align-items: center; gap: 4px;
  position: relative; min-height: 32px;
  padding: 5px 6px; border-radius: 7px; cursor: pointer;
  font-size: 12.5px; line-height: 1.35;
  flex-wrap: nowrap;
}
.wb-node:hover { background: var(--bg); }
.wb-node.active { background: var(--y); font-weight: 600; }
.wb-node.checked {
  background: #fff6b8;
  box-shadow: inset 3px 0 0 var(--y-dk);
}
.wb-node.drop-on {
  outline: 2px solid var(--y-dk); outline-offset: 1px;
  background: #fff6b8; transform: translateX(2px);
}
#catTree.move-target-mode {
  outline: 2px dashed #C2A900; outline-offset: -3px;
  background: #FFFEF4;
}
#catTree.move-target-mode .wb-node[data-drop-cat] {
  box-shadow: inset 0 0 0 1px rgba(174,146,0,.28);
}
#catTree.move-target-mode .wb-node[data-drop-cat]:hover {
  background: var(--y); box-shadow: inset 0 0 0 2px #A78B00;
}
.wb-check { display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer; }
.wb-check input { width: 14px; height: 14px; accent-color: var(--y-dk); cursor: pointer; }
.cat-drag-handle {
  display: inline-grid; place-items: center; flex: none;
  width: 17px; height: 24px; border-radius: 5px;
  color: #A09988; cursor: grab; user-select: none; touch-action: none;
}
.cat-drag-handle:hover { background: #EDE9DA; color: #5E584A; }
.cat-toggle {
  flex: none; width: 20px; height: 22px; padding: 0;
  border: 0; border-radius: 5px; background: transparent;
  color: #77620A; font: 800 13px/1 inherit; cursor: pointer;
}
.cat-toggle:hover { background: #F0EBCE; }
.cat-toggle:disabled { color: #C6C0AF; cursor: default; }
.wb-node .wb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-child-count {
  display: inline-block; margin-left: 5px; padding: 0 4px;
  border-radius: 4px; background: #F1EEE3; color: #8B8577;
  font-style: normal; font-size: 9px; font-weight: 600; vertical-align: middle;
}
.wb-node .wb-count { font-size: 11.5px; color: var(--muted); flex: none; font-variant-numeric: tabular-nums; }
.wb-node.active .wb-count { color: rgba(17,17,16,.6); }
.wb-node .wb-ops {
  display: none; gap: 2px; position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%); z-index: 6;
  justify-content: flex-end; flex-wrap: nowrap;
  padding: 3px; border: 1px solid var(--line); border-radius: 7px;
  background: rgba(255,255,255,.98); box-shadow: 0 4px 12px rgba(20,18,10,.12);
}
.wb-node:hover .wb-ops { display: flex; }
.wb-node:hover .wb-count { visibility: hidden; }
.wb-node .wb-ops .btn { padding: 1px 4px; font-size: 9.5px; white-space: nowrap; }
.wb-node.all.tree-root { font-weight: 700; margin-bottom: 3px; }
.wb-caret {
  display: inline-block; width: 14px; margin-right: 4px;
  font-style: normal; color: var(--muted);
}
.wb-children { position: relative; margin-left: 10px; padding-left: 7px; border-left: 1px solid #DDD9CC; }
.wb-children.root-children { margin: 0 0 0 8px; padding-left: 6px; }
.wb-branch { position: relative; }
.wb-branch > .wb-node::before {
  content: ""; position: absolute; left: -11px; top: 50%;
  width: 10px; height: 1px; background: #DDD9CC;
}
.wb-branch > .wb-children { margin-left: 8px; }
.wb-guide { width: 7px; height: 7px; border-radius: 50%; background: #C8C3B4; flex: none; }
.wb-node.active .wb-guide { background: #171711; }
.wb-branch .wb-name b { font-weight: inherit; }
.wb-branch .wb-node { padding-left: 5px; }
.wb-up-entries { display: flex; gap: 10px; flex-wrap: wrap; }

/* 文件夹拖放：上/下边缘排序，中间变成子级 */
.cat-drop-before { box-shadow: inset 0 3px 0 #B59A00 !important; }
.cat-drop-after { box-shadow: inset 0 -3px 0 #B59A00 !important; }
.cat-drop-inside {
  outline: 2px solid #B59A00 !important; outline-offset: -1px;
  background: #FFF7BF !important;
}
body.folder-dragging .cat-drag-handle { cursor: grabbing; }

/* 右侧课件区更紧凑，表格自身滚动，树保持固定高度。 */
.wb-main { min-width: 0; }
.wb-main > .panel { margin-bottom: 10px; }
#view-courses .panel-head { padding: 11px 14px; }
#view-courses .panel-body { padding: 12px 14px; }
#view-courses .filter-panel { padding: 0 12px 8px; }
#view-courses .chip-row { gap: 5px; margin: 8px 0 7px; }
#view-courses .chip { padding: 4px 10px; font-size: 11.5px; }
#view-courses .adv-grid { gap: 7px 9px; }
#view-courses .adv-grid.is-collapsed { display: none; }
#view-courses .adv-field .input { height: 29px; font-size: 12px; }
#view-courses .table-scroll {
  max-height: calc(100vh - 430px); min-height: 300px;
  overflow: auto; overscroll-behavior: contain;
}
#view-courses table { font-size: 12px; }
#view-courses th { position: sticky; top: 0; z-index: 3; padding: 8px 10px; white-space: nowrap; }
#view-courses td { padding: 7px 10px; }
#view-courses th:nth-child(3), #view-courses td:nth-child(3) { min-width: 112px; }
#view-courses th:nth-child(4), #view-courses td:nth-child(4) { min-width: 62px; }
#view-courses .bulk-bar, #view-courses .page-bar { padding: 8px 12px; }
#view-courses #selAllFiltered {
  border-color: #C8B33C; background: #FFF9CC;
  color: #5D4B00; font-weight: 800;
}
#view-courses tr.selected { background: #FFFBE1; box-shadow: inset 3px 0 0 var(--y-dk); }

/* 课件拖到左侧文件夹：只给拖动行和被指向文件夹高亮，避免整表闪动 */
.row-drag-handle {
  display: inline-grid; place-items: center;
  width: 20px; height: 22px; margin-right: 5px;
  border-radius: 5px; background: #F3F0E5; color: #8B8577;
  font-size: 15px; line-height: 1; cursor: grab;
  vertical-align: middle; user-select: none; touch-action: none;
}
.row-drag-handle:hover { background: var(--y); color: #1A1913; }
body.course-dragging .row-drag-handle { cursor: grabbing; }
#courseRows tr.dragging { opacity: .5; background: #fff6b8; }
body.course-dragging #catTree .wb-node[data-drop-cat] {
  box-shadow: inset 0 0 0 1px rgba(187,160,0,.25);
}

.nav-review-badge {
  display: inline-grid; place-items: center; min-width: 19px; height: 19px;
  margin-left: 5px; padding: 0 5px; border-radius: 99px;
  background: #D93A2B; color: #fff; font-style: normal;
  font-size: 10.5px; font-weight: 800; line-height: 1;
  box-shadow: 0 1px 4px rgba(217,58,43,.35);
}
.review-alert {
  display: flex; align-items: center; gap: 13px;
  margin: 0 0 18px; padding: 13px 16px;
  border: 1px solid #F0B5AA; border-radius: 12px;
  background: linear-gradient(90deg, #FFF1ED, #FFF9F7);
  box-shadow: 0 5px 18px rgba(167,48,31,.08);
}
.review-alert-icon {
  display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  background: #D93A2B; color: #fff; font-weight: 900; font-size: 18px;
}
.review-alert > div { flex: 1; min-width: 0; }
.review-alert b { display: block; color: #8E241A; font-size: 14px; }
.review-alert em { font-style: normal; font-size: 18px; }
.review-alert p { margin: 2px 0 0; color: #80564D; font-size: 11.5px; }
.review-alert button {
  flex: none; height: 34px; padding: 0 15px; border: 0; border-radius: 9px;
  background: #D93A2B; color: #fff; font-size: 12.5px; font-weight: 800; cursor: pointer;
}
.review-alert button:hover { background: #C92F21; }

/* 重名 / 相似 / 疑似同文件检查：只提示，不自动删除 */
.dup-alert {
  display: flex; align-items: center; gap: 13px;
  margin: 0 0 16px; padding: 13px 16px;
  border: 1px solid #E1C96E; border-radius: 12px;
  background: linear-gradient(90deg, #FFF9D9, #FFFDF4);
  box-shadow: 0 5px 18px rgba(121,93,0,.07);
}
.dup-alert-icon {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--y); color: #171711; font-size: 22px; font-weight: 900;
}
.dup-alert > div { flex: 1; min-width: 0; }
.dup-alert b { display: block; color: #5C4800; font-size: 14px; }
.dup-alert p { margin: 3px 0 0; color: #7A692E; font-size: 11.5px; line-height: 1.6; }
.dup-alert button {
  flex: none; height: 34px; padding: 0 15px; border: 0; border-radius: 9px;
  background: #2C2A22; color: #fff; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.dup-alert button:hover { background: #000; }
.dup-inline {
  display: inline-flex; align-items: center; margin-left: 7px;
  padding: 1px 7px; border-radius: 5px; cursor: pointer;
  border: 1px solid #E0C64E; background: #FFF8C8;
  color: #806500; font: 700 10.5px/1.7 inherit; vertical-align: middle;
}
.dup-inline:hover { border-color: #A88900; }

.dup-review-intro {
  padding: 11px 13px; margin-bottom: 14px; border-radius: 9px;
  background: #FFF9DC; border: 1px solid #E8D47A;
  color: #685716; font-size: 12.5px; line-height: 1.75;
}
.dup-group {
  margin-top: 13px; border: 1px solid var(--line); border-radius: 11px;
  overflow: hidden; background: #fff;
}
.dup-group-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; background: #FBFAF5; border-bottom: 1px solid var(--line);
}
.dup-kind {
  padding: 2px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 800;
  background: #EEE9D9; color: #625B47;
}
.dup-kind.samefile { background: #E7F5EC; color: #1D7242; }
.dup-kind.exact { background: #FFF0BF; color: #7D5D00; }
.dup-group-head b { font-size: 13px; }
.dup-group-head span { font-size: 11.5px; color: var(--muted); }
.dup-course-row {
  display: grid; grid-template-columns: minmax(0,1fr) auto;
  gap: 9px; align-items: center; padding: 10px 12px;
  border-bottom: 1px solid #F0EDE2;
}
.dup-course-row.removing {
  opacity: .45;
  pointer-events: none;
  background: #FFF0ED;
}
.dup-course-row:last-child { border-bottom: 0; }
.dup-course-row.kept { background: #F2FAF4; box-shadow: inset 3px 0 0 #2E8B57; }
.dup-course-main { min-width: 0; }
.dup-course-main b {
  display: block; font-size: 13px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.dup-course-main span { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.dup-preview {
  border: 1px solid var(--line); background: #fff; border-radius: 7px;
  padding: 4px 8px; color: var(--ink2); font: 600 11px/1.5 inherit; cursor: pointer;
}
.dup-preview:hover { border-color: var(--ink); }
.dup-row-actions { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.dup-keep {
  border: 1px solid #A8CDB6; background: #F8FCF9; border-radius: 7px;
  padding: 4px 9px; color: #246B43; font: 700 11px/1.5 inherit; cursor: pointer;
}
.dup-keep:hover { border-color: #2E8B57; background: #EEF8F1; }
.dup-keep.on { background: #2E8B57; border-color: #2E8B57; color: #fff; }
.dup-delete {
  border: 1px solid #E7B3AA; background: #FFF7F5; border-radius: 7px;
  padding: 4px 8px; color: #A33426; font: 700 11px/1.5 inherit; cursor: pointer;
}
.dup-delete:hover { background: #FDECE9; border-color: #C75D4D; }
.dup-delete:disabled { opacity: .35; cursor: not-allowed; }
.dup-review-actions {
  display: flex; gap: 9px; flex-wrap: wrap; align-items: center;
  position: sticky; bottom: -18px; margin: 16px -18px -18px;
  padding: 12px 18px; background: rgba(255,255,255,.97);
  border-top: 1px solid var(--line); z-index: 2;
}
.dup-review-actions .hint { flex: 1 1 220px; }

/* 上传抽屉：右侧滑出，分三步 */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(20,20,16,.42);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 260;
}
.drawer-mask.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: -480px; width: min(460px, 94vw); height: 100vh;
  background: #fff; z-index: 261; box-shadow: -12px 0 40px rgba(0,0,0,.18);
  transition: right .22s ease; display: flex; flex-direction: column;
}
.drawer.open { right: 0; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-size: 16px; font-weight: 700; }
.drawer-steps { display: flex; gap: 6px; padding: 12px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.upstep { font-size: 12.5px; color: var(--muted); padding: 4px 10px; border-radius: 99px; background: var(--bg); }
.upstep.on { color: var(--ink2); background: #F5EFCE; }
.upstep.cur { background: var(--y); color: var(--ink); font-weight: 700; }
.drawer-body { padding: 18px 20px; overflow: auto; flex: 1; }

@media (max-width: 860px) {
  .wb-layout { grid-template-columns: minmax(0, 1fr); }
  .wb-tree { position: static; height: auto; min-height: 0; max-height: 420px; }
  .wb-tree-body { max-height: 300px; }
  .wb-tree-resizer { display: none; }
  #view-courses .table-scroll { max-height: none; min-height: 0; }
}

@media (max-width: 720px) {
  .sheet-tools { bottom: 12px; gap: 2px; padding: 5px 7px; border-radius: 10px; }
  .sbtn { min-width: 28px; height: 28px; font-size: 14px; padding: 0 6px; }
  /* 手机宽度紧：复位缩成图标、保存缩成两三个字，一行放得下 */
  .sbtn.sfit { font-size: 13px; padding: 0 7px; }
  #sheetSave { white-space: nowrap; font-size: 11px; padding: 0 9px; background: #F2C230; color: #171512; font-weight: 600; }
  .spage, .spct { font-size: 11px; padding: 0 4px; }
  .ssep { margin: 0 3px; height: 16px; }
  .mode-switch { left: 10px; top: 10px; }
  .mode-switch button { padding: 5px 11px; font-size: 12px; }
  .rate-pop { right: 10px; left: 10px; width: auto; bottom: 66px; }
}

/* 窄屏看谱子时，舞台要占大一点——16:9 的框塞一张 A4 谱子实在太小 */
@media (max-width: 900px) {
  .pl-stage.is-sheet { aspect-ratio: auto; min-height: 58vh; }
}
@media (max-width: 900px) and (orientation: landscape) {
  .pl-stage.is-sheet { min-height: auto; height: 100%; }
}

/* ================= 批量导入：分类预览 ================= */
.imp-cat-preview { margin-top: 12px; }
.icp-head { font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }
.icp-head b { color: var(--ink); }
.icp-list { display: flex; flex-wrap: wrap; gap: 6px; }
.icp-item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--white); font-size: 12.5px; color: var(--ink2); line-height: 1.6;
}
.icp-item em { font-style: normal; color: var(--muted); font-size: 11.5px; }
.icp-new {
  font-style: normal; font-size: 10.5px; font-weight: 700;
  background: var(--y); color: var(--ink); border-radius: 5px; padding: 0 5px;
}
.imp-cat { font-style: normal; color: #A67C00; }

/* ================= 校区分类授权 ================= */
.grant-box {
  max-height: 46vh; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 10px; padding: 6px 4px;
  background: var(--white);
}
.grant-row {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 7px; cursor: pointer;
  font-size: 13.5px; color: var(--ink2); line-height: 1.6;
}
.grant-row:hover { background: #FBF7E4; }
.grant-row.has-kids { font-weight: 600; color: var(--ink); }
.grant-row.sub { padding-left: 30px; font-size: 13px; color: #6B685E; }
.grant-row input[type="checkbox"] {
  width: 15px; height: 15px; accent-color: #E8B800; cursor: pointer; flex: 0 0 auto;
}
.grant-row .gname { flex: 1; }
.grant-row em { font-style: normal; font-size: 12px; color: var(--muted); }

.dl-policy-master, .dl-policy-kind {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: #FBFAF6;
}
.dl-policy-master input, .dl-policy-kind input { margin-top: 3px; accent-color: #D8A900; }
.dl-policy-master span, .dl-policy-kind span { display: flex; flex-direction: column; gap: 3px; }
.dl-policy-master b, .dl-policy-kind b { font-size: 13px; color: #292820; }
.dl-policy-master small, .dl-policy-kind small { color: #8C8A80; font-size: 11.5px; line-height: 1.45; }
.dl-policy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.dl-user-quotas {
  display: flex; flex-direction: column; gap: 7px;
  max-height: 260px; overflow-y: auto;
  padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
}
.dl-user-quota {
  display: grid; grid-template-columns: minmax(120px, 1fr) minmax(180px, 1.4fr) auto;
  align-items: center; gap: 10px; padding: 7px 9px;
  border-radius: 8px; background: #fff; border: 1px solid #ECE8DC;
}
.dl-user-quota > span { min-width: 0; }
.dl-user-quota b, .dl-user-quota small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-user-quota b { font-size: 12.5px; }
.dl-user-quota small { margin-top: 2px; font-size: 10.5px; color: var(--muted); }
.dl-user-quota label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.dl-user-quota label .input { min-width: 0; padding: 6px 8px; }
.dl-user-quota em { font-style: normal; color: #6F5800; font-size: 11px; white-space: nowrap; }
.dl-user-quota.quota-over {
  border-color: #d89a8d;
  background: #fff7f4;
}
.dl-user-quota.quota-over em { color: #a43d2d; font-weight: 700; }
.dl-quota-warning {
  margin: 9px 0 0;
  padding: 9px 11px;
  border: 1px solid #e2b0a5;
  border-radius: 8px;
  background: #fff5f2;
  color: #983626;
  font-size: 11.5px;
  line-height: 1.6;
}
@media (max-width: 620px) {
  .dl-user-quota { grid-template-columns: 1fr; gap: 5px; }
}
@media (max-width: 620px) { .dl-policy-grid { grid-template-columns: 1fr; } }

/* ================= 后台：下载策略开关 ================= */
/* 下载策略：视频 / 谱子 两个开关并排 */
.dl-split { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .sw-slot {
  position: relative; width: 46px; height: 26px; border-radius: 999px;
  background: #D8D4C6; transition: .2s; flex-shrink: 0;
}
.switch .sw-slot::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.22);
  transition: .2s;
}
.switch input:checked + .sw-slot { background: var(--y-dk); }
.switch input:checked + .sw-slot::after { transform: translateX(20px); }
.switch input:focus-visible + .sw-slot { box-shadow: 0 0 0 3px rgba(253,238,1,.5); }
.switch input:disabled + .sw-slot { opacity: .5; cursor: not-allowed; }
.switch b { font-size: 13px; font-weight: 700; }
.switch b.on { color: #6E5E00; }
.switch b.off { color: #B03A2E; }

/* 课件列表里的单课下载标记 */
.dl-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 62px; padding: 5px 10px; border-radius: 7px;
  border: 1px solid var(--line); background: #fff; color: #8C8A80;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: .16s;
}
.dl-chip.on { border-color: #C9C200; background: #FDF9D2; color: #6E5E00; }
.dl-chip:hover:not(:disabled) { border-color: var(--ink); }
/* 总开关关闭时按钮置灰：连黄色底都要去掉，否则看着还像"开着" */
.dl-chip:disabled {
  opacity: 1; cursor: not-allowed;
  background: #F7F6F1; border-color: #E6E2D5; color: #B6B3A8;
}

/* 每个课件一组的「按格式下载」小开关：MP4 / MP3 / JPG×5 / PDF */
.dl-mini-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
/* 默认是「灰＝不许下载」，点亮才是黄底允许下载。
   颜色差别要够大，扫一眼就知道哪几个开了——这是总部天天要看的表。 */
.dl-mini {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 25px; flex: 0 0 42px; padding: 0 4px;
  border-radius: 6px; border: 1px solid #E3DFD2;
  background: #F2F0E9; color: #A8A498; font-size: 11px; font-weight: 700;
  cursor: pointer; transition: .16s; font-family: inherit; line-height: 1.25;
  letter-spacing: .3px;
}
.dl-mini.on {
  border-color: #C9C200; background: #FDF3B0; color: #5E4E00;
  box-shadow: 0 0 0 2px rgba(253, 238, 1, .2);
}
.dl-mini.on::before { content: "✓"; margin-right: 3px; font-size: 10px; }
.dl-mini:hover:not(:disabled) { border-color: var(--ink); }
.dl-mini:disabled { opacity: .55; cursor: default; }
.dl-mini-empty {
  border-style: dashed; background: #F8F7F2; color: #C8C3B7;
  font-weight: 500; cursor: default;
}
.dl-quota { font-size: 11.5px; color: #8C8A80; margin-top: 6px; }

/* 必填但还没选的下拉：红边框 + 淡红底，比一行灰字更难忽略 */
.input.need, select.input.need {
  border-color: #D9563C !important;
  background: #FDF3F0 !important;
  box-shadow: 0 0 0 3px rgba(217, 86, 60, .12);
}

.mini-tag {
  display: inline-block; padding: 1px 6px; border-radius: 5px;
  background: #F2F0E8; color: #8C8A80; font-size: 11px; font-style: normal;
  font-weight: 600; vertical-align: 1px;
}

/* 客户端：纯谱子课件的标签 */
.tag-sheet { background: #EAF1E4; color: #4A6B3A; }
.card-cover.sheet-only .dur { background: rgba(74,107,58,.86); }

/* ================= 课件库：卡片 / 列表 两种查看方式 ================= */
.view-switch {
  display: inline-flex; gap: 2px; padding: 3px;
  background: #F2F0E8; border: 1px solid var(--line); border-radius: 9px;
}
.view-switch button {
  border: 0; background: transparent; padding: 6px 14px; border-radius: 7px;
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; transition: .15s;
}
.view-switch button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.10); }
.view-switch button:hover:not(.on) { color: var(--ink2); }

.grid.is-list {
  display: block; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden;
}
.clist-row {
  display: grid; grid-template-columns: 104px minmax(0, 1fr) auto auto 16px;
  align-items: center; gap: 14px; padding: 10px 16px;
  border-bottom: 1px solid #F0EEE6; cursor: pointer; transition: background .14s;
}
.clist-row:last-child { border-bottom: 0; }
.clist-row:hover { background: #FBFAF4; }
.clist-thumb {
  width: 104px; height: 62px; border-radius: 8px; overflow: hidden;
  background: linear-gradient(135deg, #1A1A18, #2E2E2A);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.clist-thumb img { width: 100%; height: 100%; object-fit: cover; }
.clist-thumb .ph {
  width: 100%; height: 100%; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  color: var(--y); font-size: 9.5px; line-height: 1.3; font-weight: 700;
  text-align: center; padding: 4px; overflow-wrap: anywhere; word-break: break-word;
}
.clist-thumb.sheet-only { background: #F4F6F0; border: 1px solid #E4E8DC; }
.clist-thumb.sheet-only .ph { color: #4A6B3A; }
.clist-main { min-width: 0; }
.clist-title {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.clist-sub {
  font-size: 12px; color: var(--muted); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.clist-meta {
  display: flex; gap: 10px; font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.clist-tags {
  display: grid; grid-template-columns: 202px 44px;
  align-items: center; gap: 5px; min-width: 0;
}
.clist-status {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; min-height: 24px; border-radius: 6px;
  background: #F2F0E8; color: var(--ink2); font-size: 10.5px; font-style: normal; font-weight: 600;
}
.clist-status.is-empty { visibility: hidden; }
.clist-go { color: #C9C6B8; font-size: 18px; text-align: center; }
.clist-row:hover .clist-go { color: var(--ink); }

@media (max-width: 720px) {
  .clist-row { grid-template-columns: 76px minmax(0, 1fr) 14px; gap: 10px; padding: 9px 12px; }
  .clist-thumb { width: 76px; height: 48px; }
  .clist-meta { display: none; }
  /* 手机上格式徽标不藏掉（两种视图要一致），换行放到标题下面，不横向溢出 */
  .clist-tags { grid-column: 2; display: flex; flex-wrap: wrap; }
  .view-switch button { padding: 6px 11px; }
}

/* ================= 后台：批量删除 ================= */
.batch-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rowchk { width: 16px; height: 16px; accent-color: #C9C200; cursor: pointer; vertical-align: middle; }
.btn-danger { background: #c0392b !important; border-color: #c0392b !important; color: #fff !important; }
.btn-danger:hover { filter: brightness(1.07); }
.btn-danger:disabled { opacity: .45; filter: none; }
.del-list {
  margin-top: 10px; max-height: 210px; overflow: auto;
  background: #FAF8F0; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: 13px; line-height: 1.85; color: #4A4A44;
}

/* ================= 后台：校区管理 ================= */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 720px) {
  .grid2, .grid3 { grid-template-columns: 1fr; gap: 0; }
}

.nowrap { white-space: nowrap; }
.sub-line { font-size: 12px; color: var(--muted); margin-top: 3px; }
.row-off td { opacity: .6; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.tag-warn { background: #FBF0D8; color: #8A6300; }

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

.user-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line);
}
.user-head b { font-size: 14px; }
.user-head .hint { margin-left: 10px; }
.user-table { margin-bottom: 4px; }
.user-table td { padding: 10px 12px; }
.user-table th { padding: 9px 12px; }

/* 手机上客户端本来就是上下排列，唱片要缩一档，别把画面挤没 */
@media (max-width: 720px) {
  .pl-stage.is-audio .audio-face { flex-direction: column; gap: 14px; }
  .af-meta { align-items: center; text-align: center; }
  .af-meta b { font-size: 15px; max-width: 80vw; }
  .af-meta span { font-size: 12px; }
}


/* ===== 访问地址（概览页）=====
   一行一个地址，左边标签、中间地址、右边复制。
   外网那几行给个底色，扫一眼就知道该给外面的人哪一个。 */
.net-list { display: flex; flex-direction: column; gap: 6px; }
.net-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 1px solid #E9E5D8; border-radius: 8px;
  background: #FBF9F2; font-size: 12.5px;
}
.net-row i {
  flex-shrink: 0; width: 46px; font-style: normal; font-weight: 700;
  font-size: 11px; color: #6B6656; letter-spacing: .5px;
}
.net-row code {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px;
  color: #2C2A24; word-break: break-all;
}
.net-row span { flex: 1; color: #8C8A80; font-size: 11.5px; }
.net-row button { flex-shrink: 0; }
.net-row.wan { background: #FFFCE3; border-color: #EDE48A; }
.net-row.wan i { color: #7A6A00; }
.net-row.off { opacity: .7; }
.net-row.off code { color: #B3AFA3; }

/* ================= 节拍器 · 节奏训练台 =================
   深色舞台 + 芒果黄/橙高光，圆形脉冲与强拍动效；
   仅在客户端 client.html 使用，独立面板不影响课件播放。 */
.metro-entry { color: var(--ink); font-weight: 600; }
.metro-entry:hover { border-color: var(--ink); background: #FFFDE8; }

.metro-mask {
  position: fixed; inset: 0; z-index: 220;
  display: none; align-items: center; justify-content: center;
  padding: 18px;
  background: rgba(12, 12, 11, .62);
}
.metro-mask.open { display: flex; }

.metro-panel {
  width: min(880px, 100%); max-height: calc(100vh - 36px);
  display: flex; flex-direction: column;
  overflow: hidden; color: #fff;
  background: #1F2023;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(10, 10, 8, .45);
}

.metro-top {
  display: flex; align-items: center; gap: 14px; flex: none;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.metro-title { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.metro-icon {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  color: var(--ink); background: var(--y); border-radius: 10px;
}
.metro-icon svg { width: 20px; height: 20px; }
.metro-title h3 { margin: 0; font-size: 15px; }
.metro-title p { margin: 2px 0 0; font-size: 11.5px; color: #8A8D93; }

.metro-status {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 6px 11px; font-size: 12px; font-weight: 700;
  color: #8A8D93; background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 99px;
}
.metro-status i { width: 7px; height: 7px; border-radius: 50%; background: #5B5E64; }
.metro-status.on { color: var(--y); background: rgba(253, 238, 1, .09); border-color: rgba(253, 238, 1, .35); }
.metro-status.on i { background: var(--y); animation: metroBlink 1s infinite; }
@keyframes metroBlink { 50% { opacity: .25; } }

.metro-x {
  flex: none; width: 30px; height: 30px; border: 0; border-radius: 8px;
  background: transparent; color: #9A9DA3; font-size: 15px; cursor: pointer;
}
.metro-x:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.metro-min { font-size: 19px; line-height: 1; padding-bottom: 5px; }

.metro-mini {
  position: fixed; right: 24px; bottom: 24px; z-index: 240;
  display: none; align-items: stretch; overflow: hidden;
  color: #fff; background: #1F2023; border: 1px solid rgba(253,238,1,.45);
  border-radius: 14px; box-shadow: 0 12px 36px rgba(0,0,0,.38);
}
.metro-mini.on { display: flex; }
.mm-main {
  display: flex; align-items: center; gap: 9px; min-width: 142px;
  padding: 11px 14px; border: 0; background: transparent; color: #fff; cursor: pointer;
}
.mm-main i { width: 8px; height: 8px; border-radius: 50%; background: var(--y); animation: metroBlink 1s infinite; }
.metro-mini.stopped .mm-main i { background: #777B83; animation: none; }
.mm-main b { color: var(--y); font-size: 20px; font-variant-numeric: tabular-nums; }
.mm-main span { color: #C9CBD1; font-size: 11px; font-weight: 700; white-space: nowrap; }
.mm-close {
  width: 38px; border: 0; border-left: 1px solid rgba(255,255,255,.1);
  background: transparent; color: #A7AAB0; font-size: 13px; cursor: pointer;
}
.mm-close:hover { background: rgba(255,255,255,.08); color: #fff; }

.metro-body {
  display: grid; grid-template-columns: 360px minmax(0, 1fr);
  flex: 1; min-height: 0; overflow: hidden;
}

/* ---- 左侧控制区 ----
   统一按钮体系：高对比大按钮 —— 最小高度 36px、12.5~13px 粗体，
   未选中 = 深灰底 + 清晰边框；选中 = 芒果黄底黑字；hover/focus 明显。
   控制区自身可滚动，「开始训练」sticky 在底部，滚动时始终可见。 */
.metro-side {
  display: flex; flex-direction: column;
  padding: 16px 18px 14px; background: #25272B; border-right: 1px solid rgba(255, 255, 255, .07);
  overflow-y: auto; min-height: 0;
}

.metro-tempo {
  padding: 14px; margin: 0 0 12px;
  background: #202226; border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px;
}
.metro-tempo-num { display: flex; align-items: baseline; gap: 6px; }
.metro-tempo-num b {
  font-size: 44px; line-height: 1; letter-spacing: -.03em;
  color: var(--y); font-variant-numeric: tabular-nums;
}
.metro-tempo-num small { color: #8A8D93; font-size: 12px; font-weight: 700; letter-spacing: .08em; }

.metro-tempo-btns { display: flex; gap: 8px; margin: 10px 0 8px; }
.mbtn {
  flex: 1; min-height: 36px; padding: 0; border: 1px solid rgba(255, 255, 255, .24); border-radius: 9px;
  background: #2C2E33; color: #E4E5E9; font-size: 13px; font-weight: 800; cursor: pointer;
  transition: .12s;
}
.mbtn:hover { border-color: var(--y); color: var(--y); background: #33353B; }
.mbtn:active { transform: translateY(1px); }

.metro-panel input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; margin: 6px 0 2px;
  border-radius: 10px; outline: none;
  background: linear-gradient(90deg, #FF5F3D 0 45%, #45474D 45% 100%);
  cursor: pointer;
}
.metro-panel #metroBpm {
  background: linear-gradient(90deg, var(--y) 0 var(--bpm-pct, 26%), #45474D var(--bpm-pct, 26%) 100%);
}
.metro-panel input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 4px solid #FF5F3D;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.metro-panel input[type="range"]::-moz-range-thumb {
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 4px solid #FF5F3D;
}

.metro-presets { display: flex; gap: 8px; margin: 10px 0 2px; }
.metro-presets button {
  flex: 1; min-height: 36px; padding: 0; border: 1px solid rgba(255, 255, 255, .24); border-radius: 9px;
  background: #2C2E33; color: #E4E5E9; font-size: 13px; font-weight: 800; cursor: pointer;
  font-variant-numeric: tabular-nums; transition: .12s;
}
.metro-presets button:hover { color: #fff; border-color: rgba(255, 255, 255, .55); background: #33353B; }
.metro-presets button.on { color: var(--ink); background: var(--y); border-color: var(--y); }
.metro-presets button.on:hover { background: #FFF85C; border-color: var(--y); }
.metro-presets button.tap { color: #fff; background: #FF5F3D; border-color: #FF5F3D; }
.metro-presets button.tap:hover { background: #FF7452; border-color: #FF7452; }

/* 设置组卡片：清楚的标题 + 简短说明 */
.metro-ctl {
  margin-top: 12px; padding: 12px 14px;
  background: #202226; border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px;
}
.metro-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 14px 0; margin-top: 12px; }
.metro-voice-vol-label { display: flex; justify-content: space-between; margin-top: 7px; }
.metro-row2 > div {
  padding: 12px; background: #202226;
  border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px;
}
.metro-lab { display: block; margin-bottom: 8px; color: #C9CBD1; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; }
.metro-lab small { margin-left: 5px; color: #84878D; font-size: 11px; font-weight: 500; letter-spacing: 0; }

.metro-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 7px; }
.metro-seg button {
  min-height: 36px; padding: 4px 2px; border: 1px solid rgba(255, 255, 255, .24); border-radius: 9px;
  background: #2C2E33; color: #C9CBD1; font-size: 12.5px; font-weight: 800; cursor: pointer;
  white-space: nowrap; transition: .12s;
}
.metro-seg button:hover { color: #fff; border-color: rgba(255, 255, 255, .55); background: #33353B; }
.metro-seg button.on { color: var(--ink); background: var(--y); border-color: var(--y); }
.metro-seg button.on:hover { background: #FFF85C; border-color: var(--y); color: var(--ink); }
.metro-timbres { grid-template-columns: repeat(4, 1fr); grid-auto-flow: row; }
.mbtn:focus-visible, .metro-presets button:focus-visible, .metro-seg button:focus-visible {
  outline: 2px solid var(--y); outline-offset: 2px;
}

.metro-switch {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  padding: 8px 0 0; user-select: none;
}
.metro-switch input { position: absolute; opacity: 0; pointer-events: none; }
.metro-switch i {
  position: relative; width: 40px; height: 22px; flex: none;
  background: #45474D; border-radius: 99px; transition: .16s;
}
.metro-switch i::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .16s;
}
.metro-switch input:checked + i { background: #2FAE5F; }
.metro-switch input:checked + i::after { left: 21px; }
.metro-switch span { font-size: 13px; font-weight: 700; color: #E4E5E9; }

.metro-voice-note { margin: 6px 0 0; min-height: 13px; color: #FFB199; font-size: 11px; line-height: 1.5; }

.metro-start {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; min-height: 46px; padding: 10px 0;
  position: sticky; bottom: 0; z-index: 3;
  margin-top: 14px;
  border: 0; border-radius: 12px; cursor: pointer;
  background: var(--y); color: var(--ink);
  font-size: 15px; font-weight: 800; letter-spacing: .04em;
  transition: .15s;
  box-shadow: 0 -14px 16px -8px #25272B;   /* 控件从按钮下滚过时柔和遮蔽 */
}
.metro-start svg { width: 18px; height: 18px; flex: none; }
.metro-start:hover { background: #FFF85C; }
.metro-start[aria-pressed="true"] { background: #FF5F3D; color: #fff; }
.metro-start[aria-pressed="true"]:hover { background: #FF7452; }
.metro-start:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.metro-tip { margin: 10px 0 0; color: #6E7076; font-size: 11px; line-height: 1.7; }

/* ---- 右侧舞台 ---- */
.metro-stage {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 26px 24px; min-height: 0; overflow-y: auto;
  background:
    radial-gradient(ellipse 80% 60% at 50% 34%, rgba(253, 238, 1, .05), transparent 70%),
    #191A1D;
}
.metro-ring-wrap { display: grid; place-items: center; }

.metro-ring {
  display: grid; place-items: center;
  width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #26282C, #1B1C1F 72%);
  border: 3px solid rgba(255, 255, 255, .09);
  transition: box-shadow .08s, border-color .08s, transform .06s;
}
.metro-ring.pulse {
  border-color: rgba(255, 149, 61, .75);
  box-shadow: 0 0 34px rgba(255, 95, 61, .3), inset 0 0 26px rgba(255, 95, 61, .16);
  transform: scale(1.035);
}
.metro-ring.pulse-acc {
  border-color: var(--y);
  box-shadow: 0 0 52px rgba(253, 238, 1, .42), inset 0 0 34px rgba(253, 238, 1, .22);
  transform: scale(1.07);
}
.metro-ring.count-in { border-style: dashed; }

.metro-ring-core { text-align: center; pointer-events: none; }
.metro-ring-core b { display: block; font-size: 52px; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.metro-ring.pulse-acc .metro-ring-core b { color: var(--y); }
.metro-ring-core span { display: block; margin-top: 6px; color: #84878D; font-size: 12px; }

.metro-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 100%; }
.mdot {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 58px; padding: 9px 0 7px;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px;
  background: #24262A; color: #B9BBC1; cursor: pointer;
  transition: .14s;
}
.mdot b { font-size: 17px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mdot span { font-size: 10px; color: #77797F; }
.mdot:hover { border-color: rgba(255, 255, 255, .32); }
.mdot.is-acc { color: var(--y); border-color: rgba(253, 238, 1, .5); background: rgba(253, 238, 1, .07); }
.mdot.is-acc span { color: var(--y); }
.mdot.is-mute { color: #63656B; border-color: rgba(255, 255, 255, .06); background: transparent; }
.mdot.is-mute span { color: #54565C; }
.mdot.cur {
  transform: translateY(-4px) scale(1.06);
  border-color: #FF5F3D;
  box-shadow: 0 6px 18px rgba(255, 95, 61, .3);
}
.mdot.cur.is-acc { border-color: var(--y); box-shadow: 0 6px 22px rgba(253, 238, 1, .4); }
.mdot.cur.is-mute { border-color: #4A4C52; box-shadow: none; }

.metro-subrow { display: flex; gap: 7px; height: 12px; }
.metro-subrow i {
  width: 12px; height: 12px; border-radius: 50%;
  background: #3B3D43; transition: .1s;
}
.metro-subrow i.cur { background: #FF5F3D; box-shadow: 0 0 10px rgba(255, 95, 61, .5); }

.metro-barinfo { display: flex; gap: 14px; color: #77797F; font-size: 12.5px; }
.metro-barinfo #metroPhase { color: #FF8A67; font-weight: 700; }

/* ---- 响应式：390px 可用 ---- */
@media (max-width: 760px) {
  .metro-mask { padding: 8px; }
  .metro-panel { max-height: calc(100vh - 16px); border-radius: 14px; }
  .metro-body { grid-template-columns: 1fr; overflow-y: auto; }
  .metro-side { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .07); overflow: visible; }
  .metro-ctl, .metro-row2 > div { padding: 10px; }
  .metro-tempo { padding: 12px; }
  .metro-stage { min-height: 300px; padding: 18px 12px; }
  .metro-ring { width: 150px; height: 150px; }
  .metro-ring-core b { font-size: 40px; }
  .metro-tempo-num b { font-size: 38px; }
  .mdot { width: 50px; }
  .metro-timbres { grid-template-columns: repeat(2, 1fr); }
  .metro-top { padding: 12px 14px; }
  .metro-title p { display: none; }
}

/* 390px 等窄屏：顶栏按钮太多会撑出去，允许 user-chip 换行收窄 */
@media (max-width: 420px) {
  .user-chip { flex-wrap: wrap; justify-content: flex-end; max-width: calc(100vw - 120px); }
  .user-chip .btn { padding: 7px 9px; font-size: 12px; }
}

/* ================= 3.1 交互修正 ================= */
.recent-accounts {
  display: none; align-items: center; flex-wrap: wrap; gap: 7px;
  margin-top: 9px; color: #8c8a80; font-size: 11.5px;
}
.recent-accounts > span { flex: none; }
.recent-accounts button {
  border: 1px solid #e1ded3; background: #fff; color: #4b4941;
  border-radius: 999px; padding: 4px 10px; cursor: pointer; font-family: inherit;
}
.recent-accounts button:hover { border-color: var(--y-dk); background: #fffbe7; color: #201f1a; }

/* 客户端顶栏统一为深色玻璃按钮，避免白底黄字和暗背景混在一起。 */
.pl-action {
  height: 34px; padding: 0 13px; border-radius: 9px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.88);
  font: 600 12.5px/1 inherit; cursor: pointer; white-space: nowrap;
}
.pl-action:hover { border-color: rgba(253,238,1,.58); color: var(--y); background: rgba(253,238,1,.07); }
.pl-action.on { border-color: var(--y); background: var(--y); color: #171711; }
.pl-top .metro-entry { color: rgba(255,255,255,.88); border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.07); }

/* 纸谱工具栏改成左侧竖排，不再压住图片最下方的音符。 */
.sheet-tools {
  left: 14px; right: auto; top: 50%; bottom: auto;
  transform: translateY(-50%);
  flex-direction: column; gap: 4px; padding: 7px 5px; border-radius: 13px;
}
.sheet-tools .ssep { width: 22px; height: 1px; margin: 3px 0; }
.sheet-tools .sbtn { width: 36px; min-width: 36px; height: 32px; padding: 0 4px; }
.sheet-tools .sfit { writing-mode: vertical-rl; letter-spacing: 2px; height: 45px; padding: 5px 0; }
.sheet-tools .spage, .sheet-tools .spct { padding: 2px 0; font-size: 10.5px; }

body.seeking-media { cursor: pointer; user-select: none; }
body.seeking-media .progress .bar::after { transform: scale(1.35); }

/* 右侧谱子/文件栏彻底收起；边缘保留一个可发现的展开把手。 */
.player-mask.side-collapsed .pl-body { grid-template-columns: 1fr; }
.player-mask.side-collapsed .pl-side { display: none; }
.side-restore {
  display: none; position: absolute; right: 0; top: 50%; z-index: 22;
  width: 22px; height: 56px; transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,.16); border-right: 0;
  border-radius: 9px 0 0 9px; background: rgba(20,20,18,.9); color: var(--y);
  font-size: 18px; cursor: pointer;
}
.player-mask.side-collapsed .pl-stage::after {
  content: ""; position: absolute; right: 0; top: 50%; width: 22px; height: 56px;
  transform: translateY(-50%);
  border-radius: 9px 0 0 9px; background: rgba(20,20,18,.92);
  border: 1px solid rgba(255,255,255,.16); border-right: 0; z-index: 21;
}
.player-mask.side-collapsed .side-restore {
  display: block; right: 0;
}

/* 自动识速 / 辅助唱拍 */
.practice-pop {
  position: absolute; right: 18px; top: 14px; z-index: 12; width: 300px;
  padding: 14px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(22,22,18,.97);
  box-shadow: 0 18px 48px rgba(0,0,0,.62); color: #fff; display: none;
}
.practice-pop.on { display: block; }
.practice-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.practice-head b { display: block; font-size: 14px; }
.practice-head span { display: block; margin-top: 3px; color: rgba(255,255,255,.45); font-size: 11px; }
.practice-head button { border: 0; background: transparent; color: rgba(255,255,255,.5); cursor: pointer; }
.tempo-readout {
  display: flex; align-items: center; gap: 14px; margin: 13px 0;
  padding: 12px; border-radius: 11px; background: rgba(253,238,1,.07);
  border: 1px solid rgba(253,238,1,.18);
}
.tempo-readout > div { text-align: center; min-width: 64px; }
.tempo-readout b { display: block; color: var(--y); font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.tempo-readout span { color: rgba(255,255,255,.45); font-size: 10px; }
.tempo-readout p { flex: 1; margin: 0; color: rgba(255,255,255,.62); font-size: 11.5px; line-height: 1.55; }
.practice-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.practice-row .btn { flex: 1; }
.practice-label { display: flex; justify-content: space-between; margin-top: 13px; color: rgba(255,255,255,.62); font-size: 11.5px; }
.practice-label b { color: var(--y); }
.practice-pop input[type="range"] { width: 100%; accent-color: var(--y); }
.practice-note { margin: 9px 0 0; color: rgba(255,255,255,.4); font-size: 11px; line-height: 1.55; }
.practice-volume { flex: 1; display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.58); font-size: 11px; }
.practice-volume input { flex: 1; }

/* 管理员在课件库卡片/列表上的快捷管理入口 */
.card, .clist-row { position: relative; }
.quick-manage {
  position: absolute; right: 10px; top: 10px; z-index: 5;
  padding: 5px 9px; border-radius: 7px; border: 1px solid rgba(20,20,16,.16);
  background: rgba(255,255,255,.92); color: #25241f; font-size: 11px; font-weight: 700;
  cursor: pointer; box-shadow: 0 3px 12px rgba(0,0,0,.1);
}
.quick-manage:hover { background: var(--y); border-color: var(--y); }
.card.return-highlight, .clist-row.return-highlight {
  outline: 3px solid var(--y);
  outline-offset: 3px;
  box-shadow: 0 0 0 7px rgba(253,238,1,.18);
  transition: outline-color .2s, box-shadow .2s;
}

/* 校区上传、后台改名与审核 */
.course-modal { width: min(720px, calc(100vw - 28px)); max-height: calc(100vh - 34px); }
.course-modal .dlg-body { max-height: calc(100vh - 130px); overflow-y: auto; }
.teacher-upload-pick {
  display: block; padding: 22px 18px; text-align: center; cursor: pointer;
  border: 1.5px dashed #d7d2c4; border-radius: 12px; background: #fcfbf7;
}
.teacher-upload-pick:hover { border-color: var(--y-dk); background: #fffceb; }
.teacher-upload-pick b { display: block; font-size: 14px; color: #2a2924; }
.teacher-upload-pick span { display: block; margin-top: 6px; font-size: 12px; color: #8c8a80; }
.teacher-file-list {
  margin-top: 10px; padding: 10px 12px; border-radius: 9px;
  background: #f6f4ed; color: #8c8a80; font-size: 12px; line-height: 1.8;
}
.teacher-file-list div { display: flex; gap: 8px; align-items: center; }
.teacher-file-list i { width: 42px; color: #85720b; font-style: normal; font-weight: 700; text-transform: uppercase; }
.teacher-file-list span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #35332d; }
.teacher-file-list em { font-style: normal; }
.teacher-file-list .cu-file-remove {
  flex: none; width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: 6px; background: #ECE8DC;
  color: #8C5B50; font: 700 11px/1 inherit; cursor: pointer;
}
.teacher-file-list .cu-file-remove:hover { background: #F4DDD8; color: #A53120; }
.cu-add-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.cu-add {
  display: flex; min-height: 62px; padding: 9px 8px; cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 3px;
  border: 1px solid #DCD6C6; border-radius: 10px; background: #FCFBF7;
  text-align: center; transition: .16s;
}
.cu-add:hover, .cu-add:active { border-color: var(--y-dk); background: #FFFCE6; }
.cu-add b { color: #2B2A25; font-size: 13px; }
.cu-add span { color: var(--muted); font-size: 9.5px; line-height: 1.35; }
.teacher-upload-state { margin: 14px 0 0; padding: 10px 12px; border-radius: 9px; background: #fff7d7; color: #745b00; font-size: 12px; line-height: 1.6; }
.teacher-upload-mode {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  margin-bottom: 16px; padding: 4px; border-radius: 11px; background: #efede5;
}
.teacher-upload-mode button {
  border: 0; border-radius: 8px; padding: 9px 12px; cursor: pointer;
  background: transparent; color: #6f6c63; font-weight: 700; font-size: 12.5px;
}
.teacher-upload-mode button.on {
  background: #fff; color: #22211d; box-shadow: 0 2px 9px rgba(28, 26, 20, .09);
}
.teacher-folder-drop {
  margin-top: 9px; padding: 14px 12px; border: 1.5px dashed #c8c2b1;
  border-radius: 10px; background: #f8f7f2; text-align: center; cursor: pointer;
  transition: border-color .18s, background .18s;
}
.teacher-folder-drop:hover, .teacher-folder-drop.over {
  border-color: var(--y-dk); background: #fffceb;
}
.teacher-folder-drop b { display: block; color: #34322c; font-size: 12.5px; }
.teacher-folder-drop span { display: block; margin-top: 4px; color: #8b887f; font-size: 11px; }
.teacher-batch-summary {
  margin-top: 11px; padding: 9px 11px; border-radius: 8px;
  background: #f2f0e8; color: #6e6b61; font-size: 12px;
}
.teacher-batch-summary b { color: #282722; }
.teacher-batch-list {
  display: flex; flex-direction: column; gap: 7px;
  max-height: min(390px, 42vh); margin-top: 9px; overflow-y: auto;
}
.teacher-batch-empty {
  padding: 16px 12px; border: 1px dashed #d8d4c8; border-radius: 9px;
  color: #969186; font-size: 12px; text-align: center; line-height: 1.65;
}
.teacher-batch-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px;
  align-items: center; padding: 10px 11px; border: 1px solid #dedacf;
  border-radius: 10px; background: #fcfbf7;
}
.teacher-batch-row.uploading { border-color: #d4bd32; background: #fffdf1; }
.teacher-batch-row.done { border-color: #add5b8; background: #f5fbf6; }
.teacher-batch-row.failed { border-color: #e1b7ae; background: #fff8f6; }
.tb-main { min-width: 0; }
.tb-main b {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #292821; font-size: 13px;
}
.tb-main span { display: block; margin-top: 3px; color: #77736a; font-size: 11px; }
.tb-main em {
  display: block; margin-top: 3px; color: #8c6f00; font-size: 10.5px;
  font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.teacher-batch-row.failed em { color: #9b382a; }
.teacher-batch-row.done em { color: #24723a; }
.tb-progress {
  height: 3px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: #e9e5da;
}
.tb-progress i {
  display: block; width: 0; height: 100%; border-radius: inherit;
  background: #d1ba00; transition: width .15s linear;
}
.teacher-batch-row.done .tb-progress i { background: #3b9a58; }
.teacher-batch-row.failed .tb-progress i { background: #c85a48; }
.teacher-upload-tools {
  display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px;
}
.teacher-upload-tools .btn { flex: 1 1 108px; }

@media (max-width: 620px) {
  .teacher-upload-mode { grid-template-columns: 1fr; }
  .teacher-batch-list { max-height: 34vh; }
  .teacher-batch-row { grid-template-columns: minmax(0, 1fr); }
  .teacher-batch-row > .btn { justify-self: start; }
  .cu-add-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cu-add { min-height: 68px; }
}
.course-modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.course-modal-actions.split { justify-content: space-between; }
.course-modal-actions.split > div { display: flex; gap: 9px; }
.course-manage-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; color: #7c796f; font-size: 12px; }
.review-actions { display: flex; gap: 9px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.review-actions .btn { flex: 1; }
.course-submitter { margin-top: 4px; color: #9a7f21; font-size: 10.5px; font-weight: 500; }

.course-file-editor { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.course-file-edit-row {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 9px;
  align-items: center; padding: 9px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg);
}
.course-file-edit-row .input { min-width: 0; }
.course-file-edit-row .tag { text-align: center; }
.recovery-code-result {
  margin-top: 10px; padding: 12px; border-radius: 9px;
  background: #171711; color: var(--y); text-align: center;
}
.recovery-code-result b {
  display: block; font: 800 20px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing: .12em;
}
.recovery-code-result span { display: block; margin-top: 5px; color: #a8a69d; font-size: 10.5px; }

/* 节拍器：逐音符细分 */
.metro-subrow { display: block; width: min(100%, 660px); height: auto; min-height: 44px; }
.sub-beat-label { display: block; text-align: center; color: #6e7076; font-size: 10.5px; margin-bottom: 7px; letter-spacing: .08em; }
.sub-groups { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.sub-group {
  display: flex; align-items: center; gap: 4px; padding: 4px 6px;
  border-radius: 9px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.055);
}
.sub-group > b { color: #8d9097; font-size: 10px; min-width: 12px; text-align: center; }
.sub-note {
  width: 27px; height: 30px; padding: 0; border: 1px solid rgba(255,255,255,.14);
  background: #2b2d32; color: #92959c; border-radius: 7px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.sub-note i { width: 7px; height: 7px; border-radius: 50%; background: #6a6d74; }
.sub-note span { font-size: 8px; line-height: 1; }
.sub-note.is-acc { border-color: rgba(253,238,1,.5); color: var(--y); background: rgba(253,238,1,.07); }
.sub-note.is-acc i { background: var(--y); }
.sub-note.is-mute { opacity: .42; }
.sub-note.is-mute i { width: 8px; height: 2px; border-radius: 1px; }
.sub-note.cur { transform: translateY(-2px); border-color: #ff6b43; box-shadow: 0 0 12px rgba(255,95,61,.55); }
.sub-empty { display: block; text-align: center; color: #6e7076; font-size: 10.5px; }
.metro-subrow .sub-group .sub-note:hover { border-color: rgba(255,255,255,.45); }

/* ================= 3.2 节拍器：逐拍独立细分 / 一屏训练台 ================= */
.metro-panel {
  width: min(1180px, 100%);
  height: min(760px, calc(100vh - 24px));
  max-height: calc(100vh - 24px);
}
.metro-body { grid-template-columns: 340px minmax(0, 1fr); }
.metro-side { padding: 12px 14px; overflow: hidden; }
.metro-tempo {
  display: grid; grid-template-columns: 92px minmax(0, 1fr);
  gap: 3px 10px; padding: 10px 12px; margin-bottom: 8px;
}
.metro-tempo-num { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
.metro-tempo-num b { font-size: 36px; }
.metro-tempo-btns { grid-column: 2; grid-row: 1; margin: 0; gap: 5px; }
.metro-tempo > input[type="range"] { grid-column: 2; grid-row: 2; margin: 2px 0 0; }
.metro-presets { grid-column: 1 / -1; grid-row: 3; margin: 5px 0 0; }
.metro-ctl { margin-top: 8px; padding: 9px 11px; }
.metro-lab { margin-bottom: 6px; }
.metro-row2 {
  margin-top: 8px; padding: 0; gap: 8px;
  background: transparent; border: 0;
}
.metro-row2 > div { padding: 8px 9px; }
.metro-row2 .metro-lab { margin-bottom: 4px; }
.metro-row2 .metro-switch { padding-top: 2px; }
.metro-start { margin-top: 9px; min-height: 42px; }
.metro-tip { display: none; }
.metro-timbres { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.metro-timbres button { min-height: 34px; padding: 3px 0; font-size: 11px; }
.metro-compact-ctl { padding-top: 7px; padding-bottom: 7px; }
.metro-timbre-ctl { padding-top: 7px; padding-bottom: 7px; }
.metro-timbre-ctl .metro-layer-vol { margin: 3px 0 0; }
.metro-stage {
  gap: 10px; padding: 14px 18px; overflow: hidden;
}
.metro-ring { width: 156px; height: 156px; }
.metro-ring-core b { font-size: 44px; }
.metro-dots {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  gap: 6px; width: min(100%, 820px);
}
.mdot-wrap { display: flex; flex-direction: column; align-items: stretch; min-width: 0; }
.mdot {
  width: 100%; min-height: 49px; padding: 6px 1px 5px; border-radius: 9px;
}
.mdot b { font-size: 15px; }
.mdot span { font-size: 9px; }
.beat-sub-select {
  display: flex; align-items: center; justify-content: center; gap: 2px;
  margin-top: 3px; color: #7f8289; font-size: 9px; cursor: pointer;
}
.beat-sub-select select {
  width: 37px; height: 22px; padding: 0 2px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,.16); background: #2b2d32; color: var(--y);
  font: 700 11px/1 inherit; text-align: center; cursor: pointer;
}
.metro-vol { accent-color: var(--y); }
.metro-lab output { float: right; color: var(--y); font-size: 11px; font-variant-numeric: tabular-nums; }
.metro-panel input[type="range"] {
  background: linear-gradient(90deg, var(--y) 0 var(--metro-vol, 80%), #45474D var(--metro-vol, 80%) 100%);
}
.metro-subrow { width: 100%; height: auto; min-height: 0; }
.sub-head {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 5px; color: #777b83; font-size: 9.5px;
}
.sub-head b { color: #b9bcc3; font-size: 10px; }
.sub-head span { color: var(--y); font-weight: 800; letter-spacing: .08em; }
.sub-groups { display: grid; align-items: start; gap: 5px; width: 100%; }
.sub-group {
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
  padding: 4px; border-radius: 8px;
}
.sub-beat-hit {
  width: 100%; height: 25px; border: 1px solid rgba(253,238,1,.35);
  border-radius: 6px; background: rgba(253,238,1,.1); color: var(--y);
  font: 800 11px/1 inherit; cursor: pointer;
}
.sub-beat-hit.is-acc { background: rgba(253,238,1,.2); color: var(--y); }
.sub-beat-hit.is-mute { opacity: .38; color: #85888f; border-color: rgba(255,255,255,.12); background: #26282c; }
.sub-note { width: 100%; height: 23px; flex-direction: row; gap: 4px; border-radius: 6px; }
.sub-note i { width: 5px; height: 5px; }
.sub-note span { font-size: 9px; }
.sub-note.cur, .sub-beat-hit.cur {
  transform: none; border-color: #ff6b43;
  box-shadow: 0 0 10px rgba(255,95,61,.55);
}
.metro-barinfo { margin-top: -2px; font-size: 11px; }

@media (max-height: 690px) and (min-width: 761px) {
  .metro-panel { height: calc(100vh - 16px); }
  .metro-top { padding: 10px 16px; }
  .metro-title p { display: none; }
  .metro-ring { width: 132px; height: 132px; }
  .metro-ring-core b { font-size: 38px; }
  .metro-stage { gap: 7px; padding: 10px 14px; }
  .metro-tip { display: none; }
  .metro-tempo-num b { font-size: 34px; }
}

@media (max-width: 720px) {
  .pl-top { gap: 7px; padding: 0 10px; }
  .pl-top h3 { font-size: 13px; }
  .pl-top .badge-live { display: none; }
  .pl-action { padding: 0 9px; font-size: 11.5px; }
  .practice-pop { left: 10px; right: 10px; top: 8px; width: auto; }
  .sheet-tools { left: 7px; padding: 5px 3px; }
  .sheet-tools .sbtn { width: 33px; min-width: 33px; }
  .sub-group { gap: 2px; padding: 3px 4px; }
  .sub-note { width: 24px; }
}

/* 表格横向滚动容器：窄屏上表格自身可以横滑，不再把整页撑出横向溢出 */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#courseRows tr,
#courseRows td,
#courseRows .row-drag-handle,
#courseRows .dup-inline {
  -webkit-user-select: none;
  user-select: none;
}

/* ================= 课件列表：快捷/高级筛选 + 批量选择 + 分页 ================= */
.filter-panel { padding: 0 18px 10px; border-bottom: 1px solid var(--line); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 10px; }
.chip {
  border: 1px solid var(--line); background: var(--white); color: var(--ink2);
  border-radius: 999px; padding: 5px 14px; font-size: 13px; cursor: pointer;
  transition: .12s; line-height: 1.4;
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
/* 高级筛选：带字段标题的网格（桌面 3 列、中屏 2 列自动换行），搜索/清空单独一行 */
.adv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
}
.adv-field {
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0;
}
.adv-lab {
  font-size: 12px; font-weight: 700; color: var(--ink2); line-height: 1.4;
}
.adv-field .input {
  height: 32px; font-size: 13px; width: 100%; min-width: 130px;
  padding: 0 8px;
}
.adv-actions {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 10px;
}
.adv-actions .input { height: 30px; font-size: 13px; flex: 1 1 220px; min-width: 150px; }
.adv-actions .btn { flex: none; }
.filter-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; min-height: 22px; }
.ftag {
  display: inline-block; background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 8px; font-size: 12px; color: var(--ink2);
}

.select-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 18px; border-bottom: 1px solid var(--line);
}
.select-bar .hint b { color: var(--ink); }

.bulk-bar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 18px; border-top: 1px solid var(--line);
  background: var(--white); box-shadow: 0 -6px 14px rgba(17,17,16,.05);
}
.bulk-bar .hint b { color: var(--ink); }


.page-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 18px 14px; border-top: 1px solid var(--line);
}
.pg-nums { display: flex; gap: 4px; flex-wrap: wrap; }
.pg-num {
  min-width: 30px; height: 28px; border: 1px solid var(--line); background: var(--white);
  border-radius: 7px; font-size: 13px; cursor: pointer; color: var(--ink2);
}
.pg-num:hover { border-color: var(--ink); }
.pg-num.cur { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
.page-bar .btn:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 1100px) {
  .adv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .adv-grid { grid-template-columns: 1fr; }
  .adv-field .input { min-width: 0; }
  .bulk-bar, .page-bar { position: static; }
  .review-alert { flex-wrap: wrap; align-items: flex-start; }
  .review-alert > div { flex: 1 1 calc(100% - 50px); }
  .review-alert button { width: 100%; }
  .dup-alert { flex-wrap: wrap; align-items: flex-start; }
  .dup-alert > div { flex: 1 1 calc(100% - 50px); }
  .dup-alert button { width: 100%; }
  .dup-course-row { grid-template-columns: minmax(0,1fr); }
  .dup-row-actions { grid-column: 1; justify-self: start; }
  .metro-mini {
    right: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom));
  }
}

/* 手机节拍器最终覆盖规则：必须放在所有桌面规则之后。
   旧规则在前面把 .metro-body 改成单列，但后面的桌面样式又把 340px 双栏写回来，
   导致手机上右侧节拍区和部分控件被挤出可视范围。 */
@media (max-width: 760px) {
  .metro-mask {
    padding: 0;
    align-items: stretch;
  }
  .metro-panel {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .metro-top {
    position: relative;
    z-index: 4;
    flex: none;
    padding: 10px 10px 9px;
    gap: 7px;
  }
  .metro-icon { width: 32px; height: 32px; border-radius: 8px; }
  .metro-title { gap: 8px; }
  .metro-title h3 { font-size: 14px; }
  .metro-title p { display: none; }
  .metro-status { padding: 5px 8px; font-size: 10.5px; }
  .metro-status i { width: 6px; height: 6px; }
  .metro-x { width: 34px; height: 34px; }
  .metro-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .metro-side {
    width: 100%;
    flex: none;
    padding: 10px 10px 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    overflow: visible;
  }
  .metro-stage {
    width: 100%;
    min-height: 420px;
    flex: none;
    overflow: visible;
    padding: 16px 10px 28px;
  }
  .metro-tempo {
    grid-template-columns: 78px minmax(0, 1fr);
    padding: 9px 10px;
  }
  .metro-tempo-num b { font-size: 32px; }
  .metro-tempo-btns { gap: 4px; }
  .metro-presets { gap: 5px; }
  .metro-presets button, .mbtn, .metro-seg button { min-height: 38px; }
  .metro-ctl { padding: 9px 10px; margin-top: 7px; }
  .metro-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 0;
    gap: 7px;
  }
  .metro-row2 > div { padding: 8px; }
  .metro-start {
    position: sticky;
    bottom: 0;
    min-height: 46px;
    margin-top: 10px;
    box-shadow: 0 -10px 22px rgba(31,32,35,.96);
  }
  .metro-dots {
    grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  }
  .sub-groups { grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); }
  .metro-mini {
    max-width: calc(100vw - 24px);
  }
  .metro-timbre-grid { grid-template-columns: 1fr; }
}

/* 3.3.14：音色区并排压缩，短屏仍能完整操作；极端矮窗口保留滚动而不是裁切。 */
.metro-timbre-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}
.metro-timbre-grid .metro-ctl {
  min-width: 0;
  margin-top: 8px;
}
.metro-timbre-grid .metro-timbres {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
.metro-side {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #777b83 #25272b;
}
.metro-side::-webkit-scrollbar { width: 7px; }
.metro-side::-webkit-scrollbar-thumb {
  background: #6f737b;
  border-radius: 99px;
}
.metro-side::-webkit-scrollbar-track { background: transparent; }
.metro-stage { overflow-y: auto; }

@media (max-height: 800px) and (min-width: 761px) {
  .metro-panel {
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
  }
  .metro-top { padding: 8px 14px; }
  .metro-icon { width: 32px; height: 32px; border-radius: 8px; }
  .metro-title p { display: none; }
  .metro-status { padding: 4px 9px; font-size: 11px; }
  .metro-x { width: 30px; height: 30px; }
  .metro-side { padding: 8px 10px; }
  .metro-tempo {
    padding: 7px 9px;
    margin-bottom: 6px;
    grid-template-columns: 78px minmax(0, 1fr);
  }
  .metro-tempo-num b { font-size: 31px; }
  .metro-tempo-btns { gap: 4px; }
  .mbtn, .metro-presets button, .metro-seg button {
    min-height: 31px;
    font-size: 11px;
  }
  .metro-presets { margin-top: 3px; }
  .metro-ctl {
    padding: 6px 8px;
    margin-top: 6px;
  }
  .metro-lab {
    margin-bottom: 4px;
    font-size: 11px;
  }
  .metro-lab small { display: none; }
  .metro-timbre-grid .metro-ctl { margin-top: 6px; }
  .metro-timbre-grid .metro-timbres { gap: 3px; }
  .metro-layer-vol { margin-top: 3px; }
  .metro-row2 { margin-top: 6px; gap: 6px; }
  .metro-row2 > div { padding: 6px 8px; }
  .metro-start { min-height: 38px; margin-top: 6px; }
  .metro-stage { gap: 7px; padding: 8px 14px; }
  .metro-ring { width: 128px; height: 128px; }
  .metro-ring-core b { font-size: 36px; }
  .mdot { min-height: 43px; padding: 4px 1px; }
  .mdot b { font-size: 14px; }
  .sub-groups { gap: 4px; }
  .sub-beat-hit { height: 22px; }
  .sub-note { height: 21px; }
}

@media (max-width: 760px) {
  .metro-timbre-grid { grid-template-columns: 1fr; }
  .metro-timbre-grid .metro-timbres { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metro-side { overflow: visible; }
  .metro-stage { overflow: visible; }
}
