/* =====================================================================
   斑马电台 · Zebra Radio —— 样式表
   设计基调：极浅白底 + 衬线字体 + 留白，单色克制，文学文艺感
   ===================================================================== */

:root {
  color-scheme: light;
  --bg: #fafaf7;
  --bg-soft: #f4f3ef;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-soft: rgba(255, 255, 255, 0.52);
  --panel-strong: rgba(255, 255, 255, 0.88);
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --dim: #a0a0a0;
  --line: rgba(26, 26, 26, 0.10);
  --line-strong: rgba(26, 26, 26, 0.20);
  --accent: #2a2a2a;
  --accent-strong: #0a0a0a;
  --violet: #2a2a2a;
  --button: rgba(0, 0, 0, 0.04);
  --button-hover: rgba(0, 0, 0, 0.08);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  --shadow-strong: 0 12px 40px rgba(0, 0, 0, 0.10);
  --radius: 14px;

  /* 衬线字体栈：优雅文艺，参考参考图风格 */
  --font-serif: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", "Songti SC", "STSong", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;

  --mini-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
  /* 删除移动端点按时的蓝色高亮方块 */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html, body { height: 100%; }

html {
  /* 平滑滚动，让锚点/滚动过渡更柔和 */
  scroll-behavior: smooth;
  /* 禁用「双击缩放」：原生生效，且不会像 JS preventDefault 那样吞掉点击
     （JS 兜底逻辑会误伤连续点击，导致暂停键点了没反应） */
  touch-action: manipulation;
}

/* 统一的过渡动画：所有交互元素默认带平滑过渡（尊重 prefers-reduced-motion） */
a, button, input, select, textarea,
.category-card, .work-row, .list-card, .panel-card, .stat-card,
.notify-item, .me-entry, .upload-zone, .tag-chip {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease,
              box-shadow 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  position: relative;
}

/* 极浅的纸面颗粒感（参考图的微弱噪点） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(26, 26, 26, 0.025) 1px, transparent 1.2px),
    radial-gradient(circle at 68% 78%, rgba(26, 26, 26, 0.02) 1px, transparent 1.2px),
    radial-gradient(circle at 82% 36%, rgba(26, 26, 26, 0.018) 1px, transparent 1.2px),
    radial-gradient(circle at 32% 88%, rgba(26, 26, 26, 0.022) 1px, transparent 1.2px);
  background-size: 240px 240px, 320px 320px, 200px 200px, 280px 280px;
}

body.is-locked { overflow: hidden; }

/* ---------------------------- 背景气泡（浅色细颗粒） ---------------------------- */

.ambient-bubbles {
  --vh-unit: 1vh;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
@supports (height: 100dvh) {
  .ambient-bubbles { height: 100dvh; --vh-unit: 1dvh; }
}

.ambient-bubble {
  --size: 24px;
  --x: 50%;
  --delay: 0s;
  --duration: 36s;
  --drift: 0px;
  position: absolute;
  left: var(--x);
  bottom: calc(-6 * var(--vh-unit));
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.7), rgba(26, 26, 26, 0.05) 42%, transparent 72%);
  border: 1px solid rgba(26, 26, 26, 0.10);
  opacity: 0;
  animation: bubble-rise var(--duration) var(--delay) linear infinite;
  will-change: transform, opacity;
}
@keyframes bubble-rise {
  0%   { transform: translate3d(0, 0, 0) scale(0.65); opacity: 0; }
  12%  { opacity: 0.45; }
  50%  { transform: translate3d(var(--drift), calc(-52 * var(--vh-unit)), 0) scale(1); opacity: 0.35; }
  88%  { opacity: 0.16; }
  100% { transform: translate3d(calc(var(--drift) * -0.6), calc(-108 * var(--vh-unit)), 0) scale(1.12); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ambient-bubble { animation: none; opacity: 0.18; }
}

/* ---------------------------- 布局骨架 ---------------------------- */

.app-shell {
  position: relative;
  z-index: 2;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: calc(28px + var(--safe-t)) 20px calc(150px + var(--safe-b));
}
body.has-mini .app-shell { padding-bottom: calc(var(--mini-h) + 96px + var(--safe-b)); }

.hidden { display: none !important; }

.section-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
}
.muted-text { color: var(--muted); font-size: 13px; }

/* ---------------------------- Hero ---------------------------- */

.hero { margin-bottom: 26px; }

.hero-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hero-copy { min-width: 0; }

.hero-line {
  margin: 0;
  font-size: clamp(22px, 3.4vw, 32px);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-family: var(--font-serif);
  background: linear-gradient(100deg, var(--text) 0%, var(--text) 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subline {
  margin: 8px 0 0;
  font-size: clamp(13px, 1.6vw, 16px);
  color: var(--muted);
  letter-spacing: 0.12em;
  font-family: var(--font-serif);
  font-style: italic;
}

.me-entry {
  position: relative;
  flex: none;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  border: 0;
  background: transparent;
}
.me-entry-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.9), rgba(245, 245, 240, 0.9));
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s;
}
.me-entry:hover .me-entry-avatar { transform: scale(1.04); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12); }
.me-entry:active .me-entry-avatar { transform: scale(0.97); transition-duration: 0.12s; }
.me-entry-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(26, 26, 26, 0.18);
  animation: avatar-breathe 5.5s ease-in-out infinite;
}
.me-entry.is-admin { position: relative; }
.me-entry.is-admin::after {
  content: '';
  position: absolute;
  top: -2px; right: -2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #ffd68a;
  box-shadow: 0 0 0 3px var(--bg);
}
@keyframes avatar-breathe {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50%      { transform: scale(1.07); opacity: 0.15; }
}
@media (min-width: 720px) {
  .me-entry, .me-entry-avatar { width: 112px; height: 112px; }
  .me-entry-avatar { font-size: 40px; }
}

/* 顶栏右侧操作区：收藏入口 + 个人中心头像 */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: none;
}
.hero-fav-entry {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  overflow: visible;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease;
}
.hero-fav-entry:hover {
  background: var(--button-hover);
  border-color: var(--line-strong);
  color: var(--text);
  transform: translateY(-1px);
}
.hero-fav-entry:active { transform: scale(0.92); transition-duration: 0.12s; }
/* 有收藏：心形点亮、底色微粉 */
.hero-fav-entry.has-fav {
  color: #ff6b8b;
  border-color: rgba(255, 107, 139, 0.40);
  background: rgba(255, 107, 139, 0.08);
}
.hero-fav-entry.has-fav svg path { fill: currentColor; }
.hero-fav-entry.has-fav:hover { color: #ff5b7b; background: rgba(255, 107, 139, 0.14); }
.hero-fav-entry svg { transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1); }

/* 收藏数量角标（红丸，覆盖在圆钮右上） */
.fav-badge {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ff6b8b;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: 0 0 0 2px var(--bg);
  pointer-events: none;
}

