/* =========================================================================
 * 组件库：按钮 / 卡片 / 列表 / 表单 / 数据面板 / 弹窗 / 提示
 * ========================================================================= */

/* ------------------------------- 按钮 ------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  transition: transform var(--dur), background var(--dur), border-color var(--dur), box-shadow var(--dur), color var(--dur);
  white-space: nowrap;
}
.btn:hover { background: var(--panel-3); border-color: var(--line-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn .ic { width: 17px; height: 17px; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--on-brand);
  border-color: transparent;
  box-shadow: 0 8px 24px -10px var(--brand);
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 12px 30px -10px var(--brand); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--dim); }
.btn-ghost:hover { background: var(--panel-2); color: var(--text); }
.btn-outline { background: transparent; border-color: var(--line-2); }
.btn-sm { height: 31px; padding: 0 13px; font-size: 12.5px; }
.btn-sm .ic { width: 15px; height: 15px; }
.btn-lg { height: 46px; padding: 0 26px; font-size: 15px; }
.btn-block { width: 100%; }

/* 小圆角标签 */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--dim);
  background: var(--panel-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chip.is-on { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--on-brand); border-color: transparent; }
.chip-mini { height: 19px; padding: 0 8px; font-size: 10.5px; }
.chip-live { color: #fff; background: linear-gradient(135deg, #ef4444, #f97316); border-color: transparent; }
.chip-live .dot-live { width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: pulseDot 1.4s infinite; }
@keyframes pulseDot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }
.chip-soft { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 26%, transparent); }

/* 分类筛选条 */
.chipbar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.chipbar::-webkit-scrollbar { display: none; }
.chipbar .chip { height: 32px; padding: 0 15px; font-size: 12.5px; cursor: pointer; flex: none; }
.chipbar .chip:hover { color: var(--text); border-color: var(--line-2); }
.chipbar-label { font-size: 12px; color: var(--mute); flex: none; align-self: center; padding-right: 2px; }

/* ------------------------------- 卡片 ------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform 0.34s var(--ease-out), background var(--dur), border-color var(--dur), box-shadow 0.34s;
  cursor: pointer;
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); background: var(--panel-2); border-color: var(--line-2); box-shadow: var(--shadow-2); }
.card:active { transform: translateY(-1px) scale(0.995); }

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 18% 12%, color-mix(in srgb, var(--brand) 30%, transparent), transparent 62%),
    radial-gradient(120% 120% at 86% 92%, color-mix(in srgb, var(--brand-2) 26%, transparent), transparent 64%),
    linear-gradient(140deg, var(--panel-2), var(--panel));
}
/* 封面缺失时的兜底观感：留一枚品牌色音符，避免出现死灰块 */
.card-media::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: var(--text);
  opacity: 0.14;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 18V5l10-2v13' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='6.4' cy='18.1' r='2.6' fill='black'/%3E%3Ccircle cx='16.4' cy='16.1' r='2.6' fill='black'/%3E%3C/svg%3E") center / 30% auto no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 18V5l10-2v13' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='6.4' cy='18.1' r='2.6' fill='black'/%3E%3Ccircle cx='16.4' cy='16.1' r='2.6' fill='black'/%3E%3C/svg%3E") center / 30% auto no-repeat;
  pointer-events: none;
}
.card-media img { position: relative; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.card:hover .card-media img { transform: scale(1.06); }
.card-media-wide { aspect-ratio: 16 / 9; }

.card-play {
  position: absolute;
  right: 9px; bottom: 9px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--on-brand);
  box-shadow: 0 8px 22px -6px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transition: opacity 0.28s var(--ease), transform 0.32s var(--ease-out);
}
.card-play .ic { width: 22px; height: 22px; }
.card:hover .card-play, .card:focus-within .card-play { opacity: 1; transform: none; }
.card-title { font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.card-sub { font-size: 11.5px; color: var(--mute); margin-top: 2px; }

/* 卡片右上角操作组 */
.card-ops { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transform: translateY(-6px); transition: opacity 0.26s, transform 0.3s; z-index: 3; }
.card:hover .card-ops { opacity: 1; transform: none; }
.card-ops .mini-btn {
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(10, 10, 16, 0.6);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background var(--dur), transform var(--dur);
}
.card-ops .mini-btn:hover { background: rgba(10, 10, 16, 0.85); transform: scale(1.08); }
.card-ops .mini-btn .ic { width: 15px; height: 15px; }
.card-ops .mini-btn.is-on { background: var(--brand); color: var(--on-brand); }

/* 卡片角标 */
.card-badge {
  position: absolute; left: 8px; top: 8px;
  display: inline-flex; align-items: center; gap: 4px;
  height: 21px; padding: 0 8px;
  border-radius: 999px;
  font-size: 10.5px; font-weight: 700;
  background: rgba(10, 10, 16, 0.62);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
}
.card-badge.rank { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--on-brand); }
.card-dur { position: absolute; right: 8px; top: 8px; height: 21px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 10.5px; background: rgba(10, 10, 16, 0.62); color: #fff; z-index: 2; }

/* 场景卡（渐变 + 图标） */
.scene-card {
  position: relative;
  min-height: 132px;
  padding: 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform 0.34s var(--ease-out), box-shadow 0.34s;
}
.scene-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(140deg, var(--sc, var(--brand)), transparent 72%);
  opacity: 0.24;
  transition: opacity 0.34s;
}
.scene-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.scene-card:hover::before { opacity: 0.42; }
.scene-card > * { position: relative; z-index: 1; }
.scene-card .ic { width: 26px; height: 26px; color: var(--sc, var(--brand)); }
.scene-name { font-size: 15px; font-weight: 700; }
.scene-sub { font-size: 11.5px; color: var(--dim); }
.scene-covers { display: flex; gap: -8px; }
.scene-covers img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; border: 2px solid var(--bg-0); margin-left: -8px; }
.scene-covers img:first-child { margin-left: 0; }

