/* ==========================================================================
   静听 · 汽水音乐风格界面
   白底黑字、大圆角封面、底部迷你播放条 + 全屏播放页
   ========================================================================== */

:root {
  --bg: #ffffff;
  --ink: #111111;
  --ink-2: #3d3d3d;
  --muted: #8b8b8b;
  --line: #ececec;
  --soft: #f5f5f5;
  --soft-2: #fafafa;
  --accent: #c9f45c;
  --accent-deep: #a8e22f;
  --danger: #ff3b5c;
  --radius-lg: 28px;
  --radius: 20px;
  --radius-sm: 14px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

button {
  font-family: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

button:disabled { cursor: default; }

input {
  font-family: inherit;
  color: inherit;
}

.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------------------------------------------------------------- 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + var(--safe-top)) 18px 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--accent);
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-text strong {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.brand-text span {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.ghost-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: var(--soft);
  border: 1px solid var(--line);
}

.avatar-btn {
  height: 34px;
  max-width: 130px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-btn.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* ---------------------------------------------------------------- 内容 */
.content {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 4px 16px calc(120px + var(--safe-bottom));
}

/* 搜索 */
.search-section { margin-top: 6px; }

/* iOS 添加到主屏幕引导 */
.ios-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 10px;
  padding: 11px 12px 11px 14px;
  border-radius: 16px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #3d5a10;
  background: #f2ffd9;
  border: 1px solid #dff3b8;
}

.ios-tip[hidden] { display: none; }

.ios-tip span { flex: 1; }

.ios-tip-close {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  font-size: 11px;
  color: #5d7a2a;
  background: rgba(93, 122, 42, 0.1);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 6px 0 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-bar:focus-within {
  border-color: #d0d0d0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.search-icon {
  display: flex;
  color: var(--muted);
  flex: none;
}

.search-bar input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.search-bar input::placeholder { color: #b4b4b4; }
.search-bar input::-webkit-search-cancel-button { display: none; }

.search-btn {
  flex: none;
  height: 40px;
  padding: 0 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  transition: transform 0.12s ease, background 0.12s ease;
}

.search-btn:active { transform: scale(0.97); background: #000; }

.history-row { margin-top: 12px; }

.history-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.history-list::-webkit-scrollbar { display: none; }

.history-chip {
  flex: none;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-2);
  background: var(--soft);
}

.notice {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #111;
  background: var(--soft);
  animation: notice-in 0.2s ease;
}

.notice.err { background: #fff1f3; color: #b3122f; }
.notice.ok { background: #f2ffd9; color: #3d5a10; }

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

.status-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-left: 4px;
  font-size: 11px;
  color: #ababab;
}

.dot-sep { color: #d5d5d5; }

/* 分段切换 */
.segmented {
  display: flex;
  gap: 4px;
  margin-top: 18px;
  padding: 4px;
  background: var(--soft);
  border-radius: 18px;
}

.seg-btn {
  flex: 1;
  height: 36px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #8a8a8a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.16s ease, color 0.16s ease;
}

.seg-btn.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.seg-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  color: #9a9a9a;
  background: #ececec;
}

.seg-btn.active .seg-count {
  color: var(--ink);
  background: var(--accent);
}

/* 视图标题 */
.view { margin-top: 20px; }

.view-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 0 4px;
}

.view-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.text-btn {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 8px;
  border-radius: 10px;
}

.text-btn:active { background: var(--soft); }

/* ---------------------------------------------------------------- 歌曲列表 */
.track-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  grid-template-areas:
    "cover title time"
    "cover artist time";
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  padding: 7px 10px 7px 7px;
  border-radius: 18px;
  cursor: pointer;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.row:hover { background: var(--soft-2); }
.row:active { background: #f1f1f1; }

.row.playing { background: #f7fbe9; }

.row-cover {
  grid-area: cover;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(145deg, #f4f4f4, #e8e8e8);
  display: grid;
  place-items: center;
  flex: none;
}

.row-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.row-cover.ph {
  font-size: 18px;
  font-weight: 700;
  color: #bdbdbd;
  background: linear-gradient(145deg, #f6f6f6, #e9e9e9);
}

.row.playing .row-cover { box-shadow: 0 0 0 2px var(--accent); }

.row-idx { display: none; }

.row-title {
  grid-area: title;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.row-title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-eq {
  flex: none;
  font-size: 8px;
  letter-spacing: -1px;
  color: #7ec600;
  animation: eq-pulse 0.9s infinite;
}

@keyframes eq-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.badge {
  flex: none;
  height: 17px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 9.5px;
  font-weight: 500;
  line-height: 17px;
  color: #9b9b9b;
  background: #f0f0f0;
}

.row-artist {
  grid-area: artist;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}

.row-time {
  grid-area: time;
  font-size: 11px;
  color: #b3b3b3;
  font-variant-numeric: tabular-nums;
  padding-left: 6px;
}

/* 收藏：专辑封面网格 */
.track-list.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 14px;
}

.grid .row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  position: relative;
}

.grid .row:hover { background: transparent; }
.grid .row:active .row-cover { transform: scale(0.985); }
.grid .row.playing { background: transparent; }

.grid .row-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 20px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
  transition: transform 0.16s ease;
}

.grid .row.playing .row-cover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08), 0 0 0 3px var(--accent);
}

.grid .row-cover.ph { font-size: 32px; }

.grid .row-title {
  display: block;
  padding: 0 2px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
}

.grid .row-title-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}

.grid .row-artist {
  padding: 0 2px;
  font-size: 11.5px;
}

.grid .badge,
.grid .row-time,
.grid .row-idx { display: none; }

.grid .row-eq { display: none; }

.row-del {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 15px;
  line-height: 26px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 2;
}

.row-del:hover { background: rgba(0, 0, 0, 0.65); }

/* 空状态 */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 52px 20px 40px;
  color: var(--muted);
}

.empty-cover {
  width: 84px;
  height: 84px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  font-size: 30px;
  color: #c9c9c9;
  background: var(--soft);
  margin-bottom: 16px;
}

.empty p {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
}

.empty span {
  font-size: 12px;
  line-height: 1.6;
  max-width: 280px;
}

/* ---------------------------------------------------------------- 迷你播放条 */
.mini-player {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + var(--safe-bottom));
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 68px;
  padding: 8px 10px 8px 8px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  animation: mini-in 0.22s ease;
}

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

