/* tonetone Web UI —— 无构建步骤（原生 ES module + CSS）。
   刻意不用 Vite/React：单二进制部署是项目核心承诺，
   前端零构建能让 `go:embed` 直接工作，也避免"没装 Node 就无法发布服务端"。
   样式变量集中在 :root，主题切换只改一处。

   视觉语言：液态玻璃（Liquid Glass）。
   ---------------------------------------------------------------
   三条规则贯穿全文件，改样式时请一并遵守：

   1) 玻璃是"看到的背景"，不是"画上去的颜色"。
      面板一律用低透明度白 + backdrop-filter 虚化背后的东西；
      给面板填一个接近实色的深灰，玻璃感立刻消失。

   2) 高光在顶边，阴影在远处。
      每块玻璃都有 inset 0 1px 0 的顶边高光（模拟边缘折射）和
      一个又大又淡的外阴影（模拟离地高度）。硬阴影会让它看起来像塑料。

   3) 交互是"被按进液体"，不是"位移"。
      hover 提亮 + 轻微抬高，active 用 scale() 收缩，
      不用 translateY(1px) 那种按钮下沉——那是拟物时代的语感。
   ---------------------------------------------------------------
   性能取舍：backdrop-filter 很贵。只给"大面积且数量少"的容器
   （侧栏 / 播放条 / 弹窗 / 歌词面板）加，卡片列表只靠渐变 + 高光 + 阴影
   伪造玻璃——几百张卡片各自虚化一次会把滚动帧率打下来。 */

:root {
  color-scheme: dark;

  /* ---------------------------------------------------------- 底色 */
  --bg-deep: #020408;

  /* -------------------------------------------------- 玻璃材质分层 */
  /* 三层透明度对应三种"距离"：1 是大面积平铺的薄玻璃，2 是悬浮块与 hover，
     3 是最亮的交互反馈。都带一点点冷色偏（B 通道略高），
     纯中性灰压在深蓝底上会显脏。 */
  --glass-1: rgba(213, 226, 255, .04);    /* 大面积薄玻璃 */
  --glass-2: rgba(213, 226, 255, .07);    /* 悬浮块 / hover */
  --glass-3: rgba(222, 233, 255, .09);    /* hover 峰值 */
  --glass-edge: rgba(255, 255, 255, .115); /* 描边 */
  --glass-edge-hi: rgba(255, 255, 255, .21); /* hover 描边 */
  --glass-sunk: rgba(3, 7, 16, .38);      /* 内凹（输入框） */
  --blur: 26px;
  --saturate: 170%;

  /* ------------------------------------------------------------ 文本 */
  --text: #eef2fb;
  --text-dim: #9faac1;
  --text-faint: #6d788f;

  /* ------------------------------------------------------------ 色彩 */
  --accent: #6fa8ff;
  --accent-soft: rgba(111, 168, 255, .30);
  --accent-dim: rgba(111, 168, 255, .45);
  --danger: #ff6b72;
  --ok: #4ade9e;
  --star: #ffd166;

  /* ------------------------------------------------------------ 度量 */
  /* 液态玻璃靠"连续曲率"取胜，圆角比传统 UI 大一档。 */
  --radius: 13px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --player-h: 88px;
  --sidebar-w: 224px;

  /* ------------------------------------------------------ 安全区（状态栏/手势条） */
  /* 客户端壳是 edge-to-edge 的（gen/android 的 MainActivity 里 enableEdgeToEdge()），
     页面从状态栏底下一直画到手势条底下。不留这四条距离，顶栏会被时钟盖掉一行、
     播放条的按钮会被手势条切掉半截。
     值的来源按「准 → 不准」三层：
     1) Android 上由原生侧（android-src/com/tonetone/mobile/SafeArea.kt）算好真实
        inset，经 js/safe_area.js 写成 <html> 的行内 style —— 优先级最高，会盖掉这里。
        手势条不是「屏幕异形」，WebView 自己永远报不出来，只有这条路拿得到。
     2) 纯浏览器/桌面端没有原生侧，退回 env()：浏览器自己知道刘海的宽度。
     3) 再退回 0px：任何一层缺失只是「少留一点距离」，不会把布局算成 NaN。 */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  font-synthesis: none;
}

* { box-sizing: border-box; }

html { background: var(--bg-deep); }

html, body {
  margin: 0;
  height: 100%;
}

body {
  /* 背景留给 body::before 的光斑，这里必须是透明的，否则光斑被盖掉。 */
  background: transparent;
  color: var(--text);
  font: 14px/1.55 ui-sans-serif, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  position: relative;
  /* 建立独立的层叠上下文，好让 ::before 的 z-index:-1 只沉到内容之下、
     而不是沉到根背景之后。 */
  isolation: isolate;
}

/* 液态玻璃里的"液体"：四个固定色斑，滚动的玻璃面板从它们上面滑过，
   透出来的色彩会随滚动变化——这是它区别于"磨砂玻璃"的关键。
   固定定位 + 超大 inset，保证页面滚动时光斑不跟着跑（光在远处）。 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* 用 vmax 定尺寸 + 明确的 70% 淡出点：光斑必须"看得出是一团光"，
     模糊太狠会变成一层均匀的灰罩子，玻璃反而没东西可透。
     强度刻意压得很低（≤ .2）：这里一旦调成"彩色壁纸"，
     白色文字开始掉对比度，玻璃面板也会被背后的颜色糊住。 */
  /* 尺寸用 vw/vh 而不是 vmax：vmax 在宽屏上会把光斑半径推到上千像素，
     整团光被甩到屏幕角上，内容区反而一片死黑——玻璃就没东西可透了。
     位置也刻意压在内容区里（28% / 78%），而不是贴着四角。 */
  /* 第一层是铺满整屏的低饱和冷色：没有它，四团光之间的中部会退成
     纯黑，出现一道“彩色→死黑”的硬边，玻璃面板就成了浮在空洞上。 */
  /* 第一层铺一层很弱的冷色打底：它的作用是"别让空处变成纯黑"，
     不是当壁纸用。数值一调高，整屏就变成蓝紫渐变壁纸，
     玻璃面板失去明暗对比，文字也开始掉对比度。 */
  background:
    radial-gradient(125vw 100vh at 50% 22%, rgba(44, 60, 130, .30), transparent 76%),
    radial-gradient(70vw 56vh at 24% 0%,  rgba(58, 100, 250, .26), transparent 70%),
    radial-gradient(64vw 54vh at 84% 12%, rgba(138, 78, 240, .20), transparent 70%),
    radial-gradient(78vw 66vh at 86% 94%, rgba(26, 196, 178, .20), transparent 70%),
    radial-gradient(64vw 54vh at 6% 88%,  rgba(240, 88, 152, .13), transparent 70%);
}

/* 暗角：把四周压下去，视线自然落在中间的内容上。
   没有这层，四团光会在屏幕边缘互相叠加成一片亮边，
   看起来像没做完的背景图，而不是"玻璃后面的光"。
   强度只到 .42：再重内容区就变死黑，玻璃没东西可透。 */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(160% 130% at 50% 44%, transparent 72%, rgba(2, 4, 8, .26) 100%);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* ------------------------------------------------------------- 按钮 */
/* 玻璃按钮：上半亮下半暗的线性渐变 + 顶边高光，像一片压平的玻璃。 */
button {
  cursor: pointer;
  border: 1px solid var(--glass-edge);
  background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .035));
  border-radius: var(--radius);
  padding: 7px 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    0 1px 2px rgba(0, 0, 0, .5);
  transition:
    transform .16s cubic-bezier(.2, .9, .3, 1),
    background .16s ease,
    border-color .16s ease,
    box-shadow .16s ease;
}
button:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(255, 255, 255, .21), rgba(255, 255, 255, .06));
  border-color: var(--glass-edge-hi);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .30),
    0 6px 16px -8px rgba(0, 0, 0, .9);
}
/* 按下是"陷进液体"：整体缩小、内部高光被压暗，外阴影收起。 */
button:active:not(:disabled) {
  transform: scale(.965);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .10),
    inset 0 2px 7px rgba(0, 0, 0, .38);
}
button:disabled { opacity: .42; cursor: not-allowed; }

