/* ============================================================
 * 视频详情页样式 - view-media.css
 * Apple Design Language · 极致苹果风 UI 重构
 * 所有样式包裹在 .custom-override 命名空间下
 * ============================================================ */

/* ---- 设计令牌：Apple 色彩系统 ---- */
.custom-override {
  --vm-bg-primary: #FFFFFF;
  --vm-bg-secondary: #F5F5F7;
  --vm-bg-tertiary: #E8E8ED;
  /* 本页主色：珊瑚红（变量名保留 blue 以兼容既有 var 引用） */
  --vm-accent-blue: var(--husir-coral, var(--dm-accent, #ff6b6b));
  --vm-accent-coral-hover: var(--husir-coral-hover, var(--dm-accent-hover, #ff5252));
  --vm-accent-coral-muted: color-mix(in srgb, var(--vm-accent-blue) 8%, transparent);
  --vm-accent-coral-muted-strong: var(--husir-coral-soft, var(--dm-accent-soft, rgba(255, 107, 107, 0.12)));
  --vm-accent-coral-border: var(--vm-accent-coral-muted-strong);
  --vm-accent-coral-ring: var(--vm-accent-coral-muted-strong);
  --vm-accent-coral-glow: color-mix(in srgb, var(--vm-accent-blue) 35%, transparent);
  --vm-accent-coral-shadow: color-mix(in srgb, var(--vm-accent-blue) 30%, transparent);
  --vm-accent-purple: #AF52DE;
  --vm-accent-pink: #FF2D55;
  --vm-accent-cyan: #30B0C7;
  --vm-accent-orange: #FF9500;
  --vm-text-primary: #1D1D1F;
  --vm-text-secondary: #6E6E73;
  --vm-text-tertiary: #AEAEB2;
  --vm-glass-bg: rgba(255, 255, 255, 0.72);
  --vm-glass-strong-bg: rgba(255, 255, 255, 0.88);
  --vm-glass-border: rgba(0, 0, 0, 0.06);
  --vm-glass-hover: color-mix(in srgb, var(--vm-accent-blue) 4%, transparent);
  --vm-border-color: rgba(0, 0, 0, 0.08);
  --vm-radius-sm: 10px;
  --vm-radius-md: 14px;
  --vm-radius-lg: 18px;
  --vm-radius-xl: 22px;
  --vm-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.04);
  --vm-shadow-md: 0 4px 30px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.03);
  --vm-shadow-lg: 0 12px 60px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  --vm-shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
  /* 骨架屏微光渐变（M1: 改用变量，暗黑下自动翻转为白色半透明） */
  --vm-skeleton-c1: rgba(0, 0, 0, 0.03);
  --vm-skeleton-c2: rgba(0, 0, 0, 0.06);
  --vm-transition-fast: 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
  --vm-transition-normal: 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  --vm-transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --vm-transition-interactive: color var(--vm-transition-fast), background-color var(--vm-transition-fast), border-color var(--vm-transition-fast), opacity var(--vm-transition-fast), visibility var(--vm-transition-fast), transform var(--vm-transition-fast), box-shadow var(--vm-transition-fast), width var(--vm-transition-fast);
  --vm-transition-overlay: opacity var(--vm-transition-normal), visibility var(--vm-transition-normal), transform var(--vm-transition-normal), box-shadow var(--vm-transition-normal);
  --vm-control-size: 44px;
}

.custom-override .vm-page,
.custom-override .vm-page *,
.custom-override .vm-page *::before,
.custom-override .vm-page *::after,
.custom-override .vm-share-overlay,
.custom-override .vm-share-overlay *,
.custom-override .vm-share-overlay *::before,
.custom-override .vm-share-overlay *::after {
  box-sizing: border-box;
}

.custom-override .vm-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.custom-override .vm-page button,
.custom-override .vm-share-overlay button {
  min-width: var(--vm-control-size);
  min-height: var(--vm-control-size);
  touch-action: manipulation;
}

.custom-override .vm-page input:not([type="range"]),
.custom-override .vm-page textarea,
.custom-override .vm-share-overlay input:not([type="range"]) {
  min-height: var(--vm-control-size);
}

/* ============================================================
 * 暗黑模式：两分支覆盖 --vm-* 令牌（AGENTS.md §3，缺一会导致
 * "手动切正常、跟随系统丢色"）。暗黑值对齐全站 --dm-* 中性灰体系
 *（dark-mode-core.css: bg #151515 / secondary #1f1f1f / elevated #2a2a2a），
 * vm-* 元素几乎都消费 var(--vm-*)，故只需覆盖令牌即可批量翻转。
 * 少数硬编码 rgba(0,0,0,0.0x) hover 与 vm-glass-strong 白底单独处理（见末尾）。
 * ============================================================ */

/* 系统暗黑（跟随 OS）—— html 无 husir-dark / husir-light 类时生效 */
@media (prefers-color-scheme: dark) {
  html:not(.husir-light) .custom-override {
    --vm-bg-primary: var(--dm-bg-elevated, #2a2a2a);
    --vm-bg-secondary: var(--dm-bg, #151515);
    --vm-bg-tertiary: color-mix(in srgb, var(--dm-bg-elevated, #2a2a2a) 96%, #ffffff 4%);
    --vm-text-primary: #f5f5f7;
    --vm-text-secondary: #a8a09a;
    --vm-text-tertiary: #86827d;
    --vm-glass-bg: rgba(42, 42, 42, 0.72);
    --vm-glass-strong-bg: rgba(42, 42, 42, 0.88);
    --vm-glass-border: rgba(255, 255, 255, 0.1);
    --vm-glass-hover: rgba(255, 255, 255, 0.06);
    --vm-border-color: rgba(255, 255, 255, 0.1);
    --vm-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --vm-shadow-md: 0 4px 30px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.3);
    --vm-shadow-lg: 0 12px 60px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
    --vm-shadow-card: 0 2px 12px rgba(0, 0, 0, 0.4);
    --vm-skeleton-c1: rgba(255, 255, 255, 0.04);
    --vm-skeleton-c2: rgba(255, 255, 255, 0.08);
  }
}

/* 手动暗黑（用户点击切换）—— html 有 husir-dark 类时生效 */
html.husir-dark .custom-override {
  --vm-bg-primary: var(--dm-bg-elevated, #2a2a2a);
  --vm-bg-secondary: var(--dm-bg, #151515);
  --vm-bg-tertiary: color-mix(in srgb, var(--dm-bg-elevated, #2a2a2a) 96%, #ffffff 4%);
  --vm-text-primary: #f5f5f7;
  --vm-text-secondary: #a8a09a;
  --vm-text-tertiary: #86827d;
  --vm-glass-bg: rgba(42, 42, 42, 0.72);
  --vm-glass-strong-bg: rgba(42, 42, 42, 0.88);
  --vm-glass-border: rgba(255, 255, 255, 0.1);
  --vm-glass-hover: rgba(255, 255, 255, 0.06);
  --vm-border-color: rgba(255, 255, 255, 0.1);
  --vm-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --vm-shadow-md: 0 4px 30px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.3);
  --vm-shadow-lg: 0 12px 60px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  --vm-shadow-card: 0 2px 12px rgba(0, 0, 0, 0.4);
  --vm-skeleton-c1: rgba(255, 255, 255, 0.04);
  --vm-skeleton-c2: rgba(255, 255, 255, 0.08);
}

/* ---- 毛玻璃效果 ---- */
.custom-override .vm-glass {
  background: var(--vm-glass-bg);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--vm-glass-border);
  border-radius: var(--vm-radius-lg);
  box-shadow: var(--vm-shadow-sm);
}

.custom-override .vm-glass-strong {
  background: var(--vm-glass-strong-bg);
  backdrop-filter: blur(50px) saturate(200%);
  -webkit-backdrop-filter: blur(50px) saturate(200%);
  border: 1px solid var(--vm-glass-border);
  border-radius: var(--vm-radius-xl);
  box-shadow: var(--vm-shadow-lg);
}

/* ---- 骨架屏 ---- */
.custom-override .vm-skeleton {
  background: linear-gradient(90deg, var(--vm-skeleton-c1) 25%, var(--vm-skeleton-c2) 50%, var(--vm-skeleton-c1) 75%);
  background-size: 200% 100%;
  animation: vm-shimmer 2s infinite;
  border-radius: var(--vm-radius-sm);
}

@keyframes vm-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ---- 页面整体布局 ---- */
.custom-override .vm-page {
  background: var(--dm-bg, #ffffff);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* 视频页主舞台不重复承接全局 main:not(.md-home) 的顶距，导航占位由 body 统一处理。 */
@media (max-width: 1280px) {
  body.custom-override > main.vm-page {
    padding-top: 0;
  }
}

.custom-override .vm-container {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  max-width: 1480px;
  margin: 0 auto;
  padding: 32px 40px;
}

.custom-override .vm-layout {
  display: flex;
  min-width: 0;
  gap: 28px;
  align-items: flex-start;
}

/* PC/大屏：主布局与导航胶囊拉开间距（紧凑端仍由容器 padding 控制） */
@media (min-width: 901px) {
  .custom-override .vm-layout {
    margin-top: 30px;
  }
}

.custom-override .vm-main {
  flex: 1;
  min-width: 0;
}

.custom-override .vm-sidebar {
  width: 420px;
  flex-shrink: 0;
}

/* ---- 影院模式 ---- */
.custom-override .vm-theater-mode .vm-layout {
  flex-direction: column;
  align-items: stretch;
}

.custom-override .vm-theater-mode .vm-main {
  max-width: 100%;
}

.custom-override .vm-theater-mode .vm-sidebar {
  width: 100%;
  opacity: 0.4;
  transition: opacity var(--vm-transition-normal);
}

.custom-override .vm-theater-mode .vm-sidebar:hover {
  opacity: 1;
}

/* ---- 续播提醒 Banner ---- */
.custom-override .vm-resume-banner {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  width: max-content;
  max-width: calc(100vw - 32px);
  flex-wrap: wrap;
  animation: vm-slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-shadow: 0 8px 40px var(--vm-accent-coral-muted-strong), var(--vm-shadow-md);
}

.custom-override .vm-resume-banner .vm-resume-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--vm-text-primary);
}

.custom-override .vm-resume-banner .vm-resume-time {
  color: var(--vm-accent-blue);
  font-weight: 700;
}

.custom-override .vm-resume-banner .vm-resume-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 980px;
  background: var(--vm-accent-blue);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: var(--vm-transition-interactive);
}

.custom-override .vm-resume-banner .vm-resume-btn:hover {
  background: var(--vm-accent-coral-hover);
  transform: scale(1.02);
}

.custom-override .vm-resume-banner .vm-resume-close {
  color: var(--vm-text-tertiary);
  font-size: 16px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  transition: color var(--vm-transition-fast);
  line-height: 1;
}

.custom-override .vm-resume-banner .vm-resume-close:hover {
  color: var(--vm-text-primary);
}

/* ---- 视频播放器容器 ---- */
.custom-override .vm-player-wrap {
  position: relative;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: #0a0a0b;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 18px 48px rgba(0, 0, 0, 0.28),
    0 4px 14px rgba(0, 0, 0, 0.16);
  container-type: inline-size;
  container-name: vm-player;
  /* 中央播放钮：随播放器宽度缩放（cqw），断点仅作兜底 */
  --vm-center-btn-size: clamp(52px, 14cqw, 80px);
  --vm-center-icon-size: clamp(26px, 7.25cqw, 36px);
  --vm-center-icon-nudge: clamp(2px, 0.55cqw, 5px);
}

.custom-override .vm-player-wrap:focus-visible {
  outline: 3px solid var(--vm-accent-blue);
  outline-offset: 4px;
}

/* 无 Container Queries 时：按视口断点兜底（与 clamp 极值对齐） */
@supports not (width: 1cqw) {
  .custom-override .vm-player-wrap {
    --vm-center-btn-size: 72px;
    --vm-center-icon-size: 32px;
    --vm-center-icon-nudge: 4px;
  }
  @media (max-width: 900px) {
    .custom-override .vm-player-wrap {
      --vm-center-btn-size: 64px;
      --vm-center-icon-size: 30px;
      --vm-center-icon-nudge: 3px;
    }
  }
  @media (max-width: 600px) {
    .custom-override .vm-player-wrap {
      --vm-center-btn-size: 52px;
      --vm-center-icon-size: 26px;
      --vm-center-icon-nudge: 2px;
    }
  }
}

/* 全屏：标准 :fullscreen + webkit + JS class 三保险；略减小中央钮比例 */
.custom-override .vm-player-wrap:fullscreen,
.custom-override .vm-player-wrap:-webkit-full-screen,
.custom-override .vm-player-wrap.vm-fullscreen {
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: 0;
  aspect-ratio: auto;
  margin-top: 0;
  --vm-center-btn-size: clamp(56px, 10cqw, 72px);
  --vm-center-icon-size: clamp(28px, 5.2cqw, 32px);
  --vm-center-icon-nudge: clamp(2px, 0.45cqw, 4px);
}

@supports not (width: 1cqw) {
  .custom-override .vm-player-wrap:fullscreen,
  .custom-override .vm-player-wrap:-webkit-full-screen,
  .custom-override .vm-player-wrap.vm-fullscreen {
    --vm-center-btn-size: 68px;
    --vm-center-icon-size: 32px;
    --vm-center-icon-nudge: 4px;
  }
}

.custom-override .vm-player-wrap video {
  width: 100%;
  max-width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  cursor: pointer;
}

/* ---- 自定义控制条 ---- */
.custom-override .vm-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 16px 14px;
  /* 底部液态玻璃渐隐：上透明下磨砂，替代纯黑硬渐变 */
  background:
    linear-gradient(180deg, rgba(8, 8, 10, 0) 0%, rgba(8, 8, 10, 0.28) 38%, rgba(8, 8, 10, 0.72) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--vm-transition-fast);
  z-index: 10;
}

.custom-override .vm-player-wrap:hover .vm-controls,
.custom-override .vm-controls-visible {
  opacity: 1;
  pointer-events: auto;
}

/* 进度条区域 */
.custom-override .vm-progress-wrap {
  position: relative;
  width: 100%;
  height: var(--vm-control-size);
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 0;
}

.custom-override .vm-progress-track {
  position: relative;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  overflow: visible;
  transition: height var(--vm-transition-fast);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.custom-override .vm-progress-wrap:hover .vm-progress-track {
  height: 5px;
}

.custom-override .vm-progress-buffered {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  pointer-events: none;
}

.custom-override .vm-progress-played {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--vm-accent-blue);
  border-radius: 4px;
  pointer-events: none;
}

.custom-override .vm-progress-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  /* 无外扩泛光，仅轻微浮起 */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.85);
  transition: transform var(--vm-transition-fast);
  z-index: 2;
  pointer-events: none;
}

.custom-override .vm-progress-wrap:hover .vm-progress-handle {
  transform: translate(-50%, -50%) scale(1);
}

/* 控制条底部按钮行 */
.custom-override .vm-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.custom-override .vm-controls-left,
.custom-override .vm-controls-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.custom-override .vm-ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--vm-control-size);
  height: var(--vm-control-size);
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  border-radius: 14px;
  transition: var(--vm-transition-interactive);
  padding: 0;
}

.custom-override .vm-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

.custom-override .vm-ctrl-btn:active {
  transform: scale(0.96);
}

.custom-override .vm-ctrl-btn svg {
  width: 20px;
  height: 20px;
}

/* 播放/暂停图标状态切换 */
.custom-override .vm-icon-play,
.custom-override .vm-icon-pause {
  display: none;
}
.custom-override .vm-paused .vm-icon-play { display: block; }
.custom-override .vm-playing .vm-icon-pause { display: block; }

.custom-override .vm-time-display {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  user-select: none;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* 音量控制 */
.custom-override .vm-volume-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.custom-override .vm-volume-slider-wrap {
  width: 0;
  overflow: hidden;
  transition: width var(--vm-transition-fast);
  display: flex;
  align-items: center;
  min-height: var(--vm-control-size);
}

.custom-override .vm-volume-wrap:hover .vm-volume-slider-wrap {
  width: 88px;
}

.custom-override .vm-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 88px;
  height: 4px;
  box-sizing: content-box;
  padding: 20px 0;
  background-clip: content-box;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.custom-override .vm-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* 倍速菜单 */
.custom-override .vm-speed-menu {
  position: absolute;
  bottom: 44px;
  right: 0;
  background: rgba(28, 28, 30, 0.95);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: var(--vm-radius-md);
  padding: 6px 0;
  min-width: 100px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.96);
  transition: var(--vm-transition-interactive);
  z-index: 20;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.custom-override .vm-speed-menu-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.custom-override .vm-speed-option {
  display: block;
  width: 100%;
  padding: 8px 18px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: var(--vm-transition-interactive);
  font-weight: 500;
  min-height: var(--vm-control-size);
}

.custom-override .vm-speed-option:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.custom-override .vm-speed-active {
  color: var(--vm-accent-blue);
  font-weight: 600;
}

/* 清晰度菜单 */
.custom-override .vm-quality-btn {
  font-size: 13px;
  padding: 4px 12px;
  height: auto;
  width: auto;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  font-weight: 600;
}

.custom-override .vm-quality-menu {
  position: absolute;
  bottom: 44px;
  right: 0;
  background: rgba(28, 28, 30, 0.95);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: var(--vm-radius-md);
  padding: 6px 0;
  min-width: 120px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.96);
  transition: var(--vm-transition-interactive);
  z-index: 20;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.custom-override .vm-quality-menu-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.custom-override .vm-quality-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 18px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--vm-transition-interactive);
  font-weight: 500;
  min-height: var(--vm-control-size);
}