/* 小屏让收藏入口与头像更紧凑，避免标题被挤坏 */
@media (max-width: 719px) {
  .hero-actions { gap: 8px; }
  .hero-fav-entry { width: 42px; height: 42px; }
  .hero-fav-entry svg { width: 18px; height: 18px; }
  .fav-badge { top: -4px; right: -4px; min-width: 16px; height: 16px; font-size: 9px; padding: 0 4px; }
}

/* 搜索行 */
.hero-search-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box:focus-within {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}
.search-icon { display: grid; place-items: center; color: var(--dim); flex: none; }
.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}
.search-box input::placeholder { color: var(--dim); }
.search-box input::-webkit-search-cancel-button { display: none; }

.clear-search {
  flex: none;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

/* 消息铃铛 */
.notify-bell {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.notify-bell:hover { background: var(--button-hover); border-color: var(--line-strong); color: var(--text); transform: translateY(-1px); }
.notify-bell:active { transform: scale(0.92); transition-duration: 0.12s; }
.notify-badge {
  position: absolute;
  top: 9px;
  right: 11px;
  min-width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ff6b8b;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.notify-panel {
  position: absolute;
  top: 56px;
  right: 0;
  z-index: 60;
  width: min(360px, calc(100vw - 40px));
  max-height: 60vh;
  overflow: auto;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--panel-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  transform-origin: top right;
}
@keyframes notify-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
.notify-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 10px;
}
.notify-panel-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
}
.notify-list { display: grid; gap: 10px; }
.notify-item {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.notify-item:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.notify-item-date { font-size: 11px; color: var(--dim); letter-spacing: 0.1em; }
.notify-item-text { margin: 6px 0 0; font-size: 14px; line-height: 1.6; }
.notify-empty { color: var(--dim); font-size: 13px; text-align: center; padding: 18px 0; }
.notify-item--personal.is-unread { border-color: var(--line-strong); background: rgba(26, 26, 26, 0.07); }
.notify-item--personal.is-unread .notify-item-text { font-weight: 600; }
.notify-item-excerpt { margin: 4px 0 0; font-size: 12px; line-height: 1.5; color: var(--dim); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.notify-divider { height: 1px; background: var(--line); margin: 2px 0; }

/* ---------------------------- 分类宫格 ---------------------------- */

.section-head--channels {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 30px 0 16px;
}
.channels-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.channels-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
  animation: dot-pulse 2.6s ease-in-out infinite;
}
@keyframes dot-pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); } 50% { opacity: 0.7; box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 6%, transparent); } }

.total-count { margin-left: auto; font-size: 12px; color: var(--dim); }

.language-toggle {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.language-toggle:hover { color: var(--accent-strong); border-color: var(--line-strong); }

.category-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px)  { .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }

.category-card {
  position: relative;
  overflow: hidden;
  padding: 18px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: left;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  animation: card-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s, box-shadow 0.3s;
}
/* 分类卡片点击波纹 */
.category-card::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 160px; height: 160px;
  margin: -80px 0 0 -80px;
  background: radial-gradient(circle, color-mix(in srgb, var(--tint, var(--accent)) 40%, transparent) 0%, transparent 70%);
  border-radius: 50%;
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
.category-card:active::before { animation: ripple-large 0.55s ease-out; }
@keyframes ripple-large {
  0%   { transform: scale(0); opacity: 0.85; }
  100% { transform: scale(2.6); opacity: 0; }
}
.category-card::after {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--tint, var(--accent)), transparent 68%);
  opacity: 0.08;
  transition: opacity 0.4s, transform 0.6s;
}
.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.10);
}
.category-card:hover::after { opacity: 0.16; transform: scale(1.18); }
.category-card:active { transform: translateY(-1px) scale(0.98); transition-duration: 0.12s; }
.category-card.is-active { border-color: var(--tint, var(--accent)); }

.category-emoji {
  font-size: 28px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--tint, var(--accent)) 18%, rgba(255, 255, 255, 0.6));
  border: 1px solid color-mix(in srgb, var(--tint, var(--accent)) 24%, var(--line));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  filter: none;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s, background 0.3s;
}
.category-card:hover .category-emoji {
  transform: scale(1.1) rotate(-4deg);
  background: color-mix(in srgb, var(--tint, var(--accent)) 28%, rgba(255, 255, 255, 0.6));
  box-shadow: 0 6px 14px color-mix(in srgb, var(--tint, var(--accent)) 28%, transparent);
}
.category-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.category-meta {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.06em;
}

/* ---------------------------- 列表 / 工具栏 ---------------------------- */

@keyframes view-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* 分类宫格的卡片依次进场 */
.category-card {
  animation: card-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.category-card:nth-child(1) { animation-delay: 0.02s; }
.category-card:nth-child(2) { animation-delay: 0.08s; }
.category-card:nth-child(3) { animation-delay: 0.14s; }
.category-card:nth-child(4) { animation-delay: 0.20s; }
.category-card:nth-child(5) { animation-delay: 0.26s; }
.category-card:nth-child(6) { animation-delay: 0.32s; }
.category-card:nth-child(n+7) { animation-delay: 0.38s; }
@keyframes card-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.list-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  margin-bottom: 8px;
}
.sticky-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.toolbar-title { min-width: 0; flex: 1; }
.toolbar-title h2 {
  margin: 2px 0 0;
  font-size: clamp(17px, 2.4vw, 22px);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toolbar-actions { display: flex; align-items: center; gap: 10px; flex: none; }

.ghost-button, .toolbar-sort, .queue-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--button);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.ghost-button:hover, .toolbar-sort:hover, .queue-mode-btn:hover {
  background: var(--button-hover);
  border-color: var(--line-strong);
}
.toolbar-back { width: 38px; padding: 0; justify-content: center; color: var(--accent); }

.work-rows { display: grid; gap: 10px; }

/* 列表项 stagger 进场：依次淡入 + 上移，给"内容陆续加载"的呼吸感 */
.work-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  animation: row-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.26s, background 0.26s, box-shadow 0.26s;
}
/* 点击波纹：从中心径向扩散 */
.work-row::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 100px; height: 100px;
  margin: -50px 0 0 -50px;
  background: radial-gradient(circle, rgba(26, 26, 26, 0.18) 0%, transparent 70%);
  border-radius: 50%;
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}
.work-row:active::after {
  animation: ripple 0.5s ease-out;
}
@keyframes ripple {
  0%   { transform: scale(0); opacity: 0.7; }
  100% { transform: scale(4); opacity: 0; }
}
.work-row:nth-child(1) { animation-delay: 0s; }
.work-row:nth-child(2) { animation-delay: 0.04s; }
.work-row:nth-child(3) { animation-delay: 0.08s; }
.work-row:nth-child(4) { animation-delay: 0.12s; }
.work-row:nth-child(5) { animation-delay: 0.16s; }
.work-row:nth-child(6) { animation-delay: 0.20s; }
.work-row:nth-child(7) { animation-delay: 0.24s; }
.work-row:nth-child(8) { animation-delay: 0.28s; }
.work-row:nth-child(n+9) { animation-delay: 0.32s; }
@keyframes row-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.work-row:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--panel-soft);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}
.work-row:active { transform: translateY(0) scale(0.99); transition-duration: 0.1s; }
.work-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.work-row.is-current { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(26, 26, 26, 0.2) inset; }