/* 主按钮 = 一块染色玻璃：同样有顶边高光和内部透光，只是染成了蓝。 */
button.primary {
  background: linear-gradient(180deg, #86b6ff, #4b7fe8);
  border-color: rgba(255, 255, 255, .30);
  color: #fff;
  font-weight: 600;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    inset 0 -1px 0 rgba(0, 0, 0, .18),
    0 8px 22px -10px rgba(90, 140, 255, .85);
}
button.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #97c1ff, #5a8cf0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .65),
    0 12px 28px -10px rgba(90, 140, 255, .95);
}
button.ghost { background: transparent; box-shadow: none; }
button.icon { padding: 6px 10px; }

/* ------------------------------------------------------------- 输入 */
/* 输入框是唯一"内凹"的表面：inset 阴影 + 更暗的底，与凸起的玻璃块区分开。
   不这样处理，用户在玻璃面板里找不到哪里能打字。 */
input[type="text"], input[type="password"], input[type="search"],
input[type="number"], input[type="url"], select, textarea {
  background: var(--glass-sunk);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  padding: 9px 13px;
  width: 100%;
  outline: none;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, .45),
    inset 0 -1px 0 rgba(255, 255, 255, .05);
  transition: border-color .16s, box-shadow .16s, background .16s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent-dim);
  background: rgba(8, 14, 28, .46);
  /* 焦点环用外发光而不是实线：保持玻璃的通透，同时足够醒目。 */
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, .45),
    0 0 0 3.5px rgba(111, 168, 255, .16);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }

/* 复选框：原生方框在玻璃界面里是一块突兀的白板（尤其暗色下系统会画成
   浅色实心块）。这里压成一颗小玻璃珠，选中时才填成蓝色染色玻璃。
   勾用 clip-path 画，不额外引入图标资源，也不会有加载闪动。 */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  margin: 0;
  border: 1px solid var(--glass-edge-hi);
  border-radius: 5px;
  background: var(--glass-sunk);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .45);
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  flex: none;
  transition: background .14s, border-color .14s, box-shadow .14s;
}
input[type="checkbox"]::before {
  content: '';
  width: 60%; height: 60%;
  transform: scale(0);
  transition: transform .13s cubic-bezier(.2, .9, .3, 1);
  background: #fff;
  clip-path: polygon(14% 44%, 0% 58%, 40% 100%, 100% 22%, 86% 8%, 39% 72%);
}
input[type="checkbox"]:checked {
  background: linear-gradient(180deg, #7fb0ff, #4b7fe8);
  border-color: rgba(255, 255, 255, .38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .45),
    0 4px 12px -6px rgba(90, 140, 255, .9);
}
input[type="checkbox"]:checked::before { transform: scale(1); }
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app-boot, .boot { display: grid; place-items: center; height: 100%; color: var(--text-dim); }

/* ------------------------------------------------------------ 登录/初始化 */
/* 形状：宽屏是「左品牌墙 + 右表单卡」，窄屏合并成单列。
   两条约束决定了这个结构：
   1) 卡片必须垂直居中。原先这里写的是 height:100%，而 #app 没有显式高度，
      百分比高度会塌陷成内容高度——整块卡片就贴着页面顶端，下面空出半屏。
      改成 min-height:100dvh 后，居中不再依赖祖先链上的任何高度。
   2) 单张卡片孤零零漂在正中时，四周是空的背景光，视线没有落点；
      宽屏用品牌墙把左侧撑起来，右侧留白反而变成呼吸。 */
.auth-wrap {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  /* 上面一行吃掉剩余高度、把舞台顶到视觉中心，落款压在最底下。
     留这一行而不是绝对定位，是因为内容变高（矮窗口 + 访客入口）时
     绝对定位的落款会压到卡片上。 */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  align-items: center;
  row-gap: 20px;
  padding: clamp(20px, 5vw, 56px) clamp(18px, 5vw, 48px);
  /* 登录页也是整屏：卡片居中本来就不贴边，但落款（最底一行）会被手势条压住，
     状态栏在沉浸式下也可能盖住品牌墙顶部。用 max() 而不是相加——
     本来就够宽的一侧不会被安全区再撑大一圈。 */
  padding-top: max(clamp(20px, 5vw, 56px), var(--safe-top));
  padding-bottom: max(clamp(20px, 5vw, 56px), var(--safe-bottom));
  padding-left: max(clamp(18px, 5vw, 48px), var(--safe-left));
  padding-right: max(clamp(18px, 5vw, 48px), var(--safe-right));
  /* 纵向要能滚：手机上键盘弹出（dvh 变小）或内容变高（访客入口 + 落款）时，
     原先的 overflow:hidden 会把下半截直接裁掉，而且裁掉的部分还滚不到——
     “登录按钮看不见”比裁掉更难查。横向仍然 hidden：横向溢出只来自装饰光的
     越界，不该产生横向滚动条。 */
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: radial-gradient(760px 420px at 50% -6%, rgba(86, 120, 255, .16), transparent 72%);
}
/* 左后方那团缓慢呼吸的光。静止的登录页需要一点"活着"的迹象，
   但亮度压在 .16 以下：它只负责托住品牌墙，不能和卡片抢注意力。 */
.auth-wrap::before {
  content: '';
  position: absolute; z-index: 0;
  width: min(56vw, 660px); aspect-ratio: 1;
  left: -10%; top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(111, 168, 255, .15), transparent 62%);
  pointer-events: none;
  animation: auth-breathe 16s ease-in-out infinite;
}

.auth-stage {
  position: relative; z-index: 1;
  width: 100%; max-width: 980px; min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

/* ---------------------------------------------------------- 品牌墙（左） */
.auth-hero { min-width: 0; }
/* 唱片：纹路用 repeating-radial-gradient 画，中心孔用一层径向渐变切出来
   ——一块纯 CSS 的"正在转的光盘"。 */
.auth-disc {
  position: relative;
  width: clamp(104px, 12vw, 148px); aspect-ratio: 1;
  margin-bottom: 28px;
  border-radius: 50%;
  background:
    /* 中心孔：先压一小块深色，再留一圈亮边，看起来才是"穿了孔的" */
    radial-gradient(circle at 50% 50%, #05080f 0 3.2%, rgba(236, 244, 255, .88) 3.4% 4.4%, transparent 4.6%),
    /* 中间的纸标（label）：有它才一眼认出是唱片，没有就是一颗彩色弹珠。
       外圈压一道深色细环，把纸标和沟槽分开。 */
    radial-gradient(circle at 50% 50%,
      rgba(126, 170, 255, .95) 0 18%, rgba(84, 128, 226, .95) 18% 27%,
      rgba(6, 10, 20, .85) 27% 28.5%, transparent 28.7%),
    /* 反射光谱：低饱和的虹彩。只在中段明显（真实光盘的折射也集中在那里），
       所以叠在上面那层里被纸标的外环切掉一部分。 */
    conic-gradient(from 205deg,
      rgba(111, 168, 255, .40) 0%, rgba(150, 120, 255, .22) 16%,
      rgba(90, 240, 210, .22) 34%, rgba(255, 150, 200, .15) 54%,
      rgba(111, 168, 255, .34) 74%, rgba(150, 120, 255, .22) 90%,
      rgba(111, 168, 255, .40) 100%),
    /* 沟槽：亮线 + 暗线交替，比单色亮线更能看出"一圈一圈" */
    repeating-radial-gradient(circle at 50% 50%,
      rgba(255, 255, 255, .085) 0 .5px, rgba(0, 0, 0, .18) .5px 3.5px),
    /* 盘身底色：中心偏亮、边缘沉下去，它才有厚度而不是一张圆片 */
    radial-gradient(circle at 44% 30%, rgba(190, 212, 255, .18), #080d18 74%);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .30),
    inset 0 -3px 14px rgba(2, 4, 8, .75),
    0 26px 54px -26px rgba(0, 0, 0, .95);
  animation: auth-spin 22s linear infinite;
}
/* 斜切高光：转的是元素，这层反光跟着一起转，扫过盘面的过程本身就是"它在转"
   的证据。外圈再补一条亮边，玻璃边缘才有折射。 */
.auth-disc::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background:
    linear-gradient(118deg, transparent 32%, rgba(255, 255, 255, .20) 46%, transparent 60%),
    linear-gradient(298deg, transparent 44%, rgba(255, 255, 255, .10) 52%, transparent 58%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10);
}
.auth-eyebrow {
  margin: 0 0 10px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-faint);
}
/* 实例名是这台服务器唯一的"名字"，给它足够的字号和一层很轻的冷色渐变，
   远看是一块金属招牌，近看仍然是可读的文字。 */
.auth-brand {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.18;
  font-weight: 650;
  letter-spacing: -.022em;
  background: linear-gradient(120deg, #ffffff 12%, #d6e2ff 62%, #9db4ef);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-tagline {
  margin: 0 0 26px;
  max-width: 34em;
  color: var(--text-dim);
  font-size: 14px; line-height: 1.7;
}
.auth-points { margin: 0; padding: 0; list-style: none; display: grid; gap: 11px; }
.auth-points li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; line-height: 1.6;
  color: var(--text-dim);
}
/* 圆点用一颗很小的发光珠子，而不是项目符号：它要看起来像"信号灯"。 */
.auth-points .tick {
  flex: none;
  width: 6px; height: 6px; margin-top: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(111, 168, 255, .14), 0 0 10px rgba(111, 168, 255, .7);
}

/* 落款：一行很小的产品名与版本。用户报障第一句话就是"我这是哪个版本"，
   让他先能看见，比事后去设置页翻要省一次来回。 */
.auth-foot {
  align-self: end;
  margin: 0;
  font-size: 11.5px; letter-spacing: .04em;
  color: var(--text-faint);
  pointer-events: none;
}

/* ------------------------------------------------------------ 表单卡（右） */
.auth-panel { min-width: 0; }
.auth-card {
  position: relative;
  width: 100%; max-width: 396px;
  margin-left: auto;
  background: linear-gradient(165deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .028) 45%, rgba(255, 255, 255, .05));
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-xl);
  padding: 30px;
  -webkit-backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur)) saturate(var(--saturate));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .22),
    0 30px 70px -30px rgba(0, 0, 0, .95);
}
/* 顶边那道细高光：玻璃边缘最亮的一条折射线，是液态玻璃的签名细节。 */
.auth-card::before {
  content: '';
  position: absolute; top: 0; left: 16%; right: 16%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
}
.auth-card h1 { margin: 0 0 6px; font-size: 21px; letter-spacing: -.01em; }
.auth-card p.sub { margin: 0 0 22px; color: var(--text-dim); font-size: 13px; line-height: 1.6; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 7px; letter-spacing: .02em; }
/* 表单卡里的输入框比列表页的更高一点：这一屏只有两个输入框，
   它们就是主任务，值得多给几像素的点击面积。 */