.custom-override .vm-quality-option:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.custom-override .vm-quality-option-active {
  color: var(--vm-accent-blue);
  font-weight: 600;
}

/* 加载/缓冲动画 */
.custom-override .vm-loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: none;
}

.custom-override .vm-loading-spinner svg {
  width: 48px;
  height: 48px;
  animation: vm-spin 1s linear infinite;
}

@keyframes vm-spin {
  to { transform: rotate(360deg); }
}

.custom-override .vm-buffering .vm-loading-spinner {
  display: block;
}

/* 中央播放按钮覆盖层 */
.custom-override .vm-play-pause-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: var(--vm-center-btn-size, 72px);
  height: var(--vm-center-btn-size, 72px);
  min-width: 44px;
  min-height: 44px;
  /* iOS 26 液态玻璃中心钮：半透明壳 + 细高光，无外扩泛光 */
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(20, 20, 22, 0.42) 55%, rgba(0, 0, 0, 0.5));
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--vm-transition-normal), transform var(--vm-transition-normal), background var(--vm-transition-normal), border-color var(--vm-transition-normal);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 -1px 0 rgba(0, 0, 0, 0.25) inset,
    0 10px 28px rgba(0, 0, 0, 0.28);
}

.custom-override .vm-paused .vm-play-pause-center {
  opacity: 1;
  pointer-events: auto;
}

/* 播放结束：仅显示重播层，避免与大播放钮叠层 */
.custom-override .vm-ended .vm-play-pause-center {
  opacity: 0;
  pointer-events: none;
}

.custom-override .vm-play-pause-center:hover {
  transform: translate(-50%, -50%) scale(1.06);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.34), rgba(24, 24, 26, 0.48) 55%, rgba(0, 0, 0, 0.55));
  border-color: rgba(255, 255, 255, 0.42);
}

.custom-override .vm-play-pause-center:active {
  transform: translate(-50%, -50%) scale(0.96);
}

.custom-override .vm-play-pause-center svg {
  width: var(--vm-center-icon-size, 32px);
  height: var(--vm-center-icon-size, 32px);
  margin-left: var(--vm-center-icon-nudge, 4px);
  flex-shrink: 0;
}

/* 播放结束后重播覆盖层 */
.custom-override .vm-replay-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 6;
  opacity: 0;
  visibility: hidden;
  transition: var(--vm-transition-overlay);
}

.custom-override .vm-ended .vm-replay-overlay {
  opacity: 1;
  visibility: visible;
}

.custom-override .vm-replay-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--vm-accent-blue);
  color: #fff;
  border: none;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--vm-transition-interactive);
  box-shadow: 0 4px 16px var(--vm-accent-coral-shadow);
}

.custom-override .vm-replay-btn:hover {
  background: var(--vm-accent-coral-hover);
  transform: scale(1.04);
  box-shadow: 0 6px 24px color-mix(in srgb, var(--vm-accent-blue) 40%, transparent);
}

/* 错误状态 */
.custom-override .vm-error-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 6;
  color: #fff;
}

.custom-override .vm-error-overlay svg {
  color: var(--vm-accent-blue);
}

