/* 底部导航 + 左侧「分类模式」抽屉
   底部五个口：首页 / 分类 / 搜索 / 我的 / 设置；分类从左边滑出一块面板，
   像汽水音乐的听歌模式那样一格一格点。整段只在 body.has-bottom-nav 下生效。 */
/* 播放条整条去掉了：播放/暂停到歌曲的播放页里按，底部有「随机聆听」 */
#mini-player { display: none !important; }
body.has-bottom-nav { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
body.has-bottom-nav #angel { bottom: calc(74px + env(safe-area-inset-bottom)); }
body.has-bottom-nav #to-top { bottom: calc(74px + env(safe-area-inset-bottom)); }
body.has-bottom-nav #mini-hint { bottom: calc(80px + env(safe-area-inset-bottom)); }

#bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 33;
  display: grid; grid-template-columns: 1fr 1fr 1.15fr 1fr 1fr;
  padding: 6px max(4px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
  background: #ffffffee; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid #d8ecf9; box-shadow: 0 -6px 22px #599ac422;
}
body.player-open #bottom-nav, body.module-open #bottom-nav { display: none; }
#bottom-nav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 0; padding: 4px 0 2px; border: 0; background: none; box-shadow: none;
  color: #6d8ea5; font-size: 12px; font-weight: 700; line-height: 1;
  -webkit-tap-highlight-color: transparent; transition: color .15s;
}
#bottom-nav button svg { display: block; width: 25px; height: 25px; }
#bottom-nav button.on { color: #2b76ab; }
#bottom-nav button.on svg { stroke: #2b76ab; }
#bottom-nav button:active { transform: scale(.94); }

/* ---------------- 左侧分类模式抽屉 ---------------- */
#drawer-mask {
  position: fixed; inset: 0; z-index: 36; background: #14384d4d;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .22s;
}
#drawer-mask.show { opacity: 1; }
#drawer-mask[hidden] { display: none; }

#tag-drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 37;
  width: min(330px, 86vw); display: flex; flex-direction: column;
  background: linear-gradient(180deg, #e4f3ff, #f7fbff 40%);
  box-shadow: 10px 0 36px #2d7ca538;
  transform: translateX(-102%); transition: transform .26s cubic-bezier(.22,.8,.3,1);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(16px + env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}
#tag-drawer[hidden] { display: none; }
#tag-drawer.show { transform: translateX(0); }

#tag-drawer .dr-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
#tag-drawer .dr-head div { flex: 1; min-width: 0; }
#tag-drawer .dr-head strong { display: block; font-size: 21px; color: #17577e; }
#tag-drawer .dr-head small { display: block; margin-top: 3px; color: #6d8ea5; font-size: 12.5px; line-height: 1.5; }
#tag-drawer .dr-close {
  width: 32px; height: 32px; min-width: 32px; padding: 0; border: 0; border-radius: 50%;
  background: #ffffffcc; color: #6d8ea5; font-size: 19px; line-height: 1; box-shadow: none;
}

#tag-drawer .dr-quick { display: grid; gap: 8px; margin-bottom: 14px; }
#tag-drawer .dr-quick button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 14px; border: 0; border-radius: 16px;
  background: #ffffffe6; box-shadow: 0 4px 14px #4a9ad822;
  color: #1f6690; font-size: 15px; font-weight: 700; text-align: left;
}
#tag-drawer .dr-quick button i { color: #6d8ea5; font-size: 12.5px; font-weight: 400; font-style: normal; margin-left: auto; }
#tag-drawer .dr-quick button svg { width: 21px; height: 21px; flex: none; }
#tag-drawer .dr-quick button.on { background: linear-gradient(135deg, #39a9e4, #2f8fdd); color: #fff; box-shadow: 0 8px 20px #2f8fdd4d; }
#tag-drawer .dr-quick button.on i { color: #ffffffcc; }

