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

/* ------------------------------- 按钮 ------------------------------- */
.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; }

/* ---------------------------------------------------------------------------
 * 多选筛选的「回显条」（电台 / 音乐 / MV 三页共用）
 *   为什么需要它（不是装饰）：chip 行是 `overflow-x: auto` 的横向滚动容器，
 *   用户在一行里选了七八项之后，早先选中的那几颗早就滚出视野 ——
 *   没有回显条就只能靠记忆，而"记不清自己选了什么"正是多选最容易出错的地方。
 *   它同时是唯一的「清空」入口（逐颗点回去在滚动容器里做不到）。
 * ★ 间距一律用 `> * + * { margin-left }`，不用 flex `gap`：
 *   老 WebView（Chromium 66）的 flex gap 语法合法但不生效（本项目踩过）。
 * --------------------------------------------------------------------------- */
.filter-echo {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 0 10px;
  font-size: 12px;
}
.filter-echo > * + * { margin-left: 6px; }
.filter-echo > * { margin-top: 6px; }
.filter-echo-label { color: var(--mute); flex: none; }
.filter-echo-item {
  flex: none;
  max-width: 30vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 9px;
  border-radius: 999px;
  /* ★ 用主题 token，别写死颜色：本站有 30 套主题（含十来套浅色），
     写死 rgba(255,255,255,…) 在浅色主题上会变成一块看不见的斑。 */
  color: var(--brand);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
}
.filter-clear {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  cursor: pointer;
  font-size: 12px;
  border-radius: 999px;
  color: var(--mute);
  background: transparent;
  border: 1px solid var(--line-2);
}
.filter-clear > svg { margin-right: 3px; }
.filter-clear:hover { color: var(--text); border-color: var(--brand); }

/* ------------------------------- 卡片 ------------------------------- */
.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;
  top: 0; right: 0; bottom: 0; left: 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; top: 0; right: 0; bottom: 0; left: 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-ic-mini 同一套观感） */
.scene-card .scene-ic {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  color: var(--sc, var(--brand));
  background: color-mix(in srgb, var(--sc, var(--brand)) 15%, transparent);
}
.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; }

/**
 * ★ 特殊时段卡（v1.3.6）—— 后端按日期自动插入的那一张（高考 / 中考 / 考研 / 节假日）。
 *
 * 【设计取舍】要"一眼看出今天不一样"，但**不能**换掉整张卡的形态语言 ——
 *   它和旁边 5 张卡在同一个网格里，形态一改（换布局 / 加一条色带）就会显得
 *   是两个不同的组件拼在一起。所以只做三件事：
 *     ① 描边按时段主色加重；② 多出一行时段角标；③ 右下角圆标加一圈同色光晕。
 *   节日横幅那边可以用整片渐变（它独占一整行），这里不行。
 *
 * 【角标文案全部来自服务端】`period.badge`（「距离高考还有 3 天」/「今天是国庆节」），
 *   前端只负责画 —— 前端一旦自己算日期，跨零点必然出现"文案说高考、歌单是中考"。
 *
 * ★ 兼容写法：`color-mix()` 前一律**前置一条实色兜底**（老 WebView = Chromium 66
 *   不支持它，整条声明会被静默丢弃）；`display` 不用 flex `gap`，间距走 `margin-right`。
 */
.scene-card.is-period {
  border-color: var(--sc, var(--brand));
  border-color: color-mix(in srgb, var(--sc, var(--brand)) 62%, var(--line));
}
.scene-card.is-period::before { opacity: 0.36; }
.scene-card.is-period:hover::before { opacity: 0.52; }
.scene-card.is-period::after {
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.3), 0 0 0 4px color-mix(in srgb, var(--sc, var(--brand)) 22%, transparent);
}
.scene-period {
  display: flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--sc, var(--brand));
}
.scene-period .sp-emoji { margin-right: 4px; font-size: 12.5px; flex: none; }
.scene-period .sp-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/**
 * 场景卡的 ▶ 圆标（右下角）。
 *
 * ★ v1.3.0 起**所有**场景卡点击都是「播放这份歌单」（后端对每一张卡都会下发展开的
 *   list，见 recommend.js 的 sceneCardShape），所以圆标不再只给"运营精编"卡 ——
 *   只给一部分卡的话，用户在同一个网格里会看到两种行为，点下去完全不可预期
 *   （这正是之前"点错了/点了没反应"那类反馈的来源）。
 * ★ 只保留一个视觉差别：编辑精选 / 人工维护过的卡描边按主色加深（下面那条规则），
 *   用来区分"这份清单是运营点名的"。行为一致、观感有差，才是对的。
 * ★ 不用文字标签（"精选"）占用标题位 —— 卡片本来就窄，标题已经够挤。
 */