.mini-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  border-radius: 16px;
}

.mini-cover {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  overflow: hidden;
  background: linear-gradient(145deg, #f3f3f3, #e7e7e7);
  flex: none;
  display: grid;
  place-items: center;
}

.mini-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-ph {
  font-size: 20px;
  color: #b8b8b8;
}

.mini-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mini-title {
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-artist {
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}

.mini-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: background 0.15s ease, transform 0.12s ease;
}

.mini-btn:active { background: var(--soft); transform: scale(0.94); }

.mini-btn .i-pause { display: none; }
.mini-btn.is-playing .i-play { display: none; }
.mini-btn.is-playing .i-pause { display: block; }

.mini-progress {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: #ebebeb;
  overflow: hidden;
}

.mini-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--ink);
  transition: width 0.2s linear;
}

/* ---------------------------------------------------------------- 全屏播放页 */
.player-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: sheet-up 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes sheet-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.sheet-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  height: calc(54px + var(--safe-top));
  padding: var(--safe-top) 10px 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.sheet-head-space { width: 44px; }

.sheet-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
}

.sheet-icon:active { background: var(--soft); }

.sheet-body {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 24px calc(28px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cover-large {
  width: min(76vw, 330px);
  aspect-ratio: 1;
  margin: 6px auto 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(150deg, #f4f4f4, #e6e6e6);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.16);
  display: grid;
  place-items: center;
  flex: none;
}

.cover-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-placeholder {
  color: #c2c2c2;
  display: grid;
  place-items: center;
}

.sheet-meta {
  text-align: center;
  margin-top: 26px;
}

.now-title {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.now-artist {
  margin: 7px 0 0;
  font-size: 13.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-chips {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
  font-size: 10.5px;
  color: #9d9d9d;
}

.meta-chips span {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--soft);
}

.viz-wrap {
  position: relative;
  height: 54px;
  margin-top: 18px;
  display: flex;
  align-items: flex-end;
}

#viz {
  width: 100%;
  height: 54px;
  display: block;
}

.viz-label {
  display: none;
}

.seek-row {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.time {
  font-size: 10.5px;
  color: #a0a0a0;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.seek,
.vol {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--ink) var(--p, 0%), #e6e6e6 var(--p, 0%));
  outline: none;
}

.seek:disabled { opacity: 0.45; }

.seek::-webkit-slider-thumb,
.vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.12s ease;
}

.seek:active::-webkit-slider-thumb,
.vol:active::-webkit-slider-thumb { transform: scale(1.15); }

.seek::-moz-range-thumb,
.vol::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
}

.sheet-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 18px;
  padding: 0 2px;
}

.ctrl {
  min-width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: background 0.15s ease, transform 0.12s ease;
}

.ctrl:active { background: var(--soft); transform: scale(0.95); }

.ctrl-small {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 15px;
  color: #6f6f6f;
}

.ctrl-small small {
  font-size: 9px;
  color: #a3a3a3;
}

.ctrl-main {
  width: 64px;
  height: 64px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.ctrl-main:active { background: #000; }

.ctrl-main .i-pause { display: none; }
.ctrl-main.is-playing .i-play { display: none; }
.ctrl-main.is-playing .i-pause { display: block; }

.ctrl-fav {
  font-size: 24px;
  color: #b5b5b5;
  line-height: 1;
  font-family: var(--font);
}

.ctrl-fav.on { color: var(--danger); }

.volume-row {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 0 6px;
}

.vol-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #7d7d7d;
}

.vol-btn .i-mute { display: none; }
.vol-btn.is-muted .i-vol { display: none; }
.vol-btn.is-muted .i-mute { display: block; }

.vol { height: 3px; }

/* ---------------------------------------------------------------- 自动播放提示 */
.tap-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  padding: 24px;
}

.tap-card {
  width: min(300px, 100%);
  padding: 26px 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.tap-card p {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--ink-2);
}

.tap-card button {
  width: 100%;
  height: 46px;
  border-radius: 23px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
}

/* ---------------------------------------------------------------- 账号弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(4px);
  animation: fade-in 0.16s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: min(360px, 100%);
  border-radius: 24px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  animation: sheet-up 0.2s ease;
}

.modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 0;
  font-size: 15px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  color: #8c8c8c;
  background: var(--soft);
  line-height: 30px;
}

#accountPanel { padding: 18px; }

.account-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: var(--soft-2);
  border: 1px solid var(--line);
}

.account-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #6d6d6d;
  background: #fff;
  border: 1px solid var(--line);
  flex: none;
}

.account-name {
  font-size: 16px;
  font-weight: 700;
}

.account-meta {
  margin-top: 4px;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted);
}

.primary-btn {
  width: 100%;
  height: 46px;
  margin-top: 16px;
  border-radius: 23px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
}

.admin-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.auth-hint {
  margin: 12px 2px 0;
  font-size: 11px;
  line-height: 1.6;
  color: #a0a0a0;
  text-align: center;
}

/* ---------------------------------------------------------------- 桌面放大版 */
@media (min-width: 760px) {
  .topbar { padding: calc(18px + var(--safe-top)) 34px 14px; }

  .content { padding: 6px 34px calc(130px + var(--safe-bottom)); }

  .brand-mark { width: 44px; height: 44px; border-radius: 15px; }
  .brand-text strong { font-size: 21px; }

  .search-bar { height: 58px; border-radius: 29px; padding-left: 20px; }
  .search-bar input { font-size: 16px; }
  .search-btn { height: 44px; border-radius: 22px; padding: 0 26px; }

  .segmented { max-width: 460px; }
  .seg-btn { height: 38px; }

  .view-head h2 { font-size: 21px; }

  .track-list.grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 26px 22px;
  }

  .grid .row-cover { border-radius: 24px; }
  .grid .row-title { font-size: 14px; }

  .mini-player {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(720px, calc(100% - 48px));
    height: 76px;
    padding: 10px 14px 10px 10px;
  }

  .mini-cover { width: 56px; height: 56px; }

  .cover-large { width: min(52vw, 380px); }
  .now-title { font-size: 25px; }
  .sheet-body { padding-top: 18px; }

  .volume-row { display: flex; }
}