.auth-card input[type="text"], .auth-card input[type="password"], .auth-card input[type="url"] {
  padding: 11px 14px;
}
/* 主按钮吃满整行：登录是这一步唯一该做的事，让它和输入框对齐成一个整齐的方块，
   比一个缩在左边的小按钮更像"完成"。 */
.auth-card .actions { margin-top: 20px; display: flex; gap: 8px; }
.auth-card .actions button { flex: 1; padding: 11px 16px; font-size: 14px; }
/* 致命错误页失的是一个「重试 / 更改地址」的行（.row-actions），
   同样拉满整行，否则两个小按钮堆在左上角，和登录页格格不入。 */
.auth-card .row-actions { margin: 4px 0 0; }
.auth-card .row-actions button { flex: 1; padding: 11px 16px; font-size: 14px; }
.auth-card .error { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 18px; }

/* 访客入口：和主按钮之间用一条细线分开。
   它在视觉上必须"低一档"——这台实例的主要形状仍然是"登录后使用"，
   访客是一条旁路，不是第二种平等的进入方式。 */
.auth-card .guest-entry { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .09); }
.auth-card .guest-entry .wide { width: 100%; }
.auth-card .guest-entry p { margin: 8px 0 0; font-size: 12px; line-height: 1.55; }

/* 单列宽度（平板竖屏 / 手机）：品牌墙缩到卡片上方一行，卡片居中。
   唱片保留但明显变小——它是这屏唯一"好看"的东西，删掉会显得只剩表单；
   而放大到桌面尺寸会把输入框挤到首屏以下。 */
@media (max-width: 900px) {
  .auth-stage { grid-template-columns: minmax(0, 1fr); max-width: 420px; gap: 26px; }
  .auth-wrap::before { left: 50%; top: 26%; transform: translate(-50%, -50%); width: 120vw; }
  .auth-hero { text-align: center; }
  .auth-disc { width: 72px; margin: 0 auto 18px; }
  .auth-brand { font-size: 26px; }
  .auth-tagline { margin: 0 auto 20px; font-size: 13px; }
  .auth-points { width: fit-content; margin: 0 auto; text-align: left; gap: 8px; }
  .auth-card { max-width: none; margin-left: 0; }
  /* 触屏断点下输入框字号必须 ≥16px。
     Android WebView / iOS Safari 在聚焦 font-size<16px 的输入框时会自动把整页放大，
     键盘收起后**不会**还原，页面就停在放大的偏移位置——用户在真机上看到的就是
     “登录框歪了、左右不对称”。这个问题 viewport 拦不住（系统的强制缩放照样生效），
     只能从字号治：16px 是那些引擎的硬门槛。 */
  input[type="text"], input[type="password"], input[type="search"],
  input[type="number"], input[type="url"], select, textarea { font-size: 16px; }
}
/* 横屏手机 / 矮窗口：这里再留品牌墙就会顶出滚动条，直接收成一屏表单。 */
@media (max-height: 620px) and (max-width: 900px) {
  .auth-points, .auth-disc { display: none; }
  .auth-stage { gap: 16px; }
}
/* 手机（竖屏）：品牌墙只留名字和一句话。三条能力说明会把登录按钮顶到首屏之外，
   而这一屏真正的任务是填完两个框——说明可以没有，输入框不能要滚动才看得见。 */
@media (max-width: 560px) {
  .auth-points { display: none; }
  .auth-disc { width: 62px; margin-bottom: 16px; }
  .auth-tagline { margin-bottom: 6px; }
  .auth-stage { gap: 20px; }
}

@keyframes auth-spin { to { transform: rotate(360deg); } }
/* 只动 opacity、不动 transform：窄屏下这团光的定位靠 translate(-50%,-50%)，
   动画一旦改写 transform 就会把它甩到屏幕外。 */
@keyframes auth-breathe {
  0%, 100% { opacity: .7; }
  50%      { opacity: 1; }
}

