/* ════════════════════════════════════════════════════════════════════
   Mobile Responsive — 移动端适配
   参考 Suno 移动端设计: 底部Tab导航 / 全宽布局 / 迷你播放器 / 单列堆叠
   断点: 768px (tablet) / 480px (phone)
   ════════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════
   1. 底部 Tab 导航（替代侧边栏）
   ══════════════════════════════════════════ */
.mobile-bottom-nav {
  display: none; /* 桌面端隐藏 */
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9000;
    height: 56px;
    background: rgba(14,14,14,0.97);
    border-top: 1px solid rgba(255,255,255,0.06);
    align-items: center;
    justify-content: space-around;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  .mobile-bottom-nav .mob-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 0;
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s;
    min-width: 48px;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-bottom-nav .mob-tab svg {
    width: 20px; height: 20px;
  }
  .mobile-bottom-nav .mob-tab.is-active {
    color: #ccff00;
  }
  .mobile-bottom-nav .mob-tab.is-active .mob-tab__dot {
    opacity: 1;
  }
  .mob-tab__dot {
    width: 3px; height: 3px;
    border-radius: 50%;
    background: #ccff00;
    opacity: 0;
    transition: opacity 0.2s;
  }
}

/* ══════════════════════════════════════════
   2. 平板 (≤1024px): 侧边栏折叠
   ══════════════════════════════════════════ */
@media (max-width: 1024px) {
  :root { --sidebar-w: 64px; --sb-w: 64px; }
}

/* ══════════════════════════════════════════
   3. 手机 (≤768px): 核心布局重构
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  /* 隐藏侧边栏（改用底部Tab） */
  #musicore-sidebar {
    transform: translateX(-100%) !important;
    width: 280px !important;
    z-index: 10000 !important;
    transition: transform 0.28s cubic-bezier(.16,1,.3,1) !important;
  }
  #musicore-sidebar.is-open {
    transform: translateX(0) !important;
  }

  /* 侧边栏遮罩层 */
  .sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
  }
  .sidebar-overlay.is-active {
    display: block;
  }

  /* 顶栏: 显示汉堡按钮 + 全宽 */
  #musicore-topbar {
    left: 0 !important;
    width: 100% !important;
    padding: 0 12px !important;
  }
  .topbar-menu-btn {
    display: flex !important;
  }

  /* 主内容区: 全宽 + 底部留空 */
  #musicore-main {
    left: 0 !important;
    width: 100% !important;
    padding-bottom: 120px !important; /* 播放器 + 底部Tab */
  }

  /* 播放器: 全宽 + 在底部Tab上方 */
  #musicore-player,
  .player-bar,
  #playerBar {
    left: 0 !important;
    width: 100% !important;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important; /* 底部Tab高度+安全区 */
    padding: 0 10px !important;
    height: 60px !important;
  }

  /* 播放器内容紧凑化 */
  .player-title { font-size: 12px !important; max-width: 120px !important; }
  .player-artist { font-size: 10px !important; }
  .player-vol-wrap,
  .player-vol,
  .player-extra-btn { display: none !important; } /* 隐藏音量/额外按钮 */
}

/* ══════════════════════════════════════════
   4. 首页 (≤768px)
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Hero 区紧凑化 */
  .ph-hero {
    padding: 32px 0 0 !important;
  }
  .ph-title-block {
    font-size: clamp(24px, 7vw, 36px) !important;
  }
  /* 搜索栏全宽 */
  .scc-wrap, .ph-search-wrap {
    width: 100% !important;
    max-width: none !important;
    padding: 0 12px !important;
  }
  .scc-input, .ph-search-input, #mainSearchInput {
    font-size: 14px !important;
    height: 44px !important;
  }
  /* 搜索Tab横向滚动 */
  .ph-tabs, .scc-tabs {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .ph-tabs::-webkit-scrollbar, .scc-tabs::-webkit-scrollbar { display: none; }
  .ph-tab {
    flex-shrink: 0 !important;
    font-size: 12px !important;
    padding: 6px 12px !important;
    white-space: nowrap !important;
  }
  /* 快捷卡片两列 */
  .home-quick-cards {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    padding: 0 12px !important;
  }
  /* 场景分流两列 */
  .hs-scene__grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  /* 定价单列 */
  .pricing-grid {
    grid-template-columns: 1fr !important;
    padding: 0 16px !important;
  }
  /* 信任卡片两列 */
  .ph-trust-cards {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}

/* ══════════════════════════════════════════
   5. 音乐库 / 列表 (≤768px)
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Banner 卡片单列 */
  .pmb-section {
    flex-direction: column !important;
    gap: 10px !important;
    padding: 12px !important;
  }
  .pmb-card {
    min-height: 160px !important;
  }
  .pmb-card__title {
    font-size: 22px !important;
  }

  /* 筛选器: Artlist 内联展开 */
  .pmf-dims {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
    gap: 0 !important;
    padding-bottom: 0 !important;
  }
  .pmf-dims::-webkit-scrollbar { display: none; }
  .pmf-dim {
    flex-shrink: 0 !important;
    position: static !important;
  }
  .pmf-dim__tags {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important; right: 0 !important;
    z-index: 10 !important;
    background: #141414 !important;
    border: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    border-radius: 0 !important;
    padding: 10px 0 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
    pointer-events: all !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  /* 音乐列表行: 简化列 */
  .pml-head, .pml-row {
    grid-template-columns: 40px 1fr 50px 60px !important;
    gap: 8px !important;
    padding: 6px 12px !important;
  }
  /* 隐藏桌面端列: 风格标签、独家、收藏、推荐 */
  .pmlh--genre, .pml-genre,
  .pmlh--excl, .pml-excl,
  .pmlh--like, .pml-like,
  .pmlh--rec, .pml-rec-btn,
  .pmlh--share, .pml-share { display: none !important; }
  /* 波形列隐藏 */
  .pmlh--wave, .pml-wave { display: none !important; }

  /* 曲目卡片简化 */
  .ptk-top {
    grid-template-columns: 40px 1fr auto !important;
    gap: 8px !important;
    padding: 8px 12px !important;
  }
  .ptk-wave-col { display: none !important; }
  .ptk-dl-btn span { display: none !important; }

  /* 采样/音效 chip 横滚 */
  .sfx-cat-chips {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none;
  }
  .sfx-cat-chips::-webkit-scrollbar { display: none; }
}

/* ══════════════════════════════════════════
   6. AI 工作室 (≤768px): 单列堆叠
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  .studio-container {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    height: auto !important;
    overflow: visible !important;
  }
  .studio-sidebar {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    height: auto !important;
    overflow: visible !important;
  }
  .sc-form {
    overflow: visible !important;
    max-height: none !important;
  }
  .studio-main {
    min-height: 300px !important;
    overflow: visible !important;
  }

  /* 生成按钮始终可见 */
  .sc-generate-area {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 20 !important;
  }
}