#tag-drawer .dr-title { margin: 2px 2px 8px; color: #6d8ea5; font-size: 12.5px; }
#tag-drawer .dr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#tag-drawer .dr-grid button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-width: 0; padding: 14px 4px 11px; border: 0; border-radius: 18px;
  background: #ffffffe6; box-shadow: 0 4px 14px #4a9ad81f;
  color: #1f6690; font-size: 12.5px; font-weight: 700; line-height: 1.25; text-align: center;
}
#tag-drawer .dr-grid button svg { width: 24px; height: 24px; }
#tag-drawer .dr-grid button b { font-weight: 700; }
#tag-drawer .dr-grid button em { font-style: normal; font-weight: 400; font-size: 11px; color: #7f9db0; }
#tag-drawer .dr-grid button.on { background: linear-gradient(135deg, #39a9e4, #2f8fdd); color: #fff; box-shadow: 0 8px 20px #2f8fdd4d; }
#tag-drawer .dr-grid button.on em { color: #ffffffcc; }
#tag-drawer .dr-grid button:disabled { opacity: .45; }
#tag-drawer .dr-grid button:active, #tag-drawer .dr-quick button:active { transform: scale(.96); }
#tag-drawer .dr-foot { margin: 16px 2px 0; color: #7f9db0; font-size: 12px; line-height: 1.6; }

@media (max-height: 640px) {
  #tag-drawer .dr-grid button { padding: 10px 4px 8px; }
  #tag-drawer .dr-quick button { padding: 9px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  #tag-drawer { transition: none; }
  #drawer-mask { transition: none; }
}

/* 中间的随机播放做成首页那种药丸按钮（♪ + 文字） */
#bottom-nav button[data-nav="shuffle"] {
  flex-direction: row; gap: 4px; align-self: center;
  margin: 0 4px; padding: 8px 4px; border-radius: 999px;
  background: linear-gradient(180deg, #62c0f0, #2f8fdd);
  color: #fff; box-shadow: 0 6px 16px #2f8fdd4d;
}
#bottom-nav button[data-nav="shuffle"] svg { width: 15px; height: 15px; stroke: #fff; flex: none; }
#bottom-nav button[data-nav="shuffle"] span { font-size: 11.5px; white-space: nowrap; }
#bottom-nav button[data-nav="shuffle"].on { color: #fff; }
#bottom-nav button[data-nav="shuffle"].on svg { stroke: #fff; }
@media (max-width: 360px) {
  #bottom-nav button[data-nav="shuffle"] { padding: 9px 3px; gap: 3px; }
  #bottom-nav button[data-nav="shuffle"] span { font-size: 11.5px; }
}

/* 首页横幅上的「随机聆听」已经搬到底部那一排了 */
#shuffle-listen { display: none !important; }

/* 搜索栏右边的「分类」入口 */
.toolbar #open-tags {
  flex: none; margin-left: 10px; padding: 7px 12px; border: 0; border-radius: 13px;
  background: #e6f3fd; color: #2b76ab; font-size: 13.5px; font-weight: 700;
  box-shadow: none; white-space: nowrap;
}
.toolbar #open-tags:active { transform: scale(.95); }

/* 抽屉最下面的「歌单分享 / 使用手册」 */
#tag-drawer .dr-more { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#tag-drawer .dr-more button {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 0; padding: 12px 6px; border: 0; border-radius: 16px;
  background: #ffffffe6; box-shadow: 0 4px 14px #4a9ad822;
  color: #1f6690; font-size: 13.5px; font-weight: 700;
}
#tag-drawer .dr-more button svg { width: 19px; height: 19px; flex: none; }
#tag-drawer .dr-more button:active { transform: scale(.96); }

