/* ============================================================
   歌单站点样式
   全部颜色来自构建时注入的 token（见 build.js → tools/color.js）。
   基础色在 Excel「主播信息」表里填：主题色 / 强调色 / 背景色 / 文字色，
   其余（弱化文字、描边、卡片、悬停态）自动推导并保证对比度。
   ============================================================ */

/* hidden 属性必须真的不渲染。
   浏览器默认的 [hidden]{display:none} 会被任何作者样式里的 display 盖掉
   （.gj-btn 就是 display:inline-flex），而两者优先级同为 0-1-0，
   谁在后面谁赢 —— 所以这里用 !important 兜住。
   踩过两次：一次是「已选」空栏占了 60px，一次是直播间按钮藏不住。 */
[hidden] { display: none !important; }

:root {
  --brand: #3d6b96;            /* 主题色：激活态、实心按钮 */
  --brand-strong: #3d6b96; /* 压白字用的加深版，对比度已校验 */
  --brand-text: #3d6b96;   /* 在卡片上可读的主题色 */
  --accent: #98badd;          /* 强调色：悬停、高亮底 */
  --accent-soft: #bcd2e9;
  --bg: #d6e6f3;                  /* 页面背景 */
  --bg-deep: #bed2e4;        /* 背景渐变末端 */
  --card: #fdfefe;
  --chip-bg: #edf4fa;
  --hover: #d3e1f0;
  --line: #c9d6e1;
  --ink: #4f4642;                /* 正文/标题 */
  --ink-soft: #747475;
  --ink-faint: #8f9398;
  --new-bg: rgba(247,163,120,0.18);
  --paid-bg: rgba(240,200,90,0.20);
  --locked-bg: rgba(113,110,110,0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 16px rgba(153,158,163,0.13);
  --shadow-lift: 0 6px 22px rgba(140,142,146,0.26);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  background-image: linear-gradient(178deg, var(--bg) 0%, var(--bg) 42%, var(--bg-deep) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font: 15px/1.6 "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { border: 0; }

.gj-wrap { max-width: 1180px; margin: 0 auto; padding: 24px 18px 64px; }

/* ---------------- 头部 ----------------
   三个大块（头部/面板/列表）用 rgba(253,254,254,0.25) 而不是 var(--card)：
   前者可以是半透明的，让背景图透出来。--card 本身保持不透明 ——
   按钮、标签等小控件还引用它，跟着变透会糊成一片。 */
.gj-head {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: rgba(253,254,254,0.25);  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px; margin-bottom: 16px;
  border: 1px solid rgba(239,239,239,0.7);
}
.gj-avatar {
  width: 78px; height: 78px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  box-shadow: 0 0 0 3px var(--card), 0 0 0 5px rgba(152,186,221,0.55);
}
/* ============================================================
   选歌区半透背景图
   ------------------------------------------------------------
   固定层垫在内容后面。**不能用 z-index:-1** —— body 自己带
   background，负 z-index 会被压到 body 背景之后，等于白设（踩过）。
   正确做法：z-index:0 让固定层盖住 body 背景，再把内容抬到 1。
   pointer-events:none 保证它不吃点击。
   ============================================================ */
/* 半透背景层。铺法由「背景铺法」配置决定，内联在元素上；
   这里的默认值跟「循环」一致 —— 手改 HTML 也不会掉回会裁切的 cover。
   ★ 默认改成上下循环：素材高度不够时接着铺，
     任何视口高度都填满、不裁切，图案大小也不随视口乱变。 */
.gj-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-repeat: repeat-y;
  background-size: 100% auto;
  background-position: center top;
}
.gj-wrap { position: relative; z-index: 1; }

/* ============================================================
   舰长礼物栏（独立大 banner + 无缝循环 + 圆点分页）
   ------------------------------------------------------------
   ★ 它**不能**塞进头部卡片：头部全宽 1098px，按 2:1 要 570px 高，
     头部会涨到 860px（比手机整屏还高）。所以是独立一条。
   位移方案参考 B 站首页的 vui_carousel（transform + 首尾克隆），
   详见下面 .gj-gift__track 的注释。
   ============================================================ */
.gj-gift { position: relative; margin: 0 0 16px; }
/* 两个面板（舰长礼物 / 插画展示）叠在同一位置，靠 hidden 切换。
   用 grid 叠放而不是 absolute —— 高度由内容撑开，切换时不会跳。 */
.gj-gift__pane { display: grid; }
.gj-gift__pane[hidden] { display: none; }
/* 切换按键：压在图上、右上角（和左上角标题角标错开） */
.gj-gift__switch {
  position: absolute; right: 14px; top: 12px; z-index: 4;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 12.5px/1 inherit; letter-spacing: .3px;
  color: #fff; background: rgba(0, 0, 0, .34);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background-color .18s ease, transform .18s ease;
}
.gj-gift__switch:hover { background: rgba(0, 0, 0, .5); }
.gj-gift__switch:active { transform: scale(.96); }
.gj-gift__switch:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gj-gift__switch-ico { font-size: 13px; opacity: .9; }
@media (max-width: 640px) {
  .gj-gift__switch { right: 10px; top: 9px; padding: 3px 9px; font-size: 11.5px; }
  .gj-gift__switch-ico { font-size: 12px; }
}
/* 标题压在图上、左上角 —— 不再单独占一行。
   所以 .gj-gift 的高度就是图的高度，标题不占版面空间。
   加半透明底：素材深浅不定，没有底衬的话白字会糊在浅色图上。 */
.gj-gift__h {
  position: absolute; left: 14px; top: 12px; z-index: 3;
  margin: 0; padding: 4px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .3px;
  color: #fff; background: rgba(0, 0, 0, .34);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  pointer-events: none;                /* 别挡住底下的图/链接 */
}
@media (max-width: 640px) {
  .gj-gift__h { left: 10px; top: 9px; padding: 3px 9px; font-size: 11.5px; }
}
/* 视口：裁掉溢出的一格，圆点靠它做绝对定位 */
.gj-gift__vp {
  position: relative;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(239,239,239,0.7); box-shadow: var(--shadow);
  background: var(--chip-bg);
}
/* 轨道 —— 做法参考 B 站首页的 vui_carousel：
   ① 用 transform 位移，不用 scrollLeft：只走合成层，不触发重排/重绘
   ② 容器宽度 = 一格（width:100% + 子项 flex:0 0 100% 且溢出），
      于是 translateX(-100%) 天生就是「移动一格」——
      不用读 clientWidth、不用像素换算，窗口尺寸怎么变都不会错位
   ③ touch-action:pan-y 把横向手势收给 JS，纵向仍归浏览器 */
.gj-gift__track {
  display: flex; width: 100%;
  transform: translateX(var(--tx, 0%));
  transition: transform var(--gj-gift-dur, .38s) ease-in-out;
  will-change: transform;
  touch-action: pan-y;
}
/* 归位那一下要「瞬间」跳，靠 JS 临时把 transition 设为 none */
@media (prefers-reduced-motion: reduce) { .gj-gift__track { transition: none; } }
.gj-gift__i {
  position: relative; flex: 0 0 100%;
  display: block; text-decoration: none; color: inherit;
  aspect-ratio: 16 / 9; 
}
/* 相邻格的状态类（跟 B 站 vui_carousel__slide--current/prev/next 一个意思）：
   主要给懒加载用 —— 只加载当前和左右相邻的图 */
.gj-gift__i--prev, .gj-gift__i--next { z-index: 1; }
.gj-gift__i img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 标题压底部（B 站头图的做法）。有圆点时底部多留一截给它们让位 */
.gj-gift__t {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 46px 18px 16px; font-size: 15px; font-weight: 600; color: #fff; line-height: 1.45;
  background: linear-gradient(transparent, rgba(0, 0, 0, .28) 34%, rgba(0, 0, 0, .66));
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
}
.gj-gift__vp[data-dots] .gj-gift__t { padding-bottom: 40px; }

/* 圆点压在图上、左下角（跟 B 站头图一致）。
   放在图外面会多占一行、也和「图片轮播」的语义脱节。 */
.gj-gift__dots {
  position: absolute; left: 18px; bottom: 15px; z-index: 2;
  display: flex; align-items: center; gap: 6px;
}
.gj-gift__dot {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .5);
  transition: width .26s ease, background-color .2s ease, transform .2s ease;
}
.gj-gift__dot:hover { transform: scale(1.2); }
/* 当前页拉长成胶囊 —— 比单纯变色更容易一眼看出在第几张 */
.gj-gift__dot.on { width: 20px; background: #fff; }
.gj-gift__dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 640px) {
  .gj-gift__dots { left: 12px; bottom: 11px; gap: 5px; }
  .gj-gift__dot { width: 6px; height: 6px; }
  .gj-gift__dot.on { width: 16px; }
  .gj-gift__t { padding: 34px 14px 12px; font-size: 13.5px; }
  .gj-gift__vp[data-dots] .gj-gift__t { padding-bottom: 32px; }
}

/* ============================================================
   装饰猫（摇头）
   ------------------------------------------------------------
   只动 transform（合成层，不触发重排/重绘），
   每只用 --i 错开相位，看起来才不像整齐划一的机器人。
   ============================================================ */
.gj-cats {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2;   /* 要盖在背景层之上 */
  display: flex; justify-content: space-around; align-items: flex-end;
  pointer-events: none;                 /* 纯装饰，别挡点击 */
  opacity: .95;
}
.gj-cat {
  width: clamp(44px, 7.5vw, 88px); height: auto; display: block;
  transform-origin: 50% 92%;            /* 支点放脚底附近，晃动才自然 */
  animation: gj-cat-bob 2.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.42s);   /* 负延迟立刻错开，不用等 */
}
/* 猫是 fixed 的，会盖住列表末尾 —— 只在真的有猫时给页面留出等高空间，
   否则最后几首歌永远被压在猫下面点不到（没猫时不留空白） */