/* ------------------------------- 列表行 ------------------------------- */
.track-list { display: flex; flex-direction: column; gap: 2px; }
.track-row {
  display: grid;
  grid-template-columns: 40px 44px minmax(0, 2.1fr) minmax(0, 1.1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 9px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--dur), transform var(--dur);
  border: 1px solid transparent;
}
.track-row:hover { background: var(--panel-2); border-color: var(--line); }
.track-row.is-current { background: color-mix(in srgb, var(--brand) 11%, transparent); border-color: color-mix(in srgb, var(--brand) 26%, transparent); }
.track-idx { font-size: 13px; color: var(--mute); font-family: var(--font-num); text-align: center; display: grid; place-items: center; }
.track-row:hover .track-idx .num { display: none; }
.track-idx .play-sm { display: none; color: var(--brand); }
.track-row:hover .track-idx .play-sm { display: block; }
.track-row.is-current .track-idx .num { display: none; }
.track-row.is-current .track-idx .playing-bars { display: flex; }
.track-idx .playing-bars { display: none; gap: 2px; align-items: flex-end; height: 13px; }
.track-idx .playing-bars i { width: 2.5px; background: var(--brand); border-radius: 2px; animation: eqBounce 0.85s var(--ease) infinite; }
.track-idx .playing-bars i:nth-child(2) { animation-delay: 0.18s; }
.track-idx .playing-bars i:nth-child(3) { animation-delay: 0.36s; }
.track-cover {
  width: 44px; height: 44px; border-radius: 10px; object-fit: cover;
  background:
    radial-gradient(120% 120% at 25% 20%, color-mix(in srgb, var(--brand) 32%, transparent), transparent 66%),
    linear-gradient(140deg, var(--panel-2), var(--panel));
  flex: none;
}
.track-main { min-width: 0; }
.track-name { font-size: 13.5px; font-weight: 600; }
.track-artist { font-size: 11.5px; color: var(--mute); margin-top: 1px; }
.track-album { font-size: 12px; color: var(--mute); }
.track-ops { display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
.track-ops .icon-btn { width: 32px; height: 32px; }
.track-ops .icon-btn .ic { width: 17px; height: 17px; }
.track-dur { font-size: 12px; color: var(--mute); font-family: var(--font-num); margin-right: 6px; }

.row-list { display: flex; flex-direction: column; gap: 2px; }
.row-list .track-row { grid-template-columns: 40px 44px minmax(0, 2.4fr) auto; }

/* 榜单卡片 */
.chart-card { border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chart-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; min-width: 0; }
/* 榜单副标题（说明这一榜按什么排：真实播放次数 / 多语种热度） */
.chart-sub { font-size: 11.5px; color: var(--mute); margin-top: -4px; }
.chart-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: pointer; transition: background var(--dur); }
.chart-item:hover { background: var(--panel-2); }
.chart-item .rk { width: 18px; font-family: var(--font-num); font-size: 12.5px; color: var(--mute); text-align: center; flex: none; }
.chart-item .rk.top { color: var(--brand); font-weight: 700; }
.chart-item img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex: none; }
.chart-item .t { min-width: 0; flex: 1; }
.chart-item .t b { font-size: 12.5px; font-weight: 600; display: block; }
.chart-item .t span { font-size: 11px; color: var(--mute); }
/* 真实播放次数（只在 metric=plays 的榜单上显示，避免出现「0 次播放的排行榜」这种自相矛盾的画面） */
.chart-item .cnt { font-family: var(--font-num); font-size: 10.5px; color: var(--mute); flex: none; }