/* ══════════════════════════════════════════
   7. 私人订制 (≤768px)
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  #page-custom-service .pcs-hero {
    padding: 32px 16px 24px !important;
  }
  #page-custom-service .pcs-hero__title {
    font-size: clamp(20px, 6vw, 32px) !important;
  }
  #page-custom-service .pcs-glass-card {
    margin: 0 12px !important;
    border-radius: 12px !important;
  }
  #page-custom-service .pcs-field-row {
    grid-template-columns: 1fr !important;
  }
  /* 规则卡片单列 */
  #page-custom-service .pcs-rules-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  /* 提交按钮加大 */
  #page-custom-service .pcs-submit-btn {
    height: 52px !important;
  }
}

/* ══════════════════════════════════════════
   8. 弹窗全屏化 (≤768px)
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  /* 下载弹窗 */
  .dlm-panel {
    width: calc(100% - 16px) !important;
    max-width: calc(100% - 16px) !important;
    max-height: calc(94dvh - env(safe-area-inset-bottom, 0px)) !important;
    height: auto !important;
    border-radius: 14px !important;
    margin: 0 8px !important;
  }
  #dlModal {
    padding: 0 !important;
    align-items: center !important;
  }

  /* 独家买断弹窗 */
  .excl-panel {
    width: 100% !important;
    max-width: none !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
  }

  /* 通用弹窗 */
  .mini-modal-panel {
    width: 95% !important;
    max-width: none !important;
    margin: 0 10px !important;
  }
}

/* ══════════════════════════════════════════
   9. 沉浸漫游 (≤768px)
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  #immersive-overlay .imv-stage {
    width: 95vw !important;
  }
  .imv-title {
    font-size: clamp(24px, 8vw, 48px) !important;
  }
  .imv-wf {
    height: 70px !important;
  }
  .imv-play {
    width: 64px !important; height: 64px !important;
  }
  .imv-playlist {
    width: 260px !important;
    right: 0 !important;
    top: 50px !important;
    bottom: 50px !important;
    border-radius: 16px 0 0 16px !important;
  }
  /* 歌单打开不偏移中心内容 */
  #immersive-overlay.has-playlist .imv-stage {
    transform: none !important;
    max-width: 95vw !important;
  }
  .imv-exit {
    top: 16px !important; right: 16px !important;
    padding: 6px 12px !important;
    font-size: 11px !important;
  }
}

/* ══════════════════════════════════════════
   10. 手机 (≤480px): 极小屏优化
   ══════════════════════════════════════════ */
@media (max-width: 480px) {
  /* 顶栏更紧凑 */
  #musicore-topbar {
    height: 48px !important;
    padding: 0 8px !important;
  }
  .topbar-breadcrumb {
    font-size: 14px !important;
  }
  .topbar-credits {
    font-size: 11px !important;
    padding: 4px 8px !important;
  }

  /* 首页 Hero 更小 */
  .ph-title-block {
    font-size: clamp(20px, 6vw, 28px) !important;
  }
  .ph-tabs .ph-tab {
    font-size: 11px !important;
    padding: 5px 10px !important;
  }

  /* Banner 更紧凑 */
  .pmb-card {
    min-height: 130px !important;
  }
  .pmb-card__title {
    font-size: 18px !important;
  }
  .pmb-card__sub {
    font-size: 11px !important;
  }

  /* 列表行更紧凑 */
  .pml-row {
    padding: 5px 8px !important;
  }
  .pml-name {
    font-size: 12px !important;
  }
  .pml-artist {
    font-size: 10px !important;
  }

  /* 工作室内边距 */
  .sc-header {
    padding: 16px 12px 12px !important;
  }
  .sc-field {
    padding: 10px 12px !important;
  }

  /* 弹窗头部紧凑 */
  .dlm-head {
    padding: 12px !important;
  }
  .dlm-cover {
    width: 52px !important; height: 52px !important;
  }

  /* 底部导航更紧凑 */
  .mobile-bottom-nav {
    height: 52px !important;
  }
  .mobile-bottom-nav .mob-tab {
    font-size: 9px !important;
  }

  /* 私人订制 */
  .pcs-hero__title {
    font-size: clamp(18px, 5vw, 26px) !important;
  }
  #page-custom-service .pcs-glass-card {
    margin: 0 8px !important;
  }
}

/* ══════════════════════════════════════════
   11. 安全区域 (iPhone 刘海/底部条)
   ══════════════════════════════════════════ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 768px) {
    .mobile-bottom-nav {
      padding-bottom: env(safe-area-inset-bottom) !important;
      height: calc(56px + env(safe-area-inset-bottom)) !important;
    }
    #musicore-player,
    .player-bar,
    #playerBar {
      bottom: calc(56px + env(safe-area-inset-bottom)) !important;
    }
    #musicore-main {
      padding-bottom: calc(130px + env(safe-area-inset-bottom)) !important;
    }
  }
}

/* ══════════════════════════════════════════
   12. 触摸友好 (≤768px)
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  /* 所有按钮最小触摸面积 44px */
  button, [role="button"], a.btn, .chip, .pmf-tag, .sc-qtag, .sc-lrc-tag {
    min-height: 36px !important;
  }

  /* 禁用 hover 效果（触摸屏不需要） */
  @media (hover: none) {
    .ptk-card:hover,
    .pml-row:hover,
    .studio-card:hover,
    .pmb-card:hover {
      transform: none !important;
      box-shadow: none !important;
    }
  }

  /* 滚动优化 */
  #musicore-main,
  .studio-main,
  .dlm-body-panel,
  .pml-list {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }
}

/* ══════════════════════════════════════════════════════════════
   PERFORMANCE OVERRIDES — 性能终极优化（构建链最后生效）
   ══════════════════════════════════════════════════════════════ */