.scene-card::after {
  content: '▶';
  position: absolute;
  right: 14px;
  bottom: 15px;
  z-index: 1;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 9px;
  line-height: 1;
  padding-left: 1px;
  border-radius: 50%;
  color: #fff;
  background: var(--sc, var(--brand));
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.3);
  opacity: 0.92;
  transition: transform 0.34s var(--ease-out), opacity 0.34s;
}
.scene-card:hover::after { transform: scale(1.14); opacity: 1; }
.scene-card[data-curated='1'] {
  border-color: color-mix(in srgb, var(--sc, var(--brand)) 44%, var(--line));
}
/* 有动作行的卡把圆标让开，避免和「编辑 / 删除 / 另存」按钮叠在一起 */
.scene-card.has-acts::after { bottom: 52px; }
.scene-card.has-acts:hover .scene-acts { opacity: 1; transform: none; }

/* ------------------------------- 列表行 ------------------------------- */
.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;
  top: 0; right: 0; bottom: 0; left: 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; top: 0; right: 0; bottom: 0; left: 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; }

/* --------------------- 节日祝福横幅（v1.2.18，第 0 条） ---------------------
 * ★ 由服务端按日期自动加挂（lib/holidays.js），过完节自然消失。
 *   前端只认 `b.holiday` / `b.action`，**不自己算今天是什么节** ——
 *   日期只有一个真源，否则跨零点必然出现"文案说中秋、歌单是国庆"。
 *
 * ★ 为什么这条**没有底图**、只用渐变：
 *   其余 5 条是"内容入口"，一张实景图能预告点进去有什么；
 *   节日横幅要的是"一眼看出今天不一样"。套一张从搜索结果里捞来的封面，
 *   反而会和其它横幅混在一起。所以刻意留空 image（详见 recommend.holidayBanner），
 *   改由这里做区分：节庆渐变 + 一道缓慢扫过的光泽 + 左上角角标。
 *
 * ★ 光泽用 ::before（平时这层是底图，节日横幅没有 --bimg ⇒ 正好空出来），
 *   并**清掉 mask** —— 那是给"左实右虚"的底图用的，套在光泽上会让它只出现在左半边。
 */
.banner-slide.is-holiday::before {
  background-image: linear-gradient(115deg, transparent 34%, rgba(255, 255, 255, 0.17) 47%, transparent 60%);
  background-size: 240% 100%;
  background-repeat: no-repeat;
  background-position: 130% 0;
  -webkit-mask-image: none;
  mask-image: none;
  animation: bannerSheen 6s linear infinite;
}
@keyframes bannerSheen {
  from { background-position: 130% 0; }
  to { background-position: -70% 0; }
}
/* 尊重系统的"减少动态效果"：光泽是纯装饰，关掉不影响信息 */
@media (prefers-reduced-motion: reduce) {
  .banner-slide.is-holiday::before { animation: none; background-image: none; }
}
/* 渐变比照片更亮（中秋是琥珀金），把左侧压暗一层，白字才立得住 */
.banner-slide.is-holiday::after {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12) 58%, transparent 88%);
}