/* 设置页里的开关行：checkbox 和它的标签贴着，一眼看成一件事。 */
.instance-toggle {
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px; font-size: 13px; cursor: pointer; user-select: none;
}
.instance-toggle input[type="checkbox"] {
  width: 15px; height: 15px; margin: 0; accent-color: var(--accent, #5678ff); cursor: pointer;
}

/* --------------------------------------------------------------- 主布局 */
/* 用 dvh 而不是 height:100%：移动端浏览器地址栏收缩时 100% 会把播放条顶出屏幕。
   #app 没有显式高度，所以百分比高度在这里会塌陷成内容高度。 */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  /* 底下一行额外多出手势条的高度：播放条的玻璃一直铺到屏幕最下沿（看着是"玻璃到边"），
     而按钮/进度条退到安全区里面（见 .player 的 padding-bottom）。 */
  grid-template-rows: minmax(0, 1fr) calc(var(--player-h) + var(--safe-bottom));
  height: 100vh;
  height: 100dvh;
  /* 只在上面留安全区：状态栏是一层透明覆盖物，内容滚到它底下会和时钟、电量叠字。
     下边不留——那会把播放条的玻璃顶到手势条上方，露出底部一条空白背景。 */
  padding-top: var(--safe-top);
}
.sidebar {
  grid-row: 1 / 2;
  min-height: 0;
  /* 两层：上面是玻璃高光，下面是一层很薄的暗底。
     只叠白色玻璃的话，侧栏和内容区会共用同一片背景光，边界消失；
     垫一层暗底，侧栏才像"立在背景前面的一片玻璃"而不是背景的一部分。 */
  background:
    linear-gradient(180deg, rgba(224, 234, 255, .075), rgba(200, 215, 255, .022)),
    rgba(6, 10, 20, .32);
  border-right: 1px solid rgba(255, 255, 255, .11);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  /* 右缘一条内高光 + 一片向外洒的暗影，交代玻璃的厚度 */
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, .05),
    inset 0 1px 0 rgba(255, 255, 255, .12),
    1px 0 26px -14px rgba(0, 0, 0, .95);
  display: flex; flex-direction: column;
  padding: 16px 12px;
  gap: 3px;
  overflow-y: auto;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 10px 15px; font-weight: 700; letter-spacing: .03em;
}
/* 品牌点是颗玻璃珠：高光点偏左上，跟其他玻璃面的光源方向保持一致。 */
.brand .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffffff, var(--accent) 55%, #2f5fbf);
  box-shadow:
    0 0 14px rgba(111, 168, 255, .85),
    inset 0 0 0 1px rgba(255, 255, 255, .35);
}
/* 导航项做成胶囊：液态玻璃里"选中"是一块浮在液体上的透镜，
   不是给一行文字加个底色块。 */
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 999px;
  border: 1px solid transparent;
  color: var(--text-dim); text-decoration: none; font-size: 13.5px;
  transition: background .16s, color .16s, box-shadow .16s, border-color .16s;
}
.nav-item:hover { background: var(--glass-2); color: var(--text); }
.nav-item.active {
  color: var(--text); font-weight: 600;
  background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .055));
  border-color: rgba(255, 255, 255, .14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .32),
    0 8px 20px -12px rgba(111, 168, 255, .85);
}
.nav-item .ico { width: 18px; text-align: center; opacity: .9; }
.nav-sep { height: 1px; background: rgba(255, 255, 255, .08); margin: 10px 8px; }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); padding: 8px 12px 4px; }
.sidebar .spacer { flex: 1; }
.storage-hint { font-size: 11.5px; color: var(--text-faint); padding: 8px 12px; line-height: 1.5; }

/* min-height:0 让 grid 子项可以真正滚动，否则内容会把整页撑高、播放条被推出视口。 */
.main { overflow-y: auto; min-height: 0; padding: 22px calc(28px + var(--safe-right)) 30px calc(28px + var(--safe-left)); }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.topbar .search { flex: 1; max-width: 480px; }
.topbar .who { color: var(--text-dim); font-size: 12.5px; margin-left: auto; display: flex; align-items: center; gap: 10px; }
/* 菜单键只在窄屏出现（侧栏此时是抽屉）。桌面上侧栏常驻，不需要入口。 */
.menu-btn { display: none; font-size: 17px; line-height: 1; }

/* 抽屉遮罩：默认不存在，窄屏抽屉打开时才有。玻璃虚化而不是纯黑，
   这样背后那片内容还看得出"在那"，只是退到后面去了。 */
.nav-scrim { display: none; }

h2.page-title { margin: 0 0 18px; font-size: 23px; letter-spacing: -.015em; font-weight: 600; }
.section-title { margin: 28px 0 13px; font-size: 15px; color: var(--text-dim); font-weight: 600; }

/* ----------------------------------------------------------------- 卡片 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 16px;
}
/* 卡片是"伪玻璃"：没有 backdrop-filter（列表可能几百张，逐张虚化会掉帧），
   用上亮下暗的渐变 + 顶边高光 + 远处软阴影模拟同样的体积感。 */
.card {
  position: relative;
  background: linear-gradient(165deg, rgba(255, 255, 255, .095), rgba(255, 255, 255, .025) 52%, rgba(255, 255, 255, .06));
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--radius-lg);
  padding: 11px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    0 14px 30px -22px rgba(0, 0, 0, .95);
  transition:
    transform .2s cubic-bezier(.2, .9, .3, 1),
    background .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 14%; right: 14%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent);
  opacity: .75;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, .20);
  background: linear-gradient(165deg, rgba(255, 255, 255, .145), rgba(255, 255, 255, .04) 52%, rgba(255, 255, 255, .08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .30),
    0 26px 46px -24px rgba(0, 0, 0, .95);
}
.card:active { transform: translateY(-1px) scale(.99); }
.card .cover {
  aspect-ratio: 1; border-radius: 13px; overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .025));
  display: grid; place-items: center; color: var(--text-faint); font-size: 22px;
  margin-bottom: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    inset 0 -8px 20px -10px rgba(0, 0, 0, .6);
}
.card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .meta { font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

/* ---------------------------------------------------------------- 列表 */
.tracklist {
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--glass-1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .10),
    0 16px 34px -26px rgba(0, 0, 0, .9);
}
.track {
  display: grid;
  grid-template-columns: 34px 1fr auto auto;
  gap: 12px; align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  cursor: pointer;
  font-size: 13.5px;
  transition: background .14s ease;
}
.track:last-child { border-bottom: none; }
.track:hover { background: var(--glass-2); }
/* 正在播放：左侧一条发光竖线 + 横向衰减的染色，比整行铺底色更像"光打进玻璃"。 */
.track.playing {
  background: linear-gradient(90deg, rgba(111, 168, 255, .20), rgba(111, 168, 255, .03) 72%);
  box-shadow: inset 2px 0 0 var(--accent);
}
.track .idx { color: var(--text-faint); font-variant-numeric: tabular-nums; text-align: right; font-size: 12.5px; }
.track.playing .idx { color: var(--accent); }
.track .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track .title .sub { color: var(--text-dim); font-size: 12px; }
.track .dur { color: var(--text-dim); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.track .badge {
  font-size: 10.5px; padding: 1px 7px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .13);
  background: var(--glass-1);
  color: var(--text-dim);
}
.track .badge.hires { color: var(--ok); border-color: rgba(74, 222, 158, .38); background: rgba(74, 222, 158, .10); }

.row-actions { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }

/* 多选工具条
 *
 * 未进入选择模式时它只是列表右上方的一个"选择"按钮（高度 0 的紧凑条），
 * 进入后才展开成计数 + 批量动作。这样普通浏览时列表不会被一排按钮撑开。 */