.custom-override .vm-error-overlay p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.custom-override .vm-retry-btn {
  padding: 10px 28px;
  background: var(--vm-accent-blue);
  color: #fff;
  border: none;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--vm-transition-interactive);
}

.custom-override .vm-retry-btn:hover {
  background: var(--vm-accent-coral-hover);
  transform: scale(1.03);
}

/* ---- 弹幕层 ---- */
.custom-override .vm-danmaku-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 15;
  padding-bottom: 56px;
  box-sizing: border-box;
}

.custom-override .vm-danmaku-text {
  position: absolute;
  left: 100%;
  top: 0;
  white-space: nowrap;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7), 0 0 8px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  user-select: none;
  will-change: transform;
  z-index: 1;
  animation: vm-danmaku-fly linear forwards;
}

@keyframes vm-danmaku-fly {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(calc(-1 * var(--vm-dm-travel, 800px)), 0, 0); }
}

/* ---- 弹幕控制栏 ---- */
.custom-override .vm-danmaku-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
  padding: 14px 20px;
  flex-wrap: wrap;
}

.custom-override .vm-dm-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 980px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--vm-transition-interactive);
}

.custom-override .vm-dm-toggle-on {
  color: var(--vm-accent-blue);
  background: var(--vm-accent-coral-muted);
}

.custom-override .vm-dm-toggle-off {
  color: var(--vm-text-secondary);
  background: rgba(0, 0, 0, 0.04);
}

.custom-override .vm-dm-toggle:hover {
  transform: scale(1.02);
}

.custom-override .vm-dm-toggle svg {
  width: 15px;
  height: 15px;
}
/* 播放器内弹幕开关：桌面隐藏，紧凑端仿 B 站进控制条 */
.custom-override .vm-ctrl-btn.vm-dm-toggle-inplayer {
  display: none;
  position: relative;
  /* 压过 .vm-dm-toggle-on 珊瑚底，保持播放器芯片透明态 */
  background: transparent;
  border: 1px solid transparent;
  padding: 0;
  border-radius: 14px;
  min-height: 0;
  gap: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  transform: none;
}
.custom-override .vm-ctrl-btn.vm-dm-toggle-inplayer.vm-dm-toggle-on {
  color: rgba(255, 255, 255, 0.95);
  background: transparent;
}
.custom-override .vm-ctrl-btn.vm-dm-toggle-inplayer.vm-dm-toggle-off {
  color: rgba(255, 255, 255, 0.42);
  background: transparent;
  opacity: 0.78;
}
.custom-override .vm-ctrl-btn.vm-dm-toggle-inplayer.vm-dm-toggle-off::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transform: rotate(-42deg);
  border-radius: 2px;
  pointer-events: none;
}
.custom-override .vm-ctrl-btn.vm-dm-toggle-inplayer:hover {
  transform: none;
}

.custom-override .vm-dm-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-override .vm-dm-label {
  font-size: 12px;
  color: var(--vm-text-tertiary);
  font-weight: 500;
}

.custom-override .vm-dm-range-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--vm-text-secondary);
  min-width: 40px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.custom-override .vm-dm-range {
  -webkit-appearance: none;
  appearance: none;
  width: 72px;
  height: 4px;
  box-sizing: content-box;
  padding: 20px 0;
  background-clip: content-box;
  background-color: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.custom-override .vm-dm-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--vm-accent-blue);
  box-shadow: 0 2px 8px var(--vm-accent-coral-shadow);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.custom-override .vm-dm-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.custom-override .vm-theater-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 980px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--vm-transition-interactive);
  color: var(--vm-text-secondary);
  background: rgba(0, 0, 0, 0.04);
}

.custom-override .vm-theater-btn-active {
  color: var(--vm-accent-purple);
  background: rgba(175, 82, 222, 0.08);
}

.custom-override .vm-theater-btn:hover {
  transform: scale(1.02);
}

.custom-override .vm-theater-btn svg {
  width: 15px;
  height: 15px;
}

.custom-override .vm-shortcuts-hint {
  font-size: 11px;
  color: var(--vm-text-tertiary);
  margin-left: auto;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ---- 弹幕输入面板 ---- */
.custom-override .vm-dm-input-panel {
  margin-top: 10px;
  padding: 16px 20px;
}

.custom-override .vm-dm-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.custom-override .vm-dm-input-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: none;
  border: 1px solid var(--vm-border-color);
  border-radius: 980px;
  font-size: 13px;
  color: var(--vm-text-secondary);
  cursor: pointer;
  transition: var(--vm-transition-interactive);
  font-weight: 500;
}

.custom-override .vm-dm-input-toggle:hover {
  border-color: var(--vm-accent-blue);
  color: var(--vm-accent-blue);
}

.custom-override .vm-dm-input {
  flex: 1;
  min-width: 0;
  padding: 10px 18px;
  border: 1px solid var(--vm-border-color);
  border-radius: 980px;
  font-size: 14px;
  background: var(--vm-bg-primary);
  color: var(--vm-text-primary);
  outline: none;
  transition: var(--vm-transition-interactive);
  font-weight: 400;
}

.custom-override .vm-dm-input:focus {
  border-color: var(--vm-accent-blue);
  box-shadow: 0 0 0 3px var(--vm-accent-coral-ring);
}

.custom-override .vm-dm-input::placeholder {
  color: var(--vm-text-tertiary);
}

.custom-override .vm-dm-send {
  padding: 10px 22px;
  background: var(--vm-accent-blue);
  color: #fff;
  border: none;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--vm-transition-interactive);
  white-space: nowrap;
}

.custom-override .vm-dm-send:hover {
  background: var(--vm-accent-coral-hover);
  transform: scale(1.02);
}

.custom-override .vm-dm-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* 弹幕颜色选择器 */
.custom-override .vm-dm-colors {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-left: 32px;
}

.custom-override .vm-dm-color-label {
  font-size: 12px;
  color: var(--vm-text-tertiary);
  font-weight: 500;
}

/* min 覆盖 .vm-page button 的 44px 触控底线，色球是视觉控件不是主按钮 */
.custom-override .vm-page .vm-dm-color-btn {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--vm-transition-interactive);
  padding: 0;
}

.custom-override .vm-page .vm-dm-color-btn:hover {
  transform: scale(1.2);
}

.custom-override .vm-page .vm-dm-color-btn-active {
  border-color: var(--vm-text-primary);
  transform: scale(1.2);
  box-shadow: 0 0 0 2px var(--vm-bg-primary);
}

/* ---- 视频信息区 ---- */
.custom-override .vm-video-info {
  margin-top: 10px;
  padding: 0 4px;
  min-width: 0;
}
/* 页面主标题（H1）。显式压掉浏览器默认 h1 的 2em/加粗/大外边距，避免破版；
   视觉权重取 .vm-sidebar-title(18px/700) 与正文之间，作为视频信息区的第一层标题。 */
.custom-override .vm-video-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--vm-text-primary);
  line-height: 1.35;
  letter-spacing: 0;
}

.custom-override .vm-now-playing-title {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--vm-text-secondary);
  line-height: 1.4;
}

.custom-override .vm-now-playing-title[hidden] {
  display: none !important;
}

.custom-override .vm-video-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  flex-wrap: wrap;
  min-width: 0;
}

.custom-override .vm-meta-text {
  font-size: 14px;
  color: var(--vm-text-tertiary);
  font-weight: 500;
}

/* ---- 互动按钮组 ---- */
.custom-override .vm-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.custom-override .vm-action-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 980px;
  border: none;
  background: var(--vm-bg-secondary);
  cursor: pointer;
  transition: var(--vm-transition-interactive);
  color: var(--vm-text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.custom-override .vm-action-btn:hover {
  background: var(--vm-bg-tertiary);
  transform: scale(1.02);
}

.custom-override .vm-action-btn svg {
  width: 20px;
  height: 20px;
  transition: var(--vm-transition-interactive);
}

.custom-override .vm-action-btn-active svg {
  fill: var(--active-color, var(--vm-accent-pink));
  stroke: var(--active-color, var(--vm-accent-pink));
  stroke-width: 0;
}

.custom-override .vm-action-btn-active {
  color: var(--active-color, var(--vm-accent-pink));
  background: rgba(255, 45, 85, 0.06);
}

/* 点赞粒子效果 */
.custom-override .vm-particle {
  position: absolute;
  pointer-events: none;
  animation: vm-particle-burst 0.8s ease-out forwards;
}

@keyframes vm-particle-burst {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0); }
}

/* ---- 描述区 ---- */
.custom-override .vm-description {
  margin-top: 20px;
  padding: 20px 24px;
}

.custom-override .vm-desc-content {
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.custom-override .vm-desc-content-collapsed {
  max-height: 80px;
}

.custom-override .vm-desc-content-expanded {
  max-height: 2000px;
}

.custom-override .vm-desc-content p {
  font-size: 15px;
  color: var(--vm-text-secondary);
  line-height: 1.7;
  margin-bottom: 6px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.custom-override .vm-desc-content img,
.custom-override .vm-desc-content video,
.custom-override .vm-desc-content iframe {
  display: block;
  max-width: 100%;
}

.custom-override .vm-desc-content img {
  height: auto;
}

.custom-override .vm-desc-content video,
.custom-override .vm-desc-content iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.custom-override .vm-desc-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.custom-override .vm-desc-tag {
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 980px;
  background: color-mix(in srgb, var(--vm-accent-blue) 6%, transparent);
  color: var(--vm-accent-blue);
  cursor: pointer;
  transition: var(--vm-transition-interactive);
  font-weight: 500;
}

.custom-override .vm-desc-tag:hover {
  background: var(--vm-accent-coral-muted-strong);
}

.custom-override .vm-desc-toggle {
  margin-top: 10px;
  font-size: 13px;
  color: var(--vm-accent-blue);
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color var(--vm-transition-fast);
}

.custom-override .vm-desc-toggle:hover {
  color: var(--vm-accent-coral-hover);
}

/* ---- 合集/播放列表面板 ---- */
.custom-override .vm-playlist {
  margin-top: 10px;
  border-radius: var(--vm-radius-lg);
  overflow: hidden;
}

.custom-override .vm-playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  cursor: pointer;
  transition: background var(--vm-transition-fast);
  gap: 10px;
  min-width: 0;
}

.custom-override .vm-playlist-header:hover {
  background: rgba(0, 0, 0, 0.02);
}

.custom-override .vm-playlist-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--vm-text-primary);
  letter-spacing: 0;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.custom-override .vm-playlist-title svg {
  width: 18px;
  height: 18px;
  color: var(--vm-accent-blue);
}