.work-index {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(26, 26, 26, 0.08);
  color: var(--accent);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.work-body { flex: 1; min-width: 0; }
.work-title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.work-sub {
  margin: 5px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: var(--dim);
}
.work-sub .dot { opacity: 0.4; }
.work-actions { flex: none; display: flex; align-items: center; gap: 6px; }

.row-icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  transition: color 0.2s, background 0.2s;
}
.row-icon-btn:hover { color: var(--accent-strong); background: rgba(26, 26, 26, 0.12); }
.row-icon-btn.is-fav { color: #ff6b8b; background: rgba(255, 107, 139, 0.12); }
.row-icon-btn.is-fav:hover { color: #ff5b7b; background: rgba(255, 107, 139, 0.20); }

.work-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.08em;
  border: 1px solid var(--line-strong);
  color: var(--accent-strong);
}
.work-badge--locked { color: var(--violet); border-color: rgba(26, 26, 26, 0.4); }
.work-badge--video { color: #ffd18f; border-color: rgba(255, 209, 143, 0.35); }

.list-empty {
  padding: 48px 0;
  text-align: center;
  color: var(--dim);
  font-size: 14px;
}

/* ---------------------------- 迷你播放器（浅色毛玻璃胶囊） ---------------------------- */

.mini-player {
  position: fixed;
  left: 50%;
  bottom: calc(16px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 360px;
  width: calc(100% - 32px);
  height: 64px;
  padding: 0 12px;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(245, 245, 240, 0.78);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
@keyframes mini-in { from { transform: translate(-50%, 100%); } to { transform: translateX(-50%); } }

.mini-progress {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 2px;
  background: var(--line);
  border-radius: 999px;
  opacity: 0.4;
}
.mini-progress i {
  display: block;
  height: 100%;
  background: var(--text);
  border-radius: 999px;
  transition: width 0.25s linear;
}

.mini-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-serif);
  text-align: left;
  cursor: pointer;
  padding: 6px 0;
}
.mini-cover {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--bg-soft);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.mini-cover-disc { display: none; }

.mini-text { min-width: 0; flex: 1; }
.mini-title-marquee { display: block; overflow: hidden; white-space: nowrap; }
.mini-title-marquee .marquee-text {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  font-style: italic;
}
.mini-sub {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mini-controls { flex: none; display: flex; align-items: center; gap: 2px; }
.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.icon-button:hover { background: rgba(0, 0, 0, 0.06); }
.primary-icon { color: var(--text); }
.primary-icon svg { filter: none; }

@media (max-width: 400px) {
  #miniPrev, #miniQueue { display: none; }
}

/* 跑马灯 */
.marquee-track { display: inline-flex; gap: 44px; will-change: transform; }
.marquee-text { display: inline-block; white-space: nowrap; }
.player-title-marquee,
.mini-title-marquee { position: relative; }
.marquee-track.is-scrolling { animation: marquee 16s linear infinite; }
.player-title-marquee:hover .marquee-track.is-scrolling,
.mini-title-marquee:hover .marquee-track.is-scrolling { animation-play-state: paused; }
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 22px)); }
}

/* ---------------------------- 全屏浮层通用 ---------------------------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(250, 250, 247, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.player-sheet, .video-sheet {
  position: relative;
  width: min(560px, 100%);
  max-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(14px + var(--safe-t)) 22px calc(26px + var(--safe-b));
  border-radius: 24px 24px 0 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(26, 26, 26, 0.04), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.08);
}
@keyframes sheet-up { from { transform: translateY(4%); opacity: 0.4; } to { transform: none; opacity: 1; } }

@media (min-width: 760px) {
  .overlay { align-items: center; }
  .player-sheet, .video-sheet {
    width: min(720px, 94vw);
    max-height: 92dvh;
    border-radius: 26px;
    border: 1px solid var(--line-strong);
  }
}

.icon-only-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--button);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.icon-only-button:hover { background: var(--button-hover); color: var(--accent-strong); }

.player-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.player-topbar-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--dim);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------------------------- 唱片舞台（浅色文艺版） ---------------------------- */

.player-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 18px 0 4px;
}
.player-art {
  position: relative;
  width: min(280px, 64vw);
  height: min(280px, 64vw);
  display: grid;
  place-items: center;
}
/* 封面：静态圆图，去掉旋转/沟槽/转轴孔 */
.art-cover {
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  overflow: hidden;
  background-image: url('/assets/images/avatar.jpg');
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.art-cover::before, .art-cover::after { display: none; }

/* 频谱可视化画布：覆盖在封面外圈，画出参考图的径向辐射 */
.spectrum-canvas {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
  z-index: 2;
  pointer-events: none;
  border-radius: 50%;
  mix-blend-mode: multiply;
}
}

/* 唱片纹理：CD 同心沟槽（叠加在封面之上，让封面图仍清晰可见） */
.art-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  background: repeating-radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.05) 0px,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 4px
  );
  mask-image: radial-gradient(circle at 50% 50%, #000 50%, transparent 88%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 50%, transparent 88%);
}
/* 中心不再放转轴孔：让作品封面/头像完整显示在光盘中心 */
.art-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  background: radial-gradient(circle at 50% 50%, transparent 58%, rgba(0, 0, 0, 0.18) 100%);
}

/* 字幕（浅色文艺版） */
.subtitle-panel {
  position: relative;
  width: 100%;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.subtitle-line { margin: 0; line-height: 1.7; font-family: var(--font-serif); }
.subtitle-line--current {
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  font-style: italic;
}
.subtitle-line--context {
  font-size: 13px;
  color: var(--dim);
  margin-top: 6px;
  font-style: italic;
}

/* 播放页元信息（衬线字体，文艺感） */
.player-meta { margin-top: 26px; text-align: center; }
.player-meta-kicker {
  color: var(--dim);
  opacity: 0.9;
  font-family: var(--font-serif);
  letter-spacing: 0.32em;
  font-size: 11px;
  text-transform: uppercase;
}
/* 标题居中：跑马灯撑满整行，心形按钮绝对定位到右侧。
   之前是 flex 并排（跑马灯 flex:1 + 按钮占位），标题会被挤到偏左。 */
.player-title-row {
  position: relative;
  display: block;
  margin-top: 10px;
  padding: 0 52px;
}
.player-title-row #fullTitle {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.player-title-marquee {
  min-width: 0;
  overflow: hidden;
  text-align: center;
  display: flex;
  justify-content: center;
}
#fullTitle { font-size: clamp(18px, 3vw, 22px); font-weight: 600; }
.like-button {
  flex: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--button);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}