/* 1. 全局禁用 backdrop-filter（最大的卡顿元凶） */
#dlModal, #exclusiveModal, #actionModal, #miniModal,
#musicore-sidebar, #musicore-topbar, #playerBar, #musicore-player,
.player-bar, .mini-player,
.glass, .glass-dark, .glass-gold,
.dlm-panel, .excl-panel, .mini-modal-panel, .action-modal-panel,
.drm-panel, .ais-panel, .mp-panel,
.sm-bar, .pml-head, .pmb-sticky, .ph-search-wrap,
.studio-sidebar, .sc-generate-area,
.lang-dropdown, .search-suggestions,
.imv-exit, .imv-playlist, .imv-playlist-btn {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* 2. 弹窗遮罩：纯暗色不模糊 */
#dlModal {
  background: rgba(0,0,0,0.78) !important;
  transition: opacity 0.18s ease !important;
}
#exclusiveModal {
  background: rgba(0,0,0,0.78) !important;
  transition: opacity 0.18s ease !important;
}

/* 3. 弹窗面板：GPU加速入场动画 */
.dlm-panel {
  will-change: transform, opacity;
  transform: translateY(12px);
  transition: transform 0.22s cubic-bezier(.16,1,.3,1), opacity 0.18s ease !important;
}
#dlModal.is-open .dlm-panel {
  transform: translateY(0) !important;
  opacity: 1 !important;
}
#dlModal:not(.is-open) .dlm-panel {
  will-change: auto;
}

/* 4. 不活跃页面暂停动画 */
.page-stage:not(.is-active) * {
  animation-play-state: paused !important;
  transition: none !important;
}
#immersive-overlay:not(.is-active) * {
  animation-play-state: paused !important;
}

/* 5. 布局隔离 */
.page-stage { contain: layout style; }
#musicore-sidebar, #musicore-topbar { contain: layout style; }

/* 6. 卡片阴影延迟到 hover */
.ptk-card, .pml-row, .studio-card, .pmb-card {
  box-shadow: none;
}
.ptk-card:hover, .pml-row:hover, .studio-card:hover, .pmb-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* 7. 降低背景光晕模糊 */
.imv-bg__orb, .grid-glow-1, .grid-glow-2, [class*="bg__orb"] {
  filter: blur(35px) !important;
}

/* ══════════════════════════════════════════════════════════════
   封面播放按钮 — hover 可见 + 放大 + 背景暗化
   ══════════════════════════════════════════════════════════════ */

/* ── 1. 所有封面 hover 时显示播放按钮 ── */
.pml-cover-wrap:hover .pml-playbtn,
.ptk-cover-wrap:hover .ptk-play-btn,
.ptk-card:hover .ptk-play-btn,
.studio-card:hover .sm-cover__toggle,
.pmb-playlist .ptk-card:hover .ptk-play-btn {
  opacity: 1 !important;
}

/* ── 2. 播放按钮放大 + 半透明暗底 ── */
.pml-playbtn {
  background: rgba(0,0,0,0.50) !important;
  border-radius: inherit !important;
}
.pml-playbtn svg {
  width: 18px !important;
  height: 18px !important;
}

.ptk-play-btn {
  background: rgba(0,0,0,0.50) !important;
  border-radius: inherit !important;
}
.ptk-play-btn svg {
  width: 20px !important;
  height: 20px !important;
}

.sm-cover__toggle {
  background: rgba(0,0,0,0.50) !important;
  border-radius: inherit !important;
}
.sm-cover__toggle svg {
  width: 18px !important;
  height: 18px !important;
}

/* ── 3. 封面 hover 微缩放提示可交互 ── */
.pml-cover-wrap,
.ptk-cover-wrap,
.sm-cover {
  position: relative !important;
  overflow: hidden !important;
  cursor: pointer !important;
}
.pml-cover-wrap:hover .pml-cover,
.ptk-cover-wrap:hover .ptk-cover,
.sm-cover:hover .sm-cover__art {
  transform: scale(1.05);
  transition: transform 0.2s ease !important;
}

/* ── 4. 播放中状态也保持可见 ── */
.pml-row.is-playing .pml-playbtn,
.ptk-card.is-active .ptk-play-btn,
.studio-card.sm-on .sm-cover__toggle {
  opacity: 1 !important;
}

/* ══════════════════════════════════════════════════════════════
   专辑推荐卡牌 — 横向滚动竖卡
   ══════════════════════════════════════════════════════════════ */