.custom-override .vm-playlist-count {
  font-size: 13px;
  color: var(--vm-text-tertiary);
  font-weight: 400;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.custom-override .vm-playlist-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 82px;
  min-height: 34px;
  padding: 0 8px 0 14px;
  border: 1px solid var(--vm-accent-coral-border);
  border-radius: 999px;
  background: var(--vm-accent-coral-muted);
  font: inherit;
  font-size: 13px;
  color: var(--vm-accent-blue);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
  transition: background var(--vm-transition-fast), border-color var(--vm-transition-fast), color var(--vm-transition-fast), transform var(--vm-transition-fast), box-shadow var(--vm-transition-fast);
}

.custom-override .vm-playlist-toggle::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 999px;
}

.custom-override .vm-playlist-toggle:hover {
  background: var(--vm-accent-coral-muted-strong);
  border-color: color-mix(in srgb, var(--vm-accent-blue) 24%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 6px 18px color-mix(in srgb, var(--vm-accent-blue) 12%, transparent);
}

.custom-override .vm-playlist-toggle:active {
  transform: scale(0.97);
}

.custom-override .vm-playlist-toggle:focus-visible {
  outline: 2px solid var(--vm-accent-blue);
  outline-offset: 3px;
}

.custom-override .vm-playlist-toggle__text {
  position: relative;
  z-index: 1;
}

.custom-override .vm-playlist-toggle__icon {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  background: var(--vm-glass-strong-bg);
  border: 1px solid var(--vm-glass-border);
  color: var(--vm-accent-blue);
  transition: transform var(--vm-transition-fast), background var(--vm-transition-fast);
}

.custom-override .vm-playlist-toggle__icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translate(-50%, -35%) rotate(225deg);
  transition: transform var(--vm-transition-fast);
}

.custom-override .vm-playlist-toggle[aria-expanded="false"] .vm-playlist-toggle__icon::before {
  transform: translate(-50%, -60%) rotate(45deg);
}

.custom-override .vm-playlist-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.custom-override .vm-playlist-body-open {
  max-height: 400px;
}

/* 单集弱化：无折叠按钮、头更紧凑（JS 加 .vm-playlist-single） */
.custom-override .vm-playlist-single .vm-playlist-header {
  cursor: default;
  padding: 10px 10px 6px;
}

.custom-override .vm-playlist-single .vm-playlist-header:hover {
  background: transparent;
}

.custom-override .vm-playlist-single .vm-playlist-title {
  font-size: 14px;
  font-weight: 600;
}

.custom-override .vm-playlist-single .vm-playlist-toggle {
  display: none;
}

.custom-override .vm-playlist-single .vm-playlist-body {
  max-height: none;
}

.custom-override .vm-playlist-single .vm-playlist-episodes {
  padding-top: 4px;
}

.custom-override .vm-playlist-episodes {
  padding: 0 10px 10px;
  max-height: 300px;
  overflow-y: auto;
}

.custom-override .vm-playlist-episodes::-webkit-scrollbar {
  width: 5px;
}

.custom-override .vm-playlist-episodes::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.custom-override .vm-episode-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border-radius: var(--vm-radius-md);
  text-align: left;
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--vm-transition-interactive);
}

.custom-override .vm-episode-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

.custom-override .vm-episode-item-active {
  background: color-mix(in srgb, var(--vm-accent-blue) 6%, transparent);
  border-color: var(--vm-accent-coral-border);
}

.custom-override .vm-episode-num {
  font-size: 13px;
  font-weight: 700;
  width: 28px;
  text-align: center;
  color: var(--vm-text-tertiary);
  flex-shrink: 0;
}

.custom-override .vm-episode-item-active .vm-episode-num {
  color: var(--vm-accent-blue);
}

.custom-override .vm-episode-title {
  flex: 1;
  font-size: 14px;
  color: var(--vm-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  font-weight: 500;
}

.custom-override .vm-episode-item-active .vm-episode-title {
  color: var(--vm-accent-blue);
  font-weight: 600;
}

.custom-override .vm-episode-duration {
  font-size: 12px;
  color: var(--vm-text-tertiary);
  flex-shrink: 0;
  font-weight: 500;
}

/* ---- 评论区 ---- */
.custom-override .vm-comments {
  margin-top: 10px;
  position: relative;
  z-index: 10025;
}

.custom-override .vm-comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}

.custom-override .vm-comments-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

/* 评论区控件：覆盖全页 button 44px 最小尺寸，避免排序/表情/操作被撑大 */
.custom-override .vm-comments .vm-sort-btn,
.custom-override .vm-comments .vm-emoji-btn,
.custom-override .vm-comments .vm-comment-submit,
.custom-override .vm-comments .vm-comment-action,
.custom-override .vm-comments .vm-comment-reply-btn,
.custom-override .vm-comments .vm-comment-more-btn,
.custom-override .vm-comments .vm-replies-toggle,
.custom-override .vm-comments .vm-replies-more,
.custom-override .vm-comments .vm-reply-cancel,
.custom-override .vm-comments .vm-reply-submit {
  min-width: 0;
  min-height: 0;
}

.custom-override .vm-comments .vm-comment-textarea {
  min-height: 0;
}

.custom-override .vm-comments-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--vm-text-primary);
  letter-spacing: 0;
}

.custom-override .vm-comments-count {
  font-size: 14px;
  color: var(--vm-text-tertiary);
  font-weight: 400;
  margin-left: 0;
}

.custom-override .vm-comments-sort {
  display: flex;
  gap: 4px;
  background: var(--vm-bg-secondary);
  padding: 3px;
  border-radius: 980px;
}

.custom-override .vm-sort-btn {
  padding: 8px 18px;
  border-radius: 980px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--vm-transition-interactive);
  color: var(--vm-text-secondary);
  background: transparent;
}

.custom-override .vm-sort-btn:hover {
  color: var(--vm-text-primary);
}

.custom-override .vm-sort-btn-active {
  color: var(--vm-text-primary);
  background: var(--vm-bg-primary);
  box-shadow: var(--vm-shadow-sm);
}

/* 评论发布框 */
.custom-override .vm-comment-publish {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--vm-border-color);
}

.custom-override .vm-comment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vm-accent-blue), var(--vm-accent-purple));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
}

.custom-override .vm-comment-input-wrap {
  flex: 1;
  min-width: 0;
}

.custom-override .vm-comment-textarea {
  width: 100%;
  min-height: 90px;
  padding: 14px 18px;
  border: 1px solid var(--vm-border-color);
  border-radius: var(--vm-radius-md);
  font-size: 15px;
  color: var(--vm-text-primary);
  background: var(--vm-bg-primary);
  resize: vertical;
  outline: none;
  transition: var(--vm-transition-interactive);
  font-family: inherit;
  font-weight: 400;
}

.custom-override .vm-comment-textarea:focus {
  border-color: var(--vm-accent-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--vm-accent-blue) 10%, transparent);
}

.custom-override .vm-comment-textarea::placeholder {
  color: var(--vm-text-tertiary);
}

.custom-override .vm-comment-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.custom-override .vm-comment-emojis {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.custom-override .vm-emoji-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  transition: var(--vm-transition-interactive);
}

.custom-override .vm-emoji-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  transform: scale(1.12);
}

.custom-override .vm-comment-submit {
  padding: 10px 24px;
  background: var(--vm-accent-blue);
  color: #fff;
  border: none;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--vm-transition-interactive);
}

.custom-override .vm-comment-submit:hover {
  background: var(--vm-accent-coral-hover);
  transform: scale(1.02);
}

/* 待审提示：避免用户以为「发布失败」 */
.custom-override .vm-comment-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--vm-text-tertiary);
}

.custom-override .vm-comment-hint[hidden] {
  display: none !important;
}

/* 评论列表 */
.custom-override .vm-comment-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.custom-override .vm-comment-item {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--vm-radius-lg);
  transition: background var(--vm-transition-fast);
}

.custom-override .vm-comment-item:hover {
  background: rgba(0, 0, 0, 0.015);
}

.custom-override .vm-comment-item .vm-comment-avatar {
  width: 40px;
  height: 40px;
  font-size: 15px;
}

.custom-override .vm-comment-body {
  flex: 1;
  min-width: 0;
}

.custom-override .vm-comment-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.custom-override .vm-comment-username {
  font-size: 15px;
  font-weight: 600;
  color: var(--vm-text-primary);
}

.custom-override .vm-comment-up-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 980px;
  background: var(--vm-accent-blue);
  color: #fff;
  font-weight: 600;
}

.custom-override .vm-comment-time {
  font-size: 13px;
  color: var(--vm-text-tertiary);
  font-weight: 400;
}

.custom-override .vm-comment-text {
  font-size: 15px;
  color: var(--vm-text-primary);
  line-height: 1.65;
  margin-bottom: 10px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.custom-override .vm-comment-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.custom-override .vm-comment-empty {
  margin: 0;
  padding: 36px 16px 28px;
  text-align: center;
  color: var(--vm-text-tertiary);
  font-size: 13px;
  line-height: 1.6;
}

.custom-override .vm-comment-empty-error {
  color: var(--vm-text-secondary);
}

/* 仿 B 站元信息行：时间·回复 在左，点赞靠右；user 行内时间隐藏防重复 */
.custom-override .vm-comment-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.custom-override .vm-comment-meta .vm-comment-time {
  flex-shrink: 0;
}

.custom-override .vm-comment-meta .vm-comment-reply-btn {
  margin-right: auto;
}

.custom-override .vm-comment-meta .vm-comment-action {
  margin-left: auto;
}

.custom-override .vm-comment-item:has(.vm-comment-meta) > .vm-comment-body > .vm-comment-user .vm-comment-time {
  display: none;
}

.custom-override .vm-comment-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.custom-override .vm-comment-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--vm-text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--vm-transition-fast);
  font-weight: 500;
}

.custom-override .vm-comment-action:hover {
  color: var(--vm-text-secondary);
}

.custom-override .vm-comment-action svg {
  width: 16px;
  height: 16px;
}

.custom-override .vm-comment-action-liked {
  color: var(--vm-accent-pink);
}

/* 加载更多 */
.custom-override .vm-comment-more {
  text-align: center;
  padding: 20px 0 8px;
}