.banner-festive {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  margin-bottom: 2px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.banner-festive b {
  font-weight: 800;
  letter-spacing: 0.06em;
  /* 角标里"节日限定"四个字是功能标签，与后面的节日名拉开层次 */
  opacity: 0.96;
}
/* emoji 单独一层：给它一个跨平台的 emoji 字体栈，避免落到默认衬线体上变成方块 */
.banner-festive .bf-emoji {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  font-size: 13.5px;
  line-height: 1;
}

/* ---------------------- 横幅左右切换箭头（v1.2.17） ----------------------
 * ★ 位置为什么是「垂直居中 + 贴左右内沿」，而不是常见的 left: 16px：
 *   CTA 按钮从 .banner-slide 的 padding-left(40px) 处起始，且垂直方向也居中，
 *   箭头放 left:16px 必然压在按钮上（实测按钮 x 40..150 / y 99..137）。
 *   落在 40px 的 padding 留白带里（left:6px + 32px 宽 ⇒ 占 6..38）刚好不碰内容。
 * ★ 默认就给 0.62 的不透明度、不搞「hover 才出现」：
 *   平板是触摸设备，**根本没有 hover**，隐藏式箭头在平板上等于不存在。
 *   做成"常态半透明、悬停/聚焦变实"，鼠标和手指都找得到。
 * ★ 手机端（≤767）隐藏：那一段 slide 的 padding 只剩 20px，塞不下箭头而不压 CTA；
 *   且用户明确要求手机/平板用**手指左右滑动**切换（滑动由 views.js 的 Pointer 事件实现）。
 * ★ touch-action: pan-y（见 .banner）—— 告诉浏览器"纵向滚动归你、横向手势归我"，
 *   否则手机横滑会被判成页面滚动而抖动。 */
.banner { touch-action: pan-y; }
.banner-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0.62;
  transform: translateY(-50%);
  transition: opacity var(--dur), background var(--dur), transform var(--dur);
}
.banner-arrow .ic { width: 17px; height: 17px; stroke-width: 2.4; }
.banner:hover .banner-arrow,
.banner-arrow:focus-visible { opacity: 1; }
.banner-arrow:hover { background: rgba(0, 0, 0, 0.56); }
.banner-arrow.prev { left: 6px; }
.banner-arrow.next { right: 6px; }
.banner-arrow.prev:hover { transform: translateY(-50%) translateX(-2px); }
.banner-arrow.next:hover { transform: translateY(-50%) translateX(2px); }
@media (max-width: 767px) { .banner-arrow { display: none; } }

/* ------------------------------ 骨架屏 ------------------------------ */
.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; top: 0; right: 0; bottom: 0; left: 0; z-index: 120; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 20px; }
.modal-mask { position: absolute; top: 0; right: 0; bottom: 0; left: 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); }
/* ★ v1.2.11：time 的缩略图原来是硬编码深褐（#3a2712/#1a1109）——
   和真实导航轨一样改成主题派生，否则"预览"和"切过去"两回事。 */
.pv-time .pv-nav { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 36%, var(--bg-2)), color-mix(in srgb, var(--brand) 12%, var(--bg-1))); border: 1px solid color-mix(in srgb, var(--brand) 42%, transparent); 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), color-mix(in srgb, var(--text) 8%, transparent)); border: 1px solid color-mix(in srgb, var(--text) 20%, transparent); box-shadow: 0 6px 18px -8px var(--tint); }
.pv-crystal .pv-lines i:first-child { background: linear-gradient(90deg, var(--brand), transparent); }
/* ★ v1.3.2 film：「预览和切过去两回事」是这个项目反复踩的坑（见上面 time 那段），
   所以缩略图也必须画成胶片：轨道 + 两侧齿孔点 + 第一格是曝光画格。 */