.album-section {
  padding: 20px 24px 12px;
}
.album-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.album-header__title {
  font-size: 16px; font-weight: 800; color: #f0f0f0; margin: 0;
  letter-spacing: 0.02em;
}
.album-header__arrows {
  display: flex; gap: 4px;
}
.album-arrow {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.4); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.album-arrow:hover { background: rgba(255,255,255,0.1); color: #fff; }

.album-scroll {
  display: flex; gap: 14px;
  overflow-x: auto; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none;
  padding-bottom: 10px;
}
.album-scroll::-webkit-scrollbar { display: none; }

/* ── 专辑卡牌 ── */
.album-card {
  flex-shrink: 0; width: 200px; cursor: pointer;
  border-radius: 10px; overflow: hidden;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.2s ease;
}
.album-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.album-card__cover {
  width: 200px; height: 200px; object-fit: cover;
  display: block; background: linear-gradient(135deg, #1a1a1a, #333);
}
.album-card__body {
  padding: 12px;
}
.album-card__name {
  font-size: 13px; font-weight: 700; color: #e8e8e8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0 0 4px;
}
.album-card__count {
  font-size: 11px; color: rgba(255,255,255,0.3);
}

/* ══════════════════════════════════════════════════════════════
   专辑详情弹窗
   ══════════════════════════════════════════════════════════════ */
.album-modal {
  position: fixed; inset: 0; z-index: 100000;
  background: rgba(0,0,0,0.78);
  display: none; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.album-modal.is-open { display: flex; opacity: 1; }

.album-modal__panel {
  width: 90%; max-width: 680px; max-height: 85vh;
  background: #1a1a1a; border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  overflow: hidden; display: flex; flex-direction: column;
  transform: translateY(12px); opacity: 0;
  transition: transform 0.22s cubic-bezier(.16,1,.3,1), opacity 0.18s;
}
.album-modal.is-open .album-modal__panel {
  transform: translateY(0); opacity: 1;
}
.album-modal__close {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.4); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.album-modal__close:hover { background: rgba(255,255,255,0.12); color: #fff; }

.album-modal__head {
  display: flex; gap: 16px; padding: 24px 24px 16px; position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.album-modal__cover {
  width: 120px; height: 120px; border-radius: 10px;
  object-fit: cover; flex-shrink: 0;
  background: linear-gradient(135deg, #1a1a1a, #333);
}
.album-modal__title {
  font-size: 18px; font-weight: 800; color: #f0f0f0;
  margin: 0 0 6px; padding-right: 32px;
}
.album-modal__desc {
  font-size: 12px; color: rgba(255,255,255,0.4);
  line-height: 1.5; margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.album-modal__meta {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.album-modal__meta span {
  font-size: 10px; padding: 2px 8px; border-radius: 4px;
  background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.35);
}

.album-modal__list {
  flex: 1; overflow-y: auto; padding: 8px 0;
}
.album-modal__track {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 24px; cursor: pointer; transition: background 0.12s;
}
.album-modal__track:hover { background: rgba(255,255,255,0.04); }
.album-modal__track-play {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.4); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer;
}
.album-modal__track-play:hover { background: rgba(255,255,255,0.12); color: #fff; }
.album-modal__track-name {
  font-size: 13px; font-weight: 600; color: #e0e0e0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.album-modal__track-artist {
  font-size: 11px; color: rgba(255,255,255,0.3);
  white-space: nowrap; flex-shrink: 0;
}
.album-modal__track-dur {
  font-size: 11px; color: rgba(255,255,255,0.2);
  font-variant-numeric: tabular-nums; flex-shrink: 0; width: 36px; text-align: right;
}

/* ══════════════════════════════════════════════════════════════
   歌词面板
   ══════════════════════════════════════════════════════════════ */
.lyrics-panel {
  position: fixed; right: 16px; bottom: 80px;
  width: 320px; max-height: 400px;
  background: #1a1a1a; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  z-index: 8800; display: flex; flex-direction: column;
  visibility: hidden; pointer-events: none;
  transform: translateY(12px); opacity: 0;
  transition: transform 0.22s cubic-bezier(.16,1,.3,1), opacity 0.18s;
}
.lyrics-panel.is-open {
  visibility: visible; pointer-events: all;
  transform: translateY(0); opacity: 1;
}
.lyrics-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.lyrics-panel__title {
  font-size: 13px; font-weight: 700; color: #e0e0e0;
}
.lyrics-panel__close {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: none;
  color: rgba(255,255,255,0.35); font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lyrics-panel__close:hover { background: rgba(255,255,255,0.12); color: #fff; }

.lyrics-panel__body {
  flex: 1; overflow-y: auto; padding: 12px 16px;
  scrollbar-width: thin;
}
.lyrics-panel__empty {
  text-align: center; color: rgba(255,255,255,0.2);
  font-size: 13px; padding: 40px 0;
}
.lrc-line {
  padding: 4px 0; font-size: 13px; line-height: 1.6;
  color: rgba(255,255,255,0.25); transition: all 0.2s;
  cursor: pointer; border-radius: 4px;
}
.lrc-line:hover { color: rgba(255,255,255,0.5); }
.lrc-line.is-active {
  color: #fff; font-weight: 700; font-size: 14px;
  transform: scale(1.02);
}

/* 移动端歌词面板全宽 */
@media (max-width: 768px) {
  .lyrics-panel {
    right: 0; left: 0; bottom: 120px;
    width: 100%; max-height: 50vh;
    border-radius: 14px 14px 0 0;
  }
  .album-card { width: 160px; }
  .album-card__cover { width: 160px; height: 160px; }
  .album-modal__panel { width: 95%; }
  .album-modal__cover { width: 80px; height: 80px; }
  .album-modal__title { font-size: 15px; }
}

/* ══════════════════════════════════════════════════════════════
   管理后台: 图片上传按钮 (装修面板)
   ══════════════════════════════════════════════════════════════ */
.btn-upload-img {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 6px;
  background: rgba(212,175,55,0.08);
  border: 1px solid rgba(212,175,55,0.2);
  color: #d4af37;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.btn-upload-img:hover {
  background: rgba(212,175,55,0.18);
  border-color: rgba(212,175,55,0.4);
  transform: scale(1.05);
}
.btn-upload-img:disabled {
  opacity: 0.4; cursor: not-allowed;
  transform: none;
}
.btn-upload-img.is-uploading {
  animation: spin-upload 1s linear infinite;
}
@keyframes spin-upload {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 图片预览增强 */
.url-preview {
  max-width: 100% !important;
  max-height: 120px !important;
  border-radius: 8px !important;
  margin-top: 6px !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  display: none;
}
.url-preview.has-src {
  display: block !important;
}

/* 首页 Hero 自定义背景图支持 */
.ph-hero[data-banner-wrap] {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  position: relative !important;
}
/* 背景图上加暗色遮罩保证文字可读 */
.ph-hero.has-banner-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.82) 100%);
  z-index: 0;
  pointer-events: none;
}
.ph-hero.has-banner-bg > * {
  position: relative;
  z-index: 1;
}

/* 装修面板子 Tab */
.decor-tab { display: none; }
.decor-tab.is-active { display: block; }

/* 装修面板: 手风琴折叠 */
.decor-section {
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}
.decor-section-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; cursor: pointer;
  font-size: 13px; font-weight: 700; color: #e0e0e0;
  background: rgba(255,255,255,0.02);
  transition: background 0.15s;
}
.decor-section-head:hover { background: rgba(255,255,255,0.04); }
.decor-section-head .toggle { margin-left: auto; }
.decor-chevron {
  font-size: 12px; color: rgba(255,255,255,0.25);
  margin-left: auto; transition: transform 0.2s;
}
.decor-section-body {
  display: none; padding: 10px 14px;
}
.decor-section-body.is-open { display: block; }
.decor-form-grid {
  display: flex; flex-direction: column; gap: 8px;
}

/* 装修面板: 网格列卡片 */
.decor-col {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  overflow: hidden;
}
.decor-col-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  font-size: 12px; font-weight: 700; color: #ccc;
  border-bottom: 2px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.decor-col-body {
  padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
  max-height: 420px; overflow-y: auto;
  scrollbar-width: thin;
}
.decor-col-body::-webkit-scrollbar { width: 3px; }
.decor-col-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ══════════════════════════════════════════════════════════════
   MOBILE COMPREHENSIVE FIX — 全面移动端适配 V2
   ══════════════════════════════════════════════════════════════ */

/* ── 全局溢出控制 ── */
@media (max-width: 768px) {
  html, body { overflow-x: hidden !important; }
  #musicore-main { overflow-x: hidden !important; width: 100% !important; }

  /* ── 三联广告卡 → 水平滑动轮播 ── */
  .pmb-section {
    overflow: visible !important;
  }
  .pmb-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 0 !important;
    padding: 0 !important;
    scroll-behavior: smooth !important;
  }
  .pmb-grid::-webkit-scrollbar { display: none !important; }
  .pmb-card {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    scroll-snap-align: start !important;
    border-right: none !important;
    height: 220px !important;
    min-height: 220px !important;
    border-radius: 0 !important;
  }
  .pmb-card__inner {
    padding: 14px 16px !important;
  }
  .pmb-card__title {
    font-size: 18px !important;
    line-height: 1.3 !important;
  }
  .pmb-card__sub {
    font-size: 11px !important;
  }
  .pmb-3d-scene { display: none !important; }
  .pmb-card__expand { display: none !important; }

  /* ── 筛选区 ── */
  .pmf-section {
    padding: 12px !important;
    z-index: 500 !important;
    overflow: visible !important;
    position: sticky !important;
  }
  .pmf-topbar {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .pmf-search {
    width: 100% !important;
    order: -1 !important;
  }
  .pmf-row {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
    padding-bottom: 4px !important;
  }
  .pmf-tag {
    flex-shrink: 0 !important;
    font-size: 11px !important;
    padding: 4px 10px !important;
  }
  .pmf-resultbar {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  /* ── 列表行紧凑 ── */
  .pml-section { padding: 0 8px !important; }
  .pml-head {
    display: none !important; /* 隐藏表头 */
  }
  .pml-row {
    grid-template-columns: 36px 1fr auto !important;
    gap: 6px !important;
    padding: 8px !important;
    border-radius: 8px !important;
  }
  .pml-cover { width: 36px !important; height: 36px !important; border-radius: 6px !important; }
  .pml-bpm, .pml-genre, .pml-dur, .pml-col-actions { display: none !important; } /* 隐藏次要列 */
  .pml-name { font-size: 13px !important; }
  .pml-artist { font-size: 11px !important; }

  /* ── 专辑区 ── */
  .album-section { padding: 12px !important; }
  .album-header__title { font-size: 14px !important; }
  .album-card { width: 140px !important; }
  .album-card__cover { width: 140px !important; height: 140px !important; }

  /* ── 首页 Hero ── */
  .ph-hero {
    padding: 24px 16px 16px !important;
    min-height: auto !important;
  }
  .ph-title {
    font-size: clamp(20px, 6vw, 28px) !important;
    line-height: 1.3 !important;
  }
  .ph-subtitle {
    font-size: 12px !important;
  }
  .ph-eyebrow {
    font-size: 10px !important;
  }
  .ph-tabs {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
  .ph-tab {
    font-size: 11px !important;
    padding: 6px 10px !important;
  }
  .ph-ai-sync-tab {
    font-size: 10px !important;
    padding: 5px 8px !important;
  }

  /* ── 首页信任卡片 ── */
  .ph-trust-cards {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 0 12px !important;
  }
  .ph-trust-card {
    padding: 12px !important;
  }
  .ph-trust-card h4 { font-size: 12px !important; }
  .ph-trust-card p { font-size: 10px !important; }

  /* ── 首页合伙人横幅 ── */
  .pm-partner-bar, [class*="partner-bar"], [class*="pm-affiliate"] {
    flex-direction: column !important;
    text-align: center !important;
    padding: 16px !important;
    gap: 10px !important;
  }

  /* ── 定价卡片 ── */
  .pricing-grid, [class*="pricing-card"] {
    flex-direction: column !important;
  }
  .pricing-card, [class*="pm-plan-card"] {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* ── 工作室页面 ── */
  .studio-container {
    flex-direction: column !important;
    gap: 0 !important;
  }
  .studio-sidebar {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    position: relative !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  }
  .studio-main {
    width: 100% !important;
    min-width: 0 !important;
  }
  .studio-card {
    margin: 8px !important;
  }
  .sm-cover { width: 100% !important; aspect-ratio: 1 !important; }

  /* ── 私人订制页面 ── */
  .pcs-form-grid, [class*="pcs-form"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .pcs-hero {
    padding: 20px 16px !important;
    min-height: auto !important;
  }
  .pcs-hero h1, .pcs-title { font-size: 22px !important; }
  .pcs-textarea, .pcs-input, .pcs-select {
    width: 100% !important;
    font-size: 14px !important;
  }

  /* ── 下载弹窗 ── */
  #dlModal .dlm-panel,
  .dlm-panel {
    width: calc(100% - 16px) !important;
    max-width: calc(100% - 16px) !important;
    margin: 0 8px !important;
    max-height: calc(94dvh - env(safe-area-inset-bottom, 0px)) !important;
  }

  /* ── 独家买断弹窗 ── */
  .excl-modal-panel, [class*="excl-modal"] {
    width: 95% !important;
    max-width: none !important;
  }

  /* ── 歌词面板 ── */
  .lyrics-panel {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: 45vh !important;
    border-radius: 14px 14px 0 0 !important;
    bottom: calc(64px + 56px) !important; /* 播放器+底部tab */
  }

  /* ── 用户中心弹窗 ── */
  .uc-panel, [class*="user-center"] {
    width: 95% !important;
    max-width: none !important;
  }

  /* ── 底部安全区 ── */
  .mobile-bottom-nav {
    padding-bottom: env(safe-area-inset-bottom, 0) !important;
  }

  /* ── topbar 隐藏不必要元素 ── */
  #musicore-topbar {
    padding: 0 12px !important;
  }
  .topbar-search { display: none !important; } /* 移动端用页面内搜索 */

  /* ── 首页 section 区域 ── */
  [data-section] {
    padding: 16px 12px !important;
  }
  .section-title {
    font-size: 16px !important;
  }
  .section-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  /* ── PWA 安装提示 ── */
  .pwa-install-banner {
    position: fixed;
    bottom: calc(56px + 64px + 10px + env(safe-area-inset-bottom, 0));
    left: 12px; right: 12px;
    z-index: 9999;
    background: #1a1a1a;
    border: 1px solid rgba(204,255,0,0.2);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    animation: slideUp 0.3s ease;
  }
  @keyframes slideUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
  .pwa-install-banner__icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, #ccff00, #d4af37);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
  }
  .pwa-install-banner__text {
    flex: 1; min-width: 0;
  }
  .pwa-install-banner__text h4 {
    font-size: 13px; font-weight: 700; color: #e0e0e0; margin: 0;
  }
  .pwa-install-banner__text p {
    font-size: 11px; color: rgba(255,255,255,0.4); margin: 2px 0 0;
  }
  .pwa-install-btn {
    padding: 7px 14px; border-radius: 8px;
    background: #ccff00; color: #000; border: none;
    font-size: 12px; font-weight: 700; cursor: pointer;
    white-space: nowrap; flex-shrink: 0;
  }
  .pwa-install-close {
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(255,255,255,0.06); border: none;
    color: rgba(255,255,255,0.3); font-size: 12px; cursor: pointer;
    flex-shrink: 0;
  }
}

/* ── 超小屏（<400px）额外压缩 ── */
@media (max-width: 400px) {
  .pmb-card { min-height: 100px !important; }
  .pmb-card__title { font-size: 14px !important; }
  .ph-title { font-size: 18px !important; }
  .album-card { width: 120px !important; }
  .album-card__cover { width: 120px !important; height: 120px !important; }
  .pml-row { grid-template-columns: 32px 1fr auto !important; }
  .ph-trust-cards { grid-template-columns: 1fr !important; }
}

/* ══════════════════════════════════════════════════════════════
   法律文档弹窗 — Artlist 风格
   ══════════════════════════════════════════════════════════════ */
.legal-modal {
  position: fixed; inset: 0; z-index: 100002;
  background: rgba(0,0,0,0.85);
  display: none; align-items: center; justify-content: center;
}
.legal-modal.is-open { display: flex; }

.legal-panel {
  width: 90%; max-width: 860px; max-height: 90vh;
  background: #111; border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.legal-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.4); font-size: 16px; cursor: pointer;
}
.legal-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

.legal-header {
  padding: 32px 40px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
}
.legal-brand {
  font-size: 24px; font-weight: 800; color: #f0f0f0;
  margin: 0 0 20px; letter-spacing: -0.02em;
}
.legal-tabs {
  display: flex; gap: 0; overflow-x: auto;
  scrollbar-width: none;
}
.legal-tabs::-webkit-scrollbar { display: none; }
.legal-tab {
  padding: 10px 18px; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.4); background: none; border: none;
  cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.legal-tab:hover { color: rgba(255,255,255,0.7); }
.legal-tab.is-active {
  color: #f0f0f0; font-weight: 700;
  border-bottom-color: #ccff00;
}

.legal-body {
  flex: 1; overflow-y: auto; padding: 32px 40px 40px;
  scrollbar-width: thin;
}
.legal-body::-webkit-scrollbar { width: 4px; }
.legal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ── 文档排版 ── */
.legal-body h2 {
  font-size: 20px; font-weight: 800; color: #f0f0f0;
  margin: 0 0 12px; padding-top: 8px;
}
.legal-body h3 {
  font-size: 15px; font-weight: 700; color: #e0e0e0;
  margin: 24px 0 8px;
}
.legal-body p {
  font-size: 14px; color: rgba(255,255,255,0.55);
  line-height: 1.8; margin: 0 0 12px;
}
.legal-body ul {
  padding-left: 20px; margin: 0 0 12px;
}
.legal-body li {
  font-size: 14px; color: rgba(255,255,255,0.55);
  line-height: 1.8; margin-bottom: 4px;
}
.legal-body strong { color: rgba(255,255,255,0.8); }
.legal-body .legal-highlight {
  background: rgba(204,255,0,0.06);
  border-left: 3px solid #ccff00;
  padding: 12px 16px; border-radius: 0 8px 8px 0;
  margin: 16px 0;
}
.legal-body .legal-highlight p { margin: 0; color: rgba(255,255,255,0.6); }

/* ── 授权对比表 ── */
.legal-table {
  width: 100%; border-collapse: collapse; margin: 16px 0;
  font-size: 13px;
}
.legal-table th {
  text-align: left; padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.7); font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.legal-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.5);
}
.legal-table .check { color: #ccff00; font-weight: 700; }
.legal-table .dash { color: rgba(255,255,255,0.15); }

/* ── 下载 PDF 按钮 ── */
.legal-pdf-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  background: rgba(212,175,55,0.08); border: 1px solid rgba(212,175,55,0.2);
  color: #d4af37; font-size: 12px; font-weight: 600;
  cursor: pointer; text-decoration: none; margin-top: 8px;
}
.legal-pdf-btn:hover { background: rgba(212,175,55,0.15); }

/* ── 移动端 ── */
@media (max-width: 768px) {
  .legal-panel { width: 100%; max-width: none; height: 100dvh; max-height: none; border-radius: 0; }
  .legal-header { padding: 20px 16px 0; }
  .legal-brand { font-size: 18px; margin-bottom: 14px; }
  .legal-tab { padding: 8px 12px; font-size: 12px; }
  .legal-body { padding: 20px 16px 30px; }
  .legal-body h2 { font-size: 17px; }
  .legal-body p, .legal-body li { font-size: 13px; }
}

/* ══════════════════════════════════════════════════════════════
   MOBILE FIX V3 — 针对截图反馈的 4 大问题
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ════ 1. 侧边栏：打开时确保全宽+有文字 ════ */
  #musicore-sidebar {
    width: 260px !important;
    min-width: 260px !important;
    background: #141414 !important;
  }
  #musicore-sidebar.is-open .nav-label,
  #musicore-sidebar.is-open .logo-text,
  #musicore-sidebar.is-open .sidebar-footer-btn,
  #musicore-sidebar.is-open .nav-badge {
    display: inline !important;
  }
  #musicore-sidebar.is-open .nav-item {
    justify-content: flex-start !important;
    padding: 10px 18px !important;
    gap: 10px !important;
  }
  #musicore-sidebar.is-open .sidebar-logo {
    justify-content: flex-start !important;
    padding: 18px !important;
  }
  #musicore-sidebar.is-open .sidebar-footer {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    padding: 12px !important;
  }
  #musicore-sidebar .nav-icon {
    width: 20px !important;
    flex-shrink: 0 !important;
  }

  /* ════ 2. 歌曲列表：更紧凑 ════ */
  .pml-section { padding: 0 !important; }

  .pml-row {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid rgba(255,255,255,0.04) !important;
  }
  .pml-cover {
    width: 44px !important; height: 44px !important;
    border-radius: 6px !important; flex-shrink: 0 !important;
  }
  .pml-info {
    flex: 1 !important; min-width: 0 !important;
    display: flex !important; flex-direction: column !important;
  }
  .pml-name {
    font-size: 14px !important; font-weight: 600 !important;
    white-space: nowrap !important; overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .pml-artist {
    font-size: 11px !important;
    color: rgba(255,255,255,0.35) !important;
  }
  /* 隐藏：BPM、时长、标签、推荐按钮 */
  .pml-bpm, .pml-dur, .pml-genre, .pml-tags,
  .pml-col-bpm, .pml-col-dur, .pml-col-genre, .pml-col-tags,
  .pml-head { display: none !important; }

  /* 操作图标区：行内一排小图标 */
  .pml-actions, .pml-col-actions {
    display: flex !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
  }
  .pml-actions button, .pml-col-actions button {
    width: 28px !important; height: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
    font-size: 12px !important;
  }
  /* 「同类推荐」按钮太宽，移动端隐藏文字 */
  .pml-similar-btn span,
  .pml-recommend-text,
  [class*="similar"] .btn-text {
    display: none !important;
  }
  .pml-similar-btn, [class*="recommend-btn"] {
    padding: 4px 8px !important;
    font-size: 11px !important;
    min-width: 0 !important;
  }

  /* ════ 3. 首页 AI 视频配乐区：改竖排 ════ */
  .hs-ai {
    padding: 40px 16px !important;
  }
  .hs-ai__inner {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
  }
  .hs-ai__left {
    width: 100% !important;
    max-width: none !important;
  }
  .hs-ai__title {
    font-size: 24px !important;
    line-height: 1.3 !important;
  }
  .hs-ai__desc {
    font-size: 13px !important;
    line-height: 1.6 !important;
  }
  .hs-ai__steps {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    overflow-x: auto !important;
    padding-bottom: 8px !important;
  }
  .hs-ai__step {
    min-width: 120px !important;
    flex-shrink: 0 !important;
  }
  .hs-ai__step-num {
    font-size: 16px !important;
  }
  .hs-ai__right {
    width: 100% !important;
    max-width: none !important;
  }
  .hs-ai__mockup {
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  .hs-ai__cta {
    width: 100% !important;
    text-align: center !important;
  }

  /* ════ 4. 定价卡：横向滚动 ════ */
  .hs-price {
    padding: 40px 16px !important;
    overflow: visible !important;
  }
  .hs-price__title {
    font-size: 22px !important;
  }
  .hs-price__cards {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: 14px !important;
    padding-bottom: 12px !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .hs-price__cards::-webkit-scrollbar { display: none; }
  .hs-price-card {
    min-width: 260px !important;
    max-width: 280px !important;
    flex-shrink: 0 !important;
    scroll-snap-align: center !important;
  }
  .hs-price-card__num {
    font-size: 42px !important;
  }
  .hs-price-card--pro {
    order: -1 !important; /* 最受欢迎的排最前 */
  }

  /* ════ 5. 首页其他区域 ════ */
  /* 合伙人横幅 */
  .hs-affiliate, [class*="pm-affiliate"], .pm-partner-bar {
    flex-direction: column !important;
    gap: 12px !important;
    padding: 20px 16px !important;
    text-align: center !important;
  }
  .hs-affiliate__stats {
    flex-wrap: wrap !important;
    justify-content: center !important;
  }

  /* 品牌信任条 */
  .hs-brands, .pm-brands, [class*="brand-logo"] {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 16px !important;
  }

  /* 首页各 section padding */
  .hs-new, .hs-recommend, .hs-sfx, .hs-instrumental,
  [class*="home-section"] {
    padding: 24px 12px !important;
  }

  /* section 内横滚卡片 */
  .hs-new__grid, .hs-recommend__grid,
  [class*="section-grid"], [class*="track-grid"] {
    display: flex !important;
    overflow-x: auto !important;
    gap: 10px !important;
    padding-bottom: 8px !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .hs-new__grid::-webkit-scrollbar,
  .hs-recommend__grid::-webkit-scrollbar { display: none; }

  /* 首页 topbar */
  #musicore-topbar {
    height: 48px !important;
    padding: 0 10px !important;
    gap: 6px !important;
  }
  .topbar-page-title {
    font-size: 14px !important;
  }
}

/* ── 超小屏额外修复 ── */
@media (max-width: 400px) {
  .hs-ai__title { font-size: 20px !important; }
  .hs-price-card { min-width: 230px !important; }
  .pml-cover { width: 38px !important; height: 38px !important; }
  .pml-name { font-size: 13px !important; }
}

/* ══════════════════════════════════════════════════════════════
   MOBILE FIX V4 — 正确的 ptk-card 列表 + 播放器修复
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ════ 歌曲卡片：ptk-card 结构 ════ */
  .ptk-card {
    margin: 0 !important;
    border-radius: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.04) !important;
  }
  .ptk-top {
    display: grid !important;
    grid-template-columns: 44px 1fr auto !important;
    grid-template-rows: auto auto !important;
    gap: 4px 10px !important;
    padding: 10px 12px !important;
    align-items: center !important;
  }
  /* 封面：左上 */
  .ptk-cover-wrap {
    width: 44px !important; height: 44px !important;
    min-width: 44px !important;
    grid-row: 1 / 3 !important;
    grid-column: 1 !important;
    align-self: start !important;
  }
  .ptk-cover {
    width: 44px !important; height: 44px !important;
    border-radius: 6px !important;
  }
  /* 标题+艺人：右上 */
  .ptk-info {
    grid-row: 1 !important;
    grid-column: 2 !important;
    min-width: 0 !important;
    gap: 1px !important;
  }
  .ptk-title {
    font-size: 14px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
  }
  .ptk-artist-row { font-size: 11px !important; }
  .ptk-meta-row { display: none !important; }
  .ptk-wave-col { display: none !important; }

  /* 同类推荐：右上角 */
  .ptk-rec-col {
    grid-row: 1 !important;
    grid-column: 3 !important;
    align-self: center !important;
  }
  .ptk-rec-btn {
    font-size: 10px !important;
    padding: 4px 8px !important;
    gap: 3px !important;
  }
  .ptk-rec-btn svg:first-child { display: none !important; }

  /* 操作按钮：第二行，从封面右侧开始 */
  .ptk-actions {
    grid-row: 2 !important;
    grid-column: 2 / 4 !important;
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    width: auto !important;
    padding: 0 !important;
  }
  .ptk-icon-btn {
    width: 28px !important; height: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
  }
  .ptk-icon-btn svg { width: 14px !important; height: 14px !important; }
  .ptk-dl-btn {
    margin-left: auto !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
  }
  .ptk-dl-btn span { display: none !important; }
  .ptk-dsp-toggle { display: none !important; } /* 隐藏变速按钮省空间 */

  .ptk-dsp-panel, .ptk-trim-bar { margin: 0 12px !important; }
  .ptk-rec-drawer { margin: 0 !important; }

  /* ════ 播放器：确保完整显示 ════ */
  html body #musicore-player {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    width: 100% !important;
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    padding: 0 8px !important;
    z-index: 9000 !important;
    display: flex !important;
    overflow: visible !important;
    background: #0e0e0e !important;
    border-top: 1px solid rgba(255,255,255,0.06) !important;
  }
  html body #playerCoverWrap {
    width: 44px !important; height: 44px !important;
    min-width: 44px !important;
    flex-shrink: 0 !important;
  }
  html body #playerTrackName { font-size: 12px !important; }
  html body #playerTrackArtist { font-size: 10px !important; }
  #playerBpm, #playerGenre { display: none !important; }
  #playerWfWrap { min-width: 60px !important; flex: 1 !important; }
  #playerCurrentTime, #playerTotalTime { font-size: 9px !important; width: 24px !important; }
  #playerExclBtn { display: none !important; }
  #playerLyricsBtn { display: none !important; }
  .player-vol-wrap { display: none !important; }

  /* ════ 底部 Tab 最高层级 ════ */
  html body .mobile-bottom-nav,
  html body #mobileBottomNav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    height: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    background: #0a0a0a !important;
    border-top: 1px solid rgba(255,255,255,0.06) !important;
  }

  /* ════ 主内容区底部留空 ════ */
  html body #musicore-main {
    padding-bottom: calc(56px + 56px + env(safe-area-inset-bottom, 0px)) !important;
    bottom: 0 !important;
  }
}