body.has-cats { padding-bottom: clamp(44px, 7.5vw, 88px); }
@keyframes gj-cat-bob {
  0%, 100% { transform: rotate(-3.5deg) translateY(0); }
  50%      { transform: rotate(3.5deg) translateY(-3px); }
}
/* 页面不可见时停住：无限 CSS 动画在后台标签也会持续消耗 CPU/电量 */
.gj-hidden-anim .gj-cat,
.gj-hidden-anim .gj-live-dot { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  .gj-cat { animation: none; }
  /* 礼物栏的 transition:none 写在它自己那一块里（原来这里是 scroll-behavior，
     那是用 scrollLeft 位移时的产物，改成 transform 后已无意义） */
}

.gj-titles { flex: 1 1 260px; min-width: 0; }

.gj-titles h1 { margin: 0 0 4px; font-size: 23px; line-height: 1.25; letter-spacing: .2px; }
.gj-titles p { margin: 0; color: var(--ink-faint); font-size: 13px; }
/* 副标题（没填自我介绍时显示） */
.gj-sub { margin: 0; color: var(--ink-faint); font-size: 13px; }
/* 自我介绍：占据副标题的位置。超过 2 行时截断 + 可点开完整内容 */
.gj-intro {
  margin: 0; color: var(--ink-faint); font-size: 13px; line-height: 1.55;
  max-width: 62ch;                       /* 别让长句横跨整个头部 */
}
.gj-intro--clamp {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; cursor: pointer; transition: color .16s ease;
}
/* 手机端可以单独收紧行数（头部更窄、屏幕更宝贵） */
@media (max-width: 899px) {
  .gj-intro--clamp { -webkit-line-clamp: 1; }
}
.gj-intro--clamp:hover, .gj-intro--clamp:focus-visible { color: var(--brand-text); }
.gj-intro--clamp:hover { text-decoration: underline dotted; text-underline-offset: 3px; }
.gj-count { color: var(--ink-soft) !important; font-size: 12.5px !important; margin-top: 6px !important; }
.gj-count b { color: var(--brand-text); font-weight: 700; }
.gj-acts { display: flex; gap: 10px; flex-wrap: wrap; }