.custom-override .vm-comment-more-btn {
  padding: 12px 36px;
  font-size: 14px;
  font-weight: 600;
  color: var(--vm-accent-blue);
  background: color-mix(in srgb, var(--vm-accent-blue) 6%, transparent);
  border: none;
  border-radius: 980px;
  cursor: pointer;
  transition: var(--vm-transition-interactive);
}

.custom-override .vm-comment-more-btn:hover {
  background: var(--vm-accent-coral-muted-strong);
  transform: scale(1.02);
}

/* 回复按钮 */
.custom-override .vm-comment-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 14px;
  font-size: 13px;
  color: var(--vm-text-secondary);
  background: none;
  border: 1px solid var(--vm-border-color);
  border-radius: 980px;
  cursor: pointer;
  transition: var(--vm-transition-interactive);
  font-weight: 500;
}
.custom-override .vm-comment-reply-btn:hover {
  color: var(--vm-accent-blue);
  border-color: var(--vm-accent-blue);
}
.custom-override .vm-reply-box {
  margin-top: 14px;
}
.custom-override .vm-reply-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.custom-override .vm-reply-textarea {
  width: 100%;
  min-height: 64px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--vm-text-primary);
  background: var(--vm-bg-secondary);
  border: 1px solid var(--vm-border-color);
  border-radius: var(--vm-radius-md);
  resize: vertical;
  font-family: inherit;
  transition: var(--vm-transition-interactive);
}
.custom-override .vm-reply-textarea:focus {
  outline: none;
  border-color: var(--vm-accent-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--vm-accent-blue) 10%, transparent);
}
.custom-override .vm-reply-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.custom-override .vm-reply-cancel,
.custom-override .vm-reply-submit {
  padding: 8px 20px;
  font-size: 13px;
  border-radius: 980px;
  cursor: pointer;
  transition: var(--vm-transition-interactive);
  font-weight: 600;
}
.custom-override .vm-reply-cancel {
  color: var(--vm-text-secondary);
  background: var(--vm-bg-secondary);
  border: 1px solid var(--vm-border-color);
}
.custom-override .vm-reply-submit {
  color: #fff;
  background: var(--vm-accent-blue);
  border: none;
}
.custom-override .vm-reply-submit:hover {
  background: var(--vm-accent-coral-hover);
}
.custom-override .vm-reply-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.custom-override .vm-replies-toggle,
.custom-override .vm-replies-more {
  display: inline-block;
  padding: 4px 0;
  font-size: 13px;
  color: var(--vm-accent-blue);
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.custom-override .vm-replies-body {
  margin-top: 10px;
  padding-left: 36px;
  border-left: 2px solid var(--vm-border-color);
}

.custom-override .vm-replies-more {
  min-height: 44px;
  margin-top: 8px;
}

/* 回复区域 */
.custom-override .vm-replies-wrap {
  margin-top: 14px;
  padding: 14px;
  background: var(--vm-bg-secondary);
  border-radius: var(--vm-radius-md);
}

.custom-override .vm-replies-toggle {
  font-size: 13px;
  color: var(--vm-accent-blue);
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-top: 8px;
}

.custom-override .vm-reply-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
}

.custom-override .vm-reply-item + .vm-reply-item {
  border-top: 1px solid var(--vm-glass-border);
}

.custom-override .vm-reply-item .vm-comment-avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.custom-override .vm-reply-input-wrap {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.custom-override .vm-reply-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--vm-glass-border);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  background: var(--vm-bg-primary);
  transition: var(--vm-transition-interactive);
}

.custom-override .vm-reply-input:focus {
  border-color: var(--vm-accent-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--vm-accent-blue) 10%, transparent);
}

.custom-override .vm-reply-submit {
  padding: 10px 18px;
  background: var(--vm-accent-blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ---- 推荐侧栏 ---- */
.custom-override .vm-sidebar-sticky {
  position: sticky;
  top: 28px;
}

.custom-override .vm-sidebar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--vm-text-primary);
  margin-bottom: 18px;
  letter-spacing: 0;
}

.custom-override .vm-sidebar-title svg {
  width: 20px;
  height: 20px;
  color: var(--vm-accent-blue);
}

.custom-override .vm-rec-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.custom-override .vm-rec-card {
  display: flex;
  gap: 14px;
  padding: 10px 12px;
  border-radius: var(--vm-radius-md);
  cursor: pointer;
  transition: var(--vm-transition-interactive);
  text-decoration: none;
  color: inherit;
}

.custom-override .vm-rec-card:hover {
  background: rgba(0, 0, 0, 0.03);
  transform: scale(1.01);
}

.custom-override .vm-rec-thumb {
  position: relative;
  width: 168px;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--vm-radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--vm-bg-tertiary);
}

.custom-override .vm-rec-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--vm-transition-normal);
}

.custom-override .vm-rec-card:hover .vm-rec-thumb img {
  transform: scale(1.04);
}

.custom-override .vm-rec-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--vm-transition-fast);
}

.custom-override .vm-rec-card:hover .vm-rec-thumb-overlay {
  background: rgba(0, 0, 0, 0.25);
}

.custom-override .vm-rec-thumb-overlay svg {
  width: 30px;
  height: 30px;
  color: #fff;
  opacity: 0;
  transform: scale(0.8);
  transition: var(--vm-transition-interactive);
}

.custom-override .vm-rec-card:hover .vm-rec-thumb-overlay svg {
  opacity: 1;
  transform: scale(1);
}

.custom-override .vm-rec-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  font-size: 12px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.custom-override .vm-rec-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.custom-override .vm-rec-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--vm-text-primary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.custom-override .vm-rec-meta {
  margin-top: 8px;
  font-size: 13px;
  color: var(--vm-text-tertiary);
  font-weight: 400;
}

.custom-override .vm-rec-creator {
  font-size: 13px;
  color: var(--vm-text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

/* ---- 分享面板 ---- */
.custom-override .vm-share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: var(--vm-transition-overlay);
}

.custom-override .vm-share-overlay-open {
  opacity: 1;
  visibility: visible;
}

.custom-override .vm-share-overlay[hidden] {
  display: none;
}

.custom-override .vm-share-panel {
  position: relative;
  background: var(--vm-bg-primary);
  border-radius: var(--vm-radius-xl);
  padding: 32px;
  width: 380px;
  max-width: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  transform: scale(0.92) translateY(24px);
  transition: transform var(--vm-transition-slow);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
}

.custom-override .vm-share-overlay-open .vm-share-panel {
  transform: scale(1) translateY(0);
}

.custom-override .vm-share-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--vm-text-primary);
  margin-bottom: 24px;
  text-align: center;
  letter-spacing: 0;
}

.custom-override .vm-share-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.custom-override .vm-share-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: var(--vm-radius-md);
  border: none;
  background: none;
  cursor: pointer;
  transition: var(--vm-transition-interactive);
}

.custom-override .vm-share-option:hover {
  background: rgba(0, 0, 0, 0.03);
  transform: scale(1.04);
}

.custom-override .vm-share-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.custom-override .vm-share-label {
  font-size: 12px;
  color: var(--vm-text-secondary);
  font-weight: 500;
}

.custom-override .vm-share-link-row {
  display: flex;
  gap: 10px;
  min-width: 0;
}

.custom-override .vm-share-link-input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid var(--vm-border-color);
  border-radius: var(--vm-radius-md);
  font-size: 14px;
  color: var(--vm-text-secondary);
  background: var(--vm-bg-secondary);
  outline: none;
  transition: var(--vm-transition-interactive);
}

.custom-override .vm-share-link-input:focus {
  border-color: var(--vm-accent-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--vm-accent-blue) 10%, transparent);
}

.custom-override .vm-share-copy-btn {
  padding: 12px 20px;
  background: var(--vm-accent-blue);
  color: #fff;
  border: none;
  border-radius: var(--vm-radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--vm-transition-interactive);
  white-space: nowrap;
}

.custom-override .vm-share-copy-btn:hover {
  background: var(--vm-accent-coral-hover);
  transform: scale(1.02);
}

/* ---- 加载骨架屏布局 ---- */
.custom-override .vm-skeleton-layout {
  display: flex;
  gap: 28px;
}

.custom-override .vm-skeleton-main {
  flex: 1;
}

.custom-override .vm-skeleton-sidebar {
  width: 420px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.custom-override .vm-skeleton-card {
  display: flex;
  gap: 14px;
  padding: 10px;
}

/* ---- 聚焦样式 ---- */
.custom-override .vm-page *:focus-visible {
  outline: 2px solid var(--vm-accent-blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---- 自定义滚动条 ---- */
.custom-override .vm-page ::-webkit-scrollbar {
  width: 6px;
}

.custom-override .vm-page ::-webkit-scrollbar-track {
  background: transparent;
}

.custom-override .vm-page ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.custom-override .vm-page ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.18);
}

/* ---- Toast 提示 ---- */
.custom-override .vm-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  padding: 18px 36px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  border-radius: var(--vm-radius-lg);
  font-size: 15px;
  font-weight: 500;
  z-index: var(--dm-z-toast, 10500);
  opacity: 0;
  visibility: hidden;
  transition: var(--vm-transition-overlay);
  pointer-events: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: center;
  max-width: 80vw;
  word-break: break-word;
}

.custom-override .vm-toast-show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* ============================================================
 * 响应式设计
 * ============================================================ */

/* 平板 (<=1200px) */
@media (max-width: 1200px) {
  .custom-override .vm-container {
    padding: 24px 28px;
  }
  .custom-override .vm-sidebar {
    width: 360px;
  }
  .custom-override .vm-rec-thumb {
    width: 140px;
    height: auto;
  }
}