.list-shell { display: flex; flex-direction: column; gap: 8px; }
.sel-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  min-height: 30px; justify-content: flex-end;
}
.sel-bar.on {
  justify-content: flex-start;
  background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px; padding: 6px 12px;
  position: sticky; top: 0; z-index: 2;
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .26),
    0 10px 24px -16px rgba(0, 0, 0, .9);
}
.sel-bar .spacer { flex: 1; }
.sel-bar .sel-count { font-size: 12.5px; color: var(--text-dim); white-space: nowrap; }
button.small { padding: 4px 11px; font-size: 12.5px; }
/* 选择模式下整行可点：把复选框和行的点击区域连起来，别让用户去点那 16px 的方块 */
.track.selectable { grid-template-columns: 22px 34px 1fr auto auto; }
.track .sel-check { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.track.selectable:hover { background: rgba(255, 255, 255, .075); }

/* --------------------------------------------------------------- 播放器 */
.player {
  position: relative; /* 歌词面板贴在它上方（绝对定位，不参与下面的网格布局） */
  grid-column: 1 / -1;
  background: linear-gradient(180deg, rgba(224, 234, 255, .10), rgba(210, 224, 255, .035));
  border-top: 1px solid rgba(255, 255, 255, .13);
  /* 播放条是常驻的"底座玻璃"：虚化最强，并向上投一片阴影把内容区和它分开。 */
  -webkit-backdrop-filter: blur(34px) saturate(190%);
  backdrop-filter: blur(34px) saturate(190%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .20),
    0 -24px 50px -32px rgba(0, 0, 0, .95);
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(320px, 2fr) minmax(180px, 1fr);
  align-items: center;
  gap: 16px;
  /* 底边多留一条手势条：.layout 的底行已经按 safe-bottom 加过高，这里把同样的高度
     变成内边距，玻璃才铺满到屏幕下沿、按钮仍留在安全区里。 */
  padding: 10px calc(18px + var(--safe-right)) calc(10px + var(--safe-bottom)) calc(18px + var(--safe-left));
}
.now { display: flex; align-items: center; gap: 11px; min-width: 0; }
.now .thumb {
  width: 46px; height: 46px; border-radius: 11px; overflow: hidden; flex: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .025));
  display: grid; place-items: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    0 4px 12px -6px rgba(0, 0, 0, .9);
}
.now .thumb img { width: 100%; height: 100%; object-fit: cover; }
.now .text { min-width: 0; }
.now .t1 { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now .t2 { font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.controls { display: flex; flex-direction: column; gap: 6px; }
.controls .buttons { display: flex; align-items: center; justify-content: center; gap: 8px; }
/* 次要控制键是"无框玻璃"：只有 hover 时才出现一块透镜底，平时别抢主按钮的戏。 */
.controls .buttons button {
  background: transparent; border: none; box-shadow: none;
  padding: 5px 9px; border-radius: 999px; color: var(--text-dim);
}
.controls .buttons button:hover { color: var(--text); background: var(--glass-3); }
.controls .buttons button.on { color: var(--accent); background: rgba(111, 168, 255, .14); }
/* 随机（🔀）/ 上一首（⏮）/ 循环（🔁）在系统字体里默认走彩色 emoji 字形，
   摆在一片冷灰玻璃里像贴纸；用 grayscale 压它反而会变成灰方块（emoji 的
   底色也被一起灰掉）。正解是强制文本呈现，拿到单色线框字形。 */
.controls .buttons button:not(.play) {
  font-variant-emoji: text;
  font-size: 15px;
  line-height: 1;
}
/* 播放键是整条里唯一的高光球：径向渐变模拟球面反光，外圈再套一圈柔光。 */
.controls .buttons .play {
  background: radial-gradient(circle at 34% 28%, #ffffff 0%, #e9eff9 46%, #bdcadd 100%);
  color: #0a1122;
  width: 38px; height: 38px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%; display: grid; place-items: center; padding: 0;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -2px 5px rgba(20, 30, 50, .22),
    0 8px 20px -8px rgba(180, 210, 255, .7);
}
.controls .buttons .play:hover {
  background: radial-gradient(circle at 34% 28%, #ffffff 0%, #f5f9ff 46%, #cfdaea 100%);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -2px 5px rgba(20, 30, 50, .18),
    0 10px 26px -8px rgba(180, 210, 255, .9);
}
.progress { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* 滑块轨道做成"凹槽"。注意它用的是浅色半透明白、而不是黑色：
   滑块出现的位置是播放条那块亮玻璃，暗色轨道在亮玻璃上会变成一条很重的黑线。 */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  height: 5px; border-radius: 999px; outline: none; cursor: pointer; flex: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .05));
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .30), inset 0 -1px 0 rgba(255, 255, 255, .07);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ffffff, #e0e9f7 58%, #b6c3d9);
  border: none;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, .55),
    0 0 0 1px rgba(255, 255, 255, .22),
    0 0 12px rgba(160, 200, 255, .5);
}
input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px; border: none; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ffffff, #e0e9f7 58%, #b6c3d9);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .55), 0 0 12px rgba(160, 200, 255, .5);
}

/* 波形 + 进度条叠层
 *
 * 结构是「波形在底、range 在上且透明」：拖动/点按/键盘全部交给原生 range，
 * 波形只负责视觉。这样不用自己算命中检测，触摸屏和读屏也不会退化。
 * 高度固定 22px：再矮看不清鼓点，再高会把播放条撑到影响其他控件。 */
.seek-wrap { position: relative; flex: 1; height: 22px; display: flex; align-items: center; }
.seek-wrap .wave {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 1px; pointer-events: none;
}
.seek-wrap .wave[hidden] { display: none; }
.seek-wrap .wave-bar {
  flex: 1 1 0; min-width: 1px; border-radius: 1px;
  /* 未播放段刻意压得很暗（并且偏冷）：它是“背景”不是“内容”，
     与已播放段拉开对比，波形才读得出进了多少。 */
  background: rgba(196, 214, 245, .15);
  transition: background .08s linear;
}
/* 已播放段用冷白高光，像光透过玻璃照到波形上。
   亮度压在 .82 而不是接近纯白：整条波形是几十个细条并排，
   每条都打到最亮会糊成一条刺眼的白带，还会压过播放键的视觉权重。 */
.seek-wrap .wave-bar.on { background: rgba(255, 255, 255, .95); }
/* 波形就绪后，range 的轨道和滑块隐掉，只留那片可以点的"热区"——
 * 游标由已着色的竖条表达；静音段的底线（2%）保证不会出现"完全看不见"的位置。 */
.seek-wrap .wave.ready ~ input[type="range"] { background: transparent; box-shadow: none; }
.seek-wrap .wave.ready ~ input[type="range"]::-webkit-slider-thumb { opacity: 0; }
.seek-wrap .wave.ready ~ input[type="range"]::-moz-range-thumb { opacity: 0; }
.seek-wrap input[type="range"] { position: relative; z-index: 1; }
/* 键盘聚焦时给整条一个可见的焦点环：波形盖住了原生轨道，没有这个提示
 * 用户按 Tab 进来会完全看不出焦点在哪。 */
.seek-wrap input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.right-controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.right-controls .vol { max-width: 110px; }

/* 输出链路角标：让"有没有真的无损直通"变成看得见的事实，而不是文案承诺 */
.out-badge {
  font-size: 11px; line-height: 1; padding: 4px 8px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .05);
  color: var(--text-dim);
  white-space: nowrap;
}
/* 浏览器播放时没有"输出链路"可报，这个角标是空的——空 span 配上边框
   会在音量滑块前面留下一个莫名其妙的空胶囊。没内容就别占位。 */
.out-badge:empty { display: none; }