@media (max-width: 400px) {
  .ptk-top { grid-template-columns: 38px 1fr auto !important; gap: 3px 8px !important; }
  .ptk-cover-wrap { width: 38px !important; height: 38px !important; min-width: 38px !important; }
  .ptk-cover { width: 38px !important; height: 38px !important; }
  .ptk-title { font-size: 13px !important; }
  .ptk-icon-btn { width: 26px !important; height: 26px !important; min-width: 26px !important; }
  html body #playerCoverWrap { width: 40px !important; height: 40px !important; min-width: 40px !important; }
}

/* ══════════════════════════════════════════════════════════════
   MOBILE FIX V5 — AI 配乐弹窗
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* 弹窗全屏 */
  .ais-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .ais-panel {
    width: 100% !important;
    max-width: none !important;
    height: 95vh !important;
    max-height: 95vh !important;
    border-radius: 16px 16px 0 0 !important;
  }
  /* 内容竖排 */
  .ais-body {
    flex-direction: column !important;
    overflow-y: auto !important;
  }
  .ais-left {
    flex: none !important;
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    padding: 16px !important;
    min-height: auto !important;
  }
  .ais-right {
    width: 100% !important;
    flex: 1 !important;
    padding: 16px !important;
  }
  /* 标题栏紧凑 */
  .ais-header {
    padding: 12px 16px !important;
  }
  .ais-header__title { font-size: 15px !important; }
  .ais-header__sub { font-size: 11px !important; }
}