/* 移动端 (<=900px) */
@media (max-width: 900px) {
  .custom-override .vm-container {
    padding: 16px 18px;
  }
  .custom-override .vm-layout {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  .custom-override .vm-main {
    width: 100%;
    max-width: 100%;
  }
  .custom-override .vm-sidebar {
    width: 100%;
  }
  .custom-override .vm-sidebar-sticky {
    position: static;
  }
  /* 紧凑端顶栏为悬浮胶囊/图标，给播放器留出顶部避让，避免贴顶遮挡 */
  .custom-override .vm-player-wrap {
    margin-top: 80px;
  }
  .custom-override .vm-controls {
    padding: 0 12px 10px;
  }
  .custom-override .vm-ctrl-btn {
    width: var(--vm-control-size);
    height: var(--vm-control-size);
  }
  .custom-override .vm-shortcuts-hint {
    display: none;
  }
  .custom-override .vm-danmaku-bar {
    gap: 12px;
    padding: 12px 14px;
  }
  /* 紧凑基线仍保持横向发布条（仿 B 站）；勿改 column 导致头像独占一行 */
  .custom-override .vm-comment-publish {
    flex-direction: row;
    align-items: flex-start;
  }
  .custom-override .vm-share-options {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
  .custom-override .vm-rec-card {
    flex-direction: column;
  }
  .custom-override .vm-rec-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .custom-override .vm-rec-thumb img {
    width: 100%;
    height: 100%;
  }
  .custom-override .vm-skeleton-layout {
    flex-direction: column;
  }
  .custom-override .vm-skeleton-sidebar {
    width: 100%;
  }
  .custom-override .vm-theater-mode .vm-sidebar {
    display: none;
  }
  .custom-override .vm-sidebar-title,
  .custom-override .vm-rec-list {
    display: none;
  }
  .custom-override .vm-action-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
  .custom-override .vm-comment-item {
    padding: 12px 14px;
  }
}

/* 竖屏平板：悬浮顶栏高度更大，播放器额外下移以避免被遮挡。 */
@media (min-width: 600px) and (max-width: 833px) and (orientation: portrait) {
  .custom-override .vm-player-wrap {
    margin-top: 110px;
  }
}

/* 紧凑端：弹幕开关进播放器控制条（仿哔哩哔哩），栏内胶囊开关隐藏 */
@media (max-width: 833px) {
  .custom-override .vm-controls-right .vm-dm-toggle-inplayer {
    display: flex;
  }
  .custom-override .vm-danmaku-bar > .vm-dm-toggle {
    display: none;
  }
}

/* 紧凑端弹幕输入：iOS 26 Liquid Glass（对齐 mob_bottom_nav 的玻璃材质与 833 断点） */
@media (max-width: 833px) {
  .custom-override .vm-dm-input-panel.vm-glass {
    --vm-dm-lg-border: rgba(255, 255, 255, 0.78);
    --vm-dm-lg-bg: rgba(255, 255, 255, 0.76);
    --vm-dm-lg-shadow:
      0 1px 0 rgba(255, 255, 255, 0.92) inset,
      0 -1px 0 rgba(24, 24, 27, 0.05) inset,
      0 10px 34px rgba(27, 31, 36, 0.16),
      0 2px 8px rgba(27, 31, 36, 0.08);
    --vm-dm-lg-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0));
    --vm-dm-lg-control-bg: rgba(255, 255, 255, 0.58);
    --vm-dm-lg-control-border: rgba(24, 33, 47, 0.1);
    --vm-dm-lg-field-bg: rgba(255, 255, 255, 0.62);
    --vm-dm-lg-tray-bg: rgba(255, 255, 255, 0.42);
    --vm-dm-lg-tray-border: rgba(24, 33, 47, 0.08);
    --vm-dm-lg-orb-ring: rgba(255, 255, 255, 0.72);
    --vm-dm-lg-orb-active-ring: rgba(29, 29, 31, 0.88);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin-top: 12px;
    padding: 12px;
    border-radius: 28px;
    border: 1px solid var(--vm-dm-lg-border);
    background: var(--vm-dm-lg-bg);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    box-shadow: var(--vm-dm-lg-shadow);
  }

  .custom-override .vm-dm-input-panel.vm-glass::before {
    content: "";
    position: absolute;
    inset: 0 1px auto;
    z-index: 0;
    height: 46%;
    border-radius: 27px 27px 45% 45%;
    background: var(--vm-dm-lg-sheen);
    pointer-events: none;
  }

  .custom-override .vm-dm-input-panel.vm-glass > * {
    position: relative;
    z-index: 1;
  }

  .custom-override .vm-dm-input-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
  }

  /* 图标玻璃胶囊：像 iOS 液态玻璃控件，文案交给 aria-label */
  .custom-override .vm-dm-input-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
    gap: 0;
    border-radius: 16px;
    border: 1px solid var(--vm-dm-lg-control-border);
    background: var(--vm-dm-lg-control-bg);
    color: var(--vm-text-primary);
    -webkit-backdrop-filter: blur(14px) saturate(1.45);
    backdrop-filter: blur(14px) saturate(1.45);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  }

  .custom-override .vm-dm-input-toggle:hover {
    border-color: color-mix(in srgb, var(--vm-accent-blue) 40%, var(--vm-dm-lg-control-border));
    color: var(--vm-accent-blue);
    transform: scale(1.02);
  }

  .custom-override .vm-dm-input-toggle:active {
    transform: scale(0.96);
  }

  .custom-override .vm-dm-input-toggle-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .custom-override .vm-dm-input-toggle svg {
    width: 18px;
    height: 18px;
  }

  .custom-override .vm-dm-input {
    width: auto;
    height: 44px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid var(--vm-dm-lg-control-border);
    background: var(--vm-dm-lg-field-bg);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    backdrop-filter: blur(12px) saturate(1.4);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
    font-size: 15px;
  }

  .custom-override .vm-dm-input:focus {
    border-color: color-mix(in srgb, var(--vm-accent-blue) 55%, transparent);
    box-shadow:
      0 0 0 3px var(--vm-accent-coral-ring),
      0 1px 0 rgba(255, 255, 255, 0.55) inset;
  }

  .custom-override .vm-dm-send {
    height: 44px;
    min-height: 44px;
    min-width: 72px;
    padding: 0 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    /* 取消外扩珊瑚泛光，仅保留实色按钮 + 细内描边 */
    background: var(--vm-accent-blue);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset;
  }

  .custom-override .vm-dm-send:hover {
    background: var(--vm-accent-coral-hover);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset;
  }

  .custom-override .vm-dm-send:active {
    transform: scale(0.96);
  }

  /* 颜色轨道：嵌套玻璃托盘 + 液态色球 */
  .custom-override .vm-dm-colors {
    margin-top: 12px;
    padding: 8px 10px;
    padding-left: 10px;
    gap: 10px;
    border-radius: 18px;
    border: 1px solid var(--vm-dm-lg-tray-border);
    background: var(--vm-dm-lg-tray-bg);
    -webkit-backdrop-filter: blur(12px) saturate(1.35);
    backdrop-filter: blur(12px) saturate(1.35);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset;
  }

  .custom-override .vm-dm-color-label {
    font-size: 12px;
    margin-right: 2px;
  }

  .custom-override .vm-page .vm-dm-color-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border: 1.5px solid var(--vm-dm-lg-orb-ring);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.55) inset,
      0 4px 10px rgba(0, 0, 0, 0.12);
  }

  .custom-override .vm-page .vm-dm-color-btn:hover {
    transform: scale(1.08);
  }

  .custom-override .vm-page .vm-dm-color-btn-active {
    transform: scale(1.08);
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow:
      0 0 0 2px var(--vm-dm-lg-orb-active-ring),
      0 0 0 4px rgba(255, 255, 255, 0.55),
      0 1px 0 rgba(255, 255, 255, 0.65) inset,
      0 6px 14px rgba(0, 0, 0, 0.16);
  }

  /* 紧凑端弹幕开关也贴近液态玻璃胶囊 */
  .custom-override .vm-danmaku-bar.vm-glass {
    border-radius: 24px;
    border: 1px solid var(--vm-dm-lg-border, rgba(255, 255, 255, 0.78));
    background: var(--vm-dm-lg-bg, rgba(255, 255, 255, 0.76));
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    box-shadow: var(--vm-dm-lg-shadow, 0 10px 34px rgba(27, 31, 36, 0.16));
  }

  .custom-override .vm-dm-toggle {
    min-height: 40px;
    border: 1px solid var(--vm-dm-lg-control-border, rgba(24, 33, 47, 0.1));
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    backdrop-filter: blur(12px) saturate(1.4);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset;
  }

  .custom-override .vm-dm-toggle-on {
    border-color: color-mix(in srgb, var(--vm-accent-blue) 35%, transparent);
    background: linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.28),
      color-mix(in srgb, var(--vm-accent-blue) 18%, transparent) 58%,
      rgba(255, 255, 255, 0.1)
    );
  }
}

/* 紧凑端液态玻璃：系统暗黑 */
@media (max-width: 833px) and (prefers-color-scheme: dark) {
  html:not(.husir-light) .custom-override .vm-dm-input-panel.vm-glass {
    --vm-dm-lg-border: rgba(255, 255, 255, 0.16);
    --vm-dm-lg-bg: rgba(42, 38, 34, 0.72);
    --vm-dm-lg-shadow:
      0 1px 0 rgba(255, 255, 255, 0.12) inset,
      0 -1px 0 rgba(0, 0, 0, 0.28) inset,
      0 12px 36px rgba(0, 0, 0, 0.4);
    --vm-dm-lg-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
    --vm-dm-lg-control-bg: rgba(58, 58, 62, 0.58);
    --vm-dm-lg-control-border: rgba(255, 255, 255, 0.13);
    --vm-dm-lg-field-bg: rgba(52, 48, 44, 0.72);
    --vm-dm-lg-tray-bg: rgba(255, 255, 255, 0.06);
    --vm-dm-lg-tray-border: rgba(255, 255, 255, 0.12);
    --vm-dm-lg-orb-ring: rgba(255, 255, 255, 0.28);
    --vm-dm-lg-orb-active-ring: rgba(245, 245, 247, 0.92);
  }

  html:not(.husir-light) .custom-override .vm-dm-input-toggle,
  html:not(.husir-light) .custom-override .vm-dm-input {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
  }

  html:not(.husir-light) .custom-override .vm-dm-colors {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
  }

  html:not(.husir-light) .custom-override .vm-page .vm-dm-color-btn {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.28) inset,
      0 4px 12px rgba(0, 0, 0, 0.28);
  }

  html:not(.husir-light) .custom-override .vm-page .vm-dm-color-btn-active {
    box-shadow:
      0 0 0 2px var(--vm-dm-lg-orb-active-ring),
      0 0 0 4px rgba(255, 255, 255, 0.12),
      0 1px 0 rgba(255, 255, 255, 0.28) inset,
      0 6px 16px rgba(0, 0, 0, 0.32);
  }

  html:not(.husir-light) .custom-override .vm-danmaku-bar.vm-glass {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(42, 38, 34, 0.72);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.12) inset,
      0 12px 36px rgba(0, 0, 0, 0.4);
  }

  html:not(.husir-light) .custom-override .vm-dm-toggle {
    border-color: rgba(255, 255, 255, 0.13);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset;
  }

  html:not(.husir-light) .custom-override .vm-dm-toggle-on {
    border-color: rgba(255, 255, 255, 0.26);
    background: linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.16),
      rgba(255, 105, 72, 0.2) 58%,
      rgba(255, 255, 255, 0.08)
    );
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.28) inset,
      0 -1px 0 rgba(0, 0, 0, 0.22) inset,
      0 6px 18px rgba(255, 105, 72, 0.18);
  }
}