.out-badge.on {
  color: #04121a;
  background: linear-gradient(180deg, #63f2de, #22c7b4);
  border-color: rgba(255, 255, 255, .40);
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .55),
    0 6px 16px -8px rgba(45, 212, 191, .85);
}
.out-badge.warn { color: #ffd479; border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .10); }

/* ---------------------------------------------------------------- 歌词 */
/* 面板是绝对定位的网格子元素：绝对定位让它脱离流，播放条本身的
   三列布局完全不受影响。 */
.lyrics-panel {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  max-height: min(46vh, 380px);
  background: linear-gradient(180deg, rgba(224, 234, 255, .09), rgba(206, 220, 250, .045));
  border-top: 1px solid rgba(255, 255, 255, .13);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  backdrop-filter: blur(32px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    0 -18px 44px rgba(0, 0, 0, .45);
  z-index: 20;
}
/* display:flex 会盖掉 [hidden] 的默认 display:none，必须显式关掉 */
.lyrics-panel[hidden] { display: none; }
.lyrics-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
/* 内容限制在一行字宽的两倍左右并居中：
   宽屏上满幅左对齐的歌词会让眼睛每行都要甩很远。 */
.lyrics-head, .lyrics-lines, .lyrics-hint {
  width: 100%; max-width: 760px; margin-left: auto; margin-right: auto;
}
.lyrics-title { flex: 1; font-size: 12px; color: var(--text-dim); }
.lyrics-lines {
  overflow-y: auto;
  padding: 14px 18px 40px;
  display: flex; flex-direction: column; gap: 10px;
}
.lyrics-line {
  font-size: 15px; line-height: 1.45;
  color: var(--text-faint);
  cursor: pointer;
  transition: color .15s ease, transform .15s ease;
}
.lyrics-line:hover { color: var(--text-dim); }
/* 当前行：只加粗 + 提亮 + 轻微右移。不用背景色块——
   一排色块会把歌词本身挤成次要信息。 */
.lyrics-line.on { color: var(--text); font-weight: 600; transform: translateX(6px); text-shadow: 0 0 18px rgba(180, 210, 255, .35); }
.lyrics-empty, .lyrics-hint {
  padding: 12px 18px; color: var(--text-dim); font-size: 12.5px;
}
.lyrics-hint { border-top: 1px solid rgba(255, 255, 255, .08); }

/* ---------------------------------------------------------------- 离线 */
/* 曲目行上的"下载到本机"按钮：三态必须一眼可区分。
   全用同一个图标，用户就会对着已经在下的曲子反复点。 */
.off-btn { opacity: .55; }
.off-btn:hover { opacity: 1; }
.off-btn.busy { opacity: 1; color: #fbbf24; animation: off-spin 1.6s linear infinite; }
.off-btn.on { opacity: 1; color: #2dd4bf; }
.off-btn.warn { opacity: 1; color: #ffb3b8; }
@keyframes off-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.off-size { font-variant-numeric: tabular-nums; }
.off-dir { margin-top: 14px; font: 11.5px ui-monospace, Menlo, monospace; word-break: break-all; }
.off-failed {
  border: 1px solid rgba(255, 107, 114, .32);
  background: rgba(255, 107, 114, .09);
  border-radius: var(--radius);
  padding: 10px 12px; margin: 10px 0; display: flex; flex-direction: column; gap: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* ---------------------------------------------------------------- 弹窗 */
/* 自绘弹窗（js/dialog.js）：替代 prompt/confirm/alert。
   系统弹窗在客户端壳里是宿主画的（标题栏顶着 "localhost:4535 显示"），
   而且会阻塞整个事件循环——播放进度、快捷键全停。 */
.dlg-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: max(20px, var(--safe-top)) max(20px, var(--safe-right)) max(20px, var(--safe-bottom)) max(20px, var(--safe-left));
  /* 遮罩自己也虚化：弹窗后面的界面变成一片色块，
     这是"玻璃压在一层雾气上"，不是给背景刷黑漆。 */
  background: rgba(3, 6, 14, .52);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  animation: dlg-fade .16s ease-out;
}
.dlg {
  position: relative;
  width: min(460px, 100%); max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 40px); overflow: auto;
  /* 比侧栏/播放条更亮一档：弹窗是"离观察者最近的一片玻璃"，
     太暗会显得是挖在背景里的一个洞，而不是浮在上面的板。 */
  background: linear-gradient(165deg, rgba(255, 255, 255, .145), rgba(255, 255, 255, .055) 48%, rgba(255, 255, 255, .075));
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: var(--radius-xl);
  padding: 20px 20px 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .30),
    inset 0 -1px 0 rgba(0, 0, 0, .30),
    0 40px 90px -34px rgba(0, 0, 0, .95);
  animation: dlg-in .2s cubic-bezier(.2, .9, .3, 1);
}
.dlg::before {
  content: '';
  position: absolute; top: 0; left: 14%; right: 14%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .70), transparent);
}
@keyframes dlg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dlg-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.dlg-title { font-size: 15px; font-weight: 600; letter-spacing: .2px; }
.dlg-message { color: var(--text-dim); font-size: 13px; line-height: 1.6; margin-top: 8px; }
.dlg-hint { color: var(--text-faint); font-size: 12.5px; line-height: 1.6; margin-top: 6px; }
.dlg-input { margin-top: 12px; }
/* 已有选项：点一下填进输入框，省掉"照着抄一遍还会抄错" */
.dlg-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.dlg-suggest-label { color: var(--text-faint); font-size: 12px; margin-right: 2px; }
.dlg-chip {
  font-size: 12.5px; padding: 4px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid var(--glass-edge);
  color: var(--text-dim);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.dlg-chip:hover:not(:disabled) { color: var(--text); border-color: var(--glass-edge-hi); background: rgba(255, 255, 255, .10); }
.dlg-chip.on { border-color: var(--accent-dim); color: var(--text); background: rgba(111, 168, 255, .14); }
/* 配对码这种要人抄到另一台设备上的东西：等宽 + 可选 */
.dlg-code {
  margin-top: 12px; padding: 13px; text-align: center; user-select: all;
  font: 600 20px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 3px;
  background: rgba(255, 255, 255, .05);
  border: 1px dashed var(--accent-dim); border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10);
}
/* 错误行常驻但不占高度：出现时不把按钮顶走，用户不会点空 */
.dlg-error { color: #ffb3b8; font-size: 12.5px; min-height: 17px; margin-top: 8px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.dlg-actions button { min-width: 76px; }
button.primary.danger {
  background: linear-gradient(180deg, #ff8a90, #e04b52);
  border-color: rgba(255, 255, 255, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 22px -10px rgba(242, 85, 90, .8);
}
button.primary.danger:hover:not(:disabled) {
  background: linear-gradient(180deg, #ff9aa0, #e85a61);
}

/* ---------------------------------------------------------------- 杂项 */
.empty { color: var(--text-dim); text-align: center; padding: 60px 0; }
.empty .big { font-size: 30px; margin-bottom: 10px; opacity: .5; }
/* Toast 是浮在液体表面的小气泡：胶囊形 + 顶边高光 + 柔和投影 */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--player-h) + var(--safe-bottom) + 18px);
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 255, 255, .15);
  padding: 10px 17px; border-radius: 999px; font-size: 13px;
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    0 18px 40px -18px rgba(0, 0, 0, .95);
  opacity: 0; transition: opacity .2s, transform .2s;
  pointer-events: none; z-index: 40;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-2px); }
.toast.err { border-color: rgba(255, 107, 114, .4); color: #ffb3b8; background: linear-gradient(180deg, rgba(255, 107, 114, .18), rgba(255, 107, 114, .08)); }

.scan-bar {
  /* 限宽：进度条是跟表单配套的小控件，铺满整个内容区会变成
     一条横跨屏幕的 4px 暗线，看着像分区分隔线而不是进度指示。 */
  max-width: 820px;
  /* 轨道用极淡的白而不是暗黑：暗色轨道在深背景上会变成一条横贯的
     "分隔线"，被误读成区块边界；淡白的凹槽才像进度条该有的样子。 */
  height: 4px; background: rgba(255, 255, 255, .055); border-radius: 999px; overflow: hidden; margin: 10px 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4);
}
.scan-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #5f8ef5, #9ac0ff);
  box-shadow: 0 0 12px rgba(111, 168, 255, .8);
  transition: width .3s;
}

.kbd {
  font: 11px ui-monospace, Menlo, monospace;
  background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .04));
  border: 1px solid var(--glass-edge);
  border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 5px; color: var(--text-dim);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.muted { color: var(--text-faint); font-size: 12.5px; }
code.inline { font: 12px ui-monospace, Menlo, monospace; background: rgba(255, 255, 255, .07); padding: 1px 5px; border-radius: 5px; }

/* 细滚动条：玻璃界面里一条粗灰条会非常出戏，这里做成半透明细条并留出内缩。 */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .13);
  background-clip: content-box;
  border: 3px solid transparent;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .24); background-clip: content-box; }

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
    /* 行高交给内容自己决定：窄屏下播放条会从三列堆成一列（信息行 + 控件行
       + 进度行），写死 88px 会把下半截直接裁掉。
       --player-h 仍给一个估值，因为 toast 用它算上浮位置。 */
    grid-template-rows: minmax(0, 1fr) auto;
  }
  :root { --player-h: 126px; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 30;
    transform: translateX(-100%); transition: transform .2s;
    /* 抽屉是 fixed inset:0，比 .layout 的内容区更大：它盖住了状态栏和手势条那两条，
       所以上下安全区要自己补，否则第一项导航压在时钟下面、最后一项被手势条挡住。 */
    padding-top: calc(16px + var(--safe-top));
    padding-bottom: calc(16px + var(--safe-bottom));
    /* 抽屉展开时会盖住内容，玻璃要更实一点才读得清 */
    background: linear-gradient(180deg, rgba(26, 34, 52, .92), rgba(14, 20, 34, .94));
  }
  .sidebar.open {
    transform: none;
    box-shadow: 0 0 60px rgba(0, 0, 0, .7), inset -1px 0 0 rgba(255, 255, 255, .1);
  }
  /* 抽屉里不需要为"主内容区留一条边界线"的那层内高光 */
  .sidebar.open { border-right-color: rgba(255, 255, 255, .14); }
  /* 顶部只留 12px：安全区本身已经是"状态栏的真实高度"，再叠一大截内边距，
     顶栏会被顶到屏幕中段——真机上第一眼就是"上面空了一大片"。 */
  .main { padding: 12px calc(16px + var(--safe-right)) 26px calc(16px + var(--safe-left)); }
  .player { grid-template-columns: 1fr; gap: 2px; padding: 8px calc(14px + var(--safe-right)) calc(10px + var(--safe-bottom)) calc(14px + var(--safe-left)); }
  .player .right-controls { display: none; }
  .topbar { gap: 8px; margin-bottom: 16px; }
  .menu-btn { display: grid; place-items: center; }
  /* z-index 比抽屉（30）低一层：遮罩要压在内容上、被抽屉压住 */
  .nav-scrim.show {
    display: block;
    position: fixed; inset: 0; z-index: 29;
    background: rgba(3, 6, 14, .42);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    animation: dlg-fade .18s ease-out;
  }
}