@media (min-width: 1080px) {
  .track-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 18px;
  }

  .track-list.grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 30px 24px;
  }
}

/* 矮屏手机：压缩封面，保证控制区可见 */
@media (max-height: 720px) and (max-width: 759px) {
  .cover-large { width: min(58vw, 240px); }
  .sheet-meta { margin-top: 16px; }
  .viz-wrap { height: 40px; margin-top: 10px; }
  #viz { height: 40px; }
  .sheet-controls { margin-top: 10px; }
  .ctrl-main { width: 58px; height: 58px; }
}

/* ==========================================================================
   歌词：播放页滚动区 + 全屏歌词页
   ========================================================================== */

.lyric-panel {
  display: none;
  position: relative;
  height: 152px;
  margin-top: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.lyric-panel::-webkit-scrollbar { display: none; }

.sheet-body.with-lyric .lyric-panel { display: block; }
.sheet-body.with-lyric .viz-wrap { display: none; }
.sheet-body.with-lyric .cover-large {
  width: min(44vw, 168px);
  margin-top: 2px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.14);
}
.sheet-body.with-lyric .sheet-meta { margin-top: 14px; }

.lyric-lines {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 56px 2px;
}

.lyric-line {
  margin: 0;
  text-align: center;
  color: #b8b8b8;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  transition: color 0.18s ease, transform 0.18s ease, font-size 0.18s ease;
  cursor: pointer;
  user-select: none;
}