/* 紧凑端液态玻璃：手动暗黑（与系统分支等权） */
@media (max-width: 833px) {
  html.husir-dark .custom-override .vm-dm-input-panel.vm-glass {
    --vm-dm-lg-border: rgba(255, 255, 255, 0.16);
    --vm-dm-lg-bg: rgba(42, 38, 34, 0.72);
    --vm-dm-lg-shadow:
      0 1px 0 rgba(255, 255, 255, 0.12) inset,
      0 -1px 0 rgba(0, 0, 0, 0.28) inset,
      0 12px 36px rgba(0, 0, 0, 0.4);
    --vm-dm-lg-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
    --vm-dm-lg-control-bg: rgba(58, 58, 62, 0.58);
    --vm-dm-lg-control-border: rgba(255, 255, 255, 0.13);
    --vm-dm-lg-field-bg: rgba(52, 48, 44, 0.72);
    --vm-dm-lg-tray-bg: rgba(255, 255, 255, 0.06);
    --vm-dm-lg-tray-border: rgba(255, 255, 255, 0.12);
    --vm-dm-lg-orb-ring: rgba(255, 255, 255, 0.28);
    --vm-dm-lg-orb-active-ring: rgba(245, 245, 247, 0.92);
  }

  html.husir-dark .custom-override .vm-dm-input-toggle,
  html.husir-dark .custom-override .vm-dm-input {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
  }

  html.husir-dark .custom-override .vm-dm-colors {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
  }

  html.husir-dark .custom-override .vm-page .vm-dm-color-btn {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.28) inset,
      0 4px 12px rgba(0, 0, 0, 0.28);
  }

  html.husir-dark .custom-override .vm-page .vm-dm-color-btn-active {
    box-shadow:
      0 0 0 2px var(--vm-dm-lg-orb-active-ring),
      0 0 0 4px rgba(255, 255, 255, 0.12),
      0 1px 0 rgba(255, 255, 255, 0.28) inset,
      0 6px 16px rgba(0, 0, 0, 0.32);
  }

  html.husir-dark .custom-override .vm-danmaku-bar.vm-glass {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(42, 38, 34, 0.72);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.12) inset,
      0 12px 36px rgba(0, 0, 0, 0.4);
  }

  html.husir-dark .custom-override .vm-dm-toggle {
    border-color: rgba(255, 255, 255, 0.13);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset;
  }

  html.husir-dark .custom-override .vm-dm-toggle-on {
    border-color: rgba(255, 255, 255, 0.26);
    background: linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.16),
      rgba(255, 105, 72, 0.2) 58%,
      rgba(255, 255, 255, 0.08)
    );
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.28) inset,
      0 -1px 0 rgba(0, 0, 0, 0.22) inset,
      0 6px 18px rgba(255, 105, 72, 0.18);
  }
}

/* 小屏手机 (<=600px) */
@media (max-width: 600px) {
  .custom-override .vm-container {
    padding-top: 10px;
    padding-bottom: 0;
    padding-left: calc(14px + env(safe-area-inset-left));
    padding-right: calc(14px + env(safe-area-inset-right));
  }
  .custom-override .vm-player-wrap {
    border-radius: 18px;
  }
  .custom-override .vm-video-meta {
    gap: 10px;
  }
  .custom-override .vm-action-btn {
    padding: 6px 10px;
    font-size: 12px;
    gap: 4px;
  }
  .custom-override .vm-action-btn svg {
    width: 16px;
    height: 16px;
  }
  /* 手机控制条保持单行：双行全宽会把倍速/画中画挤到画面中部并与中央播放钮重叠 */
  .custom-override .vm-controls {
    padding: 0 8px 4px;
  }
  .custom-override .vm-controls-row {
    flex-wrap: nowrap;
    gap: 2px;
    min-width: 0;
  }
  .custom-override .vm-controls-left,
  .custom-override .vm-controls-right {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    gap: 0;
  }
  .custom-override .vm-controls-left {
    justify-content: flex-start;
  }
  .custom-override .vm-controls-right {
    justify-content: flex-end;
    flex: 0 0 auto;
  }
  /* 压过 .vm-page button 的 44px 触控底线，手机条内按钮收至 40 以免挤行 */
  .custom-override .vm-page .vm-ctrl-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 10px;
  }
  .custom-override .vm-page .vm-ctrl-btn svg {
    width: 18px;
    height: 18px;
  }
  .custom-override .vm-time-display {
    font-size: 11px;
    margin-left: 2px;
  }
  .custom-override .vm-volume-wrap:hover .vm-volume-slider-wrap,
  .custom-override .vm-volume-wrap:focus-within .vm-volume-slider-wrap {
    width: 0;
  }
  .custom-override .vm-progress-wrap {
    height: 28px;
  }
  .custom-override .vm-volume-slider-wrap {
    min-height: 40px;
  }
  .custom-override .vm-volume-slider {
    padding: 18px 0;
  }
  .custom-override .vm-progress-track {
    height: 3px;
  }
  /* 触屏无 hover：进度圆点常显，避免难抓取 */
  .custom-override .vm-progress-handle {
    transform: translate(-50%, -50%) scale(1);
  }
  .custom-override .vm-time-display {
    color: rgba(255, 255, 255, 0.82);
  }
  /* 评论区手机专属样式见下方 max-width:599px「仿哔哩哔哩」块 */
  /* 手机端透明度/影院已隐藏，开关已迁入播放器 → 整栏收起 */
  .custom-override .vm-danmaku-bar {
    display: none;
  }
  .custom-override .vm-dm-control {
    display: none;
  }
  .custom-override .vm-theater-btn {
    display: none;
  }
  .custom-override .vm-share-panel {
    padding: 24px 18px 18px;
  }
  .custom-override .vm-share-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .custom-override .vm-share-option {
    min-width: 0;
    padding: 10px;
  }
  .custom-override .vm-share-link-row {
    flex-wrap: wrap;
  }
  .custom-override .vm-share-link-input {
    flex-basis: 180px;
  }
  .custom-override .vm-replies-body {
    padding-left: 16px;
  }
  .custom-override .vm-resume-banner {
    justify-content: center;
    padding: 12px 16px;
  }
}

/* 手机竖屏：将互动按钮收束为一组分段操作轨，减少三个独立胶囊造成的碎片化留白。 */
@media (max-width: 599px) {
  .custom-override .vm-page .vm-actions {
    margin-left: auto;
    gap: 0;
    min-height: var(--vm-control-size);
    overflow: hidden;
    border: 1px solid var(--vm-border-color);
    border-radius: var(--vm-radius-md);
    background: var(--vm-bg-secondary);
  }

  .custom-override .vm-page .vm-action-btn {
    min-width: 44px;
    min-height: var(--vm-control-size);
    padding: 0 8px;
    border-radius: 0;
    background: transparent;
    justify-content: center;
  }

  .custom-override .vm-page .vm-action-btn + .vm-action-btn {
    border-left: 1px solid var(--vm-border-color);
  }

  .custom-override .vm-page .vm-action-btn:hover {
    transform: none;
    background: var(--vm-bg-tertiary);
  }

  .custom-override .vm-page .vm-action-btn-active {
    background: var(--vm-bg-tertiary);
  }
}

/* 竖屏平板与窄桌面（600–900px）：补足视频详情页各区块的呼吸间距。 */
@media (min-width: 600px) and (max-width: 900px) {
  .custom-override .vm-danmaku-bar {
    margin-top: 20px;
  }

  .custom-override .vm-dm-input-panel.vm-glass {
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .custom-override .vm-video-meta {
    margin-bottom: 20px;
  }

  .custom-override .vm-comments-header {
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .custom-override .vm-comment-submit {
    margin-right: 100px;
  }
}

/* ---- 动画关键帧 ---- */
@keyframes vm-slide-up {
  0% { opacity: 0; transform: translateX(-50%) translateY(24px); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes vm-heartbeat {
  0% { transform: scale(1); }
  25% { transform: scale(1.25); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* ============================================================
 * 暗黑模式：内容区 hover/border 翻转（令牌覆盖不到的硬编码）
 * 这些规则原写死 rgba(0,0,0,0.0x)，暗黑底已是深色，叠黑看不见，
 * 故两分支下统一翻转为 rgba(255,255,255,0.0x) 浅白半透明。
 * 不含播放器覆盖层（vm-error-overlay 等叠在黑底视频上，无需改）。
 * ============================================================ */

/* 系统暗黑 */
@media (prefers-color-scheme: dark) {
  html:not(.husir-light) .custom-override .vm-dm-toggle-off,
  html:not(.husir-light) .custom-override .vm-theater-btn {
    background: rgba(255, 255, 255, 0.06);
  }
  html:not(.husir-light) .custom-override .vm-dm-range {
    background-color: rgba(255, 255, 255, 0.12);
  }
  html:not(.husir-light) .custom-override .vm-playlist-header:hover,
  html:not(.husir-light) .custom-override .vm-episode-item:hover,
  html:not(.husir-light) .custom-override .vm-emoji-btn:hover,
  html:not(.husir-light) .custom-override .vm-comment-item:hover,
  html:not(.husir-light) .custom-override .vm-rec-card:hover,
  html:not(.husir-light) .custom-override .vm-share-option:hover {
    background: rgba(255, 255, 255, 0.06);
  }
  html:not(.husir-light) .custom-override .vm-playlist-episodes::-webkit-scrollbar-thumb,
  html:not(.husir-light) .custom-override .vm-page ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
  }
  html:not(.husir-light) .custom-override .vm-page ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.28);
  }
}

/* 手动暗黑 */
html.husir-dark .custom-override .vm-dm-toggle-off,
html.husir-dark .custom-override .vm-theater-btn {
  background: rgba(255, 255, 255, 0.06);
}
html.husir-dark .custom-override .vm-dm-range {
  background-color: rgba(255, 255, 255, 0.12);
}
html.husir-dark .custom-override .vm-playlist-header:hover,
html.husir-dark .custom-override .vm-episode-item:hover,
html.husir-dark .custom-override .vm-emoji-btn:hover,
html.husir-dark .custom-override .vm-comment-item:hover,
html.husir-dark .custom-override .vm-rec-card:hover,
html.husir-dark .custom-override .vm-share-option:hover {
  background: rgba(255, 255, 255, 0.06);
}
html.husir-dark .custom-override .vm-playlist-episodes::-webkit-scrollbar-thumb,
html.husir-dark .custom-override .vm-page ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
}
html.husir-dark .custom-override .vm-page ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* 分享面板关闭按钮 */
.custom-override .vm-share-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--vm-bg-secondary);
  color: var(--vm-text-secondary);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--vm-transition-fast);
}
.custom-override .vm-share-close:hover {
  background: var(--vm-glass-hover);
  color: var(--vm-text-primary);
}