/* 窄屏的曲目行：右边那一列塞了"音质徽章 + 六颗星 + 下载 + 收藏 + 加入歌单"，
   在 390px 宽下它独占 230px 以上，把 1fr 的标题压成 0 宽——标题就直接消失了。
   手机端评分不是高频操作，让它先让位；徽章和信息行同理收窄。 */
@media (max-width: 720px) {
  .track { grid-template-columns: 28px 1fr auto auto; gap: 8px; padding: 9px 11px; }
  .track.selectable { grid-template-columns: 20px 28px 1fr auto auto; }
  .track .rating { display: none; }
  .track .title .sub { font-size: 11.5px; }
  .track .badge { font-size: 10px; padding: 1px 5px; }
  /* 曲目标题必须能压缩：nowrap + ellipsis 在 minmax 里的 min-content 就是 0，
     不显式松开 min-width 的话它会顽固地把相邻列挤出容器。 */
  .track .title { min-width: 0; }
}

/* ---------------------------------------------------------------- 星标 / 评分 */

/* 星标是可点按钮，不是装饰：hover 与 aria-pressed 都要有反馈，
   否则用户不知道"这排小星星能不能点"。 */
.star {
  color: var(--text-faint);
  transition: color .12s ease, transform .12s ease, text-shadow .12s ease;
}
.star.small { font-size: 13px; padding: 0 2px; }
.star:hover { color: var(--star); transform: scale(1.15); text-shadow: 0 0 12px rgba(255, 209, 102, .7); }
.star.on { color: var(--star); }

/* 未点亮的星要真的看起来是"空"的，否则暗色主题下用户分不清有没有评分 */
.rating { display: inline-flex; align-items: center; gap: 0; }
.rating .star { opacity: .5; }
.rating .star.on { opacity: 1; }
.rating:hover .star { opacity: .8; }
.rating:hover .star.on { opacity: 1; }