.lyric-line.on {
  color: var(--ink);
  font-weight: 800;
  font-size: 15.5px;
  transform: scale(1.02);
}

.lyric-tr {
  display: block;
  margin-top: 3px;
  color: #a3a3a3;
  font-size: 12px;
  font-weight: 500;
}

.lyric-line.on .lyric-tr { color: #6f6f6f; }

.lyric-panel.has-lines,
.lyric-page-body.has-lines {
  mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 86%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 15%, #000 86%, transparent);
}

.lyric-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 18px;
  text-align: center;
  background: #fff;
}

.lyric-empty-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.lyric-empty-sub {
  margin: 0;
  max-width: 300px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

.lyric-retry {
  margin-top: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.lyric-retry:active { background: #ececec; }

.lyric-offset {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.sheet-body.with-lyric .lyric-offset { display: flex; }
.lyric-offset.always { display: flex; margin-top: 0; }

.offset-btn {
  min-width: 52px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.offset-btn:active { background: #e8e8e8; }

/* 全屏歌词页 */
.lyric-page {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: #fff;
  animation: sheet-up 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lyric-head {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  height: calc(54px + var(--safe-top));
  padding: var(--safe-top) 10px 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.lyric-page-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 34vh 28px 40vh;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.lyric-page-body::-webkit-scrollbar { display: none; }

#lyricPageLines {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#lyricPageLines .lyric-line {
  font-size: 17px;
  color: #c2c2c2;
  line-height: 1.45;
}

#lyricPageLines .lyric-line.on {
  font-size: 20px;
  color: var(--ink);
  font-weight: 800;
  transform: none;
}

#lyricPageLines .lyric-tr { font-size: 13.5px; margin-top: 4px; }
#lyricPageLines .lyric-line.on .lyric-tr { color: #6a6a6a; }

.lyric-empty-full {
  position: static;
  min-height: 44vh;
  background: transparent;
}

.lyric-empty-full .lyric-empty-title { font-size: 17px; }
.lyric-empty-full .lyric-empty-sub { font-size: 12.5px; }

.lyric-page-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 24px calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.lyric-page-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.lyric-page-meta strong {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lyric-page-meta span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 760px) {
  .lyric-page-body { padding-left: max(28px, calc(50vw - 380px)); padding-right: max(28px, calc(50vw - 380px)); }
  .lyric-page-foot { padding-left: max(24px, calc(50vw - 380px)); padding-right: max(24px, calc(50vw - 380px)); align-items: center; }
  .lyric-page-meta { justify-content: center; }
  .sheet-body.with-lyric .cover-large { width: min(32vw, 250px); }
}

@media (max-height: 720px) and (max-width: 759px) {
  .sheet-body.with-lyric .cover-large { width: min(38vw, 140px); }
  .lyric-panel { height: 132px; }
  #lyricPageLines .lyric-line { font-size: 16px; }
  #lyricPageLines .lyric-line.on { font-size: 18px; }
}