/* ══════════════════════════════════════════════════════════════
   MOBILE FINAL OVERRIDE — 播放器+底部导航 终极修复
   放在文件最末尾，确保最高优先级
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* 底部导航栏：固定在屏幕最底部，最高层级 */
  html body nav.mobile-bottom-nav,
  html body nav#mobileBottomNav,
  html body .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 100000 !important;
    height: 56px !important;
    min-height: 56px !important;
    background: #0a0a0a !important;
    border-top: 1px solid rgba(255,255,255,0.08) !important;
    align-items: center !important;
    justify-content: space-around !important;
    padding: 0 4px !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    box-sizing: content-box !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* 播放器：固定在底部导航上方 */
  html body div#musicore-player,
  html body #musicore-player {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    width: 100% !important;
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
    z-index: 99999 !important;
    padding: 0 8px !important;
    background: #0e0e0e !important;
    border-top: 1px solid rgba(255,255,255,0.06) !important;
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* 主内容区：底部留出播放器+导航栏空间 */
  html body main#musicore-main,
  html body #musicore-main {
    bottom: 0 !important;
    padding-bottom: calc(56px + 56px + env(safe-area-inset-bottom, 0px) + 10px) !important;
  }

  /* ── 播放器按钮防重叠 ── */
  /* 隐藏非核心按钮：歌词/独家/收藏/音量条 */
  #playerLyricsBtn,
  #playerExclBtn,
  #playerLikeBtn,
  #muteBtn,
  #volumeTrack { display: none !important; }

  /* 曲目信息区缩窄 */
  #musicore-player > div:nth-child(2) {
    width: 110px !important;
    min-width: 0 !important;
    padding: 0 8px !important;
  }
  #musicore-player #playerTrackName { font-size: 12px !important; }
  #musicore-player #playerTrackArtist { font-size: 10px !important; }

  /* 封面缩小 */
  #playerCoverWrap {
    width: 48px !important;
    height: 48px !important;
  }

  /* 上一首/下一首缩小 */
  #musicore-player button[onclick="ptkPrev()"],
  #musicore-player button[onclick="ptkNext()"] {
    width: 24px !important;
    height: 24px !important;
  }

  /* 右侧操作区：只保留下载按钮 */
  #musicore-player > div:last-child {
    padding-left: 4px !important;
    gap: 4px !important;
  }

  /* ── Hero 轮播指示点 — 缩小 ── */
  .mx-hero__dot {
    width: 6px !important;
    height: 6px !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }
  .mx-hero__dots {
    gap: 5px !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   四库下载弹窗 · safe-area 修复
   解决 iOS 手机底部安全区（Home 键条）遮挡弹窗内容的问题
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  #dlModal {
    padding: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    align-items: center !important;
    justify-content: center !important;
  }
  #dlModal .dlm-panel {
    width: calc(100% - 16px) !important;
    max-width: calc(100% - 16px) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(94dvh - env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 14px !important;
    margin: 0 8px !important;
    overflow-y: auto !important;
  }
  /* 移动端内容区 padding 收紧 */
  #dlModal .dlm-body-panel {
    padding: 14px 14px 16px !important;
  }
  /* 移动端缩减头部内边距 */
  #dlModal .dlm-head {
    padding: 14px 14px 12px !important;
    gap: 12px !important;
  }
  /* 封面缩小，减少空白 */
  #dlModal .dlm-cover {
    width: 52px !important;
    height: 52px !important;
  }
  /* 标题字号适配 */
  #dlModal .dlm-title {
    font-size: 15px !important;
  }

  #actionModal {
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }
  #actionModal .modal-panel {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(90dvh - env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 16px !important;
    margin: 0 8px !important;
    overflow-y: auto !important;
  }
}

/* ══ 下载弹窗内容区移动端紧凑 ══ */
@media (max-width: 768px) {
  #dlModal .dlm-body-panel {
    padding: 14px 14px !important;
  }
  #dlModal .dlm-mode-tabs {
    padding: 0 14px !important;
  }
}
