/* ==========================================================================
   声屿 Audio Station · 移动端优先样式（单一音频模型）
   断点：<768 手机（单列 + 底部 Tab）| 768-1199 平板 | >=1200 桌面（顶栏导航）
   ========================================================================== */

:root {
  --brand: #ff5c38;
  --brand-dark: #e8431f;
  --brand-soft: #fff1ed;
  --ink-1: #1a1a1a;
  --ink-2: #4a4a4a;
  --ink-3: #8c8c8c;
  --ink-4: #bfbfbf;
  --line: #eeeeee;
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --chip: #f2f3f5;
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 18px;
  --tab-h: 52px;
  --mini-h: 60px;
  --page-max: 640px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg-soft); color: var(--ink-1);
  font: 400 15px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  overscroll-behavior-y: none;
}
body { -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

.app { position: relative; min-height: 100%; max-width: var(--page-max); margin: 0 auto; background: var(--bg); }

/* ---------- 顶栏 ---------- */
.app-header { position: sticky; top: 0; z-index: 60; background: var(--bg); border-bottom: 1px solid var(--line); padding-top: var(--safe-t); }
.hd-inner { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 14px; }
.hd-logo { display: none; font-size: 18px; font-weight: 600; letter-spacing: 1px; color: var(--brand); }
.hd-logo img { width: 22px; height: 22px; border-radius: 6px; margin-right: 6px; vertical-align: -4px; object-fit: contain; }
.hd-nav { display: none; gap: 22px; font-size: 15px; color: var(--ink-2); }
.hd-nav button.is-active { color: var(--brand); font-weight: 500; }
.hd-search { flex: 1; }
.search-box { position: relative; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--chip); color: var(--ink-3); font-size: 14px; }
.search-box .ico-search { width: 15px; height: 15px; flex: none; }
.search-box input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 14px; }
.search-box .clear-btn { display: none; color: var(--ink-4); font-size: 16px; line-height: 1; padding: 4px; }
.search-box.has-value .clear-btn { display: block; }
.hd-back { display: none; font-size: 22px; line-height: 1; color: var(--ink-1); padding-right: 4px; }
.app-header.is-sub .hd-back { display: block; }
.app-header.is-sub .hd-logo, .app-header.is-sub .hd-nav { display: none; }

/* ---------- 视图 ---------- */
.view-root { min-height: calc(100vh - 104px); padding-bottom: calc(var(--tab-h) + var(--safe-b) + 16px); }
.view-root.has-player { padding-bottom: calc(var(--tab-h) + var(--mini-h) + var(--safe-b) + 16px); }
/* ---------- 站点尾部（后台「站点设置」自定义内容） ---------- */
.site-footer {
  padding: 14px 16px calc(var(--tab-h) + var(--safe-b) + 24px);
  color: var(--ink-3); font-size: 12px; line-height: 1.8; text-align: center;
  border-top: 1px solid var(--line); background: var(--bg-soft);
}
.site-footer[hidden] { display: none; }
.site-footer a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.site-footer img { display: inline-block; max-height: 40px; vertical-align: middle; }
/* 尾部内容出现后，底部留白由尾部自身承担（它已经算进了 tab-bar 的高度），
   否则 .view-root 的 padding 会在这块之后再垫一次，中间空出一大截。 */
.app.has-footer .view-root { padding-bottom: 20px; }
.app.has-footer .view-root.has-player { padding-bottom: calc(var(--mini-h) + 20px); }

.page { padding: 14px 14px 4px; animation: fade-in .18s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 12px; }
.sec-title { font-size: 17px; font-weight: 600; margin: 0; }
.sec-more {
  font-size: 13px; color: var(--ink-3);
  font-family: inherit; background: none; border: 0; padding: 2px 0; cursor: pointer;
}
.sec-more:active { opacity: .6; }
.empty { padding: 60px 0; text-align: center; color: var(--ink-3); font-size: 14px; }
.empty .big { font-size: 34px; opacity: .35; margin-bottom: 10px; }