.like-button:hover { color: #ff8fa8; }
.like-button[aria-pressed="true"] { color: #ff6b8b; background: rgba(255, 107, 139, 0.14); }
.like-button[aria-pressed="true"] svg path { fill: currentColor; }

.player-tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag-chip {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

/* 进度条 */
.progress-area { margin-top: 22px; }
.waveform-wrap {
  margin-bottom: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid var(--line);
  padding: 8px 10px;
  overflow: hidden;
  cursor: pointer;
}
.waveform-wrap[hidden] { display: none; }
#waveform { width: 100%; }
.progress-wrap { position: relative; }
#progressBar {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 26px;
  background: transparent;
  cursor: pointer;
  margin: 0;
}
#progressBar::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--text) var(--p, 0%), var(--line) var(--p, 0%));
}
#progressBar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 12%, transparent);
}
#progressBar::-moz-range-track { height: 3px; border-radius: 999px; background: var(--line); }
#progressBar::-moz-range-progress { height: 3px; border-radius: 999px; background: var(--text); }
#progressBar::-moz-range-thumb {
  width: 14px; height: 14px; border: 0; border-radius: 50%;
  background: var(--text);
}

.time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
  font-size: 12px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.skip-seek-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--button);
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.skip-seek-btn:hover { color: var(--accent-strong); border-color: var(--line-strong); }
.skip-num { font-variant-numeric: tabular-nums; }

.sleep-timer-status {
  margin: 12px 0 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(26, 26, 26, 0.12);
  border: 1px solid rgba(26, 26, 26, 0.3);
  color: #c9c0ff;
  font-size: 12px;
  text-align: center;
}

/* 播放控制 */
.player-controls { margin-top: 20px; }
.player-controls-aux {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
}
.player-aux-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--button);
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.player-aux-btn:hover:not(:disabled) { color: var(--text); background: rgba(0, 0, 0, 0.06); border-color: var(--line-strong); }
.player-aux-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.player-aux-btn[aria-pressed="true"] {
  color: var(--text);
  border-color: var(--text);
  background: rgba(0, 0, 0, 0.05);
}
.aux-label { font-size: 13px; }

.rate-btn { padding: 0; overflow: hidden; }
#playbackRateSelect {
  height: 36px;
  padding: 0 26px 0 13px;
  border: 0;
  border-radius: 999px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2392a9bd' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center/14px;
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
#playbackRateSelect option { background: #fafaf7; color: #edf7ff; }

.subtitle-menu {
  position: absolute;
  bottom: 46px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  min-width: 150px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}
.subtitle-menu button {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.subtitle-menu button:hover { background: var(--button-hover); }

.player-control-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 22px;
}
.player-ghost-control {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}
.player-ghost-control:hover { color: var(--text); background: rgba(0, 0, 0, 0.05); }
.player-ghost-control:active { transform: scale(0.92); }

.player-main-play {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}
.player-main-play:hover { transform: scale(1.05); }
.player-main-play:active { transform: scale(0.95); }

/* ---------------------------- 播放页内嵌评论 ---------------------------- */

.player-comments {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.player-comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.player-comments-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.player-comments-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--dim);
}
.player-comments-tabs { display: flex; gap: 6px; }
.player-comments-tab {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--button);
  color: var(--muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.player-comments-tab.is-active {
  background: rgba(26, 26, 26, 0.14);
  color: var(--accent-strong);
  border-color: rgba(26, 26, 26, 0.3);
}
.player-comments-list {
  display: grid;
  gap: 12px;
  max-height: 40dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
  margin-bottom: 14px;
}
.player-comment-form {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}

/* ---------------------------- 抽屉（播放列表 / 下载） ---------------------------- */

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.queue-drawer, .utility-drawer {
  position: relative;
  width: min(560px, 100%);
  max-height: 82dvh;
  display: flex;
  flex-direction: column;
  padding: 16px 18px calc(20px + var(--safe-b));
  border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border: 1px solid var(--line);
  border-bottom: 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.10);
}
@media (min-width: 760px) {
  .drawer-overlay { align-items: center; }
  .queue-drawer, .utility-drawer { width: min(560px, 92vw); border-radius: 22px; border-bottom: 1px solid var(--line-strong); }
}

.queue-drawer-header { padding-top: 6px; }
.queue-drawer-header > .icon-only-button { position: absolute; top: 14px; right: 14px; }
.queue-tabs { display: flex; gap: 6px; }
.queue-tab {
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--dim);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.queue-tab.is-active { background: rgba(26, 26, 26, 0.08); color: var(--text); border-color: var(--line-strong); }

.queue-drawer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}
.queue-drawer-heading h2 { margin: 0; font-size: 16px; font-weight: 600; }
.queue-heading-tools { display: flex; align-items: center; gap: 8px; }
.queue-icon-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--button);
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}
.queue-icon-btn:hover { color: var(--accent-strong); }

.sort-hint { margin: 8px 0 0; font-size: 11px; color: var(--dim); }

.queue-list-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; margin-top: 12px; }
.queue-rows { display: grid; gap: 6px; }