/* ============================================================
 * 手机端评论区 · 仿哔哩哔哩布局（产品语义：手机端 max-width:599px）
 * 目标：标题+数量同行 / 文字排序下划线 / 收起态输入条 / 头像常显 /
 *       扁平列表 + 底部操作行（时间·回复 | 点赞）
 * 主色仍用站点珊瑚红（--vm-accent-blue），不照搬 B 站粉。
 * ============================================================ */
@media (max-width: 599px) {
  .custom-override .vm-comments {
    margin-top: 10px;
    padding: 0 2px;
  }

  .custom-override .vm-comments-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 10px;
  }

  .custom-override .vm-comments-title-row {
    gap: 6px;
    align-items: baseline;
  }

  .custom-override .vm-comments-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
  }

  .custom-override .vm-comments-count {
    font-size: 13px;
    font-weight: 400;
    margin-left: 0;
    color: var(--vm-text-tertiary);
    opacity: 0.9;
    font-variant-numeric: tabular-nums;
  }

  /* 排序：文字 Tab + 底线，去掉胶囊底 */
  .custom-override .vm-comments-sort {
    gap: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
  }

  .custom-override .vm-sort-btn {
    position: relative;
    padding: 6px 10px;
    border-radius: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--vm-text-secondary);
    background: transparent;
    box-shadow: none;
  }

  .custom-override .vm-sort-btn:hover {
    color: var(--vm-text-primary);
    background: transparent;
  }

  .custom-override .vm-sort-btn-active {
    color: var(--vm-text-primary);
    font-weight: 600;
    background: transparent;
    box-shadow: none;
  }

  .custom-override .vm-sort-btn-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 18px;
    height: 2px;
    margin-left: -9px;
    border-radius: 2px;
    background: var(--vm-accent-blue);
  }

  /* 发布条：默认收起像 B 站单行输入 */
  .custom-override .vm-comment-publish {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--vm-border-color);
  }

  .custom-override .vm-comment-publish > .vm-comment-avatar {
    width: 34px;
    height: 34px;
    font-size: 13px;
    margin-top: 3px;
  }

  .custom-override .vm-comment-textarea {
    min-height: 36px;
    max-height: 120px;
    padding: 8px 12px;
    border-radius: 18px;
    border: none;
    background: var(--vm-bg-secondary);
    font-size: 13px;
    line-height: 1.45;
    resize: none;
    box-shadow: none;
  }

  .custom-override .vm-comment-textarea:focus {
    border: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--vm-accent-blue) 18%, transparent);
    background: var(--vm-bg-secondary);
  }

  /* 收起：工具栏折叠；聚焦/展开/有内容时打开 */
  .custom-override .vm-comment-publish:not(.is-expanded):not(:focus-within) .vm-comment-toolbar {
    display: none;
  }

  .custom-override .vm-comment-publish.is-expanded .vm-comment-textarea,
  .custom-override .vm-comment-publish:focus-within .vm-comment-textarea {
    min-height: 72px;
    border-radius: 12px;
  }

  .custom-override .vm-comment-toolbar {
    margin-top: 8px;
    gap: 8px;
    align-items: center;
    /* 右侧给 husir-backprev 悬浮返回留空，避免挡住「发布」 */
    padding-right: 56px;
    flex-wrap: nowrap;
  }

  .custom-override .vm-comment-emojis {
    gap: 0;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-start;
  }

  .custom-override .vm-emoji-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 15px;
    flex: 0 0 auto;
  }

  .custom-override .vm-emoji-btn:hover {
    background: color-mix(in srgb, var(--vm-text-primary) 6%, transparent);
    transform: none;
  }

  .custom-override .vm-comment-submit {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    padding: 0 14px;
    height: 30px;
    min-height: 30px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
  }

  .custom-override .vm-comment-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
  }

  .custom-override .vm-comment-submit:hover {
    transform: none;
  }

  .custom-override .vm-comment-submit:not(:disabled):active {
    transform: scale(0.98);
  }

  .custom-override .vm-comment-hint {
    margin-top: 6px;
    font-size: 11px;
  }

  /* 列表：扁平、头像常显 */
  .custom-override .vm-comment-list {
    gap: 0;
  }

  .custom-override .vm-comment-item {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-radius: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--vm-border-color) 80%, transparent);
  }

  .custom-override .vm-comment-item:last-child {
    border-bottom: none;
  }

  .custom-override .vm-comment-item:hover {
    background: transparent;
  }

  .custom-override .vm-comment-item .vm-comment-avatar {
    display: flex;
    width: 32px;
    height: 32px;
    font-size: 12px;
    margin-top: 2px;
  }

  .custom-override .vm-comment-user {
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
  }

  .custom-override .vm-comment-username {
    font-size: 12px;
    font-weight: 500;
    color: var(--vm-text-secondary);
  }

  /* 时间挪到操作行时，user 行内 time 可隐藏（有 .vm-comment-meta 时） */
  .custom-override .vm-comment-item:has(.vm-comment-meta) > .vm-comment-body > .vm-comment-user .vm-comment-time {
    display: none;
  }

  .custom-override .vm-comment-time {
    font-size: 11px;
    color: var(--vm-text-tertiary);
  }

  .custom-override .vm-comment-text {
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 6px;
    color: var(--vm-text-primary);
  }

  /* 操作行：左 时间+回复，右 点赞（B 站常见排布） */
  .custom-override .vm-comment-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
  }

  .custom-override .vm-comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 2px;
  }

  .custom-override .vm-comment-meta .vm-comment-time {
    flex-shrink: 0;
  }

  .custom-override .vm-comment-meta .vm-comment-reply-btn {
    margin-right: auto;
  }

  .custom-override .vm-comment-meta .vm-comment-action {
    margin-left: auto;
  }

  .custom-override .vm-comment-reply-btn {
    padding: 0;
    border: none;
    border-radius: 0;
    font-size: 12px;
    color: var(--vm-text-tertiary);
    background: none;
    min-height: 28px;
  }

  .custom-override .vm-comment-reply-btn:hover {
    color: var(--vm-accent-blue);
    border: none;
  }

  .custom-override .vm-comment-action {
    gap: 4px;
    font-size: 12px;
    padding: 0;
    min-height: 28px;
    color: var(--vm-text-tertiary);
  }

  .custom-override .vm-comment-action svg {
    width: 15px;
    height: 15px;
  }

  .custom-override .vm-comment-action-liked {
    color: var(--vm-accent-pink);
  }

  .custom-override .vm-comment-empty {
    padding: 30px 12px;
    font-size: 13px;
    color: var(--vm-text-tertiary);
  }

  .custom-override .vm-comment-more {
    padding: 8px 0 4px;
  }

  .custom-override .vm-comment-more-btn {
    width: 100%;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    background: var(--vm-bg-secondary);
    color: var(--vm-text-secondary);
  }

  .custom-override .vm-comment-more-btn:hover {
    background: var(--vm-bg-tertiary);
    transform: none;
  }

  /* 回复区更紧凑 */
  .custom-override .vm-replies-wrap {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 8px;
  }

  .custom-override .vm-replies-body {
    padding-left: 0;
    border-left: none;
  }

  .custom-override .vm-reply-item {
    gap: 8px;
    padding: 8px 0;
  }

  .custom-override .vm-reply-item .vm-comment-avatar {
    width: 24px;
    height: 24px;
    font-size: 11px;
    display: flex;
  }

  .custom-override .vm-reply-textarea {
    min-height: 56px;
    font-size: 13px;
    border-radius: 10px;
  }

  .custom-override .vm-reply-cancel,
  .custom-override .vm-reply-submit {
    min-height: 32px;
    padding: 6px 14px;
    font-size: 12px;
  }

  .custom-override .vm-replies-toggle {
    font-size: 12px;
    min-height: 28px;
  }
}

/* 手机端评论暗黑微调（系统 + 手动两分支） */
@media (max-width: 599px) and (prefers-color-scheme: dark) {
  html:not(.husir-light) .custom-override .vm-comment-textarea {
    background: rgba(255, 255, 255, 0.06);
  }
  html:not(.husir-light) .custom-override .vm-comment-textarea:focus {
    background: rgba(255, 255, 255, 0.08);
  }
  html:not(.husir-light) .custom-override .vm-comment-item {
    border-bottom-color: rgba(255, 255, 255, 0.06);
  }
  html:not(.husir-light) .custom-override .vm-comment-more-btn {
    background: rgba(255, 255, 255, 0.06);
    color: var(--vm-text-secondary);
  }
}

@media (max-width: 599px) {
  html.husir-dark .custom-override .vm-comment-textarea {
    background: rgba(255, 255, 255, 0.06);
  }
  html.husir-dark .custom-override .vm-comment-textarea:focus {
    background: rgba(255, 255, 255, 0.08);
  }
  html.husir-dark .custom-override .vm-comment-item {
    border-bottom-color: rgba(255, 255, 255, 0.06);
  }
  html.husir-dark .custom-override .vm-comment-more-btn {
    background: rgba(255, 255, 255, 0.06);
    color: var(--vm-text-secondary);
  }
}

@media (prefers-reduced-motion: reduce) {
  .custom-override .vm-page *,
  .custom-override .vm-page *::before,
  .custom-override .vm-page *::after,
  .custom-override .vm-share-overlay,
  .custom-override .vm-share-overlay *,
  .custom-override .vm-share-overlay *::before,
  .custom-override .vm-share-overlay *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .custom-override .vm-danmaku-text,
  .custom-override .vm-particle {
    animation: none !important;
  }
  .custom-override .vm-player-wrap:hover .vm-controls,
  .custom-override .vm-controls-visible {
    transition: none !important;
  }
}