.gj-btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--ink); background: var(--accent-soft);
  padding: 10px 16px; border-radius: 999px; transition: .18s ease; white-space: nowrap;
  text-decoration: none;
}
.gj-btn:hover { background: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }
.gj-btn:active { transform: translateY(0); }
.gj-btn--solid { background: var(--brand-strong); color: #fff; }
.gj-btn--solid:hover { background: var(--brand); }
.gj-btn img { width: 17px; height: 17px; display: block; }

/* 开播中 / 轮播中：按钮换色 + 小圆点。
   圆点的位置**始终占着**（只改透明度），否则状态一变按钮宽度会跳。 */
.gj-live-dot {
  width: 7px; height: 7px; border-radius: 50%; margin-left: 3px; flex: 0 0 auto;
  background: #7ee2a8;
  opacity: 0; transition: opacity .2s ease;
  box-shadow: 0 0 0 0 rgba(126, 226, 168, .75);
}
/* 真人直播中：红底 + 呼吸 */
#gj-live-btn.is-live { background: #c0392b; }
#gj-live-btn.is-live:hover { background: #a93226; }
#gj-live-btn.is-live .gj-live-dot { opacity: 1; animation: gj-pulse 1.8s ease-out infinite; }
/* 轮播中：琥珀底 + 静态圆点（没有真人在播，所以不呼吸，避免误导） */
#gj-live-btn.is-round { background: #f2d98a; color: #4a3a10; }
#gj-live-btn.is-round:hover { background: #e8ca6a; }
#gj-live-btn.is-round .gj-live-dot { opacity: 1; background: #b8860b; }
@keyframes gj-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(126, 226, 168, .8); }
  70%  { box-shadow: 0 0 0 7px rgba(126, 226, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(126, 226, 168, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .is-live .gj-live-dot { animation: none; }
}

/* ---------------- 搜索 + 类别 ---------------- */
.gj-panel {
  background: rgba(253,254,254,0.25);  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 22px 8px; margin-bottom: 16px;
  border: 1px solid rgba(239,239,239,0.7);
}
.gj-searchrow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.gj-searchbox { position: relative; flex: 1 1 240px; min-width: 0; }
.gj-searchbox svg, .gj-searchbox__ico {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; pointer-events: none;
}
.gj-searchbox svg { fill: var(--ink-faint); }   /* 内置图标跟随主题色 */
.gj-searchbox__ico { object-fit: contain; }      /* 定制素材保持比例 */
#gj-search {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink);
  padding: 12px 15px 12px 42px; border: 1px solid #c9d6e1; border-radius: 999px;
  background: #eff5fa; outline: none; transition: box-shadow .18s ease, border-color .18s ease;
}
#gj-search:focus { box-shadow: 0 0 0 3px rgba(152,186,221,0.45); border-color: var(--accent); background: var(--card); }
#gj-search::placeholder { color: var(--ink-faint); }
.gj-hint { color: var(--ink-faint); font-size: 12px; margin: 0 0 14px; }
.gj-hint kbd {
  font: inherit; font-size: 11px; padding: 1px 6px; border-radius: 5px;
  background: var(--chip-bg); border: 1px solid var(--line); color: var(--ink-soft);
}

.gj-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.gj-chip {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--ink); background: var(--chip-bg); border: 1px solid transparent;
  padding: 8px 15px; border-radius: 999px; transition: .16s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.gj-chip i { font-style: normal; font-size: 11px; color: var(--ink-faint); font-weight: 500; }
.gj-chip:hover { background: var(--accent-soft); border-color: var(--accent); transform: translateY(-1px); }
.gj-chip.on { background: var(--brand-strong); color: #fff; border-color: var(--brand-strong); }
.gj-chip.on i { color: rgba(255, 255, 255, .78); }
/* 会筛出 0 首的标签：置灰不可点，避免点了空结果 */
.gj-chip.empty { opacity: .38; cursor: not-allowed; }
.gj-chip.empty:hover { background: var(--chip-bg); border-color: transparent; transform: none; }

/* ---------------- 已选标签条 ----------------
   注意：下面给了 display:flex，作者样式会盖掉浏览器默认的 [hidden]{display:none}，
   所以必须显式补一条 [hidden] 规则 —— 否则「没选标签」时这条空栏仍会占位。 */
.gj-selected[hidden], .gj-selected__mode[hidden] { display: none; }
.gj-selected {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: 0 0 13px; padding: 9px 12px;
  background: var(--chip-bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 12.5px;
}
.gj-selected__label { color: var(--ink-faint); flex: 0 0 auto; }
.gj-selected__tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; min-width: 0; }
.gj-pill {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600;
  color: #fff; background: var(--brand-strong); border: 0;
  padding: 4px 10px; border-radius: 999px; transition: .16s ease;
}
.gj-pill span { opacity: .7; font-size: 10px; }
.gj-pill:hover { background: var(--brand); }
.gj-pill:hover span { opacity: 1; }
.gj-op { color: var(--ink-faint); font-size: 12px; padding: 0 1px; }
.gj-selected__mode { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.gj-mode {
  flex: 0 0 auto; cursor: pointer; font: inherit; font-weight: 700; font-size: 12.5px;
  color: var(--brand-text); background: var(--accent-soft); border: 1px solid var(--accent);
  padding: 4px 10px; border-radius: 8px; transition: .16s ease; white-space: nowrap;
}
.gj-mode:hover { background: var(--accent); border-color: var(--brand-text); }
.gj-mode:active { transform: scale(.96); }
.gj-clear {
  flex: 0 0 auto; cursor: pointer; font: inherit; font-size: 12.5px;
  color: var(--ink-soft); background: none; border: 0; padding: 4px 6px; border-radius: 6px;
}
.gj-clear:hover { color: var(--brand-text); text-decoration: underline; }

/* ---------------- 表格 ---------------- */
.gj-tablecard {
  background: rgba(253,254,254,0.25);  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; border: 1px solid rgba(239,239,239,0.7);
}
.gj-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* 歌单分页条：贴在列表卡片底部 */
.gj-pager {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 5px; padding: 12px 14px;
  border-top: 1px solid var(--line);
}
.gj-pg {
  min-width: 32px; height: 32px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--chip-bg); color: var(--ink-soft);
  font: 600 13px/1 inherit; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.gj-pg:hover:not(:disabled) { background: var(--hover); color: var(--brand-text); }
.gj-pg.on {
  background: var(--brand-strong); border-color: var(--brand-strong);
  color: #fff; cursor: default;
}
.gj-pg:disabled { opacity: .4; cursor: not-allowed; }
.gj-pg:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; }
.gj-pg-gap { color: var(--ink-faint); padding: 0 2px; user-select: none; }
@media (max-width: 640px) {
  .gj-pager { gap: 4px; padding: 10px 8px; }
  .gj-pg { min-width: 30px; height: 30px; padding: 0 7px; font-size: 12.5px; }
}
table.gj-table { width: 100%; border-collapse: collapse; }
.gj-table thead th {
  position: sticky; top: 0; z-index: 2;
  /* 表头是 sticky 的，半透明时会被下面的行透出来 —— 所以额外加背景模糊，
     滚过去时读起来像磨砂玻璃，而不是糊成一团 */
  background: rgba(232,241,248,0.25); backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px); color: var(--ink-soft);
  font-size: 12px; font-weight: 700; letter-spacing: .5px; text-align: left;
  padding: 12px; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.gj-table tbody td { padding: 11px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.gj-row { cursor: pointer; transition: background-color .16s ease; }
.gj-row:hover { background: var(--hover); }
.gj-row--paid { background: var(--paid-bg); }
.gj-row--paid:hover { background: rgba(240,200,90,0.34); }
/* 版权受限：保留灰底 + 锁图标作为标记，但**不再**是「不可点」的样子
   （不可点光标 / 删除线会误导 —— 这行现在照常可复制） */
.gj-row--locked { background: var(--locked-bg); }
.gj-row--locked:hover { background: rgba(113,110,110,0.19); }
.gj-row--new { background: var(--new-bg); }
.gj-row--new:hover { background: rgba(247,163,120,0.32); }

.gj-c-ico { width: 86px; white-space: nowrap; }
.gj-ico { width: 21px; height: 24px; margin-right: 3px; vertical-align: middle; }
.gj-c-id { width: 60px; color: var(--ink-faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.gj-c-name { font-weight: 700; color: var(--ink); }
.gj-c-artist { white-space: nowrap; }
.gj-c-tags { white-space: nowrap; }
.gj-mini {
  display: inline-block; font-size: 11px; padding: 1px 9px; margin-right: 4px;
  border-radius: 20px; background: var(--chip-bg); color: var(--ink-soft); cursor: pointer;
  border: 1px solid transparent; transition: .16s ease;
}
.gj-mini:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.gj-c-remark { color: var(--ink-faint); font-size: 12.5px; }
.gj-empty td {
  text-align: center; padding: 48px 16px !important; color: var(--ink-faint); font-size: 15px;
}

/* ---------------- 自我介绍 ---------------- */
.gj-modal {
  position: fixed; inset: 0; z-index: 60; display: none;
  background: rgba(51,46,43,0.46); backdrop-filter: blur(3px);
  align-items: center; justify-content: center; padding: 20px;
}
.gj-modal.open { display: flex; }
.gj-modal__box {
  background: var(--card); border-radius: var(--radius); width: min(620px, 100%);
  max-height: 84vh; overflow: auto; box-shadow: 0 18px 50px rgba(140,142,146,0.26);
  animation: gj-pop .2s ease;
}
@keyframes gj-pop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.gj-modal__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 17px 22px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--card);
}
.gj-modal__head h2 { margin: 0; font-size: 16px; }
.gj-modal__x {
  border: 0; background: var(--chip-bg); color: var(--ink-soft); cursor: pointer;
  width: 31px; height: 31px; border-radius: 50%; font-size: 17px; line-height: 1; transition: .16s ease;
}
.gj-modal__x:hover { background: var(--accent-soft); color: var(--ink); }
.gj-modal__body { padding: 4px 22px 22px; }
.gj-modal__body p { margin: 13px 0; font-size: 14px; line-height: 1.9; }

/* ---------------- 返回顶部 ---------------- */
.gj-back {
  position: fixed; right: 22px; bottom: 26px; z-index: 40;
  width: 46px; height: 46px; border: 1px solid rgba(239,239,239,0.7); border-radius: 14px; cursor: pointer;
  background: rgba(253,254,254,0.86); backdrop-filter: blur(8px);
  color: var(--brand-text); box-shadow: var(--shadow-lift);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: .22s ease;
}
.gj-back.show { opacity: 1; visibility: visible; transform: none; }
.gj-back:hover { background: var(--card); }
.gj-back svg { width: 17px; height: 17px; fill: currentColor; }
/* 用定制素材时：素材自带形状和配色，再套一层圆角底+阴影就重了，所以去掉 */
.gj-back--art {
  width: auto; height: auto; border: 0; border-radius: 0; background: none;
  box-shadow: none; backdrop-filter: none;
}
.gj-back--art:hover { background: none; transform: translateY(-2px); }
.gj-back--art img { width: 46px; height: auto; display: block; }
@media (max-width: 640px) { .gj-back--art img { width: 40px; } }

/* ---------------- 轻提示 ---------------- */
.gj-toasts {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: max-content; max-width: calc(100vw - 32px);
}
.gj-toast {
  background: var(--brand-strong); color: #fff; font-size: 13.5px;
  padding: 11px 19px; border-radius: 999px; box-shadow: var(--shadow-lift);
  opacity: 0; transform: translateY(14px); transition: .24s ease; text-align: center;
}
.gj-toast.in { opacity: 1; transform: none; }
.gj-toast--warn { background: #b4453c; }
/* info：动作成功了但有前提（如版权受限）。红色是「失败」语义，不该用在这里 */
.gj-toast--info { background: #f2d98a; color: #4a3a10; }

/* ---------------- 页脚 ---------------- */
.gj-foot {
  margin-top: 28px; text-align: center; color: var(--ink-faint); font-size: 12.5px; line-height: 2;
}
.gj-foot a { color: var(--ink-faint); }
.gj-foot a:hover { color: var(--brand-text); }

.gj-noscript {
  background: var(--card); border-left: 3px solid var(--accent); padding: 12px 16px;
  border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 13.5px;
}

/* ============================================================
   窄屏（< 900px）：表格改成两行卡片式
   原因：表格最小需要约 810px（歌手/类别列 nowrap 撑开），
   320~430px 手机上「类别」整列在屏外、iPad 竖屏「备注」在屏外。
   横向滚动藏信息不可接受 —— 改成每首歌一张两行卡片，信息全可见。
   ============================================================ */
@media (max-width: 899px) {
  .gj-scroll { overflow-x: visible; }
  .gj-table thead { display: none; }
  .gj-table, .gj-table tbody { display: block; }
  .gj-table tbody td { border: 0; padding: 0; }

  .gj-list tr {
    display: grid;
    /* 关键：每个 tr 自己是独立 grid 容器，列宽按各自内容算，
       所以前两列必须写死固定值 —— 否则编号位数一变，歌名左缘就跟着漂。 */
    grid-template-columns: 24px 38px minmax(0, 1fr) auto;
    column-gap: 8px; row-gap: 3px; align-items: center;
    padding: 11px 13px;
    border-top: 1px solid var(--line);
  }
  .gj-list tr:first-child { border-top: 0; }
  /* 图标列给固定宽度：否则空图标列宽度塌成 0，带状态的行会整体右移 */
  .gj-c-ico { grid-area: 1 / 1 / 3 / 2; width: 24px; min-width: 24px; }
  .gj-c-id { grid-area: 1 / 2 / 3 / 3; width: 38px; }
  .gj-c-id::before { content: '#'; opacity: .6; }
  .gj-c-name { grid-area: 1 / 3 / 2 / 5; font-size: 14.5px; line-height: 1.45; }
  .gj-c-artist { grid-area: 2 / 3 / 3 / 4; font-size: 12.5px; color: var(--ink-soft); white-space: normal; line-height: 1.4; }
  .gj-c-tags { grid-area: 2 / 4 / 3 / 5; white-space: normal; text-align: right; }
  /* 备注单独一行，空的不占位 */
  .gj-c-remark { grid-area: 3 / 3 / 4 / 5; font-size: 12px; line-height: 1.5; }
  .gj-c-remark:empty { display: none; }
  .gj-mini { margin-right: 0; margin-left: 4px; }
  .gj-ico { width: 18px; height: 21px; }
}

/* ---------------- 手机（< 720px）----------------
   首要目标：让歌单尽早出现在首屏。
   实测（iPhone 14 390×844）优化前第一行在 y=636，屏高才 844 —— 看不到几行歌。 */
@media (max-width: 720px) {
  .gj-wrap { padding: 12px 12px 52px; }

  /* 头部：头像与标题同行，按钮自成一行 */
  .gj-head { padding: 14px; gap: 12px; }
  .gj-avatar { width: 52px; height: 52px; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px rgba(152,186,221,0.55); }
  .gj-titles { flex: 1 1 140px; }
  .gj-titles h1 { font-size: 17px; margin-bottom: 2px; }
  .gj-titles p { font-size: 12px; }
  .gj-count { margin-top: 4px !important; }
  .gj-acts { width: 100%; gap: 8px; }
  .gj-btn { flex: 1 1 auto; justify-content: center; padding: 10px 12px; font-size: 13px; min-height: 42px; }

  .gj-panel { padding: 12px 14px 4px; }
  .gj-searchrow { gap: 8px; margin-bottom: 10px; }
  .gj-searchbox { flex: 1 1 100%; }
  #gj-random { flex: 1 1 100%; justify-content: center; }
  #gj-search { padding: 11px 14px 11px 40px; font-size: 14px; }

  /* 键盘快捷键在触屏上没有意义，省掉这一行高度 */
  .gj-hint__tips { display: none; }
  .gj-hint { margin: 0 0 10px; }
  .gj-hint:empty { display: none; }

  /* 标签：改成横向滑动一条，出血到卡片边缘 */
  .gj-chips {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; -ms-overflow-style: none;
    margin: 0 -14px 12px; padding: 2px 14px 6px;
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
  }
  .gj-chips::-webkit-scrollbar { display: none; }
  .gj-chip { flex: 0 0 auto; scroll-snap-align: start; font-size: 12.5px; padding: 8px 14px; min-height: 40px; }

  /* 已选条：允许换行，别把「清除」挤出去 */
  .gj-selected { padding: 8px 10px; gap: 6px; }
  .gj-selected__tags { gap: 5px; }
  .gj-pill { font-size: 12px; padding: 4px 9px; }
  .gj-selected__mode { gap: 5px; }
  .gj-mode { font-size: 12px; padding: 4px 8px; }
  .gj-clear { padding: 3px 5px; }

  .gj-c-ico { width: auto; }
  .gj-list tr { padding: 10px 12px; }
  .gj-c-name { font-size: 14px; }

  .gj-back { right: 12px; bottom: 16px; width: 42px; height: 42px; }
  .gj-modal { padding: 0; align-items: flex-end; }
  .gj-modal__box { max-height: 90vh; width: 100%; border-radius: var(--radius) var(--radius) 0 0; }
  .gj-modal__body { padding: 4px 18px 26px; }
  .gj-toasts { bottom: 16px; }
  .gj-foot { margin-top: 22px; font-size: 12px; }
}

/* 更窄的机器（iPhone SE 320）再收一档 */
@media (max-width: 360px) {
  .gj-titles h1 { font-size: 16px; }
  .gj-avatar { width: 46px; height: 46px; }
  .gj-btn { font-size: 12.5px; padding: 9px 10px; gap: 5px; }
  .gj-chip { font-size: 12px; padding: 7px 12px; }
  .gj-list tr { grid-template-columns: 22px 34px minmax(0, 1fr); column-gap: 7px; padding: 10px 11px; }
  .gj-c-ico { width: 22px; min-width: 22px; }
  .gj-c-id { width: 34px; }
  .gj-c-name { grid-area: 1 / 3 / 2 / 4; }
  .gj-c-artist { grid-area: 2 / 3 / 3 / 4; }
  .gj-c-tags { grid-area: 3 / 3 / 4 / 4; text-align: left; }
  .gj-c-remark { grid-area: 4 / 3 / 5 / 4; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