/* 首页只留一行状态文字；下载三件套搬进了「设置」 */
.offline-status { margin: 2px 0 10px; text-align: center; color: #6d8ea5; font-size: 13px; line-height: 1.5; }
.offline-status span { display: inline-block; }
#settings-sheet .offline-buttons { display: grid; gap: 8px; margin-bottom: 8px; }
#settings-sheet .offline-buttons button {
  width: 100%; min-height: 44px; padding: 9px 12px; border: 0; border-radius: 14px;
  background: linear-gradient(135deg, #5bb8ee, #2f8fdd); color: #fff;
  font-size: 15px; font-weight: 700; box-shadow: 0 6px 16px #2f8fdd3a;
}
#settings-sheet .offline-buttons button:active { transform: scale(.98); }
/* 「边听边下载」开着的时候还是绿色（style.css 里那条被这里的选择器盖住了） */
#settings-sheet .offline-buttons #auto-download.on {
  background: linear-gradient(135deg, #7bd696, #3fb15c); box-shadow: 0 6px 16px #3fb15c4d;
}

/* 轻提示（原来在 float.css 里，播放条去掉后搬过来） */
#mini-hint {
  position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom));
  z-index: 40; transform: translateX(-50%);
  max-width: 80vw; padding: 9px 16px; border-radius: 22px;
  background: #1f5f88ee; color: #fff; font-size: 13.5px; line-height: 1.5;
  box-shadow: 0 8px 22px #2d7ca555; pointer-events: none;
}
#mini-hint[hidden] { display: none; }

/* ---------------- 横幅下面那条播放控制 ---------------- */
#home-bar {
  display: flex; align-items: center; gap: 6px;
  margin: 0 0 8px; padding: 5px 12px;
  border-radius: 999px; background: #ffffffcc; backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px #4a9ad826;
}
#home-bar[hidden] { display: none; }
#home-bar button {
  flex: none; display: grid; place-items: center;
  width: 28px; height: 28px; min-width: 28px; padding: 0;
  border: 0; border-radius: 9px; background: none; box-shadow: none; color: #2b76ab;
}
#home-bar button[data-p="play"] { width: 31px; height: 31px; color: #1f78b4; }
#home-bar button svg { width: 18px; height: 18px; }
#home-bar button[data-p="play"] svg { width: 22px; height: 22px; }
#home-bar button:active { background: #eaf5fd; }
#home-bar .hb-name {
  flex: 1; min-width: 0; margin-left: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink); font-size: 13.5px; font-weight: 700;
}
#home-bar .hb-time { flex: none; color: #6c879a; font-size: 11.5px; font-variant-numeric: tabular-nums; }

/* ---------------- 佳音AI助手：从悬浮改成搜索栏里的小头像 ---------------- */
body.angel-in-bar #angel { display: none !important; }
.toolbar #angel-mini {
  flex: none; width: 31px; height: 31px; min-width: 31px; margin-left: 8px;
  padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: none;
  overflow: hidden; line-height: 0;
}
.toolbar #angel-mini img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #7cc4f5;
}
.toolbar #angel-mini:active { transform: scale(.93); }
.toolbar #open-tags { margin-left: 8px; padding: 7px 10px; }
@media (max-width: 380px) {
  .toolbar { padding: 0 12px; }
  .toolbar #open-tags { padding: 7px 8px; font-size: 13px; }
  .toolbar span { margin-left: 8px; padding-left: 8px; font-size: 13px; }
}

/* 抽屉「更多」变三个，带头像的那个 */
#tag-drawer .dr-more { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#tag-drawer .dr-more button { flex-direction: column; gap: 6px; padding: 12px 4px; font-size: 12.5px; }
#tag-drawer .dr-more .dr-ai img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }

/* 「分类」按钮带上格子图标 */
.toolbar #open-tags { display: inline-flex; align-items: center; gap: 5px; }
.toolbar #open-tags svg { width: 15px; height: 15px; stroke: currentColor; flex: none; }

/* 号段快捷条去掉了 */
#jump { display: none !important; }
/* 播放条顶上的提示行：正常播放时不再占一行 */
body.hide-status .offline-status { display: none; }