.queue-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.queue-row:hover { background: rgba(26, 26, 26, 0.04); }
.queue-row.is-current { background: rgba(26, 26, 26, 0.06); border-color: rgba(26, 26, 26, 0.18); }
.queue-row.is-dragging { opacity: 0.4; }
.queue-row.is-over { border-top: 2px solid var(--accent); }
.queue-row-main { flex: 1; min-width: 0; }
.queue-row-title {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.queue-row-sub { margin-top: 3px; font-size: 11px; color: var(--dim); }
.queue-row-handle {
  flex: none;
  width: 28px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--dim);
  cursor: grab;
  touch-action: none;
  font-size: 15px;
}
.queue-row-handle:active { cursor: grabbing; }
.queue-row-remove {
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 0; border-radius: 8px;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
}
.queue-row-remove:hover { color: #ff8fa8; background: rgba(255, 107, 139, 0.12); }
.queue-empty { padding: 30px 0; text-align: center; color: var(--dim); font-size: 13px; }

/* 收藏抽屉：复用 queue-drawer 主体，仅头部与空态微调 */
.fav-drawer { max-height: 86dvh; }
.fav-title-heart {
  color: #ff6b8b;
  font-size: 18px;
  margin-right: 2px;
  line-height: 1;
  vertical-align: -2px;
}
.fav-count {
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.02em;
}
.fav-empty {
  padding: 36px 16px;
  font-size: 13px;
  line-height: 1.7;
}
.fav-empty::before {
  content: '♥';
  display: block;
  font-size: 28px;
  margin-bottom: 10px;
  color: rgba(255, 107, 139, 0.35);
}

/* 下载抽屉 */
.utility-drawer { max-height: 70dvh; }
.drawer-head { margin: 6px 0 12px; }
.drawer-head h2 { margin: 6px 0 0; font-size: 17px; font-weight: 600; line-height: 1.4; }
.drawer-close { position: absolute; top: 14px; right: 14px; }
.utility-tip { font-size: 12px; color: var(--dim); line-height: 1.6; margin: 0 0 14px; }
.copy-title-inline {
  margin-top: 8px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
}
.copy-title-inline:hover { color: var(--accent-strong); }

.player-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.player-actions button,
.labeled-icon-button {
  flex: 1;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--button);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.player-actions button:hover,
.labeled-icon-button:hover { background: var(--button-hover); border-color: var(--line-strong); color: var(--accent-strong); }
.labeled-icon-button.is-primary {
  background: var(--text);
  border-color: transparent;
  color: #fafaf7;
  font-weight: 600;
}

/* ---------------------------- 简介 / 文字版 ---------------------------- */

.story-page, .comments-page {
  position: fixed;
  inset: 0;
  z-index: 125;
  display: flex;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.story-shell, .comments-shell {
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  max-height: 100dvh;
  background: linear-gradient(180deg, #fafaf7 0%, #fafaf7 100%);
}
@media (min-width: 760px) {
  .story-page, .comments-page { align-items: center; padding: 5dvh 0; background: rgba(255, 255, 255, 0.8); }
  .story-shell, .comments-shell { max-height: 90dvh; border-radius: 22px; border: 1px solid var(--line-strong); overflow: hidden; }
}

.story-head, .comments-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: calc(16px + var(--safe-t)) 20px 14px;
  border-bottom: 1px solid var(--line);
}
.story-head h2, .comments-head h2 { margin: 4px 0 0; font-size: 17px; font-weight: 600; line-height: 1.4; }
.story-head > div, .comments-head > div { flex: 1; min-width: 0; }
.story-close {
  flex: none;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--button);
  color: var(--text);
  cursor: pointer;
}

.story-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px; }
.story-cover-wrap { margin-bottom: 16px; }
.story-cover-wrap img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }
.story-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12px; color: var(--dim); margin-bottom: 16px; }
.story-body { font-size: 15px; line-height: 1.95; color: #dceaf7; }
.story-body p { margin: 0 0 14px; }
.story-body h3 { margin: 22px 0 10px; font-size: 15px; color: var(--accent-strong); }
.story-intro { margin-top: 6px; font-size: 14px; line-height: 1.9; color: var(--muted); }
.story-intro p { margin: 0 0 12px; }
.story-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }

.story-foot {
  display: flex;
  gap: 10px;
  padding: 14px 20px calc(16px + var(--safe-b));
  border-top: 1px solid var(--line);
}
.story-play-btn, .story-comment-btn {
  flex: 1;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--button);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.story-play-btn { background: var(--text); border-color: transparent; color: #fafaf7; font-weight: 600; }
.story-comment-btn:hover { background: var(--button-hover); }

/* ---------------------------- 评论 ---------------------------- */

.comments-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px; }
.comments-work-title { margin: 0 0 12px; font-size: 13px; color: var(--accent); }
.comments-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.comments-sort { display: flex; gap: 6px; }
.comments-sort-button {
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--dim);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.comments-sort-button.is-active { background: rgba(26, 26, 26, 0.14); color: var(--accent-strong); }