.pv-film .pv-nav { background: color-mix(in srgb, var(--bg-2) 62%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 34%, transparent); border-radius: 6px; }
.pv-film .pv-nav::before {
  content: "";
  position: absolute;
  top: 3px; right: 2px; bottom: 3px; left: 2px;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--text) 26%, transparent) 0.9px, transparent 1.3px);
  background-size: 3px 6px;
  background-repeat: repeat;
}
.pv-film .pv-lines i:first-child { background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

/* ==================== 主题真实预览卡（v1.2.11） ====================
   取代原来的 `.swatches`（3 个 18px 色块）。
   颜色全部由 JS 从该主题的实际计算值注入（--p-* 见 ui.js 的 themePreview()），
   所以这张卡永远等于"切过去之后的样子"，不存在手抄色值过期的问题。

   ★ 必须显式写 margin: 0 —— 上面 `.opt span { display:block; margin-top:3px }`
     会命中卡内每一个 <span>，绝对定位元素上加 margin-top 会叠加到 top 上，
     实测会把纵向布局整体推低 3px、底部内容被裁。 */
.opt-preview.tp {
  height: 74px;
  margin-bottom: 10px;
  background: var(--p-bg, #12121c);
  border-color: var(--p-line, var(--line));
}
.opt-preview.tp > * { position: absolute; margin: 0; pointer-events: none; }
.tp-amb {
  top: 0; right: 0; bottom: 0; left: 0;
  background:
    radial-gradient(58% 56% at 16% 4%, var(--p-amb1, transparent), transparent 68%),
    radial-gradient(42% 50% at 88% 0%, var(--p-amb2, transparent), transparent 72%);
}
.tp-sig { top: 0; right: 0; bottom: 0; left: 0; background-image: var(--p-sig, none); background-size: 100% 100%; opacity: var(--p-sigop, 0.9); }
.tp-rail {
  left: 5px; top: 5px; bottom: 5px; width: 17px;
  border-radius: 9px;
  background: var(--p-glass, var(--p-panel));
  border: 1px solid var(--p-hair, var(--p-line));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.tp-rail i { width: 7px; height: 7px; border-radius: 50%; background: var(--p-dim, #888); }
.tp-rail i:first-child { background: var(--p-brand); box-shadow: 0 0 7px var(--p-brand); }
.tp-top { left: 28px; right: 7px; top: 6px; height: 13px; display: flex; align-items: center; gap: 5px; }
.tp-top i { width: 13px; height: 13px; border-radius: 5px; flex: none; background: linear-gradient(135deg, var(--p-brand), var(--p-brand2)); }
.tp-top b { flex: 1; min-width: 0; height: 9px; border-radius: 99px; background: var(--p-panel); border: 1px solid var(--p-line); }
.tp-body { left: 28px; right: 7px; top: 26px; bottom: 6px; display: flex; flex-direction: column; gap: 5px; }
.tp-body i { height: 8px; border-radius: 5px; background: var(--p-line2, var(--p-line)); }
.tp-body i:nth-child(1) { width: 62%; background: linear-gradient(90deg, var(--p-brand), var(--p-brand2)); opacity: 0.85; }
.tp-body i:nth-child(2) { width: 86%; }
.tp-body i:nth-child(3) { width: 44%; }

/* ------------------------------- 提示条 ------------------------------- */
.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; top: 0; right: 0; bottom: 0; left: 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; }
/* 用户页首屏快捷操作：外观风格 + 退出登录。
   ★ 「退出登录」原来只藏在「账号设置」tab 里，登录后第一屏看不到（用户反馈"没找到退出按钮"）。
   flex:1 1 100% 让它单独占一行、落在整个 hero 的最下方，不会挤乱头像/资料/统计三块。 */
.profile-quick {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.profile-quick .btn { flex: none; }
.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; }

/* 调度说明（推荐预检面板）。
   ★★ 必须是 display: block —— 这里踩过一次坑：
      第一版写成 `display: grid; grid-template-columns: minmax(0,1fr)`，
      想的是"用显式列防止窄屏横向溢出"。但 grid 容器会把**每一个直接子元素**
      都变成 grid item，而这段文案里的 `<b>` 和 `<br>` 全是直接子元素 ——
      结果每个 `<b>` 各占一行、每个 `<br>` 还额外撑一行，
      三行文案被摊成七八行，整块从 ~60px 撑到 ~200px，
      连带把下面的「立即预检」主按钮顶到了固定播放条底下（点不到）。
      要防横向溢出，用 min-width:0 + overflow-wrap 就够了，不需要 grid。 */
.pc-sched { display: block; margin-top: 12px; padding: 11px 13px; border-radius: var(--r-md); background: var(--panel-2, var(--panel)); border: 1px solid var(--line); font-size: 12px; line-height: 1.85; color: var(--mute); min-width: 0; overflow-wrap: anywhere; }
.pc-sched b { color: var(--text); font-weight: 600; }

.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; }
  /*
   * ★★ 「手机版用户中心找不到切换风格」的可发现性修复 ★★
   *   默认顺序是 头像 → 资料 → 统计卡 → 快捷操作。窄屏上 4 张统计卡会折成多行，
   *   把快捷操作一路推到很下面：实测 280×653（折叠屏外屏）上
   *   .profile-quick 落在 y=801 底=849 —— 视口只有 653 高，**整整在首屏外 196px**，
   *   用户进入「我的」第一屏根本看不到它（这正是"没找到"的现场）。
   *   这里用 flex order 把它提到统计卡之前：三档手机都落进首屏。
   *   ★ order 只在本段（≤767）写；桌面不写，保持"头像/资料/统计 一行 + 快捷操作 一行"的版式。
   */
  .profile-hero .avatar-lg { order: 1; }
  .profile-hero .profile-meta { order: 2; }
  .profile-quick { order: 3; }
  .profile-hero .stat-grid { order: 4; }
  /* 分隔线跟着搬家：它现在是"资料区/快捷操作"与"统计卡"之间的分隔，不再是 hero 页脚 */
  .profile-quick { border-top: 0; border-bottom: 1px solid var(--line); padding-top: 2px; padding-bottom: 14px; }
  .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; }
  /* toast 也要落在两条栏之上：底栏 + 迷你条 + 12 呼吸。
     原来写 calc(var(--player-h) + 78px)，同样是在拿已隐藏的播放条当基数。 */
  .toasts { bottom: calc(var(--mtabs-h) + var(--mb-mini-h) + 12px); }

  .mobiletabs {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 70;
    /*
     * ★ 高度已含安全区（见 index.html 的 #mobileBarMetrics）：
     *   --mtabs-h = 60px + env(safe-area-inset-bottom)。
     *
     *   ★ 语义澄清（容易搞反）：本项目全局是 `box-sizing: border-box`
     *     （base.css:621），所以这里的 height 是**含 padding 的总高** ——
     *     60px 里已经包含了上 6 + 下 6，留给内容的只有 48px。
     *     这正是「客户端」标签差点被压住的算术根源：
     *     21px 图标 + 2px gap + 14.7px 行盒 = 37.7px，塞进 48px 只剩 5.1px/侧。
     *     下面把图标收到 20px、行高定死为 1（行盒 == 字号 10.5）后，
     *     内容降到 32.5px，余量回到 15.5px —— 两个方向都留得住。
     *
     *   ★ 安全区为什么并进 height 而不是只放 padding：
     *     底栏是 `bottom: 0`，全面屏/手势导航机型上系统会占用
     *     env(safe-area-inset-bottom)（约 34px）。若安全区只在 padding 而
     *     height 固定 60，在 border-box 下 padding 会被吃掉内容空间，
     *     文字就会被顶到贴边；并进 height 后底栏总高自动变成 60+inset，
     *     "让开底部"的各处 calc 也一并把安全区算进去，无需各自关心。
     */
    height: var(--mtabs-h);
    padding: 6px 8px calc(6px + var(--safe-b, 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;
    /*
     * ★★ 底栏 5 格 + 「客户端」溢出修复（手机端实测）。
     *   5 格平分 390 视口 ⇒ 每格 (390-16)/5 = 74.8px。
     *   但 `flex: 1` 的**基数是 flex-basis:auto**（= 内容宽），3 字标签「客户端」
     *   在 10.5px 下约 31.5px、图标 21px，本身不超 74.8 —— 真正的问题在**下边距**：
     *   .mobiletabs 高 60 含 padding 6/6 ⇒ 内容盒 48px，
     *   而 a 内是 21px 图标 + gap 2 + 行高约 14.7 = 37.7px，居中后**底边距只剩 5.1px**，
     *   标签文字下沿几乎贴住 60px 分界线；一旦字体渲染的行盒比 14.7 略高
     *   （不同厂商 WebView 的 line-height:normal 算法不同），文字就会**越过底栏上沿、
     *   被 z-index 更大的迷你条压住**——这正是截图里「客户端」下半截被吃掉的原因。
     *   这里做两件事：① 行高显式定死，不再依赖 normal；
     *   ② 图标缩小 1px + 行高收紧，把内容高从 37.7 降到 32.5，上下各留 7.8px 余量。
     *   ★ 注意 min-width: 0 是必须的：默认 min-width:auto 会让 flex 项**拒绝收缩**，
     *     5 格总宽超过容器时不是均分而是**溢出**，右端会被裁掉。
     */
    min-width: 0;
    line-height: 1;
    font-size: 10.5px; color: var(--mute);
    transition: color var(--dur), background var(--dur);
  }
  .mobiletabs a > span {
    /* 3 字标签（客户端）在超窄屏允许再缩一档，避免与图标宽度打架 */
    max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .mobiletabs a .ic { width: 20px; height: 20px; }
  .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: var(--mtabs-h);
    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: var(--mb-mini-h); 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-mini-btn:active` 的特异性是 (0,2,0)，比 `.mb-mini-play` (0,1,0) 高，
     不加这条的话**按下瞬间品牌渐变会被灰色 --panel-3 顶掉** —— 用户看到的"闪一下"里，
     有一半是圆按钮突然变灰（另一半是系统点按高亮，见 base.css 的 -webkit-tap-highlight-color）。
     主行动按钮不该在按下时失去自己的颜色，用亮度变化表达按下即可。 */
  .mb-mini-btn.mb-mini-play:active {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    filter: brightness(0.92);
  }
  .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; }
/**
 * 通用隐藏类（后台表格即时筛选用，见 views.js 的 viewAdmin input 委托）。
 * ★ 用 `!important` 是有意的：命中的行上可能带着 `display: flex/grid` 之类的布局
 *   声明（如 `tr.is-off` 的降透明），只写 `display:none` 会被特定性更高的规则盖掉，
 *   表现是"搜了没反应"——而搜索不生效是最容易让人以为程序坏了的一类故障。
 */
.hide { display: none !important; }

/* =====================================================================
 * 分页器（「更多场景」页底部）
 * ---------------------------------------------------------------------
 * ★ 页码做成 <a href="#/scenes?..."> 而不是按钮 + JS：
 *   路由本来就是 hash，锚点白拿「中键新开 / 长按预览 / 浏览器后退回上一页」。
 *   自己维护一个 page 变量反而会在"后退"时和地址栏对不上。
 * ===================================================================== */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 20px 0 6px;
  border-top: 1px dashed var(--line);
  margin-top: 6px;
}
.pager-slim { border-top: 0; padding: 12px 0 0; }
.pager .pg-info { font-size: 12px; color: var(--mute); margin-left: 6px; }
.pager .pg-gap { color: var(--mute); padding: 0 2px; }
.pager .pg-nums { display: inline-flex; align-items: center; gap: 4px; }
.pg-num,
.pg-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  min-width: 32px;
  padding: 0 11px;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition: border-color var(--dur), background var(--dur), color var(--dur);
}
.pg-num:hover,
.pg-btn:hover { border-color: var(--line-2); background: var(--panel-2); }
.pg-num.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 700; }
.pg-btn.is-off { opacity: 0.4; pointer-events: none; }
.pg-btn .ic { width: 14px; height: 14px; }
@media (max-width: 560px) {
  /* 窄屏上"上一页/下一页"两个词组会挤掉页码，只留箭头 */
  .pg-btn { padding: 0 9px; font-size: 0; gap: 0; }
  .pg-btn .ic { font-size: initial; }
  .pager .pg-info { width: 100%; text-align: center; margin: 4px 0 0; }
}

/* 「更多场景」的筛选条比通用 chipbar 多一个计数角标 */
.scene-chips .chip b {
  margin-left: 5px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.62;
  font-variant-numeric: tabular-nums;
}

/* =====================================================================
 * 场景卡上的动作行（编辑 / 删除 / 另存）
 * ---------------------------------------------------------------------
 * ★ 默认 opacity:0、悬停才出现，但**必须**给 `:focus-within` 也加上：
 *   键盘 Tab 到按钮上时如果看不见它，"能用键盘操作"就是假的。
 * ★ 卡片整体是 role=button，动作按钮 click 会冒泡到卡片的"播放全部"分支 ——
 *   已在 app.js 的 data-scene 分支里用 [data-act] 判断拦掉了。
 * ===================================================================== */
.scene-acts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--dur), transform var(--dur);
}
.scene-card:hover .scene-acts,
.scene-card:focus-within .scene-acts { opacity: 1; transform: none; }
.scene-act {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  color: var(--dim);
  font-size: 11.5px;
  cursor: pointer;
  transition: color var(--dur), border-color var(--dur), background var(--dur);
}
.scene-act:hover { color: var(--text); border-color: var(--line-2); background: var(--panel-2); }
.scene-act.is-danger:hover { color: #ef4444; border-color: color-mix(in srgb, #ef4444 42%, var(--line)); }
.scene-act .ic { width: 13px; height: 13px; }
@media (max-width: 767px) {
  /* 触屏没有 hover：动作必须常显，否则等于没有这个功能 */
  .scene-acts { opacity: 1; transform: none; }
}
.scene-meta { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.scene-ic-mini {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: none;
  color: var(--sc, var(--brand));
  background: color-mix(in srgb, var(--sc, var(--brand)) 16%, transparent);
}
.scene-ic-mini .ic { width: 16px; height: 16px; }
.tb tr.is-off > td { opacity: 0.52; }

/* =====================================================================
 * 场景编辑器（弹窗内）
 * ---------------------------------------------------------------------
 * ★ 弹窗里所有样式都挂在 `.se-` 前缀下：这些元素只在场景编辑、场景选择器
 *   两处出现，必须与通用 `.list-row` / `.mini-btn` 的既有语义互不干扰。
 * ===================================================================== */
.se-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid color-mix(in srgb, var(--sc, var(--brand)) 34%, var(--line));
  background: linear-gradient(140deg, color-mix(in srgb, var(--sc, var(--brand)) 20%, transparent), transparent 76%);
}
.se-hero .scene-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; background: var(--sc, var(--brand)); flex: none; }
.se-hero .scene-ic .ic { width: 22px; height: 22px; }
.se-hero b { font-size: 15px; }
.se-hero i { display: block; font-style: normal; font-size: 11.5px; color: var(--dim); margin-top: 2px; }

.se-icons { display: flex; flex-wrap: wrap; gap: 6px; max-height: 132px; overflow-y: auto; padding: 2px; }
.se-icon {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
  color: var(--dim); cursor: pointer; transition: all var(--dur);
}
.se-icon:hover { color: var(--text); border-color: var(--line-2); }
.se-icon.on { color: var(--on-brand); background: var(--brand); border-color: var(--brand); }
.se-icon .ic { width: 17px; height: 17px; }

.se-colors { display: flex; flex-wrap: wrap; gap: 6px; }
.se-color {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid transparent; background: var(--c, var(--brand));
  cursor: pointer; position: relative; transition: transform var(--dur);
}
.se-color:hover { transform: scale(1.12); }
.se-color.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg-0) inset; }

.se-list { display: flex; flex-direction: column; gap: 2px; max-height: 268px; overflow-y: auto; }
.se-item {
  display: grid;
  grid-template-columns: 22px 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  transition: background var(--dur);
}
.se-item:hover { background: var(--panel-2); }
.se-no { font-size: 11.5px; color: var(--mute); text-align: center; font-variant-numeric: tabular-nums; }
.se-pic { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; background: var(--panel-2); }
.se-info { min-width: 0; }
.se-info b { display: block; font-size: 12.5px; }
.se-info i { display: block; font-style: normal; font-size: 11px; color: var(--dim); }
.se-empty { padding: 22px 12px; }

.se-pick { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; margin-top: 10px; }
.se-hit {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  color: var(--text);
  cursor: pointer;
  transition: background var(--dur), border-color var(--dur);
}
.se-hit:hover { background: var(--panel-2); border-color: var(--line); }
.se-hit img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; }
.se-hit b { display: block; font-size: 12.5px; }
.se-hit i { display: block; font-style: normal; font-size: 11px; color: var(--dim); }
.se-hit .ic { width: 15px; height: 15px; color: var(--brand); }
.se-hit-ic {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  color: var(--sc, var(--brand)); background: color-mix(in srgb, var(--sc, var(--brand)) 16%, transparent);
}
.se-hit-ic .ic { width: 17px; height: 17px; }
/* 已加入 / 已满的行置灰且不可点 —— 让"为什么点不动"一眼可见 */
.se-hit.is-on,
.se-hit[disabled] { opacity: 0.5; cursor: not-allowed; }
.se-hit[disabled] .ic { color: var(--mute); }
.se-picking { display: flex; align-items: center; gap: 8px; padding: 18px; justify-content: center; color: var(--mute); font-size: 12.5px; }
.se-picking .ic { width: 16px; height: 16px; animation: spin 1s linear infinite; }
.se-foot { margin-top: 4px; align-items: center; }
.se-msg { font-size: 12px; color: var(--brand); }
.se-msg.is-err { color: #ef4444; }
.se-hint .ic { color: #f59e0b; }

/* 后台 Banner 编辑行 */
.banner-row {
  position: relative;
  padding: 14px 14px 4px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.banner-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  grid-column: 1 / -1;
}
.banner-row-head .mini-btn.is-danger:hover { color: #ef4444; }

/* ==========================================================================
   伴唱榜（v1.3.6）：卡片上的「伴唱」标签 / 热度 / 高清角标 / 榜单说明一句话
   --------------------------------------------------------------------------
   ★ 老 WebView（Android 9 自带 Chromium 66）口径：**不用 flex 的 gap**
     （语法合法但实际无效，`CSS.supports()` 还返回 true，判不出来），
     图标与文字之间的间距一律用 margin 补。
   ★ 高清角标（.is-hd）刻意与普通 MV 的"曲风"角标区分：金色渐变，
     一眼能看出这条是**真高清伴唱**，而不是"名字里带高清"。
   ========================================================================== */
.acc-tag {
  display: inline-flex; align-items: center; vertical-align: middle;
  height: 16px; padding: 0 6px; margin-left: 6px;
  border-radius: 999px;
  font-size: 10px; font-weight: 700; line-height: 1;
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
}
.acc-tag .ic { width: 11px; height: 11px; margin-right: 3px; }
.acc-hot {
  display: inline-flex; align-items: center; vertical-align: middle;
  margin-left: 6px;
  font-size: 11px; font-weight: 600; line-height: 1;
  color: #f59e0b;
}
.acc-hot .ic { width: 11px; height: 11px; margin-right: 2px; }
.card-badge.is-hd { background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; }
.board-desc { margin: 4px 0 0; font-size: 12.5px; color: var(--mute); }

/* =====================================================================
 * 手机端弹窗：抽屉式 + 常驻「完成」（2026-10-17 用户反馈修复）
 * ---------------------------------------------------------------------
 * 用户原话：「点风格样式选择弹出太大，点了后没有区域点击退出风格样式」。
 * 实测（390×844）旧实现的两个真问题：
 *   ① `.modal-card` 是 `max-height: 88vh` + 26px 内边距，主题卡又是单列
 *      （内容宽 298 < 2×150+12），一屏只放得下 3 张卡 —— 弹窗确实过大；
 *   ② 关闭按钮 `.modal-close` 是 `position:absolute` 跟着卡片一起滚走，
 *      遮罩只剩上下各 6vh（约 50px）能点 —— 滚到中间时**没有任何可点退出的地方**。
 * 现在：改成底部对齐的抽屉（上方留 24vh 可点退出的遮罩）+ 主题卡两列压缩
 *      + 每个弹窗尾部插一条 `position: sticky` 的「完成」（见 ui.js#openModal）。
 * ★ 老引擎口径：不用 gap 简写以外的现代函数（min/max/clamp 一律前置定值）。
 * ===================================================================== */
@media (max-width: 767px) {
  .modal { padding: 12px; align-items: end; }
  .modal-card { width: 100%; max-height: 76vh; padding: 20px 16px 18px; border-radius: 20px; }
  .modal-card.modal-wide { width: 100%; }
  .modal-title { font-size: 17px; padding-right: 34px; }
  .modal-desc { font-size: 12px; margin-bottom: 14px; }

  /* 主题 / 导航风格 / 皮肤：两列，预览图压扁 —— 一屏能扫 6~8 套
     ★ 只写 `grid-gap`（老引擎的官方别名，Chromium 66 起就是 grid 的标准写法）：
       替掉原来那句 `gap: 10px` 双声明 —— 在 grid 容器上两者等价，
       但全仓的巡检脚本一律把 `gap:` 当作"flex 间距"红灯（见 test-accompaniment-board 的 J 组），
       留着它只会让后来人误判"这里用了无效的 flex gap"。 */
  .opt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 10px; }
  .opt { padding: 10px; border-radius: 14px; }
  .opt b { font-size: 12.5px; }
  .opt span { font-size: 10.5px; line-height: 1.4; margin-top: 2px; }
  .opt .opt-check { right: 8px; top: 8px; }
  .opt-preview { height: 46px; margin-bottom: 8px; border-radius: 10px; }
  .opt-preview.tp { height: 58px; margin-bottom: 8px; }
  /* 预览卡内部是按 px 定位的，压扁时必须同步收一遍，否则底部的三条线会溢出去 */
  .opt-preview.tp .tp-rail { width: 15px; top: 4px; bottom: 4px; left: 4px; }
  .opt-preview.tp .tp-top { left: 24px; top: 5px; height: 11px; }
  .opt-preview.tp .tp-top i { width: 11px; height: 11px; }
  .opt-preview.tp .tp-body { left: 24px; top: 21px; bottom: 5px; }
  .opt-preview.tp .tp-body i { height: 6px; }
  .opt-preview.tp .tp-body i + i { margin-top: 4px; }

  /* 常驻「完成」：position: sticky 在滚动容器里，卡片滚到哪它都在底部 */
  .modal-foot {
    position: sticky;
    bottom: -18px;
    z-index: 3;
    margin: 14px -16px -18px;
    padding: 10px 16px 12px;
    background: linear-gradient(to top, var(--glass-2) 58%, transparent);
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: center;
  }
  .modal-foot .btn { min-width: 140px; justify-content: center; }
}