/* ------------------------------- 横幅轮播 ------------------------------- */
.banner { position: relative; border-radius: var(--r-lg); overflow: hidden; height: 236px; box-shadow: var(--shadow-2); }
.banner-track { display: flex; height: 100%; transition: transform 0.7s var(--ease-out); }
.banner-slide { position: relative; min-width: 100%; height: 100%; padding: 34px 40px; display: flex; flex-direction: column; justify-content: center; gap: 9px; background-color: var(--bg-0); }
/* 运营位底图（模式：由后端 /api/home/banners 每次从网络取，见 recommend.bannerImages）
   ★ 图片放在 ::before 上、而不是直接给 .banner-slide 设 background-image，原因有二：
     1) 「左实右虚」要靠 mask 做，而 mask 会把子元素一起淡化（标题、按钮都会被吃掉），
        必须隔离到伪元素上；
     2) ::after 已经被「左侧暗色遮罩」占用（保证白字压在照片上仍然可读），这一层得垫在它下面。
   最终层序：底图 → 暗色遮罩 → 文字。
   ★ 没有 --bimg 时（取图失败）background-image 为 none，露出 inline 的 gradient 兜底，
     横幅不会开天窗。 */
.banner-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bimg, none);
  background-size: cover;
  background-position: 50% 40%;
  /* 由左到右透明度逐渐增加：左侧完整显示，右侧化进页面底色 */
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 34%, rgba(0, 0, 0, 0.62) 62%, transparent 96%);
  mask-image: linear-gradient(90deg, #000 0%, #000 34%, rgba(0, 0, 0, 0.62) 62%, transparent 96%);
}
.banner-slide::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.5), transparent 62%);
  pointer-events: none;
}
.banner-slide > * { position: relative; z-index: 1; color: #fff; }
.banner-title { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; text-shadow: 0 3px 20px rgba(0, 0, 0, 0.4); }
.banner-sub { font-size: 13.5px; opacity: 0.9; }
.banner-nav { position: absolute; bottom: 18px; right: 22px; display: flex; gap: 7px; z-index: 3; }
/* 点击热区 26×26（满足无障碍最小触控尺寸），8px 视觉圆点由 ::before 承担 */
.banner-dot { width: 26px; height: 26px; border-radius: 999px; background: none; display: grid; place-items: center; transition: all 0.34s; }
.banner-dot::before { content: ''; width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.42); transition: all 0.34s; }
.banner-dot.on { width: 44px; background: none; }
.banner-dot.on::before { width: 26px; background: #fff; }

/* ------------------------------ 骨架屏 ------------------------------ */
.skel { background: linear-gradient(90deg, var(--panel) 25%, var(--panel-3) 37%, var(--panel) 63%); background-size: 400% 100%; animation: shimmer 1.5s ease-in-out infinite; border-radius: 10px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.skel-card { height: 208px; border-radius: var(--r-md); }
.skel-line { height: 12px; margin-top: 9px; }
.skel-line.w60 { width: 60%; }
.skel-line.w40 { width: 40%; }
.skel-row { height: 62px; border-radius: var(--r-sm); }

/* ------------------------------ 空态 / 提示 ------------------------------ */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 62px 20px; text-align: center; color: var(--mute); }
.empty .ic { width: 46px; height: 46px; opacity: 0.5; }
.empty b { font-size: 15px; color: var(--dim); font-weight: 600; }
.empty p { font-size: 12.5px; max-width: 420px; }
.notice {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  font-size: 12.5px; color: var(--dim);
}
.notice .ic { width: 17px; height: 17px; color: var(--brand); flex: none; }
.notice.err { background: color-mix(in srgb, #ef4444 12%, transparent); border-color: color-mix(in srgb, #ef4444 30%, transparent); }
.notice.err .ic { color: #ef4444; }
.err-text { color: #f87171; font-size: 12px; }

/* ------------------------------- 表单 ------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; color: var(--dim); font-weight: 600; }
.input, .textarea, select.input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
.textarea { height: auto; min-height: 88px; padding: 11px 14px; resize: vertical; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: var(--mute); }
.input:focus, .textarea:focus, select.input:focus { border-color: color-mix(in srgb, var(--brand) 60%, transparent); box-shadow: 0 0 0 4px var(--glow); background: var(--panel-2); }
select.input { cursor: pointer; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.switch { position: relative; width: 44px; height: 25px; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--line); cursor: pointer; transition: background var(--dur); flex: none; }
.switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 19px; height: 19px; border-radius: 50%; background: var(--text); opacity: 0.8; transition: transform 0.28s var(--ease), background var(--dur); }
.switch.on { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; }
.switch.on::after { transform: translateX(19px); background: var(--on-brand); opacity: 1; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row b { font-size: 13px; font-weight: 600; display: block; }
.switch-row span { font-size: 11.5px; color: var(--mute); }

/* ------------------------------- 弹窗 ------------------------------- */
/* ★ 与 .stage 同理：display:grid 必须显式声明列宽。
   隐式列默认 `auto`（≈max-content），弹窗内容一旦宽于视口就会被撑开并溢出到屏外；
   且本层是 position:fixed，溢出不计入 documentElement.scrollWidth，常规溢出探针查不到。 */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 20px; }
.modal-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.56); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn 0.26s var(--ease) both; }
.modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  min-width: 0;
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px;
  border-radius: var(--r-lg);
  background: var(--glass-2);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow-3);
  backdrop-filter: blur(26px) saturate(1.6);
  -webkit-backdrop-filter: blur(26px) saturate(1.6);
  animation: modalIn 0.38s var(--ease-out) both;
}
.modal-card.modal-wide { width: min(880px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal-title { font-size: 19px; margin-bottom: 4px; }
.modal-desc { font-size: 12.5px; color: var(--mute); margin-bottom: 20px; }
.modal-close { position: absolute; right: 16px; top: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
.modal-actions.left { justify-content: flex-start; }

/* 选项网格（导航风格 / 主题 / 皮肤选择） */
.opt-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.opt {
  position: relative;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  transition: border-color var(--dur), background var(--dur), transform var(--dur), box-shadow var(--dur);
  text-align: left;
}
.opt:hover { border-color: var(--line-2); background: var(--panel-2); transform: translateY(-2px); }
.opt.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); box-shadow: 0 0 0 3px var(--glow); }
.opt b { font-size: 13.5px; display: block; }
.opt span { font-size: 11.5px; color: var(--mute); display: block; margin-top: 3px; }
.opt .opt-check { position: absolute; right: 10px; top: 10px; color: var(--brand); opacity: 0; transition: opacity var(--dur); }
.opt.on .opt-check { opacity: 1; }
/* 风格实时预览缩略 */
.opt-preview { height: 56px; border-radius: 12px; margin-bottom: 10px; border: 1px solid var(--line); position: relative; overflow: hidden; background: var(--panel-2); }
.pv-nav { position: absolute; left: 6px; top: 6px; bottom: 6px; width: 20px; border-radius: 8px; }
.pv-lines { position: absolute; left: 34px; right: 8px; top: 12px; display: flex; flex-direction: column; gap: 6px; }
.pv-lines i { height: 7px; border-radius: 4px; background: var(--panel-3); }
.pv-lines i:nth-child(1) { width: 70%; }
.pv-lines i:nth-child(2) { width: 90%; }
.pv-lines i:nth-child(3) { width: 52%; }
.pv-flow .pv-nav { background: linear-gradient(180deg, var(--tint), color-mix(in srgb, var(--wave-2) 70%, transparent)); box-shadow: 0 0 14px var(--tint); }
.pv-time .pv-nav { background: linear-gradient(180deg, #3a2712, #1a1109); border: 1px solid rgba(245, 196, 81, 0.4); border-radius: 50%; width: 20px; }
.pv-minimal .pv-nav { background: transparent; border: 1px dashed var(--line-2); opacity: 0.6; }
.pv-crystal .pv-nav { background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 30%, transparent), rgba(255, 255, 255, 0.1)); border: 1px solid rgba(255, 255, 255, 0.26); box-shadow: 0 6px 18px -8px var(--tint); }
.pv-crystal .pv-lines i:first-child { background: linear-gradient(90deg, var(--brand), transparent); }

/* 主题色板预览 */
.swatches { display: flex; gap: 6px; margin-bottom: 10px; }
.swatches i { width: 18px; height: 18px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }

/* ------------------------------- 提示条 ------------------------------- */
.toasts { position: fixed; left: 50%; bottom: calc(var(--player-h) + 26px); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(420px, 92vw); }

/**
 * ★ 播放页打开时，提示条从「底部居中」改到「顶部居中、工具栏之下」。
 *
 * 为什么必须改（四视口逐个求交的实测值，不是估计）：
 *   播放页的按钮栏就在底部，而提示条原本也钉在底部、z-index 200 高于 #stage 的 100
 *   → 提示条直接压住按钮：
 *     · 1440×900  压住 视频全屏 / 画中画 / 截图 / 弹幕开关，冲突 8316 px²
 *     · 390×844   一次压住 6 个按钮（音质·音效 / 原声 / 定时关闭 / 视频全屏 / 画中画 / 截图），冲突 11058 px²
 *     · 1180×900 / 768×1024  刚好错开，冲突 0
 *   挪到「工具栏之下、水平居中」后，这四个视口冲突面积**全部为 0**，
 *   且不遮视频画面（视频在内容区中部，顶部这段是空的）。
 *
 * ★ 落点必须用 --stage-top-h（工具栏实测高度）而不是写死的数值：
 *   工具栏高度随宽度变 —— 1180/1440/768 实测 68px，手机 390 实测 93px。
 *   写死 68 会让手机上的提示条被工具栏压住 25px。
 *   该变量由 player.js 的 syncStageMetrics() 在开播与 resize 时写入。
 */
body.stage-open .toasts {
  top: calc(var(--stage-top-h, 68px) + 12px);
  bottom: auto;
}
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 17px;
  border-radius: 999px;
  background: var(--glass-2);
  border: 1px solid var(--hair);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font-size: 13px;
  animation: toastIn 0.36s var(--ease-out) both;
  max-width: 100%;
}
.toast.out { animation: toastOut 0.3s var(--ease) both; }
.toast .ic { width: 17px; height: 17px; flex: none; color: var(--brand); }
.toast.err .ic { color: #f87171; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(0.97); } }

/* ------------------------------ 均衡器 ------------------------------ */
.eq-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 18px 8px 4px; }
.eq-band { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.eq-band span { font-size: 11px; color: var(--mute); font-family: var(--font-num); }
.eq-band b { font-size: 11.5px; color: var(--dim); font-family: var(--font-num); }
.eq-slider { width: 100%; height: 132px; display: flex; justify-content: center; cursor: ns-resize; touch-action: none; padding: 6px 0; }
.eq-track {
  position: relative;
  width: 8px;
  height: 100%;
  border-radius: 99px;
  background: var(--panel-3);
  overflow: visible;
}
.eq-fill { position: absolute; left: 0; right: 0; bottom: 50%; height: 0; border-radius: 99px; background: linear-gradient(to top, var(--brand), var(--brand-2)); }
.eq-knob {
  position: absolute; left: 50%; bottom: 50%;
  width: 20px; height: 20px; margin: 0 0 -10px -10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 0 3px var(--glow);
  transition: transform 0.16s var(--ease);
}
.eq-slider:hover .eq-knob { transform: scale(1.12); }

/* ------------------------------- 用户中心 ------------------------------- */
.profile-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px;
  border-radius: var(--r-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  flex-wrap: wrap;
}
.profile-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(60% 120% at 8% 0%, var(--glow), transparent 62%);
  opacity: 0.9; pointer-events: none;
}
.profile-hero > * { position: relative; z-index: 1; }
.avatar-lg {
  width: 84px; height: 84px; flex: none;
  display: grid; place-items: center;
  border-radius: 26px;
  font-size: 30px; font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--on-brand);
  box-shadow: 0 14px 36px -12px var(--brand);
}
.profile-meta { flex: 1 1 220px; min-width: 0; }
.profile-name { font-size: 24px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.level-tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--on-brand); }
.level-tag.lv-master { background: linear-gradient(135deg, #a855f7, #ec4899); color: #fff; }
.level-tag.lv-hall { background: linear-gradient(135deg, #fbbf24, #f97316); color: #3b1d00; }
.profile-sign { font-size: 12.5px; color: var(--mute); margin-top: 5px; }
.level-bar { margin-top: 14px; max-width: 420px; }
.level-bar-top { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--mute); margin-bottom: 6px; }
.level-track { height: 7px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.level-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); box-shadow: 0 0 14px var(--glow); transition: width 0.9s var(--ease-out); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stat-card { padding: 15px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); }
.stat-card b { font-size: 24px; font-family: var(--font-num); display: block; line-height: 1.1; }
.stat-card span { font-size: 11.5px; color: var(--mute); }
.stat-card .ic { width: 18px; height: 18px; color: var(--brand); margin-bottom: 8px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; height: 42px; padding: 0 16px; font-size: 13.5px; font-weight: 600; color: var(--mute); white-space: nowrap; transition: color var(--dur); }
.tab:hover { color: var(--dim); }
.tab.on { color: var(--text); }
.tab.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2.5px; border-radius: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

.pref-tag { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 13px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-size: 12.5px; }
.pref-tag button { color: var(--mute); display: grid; place-items: center; }
.pref-tag button:hover { color: #f87171; }
.pref-tag .ic { width: 13px; height: 13px; }

/* 听歌报告 */
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.panel-card { padding: 18px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.hours { display: flex; align-items: flex-end; gap: 3px; height: 110px; }
.hours i { flex: 1; border-radius: 3px 3px 0 0; background: linear-gradient(to top, var(--brand), color-mix(in srgb, var(--brand-2) 80%, transparent)); min-height: 3px; transition: height 0.8s var(--ease-out); }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-row .nm { width: 92px; flex: none; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .tr { flex: 1; height: 8px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.bar-row .fl { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.bar-row .vv { width: 34px; text-align: right; color: var(--mute); font-family: var(--font-num); }

/* ------------------------------- 管理后台 ------------------------------- */
.admin-shell { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.admin-menu { display: flex; flex-direction: column; gap: 3px; position: sticky; top: calc(var(--top-h) + 8px); }
.admin-menu button {
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 14px;
  border-radius: 12px;
  font-size: 13px; font-weight: 600; color: var(--dim);
  text-align: left;
  transition: background var(--dur), color var(--dur);
}
.admin-menu button:hover { background: var(--panel-2); color: var(--text); }
.admin-menu button.on { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
.admin-menu .ic { width: 18px; height: 18px; }
.admin-body { min-width: 0; display: flex; flex-direction: column; gap: 18px; }

.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel); }
table.tb { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 620px; }
table.tb th { text-align: left; padding: 12px 14px; color: var(--mute); font-weight: 600; font-size: 11.5px; background: var(--panel-2); white-space: nowrap; }
table.tb td { padding: 12px 14px; border-top: 1px solid var(--line); white-space: nowrap; }
table.tb tr:hover td { background: var(--panel-2); }
table.tb .cell-main { display: flex; align-items: center; gap: 10px; }
table.tb img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; }
.status-dot i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.status-dot.banned i { background: #ef4444; }

.trend { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding-top: 8px; }
.trend .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; height: 100%; }
.trend .bar > i { width: 100%; border-radius: 6px 6px 0 0; background: linear-gradient(to top, color-mix(in srgb, var(--brand) 70%, transparent), var(--brand)); min-height: 4px; transition: height 0.9s var(--ease-out); }
.trend .bar > span { font-size: 9.5px; color: var(--mute); font-family: var(--font-num); }

.log-line { display: flex; gap: 10px; font-size: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.log-line time { color: var(--mute); font-family: var(--font-num); flex: none; }
.log-line b { color: var(--brand); font-weight: 600; flex: none; }

/* ------------------------------- 移动端组件 ------------------------------- */
.mobiletabs { display: none; }
.mobilebottom { display: none; }

@media (max-width: 767px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-menu { flex-direction: row; overflow-x: auto; position: static; scrollbar-width: none; }
  .admin-menu::-webkit-scrollbar { display: none; }
  .admin-menu button { flex: none; }

  .banner { height: 176px; }
  .banner-slide { padding: 22px 20px; }
  .banner-title { font-size: 21px; }
  .banner-sub { font-size: 12px; }

  .track-row { grid-template-columns: 26px 40px minmax(0, 1fr) auto; gap: 9px; padding: 8px 8px; }
  .track-row .track-album { display: none; }
  .track-cover { width: 40px; height: 40px; }
  .track-ops .icon-btn.opt-hide-mobile { display: none; }
  .track-dur { display: none; }

  .profile-hero { padding: 18px; gap: 14px; }
  .avatar-lg { width: 62px; height: 62px; border-radius: 20px; font-size: 23px; }
  .profile-name { font-size: 19px; }
  .modal-card { padding: 20px; border-radius: var(--r-md); }
  /* 窄屏下收紧弹窗标签栏：桌面 4 个 tab 需要 4×(4字×13.5px + 32px padding) + 12px gap ≈ 356px，
     而 390 视口下弹窗内容区只有 308px → 末项「关于本站」必须滑动才看得到。
     收紧到 12.5px/12px 后合计约 308px，主流手机（390/414/430）都能一次看全。 */
  .tab { padding: 0 12px; font-size: 12.5px; }
  .tab.on::after { left: 10px; right: 10px; }
  .toasts { bottom: calc(var(--player-h) + 78px); }

  .mobiletabs {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 70;
    height: 60px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    background: var(--glass-2);
    border-top: 1px solid var(--hair);
    backdrop-filter: blur(22px) saturate(1.6);
    -webkit-backdrop-filter: blur(22px) saturate(1.6);
  }
  .mobiletabs a {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    border-radius: 12px;
    font-size: 10.5px; color: var(--mute);
    transition: color var(--dur), background var(--dur);
  }
  .mobiletabs a .ic { width: 21px; height: 21px; }
  .mobiletabs a.active { color: var(--brand); }
  .mobiletabs a.active .ic { filter: drop-shadow(0 0 8px var(--glow)); }

  .mobilebottom {
    display: block;
    position: fixed;
    left: 0; right: 0; bottom: 60px;
    z-index: 69;
    background: var(--glass-2);
    border-top: 1px solid var(--hair);
    backdrop-filter: blur(22px) saturate(1.6);
    -webkit-backdrop-filter: blur(22px) saturate(1.6);
  }
  .mb-mini { display: flex; align-items: center; gap: 9px; height: 56px; padding: 0 10px; }
  .mb-cover { width: 38px; height: 38px; border-radius: 11px; object-fit: cover; flex: none; }
  .mb-info { flex: 1; min-width: 0; }
  .mb-title { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mb-sub { font-size: 10.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mb-mini-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--dim); flex: none; }
  .mb-mini-btn:active { background: var(--panel-3); }
  .mb-mini-play { width: 40px; height: 40px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--on-brand); }
  .mb-tabs { display: none; }
}

/* 平板：内容区留白缩减 */
@media (min-width: 768px) and (max-width: 1023px) {
  .banner { height: 208px; }
  .track-row { grid-template-columns: 34px 42px minmax(0, 1.8fr) minmax(0, 0.9fr) auto; gap: 11px; }
}

/* 工具类：可见性 */
.only-mobile { display: none !important; }
@media (max-width: 767px) {
  .only-mobile { display: grid !important; }
  .only-desktop { display: none !important; }
}
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 14px; }