.comments-list { display: grid; gap: 12px; }
.comment-item {
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}
/* ---- 单条留言 ---- */
.comment-item {
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}
.comment-item.is-reply {
  margin-left: 22px;
  background: rgba(255, 255, 255, 0.022);
  border-color: rgba(255, 255, 255, 0.055);
}
.comment-head { display: flex; align-items: center; gap: 9px; }
.comment-avatar {
  width: 30px; height: 30px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(140deg, rgba(26, 26, 26, 0.32), rgba(26, 26, 26, 0.32));
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.comment-nick { font-size: 13px; font-weight: 500; }
/* 站主徽标：让听众一眼认出哪些是站长本人发的 */
.comment-owner-badge {
  flex: none;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.6;
  color: var(--bg);
  background: var(--text);
  font-weight: 700;
}
.comment-uid { font-size: 10px; color: var(--dim); font-family: ui-monospace, monospace; letter-spacing: 0.3px; }
.comment-time { font-size: 11px; color: var(--dim); margin-left: auto; }
.comment-text { margin: 9px 0 0; font-size: 14px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.comment-text .reply-at { color: var(--accent-strong); }
.comment-actions { display: flex; gap: 14px; margin-top: 10px; }
.comment-like, .comment-reply {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; background: transparent; padding: 0;
  color: var(--dim); font-size: 12px; font-family: inherit; cursor: pointer;
}
.comment-like:hover { color: #ff8fa8; }
.comment-reply:hover { color: var(--accent-strong); }
.comment-like.is-liked { color: #ff7a99; }
.comment-empty { padding: 40px 0; text-align: center; color: var(--dim); font-size: 13px; }

.comment-form {
  padding: 12px 20px calc(14px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
}
/* 回复提示条 */
.comment-reply-bar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 9px;
  background: rgba(26, 26, 26, 0.08);
  border: 1px solid rgba(26, 26, 26, 0.18);
  font-size: 12px;
  color: var(--accent-strong);
}
.comment-reply-cancel {
  margin-left: auto;
  border: 0; background: transparent; cursor: pointer;
  color: var(--dim); font-size: 13px; font-family: inherit;
}
.comment-reply-cancel:hover { color: var(--text); }
.comment-identity-hint {
  margin: 7px 0 0;
  font-size: 11px;
  color: var(--dim);
}
.comment-identity-hint span { color: var(--muted); }

/* ---- 个人中心 ---- */
.me-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: 20px;
}
.me-shell {
  width: min(420px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.97));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.me-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.me-head h2 { margin: 0; font-size: 16px; }

.me-card { padding: 20px 18px; display: grid; gap: 18px; }
.me-avatar-wrap { display: grid; justify-items: center; gap: 10px; }
.me-big-avatar {
  width: 84px; height: 84px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 30px; font-weight: 600;
  background: linear-gradient(140deg, rgba(26, 26, 26, 0.32), rgba(26, 26, 26, 0.32));
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 6px rgba(26, 26, 26, 0.06);
}
.me-pick-avatar {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.me-pick-avatar:hover { color: var(--text); border-color: var(--line-strong); }

.me-fields { display: grid; gap: 14px; }
.me-field { display: grid; gap: 7px; }
.me-field-label { font-size: 12px; color: var(--dim); }
.me-field-row { display: flex; gap: 8px; }
#meNickInput {
  flex: 1; min-width: 0;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: 0;
}
#meNickInput:focus { border-color: var(--accent); }
.me-save-btn {
  flex: none;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.me-id-row { display: flex; align-items: center; gap: 10px; }
.me-id {
  font-family: ui-monospace, monospace;
  font-size: 15px;
  letter-spacing: 1.5px;
  padding: 7px 13px;
  border-radius: 9px;
  background: rgba(26, 26, 26, 0.08);
  border: 1px dashed rgba(26, 26, 26, 0.3);
  color: var(--accent-strong);
}
.me-copy-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.me-copy-btn:hover { color: var(--text); border-color: var(--line-strong); }
.me-tip { margin: 0; font-size: 11px; line-height: 1.7; color: var(--dim); }

/* 个人中心：输入框（口令 / 登录） */
.me-input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: 0;
}
.me-input:focus { border-color: var(--accent); }
.me-field-row .me-input { flex: 1; min-width: 0; }

/* 账号登录框 */
.me-login {
  margin-top: 4px;
  padding: 13px 14px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 9px;
}
.me-login-title { margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.me-login-btn {
  border: 0;
  border-radius: 10px;
  padding: 9px 16px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.me-login-btn:hover { filter: brightness(1.06); }
.me-login-btn:disabled { opacity: 0.6; cursor: default; }
.me-login-err { margin: 0; font-size: 11px; color: #ff8fa8; }

/* 管理员版横幅 */
.me-admin-banner {
  margin: 0 18px 20px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(26, 26, 26, 0.28);
  background: linear-gradient(140deg, rgba(26, 26, 26, 0.1), rgba(26, 26, 26, 0.05));
  font-size: 12px;
  color: var(--muted);
}

/* 站主操作按钮组 */
.me-owner-actions { display: flex; gap: 8px; align-items: center; }
.me-logout-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.me-logout-btn:hover { color: #ff8fa8; border-color: rgba(255, 143, 168, 0.4); }

/* 站主专属区域 */
.me-owner {
  margin: 0 18px 20px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 214, 138, 0.28);
  background: linear-gradient(140deg, rgba(255, 214, 138, 0.09), rgba(255, 214, 138, 0.02));
  display: grid;
  gap: 9px;
}
.me-owner-title { margin: 0; font-size: 13px; font-weight: 700; color: #ffd68a; }
.me-owner-desc { margin: 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.me-admin-btn {
  justify-self: start;
  border: 0;
  border-radius: 10px;
  padding: 8px 18px;
  background: linear-gradient(120deg, #ffd68a, #ffb877);
  color: #21160a;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.me-admin-btn:hover { filter: brightness(1.06); }

/* 个人中心里的私信站主入口 */
.me-msg {
  margin-top: 16px;
}
.me-msg-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(26, 26, 26, 0.3);
  background: rgba(26, 26, 26, 0.08);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.me-msg-btn:hover { background: rgba(26, 26, 26, 0.16); border-color: var(--line-strong); }

.comment-input-row { display: flex; gap: 8px; align-items: flex-end; }
#commentText, #playerCommentText {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.6;
  resize: none;
  outline: 0;
}
#commentText:focus, #playerCommentText:focus { border-color: var(--line-strong); }
#submitComment, .player-comment-form button[type="submit"] {
  flex: none;
  min-height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--text);
  color: #fafaf7;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
#submitComment:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------------------------- 视频 ---------------------------- */
.video-close { position: absolute; top: 14px; right: 18px; z-index: 3; }
.video-sheet { position: relative; padding-top: calc(52px + var(--safe-t)); }
.video-frame {
  margin: 14px 0 18px;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
}
.video-frame video { display: block; width: 100%; max-height: 56dvh; background: #000; }

/* ---------------------------- 私信站主 ---------------------------- */
.message-sheet {
  position: relative;
  width: min(560px, 100%);
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(26, 26, 26, 0.22), transparent 24rem),
    linear-gradient(180deg, #fafaf7 0%, #fafaf7 100%);
  box-shadow: var(--shadow);
}
.message-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: calc(14px + var(--safe-t)) 18px 14px;
  border-bottom: 1px solid var(--line);
}
.message-head-meta { min-width: 0; }
.message-head .section-kicker { margin: 0; }
.message-head h2 { margin: 2px 0 0; font-size: 18px; font-weight: 600; }

.message-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.message-item {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.message-item.mine {
  align-self: flex-end;
  background: linear-gradient(140deg, rgba(26, 26, 26, 0.32), rgba(26, 26, 26, 0.32));
  border-bottom-right-radius: 4px;
}
.message-item.theirs {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.message-item-time {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--dim);
}
.message-empty {
  margin: auto;
  color: var(--dim);
  font-size: 14px;
  text-align: center;
}
.message-compose {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 12px 14px calc(16px + var(--safe-b));
  border-top: 1px solid var(--line);
}
.message-text {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.6;
  resize: none;
  outline: 0;
}
.message-text:focus { border-color: var(--line-strong); }
.message-send {
  flex: none;
  height: 44px;
  padding: 0 20px;
  border-radius: 14px;
  border: 0;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.message-send:disabled { opacity: 0.45; cursor: not-allowed; }

@media (min-width: 760px) {
  .message-sheet {
    width: min(600px, 94vw);
    border-radius: 26px;
    border: 1px solid var(--line-strong);
  }
}

/* ---------------------------- 定时面板 ---------------------------- */

.sleep-timer-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 20px;
}
.sleep-timer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}
.sleep-timer-sheet {
  position: relative;
  width: min(380px, 100%);
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.10);
}
.sleep-timer-sheet-title { margin: 0 0 18px; font-size: 16px; font-weight: 600; text-align: center; }
.sleep-timer-quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sleep-timer-quick {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--button);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.sleep-timer-quick:hover { background: var(--button-hover); border-color: var(--line-strong); color: var(--accent-strong); }
.sleep-timer-quick.is-active { background: rgba(26, 26, 26, 0.16); border-color: var(--accent); color: var(--accent-strong); }
.sleep-timer-quick--custom { font-size: 13px; }

.sleep-timer-stop-after {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.sleep-timer-stop-after-input { position: absolute; opacity: 0; pointer-events: none; }
.sleep-timer-stop-after-mark {
  width: 18px; height: 18px;
  flex: none;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  transition: background 0.2s;
}
.sleep-timer-stop-after-input:checked + .sleep-timer-stop-after-mark {
  background: var(--accent);
  border-color: var(--accent);
}
.sleep-timer-stop-after-input:checked + .sleep-timer-stop-after-mark::after {
  content: "✓";
  font-size: 12px;
  color: #fafaf7;
  font-weight: 700;
}
.sleep-timer-clear {
  width: 100%;
  margin-top: 16px;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}
.sleep-timer-clear:hover { color: #ff8fa8; border-color: rgba(255, 107, 139, 0.4); }

.sleep-timer-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sleep-timer-picker-col { text-align: center; }
.sleep-timer-picker-label { margin: 0 0 8px; font-size: 12px; color: var(--dim); }
.sleep-timer-scroll {
  height: 168px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  scroll-snap-type: y mandatory;
  padding: 60px 0;
}
.sleep-timer-scroll::-webkit-scrollbar { width: 0; }
.sleep-timer-option {
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: var(--dim);
  scroll-snap-align: center;
  font-variant-numeric: tabular-nums;
  transition: color 0.2s, transform 0.2s;
}
.sleep-timer-option.is-active { color: var(--accent-strong); transform: scale(1.24); font-weight: 600; }
.sleep-timer-sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.sleep-timer-sheet-action {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}
.sleep-timer-sheet-action--primary {
  background: var(--text);
  border-color: transparent;
  color: #fafaf7;
  font-weight: 600;
}

/* ---------------------------- Toast ---------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(120px + var(--safe-b));
  z-index: 400;
  transform: translate(-50%, 16px) scale(0.96);
  max-width: min(420px, calc(100vw - 40px));
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease, transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------------------------- 页脚 ---------------------------- */

.site-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--dim);
}
.site-foot p { margin: 0; }

/* ---------------------------- 滚动条 ---------------------------- */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(26, 26, 26, 0.18); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------- 打赏主播 ---------------------------- */

/* 搜索框与打赏入口平行各占一半（铃铛保持固定宽度） */
.hero-search-row .search-box { flex: 1 1 0; min-width: 0; }
.donate-entry {
  flex: 1 1 0;
  min-width: 0;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--muted);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.donate-entry:hover { background: var(--button-hover); border-color: var(--line-strong); color: var(--text); transform: translateY(-1px); }
.donate-entry:active { transform: scale(0.96); transition-duration: 0.12s; }
.donate-entry-icon { display: grid; place-items: center; flex: none; color: #c98a8a; transition: color 0.25s ease; }
.donate-entry:hover .donate-entry-icon { color: #b96a6a; }
.donate-entry-label {
  font-size: 14px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 打赏抽屉 */
.donate-drawer { max-height: 86dvh; }
.donate-scroll { overflow-y: auto; padding: 2px; }

/* 打赏方式切换：一次只在屏幕上展示一个码，
   避免微信「整屏截图 + 长按识别」在同屏出现多码时漏识别 */
.donate-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.donate-tab {
  padding: 7px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--dim);
  font-size: 13px;
  font-family: inherit;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.donate-tab:hover { color: var(--text); background: var(--button-hover); }
.donate-tab.is-active {
  background: rgba(26, 26, 26, 0.08);
  border-color: var(--line-strong);
  color: var(--text);
  font-weight: 600;
}

.donate-card {
  width: min(300px, 100%);
  margin: 0 auto;
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}
.donate-card img {
  width: 100%;
  max-width: 250px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 12px;
  background: #ffffff;
}
.donate-card-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.donate-label-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.donate-card-tip { font-size: 12px; color: var(--dim); letter-spacing: 0.03em; }

/* 微信收款码说明：网页内长按识别已被微信限制，给出三步替代路径 */
.donate-help {
  width: 100%;
  margin-top: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(7, 193, 96, 0.07);
  border: 1px solid rgba(7, 193, 96, 0.20);
  text-align: left;
}
.donate-help-title {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  color: #0a8f4d;
}
.donate-help-steps {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 3px;
}
.donate-help-steps li {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.donate-help-steps li::marker { color: #07c160; }

/* 微信收款码：绿色 */
.donate-card--wechat { border-color: rgba(7, 193, 96, 0.38); background: linear-gradient(180deg, rgba(7, 193, 96, 0.07) 0%, #ffffff 62%); }
.donate-card--wechat .donate-label-dot { background: #07c160; }
.donate-card--wechat .donate-card-label { color: #0a8f4d; }

/* 支付宝收款码：蓝色 */
.donate-card--alipay { border-color: rgba(22, 119, 255, 0.38); background: linear-gradient(180deg, rgba(22, 119, 255, 0.07) 0%, #ffffff 62%); }
.donate-card--alipay .donate-label-dot { background: #1677ff; }
.donate-card--alipay .donate-card-label { color: #1266d2; }

/* 加好友码：提示语在二维码上方 */
.donate-friend-note {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(26, 26, 26, 0.07);
}

/* 桌面端抽屉更宽，单码居中时保持圆润呼吸感 */
@media (min-width: 760px) {
  .donate-card img { max-width: 230px; }
}

/* ================================================================== */
/* 统一开合动画：所有浮层/抽屉/面板/视图双向过渡                          */
/* 纯 CSS 实现：@starting-style 提供进场起点，display 走 allow-discrete     */
/* 离散过渡，进场上移淡入、退场淡出收起，无需任何 JS 配合                    */
/* ------------------------------------------------------------------ */

/* 1) 全屏/抽屉容器：背景淡入淡出 */
.overlay,
.drawer-overlay,
.me-overlay,
.story-page,
.comments-page,
.sleep-timer-overlay {
  opacity: 1;
  transition: opacity 0.26s ease, display 0.26s allow-discrete;
}
.overlay.hidden,
.drawer-overlay.hidden,
.me-overlay.hidden,
.story-page.hidden,
.comments-page.hidden,
.sleep-timer-overlay.hidden { opacity: 0; }
@starting-style {
  .overlay:not(.hidden),
  .drawer-overlay:not(.hidden),
  .me-overlay:not(.hidden),
  .story-page:not(.hidden),
  .comments-page:not(.hidden),
  .sleep-timer-overlay:not(.hidden) { opacity: 0; }
}

/* 2) 内容卡片：上移 + 微缩放淡入（也支持自身 .hidden 的二级开合，如定时自定义面板） */
.player-sheet,
.video-sheet,
.message-sheet,
.queue-drawer,
.utility-drawer,
.me-shell,
.story-shell,
.comments-shell,
.sleep-timer-sheet {
  translate: 0 0;
  scale: 1;
  opacity: 1;
  transition:
    translate 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    scale 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.3s ease,
    display 0.34s allow-discrete;
}
.sleep-timer-sheet.hidden { opacity: 0; translate: 0 14px; scale: 0.98; }
@starting-style {
  .overlay:not(.hidden) > .player-sheet,
  .overlay:not(.hidden) > .video-sheet,
  .overlay:not(.hidden) > .message-sheet,
  .drawer-overlay:not(.hidden) > .queue-drawer,
  .drawer-overlay:not(.hidden) > .utility-drawer,
  .me-overlay:not(.hidden) > .me-shell,
  .story-page:not(.hidden) > .story-shell,
  .comments-page:not(.hidden) > .comments-shell,
  .sleep-timer-overlay:not(.hidden) > .sleep-timer-sheet {
    translate: 0 18px;
    scale: 0.985;
    opacity: 0;
  }
}

/* 3) 悬浮层：迷你播放器上浮 / 通知与字幕菜单下拉 */
.mini-player,
.notify-panel,
.subtitle-menu {
  translate: 0 0;
  opacity: 1;
  transition: opacity 0.26s ease, translate 0.32s cubic-bezier(0.22, 1, 0.36, 1), display 0.32s allow-discrete;
}
.mini-player.hidden { opacity: 0; translate: 0 22px; }
.notify-panel.hidden,
.subtitle-menu.hidden { opacity: 0; translate: 0 -10px; }
@starting-style {
  .mini-player:not(.hidden) { opacity: 0; translate: 0 22px; }
  .notify-panel:not(.hidden),
  .subtitle-menu:not(.hidden) { opacity: 0; translate: 0 -10px; }
}

/* 4) 视图切换（分类页 ↔ 列表页）：交叉淡入淡出 */
.view-section {
  opacity: 1;
  translate: 0 0;
  transition: opacity 0.24s ease, translate 0.3s cubic-bezier(0.22, 1, 0.36, 1), display 0.3s allow-discrete;
}
.view-section.hidden { opacity: 0; translate: 0 10px; }
@starting-style {
  .view-section:not(.hidden) { opacity: 0; translate: 0 10px; }
}

/* ================================================================== */
/* 小型元素的出现动效（一次性播放，无需退场）                            */
/* ------------------------------------------------------------------ */
.clear-search,
.comment-reply-bar,
.sleep-timer-status,
.sort-hint,
.me-login,
.me-owner,
.me-admin-banner,
#listEmpty,
#sleepTimerStatus {
  animation: soft-pop 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes soft-pop {
  from { opacity: 0; translate: 0 -4px; scale: 0.97; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}

/* 队列三个标签页切换：淡入 */
.queue-rows { animation: soft-fade 0.24s ease; }
@keyframes soft-fade { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }

/* ================================================================== */
/* 按压反馈：所有可点按元素统一带缩放与颜色过渡                          */
/* ------------------------------------------------------------------ */
button:not([disabled]),
a.labeled-icon-button,
a[download],
label.player-aux-btn,
.category-card,
.work-row,
.me-msg-btn,
.me-admin-btn,
.me-logout-btn,
.me-login-btn,
.queue-tab,
.comments-sort-button,
.player-comments-tab {
  transition:
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    opacity 0.22s ease;
}
button:not([disabled]):active { transform: scale(0.955); transition-duration: 0.09s; }
a.labeled-icon-button:active,
a[download]:active,
label.player-aux-btn:active,
.me-msg-btn:active,
.me-admin-btn:active,
.me-logout-btn:active,
.me-login-btn:active { transform: scale(0.96); transition-duration: 0.09s; }
.category-card:active { transform: scale(0.972); transition-duration: 0.1s; }
.work-row:active { transform: scale(0.988); transition-duration: 0.1s; }

/* 尊重系统「减少动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ================================================================== */
/* 开关类/点按元素的丝滑反馈补齐                                          */
/* ================================================================== */

/* 1) Tab / 选项激活态：轻微上跳强调（按下时 active 缩放仍生效） */
.queue-tab,
.player-comments-tab,
.comments-sort-button,
.sleep-timer-quick {
  transition-property: background, color, border-color, transform, box-shadow;
  transition-duration: 0.2s;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
.queue-tab.is-active,
.player-comments-tab.is-active,
.comments-sort-button.is-active,
.sleep-timer-quick.is-active { transform: translateY(-1px); }

/* 2) Checkbox 勾选弹出：勾号从缩放+旋转弹出 */
@keyframes check-pop {
  from { transform: scale(0) rotate(-35deg); opacity: 0; }
  to   { transform: scale(1) rotate(0); opacity: 1; }
}
.sleep-timer-stop-after-input:checked + .sleep-timer-stop-after-mark::after {
  animation: check-pop 0.34s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center;
}

/* 3) 进度条 thumb：hover/active 放大 + track 过渡 */
#progressBar::-webkit-slider-thumb {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#progressBar:hover::-webkit-slider-thumb,
#progressBar:focus::-webkit-slider-thumb,
#progressBar:active::-webkit-slider-thumb {
  transform: scale(1.28);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--text) 18%, transparent);
}
#progressBar::-webkit-slider-runnable-track {
  transition: background 0.18s ease;
}
#progressBar::-moz-range-thumb {
  transition: transform 0.2s ease;
}
#progressBar:hover::-moz-range-thumb,
#progressBar:active::-moz-range-thumb { transform: scale(1.28); }

/* 4) 收藏按钮：按下放大弹跳（差异化反馈，覆盖通用缩放） */
.like-button {
  transition: color 0.2s, background 0.2s, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.like-button:active {
  transform: scale(1.2);
  transition-duration: 0.14s;
}

/* 5) 收藏/取消收藏统一弹跳反馈（播放器心形、行内 ♡、顶栏心形入口） */
@keyframes fav-pop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.40); }
  65%  { transform: scale(0.90); }
  100% { transform: scale(1); }
}
.fav-pulse { animation: fav-pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* =====================================================================
   开屏公告弹窗（announcement splash）
   首次进入站点、且有未读的最新公告时展示一次
   ===================================================================== */
.ann-splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(250, 250, 247, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: annFade 0.32s ease;
}
@keyframes annFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.ann-splash-card {
  position: relative;
  width: min(520px, 100%);
  max-height: 86dvh;
  overflow: auto;
  padding: 34px 30px 26px;
  background: var(--panel-strong);
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  box-shadow: var(--shadow-strong);
  text-align: center;
  animation: annRise 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes annRise {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ann-splash-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
  opacity: 0.55;
  pointer-events: none;
}
.ann-splash-orb--a { width: 180px; height: 180px; top: -70px; right: -40px; background: #8bd8ff; }
.ann-splash-orb--b { width: 140px; height: 140px; bottom: -60px; left: -40px; background: #b9a8ff; }
.ann-splash-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  background: var(--button);
  color: var(--muted);
}
.ann-splash-badge {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 14px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #fff;
  background: linear-gradient(100deg, #0a0a0a 0%, #3a3a3a 100%);
}
.ann-splash-title {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.25;
}
.ann-splash-date {
  margin: 0 0 14px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.18em;
}
.ann-splash-body {
  text-align: left;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
  white-space: pre-line;
  overflow-wrap: break-word;
  margin: 0 0 20px;
  max-height: 46dvh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.ann-splash-cta {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 13px 0;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--accent-strong);
  cursor: pointer;
}
.ann-splash-cta:active { transform: scale(0.98); }
.ann-splash-hint {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--dim);
}

/* =====================================================================
   定时开关：tab / 表单 / 屏幕常亮 / 播放页倒计时
   ===================================================================== */

.timer-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 0 18px;
  padding: 4px;
  border-radius: 14px;
  background: var(--button);
}

.timer-tab {
  min-height: 38px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease;
}

.timer-tab.is-active {
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.timer-pane { display: block; }
.timer-pane.hidden { display: none; }

.timer-field {
  display: block;
  margin-bottom: 14px;
}

.timer-field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
}

.timer-time-input,
.timer-work-select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
}

.timer-work-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.timer-switch-row { margin-top: 16px; }

.timer-hint {
  margin: 14px 2px 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--dim);
}

.timer-hint.is-warn { color: #b4573f; }

.sleep-timer-stop-after.is-disabled { opacity: 0.45; }

.sleep-timer-button.is-active .sleep-timer-label,
.sleep-timer-button.is-active .sleep-timer-icon-wrap {
  color: var(--accent-strong);
  font-weight: 600;
}

.sleep-timer-status:last-of-type { margin-top: -6px; }