/* ---------- Banner / 欢迎位 ---------- */
.banner { position: relative; height: 150px; border-radius: var(--radius-m); overflow: hidden; background: var(--chip); }
.banner-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .4s ease; }
.banner-slide.is-on { opacity: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-dots { position: absolute; right: 12px; bottom: 10px; display: flex; gap: 5px; }
.banner-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); transition: width .25s; }
.banner-dots i.is-on { width: 16px; border-radius: 3px; background: #fff; }
.welcome {
  height: 130px; border-radius: var(--radius-m); padding: 0 22px;
  display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(120deg, #ff8a5c, #ff5c38 55%, #e8431f); color: #fff;
}
.welcome h2 { margin: 0 0 6px; font-size: 24px; font-weight: 600; letter-spacing: 2px; }
.welcome p { margin: 0; font-size: 13px; opacity: .92; }

/* ---------- 继续收听 ---------- */
.continue-list { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.continue-list::-webkit-scrollbar { display: none; }
.continue-item { flex: 0 0 96px; scroll-snap-align: start; }
.continue-item img { width: 96px; height: 96px; border-radius: var(--radius-m); object-fit: cover; }
.continue-item span {
  display: block; margin-top: 6px; font-size: 12px; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- 公告横幅 / 消息中心 ---------- */
.news-bar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  padding: 9px 12px; border-radius: var(--radius-m);
  background: var(--brand-soft); color: var(--brand); font-size: 13px;
}
.news-bar.is-warn { background: #fff7e6; color: #a35b00; }
.news-bar.is-urgent { background: #ffeceb; color: #a32d2d; }
.news-bar .tag { flex: none; padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, .7); font-size: 11px; }
.news-bar .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.news-bar .x { flex: none; border: 0; background: none; font-size: 16px; line-height: 1; color: inherit; opacity: .6; }
.news-item { padding: 14px 14px; margin-bottom: 10px; border-radius: var(--radius-m); background: var(--bg-soft); }
.news-item.is-urgent { background: #ffeceb; }
.news-item.is-warn { background: #fff7e6; }
.news-head { display: flex; align-items: center; gap: 8px; }
.news-head h3 { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.4; }
.news-tag { flex: none; padding: 1px 6px; border-radius: 4px; background: var(--chip); font-size: 11px; color: var(--ink-3); }
.news-item p { margin: 8px 0 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); white-space: pre-line; }
.news-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.news-foot a { color: var(--brand); }

/* ---------- 搜索联想下拉 ---------- */
.suggest-pop {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
  max-height: 60vh; overflow: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
  padding: 4px;
}
.sg-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: var(--radius-s);
  background: none; font-family: inherit; font-size: 14px; color: var(--ink); text-align: left;
}
.sg-item:active { background: var(--chip); }
.sg-tag {
  flex: none; padding: 1px 6px; border-radius: 4px;
  background: var(--chip); color: var(--ink-3); font-size: 11px;
}
.sg-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-title em { color: var(--brand); font-style: normal; }

/* ---------- 骨架屏 / 状态卡 ---------- */
.sk { background: var(--chip); border-radius: 6px; animation: sk-pulse 1.3s ease-in-out infinite; }
.sk-wrap { padding: 2px 0; }
.sk-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sk-cover { width: 56px; height: 56px; flex: none; border-radius: 8px; }
.sk-cover-big { width: 100%; aspect-ratio: 1 / 1; border-radius: var(--radius-m); }
.sk-body { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.sk-line { height: 12px; }
.sk-banner { height: 130px; border-radius: var(--radius-m); }
.sk-hero { height: 132px; border-radius: 0; margin: -14px -14px 4px; }
.sk-wrap.is-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
.sk-card { display: flex; flex-direction: column; gap: 8px; }
@keyframes sk-pulse { 0%, 100% { opacity: .5; } 50% { opacity: .95; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; opacity: .7; } }

.state-box { padding: 44px 16px; text-align: center; color: var(--ink-3); font-size: 14px; }
.state-box .big { font-size: 30px; opacity: .4; margin-bottom: 10px; }
.state-box p { margin: 0 0 14px; }
.btn-ghost {
  padding: 8px 20px; border: 1px solid var(--line); border-radius: 999px;
  background: none; color: var(--ink-2); font-family: inherit; font-size: 13px; cursor: pointer;
}
.btn-ghost:active { opacity: .6; }

/* ---------- 排序切换 ---------- */
.sort-tab { display: flex; gap: 6px; }
.sort-tab span { padding: 4px 12px; border-radius: 999px; background: var(--chip); font-size: 13px; color: var(--ink-2); }
.sort-tab span.is-on { background: var(--brand); color: #fff; }

/* ---------- 专辑卡片（首页横向 / 全部专辑网格） ---------- */
/* 首页热门专辑：只铺一行，列数由 JS 按屏宽自适应 */
.album-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.album-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.album-scroll::-webkit-scrollbar { display: none; }
.album-scroll .album-card { flex: 0 0 108px; }
.album-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
.album-card .cover { width: 100%; aspect-ratio: 1 / 1; border-radius: var(--radius-m); overflow: hidden; background: var(--chip); }
.album-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.album-card h4 {
  margin: 7px 0 3px; font-size: 13px; font-weight: 500; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.album-card p { margin: 0; font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pager-simple { margin-top: 6px; }

/* ---------- 专辑详情 ---------- */
.album-hero { display: flex; gap: 14px; padding: 16px 14px; background: linear-gradient(180deg, var(--brand-soft), var(--bg)); }
.album-hero .cover { width: 108px; height: 108px; flex: none; border-radius: var(--radius-m); overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.album-hero .cover img { width: 100%; height: 100%; object-fit: cover; }
.album-hero .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.album-hero h1 { margin: 0 0 8px; font-size: 19px; font-weight: 600; line-height: 1.3; }
.album-hero .line { font-size: 13px; color: var(--ink-3); margin-bottom: 4px; }
.album-actions { display: flex; gap: 10px; padding: 0 14px 14px; flex-wrap: wrap; }
.btn { display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; border: 1px solid var(--line); background: var(--bg); }
.btn-primary { flex: 1; background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }
.btn-share { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.btn:active { opacity: .82; }
.summary-box { padding: 0 14px 14px; }
.summary-text { font-size: 13px; line-height: 1.7; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.summary-text.is-open { -webkit-line-clamp: unset; }
.summary-toggle { margin-top: 6px; font-size: 13px; color: var(--brand); }

/* ---------- 音频列表 ---------- */
.track-list { display: flex; flex-direction: column; }
.track-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.track-row:last-child { border-bottom: 0; }
.track-row .cover { width: 56px; height: 56px; border-radius: var(--radius-s); overflow: hidden; flex: none; background: var(--chip); }
.track-row .cover img { width: 100%; height: 100%; object-fit: cover; }
.track-row .body { flex: 1; min-width: 0; }
.track-row .body h4 { margin: 0 0 5px; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-row .body .sub { margin: 0 0 6px; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-row .body .meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); }
.track-row .body .meta .bar { width: 56px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.track-row .body .meta .bar i { display: block; height: 100%; background: var(--brand); }
.track-row .play-ico { flex: none; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); color: var(--ink-3); font-size: 12px; }
.track-row:active { background: var(--bg-soft); }

.ad-inline { display: block; margin: 14px 0; border-radius: var(--radius-m); overflow: hidden; }
.ad-inline img { width: 100%; height: 96px; object-fit: cover; }

.load-more { margin: 18px 0 8px; text-align: center; padding: 12px; border-radius: var(--radius-s); background: var(--chip); color: var(--ink-2); font-size: 14px; }
.load-end { margin: 18px 0 8px; text-align: center; font-size: 12px; color: var(--ink-4); }
/* 「更多」入口按钮：跳到对应列表页 */
.more-btn {
  display: block; width: 100%; margin: 18px 0 8px; padding: 12px;
  font-family: inherit; font-size: 14px;
  border: 0; border-radius: var(--radius-s);
  background: var(--chip); color: var(--ink-2); cursor: pointer;
}
.more-btn:active { background: var(--chip-2, var(--chip)); opacity: .75; }

/* ---------- 搜索 ---------- */
.search-page { padding: 12px 14px; }
.hot-list, .hist-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hot-list span, .hist-list span { padding: 6px 12px; border-radius: 999px; background: var(--chip); font-size: 13px; color: var(--ink-2); }
.hot-list span.top { background: var(--brand-soft); color: var(--brand); }
.ph { padding: 10px 2px; font-size: 13px; color: var(--ink-3); }
.empty .sub { margin-top: 6px; font-size: 12px; color: var(--ink-4); }
.hist-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 10px; }
.hist-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.hist-head .clr { font-size: 13px; color: var(--ink-3); }
mark { background: transparent; color: var(--brand); }

/* ---------- 全屏播放页 ---------- */
.player-page {
  position: fixed; inset: 0; z-index: 200;
  background: linear-gradient(180deg, #ffb199 0%, #ff7a54 40%, #2b2b33 100%);
  display: flex; flex-direction: column; color: #fff;
  transform: translateY(100%); transition: transform .28s cubic-bezier(.32,.72,0,1);
}
.player-page.is-open { transform: none; }
.player-page:not(.is-open) { pointer-events: none; }
.pp-top { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-t) + 12px) 18px 8px; }
.pp-top .down { font-size: 22px; line-height: 1; }
.pp-top .title { flex: 1; text-align: center; font-size: 14px; opacity: .92; }
.pp-top .title small { display: block; font-size: 12px; opacity: .7; margin-top: 2px; }
.pp-top .share { font-size: 15px; opacity: .95; }
.pp-cover { flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px 32px; min-height: 0; }
.pp-cover img { width: 100%; max-width: 250px; aspect-ratio: 1/1; border-radius: 22px; box-shadow: 0 18px 40px rgba(0,0,0,.35); object-fit: cover; }
.pp-lyric { text-align: center; font-size: 13px; opacity: .8; margin: 0 24px 4px; }
.pp-summary {
  margin: 0 26px 10px; font-size: 12px; line-height: 1.6; opacity: .85; text-align: center;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pp-ad { margin: 0 26px 8px; border-radius: var(--radius-m); overflow: hidden; }
.pp-ad img { width: 100%; height: 64px; object-fit: cover; }
.pp-ctrl { padding: 0 22px calc(var(--safe-b) + 18px); }
.pp-progress { padding: 0 0 10px; }
.pp-progress .track { position: relative; height: 22px; display: flex; align-items: center; touch-action: none; cursor: pointer; }
.pp-progress .rail { width: 100%; height: 4px; border-radius: 2px; background: rgba(255,255,255,.32); position: relative; }
.pp-progress .fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 2px; background: #fff; }
.pp-progress .knob { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.3); }
.pp-progress .times { display: flex; justify-content: space-between; font-size: 12px; opacity: .85; margin-top: 2px; }
.pp-btns { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 18px; }
.pp-btns .b { font-size: 24px; opacity: .92; width: 44px; text-align: center; }
.pp-btns .b:active { opacity: .6; }
.pp-btns .main { width: 62px; height: 62px; border-radius: 50%; background: #fff; color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: 0 6px 18px rgba(0,0,0,.22); }
.pp-extra { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; font-size: 13px; opacity: .9; }
.pp-extra .pill { padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.18); }

/* ---------- 迷你播放器 ---------- */
.mini-player[hidden] { display: none; }
.mini-player {
  position: fixed; left: 0; right: 0; z-index: 80;
  bottom: calc(var(--tab-h) + var(--safe-b));
  max-width: var(--page-max); margin: 0 auto; height: var(--mini-h);
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: #fff; border-top: 1px solid var(--line);
}
.mini-player .cover { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; flex: none; }
.mini-player .cover img { width: 100%; height: 100%; object-fit: cover; }
.mini-player .info { flex: 1; min-width: 0; }
.mini-player .info .t { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-player .info .s { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.mini-player .ctrls { display: flex; align-items: center; gap: 14px; flex: none; }
.mini-player .ctrls .p { font-size: 26px; color: var(--brand); }
.mini-player .ctrls .list { font-size: 18px; color: var(--ink-2); }

/* ---------- 底部 Tab ---------- */
.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  max-width: var(--page-max); margin: 0 auto;
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; background: #fff; border-top: 1px solid var(--line);
}
.tab-bar .tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--ink-3); }
.tab-bar .tab .ico { font-size: 20px; line-height: 1; }
.tab-bar .tab.is-on { color: var(--brand); }

/* ---------- 我的 ---------- */
.mine-head { display: flex; align-items: center; gap: 14px; padding: 22px 14px 18px; background: linear-gradient(135deg, var(--brand-soft), #fff); }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 500; flex: none; }
.mine-head .who h2 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.mine-head .who p { margin: 0; font-size: 12px; color: var(--ink-3); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-row div { padding: 14px 0; text-align: center; border-right: 1px solid var(--line); }
.stat-row div:last-child { border-right: 0; }
.stat-row b { display: block; font-size: 18px; font-weight: 600; }
.stat-row span { font-size: 12px; color: var(--ink-3); }
.mine-list { margin-top: 12px; }
.mine-row { display: flex; align-items: center; gap: 12px; padding: 15px 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
.mine-row .ico { font-size: 18px; width: 24px; text-align: center; }
.mine-row .arrow { margin-left: auto; color: var(--ink-4); }
.mine-row .val { margin-left: auto; color: var(--ink-3); font-size: 13px; }

/* ---------- 通用 ---------- */
.toast-host { position: fixed; left: 0; right: 0; top: 42%; z-index: 300; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.toast { max-width: 78%; padding: 10px 18px; border-radius: var(--radius-s); background: rgba(0,0,0,.82); color: #fff; font-size: 14px; text-align: center; animation: toast-in .2s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sheet-host { position: fixed; inset: 0; z-index: 250; display: none; }
.sheet-host.is-open { display: block; }
.sheet-mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); animation: fade-in .2s; }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-width: var(--page-max); margin: 0 auto; background: #fff; border-radius: 16px 16px 0 0; padding: 14px 0 calc(var(--safe-b) + 10px); animation: sheet-up .26s cubic-bezier(.32,.72,0,1); }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet-title { padding: 0 18px 10px; font-size: 15px; font-weight: 600; border-bottom: 1px solid var(--line); }
.sheet-item { padding: 14px 18px; font-size: 15px; border-bottom: 1px solid var(--line); }
.sheet-item.is-on { color: var(--brand); font-weight: 500; }
.sheet-close { padding: 13px 18px 2px; text-align: center; color: var(--ink-3); font-size: 15px; }
.loading-tip { padding: 26px 0; text-align: center; font-size: 13px; color: var(--ink-3); }

/* ---------- 居中弹窗（表单，如新建播放列表 / 登录） ---------- */
.dialog-host { position: fixed; inset: 0; z-index: 260; display: none; }
.dialog-host.is-open { display: flex; align-items: center; justify-content: center; padding: 20px; }
.dialog-mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); animation: fade-in .2s; }
.dialog-panel {
  position: relative; width: 100%; max-width: 340px; background: var(--bg);
  border-radius: 14px; overflow: hidden; animation: sheet-up .24s cubic-bezier(.32,.72,0,1);
}
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dialog-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.dialog-head .x { font-size: 20px; color: var(--ink-3); }
.dialog-body { padding: 16px; }
.dialog-body .field { margin-bottom: 12px; }
.dialog-body label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.dialog-body input, .dialog-body textarea, .dialog-body select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); outline: none; font: inherit; font-size: 14px;
}
.dialog-body input:focus, .dialog-body textarea:focus { border-color: var(--brand); }
.dialog-body textarea { min-height: 60px; resize: vertical; }
.dialog-err { color: var(--danger); font-size: 12px; margin-bottom: 8px; display: none; }
.dialog-err.is-on { display: block; }
.dialog-foot { display: flex; gap: 10px; justify-content: flex-end; }
.dialog-btn { padding: 9px 18px; border-radius: 8px; font-size: 14px; border: 1px solid var(--line); background: var(--bg); }
.dialog-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- 登录卡 / 收藏分组 ---------- */
.login-card { padding: 18px 14px; background: linear-gradient(135deg, var(--brand-soft), var(--bg)); border-radius: var(--radius-m); margin-bottom: 12px; }
.login-card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.login-card p { margin: 0 0 12px; font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.btn-wx { display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border-radius: 999px; background: #07c160; color: #fff; font-size: 14px; font-weight: 500; }
.btn-wx:active { opacity: .85; }
.fav-group { margin-top: 4px; }
.fav-row { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.fav-row .ico { font-size: 17px; width: 24px; text-align: center; }
.fav-row .val { margin-left: auto; color: var(--ink-3); font-size: 13px; }
.fav-row .arrow { color: var(--ink-4); margin-left: 8px; }
.pl-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pl-item .cover { width: 52px; height: 52px; border-radius: 8px; overflow: hidden; flex: none; background: var(--chip); }
.pl-item .cover img { width: 100%; height: 100%; object-fit: cover; }
.pl-item .body { flex: 1; min-width: 0; }
.pl-item .body h4 { margin: 0 0 4px; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-item .body p { margin: 0; font-size: 12px; color: var(--ink-3); }
.pl-item .more { color: var(--ink-4); font-size: 18px; flex: none; }

/* ---------- 平板 ---------- */
@media (min-width: 768px) {
  :root { --page-max: 900px; }
  .banner { height: 190px; }
  .track-row .cover { width: 64px; height: 64px; }
  .album-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .album-scroll .album-card { flex-basis: 128px; }
  .album-hero .cover { width: 128px; height: 128px; }
  .album-hero h1 { font-size: 23px; }
}

/* ---------- 桌面 ---------- */
@media (min-width: 1200px) {
  :root { --page-max: 1180px; }
  .app { box-shadow: 0 0 0 1px var(--line); }
  .hd-inner { height: 62px; padding: 0 24px; }
  .hd-logo { display: block; }
  .hd-nav { display: flex; }
  .hd-search { flex: none; width: 300px; margin-left: auto; }
  .tab-bar { display: none; }
  .view-root, .view-root.has-player { padding-bottom: 40px; }
  .view-root.has-player { padding-bottom: calc(var(--mini-h) + 40px); }
  /* 桌面没有 tab-bar，尾部的底部留白只需让开迷你播放器 */
  .site-footer { padding-bottom: 24px; }
  .app.has-footer .view-root, .app.has-footer .view-root.has-player { padding-bottom: 24px; }
  .app.has-footer .view-root.has-player { padding-bottom: calc(var(--mini-h) + 24px); }
  .mini-player { bottom: 0; padding: 0 24px; max-width: 1180px; }
  .page { padding: 20px 24px 8px; }
  .banner { height: 240px; }
  .album-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .album-hero { padding: 26px 24px; }
  .album-actions { padding-left: 24px; padding-right: 24px; }
  .track-row:hover { background: var(--bg-soft); }
  .player-page { max-width: 520px; left: auto; right: 0; box-shadow: -12px 0 40px rgba(0,0,0,.25); }
}

/* ---------- 深色 ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --ink-1: #ececec; --ink-2: #b5b5b5; --ink-3: #8a8a8a; --ink-4: #6b6b6b;
    --line: #2a2a2c; --bg: #161617; --bg-soft: #101011; --chip: #242426; --brand-soft: #33201a;
  }
  .mini-player, .tab-bar, .app-header, .sheet-panel { background: #1c1c1e; }
  .toast { background: rgba(255,255,255,.92); color: #111; }
}

/* ==========================================================================
   全站访问口令弹窗（后台「访问口令」页配置图片与文案）
   ========================================================================== */
.gate-mask {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  background: radial-gradient(120% 90% at 50% 0%, #3c3c46 0%, #1b1b20 58%, #101014 100%);
  overflow: auto;
  animation: gate-in .22s ease;
}
.gate-card {
  width: 100%; max-width: 360px;
  padding: 26px 22px 20px;
  background: #fff; color: #1a1a1a; border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
  text-align: center;
}
.gate-media { margin: 0 0 16px; }
.gate-media img { width: 100%; max-height: 190px; object-fit: cover; border-radius: 14px; }
.gate-title { margin: 0 0 8px; font-size: 19px; font-weight: 600; }
.gate-desc { margin: 0 0 18px; font-size: 14px; line-height: 1.6; color: #4a4a4a; white-space: pre-line; }
.gate-form { display: flex; flex-direction: column; gap: 10px; }
.gate-input {
  height: 44px; padding: 0 14px;
  border: 1px solid #eeeeee; border-radius: 12px;
  background: #f7f7f8; font-size: 15px; text-align: center;
}
.gate-input:focus { outline: none; border-color: #ff5c38; background: #fff; }
.gate-btn {
  height: 44px; border-radius: 12px;
  background: #ff5c38; color: #fff; font-size: 15px; font-weight: 600;
}
.gate-btn:disabled { opacity: .6; }
.gate-err { min-height: 20px; margin-top: 10px; font-size: 13px; color: #e02020; }
.gate-foot { margin-top: 4px; font-size: 12px; color: #8c8c8c; }
.gate-card.shake { animation: gate-shake .34s; }
.gate-mask.is-out { animation: gate-out .18s ease forwards; }
@keyframes gate-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes gate-out { to { opacity: 0; transform: scale(.98); } }
@keyframes gate-shake {
  10%, 90% { transform: translateX(-4px); }
  30%, 70% { transform: translateX(6px); }
  50% { transform: translateX(-6px); }
}
@media (prefers-color-scheme: dark) {
  .gate-card { background: #1c1c1e; color: #ececec; }
  .gate-desc { color: #b5b5b5; }
  .gate-input { border-color: #2a2a2c; background: #101011; color: #ececec; }
  .gate-input:focus { background: #161617; }
}