/* 插件列表：一行一个插件。拒载的要把原因显示出来，否则"装了没动静"没法排查。 */
.plugin-row {
  border: 1px solid var(--glass-edge); border-radius: var(--radius-lg);
  padding: 11px 13px; margin-bottom: 8px;
  background: linear-gradient(165deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .022));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .13),
    0 10px 24px -20px rgba(0, 0, 0, .9);
}
.plugin-name { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.plugin-ok, .plugin-bad {
  font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px;
  border: 1px solid currentColor;
}
.plugin-ok { color: var(--ok); background: rgba(74, 222, 158, .10); }
.plugin-bad { color: var(--danger); background: rgba(255, 107, 114, .10); }
.plugin-error { color: var(--danger); font-size: 12px; margin-top: 4px; word-break: break-word; }

/* 设备行：名称/时间/移除在同一行，窄屏允许换行 */
.device-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.device-row:last-of-type { border-bottom: none; }
.device-name { font-size: 13px; }
.device-seen { font-size: 12px; flex: 1; min-width: 160px; }
button.ghost.small { padding: 3px 10px; font-size: 12px; }

/* 账号行：三列栅格（名字 / 使用度 / 操作）。
   刻意不用 flex：靠 .muted 的 flex:1 去把末元素顶到右边是不可靠的——
   「当前账号」是短文本、「移除」是按钮，两者宽度不同，最终落点差出几百像素。 */
.user-row {
  display: grid; grid-template-columns: minmax(140px, 220px) 1fr auto;
  align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.user-row:last-of-type { border-bottom: none; }
.user-name { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.user-admin {
  font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px;
  border: 1px solid rgba(224, 162, 60, .42); color: #e8b256; background: rgba(224, 162, 60, .12);
}
.user-row .muted { font-size: 12px; }
/* 账号/密码两区限宽：内容少，超宽屏上摊满会把相关信息推得太散 */
.users-box, .pass-box { max-width: 820px; }
.user-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
/* flex-basis 给具体值而不是 max-width：只设 max-width 时输入框会被压缩，
   占位文字被截成"用户名（不含空…"，用户看不出这里要填什么。 */
.user-form .search-input { flex: 1 1 190px; min-width: 150px; max-width: 240px; }
/* 表单错误要紧跟表单，且换行不撑破布局（服务端文案可能很长） */
.user-error { color: var(--danger); font-size: 12px; margin-top: 6px; word-break: break-word; }

/* ------------------------------------------------------------ 社区（M6 阶段 2） */
/* 社区页与账号区同样限宽：这里内容更少，超宽屏上摊满会让"谁在这儿"变得难扫。 */
.community-box { max-width: 820px; }
.person-list { display: flex; flex-direction: column; gap: 10px; }
.person {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start;
  background: linear-gradient(165deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .022) 55%, rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: var(--radius-lg); padding: 13px 15px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .15),
    0 12px 28px -24px rgba(0, 0, 0, .9);
  transition: border-color .16s, box-shadow .16s;
}
.person:hover { border-color: rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 18px 34px -24px rgba(0, 0, 0, .95); }
.person-name {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.person-name:hover { text-decoration: underline; }
/* 用户名是"认人的依据"，比显示名暗一级，不抢注意力 */
.person-username { font-size: 12px; margin-top: 1px; }
.person-bio { font-size: 12.5px; margin-top: 6px; line-height: 1.5; word-break: break-word; }
.person-meta { font-size: 12px; margin-top: 6px; }
/* 关掉资料可见之后给本人看的提示：这是那个开关唯一的"回执" */
.person-warn {
  font-size: 12px; margin-top: 6px; padding: 7px 9px;
  border-radius: 10px; background: rgba(224, 162, 60, .12);
  border: 1px solid rgba(224, 162, 60, .35); color: #e8b256;
}
/* "你"这个标记用意就一个：列表里有自己，得一眼看出哪行是自己 */
.person-mine {
  font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px;
  border: 1px solid var(--accent-dim); color: var(--accent); background: rgba(111, 168, 255, .12);
}
.person-actions { display: flex; align-items: center; gap: 8px; }
.follow-btn { min-width: 72px; }
@media (max-width: 640px) {
  /* 窄屏把操作按钮挪到下一行：挤在右侧会把名字压成"爱丽…" */
  .person { grid-template-columns: 1fr; }
  .person-actions { justify-content: flex-start; }
}

/* 设置页「我的社区资料」 */
.profile-box { max-width: 820px; }
.profile-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.profile-label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
/* 简介是唯一的多行输入：单行输入框里写五行简介会被截成一条，用户看不见自己写了多少 */
.profile-bio { resize: vertical; min-height: 68px; line-height: 1.5; }
.profile-switch { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 10px; cursor: pointer; }
.profile-check { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
/* 后果说明紧跟开关：这句话在"就要保存之前"才有用 */
.profile-hint { font-size: 12px; line-height: 1.55; margin: -2px 0 0 23px; }
.user-ok { color: var(--ok); font-size: 12px; margin-top: 6px; }
/* 社区页/主页的标题里要挂"管理员""你"两个徽章，得是一行 flex 才排得整齐 */
.community-box h2.page-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 段落内的"没有内容"提示：比整页空态轻，不要 60px 的上下留白 */
.section-note { font-size: 12.5px; line-height: 1.6; color: var(--text-dim); padding: 6px 0; }
/* 保存按钮不该拉满整行：它跟上面几个输入框不是同一种东西 */
.profile-form > button.primary { align-self: flex-start; min-width: 132px; margin-top: 6px; }

/* 社区分页（发现 / 动态）：M6 阶段 3 */
.tabs { display: flex; gap: 6px; margin: 4px 0 14px; }
/* 分页按钮不跟普通按钮一样吃满高度：它们是导航，不是动作 */
.tabs .tab { border-radius: 999px; }

/* 动态流 */
.feed-list { display: flex; flex-direction: column; gap: 2px; }
/* 每条动态靠左侧一条竖线连成时间线：feed 的一多半信息量来自"先后" */
.feed-item {
  display: grid; grid-template-columns: 14px 1fr; gap: 10px;
  padding: 10px 0; position: relative;
}
.feed-dot {
  width: 7px; height: 7px; border-radius: 50%; margin-top: 6px;
  background: rgba(255, 255, 255, .18); justify-self: center;
  position: relative; z-index: 1;
}
/* 竖线连到上一条的圆点；第一条上面不该有线 */
.feed-item + .feed-item::before {
  content: ''; position: absolute; left: 6.5px; top: -10px; height: 16px;
  width: 1px; background: rgba(255, 255, 255, .09);
}
.feed-item:first-child .feed-dot { background: var(--accent); box-shadow: 0 0 10px var(--accent-soft); }
.feed-main { min-width: 0; }
.feed-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.feed-who { font-size: 13.5px; font-weight: 600; cursor: pointer; }
.feed-who:hover { text-decoration: underline; }
.feed-action { font-size: 13px; }
/* 时间紧跟在动作后面，不推向右边缘：动态条目没有卡片边框，
   把时间丢到两千像素外会看起来像另一列无关的字。 */
.feed-time { font-size: 12px; }
/* 动作与时间之间用一个中点隔开，光靠间距在长文案里分不开 */
.feed-action::after { content: '·'; margin-left: 8px; color: rgba(255, 255, 255, .18); }
.feed-detail { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; line-height: 1.5; }
.feed-detail.link { cursor: pointer; }
.feed-detail.link:hover { color: var(--text); text-decoration: underline; }
.feed-actions { margin-top: 6px; }

/* 用户主页「最近在听」 */
.activity-list { display: flex; flex-direction: column; gap: 6px; }
.activity-row {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(165deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius); padding: 9px 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
/* 曲目标题要能被截断：连听一条 20 首的条目会把行撑爆 */
.activity-main { flex: 1; min-width: 0; font-size: 13px; }
.activity-main .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 歌单分享面板（M6 阶段 4） */
.share-panel {
  /* 面板不铺满整个内容区：一行里只有备注输入需要宽度，铺到底会让"生成链接"
     离输入框两米远，看起来像两块无关的东西 */
  max-width: 820px; margin: 14px 0 18px; padding: 15px 17px;
  background: linear-gradient(165deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .022) 60%);
  border: 1px solid rgba(255, 255, 255, .09); border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .15),
    0 14px 30px -24px rgba(0, 0, 0, .9);
}
.share-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
/* 备注输入吃掉多余宽度：它比下拉框和按钮都更需要空间 */
.share-form .share-label { flex: 1; min-width: 180px; }
/* 「只显示一次」的提示块用一个明显的边框，让人意识到这里漏了就没了 */
.share-created {
  margin: 10px 0; padding: 11px 13px;
  border: 1px dashed var(--accent-dim); border-radius: var(--radius);
  background: rgba(111, 168, 255, .07);
}
.share-created-title { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.share-created-row { display: flex; gap: 8px; align-items: center; }
/* 链接要能一眼看全并可手动全选（clipboard 不可用时的兜底） */
.share-created-row .share-link {
  flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}
.share-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.share-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--radius);
  background: rgba(255, 255, 255, .03);
}
.share-row-main { flex: 1; min-width: 0; }
.share-row-label { font-size: 13px; }
.share-row-main .muted { font-size: 12px; }

/* 实例名与欢迎语（M6 打磨）：身份信息要有一点点重量，
   否则一个只有几个人的私服看起来和产品自带页面一模一样。 */
.instance-name { font-size: 14px; font-weight: 600; letter-spacing: 0.2px; }

/* 关注我的人：紧凑一行，不抢成员卡片的戏（同一个人可能同时出现在两处）。 */
.follower-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.follower { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 5px 0; }
.follower .person-meta { margin: 0; font-size: 12px; }
.follower .follow-btn { margin-left: auto; }

/* ------------------------------------------------------------ 降级策略 */
/* 不支持 backdrop-filter 的浏览器（老 Firefox / 旧 WebView）：
   把玻璃底换成实色，否则半透明面板叠在光斑上会糊成一片、文字读不清。
   宁可失去玻璃，也不能失去可读性。 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sidebar, .player, .lyrics-panel, .dlg, .auth-card, .toast, .sel-bar.on {
    background: linear-gradient(180deg, #161e2e, #0c1220);
  }
  body::before { opacity: .55; }
}

/* 系统开了"降低透明度"：服从无障碍设置，退回低透明度的实色面板。 */
/* ---------------------------------------------------------------- 榜单 / 发布音乐 */

/* 药丸式 tab：只在榜单与审核队列里用，选中的那颗用 accent 顶点色。 */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs .tab { padding: 6px 14px; font-size: 13px; }
.tabs .tab.active { color: var(--text); border-color: var(--accent-dim); background: var(--accent-soft); }

.charts-head .muted { margin: 0 0 16px; font-size: 12.5px; line-height: 1.6; max-width: 62ch; }

/* 投稿表单：一列一组 label + 控件。玻璃靠顶边高光与大而淡的外阴影伪造，
   不给它加 backdrop-filter —— 这是在页面里滚动的块，虚化一次就是一次持续的合成开销。 */
.publish-form {
  display: grid; gap: 14px; padding: 18px; max-width: 640px;
  border-radius: var(--radius-lg); border: 1px solid var(--glass-edge);
  background: linear-gradient(180deg, var(--glass-2), var(--glass-1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 18px 40px rgba(0, 0, 0, .35);
}
.publish-form .field { display: grid; gap: 6px; }
.publish-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .publish-fields { grid-template-columns: 1fr; } }
.publish-form label { font-size: 12px; color: var(--text-dim); letter-spacing: .02em; }
.publish-form textarea { resize: vertical; font-family: inherit; }
.upload-file-hint { font-size: 12px; }
.upload-file-hint.upload-file-warn { color: var(--danger); }

.upload-progress { display: grid; gap: 6px; }
/* [hidden] 的默认 display:none 会被上面的 grid 覆盖掉——这是 display 属性最常见的一个坑。 */
.upload-progress[hidden] { display: none; }
.upload-progress-track { height: 4px; border-radius: 999px; background: var(--glass-2); overflow: hidden; }
.upload-progress-bar {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--ok));
  transition: width .18s ease;
}
.upload-progress-text { font-size: 12px; }

.upload-list { display: grid; gap: 10px; }
.upload-item {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: start;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--glass-1); border: 1px solid var(--glass-edge);
  transition: background .16s ease;
}
.upload-item:hover { background: var(--glass-2); }
.upload-main { display: grid; gap: 4px; min-width: 0; }
.upload-title { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.upload-meta, .upload-note { font-size: 12px; color: var(--text-dim); }
.upload-note { color: var(--text-faint); }
.upload-reject { font-size: 12px; color: var(--danger); }
.upload-actions { display: flex; gap: 8px; align-items: center; }

.upload-status {
  font-size: 11px; padding: 1px 9px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--glass-edge); color: var(--text-dim);
}
.upload-status-pending { color: #e8c37a; border-color: rgba(232, 195, 122, .4); }
.upload-status-approved { color: var(--ok); border-color: rgba(74, 222, 158, .4); }
.upload-status-rejected { color: var(--danger); border-color: rgba(255, 107, 114, .4); }

@media (max-width: 720px) {
  .upload-item { grid-template-columns: 1fr; }
  .upload-actions { justify-content: flex-end; }
}

@media (prefers-reduced-transparency: reduce) {
  .sidebar, .player, .lyrics-panel, .dlg, .auth-card, .toast, .sel-bar.on {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #121926;
  }
  body::before { opacity: .5; }
}

/* 尊重"减少动态效果"：把位移/缩放动画关掉，只保留颜色变化。 */
@media (prefers-reduced-motion: reduce) {
  button, .card, .person, .activity-row, .nav-item, .star {
    transition-duration: .01ms !important;
  }
  .card:hover { transform: none; }
  button:active:not(:disabled) { transform: none; }
  .dlg { animation: none; }
  /* 一直转的唱片对前庭敏感的人来说是持续的视觉噪音，这里完全停下。 */
  .auth-disc, .auth-wrap::before { animation: none; }
}
